18224e0305ed3111e9ed8c835b6234d69a77d758
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-10-06 Yao Qi <yao.qi@linaro.org>
2
3 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4 arch/aarch64-insn.o.
5 Remove one rule.
6 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
7
8 2017-10-06 Yao Qi <yao.qi@linaro.org>
9
10 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
11 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
12 arch/arm-linux.o respectively.
13 * configure.tgt: Likewise.
14
15 2017-10-06 Yao Qi <yao.qi@linaro.org>
16
17 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
18 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
19
20 2017-10-06 Pedro Alves <palves@redhat.com>
21
22 * windows-nat.c: Include <algorithm>.
23
24 2017-10-06 Yao Qi <yao.qi@linaro.org>
25
26 * configure.tgt (i386_tobjs): New variable.
27 (amd64_tobjs): New variable.
28 Set $cpu_obs and $os_obs.
29
30 2017-10-06 Yao Qi <yao.qi@linaro.org>
31
32 * Makefile.in (CONFIG_SRC_SUBDIR): New.
33 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
34 (clean): Remove object files and dependency files.
35 (distclean): Remove the directory.
36 * configure.ac: Invoke AC_CONFIG_COMMANDS.
37 * configure: Re-generated.
38 * configure.tgt: Replace amd64.o with arch/amd64.o.
39
40 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
41
42 PR build/22188
43 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
44 and SETEND.
45
46 2017-10-05 Pedro Alves <palves@redhat.com>
47
48 * linux-nat.c (linux_child_follow_fork): When following the parent
49 and detaching the child, consult the parent thread's architecture
50 instead of the child's.
51
52 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
53
54 * ax.h: Do not include "doublest.h".
55 (union agent_val): Remove.
56
57 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
58
59 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
60 (decimal_to_string): Return std::string object.
61 (decimal_from_string): Accept std::string object. Return bool.
62 (decimal_from_integral, decimal_from_doublest): Remove.
63 (decimal_from_longest): Add prototype.
64 (decimal_from_ulongest): Likewise.
65 (decimal_to_longest): Likewise.
66 (decimal_from_doublest): Likewise.
67 * dfp.c: Do not include "gdbtypes.h" or "value.h".
68 (MAX_DECIMAL_STRING): Move here.
69 (decimal_to_string): Return std::string object.
70 (decimal_from_string): Accept std::string object. Return bool.
71 (decimal_from_integral): Remove, replace by ...
72 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
73 (decimal_to_longest): New function.
74 (decimal_from_floating): Remove, replace by ...
75 (decimal_from_doublest): ... this new function.
76 (decimal_to_doublest): Update to new decimal_to_string interface.
77
78 * value.c (unpack_long): Use decimal_to_longest.
79 * valops.c (value_cast): Use decimal_from_doublest instead of
80 decimal_from_floating. Use decimal_from_[u]longest isntead of
81 decimal_from_integral.
82 * valarith.c (value_args_as_decimal): Likewise.
83 * valprint.c (print_decimal_floating): Update to new
84 decimal_to_string interface.
85 * printcmd.c (printf_decfloat): Likewise.
86 * c-exp.y (parse_number): Update to new decimal_from_string interface.
87
88 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
89
90 * doublest.h: Do not include "floatformat.h". Remove stale comments.
91 * gdbtypes.c: Include "floatformat.h".
92 * value.c: Likewise.
93 * m68k-tdep.c: Likewise.
94
95 * findvar.c: Do not include "floatformat.h".
96 * amd64-darwin-tdep.c: Likewise.
97 * arm-linux-tdep.c: Likewise.
98 * i386-darwin-tdep.c: Likewise.
99 * i387-tdep.c: Likewise.
100 * m68k-linux-tdep.c: Likewise.
101 * mep-tdep.c: Likewise.
102 * mips-tdep.c: Likewise.
103 * nios2-tdep.c: Likewise.
104 * s390-linux-tdep.c: Likewise.
105 * sparc-obsd-tdep.c: Likewise.
106 * sparc-tdep.c: Likewise.
107 * sparc64-tdep.c: Likewise.
108 * spu-tdep.c: Likewise.
109 * tic6x-tdep.c: Likewise.
110 * tilegx-tdep.c: Likewise.
111 * vax-tdep.c: Likewise.
112 * xstormy16-tdep.c: Likewise.
113 * xtensa-tdep.c: Likewise.
114
115 * top.c: Do not include "doublest.h".
116 * aarch64-tdep.c: Likewise.
117 * alpha-tdep.c: Likewise.
118 * arm-linux-tdep.c: Likewise.
119 * m68k-linux-tdep.c: Likewise.
120 * tilegx-tdep.c: Likewise.
121 * xstormy16-tdep.c: Likewise.
122
123 2017-10-05 John Baldwin <jhb@FreeBSD.org>
124
125 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
126 (mipsn32_fbsd_sigframe): Define.
127 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
128 for FreeBSD/mipsn32.
129
130 2017-10-05 John Baldwin <jhb@FreeBSD.org>
131
132 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
133 AT_HWCAP.
134
135 2017-10-05 Tristan Gingold <tgingold@free.fr>
136
137 * MAINTAINERS (Misc): Update my email address.
138
139 2017-10-04 Pedro Alves <palves@redhat.com>
140
141 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
142 it instead of target_gdbarch.
143 (get_remote_state, get_remote_packet_size): Adjust
144 get_remote_arch_state calls, passing down target_gdbarch
145 explicitly.
146 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
147 'gdbarch' and use it instead of target_gdbarch.
148 (get_memory_packet_size): Adjust get_remote_arch_state calls,
149 passing down target_gdbarch explicitly.
150 (struct stop_reply) <arch>: New field.
151 (remote_parse_stop_reply): Use the stopped thread's architecture,
152 not the current inferior's. Save the architecture in the
153 stop_reply.
154 (process_stop_reply): Use the stop reply's architecture.
155 (process_g_packet, remote_fetch_registers)
156 (remote_prepare_to_store, store_registers_using_G)
157 (remote_store_registers): Adjust get_remote_arch_state calls,
158 using the regcache's architecture.
159 (remote_get_trace_status): Adjust get_remote_arch_state calls,
160 passing down target_gdbarch explicitly.
161 * spu-multiarch.c (spu_thread_architecture): Defer to the target
162 beneath instead of calling target_gdbarch.
163 * target.c (default_thread_architecture): Use the specified
164 inferior's architecture, instead of the current inferior's
165 architecture (via target_gdbarch).
166
167 2017-10-04 Pedro Alves <palves@redhat.com>
168
169 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
170 case.
171 (regcache_print): Handle !target_has_registers here instead.
172
173 2017-10-04 Pedro Alves <palves@redhat.com>
174
175 * frame.c (create_test_frame): Delete.
176 * frame.h (create_test_frame): Delete.
177 * gdbarch-selftests.c: Include gdbthread.h and target.h.
178 (class regcache_test): Delete.
179 (test_target_has_registers, test_target_has_stack)
180 (test_target_has_memory, test_target_prepare_to_store)
181 (test_target_store_registers): New functions.
182 (test_target_ops): New class.
183 (register_to_value_test): Error out if there's already a
184 process_stratum (or higher) target pushed. Create a fuller mock
185 environment, with mock target_ops, inferior, address space, thread
186 and inferior_ptid.
187 * progspace.c (struct address_space): Move to ...
188 * progspace.h (struct address_space): ... here.
189 * regcache.h (regcache::~regcache, regcache::raw_write)
190 [GDB_SELF_TEST]: No longer virtual.
191
192 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
193
194 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
195
196 2017-10-04 Pedro Alves <palves@redhat.com>
197
198 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
199 out of 'between TRY and CATCH'.
200
201 2017-10-04 Pedro Alves <palves@redhat.com>
202
203 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
204 * common/common-exceptions.h (TRY): Open an outermost scope.
205 Expand intro comment.
206 (CATCH): Reindent.
207 (END_CATCH): Close the outermost scope.
208 * completer.c (complete_line_internal): Add missing END_CATCH.
209
210 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
211
212 * NEWS (Changes since GDB 8.0): Add entry about new
213 'set-cwd-on-gdbserver' feature.
214 (New remote packets): Add entry for QSetWorkingDir.
215 * common/common-inferior.h (set_inferior_cwd): New prototype.
216 * infcmd.c (set_inferior_cwd): Remove "static".
217 (show_cwd_command): Expand text to include remote debugging.
218 * remote.c: Add PACKET_QSetWorkingDir.
219 (remote_protocol_features) <QSetWorkingDir>: New entry for
220 PACKET_QSetWorkingDir.
221 (extended_remote_set_inferior_cwd): New function.
222 (extended_remote_create_inferior): Call
223 "extended_remote_set_inferior_cwd".
224 (_initialize_remote): Call "add_packet_config_cmd" for
225 QSetWorkingDir.
226
227 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
228
229 * NEWS (New commands): Mention "set/show cwd".
230 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
231 "cd" command's help text.
232 * common/common-inferior.h (get_inferior_cwd): New prototype.
233 * infcmd.c (inferior_cwd_scratch): New global variable.
234 (set_inferior_cwd): New function.
235 (get_inferior_cwd): Likewise.
236 (set_cwd_command): Likewise.
237 (show_cwd_command): Likewise.
238 (_initialize_infcmd): Add "set/show cwd" commands.
239 * inferior.h (class inferior) <cwd>: New field.
240 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
241 (fork_inferior): Change inferior's cwd before its execution.
242 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
243 to CreateProcess.
244
245 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
246
247 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
248 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
249 (COMMON_OBS): Add gdb_tilde_expand.o.
250 * common/gdb_tilde_expand.c: New file.
251 * common/gdb_tilde_expand.h: Likewise.
252
253 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
254
255 * gdbarch.sh (objfile): Remove duplicate declaration.
256 * gdbarch.h: Regenerate.
257
258 2017-10-03 Tom Tromey <tom@tromey.com>
259
260 * utils.c (internal_vproblem): Use string_vprintf.
261
262 2017-10-03 Tom Tromey <tom@tromey.com>
263
264 * printcmd.c (info_symbol_command): Use std::string.
265
266 2017-10-03 Tom Tromey <tom@tromey.com>
267
268 * top.c (gdb_safe_append_history): Use std::string.
269
270 2017-10-03 Tom Tromey <tom@tromey.com>
271
272 * event-top.c (stdin_event_handler): Update.
273 * main.c (captured_main_1): Update.
274 * top.h (make_delete_ui_cleanup): Remove.
275 (struct ui): Add constructor and destructor.
276 (new_ui, delete_ui): Remove.
277 * top.c (make_delete_ui_cleanup): Remove.
278 (new_ui_command): Use std::unique_ptr.
279 (delete_ui_cleanup): Remove.
280 (ui::ui): Rename from new_ui. Update.
281 (free_ui): Remove.
282 (ui::~ui): Rename from delete_ui. Update.
283
284 2017-10-03 Tom Tromey <tom@tromey.com>
285
286 * symfile.c (load_progress): Use gdb::byte_vector.
287
288 2017-10-03 Tom Tromey <tom@tromey.com>
289
290 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
291 declaration.
292 * printcmd.c (x_command): Remove unused declaration.
293 * symfile.c (symbol_file_command): Remove unused declaration.
294
295 2017-10-03 Tom Tromey <tom@tromey.com>
296
297 * utils.c (internal_vproblem): Use std::string.
298 (defaulted_query): Likewise.
299
300 2017-10-03 Tom Tromey <tom@tromey.com>
301
302 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
303 * top.c (execute_command_to_string): Update.
304 * utils.c (make_cleanup_restore_page_info): Remove.
305 (do_restore_page_info_cleanup): Remove.
306 (set_batch_flag_and_restore_page_info):
307 New.
308 (make_cleanup_restore_page_info): Remove.
309 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
310 (~set_batch_flag_and_restore_page_info): New
311 (make_cleanup_restore_uinteger): Remove.
312 (make_cleanup_restore_integer): Remove.
313 (struct restore_integer_closure): Remove.
314 (restore_integer): Remove.
315 * utils.h (struct set_batch_flag_and_restore_page_info): New
316 class.
317 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
318 (make_cleanup_restore_page_info): Remove.
319 (make_cleanup_restore_uinteger) Remove.
320 (make_cleanup_restore_integer) Remove.
321
322 2017-10-03 Tom Tromey <tom@tromey.com>
323
324 * record-full.h (record_full_gdb_operation_disable_set): Return
325 scoped_restore_tmpl<int>.
326 * infrun.c (adjust_pc_after_break): Update.
327 (handle_signal_stop): Update.
328 * record-full.c (record_full_gdb_operation_disable_set): Return
329 scoped_restore_tmpl<int>.
330 (record_full_wait_1, record_full_insert_breakpoint)
331 (record_full_remove_breakpoint, record_full_save)
332 (record_full_goto_insn): Update.
333
334 2017-10-02 Tom Tromey <tom@tromey.com>
335
336 PR rust/22236:
337 * rust-lang.c (rust_val_print_str): New function.
338 (val_print_struct): Call it.
339 (rust_subscript): Preserve name of slice type.
340
341 2017-10-02 Tom Tromey <tom@tromey.com>
342
343 * rust-lang.c (rust_subscript): Handle slices in
344 EVAL_AVOID_SIDE_EFFECTS case.
345
346 2017-10-02 Tom Tromey <tom@tromey.com>
347
348 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
349
350 2017-10-02 Tom Tromey <tom@tromey.com>
351
352 * rust-lang.h (rust_slice_type): Add "extern".
353
354 2017-10-02 Tom Tromey <tom@tromey.com>
355 Pedro Alves <palves@redhat.com>
356
357 * ada-lang.h (ada_exc_info::operator<): Make const.
358 (ada_exc_info::operator==): Make const.
359 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
360 Make const.
361
362 2017-09-29 Tom Tromey <tom@tromey.com>
363
364 * target.c (read_whatever_is_readable): Change type of "result".
365 Update.
366 (free_memory_read_result_vector): Remove.
367 (read_memory_robust): Change return type. Update.
368 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
369 bin2hex, std::string.
370 * target.h (memory_read_result_s): Remove typedef.
371 (free_memory_read_result_vector): Remove.
372 (read_memory_robust): Return std::vector.
373
374 2017-09-29 Tom Tromey <tom@tromey.com>
375
376 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
377
378 2017-09-29 Tom Tromey <tom@tromey.com>
379
380 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
381 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
382 operator< and operator==.
383 (ada_exceptions_list): Return a std::vector.
384 * ada-lang.c (ada_exc_info::operator<): Rename from
385 compare_ada_exception_info.
386 (ada_exc_info::operator==): New.
387 (sort_remove_dups_ada_exceptions_list): Change type of
388 "exceptions".
389 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
390 (ada_add_global_exceptions): Likewise.
391 (ada_exceptions_list_1): Return a std::vector.
392 (ada_exceptions_list): Likewise.
393
394 2017-09-29 Tom Tromey <tom@tromey.com>
395
396 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
397 'std::set *'.
398 (print_one_inferior): Update.
399 (free_vector_of_ints): Remove.
400 (list_available_thread_groups): Change "ids" to std::set.
401 (mi_cmd_list_thread_groups): Update.
402 (struct collect_cores_data) <core>: Now a std::set.
403 (collect_cores): Update.
404 (unique): Remove.
405 (print_one_inferior): Update.
406
407 2017-09-29 Tom Tromey <tom@tromey.com>
408
409 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
410 (mi_execute_async_cli_command): Likewise.
411 (mi_cmd_trace_frame_collected): Use field_fmt.
412
413 2017-09-29 Tom Tromey <tom@tromey.com>
414
415 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
416 gdb::byte_vector.
417
418 2017-09-29 Tom Tromey <tom@tromey.com>
419
420 * mi/mi-parse.c (mi_parse): Remove unused declaration.
421
422 2017-09-29 Tom Tromey <tom@tromey.com>
423
424 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
425
426 2017-09-29 Tom Tromey <tom@tromey.com>
427
428 * varobj.h (varobj_gen_name): Return std::string.
429 * varobj.c (varobj_gen_name): Return std::string.
430 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
431 (mi_cmd_var_delete): Don't copy "name".
432
433 2017-09-29 Tom Tromey <tom@tromey.com>
434
435 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
436 (mi_cmd_break_insert_1): Update.
437
438 2017-09-29 Tom Tromey <tom@tromey.com>
439
440 * target.h (make_scoped_defer_target_commit_resume): Update.
441 * target.c (make_scoped_defer_target_commit_resume): Rename from
442 make_cleanup_defer_target_commit_resume. Return a
443 scoped_restore.
444 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
445
446 2017-09-29 Tom Tromey <tom@tromey.com>
447
448 * main.c (captured_main_1): Remove unused declaration.
449 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
450
451 2017-09-29 Tom Tromey <tom@tromey.com>
452
453 * symtab.c (search_symbols): Remove unused outer cleanup.
454 (make_source_files_completion_list): Remove unused declaration.
455
456 2017-09-29 Tom Tromey <tom@tromey.com>
457
458 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
459
460 2017-09-29 Tom Tromey <tom@tromey.com>
461
462 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
463 gdb::byte_vector.
464
465 2017-09-29 Tom Tromey <tom@tromey.com>
466
467 * complaints.c (vcomplaint): Use std::string.
468
469 2017-09-29 Tom Tromey <tom@tromey.com>
470
471 * tracepoint.c (trace_variable_command): Use std::string.
472 (encode_actions_1): Remove unused declarations.
473 (create_tsv_from_upload): Use std::string.
474
475 2017-09-29 Tom Tromey <tom@tromey.com>
476
477 * cp-support.c (gdb_demangle): Use std::string.
478
479 2017-09-29 Tom Tromey <tom@tromey.com>
480
481 * stack.c (parse_frame_specification): Use std::string
482 (info_frame_command): Use gdb::unique_xmalloc_ptr.
483
484 2017-09-29 Tom Tromey <tom@tromey.com>
485
486 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
487
488 2017-09-29 Tom Tromey <tom@tromey.com>
489
490 * utils.c (vfprintf_maybe_filtered): Use std::string.
491 (vfprintf_unfiltered): Likewise.
492
493 2017-09-29 Tom Tromey <tom@tromey.com>
494
495 * event-top.c (top_level_prompt): Return std::string.
496 (display_gdb_prompt): Update.
497
498 2017-09-29 Tom Tromey <tom@tromey.com>
499
500 * unittests/common-utils-selftests.c (format): New function.
501 (string_vprintf_tests): New function.
502 (_initialize_common_utils_selftests): Register new tests.
503 * common/common-utils.c (string_vprintf): New function.
504 * common/common-utils.h (string_vprintf): Declare.
505
506 2017-09-29 Pedro Alves <palves@redhat.com>
507
508 * common/rsp-low.c (unpack_varlen_hex): Constify.
509 * common/rsp-low.h (unpack_varlen_hex): Constify.
510 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
511 Constify.
512 * remote.c (remote_set_permissions, read_ptid)
513 (remote_current_thread, remote_get_threads_with_qthreadinfo)
514 (remote_static_tracepoint_marker_at)
515 (remote_static_tracepoint_markers_by_strid)
516 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
517 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
518 (parse_tracepoint_definition, parse_tsv_definition)
519 (parse_static_tracepoint_marker_definition): Constify.
520 * tracepoint.h (parse_static_tracepoint_marker_definition)
521 (parse_trace_status, parse_tracepoint_status)
522 (parse_tracepoint_definition, parse_tsv_definition): Constify.
523
524 2017-09-29 Pedro Alves <palves@redhat.com>
525
526 * remote.c (target_buf, target_buf_size): Delete.
527 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
528 Use the connection's packet buffer instead.
529 All callers adjusted.
530 (_initialize_remote): Remove references to target_buf and
531 target_buf_size.
532
533 2017-09-28 Pedro Alves <palves@redhat.com>
534
535 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
536 unittests/common-utils-selftests.c.
537 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
538 (COMMON_OBS): Remove utils-selftests.o.
539 * utils-selftests.c: Move to ...
540 * unittests/common-utils-selftests.c: ... here and rename self
541 test to "string_printf".
542
543 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
544
545 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
546 having NULL cus or tus.
547
548 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
549
550 * arm-tdep.c: (convert_from_extended): Remove.
551 (convert_to_extended): Likewise.
552 (arm_extract_return_value): Use convert_typed_floating.
553 (arm_store_return_value): Likewise.
554
555 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
556 * sh-tdep.c: Do not include "floatformat.h".
557 (sh_littlebyte_bigword_type): New function.
558 (sh_register_convert_to_virtual): Use convert_typed_floating.
559 (sh_register_convert_to_raw): Likewise.
560 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
561 (sh64_littlebyte_bigword_type): New function.
562 (sh64_extract_return_value): Use convert_typed_floating.
563 (sh64_register_convert_to_virtual): Likewise.
564 (sh64_register_convert_to_raw): Likewise.
565
566 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
567
568 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
569 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
570
571 * gdbtypes.h (union type_specific): Make field floatformat hold
572 just a single struct floatformat, not an array.
573 (floatformat_from_type): Move here.
574 * gdbtypes.c (floatformat_from_type): Move here. Update to
575 changed TYPE_FLOATFORMAT definition.
576 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
577 (recursive_dump_type): Likewise.
578 (init_float_type): Install correct floatformat for byte order.
579 (arch_float_type): Likewise.
580
581 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
582
583 * gdbtypes.c (init_type): Change incoming argument from
584 length-in-bytes to length-in-bits. Assert length is a
585 multiple of TARGET_CHAR_BITS.
586 (arch_type, arch_flags_type): Likewise.
587 (init_integer_type): Update call to init_type.
588 (init_character_type): Likewise.
589 (init_boolean_type): Likewise.
590 (init_float_type): Likewise.
591 (init_decfloat_type): Likewise.
592 (init_complex_type): Likewise.
593 (init_pointer_type): Likewise.
594 (objfile_type): Likewise.
595 (arch_integer_type): Update call to arch_type.
596 (arch_character_type): Likewise.
597 (arch_boolean_type): Likewise.
598 (arch_float_type): Likewise.
599 (arch_decfloat_type): Likewise.
600 (arch_complex_type): Likewise.
601 (arch_pointer_type): Likewise.
602 (gdbtypes_post_init): Likewise.
603
604 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
605 (read_base_type): Likewise.
606 * mdebugread.c (basic_type): Likewise.
607 * stabsread.c (dbx_init_float_type): Likewise.
608 (rs6000_builtin_type): Likewise.
609 (read_range_type): Likewise. Also, fix call to init_integer_type
610 with erroneous length argument.
611
612 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
613 * d-lang.c (build_d_types): Likewise.
614 * f-lang.c (build_fortran_types): Likewise.
615 * go-lang.c (build_go_types): Likewise.
616 * opencl-lang.c (build_opencl_types): Likewise.
617 * jit.c (finalize_symtab): Likewise.
618 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
619 (build_std_type_info_type): Likewise.
620 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
621 update call to arch_flags_type.
622
623 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
624 arch_type.
625 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
626 * windows-tdep.c (windows_get_tlb_type): Likewise.
627
628 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
629 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
630 * m32c-tdep.c (make_types): Likewise.
631 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
632 (rl78_psw_type): Update call to arch_flags_type.
633 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
634 * rx-tdep.c (rx_psw_type): Likewise.
635 (rx_fpsw_type): Likewise.
636 * sparc-tdep.c (sparc_psr_type): Likewise.
637 (sparc_fsr_type): Likewise.
638 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
639 (sparc64_ccr_type): Likewise.
640 (sparc64_fsr_type): Likewise.
641 (sparc64_fprs_type): Likewise.
642
643 2017-09-27 Tom Tromey <tom@tromey.com>
644
645 * findcmd.c (find_command): Constify.
646
647 2017-09-27 Tom Tromey <tom@tromey.com>
648
649 * ada-tasks.c (task_command_1, task_command): Constify.
650
651 2017-09-27 Tom Tromey <tom@tromey.com>
652
653 * symtab.c (maintenance_print_symbol_cache)
654 (maintenance_flush_symbol_cache)
655 (maintenance_print_symbol_cache_statistics): Constify.
656
657 2017-09-27 Tom Tromey <tom@tromey.com>
658
659 * inferior.c (detach_inferior_command, kill_inferior_command)
660 (inferior_command): Constify.
661
662 2017-09-27 Tom Tromey <tom@tromey.com>
663
664 * regcache.c (regcache_print, maintenance_print_registers)
665 (maintenance_print_raw_registers)
666 (maintenance_print_cooked_registers)
667 (maintenance_print_register_groups)
668 (maintenance_print_remote_registers): Constify.
669
670 2017-09-27 Tom Tromey <tom@tromey.com>
671
672 * printcmd.c (map_display_numbers, undisplay_command)
673 (enable_disable_display_command, enable_display_command)
674 (disable_display_command): Constify.
675
676 2017-09-27 Tom Tromey <tom@tromey.com>
677
678 * breakpoint.h (delete_command): Don't declare.
679 * breakpoint.c (delete_command, enable_once_command)
680 (enable_count_command, enable_delete_command, breakpoint_1)
681 (maintenance_info_breakpoints, stopin_command, stopat_command)
682 (delete_command, delete_trace_command, save_breakpoints)
683 (save_breakpoints_command, save_tracepoints_command): Constify.
684
685 2017-09-27 Tom Tromey <tom@tromey.com>
686
687 * macrocmd.c (macro_expand_command, macro_expand_once_command)
688 (skip_ws, extract_identifier, macro_define_command)
689 (macro_undef_command, macro_list_command): Constify.
690
691 2017-09-27 Tom Tromey <tom@tromey.com>
692
693 * infcmd.c (environment_info, set_environment_command)
694 (unset_environment_command, path_info, info_proc_cmd_1)
695 (info_proc_cmd_mappings, info_proc_cmd_stat)
696 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
697 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
698
699 2017-09-27 Tom Tromey <tom@tromey.com>
700
701 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
702 Constify.
703
704 2017-09-27 Tom Tromey <tom@tromey.com>
705
706 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
707
708 2017-09-27 Tom Tromey <tom@tromey.com>
709
710 * demangle.c (demangle_command): Constify.
711
712 2017-09-27 Tom Tromey <tom@tromey.com>
713
714 * progspace.c (maintenance_info_program_spaces_command):
715 Constify.
716
717 2017-09-27 Tom Tromey <tom@tromey.com>
718
719 * compile/compile.c (check_raw_argument, compile_file_command)
720 (compile_code_command, compile_print_command): Constify.
721
722 2017-09-27 Tom Tromey <tom@tromey.com>
723
724 * reggroups.c (maintenance_print_reggroups): Constify.
725
726 2017-09-27 Tom Tromey <tom@tromey.com>
727
728 * dwarf2read.c (save_gdb_index_command): Constify.
729
730 2017-09-27 Tom Tromey <tom@tromey.com>
731
732 * stap-probe.c (info_probes_stap_command): Constify.
733
734 2017-09-27 Tom Tromey <tom@tromey.com>
735
736 * fork-child.c (unset_exec_wrapper_command): Constify.
737
738 2017-09-27 Tom Tromey <tom@tromey.com>
739
740 * btrace.c (get_uint, get_context_size, no_chunk)
741 (maint_btrace_packet_history_cmd)
742 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
743 (maint_info_btrace_cmd): Constify.
744
745 2017-09-27 Tom Tromey <tom@tromey.com>
746
747 * reverse.c (delete_bookmark_command): Constify.
748
749 2017-09-27 Tom Tromey <tom@tromey.com>
750
751 * remote.c (set_memory_packet_size)
752 (set_memory_write_packet_size, show_memory_write_packet_size)
753 (set_memory_read_packet_size, show_memory_read_packet_size)
754 (compare_sections_command, packet_command, remote_put_command)
755 (remote_get_command, remote_delete_command): Constify.
756
757 2017-09-27 Tom Tromey <tom@tromey.com>
758
759 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
760 (set_mipsfpu_double_command, set_mipsfpu_none_command)
761 (set_mipsfpu_auto_command): Constify.
762
763 2017-09-27 Tom Tromey <tom@tromey.com>
764
765 * cli/cli-cmds.h (cd_command): Constify.
766 * cli/cli-cmds.c (cd_command): Constify.
767
768 2017-09-27 Tom Tromey <tom@tromey.com>
769
770 * thread.c (thread_name_command, thread_find_command): Constify.
771
772 2017-09-27 Tom Tromey <tom@tromey.com>
773
774 * probe.c (enable_probes_command, disable_probes_command):
775 Constify.
776
777 2017-09-27 Tom Tromey <tom@tromey.com>
778
779 * symfile.c (symbol_file_command): Constify.
780 * gdbcore.h (deprecated_file_changed_hook): Constify.
781 * exec.c (deprecated_file_changed_hook, exec_file_command)
782 (file_command): Constify.
783 * defs.h (symbol_file_command): Constify.
784
785 2017-09-27 Tom Tromey <tom@tromey.com>
786
787 * remote-fileio.c (set_system_call_allowed)
788 (show_system_call_allowed): Constify.
789
790 2017-09-27 Tom Tromey <tom@tromey.com>
791
792 * tracepoint.c (delete_trace_variable_command)
793 (tfind_end_command, tfind_start_command, tfind_pc_command)
794 (tfind_tracepoint_command, tfind_line_command)
795 (tfind_range_command, tfind_outside_command): Constify.
796
797 2017-09-27 Tom Tromey <tom@tromey.com>
798
799 * ax-gdb.c (maint_agent_printf_command, agent_command)
800 (agent_eval_command): Constify.
801
802 2017-09-27 Tom Tromey <tom@tromey.com>
803
804 * tracepoint.c (info_scope_command): Constify.
805 * python/python.c (gdbpy_decode_line): Constify.
806 * python/py-breakpoint.c (bppy_init): Constify.
807 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
808 * location.h: (new_linespec_location)
809 (string_to_event_location_basic, string_to_event_location):
810 Constify.
811 * location.c (new_linespec_location)
812 (string_to_event_location_basic, string_to_event_location):
813 Constify.
814 * linespec.h (decode_line_with_current_source)
815 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
816 * linespec.c (linespec_lex_to_end)
817 (decode_line_with_current_source)
818 (decode_line_with_last_displayed): Constify.
819 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
820 Constify.
821 * cli/cli-cmds.c (edit_command, list_command): Constify.
822 * breakpoint.h (until_break_command, watch_command_wrapper)
823 (awatch_command_wrapper, rwatch_command_wrapper)
824 (init_ada_exception_breakpoint): Constify.
825 * breakpoint.c (break_command_1, dprintf_command)
826 (break_range_command, watch_command_wrapper)
827 (rwatch_command_wrapper, awatch_command_wrapper)
828 (until_break_command, init_ada_exception_breakpoint)
829 (strace_marker_create_sals_from_location, trace_command)
830 (ftrace_command, strace_command, struct tracepoint): Constify.
831 * ax-gdb.c (agent_command_1): Constify.
832 * ada-lang.c (ada_exception_sal): Constify.
833
834 2017-09-27 Tom Tromey <tom@tromey.com>
835
836 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
837 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
838 (get_context_size, no_chunk, get_insn_history_modifiers)
839 (cmd_record_insn_history, get_call_history_modifiers)
840 (cmd_record_call_history): Constify.
841
842 2017-09-27 Tom Tromey <tom@tromey.com>
843
844 * source.c (show_substitute_path_command)
845 (unset_substitute_path_command, set_substitute_path_command):
846 Constify.
847
848 2017-09-27 Tom Tromey <tom@tromey.com>
849
850 * typeprint.c (maintenance_print_type): Constify.
851 * maint.c (maintenance_dump_me, maintenance_demangle)
852 (maintenance_time_display, maintenance_info_sections)
853 (maintenance_print_statistics, maintenance_deprecate)
854 (maintenance_undeprecate): Constify.
855 (maintenance_do_deprecate): Constify. Use std::string.
856 (maintenance_selftest): Constify.
857 * gdbtypes.h (maintenance_print_type): Constify.
858
859 2017-09-27 Tom Tromey <tom@tromey.com>
860
861 * hppa-tdep.c (unwind_command): Constify.
862
863 2017-09-27 Tom Tromey <tom@tromey.com>
864
865 * target-descriptions.c (unset_tdesc_filename_cmd)
866 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
867 Constify.
868
869 2017-09-27 Tom Tromey <tom@tromey.com>
870
871 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
872
873 2017-09-27 Tom Tromey <tom@tromey.com>
874
875 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
876
877 2017-09-27 Tom Tromey <tom@tromey.com>
878
879 * tui/tui-regs.c (tui_reg_command): Constify.
880
881 2017-09-27 Tom Tromey <tom@tromey.com>
882
883 * skip.c (skip_file_command, skip_function_command)
884 (skip_enable_command, skip_disable_command, skip_delete_command):
885 Constify.
886
887 2017-09-27 Tom Tromey <tom@tromey.com>
888
889 * record-btrace.c (cmd_record_btrace_bts_start)
890 (cmd_record_btrace_pt_start): Constify.
891
892 2017-09-27 Tom Tromey <tom@tromey.com>
893
894 * symmisc.c (maintenance_print_symbols)
895 (maintenance_print_msymbols, maintenance_print_objfiles)
896 (maintenance_info_symtabs, maintenance_check_symtabs)
897 (maintenance_expand_symtabs, maintenance_info_line_tables):
898 Constify.
899
900 2017-09-27 Tom Tromey <tom@tromey.com>
901
902 * top.c (new_ui_command): Constify.
903
904 2017-09-27 Tom Tromey <tom@tromey.com>
905
906 * symfile.c (add_symbol_file_command)
907 (remove_symbol_file_command, list_overlays_command)
908 (map_overlay_command, unmap_overlay_command)
909 (overlay_auto_command, overlay_manual_command)
910 (overlay_off_command, overlay_load_command): Constify.
911
912 2017-09-27 Tom Tromey <tom@tromey.com>
913
914 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
915 (info_spu_mailbox_command, info_spu_dma_command)
916 (info_spu_proxydma_command): Constify.
917
918 2017-09-27 Tom Tromey <tom@tromey.com>
919
920 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
921
922 2017-09-27 Tom Tromey <tom@tromey.com>
923
924 * cli/cli-script.c (user_defined_command): Constify.
925
926 2017-09-27 Tom Tromey <tom@tromey.com>
927
928 * cli/cli-dump.c (dump_memory_command, dump_value_command)
929 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
930 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
931 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
932 (dump_binary_value, append_binary_memory, append_binary_value):
933 Constify.
934 (struct dump_context) <func>: Constify.
935 (add_dump_command): Update.
936
937 2017-09-27 Tom Tromey <tom@tromey.com>
938
939 * cli/cli-cmds.c (show_version, show_configuration)
940 (source_command, show_user): Constify.
941
942 2017-09-27 Tom Tromey <tom@tromey.com>
943
944 * target.c (maintenance_print_target_stack): Constify.
945
946 2017-09-27 Tom Tromey <tom@tromey.com>
947
948 * interps.c (interpreter_exec_cmd): Constify.
949
950 2017-09-27 Tom Tromey <tom@tromey.com>
951
952 * record-full.c (cmd_record_full_restore): Constify.
953
954 2017-09-27 Tom Tromey <tom@tromey.com>
955
956 * memattr.c (enable_mem_command, disable_mem_command)
957 (delete_mem_command): Constify.
958
959 2017-09-27 Tom Tromey <tom@tromey.com>
960
961 * value.c (show_convenience): Constify.
962
963 2017-09-27 Tom Tromey <tom@tromey.com>
964
965 * gdbcore.h (core_file_command): Update.
966 * corefile.c (core_file_command): Constify.
967
968 2017-09-27 Tom Tromey <tom@tromey.com>
969
970 * user-regs.c (maintenance_print_user_registers): Constify.
971
972 2017-09-27 Tom Tromey <tom@tromey.com>
973
974 * cp-namespace.c (maintenance_cplus_namespace): Constify.
975
976 2017-09-27 Tom Tromey <tom@tromey.com>
977
978 * cp-support.c (first_component_command): Constify.
979
980 2017-09-27 Tom Tromey <tom@tromey.com>
981
982 * psymtab.c (maintenance_print_psymbols)
983 (maintenance_info_psymtabs, maintenance_check_psymtabs):
984 Constify.
985
986 2017-09-27 Tom Tromey <tom@tromey.com>
987
988 * windows-tdep.c (display_tib): Constify.
989
990 2017-09-27 Tom Tromey <tom@tromey.com>
991
992 * linux-fork.c (delete_checkpoint_command)
993 (detach_checkpoint_command): Constify.
994
995 2017-09-27 Tom Tromey <tom@tromey.com>
996
997 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
998
999 2017-09-27 Tom Tromey <tom@tromey.com>
1000
1001 * arc-tdep.c (dump_arc_instruction_command): Constify.
1002
1003 2017-09-27 Tom Tromey <tom@tromey.com>
1004
1005 * valprint.c (set_radix, show_radix): Constify.
1006
1007 2017-09-27 Tom Tromey <tom@tromey.com>
1008
1009 * dtrace-probe.c (info_probes_dtrace_command): Constify.
1010
1011 2017-09-27 Tom Tromey <tom@tromey.com>
1012
1013 * command.h (not_just_help_class_command): Update.
1014 * cli/cli-decode.h (not_just_help_class_command): Update.
1015 * cli/cli-decode.c (not_just_help_class_command): Constify.
1016
1017 2017-09-27 Tom Tromey <tom@tromey.com>
1018
1019 * gdb_bfd.c (maintenance_info_bfds): Constify.
1020
1021 2017-09-27 Tom Tromey <tom@tromey.com>
1022
1023 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1024 overloads.
1025 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
1026 (do_const_cfunc): New function.
1027 (cmd_cfunc_eq): New overload.
1028 (cli_user_command_p): Check do_const_cfunc.
1029 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1030 const_cfunc.
1031 * command.h (add_cmd): Add const overload and no-function
1032 overload.
1033 (set_cmd_cfunc): Add const overload.
1034 (cmd_const_cfunc_ftype): Declare.
1035 (cmd_cfunc_eq): Add const overload.
1036 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1037 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1038 overload.
1039
1040 2017-09-27 Tom Tromey <tom@tromey.com>
1041
1042 * macroexp.c (get_next_token_for_substitution): New function.
1043 (substitute_args): Call it. Check for __VA_OPT__.
1044
1045 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1046 Pedro Alves <palves@redhat.com>
1047
1048 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1049 producer_is_icc_lt_14.
1050 (producer_is_icc_lt_14): New function.
1051 (check_producer): Add code for checking version of ICC.
1052 (producer_is_icc): Move to producer.c.
1053 (read_structure_type): Restrict ICC workaround to ICC<14.
1054 * producer.c: Include selftest.h.
1055 (producer_is_icc, producer_parsing_tests, _initialize_producer):
1056 New functions.
1057 * producer.h (producer_is_icc): New declaration.
1058
1059 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1060
1061 * Makefile.in (SFILES): Add producer.c.
1062 (COMMON_OBS): Add producer.o
1063 * amd64-tdep.c (producer.h): Add new include.
1064 * dwarf2read.c (producer.h): Add new include.
1065 * producer.c: New file.
1066 * producer.h: New file.
1067 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1068 producer.c.
1069 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1070 producer.h.
1071
1072 2017-09-26 Matthias Klose <doko@ubuntu.com>
1073
1074 * configure.ac: Search ncursesw before ncurses.
1075 Check ncursesw/ncurses.h before ncurses/ncurses.h.
1076 * gdb_curses.h: Include <ncursesw/ncurses.h>
1077 * config.in, configure: Regenerate.
1078
1079 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1080
1081 PR gdb/22185
1082 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1083 obsolete.
1084 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1085 Remove i386sol2 support.
1086 * configure.nat <i386sol2>: Remove.
1087 <sol2-64>: Fold into ...
1088 <sol2>: ... this.
1089 Move common settings to default section.
1090 Add sol-thread.o.
1091 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1092 x86_64-*-solaris2.1[0-9]*>: Rename to ...
1093 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1094 <i[34567]86-*-solaris*>: Remove.
1095 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1096
1097 * configure.ac: Remove wctype in libw check.
1098 (_MSE_INT_H): Don't define on Solaris 7-9.
1099 <solaris*>: Remove libthread_db.so.1 check.
1100 * configure: Regenerate.
1101 * config.in: Regenerate.
1102
1103 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1104 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1105 (gdb_ps_size_t): Remove.
1106 Use base types in users.
1107 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1108
1109 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1110
1111 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1112
1113 PR build/22206
1114 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1115 (adi_is_addr_mapped): Likewise.
1116 (PSR_ICC): Don't redefine.
1117 (PSR_IMPL): Likewise.
1118
1119 2017-09-25 Tom Tromey <tom@tromey.com>
1120
1121 * regcache.c (regcache::dump): Use string_printf.
1122
1123 2017-09-25 Tom Tromey <tom@tromey.com>
1124
1125 * regcache.c (class regcache_invalidator): New.
1126 (struct register_to_invalidate): Remove.
1127 (make_cleanup_regcache_invalidate): Remove.
1128 (regcache::raw_write): Use regcache_invalidator.
1129
1130 2017-09-25 Tom Tromey <tom@tromey.com>
1131
1132 * spu-tdep.c (spu2ppu_sniffer): Update.
1133 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1134 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1135 Remove.
1136 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1137 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1138 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1139 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1140 (frame_pop): Update.
1141
1142 2017-09-25 Tom Tromey <tom@tromey.com>
1143
1144 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1145 * regcache.h (regcache_xfree): Don't declare.
1146 * regcache.c (regcache_xfree): Remove.
1147 (do_regcache_xfree): Use delete.
1148 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1149 * linux-fork.c (free_fork): Use delete.
1150 (fork_save_infrun_state): Likewise.
1151 * jit.c (jit_dealloc_cache): Use delete.
1152 * infrun.c (discard_infcall_suspend_state): Use delete.
1153
1154 2017-09-25 Tom Tromey <tom@tromey.com>
1155
1156 * regcache.h (regcache_xmalloc): Don't declare.
1157 (regcache_raw_set_cached_value): Update comment.
1158 * regcache.c (regcache_xmalloc): Remove.
1159 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1160 * jit.c (jit_frame_sniffer): Use new.
1161 * frame.c (frame_save_as_regcache): Use new.
1162
1163 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1164
1165 * NEWS: Advertise support for guarded-storage registers on IBM z.
1166
1167 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1168
1169 * s390-linux-nat.c (have_regset_gs): New static variable.
1170 (s390_linux_fetch_inferior_registers): Handle guarded-storage
1171 control block and guarded-storage broadcast control regsets.
1172 (s390_read_description): Detect whether the target has
1173 guarded-storage support, return appropriate tdesc.
1174 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1175 (features/s390x-gs-linux64.c): Likewise.
1176 (struct gdbarch_tdep) <have_gs>: New field.
1177 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1178 (s390_gsbc_regset): New variables.
1179 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1180 and s390_gsbc_regset, if applicable.
1181 (s390_core_read_description): Check whether core file was from a
1182 target with guarded-storage support; include appropriate regsets.
1183 (s390_gdbarch_init): Add registers for guarded-storage support.
1184 (_initialize_s390_tdep): Initialize new target descriptions that
1185 include registers for guarded-storage support.
1186 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1187 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1188 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1189 (S390_NUM_REGS): Adjust macro definition.
1190 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1191 (tdesc_s390x_gs_linux64): New declarations.
1192
1193 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1194
1195 * features/s390-gs-linux64.xml: New file.
1196 * features/s390-gs.xml: New file.
1197 * features/s390-gsbc.xml: New file.
1198 * features/s390x-gs-linux64.xml: New file.
1199 * features/Makefile (WHICH): Add s390-gs-linux64 and
1200 s390x-gs-linux64.
1201 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1202 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1203 * features/s390-gs-linux64.c: New generated file.
1204 * features/s390x-gs-linux64.c: New file.
1205 * regformats/s390-gs-linux64.dat: New file.
1206 * regformats/s390x-gs-linux64.dat: New file.
1207
1208 2017-09-23 Tom Tromey <tom@tromey.com>
1209
1210 * defs.h (make_cleanup_override_quit_handler): Don't declare.
1211
1212 2017-09-22 Tom Tromey <tom@tromey.com>
1213
1214 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1215 type to scoped_restore_tmpl.
1216 <scoped_input_handler>: Initialize m_quit_handler directly.
1217
1218 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1219
1220 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1221 (cd_command): Likewise. Free "current_directory" before
1222 assigning to it.
1223 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1224 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1225 * top.c (gdb_dirbuf): Remove global declaration.
1226 * top.h (gdb_dirbuf): Likewise.
1227
1228 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1229
1230 * gnulib/aclocal.m4: Regenerate.
1231 * gnulib/config.in: Regenerate.
1232 * gnulib/configure: Regenerate.
1233 * gnulib/import/Makefile.am: Regenerate.
1234 * gnulib/import/Makefile.in: Regenerate.
1235 * gnulib/import/assure.h: New file.
1236 * gnulib/import/at-func.c: Likewise
1237 * gnulib/import/chdir-long.c: New file.
1238 * gnulib/import/chdir-long.h: New file.
1239 * gnulib/import/cloexec.c: New file.
1240 * gnulib/import/cloexec.h: New file.
1241 * gnulib/import/close.c: New file.
1242 * gnulib/import/closedir.c: New file.
1243 * gnulib/import/dirent-private.h: New file.
1244 * gnulib/import/dup-safer.c: New file.
1245 * gnulib/import/dup.c: New file.
1246 * gnulib/import/dup2.c: New file.
1247 * gnulib/import/error.c: New file.
1248 * gnulib/import/error.h: New file.
1249 * gnulib/import/exitfail.c: New file.
1250 * gnulib/import/exitfail.h: New file.
1251 * gnulib/import/fchdir.c: New file.
1252 * gnulib/import/fcntl.c: New file.
1253 * gnulib/import/fcntl.in.h: New file.
1254 * gnulib/import/fd-hook.c: New file.
1255 * gnulib/import/fd-hook.h: New file.
1256 * gnulib/import/fd-safer.c: New file.
1257 * gnulib/import/fdopendir.c: New file.
1258 * gnulib/import/filename.h: New file.
1259 * gnulib/import/filenamecat-lgpl.c: New file.
1260 * gnulib/import/filenamecat.h: New file.
1261 * gnulib/import/fstat.c: New file.
1262 * gnulib/import/fstatat.c: New file.
1263 * gnulib/import/getcwd-lgpl.c: New file.
1264 * gnulib/import/getcwd.c: New file.
1265 * gnulib/import/getdtablesize.c: New file.
1266 * gnulib/import/getlogin_r.c: New file.
1267 * gnulib/import/getprogname.c: New file.
1268 * gnulib/import/getprogname.h: New file.
1269 * gnulib/import/gettext.h: New file.
1270 * gnulib/import/glob-libc.h: New file.
1271 * gnulib/import/glob.c: New file.
1272 * gnulib/import/glob.in.h: New file.
1273 * gnulib/import/intprops.h: New file.
1274 * gnulib/import/m4/chdir-long.m4: New file.
1275 * gnulib/import/m4/close.m4: New file.
1276 * gnulib/import/m4/closedir.m4: New file.
1277 * gnulib/import/m4/d-ino.m4: New file.
1278 * gnulib/import/m4/d-type.m4: New file.
1279 * gnulib/import/m4/dup.m4: New file.
1280 * gnulib/import/m4/dup2.m4: New file.
1281 * gnulib/import/m4/error.m4: New file.
1282 * gnulib/import/m4/fchdir.m4: New file.
1283 * gnulib/import/m4/fcntl.m4: New file.
1284 * gnulib/import/m4/fcntl_h.m4: New file.
1285 * gnulib/import/m4/fdopendir.m4: New file.
1286 * gnulib/import/m4/filenamecat.m4: New file.
1287 * gnulib/import/m4/fstat.m4: New file.
1288 * gnulib/import/m4/fstatat.m4: New file.
1289 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1290 * gnulib/import/m4/getcwd-path-max.m4: New file.
1291 * gnulib/import/m4/getcwd.m4: New file.
1292 * gnulib/import/m4/getdtablesize.m4: New file.
1293 * gnulib/import/m4/getlogin_r.m4: New file.
1294 * gnulib/import/m4/getprogname.m4: New file.
1295 * gnulib/import/m4/glob.m4: New file.
1296 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1297 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1298 * gnulib/import/m4/mempcpy.m4: New file.
1299 * gnulib/import/m4/memrchr.m4: New file.
1300 * gnulib/import/m4/mode_t.m4: New file.
1301 * gnulib/import/m4/msvc-inval.m4: New file.
1302 * gnulib/import/m4/msvc-nothrow.m4: New file.
1303 * gnulib/import/m4/open.m4: New file.
1304 * gnulib/import/m4/openat.m4: New file.
1305 * gnulib/import/m4/opendir.m4: New file.
1306 * gnulib/import/m4/readdir.m4: New file.
1307 * gnulib/import/m4/realloc.m4: New file.
1308 * gnulib/import/m4/rewinddir.m4: New file.
1309 * gnulib/import/m4/save-cwd.m4: New file.
1310 * gnulib/import/m4/strdup.m4: New file.
1311 * gnulib/import/m4/strerror.m4: New file.
1312 * gnulib/import/m4/unistd-safer.m4: New file.
1313 * gnulib/import/mempcpy.c: New file.
1314 * gnulib/import/memrchr.c: New file.
1315 * gnulib/import/msvc-inval.c: New file.
1316 * gnulib/import/msvc-inval.h: New file.
1317 * gnulib/import/msvc-nothrow.c: New file.
1318 * gnulib/import/msvc-nothrow.h: New file.
1319 * gnulib/import/open.c: New file.
1320 * gnulib/import/openat-die.c: New file.
1321 * gnulib/import/openat-priv.h: New file.
1322 * gnulib/import/openat-proc.c: New file.
1323 * gnulib/import/openat.c: New file.
1324 * gnulib/import/openat.h: New file.
1325 * gnulib/import/opendir.c: New file.
1326 * gnulib/import/pipe-safer.c: New file.
1327 * gnulib/import/readdir.c: New file.
1328 * gnulib/import/realloc.c: New file.
1329 * gnulib/import/rewinddir.c: New file.
1330 * gnulib/import/save-cwd.c: New file.
1331 * gnulib/import/save-cwd.h: New file.
1332 * gnulib/import/strdup.c: New file.
1333 * gnulib/import/strerror-override.c: New file.
1334 * gnulib/import/strerror-override.h: New file.
1335 * gnulib/import/strerror.c: New file.
1336 * gnulib/import/unistd--.h: New file.
1337 * gnulib/import/unistd-safer.h: New file.
1338 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1339 "getcwd" and "glob".
1340 * ser-tcp.c: Undefine "close" before redefining it.
1341
1342 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1345 get rid of res_val.
1346
1347 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1348
1349 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1350 <sol2,sparc>: Likewise.
1351 <sol2-64,i386>: Likewise.
1352
1353 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1354 -Wdeprecated-declarations on *-*-solaris*.
1355 * configure: Regenerate.
1356
1357 * procfs.c: Include "nat/inferior.h".
1358 (procfs_info_proc): Fix typo.
1359
1360 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1361
1362 * remote.c (vector): Include.
1363 (struct private_thread_info): Add field, thread_handle.
1364 (free_private_thread_info): Deallocate storage associated with
1365 thread handle.
1366 (get_private_info_thread): Initialize `thread_handle' field.
1367 (struct thread_item): Add field, thread_handle.
1368 (clear_threads_listing_context): Deallocate storage associated
1369 with thread handle.
1370 (start_thread): Add support for "handle" attribute.
1371 (thread_attributes): Add "handle".
1372 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1373 field.
1374 (remote_update_thread_list): Update thread_handle.
1375 (remote_thread_handle_to_thread_info): New function.
1376 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1377
1378 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1379
1380 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1381 function.
1382 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1383 * python/python-internal.h (thread_object_type): Declare.
1384
1385 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1386
1387 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1388 (target_thread_handle_to_thread_info): Declare.
1389 * target.c (target_thread_handle_to_thread_info): New function.
1390 * target-delegates.c: Regenerate.
1391 * gdbthread.h (find_thread_by_handle): Declare.
1392 * thread.c (find_thread_by_handle): New function.
1393 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1394 function.
1395 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1396
1397 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1398
1399 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1400
1401 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1402
1403 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1404
1405 2017-09-21 Yao Qi <yao.qi@linaro.org>
1406
1407 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1408 to gdb_target_obs.
1409
1410 2017-09-20 Tom Tromey <tom@tromey.com>
1411
1412 * breakpoint.c (struct counted_command_line): Remove.
1413 (breakpoint_commands): Update.
1414 (alloc_counted_command_line, incref_counted_command_line)
1415 (decref_counted_command_line, do_cleanup_counted_command_line)
1416 (make_cleanup_decref_counted_command_line): Remove.
1417 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1418 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1419 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1420 (save_breakpoints): Update.
1421 * breakpoint.h (counted_command_line): Now a typedef to
1422 shared_ptr.
1423 (struct breakpoint) <commands>: Now a counted_command_line.
1424 (struct bpstats) <command>: Likewise.
1425
1426 2017-09-20 Tom Tromey <tom@tromey.com>
1427
1428 * breakpoint.c (struct commands_info, do_map_commands_command):
1429 Remove.
1430 (commands_command_1): Update.
1431 (iterate_over_related_breakpoints): Take a function_view.
1432 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1433 (delete_command): Update.
1434 (map_breakpoint_numbers): Take a function_view.
1435 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1436 (disable_command): Update.
1437 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1438 (enable_command): Update.
1439 (struct disp_data, do_enable_breakpoint_disp)
1440 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1441 (do_map_enable_delete_breakpoint): Remove.
1442 (enable_once_command, enable_count_command, enable_delete_command)
1443 (delete_trace_variable_command): Update.
1444
1445 2017-09-20 Tom Tromey <tom@tromey.com>
1446
1447 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1448 (bpstat_clear): Use delete.
1449 (bpstats): New constructors.
1450 (bpstat_copy, bpstat_stop_status): Use new.
1451 (dprintf_after_condition_true): Update.
1452 * breakpoint.h (bpstats::bpstats): Add constructors.
1453 (bpstats::~bpstats): Add destructor.
1454
1455 2017-09-20 Pedro Alves <palves@redhat.com>
1456
1457 * eval.c (make_params): Delete, refactored as ...
1458 (class fake_method): ... this new type's ctor.
1459 (fake_method::~fake_method): New.
1460 (evaluate_subexp_standard): Use 'fake_method'.
1461
1462 2017-09-20 Tom Tromey <tom@tromey.com>
1463
1464 * windows-nat.c (get_windows_debug_event, windows_wait)
1465 (do_initial_windows_stuff, windows_attach): Update.
1466 * utils.c (vwarning, internal_vproblem): Update.
1467 (ui_unregister_input_event_handler_cleanup)
1468 (prepare_to_handle_input): Remove.
1469 (class scoped_input_handler): New.
1470 (defaulted_query, prompt_for_continue): Update.
1471 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1472 Update.
1473 * top.c (undo_terminal_modifications_before_exit): Update.
1474 * target/target.h (target_terminal_init, target_terminal_inferior)
1475 (target_terminal_ours): Don't declare.
1476 (class target_terminal): New.
1477 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1478 (target_terminal_ours_for_output)
1479 (make_cleanup_restore_target_terminal): Don't declare.
1480 (target_terminal_info): Remove.
1481 * target.c (enum terminal_state, terminal_state): Remove.
1482 (target_terminal::terminal_state): Define.
1483 (target_terminal::init): Rename from target_terminal_init.
1484 (target_terminal::inferior): Rename from
1485 target_terminal_inferior.
1486 (target_terminal::ours): Rename from target_terminal_ours.
1487 (target_terminal::ours_for_output): Rename from
1488 target_terminal_ours_for_output.
1489 (target_terminal::info): New method.
1490 (cleanup_restore_target_terminal)
1491 (make_cleanup_restore_target_terminal): Remove.
1492 * solib.c (handle_solib_event): Update.
1493 * remote.c (remote_serial_quit_handler): Update.
1494 (remote_terminal_inferior, remote_wait_as): Update.
1495 * record-full.c (record_full_wait_1): Update.
1496 * nto-procfs.c (procfs_create_inferior): Update.
1497 * nat/fork-inferior.c (startup_inferior): Update.
1498 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1499 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1500 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1501 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1502 (mi_breakpoint_created, mi_breakpoint_deleted)
1503 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1504 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1505 (mi_user_selected_context_changed, report_initial_inferior):
1506 Update.
1507 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1508 (linux_nat_terminal_inferior): Update.
1509 * infrun.c (follow_fork_inferior)
1510 (handle_vfork_child_exec_or_exit, do_target_resume)
1511 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1512 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1513 Update.
1514 * inflow.c (child_terminal_init, info_terminal_command): Update.
1515 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1516 (attach_command): Update.
1517 * infcall.c (call_thread_fsm_should_stop): Update.
1518 * gnu-nat.c (gnu_attach): Update.
1519 * extension.c (struct active_ext_lang_state)
1520 (restore_active_ext_lang): Update.
1521 * exceptions.c (print_flush): Update.
1522 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1523 (struct quit_handler_cleanup_data, restore_quit_handler)
1524 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1525 Remove.
1526 * cp-support.c (gdb_demangle): Update.
1527 * breakpoint.c (update_inserted_breakpoint_locations)
1528 (insert_breakpoint_locations, handle_jit_event)
1529 (disable_breakpoints_in_unloaded_shlib): Update.
1530 * annotate.c (annotate_breakpoints_invalid)
1531 (annotate_frames_invalid): Update.
1532
1533 2017-09-20 Tom Tromey <tom@tromey.com>
1534
1535 * main.c (catch_command_errors): Rename from
1536 catch_command_errors_const.
1537 (captured_main_1): Update.
1538
1539 2017-09-20 Pedro Alves <palves@redhat.com>
1540
1541 * cli/cli-cmds.c (list_command): Use print_sal_location.
1542 (print_sal_location): New function.
1543 (ambiguous_line_spec): Use print_sal_location.
1544 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1545 * symtab.c (find_function_start_sal): Likewise.
1546 * symtab.h (symtab_and_line::symbol): New field.
1547
1548 2017-09-20 Pedro Alves <palves@redhat.com>
1549
1550 * linespec.c (minsym_found): Handle non-text minsyms.
1551 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1552
1553 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1554
1555 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1556 backslash.
1557
1558 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1559
1560 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1561 vmovups instead vmovaps.
1562 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1563
1564 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1565
1566 * NEWS (Changes since GDB 8.0): Add starti.
1567 * infcmd.c (enum run_break): New.
1568 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1569 case.
1570 (run_command): Use enum run_how.
1571 (start_command): Likewise.
1572 (starti_command): New function.
1573 (RUN_ARGS_HELP): New macro.
1574 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1575 commands. Add starti command.
1576
1577 2017-09-19 Yao Qi <yao.qi@linaro.org>
1578
1579 * Makefile.in (monitor.o): Remove the rule.
1580
1581 2017-09-19 Yao Qi <yao.qi@linaro.org>
1582
1583 * annotate.h (struct annotate_arg_emitter): Use
1584 DISABLE_COPY_AND_ASSIGN.
1585 * common/refcounted-object.h (refcounted_object): Likewise.
1586 * completer.h (struct completion_result): Likewise.
1587 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1588 * filename-seen-cache.h (filename_seen_cache): Likewise.
1589 * gdbcore.h (thread_section_name): Likewise.
1590 * gdb_regex.h (compiled_regex): Likewise.
1591 * gdbthread.h (scoped_restore_current_thread): Likewise.
1592 * inferior.h (scoped_restore_current_inferior): Likewise.
1593 * jit.c (jit_reader): Likewise.
1594 * linespec.h (struct linespec_result): Likewise.
1595 * mi/mi-parse.h (struct mi_parse): Likewise.
1596 * nat/fork-inferior.c (execv_argv): Likewise.
1597 * progspace.h (scoped_restore_current_program_space): Likewise.
1598 * python/python-internal.h (class gdbpy_enter): Likewise.
1599 * regcache.h (regcache): Likewise.
1600 * target-descriptions.c (struct tdesc_reg): Likewise.
1601 (struct tdesc_type): Likewise.
1602 (struct tdesc_feature): Likewise.
1603 * ui-out.h (ui_out_emit_type): Likewise.
1604
1605 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1606
1607 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1608 label abort_expression.
1609
1610 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1611
1612 * common/buffer.c (buffer_xml_printf): Adjust.
1613 * common/xml-utils.c (xml_escape_text): Change return type to
1614 std::string, update code accordingly.
1615 * common/xml-utils.h (xml_escape_text): Change return type to
1616 std::string.
1617 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1618 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1619 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1620 Adjust.
1621
1622 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1623
1624 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1625 (SUBDIR_UNITTESTS_OBS): Add new object file.
1626 * unittests/xml-utils-selftests.c: New file.
1627
1628 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1629
1630 * common/selftest.h (selftest): New struct/interface.
1631 (register_test): Add name parameter, add new overload.
1632 (run_tests): Add filter parameter.
1633 (for_each_selftest_ftype): New typedef.
1634 (for_each_selftest): New declaration.
1635 * common/selftest.c (tests): Change type to
1636 map<string, unique_ptr<selftest>>.
1637 (simple_selftest): New struct.
1638 (register_test): New function.
1639 (register_test): Add name parameter and use it.
1640 (run_tests): Add filter parameter and use it. Add prints.
1641 Adjust to vector -> map change.
1642 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1643 registering selftests.
1644 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1645 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1646 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1647 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1648 * findvar.c (_initialize_findvar): Likewise.
1649 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1650 * maint.c (maintenance_selftest): Update call to run_tests.
1651 (maintenance_info_selftests): New function.
1652 (_initialize_maint_cmds): Register "maintenance info selftests"
1653 command. Update "maintenance selftest" doc.
1654 * regcache.c (_initialize_regcache): Add names when registering
1655 selftests.
1656 * rust-exp.y (_initialize_rust_exp): Likewise.
1657 * selftest-arch.c (gdbarch_selftest): New struct.
1658 (gdbarch_tests): Remove.
1659 (register_test_foreach_arch): Add name parameter. Call
1660 register_test.
1661 (tests_with_arch): Remove, move most content to
1662 gdbarch_selftest::operator().
1663 (_initialize_selftests_foreach_arch): Remove.
1664 * selftest-arch.h (register_test_foreach_arch): Add name
1665 parameter.
1666 (run_tests_with_arch): New declaration.
1667 * utils-selftests.c (_initialize_utils_selftests): Add names
1668 when registering selftests.
1669 * utils.c (_initialize_utils): Likewise.
1670 * unittests/array-view-selftests.c
1671 (_initialize_array_view_selftests): Likewise.
1672 * unittests/environ-selftests.c (_initialize_environ_selftests):
1673 Likewise.
1674 * unittests/function-view-selftests.c
1675 (_initialize_function_view_selftests): Likewise.
1676 * unittests/offset-type-selftests.c
1677 (_initialize_offset_type_selftests): Likewise.
1678 * unittests/optional-selftests.c
1679 (_initialize_optional_selftests): Likewise.
1680 * unittests/scoped_restore-selftests.c
1681 (_initialize_scoped_restore_selftests): Likewise.
1682 * NEWS: Document "maintenance selftest" and "maint info
1683 selftests".
1684
1685 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1686
1687 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1688 scoped_restore.
1689
1690 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1691
1692 * mi/mi-main.c (mi_load_progress): Make uiout variable
1693 a unique_ptr.
1694
1695 2017-09-15 Pedro Alves <palves@redhat.com>
1696
1697 * compile/compile-c-types.c (convert_enum, convert_int)
1698 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1699
1700 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1701
1702 * dwarf2read.c (copy_string): Remove.
1703 (parse_macro_definition): Replace copy_string with savestring.
1704
1705 2017-09-15 Yao Qi <yao.qi@linaro.org>
1706
1707 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1708 gdb_target_obs.
1709 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1710 Likewise.
1711 (i[34567]86-*-linux*): Likewise.
1712
1713 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1714
1715 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1716 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1717 <stack>: Change type to std::vector.
1718 <stack_len, stack_allocated>: Remove.
1719 <grow_stack>: Remove.
1720 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1721 (dwarf_expr_context::~dwarf_expr_context): Remove.
1722 (dwarf_expr_context::grow_stack): Remove.
1723 (dwarf_expr_context::push): Adjust.
1724 (dwarf_expr_context::pop): Adjust.
1725 (dwarf_expr_context::fetch): Adjust.
1726 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1727 (dwarf_expr_context::stack_empty_p): Adjust.
1728 (dwarf_expr_context::execute_stack_op): Adjust.
1729
1730 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1733 return type to bool.
1734 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1735
1736 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1737
1738 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1739 Change type to bool.
1740 (dwarf_stack_value) <in_stack_memory>: Likewise.
1741 (dwarf_expr_context) <push_address>: Change parameter type to
1742 bool.
1743 <fetch_in_stack_memory>: Change return type to bool.
1744 <push>: Change parameter type to bool.
1745 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1746 to bool.
1747 (dwarf_expr_context::push_address): Likewise.
1748 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1749 to bool.
1750 (dwarf_expr_context::execute_stack_op): Adjust.
1751 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1752
1753 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1754
1755 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1756 (struct dwarf_expr_context) <n_pieces>: Remove.
1757 <pieces>: Change type to std::vector.
1758 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1759 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1760 pieces.
1761 (dwarf_expr_context::add_piece): Adjust.
1762 * dwarf2loc.c (struct piece_closure): Initialize fields.
1763 <n_pieces>: Remove.
1764 <pieces>: Change type to std::vector.
1765 (allocate_piece_closure): Adjust, change parameter to
1766 std::vector rvalue and std::move it to piece_closure.
1767 (rw_pieced_value): Adjust.
1768 (check_pieced_synthetic_pointer): Adjust.
1769 (indirect_synthetic_pointer): Adjust.
1770 (coerce_pieced_ref): Adjust.
1771 (free_pieced_value_closure): Adjust. Use delete to free
1772 piece_closure.
1773 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1774 to allocate_piece_closure.
1775 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1776
1777 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1778
1779 * probe.h (probe_ops_cp): Remove typedef.
1780 (DEF_VEC_P (probe_ops_cp)): Remove.
1781 (all_probe_ops): Change type to std::vector.
1782 * probe.c (info_probes_for_ops): Adjust to vector change.
1783 (probe_linespec_to_ops): Likewise.
1784 (all_probe_ops): Change type to std::vector.
1785 (_initialize_probe): Adjust to vector change.
1786 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1787 * elfread.c (elf_get_probes): Likewise.
1788 * stap-probe.c (_initialize_stap_probe): Likewise.
1789
1790 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * probe.h (struct bound_probe): Define constructors.
1793 * probe.c (bound_probe_s): Remove typedef.
1794 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1795 (collect_probes): Change return type to std::vector, remove
1796 cleanup.
1797 (compare_probes): Return bool, change parameter type. Change
1798 semantic to "less than".
1799 (gen_ui_out_table_header_info): Change parameter to std::vector
1800 and update.
1801 (exists_probe_with_pops): Likewise.
1802 (info_probes_for_ops): Update to std::vector change.
1803 (enable_probes_command): Likewise.
1804 (disable_probes_command): Likewise.
1805
1806 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1807
1808 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1809 vec to std::vector.
1810 * probe.c (parse_probes_in_pspace): Update.
1811 (find_probes_in_objfile): Update.
1812 (find_probe_by_pc): Update.
1813 (collect_probes): Update.
1814 (probe_any_get_probes): Update.
1815 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1816 return type to reference to std::vector.
1817 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1818 std::vector and update.
1819 (dtrace_process_dof): Likewise.
1820 (dtrace_get_probes): Likewise.
1821 * elfread.c (elf_get_probes): Change return type to std::vector,
1822 store an std::vector in bfd_data.
1823 (probe_key_free): Update to std::vector.
1824 * stap-probe.c (handle_stap_probe): Change parameter to
1825 std::vector and update.
1826 (stap_get_probes): Likewise.
1827 * symfile-debug.c (debug_sym_get_probes): Change return type to
1828 std::vector and update.
1829
1830 2017-09-11 Tom Tromey <tom@tromey.com>
1831
1832 * breakpoint.c (program_breakpoint_here_p): Update.
1833 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1834 from make_show_memory_breakpoints_cleanup. Return a
1835 scoped_restore_tmpl<int>.
1836 (restore_show_memory_breakpoints): Remove.
1837 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1838 * mem-break.c (memory_validate_breakpoint): Update.
1839 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1840 (ia64_memory_remove_breakpoint): Update.
1841 (ia64_breakpoint_from_pc): Update.
1842 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1843 from make_show_memory_breakpoints_cleanup.
1844
1845 2017-09-11 Tom Tromey <tom@tromey.com>
1846
1847 * d-namespace.c (d_lookup_symbol): Use std::string.
1848 (find_symbol_in_baseclass): Likewise.
1849
1850 2017-09-11 Tom Tromey <tom@tromey.com>
1851
1852 * ctf.c (ctf_start): Use std::string.
1853
1854 2017-09-11 Tom Tromey <tom@tromey.com>
1855
1856 * ada-lang.c (is_known_support_routine): Update.
1857 (ada_unhandled_exception_name_addr_from_raise): Update.
1858 * guile/scm-frame.c (gdbscm_frame_name): Update.
1859 * python/py-frame.c (frapy_name): Update.
1860 (frapy_function): Update.
1861 * stack.h (find_frame_funname): Update.
1862 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1863 (print_frame): Update.
1864
1865 2017-09-11 Tom Tromey <tom@tromey.com>
1866
1867 * findcmd.c (put_bits): Take a gdb::byte_vector.
1868 (parse_find_args): Return gdb::byte_vector. "args" now const.
1869 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1870 cleanups.
1871 (find_command): Update.
1872
1873 2017-09-11 Tom Tromey <tom@tromey.com>
1874
1875 * cli/cli-script.c (class scoped_restore_hook_in): New.
1876 (clear_hook_in_cleanup): Remove.
1877 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1878 scoped_restore_hook_in.
1879
1880 2017-09-11 Tom Tromey <tom@tromey.com>
1881
1882 * cli/cli-script.c (restore_interp): Remove.
1883 (read_command_lines): Use scoped_restore_interp.
1884 * interps.c (scoped_restore_interp::set_temp): Rename from
1885 interp_set_temp.
1886 * interps.h (class scoped_restore_interp): New.
1887 (interp_set_temp): Remove.
1888
1889 2017-09-11 Tom Tromey <tom@tromey.com>
1890
1891 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1892 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1893 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1894 scoped_restore.
1895 (mi_cmd_break_insert_1): Update.
1896 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1897 scoped_restore.
1898
1899 2017-09-11 Tom Tromey <tom@tromey.com>
1900
1901 * demangle.c (demangle_command): Update.
1902 * breakpoint.c (disable_command): Update.
1903 (enable_command): Update.
1904 (find_location_by_number): Make "number" const. Use
1905 get_number_trailer.
1906 * cli/cli-utils.c (extract_arg): Return std::string.
1907 * probe.c (parse_probe_linespec): Update. Change types.
1908 (collect_probes): Take string arguments.
1909 (parse_probe_linespec): Likewise.
1910 (info_probes_for_ops): Update.
1911 (enable_probes_command): Update.
1912 (disable_probes_command): Update.
1913 * break-catch-sig.c (catch_signal_split_args): Update.
1914 * mi/mi-parse.c (mi_parse): Update.
1915
1916 2017-09-11 Tom Tromey <tom@tromey.com>
1917
1918 * language.h (language_enum): Make argument const.
1919 * language.c (language_enum): Make argument const.
1920
1921 2017-09-11 Tom Tromey <tom@tromey.com>
1922
1923 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1924 as function.
1925 (skip_to_space): Rename from skip_to_space_const.
1926 * common/common-utils.c (skip_to_space): New function.
1927 (skip_to_space): Rename from skip_to_space_const.
1928 * cli/cli-utils.h (get_number): Rename from get_number_const.
1929 (extract_arg): Rename from extract_arg_const.
1930 * cli/cli-utils.c (get_number): Rename from get_number_const.
1931 (extract_arg): Rename from extract_arg_const.
1932 (number_or_range_parser::get_number): Use ::get_number.
1933 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1934 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1935 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1936 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1937 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1938 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1939 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1940 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1941
1942 2017-09-11 Tom Tromey <tom@tromey.com>
1943
1944 * python/python.c (do_start_initialization): Use
1945 py-event-types.def to initialize types.
1946 Define all object type structures.
1947 * python/python-internal.h: Don't declare event initialization
1948 functions.
1949 * python/py-threadevent.c (thread_event_object_type): Don't
1950 define.
1951 * python/py-stopevent.c (stop_event_object_type): Don't define.
1952 * python/py-signalevent.c (signal_event_object_type): Don't
1953 declare or define.
1954 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1955 (clear_objfiles_event_object_type): Don't declare or define.
1956 * python/py-infevents.c (inferior_call_pre_event_object_type)
1957 (inferior_call_post_event_object_type)
1958 (register_changed_event_object_type)
1959 (memory_changed_event_object_type): Don't declare or define.
1960 * python/py-inferior.c (new_thread_event_object_type)
1961 (new_inferior_event_object_type)
1962 (inferior_deleted_event_object_type): Don't declare or define.
1963 * python/py-exitedevent.c (exited_event_object_type): Don't
1964 declare or define.
1965 * python/py-evts.c (gdbpy_initialize_py_events): Use
1966 py-all-events.def.
1967 * python/py-events.h (thread_event_object_type): Don't declare.
1968 (events_object): Use py-all-events.def.
1969 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1970 py-event-types.def.
1971 * python/py-event-types.def: New file.
1972 * python/py-continueevent.c (create_continue_event_object): Don't
1973 declare or define.
1974 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1975 declare or define.
1976 * python/py-all-events.def: New file.
1977
1978 2017-09-11 Tom Tromey <tom@tromey.com>
1979
1980 * python/py-threadevent.c (create_thread_event_object): Return
1981 gdbpy_ref.
1982 * python/py-stopevent.h (create_stop_event_object)
1983 (create_breakpoint_event_object, create_signal_event_object):
1984 Update.
1985 * python/py-stopevent.c (create_stop_event_object): Return
1986 gdbpy_ref.
1987 (emit_stop_event): Update.
1988 * python/py-signalevent.c (create_signal_event_object): Return
1989 gdbpy_ref.
1990 * python/py-infevents.c (create_inferior_call_event_object):
1991 Update.
1992 * python/py-event.h (create_event_object)
1993 (create_thread_event_object): Update.
1994 * python/py-event.c (create_event_object): Return gdbpy_ref.
1995 * python/py-continueevent.c: Return gdbpy_ref.
1996 * python/py-bpevent.c (create_breakpoint_event_object): Return
1997 gdbpy_ref.
1998
1999 2017-09-11 Tom Tromey <tom@tromey.com>
2000
2001 PR python/15622:
2002 * NEWS: Add entry.
2003 * python/python.c (do_start_initialization): Initialize new event
2004 types.
2005 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2006 (gdbpy_initialize_inferior_deleted_event)
2007 (gdbpy_initialize_new_thread_event): Declare.
2008 * python/py-threadevent.c (create_thread_event_object): Add option
2009 "thread" parameter.
2010 * python/py-inferior.c (new_thread_event_object_type)
2011 (new_inferior_event_object_type)
2012 (inferior_deleted_event_object_type): Declare.
2013 (python_new_inferior, python_inferior_deleted): New functions.
2014 (add_thread_object): Emit new_thread event.
2015 (gdbpy_initialize_inferior): Attach new functions to corresponding
2016 observers.
2017 (new_thread, new_inferior, inferior_deleted): Define new event
2018 types.
2019 * python/py-evts.c (gdbpy_initialize_py_events): Add new
2020 registries.
2021 * python/py-events.h (events_object) <new_inferior,
2022 inferior_deleted, new_thread>: New fields.
2023 * python/py-event.h (create_thread_event_breakpoint): Add optional
2024 "thread" parameter.
2025
2026 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2027
2028 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2029 check current_ui instead.
2030 (internal_vproblem): Likewise.
2031
2032 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * thread.c (print_thread_info_1): Remove unnecessary calls to
2035 uiout->is_mi_like_p.
2036
2037 2017-09-09 Tom Tromey <tom@tromey.com>
2038
2039 * namespace.h (add_using_directive): Update.
2040 * namespace.c (add_using_directive): Change type of excludes to
2041 std::vector.
2042 * dwarf2read.c (read_import_statement): Use std::vector.
2043 (read_namespace): Update.
2044 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2045
2046 2017-09-09 Tom Tromey <tom@tromey.com>
2047
2048 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2049
2050 2017-09-09 Tom Tromey <tom@tromey.com>
2051
2052 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2053
2054 2017-09-09 Tom Tromey <tom@tromey.com>
2055
2056 * stack.c (func_command): Use gdb::def_vector.
2057
2058 2017-09-09 Tom Tromey <tom@tromey.com>
2059
2060 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2061 ui_out_emit_list, ui_out_emit_tuple.
2062 (mi_cmd_var_update): Likewise.
2063
2064 2017-09-09 Tom Tromey <tom@tromey.com>
2065
2066 * mi/mi-interp.c (mi_user_selected_context_changed): Use
2067 ui_out_redirect_pop.
2068 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2069 ui_out_redirect_pop.
2070 * utils.c (do_ui_out_redirect_pop)
2071 (make_cleanup_ui_out_redirect_pop): Remove.
2072 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2073 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2074 * ui-out.h (ui_out_redirect_pop): New class.
2075
2076 2017-09-09 Tom Tromey <tom@tromey.com>
2077
2078 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2079 (list_available_thread_groups, mi_cmd_list_thread_groups)
2080 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2081 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2082 Likewise.
2083
2084 2017-09-09 Tom Tromey <tom@tromey.com>
2085
2086 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2087 ui_out_emit_tuple.
2088
2089 2017-09-09 Tom Tromey <tom@tromey.com>
2090
2091 * target.c (flash_erase_command): Use ui_out_emit_tuple.
2092 * stack.c (print_frame): Use ui_out_emit_tuple.
2093 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2094 (info_spu_mailbox_command, info_spu_dma_command)
2095 (info_spu_proxydma_command): Likewise.
2096 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2097 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2098 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2099 ui_out_emit_tuple.
2100 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2101
2102 2017-09-09 Tom Tromey <tom@tromey.com>
2103
2104 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2105 (class ui_out_emit_table): Update comment.
2106 * ui-out.c (do_cleanup_table_end)
2107 (make_cleanup_ui_out_table_begin_end): Remove.
2108 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2109 (info_spu_dma_cmdlist): Likewise.
2110 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2111 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2112 ui_out_emit_table.
2113
2114 2017-09-09 Tom Tromey <tom@tromey.com>
2115
2116 * thread.c (print_thread_info_1): Use ui_out_emit_table,
2117 ui_out_emit_list, gdb::optional.
2118
2119 2017-09-09 John Baldwin <jhb@FreeBSD.org>
2120
2121 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2122 prototype.
2123 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2124 prototype.
2125 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2126 prototype.
2127 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2128 * ada-exp.y: Remove _initialize_ada_exp prototype.
2129 * ada-lang.c: Remove _initialize_ada_language prototype.
2130 * ada-tasks.c: Remove _initialize_tasks prototype.
2131 * addrmap.c: Remove _initialize_addrmap prototype.
2132 * agent.c: Remove _initialize_agent prototype.
2133 * aix-thread.c: Remove _initialize_aix_thread prototype.
2134 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2135 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2136 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2137 prototype.
2138 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2139 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2140 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2141 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2142 prototype.
2143 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2144 prototype.
2145 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2146 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2147 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2148 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2149 prototype.
2150 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2151 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2152 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2153 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2154 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2155 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2156 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2157 prototype.
2158 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2159 prototype.
2160 * annotate.c: Remove _initialize_annotate prototype.
2161 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2162 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2163 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2164 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2165 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2166 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2167 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2168 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2169 prototype.
2170 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2171 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2172 * auto-load.c: Remove _initialize_auto_load prototype.
2173 * auxv.c: Remove _initialize_auxv prototype.
2174 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2175 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2176 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2177 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2178 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2179 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2180 prototype.
2181 * break-catch-throw.c: Remove _initialize_break_catch_throw
2182 prototype.
2183 * breakpoint.c: Remove _initialize_breakpoint prototype.
2184 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2185 * btrace.c: Remove _initialize_btrace prototype.
2186 * charset.c: Remove _initialize_charset prototype.
2187 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2188 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2189 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2190 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2191 * cli/cli-script.c: Remove _initialize_cli_script prototype.
2192 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2193 * coffread.c: Remove _initialize_coffread prototype.
2194 * compile/compile.c: Remove _initialize_compile prototype.
2195 * complaints.c: Remove _initialize_complaints prototype.
2196 * completer.c: Remove _initialize_completer prototype.
2197 * copying.awk: Remove _initialize_copying prototype.
2198 * copying.c: Regenerate.
2199 * core-regset.c: Remove _initialize_core_regset prototype.
2200 * corefile.c: Remove _initialize_core prototype.
2201 * corelow.c: Remove _initialize_corelow prototype.
2202 * cp-abi.c: Remove _initialize_cp_abi prototype.
2203 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2204 * cp-support.c: Remove _initialize_cp_support prototype.
2205 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2206 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2207 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2208 * ctf.c: Remove _initialize_ctf prototype.
2209 * d-lang.c: Remove _initialize_d_language prototype.
2210 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2211 prototype.
2212 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2213 * dbxread.c: Remove _initialize_dbxread prototype.
2214 * dcache.c: Remove _initialize_dcache prototype.
2215 * demangle.c: Remove _initialize_demangler prototype.
2216 * disasm-selftests.c: Remove _initialize_disasm_selftests
2217 prototype.
2218 * disasm.c: Remove _initialize_disasm prototype.
2219 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2220 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2221 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2222 prototype.
2223 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2224 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2225 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2226 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2227 * elfread.c: Remove _initialize_elfread prototype.
2228 * exec.c: Remove _initialize_exec prototype.
2229 * extension.c: Remove _initialize_extension prototype.
2230 * f-lang.c: Remove _initialize_f_language prototype.
2231 * f-valprint.c: Remove _initialize_f_valprint prototype.
2232 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2233 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2234 * filesystem.c: Remove _initialize_filesystem prototype.
2235 * findcmd.c: Remove _initialize_mem_search prototype.
2236 * fork-child.c: Remove _initialize_fork_child prototype.
2237 * frame-base.c: Remove _initialize_frame_base prototype.
2238 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2239 * frame.c: Remove _initialize_frame prototype.
2240 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2241 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2242 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2243 * gcore.c: Remove _initialize_gcore prototype.
2244 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2245 * gdbarch.c: Regenerate.
2246 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2247 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2248 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2249 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2250 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2251 * go-lang.c: Remove _initialize_go_language prototype.
2252 * go32-nat.c: Remove _initialize_go32_nat prototype.
2253 * guile/guile.c: Remove _initialize_guile prototype.
2254 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2255 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2256 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2257 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2258 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2259 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2260 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2261 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2262 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2263 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2264 prototype.
2265 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2266 prototype.
2267 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2268 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2269 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2270 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2271 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2272 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2273 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2274 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2275 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2276 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2277 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2278 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2279 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2280 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2281 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2282 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2283 prototype.
2284 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2285 prototype.
2286 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2287 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2288 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2289 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2290 * infcall.c: Remove _initialize_infcall prototype.
2291 * infcmd.c: Remove _initialize_infcmd prototype.
2292 * inferior.c: Remove _initialize_inferiors prototype.
2293 * inflow.c: Remove _initialize_inflow prototype.
2294 * infrun.c: Remove _initialize_infrun prototype.
2295 * interps.c: Remove _initialize_interpreter prototype.
2296 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2297 * jit.c: Remove _initialize_jit prototype.
2298 * language.c: Remove _initialize_language prototype.
2299 * linux-fork.c: Remove _initialize_linux_fork prototype.
2300 * linux-nat.c: Remove _initialize_linux_nat prototype.
2301 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2302 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2303 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2304 * m2-lang.c: Remove _initialize_m2_language prototype.
2305 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2306 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2307 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2308 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2309 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2310 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2311 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2312 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2313 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2314 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2315 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2316 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2317 * machoread.c: Remove _initialize_machoread prototype.
2318 * macrocmd.c: Remove _initialize_macrocmd prototype.
2319 * macroscope.c: Remove _initialize_macroscope prototype.
2320 * maint.c: Remove _initialize_maint_cmds prototype.
2321 * mdebugread.c: Remove _initialize_mdebugread prototype.
2322 * memattr.c: Remove _initialize_mem prototype.
2323 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2324 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2325 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2326 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2327 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2328 * microblaze-linux-tdep.c: Remove
2329 _initialize_microblaze_linux_tdep prototype.
2330 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2331 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2332 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2333 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2334 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2335 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2336 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2337 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2338 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2339 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2340 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2341 prototype.
2342 * mipsread.c: Remove _initialize_mipsread prototype.
2343 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2344 prototype.
2345 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2346 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2347 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2348 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2349 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2350 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2351 prototype.
2352 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2353 * nto-procfs.c: Remove _initialize_procfs prototype.
2354 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2355 * objc-lang.c: Remove _initialize_objc_language prototype.
2356 * objfiles.c: Remove _initialize_objfiles prototype.
2357 * observer.c: Remove observer_test_first_notification_function,
2358 observer_test_second_notification_function,
2359 observer_test_third_notification_function, and
2360 _initialize_observer prototypes.
2361 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2362 * osabi.c: Remove _initialize_gdb_osabi prototype.
2363 * osdata.c: Remove _initialize_osdata prototype.
2364 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2365 * parse.c: Remove _initialize_parse prototype.
2366 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2367 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2368 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2369 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2370 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2371 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2372 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2373 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2374 * printcmd.c: Remove _initialize_printcmd prototype.
2375 * probe.c: Remove _initialize_probe prototype.
2376 * proc-api.c: Remove _initialize_proc_api prototype.
2377 * proc-events.c: Remove _initialize_proc_events prototype.
2378 * proc-service.c: Remove _initialize_proc_service prototype.
2379 * procfs.c: Remove _initialize_procfs prototype.
2380 * psymtab.c: Remove _initialize_psymtab prototype.
2381 * python/python.c: Remove _initialize_python prototype.
2382 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2383 * record-btrace.c: Remove _initialize_record_btrace prototype.
2384 * record-full.c: Remove _initialize_record_full prototype.
2385 * record.c: Remove _initialize_record prototype.
2386 * regcache.c: Remove _initialize_regcache prototype.
2387 * reggroups.c: Remove _initialize_reggroup prototype.
2388 * remote-notif.c: Remove _initialize_notif prototype.
2389 * remote-sim.c: Remove _initialize_remote_sim prototype.
2390 * remote.c: Remove _initialize_remote prototype.
2391 * reverse.c: Remove _initialize_reverse prototype.
2392 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2393 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2394 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2395 prototype.
2396 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2397 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2398 * rust-exp.y: Remove _initialize_rust_exp prototype.
2399 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2400 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2401 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2402 * score-tdep.c: Remove _initialize_score_tdep prototype.
2403 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2404 prototype.
2405 * ser-go32.c: Remove _initialize_ser_dos prototype.
2406 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2407 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2408 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2409 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2410 * serial.c: Remove _initialize_serial prototype.
2411 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2412 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2413 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2414 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2415 * skip.c: Remove _initialize_step_skip prototype.
2416 * sol-thread.c: Remove _initialize_sol_thread prototype.
2417 * solib-aix.c: Remove _initialize_solib_aix prototype.
2418 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2419 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2420 * solib-frv.c: Remove _initialize_frv_solib prototype.
2421 * solib-spu.c: Remove _initialize_spu_solib prototype.
2422 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2423 * solib-target.c: Remove _initialize_solib_target prototype.
2424 * solib.c: Remove _initialize_solib prototype.
2425 * source.c: Remove _initialize_source prototype.
2426 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2427 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2428 prototype.
2429 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2430 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2431 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2432 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2433 prototype.
2434 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2435 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2436 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2437 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2438 prototype.
2439 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2440 prototype.
2441 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2442 prototype.
2443 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2444 prototype.
2445 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2446 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2447 prototype.
2448 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2449 prototype.
2450 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2451 prototype.
2452 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2453 prototype.
2454 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2455 prototype.
2456 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2457 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2458 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2459 * stabsread.c: Remove _initialize_stabsread prototype.
2460 * stack.c: Remove _initialize_stack prototype.
2461 * stap-probe.c: Remove _initialize_stap_probe prototype.
2462 * std-regs.c: Remove _initialize_frame_reg prototype.
2463 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2464 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2465 * symfile.c: Remove _initialize_symfile prototype.
2466 * symmisc.c: Remove _initialize_symmisc prototype.
2467 * symtab.c: Remove _initialize_symtab prototype.
2468 * target-dcache.c: Remove _initialize_target_dcache prototype.
2469 * target-descriptions.c: Remove _initialize_target_descriptions
2470 prototype.
2471 * thread.c: Remove _initialize_thread prototype.
2472 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2473 prototype.
2474 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2475 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2476 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2477 prototype.
2478 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2479 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2480 * tracefile.c: Remove _initialize_tracefile prototype.
2481 * tracepoint.c: Remove _initialize_tracepoint prototype.
2482 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2483 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2484 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2485 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2486 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2487 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2488 * tui/tui.c: Remove _initialize_tui prototype.
2489 * typeprint.c: Remove _initialize_typeprint prototype.
2490 * user-regs.c: Remove _initialize_user_regs prototype.
2491 * utils.c: Remove _initialize_utils prototype.
2492 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2493 * valarith.c: Remove _initialize_valarith prototype.
2494 * valops.c: Remove _initialize_valops prototype.
2495 * valprint.c: Remove _initialize_valprint prototype.
2496 * value.c: Remove _initialize_values prototype.
2497 * varobj.c: Remove _initialize_varobj prototype.
2498 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2499 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2500 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2501 * windows-nat.c: Remove _initialize_windows_nat,
2502 _initialize_check_for_gdb_ini, and _initialize_loadable
2503 prototypes.
2504 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2505 * xcoffread.c: Remove _initialize_xcoffread prototype.
2506 * xml-support.c: Remove _initialize_xml_support prototype.
2507 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2508 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2509 prototype.
2510 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2511 prototype.
2512 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2513
2514 2017-09-08 Keith Seitz <keiths@redhat.com>
2515
2516 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2517 field.
2518
2519 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2520
2521 * f-valprint.c (f_val_print): Remove check for one byte
2522 sized integers. Remove printing of character type.
2523
2524 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2525 Christoph Weinmann <christoph.t.weinmann@intel.com>
2526 Bernhard Heckel <bernhard.heckel@intel.com>
2527
2528 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2529 to maintain proper indentation when printing pointers/refs.
2530
2531 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2532
2533 GDB 8.0.1 released.
2534
2535 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2536
2537 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2538
2539 2017-09-05 Tom Tromey <tom@tromey.com>
2540
2541 * parse.c (funcall_chain): Now a std::vector.
2542 (start_arglist, end_arglist): Simplify.
2543 (free_funcalls): Remove.
2544 (parse_exp_in_context_1): Remove cleanup.
2545
2546 2017-09-05 Tom Tromey <tom@tromey.com>
2547
2548 * go-exp.y (go_parse): Don't create a cleanup.
2549
2550 2017-09-05 Tom Tromey <tom@tromey.com>
2551
2552 * d-exp.y (PrimaryExpression): Use std::string.
2553 (d_parse): Don't create a cleanup.
2554
2555 2017-09-05 Tom Tromey <tom@tromey.com>
2556
2557 * utils.c (do_clear_parser_state): Remove.
2558 (make_cleanup_clear_parser_state): Remove.
2559 * p-exp.y (pascal_parse): Use scoped_restore.
2560 * m2-exp.y (m2_parse): Use scoped_restore.
2561 * f-exp.y (f_parse): Use scoped_restore.
2562 * d-exp.y (d_parse): Use scoped_restore.
2563 * c-exp.y (c_parse): Use scoped_restore.
2564 * ada-exp.y (ada_parse): Use scoped_restore.
2565 * utils.h (make_cleanup_clear_parser_state): Remove.
2566
2567 2017-09-06 Keith Seitz <keiths@redhat.com>
2568
2569 * dwarf2read.c (dw2_linkage_name_attr): New function.
2570 (dw2_linkage_name): New function.
2571 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2572 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2573 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2574
2575 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2576
2577 * config/djgpp/djconfig.sh: Correct shell portability issue.
2578
2579 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2580
2581 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2582
2583 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2584
2585 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2586 * NEWS: Mention new FreeBSD/mips native configuration.
2587 * configure.host: Add aarch64*-*-freebsd*.
2588 * configure.nat: Likewise.
2589 * aarch64-fbsd-nat.c: New file.
2590
2591 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2592
2593 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2594 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2595 * NEWS: Mention new FreeBSD/aarch64 target.
2596 * configure.tgt: Add aarch64*-*-freebsd*.
2597 * aarch64-fbsd-tdep.c: New file.
2598 * aarch64-fbsd-tdep.h: New file.
2599
2600 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2601
2602 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2603
2604 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2605
2606 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2607 of TLS symbols.
2608
2609 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2610
2611 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2612 call.
2613
2614 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2615
2616 * infrun.c (follow_exec): Call add_thread after
2617 target_find_description.
2618
2619 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2620
2621 * infrun.c (handle_inferior_event_1): When exec'ing, read
2622 stop_pc after follow_exec.
2623
2624 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2625
2626 * remote.c (process_g_packet): Update error message.
2627
2628 2017-09-05 Yao Qi <yao.qi@linaro.org>
2629
2630 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2631 targets.
2632
2633 2017-09-05 Pedro Alves <palves@redhat.com>
2634
2635 * eval.c (eval_call, evaluate_funcall): New functions, factored
2636 out from ...
2637 (evaluate_subexp_standard): ... this.
2638
2639 2017-09-05 Yao Qi <yao.qi@linaro.org>
2640
2641 * amd64-tdep.c (amd64_target_description): Create target
2642 descriptions.
2643 (_initialize_amd64_tdep): Don't call functions
2644 initialize_tdesc_amd64_*. Add self tests.
2645 * arch/amd64.c (amd64_create_target_description): Add parameter
2646 is_linux. Call set_tdesc_osabi if is_linux is true.
2647 * arch/amd64.h (amd64_create_target_description): Update the
2648 declaration.
2649 * arch/i386.c (i386_create_target_description): Add parameter
2650 is_linux. Call set_tdesc_osabi if is_linux is true.
2651 * arch/i386.h (i386_create_target_description): Update
2652 declaration.
2653 * configure.tgt: Add i386.o to gdb_target_obs.
2654 * features/Makefile (XMLTOC): Remove i386/*.xml.
2655 * features/i386/amd64-avx-avx512.c: Remove.
2656 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2657 * features/i386/amd64-avx-mpx.c: Remove.
2658 * features/i386/amd64-avx.c: Remove.
2659 * features/i386/amd64-mpx.c: Remove.
2660 * features/i386/amd64.c: Remove.
2661 * features/i386/i386-avx-avx512.c: Remove.
2662 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2663 * features/i386/i386-avx-mpx.c: Remove.
2664 * features/i386/i386-avx.c: Remove.
2665 * features/i386/i386-mmx.c: Remove.
2666 * features/i386/i386-mpx.c: Remove.
2667 * features/i386/i386.c: Remove.
2668 * i386-tdep.c: Don't include features/i386/i386*.c., include
2669 target-descriptions.h and arch/i386.h.
2670 (i386_target_description): Create target descriptions.
2671 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2672 functions. Do self tests.
2673
2674 2017-09-05 Yao Qi <yao.qi@linaro.org>
2675
2676 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2677 * features/i386/amd64-avx-avx512-linux.c: Removed.
2678 * features/i386/amd64-avx-linux.c: Removed.
2679 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2680 * features/i386/amd64-avx-mpx-linux.c: Removed.
2681 * features/i386/amd64-linux.c: Removed.
2682 * features/i386/amd64-mpx-linux.c: Removed.
2683 * features/i386/x32-avx-avx512-linux.c: Removed.
2684 * features/i386/x32-avx-linux.c: Removed.
2685 * features/i386/x32-linux.c: Removed.
2686
2687 2017-09-05 Yao Qi <yao.qi@linaro.org>
2688
2689 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2690 features/i386/*.c.
2691 (amd64_linux_read_description): Call
2692 amd64_create_target_description.
2693 * arch/amd64.c: New file.
2694 * arch/amd64.h: New file.
2695 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2696 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2697
2698 2017-09-05 Yao Qi <yao.qi@linaro.org>
2699
2700 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2701 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2702 (amd64_linux_read_description): Create target descriptions.
2703 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2704 functions. Add unit tests.
2705 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2706 x32-core.xml.
2707 * features/i386/64bit-avx.c: Generated.
2708 * features/i386/64bit-avx512.c: Generated.
2709 * features/i386/64bit-core.c: Generated.
2710 * features/i386/64bit-linux.c: Generated.
2711 * features/i386/64bit-mpx.c: Generated.
2712 * features/i386/64bit-pkeys.c: Generated.
2713 * features/i386/64bit-segments.c: Generated.
2714 * features/i386/64bit-sse.c: Generated.
2715 * features/i386/x32-core.c: Generated.
2716 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2717 c files for amd64-linux and x32-linux.
2718
2719 2017-09-05 Yao Qi <yao.qi@linaro.org>
2720
2721 * amd64-linux-tdep.c (amd64_linux_read_description): New
2722 function.
2723 (amd64_linux_core_read_description): Call
2724 amd64_linux_read_description.
2725 (amd64_linux_init_abi): Likewise.
2726 (amd64_x32_linux_init_abi): Likewise.
2727 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2728 * x86-linux-nat.c (x86_linux_read_description): Call
2729 amd64_linux_read_description.
2730
2731 2017-09-05 Yao Qi <yao.qi@linaro.org>
2732
2733 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2734 comments.
2735
2736 2017-09-05 Yao Qi <yao.qi@linaro.org>
2737
2738 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2739 * features/i386/i386-avx-avx512-linux.c: Remove.
2740 * features/i386/i386-avx-linux.c: Remove.
2741 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2742 * features/i386/i386-avx-mpx-linux.c: Remove.
2743 * features/i386/i386-linux.c: Remove.
2744 * features/i386/i386-mmx-linux.c: Remove.
2745 * features/i386/i386-mpx-linux.c: Remove.
2746
2747 2017-09-05 Yao Qi <yao.qi@linaro.org>
2748
2749 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2750 (SFILES): Add arch/i386.c.
2751 (HFILES_NO_SRCDIR): Add arch/i386.h.
2752 * arch/i386.c: New file.
2753 * arch/i386.h: New file.
2754 * arch/tdesc.h (allocate_target_description): Declare.
2755 (set_tdesc_architecture): Declare.
2756 (set_tdesc_osabi): Declare.
2757 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2758 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2759 include arch/i386.h.
2760 (i386_linux_read_description): Remove code and call
2761 i386_create_target_description.
2762 (set_tdesc_architecture): New function.
2763 (set_tdesc_osabi): New function.
2764 * target-descriptions.h (allocate_target_description): Remove.
2765
2766 2017-09-05 Yao Qi <yao.qi@linaro.org>
2767
2768 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2769 * target-descriptions.c (tdesc_create_feature): Likewise, and
2770 adjust code.
2771 * features/i386/32bit-avx.c: Re-generated.
2772 * features/i386/32bit-avx512.c: Re-generated.
2773 * features/i386/32bit-core.c: Re-generated.
2774 * features/i386/32bit-linux.c: Re-generated.
2775 * features/i386/32bit-mpx.c: Re-generated.
2776 * features/i386/32bit-pkeys.c: Re-generated.
2777 * features/i386/32bit-sse.c: Re-generated.
2778
2779 2017-09-05 Yao Qi <yao.qi@linaro.org>
2780
2781 * regformats/regdef.h (struct reg): Override operator == and !=.
2782
2783 2017-09-05 Yao Qi <yao.qi@linaro.org>
2784
2785 * arch/tdesc.h: New file.
2786 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2787 * target-descriptions.c: Update comments.
2788 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2789 declarations.
2790 * features/i386/32bit-avx.c: Re-generated.
2791 * features/i386/32bit-avx512.c: Re-generated.
2792 * features/i386/32bit-core.c: Re-generated.
2793 * features/i386/32bit-linux.c: Re-generated.
2794 * features/i386/32bit-mpx.c: Re-generated.
2795 * features/i386/32bit-pkeys.c: Re-generated.
2796 * features/i386/32bit-sse.c: Re-generated.
2797
2798 2017-09-05 Yao Qi <yao.qi@linaro.org>
2799
2800 * regformats/regdat.sh: Update generated code.
2801
2802 2017-09-05 Yao Qi <yao.qi@linaro.org>
2803
2804 * regformats/regdat.sh: Adjust code order.
2805
2806 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2807
2808 * expprint.c (dump_subexp_body_standard): Use constant format
2809 string in fprintf_filtered call.
2810
2811 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2812
2813 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2814 NetBSD/i386.
2815 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2816
2817 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2818
2819 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2820
2821 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2822
2823 * bsd-kvm.o: Define _KMEMUSER.
2824 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2825 * configure: Regenerate.
2826
2827 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2828
2829 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2830 * i386-fbsd-nat.c: Likewise.
2831
2832 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2833
2834 * unittests/array-view-selftests.c: Add include of <array>.
2835
2836 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2837
2838 * spu-tdep.c (flush_ea_cache): Add missing argument to
2839 call_function_by_hand.
2840
2841 2017-09-04 Pedro Alves <palves@redhat.com>
2842
2843 * NEWS (Safer support for debugging with no debug info): New.
2844
2845 2017-09-04 Pedro Alves <palves@redhat.com>
2846
2847 * c-exp.y (function_method, function_method_void): Add current
2848 instance flags to TYPE_INSTANCE.
2849 * dwarf2read.c (check_modifier): New.
2850 (compute_delayed_physnames): Assert that only C++ adds delayed
2851 physnames. Mark fn_fields as const/volatile depending on
2852 physname.
2853 * eval.c (make_params): New type_instance_flags parameter. Use
2854 it as the new type's instance flags.
2855 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2856 flags element and pass it to make_params.
2857 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2858 instance flags element.
2859 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2860 * gdbtypes.h: Include "enum-flags.h".
2861 (type_instance_flags): New enum-flags type.
2862 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2863 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2864 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2865 (follow_type_instance_flags): New function.
2866 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2867 * parser-defs.h (follow_type_instance_flags): Declare.
2868 * valops.c (value_struct_elt_for_reference): const/volatile must
2869 match too.
2870
2871 2017-09-04 Pedro Alves <palves@redhat.com>
2872
2873 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2874 function/method scopes; lookup the nested name as a function local
2875 static variable.
2876
2877 2017-09-04 Pedro Alves <palves@redhat.com>
2878
2879 (%type <voidval>): Add function_method.
2880 * c-exp.y (exp): New production for calls with no arguments.
2881 (function_method, function_method_void_or_typelist): New
2882 productions.
2883 (exp): New production for "method()::static_var".
2884 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2885 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2886 Handle OP_FUNC_STATIC_VAR.
2887 * parse.c (operator_length_standard):
2888 Handle OP_FUNC_STATIC_VAR.
2889
2890 2017-09-04 Pedro Alves <palves@redhat.com>
2891
2892 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2893 handling.
2894 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2895 Ditto.
2896 * parse.c (operator_length_standard, operator_check_standard):
2897 Ditto.
2898 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2899
2900 2017-09-04 Pedro Alves <palves@redhat.com>
2901
2902 * ax-gdb.c: Include "typeprint.h".
2903 (gen_expr_for_cast): New function.
2904 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2905 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2906 type is unknown.
2907 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2908 nodebug_data_symbol.
2909 * eval.c: Include "typeprint.h".
2910 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2911 Error out if symbol has unknown type.
2912 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2913 evaluate_subexp_for_cast.
2914 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2915 OP_VAR_MSYM_VALUE.
2916 (evaluate_subexp_for_cast): New function.
2917 * gdbtypes.c (init_nodebug_var_type): New function.
2918 (objfile_type): Use it to initialize types of variables with no
2919 debug info.
2920 * typeprint.c (error_unknown_type): New.
2921 * typeprint.h (error_unknown_type): New declaration.
2922 * compile/compile-c-types.c (convert_type_basic): Handle
2923 TYPE_CODE_ERROR; warn and fallback to int for variables with
2924 unknown type.
2925
2926 2017-09-04 Pedro Alves <palves@redhat.com>
2927
2928 * eval.c (evaluate_var_value): New function, factored out from ...
2929 (evaluate_subexp_standard): ... here.
2930
2931 2017-09-04 Pedro Alves <palves@redhat.com>
2932
2933 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2934 Remove useless assignments to 'op'.
2935
2936 2017-09-04 Pedro Alves <palves@redhat.com>
2937
2938 * eval.c (eval_skip_value): New function.
2939 (evaluate_subexp_standard): Use it.
2940
2941 2017-09-04 Pedro Alves <palves@redhat.com>
2942
2943 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2944 function name from symbol/minsym and pass it to
2945 error_call_unknown_return_type.
2946
2947 2017-09-04 Pedro Alves <palves@redhat.com>
2948
2949 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2950 * ax-gdb.c (gen_msym_var_ref): New function.
2951 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2952 * eval.c (evaluate_var_msym_value): New function.
2953 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2954 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2955 to call_function_by_hand.
2956 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2957 Handle OP_VAR_MSYM_VALUE.
2958 (union exp_element) <msymbol>: New field.
2959 * minsyms.h (struct type): Forward declare.
2960 (find_minsym_type_and_address): Declare.
2961 * parse.c (write_exp_elt_msym): New function.
2962 (write_exp_msymbol): Delete, refactored as ...
2963 (find_minsym_type_and_address): ... this new function.
2964 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2965 (operator_length_standard, operator_check_standard): Handle
2966 OP_VAR_MSYM_VALUE.
2967 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2968
2969 2017-09-04 Pedro Alves <palves@redhat.com>
2970
2971 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2972 TYPE_GNU_IFUNC specially here. Throw error if return type is
2973 unknown.
2974 * ada-typeprint.c (print_func_type): Handle functions with unknown
2975 return type.
2976 * c-typeprint.c (c_type_print_base): Handle functions and methods
2977 with unknown return type.
2978 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2979 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2980 * compile/compile-c-types.c: Include "objfiles.h".
2981 (convert_func): For functions with unknown return type, warn and
2982 default to int.
2983 * compile/compile-object-run.c (compile_object_run): Adjust call
2984 to call_function_by_hand_dummy.
2985 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2986 call_function_by_hand.
2987 * eval.c (evaluate_subexp_standard): Adjust calls to
2988 call_function_by_hand. Handle functions and methods with unknown
2989 return type. Pass expect_type to call_function_by_hand.
2990 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2991 return type.
2992 * gcore.c (call_target_sbrk): Adjust call to
2993 call_function_by_hand.
2994 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2995 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2996 an integer address type instead of nodebug.
2997 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2998 call_function_by_hand.
2999 * infcall.c (error_call_unknown_return_type): New function.
3000 (call_function_by_hand): New "default_return_type" parameter.
3001 Pass it down.
3002 (call_function_by_hand_dummy): New "default_return_type"
3003 parameter. Use it instead of defaulting to int. If there's no
3004 default and the return type is unknown, throw an error. If
3005 there's a default return type, and the called function has no
3006 debug info, then assume the function is prototyped.
3007 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3008 New "default_return_type" parameter.
3009 (error_call_unknown_return_type): New declaration.
3010 * linux-fork.c (call_lseek): Cast return type of lseek.
3011 (inferior_call_waitpid, checkpoint_command): Adjust calls to
3012 call_function_by_hand.
3013 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3014 calls to call_function_by_hand.
3015 * m2-typeprint.c (m2_procedure): Handle functions with unknown
3016 return type.
3017 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3018 (value_nsstring, print_object_command): Adjust calls to
3019 call_function_by_hand.
3020 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3021 functions with unknown return type.
3022 (pascal_type_print_func_varspec_suffix): New function.
3023 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3024 TYPE_CODE_METHOD>: Use it.
3025 * python/py-value.c (valpy_call): Adjust call to
3026 call_function_by_hand.
3027 * rust-lang.c (rust_evaluate_funcall): Adjust call to
3028 call_function_by_hand.
3029 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3030 call_function_by_hand.
3031 * valops.c (value_allocate_space_in_inferior): Adjust call to
3032 call_function_by_hand.
3033 * typeprint.c (type_print_unknown_return_type): New function.
3034 * typeprint.h (type_print_unknown_return_type): New declaration.
3035
3036 2017-09-04 Pedro Alves <palves@redhat.com>
3037
3038 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3039 types with more than one parameter as prototyped.
3040
3041 2017-09-04 Pedro Alves <palves@redhat.com>
3042
3043 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3044 (disassemble_command): Use gdb_disassembly_flags instead of bare
3045 int.
3046 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3047 (dump_insns, do_mixed_source_and_assembly_deprecated)
3048 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3049 Use gdb_disassembly_flags instead of bare int.
3050 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3051 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3052 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3053 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
3054 (enum gdb_disassembly_flag): ... values of this new enumeration.
3055 (gdb_disassembly_flags): Define.
3056 (gdb_disassembly)
3057 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3058 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3059 gdb_disassembly_flags instead of bare int.
3060 * record-btrace.c (btrace_insn_history)
3061 (record_btrace_insn_history, record_btrace_insn_history_range)
3062 (record_btrace_insn_history_from): Use gdb_disassembly_flags
3063 instead of bare int.
3064 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3065 Use gdb_disassembly_flags instead of bare int.
3066 * target-debug.h (target_debug_print_gdb_disassembly_flags):
3067 Define.
3068 * target-delegates.c: Regenerate.
3069 * target.c (target_insn_history, target_insn_history_from)
3070 (target_insn_history_range): Use gdb_disassembly_flags instead of
3071 bare int.
3072 * target.h: Include "disasm.h".
3073 (struct target_ops) <to_insn_history, to_insn_history_from,
3074 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3075 int.
3076 (target_insn_history, target_insn_history_from)
3077 (target_insn_history_range): Use gdb_disassembly_flags instead of
3078 bare int.
3079
3080 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3081
3082 * cli/cli-script.c (build_command_line): For if/while commands,
3083 check whether args is empty.
3084
3085 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3086
3087 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3088 (enum command_control_type): Likewise.
3089 (struct command_line): Likewise.
3090 (free_command_lines): Likewise.
3091 (struct command_lines_deleter): Likewise.
3092 (command_line_up): Likewise.
3093 (read_command_lines): Likewise.
3094 (read_command_lines_1): Likewise.
3095 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3096 (enum command_control_type): Likewise.
3097 (struct command_line): Likewise.
3098 (free_command_lines): Likewise.
3099 (struct command_lines_deleter): Likewise.
3100 (command_line_up): Likewise.
3101 (read_command_lines): Likewise.
3102 (read_command_lines_1): Likewise.
3103 * breakpoint.h: Include cli/cli-script.h.
3104 * extension-priv.h: Likewise.
3105 * gdbcmd.h: Likewise.
3106
3107 2017-09-04 Pedro Alves <palves@redhat.com>
3108
3109 * ada-lang.c (is_known_support_routine): Move sal declaration to
3110 where it is initialized.
3111 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3112 (parse_breakpoint_sals, decode_static_tracepoint_spec)
3113 (clear_command, update_static_tracepoint): Remove init_sal
3114 references. Move declarations closer to initializations.
3115 * cli/cli-cmds.c (list_command): Move sal declarations closer to
3116 initializations.
3117 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3118 references. Move sal declarations closer to initializations.
3119 * frame.c (find_frame_sal): Return a symtab_and_line via function
3120 return instead of output parameter. Remove init_sal references.
3121 * frame.h (find_frame_sal): Return a symtab_and_line via function
3122 return instead of output parameter.
3123 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3124 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3125 instead of memset.
3126 (gdbscm_find_pc_line): Remove init_sal reference.
3127 * infcall.c (call_function_by_hand_dummy): Remove init_sal
3128 references. Move declarations closer to initializations.
3129 * infcmd.c (set_step_frame): Update. Move declarations closer to
3130 initializations.
3131 (finish_backward): Remove init_sal references. Move declarations
3132 closer to initializations.
3133 * infrun.c (process_event_stop_test, handle_step_into_function)
3134 (insert_hp_step_resume_breakpoint_at_frame)
3135 (insert_step_resume_breakpoint_at_caller): Likewise.
3136 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3137 (symbol_to_sal): Likewise.
3138 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3139 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3140 to its initialization.
3141 * reverse.c (save_bookmark_command): Use new/delete. Remove
3142 init_sal references. Move declarations closer to initializations.
3143 * source.c (get_current_source_symtab_and_line): Remove brace
3144 initialization.
3145 (set_current_source_symtab_and_line): Now takes the sal by const
3146 reference. Remove brace initialization.
3147 (line_info): Remove init_sal reference.
3148 * source.h (set_current_source_symtab_and_line): Now takes a
3149 symtab_and_line via const reference.
3150 * stack.c (set_current_sal_from_frame): Adjust.
3151 (print_frame_info): Adjust.
3152 (get_last_displayed_sal): Return the sal via function return
3153 instead of via output parameter. Simplify.
3154 (frame_info): Adjust.
3155 * stack.h (get_last_displayed_sal): Return the sal via function
3156 return instead of via output parameter.
3157 * symtab.c (init_sal): Delete.
3158 (find_pc_sect_line): Remove init_sal references. Move
3159 declarations closer to initializations.
3160 (find_function_start_sal): Remove init_sal references. Move
3161 declarations closer to initializations.
3162 * symtab.h (struct symtab_and_line): In-class initialize all
3163 fields.
3164 * tracepoint.c (set_traceframe_context)
3165 (print_one_static_tracepoint_marker): Remove init_sal references.
3166 Move declarations closer to initializations.
3167 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3168 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
3169 declarations closer to initializations.
3170 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3171 init_sal references. Adjust.
3172
3173 2017-09-04 Pedro Alves <palves@redhat.com>
3174
3175 * ax-gdb.c (agent_command_1): Use range-for.
3176 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3177 * breakpoint.c: Include "common/array-view.h".
3178 (init_breakpoint_sal, create_breakpoint_sal): Change sals
3179 parameter from struct symtabs_and_lines to
3180 array_view<symtab_and_line>. Adjust. Use range-for. Update.
3181 (breakpoint_sals_to_pc): Change sals parameter from struct
3182 symtabs_and_lines to std::vector reference.
3183 (check_fast_tracepoint_sals): Change sals parameter from struct
3184 symtabs_and_lines to std::array_view. Use range-for.
3185 (decode_static_tracepoint_spec): Return a std::vector instead of
3186 symtabs_and_lines. Update.
3187 (create_breakpoint): Update.
3188 (break_range_command, until_break_command, clear_command): Update.
3189 (base_breakpoint_decode_location, bkpt_decode_location)
3190 (bkpt_probe_create_sals_from_location)
3191 (bkpt_probe_decode_location, tracepoint_decode_location)
3192 (tracepoint_probe_decode_location)
3193 (strace_marker_create_sals_from_location): Return a std::vector
3194 instead of symtabs_and_lines.
3195 (strace_marker_create_breakpoints_sal): Update.
3196 (strace_marker_decode_location): Return a std::vector instead of
3197 symtabs_and_lines. Update.
3198 (update_breakpoint_locations): Change struct symtabs_and_lines
3199 parameters to gdb::array_view. Adjust.
3200 (location_to_sals): Return a std::vector instead of
3201 symtabs_and_lines. Update.
3202 (breakpoint_re_set_default): Use std::vector instead of struct
3203 symtabs_and_lines.
3204 (decode_location_default): Return a std::vector instead of
3205 symtabs_and_lines. Update.
3206 * breakpoint.h: Include "common/array-view.h".
3207 (struct breakpoint_ops) <decode_location>: Now returns a
3208 std::vector instead of returning a symtabs_and_lines via output
3209 parameter.
3210 (update_breakpoint_locations): Change sals parameters to use
3211 gdb::array_view.
3212 * cli/cli-cmds.c (edit_command, list_command): Update to use
3213 std::vector and gdb::array_view.
3214 (ambiguous_line_spec): Adjust to use gdb::array_view and
3215 range-for.
3216 (compare_symtabs): Rename to ...
3217 (cmp_symtabs): ... this. Change parameters to symtab_and_line
3218 const reference and adjust.
3219 (filter_sals): Rewrite using std::vector and standard algorithms.
3220 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3221 (jump_command): Update to use std::vector.
3222 * linespec.c (struct linespec_state) <canonical_names>: Update
3223 comment.
3224 (add_sal_to_sals_basic): Delete.
3225 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3226 (decode_line_2, create_sals_line_offset)
3227 (convert_address_location_to_sals, convert_linespec_to_sals)
3228 (convert_explicit_location_to_sals, parse_linespec)
3229 (event_location_to_sals, decode_line_full, decode_line_1)
3230 (decode_line_with_current_source)
3231 (decode_line_with_last_displayed, decode_objc)
3232 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3233 (linespec_result::~linespec_result): Adjust to use std::vector
3234 instead of symtabs_and_lines.
3235 * linespec.h (linespec_sals::sals): Now a std::vector.
3236 (struct linespec_result): Use std::vector, bool, and in-class
3237 initialization.
3238 (decode_line_1, decode_line_with_current_source)
3239 (decode_line_with_last_displayed): Return std::vector.
3240 * macrocmd.c (info_macros_command): Use std::vector.
3241 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3242 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3243 std::vector.
3244 * probe.h (parse_probes): Return a std::vector.
3245 * python/python.c (gdbpy_decode_line): Use std::vector and
3246 gdb::array_view.
3247 * source.c (select_source_symtab, line_info): Use std::vector.
3248 * stack.c (func_command): Use std::vector.
3249 * symtab.h (struct symtabs_and_lines): Delete.
3250 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3251
3252 2017-09-04 Pedro Alves <palves@redhat.com>
3253
3254 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3255 unittests/array-view-selftests.c.
3256 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3257 * common/array-view.h: New file.
3258 * unittests/array-view-selftests.c: New file.
3259
3260 2017-09-04 Pedro Alves <palves@redhat.com>
3261
3262 * cli/cli-cmds.c (edit_command): Pass message to
3263 ambiguous_line_spec.
3264 (list_command): Pass message to ambiguous_line_spec. Say
3265 "first"/"last" instead of "start" and "end" to be consistent with
3266 the manual.
3267 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3268 them to print formatted message.
3269
3270 2017-09-04 Pedro Alves <palves@redhat.com>
3271
3272 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3273 ftrace_update_insns by reference instead of pointer.
3274
3275 2017-09-04 Yao Qi <yao.qi@linaro.org>
3276
3277 * i386-go32-tdep.c: Include x86-xstate.h.
3278 (i386_go32_init_abi): Call i386_target_description.
3279 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3280 if xcr0 is X86_XSTATE_X87_MASK.
3281 * i386-tdep.h (tdesc_i386): Remove the declaration.
3282 (tdesc_i386_mmx): Likewise.
3283
3284 2017-09-04 Yao Qi <yao.qi@linaro.org>
3285
3286 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3287 X86_XSTATE_SSE_MASK instead of 0.
3288
3289 2017-09-04 Yao Qi <yao.qi@linaro.org>
3290
3291 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3292 i386_target_description.
3293 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3294 i386_target_description.
3295 * i386-tdep.c (i386_gdbarch_init): Likewise.
3296
3297 2017-09-04 Yao Qi <yao.qi@linaro.org>
3298
3299 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3300 (x86_darwin_init_abi_64): Call amd64_target_description.
3301 * amd64-dicos-tdep.c: Likewise.
3302 * amd64-fbsd-nat.c: Likewise.
3303 * amd64-fbsd-tdep.c: Likewise.
3304 * amd64-nbsd-tdep.c: Likewise.
3305 * amd64-obsd-tdep.c: Likewise.
3306 * amd64-sol2-tdep.c: Likewise.
3307 * amd64-windows-tdep.c: Likewise.
3308 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3309
3310 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3311
3312 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3313 (btrace_function) <insn>: Change type to use std::vector.
3314 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3315 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3316 ftrace_update_insns, ftrace_compute_global_level_offset,
3317 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3318 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3319 change to std::vector.
3320 (ftrace_update_insns): Adjust to change to std::vector, change
3321 type of INSN parameter.
3322 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3323 * record-btrace.c (btrace_call_history_insn_range,
3324 btrace_compute_src_line_range,
3325 record_btrace_frame_prev_register): Adjust to change to
3326 std::vector.
3327 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3328 to change to std::vector.
3329
3330 2017-09-03 Tom Tromey <tom@tromey.com>
3331
3332 * corefile.c (reopen_exec_file): Use std::string.
3333
3334 2017-09-03 Tom Tromey <tom@tromey.com>
3335
3336 * compile/compile.c (compile_register_name_mangled): Return
3337 std::string.
3338 * compile/compile-loc2c.c (pushf_register_address): Update.
3339 (pushf_register): Update.
3340 * compile/compile-c-types.c (convert_array): Update.
3341 * compile/compile-c-symbols.c (generate_vla_size): Update.
3342 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3343 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3344 (convert_one_symbol): Update.
3345 (generate_c_for_for_one_variable): Update.
3346 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3347 std::string.
3348 (generate_register_struct): Update.
3349 * compile/compile-internal.h (c_get_range_decl_name): Return a
3350 std::string.
3351 (compile_register_name_mangled): Return std::string.
3352
3353 2017-09-03 Tom Tromey <tom@tromey.com>
3354
3355 * utils.c (perror_string): Return a std::string.
3356 (throw_perror_with_name, perror_warning_with_name): Update.
3357
3358 2017-09-03 Tom Tromey <tom@tromey.com>
3359
3360 * demangle.c (demangle_command): Use std::string,
3361 unique_xmalloc_ptr.
3362
3363 2017-09-03 Tom Tromey <tom@tromey.com>
3364
3365 * cli/cli-setshow.c (do_set_command): Use std::string.
3366
3367 2017-09-03 Tom Tromey <tom@tromey.com>
3368
3369 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3370
3371 2017-09-03 Tom Tromey <tom@tromey.com>
3372
3373 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3374
3375 2017-09-03 Tom Tromey <tom@tromey.com>
3376
3377 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3378 gdb::unique_xmalloc_ptr.
3379
3380 2017-09-03 Tom Tromey <tom@tromey.com>
3381
3382 * thread.c (print_thread_info_1): Use string_printf.
3383 (thread_apply_command, thread_apply_all_command): Use
3384 std::string.
3385
3386 2017-09-03 Tom Tromey <tom@tromey.com>
3387
3388 * valprint.c (val_print_string): Update.
3389 * gdbcore.h (memory_error_message): Return std::string.
3390 * corefile.c (memory_error_message): Return std::string.
3391 (memory_error): Update.
3392 * breakpoint.c (insert_bp_location): Update.
3393
3394 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3395
3396 * target/waitstatus.h (target_waitstatus_to_string): Change
3397 return type to std::string.
3398 * target/waitstatus.c (target_waitstatus_to_string): Return
3399 std::string.
3400 * target.h (target_waitstatus_to_string): Remove declaration.
3401 * infrun.c (resume, clear_proceed_status_thread,
3402 print_target_wait_results, do_target_wait, save_waitstatus,
3403 stop_all_threads): Adjust.
3404 * record-btrace.c (record_btrace_wait): Adjust.
3405 * target-debug.h
3406 (target_debug_print_struct_target_waitstatus_p): Adjust.
3407
3408 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3409
3410 PR gdb/22046
3411 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3412 detection.
3413
3414 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3415
3416 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3417 for setting/unsetting environment variables on the remote target.
3418 (New remote packets): Add entries for QEnvironmentHexEncoded,
3419 QEnvironmentUnset and QEnvironmentReset.
3420 * common/environ.c (gdb_environ::operator=): Extend method to
3421 handle m_user_set_env_list and m_user_unset_env_list.
3422 (gdb_environ::clear): Likewise.
3423 (match_var_in_string): Change type of first parameter from 'char
3424 *' to 'const char *'.
3425 (gdb_environ::set): Extend method to handle
3426 m_user_set_env_list and m_user_unset_env_list.
3427 (gdb_environ::unset): Likewise.
3428 (gdb_environ::clear_user_set_env): New method.
3429 (gdb_environ::user_set_envp): Likewise.
3430 (gdb_environ::user_unset_envp): Likewise.
3431 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3432 m_user_unset_env_list on move constructor/assignment.
3433 (unset): Add new default parameter 'update_unset_list = true'.
3434 (clear_user_set_env): New method.
3435 (user_set_envp): Likewise.
3436 (user_unset_envp): Likewise.
3437 (m_user_set_env_list): New std::set.
3438 (m_user_unset_env_list): Likewise.
3439 * common/rsp-low.c (hex2str): New function.
3440 (bin2hex): New overload for bin2hex function.
3441 * common/rsp-low.c (hex2str): New prototype.
3442 (str2hex): New overload prototype.
3443 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3444 QEnvironmentUnset and QEnvironmentReset.
3445 (remote_protocol_features): Add QEnvironmentHexEncoded,
3446 QEnvironmentUnset and QEnvironmentReset packets.
3447 (send_environment_packet): New function.
3448 (extended_remote_environment_support): Likewise.
3449 (extended_remote_create_inferior): Call
3450 extended_remote_environment_support.
3451 (_initialize_remote): Add QEnvironmentHexEncoded,
3452 QEnvironmentUnset and QEnvironmentReset packet configs.
3453 * unittests/environ-selftests.c (gdb_selftest_env_var):
3454 New variable.
3455 (test_vector_initialization): New function.
3456 (test_init_from_host_environ): Likewise.
3457 (test_reinit_from_host_environ): Likewise.
3458 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3459 Likewise.
3460 (test_unset_set_empty_vector): Likewise.
3461 (test_vector_clear): Likewise.
3462 (test_std_move): Likewise.
3463 (test_move_constructor):
3464 (test_self_move): Likewise.
3465 (test_set_unset_reset): Likewise.
3466 (run_tests): Rewrite in terms of the functions above.
3467
3468 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
3469
3470 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3471 (adi_available): Use a temp variable of type CORE_ADDR as argument
3472 3 when calling target_auxv_search.
3473 (adi_normalize_address): Use masks and xor operators to calculate
3474 normalized address.
3475 (adi_read_versions, adi_write_versions, adi_print_versions)
3476 (do_examine, do_assign): Use paddress.
3477
3478 2017-08-29 John Baldwin <jhb@FreeBSD.org>
3479
3480 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3481 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3482 out of loop and add supply of FIR.
3483 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3484 add collect of FIR.
3485
3486 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3487
3488 PR gdb/21827
3489 * cli/cli-script.c (define_command): Don't convert command name
3490 to lower case.
3491
3492 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3493
3494 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3495 Update all callers accordingly. Remove all code blocks handling
3496 the case where DISPP is not NULL.
3497
3498 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3499
3500 PR symtab/22003
3501 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3502 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3503 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3504
3505 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3506
3507 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3508 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3509 (read_comp_units_from_section): New parameter abbrev_section, use
3510 read_and_check_comp_unit_head, allocate signatured_type if needed.
3511 (create_all_comp_units): Update read_comp_units_from_section caller.
3512
3513 2017-08-23 Pedro Alves <palves@redhat.com>
3514
3515 PR remote/21852
3516 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3517 to null_ptid and switch to thread without reading the registers
3518 after adding the inferior.
3519
3520 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3521
3522 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3523 compile-gcc.
3524 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3525 (compile_to_object): Implement compile_gcc.
3526 (_initialize_compile): Install "set compile-gcc". Initialize
3527 compile_gcc.
3528
3529 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3530
3531 * compile/compile.c (compile_to_object): Conditionally call
3532 set_verbose. Conditionally call compile or compile_v0.
3533
3534 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3535
3536 * sparc64-tdep.h: (adi_normalize_address): New export.
3537 * sparc-nat.h: (open_adi_tag_fd): New export.
3538 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3539 * sparc64-linux-tdep.c:
3540 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3541 (sparc64_linux_handle_segmentation_fault): New function.
3542 (sparc64_linux_init_abi): Register
3543 sparc64_linux_handle_segmentation_fault
3544 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3545 (sparc64_addr_bits_remove): New function.
3546 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3547 (MAX_PROC_NAME_SIZE): New macro.
3548 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3549 (sparc64adilist): New variable.
3550 (adi_proc_list): New variable.
3551 (find_adi_info): New function.
3552 (add_adi_info): New function.
3553 (get_adi_info_proc): New function.
3554 (get_adi_info): New function.
3555 (info_adi_command): New function.
3556 (read_maps_entry): New function.
3557 (adi_available): New function.
3558 (adi_normalize_address): New function.
3559 (adi_align_address): New function.
3560 (adi_convert_byte_count): New function.
3561 (adi_tag_fd): New function.
3562 (adi_is_addr_mapped): New function.
3563 (adi_read_versions): New function.
3564 (adi_write_versions): New function.
3565 (adi_print_versions): New function.
3566 (do_examine): New function.
3567 (do_assign): New function.
3568 (adi_examine_command): New function.
3569 (adi_assign_command): New function.
3570 (_initialize_sparc64_adi_tdep): New function.
3571
3572 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3573
3574 * breakpoint.c (breakpoints_info): Rename to ...
3575 (info_breakpoints_command): ... this.
3576 (watchpoints_info): Rename to ...
3577 (info_watchpoints_command): ... this.
3578 (tracepoints_info): Rename to ...
3579 (info_tracepoints_command): ... this.
3580 (_initialize_breakpoint): Adjust.
3581 * dcache.c (dcache_info): Rename to ...
3582 (info_display_command): ... this.
3583 (_initialize_dcache): Adjust.
3584 * frame.h (args_info): Rename to ...
3585 (info_args_command): ... this.
3586 (locals_info): Rename to ...
3587 (info_locals_command): ... this.
3588 * infcmd.c (nofp_registers_info): Rename to ...
3589 (info_registers_command): ... this.
3590 (float_info): Rename to ...
3591 (info_float_command): ... this.
3592 (program_info): Rename to ...
3593 (info_program_command): ... this.
3594 (all_registers_info): Rename to ...
3595 (info_all_registers_command): ... this.
3596 (vector_info): Rename to ...
3597 (info_vector_command): ... this.
3598 (float_info): Rename to ...
3599 (info_float_command): ... this.
3600 (_initialize_infcmd): Adjust.
3601 * inferior.h (term_info): Rename to ...
3602 (info_terminal_command): ... this.
3603 * inflow.c (term_info): Rename to ...
3604 (info_terminal_command): ... this.
3605 (_initialize_inflow): Adjust.
3606 * infrun.c (signals_info): Rename to ...
3607 (info_signals_command): ... this.
3608 (_initialize_infrun): Adjust.
3609 * objc-lang.c (classes_info): Rename to ...
3610 (info_classes_command): ... this.
3611 (selectors_info): Rename to ...
3612 (info_selectors_command): ... this.
3613 (_initialize_objc_language): Adjust.
3614 * printcmd.c (sym_info): Rename to ...
3615 (info_symbol_command): ... this.
3616 (address_info): Rename to ...
3617 (info_address_command): ... this.
3618 (display_info): Rename to ...
3619 (info_display_command): ... this.
3620 (_initialize_printcmd): Adjust.
3621 * reverse.c (bookmarks_info): Rename to ...
3622 (info_breakpoints_command): ... this.
3623 (_initialize_reverse): Adjust.
3624 * ser-go32.c (dos_info): Rename to ...
3625 (info_serial_command): ... this.
3626 (_initialize_ser_dos): Adjust.
3627 * skip.c (skip_info): Rename to ...
3628 (info_skip_command): ... this.
3629 (_initialize_step_skip): Adjust.
3630 * source.c (line_info): Rename to ...
3631 (info_line_command): ... this.
3632 (source_info): Rename to ...
3633 (info_source_command)
3634 * stack.c (frame_info): Rename to ...
3635 (info_frame_command): ... this.
3636 (locals_info): Rename to ...
3637 (info_locals_command): ... this.
3638 (args_info): Rename to ...
3639 (info_args_command): ... this.
3640 (_initialize_stack): Adjust.
3641 * symtab.c (sources_info): Rename to ...
3642 (info_sources_command): ... this.
3643 (variables_info): Rename to ...
3644 (info_variables_command): ... this.
3645 (functions_info): Rename to ...
3646 (info_functions_command): ... this.
3647 (types_info): Rename to ...
3648 (info_types_command): ... this.
3649 (_initialize_symtab): Adjust.
3650 * target.c (target_info): Rename to ...
3651 (info_target_command): ... this.
3652 (initialize_targets): Adjust.
3653 * tracepoint.c (tvariables_info): Rename to ...
3654 (info_tvariables_command): ... this.
3655 (scope_info): Rename to ...
3656 (info_scope_command): ... this.
3657 (trace_dump_actions): Adjust.
3658 (_initialize_tracepoint): Adjust.
3659
3660 2017-08-22 Tom Tromey <tom@tromey.com>
3661
3662 * breakpoint.h (install_breakpoint): Update.
3663 * breakpoint.c (add_solib_catchpoint): Update.
3664 (install_breakpoint): Change argument to a std::unique_ptr.
3665 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3666 (create_breakpoint_sal, create_breakpoint): Update.
3667 (watch_command_1, catch_exec_command_1)
3668 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3669 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3670 Return the breakpoint.
3671 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3672 (new_single_step_breakpoint): Update.
3673 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3674 std::unique_ptr.
3675 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3676 std::unique_ptr.
3677 * break-catch-sig.c (create_signal_catchpoint): Use
3678 std::unique_ptr.
3679 * ada-lang.c (create_ada_exception_catchpoint): Use
3680 std::unique_ptr.
3681
3682 2017-08-22 Tom Tromey <tom@tromey.com>
3683
3684 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3685
3686 2017-08-22 Tom Tromey <tom@tromey.com>
3687
3688 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3689 (lookup_partial_symbol): Update.
3690
3691 2017-08-22 Tom Tromey <tom@tromey.com>
3692
3693 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3694 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3695 (find_and_open_source, symtab_to_fullname): Update.
3696 * psymtab.c (psymtab_to_fullname): Update.
3697
3698 2017-08-22 Tom Tromey <tom@tromey.com>
3699
3700 * exec.c (exec_file_attach): Update.
3701 * linux-thread-db.c (try_thread_db_load): Update.
3702 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3703 * utils.c (gdb_realpath): Change return type.
3704 (gdb_realpath_keepfile): Update.
3705 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3706 (_initialize_utils): Register the new self test.
3707 * source.c (openp): Update.
3708 (find_and_open_source): Update.
3709 * nto-tdep.c (nto_find_and_open_solib): Update.
3710 * main.c (set_gdb_data_directory): Update.
3711 (captured_main_1): Update.
3712 * dwarf2read.c (dwarf2_get_dwz_file): Update
3713 (dw2_map_symbol_filenames): Update.
3714 * auto-load.c (auto_load_safe_path_vec_update): Update.
3715 (filename_is_in_auto_load_safe_path_vec): Change type of
3716 "filename_realp".
3717 (auto_load_objfile_script): Update.
3718 (file_is_auto_load_safe): Update. Use std::string.
3719 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3720
3721 2017-08-22 Tom Tromey <tom@tromey.com>
3722
3723 * utils.c (gdb_realpath_keepfile): Return a
3724 gdb::unique_xmalloc_ptr.
3725 * exec.c (exec_file_attach): Update.
3726 * utils.h (gdb_realpath_keepfile): Return a
3727 gdb::unique_xmalloc_ptr.
3728
3729 2017-08-22 Tom Tromey <tom@tromey.com>
3730
3731 * compile/compile.c (compile_file_command): Use
3732 gdb::unique_xmalloc_ptr, std::string.
3733 * utils.c (gdb_abspath): Change return type.
3734 * source.c (openp): Update.
3735 * objfiles.c (allocate_objfile): Update.
3736 * main.c (set_gdb_data_directory): Update.
3737 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3738
3739 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3740
3741 * cli-cmds.c (list_commands): List actual code around more than
3742 one location.
3743
3744 2017-08-21 John Baldwin <jhb@FreeBSD.org>
3745
3746 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3747
3748 2017-08-21 Pedro Alves <palves@redhat.com>
3749
3750 PR gdb/19487
3751 * c-exp.y (variable production): Handle function aliases.
3752 * minsyms.c (msymbol_is_text): New function.
3753 * minsyms.h (msymbol_is_text): Declare.
3754 * symtab.c (find_function_alias_target): New function.
3755 * symtab.h (find_function_alias_target): Declare.
3756
3757 2017-08-21 Pedro Alves <palves@redhat.com>
3758
3759 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3760 typedefs.
3761 * typeprint.c (whatis_exp): If handling "whatis", and expression
3762 is OP_TYPE, strip one typedef level. Otherwise don't strip
3763 typedefs here.
3764 * valops.c (value_cast): Save "to" type before resolving
3765 stubs/typedefs. Use that type as resulting value's type.
3766
3767 2017-08-18 Tom Tromey <tom@tromey.com>
3768 Pedro Alves <palves@redhat.com>
3769
3770 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3771 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3772 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3773 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3774 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3775 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3776 (linux_get_siginfo_data): Add "thread" argument. Use
3777 scoped_restore.
3778 * linux-nat.c (linux_child_follow_fork)
3779 (check_stopped_by_watchpoint): Use scoped_restore.
3780 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3781 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3782 (restore_inferior_ptid, save_inferior_ptid): Remove.
3783 * btrace.c (btrace_fetch): Use scoped_restore.
3784 * bsd-uthread.c (bsd_uthread_fetch_registers)
3785 (bsd_uthread_store_registers): Use scoped_restore.
3786 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3787 scoped_restore.
3788 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3789 (aix_thread_xfer_partial): Use scoped_restore.
3790 * inferior.h (save_inferior_ptid): Remove.
3791
3792 2017-08-18 Yao Qi <yao.qi@linaro.org>
3793
3794 PR tdep/21818
3795 * arm-tdep.c (gdb_print_insn_arm): Mark
3796 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3797
3798 2017-08-18 Yao Qi <yao.qi@linaro.org>
3799
3800 * NEWS: Mention GDBserver's new option "--selftest".
3801 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3802 * selftest.c: Move it to common/selftest.c.
3803 * selftest.h: Move it to common/selftest.h.
3804 * selftest-arch.c (reset): New function.
3805 (tests_with_arch): Call reset.
3806
3807 2017-08-18 Yao Qi <yao.qi@linaro.org>
3808
3809 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3810 instead of exception_fprintf and printf_filtered.
3811
3812 2017-08-18 Yao Qi <yao.qi@linaro.org>
3813
3814 * selftest.c (register_self_test): Rename it to
3815 selftests::register_test.
3816 (run_self_tests): selftest::run_tests.
3817 * selftest.h: Update declarations.
3818 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3819 selftests::register_test_foreach_arch.
3820 * selftest-arch.h: Update declaration.
3821 * aarch64-tdep.c: Update.
3822 * arm-tdep.c: Likewise.
3823 * disasm-selftests.c: Likewise.
3824 * dwarf2loc.c: Likewise.
3825 * dwarf2-frame.c: Likewise.
3826 * findvar.c: Likewise.
3827 * gdbarch-selftests.c: Likewise.
3828 * maint.c (maintenance_selftest): Likewise.
3829 * regcache.c: Likewise.
3830 * rust-exp.y: Likewise.
3831 * selftest-arch.c: Likewise.
3832 * unittests/environ-selftests.c: Likewise.
3833 * unittests/function-view-selftests.c: Likewise.
3834 * unittests/offset-type-selftests.c: Likewise.
3835 * unittests/optional-selftests.c: Likewise.
3836 * unittests/scoped_restore-selftests.c: Likewise.
3837 * utils-selftests.c: Likewise.
3838
3839 2017-08-17 Pedro Alves <palves@redhat.com>
3840
3841 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3842 local.
3843
3844 2017-08-17 Pedro Alves <palves@redhat.com>
3845
3846 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3847 field.
3848 (reset_die_in_process): Delete, replaced by ...
3849 (process_die_scope): ... this new class. Make it responsible for
3850 freeing cu->line_header too.
3851 (process_die): Use process_die_scope.
3852 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3853 cu->line_header_die_owner. Don't release the line header if it's
3854 owned by the CU.
3855 (setup_type_unit_groups): Make the CU/DIE own the line header.
3856 Don't release the line header here.
3857
3858 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3859
3860 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3861
3862 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3863
3864 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3865 Single-Key mode
3866
3867 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3868
3869 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3870 mode command list.
3871
3872 2017-08-15 Stafford Horne <shorne@gmail.com>
3873
3874 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3875
3876 2017-08-15 Stafford Horne <shorne@gmail.com>
3877
3878 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3879
3880 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3881
3882 PR gdb/21954
3883 * infcmd.c (unset_environment_command): Use the 'clear' method on
3884 the environment instead of resetting it.
3885
3886 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3887
3888 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3889 platforms.
3890
3891 2017-08-14 Tom Tromey <tom@tromey.com>
3892
3893 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3894 (print_binary_chars): Likewise.
3895 (BITS_IN_BYTES): Remove.
3896
3897 2017-08-14 Tom Tromey <tom@tromey.com>
3898
3899 PR gdb/21675
3900 * valprint.c (LOW_ZERO): Change value to 034.
3901 (print_octal_chars): Add static_asserts for octal constants.
3902 * printcmd.c (print_scalar_formatted): Add 'd' case.
3903
3904 2017-08-11 Tom Tromey <tom@tromey.com>
3905
3906 * symfile.c (add_symbol_file_command): Use std::vector.
3907
3908 2017-08-14 Tom Tromey <tom@tromey.com>
3909
3910 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3911 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3912 std::move.
3913 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3914
3915 2017-08-11 Pedro Alves <palves@redhat.com>
3916
3917 * infrun.c (process_event_stop_test): Adjust
3918 function_name_is_marked_for_skip call.
3919 * skip.c: Include <list>.
3920 (skiplist_entry): Make it a class with private fields, and
3921 getters/setters.
3922 (skiplist_entry_chain): Delete.
3923 (skiplist_entries): New.
3924 (skiplist_entry_count): Delete.
3925 (highest_skiplist_entry_num): New.
3926 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3927 (add_skiplist_entry): Delete.
3928 (skiplist_entry::skiplist_entry): New.
3929 (skiplist_entry::add_entry): New.
3930 (skip_file_command, skip_function): Adjust.
3931 (compile_skip_regexp): Delete.
3932 (skip_command): Don't compile regexp here. Adjust to use
3933 skiplist_entry::add_entry.
3934 (skip_info): Adjust to use range-for and getters.
3935 (skip_enable_command, skip_disable_command): Adjust to use
3936 range-for and setters.
3937 (skip_delete_command): Adjust to use std::list.
3938 (add_skiplist_entry): Delete.
3939 (skip_file_p): Delete, refactored as ...
3940 (skiplist_entry::do_skip_file_p): ... this new method.
3941 (skip_gfile_p): Delete, refactored as ...
3942 (skiplist_entry::do_gskip_file_p): ... this new method.
3943 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3944 (skiplist_entry::skip_function_p): ... this new method.
3945 (function_name_is_marked_for_skip): Now returns bool, and takes
3946 the function sal by const reference. Adjust to use range-for and
3947 skiplist_entry methods.
3948 (_initialize_step_skip): Remove references to
3949 skiplist_entry_chain, skiplist_entry_count.
3950 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3951 takes the function sal by const reference.
3952
3953 2017-08-11 Yao Qi <yao.qi@linaro.org>
3954
3955 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3956 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3957 (dwarf2_frame_cache):
3958 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3959 RETURN_MASK_ALL and set *this_case to NULL.
3960 * frame-unwind.h: Update comments.
3961
3962 2017-08-11 Yao Qi <yao.qi@linaro.org>
3963
3964 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3965 (dwarf2_frame_state_copy_regs): Remove.
3966 (dwarf2_frame_state_free_regs): Remove.
3967 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3968 (dwarf2_restore_rule): Call method .alloc_regs instead of
3969 dwarf2_frame_state_alloc_regs.
3970 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3971 constructor. Call std::move.
3972 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3973 (dwarf2_frame_cache): Likewise.
3974
3975 [GDB_SELF_TEST]: Include selftest.h and
3976 selftest-arch.h.
3977 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3978 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3979 execute_cfa_program_test.
3980
3981 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3982 copy ctor, assignment operator, move assignment.
3983 <alloc_regs>: New method.
3984 <swap>: New method.
3985 (struct dwarf2_frame_state): Delete dtor.
3986 (dwarf2_frame_state_alloc_regs): Remove declaration.
3987 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3988 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3989
3990 2017-08-11 Yao Qi <yao.qi@linaro.org>
3991
3992 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3993 (dwarf2_frame_state::dwarf2_frame_state): New.
3994 (dwarf2_frame_state::~dwarf2_frame_state): New.
3995 (dwarf2_fetch_cfa_info): Update.
3996 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3997 rather than a pointer. Update code.
3998 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3999 dtor.
4000 <data_align, code_align, retaddr_column>: Change them to const.
4001 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4002 to bool.
4003
4004 2017-08-11 Yao Qi <yao.qi@linaro.org>
4005
4006 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4007 <loc.exp>: New field.
4008 * dwarf2-frame.c (execute_cfa_program): Update.
4009 (dwarf2_frame_prev_register): Update.
4010
4011 2017-08-10 Pedro Alves <palves@redhat.com>
4012
4013 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4014
4015 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4016
4017 * fbsd-nat.c (struct fbsd_fork_info): Remove.
4018 (fbsd_pending_children): Use std::list.
4019 (fbsd_remember_child): Likewise.
4020 (fbsd_is_child_pending): Likewise.
4021 (fbsd_pending_vfork_done): Use std::forward_list.
4022 (fbsd_add_vfork_done): Likewise.
4023 (fbsd_is_vfork_done_pending): Likewise.
4024 (fbsd_next_vfork_done): Likewise.
4025
4026 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4027
4028 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4029 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4030 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4031 for `mapfilename'.
4032 (fbsd_xfer_partial): Use gdb::byte_vector.
4033 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4034
4035 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4036
4037 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4038 "filestuff.h".
4039 (fbsd_find_memory_regions): Fix `mapfile' initialization.
4040
4041 2017-08-09 Tom Tromey <tom@tromey.com>
4042
4043 * skip.c (skiplist_entry): New constructor.
4044 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4045 (skiplist_entry::file_is_glob): Now bool.
4046 (skiplist_entry::file, skiplist_entry::function): Now
4047 std::string.
4048 (make_skip_entry): Return a unique_ptr. Use new.
4049 (free_skiplist_entry, free_skiplist_entry_cleanup)
4050 (make_free_skiplist_entry_cleanup): Remove.
4051 (skip_command, skip_disable_command, add_skiplist_entry)
4052 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4053 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4054 (function_name_is_marked_for_skip): Update.
4055 (skip_delete_command): Update. Use delete.
4056
4057 2017-08-09 Jiong Wang <jiong.wang@arm.com>
4058
4059 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4060 (aarch64_linux_core_read_description): New function.
4061 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4062
4063 2017-08-09 Pedro Alves <palves@redhat.com>
4064
4065 * cp-name-parser.y (cp_comp_to_string): Return a
4066 gdb::unique_xmalloc_ptr<char>.
4067 * cp-support.c (replace_typedefs_qualified_name)
4068 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4069 (cp_canonicalize_string_full): Use op= instead of explicit
4070 convertion.
4071 (cp_class_name_from_physname, method_name_from_physname)
4072 (cp_func_name, cp_remove_params): Adjust to use
4073 gdb::unique_xmalloc_ptr<char>.
4074 * cp-support.h (cp_comp_to_string): Return a
4075 gdb::unique_xmalloc_ptr<char>.
4076 * python/py-type.c (typy_lookup_type): Adjust to use
4077 gdb::unique_xmalloc_ptr<char>.
4078
4079 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
4080
4081 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4082
4083 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
4084 Yao Qi <yao.qi@linaro.org>
4085
4086 * cp-support.c (cp_canonicalize_string_full): Use
4087 gdb::unique_xmalloc_ptr<char>.
4088 (cp_canonicalize_string): Likewise.
4089
4090 2017-08-09 Yao Qi <yao.qi@linaro.org>
4091
4092 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4093 * regformats/i386/amd64-avx-avx512.dat: Remove.
4094 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4095 * regformats/i386/amd64-avx-mpx.dat:Remove.
4096 * regformats/i386/amd64-avx.dat: Remove.
4097 * regformats/i386/amd64-mpx.dat: Remove.
4098 * regformats/i386/i386-avx-avx512.dat: Remove.
4099 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4100 * regformats/i386/i386-avx-mpx.dat: Remove.
4101 * regformats/i386/i386-mmx.dat: Remove.
4102 * regformats/i386/i386-mpx.dat: Remove.
4103
4104 2017-08-09 Yao Qi <yao.qi@linaro.org>
4105
4106 * amd64-tdep.h (tdesc_x32): Remove the declaration.
4107 * amd64-tdep.c: Don't include features/i386/x32*.c.
4108 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4109 functions.
4110 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4111 and i386/x32-avx-avx512.
4112 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4113 and i386/x32.xml.
4114 * features/i386/x32-avx-avx512.c: Removed.
4115 * features/i386/x32-avx-avx512.xml: Removed.
4116 * features/i386/x32-avx.c: Removed.
4117 * features/i386/x32-avx.xml: Removed.
4118 * features/i386/x32.c: Removed.
4119 * features/i386/x32.xml: Removed.
4120 * regformats/i386/x32-avx-avx512.dat: Removed.
4121 * regformats/i386/x32-avx.dat: Removed.
4122 * regformats/i386/x32.dat: Removed.
4123
4124 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4125
4126 PR breakpoints/21886
4127 * mem-break.c (default_memory_insert_breakpoint): Use
4128 `->placed_address' rather than `->reqstd_address' for the
4129 breakpoint location.
4130
4131 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4132
4133 * arch-utils.c (default_print_insn): Remove arch/mach/endian
4134 assertions.
4135
4136 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4137
4138 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4139 a union of `tdep_info', `tdesc_data' and `id'.
4140 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4141 rather than `info.tdep_info'.
4142 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4143 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4144 * i386-tdep.c (i386_gdbarch_init): Likewise.
4145 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4146 * mips-tdep.c (mips_gdbarch_init): Likewise.
4147 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4148 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4149 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4150 `info.tdep_info'.
4151 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4152 `info.tdep_info'.
4153 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4154 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4155 `info.tdep_info'.
4156 * spu-tdep.c (spu_gdbarch_init): Likewise.
4157 * gdbarch.h: Regenerate.
4158
4159 2017-08-07 Leszek Swirski <leszeks@google.com>
4160
4161 PR symtab/20899
4162 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4163
4164 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
4165
4166 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4167 (gdbsim_open): Rename gdb_argv args object to argv.
4168
4169 2017-08-05 Tom Tromey <tom@tromey.com>
4170
4171 * compile/compile-object-load.c (compile_object_load): Use
4172 gdb::unique_xmalloc_ptr.
4173 * cli/cli-dump.c (scan_filename): Rename from
4174 scan_filename_with_cleanup. Change return type.
4175 (scan_expression): Rename from scan_expression_with_cleanup.
4176 Change return type.
4177 (dump_memory_to_file, dump_value_to_file, restore_command):
4178 Use gdb::unique_xmalloc_ptr. Update.
4179 * cli/cli-cmds.c (find_and_open_script): Use
4180 gdb::unique_xmalloc_ptr.
4181 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4182 * symmisc.c (maintenance_print_symbols)
4183 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4184 * symfile.c (symfile_bfd_open, generic_load)
4185 (add_symbol_file_command, remove_symbol_file_command): Use
4186 gdb::unique_xmalloc_ptr.
4187 * source.c (openp): Use gdb::unique_xmalloc_ptr.
4188 * psymtab.c (maintenance_print_psymbols): Use
4189 gdb::unique_xmalloc_ptr.
4190 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4191 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4192 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4193 (reload_shared_libraries_1): Likewise.
4194
4195 2017-08-05 Tom Tromey <tom@tromey.com>
4196
4197 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4198 (rust_op_vector, rust_set_vector): New typedefs.
4199 (current_parser): New global.
4200 (work_obstack): Change to pointer type. Update all users.
4201 (rust_ast, pstate): Remove globals.
4202 (struct rust_parser): New.
4203 (%union) <params, field_inits>: Change type.
4204 (start, tuple_expr, unit_expr, struct_expr_list, literal)
4205 (field_expr, expr_list, maybe_expr_list, type_list): Update.
4206 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4207 (convert_params_to_types, convert_params_to_expression): Change
4208 type of "params".
4209 (ast_string): Change type of "fields".
4210 (rust_parse): Make a rust_parser. Remove cleanups.
4211 (rust_lex_tests): Make and install an auto_obstack.
4212
4213 2017-08-04 Yao Qi <yao.qi@linaro.org>
4214
4215 * configure.srv (ipa_x32_linux_regobj): New.
4216 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4217 instead of X86_TDESC_AVX512.
4218 (initialize_low_tracepoint): Call
4219 init_registers_x32_avx_avx512_linux.
4220
4221 2017-08-04 Yao Qi <yao.qi@linaro.org>
4222
4223 * utils.h (gdb_argv): Add namespace std for nullptr_t.
4224
4225 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4226
4227 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4228
4229 2017-08-03 Tom Tromey <tom@tromey.com>
4230
4231 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4232 Remove.
4233 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4234
4235 2017-08-03 Tom Tromey <tom@tromey.com>
4236
4237 * python/py-param.c (compute_enum_values): Use gdb_argv.
4238
4239 2017-08-03 Tom Tromey <tom@tromey.com>
4240
4241 * utils.h (struct gdb_argv_deleter): New.
4242 (gdb_argv): New class.
4243 * utils.c (gdb_argv::reset): New method.
4244 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4245 * tracefile.c (tsave_command): Use gdb_argv.
4246 * top.c (new_ui_command): Use gdb_argv.
4247 * symmisc.c (maintenance_print_symbols)
4248 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4249 * symfile.c (symbol_file_command, generic_load)
4250 (remove_symbol_file_command): Use gdb_argv.
4251 * stack.c (backtrace_command): Use gdb_argv.
4252 * source.c (add_path, show_substitute_path_command)
4253 (unset_substitute_path_command, set_substitute_path_command):
4254 Use gdb_argv.
4255 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4256 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4257 * remote.c (extended_remote_run, remote_put_command)
4258 (remote_get_command, remote_delete_command): Use gdb_argv.
4259 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4260 (gdbsim_open): Use gdb_argv.
4261 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4262 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4263 * procfs.c (procfs_info_proc): Use gdb_argv.
4264 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4265 * infrun.c (handle_command): Use gdb_argv.
4266 * inferior.c (add_inferior_command, clone_inferior_command):
4267 Use gdb_argv.
4268 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4269 * exec.c (exec_file_command): Use gdb_argv.
4270 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4271 * compile/compile.c (build_argc_argv): Use gdb_argv.
4272
4273 2017-08-03 Tom Tromey <tom@tromey.com>
4274
4275 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4276
4277 2017-08-03 Tom Tromey <tom@tromey.com>
4278
4279 * python/python.c (compute_python_string): Return std::string.
4280 (gdbpy_eval_from_control_command): Update.
4281 (do_start_initialization): Use std::string.
4282 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4283 xstrprintf.
4284 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4285 xstrprintf.
4286
4287 2017-08-03 Tom Tromey <tom@tromey.com>
4288
4289 * top.h (do_restore_instream_cleanup): Remove.
4290 * top.c (do_restore_instream_cleanup): Remove.
4291 (read_command_file): Use scoped_restore.
4292 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4293
4294 2017-08-03 Tom Tromey <tom@tromey.com>
4295
4296 * cli/cli-script.c (execute_user_command)
4297 (execute_control_command): Use scoped_restore.
4298
4299 2017-08-03 Tom Tromey <tom@tromey.com>
4300
4301 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4302 (execute_user_command): Remove user_call_depth; use
4303 user_args_stack's size instead.
4304
4305 2017-08-03 Tom Tromey <tom@tromey.com>
4306
4307 * top.h (in_user_command): Remove.
4308 * top.c (in_user_command): Remove.
4309 * cli/cli-script.c (do_restore_user_call_depth)
4310 (execute_user_command): Update.
4311
4312 2017-08-03 Tom Tromey <tom@tromey.com>
4313
4314 * valops.c (search_struct_method): Use gdb::byte_vector.
4315 * valarith.c (value_concat): Use std::vector.
4316 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4317 (simple_search_memory): Likewise.
4318 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4319 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4320 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4321 * elfread.c (elf_rel_plt_read): Use std::string.
4322 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4323 * cli/cli-dump.c (restore_section_callback): Use
4324 gdb::byte_vector.
4325
4326 2017-08-03 Tom Tromey <tom@tromey.com>
4327
4328 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4329
4330 2017-08-03 Tom Tromey <tom@tromey.com>
4331
4332 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4333 (tui_register_format): Use scoped_restore.
4334
4335 2017-08-03 Tom Tromey <tom@tromey.com>
4336
4337 * reverse.c (exec_direction_default): Remove.
4338 (exec_reverse_once): Use scoped_restore.
4339 * remote.c (restore_remote_timeout): Remove.
4340 (remote_flash_erase, remote_flash_write, remote_flash_done)
4341 (readchar, remote_serial_write): Use scoped_restore.
4342 * cli/cli-script.c (struct source_cleanup_lines_args)
4343 (source_cleanup_lines): Remove.
4344 (script_from_file): Use scoped_restore.
4345 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4346 (source_command): Use scoped_restore.
4347
4348 2017-08-03 Tom Tromey <tom@tromey.com>
4349
4350 * utils.h (make_cleanup_free_so): Remove.
4351 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4352 * solist.h (struct so_deleter): New.
4353 (so_list_up): New typedef.
4354 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4355
4356 2017-08-03 Tom Tromey <tom@tromey.com>
4357
4358 * utils.h (make_cleanup_restore_current_language): Remove.
4359 * utils.c (do_restore_current_language)
4360 (make_cleanup_restore_current_language): Remove.
4361 * parse.c (parse_exp_in_context_1)
4362 (parse_expression_with_language): Use
4363 scoped_restore_current_language.
4364 * mi/mi-main.c (mi_cmd_execute): Use
4365 scoped_restore_current_language.
4366 * language.h (scoped_restore_current_language): New class.
4367
4368 2017-08-03 Tom Tromey <tom@tromey.com>
4369
4370 * compile/compile.c (cleanup_unlink_file): Remove.
4371 (compile_to_object): Use gdb::unlinker.
4372 (eval_compile_command): Likewise.
4373
4374 2017-08-03 Tom Tromey <tom@tromey.com>
4375
4376 * utils.h (make_cleanup_fclose): Remove.
4377 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4378
4379 2017-08-03 Tom Tromey <tom@tromey.com>
4380
4381 * top.c (open_terminal_stream): Return gdb_file_up.
4382 (new_ui_command): Update.
4383
4384 2017-08-03 Tom Tromey <tom@tromey.com>
4385
4386 * source.c (print_source_lines_base, forward_search_command)
4387 (reverse_search_command): Use gdb_file_up.
4388
4389 2017-08-03 Tom Tromey <tom@tromey.com>
4390
4391 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4392
4393 2017-08-03 Tom Tromey <tom@tromey.com>
4394
4395 * cli/cli-cmds.c (find_and_open_script): Change return type.
4396 Remove "streamp" and "full_path" parameters.
4397 (source_script_with_search): Update.
4398 * auto-load.c (source_script_file): Update.
4399 * cli/cli-cmds.h (find_and_open_script): Change type.
4400 (open_script): New struct.
4401
4402 2017-08-03 Tom Tromey <tom@tromey.com>
4403
4404 * xml-support.c (xml_fetch_content_from_file): Update.
4405 * ui-file.c (stdio_file::open): Update.
4406 * tracefile-tfile.c (tfile_start): Update.
4407 * remote.c (remote_file_put, remote_file_get): Update.
4408 * nat/linux-procfs.c (linux_proc_get_int)
4409 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4410 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4411 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4412 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4413 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4414 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4415 * linux-nat.c (linux_proc_pending_signals): Update.
4416 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4417 (file_closer): Remove.
4418 * compile/compile.c (compile_to_object): Update.
4419 * common/filestuff.h (struct gdb_file_deleter): New.
4420 (gdb_file_up): New typedef.
4421 (gdb_fopen_cloexec): Change return type.
4422 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4423 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4424 (dump_binary_file, restore_binary_file): Update.
4425 * auto-load.c (auto_load_objfile_script_1): Update.
4426
4427 2017-08-03 Tom Tromey <tom@tromey.com>
4428
4429 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4430 (info_static_tracepoint_markers_command): Likewise.
4431 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4432 * skip.c (skip_info): Use ui_out_emit_table.
4433 * progspace.c (print_program_space): Use ui_out_emit_table.
4434 * osdata.c (info_osdata): Use ui_out_emit_table.
4435 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4436 ui_out_emit_table.
4437 * linux-thread-db.c (info_auto_load_libthread_db): Use
4438 ui_out_emit_table.
4439 * inferior.c (print_inferior): Use ui_out_emit_table.
4440 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4441 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4442 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4443 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4444 * ui-out.h (class ui_out_emit_table): New.
4445
4446 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4447
4448 * mips-tdep.c (mips_fpu_type_str): New function.
4449 (mips_dump_tdep): Call it.
4450
4451 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4452
4453 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4454 `->mips_fpu_type'.
4455
4456 2017-07-31 Xavier Roirand <roirand@adacore.com>
4457
4458 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4459
4460 2017-07-27 Xavier Roirand <roirand@adacore.com>
4461
4462 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4463
4464 2017-07-26 Yao Qi <yao.qi@linaro.org>
4465
4466 * cli/cli-cmds.c (maintenancechecklist): New variable.
4467 * gdbcmd.h (maintenancechecklist): Declare it.
4468 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4469 Call i386_linux_read_description with different masks.
4470 * maint.c (maintenance_check_command): New function.
4471 (_initialize_maint_cmds): Call add_prefix_cmd.
4472 * target-descriptions.c (tdesc_reg): override operator != and ==.
4473 (tdesc_type): Likewise.
4474 (tdesc_feature): Likewise.
4475 (target_desc): Likewise.
4476 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4477 (maintenance_check_xml_descriptions): New function.
4478 (_initialize_target_descriptions) Add command "xml-descriptions".
4479 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4480
4481 2017-07-26 Yao Qi <yao.qi@linaro.org>
4482
4483 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4484 Include features/i386/32bit-*.c.
4485 (i386_linux_read_description): Generate target description if it
4486 doesn't exist.
4487 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4488 functions.
4489 * features/i386/32bit-linux.c: Re-generated.
4490 * features/i386/32bit-sse.c: Likewise.
4491 * target-descriptions.c (print_c_feature::visit): Print code to
4492 set register number if needed.
4493 (print_c_feature) <m_next_regnum>: New field.
4494
4495 2017-07-26 Yao Qi <yao.qi@linaro.org>
4496
4497 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4498 (FEATURE_XMLFILES): New.
4499 (FEATURE_CFILES): New.
4500 New rules.
4501 (clean-cfiles): Remove generated c files.
4502 * features/i386/32bit-avx.c: Generated.
4503 * features/i386/32bit-avx512.c: Generated.
4504 * features/i386/32bit-core.c: Generated.
4505 * features/i386/32bit-linux.c: Generated.
4506 * features/i386/32bit-mpx.c: Generated.
4507 * features/i386/32bit-pkeys.c: Generated.
4508 * features/i386/32bit-sse.c: Generated.
4509 * target-descriptions.c: Include algorithm.
4510 (tdesc_element_visitor): Add method visit_end.
4511 (print_c_tdesc): Implement visit_end.
4512 (print_c_tdesc:: m_filename_after_features): Move it to
4513 protected.
4514 (print_c_feature): New class.
4515 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4516 name starts with "i386/32bit-".
4517
4518 2017-07-26 Yao Qi <yao.qi@linaro.org>
4519
4520 * target-descriptions.c (tdesc_element_visitor): New class.
4521 (tdesc_element): New class.
4522 (tdesc_reg): Inherit from tdesc_element.
4523 (tdesc_reg::accept): New function.
4524 (tdesc_type): Inherit from tdesc_element.
4525 (tdesc_type::accept): New function.
4526 (tdesc_feature): Inherit from tdesc_element.
4527 (tdesc_feature::accept): New function.
4528 (target_desc): Inherit from tdesc_element.
4529 (target_desc::target_desc): New.
4530 (target_desc::~target_desc): New.
4531 (target_desc::accept): New.
4532 (allocate_target_description): Use new.
4533 (free_target_description): Use delete.
4534 (print_c_tdesc): New class.
4535 (maint_print_c_tdesc_cmd): Adjust.
4536
4537 * features/aarch64.c: Re-generated.
4538 * features/arc-arcompact.c: Re-generated.
4539 * features/arc-v2.c: Re-generated.
4540 * features/arm/arm-with-iwmmxt.c: Re-generated.
4541 * features/arm/arm-with-m.c: Re-generated.
4542 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4543 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4544 * features/arm/arm-with-neon.c: Re-generated.
4545 * features/arm/arm-with-vfpv2.c: Re-generated.
4546 * features/arm/arm-with-vfpv3.c: Re-generated.
4547 * features/i386/amd64-avx-avx512.c: Re-generated.
4548 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4549 * features/i386/amd64-avx.c: Re-generated.
4550 * features/i386/amd64-avx-linux.c: Re-generated.
4551 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4552 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4553 * features/i386/amd64-avx-mpx.c: Re-generated.
4554 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4555 * features/i386/amd64.c: Re-generated.
4556 * features/i386/amd64-linux.c: Re-generated.
4557 * features/i386/amd64-mpx.c: Re-generated.
4558 * features/i386/amd64-mpx-linux.c: Re-generated.
4559 * features/i386/i386-avx-avx512.c: Re-generated.
4560 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4561 * features/i386/i386-avx.c: Re-generated.
4562 * features/i386/i386-avx-linux.c: Re-generated.
4563 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4564 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4565 * features/i386/i386-avx-mpx.c: Re-generated.
4566 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4567 * features/i386/i386.c: Re-generated.
4568 * features/i386/i386-linux.c: Re-generated.
4569 * features/i386/i386-mmx.c: Re-generated.
4570 * features/i386/i386-mmx-linux.c: Re-generated.
4571 * features/i386/i386-mpx.c: Re-generated.
4572 * features/i386/i386-mpx-linux.c: Re-generated.
4573 * features/i386/x32-avx-avx512.c: Re-generated.
4574 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4575 * features/i386/x32-avx.c: Re-generated.
4576 * features/i386/x32-avx-linux.c: Re-generated.
4577 * features/i386/x32.c: Re-generated.
4578 * features/i386/x32-linux.c: Re-generated.
4579 * features/microblaze.c: Re-generated.
4580 * features/microblaze-with-stack-protect.c: Re-generated.
4581 * features/mips64-dsp-linux.c: Re-generated.
4582 * features/mips64-linux.c: Re-generated.
4583 * features/mips-dsp-linux.c: Re-generated.
4584 * features/mips-linux.c: Re-generated.
4585 * features/nds32.c: Re-generated.
4586 * features/nios2.c: Re-generated.
4587 * features/nios2-linux.c: Re-generated.
4588 * features/rs6000/powerpc-32.c: Re-generated.
4589 * features/rs6000/powerpc-32l.c: Re-generated.
4590 * features/rs6000/powerpc-403.c: Re-generated.
4591 * features/rs6000/powerpc-403gc.c : Re-generated.
4592 * features/rs6000/powerpc-405.c: Re-generated.
4593 * features/rs6000/powerpc-505.c: Re-generated.
4594 * features/rs6000/powerpc-601.c: Re-generated.
4595 * features/rs6000/powerpc-602.c: Re-generated.
4596 * features/rs6000/powerpc-603.c: Re-generated.
4597 * features/rs6000/powerpc-604.c: Re-generated.
4598 * features/rs6000/powerpc-64.c: Re-generated.
4599 * features/rs6000/powerpc-64l.c: Re-generated.
4600 * features/rs6000/powerpc-7400.c: Re-generated.
4601 * features/rs6000/powerpc-750.c: Re-generated.
4602 * features/rs6000/powerpc-860.c: Re-generated.
4603 * features/rs6000/powerpc-altivec32.c: Re-generated.
4604 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4605 * features/rs6000/powerpc-altivec64.c: Re-generated.
4606 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4607 * features/rs6000/powerpc-cell32l.c: Re-generated.
4608 * features/rs6000/powerpc-cell64l.c: Re-generated.
4609 * features/rs6000/powerpc-e500.c: Re-generated.
4610 * features/rs6000/powerpc-e500l.c: Re-generated.
4611 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4612 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4613 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4614 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4615 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4616 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4617 * features/rs6000/powerpc-vsx32.c: Re-generated.
4618 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4619 * features/rs6000/powerpc-vsx64.c: Re-generated.
4620 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4621 * features/rs6000/rs6000.c: Re-generated.
4622 * features/s390-linux32.c: Re-generated.
4623 * features/s390-linux32v1.c: Re-generated.
4624 * features/s390-linux32v2.c: Re-generated.
4625 * features/s390-linux64.c: Re-generated.
4626 * features/s390-linux64v1.c: Re-generated.
4627 * features/s390-linux64v2.c: Re-generated.
4628 * features/s390-te-linux64.c: Re-generated.
4629 * features/s390-tevx-linux64.c: Re-generated.
4630 * features/s390-vx-linux64.c: Re-generated.
4631 * features/s390x-linux64.c: Re-generated.
4632 * features/s390x-linux64v1.c: Re-generated.
4633 * features/s390x-linux64v2.c: Re-generated.
4634 * features/s390x-te-linux64.c: Re-generated.
4635 * features/s390x-tevx-linux64.c: Re-generated.
4636 * features/s390x-vx-linux64.c: Re-generated.
4637 * features/sparc/sparc32-solaris.c: Re-generated.
4638 * features/sparc/sparc64-solaris.c: Re-generated.
4639 * features/tic6x-c62x.c: Re-generated.
4640 * features/tic6x-c62x-linux.c: Re-generated.
4641 * features/tic6x-c64x.c: Re-generated.
4642 * features/tic6x-c64x-linux.c: Re-generated.
4643 * features/tic6x-c64xp.c: Re-generated.
4644 * features/tic6x-c64xp-linux.c: Re-generated.
4645
4646 2017-07-26 Yao Qi <yao.qi@linaro.org>
4647
4648 * i386-linux-tdep.c (i386_linux_read_description): New function.
4649 (i386_linux_core_read_description): Call
4650 i386_linux_read_description.
4651 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4652 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4653 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4654 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4655 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4656 * x86-linux-nat.c (x86_linux_read_description): Call
4657 i386_linux_read_description.
4658
4659 2017-07-26 Yao Qi <yao.qi@linaro.org>
4660
4661 * NEWS: Mention it.
4662 * features/Makefile (%.c: %.xml): Pass the xml file name to
4663 command "maint print c-tdesc".
4664 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4665 name from 'arg'.
4666
4667 2017-07-26 Yao Qi <yao.qi@linaro.org>
4668
4669 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4670 in-class initialization.
4671 (tdesc_create_feature): Call new instead of XCNEW.
4672 (free_target_description): Ue delete.
4673
4674 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4675
4676 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4677
4678 2017-07-25 Yao Qi <yao.qi@linaro.org>
4679
4680 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4681 constant.
4682 (amd64_x32_init_abi): Likewise.
4683 * amd64-tdep.h (amd64_init_abi): Update declaration.
4684 (amd64_x32_init_abi): Likewise.
4685
4686 2017-07-25 Yao Qi <yao.qi@linaro.org>
4687
4688 PR tdep/21717
4689 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4690 condition for FPSCR.
4691 (arm_linux_store_inferior_registers): Likewise.
4692
4693 2017-07-22 Tom Tromey <tom@tromey.com>
4694
4695 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4696 <syscalls_counts>: Now a std::vector.
4697 (get_catch_syscall_inferior_data): Use "new".
4698 (catch_syscall_inferior_data_cleanup): Use "delete".
4699 (insert_catch_syscall, remove_catch_syscall)
4700 (clear_syscall_counts): Update.
4701
4702 2017-07-22 Tom Tromey <tom@tromey.com>
4703
4704 * break-catch-syscall.c (syscall_catchpoint)
4705 <syscalls_to_be_caught>: Now a std::vector<int>
4706 (~syscall_catchpoint): Remove.
4707 (insert_catch_syscall, remove_catch_syscall)
4708 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4709 (print_mention_catch_syscall, print_recreate_catch_syscall):
4710 Update.
4711 (create_syscall_event_catchpoint): Change type of "filter"
4712 parameter.
4713 (catch_syscall_split_args): Return a std::vector.
4714 (catch_syscall_command_1, catching_syscall_number_1): Update.
4715
4716 2017-07-22 Tom Tromey <tom@tromey.com>
4717
4718 * break-catch-throw.c (struct exception_catchpoint)
4719 <exception_rx>: Now a std::string.
4720 (~exception_catchpoint): Remove.
4721 (print_one_detail_exception_catchpoint): Update.
4722 (handle_gnu_v3_exceptions): Change type of except_rx.
4723 (extract_exception_regexp): Return a std::string.
4724 (catch_exception_command_1): Update.
4725
4726 2017-07-22 Tom Tromey <tom@tromey.com>
4727
4728 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4729 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4730 std::vector.
4731 <catch_all>: Now a bool.
4732 (~signal_catchpoint): Remove.
4733 (signal_catchpoint_insert_location)
4734 (signal_catchpoint_remove_location)
4735 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4736 (signal_catchpoint_print_mention)
4737 (signal_catchpoint_print_recreate)
4738 (signal_catchpoint_explains_signal): Update.
4739 (create_signal_catchpoint): Change type of "filter" and
4740 "catch_all".
4741 (catch_signal_split_args): Return a std::vector. Change type of
4742 "catch_all".
4743 (catch_signal_command): Update.
4744
4745 2017-07-20 Pedro Alves <palves@redhat.com>
4746
4747 * ada-lang.c (ada_language_defn): Make extern.
4748 (_initialize_ada_language): Remove add_language call.
4749 * c-lang.c (c_language_defn, cplus_language_defn)
4750 (asm_language_defn, minimal_language_defn): Make extern.
4751 (_initialize_c_language): Delete.
4752 * completer.c (compare_cstrings): Delete, moved to utils.h.
4753 * d-lang.c (d_language_defn): Make extern.
4754 (_initialize_d_language): Remove add_language calls.
4755 * defs.h (enum language): Add comment.
4756 * f-lang.c (f_language_defn): Make extern.
4757 (_initialize_f_language): Remove add_language call.
4758 * go-lang.c (go_language_defn): Make extern.
4759 (_initialize_go_language): Remove add_language call.
4760 * language.c: Include <algorithm>.
4761 (languages): Redefine as const array.
4762 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4763 (set_language_command): Handle "local". Use for-range loop.
4764 (set_language): Remove loop.
4765 (language_enum): Rewrite.
4766 (language_def, language_str): Remove loops.
4767 (add_language): Delete.
4768 (add_set_language_command): New, based on add_languages.
4769 (skip_language_trampoline): Adjust.
4770 (local_language_defn): Delete.
4771 (language_gdbarch_post_init): Adjust.
4772 (_initialize_language): Remove add_language calls. Call
4773 add_set_language_command.
4774 * language.h (add_language): Delete.
4775 (auto_language_defn)
4776 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4777 (asm_language_defn, c_language_defn, cplus_language_defn)
4778 (d_language_defn, f_language_defn, go_language_defn)
4779 (m2_language_defn, objc_language_defn, opencl_language_defn)
4780 (pascal_language_defn, rust_language_defn): Declare.
4781 * m2-lang.c (m2_language_defn): Make extern.
4782 (_initialize_m2_language): Remove add_language call.
4783 * objc-lang.c (objc_language_defn): Make extern.
4784 (_initialize_objc_language): Remove add_language call.
4785 * opencl-lang.c (opencl_language_defn): Make extern.
4786 (_initialize_opencl_language): Remove add_language call.
4787 * p-lang.c (pascal_language_defn): Make extern.
4788 (_initialize_pascal_language): Delete.
4789 * rust-lang.c (rust_language_defn): Make extern.
4790 (_initialize_rust_language): Delete.
4791 * utils.h (compare_cstrings): New static inline function.
4792
4793 2017-07-20 Pedro Alves <palves@redhat.com>
4794
4795 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4796 (get_var_value): Constify parameters.
4797 (get_int_var_value): Change prototype.
4798 (to_fixed_range_type): Adjust.
4799 * ada-lang.h (get_int_var_value): Change prototype.
4800
4801 2017-07-20 Pedro Alves <palves@redhat.com>
4802
4803 * dwarf2read.c (dw2_lookup_symbol): Use
4804 SYMBOL_MATCHES_SEARCH_NAME.
4805 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4806
4807 2017-07-20 Pedro Alves <palves@redhat.com>
4808
4809 * block.c (block_iter_name_step, block_iter_name_first)
4810 (block_iter_name_next): Delete.
4811 (block_lookup_symbol_primary): Adjust to use
4812 dict_iter_match_first/dict_iter_match_next.
4813 * block.h (block_iter_name_first, block_iter_name_next): Delete
4814 declarations.
4815 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4816 dict_iter_match_first/dict_iter_match_next.
4817
4818 2017-07-20 Pedro Alves <palves@redhat.com>
4819
4820 * cp-support.c (cp_find_first_component_aux): Add missing case for
4821 end of string.
4822
4823 2017-07-18 David Blaikie <dblaikie@gmail.com>
4824
4825 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4826 of dwo_cu's dwo_file.
4827
4828 2017-07-18 Yao Qi <yao.qi@linaro.org>
4829
4830 * remote.c (store_registers_using_G): Remove one line comment.
4831
4832 2017-07-18 Yao Qi <yao.qi@linaro.org>
4833
4834 * regcache.c (regcache_cpy): Simplify it.
4835 (regcache::cpy_no_passthrough): Remove it.
4836 * regcache.h (cpy_no_passthrough): Remove it.
4837 (regcache_dup, regcache_cpy): Update comments.
4838
4839 2017-07-18 Pedro Alves <palves@redhat.com>
4840
4841 * remote-sim.c (sim_command_completer): Adjust to work with a
4842 completion_tracker instead of a VEC.
4843
4844 2017-07-17 Pedro Alves <palves@redhat.com>
4845
4846 * completer.c (complete_source_filenames): New function.
4847 (complete_address_and_linespec_locations): New function.
4848 (location_completer): Use complete_address_and_linespec_locations.
4849 (completion_tracker::build_completion_result): Honor the tracker's
4850 request to suppress append.
4851 * completer.h (completion_tracker::suppress_append_ws)
4852 (completion_tracker::set_suppress_append_ws): New methods.
4853 (completion_tracker::m_suppress_append_ws): New field.
4854 (complete_source_filenames): New declaration.
4855 * linespec.c (linespec_complete_what): New.
4856 (struct ls_parser) <complete_what, completion_word,
4857 completion_quote_char, completion_quote_end, completion_tracker>:
4858 New fields.
4859 (string_find_incomplete_keyword_at_end): New.
4860 (linespec_lexer_lex_string): Record quote char. If in completion
4861 mode, don't throw.
4862 (linespec_lexer_consume_token): Advance the completion word point.
4863 (linespec_lexer_peek_token): Save/restore completion info.
4864 (save_stream_and_consume_token): New.
4865 (set_completion_after_number): New.
4866 (linespec_parse_basic): Set what to complete next depending on
4867 token. Handle function and label completions specially.
4868 (parse_linespec): Disable objc shortcut in completion mode. Set
4869 what to complete next depending on token type. Skip keyword if in
4870 completion mode.
4871 (complete_linespec_component, linespec_complete): New.
4872 * linespec.h (linespec_complete): Declare.
4873
4874 2017-07-17 Pedro Alves <palves@redhat.com>
4875
4876 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4877 Handle 'operator<' / 'operator<<'.
4878
4879 2017-07-17 Pedro Alves <palves@redhat.com>
4880
4881 * completer.c (collect_explicit_location_matches): Handle
4882 MATCH_LABEL.
4883 (convert_explicit_location_to_linespec): New, factored out from
4884 ...
4885 (convert_explicit_location_to_sals): ... this.
4886 (complete_label): New.
4887 (linespec_complete_label, find_label_symbols_in_block): New.
4888 (find_label_symbols): Add completion_mode parameter and adjust to
4889 call find_label_symbols_in_block.
4890 * linespec.h (linespec_complete_label): Declare.
4891
4892 2017-07-17 Pedro Alves <palves@redhat.com>
4893
4894 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4895 complete_symbol_mode parameter.
4896 * cli/cli-cmds.c (complete_command): Get the completion result out
4897 of the handle_brkchars tracker if used a custom word point.
4898 * completer.c: Include "linespec.h".
4899 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4900 (advance_to_expression_complete_word_point): New.
4901 (completion_tracker::completes_to_completion_word): New.
4902 (complete_files_symbols): Pass down
4903 complete_symbol_mode::EXPRESSION.
4904 (explicit_options, probe_options): New.
4905 (collect_explicit_location_matches): Complete on the
4906 explictit_loc->foo instead of word. Use
4907 linespec_complete_function. Handle MATCH_LINE. Handle offering
4908 keyword and options completions.
4909 (backup_text_ptr): Delete.
4910 (skip_keyword): New.
4911 (complete_explicit_location): Remove 'word' parameter. Add
4912 language, quoted_arg_start and quoted_arg_end parameters.
4913 Rewrite, parsing left to right.
4914 (location_completer): Rewrite.
4915 (location_completer_handle_brkchars): New function.
4916 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4917 (enum complete_line_internal_reason): Adjust comments.
4918 (completion_tracker::discard_completions): New.
4919 (completer_handle_brkchars_func_for_completer): Handle
4920 location_completer.
4921 (gdb_custom_word_point_brkchars)
4922 (gdb_org_rl_basic_quote_characters): New.
4923 (gdb_completion_word_break_characters_throw)
4924 (completion_find_completion_word): Handle trackers that use a
4925 custom word point.
4926 (completion_tracker::advance_custom_word_point_by): New.
4927 (completion_tracker::build_completion_result): Don't rely on
4928 readline appending the quote char.
4929 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4930 use a custom word point.
4931 (gdb_rl_attempted_completion_function): Restore
4932 rl_basic_quote_characters.
4933 * completer.h (class completion_tracker): Extend intro comment.
4934 (completion_tracker::set_quote_char)
4935 (completion_tracker::quote_char)
4936 (completion_tracker::set_use_custom_word_point)
4937 (completion_tracker::use_custom_word_point)
4938 (completion_tracker::custom_word_point)
4939 (completion_tracker::set_custom_word_point)
4940 (completion_tracker::advance_custom_word_point_by)
4941 (completion_tracker::completes_to_completion_word)
4942 (completion_tracker::discard_completions): New methods.
4943 (completion_tracker::m_quote_char)
4944 (completion_tracker::m_use_custom_word_point)
4945 (completion_tracker::m_custom_word_point): New fields.
4946 (advance_to_expression_complete_word_point): Declare.
4947 * f-lang.c (f_collect_symbol_completion_matches): Add
4948 complete_symbol_mode parameter.
4949 * language.h (struct language_defn)
4950 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4951 parameter.
4952 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4953 (linespec_complete_function): New function.
4954 (linespec_lexer_lex_keyword): Adjust.
4955 * linespec.h (linespec_keywords, linespec_complete_function): New
4956 declarations.
4957 * location.c (find_end_quote): New function.
4958 (explicit_location_lex_one): Add explicit_completion_info
4959 parameter. Save quoting info. Don't throw if being called for
4960 completion. Don't handle Ada operators here.
4961 (is_cp_operator, skip_op_false_positives, first_of)
4962 (explicit_location_lex_one_function): New function.
4963 (string_to_explicit_location): Replace 'dont_throw' parameter with
4964 an explicit_completion_info pointer parameter. Handle it. Don't
4965 use explicit_location_lex_one to lex function names. Use
4966 explicit_location_lex_one_function instead.
4967 * location.h (struct explicit_completion_info): New.
4968 (string_to_explicit_location): Replace 'dont_throw' parameter with
4969 an explicit_completion_info pointer parameter.
4970 * symtab.c (default_collect_symbol_completion_matches_break_on):
4971 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4972 (default_collect_symbol_completion_matches)
4973 (collect_symbol_completion_matches): Add complete_symbol_mode
4974 parameter.
4975 (collect_symbol_completion_matches_type): Pass down
4976 complete_symbol_mode::EXPRESSION.
4977 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4978 parameter. Handle LINESPEC mode.
4979 * symtab.h (complete_symbol_mode): New.
4980 (default_collect_symbol_completion_matches_break_on)
4981 (default_collect_symbol_completion_matches)
4982 (collect_symbol_completion_matches)
4983 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4984 parameter.
4985
4986 2017-07-17 Pedro Alves <palves@redhat.com>
4987
4988 * utils.c (enum class strncmp_iw_mode): New.
4989 (strcmp_iw): Rename to ...
4990 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4991 parameters. Handle them.
4992 (strncmp_iw): New.
4993 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4994 * utils.h (strncmp_iw): Declare.
4995 (strcmp_iw): Move describing comments here.
4996
4997 2017-07-17 Pedro Alves <palves@redhat.com>
4998
4999 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5000 CP_OPERATOR_STR.
5001 * c-typeprint.c (is_type_conversion_operator): Use
5002 CP_OPERATOR_STR.
5003 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5004 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5005 CP_OPERATOR_LEN.
5006 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5007 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5008 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5009 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5010 CP_OPERATOR_STR.
5011 * location.c: Include "cp-support.h".
5012 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5013 CP_OPERATOR_STR.
5014 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5015 CP_OPERATOR_LEN.
5016
5017 2017-07-17 Pedro Alves <palves@redhat.com>
5018
5019 * cli/cli-cmds.c (complete_command): Use a completion tracker
5020 along with completion_find_completion_word for handle_brkchars
5021 phase.
5022 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5023 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5024 (struct gdb_rl_completion_word_info): New.
5025 (gdb_rl_find_completion_word): New.
5026 (completion_find_completion_word): New.
5027 * completer.h (completion_find_completion_word): Declare.
5028
5029 2017-07-17 Pedro Alves <palves@redhat.com>
5030
5031 * ada-lang.c (symbol_completion_match): Adjust comments.
5032 (symbol_completion_add): Replace vector parameter with
5033 completion_tracker parameter. Use it.
5034 (ada_make_symbol_completion_list): Rename to...
5035 (ada_collect_symbol_completion_matches): ... this. Add
5036 completion_tracker parameter and use it.
5037 (ada_language_defn): Adjust.
5038 * break-catch-syscall.c (catch_syscall_completer): Adjust
5039 prototype and work with completion_tracker instead of VEC.
5040 * breakpoint.c (condition_completer): Adjust prototype and work
5041 with completion_tracker instead of VEC.
5042 * c-lang.c (c_language_defn, cplus_language_defn)
5043 (asm_language_defn, minimal_language_defn): Adjust to renames.
5044 * cli/cli-cmds.c (complete_command): Rework using
5045 completion_tracker. Catch exceptions when completing.
5046 * cli/cli-decode.c (integer_unlimited_completer)
5047 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5048 with completion_tracker instead of VEC.
5049 * command.h (struct completion_tracker): Forward declare.
5050 (completer_ftype, completer_handle_brkchars_ftype): Change
5051 types.
5052 (complete_on_cmdlist, complete_on_enum): Adjust.
5053 * completer.c: Include <algorithm>.
5054 (struct gdb_completer_state): New.
5055 (current_completion): New global.
5056 (readline_line_completion_function): Delete.
5057 (noop_completer, filename_completer)
5058 (filename_completer_handle_brkchars, complete_files_symbols)
5059 (linespec_location_completer): Adjust to work with a
5060 completion_tracker instead of a VEC.
5061 (string_or_empty): New.
5062 (collect_explicit_location_matches): Adjust to work with a
5063 completion_tracker instead of a VEC.
5064 (explicit_location_completer): Rename to ...
5065 (complete_explicit_location): ... this and adjust to work with a
5066 completion_tracker instead of a VEC.
5067 (location_completer): Adjust to work with a completion_tracker
5068 instead of a VEC.
5069 (add_struct_fields): Adjust to work with a completion_list instead
5070 of VEC.
5071 (expression_completer): Rename to ...
5072 (complete_expression): ... this and adjust to work with a
5073 completion_tracker instead of a VEC. Use complete_files_symbols.
5074 (expression_completer): Reimplement on top of complete_expression.
5075 (symbol_completer): Adjust to work with a completion_tracker
5076 instead of a VEC.
5077 (enum complete_line_internal_reason): Add describing comments.
5078 (complete_line_internal_normal_command): Adjust to work with a
5079 completion_tracker instead of a VEC.
5080 (complete_line_internal): Rename to ...
5081 (complete_line_internal_1): ... this and adjust to work with a
5082 completion_tracker instead of a VEC. Assert TEXT is NULL in the
5083 handle_brkchars phase.
5084 (new_completion_tracker): Delete.
5085 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5086 complete_line_internal_1.
5087 (free_completion_tracker): Delete.
5088 (INITIAL_COMPLETION_HTAB_SIZE): New.
5089 (completion_tracker::completion_tracker)
5090 (completion_tracker::~completion_tracker): New.
5091 (maybe_add_completion): Delete.
5092 (completion_tracker::maybe_add_completion)
5093 (completion_tracker::add_completion)
5094 (completion_tracker::add_completions): New.
5095 (throw_max_completions_reached_error): Delete.
5096 (complete_line): Adjust to work with a completion_tracker instead
5097 of a VEC. Don't create a completion_tracker_t or check for max
5098 completions here.
5099 (command_completer, command_completer_handle_brkchars)
5100 (signal_completer, reg_or_group_completer_1)
5101 (reg_or_group_completer, default_completer_handle_brkchars):
5102 Adjust to work with a completion_tracker.
5103 (gdb_completion_word_break_characters_throw): New.
5104 (gdb_completion_word_break_characters): Reimplement.
5105 (line_completion_function): Delete.
5106 (completion_tracker::recompute_lowest_common_denominator)
5107 (expand_preserving_ws)
5108 (completion_tracker::build_completion_result)
5109 (completion_result::completion_result)
5110 (completion_result::completion_result)
5111 (completion_result::~completion_result)
5112 (completion_result::completion_result)
5113 (completion_result::release_match_list, compare_cstrings)
5114 (completion_result::sort_match_list)
5115 (completion_result::reset_match_list)
5116 (gdb_rl_attempted_completion_function_throw)
5117 (gdb_rl_attempted_completion_function): New.
5118 * completer.h (completion_list, struct completion_result)
5119 (class completion_tracker): New.
5120 (complete_line): Add completion_tracker parameter.
5121 (readline_line_completion_function): Delete.
5122 (gdb_rl_attempted_completion_function): New.
5123 (noop_completer, filename_completer, expression_completer)
5124 (location_completer, symbol_completer, command_completer)
5125 (signal_completer, reg_or_group_completer): Update prototypes.
5126 (completion_tracker_t, new_completion_tracker)
5127 (make_cleanup_free_completion_tracker): Delete.
5128 (enum maybe_add_completion_enum): Delete.
5129 (maybe_add_completion): Delete.
5130 (throw_max_completions_reached_error): Delete.
5131 * corefile.c (complete_set_gnutarget): Adjust to work with a
5132 completion_tracker instead of a VEC.
5133 * cp-abi.c (cp_abi_completer): Adjust to work with a
5134 completion_tracker instead of a VEC.
5135 * d-lang.c (d_language_defn): Adjust.
5136 * disasm.c (disassembler_options_completer): Adjust to work with a
5137 completion_tracker instead of a VEC.
5138 * f-lang.c (f_make_symbol_completion_list): Rename to ...
5139 (f_collect_symbol_completion_matches): ... this. Adjust to work
5140 with a completion_tracker instead of a VEC.
5141 (f_language_defn): Adjust.
5142 * go-lang.c (go_language_defn): Adjust.
5143 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5144 Adjust to work with a completion_tracker instead of a VEC.
5145 * infrun.c (handle_completer): Likewise.
5146 * interps.c (interpreter_completer): Likewise.
5147 * interps.h (interpreter_completer): Likewise.
5148 * language.c (unknown_language_defn, auto_language_defn)
5149 (local_language_defn): Adjust.
5150 * language.h (language_defn::la_make_symbol_completion_list):
5151 Rename to ...
5152 (language_defn::la_collect_symbol_completion_matches): ... this
5153 and adjust to work with a completion_tracker instead of a VEC.
5154 * m2-lang.c (m2_language_defn): Adjust.
5155 * objc-lang.c (objc_language_defn): Adjust.
5156 * opencl-lang.c (opencl_language_defn): Adjust.
5157 * p-lang.c (pascal_language_defn): Adjust.
5158 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5159 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5160 with a completion_tracker.
5161 * rust-lang.c (rust_language_defn): Adjust.
5162 * symtab.c (free_completion_list, do_free_completion_list)
5163 (return_val, completion_tracker): Delete.
5164 (completion_list_add_name, completion_list_add_symbol)
5165 (completion_list_add_msymbol, completion_list_objc_symbol)
5166 (completion_list_add_fields, add_symtab_completions): Add
5167 completion_tracker parameter and use it.
5168 (default_make_symbol_completion_list_break_on_1): Rename to...
5169 (default_collect_symbol_completion_matches_break_on): ... this.
5170 Add completion_tracker parameter and use it instead of allocating
5171 a completion tracker here.
5172 (default_make_symbol_completion_list_break_on): Delete old
5173 implementation.
5174 (default_make_symbol_completion_list): Delete.
5175 (default_collect_symbol_completion_matches): New.
5176 (make_symbol_completion_list): Delete.
5177 (collect_symbol_completion_matches): New.
5178 (make_symbol_completion_type): Rename to ...
5179 (collect_symbol_completion_matches_type): ... this. Add
5180 completion_tracker parameter and use it instead of VEC.
5181 (make_file_symbol_completion_list_1): Rename to...
5182 (collect_file_symbol_completion_matches): ... this. Add
5183 completion_tracker parameter and use it instead of VEC.
5184 (make_file_symbol_completion_list): Delete.
5185 (add_filename_to_list): Use completion_list instead of a VEC.
5186 (add_partial_filename_data::list): Now a completion_list.
5187 (make_source_files_completion_list): Work with a completion_list
5188 instead of a VEC.
5189 * symtab.h: Include "completer.h".
5190 (default_make_symbol_completion_list_break_on)
5191 (default_make_symbol_completion_list, make_symbol_completion_list)
5192 (make_symbol_completion_type, make_file_symbol_completion_list)
5193 (make_source_files_completion_list): Delete.
5194 (default_collect_symbol_completion_matches_break_on)
5195 (default_collect_symbol_completion_matches)
5196 (collect_symbol_completion_matches)
5197 (collect_symbol_completion_matches_type)
5198 (collect_file_symbol_completion_matches)
5199 (make_source_files_completion_list): New.
5200 * top.c (init_main): Don't install a rl_completion_entry_function
5201 hook. Install a rl_attempted_completion_function hook instead.
5202 * tui/tui-layout.c (layout_completer): Adjust to work with a
5203 completion_tracker.
5204 * tui/tui-regs.c (tui_reggroup_completer):
5205 * tui/tui-win.c (window_name_completer, focus_completer)
5206 (winheight_completer): Adjust to work with a completion_tracker.
5207 * value.c: Include "completer.h".
5208 (complete_internalvar): Adjust to work with a completion_tracker.
5209 * value.h (complete_internalvar): Likewise.
5210
5211 2017-07-17 Pedro Alves <palves@redhat.com>
5212
5213 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5214 renames.
5215 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5216 comments to completer_ftype's declaration.
5217 <completer_handle_brkchars>: Change type to
5218 completer_handle_brkchars_ftype.
5219 * command.h (completer_ftype): Add describing comment and give
5220 names to parameters.
5221 (completer_ftype_void): Rename to ...
5222 (completer_handle_brkchars_ftype) ... this. Add describing comment.
5223 (set_cmd_completer_handle_brkchars): Adjust.
5224 * completer.c (filename_completer_handle_brkchars): New function.
5225 (complete_line_internal_normal_command): New function, factored
5226 out from ...
5227 (complete_line_internal): ... here.
5228 (command_completer_handle_brkchars)
5229 (default_completer_handle_brkchars)
5230 (completer_handle_brkchars_func_for_completer): New functions.
5231 * completer.h (set_gdb_completion_word_break_characters): Delete
5232 declaration.
5233 (completer_handle_brkchars_func_for_completer): New declaration.
5234 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5235 completer_handle_brkchars_func_for_completer.
5236
5237 2017-07-17 Pedro Alves <palves@redhat.com>
5238
5239 * completer.c (symbol_completer): New function, based on
5240 make_symbol_completion_list_fn.
5241 * completer.h (symbol_completer): New declaration.
5242 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5243 * python/py-cmd.c (completers): Adjust.
5244 * symtab.c (make_symbol_completion_list_fn): Delete.
5245 * symtab.h (make_symbol_completion_list_fn): Delete.
5246 * cli/cli-decode.c (add_cmd): Adjust.
5247
5248 2017-07-17 Pedro Alves <palves@redhat.com>
5249
5250 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5251 * dwarf2read.c: Include "filename-seen-cache.h".
5252 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5253 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5254 * filename-seen-cache.c: New file.
5255 * filename-seen-cache.h: New file.
5256 * symtab.c: Include "filename-seen-cache.h".
5257 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5258 (create_filename_seen_cache, clear_filename_seen_cache)
5259 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5260 to filename-seen-cache.h/filename-seen-cache.c.
5261 (output_source_filename, sources_info)
5262 (maybe_add_partial_symtab_filename)
5263 (make_source_files_completion_list): Adjust to use
5264 filename_seen_cache.
5265
5266 2017-07-17 Pedro Alves <palves@redhat.com>
5267
5268 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5269 fields.
5270 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5271 dwarf2_debug_sections*)): New.
5272 (dwarf2_per_objfile::dwarf2_per_objfile(const
5273 dwarf2_per_objfile&)): Declare as deleted.
5274 (dwarf2_per_objfile::operator=): Declare as deleted.
5275 (dwarf2_per_objfile::dwarf2_per_objfile)
5276 (dwarf2_per_objfile::~dwarf2_per_objfile)
5277 (dwarf2_per_objfile::free_cached_comp_units): New.
5278 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5279 ctor. Call dwarf2_per_objfile's ctor manually.
5280 (dwarf2_locate_sections): Deleted/refactored as ...
5281 (dwarf2_per_objfile::locate_sections): ... this new method.
5282 (free_cached_comp_units): Defer to
5283 dwarf2_per_objfile::free_cached_comp_units.
5284 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5285
5286 2017-07-14 Tom Tromey <tom@tromey.com>
5287
5288 PR rust/21764:
5289 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5290 parameter.
5291 <UNOP_SIZEOF>: Split into separate case.
5292 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5293
5294 2017-07-14 Tom Tromey <tom@tromey.com>
5295
5296 PR rust/21763:
5297 * symtab.c (symbol_matches_domain): Add language_rust to special
5298 case.
5299 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5300 treat LOC_TYPEDEF symbols as variables.
5301
5302 2017-07-14 Pedro Alves <palves@redhat.com>
5303
5304 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5305 symtabs matching all symtabs with SRCFILE as file name instead of
5306 only considering the first hit, with lookup_symtab.
5307
5308 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5309
5310 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5311 operator_name parameters.
5312 (gen_expr): Update function call.
5313
5314 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5315
5316 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5317 parameter.
5318 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5319 Likewise.
5320 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5321 parameter, use agent_expr::gdbarch instead, update function
5322 calls.
5323 (locexpr_tracepoint_var_ref): Likewise.
5324 (loclist_tracepoint_var_ref): Likewise.
5325 * ax-gdb.c (gen_trace_static_fields): Likewise.
5326 (gen_traced_pop): Likewise.
5327 (gen_frame_args_address): Likewise.
5328 (gen_frame_locals_address): Likewise.
5329 (gen_var_ref): Likewise.
5330 (gen_struct_ref_recursive): Likewise.
5331 (gen_static_field): Likewise.
5332 (gen_maybe_namespace_elt): Likewise.
5333 (gen_expr): Likewise.
5334 (gen_trace_for_var): Likewise.
5335 (gen_trace_for_expr): Likewise.
5336 (gen_trace_for_return_address): Likewise.
5337
5338 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5339
5340 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5341 parameter.
5342 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5343
5344 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5345
5346 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5347 from ax, update calls.
5348 (gen_usual_arithmetic): Likewise.
5349 (gen_integral_promotions): Likewise.
5350 (gen_bitfield_ref): Likewise.
5351 (gen_primitive_field): Likewise.
5352 (gen_struct_ref_recursive): Likewise.
5353 (gen_struct_ref): Likewise.
5354 (gen_maybe_namespace_elt): Likewise.
5355 (gen_struct_elt_for_reference): Likewise.
5356 (gen_namespace_elt): Likewise.
5357 (gen_aggregate_elt_ref): Likewise.
5358 (gen_expr): Get gdbarch from ax, update calls.
5359 (gen_expr_binop_rest): Likewise.
5360
5361 2017-07-13 Pedro Alves <palves@redhat.com>
5362
5363 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5364 as default tdesc.
5365 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5366 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5367 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5368 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5369 tdep.
5370 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5371 Get final tdesc from the tdep.
5372 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5373 default tdesc.
5374 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5375 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5376 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5377 Use it as default tdesc.
5378 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5379 down to amd_init_abi. No longer handle fallback tdesc here.
5380 * amd64-tdep.h (tdesc_x32): Declare.
5381 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5382 parameter.
5383 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5384 as default tdesc.
5385
5386 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5387
5388 * s390-linux-tdep.c (s390_process_record): Add support for
5389 instructions new in arch12.
5390
5391 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5392
5393 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5394 PT_GETFSBASE and PT_GETGSBASE.
5395 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5396 PT_SETGSBASE.
5397
5398 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5399
5400 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5401 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5402 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5403 those rules.
5404 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5405 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5406 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5407 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5408 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5409 * features/i386/amd64.xml: Add 64bit-segments.xml.
5410 * features/i386/amd64-avx-avx512.c: Regenerated.
5411 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5412 * features/i386/amd64-avx-mpx.c: Regenerated.
5413 * features/i386/amd64-avx.c: Regenerated.
5414 * features/i386/amd64-mpx.c: Regenerated.
5415 * features/i386/amd64.c: Regenerated.
5416 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5417 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5418 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5419 * regformats/i386/amd64-avx.dat: Regenerated.
5420 * regformats/i386/amd64-mpx.dat: Regenerated.
5421 * regformats/i386/amd64.dat: Regenerated.
5422
5423 2017-07-10 Yao Qi <yao.qi@linaro.org>
5424
5425 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5426 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5427
5428 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5429
5430 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5431 unsetenv.
5432 * gnulib/aclocal.m4: Regenerate.
5433 * gnulib/config.in: Regenerate.
5434 * gnulib/configure: Regenerate.
5435 * gnulib/import/Makefile.am: Regenerate.
5436 * gnulib/import/Makefile.in: Regenerate.
5437 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5438 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5439 * gnulib/import/m4/environ.m4: New file.
5440 * gnulib/import/m4/setenv.m4: New file.
5441 * gnulib/import/setenv.c: New file.
5442 * gnulib/import/unsetenv.c: New file.
5443
5444 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5445
5446 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5447 address when op is DW_OP_addr.
5448
5449 2017-07-09 Tom Tromey <tom@tromey.com>
5450
5451 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5452 check and apply to outer type.
5453
5454 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5455
5456 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5457 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5458 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5459 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5460
5461 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5462
5463 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5464
5465 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5466
5467 * corelow.c (get_core_siginfo): Remove.
5468 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5469 instead of get_core_siginfo.
5470 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5471 * gdbarch.h: Re-generate.
5472 * gdbarch.c: Re-generate.
5473 * linux-tdep.c (linux_core_xfer_siginfo): New.
5474 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5475
5476 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5477
5478 * corelow.c (thread_section_name): Move to ...
5479 * gdbcore.h (thread_section_name): ... here.
5480
5481 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5482
5483 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5484 (struct siginfo32): New.
5485 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5486 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5487 via ptrace(PT_LWPINFO).
5488
5489 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5490
5491 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5492 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5493 (fbsd_get_siginfo_type): New.
5494 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5495 (_initialize_fbsd_tdep): New.
5496
5497 2017-07-06 David Blaikie <dblaikie@gmail.com>
5498
5499 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5500 a singular dwo_unit*) to support multiple CUs in the same way that
5501 multiple TUs are supported.
5502 (create_cus_hash_table): Replace create_dwo_cu with a function for
5503 parsing multiple CUs from a DWO file.
5504 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5505 create_dwo_cu.
5506 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5507 htab_find, rather than comparing the signature to a singleton CU in
5508 the dwo_file.
5509
5510 2017-07-06 Pedro Alves <palves@redhat.com>
5511
5512 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5513
5514 2017-07-04 Pedro Alves <palves@redhat.com>
5515
5516 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5517 * gdbtypes.h (TYPE_STATIC): Delete.
5518 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5519 is_synchronized, is_native>: Delete.
5520 <dummy>: Bump.
5521 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5522 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5523 (TYPE_FN_FIELD_ABSTRACT): Delete.
5524
5525 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5526
5527 * buffer.h (buffer_finish): Fix spelling mistakes.
5528
5529 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5530
5531 * .dir-locals.el: Automatically switch to C-style comments in
5532 versions of Emacs that support the feature.
5533
5534 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5535 Pedro Alves <palves@redhat.com>
5536
5537 PR cli/21688
5538 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5539 (process_next_line): New variable 'inline_cmd'.
5540 Adjust 'if' clauses for "python", "compile" and "guile" to use
5541 'command_name_equals' and check for '!inline_cmd'.
5542
5543 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5544
5545 PR cli/21688
5546 * cli/cli-script.c (command_name_equals_not_inline): New function.
5547 (process_next_line): Adjust 'if' clauses for "python", "compile"
5548 and "guile" to use command_name_equals_not_inline.
5549
5550 2017-06-29 Pedro Alves <palves@redhat.com>
5551
5552 * completer.c (expression_completer): Call
5553 linespec_location_completer instead of location_completer.
5554
5555 2017-06-29 Pedro Alves <palves@redhat.com>
5556
5557 * completer.c (expression_completer): Remove code that recomputes
5558 'text' from 'word'.
5559
5560 2017-06-29 Yao Qi <yao.qi@linaro.org>
5561
5562 * regformats/regdat.sh: Generate code with
5563 "ifndef IN_PROCESS_AGENT".
5564
5565 2017-06-28 Pedro Alves <palves@redhat.com>
5566
5567 * command.h: Include "common/scoped_restore.h".
5568
5569 2017-06-28 Yao Qi <yao.qi@linaro.org>
5570
5571 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5572 instead of obstack_grow.
5573
5574 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5575
5576 PR gdb/21337
5577 * symfile.c (reread_symbols): Call objfiles_changed just before
5578 read_symbols.
5579
5580 2017-06-27 Pedro Alves <palves@redhat.com>
5581
5582 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5583 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5584 (completion_list_add_symbol, completion_list_add_msymbol):
5585 ... these new functions.
5586 (add_symtab_completions)
5587 (default_make_symbol_completion_list_break_on_1): Adjust.
5588
5589 2017-06-27 Pedro Alves <palves@redhat.com>
5590
5591 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5592 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5593 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5594 dtor.
5595 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5596 'storage_obstack' field an auto_obstack. In-class initialize all
5597 non-bitfield fields. Make minsyms_read bool.
5598 * symfile.c (read_symbols): Adjust.
5599
5600 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5601
5602 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5603 (gdbsim_store_register): Likewise.
5604
5605 2017-06-27 Pedro Alves <palves@redhat.com>
5606
5607 * c-exp.y (name_obstack): Now an auto_obstack.
5608 (yylex): Use auto_obstack::clear.
5609 (c_parse): Use auto_obstack::clear instead of reinitializing and
5610 freeing the obstack.
5611 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5612 * d-exp.y (name_obstack): Now an auto_obstack.
5613 (yylex): Use auto_obstack::clear.
5614 (d_parse): Use auto_obstack::clear instead of reinitializing and
5615 freeing the obstack.
5616 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5617 auto_obstack.
5618 * dwarf2read.c (create_addrmap_from_index)
5619 (dwarf2_build_psymtabs_hard)
5620 (update_enumeration_type_from_children): Likewise.
5621 * gdb_obstack.h (auto_obstack): New type.
5622 * go-exp.y (name_obstack): Now an auto_obstack.
5623 (build_packaged_name): Use auto_obstack::clear.
5624 (go_parse): Use auto_obstack::clear instead of reinitializing and
5625 freeing the obstack.
5626 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5627 auto_obstack.
5628 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5629 * rust-exp.y (work_obstack): Now an auto_obstack.
5630 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5631 reinitializing and freeing the obstack.
5632 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5633 (host_char_to_target): Use auto_obstack.
5634 * utils.h (make_cleanup_obstack_free): Delete declaration.
5635 * valprint.c (generic_emit_char, generic_printstr): Use
5636 auto_obstack.
5637
5638 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5639
5640 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5641 thread.
5642 (darwin_init_thread_list): Don't update dummy thread.
5643 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5644
5645 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5646
5647 * record-full.c (netorder16): Remove.
5648
5649 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5650
5651 * common/diagnostics.h: Define macros for GCC.
5652 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5653 * common/vec.h: Include diagnostics.h.
5654 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5655 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5656 warning.
5657
5658 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5659
5660 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5661 New macro.
5662 * ada-lex.l: Ignore deprecated register warnings.
5663
5664 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5665
5666 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5667 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5668
5669 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5670
5671 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5672 its own line.
5673
5674 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5675
5676 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5677
5678 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5679
5680 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5681 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5682 (xtensa_register_read_masked): Likewise.
5683
5684 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5685
5686 * common/environ.c (gdb_environ::unset): Update comment.
5687
5688 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5689
5690 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5691 registers.
5692
5693 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5694
5695 * record-full.c (record_full_exec_insn): Use byte_vector.
5696
5697 2017-06-22 Yao Qi <yao.qi@linaro.org>
5698
5699 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5700 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5701
5702 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5703
5704 * remote.c (cached_reg): Move from here...
5705 * regcache.h (cached_reg): ...to here.
5706 * python/py-unwind.c (struct reg_info): Remove.
5707 (cached_frame_info): Use cached_reg_t.
5708 (pyuw_prev_register): Likewise.
5709 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5710 (pyuw_dealloc_cache): Free all registers.
5711
5712 2017-06-22 Pedro Alves <palves@redhat.com>
5713 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5716 warning.
5717 * common/diagnostics.h: New file.
5718
5719 2017-06-22 Pedro Alves <palves@redhat.com>
5720
5721 * common/agent.h: Add include guards.
5722
5723 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5724
5725 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5726 talk about addressable units instead of bytes.
5727
5728 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5729
5730 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5731 of '::const_iterator'.
5732
5733 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5734
5735 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5736 'unittests/environ-selftests.c'.
5737 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5738 * charset.c (find_charset_names): Declare object 'iconv_env'.
5739 Update code to use 'iconv_env' object. Remove call to
5740 'free_environ'.
5741 * common/environ.c: Include <utility>.
5742 (make_environ): Delete function.
5743 (free_environ): Delete function.
5744 (gdb_environ::clear): New function.
5745 (gdb_environ::operator=): New function.
5746 (gdb_environ::get): Likewise.
5747 (environ_vector): Delete function.
5748 (set_in_environ): Delete function.
5749 (gdb_environ::set): New function.
5750 (unset_in_environ): Delete function.
5751 (gdb_environ::unset): New function.
5752 (gdb_environ::envp): Likewise.
5753 * common/environ.h: Include <vector>.
5754 (struct gdb_environ): Delete; transform into...
5755 (class gdb_environ): ... this class.
5756 (free_environ): Delete prototype.
5757 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5758 environ_vector): Likewise.
5759 * infcmd.c (run_command_1): Update code to call
5760 'envp' from 'gdb_environ' class.
5761 (environment_info): Update code to call methods from 'gdb_environ'
5762 class.
5763 (unset_environment_command): Likewise.
5764 (path_info): Likewise.
5765 (path_command): Likewise.
5766 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5767 (inferior::inferior): Initialize 'environment' using the host's
5768 information.
5769 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5770 Include "environ.h".
5771 (class inferior) <environment>: Change type from 'struct
5772 gdb_environ' to 'gdb_environ'.
5773 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5774 methods from 'gdb_environ' class.
5775 * solib.c (solib_find_1): Likewise
5776 * unittests/environ-selftests.c: New file.
5777
5778 2017-06-20 Yao Qi <yao.qi@linaro.org>
5779
5780 * features/i386/i386-linux.xml: Exchange the order of including
5781 32bit-linux.xml and 32bit-sse.xml.
5782 * features/i386/i386-linux.c: Regenerated.
5783
5784 2017-06-20 Yao Qi <yao.qi@linaro.org>
5785
5786 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5787 Delete copy ctor and assignment operator.
5788 (tdesc_type): Likewise.
5789 (tdesc_feature): Likewise.
5790 (tdesc_free_reg): Remove.
5791 (tdesc_create_reg): Use new.
5792 (tdesc_free_type): Remove.
5793 (tdesc_create_vector): Use new.
5794 (tdesc_create_union): Likewise.
5795 (tdesc_create_flags): Likewise.
5796 (tdesc_create_enum): Likewise.
5797 (tdesc_free_feature): Delete.
5798 (free_target_description): Use delete.
5799
5800 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5801
5802 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5803 registers.
5804
5805 2017-06-19 Pedro Alves <palves@redhat.com>
5806
5807 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5808 after gdb::unlinker.
5809
5810 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5811
5812 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5813 gdb_environ to access an environment variable.
5814
5815 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5816
5817 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5818 gdb_byte*.
5819
5820 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5821
5822 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5823
5824 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5825
5826 * configure: Re-generate.
5827 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5828
5829 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5830
5831 * configure: Re-generate.
5832 * warning.m4: Pass -Werror to compiler when checking for
5833 supported warning flags.
5834
5835 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5836
5837 * Makefile.in (COMPILE.pre): Add "-x c++".
5838
5839 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5840 Pedro Alves <palves@redhat.com>
5841 Yao Qi <yao.qi@linaro.org>
5842
5843 * defs.h (RequireLongest): New.
5844 (extract_integer): Declare function template.
5845 (extract_signed_integer): Remove the declaration, but define it
5846 static inline.
5847 (extract_unsigned_integer): Likewise.
5848 (store_integer): Declare function template.
5849 (store_signed_integer): Remove the declaration, but define it
5850 static inline.
5851 (store_unsigned_integer): Likewise.
5852 * findvar.c (extract_integer): New function template.
5853 (extract_signed_integer): Remove.
5854 (extract_unsigned_integer): Remove.
5855 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5856 instantiations.
5857 (store_integer): New function template.
5858 (store_signed_integer): Remove.
5859 (store_unsigned_integer): Remove.
5860 (store_integer): Explicit instantiations.
5861 * regcache.c (regcache_raw_read_signed): Update.
5862 (regcache::raw_read): New function.
5863 (regcache::raw_read_signed): Remove.
5864 (regcache::raw_read_unsigned): Remove.
5865 (regcache_raw_read_unsigned): Update.
5866 (regcache_raw_write_unsigned): Update.
5867 (regcache::raw_write_signed): Remove.
5868 (regcache::raw_write): New function.
5869 (regcache_cooked_read_signed): Update.
5870 (regcache::raw_write_unsigned): Remove.
5871 (regcache::cooked_read_signed): Remove.
5872 (regcache_cooked_read_unsigned): Update.
5873 (regcache::cooked_read_unsigned): Remove.
5874 (regcache_cooked_write_signed): Update.
5875 (regcache_cooked_write_unsigned): Update.
5876 * regcache.h (regcache) <raw_read_signed>: Remove.
5877 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5878 <raw_read, raw_write>: New.
5879 <cooked_read_signed, cooked_write_signed>: Remove.
5880 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5881 <cooked_read, cooked_write>: New.
5882 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5883 (sh64_pseudo_register_write): Update.
5884
5885 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5886
5887 * arc-tdep.c (arc_disassembler_options): New variable.
5888 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5889 of default_print_insn.
5890 (arc_delayed_print_insn): Set info->section when needed,
5891 use default_print_insn to retrieve a disassembler.
5892
5893 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5894
5895 PR gdb/21574
5896 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5897 to mention $SHELL and startup-with-shell.
5898
5899 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5900
5901 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5902
5903 2017-06-14 Yao Qi <yao.qi@linaro.org>
5904
5905 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5906 default_print_insn instead of print_insn_aarch64.
5907 * arm-tdep.c (gdb_print_insn_arm): Call
5908 default_print_insn instead of print_insn_big_arm
5909 and print_insn_little_arm.
5910 * i386-tdep.c (i386_print_insn): Call default_print_insn
5911 instead of print_insn_i386.
5912 * ia64-tdep.c (ia64_print_insn): Call
5913 default_print_insn instead of print_insn_ia64.
5914 * mips-tdep.c (gdb_print_insn_mips): Call
5915 default_print_insn instead of print_insn_big_mips
5916 and print_insn_little_mips.
5917 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5918 instead of print_insn_spu.
5919
5920 2017-06-14 Pedro Alves <palves@redhat.com>
5921
5922 * ada-lang.c: Include "common/byte-vector.h".
5923 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5924 * charset.c (wchar_iterator::iterate): Resize the vector instead
5925 of reserving it.
5926 * common/byte-vector.h: Include "common/def-vector.h".
5927 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5928 * cli/cli-dump.c: Include "common/byte-vector.h".
5929 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5930 * common/byte-vector.h: New file.
5931 * common/def-vector.h: New file.
5932 * common/default-init-alloc.h: New file.
5933 * dwarf2loc.c: Include "common/byte-vector.h".
5934 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5935 instead of reserving it.
5936 * dwarf2read.c: Include "common/byte-vector.h".
5937 (data_buf::m_vec): Now a gdb::byte_vector.
5938 * gdb_regex.c: Include "common/def-vector.h".
5939 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5940 * mi/mi-main.c: Include "common/byte-vector.h".
5941 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5942 * printcmd.c: Include "common/byte-vector.h".
5943 (print_scalar_formatted): Use gdb::byte_vector.
5944 * valprint.c: Include "common/byte-vector.h".
5945 (maybe_negate_by_bytes, print_decimal_chars): Use
5946 gdb::byte_vector.
5947
5948 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5949
5950 * darwin-nat.c: Include "nat/fork-inferior.h".
5951
5952 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5953
5954 * configure.nat: Factor out Darwin bits that are not
5955 architecture-specific. Add fork-inferior.o.
5956
5957 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5958
5959 * configure.nat: Factor out AIX bits that are not
5960 architecture-specific. Add fork-inferior.o.
5961
5962 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5963
5964 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5965 (read_pieced_value, write_pieced_value): ...here. Reduce to
5966 wrappers that just call rw_pieced_value.
5967
5968 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5969
5970 * dwarf2loc.c (write_pieced_value): When writing the data for a
5971 memory piece, use write_memory_with_notification instead of
5972 write_memory.
5973
5974 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5975
5976 * valops.c (read_value_memory): Change embedded_offset to
5977 represent a bit offset instead of a byte offset.
5978 * value.h (read_value_memory): Adjust comment.
5979
5980 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5981
5982 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5983 dest_offset_bits and source_offset_bits.
5984 (write_pieced_value): Likewise.
5985
5986 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5987
5988 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5989 given by DW_OP_bit_piece.
5990 (write_pieced_value): Likewise.
5991
5992 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5993
5994 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5995 some other preparations to the places where sufficient information
5996 is available.
5997 (write_pieced_value): Likewise.
5998
5999 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6000
6001 * dwarf2loc.c (bits_to_bytes): New function.
6002 (read_pieced_value): Fix offset calculations for register pieces
6003 on big-endian targets.
6004 (write_pieced_value): Likewise.
6005
6006 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6007
6008 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6009 (write_pieced_value): Likewise.
6010
6011 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6012
6013 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6014 transfer the source value's least significant bits, instead of its
6015 lowest-addressed ones. Rename type_len to max_offset.
6016 (read_pieced_value): Mirror above changes to write_pieced_value as
6017 applicable.
6018
6019 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6020
6021 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6022 truncate full bytes from dest_offset_bits before using it as an
6023 offset into the buffer.
6024
6025 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6026
6027 * dwarf2loc.c (write_pieced_value): Include transfer size in
6028 byte-wise check.
6029
6030 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6031
6032 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6033 calculation of this_size.
6034
6035 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6036
6037 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6038 when targeting a bit-field.
6039 (write_pieced_value): Likewise.
6040
6041 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6042
6043 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6044 (allocate_piece_closure): Drop addr_size parameter.
6045 (dwarf2_evaluate_loc_desc_full): Adjust call to
6046 allocate_piece_closure.
6047
6048 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6049
6050 PR gdb/21226
6051 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6052 the LSB end, independent of endianness.
6053
6054 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6055
6056 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6057 size capping.
6058
6059 2017-06-13 Yao Qi <yao.qi@linaro.org>
6060
6061 * mips-linux-nat.c: Move include features/mips*-linux.c to
6062 mips-linux-tdep.c.
6063 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6064 to mips-linux-tdep.c.
6065 * mips-linux-tdep.c: Include features/mips*-linux.c
6066 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6067 functions.
6068 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6069 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6070 (tdesc_mips64_dsp_linux): Declare.
6071
6072 2017-06-12 Tom Tromey <tom@tromey.com>
6073
6074 * valprint.h (val_print_type_code_int): Remove.
6075 * valprint.c (generic_val_print_int): Always call
6076 val_print_scalar_formatted.
6077 (val_print_type_code_int): Remove.
6078 * printcmd.c (print_scalar_formatted): Handle options->format==0.
6079 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6080 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6081 * ada-valprint.c (ada_val_print_num): Use
6082 val_print_scalar_formatted.
6083
6084 2017-06-12 Tom Tromey <tom@tromey.com>
6085
6086 * printcmd.c (print_scalar_formatted): Unify the two switches.
6087 Don't convert scalars to LONGEST.
6088
6089 2017-06-12 Tom Tromey <tom@tromey.com>
6090
6091 PR exp/16225:
6092 * valprint.h (print_decimal_chars): Update.
6093 * valprint.c (maybe_negate_by_bytes): New function.
6094 (print_decimal_chars): Add "is_signed" argument.
6095 * printcmd.c (print_scalar_formatted): Update.
6096
6097 2017-06-12 Tom Tromey <tom@tromey.com>
6098
6099 PR exp/16225:
6100 * valprint.h (print_binary_chars, print_hex_chars): Update.
6101 * valprint.c (val_print_type_code_int): Update.
6102 (print_binary_chars): Add "zero_pad" argument.
6103 (emit_octal_digit): New function.
6104 (print_octal_chars): Don't zero-pad.
6105 (print_decimal_chars): Likewise.
6106 (print_hex_chars): Add "zero_pad" argument.
6107 * sh64-tdep.c (sh64_do_fp_register): Update.
6108 * regcache.c (regcache::dump): Update.
6109 * printcmd.c (print_scalar_formatted): Update.
6110 * infcmd.c (default_print_one_register_info): Update.
6111
6112 2017-06-12 Pedro Alves <palves@redhat.com>
6113 Alan Hayward <alan.hayward@arm.com>
6114
6115 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6116 (mips_eabi_push_dummy_call): Rename local 'regsize' to
6117 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
6118 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6119 Assert that abi_regsize bytes fit in 'ref_valbuf'.
6120
6121 2017-06-12 Pedro Alves <palves@redhat.com>
6122
6123 * dwarf2read.c (mapped_symtab::data): Now a vector of
6124 symtab_index_entry instead of vector of
6125 std::unique_ptr<symtab_index_entry>. All users adjusted to check
6126 whether an element's name is NULL instead of checking whether the
6127 element itself is NULL.
6128 (find_slot): Change return type. Adjust.
6129 (hash_expand, , add_index_entry, uniquify_cu_indices)
6130 (write_hash_table): Adjust.
6131
6132 2017-06-12 Pedro Alves <palves@redhat.com>
6133
6134 * dwarf2read.c (recursively_count_psymbols): New function.
6135 (write_psymtabs_to_index): Call it to compute number of psyms and
6136 pass estimate size of psyms_seen to unordered_set's ctor.
6137
6138 2017-06-12 Pedro Alves <palves@redhat.com>
6139
6140 * dwarf2read.c (write_hash_table): Check if key already exists
6141 before emplacing.
6142
6143 2017-06-12 Pedro Alves <palves@redhat.com>
6144
6145 * dwarf2read.c (data_buf::append_space): Rename to...
6146 (data_buf::grow): ... this, and make private. Adjust all callers.
6147 (data_buf::append_uint): New method.
6148 (add_address_entry, write_one_signatured_type)
6149 (write_psymtabs_to_index): Use it.
6150
6151 2017-06-12 Pedro Alves <palves@redhat.com>
6152
6153 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6154 (file_write (FILE *, const std::vector<Elem>&)): Delete.
6155 (data_buf::file_write): Call ::fwrite directly.
6156
6157 2017-06-12 Pedro Alves <palves@redhat.com>
6158
6159 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6160 std::vector::erase.
6161
6162 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6163
6164 Code cleanup: C++ify .gdb_index producer.
6165 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6166 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6167 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6168 (create_strtab, add_string): Remove.
6169 (file_write, data_buf): New.
6170 (struct symtab_index_entry): Use std::vector for cu_indices.
6171 (struct mapped_symtab): Use std::vector for data.
6172 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6173 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6174 Remove.
6175 (find_slot): Change return type. Update it to the new data structures.
6176 (hash_expand, add_index_entry): Update it to the new data structures.
6177 (offset_type_compare): Remove.
6178 (uniquify_cu_indices): Update it to the new data structures.
6179 (c_str_view, c_str_view_hasher, vector_hasher): New.
6180 (add_indices_to_cpool): Remove.
6181 (write_hash_table): Update it to the new data structures.
6182 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6183 (eq_psymtab_cu_index): Remove.
6184 (psym_index_map): New typedef.
6185 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6186 reference and std::unordered_map for cu_index_htab.
6187 (add_address_entry, add_address_entry_worker, write_address_map)
6188 (write_psymbols): Update it to the new data structures.
6189 (write_obstack): Remove.
6190 (struct signatured_type_index_data): Change types_list to a data_buf
6191 reference and psyms_seen to a std::unordered_set reference.
6192 (write_one_signatured_type, recursively_write_psymbols)
6193 (write_psymtabs_to_index): Update it to the new data structures.
6194
6195 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
6196
6197 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6198 separate-debug-file commands.
6199 * symfile.h (separate_debug_file_debug): New global.
6200 * symfile.c (separate_debug_file_debug): New global.
6201 (separate_debug_file_exists, find_separate_debug_file): Add
6202 debug output.
6203 (_initialize_symfile): Add "set debug separate-debug-file"
6204 command.
6205 * build-id.c (build_id_to_debug_bfd,
6206 find_separate_debug_file_by_buildid): Add debug output.
6207
6208 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6209
6210 * gdbarch.sh (displaced_step_free_closure): Remove.
6211 * gdbarch.h, gdbarch.c: Re-generate.
6212 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6213 displaced_step_free_closure.
6214 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6215 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6216 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6217 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6218 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6219 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6220 * arch-utils.h (simple_displaced_step_free_closure): Remove.
6221 * arch-utils.c (simple_displaced_step_free_closure): Remove.
6222 * infrun.c (displaced_step_clear): Call xfree instead of
6223 gdbarch_displaced_step_free_closure.
6224
6225 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6226
6227 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6228 NULL".
6229
6230 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6231
6232 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6233 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6234 (mn10300_push_dummy_call): Likewise.
6235
6236 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6237
6238 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6239
6240 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6241
6242 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6243
6244 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6245
6246 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6247 able to start inferiors using a shell.
6248 (New remote packets): Announce new packet "QStartupWithShell".
6249 * remote.c: Add PACKET_QStartupWithShell.
6250 (extended_remote_create_inferior): Handle new
6251 PACKET_QStartupWithShell.
6252 (remote_protocol_features) <QStartupWithShell>: New entry for
6253 PACKET_QStartupWithShell.
6254 (_initialize_remote): Call "add_packet_config_cmd" for
6255 QStartupShell.
6256
6257 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6258 Pedro Alves <palves@redhat.com>
6259
6260 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6261 and "nat/fork-inferior.h".
6262 * common/common-inferior.h: New file, with contents from
6263 "gdb/inferior.h".
6264 * commom/common-utils.c: Include "common-utils.h".
6265 (stringify_argv): New function.
6266 * common/common-utils.h (stringify_argv): New prototype.
6267 * configure.nat: Add "fork-inferior.o" as a dependency for
6268 "*linux*", "fbsd*" and "nbsd*" hosts.
6269 * corefile.c (get_exec_file): Update comment.
6270 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6271 instead of "startup_inferior".
6272 (darwin_create_inferior): Call "add_thread_silent" after
6273 "fork_inferior".
6274 * fork-child.c: Cleanup unnecessary includes.
6275 (SHELL_FILE): Move to "common/common-fork-child.c".
6276 (environ): Likewise.
6277 (exec_wrapper): Initialize.
6278 (get_exec_wrapper): New function.
6279 (breakup_args): Move to "common/common-fork-child.c"; rename to
6280 "breakup_args_for_exec".
6281 (escape_bang_in_quoted_argument): Move to
6282 "common/common-fork-child.c".
6283 (saved_ui): New variable.
6284 (prefork_hook): New function.
6285 (postfork_hook): Likewise.
6286 (postfork_child_hook): Likewise.
6287 (gdb_startup_inferior): Likewise.
6288 (fork_inferior): Move to "common/common-fork-child.c". Update
6289 function to support gdbserver.
6290 (startup_inferior): Likewise.
6291 * gdbcore.h (get_exec_file): Remove declaration.
6292 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6293 instead of "startup_inferior". Call "add_thread_silent" after
6294 "fork_inferior".
6295 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6296 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6297 instead of "startup_inferior". Call "add_thread_silent" after
6298 "fork_inferior".
6299 * inferior.h: Include "common-inferior.h".
6300 (trace_start_error): Move to "common/common-utils.h".
6301 (trace_start_error_with_name): Likewise.
6302 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6303 (startup_inferior): Likewise.
6304 (gdb_startup_inferior): New prototype.
6305 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6306 * nat/fork-inferior.h: New file.
6307 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6308 instead of "startup_inferior". Call "add_thread_silent" after
6309 "fork_inferior".
6310 * target.h (target_terminal_init): Move prototype to
6311 "target/target.h".
6312 (target_terminal_inferior): Likewise.
6313 (target_terminal_ours): Likewise.
6314 * target/target.h (target_terminal_init): New prototype, moved
6315 from "target.h".
6316 (target_terminal_inferior): Likewise.
6317 (target_terminal_ours): Likewise.
6318 * utils.c (gdb_flush_out_err): New function.
6319
6320 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6321
6322 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6323 * common/common-gdbthread.h: New file, with parts from
6324 "gdb/gdbthread.h".
6325 * gdbthread.h: Include "common-gdbthread.h".
6326 (switch_to_thread): Moved to "common/common-gdbthread.h".
6327
6328 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6329
6330 * Makefile.in (SFILES): Add "common/job-control.c".
6331 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6332 (COMMON_OBS): Add "job-control.o".
6333 * common/job-control.c: New file, with contents from
6334 "gdb/inflow.c".
6335 * common/job-control.h: New file, with contents from "terminal.h".
6336 * fork-child.c: Include "job-control.h".
6337 * inflow.c: Include "job-control.h".
6338 (gdb_setpgid): Move to "common/common-inflow.c".
6339 (_initialize_inflow): Move setting of "job_control" to
6340 "handle_job_control".
6341 * terminal.h (job_control): Moved to "common/common-terminal.h".
6342 (gdb_setpgid): Likewise.
6343 * top.c: Include "job_control.h".
6344 * utils.c: Likewise.
6345 (job_control): Moved to "job-control.c".
6346
6347 2017-06-07 Pedro Alves <palves@redhat.com>
6348
6349 * Makefile.in (SFILES): Add gdb_regex.c.
6350 (COMMON_OBS): Add gdb_regex.o.
6351 * ada-lang.c (ada_add_standard_exceptions)
6352 (ada_add_exceptions_from_frame, name_matches_regex)
6353 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6354 parameter type to compiled_regex. Adjust.
6355 (ada_exceptions_list): Use compiled_regex.
6356 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6357 std::unique_ptr<compiled_regex>.
6358 (exception_catchpoint::~exception_catchpoint): Remove regfree
6359 call.
6360 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6361 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6362 * breakpoint.c (solib_catchpoint::compiled): Now a
6363 std::unique_ptr<compiled_regex>.
6364 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6365 (check_status_catch_solib): Adjust to use compiled_regex.
6366 (add_solib_catchpoint): Adjust to use compiled_regex.
6367 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6368 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6369 compiled_regex reference. Adjust to use it.
6370 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6371 declaration. Include "gdb_regex.h".
6372 (apropos_cmd): Change regex parameter to compiled_regex reference.
6373 * gdb_regex.c: New file.
6374 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6375 declarations.
6376 (class compiled_regex): New.
6377 * linux-tdep.c: Include "common/gdb_optional.h".
6378 (struct mapping_regexes): New, factored out from
6379 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6380 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6381 gdb::optional and remove cleanups. Adjust to compiled_regex.
6382 * probe.c: Include "common/gdb_optional.h".
6383 (collect_probes): Use compiled_regex and gdb::optional and remove
6384 cleanups.
6385 * skip.c: Include "common/gdb_optional.h".
6386 (skiplist_entry::compiled_function_regexp): Now a
6387 gdb::optional<compiled_regex>.
6388 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6389 (free_skiplist_entry): Remove regfree call.
6390 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6391 compiled_regex and gdb::optional.
6392 * symtab.c: Include "common/gdb_optional.h".
6393 (search_symbols): Use compiled_regex and gdb::optional.
6394 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6395 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6396 to gdb_regex.c.
6397
6398 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6399
6400 * regcache.c (regcache::save): Avoid buffer use.
6401 (regcache::dump): Likewise.
6402
6403 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6404
6405 * sh-tdep.c (sh_pseudo_register_read): Remove
6406 MAX_REGISTER_SIZE.
6407 (sh_pseudo_register_write): Likewise.
6408 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6409 (sh64_pseudo_register_write): Likewise
6410
6411 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6412
6413 * aarch64-tdep.c (aarch64_store_return_value): Use
6414 V_REGISTER_SIZE.
6415 (aarch64_pseudo_read_value): Likewise.
6416 (aarch64_pseudo_write): Likewise.
6417
6418 2017-06-06 Yao Qi <yao.qi@linaro.org>
6419
6420 * regformats/regdef.h (set_register_cache): Remove the
6421 declaration.
6422
6423 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6424
6425 * frame.c (frame_unwind_register_signed): Use
6426 frame_unwind_register_value.
6427
6428 2017-06-06 Pedro Alves <palves@redhat.com>
6429
6430 PR breakpoints/21553
6431 * breakpoint.c (create_breakpoints_sal_default)
6432 (init_breakpoint_sal, create_breakpoint_sal): Use
6433 gdb::unique_xmalloc_ptr for string parameters.
6434 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6435 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6436 (base_breakpoint_create_breakpoints_sal)
6437 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6438 (strace_marker_create_breakpoints_sal)
6439 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6440 string parameters.
6441 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6442 gdb::unique_xmalloc_ptr for string parameters.
6443 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6444 parameters.
6445
6446 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6447
6448 * alpha-tdep.c (alpha_register_to_value): Use
6449 get_frame_register_value.
6450 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6451
6452 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6453
6454 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6455 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6456 (ia64_value_to_register): Likewise.
6457 (ia64_extract_return_value): Likewise.
6458 (ia64_store_return_value): Likewise.
6459 (ia64_push_dummy_call): Likewise.
6460
6461 2017-06-04 Joel Brobecker <brobecker@adacore.com>
6462
6463 GDB 8.0 released.
6464
6465 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6466
6467 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6468
6469 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6470
6471 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6472 parameter.
6473 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6474
6475 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6476
6477 * event-loop.c (poll_timers): Unallocate timer using delete
6478 instead of xfree.
6479
6480 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6481
6482 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6483 (struct breakpoint) <~breakpoint>: New.
6484 (struct watchpoint): Inherit from breakpoint.
6485 <~watchpoint>: New.
6486 <base>: Remove.
6487 (struct tracepoint): Inherit from breakpoint.
6488 <base>: Remove.
6489 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6490 (struct longjmp_breakpoint): Inherit from breakpoint.
6491 <~longjmp_breakpoint>: New.
6492 <base>: Remove.
6493 (new_breakpoint_from_type): Remove casts.
6494 (watchpoint_in_thread_scope): Remove reference to base field.
6495 (watchpoint_del_at_next_stop): Likewise.
6496 (update_watchpoint): Likewise.
6497 (watchpoint_check): Likewise.
6498 (bpstat_check_watchpoint): Likewise.
6499 (set_longjmp_breakpoint): Likewise.
6500 (struct fork_catchpoint): Inherit from breakpoint.
6501 <base>: Remove.
6502 (struct solib_catchpoint): Inherit from breakpoint.
6503 <~solib_catchpoint>: New.
6504 <base>: Remove.
6505 (dtor_catch_solib): Change to ...
6506 (solib_catchpoint::~solib_catchpoint): ... this.
6507 (breakpoint_hit_catch_solib): Remove reference to base field.
6508 (add_solib_catchpoint): Likewise.
6509 (create_fork_vfork_event_catchpoint): Likewise.
6510 (struct exec_catchpoint): Inherit from breakpoint.
6511 <~exec_catchpoint>: New.
6512 <base>: Remove.
6513 (dtor_catch_exec): Change to ...
6514 (exec_catchpoint::~exec_catchpoint): ... this.
6515 (dtor_watchpoint): Change to ...
6516 (watchpoint::~watchpoint): ... this.
6517 (watch_command_1): Remove reference to base field.
6518 (catch_exec_command_1): Likewise.
6519 (base_breakpoint_dtor): Change to ...
6520 (breakpoint::~breakpoint): ... this.
6521 (base_breakpoint_ops): Remove dtor field value.
6522 (longjmp_bkpt_dtor): Change to ...
6523 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6524 (strace_marker_create_breakpoints_sal): Remove reference to base
6525 field.
6526 (delete_breakpoint): Don't manually call breakpoint destructor.
6527 (create_tracepoint_from_upload): Remove reference to base field.
6528 (trace_pass_set_count): Likewise.
6529 (initialize_breakpoint_ops): Don't initialize
6530 momentary_breakpoint_ops, don't set dtors.
6531 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6532 <~ada_catchpoint>: New.
6533 <base>: Remove.
6534 (create_excep_cond_exprs): Remove reference to base field.
6535 (dtor_exception): Change to ...
6536 (ada_catchpoint::~ada_catchpoint): ... this.
6537 (dtor_catch_exception): Remove.
6538 (dtor_catch_exception_unhandled): Remove.
6539 (dtor_catch_assert): Remove.
6540 (create_ada_exception_catchpoint): Remove reference to base
6541 field.
6542 (initialize_ada_catchpoint_ops): Don't set dtors.
6543 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6544 breakpoint.
6545 <~signal_catchpoint>: New.
6546 <base>: Remove.
6547 (signal_catchpoint_dtor): Change to ...
6548 (signal_catchpoint::~signal_catchpoint): ... this.
6549 (create_signal_catchpoint): Remove reference to base field.
6550 (initialize_signal_catchpoint_ops): Don't set dtor.
6551 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6552 from breakpoint.
6553 <~syscall_catchpoint>: New.
6554 <base>: Remove.
6555 (dtor_catch_syscall): Change to ...
6556 (syscall_catchpoint::~syscall_catchpoint): ... this.
6557 (create_syscall_event_catchpoint): Remove reference to base
6558 field.
6559 (initialize_syscall_catchpoint_ops): Don't set dtor.
6560 * break-catch-throw.c (struct exception_catchpoint): Inherit
6561 from breakpoint.
6562 <~exception_catchpoint>: New.
6563 <base>: Remove.
6564 (dtor_exception_catchpoint): Change to ...
6565 (exception_catchpoint::~exception_catchpoint): ... this.
6566 (handle_gnu_v3_exceptions): Remove reference to base field.
6567 (initialize_throw_catchpoint_ops): Don't set dtor.
6568 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6569 field.
6570 * remote.c (remote_get_tracepoint_status): Likewise.
6571 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6572 * tracefile.c (tracefile_fetch_registers): Likewise.
6573 * tracepoint.c (actions_command): Likewise.
6574 (validate_actionline): Likewise.
6575 (tfind_1): Likewise.
6576 (get_traceframe_location): Likewise.
6577 (find_matching_tracepoint_location): Likewise.
6578 (parse_tracepoint_status): Likewise.
6579 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6580
6581 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6582
6583 * breakpoint.c (struct longjmp_breakpoint): New struct.
6584 (is_tracepoint_type): Change return type to bool.
6585 (is_longjmp_type): New function.
6586 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6587 (set_raw_breakpoint_without_location): Use
6588 new_breakpoint_from_type.
6589 (set_raw_breakpoint): Likewise.
6590
6591 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6592
6593 * breakpoint.c (new_breakpoint_from_type): New function.
6594 (create_breakpoint_sal): Use new_breakpoint_from_type and
6595 unique_ptr.
6596 (create_breakpoint): Likewise.
6597
6598 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6599
6600 * memattr.c (mem_info_command): Rename to ...
6601 (info_mem_command): ... this.
6602 (mem_enable_command): Rename to ...
6603 (enable_mem_command): ... this.
6604 (mem_disable_command): Rename to ...
6605 (disable_mem_command): ... this.
6606 (mem_delete_command): Rename to ...
6607 (delete_mem_command): ... this.
6608 (_initialize_mem): Adjust function names.
6609
6610 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6611
6612 * btrace.c (handle_pt_insn_events): New.
6613 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6614 STATUS. Split into this and ...
6615 (handle_pt_insn_event_flags): ... this.
6616
6617 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6618
6619 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6620 and struct pt_insn.resynced.
6621 * configure: Regenerated.
6622 * config.in: Regenerated.
6623
6624 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6625
6626 * btrace.c (ftrace_find_call_by_number): New function.
6627 (ftrace_new_function): Store objects, not pointers.
6628 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6629 ftrace_new_gap, ftrace_update_function,
6630 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6631 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6632 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6633 btrace_ends_with_single_insn, btrace_call_get): Account for
6634 btrace_thread_info::functions now storing objects.
6635 * btrace.h (struct btrace_thread_info): Add constructor.
6636 (struct btrace_thread_info) <functions>: Make std::vector.
6637 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6638 Initialize with default values.
6639 * record-btrace.c (record_btrace_frame_sniffer): Account for
6640 btrace_thread_info::functions now storing objects.
6641
6642 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6643
6644 * btrace.c: Remove typedef bfun_s.
6645 (ftrace_new_gap): Directly add gaps to the list of gaps.
6646 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6647 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6648 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6649 instead of gdb VEC.
6650
6651 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6652
6653 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6654 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6655 with btrace_thread_info::next_segment and
6656 btrace_thread_info::prev_segment.
6657 * btrace.h: Remove struct btrace_func_link.
6658 (struct btrace_function): Replace pair of function segment pointers
6659 with pair of indices.
6660 * python/py-record-btrace.c (btpy_call_prev_sibling,
6661 btpy_call_next_sibling): Replace references to
6662 btrace_thread_info::segment with btrace_thread_info::next_segment and
6663 btrace_thread_info::prev_segment.
6664 * record-btrace.c (record_btrace_frame_this_id): Use
6665 btrace_find_call_by_number.
6666
6667 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6668
6669 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6670 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6671 btrace_insn_next, btrace_insn_prev): Remove references to
6672 btrace_thread_info::flow.
6673 * btrace.h (struct btrace_function): Remove FLOW.
6674
6675 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6676
6677 * btrace.c (ftrace_find_call_by_number): New function.
6678 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6679 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6680 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6681 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6682 index.
6683 * btrace.h (struct btrace_function): Turn UP into an index.
6684 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6685 as an index.
6686 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6687 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6688 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6689
6690 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6691
6692 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6693 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6694 ftrace_update_function, ftrace_compute_global_level_offset,
6695 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6696 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6697 btrace_insn_end, btrace_is_empty): Remove references to
6698 btrace_thread_info::begin and btrace_thread_info::end.
6699 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6700 (struct btrace_thread_info) <functions>: Adjust comment.
6701 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6702 btrace_thread_info::begin.
6703
6704 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6705
6706 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6707 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6708 ftrace_update_function): Remove arguments that implicitly were always
6709 BTINFO->END.
6710 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6711 Don't pass BTINFO->END.
6712
6713 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6714
6715 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6716 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6717 btrace_find_insn_by_number): Replace function segment pointer with
6718 index.
6719 (btrace_insn_cmp): Simplify.
6720 * btrace.h: (struct btrace_insn_iterator) Rename index to
6721 insn_index. Replace function segment pointer with index into function
6722 segment vector.
6723 * record-btrace.c (record_btrace_call_history): Replace function
6724 segment pointer use with index.
6725 (record_btrace_frame_sniffer): Retrieve function call segment through
6726 vector.
6727 (record_btrace_set_replay): Remove defunc't safety check.
6728
6729 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6730
6731 * btrace.c (btrace_ends_with_single_insn): New function.
6732 (btrace_call_get, btrace_call_number, btrace_call_begin,
6733 btrace_call_end, btrace_call_next, btrace_call_prev,
6734 btrace_find_call_by_number): Use index into call segment vector
6735 instead of pointer.
6736 (btrace_call_cmp): Simplify.
6737 * btrace.h (struct btrace_call_iterator): Replace function call segment
6738 pointer with index into vector.
6739 * record-btrace.c (record_btrace_call_history): Use index instead of
6740 pointer.
6741
6742 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6743
6744 * btrace.c (btrace_insn_begin, btrace_insn_end,
6745 btrace_find_insn_by_number): Add btinfo to iterator.
6746 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6747
6748 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6749
6750 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6751 and save pointers directly.
6752 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6753 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6754 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6755 changed signature of functions.
6756 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6757 (btrace_fetch): Remove code that adds btrace_function pointers to
6758 vector of btrace_functions.
6759 (btrace_clear): Simplify freeing vector of btrace_functions.
6760
6761 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6762
6763 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6764 Replace VEC_* with std::vector functions.
6765 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6766 (struct btrace_thread_info)<functions>: Change type to std::vector.
6767
6768 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6769
6770 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6771 "Removed targets and native configurations" up. Merge duplicate
6772 "New commands" sub-sections. Add "New options" sub-sections.
6773
6774 2017-05-26 Alan Hayward <alan.hayward@arm.com>
6775
6776 * defs.h (copy_integer_to_size): New declaration.
6777 * findvar.c (copy_integer_to_size): New function.
6778 (do_cint_test): New selftest function.
6779 (copy_integer_to_size_test): Likewise.
6780 (_initialize_findvar): Likewise.
6781 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6782 (mips_fbsd_collect_reg): Use raw_collect_integer.
6783 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6784 (mips64_fill_gregset): Use raw_collect_integer
6785 (mips64_fill_fpregset): Use raw_supply_integer.
6786 * regcache.c (regcache::raw_supply_integer): New function.
6787 (regcache::raw_collect_integer): Likewise.
6788 * regcache.h: (regcache::raw_supply_integer): New declaration.
6789 (regcache::raw_collect_integer): Likewise.
6790
6791 2017-05-24 Yao Qi <yao.qi@linaro.org>
6792
6793 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6794 (COMMON_OBS): Add gdbarch-selftests.o.
6795 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6796 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6797 * gdbarch-selftests.c: New file.
6798 * regcache.h (regcache) <~regcache>: Mark it virtual if
6799 GDB_SELF_TEST.
6800 <raw_write>: Likewise.
6801
6802 2017-05-24 Yao Qi <yao.qi@linaro.org>
6803
6804 * regcache.c (current_regcache): Change it to
6805 regcache::current_regcache.
6806 (regcache_observer_target_changed): Update.
6807 (regcache_thread_ptid_changed): Make it a regcache static
6808 method.
6809 (regcache_thread_ptid_changed): Update.
6810 (class regcache_access): New.
6811 (current_regcache_test): Update.
6812 (_initialize_regcache): Update.
6813 * regcache.h: Include forward_list.
6814 (regcache): Declare regcache_thread_ptid_changed and declare
6815 registers_changed_ptid as friend.
6816
6817 2017-05-24 Yao Qi <yao.qi@linaro.org>
6818
6819 * i387-tdep.c (i387_register_to_value): Use register_size
6820 instead of TYPE_LENGTH.
6821 * m68k-tdep.c (m68k_register_to_value): Likewise.
6822
6823 2017-05-24 Yao Qi <yao.qi@linaro.org>
6824
6825 * i387-tdep.c (i387_convert_register_p): Return false if type
6826 code isn't TYPE_CODE_FLT.
6827
6828 2017-05-24 Yao Qi <yao.qi@linaro.org>
6829
6830 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6831 length is 4.
6832 (alpha_register_to_value): Remove type length check.
6833 (alpha_value_to_register): Likewise.
6834
6835 2017-05-24 Yao Qi <yao.qi@linaro.org>
6836
6837 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6838 TYPE_CODE_FLT.
6839
6840 2017-05-24 Yao Qi <yao.qi@linaro.org>
6841
6842 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6843 TYPE_CODE_FLT or not.
6844
6845 2017-05-24 Yao Qi <yao.qi@linaro.org>
6846
6847 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6848 * avr-tdep.c (avr_gdbarch_init): Likewise.
6849 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6850 * cris-tdep.c (cris_gdbarch_init): Likewise.
6851 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6852 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6853 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6854 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6855 * mep-tdep.c (mep_gdbarch_init): Likewise.
6856 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6857 * mips-tdep.c (mips_gdbarch_init): Likewise.
6858 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6859 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6860 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6861 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6862 * v850-tdep.c (v850_gdbarch_init): Likewise.
6863
6864 2017-05-24 Yao Qi <yao.qi@linaro.org>
6865
6866 * selftest-arch.c (tests_with_arch): Call registers_changed
6867 and reinit_frame_cache.
6868 * selftest.c (run_self_tests): Likewise.
6869
6870 2017-05-24 Yao Qi <yao.qi@linaro.org>
6871
6872 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6873 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6874
6875 2017-05-24 Yao Qi <yao.qi@linaro.org>
6876
6877 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6878 set_gdbarch_print_insn.
6879
6880 2017-05-24 Yao Qi <yao.qi@linaro.org>
6881
6882 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6883 set_gdbarch_print_insn.
6884
6885 2017-05-24 Yao Qi <yao.qi@linaro.org>
6886
6887 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6888 set_gdbarch_print_insn.
6889 * arc-tdep.c (arc_gdbarch_init): Likewise.
6890 * arch-utils.c: include dis-asm.h.
6891 (default_print_insn): New function.
6892 * arch-utils.h (default_print_insn): Declare.
6893 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6894 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6895 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6896 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6897 * frv-tdep.c (frv_gdbarch_init): Likewise.
6898 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6899 * gdbarch.sh (print_insn): Use default_print_insn.
6900 * gdbarch.c: Regenerated.
6901 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6902 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6903 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6904 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6905 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6906 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6907 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6908 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6909 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6910 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6911 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6912 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6913 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6914 * mt-tdep.c (mt_gdbarch_init): Likewise.
6915 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6916 * nios2-tdep.c (nios2_print_insn): Remove.
6917 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6918 * rx-tdep.c (rx_gdbarch_init): Likewise.
6919 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6920 * score-tdep.c (score_print_insn): Remove.
6921 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6922 * sh-tdep.c (sh_gdbarch_init): Likewise.
6923 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6924 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6925 * tic6x-tdep.c (tic6x_print_insn): Remove.
6926 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6927 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6928 * v850-tdep.c (v850_gdbarch_init): Likewise.
6929 * vax-tdep.c (vax_gdbarch_init): Likewise.
6930 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6931 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6932
6933 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6934
6935 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6936 (MIPS_FP0_REGNUM): Remove.
6937 (MIPS_FSR_REGNUM): Remove.
6938 (mips_fbsd_supply_fpregs): Use mips_regnum.
6939 (mips_fbsd_supply_gregs): Likewise.
6940 (mips_fbsd_collect_fpregs): Likewise.
6941 (mips_fbsd_collect_gregs): Likewise.
6942
6943 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6944
6945 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6946 (getpfpregs_supplies): New function.
6947 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6948 getfpregs_supplies.
6949 (mips_fbsd_store_inferior_registers): Likewise.
6950
6951 2017-05-22 Pedro Alves <palves@redhat.com>
6952
6953 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6954 maintainer.
6955
6956 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6957
6958 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6959 (store_register): Likewise.
6960 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6961 (get_decimal_float_return_value): Likewise.
6962 (do_ppc_sysv_return_value): Likewise.
6963 (ppc64_sysv_abi_push_integer): Likewise.
6964 (ppc64_sysv_abi_push_freg): Likewise.
6965 (ppc64_sysv_abi_return_value_base): Likewise.
6966 (ppc64_sysv_abi_return_value): Likewise.
6967 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6968 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6969 * rs6000-nat.c: Likewise.
6970 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6971 (rs6000_value_to_register): Likewise.
6972 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6973
6974 2017-05-21 Tom Tromey <tom@tromey.com>
6975
6976 PR rust/21466:
6977 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6978 arrays as "[T]", not "[T; ]".
6979
6980 2017-05-19 Tom Tromey <tom@tromey.com>
6981
6982 PR rust/21484:
6983 * rust-lang.c (exp_descriptor_rust): New function.
6984 (rust_language_defn): Use it.
6985 * p-lang.c (pascal_language_defn): Update.
6986 * opencl-lang.c (opencl_language_defn): Update.
6987 * objc-lang.c (objc_language_defn): Update.
6988 * m2-lang.c (m2_language_defn): Update.
6989 * language.h (struct language_defn)
6990 <la_watch_location_expression>: New member.
6991 * language.c (unknown_language_defn, auto_language_defn)
6992 (local_language_defn): Update.
6993 * go-lang.c (go_language_defn): Update.
6994 * f-lang.c (f_language_defn): Update.
6995 * d-lang.c (d_language_defn): Update.
6996 * c-lang.h (c_watch_location_expression): Declare.
6997 * c-lang.c (c_watch_location_expression): New function.
6998 (c_language_defn, cplus_language_defn, asm_language_defn)
6999 (minimal_language_defn): Use it.
7000 * breakpoint.c (watch_command_1): Call
7001 la_watch_location_expression.
7002 * ada-lang.c (ada_language_defn): Update.
7003
7004 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7005
7006 PR tui/21482
7007 * gdb_curses.h (NOMACROS): Define.
7008 (NCURSES_NOMACROS): Define.
7009
7010 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7011
7012 PR tui/21482
7013 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7014 arg to char *.
7015 * tui/tui-wingeneral.c (box_win): Likewise.
7016 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7017 (tui_show_source_line): Likewise.
7018 (tui_show_exec_info_content): Likewise.
7019
7020 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7021
7022 * sparc-tdep.c (sparc_structure_return_p)
7023 (sparc_arg_on_registers_p): New functions.
7024 (sparc32_store_arguments): Use them.
7025 * sparc64-tdep.c (sparc64_16_byte_align_p)
7026 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7027 Handle TYPE_CODE_ARRAY.
7028
7029 2017-05-17 Yao Qi <yao.qi@linaro.org>
7030
7031 * cli/cli-decode.c (add_alias_cmd): New function.
7032 * command.h (add_alias_cmd): Declare.
7033 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7034 instead call add_alias_cmd.
7035
7036 2017-05-17 Pedro Alves <palves@redhat.com>
7037
7038 * Makefile.in (nat_extra_makefile_frag): Rename to ...
7039 (nat_makefile_frag): ... this. All references updated.
7040 * configure.ac: Likewise.
7041 * configure.nat: Likewise. Enhance comments.
7042 * configure: Regenerate.
7043
7044 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7045
7046 * procfs.c (procfs_create_inferior): Change prototype to match
7047 definition.
7048
7049 2017-05-13 Eli Zaretskii <eliz@gnu.org>
7050
7051 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7052 C++ compiler warning.
7053
7054 2017-05-12 Tom Tromey <tom@tromey.com>
7055
7056 PR rust/21483:
7057 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7058 recurse, just call value_struct_elt directly.
7059
7060 2017-05-12 Tom Tromey <tom@tromey.com>
7061
7062 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7063 OP_RUST_ARRAY>: Fix.
7064
7065 2017-05-12 Tom Tromey <tom@tromey.com>
7066
7067 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7068
7069 2017-05-09 Yao Qi <yao.qi@linaro.org>
7070
7071 * regcache.c: Include <forward_list>.
7072 (struct regcache_list): Remove.
7073 (current_regcache): Update.
7074 (get_thread_arch_aspace_regcache): Update for std::forward_list.
7075 (regcache_thread_ptid_changed): Likewise.
7076 (registers_changed_ptid): Likewise.
7077 (current_regcache_size): Likewise.
7078
7079 2017-05-09 Yao Qi <yao.qi@linaro.org>
7080
7081 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7082 (current_regcache_size): New function.
7083 (current_regcache_test): New function.
7084 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7085
7086 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7087
7088 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7089 (print_gp_register_row): Use get_frame_register_value.
7090
7091 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7092
7093 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7094 (mips_supply_fpregset): Likewise.
7095 (mips64_supply_gregset): Likewise.
7096
7097 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7098
7099 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
7100 regcache->raw_supply_zeroed.
7101
7102 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7103
7104 * configure.nat: Rearrange 'case' statements to match
7105 host before cpu.
7106
7107 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7108
7109 * Makefile.in: Remove "@host_makefile_frag@". Add variables
7110 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7111 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
7112 "@nat_extra_makefile_frag@".
7113 (Makefile): Remove dependency on "@frags@".
7114 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7115 (data-directory/Makefile): Likewise.
7116 * config/aarch64/linux.mh: Deleted; moved contents to
7117 "gdb/configure.nat".
7118 * config/alpha/alpha-linux.mh: Likewise.
7119 * config/alpha/nbsd.mh: Likewise.
7120 * config/arm/linux.mh: Likewise.
7121 * config/arm/nbsdelf.mh: Likewise.
7122 * config/i386/cygwin.mh: Likewise.
7123 * config/i386/cygwin64.mh: Likewise.
7124 * config/i386/darwin.mh: Likewise.
7125 * config/i386/fbsd.mh: Likewise.
7126 * config/i386/fbsd64.mh: Likewise.
7127 * config/i386/go32.mh: Likewise.
7128 * config/i386/i386gnu.mh: Likewise.
7129 * config/i386/i386sol2.mh: Likewise.
7130 * config/i386/linux.mh: Likewise.
7131 * config/i386/linux64.mh: Likewise.
7132 * config/i386/mingw.mh: Likewise.
7133 * config/i386/mingw64.mh: Likewise.
7134 * config/i386/nbsd64.mh: Likewise.
7135 * config/i386/nbsdelf.mh: Likewise.
7136 * config/i386/nto.mh: Likewise.
7137 * config/i386/obsd.mh: Likewise.
7138 * config/i386/obsd64.mh: Likewise.
7139 * config/i386/sol2-64.mh: Likewise.
7140 * config/ia64/linux.mh: Likewise.
7141 * config/m32r/linux.mh: Likewise.
7142 * config/m68k/linux.mh: Likewise.
7143 * config/m68k/nbsdelf.mh: Likewise.
7144 * config/m68k/obsd.mh: Likewise.
7145 * config/m88k/obsd.mh: Likewise.
7146 * config/mips/fbsd.mh: Likewise.
7147 * config/mips/linux.mh: Likewise.
7148 * config/mips/nbsd.mh: Likewise.
7149 * config/mips/obsd64.mh: Likewise.
7150 * config/pa/linux.mh: Likewise.
7151 * config/pa/nbsd.mh: Likewise.
7152 * config/pa/obsd.mh: Likewise.
7153 * config/powerpc/aix.mh: Likewise.
7154 * config/powerpc/fbsd.mh: Likewise.
7155 * config/powerpc/linux.mh: Likewise.
7156 * config/powerpc/nbsd.mh: Likewise.
7157 * config/powerpc/obsd.mh: Likewise.
7158 * config/powerpc/ppc64-linux.mh: Likewise.
7159 * config/powerpc/spu-linux.mh: Likewise.
7160 * config/s390/linux.mh: Likewise.
7161 * config/sh/nbsd.mh: Likewise.
7162 * config/sparc/fbsd.mh: Likewise.
7163 * config/sparc/linux.mh: Likewise.
7164 * config/sparc/linux64.mh: Likewise.
7165 * config/sparc/nbsd64.mh: Likewise.
7166 * config/sparc/nbsdelf.mh: Likewise.
7167 * config/sparc/obsd64.mh: Likewise.
7168 * config/sparc/sol2.mh: Likewise.
7169 * config/tilegx/linux.mh: Likewise.
7170 * config/vax/nbsdelf.mh: Likewise.
7171 * config/vax/obsd.mh: Likewise.
7172 * config/xtensa/linux.mh: Likewise.
7173 * config/i386/i386gnu.mn: New file, with excerpts from
7174 "config/i386/i386gnu.mh".
7175 * configure: Regenerate.
7176 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7177 *.mh files under "gdb/config".
7178 * configure.nat: New file, with contents from the
7179 "gdb/config/*/*.mh" files.
7180
7181 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
7182
7183 * btrace.c (btrace_clear): Free insn vector.
7184
7185 2017-05-05 Pedro Alves <palves@redhat.com>
7186
7187 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7188 * configure: Regenerate.
7189
7190 2017-05-04 Pedro Alves <palves@redhat.com>
7191
7192 * Makefile.in (SFILES): Add progspace-and-thread.c.
7193 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7194 (COMMON_OBS): Add progspace-and-thread.o.
7195 * breakpoint.c: Include "progspace-and-thread.h".
7196 (update_inserted_breakpoint_locations)
7197 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7198 Use scoped_restore_current_pspace_and_thread.
7199 (create_std_terminate_master_breakpoint): Use
7200 scoped_restore_current_program_space.
7201 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7202 (print_breakpoint_location): Use
7203 scoped_restore_current_program_space.
7204 (bp_loc_is_permanent): Use
7205 scoped_restore_current_pspace_and_thread.
7206 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7207 (download_tracepoint_locations): Use
7208 scoped_restore_current_pspace_and_thread.
7209 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7210 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7211 (enum step_over_calls_kind): Moved from inferior.h.
7212 (class scoped_restore_current_thread): New class.
7213 * gdbthread.h (make_cleanup_restore_current_thread): Delete
7214 declaration.
7215 (scoped_restore_current_thread): New class.
7216 * infcmd.c: Include "common/gdb_optional.h".
7217 (continue_1, proceed_after_attach): Use
7218 scoped_restore_current_thread.
7219 (notice_new_inferior): Use scoped_restore_current_thread.
7220 * inferior.c: Include "progspace-and-thread.h".
7221 (restore_inferior, save_current_inferior): Delete.
7222 (add_inferior_command, clone_inferior_command): Use
7223 scoped_restore_current_pspace_and_thread.
7224 * inferior.h (scoped_restore_current_inferior): New class.
7225 * infrun.c: Include "progspace-and-thread.h" and
7226 "common/gdb_optional.h".
7227 (follow_fork_inferior): Use
7228 scoped_restore_current_pspace_and_thread.
7229 (scoped_restore_exited_inferior): New class.
7230 (handle_vfork_child_exec_or_exit): Use
7231 scoped_restore_exited_inferior,
7232 scoped_restore_current_pspace_and_thread,
7233 scoped_restore_current_thread and scoped_restore.
7234 (fetch_inferior_event): Use scoped_restore_current_thread.
7235 * linespec.c (decode_line_full, decode_line_1): Use
7236 scoped_restore_current_program_space.
7237 * mi/mi-main.c: Include "progspace-and-thread.h".
7238 (exec_continue): Use scoped_restore_current_thread.
7239 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7240 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7241 * proc-service.c (ps_pglobal_lookup): Use
7242 scoped_restore_current_program_space.
7243 * progspace-and-thread.c: New file.
7244 * progspace-and-thread.h: New file.
7245 * progspace.c (release_program_space, clone_program_space): Use
7246 scoped_restore_current_program_space.
7247 (restore_program_space, save_current_program_space)
7248 (save_current_space_and_thread): Delete.
7249 (switch_to_program_space_and_thread): Moved to
7250 progspace-and-thread.c.
7251 * progspace.h (save_current_program_space)
7252 (save_current_space_and_thread): Delete declarations.
7253 (scoped_restore_current_program_space): New class.
7254 * remote.c (remote_btrace_maybe_reopen): Use
7255 scoped_restore_current_thread.
7256 * symtab.c: Include "progspace-and-thread.h".
7257 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7258 * thread.c (print_thread_info_1): Use
7259 scoped_restore_current_thread.
7260 (struct current_thread_cleanup): Delete.
7261 (do_restore_current_thread_cleanup)
7262 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7263 (scoped_restore_current_thread::~scoped_restore_current_thread):
7264 ... this new dtor.
7265 (make_cleanup_restore_current_thread): Rename/convert to ...
7266 (scoped_restore_current_thread::scoped_restore_current_thread):
7267 ... this new ctor.
7268 (thread_apply_all_command): Use scoped_restore_current_thread.
7269 (thread_apply_command): Use scoped_restore_current_thread.
7270 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7271 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7272
7273 2017-05-04 Pedro Alves <palves@redhat.com>
7274
7275 * thread.c (make_cleanup_restore_current_thread): Move
7276 find_thread_ptid call before the is_stopped call. Assert that the
7277 thread is found. Replace is_stopped call by checking the thread's
7278 state directly. Remove unnecessary NULL-thread check.
7279
7280 2017-05-04 Pedro Alves <palves@redhat.com>
7281
7282 * corelow.c (thread_section_name): New class.
7283 (get_core_register_section, get_core_siginfo): Use it.
7284
7285 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7286
7287 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7288 (get_core_register_section): Remove xfree of NULL pointer.
7289
7290 2017-05-03 Alan Hayward <alan.hayward@arm.com>
7291
7292 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7293 * regcache.c (regcache::raw_supply_zeroed): New function.
7294 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7295
7296 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7297
7298 * gdbarch.sh: Remove commented out definition of
7299 TARGET_CHAR_BIT.
7300 * gdbarch.h: Re-generate.
7301
7302 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7303
7304 * configure: Regenerate.
7305
7306 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7307
7308 * solib-target.c (solib_target_relocate_section_addresses):
7309 Remove num_section_bases, num_bases, segment_bases variables.
7310
7311 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7312
7313 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7314
7315 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7316
7317 * solib-target.c: Include <vector>
7318 (struct lm_info_target) <~lm_info_target>: Remove.
7319 <segment_bases, section_bases>: Change type to
7320 std::vector<CORE_ADDR>.
7321 (library_list_start_segment, library_list_start_section,
7322 library_list_end_library,
7323 solib_target_relocate_section_addresses): Adjust.
7324
7325 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7326
7327 * gdbarch.sh (software_single_step): Change return type to
7328 std::vector<CORE_ADDR>.
7329 * gdbarch.c, gdbarch.h: Re-generate.
7330 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7331 Adjust.
7332 (arm_deal_with_atomic_sequence_raw): Adjust.
7333 (thumb_get_next_pcs_raw): Adjust.
7334 (arm_get_next_pcs_raw): Adjust.
7335 (arm_get_next_pcs): Adjust.
7336 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7337 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7338 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7339 (alpha_software_single_step): Adjust.
7340 * alpha-tdep.h (alpha_software_single_step): Adjust.
7341 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7342 * arm-tdep.c (arm_software_single_step): Adjust.
7343 (arm_breakpoint_kind_from_current_state): Adjust.
7344 * arm-tdep.h (arm_software_single_step): Adjust.
7345 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7346 * cris-tdep.c (cris_software_single_step): Adjust.
7347 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7348 (micromips_deal_with_atomic_sequence): Adjust.
7349 (deal_with_atomic_sequence): Adjust.
7350 (mips_software_single_step): Adjust.
7351 * mips-tdep.h (mips_software_single_step): Adjust.
7352 * moxie-tdep.c (moxie_software_single_step): Adjust.
7353 * nios2-tdep.c (nios2_software_single_step): Adjust.
7354 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7355 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7356 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7357 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7358 * sparc-tdep.c (sparc_software_single_step): Adjust.
7359 * spu-tdep.c (spu_software_single_step): Adjust.
7360 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7361
7362 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7363
7364 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7365 * gdbarch.h: Re-generate.
7366
7367 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7368
7369 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7370 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7371 * python/py-instruction.c, python/py-instruction.h: New file.
7372 * python/py-record.c: Add py-instruction.h include.
7373 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7374 gdb.RecordInstruction.
7375 * python/python-internal.h: Add gdbpy_initialize_instruction
7376 declaration.
7377 * python/python.c (do_start_initialization): Add
7378 gdbpy_initialize_instruction.
7379
7380 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7381
7382 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7383 Remove.
7384 (btrace_func_from_recpy_func): New function.
7385 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7386 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7387 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7388 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7389 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7390 Also, use new helper functions.
7391 (btpy_list_item): Use new helper functions.
7392 (recpy_bt_function_call_history): Use new type name.
7393 (btpy_call_getset): Remove.
7394 (gdbpy_initialize_btrace): Remove code to initialize
7395 gdb.BtraceFunctionCall.
7396 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7397 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7398 recpy_bt_func_prev, recpy_bt_func_next): New export.
7399 * python/py-record.c (recpy_func_type): New static object.
7400 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7401 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7402 recpy_func_next): New function.
7403 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7404 (recpy_func_getset): New static object.
7405 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7406 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7407
7408 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7409
7410 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7411 (btpy_object, btpy_insn_type, btpy_new): Remove.
7412 (btpy_list_object): Use gdb.RecordInstruction type instead of
7413 gdb.BtraceInstruction type.
7414 (btrace_insn_from_recpy_insn): New function.
7415 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7416 btpy_new.
7417 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7418 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7419 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7420 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7421 instead of btpy_object.
7422 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7423 btpy_insn_data, btpy_insn_decode): Rename to ...
7424 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7425 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7426 recpy_bt_insn_decode): This. Also, use new helper functions.
7427 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7428 recpy_insn_type.
7429 (btpy_insn_getset): Remove.
7430 (gdbpy_initialize_btrace): Remove code to initialize
7431 gdb.BtraceInstruction. Use recpy_element_object.
7432 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7433 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7434 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7435 * python/py-record.c (recpy_insn_type): New static object.
7436 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7437 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7438 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7439 New function.
7440 (recpy_insn_getset): New static object.
7441 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7442 * python/py-record.h (recpy_element_object): New typedef.
7443 (recpy_insn_type, recpy_insn_new): New export.
7444
7445 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7446
7447 * py-record-btrace.c (btpy_insn_new): Removed.
7448 (btpy_insn_or_gap_new): New function.
7449 (btpy_insn_error): Removed.
7450 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7451 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7452 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7453 btpy_insn_or_gap_new instead of btpy_insn_new.
7454 (btpy_insn_getset): Remove btpy_insn_error.
7455 * py-record.c (recpy_gap_type): New static object.
7456 (recpy_gap_object): New typedef.
7457 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7458 recpy_gap_reason_string): New function.
7459 (recpy_gap_getset): New static object.
7460 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7461 * py-record.h (recpy_gap_new): New export.
7462
7463 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7464
7465 * python/py-record.c (recpy_ptid): Remove.
7466 (recpy_record_getset): Remove recpy_ptid.
7467
7468 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7469
7470 * btrace.c (btrace_fetch): Set inferior_ptid.
7471 * python/py-record-btrace.c: Add "py-record.h" include.
7472 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7473 recpy_bt_end, recpy_bt_instruction_history,
7474 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7475 in gdb.Record object instead of current ptid.
7476 * python/py-record.c: Include new "py-record.h" file.
7477 (recpy_record_object): Moved to py-record.h.
7478 * python/py-record.h: New file.
7479
7480 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7481
7482 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7483 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7484 indentation.
7485
7486 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7487
7488 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7489 the past maintainers section.
7490
7491 2017-04-28 Yao Qi <yao.qi@linaro.org>
7492
7493 * infcmd.c (get_return_value): Use regcache ctor, and remove
7494 cleanup.
7495
7496 2017-04-28 Yao Qi <yao.qi@linaro.org>
7497 Pedro Alves <palves@redhat.com>
7498
7499 * regcache.c (regcache::regcache): New tag dispatch ctor.
7500 (do_cooked_read): Moved above.
7501 (regcache_dup): Use the tag dispatch ctor..
7502 * regcache.h (regcache): Declare ctor, delete copy ctor and
7503 assignment operator, remove friend regcache_dup.
7504
7505 2017-04-28 Yao Qi <yao.qi@linaro.org>
7506
7507 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7508 call method save instead of regcache_cpy.
7509 * regcache.h (struct regcache): Make regcache_dup a friend.
7510
7511 2017-04-28 Yao Qi <yao.qi@linaro.org>
7512
7513 * regcache.c (struct regcache): Move to regcache.h
7514 (regcache::arch): New method.
7515 (regcache_get_ptid): Update.
7516 (get_regcache_arch): Call arch method.
7517 (get_regcache_aspace): Call method aspace.
7518 (register_buffer): Change it to method.
7519 (regcache_save): Change it to regcache::save.
7520 (regcache_restore): Likewise.
7521 (regcache_cpy_no_passthrough): Remove the declaration.
7522 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7523 (regcache_cpy_no_passthrough): Change it to method
7524 cpy_no_passthrough.
7525 (regcache_register_status): Change it to method
7526 get_register_status.
7527 (regcache_invalidate): Change it to method invalidate.
7528 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7529 (regcache_raw_update): Change it to method raw_update.
7530 (regcache_raw_read): Likewise.
7531 (regcache_raw_read_signed): Likewise.
7532 (regcache_raw_read_unsigned): Likewise.
7533 (regcache_raw_write_signed): Likewise.
7534 (regcache_raw_write_unsigned): Likewise.
7535 (regcache_cooked_read): Likewise.
7536 (regcache_cooked_read_value): Likewise.
7537 (regcache_cooked_read_signed): Likewise.
7538 (regcache_cooked_read_unsigned): Likewise.
7539 (regcache_cooked_write_signed): Likewise.
7540 (regcache_cooked_write_unsigned): Likewise.
7541 (regcache_raw_set_cached_value): Likewise.
7542 (regcache_raw_write): Likewise.
7543 (regcache_cooked_write): Likewise.
7544 (regcache_xfer_part): Likewise.
7545 (regcache_raw_read_part): Likewise.
7546 (regcache_raw_write_part): Likewise.
7547 (regcache_cooked_read_part): Likewise.
7548 (regcache_cooked_write_part): Likewise.
7549 (regcache_raw_supply): Likewise.
7550 (regcache_raw_collect): Likewise.
7551 (regcache_transfer_regset): Likewise.
7552 (regcache_supply_regset): Likewise.
7553 (regcache_collect_regset): Likewise.
7554 (regcache_debug_print_register): Likewise.
7555 (enum regcache_dump_what): Move it to regcache.h.
7556 (regcache_dump): Change it to method dump.
7557 * regcache.h (enum regcache_dump_what): New.
7558 (class regcache): New.
7559 * target.c (target_fetch_registers): Call method
7560 debug_print_register.
7561 (target_store_registers): Likewise.
7562
7563 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7564
7565 * windows-nat.c (struct lm_info_windows): Initialize field.
7566 (windows_make_so): Allocate lm_info_windows with new.
7567 (windows_free_so): Free lm_info_windows with delete.
7568
7569 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7570
7571 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7572 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7573 cleanup.
7574 (darwin_free_so): Free lm_info_darwin with delete.
7575
7576 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7577
7578 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7579 <l_addr_p>: Change type to bool.
7580 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7581 (svr4_free_so): Free lm_info_svr4 with delete.
7582 (svr4_copy_library_list): Replace memcpy with call to copy
7583 constructor.
7584 (library_list_start_library, svr4_default_sos): Allocate
7585 lm_info_svr4 with new.
7586
7587 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7588
7589 * solib-target.c (struct lm_info_target): Add destructor,
7590 initialize fields.
7591 <name>: Change type to std::string.
7592 (library_list_start_library): Allocate lm_info_target with new.
7593 (solib_target_free_library_list): Free lm_info_target with
7594 delete.
7595 (solib_target_current_sos): Adapt to std::string.
7596 (solib_target_free_so): Free lm_info_target with delete.
7597
7598 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7599
7600 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7601 fields.
7602 (frv_current_sos): Allocate lm_info_frv with new.
7603 (frv_relocate_main_executable): Free lm_info_frv with delete,
7604 allocate with new.
7605 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7606
7607 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7608
7609 * solib-frv.c (struct lm_info_frv): Fix indentation.
7610
7611 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7612
7613 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7614 map field.
7615 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7616 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7617 and allocate with new.
7618 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7619
7620 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7621
7622 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7623 <filename, member_name>: Change type to std::string.
7624 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7625 (library_list_start_library): Allocate lm_info_aix with new.
7626 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7627 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7628 with copy constructor.
7629
7630 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7631
7632 * solist.h (struct lm_info): Remove.
7633 (struct lm_info_base): New class.
7634 (struct so_list) <lm_info>: Change type to lm_info_base *.
7635 * nto-tdep.c (struct lm_info): Remove.
7636 (lm_addr): Adjust.
7637 * solib-aix.c (struct lm_info): Rename to ...
7638 (struct lm_info_aix): ... this. Extend lm_info_base.
7639 (lm_info_p): Rename to ...
7640 (lm_info_aix_p): ... this, and adjust.
7641 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7642 solib_aix_parse_libraries, library_list_start_library,
7643 solib_aix_free_library_list, solib_aix_parse_libraries,
7644 solib_aix_get_library_list,
7645 solib_aix_relocate_section_addresses, solib_aix_free_so,
7646 solib_aix_get_section_offsets,
7647 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7648 Adjust.
7649 (struct solib_aix_inferior_data) <library_list>: Adjust.
7650 * solib-darwin.c (struct lm_info): Rename to ...
7651 (struct lm_info_darwin): ... this. Extend lm_info_base.
7652 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7653 * solib-dsbt.c (struct lm_info): Rename to ...
7654 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7655 (struct dsbt_info) <main_executable_lm_info): Adjust.
7656 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7657 dsbt_relocate_section_addresses): Adjust.
7658 * solib-frv.c (struct lm_info): Rename to ...
7659 (struct lm_info_frv): ... this. Extend lm_info_base.
7660 (main_executable_lm_info): Adjust.
7661 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7662 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7663 find_canonical_descriptor_in_load_object,
7664 frv_fdpic_find_canonical_descriptor): Adjust.
7665 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7666 to lm_info_svr4.
7667 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7668 svr4_clear_so, svr4_copy_library_list,
7669 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7670 svr4_current_sos, svr4_fetch_objfile_link_map,
7671 solist_update_incremental): Adjust.
7672 * solib-svr4.h (struct lm_info_svr4): Move here from
7673 solib-svr4.c.
7674 * solib-target.c (struct lm_info): Rename to ...
7675 (struct lm_info_target): ... this. Extend lm_info_base.
7676 (lm_info_p): Rename to ...
7677 (lm_info_target_p): ... this.
7678 (solib_target_parse_libraries, library_list_start_segment,
7679 library_list_start_section, library_list_start_library,
7680 library_list_end_library, solib_target_free_library_list,
7681 solib_target_current_sos, solib_target_free_so,
7682 solib_target_relocate_section_addresses): Adjust.
7683 * windows-nat.c (struct lm_info): Rename to ...
7684 (struct lm_info_windows): ... this. Extend lm_info_base.
7685 (windows_make_so, handle_load_dll, handle_unload_dll,
7686 windows_xfer_shared_libraries): Adjust.
7687
7688 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7689
7690 * solib-darwin.c (struct darwin_so_list): Remove.
7691 (darwin_current_sos): Allocate an so_list object instead of a
7692 darwin_so_list, separately allocate an lm_info object.
7693 (darwin_free_so): Free lm_info.
7694
7695 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7696
7697 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7698 with fprintf_filtered.
7699
7700 2017-04-28 Yao Qi <yao.qi@linaro.org>
7701
7702 * regcache.c (regcache::regcache): New function.
7703 (regcache::~regcache): New function.
7704 (regcache_xmalloc_1): Remove.
7705 (regcache_xmalloc): Call new regcache.
7706 (regcache_xfree): Call delete regcache.
7707 (get_thread_arch_aspace_regcache): Call new regcache.
7708
7709 2017-04-28 Yao Qi <yao.qi@linaro.org>
7710
7711 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7712 lwp instead of ptid_get_lwp.
7713
7714 2017-04-28 Yao Qi <yao.qi@linaro.org>
7715
7716 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7717 lwp_info instead of getting from inferior_ptid.
7718
7719 2017-04-27 Keith Seitz <keiths@redhat.com>
7720
7721 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7722 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7723 (CV_CONVERSION_BADNESS): Define.
7724 (rank_one_type): Remove overly restrictive rvalue reference
7725 rank checks.
7726 Add cv-qualifier checks and subranks for type equality.
7727 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7728 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7729 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7730
7731 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7732
7733 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7734 count when creating the object.
7735
7736 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7737 Ulrich Weigand <uweigand@de.ibm.com>
7738
7739 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7740 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7741 is used in AIX.
7742 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7743 (process_xcoff_symbol): Likewise.
7744 (scan_xcoff_symtab): Likewise.
7745
7746 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7747
7748 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7749 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7750 (ia64_access_reg): Use get_frame_register_unsigned.
7751 (ia64_access_rse_reg): Likewise.
7752 (ia64_libunwind_frame_prev_register): Likewise.
7753
7754 2017-04-26 Jiong Wang <jiong.wang@arm.com>
7755
7756 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7757 * gdbarch.c: Regenerated.
7758 * gdbarch.h: Regenerated.
7759 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7760 visibility external.
7761 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7762 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7763 (enum cfa_how_kind): Move to ...
7764 (struct dwarf2_frame_state_reg_info): Likewise.
7765 (struct dwarf2_frame_state): Likewise.
7766 * dwarf2-frame.h: ... here.
7767 (dwarf2_frame_state_alloc_regs): New declaration.
7768 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7769 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7770
7771 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7772
7773 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7774 regcache_raw_read_unsigned.
7775 (xtensa_pseudo_register_write): Likewise.
7776
7777 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7778
7779 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7780 (nds32_pseudo_register_write): Likewise.
7781
7782 2017-04-25 Yao Qi <yao.qi@linaro.org>
7783
7784 * regcache.c (struct regcache) <readonly_p>: Change its type
7785 to bool.
7786 (regcache_xmalloc_1): Update parameter type and callers update.
7787
7788 2017-04-25 Yao Qi <yao.qi@linaro.org>
7789
7790 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7791 set_gdbarch_wchar_bit.
7792 * arm-tdep.c (arm_gdbarch_init): Likewise.
7793
7794 2017-04-25 Pedro Alves <palves@redhat.com>
7795
7796 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7797 (BothAreRelocatable, memcopy, memmove): Don't define.
7798 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7799 macros.
7800
7801 2017-04-25 Pedro Alves <palves@redhat.com>
7802
7803 * common/common-defs.h: Include "common/poison.h".
7804 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7805 and adjust.
7806 * common/poison.h: New file.
7807 * common/traits.h: Include <type_traits>.
7808 (Not, Or, Requires): New, moved from common/function-view.h.
7809
7810 2017-04-25 Pedro Alves <palves@redhat.com>
7811
7812 * breakpoint.h (struct breakpoint): In-class initialize all
7813 fields. Make boolean fields "bool".
7814 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7815 memset call and initializations no longer necessary.
7816
7817 2017-04-25 Pedro Alves <palves@redhat.com>
7818
7819 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7820 reference.
7821 (pt_btrace_insn): New function.
7822 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7823
7824 2017-04-25 Pedro Alves <palves@redhat.com>
7825
7826 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7827 "base" field and inherit from "bp_location" instead. Add
7828 non-default ctor.
7829 (allocate_location_exception): Use new non-default ctor.
7830 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7831 (init_bp_location): Convert to ...
7832 (bp_location::bp_location): ... this new ctor, and remove memset
7833 call.
7834 (base_breakpoint_allocate_location): Use the new non-default ctor.
7835 * breakpoint.h (bp_location): Now a class. Declare default and
7836 non-default ctors. In-class initialize all members.
7837 (init_bp_location): Remove declaration.
7838
7839 2017-04-25 Pedro Alves <palves@redhat.com>
7840
7841 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7842 assignment operator.
7843
7844 2017-04-24 Yao Qi <yao.qi@linaro.org>
7845
7846 * doublest.c (convert_doublest_to_floatformat): Call
7847 floatformat_totalsize_bytes.
7848
7849 2017-04-22 Tom Tromey <tom@tromey.com>
7850
7851 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7852 ui_out_emit_list.
7853 * stack.c (print_frame): Use ui_out_emit_list.
7854 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7855 ui_out_emit_list.
7856 * mi/mi-main.c (print_one_inferior)
7857 (mi_cmd_data_list_register_names)
7858 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7859 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7860 ui_out_emit_list.
7861 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7862 (mi_output_solib_attribs): Use ui_out_emit_list,
7863 ui_out_emit_tuple.
7864 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7865 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7866 (mi_cmd_stack_list_args, list_args_or_locals): Use
7867 ui_out_emit_list.
7868 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7869 * breakpoint.c (print_solib_event, output_thread_groups): Use
7870 ui_out_emit_list.
7871
7872 2017-04-22 Tom Tromey <tom@tromey.com>
7873
7874 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7875 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7876 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7877
7878 2017-04-22 Tom Tromey <tom@tromey.com>
7879
7880 * tracepoint.c (tvariables_info_1)
7881 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7882
7883 2017-04-22 Tom Tromey <tom@tromey.com>
7884
7885 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7886 annotate_arg_emitter.
7887 * breakpoint.c (print_mention_watchpoint)
7888 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7889 * annotate.h (struct annotate_arg_emitter): New.
7890
7891 2017-04-22 Tom Tromey <tom@tromey.com>
7892
7893 * record-btrace.c (record_btrace_insn_history)
7894 (record_btrace_insn_history_range, record_btrace_call_history)
7895 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7896 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7897 ui_out_emit_tuple.
7898 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7899 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7900 * skip.c (skip_info): Use ui_out_emit_tuple.
7901 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7902 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7903 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7904 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7905 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7906 ui_out_emit_tuple.
7907 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7908 (output_register, mi_cmd_data_read_memory)
7909 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7910 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7911 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7912 Use ui_out_emit_tuple.
7913 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7914 ui_out_emit_tuple.
7915 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7916 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7917 * linux-thread-db.c (info_auto_load_libthread_db): Use
7918 ui_out_emit_tuple.
7919 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7920 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7921 * disasm.c (do_mixed_source_and_assembly_deprecated)
7922 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7923 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7924 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7925 * breakpoint.c (print_one_breakpoint_location)
7926 (print_one_breakpoint): Use ui_out_emit_tuple.
7927 * auto-load.c (print_script, info_auto_load_cmd): Use
7928 ui_out_emit_tuple.
7929 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7930
7931 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7932
7933 * thread.c (print_thread_info_1): Remove dead code.
7934
7935 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7936
7937 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7938 GDB_SELF_TEST.
7939 * arm-tdep.c (selftests::arm_record_test): Likewise.
7940
7941 2017-04-21 Yao Qi <yao.qi@linaro.org>
7942
7943 * regcache.c (regcache_restore): Remove argument 2. Replace
7944 argument 3 with regcache. Get register status from
7945 src->register_status and get register contents from
7946 register_buffer (src, regnum).
7947 (regcache_cpy): Update.
7948
7949 2017-04-19 Pedro Alves <palves@redhat.com>
7950
7951 * gdbthread.h (thread): Add missing closing parenthesis in
7952 comment.
7953
7954 2017-04-19 Pedro Alves <palves@redhat.com>
7955
7956 * common/refcounted-object.h: New file.
7957 * gdbthread.h: Include "common/refcounted-object.h".
7958 (thread_info): Inherit from refcounted_object and add comments.
7959 (thread_info::incref, thread_info::decref)
7960 (thread_info::m_refcount): Delete.
7961 (thread_info::deletable): Use the refcounted_object::refcount()
7962 method.
7963 * inferior.c (current_inferior_): Add comment.
7964 (set_current_inferior): Increment/decrement refcounts.
7965 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7966 not-deletable instead of comparing with the current inferior.
7967 (initialize_inferiors): Increment the initial inferior's refcount.
7968 * inferior.h (struct inferior): Forward declare.
7969 Include "common/refcounted-object.h".
7970 (current_inferior, set_current_inferior): Move declaration to
7971 before struct inferior's definition, and fix comment.
7972 (inferior): Inherit from refcounted_object. Add comments.
7973 * thread.c (switch_to_thread_no_regs): Reference the thread's
7974 inferior pointer directly instead of doing a ptid lookup.
7975 (switch_to_no_thread): New function.
7976 (switch_to_thread(thread_info *)): New function, factored out
7977 from ...
7978 (switch_to_thread(ptid_t)): ... this.
7979 (restore_current_thread): Delete.
7980 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7981 fields, and add 'inf' field.
7982 (do_restore_current_thread_cleanup): Check whether old->inf is
7983 alive instead of looking up an inferior by ptid. Use
7984 switch_to_thread and switch_to_no_thread.
7985 (restore_current_thread_cleanup_dtor): Use old->inf directly
7986 instead of lookup up an inferior by id. Decref the inferior.
7987 Don't restore 'removable'.
7988 (make_cleanup_restore_current_thread): Same the inferior pointer
7989 in old, instead of the inferior number. Incref the inferior.
7990 Don't save/clear 'removable'.
7991
7992 2017-04-19 Pedro Alves <palves@redhat.com>
7993
7994 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7995 unittests/scoped_restore-selftests.c.
7996 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7997 * common/scoped_restore.h (scoped_restore_base): Make "class".
7998 (scoped_restore_base::release): New public method.
7999 (scoped_restore_base::scoped_restore_base): New protected ctor.
8000 (scoped_restore_base::m_saved_var): New protected field.
8001 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8002 scoped_restore_base base class instead of m_saved_var directly.
8003 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8004 (scoped_restore_tmpl::scoped_restore_tmpl(const
8005 scoped_restore_tmpl<T>&)): Likewise.
8006 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8007 method.
8008 (scoped_restore_tmpl::saved_var): New method.
8009 (scoped_restore_tmpl::m_saved_var): Delete.
8010 * inferior.h (inferior::detaching): Now a bool.
8011 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8012 cleanup.
8013 * unittests/scoped_restore-selftests.c: New file.
8014
8015 2017-04-19 Pedro Alves <palves@redhat.com>
8016
8017 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8018 Re-sort in alphabetic order.
8019
8020 2017-04-18 Pedro Alves <palves@redhat.com>
8021
8022 * xml-support.c (obstack_xml_printf): Delete.
8023 * xml-support.h (obstack_xml_printf): Delete.
8024
8025 2017-04-18 Pedro Alves <palves@redhat.com>
8026
8027 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8028 vdebug, verror, body_text, start_element, end_element, name,
8029 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8030 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8031 is_xinclude>: Make private and add m_ prefix.
8032 (gdb_xml_parser::body_text): New method, based on ...
8033 (gdb_xml_body_text): ... this. Adjust.
8034 (gdb_xml_parser::vdebug): New method, based on ...
8035 (gdb_xml_debug): ... this. Adjust.
8036 (gdb_xml_parser::verror): New method, based on ...
8037 (gdb_xml_error): ... this. Adjust.
8038 (gdb_xml_parser::start_element): New method, based on ...
8039 (gdb_xml_start_element): ... this. Adjust.
8040 (gdb_xml_start_element_wrapper): Defer to
8041 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8042 (gdb_xml_parser::end_element): New method, based on ...
8043 (gdb_xml_end_element_wrapper): ... this. Adjust.
8044 (gdb_xml_parser::~gdb_xml_parser): Adjust.
8045 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8046 (gdb_xml_parser::use_dtd): New method, based on ...
8047 (gdb_xml_use_dtd): ... this. Adjust.
8048 (gdb_xml_parser::parse): New method, based on ...
8049 (gdb_xml_parse): ... this. Adjust.
8050 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8051 (xinclude_start_include): Adjust to call the parser's name method.
8052 (xml_xinclude_default, xml_xinclude_start_doctype)
8053 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8054 method.
8055 (xml_process_xincludes): Adjust to call parser methods.
8056 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8057 declarations.
8058
8059 2017-04-18 Pedro Alves <palves@redhat.com>
8060
8061 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8062 gdb::optional<std::string>.
8063 * xml-support.c: Include <string>.
8064 (scope_level::scope_level(scope_level &&))
8065 (scope_level::~scope_level): Delete.
8066 (scope_level::body): Now a std::string.
8067 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8068 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8069 parameter.
8070 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8071 (xinclude_parsing_data::output): Now a std::string reference.
8072 (xinclude_start_include): Adjust.
8073 (xml_xinclude_default): Adjust.
8074 (xml_process_xincludes): Add 'output' parameter, and return bool.
8075 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8076 and return bool.
8077 * xml-tdesc.c: Include <unordered_map> and <string>.
8078 (tdesc_xml_cache): Delete.
8079 (tdesc_xml_cache_s): Delete.
8080 (xml_cache): Now an std::unordered_map.
8081 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8082 (target_fetch_description_xml): Change return type to
8083 gdb::optional<std::string>, and adjust.
8084 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8085 (target_fetch_description_xml): Change return type to
8086 gdb::optional<std::string>.
8087
8088 2017-04-18 Pedro Alves <palves@redhat.com>
8089
8090 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8091 unittests/optional-selftests.c.
8092 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8093 * unittests/optional-selftests.c: New file.
8094 * unittests/optional/assignment/1.cc: New file.
8095 * unittests/optional/assignment/2.cc: New file.
8096 * unittests/optional/assignment/3.cc: New file.
8097 * unittests/optional/assignment/4.cc: New file.
8098 * unittests/optional/assignment/5.cc: New file.
8099 * unittests/optional/assignment/6.cc: New file.
8100 * unittests/optional/assignment/7.cc: New file.
8101 * unittests/optional/cons/copy.cc: New file.
8102 * unittests/optional/cons/default.cc: New file.
8103 * unittests/optional/cons/move.cc: New file.
8104 * unittests/optional/cons/value.cc: New file.
8105 * unittests/optional/in_place.cc: New file.
8106 * unittests/optional/observers/1.cc: New file.
8107 * unittests/optional/observers/2.cc: New file.
8108
8109 2017-04-18 Pedro Alves <palves@redhat.com>
8110
8111 * common/gdb_optional.h: Include common/traits.h.
8112 (in_place_t): New type.
8113 (in_place): New constexpr variable.
8114 (optional::optional): Remove member initialization of
8115 m_instantiated.
8116 (optional::optional(in_place_t...)): New constructor.
8117 (optional::~optional): Use reset.
8118 (optional::optional(const optional&)): New.
8119 (optional::optional(const optional&&)): New.
8120 (optional::optional(T &)): New.
8121 (optional::optional(T &&)): New.
8122 (operator::operator=(const optional &)): New.
8123 (operator::operator=(optional &&)): New.
8124 (operator::operator= (const T &))
8125 (operator::operator= (T &&))
8126 (operator::emplace (Args &&... args)): Return a T&. Use reset.
8127 (operator::reset): New.
8128 (operator::m_instantiated):: Add in-class initializer.
8129 * common/traits.h: Include <type_traits>.
8130 (struct And): New types.
8131
8132 2017-04-18 Pedro Alves <palves@redhat.com>
8133
8134 * xml-support.c: Include <vector>.
8135 (scope_level::scope_level(const gdb_xml_element *))
8136 (scope_level::scope_level(scope_level&&)): New.
8137 (scope_level::~scope_level): New.
8138 (scope_level_s): Delete.
8139 (gdb_xml_parser::scopes): Now a std::vector.
8140 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8141 Use std::vector.
8142 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8143 scope cleanup code.
8144 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8145 of the scopes member. Use std::vector::emplace_back.
8146
8147 2017-04-18 Pedro Alves <palves@redhat.com>
8148
8149 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
8150 a bool.
8151 (gdb_xml_end_element): Change type of first parameter.
8152 (gdb_xml_cleanup): Rename to ...
8153 (gdb_xml_parser::~gdb_xml_parser): ... this.
8154 (gdb_xml_create_parser_and_cleanup): Delete with ...
8155 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8156 to this new ctor.
8157 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8158 using gdb_xml_create_parser_and_cleanup.
8159 (xinclude_parsing_data): Add ctor/dtor.
8160 (xml_xinclude_cleanup): Delete.
8161 (xml_process_xincludes): Create a local xinclude_parsing_data
8162 instead of heap-allocating one. Create a local gdb_xml_parser
8163 instead of heap-allocating one with
8164 gdb_xml_create_parser_and_cleanup.
8165
8166 2017-04-18 John Baldwin <jhb@FreeBSD.org>
8167
8168 PR threads/20743
8169 * fbsd-nat.c (resume_one_thread_cb): Remove.
8170 (resume_all_threads_cb): Remove.
8171 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8172 iterate_over_threads.
8173
8174 2017-04-17 Joel Brobecker <brobecker@adacore.com>
8175
8176 * NEWS: Create a new section for the next release branch.
8177 Rename the section of the current branch, now that it has
8178 been cut.
8179
8180 2017-04-17 Joel Brobecker <brobecker@adacore.com>
8181
8182 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8183 * version.in: Bump version to 8.0.50.DATE-git.
8184
8185 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
8186
8187 PR gdb/21385
8188 * windows-nat.c (windows_create_inferior): Declare 'allargs'
8189 independently of the host, and fix build breakage on Cygwin.
8190
8191 2017-04-13 Pedro Alves <palves@redhat.com>
8192
8193 * inferior.c (free_inferior): Convert to ...
8194 (inferior::~inferior): ... this dtor.
8195 (inferior::inferior): New ctor, factored out from ...
8196 (add_inferior_silent): ... here. Allocate the inferior with a new
8197 expression.
8198 (delete_inferior): Call delete instead of free_inferior.
8199 * inferior.h (gdb_environ, continuation): Forward declare.
8200 (inferior): Now a class. Add in-class initialization to all
8201 members. Make boolean fields bool, except 'detaching'.
8202 (inferior::inferior): New explicit ctor.
8203 (inferior::~inferior): New.
8204
8205 2017-04-13 Pedro Alves <palves@redhat.com>
8206
8207 * inferior.c (init_inferior_list): Delete.
8208 * inferior.h (init_inferior_list): Delete.
8209
8210 2017-04-13 Pedro Alves <palves@redhat.com>
8211
8212 PR threads/13217
8213 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8214 (top level): Call it twice, with different thread sets.
8215
8216 2017-04-13 Pedro Alves <palves@redhat.com>
8217
8218 * thread.c: Include <algorithm>.
8219 (thread_array_cleanup): Delete.
8220 (scoped_inc_dec_ref): New class.
8221 (live_threads_count): New function.
8222 (set_thread_refcount): Delete.
8223 (tp_array_compar_ascending): Now a bool.
8224 (tp_array_compar): Convert to a std::sort comparison function.
8225 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8226 and live_threads_count.
8227
8228 2017-04-13 Pedro Alves <palves@redhat.com>
8229
8230 * infrun.c (follow_fork_inferior): Also switch the current
8231 inferior.
8232
8233 2017-04-13 Pedro Alves <palves@redhat.com>
8234
8235 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8236 before calling create_internal_breakpoint.
8237
8238 2017-04-13 Pedro Alves <palves@redhat.com>
8239
8240 * fork-child.c (execv_argv): New class.
8241 (breakup_args): Refactored as ...
8242 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8243 Copy arguments to storage and replace separators with NULL
8244 terminators in place.
8245 (escape_bang_in_quoted_argument): Adjust to return bool.
8246 (execv_argv::execv_argv): New ctor.
8247 (execv_argv::init_for_shell): New method, factored out from
8248 fork_inferior. Don't strdup strings into the vector.
8249 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8250 Remove free_vector_argv call.
8251
8252 2017-04-13 Yao Qi <yao.qi@linaro.org>
8253
8254 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8255 tdep->rx_psw_type.
8256
8257 2017-04-13 Yao Qi <yao.qi@linaro.org>
8258
8259 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8260 * rx-tdep.c (rx_gdbarch_init): Likewise.
8261
8262 2017-04-13 Pedro Alves <palves@redhat.com>
8263
8264 * breakpoint.h (struct breakpoint): Reindent.
8265
8266 2017-04-13 Pedro Alves <palves@redhat.com>
8267
8268 * breakpoint.c (bp_location): Rename to ...
8269 (bp_locations): ... this. All references updated.
8270 (bp_location_count): Rename to ...
8271 (bp_locations_count): ... this. All references updated.
8272 (bp_location_placed_address_before_address_max): Rename to ...
8273 (bp_locations_placed_address_before_address_max): ... this. All
8274 references updated.
8275 (bp_location_shadow_len_after_address_max): Rename to ...
8276 (bp_locations_shadow_len_after_address_max): ... this. All
8277 references updated.
8278 (bp_location_compare_addrs): Rename to ...
8279 (bp_locations_compare_addrs): ... this. All references updated.
8280 (bp_location_compare):Rename to ...
8281 (bp_locations_compare): ... this. All references updated.
8282 (bp_location_target_extensions_update): Rename to ...
8283 (bp_locations_target_extensions_update): ... this. All references
8284 updated.
8285
8286 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8287
8288 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8289 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8290 'sgtty.h'.
8291 * common/gdb_termios.h: New file, with parts of "terminal.h".
8292 * inflow.c: Include "gdb_termios.h".
8293 * ser-unix.c: Include "gdb_termios.h".
8294 * terminal.h: Move terminal-related defines to
8295 "common/gdb_termios.h".
8296
8297 2017-04-12 Tom Tromey <tom@tromey.com>
8298
8299 * probe.c (parse_probes): Update.
8300 * location.h (delete_event_location): Don't declare.
8301 (event_location_deleter::operator()): Update.
8302 * location.c (event_location_deleter::operator()): Rename from
8303 delete_event_location.
8304 * linespec.h (linespec_result) <location>: Change type to
8305 event_location_up.
8306 * linespec.c (canonicalize_linespec, event_location_to_sals)
8307 (decode_objc): Update.
8308 (linespec_result): Don't call delete_event_location.
8309 * breakpoint.c (create_breakpoints_sal)
8310 (bkpt_probe_create_sals_from_location)
8311 (strace_marker_create_sals_from_location): Update.
8312
8313 2017-04-12 Tom Tromey <tom@tromey.com>
8314
8315 * linespec.h (struct linespec_result): Add constructor and
8316 destructor.
8317 (init_linespec_result, destroy_linespec_result)
8318 (make_cleanup_destroy_linespec_result): Don't declare.
8319 * linespec.c (init_linespec_result): Remove.
8320 (linespec_result::~linespec_result): Rename from
8321 destroy_linespec_result. Update.
8322 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8323 Remove.
8324 * breakpoint.c (create_breakpoint, break_range_command)
8325 (decode_location_default): Update.
8326 * ax-gdb.c (agent_command_1): Update.
8327
8328 2017-04-12 Tom Tromey <tom@tromey.com>
8329
8330 * remote.c (remote_download_tracepoint): Update.
8331 * python/py-breakpoint.c (bppy_get_location): Update.
8332 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8333 (gdbscm_breakpoint_location): Update.
8334 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8335 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8336 Change type to event_location_up.
8337 * breakpoint.c (create_overlay_event_breakpoint)
8338 (create_longjmp_master_breakpoint)
8339 (create_std_terminate_master_breakpoint)
8340 (create_exception_master_breakpoint)
8341 (breakpoint_event_location_empty_p, print_breakpoint_location)
8342 (print_one_breakpoint_location, create_thread_event_breakpoint)
8343 (init_breakpoint_sal, create_breakpoint)
8344 (print_recreate_ranged_breakpoint, break_range_command)
8345 (init_ada_exception_breakpoint, say_where): Update.
8346 (base_breakpoint_dtor): Don't call delete_event_location.
8347 (bkpt_print_recreate, tracepoint_print_recreate)
8348 (dprintf_print_recreate, update_static_tracepoint)
8349 (breakpoint_re_set_default): Update.
8350
8351 2017-04-12 Tom Tromey <tom@tromey.com>
8352
8353 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8354 type of "to_do". Update.
8355 (compute_stack_depth): Use std::vector.
8356
8357 2017-04-12 Tom Tromey <tom@tromey.com>
8358
8359 * printcmd.c (find_instruction_backward): Use std::vector.
8360
8361 2017-04-12 Tom Tromey <tom@tromey.com>
8362
8363 * symfile.c (objfilep): Remove typedef.
8364 (reread_symbols): Use a std::vector.
8365
8366 2017-04-12 Tom Tromey <tom@tromey.com>
8367
8368 * mi/mi-main.c (exec_direction_forward): Remove.
8369 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8370 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8371 scoped_restore.
8372 * guile/guile.c (guile_repl_command, guile_command)
8373 (gdbscm_execute_gdb_command): Use scoped_restore.
8374 * go-exp.y (go_parse): Use scoped_restore.
8375 * d-exp.y (d_parse): Use scoped_restore.
8376 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8377 * c-exp.y (c_parse): Use scoped_restore.
8378
8379 2017-04-12 Tom Tromey <tom@tromey.com>
8380
8381 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8382 (mi_parse): Update return type.
8383 (mi_parse_free): Remove.
8384 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8385 (mi_parse::~mi_parse): Rename from mi_parse_free.
8386 (mi_parse_cleanup): Remove.
8387 (mi_parse): Return a unique_ptr. Use new.
8388 * mi/mi-main.c (mi_execute_command): Update.
8389
8390 2017-04-12 Tom Tromey <tom@tromey.com>
8391
8392 * location.c (explicit_location_lex_one): Return a
8393 unique_xmalloc_ptr.
8394 (string_to_explicit_location): Update. Remove cleanups.
8395
8396 2017-04-12 Tom Tromey <tom@tromey.com>
8397
8398 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8399 (compare_value_and_voffset): Change type. Update.
8400 (compute_vtable_size): Change type of "offset_vec".
8401 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8402 (gnuv3_get_typeid): Remove extraneous declaration.
8403
8404 2017-04-12 Tom Tromey <tom@tromey.com>
8405
8406 * charset.h (wchar_iterator): Fix comment.
8407
8408 2017-04-12 Tom Tromey <tom@tromey.com>
8409
8410 * charset.c (iconv_wrapper): New class.
8411 (cleanup_iconv): Remove.
8412 (convert_between_encodings): Use it.
8413
8414 2017-04-12 Tom Tromey <tom@tromey.com>
8415
8416 * symfile.h (increment_reading_symtab): Update type.
8417 * symfile.c (decrement_reading_symtab): Remove.
8418 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8419 * psymtab.c (psymtab_to_symtab): Update.
8420 * dwarf2read.c (dw2_instantiate_symtab): Update.
8421
8422 2017-04-12 Tom Tromey <tom@tromey.com>
8423
8424 * jit.c (struct jit_reader): Declare separately. Add constructor
8425 and destructor. Change type of "handle".
8426 (loaded_jit_reader): Define separately.
8427 (jit_reader_load): Update. New "new".
8428 (jit_reader_unload_command): Use "delete".
8429 * gdb-dlfcn.h (struct dlclose_deleter): New.
8430 (gdb_dlhandle_up): New typedef.
8431 (gdb_dlopen, gdb_dlsym): Update types.
8432 (gdb_dlclose): Remove.
8433 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8434 (gdb_dlsym): Change type of "handle".
8435 (make_cleanup_dlclose): Remove.
8436 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8437 * compile/compile-c-support.c (load_libcc): Update.
8438
8439 2017-04-12 Tom Tromey <tom@tromey.com>
8440
8441 * symtab.h (find_pcs_for_symtab_line): Change return type.
8442 * symtab.c (find_pcs_for_symtab_line): Change return type.
8443 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8444 type of "vec". Update.
8445 (ltpy_get_pcs_for_line): Update.
8446 * linespec.c (decode_digits_ordinary): Update.
8447
8448 2017-04-12 Tom Tromey <tom@tromey.com>
8449
8450 * tracepoint.c (actions_command): Update.
8451 * python/python.c (python_command, python_interactive_command):
8452 Update.
8453 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8454 * guile/guile.c (guile_command): Update.
8455 * defs.h (read_command_lines, read_command_lines_1): Return
8456 command_line_up.
8457 (command_lines_deleter): New struct.
8458 (command_line_up): New typedef.
8459 * compile/compile.c (compile_code_command)
8460 (compile_print_command): Update.
8461 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8462 command_line_up.
8463 (make_cleanup_free_command_lines): Remove.
8464 * cli/cli-script.c (get_command_line, read_command_lines_1)
8465 (copy_command_lines): Return command_line_up.
8466 (while_command, if_command, read_command_lines, define_command)
8467 (document_command): Update.
8468 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8469 Remove.
8470 * breakpoint.h (breakpoint_set_commands): Change type of
8471 "commands".
8472 * breakpoint.c (breakpoint_set_commands): Change type of
8473 "commands". Update.
8474 (do_map_commands_command, update_dprintf_command_list)
8475 (create_tracepoint_from_upload): Update.
8476
8477 2017-04-12 Tom Tromey <tom@tromey.com>
8478
8479 * tracepoint.c (scope_info): Update.
8480 * spu-tdep.c (spu_catch_start): Update.
8481 * python/python.c (gdbpy_decode_line): Update.
8482 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8483 * python/py-breakpoint.c (bppy_init): Update.
8484 * probe.c (parse_probes): Update.
8485 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8486 * location.h (event_location_deleter): New struct.
8487 (event_location_up): New typedef.
8488 (new_linespec_location, new_address_location, new_probe_location)
8489 (new_explicit_location, copy_event_location)
8490 (string_to_event_location, string_to_event_location_basic)
8491 (string_to_explicit_location): Update return type.
8492 (make_cleanup_delete_event_location): Remove.
8493 * location.c (new_linespec_location, new_address_location)
8494 (new_probe_location, new_explicit_location, copy_event_location):
8495 Return event_location_up.
8496 (delete_event_location_cleanup)
8497 (make_cleanup_delete_event_location): Remove.
8498 (string_to_explicit_location, string_to_event_location_basic)
8499 (string_to_event_location): Return event_location_up.
8500 * linespec.c (canonicalize_linespec, event_location_to_sals)
8501 (decode_line_with_current_source)
8502 (decode_line_with_last_displayed, decode_objc): Update.
8503 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8504 * completer.c (location_completer): Update.
8505 * cli/cli-cmds.c (edit_command, list_command): Update.
8506 * breakpoint.c (create_overlay_event_breakpoint)
8507 (create_longjmp_master_breakpoint)
8508 (create_std_terminate_master_breakpoint)
8509 (create_exception_master_breakpoint)
8510 (create_thread_event_breakpoint): Update.
8511 (init_breakpoint_sal): Update. Remove some dead code.
8512 (create_breakpoint_sal): Change type of "location". Update.
8513 (create_breakpoints_sal, create_breakpoint, break_command_1)
8514 (dprintf_command, break_range_command, until_break_command)
8515 (init_ada_exception_breakpoint)
8516 (strace_marker_create_sals_from_location)
8517 (update_static_tracepoint, trace_command, ftrace_command)
8518 (strace_command, create_tracepoint_from_upload): Update.
8519 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8520 * ax-gdb.c (agent_command_1): Update.
8521
8522 2017-04-12 Pedro Alves <palves@redhat.com>
8523
8524 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8525 * configure.tgt: Handle i[34567]86-*-go32* and
8526 i[34567]86-*-msdosdjgpp*.
8527 * i386-tdep.c (i386_svr4_reg_to_regnum):
8528 Make extern.
8529 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8530 i386-go32-tdep.c.
8531 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8532 * i386-go32-tdep.c: New file.
8533 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8534 declarations.
8535
8536 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8537
8538 * aix-thread.c (pd_status2str): Change return type to const char *.
8539
8540 2017-04-12 Pedro Alves <palves@redhat.com>
8541
8542 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8543 calls to set_gdbarch_gnu_triplet_regexp.
8544
8545 2017-04-12 Pedro Alves <palves@redhat.com>
8546
8547 PR gdb/21323
8548 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8549 New enum value.
8550 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8551 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8552 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8553 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8554 * gdbarch.h, gdbarch.c: Regenerate.
8555 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8556 gdbarch_wchar_bit and gdbarch_wchar_signed.
8557 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8558 * arm-tdep.c (arm_gdbarch_init): Likewise.
8559 * avr-tdep.c (avr_gdbarch_init): Likewise.
8560 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8561 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8562 * i386-tdep.c (i386_go32_init_abi): Likewise.
8563 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8564 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8565 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8566 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8567 * sh-tdep.c (sh_gdbarch_init): Likewise.
8568 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8569 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8570 * windows-tdep.c (windows_init_abi): Likewise.
8571 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8572
8573 2017-04-12 Pedro Alves <palves@redhat.com>
8574
8575 PR c++/21323
8576 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8577 cplus_primitive_type_char32_t>: New enum values.
8578 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8579 and cplus_primitive_type_char32_t.
8580 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8581 32, use the archtecture's built-in type for char16_t and char32_t,
8582 respectively. Otherwise, fallback to init_integer_type as before,
8583 but make the type unsigned, and issue a complaint.
8584 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8585
8586 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8587
8588 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8589 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8590
8591 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8592
8593 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8594 'const char *'.
8595
8596 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8597
8598 * common/common-utils.c (free_vector_argv): New function.
8599 * common/common-utils.h: Include <vector>.
8600 (free_vector_argv): New prototype.
8601 * darwin-nat.c (darwin_create_inferior): Rewrite function
8602 prototype in order to constify "exec_file" and accept a
8603 "std::string" for "allargs".
8604 * fork-child.c: Include <vector>.
8605 (breakup_args): Rewrite function, using C++.
8606 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8607 and accept "std::string" for "allargs". Update the code to
8608 calculate "argv" based on "allargs". Update calls to "exec_fun"
8609 and "execvp".
8610 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8611 order to constify "exec_file" and accept a "std::string" for
8612 "allargs".
8613 * go32-nat.c (go32_create_inferior): Likewise.
8614 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8615 * infcmd.c (run_command_1): Constify "exec_file". Use
8616 "std::string" for inferior arguments.
8617 * inferior.h (fork_inferior): Update prototype.
8618 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8619 prototype in order to constify "exec_file" and accept a
8620 "std::string" for "allargs".
8621 * nto-procfs.c (procfs_create_inferior): Likewise.
8622 * procfs.c (procfs_create_inferior): Likewise.
8623 * remote-sim.c (gdbsim_create_inferior): Likewise.
8624 * remote.c (extended_remote_run): Update code to accept
8625 "std::string" as argument.
8626 (extended_remote_create_inferior): Rewrite function prototype in
8627 order to constify "exec_file" and accept a "std::string" for
8628 "allargs".
8629 * rs6000-nat.c (super_create_inferior): Likewise.
8630 (rs6000_create_inferior): Likewise.
8631 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8632 * windows-nat.c (windows_create_inferior): Likewise.
8633
8634 2017-04-11 Pedro Alves <palves@redhat.com>
8635
8636 * thread.c: Fix whitespace throughout.
8637
8638 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8639
8640 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8641
8642 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8643
8644 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8645
8646 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8647
8648 PR gdb/21364
8649 * osdata.c (info_osdata): Check if 'type' is an empty string
8650 instead of NULL.
8651
8652 2017-04-10 Pedro Alves <palves@redhat.com>
8653
8654 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8655 (ptid_to_global_thread_id, in_thread_list)
8656 (do_captured_list_thread_ids, set_resumed, set_running)
8657 (set_executing, set_stop_requested, finish_thread_state)
8658 (validate_registers_access, can_access_registers_ptid)
8659 (print_thread_info_1, switch_to_thread)
8660 (do_restore_current_thread_cleanup)
8661 (make_cleanup_restore_current_thread, thread_command)
8662 (thread_name_command): Use operator== instead of ptid_equal.
8663
8664 2017-04-10 Pedro Alves <palves@redhat.com>
8665
8666 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8667 (current_thread_cleanup_chain): Delete.
8668 (restore_current_thread_cleanup_dtor)
8669 (make_cleanup_restore_current_thread): Remove references to
8670 current_thread_cleanup_chain.
8671
8672 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8673
8674 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8675 REG_UNKNOWN.
8676
8677 2017-04-10 Yao Qi <yao.qi@linaro.org>
8678
8679 PR gdb/19942
8680 * gdbthread.h (thread_info::deletable): New method.
8681 (thread_info::incref): New method.
8682 (thread_info::decref): New method.
8683 (thread_info::refcount): Move it to private.
8684 * infrun.c (save_stop_context): Call inc_refcount.
8685 (release_stop_context_cleanup): Likewise.
8686 * thread.c (set_thread_exited): New function.
8687 (init_thread_list): Delete "tp" only it is deletable, otherwise
8688 call set_thread_exited.
8689 (delete_thread_1): Call set_thread_exited.
8690 (current_thread_cleanup) <inferior_pid>: Remove.
8691 <thread>: New field.
8692 (restore_current_thread_ptid_changed): Removed.
8693 (do_restore_current_thread_cleanup): Adjust.
8694 (restore_current_thread_cleanup_dtor): Don't call
8695 find_thread_ptid.
8696 (set_thread_refcount): Use dec_refcount.
8697 (make_cleanup_restore_current_thread): Adjust.
8698 (thread_apply_all_command): Call inc_refcount.
8699 (_initialize_thread): Don't call
8700 observer_attach_thread_ptid_changed.
8701
8702 2017-04-10 Yao Qi <yao.qi@linaro.org>
8703
8704 * thread.c (delete_thread_1): Hoist code on marking thread as
8705 exited.
8706
8707 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8708
8709 * windows-nat.c (windows_detach): Initialize ptid with
8710 minus_one_ptid.
8711
8712 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8713
8714 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8715
8716 2017-04-07 Alan Hayward <alan.hayward@arm.com>
8717
8718 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8719 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8720 (bfin_pseudo_register_write): Likewise
8721
8722 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8723
8724 * common/ptid.h (struct ptid): Change to...
8725 (class ptid_t): ... this.
8726 <ptid_t>: New constructors.
8727 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8728 matches>: New methods.
8729 <make_null, make_minus_one>: New static methods.
8730 <pid>: Rename to...
8731 <m_pid>: ...this.
8732 <lwp>: Rename to...
8733 <m_lwp>: ...this.
8734 <tid>: Rename to...
8735 <m_tid>: ...this.
8736 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8737 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8738 as references, move comment to class ptid_t.
8739 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8740 ptid_t static methods.
8741 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8742 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8743 Take ptid arguments as references, implement using ptid_t methods.
8744 * unittests/ptid-selftests.c: New file.
8745 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8746 unittests/ptid-selftests.c.
8747 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8748
8749 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8750
8751 * python/python.c (python_run_simple_file): Cast mode literal to
8752 non-const char pointer as expected by PyFile_FromString.
8753
8754 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8755
8756 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8757 minus_one_ptid and null_ptid.
8758
8759 2017-04-05 Pedro Alves <palves@redhat.com>
8760
8761 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8762 * configure: Regenerate.
8763
8764 2017-04-05 Pedro Alves <palves@redhat.com>
8765
8766 * ada-exp.y (yyerror): Constify.
8767 * ada-lang.c (bound_name, get_selections)
8768 (ada_variant_discrim_type)
8769 (ada_variant_discrim_name, ada_value_struct_elt)
8770 (ada_lookup_struct_elt_type, is_unchecked_variant)
8771 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8772 (catch_ada_exception_command_split)
8773 (catch_ada_assert_command_split, catch_assert_command)
8774 (ada_op_name): Constify.
8775 * ada-lang.h (ada_yyerror, get_selections)
8776 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8777 * arc-tdep.c (arc_print_frame_cache): Constify.
8778 * arm-tdep.c (arm_skip_stub): Constify.
8779 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8780 (gen_aggregate_elt_ref): Constify.
8781 * bcache.c (print_bcache_statistics): Constify.
8782 * bcache.h (print_bcache_statistics): Constify.
8783 * break-catch-throw.c (catch_exception_command_1):
8784 * breakpoint.c (struct ep_type_description::description):
8785 Constify.
8786 (add_solib_catchpoint): Constify.
8787 (catch_fork_command_1): Add cast.
8788 (add_catch_command): Constify.
8789 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8790 Constify.
8791 * bsd-uthread.c (bsd_uthread_state): Constify.
8792 * buildsym.c (patch_subfile_names): Constify.
8793 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8794 Constify.
8795 * c-exp.y (yyerror): Constify.
8796 (token::oper): Constify.
8797 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8798 * c-varobj.c (cplus_describe_child): Constify.
8799 * charset.c (find_charset_names): Add cast.
8800 (find_charset_names): Constify array and add const_cast.
8801 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8802 (edit_command): Constify.
8803 * cli/cli-decode.c (lookup_cmd): Constify.
8804 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8805 Constify.
8806 (struct dump_context): Constify.
8807 (add_dump_command, restore_command): Constify.
8808 * cli/cli-script.c (get_command_line): Constify.
8809 * cli/cli-script.h (get_command_line): Constify.
8810 * cli/cli-utils.c (check_for_argument): Constify.
8811 * cli/cli-utils.h (check_for_argument): Constify.
8812 * coff-pe-read.c (struct read_pe_section_data): Constify.
8813 * command.h (lookup_cmd): Constify.
8814 * common/print-utils.c (decimal2str): Constify.
8815 * completer.c (gdb_print_filename): Constify.
8816 * corefile.c (set_gnutarget): Constify.
8817 * cp-name-parser.y (yyerror): Constify.
8818 * cp-valprint.c (cp_print_class_member): Constify.
8819 * cris-tdep.c (cris_register_name, crisv32_register_name):
8820 Constify.
8821 * d-exp.y (yyerror): Constify.
8822 (struct token::oper): Constify.
8823 * d-lang.h (d_yyerror): Constify.
8824 * dbxread.c (struct header_file_location::name): Constify.
8825 (add_old_header_file, add_new_header_file, last_function_name)
8826 (dbx_next_symbol_text, add_bincl_to_list)
8827 (find_corresponding_bincl_psymtab, set_namestring)
8828 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8829 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8830 * defs.h (command_line_input, print_address_symbolic)
8831 (deprecated_readline_begin_hook): Constify.
8832 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8833 Constify.
8834 * event-top.c (handle_line_of_input): Constify and add cast.
8835 * exceptions.c (catch_errors): Constify.
8836 * exceptions.h (catch_errors): Constify.
8837 * expprint.c (print_subexp_standard, op_string, op_name)
8838 (op_name_standard, dump_raw_expression, dump_raw_expression):
8839 * expression.h (op_name, op_string, dump_raw_expression):
8840 Constify.
8841 * f-exp.y (yyerror): Constify.
8842 (struct token::oper): Constify.
8843 (struct f77_boolean_val::name): Constify.
8844 * f-lang.c (f_word_break_characters): Constify.
8845 * f-lang.h (f_yyerror): Constify.
8846 * fork-child.c (fork_inferior): Add cast.
8847 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8848 (new_variant): Constify.
8849 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8850 * gdbarch.c: Regenerate.
8851 * gdbcore.h (set_gnutarget): Constify.
8852 * go-exp.y (yyerror): Constify.
8853 (token::oper): Constify.
8854 * go-lang.h (go_yyerror): Constify.
8855 * go32-nat.c (go32_sysinfo): Constify.
8856 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8857 * guile/scm-cmd.c (cmdscm_function): Constify.
8858 * guile/scm-param.c (pascm_param_value): Constify.
8859 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8860 (h8300sx_register_name): Constify.
8861 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8862 Constify.
8863 * ia64-tdep.c (ia64_register_names): Constify.
8864 * infcmd.c (construct_inferior_arguments): Constify.
8865 (path_command, attach_post_wait): Constify.
8866 * language.c (show_range_command, show_case_command)
8867 (unk_lang_error): Constify.
8868 * language.h (language_defn::la_error)
8869 (language_defn::la_name_of_this): Constify.
8870 * linespec.c (decode_line_2): Constify.
8871 * linux-thread-db.c (thread_db_err_str): Constify.
8872 * lm32-tdep.c (lm32_register_name): Constify.
8873 * m2-exp.y (yyerror): Constify.
8874 * m2-lang.h (m2_yyerror): Constify.
8875 * m32r-tdep.c (m32r_register_names): Constify and make static.
8876 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8877 * m88k-tdep.c (m88k_register_name): Constify.
8878 * macroexp.c (appendmem): Constify.
8879 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8880 (upgrade_type, parse_external, parse_partial_symbols)
8881 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8882 (new_symbol): Constify.
8883 * memattr.c (mem_info_command): Constify.
8884 * mep-tdep.c (register_name_from_keyword): Constify.
8885 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8886 Constify.
8887 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8888 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8889 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8890 cast.
8891 (mi_execute_async_cli_command): Constify.
8892 * mips-tdep.c (mips_register_name): Constify.
8893 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8894 (am33_register_name, am33_2_register_name)
8895 * moxie-tdep.c (moxie_register_names): Constify.
8896 * nat/linux-osdata.c (osdata_type): Constify fields.
8897 * nto-tdep.c (nto_parse_redirection): Constify.
8898 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8899 (lookup_child_selector): Constify.
8900 (objc_methcall::name): Constify.
8901 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8902 (lookup_struct_typedef): Constify.
8903 * objfiles.c (pc_in_section): Constify.
8904 * objfiles.h (pc_in_section): Constify.
8905 * p-exp.y (struct token::oper): Constify.
8906 (yyerror): Constify.
8907 * p-lang.h (pascal_yyerror): Constify.
8908 * parser-defs.h (op_name_standard): Constify.
8909 (op_print::string): Constify.
8910 (exp_descriptor::op_name): Constify.
8911 * printcmd.c (print_address_symbolic): Constify.
8912 * psymtab.c (print_partial_symbols): Constify.
8913 * python/py-breakpoint.c (stop_func): Constify.
8914 (bppy_get_expression): Constify.
8915 * python/py-cmd.c (cmdpy_completer::name): Constify.
8916 (cmdpy_function): Constify.
8917 * python/py-event.c (evpy_add_attribute)
8918 (gdbpy_initialize_event_generic): Constify.
8919 * python/py-event.h (evpy_add_attribute)
8920 (gdbpy_initialize_event_generic): Constify.
8921 * python/py-evts.c (add_new_registry): Constify.
8922 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8923 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8924 * python/py-inferior.c (get_buffer): Add cast.
8925 * python/py-param.c (parm_constant::name): Constify.
8926 * python/py-unwind.c (fprint_frame_id): Constify.
8927 * python/python.c (gdbpy_parameter_value): Constify.
8928 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8929 * remote.c (memory_packet_config::name): Constify.
8930 (show_packet_config_cmd, remote_write_bytes)
8931 (remote_buffer_add_string):
8932 * reverse.c (exec_reverse_once): Constify.
8933 * rs6000-tdep.c (variant::name, variant::description): Constify.
8934 * rust-exp.y (rustyyerror): Constify.
8935 * rust-lang.c (rust_op_name): Constify.
8936 * rust-lang.h (rustyyerror): Constify.
8937 * serial.h (serial_ops::name): Constify.
8938 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8939 (sh_sh3e_register_name, sh_sh2e_register_name)
8940 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8941 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8942 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8943 (sh_sh4al_dsp_register_name): Constify.
8944 * sh64-tdep.c (sh64_register_name): Constify.
8945 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8946 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8947 * stabsread.c (patch_block_stabs, read_type_number)
8948 (ref_map::stabs, ref_add, process_reference)
8949 (symbol_reference_defined, define_symbol, define_symbol)
8950 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8951 (read_one_struct_field, read_struct_fields, read_baseclasses)
8952 (read_tilde_fields, read_struct_type, read_array_type)
8953 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8954 (read_huge_number, read_range_type, read_args, common_block_start)
8955 (find_name_end): Constify.
8956 * stabsread.h (common_block_start, define_symbol)
8957 (process_one_symbol, symbol_reference_defined, ref_add):
8958 * symfile.c (get_section_index, add_symbol_file_command):
8959 * symfile.h (get_section_index): Constify.
8960 * target-descriptions.c (tdesc_type::name): Constify.
8961 (tdesc_free_type): Add cast.
8962 * target.c (find_default_run_target):
8963 (add_deprecated_target_alias, find_default_run_target)
8964 (target_announce_detach): Constify.
8965 (do_option): Constify.
8966 * target.h (add_deprecated_target_alias): Constify.
8967 * thread.c (print_thread_info_1): Constify.
8968 * top.c (deprecated_readline_begin_hook, command_line_input):
8969 Constify.
8970 (init_main): Add casts.
8971 * top.h (handle_line_of_input): Constify.
8972 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8973 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8974 (tfind_command): Rename to ...
8975 (tfind_command_1): ... this and constify.
8976 (tfind_command): New function.
8977 (tfind_end_command, tfind_start_command): Adjust.
8978 (encode_source_string): Constify.
8979 * tracepoint.h (encode_source_string): Constify.
8980 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8981 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8982 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8983 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8984 * tui/tui-win.c (parse_scrolling_args): Constify.
8985 * tui/tui-windata.c (tui_erase_data_content): Constify.
8986 * tui/tui-windata.h (tui_erase_data_content): Constify.
8987 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8988 * tui/tui.c (tui_enable): Add cast.
8989 * utils.c (defaulted_query): Constify.
8990 (init_page_info): Add cast.
8991 (puts_debug, subset_compare): Constify.
8992 * utils.h (subset_compare): Constify.
8993 * varobj.c (varobj_format_string): Constify.
8994 * varobj.h (varobj_format_string): Constify.
8995 * vax-tdep.c (vax_register_name): Constify.
8996 * windows-nat.c (windows_detach): Constify.
8997 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8998 * xml-support.c (gdb_xml_end_element): Constify.
8999 * xml-tdesc.c (tdesc_start_reg): Constify.
9000 * xstormy16-tdep.c (xstormy16_register_name): Constify.
9001 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9002 * xtensa-tdep.h (xtensa_register_t::name): Constify.
9003
9004 2017-04-05 Pedro Alves <palves@redhat.com>
9005
9006 * proc-api.c (struct trans): Constify.
9007 (procfs_note): Constify.
9008 * proc-events.c (struct trans, syscall_table):
9009 * proc-flags.c (struct trans): Constify.
9010 * proc-utils.h (procfs_note): Constify.
9011 * proc-why.c (struct trans): Constify.
9012 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9013 (procfs_detach): Constify.
9014 * sol-thread.c (struct string_map): Constify.
9015 (td_err_string, td_state_string): Constify.
9016
9017 2017-04-05 Pedro Alves <palves@redhat.com>
9018
9019 * proc-api.c (procfs_filename): Don't initialize
9020 procfs_filename.
9021 (prepare_to_trace): Assume procfs_filename is non-NULL.
9022 (_initialize_proc_api): Give procfs_filename a default value here.
9023
9024 2017-04-05 Pedro Alves <palves@redhat.com>
9025
9026 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9027 'cond_string' parameter.
9028 (extract_exception_regexp): Constify 'string' parameter.
9029 (catch_exception_command_1): Constify.
9030 * breakpoint.c (init_catchpoint)
9031 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9032 parameter.
9033 (ep_parse_optional_if_clause, catch_fork_command_1)
9034 (catch_exec_command_1): Constify.
9035 * breakpoint.h (init_catchpoint): Constify 'cond_string'
9036 parameter.
9037 (ep_parse_optional_if_clause): Constify.
9038 * cli/cli-utils.c (remove_trailing_whitespace)
9039 (check_for_argument): Constify.
9040 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9041 non-const overload.
9042 (check_for_argument): Likewise.
9043
9044 2017-04-05 Pedro Alves <palves@redhat.com>
9045
9046 * event-top.c (command_line_handler): Add cast to execute_command
9047 call.
9048 * record-btrace.c (cmd_record_btrace_bts_start)
9049 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9050 (cmd_record_btrace_start): Add cast to execute_command call.
9051 * record-full.c (record_full_goto_insn):
9052 * record.c (record_start, record_stop): Add cast to
9053 execute_command_to_string calls.
9054 (cmd_record_start): Add cast to execute_command calls.
9055
9056 2017-04-05 Pedro Alves <palves@redhat.com>
9057
9058 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9059 static inline function.
9060 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9061 array and use gdb_PyArg_ParseTupleAndKeywords.
9062 * python/py-cmd.c (cmdpy_init): Likewise.
9063 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9064 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9065 (infpy_search_memory): Likewise.
9066 * python/py-objfile.c (objfpy_add_separate_debug_file)
9067 (gdbpy_lookup_objfile): Likewise.
9068 * python/py-symbol.c (gdbpy_lookup_symbol)
9069 (gdbpy_lookup_global_symbol): Likewise.
9070 * python/py-type.c (gdbpy_lookup_type): Likewise.
9071 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9072 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9073 Likewise.
9074
9075 2017-04-05 Pedro Alves <palves@redhat.com>
9076
9077 * python/python-internal.h (gdb_PyGetSetDef): New type.
9078 * python/py-block.c (block_object_getset)
9079 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9080 * python/py-event.c (event_object_getset)
9081 (finish_breakpoint_object_getset): Likewise.
9082 * python/py-inferior.c (inferior_object_getset): Likewise.
9083 * python/py-infthread.c (thread_object_getset): Likewise.
9084 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9085 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9086 * python/py-objfile.c (objfile_getset): Likewise.
9087 * python/py-progspace.c (pspace_getset): Likewise.
9088 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9089 Likewise.
9090 * python/py-record.c (recpy_record_getset): Likewise.
9091 * python/py-symbol.c (symbol_object_getset): Likewise.
9092 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9093 Likewise.
9094 * python/py-type.c (type_object_getset, field_object_getset):
9095 Likewise.
9096 * python/py-value.c (value_object_getset): Likewise.
9097
9098 2017-04-05 Pedro Alves <palves@redhat.com>
9099
9100 * python/python-internal.h (gdb_PyObject_CallMethod)
9101 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9102 New functions.
9103 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9104 (PySys_GetObject, PySys_SetPath): New macros.
9105
9106 2017-04-05 Pedro Alves <palves@redhat.com>
9107
9108 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9109 info_osdata_command.
9110 * osdata.c (info_osdata_command): Rename to ...
9111 (info_osdata): ... this. Constify 'type' parameter, and remove
9112 the 'from_tty' parameter. Accept NULL TYPE.
9113 (info_osdata_command): New function.
9114 * osdata.h (info_osdata_command): Remove declaration.
9115 (info_osdata): New declaration.
9116
9117 2017-04-05 Pedro Alves <palves@redhat.com>
9118
9119 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9120 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9121 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9122 parameter.
9123 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9124 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9125 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9126 parameter.
9127 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9128 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9129 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9130 (mi_cmd_file_list_exec_source_files)
9131 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9132 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9133 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9134 parameter.
9135 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9136 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9137 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9138 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9139 (mi_cmd_stack_info_frame): Constify 'command' parameter.
9140 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9141 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9142 'command' parameter.
9143 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9144 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9145 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9146 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9147 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9148 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9149 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9150 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9151 (mi_cmd_var_set_update_range): Constify 'command' parameter.
9152 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9153 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9154 parameter.
9155 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9156 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9157 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9158 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9159 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9160 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9161 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9162 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9163 (mi_cmd_data_list_changed_registers)
9164 (mi_cmd_data_write_register_values)
9165 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9166 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9167 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9168 (mi_cmd_list_features, mi_cmd_list_target_features)
9169 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9170 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9171 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9172 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9173 (mi_cmd_trace_frame_collected): Constify 'command'
9174 parameter.
9175 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9176 'command' parameter.
9177
9178 2017-04-05 Pedro Alves <palves@redhat.com>
9179
9180 * ada-lang.c (ada_completer_word_break_characters): Now a const
9181 array.
9182 (ada_get_gdb_completer_word_break_characters): Constify.
9183 * completer.c (gdb_completer_command_word_break_characters)
9184 (gdb_completer_file_name_break_characters)
9185 (gdb_completer_quote_characters): Now const arrays.
9186 (get_gdb_completer_quote_characters): Constify.
9187 (set_rl_completer_word_break_characters): New function.
9188 (set_gdb_completion_word_break_characters)
9189 (complete_line_internal): Use it.
9190 * completer.h (get_gdb_completer_quote_characters): Constify.
9191 (set_rl_completer_word_break_characters): Declare.
9192 * f-lang.c (f_word_break_characters): Constify.
9193 * language.c (default_word_break_characters): Constify.
9194 * language.h (language_defn::la_word_break_characters): Constify.
9195 (default_word_break_characters): Constify.
9196 * top.c (init_main): Use set_rl_completer_word_break_characters.
9197
9198 2017-04-05 Pedro Alves <palves@redhat.com>
9199
9200 * aix-thread.c (aix_thread_pid_to_str)
9201 (aix_thread_extra_thread_info): Constify.
9202 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9203 * bsd-uthread.c (bsd_uthread_extra_thread_info)
9204 (bsd_uthread_pid_to_str): Constify.
9205 * corelow.c (core_pid_to_str): Constify.
9206 * darwin-nat.c (darwin_pid_to_str): Constify.
9207 * fbsd-nat.c (fbsd_pid_to_str): Constify.
9208 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9209 Constify.
9210 * gnu-nat.c (gnu_pid_to_str): Constify.
9211 * go32-nat.c (go32_pid_to_str): Constify.
9212 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9213 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9214 * inferior.c (inferior_pid_to_str): Constify.
9215 * linux-nat.c (linux_nat_pid_to_str): Constify.
9216 * linux-tdep.c (linux_core_pid_to_str): Constify.
9217 * linux-thread-db.c (thread_db_pid_to_str)
9218 (thread_db_extra_thread_info): Constify.
9219 * nto-tdep.c (nto_extra_thread_info): Constify.
9220 * nto-tdep.h (nto_extra_thread_info): Constify.
9221 * obsd-nat.c (obsd_pid_to_str): Constify.
9222 * procfs.c (procfs_pid_to_str): Constify.
9223 * ravenscar-thread.c (ravenscar_extra_thread_info)
9224 (ravenscar_pid_to_str): Constify.
9225 * remote-sim.c (gdbsim_pid_to_str): Constify.
9226 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9227 Constify.
9228 * sol-thread.c (solaris_pid_to_str): Constify.
9229 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9230 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9231 * target.c (default_pid_to_str, target_pid_to_str)
9232 (normal_pid_to_str, default_pid_to_str): Constify.
9233 * target.h (target_ops::to_pid_to_str)
9234 (target_ops::to_extra_thread_info): Constify.
9235 (target_pid_to_str, normal_pid_to_str): Constify.
9236 * windows-nat.c (windows_pid_to_str): Constify.
9237 * gdbarch.sh (core_pid_to_str): Constify.
9238 * target-delegates.c: Regenerate.
9239 * gdbarch.h, gdbarch.c: Regenerate.
9240
9241 2017-04-05 Pedro Alves <palves@redhat.com>
9242
9243 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9244 the memory of the temporary warning_pre_print override.
9245 * utils.c (warning_pre_print): Constify.
9246 * utils.h (warning_pre_print): Constify.
9247
9248 2017-04-05 Pedro Alves <palves@redhat.com>
9249
9250 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9251 (shell_command): New function.
9252 (make_command): Use std::string.
9253 (init_cli_cmds): Register shell_command instead of shell_escape.
9254
9255 2017-04-05 Pedro Alves <palves@redhat.com>
9256
9257 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9258 * tracepoint.c (default_collect): Don't initialize.
9259
9260 2017-04-05 Pedro Alves <palves@redhat.com>
9261
9262 * macroexp.c (macro_buffer::shared): Now a bool.
9263 (init_buffer): Update.
9264 (init_shared_buffer): Constify 'addr' parameter.
9265 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9266 casts.
9267
9268 2017-04-05 Pedro Alves <palves@redhat.com>
9269
9270 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9271 * disasm.c (set_disassembler_options): Constify local.
9272 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9273
9274 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9275
9276 PR gdb/21352
9277 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9278 option.
9279
9280 2017-04-05 Yao Qi <yao.qi@linaro.org>
9281
9282 * frame.c (frame_unwind_register_unsigned): Call
9283 frame_unwind_register_value.
9284
9285 2017-04-05 Yao Qi <yao.qi@linaro.org>
9286
9287 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9288 Use gdb_test_multiple, and don't match anchor.
9289
9290 2017-04-05 Pedro Alves <palves@redhat.com>
9291
9292 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9293 (Write After Approval): Remove Simon Marchi.
9294
9295 2017-04-05 Pedro Alves <palves@redhat.com>
9296
9297 * common/gdb_optional.h (optional::optional): Make constexpr and
9298 initialize m_dummy.
9299
9300 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9301
9302 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9303 (amd64fbsd_jmp_buf_reg_offset): Remove.
9304 (amd64fbsd_supply_uthread): Remove function.
9305 (amd64fbsd_collect_uthread): Remove function.
9306 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9307 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9308 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9309 (fbsd-nat.c): Update comment.
9310 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9311 (i386fbsd_jmp_buf_reg_offset): Remove.
9312 (i386fbsd_supply_uthread): Remove function.
9313 (i386fbsd_collect_uthread): Remove function.
9314 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9315
9316 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9317
9318 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9319 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9320 * NEWS: Mention that support for FreeBSD/alpha was removed.
9321 * alpha-fbsd-tdep.c: Delete file.
9322 * config/alpha/fbsd.mh: Delete file.
9323 * configure.host: Delete alpha*-*-freebsd* and
9324 alpha*-*-kfreebsd*-gnu.
9325 * configure.tgt: Delete alpha*-*-freebsd* and
9326 alpha*-*-kfreebsd*-gnu.
9327
9328 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9329
9330 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9331 amd64bsd_store_inferior_registers): Use ptid from regcache.
9332
9333 2017-04-04 Pedro Alves <palves@redhat.com>
9334
9335 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9336 data fields, make them private and add "m_" prefixes.
9337 (lnp_state_machine::lnp_state_machine): New ctor.
9338 (record_line, check_line_address, handle_set_discriminator)
9339 (handle_set_address, handle_advance_pc, handle_special_opcode)
9340 (handle_advance_line, handle_set_file, handle_negate_stmt)
9341 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9342 (end_sequence, advance_line): New methods.
9343 (m_gdbarch, m_record_lines_p): New fields.
9344 (lnp_reader_state): Delete.
9345 (dwarf_record_line): Rename to ...
9346 (lnp_state_machine::record_line): ... adjust.
9347 (init_lnp_state_machine): Delete.
9348 (lnp_state_machine::lnp_state_machine): New.
9349 (check_line_address): Rename to ...
9350 (lnp_state_machine::check_line_address): This.
9351 (dwarf_decode_lines_1): Remove reference to "reader_state".
9352 Adjust lnp_state_machine having a non-default ctor. Use bool.
9353 State machine internal state manipulation moved to
9354 lnp_state_machine methods.
9355
9356 2017-04-04 Pedro Alves <palves@redhat.com>
9357
9358 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9359 unittests/offset-type-selftests.c.
9360 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9361 * common/offset-type.h: New file.
9362 * common/preprocessor.h: New file.
9363 * common/traits.h: New file.
9364 * common/valid-expr.h: New file.
9365 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9366 sect_offset and cu_offset strong typedefs throughout.
9367 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9368 typedefs throughout.
9369 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9370 sect_offset and cu_offset strong typedefs throughout.
9371 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9372 typedefs throughout.
9373 * gdbtypes.h: Include "common/offset-type.h".
9374 (cu_offset): Now an offset type (strong typedef) instead of a
9375 struct.
9376 (sect_offset): Likewise.
9377 (union call_site_parameter_u): Rename "param_offset" field to
9378 "param_cu_off".
9379 * unittests/offset-type-selftests.c: New file.
9380
9381 2017-04-04 Pedro Alves <palves@redhat.com>
9382
9383 * common/underlying.h: New file.
9384 * dwarf2read.c: Include "common/gdb_optional.h" and
9385 "common/underlying.h".
9386 (dir_index, file_name_index): New types.
9387 (file_entry): Use them.
9388 (file_entry::include): Use to_underlying.
9389 (line_header::add_file_name): Use dir_index.
9390 (read_formatted_entries): Use gdb::optional. Read form before
9391 writting to file_entry.
9392 (dwarf_decode_line_header): Use dir_index.
9393 (lnp_state_machine::current_file): Use to_underlying.
9394 (lnp_state_machine::file): Change type to file_name_index.
9395 (dwarf_record_line): Use to_underlying.
9396 (init_lnp_state_machine): Use file_name_index.
9397 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9398
9399 2017-04-04 Pedro Alves <palves@redhat.com>
9400
9401 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9402 operator bool, has_value and get methods.
9403
9404 2017-04-04 Pedro Alves <palves@redhat.com>
9405
9406 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9407 fields.
9408 (line_header): Initialize all data fields. Change type of
9409 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9410 Change type of include_dirs to std::vector<const char *>. Remove
9411 num_include_dirs, include_dirs_size. Change type of file_names to
9412 std::vector<file_entry>. Remove num_file_names, file_names_size.
9413 (line_header::line_header): New.
9414 (line_header::add_include_dir, line_header::add_file_name): New
9415 methods.
9416 (line_header::include_dir_at): Remove NULL check.
9417 (line_header::file_name_at): Add const overload.
9418 (line_header_up): New unique_ptr typedef.
9419 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9420 std::vector. Remove free_line_header call.
9421 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9422 free_line_header call.
9423 (free_cu_line_header): Delete.
9424 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9425 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9426 Adjust to use std::vector.
9427 (free_line_header): Delete.
9428 (free_line_header_voidp): Use delete.
9429 (add_include_dir): Replace with ...
9430 (line_header::add_include_dir): ... this method. Use std::vector.
9431 (add_file_name): Replace with ...
9432 (line_header::add_file_name): ... this method. Use std::vector.
9433 (add_include_dir_stub): Delete.
9434 (read_formatted_entries): Remove memset.
9435 (dwarf_decode_line_header): Return a line_header_up instead of a
9436 raw pointer. Remove cleanup handling. Pass lambdas to
9437 read_formatted_entries. Adjust to use line_header methods.
9438 (dwarf_decode_lines_1): Adjust to use line_header methods.
9439 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9440 use std::vector.
9441
9442 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9443
9444 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9445 instead of struct ptid.
9446
9447 2017-05-04 Alan Hayward <alan.hayward@arm.com>
9448
9449 * frame.c (get_frame_register_bytes): Unwind using value.
9450 (put_frame_register_bytes): Likewise.
9451
9452 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9453
9454 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9455 aggregate-like.
9456
9457 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9458
9459 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9460
9461 2017-03-29 Yao Qi <yao.qi@linaro.org>
9462
9463 * gdbthread.h (struct thread_info): Declare constructor and
9464 destructor. Add some in-class member initializers.
9465 * thread.c (free_thread): Remove.
9466 (init_thread_list): Call delete instead of free_thread.
9467 (new_thread): Call thread_info constructor.
9468 (thread_info::thread_info): New function.
9469 (thread_info::~thread_info): New function.
9470 (delete_thread_1): Call delete instead of free_thread.
9471 (make_cleanup_restore_current_thread): Move tp and frame to
9472 inner block.
9473
9474 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9475
9476 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9477 (arc_skip_prologue): Likewise.
9478 (arc_make_frame_cache): Likewise.
9479 (arc_pv_get_operand): New function.
9480 (arc_is_in_prologue): Likewise.
9481 (arc_analyze_prologue): Likewise.
9482 (arc_print_frame_cache): Likewise.
9483 (MAX_PROLOGUE_LENGTH): New constant.
9484
9485 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9486
9487 * configure.tgt: Add arc-insn.o.
9488 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9489 (dump_arc_instruction_command): New function.
9490 (arc_fprintf_disasm): Likewise.
9491 (arc_disassemble_info): Likewise.
9492 (arc_insn_get_operand_value): Likewise.
9493 (arc_insn_get_operand_value_signed): Likewise.
9494 (arc_insn_get_memory_base_reg): Likewise.
9495 (arc_insn_get_memory_offset): Likewise.
9496 (arc_insn_get_branch_target): Likewise.
9497 (arc_insn_dump): Likewise.
9498 (arc_insn_get_linear_next_pc): Likewise.
9499 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9500 (arc_disassemble_info): Likewise.
9501 (arc_insn_get_branch_target): Likewise.
9502 (arc_insn_get_linear_next_pc): Likewise.
9503 * NEWS: Mention new "maint print arc arc-instruction".
9504
9505 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9506
9507 * arc-tdep (maintenance_print_arc_list): New variable.
9508 (maintenance_print_arc_command): New function.
9509
9510 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9511
9512 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9513 Add "limm" and "reserved".
9514 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9515 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9516 * arc-tdep.h (arc_regnum): Likewise.
9517
9518 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9519
9520 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9521 for THREADPTR register.
9522 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9523 register.
9524 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9525 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9526 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9527
9528 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9529
9530 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9531 registers above gdbarch_num_regs (gdbarch) as privileged in
9532 call0 ABI.
9533
9534 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9535
9536 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9537 for a single specified register or for all registers in
9538 a0_base..a0_base + C0_NREGS range.
9539 (supply_gregset_reg): Call regcache_raw_supply for a single
9540 specified register or for all registers in a0_base..a0_base +
9541 C0_NREGS range.
9542
9543 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9544
9545 * arch/xtensa.h (C0_NREGS): Add definition.
9546 * xtensa-tdep.c (C0_NREGS): Remove definition.
9547
9548 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9549
9550 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9551 Drop xtensa_default_isa initialization.
9552 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9553
9554 2017-03-27 Pedro Alves <palves@redhat.com>
9555
9556 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9557 (file_entry::include_dir): New method.
9558 (line_header::include_dir_at, line_header::file_name_at): New
9559 methods.
9560 (setup_type_unit_groups, setup_type_unit_groups)
9561 (psymtab_include_file_name): Simplify using the new methods.
9562 (lnp_state_machine) <the_line_header>: New field.
9563 <file>: Add comment.
9564 (lnp_state_machine::current_file): New method.
9565 (dwarf_record_line): Simplify using the new methods.
9566 (init_lnp_state_machine): Initialize the "the_line_header" field.
9567 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9568 Simplify using the new methods.
9569
9570 2017-03-27 Pedro Alves <palves@redhat.com>
9571
9572 * cp-name-parser.y (make_empty): Delete.
9573 (demangler_special, nested_name, ptr_operator, array_indicator)
9574 (direct_declarator, declarator_1): Use fill_comp instead of
9575 make_empty.
9576
9577 2017-03-27 Pedro Alves <palves@redhat.com>
9578
9579 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9580 to ATTRIBUTE_PRINTF.
9581 * solib-target.c (library_list_start_list): Print "string" not
9582 "version".
9583 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9584 gdb_xml_error call.
9585
9586 2017-03-27 Pedro Alves <palves@redhat.com>
9587
9588 * dwarf2read.c (struct file_and_directory): New.
9589 (dwarf2_get_dwz_file): Adjust to use std::string.
9590 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9591 (find_file_and_directory): Adjust to return a file_and_directory
9592 object.
9593 (read_file_scope): Adjust to use file_and_directory. Remove
9594 make_cleanup/do_cleanups calls.
9595 (open_and_init_dwp_file): Adjust to use std::string. Remove
9596 make_cleanup/do_cleanups calls.
9597 * python/python.c (do_start_initialization): Adjust to ldirname
9598 returning a std::string.
9599 * utils.c (ldirname): Now returns a std::string.
9600 * utils.h (ldirname): Change return type to std::string.
9601 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9602 returning a std::string.
9603 * xml-tdesc.c (file_read_description_xml): Likewise.
9604
9605 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9606
9607 * regcache.c (regcache_debug_print_register): New function.
9608 * regcache.h (regcache_debug_print_register): New declaration.
9609 * target.c (debug_print_register): Remove.
9610 (target_fetch_registers): Call regcache_debug_print_register.
9611 (target_store_registers): Likewise.
9612
9613 2017-03-24 Pádraig Brady <pbrady@fb.com>
9614
9615 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9616 reference beyond the 'lh->include_dirs' array before accessing to
9617 it.
9618 (psymtab_include_file_name): Likewise.
9619 (dwarf_decode_lines_1): Likewise.
9620 (dwarf_decode_lines): Likewise.
9621 (file_file_name): Likewise.
9622
9623 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9624
9625 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9626 inferior_ptid.
9627 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9628 ps_lsetfpregs): Likewise.
9629 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9630 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9631 ps_lsetfpregs): Likewise.
9632 * target.c (target_fetch_registers, target_store_registers):
9633 Remove asserts.
9634
9635 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9636
9637 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9638
9639 2017-03-23 Yao Qi <yao.qi@linaro.org>
9640
9641 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9642 (_initialize_aarch64_tdep): Register it.
9643 (aarch64_record_load_store): Handle PRFM instruction.
9644 (aarch64_process_record_test): New function.
9645
9646 2017-03-23 Yao Qi <yao.qi@linaro.org>
9647
9648 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9649 indentation.
9650
9651 2017-03-23 Yao Qi <yao.qi@linaro.org>
9652
9653 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9654
9655 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9656
9657 python/python.c (do_start_initialization): Fix memory leak.
9658
9659 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9660
9661 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9662 using get_ptrace_pid.
9663 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9664 inferior_ptid.
9665 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9666 inferior_ptid instead of pid.
9667
9668 2017-03-22 Yao Qi <yao.qi@linaro.org>
9669
9670 * aarch64-tdep.c: Wrap locally used classes in anonymous
9671 namespace.
9672 * arm-tdep.c: Likewise.
9673 * linespec.c: Likewise.
9674 * ui-out.c: Likewise.
9675
9676 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9677
9678 PR gdb/19637
9679 * python/lib/gdb/printer/bound_registers.py: Import sys.
9680
9681 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9682
9683 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9684 windows_thread_info parameter and use it instead of
9685 current_thread.
9686 (windows_fetch_inferior_registers): Don't set current_thread,
9687 pass the thread to do_windows_fetch_inferior_registers. Use
9688 ptid from regcache instead of inferior_ptid.
9689 (do_windows_store_inferior_registers): Add windows_thread_info
9690 parameter and use it instead of current_thread.
9691 (windows_store_inferior_registers): Don't set current_thread,
9692 pass the thread to do_windows_store_inferior_registers. Use
9693 ptid from regcache instead of inferior_ptid.
9694
9695 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9696
9697 * ser-mingw.c (ser_windows_raw): Remove reference to
9698 struct serial::current_timeout.
9699
9700 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9701
9702 PR tdep/20928
9703 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9704 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9705 (sparc64_fsr_type): Fix %fsr decoding.
9706
9707 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9708
9709 * python/py-record-btrace.c (btpy_insn_data): Change return type
9710 for Python 2.
9711
9712 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9713
9714 * spu-linux-nat.c (spu_fetch_inferior_registers,
9715 spu_store_inferior_registers): Use ptid from regcache, set and
9716 restore inferior_ptid.
9717 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9718 Likewise.
9719
9720 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9721
9722 * i386-linux-nat.c (fetch_register, store_register,
9723 i386_linux_fetch_inferior_registers,
9724 i386_linux_store_inferior_registers): Use ptid from regcache.
9725 * ia64-linux-nat.c (ia64_linux_fetch_register,
9726 ia64_linux_store_register): Likewise.
9727 * inf-ptrace.c (inf_ptrace_fetch_register,
9728 inf_ptrace_store_register): Likewise.
9729 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9730 m32r_linux_store_inferior_registers): Likewise.
9731 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9732 m68kbsd_store_inferior_registers): Likewise.
9733 * m68k-linux-nat.c (fetch_register, store_register,
9734 m68k_linux_fetch_inferior_registers,
9735 m68k_linux_store_inferior_registers): Likewise.
9736 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9737 m88kbsd_store_inferior_registers): Likewise.
9738 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9739 mips_fbsd_store_inferior_registers): Likewise.
9740 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9741 mips64_linux_regsets_store_registers): Likewise.
9742 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9743 mipsnbsd_store_inferior_registers): Likewise.
9744 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9745 mips64obsd_store_inferior_registers): Likewise.
9746 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9747 Likewise.
9748 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9749 ppcfbsd_store_inferior_registers): Likewise.
9750 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9751 ppc_linux_store_inferior_registers): Likewise.
9752 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9753 ppcnbsd_store_inferior_registers): Likewise.
9754 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9755 ppcobsd_store_registers): Likewise.
9756 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9757 Likewise.
9758 * ravenscar-thread.c (ravenscar_fetch_registers,
9759 ravenscar_store_registers, ravenscar_prepare_to_store):
9760 Likewise.
9761 * record-btrace.c (record_btrace_fetch_registers,
9762 record_btrace_store_registers, record_btrace_prepare_to_store):
9763 Likewise.
9764 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9765 Lookup inferior using ptid from regcache, instead of
9766 current_inferior.
9767 * remote.c (remote_fetch_registers, remote_store_registers): Use
9768 ptid from regcache.
9769 * rs6000-nat.c (fetch_register, store_register): Likewise.
9770 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9771 s390_linux_store_inferior_registers): Likewise.
9772 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9773 shnbsd_store_inferior_registers): Likewise.
9774 * sol-thread.c (sol_thread_fetch_registers,
9775 sol_thread_store_registers): Likewise.
9776 * sparc-nat.c (sparc_fetch_inferior_registers,
9777 sparc_store_inferior_registers): Likewise.
9778 * tilegx-linux-nat.c (fetch_inferior_registers,
9779 store_inferior_registers): Likewise.
9780 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9781 vaxbsd_store_inferior_registers): Likewise.
9782 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9783 store_xtregs): Likewise.
9784
9785 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9786
9787 PR gdb/14441
9788 * NEWS: Mention support for rvalue references in GDB and python.
9789 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9790 supports both lvalue and rvalue references.
9791
9792 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9793
9794 PR gdb/14441
9795 * gdbtypes.c (rank_one_type): Implement overloading
9796 resolution rules regarding rvalue references.
9797
9798 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9799
9800 PR gdb/14441
9801 * aarch64-tdep.c (aarch64_type_align)
9802 (aarch64_extract_return_value, aarch64_store_return_value): Change
9803 lvalue reference type checks to general reference type checks.
9804 * amd64-tdep.c (amd64_classify): Likewise.
9805 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9806 Likewise.
9807 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9808 (arm_store_return_value): Likewise.
9809 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9810 * c-typeprint.c (c_print_type): Likewise.
9811 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9812 (cplus_number_of_children, cplus_describe_child): Likewise.
9813 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9814 * completer.c (expression_completer): Likewise.
9815 * cp-support.c (make_symbol_overload_list_adl_namespace):
9816 Likewise.
9817 * darwin-nat-info.c (info_mach_region_command): Likewise.
9818 * dwarf2loc.c (entry_data_value_coerce_ref)
9819 (value_of_dwarf_reg_entry): Likewise.
9820 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9821 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9822 Likewise.
9823 * findvar.c (extract_typed_address, store_typed_address):
9824 Likewise.
9825 * gdbtypes.c (rank_one_type): Likewise.
9826 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9827 * infcall.c (value_arg_coerce): Likewise.
9828 * language.c (pointer_type): Likewise.
9829 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9830 Likewise.
9831 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9832 * mn10300-tdep.c (mn10300_type_align): Likewise.
9833 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9834 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9835 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9836 Likewise.
9837 * printcmd.c (print_formatted, x_command): Likewise.
9838 * python/py-type.c (typy_get_composite, typy_template_argument):
9839 Likewise.
9840 * python/py-value.c (valpy_referenced_value)
9841 (valpy_get_dynamic_type, value_has_field): Likewise.
9842 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9843 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9844 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9845 * spu-tdep.c (spu_scalar_value_p): Likewise.
9846 * symtab.c (lookup_symbol_aux): Likewise.
9847 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9848 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9849 Likewise.
9850 * valops.c (value_cast_pointers, value_cast)
9851 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9852 (value_struct_elt, value_struct_elt_bitpos)
9853 (value_find_oload_method_list, find_overload_match)
9854 (value_rtti_indirect_type): Likewise.
9855 * valprint.c (val_print_scalar_type_p, generic_val_print):
9856 Likewise.
9857 * value.c (value_actual_type, value_as_address, unpack_long)
9858 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9859 (coerce_ref): Likewise.
9860 * varobj.c (varobj_get_value_type): Likewise.
9861
9862 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9863
9864 PR gdb/14441
9865 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9866 table of constants.
9867 * python/lib/gdb/command/explore.py: Support exploring values
9868 of rvalue reference types.
9869 * python/lib/gdb/types.py: Implement get_basic_type() for
9870 rvalue reference types.
9871 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9872 constant.
9873 * python/py-value.c (valpy_getitem): Add an rvalue reference
9874 check.
9875 (valpy_reference_value): Add new parameter "refcode".
9876 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9877 New wrappers for valpy_reference_value().
9878 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9879 (gdbpy_invoke_xmethod): Likewise.
9880
9881 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9882
9883 PR gdb/14441
9884 * dwarf2read.c (process_die, read_type_die_1): Handle the
9885 DW_TAG_rvalue_reference_type DIE.
9886 (read_tag_reference_type): Add new parameter "refcode".
9887
9888 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9889
9890 PR gdb/14441
9891 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9892 (c_type_print_modifier, c_type_print_varspec_suffix)
9893 (c_type_print_base): Support printing rvalue reference types.
9894 * c-valprint.c (c_val_print, c_value_print): Support printing
9895 rvalue reference values.
9896
9897 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9898
9899 PR gdb/14441
9900 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9901 typename.
9902 * cp-support.c (replace_typedefs): Handle
9903 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9904 * python/py-type.c (typy_lookup_type): Likewise.
9905
9906 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9907
9908 PR gdb/14441
9909 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9910 * parse.c (insert_type): Change assert statement.
9911 (follow_types): Handle rvalue reference types.
9912 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9913 constant.
9914
9915 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9916
9917 PR gdb/14441
9918 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9919 value_ref() interface.
9920 * c-valprint.c (c_value_print): Likewise.
9921 * infcall.c (value_arg_coerce): Likewise.
9922 * python/py-value.c (valpy_reference_value): Likewise.
9923 * valops.c (value_cast, value_reinterpret_cast)
9924 (value_dynamic_cast, typecmp): Likewise.
9925 (value_ref): Parameterize by kind of return value reference type.
9926 * value.h (value_ref): Add new parameter "refcode".
9927
9928 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9929
9930 PR gdb/14441
9931 * dwarf2read.c (read_tag_reference_type): Use
9932 lookup_lvalue_reference_type() instead of lookup_reference_type().
9933 * eval.c (evaluate_subexp_standard): Likewise.
9934 * f-exp.y: Likewise.
9935 * gdbtypes.c (make_reference_type, lookup_reference_type):
9936 Generalize with rvalue reference types.
9937 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9938 convenience wrappers for lookup_reference_type().
9939 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9940 reference kind parameter.
9941 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9942 wrappers for lookup_reference_type().
9943 * guile/scm-type.c (gdbscm_type_reference): Use
9944 lookup_lvalue_reference_type() instead of lookup_reference_type().
9945 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9946 * parse.c (follow_types): Likewise.
9947 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9948 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9949 Likewise.
9950 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9951 (gdbpy_invoke_xmethod): Likewise.
9952 * stabsread.c: Provide extra argument to make_reference_type()
9953 call.
9954 * valops.c (value_ref, value_rtti_indirect_type): Use
9955 lookup_lvalue_reference_type() instead of lookup_reference_type().
9956
9957 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9958
9959 PR gdb/14441
9960 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9961 (TYPE_IS_REFERENCE): New macro.
9962 (struct type): Add rvalue_reference_type field.
9963 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9964
9965 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9966
9967 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9968 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9969 New function definition.
9970 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9971 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9972 New function declaration.
9973 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9974 * mi/mi-interp.h: New file.
9975 * solib.c (info_sharedlibrary_command): Replace for loop with
9976 ALL_SO_LIBS macro
9977 * solib.h (update_solib_list): New function declaration.
9978 (so_list_head): Move macro.
9979 * solist.h (ALL_SO_LIBS): New macro.
9980
9981 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9982
9983 * infcmd.c (post_create_inferior): Remove unused argument in
9984 call to solib_add.
9985 * remote.c (remote_start_remote): Likewise.
9986 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9987 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9988 (enable_break): Likewise.
9989 * solib.c (update_solib_list): Remove unused target argument
9990 and its documentation.
9991 (solib_add): Remove unused target argument. Remove unused
9992 argument in call to update_solib_list.
9993 (info_sharedlibrary_command): Remove unused argument in call
9994 to update_solib_list.
9995 (sharedlibrary_command): Remove unused argument in call to
9996 solib_add.
9997 (handle_solib_event): Likewise.
9998 (reload_shared_libraries): Likewise.
9999 * solib.h (solib_add): Remove unused target argument.
10000
10001 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
10002
10003 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10004 (s390_displaced_step_fixup): Cover relative branches with the
10005 default fixup handling. This fixes lack of support for some
10006 relative branch instructions.
10007
10008 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10009
10010 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10011 ptid from regcache.
10012
10013 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10014
10015 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10016 i386_darwin_store_inferior_registers): Use ptid from regcache.
10017
10018 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10019
10020 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10021 i386bsd_store_inferior_registers): Use ptid from regcache.
10022
10023 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10024
10025 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10026 hppaobsd_store_registers): Use ptid from regcache.
10027
10028 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10029
10030 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10031 hppanbsd_store_registers): Use ptid from regcache.
10032
10033 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10034
10035 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10036 from regcache. Use get_ptrace_pid.
10037
10038 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10039
10040 * corelow.c (get_core_register_section): Use ptid from regcache,
10041 update doc.
10042
10043 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10044
10045 * bsd-uthread.c (bsd_uthread_fetch_registers,
10046 bsd_uthread_store_registers): Use ptid from regcache, set and
10047 restore inferior_ptid.
10048
10049 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10050
10051 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10052 fetch_fp_regs, store_register, store_regs, store_fp_register,
10053 store_fp_regs): Use ptid from regcache.
10054
10055 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10056
10057 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10058 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10059 store_vfp_regs): Use ptid from regcache.
10060
10061 2017-03-17 Pedro Alves <palves@redhat.com>
10062
10063 PR remote/21188
10064 * ser-base.c (ser_base_wait_for): Add comment.
10065 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10066 version.
10067 * ser-unix.c (hardwire_raw): Remove reference to
10068 scb->current_timeout.
10069 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10070 (hardwire_ops): Install ser_base_readchar instead of
10071 hardwire_readchar.
10072 * serial.h (struct serial) <current_timeout, timeout_remaining>:
10073 Remove fields.
10074
10075 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
10076
10077 PR gdb/19637
10078 * python/lib/gdb/printer/bound_registers.py: Add support for
10079 Python 3.
10080
10081 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
10082
10083 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10084 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10085 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10086 byte_offset to subobj_byte_offset. Fix the handling of
10087 DWARF_VALUE_STACK on big-endian targets when coming via an
10088 implicit pointer.
10089 (dwarf2_evaluate_loc_desc): Adjust call to
10090 dwarf2_evaluate_loc_desc_full.
10091 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10092 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10093
10094 2017-03-16 Yao Qi <yao.qi@linaro.org>
10095
10096 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10097 and REVSH instructions.
10098
10099 2017-03-16 Yao Qi <yao.qi@linaro.org>
10100
10101 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10102 (arm_record_test): Declare.
10103 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10104 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10105 align with the manual.
10106 (thumb_record_misc): Adjust the code order to align with the
10107 manual.
10108 (thumb2_record_decode_insn_handler): Fix instruction matching.
10109 (instruction_reader_thumb): New class.
10110 (arm_record_test): New function.
10111
10112 2017-03-16 Yao Qi <yao.qi@linaro.org>
10113
10114 * arm-tdep.c (abstract_memory_reader): New class.
10115 (instruction_reader): New class.
10116 (extract_arm_insn): Add argument 'reader'. Callers updated.
10117 (decode_insn): Likewise.
10118
10119 2017-03-16 Doug Evans <dje@google.com>
10120
10121 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10122 member. Change type of TYPE member to SCM. All uses updated.
10123 (lsscm_make_lazy_string_smob): Add assert.
10124 (lsscm_make_lazy_string): Flag bad length values.
10125 (lsscm_elt_type): New function.
10126 (gdbscm_lazy_string_to_value): Rewrite to use
10127 lsscm_safe_lazy_string_to_value.
10128 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10129 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10130 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
10131 in incoming type.
10132 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10133 * guile/scm-type.c (tyscm_scm_to_type): New function.
10134
10135 2017-03-15 Doug Evans <dje@google.com>
10136
10137 PR python/17728, python/18439, python/18779
10138 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10139 member. Change type of TYPE member to PyObject *. All uses updated.
10140 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10141 (gdbpy_create_lazy_string_object): Flag bad length values.
10142 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10143 Handle typedefs in incoming type.
10144 (stpy_lazy_string_elt_type): New function.
10145 (gdbpy_extract_lazy_string): Call it.
10146 * python/py-value.c (valpy_lazy_string): Flag bad length values.
10147 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
10148 typedefs in incoming type.
10149
10150 2017-03-16 Doug Evans <dje@google.com>
10151
10152 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10153 * guile/scm-type.c (tyscm_scm_to_type): New function.
10154
10155 2017-03-16 Jiong Wang <jiong.wang@arm.com>
10156
10157 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10158 "ULONGEST" for "skip".
10159
10160 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10161
10162 PR gdb/21220
10163 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10164 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10165 (inf_ptrace_peek_poke): ...here. New function. Now also loop
10166 over ptrace peek/poke until end of buffer or error.
10167
10168 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
10169
10170 * parse.c (length_of_subexp): Make static.
10171 * parser-defs.h (length_of_subexp): Remove.
10172
10173 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10174
10175 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10176 as well.
10177
10178 2017-03-14 Pedro Alves <palves@redhat.com>
10179
10180 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10181 (main): Use std::unique_ptr. Remove calls to
10182 cp_demangled_name_parse_free.
10183
10184 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10185
10186 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10187 alphabsd_store_inferior_registers): Use regcache->ptid instead
10188 of inferior_ptid.
10189
10190 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10191
10192 * aix-thread.c (aix_thread_fetch_registers,
10193 aix_thread_store_registers): Use regcache->ptid instead of
10194 inferior_ptid.
10195
10196 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10197
10198 * aarch64-linux-nat.c (fetch_gregs_from_thread,
10199 store_gregs_to_thread, fetch_fpregs_from_thread,
10200 store_fpregs_to_thread): Use regcache->ptid instead of
10201 inferior_ptid.
10202
10203 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10204
10205 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10206 amd64_linux_fetch_inferior_registers): Use regcache->ptid
10207 instead of inferior_ptid.
10208
10209 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10210
10211 * target.c (target_fetch_registers, target_store_registers): Add
10212 assert.
10213
10214 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10215
10216 * regcache.h (regcache_get_ptid): New function.
10217 * regcache.c (regcache_get_ptid): New function.
10218
10219 2017-03-13 Mark Wielaard <mark@klomp.org>
10220
10221 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10222
10223 2017-03-10 Keith Seitz <keiths@redhat.com>
10224
10225 PR c++/8218
10226 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10227
10228 2017-03-08 Pedro Alves <palves@redhat.com>
10229
10230 PR gdb/18360
10231 * infrun.c (start_step_over, do_target_resume, resume)
10232 (restart_threads): Assert we're not resuming a thread that is
10233 meant to be stopped.
10234 (infrun_thread_stop_requested_callback): Delete.
10235 (infrun_thread_stop_requested): If the thread is internally
10236 stopped, queue a pending stop event and clear the thread's
10237 inline-frame state.
10238 (handle_stop_requested): New function.
10239 (handle_syscall_event, handle_inferior_event_1): Use
10240 handle_stop_requested.
10241 (handle_stop_requested): New function.
10242 (handle_signal_stop): Set the thread's stop_signal here instead of
10243 at caller.
10244 (finish_step_over): Clear step over info unconditionally.
10245 (handle_signal_stop): If the user had interrupted the event
10246 thread, consider the stop a random signal.
10247 (handle_signal_stop) <signal arrived while stepping over
10248 breakpoint>: Don't restart threads here.
10249 (stop_waiting): Don't clear step-over info here.
10250
10251 2017-03-08 Pedro Alves <palves@redhat.com>
10252
10253 PR 21206
10254 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10255 goes to argument 2, not 1.
10256
10257 2017-03-08 Pedro Alves <palves@redhat.com>
10258
10259 PR cli/21218
10260 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10261 display_gdb_prompt.
10262 (command_line_input): Add comment.
10263
10264 2017-03-08 Pedro Alves <palves@redhat.com>
10265
10266 PR tui/21216
10267 * tui/tui-file.c (tui_file::write): New.
10268 * tui/tui-file.h (tui_file): Override "write".
10269 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10270 factored out from ...
10271 (tui_puts): ... here.
10272 (tui_putc): Use them.
10273 (tui_write): New function.
10274 * tui/tui-io.h (tui_write): Declare.
10275
10276 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10277
10278 * Makefile.in (SFILES): Replace "environ.c" with
10279 "common/environ.c".
10280 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10281 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10282 to...
10283 * common/environ.c: ... here.
10284 * environ.h: Moved to...
10285 * common/environ.h: ... here.
10286
10287 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10288
10289 * gdbarch.sh (pstring_ptr): New static function.
10290 (gdbarch_disassembler_options): Use it.
10291 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10292 not valid_disassembler_option->name.
10293 * gdbarch.c: Regenerate.
10294
10295 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10296
10297 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10298
10299 2017-03-07 Pedro Alves <palves@redhat.com>
10300
10301 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10302
10303 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
10304
10305 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10306 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10307 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10308 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10309
10310 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10311
10312 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10313
10314 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10315
10316 * remote.c (remote_add_target_side_commands): Use range-based
10317 for loop.
10318
10319 2017-03-03 Yao Qi <yao.qi@linaro.org>
10320
10321 PR gdb/21165
10322 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10323 value is lazy.
10324 * valprint.c (common_val_print): Likewise.
10325
10326 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10327
10328 * NEWS: Mention new set/show disassembler-options commands.
10329 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10330 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10331 (prospective_options): New static variable.
10332 (gdb_disassembler::gdb_disassembler): Initialize
10333 m_di.disassembler_options.
10334 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10335 (get_disassembler_options): New function.
10336 (set_disassembler_options): Likewise.
10337 (set_disassembler_options_sfunc): Likewise.
10338 (show_disassembler_options_sfunc): Likewise.
10339 (disassembler_options_completer): Likewise.
10340 (_initialize_disasm): Likewise.
10341 * disasm.h (get_disassembler_options): New prototype.
10342 (set_disassembler_options): Likewise.
10343 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10344 (gdbarch_verify_disassembler_options): Likewise.
10345 * gdbarch.c: Regenerate.
10346 * gdbarch.h: Likewise.
10347 * arm-tdep.c (num_disassembly_options): Delete.
10348 (set_disassembly_style): Likewise.
10349 (arm_disassembler_options): New static variable.
10350 (set_disassembly_style_sfunc): Convert short style name into long
10351 option name. Call set_disassembler_options.
10352 (show_disassembly_style_sfunc): New function.
10353 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10354 set_gdbarch_verify_disassembler_options.
10355 (_initialize_arm_tdep): Delete regnames variable and update callers.
10356 (arm_disassembler_options): Initialize.
10357 (disasm_options): New variable.
10358 (num_disassembly_options): Rename from this...
10359 (num_disassembly_styles): ...to this. Compute by scanning through
10360 disasm_options.
10361 (valid_disassembly_styles): Initialize using disasm_options.
10362 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10363 set_arm_regname_option.
10364 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10365 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10366 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10367 set_gdbarch_verify_disassembler_options.
10368 * s390-tdep.c (s390_disassembler_options): New static variable.
10369 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10370 set_gdbarch_verify_disassembler_options.
10371
10372 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10373
10374 * remote.c (remote_add_target_side_condition): Remove "struct"
10375 keyword from range-based for loop.
10376
10377 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10378
10379 * remote.c (remote_add_target_side_condition): Use range-based
10380 for loop. Update comment.
10381
10382 2017-02-27 Yao Qi <yao.qi@linaro.org>
10383
10384 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10385
10386 2017-02-26 Alan Hayward <alan.hayward@arm.com>
10387
10388 * regcache.c (regcache_raw_update): New function.
10389 (regcache_raw_read): Move code to regcache_raw_update.
10390 * regcache.h (regcache_raw_update): New declaration.
10391 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10392
10393 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10394
10395 * dwarf2read.c (create_debug_type_hash_table): Initialize
10396 header.signature and header.type_offset_in_tu.
10397
10398 2017-02-24 Pedro Alves <palves@redhat.com>
10399
10400 * symtab.c (make_file_symbol_completion_list_1): Use
10401 add_symtab_completions.
10402
10403 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10404
10405 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10406
10407 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10408
10409 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10410 I386_MAX_REGISTER_SIZE.
10411 (i386_pseudo_register_write): Likewise.
10412 (i386_process_record): Likewise.
10413 * i387-tdep.c (i387_supply_xsave): Likewise.
10414 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10415 (store_register): Likewise.
10416
10417 2017-02-23 Pedro Alves <palves@redhat.com>
10418
10419 * ada-lang.c: Include "common/function-view.h".
10420 (ada_iterate_over_symbols): Adjust to use function_view as
10421 callback type.
10422 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10423 (ada_make_symbol_completion_list): Use a lambda.
10424 (ada_exc_search_name_matches): Delete.
10425 (name_matches_regex): New.
10426 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10427 * compile/compile-c-support.c: Include "common/function-view.h".
10428 (print_one_macro): Change prototype to accept a ui_file pointer.
10429 (write_macro_definitions): Use a lambda.
10430 * dwarf2read.c: Include "common/function-view.h".
10431 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10432 (dw2_expand_symtabs_matching): Adjust to use function_view as
10433 callback type.
10434 * language.h: Include "common/function-view.h".
10435 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10436 function_view as callback type.
10437 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10438 * linespec.c: Include "common/function-view.h".
10439 (collect_info::add_symbol): New method.
10440 (struct symbol_and_data_callback, iterate_inline_only, struct
10441 symbol_matcher_data, iterate_name_matcher): Delete.
10442 (iterate_over_all_matching_symtabs): Adjust to use function_view
10443 as callback type and lambdas.
10444 (iterate_over_file_blocks): Adjust to use function_view as
10445 callback type.
10446 (decode_compound_collector): Now a class with private fields.
10447 (decode_compound_collector::release_symbols): New method.
10448 (collect_one_symbol): Rename to...
10449 (decode_compound_collector::operator()): ... this and adjust.
10450 (lookup_prefix_sym): decode_compound_collector construction bits
10451 move to decode_compound_collector ctor. Pass the
10452 decode_compound_collector object directly as callback. Remove
10453 cleanups and use decode_compound_collector::release_symbols
10454 instead.
10455 (symtab_collector): Now a class with private fields.
10456 (symtab_collector::release_symtabs): New method.
10457 (add_symtabs_to_list): Rename to...
10458 (symtab_collector::operator()): ... this and adjust.
10459 (collect_symtabs_from_filename): symtab_collector construction
10460 bits move to symtab_collector ctor. Pass the symtab_collector
10461 object directly as callback. Remove cleanups and use
10462 symtab_collector::release_symtabs instead.
10463 (collect_symbols): Delete.
10464 (add_matching_symbols_to_info): Use lambdas.
10465 * macrocmd.c (print_macro_callback): Delete.
10466 (info_macro_command): Use a lambda.
10467 (info_macros_command): Pass print_macro_definition as callable
10468 directly.
10469 (print_one_macro): Remove 'ignore' parameter.
10470 (macro_list_command): Adjust.
10471 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10472 (macro_for_each_data::user_data): Delete field.
10473 (foreach_macro): Adjust to call the function_view.
10474 (macro_for_each): Adjust to use function_view as callback type.
10475 (foreach_macro_in_scope): Adjust to call the function_view.
10476 (macro_for_each_in_scope): Adjust to use function_view as callback
10477 type.
10478 * macrotab.h: Include "common/function-view.h".
10479 (macro_callback_fn): Declare a prototype instead of a pointer.
10480 Remove "user_data" parameter.
10481 (macro_for_each, macro_for_each_in_scope): Adjust to use
10482 function_view as callback type.
10483 * psymtab.c (partial_map_expand_apply)
10484 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10485 Adjust to use function_view as callback type and to return bool.
10486 (psym_expand_symtabs_matching): Adjust to use function_view as
10487 callback types.
10488 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10489 to use function_view as callback type and to return bool.
10490 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10491 callback types.
10492 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10493 as callback types.
10494 * symfile.h: Include "common/function-view.h".
10495 (expand_symtabs_file_matcher_ftype)
10496 (expand_symtabs_symbol_matcher_ftype)
10497 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10498 return bool.
10499 (quick_symbol_functions::map_symtabs_matching_filename)
10500 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10501 function_view as callback type and return bool.
10502 (expand_symtabs_matching): Adjust to use function_view as callback
10503 type.
10504 (maintenance_expand_name_matcher)
10505 (maintenance_expand_file_matcher): Delete.
10506 (maintenance_expand_symtabs): Use lambdas.
10507 * symtab.c (iterate_over_some_symtabs): Adjust to use
10508 function_view as callback types and return bool.
10509 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10510 of a cleanup.
10511 (lookup_symtab_callback): Delete.
10512 (lookup_symtab): Use a lambda.
10513 (iterate_over_symbols): Adjust to use function_view as callback
10514 type.
10515 (struct search_symbols_data, search_symbols_file_matches)
10516 (search_symbols_name_matches): Delete.
10517 (search_symbols): Use a pair of lambdas.
10518 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10519 (symtab_expansion_callback): Delete.
10520 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10521 * symtab.h: Include "common/function-view.h".
10522 (iterate_over_some_symtabs): Adjust to use function_view as
10523 callback type and return bool.
10524 (iterate_over_symtabs): Adjust to use function_view as callback
10525 type.
10526 (symbol_found_callback_ftype): Remove 'data' parameter and return
10527 bool.
10528 (iterate_over_symbols): Adjust to use function_view as callback
10529 type.
10530
10531 2017-02-23 Pedro Alves <palves@redhat.com>
10532
10533 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10534 (%.o) <unittests/%.c>: New pattern.
10535 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10536 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10537 * common/function-view.h: New file.
10538 * unittests/function-view-selftests.c: New file.
10539 * configure: Regenerate.
10540
10541 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10542
10543 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10544 inferior_ptid.
10545 * go32-nat.c (go32_thread_alive): Likewise.
10546
10547 2017-02-23 Yao Qi <yao.qi@linaro.org>
10548
10549 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10550 delete.
10551
10552 2017-02-23 Yao Qi <yao.qi@linaro.org>
10553
10554 * varobj.c (varobj_clear_saved_item): Use delete instead of
10555 xfree.
10556 (update_dynamic_varobj_children): Likewise.
10557
10558 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10559
10560 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10561
10562 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10563
10564 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10565 m_enum_value to 0 in default constructor.
10566
10567 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10568
10569 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10570 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10571 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10572 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10573 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10574 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10575 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10576 IS_STORE_CONDITIONAL_INSN.
10577
10578 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10579
10580 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10581
10582 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10583
10584 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10585
10586 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10587
10588 * dwarf2read.c (skip_one_die, read_attribute_value)
10589 (dwarf2_const_value_attr, dump_die_shallow)
10590 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10591 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10592
10593 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10594
10595 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10596 (dwarf_parse_macro_header): Accept DWARF version 5.
10597 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10598
10599 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10600
10601 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10602 DW_AT_GNU_*.
10603 * common/common-exceptions.h (enum errors): Likewise.
10604 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10605 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10606 (dwarf_expr_context::execute_stack_op): Likewise.
10607 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10608 Likewise.
10609 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10610 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10611 (show_entry_values_debug, call_site_to_target_addr)
10612 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10613 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10614 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10615 (value_of_dwarf_block_entry, indirect_pieced_value)
10616 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10617 (disassemble_dwarf_expression): Likewise.
10618 * dwarf2read.c (process_die, inherit_abstract_dies)
10619 (read_call_site_scope): Likewise.
10620 * gdbtypes.h (struct func_type, struct call_site_parameter)
10621 (struct call_site): Likewise.
10622 * stack.c (read_frame_arg): Likewise.
10623 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10624
10625 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10626
10627 * defs.h (read_unsigned_leb128): New declaration.
10628 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10629 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10630 (dwarf2_find_location_expression): Call also
10631 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10632 * dwarf2loc.h (dwarf2_version): New declaration.
10633 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10634 rnglists.
10635 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10636 .debug_rnglists.
10637 (struct dwop_section_names): Add loclists_dwo.
10638 (dwop_section_names): Add .debug_loclists.dwo.
10639 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10640 (struct dwarf2_per_cu_data): Add dwarf_version.
10641 (struct dwo_sections): Add loclists.
10642 (struct attr_abbrev): Add implicit_const.
10643 (read_indirect_line_string): New declaration.
10644 (read_unsigned_leb128): Delete declaration.
10645 (rcuh_kind): New definition.
10646 (read_and_check_comp_unit_head): Change parameter
10647 is_debug_types_section to section_kind.
10648 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10649 (read_comp_unit_head): Change parameter abfd to section, add parameter
10650 section_kind. Handle DWARF-5.
10651 (error_check_comp_unit_head): Accept also DWARF version 5.
10652 (read_and_check_comp_unit_head): Change parameter
10653 is_debug_types_section to section_kind.
10654 (read_and_check_type_unit_head): Delete function.
10655 (read_abbrev_offset): Handle DWARF-5.
10656 (create_debug_type_hash_table): Add parameter section_kind. Process
10657 only DW_UT_type. Use signature and type_offset_in_tu from struct
10658 comp_unit_head.
10659 (create_debug_types_hash_table): Update create_debug_type_hash_table
10660 caller.
10661 (create_all_type_units): Call create_debug_type_hash_table.
10662 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10663 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10664 caller.
10665 (skip_one_die): Handle DW_FORM_implicit_const.
10666 (dwarf2_rnglists_process): New function.
10667 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10668 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10669 (read_attribute_value): Handle DW_FORM_implicit_const,
10670 DW_FORM_line_strp.
10671 (read_attribute): Handle DW_FORM_implicit_const.
10672 (read_indirect_string_at_offset_from): New function from
10673 read_indirect_string_at_offset.
10674 (read_indirect_string_at_offset): Call
10675 read_indirect_string_at_offset_from.
10676 (read_indirect_line_string_at_offset): New function.
10677 (read_indirect_string): New function comment.
10678 (read_indirect_line_string): New function.
10679 (read_unsigned_leb128): Make it global.
10680 (dwarf2_string_attr): Handle DWARF-5.
10681 (add_include_dir_stub, read_formatted_entries): New functions.
10682 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10683 Handle DWARF-5.
10684 (per_cu_header_read_in): Update read_comp_unit_head caller.
10685 (dwarf2_version): New function.
10686 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10687 rnglists.
10688 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10689 fields.
10690
10691 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10692
10693 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10694
10695 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10696
10697 * dwarf2read.c (dwarf2_ranges_process): New function from
10698 dwarf2_ranges_read.
10699 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10700 dwarf2_ranges_process.
10701
10702 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10703
10704 * dwarf2read.c (create_debug_type_hash_table): New function from
10705 create_debug_types_hash_table.
10706 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10707 (create_all_type_units, open_and_init_dwo_file): Update
10708 create_debug_types_hash_table callers.
10709
10710 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10711
10712 PR gdb/16188
10713 * fork-child.c (trace_start_error): Fix thinko. va_end should
10714 refer to 'ap', not 'args'.
10715
10716 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10717 Pedro Alves <palves@redhat.com>
10718
10719 PR gdb/16188
10720 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10721 calls succeeded.
10722 * fork-child.c (trace_start_error): New function.
10723 (trace_start_error_with_name): Likewise.
10724 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10725 * inf-ptrace.c (inf_ptrace_me): Likewise.
10726 * inferior.h (trace_start_error): New prototype.
10727 (trace_start_error_with_name): Likewise.
10728
10729 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10730
10731 PR gdb/21164
10732 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10733 NULL before using it.
10734 * symmisc.c (maintenance_print_symbols): Likewise.
10735 (maintenance_print_msymbols): Likewise.
10736
10737 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10738
10739 * NEWS: Add record Python bindings entry.
10740
10741 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10742
10743 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10744 py-record-full.o.
10745 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10746 * python/py-record-btrace.c, python/py-record-btrace.h,
10747 python/py-record-full.c, python/py-record-full.h: New file.
10748 * python/py-record.c: Add include for py-record-btrace.h and
10749 py-record-full.h.
10750 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10751 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10752 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10753 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10754 New definition.
10755 (gdbpy_initialize_btrace): New export.
10756 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10757
10758 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10759
10760 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10761 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10762 * python/py-record.c: New file.
10763 * python/python-internal.h (gdbpy_start_recording,
10764 gdbpy_current_recording, gdpy_stop_recording,
10765 gdbpy_initialize_record): New export.
10766 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10767 (python_GdbMethods): Add gdbpy_start_recording,
10768 gdbpy_current_recording and gdbpy_stop_recording.
10769
10770 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10771
10772 * record-btrace.c (record_btrace_record_method): New function.
10773 (init_record_btrace_ops): Initialize to_record_method.
10774 * record-full.c (record_full_record_method): New function.
10775 (init_record_full_ops, init_record_full_core_ops): Add
10776 record_full_record_method.
10777 * record.h (enum record_method): New enum.
10778 * target-debug.h (target_debug_print_enum_record_method: New define.
10779 * target-delegates.c: Regenerate.
10780 * target.c (target_record_method): New function.
10781 * target.h: Include record.h.
10782 (struct target_ops) <to_record_method>: New field.
10783 (target_record_method): New export.
10784
10785 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10786
10787 * record.h (record_start, record_stop): New export.
10788 * record.c (record_start, record_stop): New function.
10789
10790 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10791
10792 * btrace.c (btrace_fetch): Copy function call segments pointer
10793 into a vector.
10794 (btrace_clear): Clear the vector.
10795 (btrace_find_insn_by_number): Use binary search to find the correct
10796 function call segment.
10797 * btrace.h (brace_fun_p): New typedef.
10798 (struct btrace_thread_info) <functions>: New field.
10799
10800 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10801
10802 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10803 * btrace.c (btrace_decode_error): ... here. New function.
10804 * btrace.h (btrace_decode_error): New export.
10805
10806 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10807
10808 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10809 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10810 btrace_find_insn_by_number): Remove special case for gaps.
10811 * btrace.h (btrace_insn_get_error): New export.
10812 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10813 * record-btrace.c (btrace_insn_history): Print number for gaps.
10814 (record_btrace_info, record_btrace_goto): Handle gaps.
10815
10816 2017-02-14 Tom Tromey <tom@tromey.com>
10817
10818 PR python/13598:
10819 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10820 event.
10821 * python/py-evts.c (gdbpy_initialize_py_events): Add
10822 before_prompt registry.
10823 * python/py-events.h (events_object) <before_prompt>: New field.
10824
10825 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10826
10827 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10828
10829 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10830
10831 * symfile (_initialize_symfile): Add usage text to the load command's
10832 help text.
10833
10834 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10835
10836 * utils.c (defaulted_query): Don't query on secondary UIs.
10837
10838 2017-02-10 Tom Tromey <tom@tromey.com>
10839
10840 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10841
10842 2017-02-10 Tom Tromey <tom@tromey.com>
10843
10844 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10845 "cleanup" local.
10846 * python/py-type.c (typy_legacy_template_argument): Remove
10847 unnecessary "cleanup" local.
10848
10849 2017-02-10 Tom Tromey <tom@tromey.com>
10850
10851 * python/python.c (do_start_initialization): New function, from
10852 _initialize_python.
10853 (_initialize_python): Call do_start_initialization.
10854 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10855 goto.
10856
10857 2017-02-10 Tom Tromey <tom@tromey.com>
10858
10859 * python/py-prettyprint.c (pretty_print_one_value): Use
10860 gdbpy_ref.
10861
10862 2017-02-10 Tom Tromey <tom@tromey.com>
10863
10864 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10865 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10866 gdbpy_ref.
10867 * python/py-type.c (field_new): Use gdbpy_ref.
10868 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10869 gdbpy_ref.
10870 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10871 (py_free_pspace): Likewise.
10872 (pspace_to_pspace_object): Likewise.
10873 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10874 (py_free_objfile): Likewise.
10875 (objfile_to_objfile_object): Likewise.
10876 * python/py-inferior.c (delete_thread_object): Use
10877 gdbpy_ref.
10878 (infpy_read_memory): Likewise.
10879 (py_free_inferior): Likewise.
10880 * python/py-evtregistry.c (create_eventregistry_object): Use
10881 gdbpy_ref.
10882 * python/py-event.c (create_event_object): Use gdbpy_ref.
10883
10884 2017-02-10 Tom Tromey <tom@tromey.com>
10885
10886 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10887 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10888 used.
10889 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10890 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10891 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10892 python/py-framefilter.c, python/py-function.c,
10893 python/py-inferior.c, python/py-infevents.c,
10894 python/py-linetable.c, python/py-newobjfileevent.c,
10895 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10896 python/py-signalevent.c, python/py-stopevent.c,
10897 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10898 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10899 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10900 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10901
10902 2017-02-10 Tom Tromey <tom@tromey.com>
10903
10904 * ui-out.h (ui_out_emit_type): New class.
10905 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10906 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10907 and ui_out_emit_tuple.
10908 (enumerate_locals): Likewise.
10909 (py_mi_print_variables, py_print_locals, py_print_args): Use
10910 ui_out_emit_list.
10911 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10912 ui_out_emit_list.
10913 * common/gdb_optional.h: New file.
10914
10915 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10916
10917 * MAINTAINERS (Write After Approval): Update my e-mail address.
10918
10919 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10920
10921 PR gdb/21122
10922 * breakpoint.c (_initialize_breakpoint): Update the help description
10923 of the 'commands' command to indicate that it takes a list argument.
10924
10925 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10926
10927 * interps.c (current_interp_set_logging): Remove "return".
10928
10929 2017-02-09 Gary Benson <gbenson@redhat.com>
10930
10931 * symtab.c (add_symtab_completions): Prevent NULL pointer
10932 dereference.
10933
10934 2017-02-08 Pedro Alves <palves@redhat.com>
10935
10936 * interps.c (interp::interp): Remove reference to quiet_p.
10937 (interp_set): Make static. Remove dead "Switching to" output
10938 code.
10939 (interp_quiet_p, interp_set_quiet): Delete.
10940 (interpreter_exec_cmd): Don't set the interpreter quiet.
10941 * interps.h (interp_quiet_p): Make static.
10942 (class interp) <quiet_p>: Remove field
10943
10944 2017-02-08 Jerome Guitton <guitton@adacore.com>
10945
10946 * cli/cli-decode.c (find_command_name_length): Make it extern.
10947 * cli/cli-decode.h (find_command_name_length): Declare.
10948 * cli/cli-script.c (command_name_equals, line_first_arg):
10949 New functions.
10950 (process_next_line): Use cli-decode to parse command names.
10951 (build_command_line): Make args a constant pointer.
10952
10953 2017-02-08 Jerome Guitton <guitton@adacore.com>
10954
10955 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10956 Remove case-insensitive search.
10957
10958 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10959
10960 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10961 at the end of the line. Avoids an ARI warning.
10962
10963 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10964
10965 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10966 rdseed instructions.
10967 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10968
10969 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10970
10971 PR tdep/20936
10972 Provide and use sparc32 and sparc64 target description XML files.
10973 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10974 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10975 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10976 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10977 * features/sparc/sparc32-solaris.xml: New file.
10978 * features/sparc/sparc64-solaris.xml: New file.
10979 * features/sparc/sparc32-solaris.c: Generated.
10980 * features/sparc/sparc64-solaris.c: Generated.
10981 * sparc-tdep.h: Account for differences in target descriptions.
10982 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10983 (sparc32_register_type): Use target provided registers.
10984 (validate_tdesc_registers): New function.
10985 (sparc32_gdbarch_init): Use tdesc_has_registers.
10986 Set pseudoregister functions.
10987 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10988 (sparc64_register_type): Use target provided registers.
10989 (sparc64_init_abi): Set pseudoregister functions.
10990
10991 2017-02-03 Tom Tromey <tom@tromey.com>
10992
10993 PR rust/21097:
10994 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10995 with a single member.
10996
10997 2017-02-03 Pedro Alves <palves@redhat.com>
10998
10999 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11000 (cli_interp_base::~cli_interp_base): New.
11001 (cli_interp): New struct.
11002 (as_cli_interp): Cast the interp itself to cli_interp.
11003 (cli_interpreter_pre_command_loop): Rename to ...
11004 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
11005 parameter.
11006 (cli_interpreter_init): Rename to ...
11007 (cli_interp::init): ... this. Remove 'self' parameter. Use
11008 boolean. Make extern.
11009 (cli_interpreter_resume): Rename to ...
11010 (cli_interp::resume): ... this. Remove 'data' parameter. Make
11011 extern.
11012 (cli_interpreter_suspend): Rename to ...
11013 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
11014 extern.
11015 (cli_interpreter_exec): Rename to ...
11016 (cli_interp::exec): ... this. Remove 'data' parameter. Make
11017 extern.
11018 (cli_interpreter_supports_command_editing): Rename to ...
11019 (cli_interp_base::supports_command_editing): ... this. Remove
11020 'interp' parameter. Make extern.
11021 (cli_ui_out): Rename to ...
11022 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
11023 Make extern.
11024 (cli_set_logging): Rename to ...
11025 (cli_interp_base::set_logging): ... this. Remove 'interp'
11026 parameter. Make extern.
11027 (cli_interp_procs): Delete.
11028 (cli_interp_factory): Adjust to use "new".
11029 * cli/cli-interp.h: Include "interps.h".
11030 (struct cli_interp_base): New struct.
11031 * interps.c (struct interp): Delete. Fields moved to interps.h.
11032 (interp_new): Delete.
11033 (interp::interp, interp::~interp): New.
11034 (interp_set): Use bool, and return void. Assume the interpreter
11035 has suspend, init and resume methods, and that the all return
11036 void.
11037 (set_top_level_interpreter): interp_set returns void.
11038 (interp_ui_out): Adapt.
11039 (current_interp_set_logging): Adapt.
11040 (interp_data): Delete.
11041 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11042 (interp_exec): Adapt.
11043 (top_level_interpreter_data): Delete.
11044 * interps.h (interp_init_ftype, interp_resume_ftype)
11045 (interp_suspend_ftype, interp_exec_ftype)
11046 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11047 (class interp): New.
11048 (interp_new): Delete.
11049 (interp_set): Now returns void. Use bool.
11050 (interp_data, top_level_interpreter_data): Delete.
11051 * mi/mi-common.h: Include interps.h.
11052 (class mi_interp): Inherit from interp. Define a ctor. Declare
11053 init, resume, suspect, exec, interp_ui_out, set_logging and
11054 pre_command_loop methods.
11055 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11056 (mi_interpreter_init): Rename to ...
11057 (mi_interp::init): ... this. Remove the 'interp' parameter, use
11058 bool, return void and make extern. Adjust.
11059 (mi_interpreter_resume): ... Rename to ...
11060 (mi_interp::resume): ... this. Remove the 'data' parameter,
11061 return void and make extern. Adjust.
11062 (mi_interpreter_suspend): ... Rename to ...
11063 (mi_interp::suspend): ... this. Remove the 'data' parameter,
11064 return void and make extern. Adjust.
11065 (mi_interpreter_exec): ... Rename to ...
11066 (mi_interp::exec): ... this. Remove the 'data' parameter and make
11067 extern. Adjust.
11068 (mi_interpreter_pre_command_loop): ... Rename to ...
11069 (mi_interp::pre_command_loop): ... this. Remove the 'self'
11070 parameter and make extern.
11071 (mi_on_normal_stop_1): Adjust.
11072 (mi_ui_out): Rename to ...
11073 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
11074 parameter and make extern. Adjust.
11075 (mi_set_logging): Rename to ...
11076 (mi_interp::set_logging): ... this. Remove the 'interp'
11077 parameter and make extern. Adjust.
11078 (mi_interp_procs): Delete.
11079 (mi_interp_factory): Adjust to use 'new'.
11080 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11081 (mi_print_exception, mi_execute_command, mi_load_progress):
11082 Adjust.
11083 * tui/tui-interp.c (tui_interp): New class.
11084 (as_tui_interp): Return a tui_interp pointer.
11085 (tui_on_normal_stop, tui_on_signal_received)
11086 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11087 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11088 to use interp::interp_ui_out.
11089 (tui_init): Rename to ...
11090 (tui_interp::init): ... this. Remove the 'self' parameter, use
11091 bool, return void and make extern. Adjust.
11092 (tui_resume): Rename to ...
11093 (tui_interp::resume): ... this. Remove the 'data' parameter,
11094 return void and make extern. Adjust.
11095 (tui_suspend): Rename to ...
11096 (tui_interp::suspend): ... this. Remove the 'data' parameter,
11097 return void and make extern. Adjust.
11098 (tui_ui_out): Rename to ...
11099 (tui_interp::interp_ui_out): ... this. Remove the 'self'
11100 parameter, and make extern. Adjust.
11101 (tui_exec): Rename to ...
11102 (tui_interp::exec): ... this. Remove the 'data' parameter and
11103 make extern.
11104 (tui_interp_procs): Delete.
11105 (tui_interp_factory): Use "new".
11106
11107 2017-02-02 Tom Tromey <tom@tromey.com>
11108
11109 * rust-exp.y (ends_raw_string, space_then_number)
11110 (rust_identifier_start_p): Return bool.
11111 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11112 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11113 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11114 (rust_chartype_p): Return bool.
11115 (val_print_struct, rust_print_struct_def, rust_print_type):
11116 Update.
11117 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11118 Return bool.
11119
11120 2017-02-02 Tom Tromey <tom@tromey.com>
11121
11122 * rust-lang.c: Reindent.
11123
11124 2017-02-02 Tom Tromey <tom@tromey.com>
11125
11126 * rust-lang.h (rust_crate_for_block): Update.
11127 * rust-lang.c (rust_crate_for_block): Return std::string.
11128 (rust_get_disr_info): Use std:;string, not
11129 gdb::unique_xmalloc_ptr.
11130 * rust-exp.y (crate_name): Update.
11131
11132 2017-02-02 Pedro Alves <palves@redhat.com>
11133
11134 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11135 field out of gdb_disassembler_test and make it static.
11136
11137 2017-02-02 Pedro Alves <palves@redhat.com>
11138
11139 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11140 mi1_interp and mi_interp fields.
11141
11142 2017-02-02 Pedro Alves <palves@redhat.com>
11143
11144 * cli/cli-interp.c (struct saved_output_files, saved_output):
11145 Moved from cli/cli-logging.c.
11146 (cli_set_logging): New function.
11147 (cli_interp_procs): Install cli_set_logging.
11148 * cli/cli-interp.h (make_logging_output, cli_set_logging):
11149 Declare.
11150 * cli/cli-logging.c (struct saved_output_files, saved_output):
11151 Moved to cli/cli-interp.c.
11152 (pop_output_files): Don't save outputs here.
11153 (make_logging_output): New function.
11154 (handle_redirections): Don't build tee nor save previous outputs
11155 here.
11156 * interps.c (current_interp_set_logging): Change prototype.
11157 Assume there's always a set_logging_proc method installed.
11158 * interps.h (interp_set_logging_ftype): Change prototype.
11159 (current_interp_set_logging): Change prototype and adjust comment.
11160 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
11161 use make_logging_output.
11162 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11163 2017-02-02 Pedro Alves <palves@redhat.com>
11164
11165 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11166 from ...
11167 (set_logging_overwrite): ... here.
11168 (logging_no_redirect_file): Delete.
11169 (set_logging_redirect): Don't handle redirection on the fly.
11170 Instead warn that "logging off" / "logging on" is necessary.
11171 (pop_output_files): Delete references to logging_no_redirect_file.
11172 (show_logging_command): Always speak in terms of what will happen
11173 once logging is reenabled.
11174
11175 2017-02-02 Pedro Alves <palves@redhat.com>
11176
11177 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11178
11179 2017-02-02 Pedro Alves <palves@redhat.com>
11180
11181 * disasm.c (gdb_pretty_print_insn): Rename to ...
11182 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11183 Remove gdbarch parameter. Adapt to clear the object's buffers
11184 instead of allocating new buffers, and to print using the object's
11185 gdb_disassembler instead of calling gdb_print_insn.
11186 (dump_insns): Use gdb_pretty_print_disassembler.
11187 * disasm.h (gdb_pretty_print_insn): Delete declaration.
11188 (gdb_pretty_print_disassembler): New class.
11189 * record-btrace.c (btrace_insn_history): Use
11190 gdb_pretty_print_disassembler.
11191
11192 2017-02-02 Pedro Alves <palves@redhat.com>
11193
11194 * ada-lang.c (type_as_string): Use string_file.
11195 * ada-valprint.c (ada_print_floating): Use string_file.
11196 * ada-varobj.c (ada_varobj_scalar_image)
11197 (ada_varobj_get_value_image): Use string_file.
11198 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11199 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11200 * breakpoint.c (update_inserted_breakpoint_locations)
11201 (insert_breakpoint_locations, reattach_breakpoints)
11202 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11203 (print_it_watchpoint): Use string_file.
11204 (save_breakpoints): Use stdio_file.
11205 * c-exp.y (oper): Use string_file.
11206 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11207 tee_file.
11208 (pop_output_files): Use delete.
11209 (handle_redirections): Use stdio_file and tee_file.
11210 * cli/cli-setshow.c (do_show_command): Use string_file.
11211 * compile/compile-c-support.c (c_compute_program): Use
11212 string_file.
11213 * compile/compile-c-symbols.c (generate_vla_size): Take a
11214 'string_file &' instead of a 'ui_file *'.
11215 (generate_c_for_for_one_variable): Take a 'string_file &' instead
11216 of a 'ui_file *'. Use string_file.
11217 (generate_c_for_variable_locations): Take a 'string_file &'
11218 instead of a 'ui_file *'.
11219 * compile/compile-internal.h (generate_c_for_for_one_variable):
11220 Take a 'string_file &' instead of a 'ui_file *'.
11221 * compile/compile-loc2c.c (push, pushf, unary, binary)
11222 (print_label, pushf_register_address, pushf_register)
11223 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11224 'ui_file *'. Adjust.
11225 * compile/compile.c (compile_to_object): Use string_file.
11226 * compile/compile.h (compile_dwarf_expr_to_c)
11227 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11228 'ui_file *'.
11229 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11230 (replace_typedefs_qualified_name): Use string_file and
11231 obstack_copy0.
11232 * disasm.c (gdb_pretty_print_insn): Use string_file.
11233 (gdb_disassembly): Adjust reference the null_stream global.
11234 (do_ui_file_delete): Delete.
11235 (gdb_insn_length): Use null_stream.
11236 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11237 * dwarf2loc.c (dwarf2_compile_property_to_c)
11238 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11239 'string_file &' instead of a 'ui_file *'.
11240 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11241 * dwarf2read.c (do_ui_file_peek_last): Delete.
11242 (dwarf2_compute_name): Use string_file.
11243 * event-top.c (gdb_setup_readline): Use stdio_file.
11244 * gdbarch.sh (verify_gdbarch): Use string_file.
11245 * gdbtypes.c (safe_parse_type): Use null_stream.
11246 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11247 string_file.
11248 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11249 'string_file *' instead of a 'ui_file *'.
11250 (gdbscm_arch_disassemble): Use string_file.
11251 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11252 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11253 inherits from ui_file.
11254 (ioscm_file_port_delete, ioscm_file_port_rewind)
11255 (ioscm_file_port_put): Delete.
11256 (ioscm_file_port_write): Rename to ...
11257 (ioscm_file_port::write): ... this. Remove file_port_magic
11258 checks.
11259 (ioscm_file_port_new): Delete.
11260 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11261 ui_file_up.
11262 * guile/scm-type.c (tyscm_type_name): Use string_file.
11263 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11264 Use string_file.
11265 * infcmd.c (print_return_value_1): Use string_file.
11266 * infrun.c (print_target_wait_results): Use string_file.
11267 * language.c (add_language): Use string_file.
11268 * location.c (explicit_to_string_internal): Use string_file.
11269 * main.c (captured_main_1): Use null_file.
11270 * maint.c (maintenance_print_architecture): Use stdio_file.
11271 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11272 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11273 event_channel>: Change type to mi_console_file pointer.
11274 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11275 (mi_console_file_delete): Delete.
11276 (struct mi_console_file): Delete.
11277 (mi_console_file_magic): Delete.
11278 (mi_console_file_new): Delete.
11279 (mi_console_file::mi_console_file): New.
11280 (mi_console_file_delete): Delete.
11281 (mi_console_file_fputs): Delete.
11282 (mi_console_file::write): New.
11283 (mi_console_raw_packet): Delete.
11284 (mi_console_file::flush): New.
11285 (mi_console_file_flush): Delete.
11286 (mi_console_set_raw): Rename to ...
11287 (mi_console_file::set_raw): ... this.
11288 * mi/mi-console.h (class mi_console_file): New class.
11289 (mi_console_file_new, mi_console_set_raw): Delete.
11290 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11291 (mi_set_logging): Use delete and tee_file. Adjust.
11292 * mi/mi-main.c (output_register): Use string_file.
11293 (mi_cmd_data_evaluate_expression): Use string_file.
11294 (mi_cmd_data_read_memory): Use string_file.
11295 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11296 * mi/mi-out.c (mi_ui_out::main_stream): New.
11297 (mi_ui_out::rewind): Use main_stream and
11298 string_file.
11299 (mi_ui_out::put): Use main_stream and string_file.
11300 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11301 Allocate a 'string_file' instead.
11302 (mi_out_new): Don't allocate a mem_fileopen stream here.
11303 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11304 (mi_ui_out::main_stream): Declare method.
11305 * printcmd.c (eval_command): Use string_file.
11306 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11307 * python/py-arch.c (archpy_disassemble): Use string_file.
11308 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11309 * python/py-frame.c (frapy_str): Use string_file.
11310 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11311 Use string_file.
11312 * python/py-type.c (typy_str): Use string_file.
11313 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11314 * python/py-value.c (valpy_str): Use string_file.
11315 * record-btrace.c (btrace_insn_history): Use string_file.
11316 * regcache.c (regcache_print): Use stdio_file.
11317 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11318 * remote.c (escape_buffer): Use string_file.
11319 * rust-lang.c (rust_get_disr_info): Use string_file.
11320 * serial.c (serial_open_ops_1): Use stdio_file.
11321 (do_serial_close): Use delete.
11322 * stack.c (print_frame_arg): Use string_file.
11323 (print_frame_args): Remove local mem_fileopen stream, not used.
11324 (print_frame): Use string_file.
11325 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11326 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11327 Take a 'string_file *' instead of a 'ui_file *'.
11328 * top.c (new_ui): Use stdio_file and stderr_file.
11329 (free_ui): Use delete.
11330 (execute_command_to_string): Use string_file.
11331 (quit_confirm): Use string_file.
11332 * tracepoint.c (collection_list::append_exp): Use string_file.
11333 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11334 * tui/tui-file.c: Don't include "ui-file.h".
11335 (enum streamtype, struct tui_stream): Delete.
11336 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11337 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11338 (tui_file::tui_file): New method.
11339 (tui_file_fputs): Delete.
11340 (tui_file_get_strbuf): Delete.
11341 (tui_file::puts): New method.
11342 (tui_file_adjust_strbuf): Delete.
11343 (tui_file_flush): Delete.
11344 (tui_file::flush): New method.
11345 * tui/tui-file.h: Tweak intro comment.
11346 Include ui-file.h.
11347 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11348 (tui_file_adjust_strbuf): Delete declarations.
11349 (class tui_file): New class.
11350 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11351 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11352 (tui_register_format): Use string_stream.
11353 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11354 (tui_get_function_from_frame): Use string_file.
11355 * typeprint.c (type_to_string): Use string_file.
11356 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11357 (null_stream): New global.
11358 (ui_file_delete): Delete.
11359 (ui_file::ui_file): New.
11360 (null_file_isatty): Delete.
11361 (ui_file::~ui_file): New.
11362 (null_file_rewind): Delete.
11363 (ui_file::printf): New.
11364 (null_file_put): Delete.
11365 (null_file_flush): Delete.
11366 (ui_file::putstr): New.
11367 (null_file_write): Delete.
11368 (ui_file::putstrn): New.
11369 (null_file_read): Delete.
11370 (ui_file::putc): New.
11371 (null_file_fputs): Delete.
11372 (null_file_write_async_safe): Delete.
11373 (ui_file::vprintf): New.
11374 (null_file_delete): Delete.
11375 (null_file::write): New.
11376 (null_file_fseek): Delete.
11377 (null_file::puts): New.
11378 (ui_file_data): Delete.
11379 (null_file::write_async_safe): New.
11380 (gdb_flush, ui_file_isatty): Adjust.
11381 (ui_file_put, ui_file_rewind): Delete.
11382 (ui_file_write): Adjust.
11383 (ui_file_write_for_put): Delete.
11384 (ui_file_write_async_safe, ui_file_read): Adjust.
11385 (ui_file_fseek): Delete.
11386 (fputs_unfiltered): Adjust.
11387 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11388 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11389 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11390 (set_ui_file_data): Delete.
11391 (string_file::~string_file, string_file::write)
11392 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11393 (do_ui_file_as_string, ui_file_as_string): Delete.
11394 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11395 (struct mem_file): Delete.
11396 (mem_file_new): Delete.
11397 (stdio_file::stdio_file): New.
11398 (mem_file_delete): Delete.
11399 (stdio_file::stdio_file): New.
11400 (mem_fileopen): Delete.
11401 (stdio_file::~stdio_file): New.
11402 (mem_file_rewind): Delete.
11403 (stdio_file::set_stream): New.
11404 (mem_file_put): Delete.
11405 (stdio_file::open): New.
11406 (mem_file_write): Delete.
11407 (stdio_file_magic, struct stdio_file): Delete.
11408 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11409 (stdio_file::flush): New.
11410 (stdio_file_read): Rename to ...
11411 (stdio_file::read): ... this. Adjust.
11412 (stdio_file_write): Rename to ...
11413 (stdio_file::write): ... this. Adjust.
11414 (stdio_file_write_async_safe): Rename to ...
11415 (stdio_file::write_async_safe) ... this. Adjust.
11416 (stdio_file_fputs): Rename to ...
11417 (stdio_file::puts) ... this. Adjust.
11418 (stdio_file_isatty): Delete.
11419 (stdio_file_fseek): Delete.
11420 (stdio_file::isatty): New.
11421 (stderr_file_write): Rename to ...
11422 (stderr_file::write) ... this. Adjust.
11423 (stderr_file_fputs): Rename to ...
11424 (stderr_file::puts) ... this. Adjust.
11425 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11426 (stderr_file::stderr_file): New.
11427 (tee_file_magic): Delete.
11428 (struct tee_file): Delete.
11429 (tee_file::tee_file): New.
11430 (tee_file_new): Delete.
11431 (tee_file::~tee_file): New.
11432 (tee_file_delete): Delete.
11433 (tee_file_flush): Rename to ...
11434 (tee_file::flush): ... this. Adjust.
11435 (tee_file_write): Rename to ...
11436 (tee_file::write): ... this. Adjust.
11437 (tee_file::write_async_safe): New.
11438 (tee_file_fputs): Rename to ...
11439 (tee_file::puts): ... this. Adjust.
11440 (tee_file_isatty): Rename to ...
11441 (tee_file::isatty): ... this. Adjust.
11442 * ui-file.h (struct obstack, struct ui_file): Don't
11443 forward-declare.
11444 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11445 (ui_file_write_ftype)
11446 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11447 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11448 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11449 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11450 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11451 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11452 (set_ui_file_fseek): Delete.
11453 (ui_file_data, ui_file_delete, ui_file_rewind)
11454 (struct ui_file): New.
11455 (ui_file_up): New.
11456 (class null_file): New.
11457 (null_stream): Declare.
11458 (ui_file_write_for_put, ui_file_put): Delete.
11459 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11460 Delete.
11461 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11462 (gdb_fopen, tee_file_new): Delete.
11463 (struct string_file): New.
11464 (struct stdio_file): New.
11465 (stdio_file_up): New.
11466 (struct stderr_file): New.
11467 (class tee_file): New.
11468 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11469 of a 'ui_file *'. Adjust.
11470 * ui-out.h (class ui_out) <field_stream>: Likewise.
11471 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11472 (null_stream): Delete.
11473 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11474 Adjust.
11475 * utils.h (struct ui_file): Delete forward declaration..
11476 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11477 (error_stream): Take a 'string_file &' instead of a
11478 'ui_file *'.
11479 * varobj.c (varobj_value_get_print_value): Use string_file.
11480 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11481 * gdbarch.c: Regenerate.
11482
11483 2017-02-02 Pedro Alves <palves@redhat.com>
11484
11485 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11486 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11487 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11488 Adjust to call gdb_print_insn instead of
11489 gdb_disassembler::print_insn.
11490 (dump_insns, do_mixed_source_and_assembly_deprecated)
11491 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11492 'gdbarch' parameter. Remove gdb_disassembler parameter.
11493 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11494 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11495 declaration.
11496 (gdb_pretty_print_insn): Re-add declaration.
11497 * record-btrace.c (btrace_insn_history): Don't allocate a
11498 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11499
11500 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11501
11502 * disasm.h (gdb_disassembly): Remove file_string parameter.
11503 * disasm.c (gdb_disassembly): Likewise.
11504 * cli/cli-cmds.c (print_disassembly): Adapt.
11505 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11506 * stack.c (do_gdb_disassembly): Likewise.
11507
11508 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11509
11510 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11511 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11512 targets. And if the implicit value is longer than needed, extract
11513 the first bytes instead of the "least significant" ones.
11514
11515 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11516
11517 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11518 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11519 (btrace_fetch): Assert can_access_registers_ptid.
11520 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11521 validate_registers_access.
11522
11523 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11524
11525 * gdbthread.h (can_access_registers_ptid): New.
11526 * thread.c (can_access_registers_ptid): New.
11527
11528 2017-02-01 Pedro Alves <palves@redhat.com>
11529
11530 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11531
11532 2017-01-31 Pedro Alves <palves@redhat.com>
11533
11534 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11535 Fix typos.
11536
11537 2017-01-31 Pedro Alves <palves@redhat.com>
11538
11539 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11540 not used.
11541
11542 2017-01-31 Pedro Alves <palves@redhat.com>
11543
11544 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11545
11546 2017-01-31 Pedro Alves <palves@redhat.com>
11547
11548 * common/scoped_restore.h
11549 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11550 change the value's parameter type to T2.
11551 (make_scoped_restore): Likewise.
11552
11553 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11554 Richard Henderson <rth@redhat.com>
11555
11556 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11557 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11558 GS_BASE for older kernels.
11559 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11560 GS_BASE for older kernels.
11561 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11562 and GS_BASE to the offset table.
11563 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11564 system register group.
11565 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11566 for older kernels.
11567 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11568 amd64 ABI.
11569 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11570 AMD64_GSBASE_REGNUM.
11571 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11572 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11573 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11574 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11575 i386/64bit-segments.xml in those rules.
11576 * features/i386/64bit-segments.xml: New file.
11577 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11578 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11579 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11580 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11581 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11582 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11583 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11584 * features/i386/amd64-avx-linux.c: Regenerated.
11585 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11586 * features/i386/amd64-avx-mpx.c: Regenerated.
11587 * features/i386/amd64-avx512-linux.c: Regenerated.
11588 * features/i386/amd64-linux.c: Regenerated.
11589 * features/i386/amd64-mpx-linux.c: Regenerated.
11590 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11591 * features/i386/i386-avx-mpx.c: Regenerated.
11592 * features/i386/x32-avx-linux.c: Regenerated.
11593 * features/i386/x32-avx512-linux.c: Regenerated.
11594 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11595 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11596 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11597 * regformats/i386/amd64-linux.dat: Regenerated.
11598 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11599 * regformats/i386/x32-avx-linux.dat: Regenerated.
11600 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11601 * regformats/i386/x32-linux.dat: Regenerated.
11602
11603 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11604
11605 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11606 Set to AMD64_NUM_REGS.
11607
11608 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11609
11610 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11611 that checks validity of a register number.
11612
11613 2017-01-27 Kees Cook <keescook@google.com>
11614
11615 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11616 fetch_fpregs if target has fpa registers.
11617 (arm_linux_store_inferior_registers): Call store_fpregs if target
11618 has fpa registers.
11619
11620 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11621
11622 * cris-tdep.c (cris_gdbarch_init): Remove check for
11623 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11624
11625 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11626
11627 * corelow.c (get_core_register_section): Check for regset
11628 existence before checking for REGSET_VARIABLE_SIZE.
11629
11630 2017-01-26 Yao Qi <yao.qi@linaro.org>
11631 Pedro Alves <palves@redhat.com>
11632
11633 PR gdb/20939
11634 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11635 call memory_error, save memaddr instead.
11636 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11637 negative, cal memory_error.
11638 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11639
11640 2017-01-26 Yao Qi <yao.qi@linaro.org>
11641
11642 * disasm-selftests.c (memory_error_test): New function.
11643 (_initialize_disasm_selftests): Register memory_error_test.
11644
11645 2017-01-26 Yao Qi <yao.qi@linaro.org>
11646
11647 * Makefile.in (SFILES): Add disasm-selftests.c and
11648 selftest-arch.c.
11649 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11650 * disasm-selftests.c: New file.
11651 * selftest-arch.c: New file.
11652 * selftest-arch.h: New file.
11653
11654 2017-01-26 Yao Qi <yao.qi@linaro.org>
11655
11656 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11657 to bfd_arch_mep. Don't return 0 if section is not
11658 found. Call print_insn_mep.
11659
11660 2017-01-26 Pedro Alves <palves@redhat.com>
11661 Yao Qi <yao.qi@linaro.org>
11662
11663 * arm-tdep.c: Include "disasm.h".
11664 (gdb_print_insn_arm): Update code to get gdbarch.
11665 * disasm.c (dis_asm_read_memory): Change it to
11666 gdb_disassembler::dis_asm_read_memory.
11667 (dis_asm_memory_error): Likewise.
11668 (dis_asm_print_address): Likewise.
11669 (gdb_pretty_print_insn): Change it to
11670 gdb_disassembler::pretty_print_insn.
11671 (dump_insns): Add one argument gdb_disassemlber. All
11672 callers updated.
11673 (do_mixed_source_and_assembly_deprecated): Likewise.
11674 (do_mixed_source_and_assembly): Likewise.
11675 (do_assembly_only): Likewise.
11676 (gdb_disassembler::gdb_disassembler): New.
11677 (gdb_disassembler::print_insn): New.
11678 * disasm.h (class gdb_disassembler): New.
11679 (gdb_pretty_print_insn): Remove declaration.
11680 (gdb_disassemble_info): Likewise.
11681 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11682 (gdbscm_disasm_read_memory_worker): Update.
11683 (gdbscm_disasm_read_memory): Update.
11684 (gdbscm_disasm_memory_error): Remove.
11685 (gdbscm_disasm_print_address): Remove.
11686 (gdbscm_disassembler::gdbscm_disassembler): New.
11687 (gdbscm_print_insn_from_port): Update.
11688 * mips-tdep.c: Include disasm.h.
11689 (gdb_print_insn_mips): Update code to get gdbarch.
11690 * record-btrace.c (btrace_insn_history): Update.
11691 * spu-tdep.c: Include disasm.h.
11692 (struct spu_dis_asm_data): Remove.
11693 (struct spu_dis_asm_info): New.
11694 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11695 SPU id.
11696 (gdb_print_insn_spu): Cast disassemble_info to
11697 spu_dis_asm_info.
11698
11699 2017-01-26 Yao Qi <yao.qi@linaro.org>
11700
11701 * disasm.c (do_ui_file_delete): Delete.
11702 (gdb_insn_length): Move code creating stream to ...
11703 * utils.c (null_stream): ... here. New function.
11704 * utils.h (null_stream): Declare.
11705
11706 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11707
11708 * python/py-inferior.c (find_thread_object): Return directly
11709 from the loop. Remove "found" variable.
11710
11711 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11712
11713 GDB 7.12.1 released.
11714
11715 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11716
11717 * python/py-function.c (fnpy_call): Reorder declarations to have
11718 the gdbpy_enter object declared first.
11719 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11720
11721 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11722
11723 PR python/21068
11724 * python/python-internal.h (PyMem_RawMalloc): Define for
11725 Python < 3.4.
11726 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11727 PyMem_RawMalloc instead of PyMem_Malloc.
11728
11729 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11730 Luis Machado <lgustavo@codesourcery.com>
11731
11732 * NEWS (New commands): Mention flash-erase.
11733 (New MI commands): Mention target-flash-erase.
11734 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11735 command.
11736 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11737 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11738 * target.c (flash_erase_command): New function.
11739 (initialize_targets): Add new flash-erase command.
11740 * target.h (flash_erase_command): New declaration.
11741
11742 2017-01-20 Joel Brobecker <brobecker@adacore.com>
11743
11744 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11745 HAVE_SYS_PROCFS_H is defined.
11746
11747 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11748
11749 * remote.c (struct cached_reg): Change data into a pointer.
11750 * (stop_reply_dtr): Free data pointers before deleting vector.
11751 (process_stop_reply): Likewise.
11752 (remote_parse_stop_reply): Allocate space for data
11753
11754 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11755
11756 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11757 MAX_REGISTER_SIZE.
11758 (amd64_pseudo_register_read_value): Likewise.
11759 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11760 (store_register_using_P): Likewise.
11761 * regcache.c (regcache_xfer_part): Likewise.
11762
11763 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11764
11765 Split real and pseudo registers.
11766 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11767 (sparc32_pseudo_regnum): New enum.
11768 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11769 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11770 (SPARC32_CP0_REGISTERS): New macro.
11771 (sparc32_pseudo_register_name): New function.
11772 (sparc32_register_name): Use sparc32_pseudo_register_name.
11773 (sparc32_pseudo_register_type): New function.
11774 (sparc32_register_type): Use sparc32_pseudo_register_type.
11775 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11776 pseudo register numbers.
11777 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11778 (SPARC64_CP0_REGISTERS): New macro.
11779 (sparc64_pseudo_register_name): New function.
11780 (sparc64_register_name): Use sparc64_pseudo_register_name.
11781 (sparc64_pseudo_register_type): New function.
11782 (sparc64_register_type): Use sparc64_pseudo_register_type.
11783 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11784 pseudo register numbers.
11785 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11786 sparc64_store_arguments): Handle pseudo register numbers.
11787
11788 2017-01-13 Yao Qi <yao.qi@linaro.org>
11789
11790 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11791 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11792 output.
11793 (getpkt_or_notif_sane_1): Likewise.
11794
11795 2017-01-13 Yao Qi <yao.qi@linaro.org>
11796
11797 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11798 of CC. Pass "-x c++-header" instead of "-x c".
11799
11800 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11801
11802 * remote.c (remote_can_async_p): Update comment.
11803
11804 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11805
11806 * linux-nat.c (linux_nat_can_async_p): Update comment.
11807
11808 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11809
11810 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11811
11812 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11813
11814 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11815
11816 2017-01-10 Tom Tromey <tom@tromey.com>
11817
11818 * python/py-type.c (typy_legacy_template_argument): Update.
11819 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11820 ~demangle_parse_info): Declare new members.
11821 (cp_demangled_name_to_comp): Return unique_ptr.
11822 (cp_demangled_name_parse_free)
11823 (make_cleanup_cp_demangled_name_parse_free)
11824 (cp_new_demangle_parse_info): Remove.
11825 * cp-support.c (do_demangled_name_parse_free_cleanup)
11826 (make_cleanup_cp_demangled_name_parse_free): Remove.
11827 (inspect_type, cp_canonicalize_string_full)
11828 (cp_canonicalize_string): Update.
11829 (mangled_name_to_comp): Change return type.
11830 (cp_class_name_from_physname, method_name_from_physname)
11831 (cp_func_name, cp_remove_params): Update.
11832 * cp-name-parser.y (demangle_parse_info): New constructor, from
11833 cp_new_demangle_parse_info.
11834 (~demangle_parse_info): New destructor, from
11835 cp_demangled_name_parse_free.
11836 (cp_merge_demangle_parse_infos): Update.
11837 (cp_demangled_name_to_comp): Change return type.
11838
11839 2017-01-10 Tom Tromey <tom@tromey.com>
11840
11841 * top.c (prevent_dont_repeat): Change return type.
11842 * python/python.c (execute_gdb_command): Use std::string.
11843 Update.
11844 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11845 * command.h (prevent_dont_repeat): Change return type.
11846 * breakpoint.c (bpstat_do_actions_1): Update.
11847
11848 2017-01-10 Tom Tromey <tom@tromey.com>
11849
11850 * value.h (scoped_value_mark::~scoped_value_mark): Call
11851 free_to_mark.
11852 (scoped_value_mark::free_to_mark): New method.
11853 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11854 scoped_value_mark.
11855
11856 2017-01-10 Tom Tromey <tom@tromey.com>
11857
11858 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11859 (valpy_reference_value, valpy_const_value, valpy_get_address)
11860 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11861 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11862 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11863 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11864 scoped_value_mark.
11865 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11866 * value.h (scoped_value_mark): New class.
11867
11868 2017-01-10 Tom Tromey <tom@tromey.com>
11869
11870 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11871 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11872 * psymtab.c (discard_psymtabs_upto): Remove.
11873 (make_cleanup_discard_psymtabs): Remove.
11874 (struct psymtab_state): Remove.
11875
11876 2017-01-10 Tom Tromey <tom@tromey.com>
11877
11878 * record-full.c (record_full_save_cleanups): Remove.
11879 (record_full_save): Use gdb::unlinker.
11880 * gcore.c (do_bfd_delete_cleanup): Remove.
11881 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11882 cleanups.
11883 * dwarf2read.c (unlink_if_set): Remove.
11884 (write_psymtabs_to_index): Use gdb::unlinker.
11885 * common/gdb_unlinker.h: New file.
11886
11887 2017-01-10 Tom Tromey <tom@tromey.com>
11888
11889 * windows-tdep.c (windows_xfer_shared_library): Update.
11890 * windows-nat.c (windows_make_so): Update.
11891 * utils.h (make_cleanup_bfd_unref): Remove.
11892 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11893 * symfile.h (symfile_bfd_open)
11894 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11895 * symfile.c (read_symbols, symbol_file_add)
11896 (separate_debug_file_exists): Update.
11897 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11898 (generic_load, reread_symbols): Update.
11899 * symfile-mem.c (symbol_file_add_from_memory): Update.
11900 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11901 (spu_symbol_file_add_from_memory): Update.
11902 * solist.h (struct target_so_ops) <bfd_open>: Return
11903 gdb_bfd_ref_ptr.
11904 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11905 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11906 gdb_bfd_ref_ptr.
11907 (solib_map_sections, reload_shared_libraries_1): Update.
11908 * solib-svr4.c (enable_break): Update.
11909 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11910 * solib-frv.c (enable_break2): Update.
11911 * solib-dsbt.c (enable_break): Update.
11912 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11913 gdb_bfd_ref_ptr.
11914 (darwin_solib_get_all_image_info_addr_at_init): Update.
11915 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11916 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11917 * record-full.c (record_full_save): Update.
11918 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11919 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11920 * minidebug.c (find_separate_debug_file_in_section): Return
11921 gdb_bfd_ref_ptr.
11922 * machoread.c (macho_add_oso_symfile): Change abfd to
11923 gdb_bfd_ref_ptr.
11924 (macho_symfile_read_all_oso): Update.
11925 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11926 (macho_symfile_read): Update.
11927 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11928 (jit_bfd_try_read_symtab): Update.
11929 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11930 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11931 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11932 gdb_bfd_ref_ptr.
11933 (gdb_bfd_ref_policy): New struct.
11934 (gdb_bfd_ref_ptr): New typedef.
11935 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11936 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11937 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11938 gdb_bfd_ref_ptr.
11939 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11940 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11941 (gcore_command): Update.
11942 * exec.c (exec_file_attach): Update.
11943 * elfread.c (elf_symfile_read): Update.
11944 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11945 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11946 (open_and_init_dwo_file): Update.
11947 (open_dwp_file): Return gdb_bfd_ref_ptr.
11948 (open_and_init_dwp_file): Update.
11949 * corelow.c (core_open): Update.
11950 * compile/compile-object-load.c (compile_object_load): Update.
11951 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11952 * coffread.c (coff_symfile_read): Update.
11953 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11954 gdb_bfd_ref_ptr. Rename.
11955 (dump_bfd_file, restore_command): Update.
11956 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11957 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11958 (find_separate_debug_file_by_buildid): Update.
11959
11960 2017-01-10 Tom Tromey <tom@tromey.com>
11961
11962 * common/gdb_ref_ptr.h: New file.
11963 * python/py-ref.h (struct gdbpy_ref_policy): New.
11964 (gdbpy_ref): Now a typedef.
11965
11966 2017-01-10 Tom Tromey <tom@tromey.com>
11967
11968 * utils.h (make_cleanup_htab_delete): Don't declare.
11969 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11970 Remove.
11971 * linespec.c (decode_compound_collector): Add constructor,
11972 destructor.
11973 (lookup_prefix_sym): Remove cleanup.
11974 (symtab_collector): Add constructor, destructor.
11975 (collect_symtabs_from_filename): Remove cleanup.
11976 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11977 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11978 Use htab_up.
11979 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11980 * dwarf2read.c (dw2_expand_symtabs_matching)
11981 (dw2_map_symbol_filenames, dwarf_decode_macros)
11982 (write_psymtabs_to_index): Use htab_up.
11983 * dwarf2loc.c (func_verify_no_selftailcall)
11984 (call_site_find_chain_1, func_verify_no_selftailcall)
11985 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11986 std::vector, gdb::unique_xmalloc_ptr.
11987 (call_sitep): Remove typedef.
11988 (dwarf2_locexpr_baton_eval): Remove unused variable.
11989
11990 2017-01-10 Tom Tromey <tom@tromey.com>
11991
11992 * python/python-internal.h (make_cleanup_py_decref)
11993 (make_cleanup_py_xdecref): Don't declare.
11994 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11995 (py_xdecref, make_cleanup_py_xdecref): Remove.
11996
11997 2017-01-10 Tom Tromey <tom@tromey.com>
11998
11999 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12000 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12001
12002 2017-01-10 Tom Tromey <tom@tromey.com>
12003
12004 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12005
12006 2017-01-10 Tom Tromey <tom@tromey.com>
12007
12008 * python/py-utils.c (unicode_to_encoded_string)
12009 (python_string_to_target_string)
12010 (python_string_to_target_python_string)
12011 (python_string_to_host_string, gdbpy_obj_to_string)
12012 (get_addr_from_python): Use gdbpy_ref.
12013
12014 2017-01-10 Tom Tromey <tom@tromey.com>
12015
12016 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12017 gdbpy_ref.
12018
12019 2017-01-10 Tom Tromey <tom@tromey.com>
12020
12021 * python/python.c (eval_python_command, gdbpy_decode_line)
12022 (gdbpy_run_events, gdbpy_start_type_printers)
12023 (gdbpy_apply_type_printers): Use gdbpy_ref.
12024
12025 2017-01-10 Tom Tromey <tom@tromey.com>
12026
12027 * python/py-param.c (get_doc_string, compute_enum_values): Use
12028 gdbpy_ref.
12029
12030 2017-01-10 Tom Tromey <tom@tromey.com>
12031
12032 * python/py-inferior.c (find_thread_object, build_inferior_list):
12033 Use gdbpy_ref.
12034
12035 2017-01-10 Tom Tromey <tom@tromey.com>
12036
12037 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12038
12039 2017-01-10 Tom Tromey <tom@tromey.com>
12040
12041 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12042 gdbpy_ref.
12043
12044 2017-01-10 Tom Tromey <tom@tromey.com>
12045
12046 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
12047 extra incref.
12048 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12049 Use gdbpy_ref.
12050
12051 2017-01-10 Tom Tromey <tom@tromey.com>
12052
12053 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12054 gdbpy_ref.
12055
12056 2017-01-10 Tom Tromey <tom@tromey.com>
12057
12058 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
12059 decref results of PyArg_ParseTupleAndKeywords.
12060
12061 2017-01-10 Tom Tromey <tom@tromey.com>
12062
12063 * python/python.c (python_run_simple_file): Use
12064 unique_xmalloc_ptr, gdbpy_ref.
12065
12066 2017-01-10 Tom Tromey <tom@tromey.com>
12067
12068 * python/py-prettyprint.c (print_stack_unless_memory_error)
12069 (print_string_repr, print_children): Use gdbpy_ref.
12070 (dummy_python_frame): New class.
12071 (dummy_python_frame::dummy_python_frame): Rename from
12072 push_dummy_python_frame.
12073 (py_restore_tstate): Remove.
12074
12075 2017-01-10 Tom Tromey <tom@tromey.com>
12076
12077 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12078
12079 2017-01-10 Tom Tromey <tom@tromey.com>
12080
12081 * python/python.c (ensure_python_env, restore_python_env):
12082 Remove.
12083 * python/python-internal.h (ensure_python_env): Don't declare.
12084 * varobj.h (varobj_ensure_python_env): Don't declare.
12085 * varobj.c (varobj_ensure_python_env): Remove.
12086
12087 2017-01-10 Tom Tromey <tom@tromey.com>
12088
12089 * varobj.c (varobj_value_get_print_value): Use
12090 gdbpy_enter_varobj.
12091
12092 2017-01-10 Tom Tromey <tom@tromey.com>
12093
12094 * python/py-prettyprint.c (print_string_repr, print_children):
12095 Update.
12096 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12097 of "encoding".
12098 * varobj.c (varobj_value_get_print_value): Update.
12099 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12100
12101 2017-01-10 Tom Tromey <tom@tromey.com>
12102
12103 * varobj.c (varobj_get_display_hint)
12104 (dynamic_varobj_has_child_method, install_new_value_visualizer)
12105 (varobj_set_visualizer, free_variable): Use
12106 gdbpy_enter_varobj.
12107
12108 2017-01-10 Tom Tromey <tom@tromey.com>
12109
12110 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12111 (do_finish_initialization): New function. Use gdbpy_ref.
12112 (gdbpy_finish_initialization): Use gdbpy_enter. Call
12113 do_finish_initialization.
12114
12115 2017-01-10 Tom Tromey <tom@tromey.com>
12116
12117 * python/py-param.c (get_set_value, get_show_value): Use
12118 gdbpy_enter, gdbpy_ref.
12119
12120 2017-01-10 Tom Tromey <tom@tromey.com>
12121
12122 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12123
12124 2017-01-10 Tom Tromey <tom@tromey.com>
12125
12126 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12127
12128 2017-01-10 Tom Tromey <tom@tromey.com>
12129
12130 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12131 Use gdbpy_enter_varobj.
12132
12133 2017-01-10 Tom Tromey <tom@tromey.com>
12134
12135 * varobj.c (gdbpy_enter_varobj): New constructor.
12136 * python/python-internal.h (gdbpy_enter_varobj): New class.
12137 * python/py-varobj.c (py_varobj_get_iterator): Use
12138 gdbpy_enter_varobj.
12139
12140 2017-01-10 Tom Tromey <tom@tromey.com>
12141
12142 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12143 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12144 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12145 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12146 unique_xmalloc_ptr.
12147 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12148
12149 2017-01-10 Tom Tromey <tom@tromey.com>
12150
12151 * python/py-xmethods.c (invoke_match_method): Use
12152 gdbpy_ref.
12153
12154 2017-01-10 Tom Tromey <tom@tromey.com>
12155
12156 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12157 gdbpy_enter, gdbpy_ref.
12158
12159 2017-01-10 Tom Tromey <tom@tromey.com>
12160
12161 * python/python.c (python_interactive_command): Use gdbpy_enter.
12162
12163 2017-01-10 Tom Tromey <tom@tromey.com>
12164
12165 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12166 gdbpy_ref.
12167
12168 2017-01-10 Tom Tromey <tom@tromey.com>
12169
12170 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12171 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12172
12173 2017-01-10 Tom Tromey <tom@tromey.com>
12174
12175 * utils.h (htab_deleter): New struct.
12176 (htab_up): New typedef.
12177 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12178 gdbpy_enter, gdbpy_ref, htab_up.
12179
12180 2017-01-10 Tom Tromey <tom@tromey.com>
12181
12182 * python/py-unwind.c (pending_frame_invalidate): Remove.
12183 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12184
12185 2017-01-10 Tom Tromey <tom@tromey.com>
12186
12187 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12188 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12189
12190 2017-01-10 Tom Tromey <tom@tromey.com>
12191
12192 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12193
12194 2017-01-10 Tom Tromey <tom@tromey.com>
12195
12196 * python/python.c (gdbpy_eval_from_control_command)
12197 (gdbpy_source_script, gdbpy_run_events)
12198 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12199 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12200 gdbpy_enter.
12201
12202 2017-01-10 Tom Tromey <tom@tromey.com>
12203
12204 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12205
12206 2017-01-10 Tom Tromey <tom@tromey.com>
12207
12208 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12209
12210 2017-01-10 Tom Tromey <tom@tromey.com>
12211
12212 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12213 (python_on_inferior_call_pre, python_on_inferior_call_post)
12214 (python_on_memory_change, python_on_register_change)
12215 (python_inferior_exit, python_new_objfile, add_thread_object)
12216 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12217
12218 2017-01-10 Tom Tromey <tom@tromey.com>
12219
12220 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12221 (bpfinishpy_handle_exit): Use gdbpy_enter.
12222
12223 2017-01-10 Tom Tromey <tom@tromey.com>
12224
12225 * python/py-cmd.c (cmdpy_destroyer)
12226 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12227 gdbpy_enter.
12228
12229 2017-01-10 Tom Tromey <tom@tromey.com>
12230
12231 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12232 gdbpy_enter.
12233 (gdbpy_breakpoint_has_cond): Likewise.
12234
12235 2017-01-10 Tom Tromey <tom@tromey.com>
12236
12237 * python/python.c (gdbpy_enter): New constructor.
12238 (~gdbpy_enter): New destructor.
12239 (restore_python_env, ensure_python_env): Rewrite.
12240 * python/python-internal.h (gdbpy_enter): New class.
12241
12242 2017-01-10 Tom Tromey <tom@tromey.com>
12243
12244 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12245
12246 2017-01-10 Tom Tromey <tom@tromey.com>
12247
12248 * python/py-value.c (value_has_field, get_field_flag)
12249 (get_field_type, valpy_getitem, convert_value_from_python): Use
12250 gdbpy_ref.
12251
12252 2017-01-10 Tom Tromey <tom@tromey.com>
12253
12254 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12255 gdbpy_ref.
12256
12257 2017-01-10 Tom Tromey <tom@tromey.com>
12258
12259 * python/py-prettyprint.c (search_pp_list)
12260 (find_pretty_printer_from_objfiles)
12261 (find_pretty_printer_from_progspace)
12262 (find_pretty_printer_from_gdb, find_pretty_printer)
12263 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12264 gdbpy_ref.
12265
12266 2017-01-10 Tom Tromey <tom@tromey.com>
12267
12268 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12269
12270 2017-01-10 Tom Tromey <tom@tromey.com>
12271
12272 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12273 (ltpy_get_all_source_lines): Use gdbpy_ref.
12274
12275 2017-01-10 Tom Tromey <tom@tromey.com>
12276
12277 * python/py-framefilter.c (extract_sym, extract_value)
12278 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12279 gdbpy_ref.
12280
12281 2017-01-10 Tom Tromey <tom@tromey.com>
12282
12283 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12284
12285 2017-01-10 Tom Tromey <tom@tromey.com>
12286
12287 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12288
12289 2017-01-10 Tom Tromey <tom@tromey.com>
12290
12291 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12292 gdbpy_ref.
12293
12294 2017-01-10 Tom Tromey <tom@tromey.com>
12295
12296 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12297
12298 2017-01-10 Tom Tromey <tom@tromey.com>
12299
12300 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12301 (typy_range): Use gdbpy_ref.
12302
12303 2017-01-10 Tom Tromey <tom@tromey.com>
12304
12305 * python/py-threadevent.c (create_thread_event_object): Use
12306 gdbpy_ref.
12307 * python/py-stopevent.c (create_stop_event_object): Simplify.
12308 (emit_stop_event): Use gdbpy_ref.
12309 * python/py-signalevent.c (create_signal_event_object): Use
12310 gdbpy_ref.
12311 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12312 (emit_new_objfile_event, create_clear_objfiles_event_object)
12313 (emit_clear_objfiles_event): Use gdbpy_ref.
12314 * python/py-infevents.c (create_inferior_call_event_object)
12315 (create_register_changed_event_object)
12316 (create_memory_changed_event_object, emit_inferior_call_event)
12317 (emit_memory_changed_event, emit_register_changed_event): Use
12318 gdbpy_ref.
12319 * python/py-exitedevent.c (create_exited_event_object)
12320 (emit_exited_event): Use gdbpy_ref.
12321 * python/py-event.h (evpy_emit_event): Remove
12322 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12323 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12324 * python/py-continueevent.c (emit_continue_event): Use
12325 gdbpy_ref.
12326 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12327 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12328 gdbpy_ref.
12329 * python/py-bpevent.c (create_breakpoint_event_object): Use
12330 gdbpy_ref.
12331
12332 2017-01-10 Tom Tromey <tom@tromey.com>
12333
12334 * python/py-ref.h: New file.
12335
12336 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12337
12338 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12339 void.
12340 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12341 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12342 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12343 * ui-out.c (ui_out::redirect): Likewise.
12344 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12345 * cli/cli-logging.c (set_logging_redirect): Update call site of
12346 ui_out::redirect.
12347 (handle_redirections): Likewise.
12348 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12349 * top.c (execute_command_to_string): Likewise.
12350 * utils.c (do_ui_out_redirect_pop): Likewise.
12351
12352 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12353
12354 * stack.c (_initialize_stack): Update "frame" command help message.
12355
12356 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12357
12358 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12359
12360 2017-01-06 Yao Qi <yao.qi@linaro.org>
12361
12362 * x86-linux-nat.h: Include gdb_proc_service.h.
12363
12364 2017-01-06 Yao Qi <yao.qi@linaro.org>
12365
12366 * ser-base.h: Include serial.h.
12367
12368 2017-01-06 Yao Qi <yao.qi@linaro.org>
12369
12370 * ppc-linux-tdep.h: Include ppc-tdep.h.
12371
12372 2017-01-06 Yao Qi <yao.qi@linaro.org>
12373
12374 * nat/amd64-linux-siginfo.h: Include signal.h.
12375
12376 2017-01-06 Yao Qi <yao.qi@linaro.org>
12377
12378 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12379
12380 2017-01-06 Yao Qi <yao.qi@linaro.org>
12381
12382 * mi/mi-parse.h: Include mi-cmds.h.
12383
12384 2017-01-06 Yao Qi <yao.qi@linaro.org>
12385
12386 * inf-loop.c: Don't include "target.h".
12387 * inf-loop.h: Include it here.
12388
12389 2017-01-06 Yao Qi <yao.qi@linaro.org>
12390
12391 * dfp.h: Include "dboulest.h" and "expression.h".
12392
12393 2017-01-06 Yao Qi <yao.qi@linaro.org>
12394
12395 * ax-gdb.h: Include "ax.h".
12396
12397 2017-01-06 Yao Qi <yao.qi@linaro.org>
12398
12399 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12400 with nat/gdb_ptrace.h.
12401
12402 2017-01-05 Yao Qi <yao.qi@linaro.org>
12403
12404 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12405 new line.
12406 (mips64_fbsd_sigframe_init): Likewise.
12407
12408 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12409
12410 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12411 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12412
12413 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12414
12415 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12416 * NEWS: Mention new FreeBSD/mips native configuration.
12417 * config/mips/fbsd.mh: New file.
12418 * configure.host: Add mips*-*-freebsd*.
12419 * mips-fbsd-nat.c: New file.
12420
12421 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12422
12423 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12424 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12425 * NEWS: Mention new FreeBSD/mips target.
12426 * configure.tgt: Add mips*-*-freebsd*.
12427 * mips-fbsd-tdep.c: New file.
12428 * mips-fbsd-tdep.h: New file.
12429
12430 2017-01-04 Yao Qi <yao.qi@linaro.org>
12431
12432 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12433 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12434
12435 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12436
12437 Update copyright year range in all GDB files.
12438
12439 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12440
12441 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12442
12443 For older changes see ChangeLog-2016.
12444 \f
12445 Local Variables:
12446 mode: change-log
12447 left-margin: 8
12448 fill-column: 74
12449 version-control: never
12450 coding: utf-8
12451 End:
This page took 0.282959 seconds and 4 git commands to generate.