6fbe88b569f0b976b232c68be9968a6bd2c12209
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-10-11 Tom Tromey <tom@tromey.com>
2
3 * breakpoint.c (prepare_re_set_context): Remove.
4 (breakpoint_re_set_one): Update. Don't use cleanups.
5 (breakpoint_re_set): Use scoped_restore, std::string, and
6 scoped_restore_current_language.
7
8 2017-10-11 Tom Tromey <tom@tromey.com>
9
10 * breakpoint.c (commands_command_1): Use std::string.
11 (cleanup_executing_breakpoints): Remove.
12 (bpstat_do_actions_1): Use scoped_restore.
13 (bpstat_check_watchpoint): Use std::string.
14 (decode_static_tracepoint_spec): Likewise.
15 (break_range_command): Likewise.
16 (watch_command_1): Likewise.
17 (compare_breakpoints): Change argument types.
18 (clear_command): Use std::vector.
19 (cleanup_executing_breakpoints): Remove.
20 (update_global_location_list): Use unique_xmalloc_ptr.
21 (strace_command): Remove unused declaration.
22
23 2017-10-11 John Baldwin <jhb@FreeBSD.org>
24
25 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
26 * NEWS: Mention new FreeBSD/arm native configuration.
27 * configure.host: Add arm*-*-freebsd*.
28 * configure.nat: Likewise.
29 * arm-fbsd-nat.c: New file.
30
31 2017-10-11 John Baldwin <jhb@FreeBSD.org>
32
33 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
34 (ALLDEPFILES): Add arm-fbsd-tdep.c.
35 * NEWS: Mention new FreeBSD/arm target.
36 * configure.tgt: Add arm*-*-freebsd*.
37 * arm-fbsd-tdep.c: New file.
38 * arm-fbsd-tdep.h: New file.
39
40 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
41
42 * linux-tdep.c (linux_make_corefile_notes): Remove call to
43 `gdbarch_elfcore_write_linux_prpsinfo'.
44 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
45 method.
46 (elf_internal_linux_prpsinfo): Remove declaration.
47 * gdbarch.h: Regenerate.
48 * gdbarch.c: Regenerate.
49
50 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
51
52 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
53 `set_gdbarch_elfcore_write_linux_prpsinfo'.
54
55 2017-10-11 Pedro Alves <palves@redhat.com>
56
57 * breakpoint.c (reattach_breakpoints): Delete.
58 * breakpoint.h (reattach_breakpoints): Delete.
59
60 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
61
62 * symfile.c (registered_sym_fns): Make struct, not typedef.
63 (DEF_VEC_O (registered_sym_fns)): Remove.
64 (symtab_fns): Change type to std::vector.
65 (add_symtab_fns): Adjust.
66 (find_sym_fns): Adjust.
67
68 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
69
70 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
71 * arc-tdep.h (arc_arch_is_em): New function.
72 (arc_arch_is_hs): Likewise.
73
74 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
75
76 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
77 parentheses in the declaration.
78 (macro_lookup_inclusion): Likewise.
79 (macro_lookup_definition): Likewise.
80 * p-lang.h (pascal_builtin_types): Likewise.
81 * tui/tui-data.c (tui_win_list): Likewise.
82 * tui/tui-data.h (tui_win_list): Likewise.
83 * utils.h (make_cleanup_free_section_addr_info): Likewise.
84
85 2017-10-11 Mark Rages <markrages@gmail.com>
86
87 * target-memory.c (block_boundaries): Fix for block address not
88 aligned on block size.
89
90 2017-10-10 Pedro Alves <palves@redhat.com>
91 Tom Tromey <tom@tromey.com>
92
93 * breakpoint.c (struct captured_breakpoint_query_args)
94 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
95 (print_breakpoint): New.
96 * breakpoint.h (print_breakpoint): Declare.
97 * common/common-exceptions.h (enum return_reason): Remove
98 references to catch_exceptions.
99 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
100 Delete.
101 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
102 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
103 * gdb.h: Delete.
104 * gdbthread.h (thread_select): Declare.
105 * mi/mi-cmd-break.c: Don't include gdb.h.
106 (breakpoint_notify): Use print_breakpoint.
107 * mi/mi-cmd-catch.c: Don't include gdb.h.
108 * mi/mi-interp.c: Don't include gdb.h.
109 (mi_print_breakpoint_for_event): New.
110 (mi_breakpoint_created, mi_breakpoint_modified): Use
111 mi_print_breakpoint_for_event.
112 * mi/mi-main.c: Don't include gdb.h.
113 (mi_cmd_thread_select): Parse the global thread ID here. Use
114 thread_select instead of gdb_thread_select.
115 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
116 of using gdb_list_thread_ids.
117 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
118 FILEIO_ENOSYS here.
119 (remote_fileio_request): Use TRY/CATCH instead of
120 catch_exceptions.
121 * symfile-mem.c (struct symbol_file_add_from_memory_args)
122 (symbol_file_add_from_memory_wrapper): Delete.
123 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
124 * thread.c: Don't include gdb.h.
125 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
126 (thread_alive): Use thread_select.
127 (do_captured_thread_select): Delete, parts salvaged as ...
128 (thread_select): ... this new function.
129 (gdb_thread_select): Delete.
130
131 2017-10-10 Pedro Alves <palves@redhat.com>
132 Tom Tromey <tom@tromey.com>
133
134 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
135 and reverse logic.
136 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
137 No longer macros. Instead ...
138 (enum wp_check_result): They're now values of this new
139 enumeration.
140 (watchpoint_check): Change return type to wp_check_result and
141 parameter type to bpstat.
142 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
143 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
144 catch_errors. Reverse logic of watchpoint_check call.
145 (breakpoint_re_set_one): Now returns void and takes a breakpoint
146 pointer as parameter.
147 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
148 * common/common-exceptions.c (throw_exception_sjlj): Update
149 comments to avoid mentioning catch_errors.
150 * exceptions.c (catch_errors): Delete.
151 * exceptions.h: Update comments to avoid mentioning catch_errors.
152 (catch_errors_ftype, catch_errors): Delete.
153 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
154 (hook_stop_stub): Delete.
155 (restore_selected_frame): Change return type to void, and
156 parameter type to const frame_id &.
157 (restore_infcall_control_state): Use TRY/CATCH instead of
158 catch_errors.
159 * main.c (captured_command_loop): Return void and remove
160 parameter. Remove references to catch_errors.
161 (captured_main): Use TRY/CATCH instead of catch_errors.
162 * objc-lang.c (objc_submethod_helper_data)
163 (find_objc_msgcall_submethod_helper): Delete.
164 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
165 catch_errors.
166 * record-full.c (record_full_message): Return void.
167 (record_full_message_args, record_full_message_wrapper): Delete.
168 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
169 instead of catch_errors.
170 * solib-aix.c (solib_aix_open_symbol_file_object): Change
171 parameter type to int.
172 * solib-darwin.c (open_symbol_file_object): Ditto.
173 * solib-dsbt.c (open_symbol_file_object): Ditto.
174 * solib-frv.c (open_symbol_file_object): Ditto.
175 * solib-svr4.c (open_symbol_file_object): Ditto.
176 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
177 * solib.c (update_solib_list): Use TRY/CATCH instead of
178 catch_errors.
179 * solist.h (struct target_so_ops) <open_symbol_file_object>:
180 Change type.
181 * symmisc.c (struct print_symbol_args): Remove.
182 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
183 (print_symbol): Change type.
184 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
185 and remove parameters.
186 (catch_errors): New.
187 (get_windows_debug_event): Adjust.
188
189 2017-10-09 Tom Tromey <tom@tromey.com>
190
191 * mi/mi-main.c (free_splay_tree): Remove.
192 (list_available_thread_groups): Use splay_tree_up.
193 * common/gdb_splay_tree.h: New file.
194
195 2017-10-09 Tom Tromey <tom@tromey.com>
196
197 * mi/mi-main.c (do_nothing): Remove.
198 (list_available_thread_groups): Update.
199
200 2017-10-09 Pedro Alves <palves@redhat.com>
201
202 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
203 reading registers when switching context.
204
205 2017-10-09 John Baldwin <jhb@FreeBSD.org>
206
207 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
208 (fbsd_convert_siginfo): Likewise.
209 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
210
211 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
212
213 * configure.ac (try_guile_versions): Remove guile-2.2.
214 * configure: Regenerate.
215
216 2017-10-09 Tom Tromey <tom@tromey.com>
217
218 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
219 (COMPILE.pre): Use $(CXX).
220
221 2017-10-09 Pedro Alves <palves@redhat.com>
222
223 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
224 Use bool.
225 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
226 * cp-support.h (cp_remove_params): Now returns a
227 gdb::unique_xmalloc_ptr.
228 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
229 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
230 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
231 returning a gdb::unique_xmalloc_ptr.
232 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
233 * stack.c (find_frame_funname): Adjust to cp_remove_params
234 returning a gdb::unique_xmalloc_ptr.
235
236 2017-10-08 Tom Tromey <tom@tromey.com>
237
238 * dwarf2read.c (dwarf2_get_dwz_file): Use
239 gdb::unique_xmalloc_ptr.
240 (find_slot_in_mapped_hash): Likewise.
241 (dwarf2_physname): Likewise.
242 (create_dwo_unit_in_dwp_v1): Use std::string.
243 (create_dwo_unit_in_dwp_v2): Likewise.
244 (lookup_dwo_cutu): Likewise.
245 (inherit_abstract_dies): Use std::vector.
246 (read_array_type): Likewise.
247 (dwarf_decode_macros): Remove unused declaration.
248 (unsigned_int_compar): Remove.
249 (dwarf2_build_psymtabs_hard): Use scoped_restore.
250 (psymtabs_addrmap_cleanup): Remove.
251
252 2017-10-08 Tom Tromey <tom@tromey.com>
253
254 * frame-unwind.c (frame_unwind_try_unwinder): Update.
255 * frame.h (frame_cleanup_after_sniffer): Declare.
256 (frame_prepare_for_sniffer): Return void.
257 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
258 type of argument.
259 (frame_prepare_for_sniffer): Return void.
260
261 2017-10-08 Tom Tromey <tom@tromey.com>
262
263 * utils.h (make_cleanup_value_free): Remove.
264 * utils.c (do_value_free, struct cleanup): Remove.
265 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
266 Use gdb_value_up.
267 * value.h (struct value_deleter): New.
268 (gdb_value_up): New typedef.
269
270 2017-10-08 Tom Tromey <tom@tromey.com>
271
272 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
273 (make_cleanup_free_search_symbols): Remove.
274 (search_symbols): Return std::vector.
275 (symbol_search::compare_search_syms): Now member of
276 symbol_search. Change arguments.
277 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
278 (symtab_symbol_info, rbreak_command): Update.
279 * symtab.h (struct symbol_search) <next>: Remove.
280 Add constructors.
281 (symbol_search::operator<): New function.
282 (symbol_search::operator==): New function.
283 (search_symbols): Remove std::vector.
284 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
285 (symbol_search::compare_search_syms): Declare.
286
287 2017-10-06 Yao Qi <yao.qi@linaro.org>
288
289 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
290 arch/aarch64-insn.o.
291 Remove one rule.
292 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
293
294 2017-10-06 Yao Qi <yao.qi@linaro.org>
295
296 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
297 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
298 arch/arm-linux.o respectively.
299 * configure.tgt: Likewise.
300
301 2017-10-06 Yao Qi <yao.qi@linaro.org>
302
303 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
304 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
305
306 2017-10-06 Pedro Alves <palves@redhat.com>
307
308 * windows-nat.c: Include <algorithm>.
309
310 2017-10-06 Yao Qi <yao.qi@linaro.org>
311
312 * configure.tgt (i386_tobjs): New variable.
313 (amd64_tobjs): New variable.
314 Set $cpu_obs and $os_obs.
315
316 2017-10-06 Yao Qi <yao.qi@linaro.org>
317
318 * Makefile.in (CONFIG_SRC_SUBDIR): New.
319 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
320 (clean): Remove object files and dependency files.
321 (distclean): Remove the directory.
322 * configure.ac: Invoke AC_CONFIG_COMMANDS.
323 * configure: Re-generated.
324 * configure.tgt: Replace amd64.o with arch/amd64.o.
325
326 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
327
328 PR build/22188
329 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
330 and SETEND.
331
332 2017-10-05 Pedro Alves <palves@redhat.com>
333
334 * linux-nat.c (linux_child_follow_fork): When following the parent
335 and detaching the child, consult the parent thread's architecture
336 instead of the child's.
337
338 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
339
340 * ax.h: Do not include "doublest.h".
341 (union agent_val): Remove.
342
343 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
344
345 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
346 (decimal_to_string): Return std::string object.
347 (decimal_from_string): Accept std::string object. Return bool.
348 (decimal_from_integral, decimal_from_doublest): Remove.
349 (decimal_from_longest): Add prototype.
350 (decimal_from_ulongest): Likewise.
351 (decimal_to_longest): Likewise.
352 (decimal_from_doublest): Likewise.
353 * dfp.c: Do not include "gdbtypes.h" or "value.h".
354 (MAX_DECIMAL_STRING): Move here.
355 (decimal_to_string): Return std::string object.
356 (decimal_from_string): Accept std::string object. Return bool.
357 (decimal_from_integral): Remove, replace by ...
358 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
359 (decimal_to_longest): New function.
360 (decimal_from_floating): Remove, replace by ...
361 (decimal_from_doublest): ... this new function.
362 (decimal_to_doublest): Update to new decimal_to_string interface.
363
364 * value.c (unpack_long): Use decimal_to_longest.
365 * valops.c (value_cast): Use decimal_from_doublest instead of
366 decimal_from_floating. Use decimal_from_[u]longest isntead of
367 decimal_from_integral.
368 * valarith.c (value_args_as_decimal): Likewise.
369 * valprint.c (print_decimal_floating): Update to new
370 decimal_to_string interface.
371 * printcmd.c (printf_decfloat): Likewise.
372 * c-exp.y (parse_number): Update to new decimal_from_string interface.
373
374 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
375
376 * doublest.h: Do not include "floatformat.h". Remove stale comments.
377 * gdbtypes.c: Include "floatformat.h".
378 * value.c: Likewise.
379 * m68k-tdep.c: Likewise.
380
381 * findvar.c: Do not include "floatformat.h".
382 * amd64-darwin-tdep.c: Likewise.
383 * arm-linux-tdep.c: Likewise.
384 * i386-darwin-tdep.c: Likewise.
385 * i387-tdep.c: Likewise.
386 * m68k-linux-tdep.c: Likewise.
387 * mep-tdep.c: Likewise.
388 * mips-tdep.c: Likewise.
389 * nios2-tdep.c: Likewise.
390 * s390-linux-tdep.c: Likewise.
391 * sparc-obsd-tdep.c: Likewise.
392 * sparc-tdep.c: Likewise.
393 * sparc64-tdep.c: Likewise.
394 * spu-tdep.c: Likewise.
395 * tic6x-tdep.c: Likewise.
396 * tilegx-tdep.c: Likewise.
397 * vax-tdep.c: Likewise.
398 * xstormy16-tdep.c: Likewise.
399 * xtensa-tdep.c: Likewise.
400
401 * top.c: Do not include "doublest.h".
402 * aarch64-tdep.c: Likewise.
403 * alpha-tdep.c: Likewise.
404 * arm-linux-tdep.c: Likewise.
405 * m68k-linux-tdep.c: Likewise.
406 * tilegx-tdep.c: Likewise.
407 * xstormy16-tdep.c: Likewise.
408
409 2017-10-05 John Baldwin <jhb@FreeBSD.org>
410
411 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
412 (mipsn32_fbsd_sigframe): Define.
413 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
414 for FreeBSD/mipsn32.
415
416 2017-10-05 John Baldwin <jhb@FreeBSD.org>
417
418 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
419 AT_HWCAP.
420
421 2017-10-05 Tristan Gingold <tgingold@free.fr>
422
423 * MAINTAINERS (Misc): Update my email address.
424
425 2017-10-04 Pedro Alves <palves@redhat.com>
426
427 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
428 it instead of target_gdbarch.
429 (get_remote_state, get_remote_packet_size): Adjust
430 get_remote_arch_state calls, passing down target_gdbarch
431 explicitly.
432 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
433 'gdbarch' and use it instead of target_gdbarch.
434 (get_memory_packet_size): Adjust get_remote_arch_state calls,
435 passing down target_gdbarch explicitly.
436 (struct stop_reply) <arch>: New field.
437 (remote_parse_stop_reply): Use the stopped thread's architecture,
438 not the current inferior's. Save the architecture in the
439 stop_reply.
440 (process_stop_reply): Use the stop reply's architecture.
441 (process_g_packet, remote_fetch_registers)
442 (remote_prepare_to_store, store_registers_using_G)
443 (remote_store_registers): Adjust get_remote_arch_state calls,
444 using the regcache's architecture.
445 (remote_get_trace_status): Adjust get_remote_arch_state calls,
446 passing down target_gdbarch explicitly.
447 * spu-multiarch.c (spu_thread_architecture): Defer to the target
448 beneath instead of calling target_gdbarch.
449 * target.c (default_thread_architecture): Use the specified
450 inferior's architecture, instead of the current inferior's
451 architecture (via target_gdbarch).
452
453 2017-10-04 Pedro Alves <palves@redhat.com>
454
455 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
456 case.
457 (regcache_print): Handle !target_has_registers here instead.
458
459 2017-10-04 Pedro Alves <palves@redhat.com>
460
461 * frame.c (create_test_frame): Delete.
462 * frame.h (create_test_frame): Delete.
463 * gdbarch-selftests.c: Include gdbthread.h and target.h.
464 (class regcache_test): Delete.
465 (test_target_has_registers, test_target_has_stack)
466 (test_target_has_memory, test_target_prepare_to_store)
467 (test_target_store_registers): New functions.
468 (test_target_ops): New class.
469 (register_to_value_test): Error out if there's already a
470 process_stratum (or higher) target pushed. Create a fuller mock
471 environment, with mock target_ops, inferior, address space, thread
472 and inferior_ptid.
473 * progspace.c (struct address_space): Move to ...
474 * progspace.h (struct address_space): ... here.
475 * regcache.h (regcache::~regcache, regcache::raw_write)
476 [GDB_SELF_TEST]: No longer virtual.
477
478 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
479
480 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
481
482 2017-10-04 Pedro Alves <palves@redhat.com>
483
484 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
485 out of 'between TRY and CATCH'.
486
487 2017-10-04 Pedro Alves <palves@redhat.com>
488
489 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
490 * common/common-exceptions.h (TRY): Open an outermost scope.
491 Expand intro comment.
492 (CATCH): Reindent.
493 (END_CATCH): Close the outermost scope.
494 * completer.c (complete_line_internal): Add missing END_CATCH.
495
496 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
497
498 * NEWS (Changes since GDB 8.0): Add entry about new
499 'set-cwd-on-gdbserver' feature.
500 (New remote packets): Add entry for QSetWorkingDir.
501 * common/common-inferior.h (set_inferior_cwd): New prototype.
502 * infcmd.c (set_inferior_cwd): Remove "static".
503 (show_cwd_command): Expand text to include remote debugging.
504 * remote.c: Add PACKET_QSetWorkingDir.
505 (remote_protocol_features) <QSetWorkingDir>: New entry for
506 PACKET_QSetWorkingDir.
507 (extended_remote_set_inferior_cwd): New function.
508 (extended_remote_create_inferior): Call
509 "extended_remote_set_inferior_cwd".
510 (_initialize_remote): Call "add_packet_config_cmd" for
511 QSetWorkingDir.
512
513 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
514
515 * NEWS (New commands): Mention "set/show cwd".
516 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
517 "cd" command's help text.
518 * common/common-inferior.h (get_inferior_cwd): New prototype.
519 * infcmd.c (inferior_cwd_scratch): New global variable.
520 (set_inferior_cwd): New function.
521 (get_inferior_cwd): Likewise.
522 (set_cwd_command): Likewise.
523 (show_cwd_command): Likewise.
524 (_initialize_infcmd): Add "set/show cwd" commands.
525 * inferior.h (class inferior) <cwd>: New field.
526 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
527 (fork_inferior): Change inferior's cwd before its execution.
528 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
529 to CreateProcess.
530
531 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
532
533 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
534 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
535 (COMMON_OBS): Add gdb_tilde_expand.o.
536 * common/gdb_tilde_expand.c: New file.
537 * common/gdb_tilde_expand.h: Likewise.
538
539 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
540
541 * gdbarch.sh (objfile): Remove duplicate declaration.
542 * gdbarch.h: Regenerate.
543
544 2017-10-03 Tom Tromey <tom@tromey.com>
545
546 * utils.c (internal_vproblem): Use string_vprintf.
547
548 2017-10-03 Tom Tromey <tom@tromey.com>
549
550 * printcmd.c (info_symbol_command): Use std::string.
551
552 2017-10-03 Tom Tromey <tom@tromey.com>
553
554 * top.c (gdb_safe_append_history): Use std::string.
555
556 2017-10-03 Tom Tromey <tom@tromey.com>
557
558 * event-top.c (stdin_event_handler): Update.
559 * main.c (captured_main_1): Update.
560 * top.h (make_delete_ui_cleanup): Remove.
561 (struct ui): Add constructor and destructor.
562 (new_ui, delete_ui): Remove.
563 * top.c (make_delete_ui_cleanup): Remove.
564 (new_ui_command): Use std::unique_ptr.
565 (delete_ui_cleanup): Remove.
566 (ui::ui): Rename from new_ui. Update.
567 (free_ui): Remove.
568 (ui::~ui): Rename from delete_ui. Update.
569
570 2017-10-03 Tom Tromey <tom@tromey.com>
571
572 * symfile.c (load_progress): Use gdb::byte_vector.
573
574 2017-10-03 Tom Tromey <tom@tromey.com>
575
576 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
577 declaration.
578 * printcmd.c (x_command): Remove unused declaration.
579 * symfile.c (symbol_file_command): Remove unused declaration.
580
581 2017-10-03 Tom Tromey <tom@tromey.com>
582
583 * utils.c (internal_vproblem): Use std::string.
584 (defaulted_query): Likewise.
585
586 2017-10-03 Tom Tromey <tom@tromey.com>
587
588 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
589 * top.c (execute_command_to_string): Update.
590 * utils.c (make_cleanup_restore_page_info): Remove.
591 (do_restore_page_info_cleanup): Remove.
592 (set_batch_flag_and_restore_page_info):
593 New.
594 (make_cleanup_restore_page_info): Remove.
595 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
596 (~set_batch_flag_and_restore_page_info): New
597 (make_cleanup_restore_uinteger): Remove.
598 (make_cleanup_restore_integer): Remove.
599 (struct restore_integer_closure): Remove.
600 (restore_integer): Remove.
601 * utils.h (struct set_batch_flag_and_restore_page_info): New
602 class.
603 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
604 (make_cleanup_restore_page_info): Remove.
605 (make_cleanup_restore_uinteger) Remove.
606 (make_cleanup_restore_integer) Remove.
607
608 2017-10-03 Tom Tromey <tom@tromey.com>
609
610 * record-full.h (record_full_gdb_operation_disable_set): Return
611 scoped_restore_tmpl<int>.
612 * infrun.c (adjust_pc_after_break): Update.
613 (handle_signal_stop): Update.
614 * record-full.c (record_full_gdb_operation_disable_set): Return
615 scoped_restore_tmpl<int>.
616 (record_full_wait_1, record_full_insert_breakpoint)
617 (record_full_remove_breakpoint, record_full_save)
618 (record_full_goto_insn): Update.
619
620 2017-10-02 Tom Tromey <tom@tromey.com>
621
622 PR rust/22236:
623 * rust-lang.c (rust_val_print_str): New function.
624 (val_print_struct): Call it.
625 (rust_subscript): Preserve name of slice type.
626
627 2017-10-02 Tom Tromey <tom@tromey.com>
628
629 * rust-lang.c (rust_subscript): Handle slices in
630 EVAL_AVOID_SIDE_EFFECTS case.
631
632 2017-10-02 Tom Tromey <tom@tromey.com>
633
634 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
635
636 2017-10-02 Tom Tromey <tom@tromey.com>
637
638 * rust-lang.h (rust_slice_type): Add "extern".
639
640 2017-10-02 Tom Tromey <tom@tromey.com>
641 Pedro Alves <palves@redhat.com>
642
643 * ada-lang.h (ada_exc_info::operator<): Make const.
644 (ada_exc_info::operator==): Make const.
645 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
646 Make const.
647
648 2017-09-29 Tom Tromey <tom@tromey.com>
649
650 * target.c (read_whatever_is_readable): Change type of "result".
651 Update.
652 (free_memory_read_result_vector): Remove.
653 (read_memory_robust): Change return type. Update.
654 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
655 bin2hex, std::string.
656 * target.h (memory_read_result_s): Remove typedef.
657 (free_memory_read_result_vector): Remove.
658 (read_memory_robust): Return std::vector.
659
660 2017-09-29 Tom Tromey <tom@tromey.com>
661
662 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
663
664 2017-09-29 Tom Tromey <tom@tromey.com>
665
666 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
667 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
668 operator< and operator==.
669 (ada_exceptions_list): Return a std::vector.
670 * ada-lang.c (ada_exc_info::operator<): Rename from
671 compare_ada_exception_info.
672 (ada_exc_info::operator==): New.
673 (sort_remove_dups_ada_exceptions_list): Change type of
674 "exceptions".
675 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
676 (ada_add_global_exceptions): Likewise.
677 (ada_exceptions_list_1): Return a std::vector.
678 (ada_exceptions_list): Likewise.
679
680 2017-09-29 Tom Tromey <tom@tromey.com>
681
682 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
683 'std::set *'.
684 (print_one_inferior): Update.
685 (free_vector_of_ints): Remove.
686 (list_available_thread_groups): Change "ids" to std::set.
687 (mi_cmd_list_thread_groups): Update.
688 (struct collect_cores_data) <core>: Now a std::set.
689 (collect_cores): Update.
690 (unique): Remove.
691 (print_one_inferior): Update.
692
693 2017-09-29 Tom Tromey <tom@tromey.com>
694
695 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
696 (mi_execute_async_cli_command): Likewise.
697 (mi_cmd_trace_frame_collected): Use field_fmt.
698
699 2017-09-29 Tom Tromey <tom@tromey.com>
700
701 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
702 gdb::byte_vector.
703
704 2017-09-29 Tom Tromey <tom@tromey.com>
705
706 * mi/mi-parse.c (mi_parse): Remove unused declaration.
707
708 2017-09-29 Tom Tromey <tom@tromey.com>
709
710 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
711
712 2017-09-29 Tom Tromey <tom@tromey.com>
713
714 * varobj.h (varobj_gen_name): Return std::string.
715 * varobj.c (varobj_gen_name): Return std::string.
716 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
717 (mi_cmd_var_delete): Don't copy "name".
718
719 2017-09-29 Tom Tromey <tom@tromey.com>
720
721 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
722 (mi_cmd_break_insert_1): Update.
723
724 2017-09-29 Tom Tromey <tom@tromey.com>
725
726 * target.h (make_scoped_defer_target_commit_resume): Update.
727 * target.c (make_scoped_defer_target_commit_resume): Rename from
728 make_cleanup_defer_target_commit_resume. Return a
729 scoped_restore.
730 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
731
732 2017-09-29 Tom Tromey <tom@tromey.com>
733
734 * main.c (captured_main_1): Remove unused declaration.
735 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
736
737 2017-09-29 Tom Tromey <tom@tromey.com>
738
739 * symtab.c (search_symbols): Remove unused outer cleanup.
740 (make_source_files_completion_list): Remove unused declaration.
741
742 2017-09-29 Tom Tromey <tom@tromey.com>
743
744 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
745
746 2017-09-29 Tom Tromey <tom@tromey.com>
747
748 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
749 gdb::byte_vector.
750
751 2017-09-29 Tom Tromey <tom@tromey.com>
752
753 * complaints.c (vcomplaint): Use std::string.
754
755 2017-09-29 Tom Tromey <tom@tromey.com>
756
757 * tracepoint.c (trace_variable_command): Use std::string.
758 (encode_actions_1): Remove unused declarations.
759 (create_tsv_from_upload): Use std::string.
760
761 2017-09-29 Tom Tromey <tom@tromey.com>
762
763 * cp-support.c (gdb_demangle): Use std::string.
764
765 2017-09-29 Tom Tromey <tom@tromey.com>
766
767 * stack.c (parse_frame_specification): Use std::string
768 (info_frame_command): Use gdb::unique_xmalloc_ptr.
769
770 2017-09-29 Tom Tromey <tom@tromey.com>
771
772 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
773
774 2017-09-29 Tom Tromey <tom@tromey.com>
775
776 * utils.c (vfprintf_maybe_filtered): Use std::string.
777 (vfprintf_unfiltered): Likewise.
778
779 2017-09-29 Tom Tromey <tom@tromey.com>
780
781 * event-top.c (top_level_prompt): Return std::string.
782 (display_gdb_prompt): Update.
783
784 2017-09-29 Tom Tromey <tom@tromey.com>
785
786 * unittests/common-utils-selftests.c (format): New function.
787 (string_vprintf_tests): New function.
788 (_initialize_common_utils_selftests): Register new tests.
789 * common/common-utils.c (string_vprintf): New function.
790 * common/common-utils.h (string_vprintf): Declare.
791
792 2017-09-29 Pedro Alves <palves@redhat.com>
793
794 * common/rsp-low.c (unpack_varlen_hex): Constify.
795 * common/rsp-low.h (unpack_varlen_hex): Constify.
796 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
797 Constify.
798 * remote.c (remote_set_permissions, read_ptid)
799 (remote_current_thread, remote_get_threads_with_qthreadinfo)
800 (remote_static_tracepoint_marker_at)
801 (remote_static_tracepoint_markers_by_strid)
802 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
803 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
804 (parse_tracepoint_definition, parse_tsv_definition)
805 (parse_static_tracepoint_marker_definition): Constify.
806 * tracepoint.h (parse_static_tracepoint_marker_definition)
807 (parse_trace_status, parse_tracepoint_status)
808 (parse_tracepoint_definition, parse_tsv_definition): Constify.
809
810 2017-09-29 Pedro Alves <palves@redhat.com>
811
812 * remote.c (target_buf, target_buf_size): Delete.
813 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
814 Use the connection's packet buffer instead.
815 All callers adjusted.
816 (_initialize_remote): Remove references to target_buf and
817 target_buf_size.
818
819 2017-09-28 Pedro Alves <palves@redhat.com>
820
821 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
822 unittests/common-utils-selftests.c.
823 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
824 (COMMON_OBS): Remove utils-selftests.o.
825 * utils-selftests.c: Move to ...
826 * unittests/common-utils-selftests.c: ... here and rename self
827 test to "string_printf".
828
829 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
830
831 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
832 having NULL cus or tus.
833
834 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
835
836 * arm-tdep.c: (convert_from_extended): Remove.
837 (convert_to_extended): Likewise.
838 (arm_extract_return_value): Use convert_typed_floating.
839 (arm_store_return_value): Likewise.
840
841 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
842 * sh-tdep.c: Do not include "floatformat.h".
843 (sh_littlebyte_bigword_type): New function.
844 (sh_register_convert_to_virtual): Use convert_typed_floating.
845 (sh_register_convert_to_raw): Likewise.
846 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
847 (sh64_littlebyte_bigword_type): New function.
848 (sh64_extract_return_value): Use convert_typed_floating.
849 (sh64_register_convert_to_virtual): Likewise.
850 (sh64_register_convert_to_raw): Likewise.
851
852 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
853
854 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
855 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
856
857 * gdbtypes.h (union type_specific): Make field floatformat hold
858 just a single struct floatformat, not an array.
859 (floatformat_from_type): Move here.
860 * gdbtypes.c (floatformat_from_type): Move here. Update to
861 changed TYPE_FLOATFORMAT definition.
862 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
863 (recursive_dump_type): Likewise.
864 (init_float_type): Install correct floatformat for byte order.
865 (arch_float_type): Likewise.
866
867 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
868
869 * gdbtypes.c (init_type): Change incoming argument from
870 length-in-bytes to length-in-bits. Assert length is a
871 multiple of TARGET_CHAR_BITS.
872 (arch_type, arch_flags_type): Likewise.
873 (init_integer_type): Update call to init_type.
874 (init_character_type): Likewise.
875 (init_boolean_type): Likewise.
876 (init_float_type): Likewise.
877 (init_decfloat_type): Likewise.
878 (init_complex_type): Likewise.
879 (init_pointer_type): Likewise.
880 (objfile_type): Likewise.
881 (arch_integer_type): Update call to arch_type.
882 (arch_character_type): Likewise.
883 (arch_boolean_type): Likewise.
884 (arch_float_type): Likewise.
885 (arch_decfloat_type): Likewise.
886 (arch_complex_type): Likewise.
887 (arch_pointer_type): Likewise.
888 (gdbtypes_post_init): Likewise.
889
890 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
891 (read_base_type): Likewise.
892 * mdebugread.c (basic_type): Likewise.
893 * stabsread.c (dbx_init_float_type): Likewise.
894 (rs6000_builtin_type): Likewise.
895 (read_range_type): Likewise. Also, fix call to init_integer_type
896 with erroneous length argument.
897
898 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
899 * d-lang.c (build_d_types): Likewise.
900 * f-lang.c (build_fortran_types): Likewise.
901 * go-lang.c (build_go_types): Likewise.
902 * opencl-lang.c (build_opencl_types): Likewise.
903 * jit.c (finalize_symtab): Likewise.
904 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
905 (build_std_type_info_type): Likewise.
906 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
907 update call to arch_flags_type.
908
909 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
910 arch_type.
911 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
912 * windows-tdep.c (windows_get_tlb_type): Likewise.
913
914 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
915 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
916 * m32c-tdep.c (make_types): Likewise.
917 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
918 (rl78_psw_type): Update call to arch_flags_type.
919 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
920 * rx-tdep.c (rx_psw_type): Likewise.
921 (rx_fpsw_type): Likewise.
922 * sparc-tdep.c (sparc_psr_type): Likewise.
923 (sparc_fsr_type): Likewise.
924 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
925 (sparc64_ccr_type): Likewise.
926 (sparc64_fsr_type): Likewise.
927 (sparc64_fprs_type): Likewise.
928
929 2017-09-27 Tom Tromey <tom@tromey.com>
930
931 * findcmd.c (find_command): Constify.
932
933 2017-09-27 Tom Tromey <tom@tromey.com>
934
935 * ada-tasks.c (task_command_1, task_command): Constify.
936
937 2017-09-27 Tom Tromey <tom@tromey.com>
938
939 * symtab.c (maintenance_print_symbol_cache)
940 (maintenance_flush_symbol_cache)
941 (maintenance_print_symbol_cache_statistics): Constify.
942
943 2017-09-27 Tom Tromey <tom@tromey.com>
944
945 * inferior.c (detach_inferior_command, kill_inferior_command)
946 (inferior_command): Constify.
947
948 2017-09-27 Tom Tromey <tom@tromey.com>
949
950 * regcache.c (regcache_print, maintenance_print_registers)
951 (maintenance_print_raw_registers)
952 (maintenance_print_cooked_registers)
953 (maintenance_print_register_groups)
954 (maintenance_print_remote_registers): Constify.
955
956 2017-09-27 Tom Tromey <tom@tromey.com>
957
958 * printcmd.c (map_display_numbers, undisplay_command)
959 (enable_disable_display_command, enable_display_command)
960 (disable_display_command): Constify.
961
962 2017-09-27 Tom Tromey <tom@tromey.com>
963
964 * breakpoint.h (delete_command): Don't declare.
965 * breakpoint.c (delete_command, enable_once_command)
966 (enable_count_command, enable_delete_command, breakpoint_1)
967 (maintenance_info_breakpoints, stopin_command, stopat_command)
968 (delete_command, delete_trace_command, save_breakpoints)
969 (save_breakpoints_command, save_tracepoints_command): Constify.
970
971 2017-09-27 Tom Tromey <tom@tromey.com>
972
973 * macrocmd.c (macro_expand_command, macro_expand_once_command)
974 (skip_ws, extract_identifier, macro_define_command)
975 (macro_undef_command, macro_list_command): Constify.
976
977 2017-09-27 Tom Tromey <tom@tromey.com>
978
979 * infcmd.c (environment_info, set_environment_command)
980 (unset_environment_command, path_info, info_proc_cmd_1)
981 (info_proc_cmd_mappings, info_proc_cmd_stat)
982 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
983 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
984
985 2017-09-27 Tom Tromey <tom@tromey.com>
986
987 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
988 Constify.
989
990 2017-09-27 Tom Tromey <tom@tromey.com>
991
992 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
993
994 2017-09-27 Tom Tromey <tom@tromey.com>
995
996 * demangle.c (demangle_command): Constify.
997
998 2017-09-27 Tom Tromey <tom@tromey.com>
999
1000 * progspace.c (maintenance_info_program_spaces_command):
1001 Constify.
1002
1003 2017-09-27 Tom Tromey <tom@tromey.com>
1004
1005 * compile/compile.c (check_raw_argument, compile_file_command)
1006 (compile_code_command, compile_print_command): Constify.
1007
1008 2017-09-27 Tom Tromey <tom@tromey.com>
1009
1010 * reggroups.c (maintenance_print_reggroups): Constify.
1011
1012 2017-09-27 Tom Tromey <tom@tromey.com>
1013
1014 * dwarf2read.c (save_gdb_index_command): Constify.
1015
1016 2017-09-27 Tom Tromey <tom@tromey.com>
1017
1018 * stap-probe.c (info_probes_stap_command): Constify.
1019
1020 2017-09-27 Tom Tromey <tom@tromey.com>
1021
1022 * fork-child.c (unset_exec_wrapper_command): Constify.
1023
1024 2017-09-27 Tom Tromey <tom@tromey.com>
1025
1026 * btrace.c (get_uint, get_context_size, no_chunk)
1027 (maint_btrace_packet_history_cmd)
1028 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1029 (maint_info_btrace_cmd): Constify.
1030
1031 2017-09-27 Tom Tromey <tom@tromey.com>
1032
1033 * reverse.c (delete_bookmark_command): Constify.
1034
1035 2017-09-27 Tom Tromey <tom@tromey.com>
1036
1037 * remote.c (set_memory_packet_size)
1038 (set_memory_write_packet_size, show_memory_write_packet_size)
1039 (set_memory_read_packet_size, show_memory_read_packet_size)
1040 (compare_sections_command, packet_command, remote_put_command)
1041 (remote_get_command, remote_delete_command): Constify.
1042
1043 2017-09-27 Tom Tromey <tom@tromey.com>
1044
1045 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1046 (set_mipsfpu_double_command, set_mipsfpu_none_command)
1047 (set_mipsfpu_auto_command): Constify.
1048
1049 2017-09-27 Tom Tromey <tom@tromey.com>
1050
1051 * cli/cli-cmds.h (cd_command): Constify.
1052 * cli/cli-cmds.c (cd_command): Constify.
1053
1054 2017-09-27 Tom Tromey <tom@tromey.com>
1055
1056 * thread.c (thread_name_command, thread_find_command): Constify.
1057
1058 2017-09-27 Tom Tromey <tom@tromey.com>
1059
1060 * probe.c (enable_probes_command, disable_probes_command):
1061 Constify.
1062
1063 2017-09-27 Tom Tromey <tom@tromey.com>
1064
1065 * symfile.c (symbol_file_command): Constify.
1066 * gdbcore.h (deprecated_file_changed_hook): Constify.
1067 * exec.c (deprecated_file_changed_hook, exec_file_command)
1068 (file_command): Constify.
1069 * defs.h (symbol_file_command): Constify.
1070
1071 2017-09-27 Tom Tromey <tom@tromey.com>
1072
1073 * remote-fileio.c (set_system_call_allowed)
1074 (show_system_call_allowed): Constify.
1075
1076 2017-09-27 Tom Tromey <tom@tromey.com>
1077
1078 * tracepoint.c (delete_trace_variable_command)
1079 (tfind_end_command, tfind_start_command, tfind_pc_command)
1080 (tfind_tracepoint_command, tfind_line_command)
1081 (tfind_range_command, tfind_outside_command): Constify.
1082
1083 2017-09-27 Tom Tromey <tom@tromey.com>
1084
1085 * ax-gdb.c (maint_agent_printf_command, agent_command)
1086 (agent_eval_command): Constify.
1087
1088 2017-09-27 Tom Tromey <tom@tromey.com>
1089
1090 * tracepoint.c (info_scope_command): Constify.
1091 * python/python.c (gdbpy_decode_line): Constify.
1092 * python/py-breakpoint.c (bppy_init): Constify.
1093 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1094 * location.h: (new_linespec_location)
1095 (string_to_event_location_basic, string_to_event_location):
1096 Constify.
1097 * location.c (new_linespec_location)
1098 (string_to_event_location_basic, string_to_event_location):
1099 Constify.
1100 * linespec.h (decode_line_with_current_source)
1101 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1102 * linespec.c (linespec_lex_to_end)
1103 (decode_line_with_current_source)
1104 (decode_line_with_last_displayed): Constify.
1105 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1106 Constify.
1107 * cli/cli-cmds.c (edit_command, list_command): Constify.
1108 * breakpoint.h (until_break_command, watch_command_wrapper)
1109 (awatch_command_wrapper, rwatch_command_wrapper)
1110 (init_ada_exception_breakpoint): Constify.
1111 * breakpoint.c (break_command_1, dprintf_command)
1112 (break_range_command, watch_command_wrapper)
1113 (rwatch_command_wrapper, awatch_command_wrapper)
1114 (until_break_command, init_ada_exception_breakpoint)
1115 (strace_marker_create_sals_from_location, trace_command)
1116 (ftrace_command, strace_command, struct tracepoint): Constify.
1117 * ax-gdb.c (agent_command_1): Constify.
1118 * ada-lang.c (ada_exception_sal): Constify.
1119
1120 2017-09-27 Tom Tromey <tom@tromey.com>
1121
1122 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1123 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1124 (get_context_size, no_chunk, get_insn_history_modifiers)
1125 (cmd_record_insn_history, get_call_history_modifiers)
1126 (cmd_record_call_history): Constify.
1127
1128 2017-09-27 Tom Tromey <tom@tromey.com>
1129
1130 * source.c (show_substitute_path_command)
1131 (unset_substitute_path_command, set_substitute_path_command):
1132 Constify.
1133
1134 2017-09-27 Tom Tromey <tom@tromey.com>
1135
1136 * typeprint.c (maintenance_print_type): Constify.
1137 * maint.c (maintenance_dump_me, maintenance_demangle)
1138 (maintenance_time_display, maintenance_info_sections)
1139 (maintenance_print_statistics, maintenance_deprecate)
1140 (maintenance_undeprecate): Constify.
1141 (maintenance_do_deprecate): Constify. Use std::string.
1142 (maintenance_selftest): Constify.
1143 * gdbtypes.h (maintenance_print_type): Constify.
1144
1145 2017-09-27 Tom Tromey <tom@tromey.com>
1146
1147 * hppa-tdep.c (unwind_command): Constify.
1148
1149 2017-09-27 Tom Tromey <tom@tromey.com>
1150
1151 * target-descriptions.c (unset_tdesc_filename_cmd)
1152 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1153 Constify.
1154
1155 2017-09-27 Tom Tromey <tom@tromey.com>
1156
1157 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1158
1159 2017-09-27 Tom Tromey <tom@tromey.com>
1160
1161 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1162
1163 2017-09-27 Tom Tromey <tom@tromey.com>
1164
1165 * tui/tui-regs.c (tui_reg_command): Constify.
1166
1167 2017-09-27 Tom Tromey <tom@tromey.com>
1168
1169 * skip.c (skip_file_command, skip_function_command)
1170 (skip_enable_command, skip_disable_command, skip_delete_command):
1171 Constify.
1172
1173 2017-09-27 Tom Tromey <tom@tromey.com>
1174
1175 * record-btrace.c (cmd_record_btrace_bts_start)
1176 (cmd_record_btrace_pt_start): Constify.
1177
1178 2017-09-27 Tom Tromey <tom@tromey.com>
1179
1180 * symmisc.c (maintenance_print_symbols)
1181 (maintenance_print_msymbols, maintenance_print_objfiles)
1182 (maintenance_info_symtabs, maintenance_check_symtabs)
1183 (maintenance_expand_symtabs, maintenance_info_line_tables):
1184 Constify.
1185
1186 2017-09-27 Tom Tromey <tom@tromey.com>
1187
1188 * top.c (new_ui_command): Constify.
1189
1190 2017-09-27 Tom Tromey <tom@tromey.com>
1191
1192 * symfile.c (add_symbol_file_command)
1193 (remove_symbol_file_command, list_overlays_command)
1194 (map_overlay_command, unmap_overlay_command)
1195 (overlay_auto_command, overlay_manual_command)
1196 (overlay_off_command, overlay_load_command): Constify.
1197
1198 2017-09-27 Tom Tromey <tom@tromey.com>
1199
1200 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1201 (info_spu_mailbox_command, info_spu_dma_command)
1202 (info_spu_proxydma_command): Constify.
1203
1204 2017-09-27 Tom Tromey <tom@tromey.com>
1205
1206 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1207
1208 2017-09-27 Tom Tromey <tom@tromey.com>
1209
1210 * cli/cli-script.c (user_defined_command): Constify.
1211
1212 2017-09-27 Tom Tromey <tom@tromey.com>
1213
1214 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1215 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1216 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1217 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1218 (dump_binary_value, append_binary_memory, append_binary_value):
1219 Constify.
1220 (struct dump_context) <func>: Constify.
1221 (add_dump_command): Update.
1222
1223 2017-09-27 Tom Tromey <tom@tromey.com>
1224
1225 * cli/cli-cmds.c (show_version, show_configuration)
1226 (source_command, show_user): Constify.
1227
1228 2017-09-27 Tom Tromey <tom@tromey.com>
1229
1230 * target.c (maintenance_print_target_stack): Constify.
1231
1232 2017-09-27 Tom Tromey <tom@tromey.com>
1233
1234 * interps.c (interpreter_exec_cmd): Constify.
1235
1236 2017-09-27 Tom Tromey <tom@tromey.com>
1237
1238 * record-full.c (cmd_record_full_restore): Constify.
1239
1240 2017-09-27 Tom Tromey <tom@tromey.com>
1241
1242 * memattr.c (enable_mem_command, disable_mem_command)
1243 (delete_mem_command): Constify.
1244
1245 2017-09-27 Tom Tromey <tom@tromey.com>
1246
1247 * value.c (show_convenience): Constify.
1248
1249 2017-09-27 Tom Tromey <tom@tromey.com>
1250
1251 * gdbcore.h (core_file_command): Update.
1252 * corefile.c (core_file_command): Constify.
1253
1254 2017-09-27 Tom Tromey <tom@tromey.com>
1255
1256 * user-regs.c (maintenance_print_user_registers): Constify.
1257
1258 2017-09-27 Tom Tromey <tom@tromey.com>
1259
1260 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1261
1262 2017-09-27 Tom Tromey <tom@tromey.com>
1263
1264 * cp-support.c (first_component_command): Constify.
1265
1266 2017-09-27 Tom Tromey <tom@tromey.com>
1267
1268 * psymtab.c (maintenance_print_psymbols)
1269 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1270 Constify.
1271
1272 2017-09-27 Tom Tromey <tom@tromey.com>
1273
1274 * windows-tdep.c (display_tib): Constify.
1275
1276 2017-09-27 Tom Tromey <tom@tromey.com>
1277
1278 * linux-fork.c (delete_checkpoint_command)
1279 (detach_checkpoint_command): Constify.
1280
1281 2017-09-27 Tom Tromey <tom@tromey.com>
1282
1283 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1284
1285 2017-09-27 Tom Tromey <tom@tromey.com>
1286
1287 * arc-tdep.c (dump_arc_instruction_command): Constify.
1288
1289 2017-09-27 Tom Tromey <tom@tromey.com>
1290
1291 * valprint.c (set_radix, show_radix): Constify.
1292
1293 2017-09-27 Tom Tromey <tom@tromey.com>
1294
1295 * dtrace-probe.c (info_probes_dtrace_command): Constify.
1296
1297 2017-09-27 Tom Tromey <tom@tromey.com>
1298
1299 * command.h (not_just_help_class_command): Update.
1300 * cli/cli-decode.h (not_just_help_class_command): Update.
1301 * cli/cli-decode.c (not_just_help_class_command): Constify.
1302
1303 2017-09-27 Tom Tromey <tom@tromey.com>
1304
1305 * gdb_bfd.c (maintenance_info_bfds): Constify.
1306
1307 2017-09-27 Tom Tromey <tom@tromey.com>
1308
1309 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1310 overloads.
1311 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
1312 (do_const_cfunc): New function.
1313 (cmd_cfunc_eq): New overload.
1314 (cli_user_command_p): Check do_const_cfunc.
1315 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1316 const_cfunc.
1317 * command.h (add_cmd): Add const overload and no-function
1318 overload.
1319 (set_cmd_cfunc): Add const overload.
1320 (cmd_const_cfunc_ftype): Declare.
1321 (cmd_cfunc_eq): Add const overload.
1322 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1323 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1324 overload.
1325
1326 2017-09-27 Tom Tromey <tom@tromey.com>
1327
1328 * macroexp.c (get_next_token_for_substitution): New function.
1329 (substitute_args): Call it. Check for __VA_OPT__.
1330
1331 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1332 Pedro Alves <palves@redhat.com>
1333
1334 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1335 producer_is_icc_lt_14.
1336 (producer_is_icc_lt_14): New function.
1337 (check_producer): Add code for checking version of ICC.
1338 (producer_is_icc): Move to producer.c.
1339 (read_structure_type): Restrict ICC workaround to ICC<14.
1340 * producer.c: Include selftest.h.
1341 (producer_is_icc, producer_parsing_tests, _initialize_producer):
1342 New functions.
1343 * producer.h (producer_is_icc): New declaration.
1344
1345 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1346
1347 * Makefile.in (SFILES): Add producer.c.
1348 (COMMON_OBS): Add producer.o
1349 * amd64-tdep.c (producer.h): Add new include.
1350 * dwarf2read.c (producer.h): Add new include.
1351 * producer.c: New file.
1352 * producer.h: New file.
1353 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1354 producer.c.
1355 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1356 producer.h.
1357
1358 2017-09-26 Matthias Klose <doko@ubuntu.com>
1359
1360 * configure.ac: Search ncursesw before ncurses.
1361 Check ncursesw/ncurses.h before ncurses/ncurses.h.
1362 * gdb_curses.h: Include <ncursesw/ncurses.h>
1363 * config.in, configure: Regenerate.
1364
1365 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1366
1367 PR gdb/22185
1368 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1369 obsolete.
1370 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1371 Remove i386sol2 support.
1372 * configure.nat <i386sol2>: Remove.
1373 <sol2-64>: Fold into ...
1374 <sol2>: ... this.
1375 Move common settings to default section.
1376 Add sol-thread.o.
1377 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1378 x86_64-*-solaris2.1[0-9]*>: Rename to ...
1379 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1380 <i[34567]86-*-solaris*>: Remove.
1381 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1382
1383 * configure.ac: Remove wctype in libw check.
1384 (_MSE_INT_H): Don't define on Solaris 7-9.
1385 <solaris*>: Remove libthread_db.so.1 check.
1386 * configure: Regenerate.
1387 * config.in: Regenerate.
1388
1389 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1390 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1391 (gdb_ps_size_t): Remove.
1392 Use base types in users.
1393 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1394
1395 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1396
1397 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1398
1399 PR build/22206
1400 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1401 (adi_is_addr_mapped): Likewise.
1402 (PSR_ICC): Don't redefine.
1403 (PSR_IMPL): Likewise.
1404
1405 2017-09-25 Tom Tromey <tom@tromey.com>
1406
1407 * regcache.c (regcache::dump): Use string_printf.
1408
1409 2017-09-25 Tom Tromey <tom@tromey.com>
1410
1411 * regcache.c (class regcache_invalidator): New.
1412 (struct register_to_invalidate): Remove.
1413 (make_cleanup_regcache_invalidate): Remove.
1414 (regcache::raw_write): Use regcache_invalidator.
1415
1416 2017-09-25 Tom Tromey <tom@tromey.com>
1417
1418 * spu-tdep.c (spu2ppu_sniffer): Update.
1419 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1420 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1421 Remove.
1422 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1423 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1424 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1425 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1426 (frame_pop): Update.
1427
1428 2017-09-25 Tom Tromey <tom@tromey.com>
1429
1430 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1431 * regcache.h (regcache_xfree): Don't declare.
1432 * regcache.c (regcache_xfree): Remove.
1433 (do_regcache_xfree): Use delete.
1434 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1435 * linux-fork.c (free_fork): Use delete.
1436 (fork_save_infrun_state): Likewise.
1437 * jit.c (jit_dealloc_cache): Use delete.
1438 * infrun.c (discard_infcall_suspend_state): Use delete.
1439
1440 2017-09-25 Tom Tromey <tom@tromey.com>
1441
1442 * regcache.h (regcache_xmalloc): Don't declare.
1443 (regcache_raw_set_cached_value): Update comment.
1444 * regcache.c (regcache_xmalloc): Remove.
1445 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1446 * jit.c (jit_frame_sniffer): Use new.
1447 * frame.c (frame_save_as_regcache): Use new.
1448
1449 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1450
1451 * NEWS: Advertise support for guarded-storage registers on IBM z.
1452
1453 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1454
1455 * s390-linux-nat.c (have_regset_gs): New static variable.
1456 (s390_linux_fetch_inferior_registers): Handle guarded-storage
1457 control block and guarded-storage broadcast control regsets.
1458 (s390_read_description): Detect whether the target has
1459 guarded-storage support, return appropriate tdesc.
1460 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1461 (features/s390x-gs-linux64.c): Likewise.
1462 (struct gdbarch_tdep) <have_gs>: New field.
1463 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1464 (s390_gsbc_regset): New variables.
1465 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1466 and s390_gsbc_regset, if applicable.
1467 (s390_core_read_description): Check whether core file was from a
1468 target with guarded-storage support; include appropriate regsets.
1469 (s390_gdbarch_init): Add registers for guarded-storage support.
1470 (_initialize_s390_tdep): Initialize new target descriptions that
1471 include registers for guarded-storage support.
1472 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1473 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1474 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1475 (S390_NUM_REGS): Adjust macro definition.
1476 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1477 (tdesc_s390x_gs_linux64): New declarations.
1478
1479 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1480
1481 * features/s390-gs-linux64.xml: New file.
1482 * features/s390-gs.xml: New file.
1483 * features/s390-gsbc.xml: New file.
1484 * features/s390x-gs-linux64.xml: New file.
1485 * features/Makefile (WHICH): Add s390-gs-linux64 and
1486 s390x-gs-linux64.
1487 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1488 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1489 * features/s390-gs-linux64.c: New generated file.
1490 * features/s390x-gs-linux64.c: New file.
1491 * regformats/s390-gs-linux64.dat: New file.
1492 * regformats/s390x-gs-linux64.dat: New file.
1493
1494 2017-09-23 Tom Tromey <tom@tromey.com>
1495
1496 * defs.h (make_cleanup_override_quit_handler): Don't declare.
1497
1498 2017-09-22 Tom Tromey <tom@tromey.com>
1499
1500 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1501 type to scoped_restore_tmpl.
1502 <scoped_input_handler>: Initialize m_quit_handler directly.
1503
1504 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1505
1506 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1507 (cd_command): Likewise. Free "current_directory" before
1508 assigning to it.
1509 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1510 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1511 * top.c (gdb_dirbuf): Remove global declaration.
1512 * top.h (gdb_dirbuf): Likewise.
1513
1514 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1515
1516 * gnulib/aclocal.m4: Regenerate.
1517 * gnulib/config.in: Regenerate.
1518 * gnulib/configure: Regenerate.
1519 * gnulib/import/Makefile.am: Regenerate.
1520 * gnulib/import/Makefile.in: Regenerate.
1521 * gnulib/import/assure.h: New file.
1522 * gnulib/import/at-func.c: Likewise
1523 * gnulib/import/chdir-long.c: New file.
1524 * gnulib/import/chdir-long.h: New file.
1525 * gnulib/import/cloexec.c: New file.
1526 * gnulib/import/cloexec.h: New file.
1527 * gnulib/import/close.c: New file.
1528 * gnulib/import/closedir.c: New file.
1529 * gnulib/import/dirent-private.h: New file.
1530 * gnulib/import/dup-safer.c: New file.
1531 * gnulib/import/dup.c: New file.
1532 * gnulib/import/dup2.c: New file.
1533 * gnulib/import/error.c: New file.
1534 * gnulib/import/error.h: New file.
1535 * gnulib/import/exitfail.c: New file.
1536 * gnulib/import/exitfail.h: New file.
1537 * gnulib/import/fchdir.c: New file.
1538 * gnulib/import/fcntl.c: New file.
1539 * gnulib/import/fcntl.in.h: New file.
1540 * gnulib/import/fd-hook.c: New file.
1541 * gnulib/import/fd-hook.h: New file.
1542 * gnulib/import/fd-safer.c: New file.
1543 * gnulib/import/fdopendir.c: New file.
1544 * gnulib/import/filename.h: New file.
1545 * gnulib/import/filenamecat-lgpl.c: New file.
1546 * gnulib/import/filenamecat.h: New file.
1547 * gnulib/import/fstat.c: New file.
1548 * gnulib/import/fstatat.c: New file.
1549 * gnulib/import/getcwd-lgpl.c: New file.
1550 * gnulib/import/getcwd.c: New file.
1551 * gnulib/import/getdtablesize.c: New file.
1552 * gnulib/import/getlogin_r.c: New file.
1553 * gnulib/import/getprogname.c: New file.
1554 * gnulib/import/getprogname.h: New file.
1555 * gnulib/import/gettext.h: New file.
1556 * gnulib/import/glob-libc.h: New file.
1557 * gnulib/import/glob.c: New file.
1558 * gnulib/import/glob.in.h: New file.
1559 * gnulib/import/intprops.h: New file.
1560 * gnulib/import/m4/chdir-long.m4: New file.
1561 * gnulib/import/m4/close.m4: New file.
1562 * gnulib/import/m4/closedir.m4: New file.
1563 * gnulib/import/m4/d-ino.m4: New file.
1564 * gnulib/import/m4/d-type.m4: New file.
1565 * gnulib/import/m4/dup.m4: New file.
1566 * gnulib/import/m4/dup2.m4: New file.
1567 * gnulib/import/m4/error.m4: New file.
1568 * gnulib/import/m4/fchdir.m4: New file.
1569 * gnulib/import/m4/fcntl.m4: New file.
1570 * gnulib/import/m4/fcntl_h.m4: New file.
1571 * gnulib/import/m4/fdopendir.m4: New file.
1572 * gnulib/import/m4/filenamecat.m4: New file.
1573 * gnulib/import/m4/fstat.m4: New file.
1574 * gnulib/import/m4/fstatat.m4: New file.
1575 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1576 * gnulib/import/m4/getcwd-path-max.m4: New file.
1577 * gnulib/import/m4/getcwd.m4: New file.
1578 * gnulib/import/m4/getdtablesize.m4: New file.
1579 * gnulib/import/m4/getlogin_r.m4: New file.
1580 * gnulib/import/m4/getprogname.m4: New file.
1581 * gnulib/import/m4/glob.m4: New file.
1582 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1583 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1584 * gnulib/import/m4/mempcpy.m4: New file.
1585 * gnulib/import/m4/memrchr.m4: New file.
1586 * gnulib/import/m4/mode_t.m4: New file.
1587 * gnulib/import/m4/msvc-inval.m4: New file.
1588 * gnulib/import/m4/msvc-nothrow.m4: New file.
1589 * gnulib/import/m4/open.m4: New file.
1590 * gnulib/import/m4/openat.m4: New file.
1591 * gnulib/import/m4/opendir.m4: New file.
1592 * gnulib/import/m4/readdir.m4: New file.
1593 * gnulib/import/m4/realloc.m4: New file.
1594 * gnulib/import/m4/rewinddir.m4: New file.
1595 * gnulib/import/m4/save-cwd.m4: New file.
1596 * gnulib/import/m4/strdup.m4: New file.
1597 * gnulib/import/m4/strerror.m4: New file.
1598 * gnulib/import/m4/unistd-safer.m4: New file.
1599 * gnulib/import/mempcpy.c: New file.
1600 * gnulib/import/memrchr.c: New file.
1601 * gnulib/import/msvc-inval.c: New file.
1602 * gnulib/import/msvc-inval.h: New file.
1603 * gnulib/import/msvc-nothrow.c: New file.
1604 * gnulib/import/msvc-nothrow.h: New file.
1605 * gnulib/import/open.c: New file.
1606 * gnulib/import/openat-die.c: New file.
1607 * gnulib/import/openat-priv.h: New file.
1608 * gnulib/import/openat-proc.c: New file.
1609 * gnulib/import/openat.c: New file.
1610 * gnulib/import/openat.h: New file.
1611 * gnulib/import/opendir.c: New file.
1612 * gnulib/import/pipe-safer.c: New file.
1613 * gnulib/import/readdir.c: New file.
1614 * gnulib/import/realloc.c: New file.
1615 * gnulib/import/rewinddir.c: New file.
1616 * gnulib/import/save-cwd.c: New file.
1617 * gnulib/import/save-cwd.h: New file.
1618 * gnulib/import/strdup.c: New file.
1619 * gnulib/import/strerror-override.c: New file.
1620 * gnulib/import/strerror-override.h: New file.
1621 * gnulib/import/strerror.c: New file.
1622 * gnulib/import/unistd--.h: New file.
1623 * gnulib/import/unistd-safer.h: New file.
1624 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1625 "getcwd" and "glob".
1626 * ser-tcp.c: Undefine "close" before redefining it.
1627
1628 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1629
1630 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1631 get rid of res_val.
1632
1633 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1634
1635 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1636 <sol2,sparc>: Likewise.
1637 <sol2-64,i386>: Likewise.
1638
1639 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1640 -Wdeprecated-declarations on *-*-solaris*.
1641 * configure: Regenerate.
1642
1643 * procfs.c: Include "nat/inferior.h".
1644 (procfs_info_proc): Fix typo.
1645
1646 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1647
1648 * remote.c (vector): Include.
1649 (struct private_thread_info): Add field, thread_handle.
1650 (free_private_thread_info): Deallocate storage associated with
1651 thread handle.
1652 (get_private_info_thread): Initialize `thread_handle' field.
1653 (struct thread_item): Add field, thread_handle.
1654 (clear_threads_listing_context): Deallocate storage associated
1655 with thread handle.
1656 (start_thread): Add support for "handle" attribute.
1657 (thread_attributes): Add "handle".
1658 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1659 field.
1660 (remote_update_thread_list): Update thread_handle.
1661 (remote_thread_handle_to_thread_info): New function.
1662 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1663
1664 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1665
1666 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1667 function.
1668 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1669 * python/python-internal.h (thread_object_type): Declare.
1670
1671 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1672
1673 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1674 (target_thread_handle_to_thread_info): Declare.
1675 * target.c (target_thread_handle_to_thread_info): New function.
1676 * target-delegates.c: Regenerate.
1677 * gdbthread.h (find_thread_by_handle): Declare.
1678 * thread.c (find_thread_by_handle): New function.
1679 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1680 function.
1681 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1682
1683 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1684
1685 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1686
1687 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1688
1689 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1690
1691 2017-09-21 Yao Qi <yao.qi@linaro.org>
1692
1693 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1694 to gdb_target_obs.
1695
1696 2017-09-20 Tom Tromey <tom@tromey.com>
1697
1698 * breakpoint.c (struct counted_command_line): Remove.
1699 (breakpoint_commands): Update.
1700 (alloc_counted_command_line, incref_counted_command_line)
1701 (decref_counted_command_line, do_cleanup_counted_command_line)
1702 (make_cleanup_decref_counted_command_line): Remove.
1703 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1704 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1705 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1706 (save_breakpoints): Update.
1707 * breakpoint.h (counted_command_line): Now a typedef to
1708 shared_ptr.
1709 (struct breakpoint) <commands>: Now a counted_command_line.
1710 (struct bpstats) <command>: Likewise.
1711
1712 2017-09-20 Tom Tromey <tom@tromey.com>
1713
1714 * breakpoint.c (struct commands_info, do_map_commands_command):
1715 Remove.
1716 (commands_command_1): Update.
1717 (iterate_over_related_breakpoints): Take a function_view.
1718 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1719 (delete_command): Update.
1720 (map_breakpoint_numbers): Take a function_view.
1721 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1722 (disable_command): Update.
1723 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1724 (enable_command): Update.
1725 (struct disp_data, do_enable_breakpoint_disp)
1726 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1727 (do_map_enable_delete_breakpoint): Remove.
1728 (enable_once_command, enable_count_command, enable_delete_command)
1729 (delete_trace_variable_command): Update.
1730
1731 2017-09-20 Tom Tromey <tom@tromey.com>
1732
1733 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1734 (bpstat_clear): Use delete.
1735 (bpstats): New constructors.
1736 (bpstat_copy, bpstat_stop_status): Use new.
1737 (dprintf_after_condition_true): Update.
1738 * breakpoint.h (bpstats::bpstats): Add constructors.
1739 (bpstats::~bpstats): Add destructor.
1740
1741 2017-09-20 Pedro Alves <palves@redhat.com>
1742
1743 * eval.c (make_params): Delete, refactored as ...
1744 (class fake_method): ... this new type's ctor.
1745 (fake_method::~fake_method): New.
1746 (evaluate_subexp_standard): Use 'fake_method'.
1747
1748 2017-09-20 Tom Tromey <tom@tromey.com>
1749
1750 * windows-nat.c (get_windows_debug_event, windows_wait)
1751 (do_initial_windows_stuff, windows_attach): Update.
1752 * utils.c (vwarning, internal_vproblem): Update.
1753 (ui_unregister_input_event_handler_cleanup)
1754 (prepare_to_handle_input): Remove.
1755 (class scoped_input_handler): New.
1756 (defaulted_query, prompt_for_continue): Update.
1757 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1758 Update.
1759 * top.c (undo_terminal_modifications_before_exit): Update.
1760 * target/target.h (target_terminal_init, target_terminal_inferior)
1761 (target_terminal_ours): Don't declare.
1762 (class target_terminal): New.
1763 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1764 (target_terminal_ours_for_output)
1765 (make_cleanup_restore_target_terminal): Don't declare.
1766 (target_terminal_info): Remove.
1767 * target.c (enum terminal_state, terminal_state): Remove.
1768 (target_terminal::terminal_state): Define.
1769 (target_terminal::init): Rename from target_terminal_init.
1770 (target_terminal::inferior): Rename from
1771 target_terminal_inferior.
1772 (target_terminal::ours): Rename from target_terminal_ours.
1773 (target_terminal::ours_for_output): Rename from
1774 target_terminal_ours_for_output.
1775 (target_terminal::info): New method.
1776 (cleanup_restore_target_terminal)
1777 (make_cleanup_restore_target_terminal): Remove.
1778 * solib.c (handle_solib_event): Update.
1779 * remote.c (remote_serial_quit_handler): Update.
1780 (remote_terminal_inferior, remote_wait_as): Update.
1781 * record-full.c (record_full_wait_1): Update.
1782 * nto-procfs.c (procfs_create_inferior): Update.
1783 * nat/fork-inferior.c (startup_inferior): Update.
1784 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1785 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1786 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1787 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1788 (mi_breakpoint_created, mi_breakpoint_deleted)
1789 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1790 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1791 (mi_user_selected_context_changed, report_initial_inferior):
1792 Update.
1793 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1794 (linux_nat_terminal_inferior): Update.
1795 * infrun.c (follow_fork_inferior)
1796 (handle_vfork_child_exec_or_exit, do_target_resume)
1797 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1798 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1799 Update.
1800 * inflow.c (child_terminal_init, info_terminal_command): Update.
1801 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1802 (attach_command): Update.
1803 * infcall.c (call_thread_fsm_should_stop): Update.
1804 * gnu-nat.c (gnu_attach): Update.
1805 * extension.c (struct active_ext_lang_state)
1806 (restore_active_ext_lang): Update.
1807 * exceptions.c (print_flush): Update.
1808 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1809 (struct quit_handler_cleanup_data, restore_quit_handler)
1810 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1811 Remove.
1812 * cp-support.c (gdb_demangle): Update.
1813 * breakpoint.c (update_inserted_breakpoint_locations)
1814 (insert_breakpoint_locations, handle_jit_event)
1815 (disable_breakpoints_in_unloaded_shlib): Update.
1816 * annotate.c (annotate_breakpoints_invalid)
1817 (annotate_frames_invalid): Update.
1818
1819 2017-09-20 Tom Tromey <tom@tromey.com>
1820
1821 * main.c (catch_command_errors): Rename from
1822 catch_command_errors_const.
1823 (captured_main_1): Update.
1824
1825 2017-09-20 Pedro Alves <palves@redhat.com>
1826
1827 * cli/cli-cmds.c (list_command): Use print_sal_location.
1828 (print_sal_location): New function.
1829 (ambiguous_line_spec): Use print_sal_location.
1830 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1831 * symtab.c (find_function_start_sal): Likewise.
1832 * symtab.h (symtab_and_line::symbol): New field.
1833
1834 2017-09-20 Pedro Alves <palves@redhat.com>
1835
1836 * linespec.c (minsym_found): Handle non-text minsyms.
1837 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1838
1839 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1840
1841 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1842 backslash.
1843
1844 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1845
1846 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1847 vmovups instead vmovaps.
1848 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1849
1850 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1851
1852 * NEWS (Changes since GDB 8.0): Add starti.
1853 * infcmd.c (enum run_break): New.
1854 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1855 case.
1856 (run_command): Use enum run_how.
1857 (start_command): Likewise.
1858 (starti_command): New function.
1859 (RUN_ARGS_HELP): New macro.
1860 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1861 commands. Add starti command.
1862
1863 2017-09-19 Yao Qi <yao.qi@linaro.org>
1864
1865 * Makefile.in (monitor.o): Remove the rule.
1866
1867 2017-09-19 Yao Qi <yao.qi@linaro.org>
1868
1869 * annotate.h (struct annotate_arg_emitter): Use
1870 DISABLE_COPY_AND_ASSIGN.
1871 * common/refcounted-object.h (refcounted_object): Likewise.
1872 * completer.h (struct completion_result): Likewise.
1873 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1874 * filename-seen-cache.h (filename_seen_cache): Likewise.
1875 * gdbcore.h (thread_section_name): Likewise.
1876 * gdb_regex.h (compiled_regex): Likewise.
1877 * gdbthread.h (scoped_restore_current_thread): Likewise.
1878 * inferior.h (scoped_restore_current_inferior): Likewise.
1879 * jit.c (jit_reader): Likewise.
1880 * linespec.h (struct linespec_result): Likewise.
1881 * mi/mi-parse.h (struct mi_parse): Likewise.
1882 * nat/fork-inferior.c (execv_argv): Likewise.
1883 * progspace.h (scoped_restore_current_program_space): Likewise.
1884 * python/python-internal.h (class gdbpy_enter): Likewise.
1885 * regcache.h (regcache): Likewise.
1886 * target-descriptions.c (struct tdesc_reg): Likewise.
1887 (struct tdesc_type): Likewise.
1888 (struct tdesc_feature): Likewise.
1889 * ui-out.h (ui_out_emit_type): Likewise.
1890
1891 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1892
1893 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1894 label abort_expression.
1895
1896 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * common/buffer.c (buffer_xml_printf): Adjust.
1899 * common/xml-utils.c (xml_escape_text): Change return type to
1900 std::string, update code accordingly.
1901 * common/xml-utils.h (xml_escape_text): Change return type to
1902 std::string.
1903 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1904 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1905 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1906 Adjust.
1907
1908 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1911 (SUBDIR_UNITTESTS_OBS): Add new object file.
1912 * unittests/xml-utils-selftests.c: New file.
1913
1914 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1915
1916 * common/selftest.h (selftest): New struct/interface.
1917 (register_test): Add name parameter, add new overload.
1918 (run_tests): Add filter parameter.
1919 (for_each_selftest_ftype): New typedef.
1920 (for_each_selftest): New declaration.
1921 * common/selftest.c (tests): Change type to
1922 map<string, unique_ptr<selftest>>.
1923 (simple_selftest): New struct.
1924 (register_test): New function.
1925 (register_test): Add name parameter and use it.
1926 (run_tests): Add filter parameter and use it. Add prints.
1927 Adjust to vector -> map change.
1928 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1929 registering selftests.
1930 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1931 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1932 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1933 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1934 * findvar.c (_initialize_findvar): Likewise.
1935 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1936 * maint.c (maintenance_selftest): Update call to run_tests.
1937 (maintenance_info_selftests): New function.
1938 (_initialize_maint_cmds): Register "maintenance info selftests"
1939 command. Update "maintenance selftest" doc.
1940 * regcache.c (_initialize_regcache): Add names when registering
1941 selftests.
1942 * rust-exp.y (_initialize_rust_exp): Likewise.
1943 * selftest-arch.c (gdbarch_selftest): New struct.
1944 (gdbarch_tests): Remove.
1945 (register_test_foreach_arch): Add name parameter. Call
1946 register_test.
1947 (tests_with_arch): Remove, move most content to
1948 gdbarch_selftest::operator().
1949 (_initialize_selftests_foreach_arch): Remove.
1950 * selftest-arch.h (register_test_foreach_arch): Add name
1951 parameter.
1952 (run_tests_with_arch): New declaration.
1953 * utils-selftests.c (_initialize_utils_selftests): Add names
1954 when registering selftests.
1955 * utils.c (_initialize_utils): Likewise.
1956 * unittests/array-view-selftests.c
1957 (_initialize_array_view_selftests): Likewise.
1958 * unittests/environ-selftests.c (_initialize_environ_selftests):
1959 Likewise.
1960 * unittests/function-view-selftests.c
1961 (_initialize_function_view_selftests): Likewise.
1962 * unittests/offset-type-selftests.c
1963 (_initialize_offset_type_selftests): Likewise.
1964 * unittests/optional-selftests.c
1965 (_initialize_optional_selftests): Likewise.
1966 * unittests/scoped_restore-selftests.c
1967 (_initialize_scoped_restore_selftests): Likewise.
1968 * NEWS: Document "maintenance selftest" and "maint info
1969 selftests".
1970
1971 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1972
1973 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1974 scoped_restore.
1975
1976 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1977
1978 * mi/mi-main.c (mi_load_progress): Make uiout variable
1979 a unique_ptr.
1980
1981 2017-09-15 Pedro Alves <palves@redhat.com>
1982
1983 * compile/compile-c-types.c (convert_enum, convert_int)
1984 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1985
1986 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1987
1988 * dwarf2read.c (copy_string): Remove.
1989 (parse_macro_definition): Replace copy_string with savestring.
1990
1991 2017-09-15 Yao Qi <yao.qi@linaro.org>
1992
1993 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1994 gdb_target_obs.
1995 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1996 Likewise.
1997 (i[34567]86-*-linux*): Likewise.
1998
1999 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * dwarf2expr.h (dwarf_stack_value): Add constructor.
2002 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2003 <stack>: Change type to std::vector.
2004 <stack_len, stack_allocated>: Remove.
2005 <grow_stack>: Remove.
2006 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2007 (dwarf_expr_context::~dwarf_expr_context): Remove.
2008 (dwarf_expr_context::grow_stack): Remove.
2009 (dwarf_expr_context::push): Adjust.
2010 (dwarf_expr_context::pop): Adjust.
2011 (dwarf_expr_context::fetch): Adjust.
2012 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2013 (dwarf_expr_context::stack_empty_p): Adjust.
2014 (dwarf_expr_context::execute_stack_op): Adjust.
2015
2016 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2017
2018 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2019 return type to bool.
2020 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2021
2022 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2023
2024 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2025 Change type to bool.
2026 (dwarf_stack_value) <in_stack_memory>: Likewise.
2027 (dwarf_expr_context) <push_address>: Change parameter type to
2028 bool.
2029 <fetch_in_stack_memory>: Change return type to bool.
2030 <push>: Change parameter type to bool.
2031 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2032 to bool.
2033 (dwarf_expr_context::push_address): Likewise.
2034 (dwarf_expr_context::fetch_in_stack_memory): Change return type
2035 to bool.
2036 (dwarf_expr_context::execute_stack_op): Adjust.
2037 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2038
2039 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
2040
2041 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2042 (struct dwarf_expr_context) <n_pieces>: Remove.
2043 <pieces>: Change type to std::vector.
2044 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2045 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2046 pieces.
2047 (dwarf_expr_context::add_piece): Adjust.
2048 * dwarf2loc.c (struct piece_closure): Initialize fields.
2049 <n_pieces>: Remove.
2050 <pieces>: Change type to std::vector.
2051 (allocate_piece_closure): Adjust, change parameter to
2052 std::vector rvalue and std::move it to piece_closure.
2053 (rw_pieced_value): Adjust.
2054 (check_pieced_synthetic_pointer): Adjust.
2055 (indirect_synthetic_pointer): Adjust.
2056 (coerce_pieced_ref): Adjust.
2057 (free_pieced_value_closure): Adjust. Use delete to free
2058 piece_closure.
2059 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
2060 to allocate_piece_closure.
2061 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2062
2063 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2064
2065 * probe.h (probe_ops_cp): Remove typedef.
2066 (DEF_VEC_P (probe_ops_cp)): Remove.
2067 (all_probe_ops): Change type to std::vector.
2068 * probe.c (info_probes_for_ops): Adjust to vector change.
2069 (probe_linespec_to_ops): Likewise.
2070 (all_probe_ops): Change type to std::vector.
2071 (_initialize_probe): Adjust to vector change.
2072 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2073 * elfread.c (elf_get_probes): Likewise.
2074 * stap-probe.c (_initialize_stap_probe): Likewise.
2075
2076 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2077
2078 * probe.h (struct bound_probe): Define constructors.
2079 * probe.c (bound_probe_s): Remove typedef.
2080 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2081 (collect_probes): Change return type to std::vector, remove
2082 cleanup.
2083 (compare_probes): Return bool, change parameter type. Change
2084 semantic to "less than".
2085 (gen_ui_out_table_header_info): Change parameter to std::vector
2086 and update.
2087 (exists_probe_with_pops): Likewise.
2088 (info_probes_for_ops): Update to std::vector change.
2089 (enable_probes_command): Likewise.
2090 (disable_probes_command): Likewise.
2091
2092 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2093
2094 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2095 vec to std::vector.
2096 * probe.c (parse_probes_in_pspace): Update.
2097 (find_probes_in_objfile): Update.
2098 (find_probe_by_pc): Update.
2099 (collect_probes): Update.
2100 (probe_any_get_probes): Update.
2101 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2102 return type to reference to std::vector.
2103 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2104 std::vector and update.
2105 (dtrace_process_dof): Likewise.
2106 (dtrace_get_probes): Likewise.
2107 * elfread.c (elf_get_probes): Change return type to std::vector,
2108 store an std::vector in bfd_data.
2109 (probe_key_free): Update to std::vector.
2110 * stap-probe.c (handle_stap_probe): Change parameter to
2111 std::vector and update.
2112 (stap_get_probes): Likewise.
2113 * symfile-debug.c (debug_sym_get_probes): Change return type to
2114 std::vector and update.
2115
2116 2017-09-11 Tom Tromey <tom@tromey.com>
2117
2118 * breakpoint.c (program_breakpoint_here_p): Update.
2119 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2120 from make_show_memory_breakpoints_cleanup. Return a
2121 scoped_restore_tmpl<int>.
2122 (restore_show_memory_breakpoints): Remove.
2123 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2124 * mem-break.c (memory_validate_breakpoint): Update.
2125 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2126 (ia64_memory_remove_breakpoint): Update.
2127 (ia64_breakpoint_from_pc): Update.
2128 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2129 from make_show_memory_breakpoints_cleanup.
2130
2131 2017-09-11 Tom Tromey <tom@tromey.com>
2132
2133 * d-namespace.c (d_lookup_symbol): Use std::string.
2134 (find_symbol_in_baseclass): Likewise.
2135
2136 2017-09-11 Tom Tromey <tom@tromey.com>
2137
2138 * ctf.c (ctf_start): Use std::string.
2139
2140 2017-09-11 Tom Tromey <tom@tromey.com>
2141
2142 * ada-lang.c (is_known_support_routine): Update.
2143 (ada_unhandled_exception_name_addr_from_raise): Update.
2144 * guile/scm-frame.c (gdbscm_frame_name): Update.
2145 * python/py-frame.c (frapy_name): Update.
2146 (frapy_function): Update.
2147 * stack.h (find_frame_funname): Update.
2148 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2149 (print_frame): Update.
2150
2151 2017-09-11 Tom Tromey <tom@tromey.com>
2152
2153 * findcmd.c (put_bits): Take a gdb::byte_vector.
2154 (parse_find_args): Return gdb::byte_vector. "args" now const.
2155 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2156 cleanups.
2157 (find_command): Update.
2158
2159 2017-09-11 Tom Tromey <tom@tromey.com>
2160
2161 * cli/cli-script.c (class scoped_restore_hook_in): New.
2162 (clear_hook_in_cleanup): Remove.
2163 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2164 scoped_restore_hook_in.
2165
2166 2017-09-11 Tom Tromey <tom@tromey.com>
2167
2168 * cli/cli-script.c (restore_interp): Remove.
2169 (read_command_lines): Use scoped_restore_interp.
2170 * interps.c (scoped_restore_interp::set_temp): Rename from
2171 interp_set_temp.
2172 * interps.h (class scoped_restore_interp): New.
2173 (interp_set_temp): Remove.
2174
2175 2017-09-11 Tom Tromey <tom@tromey.com>
2176
2177 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2178 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2179 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2180 scoped_restore.
2181 (mi_cmd_break_insert_1): Update.
2182 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2183 scoped_restore.
2184
2185 2017-09-11 Tom Tromey <tom@tromey.com>
2186
2187 * demangle.c (demangle_command): Update.
2188 * breakpoint.c (disable_command): Update.
2189 (enable_command): Update.
2190 (find_location_by_number): Make "number" const. Use
2191 get_number_trailer.
2192 * cli/cli-utils.c (extract_arg): Return std::string.
2193 * probe.c (parse_probe_linespec): Update. Change types.
2194 (collect_probes): Take string arguments.
2195 (parse_probe_linespec): Likewise.
2196 (info_probes_for_ops): Update.
2197 (enable_probes_command): Update.
2198 (disable_probes_command): Update.
2199 * break-catch-sig.c (catch_signal_split_args): Update.
2200 * mi/mi-parse.c (mi_parse): Update.
2201
2202 2017-09-11 Tom Tromey <tom@tromey.com>
2203
2204 * language.h (language_enum): Make argument const.
2205 * language.c (language_enum): Make argument const.
2206
2207 2017-09-11 Tom Tromey <tom@tromey.com>
2208
2209 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2210 as function.
2211 (skip_to_space): Rename from skip_to_space_const.
2212 * common/common-utils.c (skip_to_space): New function.
2213 (skip_to_space): Rename from skip_to_space_const.
2214 * cli/cli-utils.h (get_number): Rename from get_number_const.
2215 (extract_arg): Rename from extract_arg_const.
2216 * cli/cli-utils.c (get_number): Rename from get_number_const.
2217 (extract_arg): Rename from extract_arg_const.
2218 (number_or_range_parser::get_number): Use ::get_number.
2219 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2220 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2221 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2222 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2223 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2224 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2225 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2226 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2227
2228 2017-09-11 Tom Tromey <tom@tromey.com>
2229
2230 * python/python.c (do_start_initialization): Use
2231 py-event-types.def to initialize types.
2232 Define all object type structures.
2233 * python/python-internal.h: Don't declare event initialization
2234 functions.
2235 * python/py-threadevent.c (thread_event_object_type): Don't
2236 define.
2237 * python/py-stopevent.c (stop_event_object_type): Don't define.
2238 * python/py-signalevent.c (signal_event_object_type): Don't
2239 declare or define.
2240 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2241 (clear_objfiles_event_object_type): Don't declare or define.
2242 * python/py-infevents.c (inferior_call_pre_event_object_type)
2243 (inferior_call_post_event_object_type)
2244 (register_changed_event_object_type)
2245 (memory_changed_event_object_type): Don't declare or define.
2246 * python/py-inferior.c (new_thread_event_object_type)
2247 (new_inferior_event_object_type)
2248 (inferior_deleted_event_object_type): Don't declare or define.
2249 * python/py-exitedevent.c (exited_event_object_type): Don't
2250 declare or define.
2251 * python/py-evts.c (gdbpy_initialize_py_events): Use
2252 py-all-events.def.
2253 * python/py-events.h (thread_event_object_type): Don't declare.
2254 (events_object): Use py-all-events.def.
2255 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2256 py-event-types.def.
2257 * python/py-event-types.def: New file.
2258 * python/py-continueevent.c (create_continue_event_object): Don't
2259 declare or define.
2260 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2261 declare or define.
2262 * python/py-all-events.def: New file.
2263
2264 2017-09-11 Tom Tromey <tom@tromey.com>
2265
2266 * python/py-threadevent.c (create_thread_event_object): Return
2267 gdbpy_ref.
2268 * python/py-stopevent.h (create_stop_event_object)
2269 (create_breakpoint_event_object, create_signal_event_object):
2270 Update.
2271 * python/py-stopevent.c (create_stop_event_object): Return
2272 gdbpy_ref.
2273 (emit_stop_event): Update.
2274 * python/py-signalevent.c (create_signal_event_object): Return
2275 gdbpy_ref.
2276 * python/py-infevents.c (create_inferior_call_event_object):
2277 Update.
2278 * python/py-event.h (create_event_object)
2279 (create_thread_event_object): Update.
2280 * python/py-event.c (create_event_object): Return gdbpy_ref.
2281 * python/py-continueevent.c: Return gdbpy_ref.
2282 * python/py-bpevent.c (create_breakpoint_event_object): Return
2283 gdbpy_ref.
2284
2285 2017-09-11 Tom Tromey <tom@tromey.com>
2286
2287 PR python/15622:
2288 * NEWS: Add entry.
2289 * python/python.c (do_start_initialization): Initialize new event
2290 types.
2291 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2292 (gdbpy_initialize_inferior_deleted_event)
2293 (gdbpy_initialize_new_thread_event): Declare.
2294 * python/py-threadevent.c (create_thread_event_object): Add option
2295 "thread" parameter.
2296 * python/py-inferior.c (new_thread_event_object_type)
2297 (new_inferior_event_object_type)
2298 (inferior_deleted_event_object_type): Declare.
2299 (python_new_inferior, python_inferior_deleted): New functions.
2300 (add_thread_object): Emit new_thread event.
2301 (gdbpy_initialize_inferior): Attach new functions to corresponding
2302 observers.
2303 (new_thread, new_inferior, inferior_deleted): Define new event
2304 types.
2305 * python/py-evts.c (gdbpy_initialize_py_events): Add new
2306 registries.
2307 * python/py-events.h (events_object) <new_inferior,
2308 inferior_deleted, new_thread>: New fields.
2309 * python/py-event.h (create_thread_event_breakpoint): Add optional
2310 "thread" parameter.
2311
2312 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2313
2314 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2315 check current_ui instead.
2316 (internal_vproblem): Likewise.
2317
2318 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
2319
2320 * thread.c (print_thread_info_1): Remove unnecessary calls to
2321 uiout->is_mi_like_p.
2322
2323 2017-09-09 Tom Tromey <tom@tromey.com>
2324
2325 * namespace.h (add_using_directive): Update.
2326 * namespace.c (add_using_directive): Change type of excludes to
2327 std::vector.
2328 * dwarf2read.c (read_import_statement): Use std::vector.
2329 (read_namespace): Update.
2330 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2331
2332 2017-09-09 Tom Tromey <tom@tromey.com>
2333
2334 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2335
2336 2017-09-09 Tom Tromey <tom@tromey.com>
2337
2338 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2339
2340 2017-09-09 Tom Tromey <tom@tromey.com>
2341
2342 * stack.c (func_command): Use gdb::def_vector.
2343
2344 2017-09-09 Tom Tromey <tom@tromey.com>
2345
2346 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2347 ui_out_emit_list, ui_out_emit_tuple.
2348 (mi_cmd_var_update): Likewise.
2349
2350 2017-09-09 Tom Tromey <tom@tromey.com>
2351
2352 * mi/mi-interp.c (mi_user_selected_context_changed): Use
2353 ui_out_redirect_pop.
2354 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2355 ui_out_redirect_pop.
2356 * utils.c (do_ui_out_redirect_pop)
2357 (make_cleanup_ui_out_redirect_pop): Remove.
2358 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2359 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2360 * ui-out.h (ui_out_redirect_pop): New class.
2361
2362 2017-09-09 Tom Tromey <tom@tromey.com>
2363
2364 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2365 (list_available_thread_groups, mi_cmd_list_thread_groups)
2366 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2367 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2368 Likewise.
2369
2370 2017-09-09 Tom Tromey <tom@tromey.com>
2371
2372 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2373 ui_out_emit_tuple.
2374
2375 2017-09-09 Tom Tromey <tom@tromey.com>
2376
2377 * target.c (flash_erase_command): Use ui_out_emit_tuple.
2378 * stack.c (print_frame): Use ui_out_emit_tuple.
2379 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2380 (info_spu_mailbox_command, info_spu_dma_command)
2381 (info_spu_proxydma_command): Likewise.
2382 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2383 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2384 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2385 ui_out_emit_tuple.
2386 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2387
2388 2017-09-09 Tom Tromey <tom@tromey.com>
2389
2390 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2391 (class ui_out_emit_table): Update comment.
2392 * ui-out.c (do_cleanup_table_end)
2393 (make_cleanup_ui_out_table_begin_end): Remove.
2394 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2395 (info_spu_dma_cmdlist): Likewise.
2396 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2397 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2398 ui_out_emit_table.
2399
2400 2017-09-09 Tom Tromey <tom@tromey.com>
2401
2402 * thread.c (print_thread_info_1): Use ui_out_emit_table,
2403 ui_out_emit_list, gdb::optional.
2404
2405 2017-09-09 John Baldwin <jhb@FreeBSD.org>
2406
2407 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2408 prototype.
2409 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2410 prototype.
2411 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2412 prototype.
2413 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2414 * ada-exp.y: Remove _initialize_ada_exp prototype.
2415 * ada-lang.c: Remove _initialize_ada_language prototype.
2416 * ada-tasks.c: Remove _initialize_tasks prototype.
2417 * addrmap.c: Remove _initialize_addrmap prototype.
2418 * agent.c: Remove _initialize_agent prototype.
2419 * aix-thread.c: Remove _initialize_aix_thread prototype.
2420 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2421 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2422 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2423 prototype.
2424 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2425 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2426 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2427 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2428 prototype.
2429 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2430 prototype.
2431 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2432 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2433 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2434 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2435 prototype.
2436 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2437 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2438 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2439 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2440 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2441 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2442 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2443 prototype.
2444 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2445 prototype.
2446 * annotate.c: Remove _initialize_annotate prototype.
2447 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2448 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2449 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2450 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2451 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2452 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2453 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2454 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2455 prototype.
2456 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2457 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2458 * auto-load.c: Remove _initialize_auto_load prototype.
2459 * auxv.c: Remove _initialize_auxv prototype.
2460 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2461 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2462 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2463 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2464 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2465 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2466 prototype.
2467 * break-catch-throw.c: Remove _initialize_break_catch_throw
2468 prototype.
2469 * breakpoint.c: Remove _initialize_breakpoint prototype.
2470 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2471 * btrace.c: Remove _initialize_btrace prototype.
2472 * charset.c: Remove _initialize_charset prototype.
2473 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2474 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2475 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2476 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2477 * cli/cli-script.c: Remove _initialize_cli_script prototype.
2478 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2479 * coffread.c: Remove _initialize_coffread prototype.
2480 * compile/compile.c: Remove _initialize_compile prototype.
2481 * complaints.c: Remove _initialize_complaints prototype.
2482 * completer.c: Remove _initialize_completer prototype.
2483 * copying.awk: Remove _initialize_copying prototype.
2484 * copying.c: Regenerate.
2485 * core-regset.c: Remove _initialize_core_regset prototype.
2486 * corefile.c: Remove _initialize_core prototype.
2487 * corelow.c: Remove _initialize_corelow prototype.
2488 * cp-abi.c: Remove _initialize_cp_abi prototype.
2489 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2490 * cp-support.c: Remove _initialize_cp_support prototype.
2491 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2492 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2493 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2494 * ctf.c: Remove _initialize_ctf prototype.
2495 * d-lang.c: Remove _initialize_d_language prototype.
2496 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2497 prototype.
2498 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2499 * dbxread.c: Remove _initialize_dbxread prototype.
2500 * dcache.c: Remove _initialize_dcache prototype.
2501 * demangle.c: Remove _initialize_demangler prototype.
2502 * disasm-selftests.c: Remove _initialize_disasm_selftests
2503 prototype.
2504 * disasm.c: Remove _initialize_disasm prototype.
2505 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2506 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2507 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2508 prototype.
2509 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2510 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2511 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2512 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2513 * elfread.c: Remove _initialize_elfread prototype.
2514 * exec.c: Remove _initialize_exec prototype.
2515 * extension.c: Remove _initialize_extension prototype.
2516 * f-lang.c: Remove _initialize_f_language prototype.
2517 * f-valprint.c: Remove _initialize_f_valprint prototype.
2518 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2519 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2520 * filesystem.c: Remove _initialize_filesystem prototype.
2521 * findcmd.c: Remove _initialize_mem_search prototype.
2522 * fork-child.c: Remove _initialize_fork_child prototype.
2523 * frame-base.c: Remove _initialize_frame_base prototype.
2524 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2525 * frame.c: Remove _initialize_frame prototype.
2526 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2527 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2528 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2529 * gcore.c: Remove _initialize_gcore prototype.
2530 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2531 * gdbarch.c: Regenerate.
2532 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2533 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2534 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2535 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2536 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2537 * go-lang.c: Remove _initialize_go_language prototype.
2538 * go32-nat.c: Remove _initialize_go32_nat prototype.
2539 * guile/guile.c: Remove _initialize_guile prototype.
2540 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2541 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2542 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2543 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2544 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2545 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2546 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2547 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2548 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2549 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2550 prototype.
2551 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2552 prototype.
2553 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2554 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2555 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2556 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2557 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2558 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2559 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2560 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2561 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2562 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2563 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2564 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2565 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2566 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2567 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2568 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2569 prototype.
2570 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2571 prototype.
2572 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2573 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2574 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2575 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2576 * infcall.c: Remove _initialize_infcall prototype.
2577 * infcmd.c: Remove _initialize_infcmd prototype.
2578 * inferior.c: Remove _initialize_inferiors prototype.
2579 * inflow.c: Remove _initialize_inflow prototype.
2580 * infrun.c: Remove _initialize_infrun prototype.
2581 * interps.c: Remove _initialize_interpreter prototype.
2582 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2583 * jit.c: Remove _initialize_jit prototype.
2584 * language.c: Remove _initialize_language prototype.
2585 * linux-fork.c: Remove _initialize_linux_fork prototype.
2586 * linux-nat.c: Remove _initialize_linux_nat prototype.
2587 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2588 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2589 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2590 * m2-lang.c: Remove _initialize_m2_language prototype.
2591 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2592 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2593 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2594 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2595 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2596 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2597 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2598 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2599 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2600 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2601 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2602 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2603 * machoread.c: Remove _initialize_machoread prototype.
2604 * macrocmd.c: Remove _initialize_macrocmd prototype.
2605 * macroscope.c: Remove _initialize_macroscope prototype.
2606 * maint.c: Remove _initialize_maint_cmds prototype.
2607 * mdebugread.c: Remove _initialize_mdebugread prototype.
2608 * memattr.c: Remove _initialize_mem prototype.
2609 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2610 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2611 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2612 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2613 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2614 * microblaze-linux-tdep.c: Remove
2615 _initialize_microblaze_linux_tdep prototype.
2616 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2617 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2618 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2619 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2620 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2621 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2622 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2623 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2624 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2625 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2626 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2627 prototype.
2628 * mipsread.c: Remove _initialize_mipsread prototype.
2629 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2630 prototype.
2631 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2632 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2633 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2634 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2635 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2636 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2637 prototype.
2638 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2639 * nto-procfs.c: Remove _initialize_procfs prototype.
2640 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2641 * objc-lang.c: Remove _initialize_objc_language prototype.
2642 * objfiles.c: Remove _initialize_objfiles prototype.
2643 * observer.c: Remove observer_test_first_notification_function,
2644 observer_test_second_notification_function,
2645 observer_test_third_notification_function, and
2646 _initialize_observer prototypes.
2647 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2648 * osabi.c: Remove _initialize_gdb_osabi prototype.
2649 * osdata.c: Remove _initialize_osdata prototype.
2650 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2651 * parse.c: Remove _initialize_parse prototype.
2652 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2653 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2654 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2655 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2656 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2657 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2658 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2659 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2660 * printcmd.c: Remove _initialize_printcmd prototype.
2661 * probe.c: Remove _initialize_probe prototype.
2662 * proc-api.c: Remove _initialize_proc_api prototype.
2663 * proc-events.c: Remove _initialize_proc_events prototype.
2664 * proc-service.c: Remove _initialize_proc_service prototype.
2665 * procfs.c: Remove _initialize_procfs prototype.
2666 * psymtab.c: Remove _initialize_psymtab prototype.
2667 * python/python.c: Remove _initialize_python prototype.
2668 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2669 * record-btrace.c: Remove _initialize_record_btrace prototype.
2670 * record-full.c: Remove _initialize_record_full prototype.
2671 * record.c: Remove _initialize_record prototype.
2672 * regcache.c: Remove _initialize_regcache prototype.
2673 * reggroups.c: Remove _initialize_reggroup prototype.
2674 * remote-notif.c: Remove _initialize_notif prototype.
2675 * remote-sim.c: Remove _initialize_remote_sim prototype.
2676 * remote.c: Remove _initialize_remote prototype.
2677 * reverse.c: Remove _initialize_reverse prototype.
2678 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2679 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2680 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2681 prototype.
2682 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2683 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2684 * rust-exp.y: Remove _initialize_rust_exp prototype.
2685 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2686 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2687 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2688 * score-tdep.c: Remove _initialize_score_tdep prototype.
2689 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2690 prototype.
2691 * ser-go32.c: Remove _initialize_ser_dos prototype.
2692 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2693 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2694 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2695 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2696 * serial.c: Remove _initialize_serial prototype.
2697 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2698 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2699 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2700 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2701 * skip.c: Remove _initialize_step_skip prototype.
2702 * sol-thread.c: Remove _initialize_sol_thread prototype.
2703 * solib-aix.c: Remove _initialize_solib_aix prototype.
2704 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2705 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2706 * solib-frv.c: Remove _initialize_frv_solib prototype.
2707 * solib-spu.c: Remove _initialize_spu_solib prototype.
2708 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2709 * solib-target.c: Remove _initialize_solib_target prototype.
2710 * solib.c: Remove _initialize_solib prototype.
2711 * source.c: Remove _initialize_source prototype.
2712 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2713 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2714 prototype.
2715 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2716 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2717 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2718 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2719 prototype.
2720 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2721 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2722 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2723 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2724 prototype.
2725 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2726 prototype.
2727 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2728 prototype.
2729 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2730 prototype.
2731 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2732 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2733 prototype.
2734 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2735 prototype.
2736 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2737 prototype.
2738 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2739 prototype.
2740 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2741 prototype.
2742 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2743 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2744 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2745 * stabsread.c: Remove _initialize_stabsread prototype.
2746 * stack.c: Remove _initialize_stack prototype.
2747 * stap-probe.c: Remove _initialize_stap_probe prototype.
2748 * std-regs.c: Remove _initialize_frame_reg prototype.
2749 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2750 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2751 * symfile.c: Remove _initialize_symfile prototype.
2752 * symmisc.c: Remove _initialize_symmisc prototype.
2753 * symtab.c: Remove _initialize_symtab prototype.
2754 * target-dcache.c: Remove _initialize_target_dcache prototype.
2755 * target-descriptions.c: Remove _initialize_target_descriptions
2756 prototype.
2757 * thread.c: Remove _initialize_thread prototype.
2758 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2759 prototype.
2760 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2761 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2762 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2763 prototype.
2764 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2765 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2766 * tracefile.c: Remove _initialize_tracefile prototype.
2767 * tracepoint.c: Remove _initialize_tracepoint prototype.
2768 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2769 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2770 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2771 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2772 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2773 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2774 * tui/tui.c: Remove _initialize_tui prototype.
2775 * typeprint.c: Remove _initialize_typeprint prototype.
2776 * user-regs.c: Remove _initialize_user_regs prototype.
2777 * utils.c: Remove _initialize_utils prototype.
2778 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2779 * valarith.c: Remove _initialize_valarith prototype.
2780 * valops.c: Remove _initialize_valops prototype.
2781 * valprint.c: Remove _initialize_valprint prototype.
2782 * value.c: Remove _initialize_values prototype.
2783 * varobj.c: Remove _initialize_varobj prototype.
2784 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2785 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2786 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2787 * windows-nat.c: Remove _initialize_windows_nat,
2788 _initialize_check_for_gdb_ini, and _initialize_loadable
2789 prototypes.
2790 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2791 * xcoffread.c: Remove _initialize_xcoffread prototype.
2792 * xml-support.c: Remove _initialize_xml_support prototype.
2793 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2794 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2795 prototype.
2796 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2797 prototype.
2798 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2799
2800 2017-09-08 Keith Seitz <keiths@redhat.com>
2801
2802 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2803 field.
2804
2805 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2806
2807 * f-valprint.c (f_val_print): Remove check for one byte
2808 sized integers. Remove printing of character type.
2809
2810 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2811 Christoph Weinmann <christoph.t.weinmann@intel.com>
2812 Bernhard Heckel <bernhard.heckel@intel.com>
2813
2814 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2815 to maintain proper indentation when printing pointers/refs.
2816
2817 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2818
2819 GDB 8.0.1 released.
2820
2821 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2822
2823 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2824
2825 2017-09-05 Tom Tromey <tom@tromey.com>
2826
2827 * parse.c (funcall_chain): Now a std::vector.
2828 (start_arglist, end_arglist): Simplify.
2829 (free_funcalls): Remove.
2830 (parse_exp_in_context_1): Remove cleanup.
2831
2832 2017-09-05 Tom Tromey <tom@tromey.com>
2833
2834 * go-exp.y (go_parse): Don't create a cleanup.
2835
2836 2017-09-05 Tom Tromey <tom@tromey.com>
2837
2838 * d-exp.y (PrimaryExpression): Use std::string.
2839 (d_parse): Don't create a cleanup.
2840
2841 2017-09-05 Tom Tromey <tom@tromey.com>
2842
2843 * utils.c (do_clear_parser_state): Remove.
2844 (make_cleanup_clear_parser_state): Remove.
2845 * p-exp.y (pascal_parse): Use scoped_restore.
2846 * m2-exp.y (m2_parse): Use scoped_restore.
2847 * f-exp.y (f_parse): Use scoped_restore.
2848 * d-exp.y (d_parse): Use scoped_restore.
2849 * c-exp.y (c_parse): Use scoped_restore.
2850 * ada-exp.y (ada_parse): Use scoped_restore.
2851 * utils.h (make_cleanup_clear_parser_state): Remove.
2852
2853 2017-09-06 Keith Seitz <keiths@redhat.com>
2854
2855 * dwarf2read.c (dw2_linkage_name_attr): New function.
2856 (dw2_linkage_name): New function.
2857 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2858 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2859 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2860
2861 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2862
2863 * config/djgpp/djconfig.sh: Correct shell portability issue.
2864
2865 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2866
2867 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2868
2869 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2870
2871 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2872 * NEWS: Mention new FreeBSD/mips native configuration.
2873 * configure.host: Add aarch64*-*-freebsd*.
2874 * configure.nat: Likewise.
2875 * aarch64-fbsd-nat.c: New file.
2876
2877 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2878
2879 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2880 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2881 * NEWS: Mention new FreeBSD/aarch64 target.
2882 * configure.tgt: Add aarch64*-*-freebsd*.
2883 * aarch64-fbsd-tdep.c: New file.
2884 * aarch64-fbsd-tdep.h: New file.
2885
2886 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2887
2888 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2889
2890 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2891
2892 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2893 of TLS symbols.
2894
2895 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2896
2897 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2898 call.
2899
2900 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2901
2902 * infrun.c (follow_exec): Call add_thread after
2903 target_find_description.
2904
2905 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2906
2907 * infrun.c (handle_inferior_event_1): When exec'ing, read
2908 stop_pc after follow_exec.
2909
2910 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2911
2912 * remote.c (process_g_packet): Update error message.
2913
2914 2017-09-05 Yao Qi <yao.qi@linaro.org>
2915
2916 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2917 targets.
2918
2919 2017-09-05 Pedro Alves <palves@redhat.com>
2920
2921 * eval.c (eval_call, evaluate_funcall): New functions, factored
2922 out from ...
2923 (evaluate_subexp_standard): ... this.
2924
2925 2017-09-05 Yao Qi <yao.qi@linaro.org>
2926
2927 * amd64-tdep.c (amd64_target_description): Create target
2928 descriptions.
2929 (_initialize_amd64_tdep): Don't call functions
2930 initialize_tdesc_amd64_*. Add self tests.
2931 * arch/amd64.c (amd64_create_target_description): Add parameter
2932 is_linux. Call set_tdesc_osabi if is_linux is true.
2933 * arch/amd64.h (amd64_create_target_description): Update the
2934 declaration.
2935 * arch/i386.c (i386_create_target_description): Add parameter
2936 is_linux. Call set_tdesc_osabi if is_linux is true.
2937 * arch/i386.h (i386_create_target_description): Update
2938 declaration.
2939 * configure.tgt: Add i386.o to gdb_target_obs.
2940 * features/Makefile (XMLTOC): Remove i386/*.xml.
2941 * features/i386/amd64-avx-avx512.c: Remove.
2942 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2943 * features/i386/amd64-avx-mpx.c: Remove.
2944 * features/i386/amd64-avx.c: Remove.
2945 * features/i386/amd64-mpx.c: Remove.
2946 * features/i386/amd64.c: Remove.
2947 * features/i386/i386-avx-avx512.c: Remove.
2948 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2949 * features/i386/i386-avx-mpx.c: Remove.
2950 * features/i386/i386-avx.c: Remove.
2951 * features/i386/i386-mmx.c: Remove.
2952 * features/i386/i386-mpx.c: Remove.
2953 * features/i386/i386.c: Remove.
2954 * i386-tdep.c: Don't include features/i386/i386*.c., include
2955 target-descriptions.h and arch/i386.h.
2956 (i386_target_description): Create target descriptions.
2957 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2958 functions. Do self tests.
2959
2960 2017-09-05 Yao Qi <yao.qi@linaro.org>
2961
2962 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2963 * features/i386/amd64-avx-avx512-linux.c: Removed.
2964 * features/i386/amd64-avx-linux.c: Removed.
2965 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2966 * features/i386/amd64-avx-mpx-linux.c: Removed.
2967 * features/i386/amd64-linux.c: Removed.
2968 * features/i386/amd64-mpx-linux.c: Removed.
2969 * features/i386/x32-avx-avx512-linux.c: Removed.
2970 * features/i386/x32-avx-linux.c: Removed.
2971 * features/i386/x32-linux.c: Removed.
2972
2973 2017-09-05 Yao Qi <yao.qi@linaro.org>
2974
2975 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2976 features/i386/*.c.
2977 (amd64_linux_read_description): Call
2978 amd64_create_target_description.
2979 * arch/amd64.c: New file.
2980 * arch/amd64.h: New file.
2981 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2982 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2983
2984 2017-09-05 Yao Qi <yao.qi@linaro.org>
2985
2986 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2987 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2988 (amd64_linux_read_description): Create target descriptions.
2989 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2990 functions. Add unit tests.
2991 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2992 x32-core.xml.
2993 * features/i386/64bit-avx.c: Generated.
2994 * features/i386/64bit-avx512.c: Generated.
2995 * features/i386/64bit-core.c: Generated.
2996 * features/i386/64bit-linux.c: Generated.
2997 * features/i386/64bit-mpx.c: Generated.
2998 * features/i386/64bit-pkeys.c: Generated.
2999 * features/i386/64bit-segments.c: Generated.
3000 * features/i386/64bit-sse.c: Generated.
3001 * features/i386/x32-core.c: Generated.
3002 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3003 c files for amd64-linux and x32-linux.
3004
3005 2017-09-05 Yao Qi <yao.qi@linaro.org>
3006
3007 * amd64-linux-tdep.c (amd64_linux_read_description): New
3008 function.
3009 (amd64_linux_core_read_description): Call
3010 amd64_linux_read_description.
3011 (amd64_linux_init_abi): Likewise.
3012 (amd64_x32_linux_init_abi): Likewise.
3013 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3014 * x86-linux-nat.c (x86_linux_read_description): Call
3015 amd64_linux_read_description.
3016
3017 2017-09-05 Yao Qi <yao.qi@linaro.org>
3018
3019 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3020 comments.
3021
3022 2017-09-05 Yao Qi <yao.qi@linaro.org>
3023
3024 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3025 * features/i386/i386-avx-avx512-linux.c: Remove.
3026 * features/i386/i386-avx-linux.c: Remove.
3027 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3028 * features/i386/i386-avx-mpx-linux.c: Remove.
3029 * features/i386/i386-linux.c: Remove.
3030 * features/i386/i386-mmx-linux.c: Remove.
3031 * features/i386/i386-mpx-linux.c: Remove.
3032
3033 2017-09-05 Yao Qi <yao.qi@linaro.org>
3034
3035 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3036 (SFILES): Add arch/i386.c.
3037 (HFILES_NO_SRCDIR): Add arch/i386.h.
3038 * arch/i386.c: New file.
3039 * arch/i386.h: New file.
3040 * arch/tdesc.h (allocate_target_description): Declare.
3041 (set_tdesc_architecture): Declare.
3042 (set_tdesc_osabi): Declare.
3043 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3044 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3045 include arch/i386.h.
3046 (i386_linux_read_description): Remove code and call
3047 i386_create_target_description.
3048 (set_tdesc_architecture): New function.
3049 (set_tdesc_osabi): New function.
3050 * target-descriptions.h (allocate_target_description): Remove.
3051
3052 2017-09-05 Yao Qi <yao.qi@linaro.org>
3053
3054 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3055 * target-descriptions.c (tdesc_create_feature): Likewise, and
3056 adjust code.
3057 * features/i386/32bit-avx.c: Re-generated.
3058 * features/i386/32bit-avx512.c: Re-generated.
3059 * features/i386/32bit-core.c: Re-generated.
3060 * features/i386/32bit-linux.c: Re-generated.
3061 * features/i386/32bit-mpx.c: Re-generated.
3062 * features/i386/32bit-pkeys.c: Re-generated.
3063 * features/i386/32bit-sse.c: Re-generated.
3064
3065 2017-09-05 Yao Qi <yao.qi@linaro.org>
3066
3067 * regformats/regdef.h (struct reg): Override operator == and !=.
3068
3069 2017-09-05 Yao Qi <yao.qi@linaro.org>
3070
3071 * arch/tdesc.h: New file.
3072 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3073 * target-descriptions.c: Update comments.
3074 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3075 declarations.
3076 * features/i386/32bit-avx.c: Re-generated.
3077 * features/i386/32bit-avx512.c: Re-generated.
3078 * features/i386/32bit-core.c: Re-generated.
3079 * features/i386/32bit-linux.c: Re-generated.
3080 * features/i386/32bit-mpx.c: Re-generated.
3081 * features/i386/32bit-pkeys.c: Re-generated.
3082 * features/i386/32bit-sse.c: Re-generated.
3083
3084 2017-09-05 Yao Qi <yao.qi@linaro.org>
3085
3086 * regformats/regdat.sh: Update generated code.
3087
3088 2017-09-05 Yao Qi <yao.qi@linaro.org>
3089
3090 * regformats/regdat.sh: Adjust code order.
3091
3092 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3093
3094 * expprint.c (dump_subexp_body_standard): Use constant format
3095 string in fprintf_filtered call.
3096
3097 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3098
3099 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3100 NetBSD/i386.
3101 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3102
3103 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3104
3105 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3106
3107 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3108
3109 * bsd-kvm.o: Define _KMEMUSER.
3110 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3111 * configure: Regenerate.
3112
3113 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3114
3115 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3116 * i386-fbsd-nat.c: Likewise.
3117
3118 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3119
3120 * unittests/array-view-selftests.c: Add include of <array>.
3121
3122 2017-09-04 John Baldwin <jhb@FreeBSD.org>
3123
3124 * spu-tdep.c (flush_ea_cache): Add missing argument to
3125 call_function_by_hand.
3126
3127 2017-09-04 Pedro Alves <palves@redhat.com>
3128
3129 * NEWS (Safer support for debugging with no debug info): New.
3130
3131 2017-09-04 Pedro Alves <palves@redhat.com>
3132
3133 * c-exp.y (function_method, function_method_void): Add current
3134 instance flags to TYPE_INSTANCE.
3135 * dwarf2read.c (check_modifier): New.
3136 (compute_delayed_physnames): Assert that only C++ adds delayed
3137 physnames. Mark fn_fields as const/volatile depending on
3138 physname.
3139 * eval.c (make_params): New type_instance_flags parameter. Use
3140 it as the new type's instance flags.
3141 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3142 flags element and pass it to make_params.
3143 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3144 instance flags element.
3145 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3146 * gdbtypes.h: Include "enum-flags.h".
3147 (type_instance_flags): New enum-flags type.
3148 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3149 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3150 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3151 (follow_type_instance_flags): New function.
3152 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3153 * parser-defs.h (follow_type_instance_flags): Declare.
3154 * valops.c (value_struct_elt_for_reference): const/volatile must
3155 match too.
3156
3157 2017-09-04 Pedro Alves <palves@redhat.com>
3158
3159 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3160 function/method scopes; lookup the nested name as a function local
3161 static variable.
3162
3163 2017-09-04 Pedro Alves <palves@redhat.com>
3164
3165 (%type <voidval>): Add function_method.
3166 * c-exp.y (exp): New production for calls with no arguments.
3167 (function_method, function_method_void_or_typelist): New
3168 productions.
3169 (exp): New production for "method()::static_var".
3170 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3171 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3172 Handle OP_FUNC_STATIC_VAR.
3173 * parse.c (operator_length_standard):
3174 Handle OP_FUNC_STATIC_VAR.
3175
3176 2017-09-04 Pedro Alves <palves@redhat.com>
3177
3178 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3179 handling.
3180 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3181 Ditto.
3182 * parse.c (operator_length_standard, operator_check_standard):
3183 Ditto.
3184 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3185
3186 2017-09-04 Pedro Alves <palves@redhat.com>
3187
3188 * ax-gdb.c: Include "typeprint.h".
3189 (gen_expr_for_cast): New function.
3190 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3191 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3192 type is unknown.
3193 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3194 nodebug_data_symbol.
3195 * eval.c: Include "typeprint.h".
3196 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3197 Error out if symbol has unknown type.
3198 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3199 evaluate_subexp_for_cast.
3200 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3201 OP_VAR_MSYM_VALUE.
3202 (evaluate_subexp_for_cast): New function.
3203 * gdbtypes.c (init_nodebug_var_type): New function.
3204 (objfile_type): Use it to initialize types of variables with no
3205 debug info.
3206 * typeprint.c (error_unknown_type): New.
3207 * typeprint.h (error_unknown_type): New declaration.
3208 * compile/compile-c-types.c (convert_type_basic): Handle
3209 TYPE_CODE_ERROR; warn and fallback to int for variables with
3210 unknown type.
3211
3212 2017-09-04 Pedro Alves <palves@redhat.com>
3213
3214 * eval.c (evaluate_var_value): New function, factored out from ...
3215 (evaluate_subexp_standard): ... here.
3216
3217 2017-09-04 Pedro Alves <palves@redhat.com>
3218
3219 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3220 Remove useless assignments to 'op'.
3221
3222 2017-09-04 Pedro Alves <palves@redhat.com>
3223
3224 * eval.c (eval_skip_value): New function.
3225 (evaluate_subexp_standard): Use it.
3226
3227 2017-09-04 Pedro Alves <palves@redhat.com>
3228
3229 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3230 function name from symbol/minsym and pass it to
3231 error_call_unknown_return_type.
3232
3233 2017-09-04 Pedro Alves <palves@redhat.com>
3234
3235 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3236 * ax-gdb.c (gen_msym_var_ref): New function.
3237 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3238 * eval.c (evaluate_var_msym_value): New function.
3239 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3240 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3241 to call_function_by_hand.
3242 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3243 Handle OP_VAR_MSYM_VALUE.
3244 (union exp_element) <msymbol>: New field.
3245 * minsyms.h (struct type): Forward declare.
3246 (find_minsym_type_and_address): Declare.
3247 * parse.c (write_exp_elt_msym): New function.
3248 (write_exp_msymbol): Delete, refactored as ...
3249 (find_minsym_type_and_address): ... this new function.
3250 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3251 (operator_length_standard, operator_check_standard): Handle
3252 OP_VAR_MSYM_VALUE.
3253 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3254
3255 2017-09-04 Pedro Alves <palves@redhat.com>
3256
3257 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3258 TYPE_GNU_IFUNC specially here. Throw error if return type is
3259 unknown.
3260 * ada-typeprint.c (print_func_type): Handle functions with unknown
3261 return type.
3262 * c-typeprint.c (c_type_print_base): Handle functions and methods
3263 with unknown return type.
3264 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3265 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3266 * compile/compile-c-types.c: Include "objfiles.h".
3267 (convert_func): For functions with unknown return type, warn and
3268 default to int.
3269 * compile/compile-object-run.c (compile_object_run): Adjust call
3270 to call_function_by_hand_dummy.
3271 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3272 call_function_by_hand.
3273 * eval.c (evaluate_subexp_standard): Adjust calls to
3274 call_function_by_hand. Handle functions and methods with unknown
3275 return type. Pass expect_type to call_function_by_hand.
3276 * f-typeprint.c (f_type_print_base): Handle functions with unknown
3277 return type.
3278 * gcore.c (call_target_sbrk): Adjust call to
3279 call_function_by_hand.
3280 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3281 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
3282 an integer address type instead of nodebug.
3283 * guile/scm-value.c (gdbscm_value_call): Adjust call to
3284 call_function_by_hand.
3285 * infcall.c (error_call_unknown_return_type): New function.
3286 (call_function_by_hand): New "default_return_type" parameter.
3287 Pass it down.
3288 (call_function_by_hand_dummy): New "default_return_type"
3289 parameter. Use it instead of defaulting to int. If there's no
3290 default and the return type is unknown, throw an error. If
3291 there's a default return type, and the called function has no
3292 debug info, then assume the function is prototyped.
3293 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3294 New "default_return_type" parameter.
3295 (error_call_unknown_return_type): New declaration.
3296 * linux-fork.c (call_lseek): Cast return type of lseek.
3297 (inferior_call_waitpid, checkpoint_command): Adjust calls to
3298 call_function_by_hand.
3299 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3300 calls to call_function_by_hand.
3301 * m2-typeprint.c (m2_procedure): Handle functions with unknown
3302 return type.
3303 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3304 (value_nsstring, print_object_command): Adjust calls to
3305 call_function_by_hand.
3306 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3307 functions with unknown return type.
3308 (pascal_type_print_func_varspec_suffix): New function.
3309 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3310 TYPE_CODE_METHOD>: Use it.
3311 * python/py-value.c (valpy_call): Adjust call to
3312 call_function_by_hand.
3313 * rust-lang.c (rust_evaluate_funcall): Adjust call to
3314 call_function_by_hand.
3315 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3316 call_function_by_hand.
3317 * valops.c (value_allocate_space_in_inferior): Adjust call to
3318 call_function_by_hand.
3319 * typeprint.c (type_print_unknown_return_type): New function.
3320 * typeprint.h (type_print_unknown_return_type): New declaration.
3321
3322 2017-09-04 Pedro Alves <palves@redhat.com>
3323
3324 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3325 types with more than one parameter as prototyped.
3326
3327 2017-09-04 Pedro Alves <palves@redhat.com>
3328
3329 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3330 (disassemble_command): Use gdb_disassembly_flags instead of bare
3331 int.
3332 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3333 (dump_insns, do_mixed_source_and_assembly_deprecated)
3334 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3335 Use gdb_disassembly_flags instead of bare int.
3336 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3337 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3338 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3339 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
3340 (enum gdb_disassembly_flag): ... values of this new enumeration.
3341 (gdb_disassembly_flags): Define.
3342 (gdb_disassembly)
3343 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3344 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3345 gdb_disassembly_flags instead of bare int.
3346 * record-btrace.c (btrace_insn_history)
3347 (record_btrace_insn_history, record_btrace_insn_history_range)
3348 (record_btrace_insn_history_from): Use gdb_disassembly_flags
3349 instead of bare int.
3350 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3351 Use gdb_disassembly_flags instead of bare int.
3352 * target-debug.h (target_debug_print_gdb_disassembly_flags):
3353 Define.
3354 * target-delegates.c: Regenerate.
3355 * target.c (target_insn_history, target_insn_history_from)
3356 (target_insn_history_range): Use gdb_disassembly_flags instead of
3357 bare int.
3358 * target.h: Include "disasm.h".
3359 (struct target_ops) <to_insn_history, to_insn_history_from,
3360 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3361 int.
3362 (target_insn_history, target_insn_history_from)
3363 (target_insn_history_range): Use gdb_disassembly_flags instead of
3364 bare int.
3365
3366 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3367
3368 * cli/cli-script.c (build_command_line): For if/while commands,
3369 check whether args is empty.
3370
3371 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3372
3373 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3374 (enum command_control_type): Likewise.
3375 (struct command_line): Likewise.
3376 (free_command_lines): Likewise.
3377 (struct command_lines_deleter): Likewise.
3378 (command_line_up): Likewise.
3379 (read_command_lines): Likewise.
3380 (read_command_lines_1): Likewise.
3381 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3382 (enum command_control_type): Likewise.
3383 (struct command_line): Likewise.
3384 (free_command_lines): Likewise.
3385 (struct command_lines_deleter): Likewise.
3386 (command_line_up): Likewise.
3387 (read_command_lines): Likewise.
3388 (read_command_lines_1): Likewise.
3389 * breakpoint.h: Include cli/cli-script.h.
3390 * extension-priv.h: Likewise.
3391 * gdbcmd.h: Likewise.
3392
3393 2017-09-04 Pedro Alves <palves@redhat.com>
3394
3395 * ada-lang.c (is_known_support_routine): Move sal declaration to
3396 where it is initialized.
3397 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3398 (parse_breakpoint_sals, decode_static_tracepoint_spec)
3399 (clear_command, update_static_tracepoint): Remove init_sal
3400 references. Move declarations closer to initializations.
3401 * cli/cli-cmds.c (list_command): Move sal declarations closer to
3402 initializations.
3403 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3404 references. Move sal declarations closer to initializations.
3405 * frame.c (find_frame_sal): Return a symtab_and_line via function
3406 return instead of output parameter. Remove init_sal references.
3407 * frame.h (find_frame_sal): Return a symtab_and_line via function
3408 return instead of output parameter.
3409 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3410 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3411 instead of memset.
3412 (gdbscm_find_pc_line): Remove init_sal reference.
3413 * infcall.c (call_function_by_hand_dummy): Remove init_sal
3414 references. Move declarations closer to initializations.
3415 * infcmd.c (set_step_frame): Update. Move declarations closer to
3416 initializations.
3417 (finish_backward): Remove init_sal references. Move declarations
3418 closer to initializations.
3419 * infrun.c (process_event_stop_test, handle_step_into_function)
3420 (insert_hp_step_resume_breakpoint_at_frame)
3421 (insert_step_resume_breakpoint_at_caller): Likewise.
3422 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3423 (symbol_to_sal): Likewise.
3424 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3425 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3426 to its initialization.
3427 * reverse.c (save_bookmark_command): Use new/delete. Remove
3428 init_sal references. Move declarations closer to initializations.
3429 * source.c (get_current_source_symtab_and_line): Remove brace
3430 initialization.
3431 (set_current_source_symtab_and_line): Now takes the sal by const
3432 reference. Remove brace initialization.
3433 (line_info): Remove init_sal reference.
3434 * source.h (set_current_source_symtab_and_line): Now takes a
3435 symtab_and_line via const reference.
3436 * stack.c (set_current_sal_from_frame): Adjust.
3437 (print_frame_info): Adjust.
3438 (get_last_displayed_sal): Return the sal via function return
3439 instead of via output parameter. Simplify.
3440 (frame_info): Adjust.
3441 * stack.h (get_last_displayed_sal): Return the sal via function
3442 return instead of via output parameter.
3443 * symtab.c (init_sal): Delete.
3444 (find_pc_sect_line): Remove init_sal references. Move
3445 declarations closer to initializations.
3446 (find_function_start_sal): Remove init_sal references. Move
3447 declarations closer to initializations.
3448 * symtab.h (struct symtab_and_line): In-class initialize all
3449 fields.
3450 * tracepoint.c (set_traceframe_context)
3451 (print_one_static_tracepoint_marker): Remove init_sal references.
3452 Move declarations closer to initializations.
3453 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3454 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
3455 declarations closer to initializations.
3456 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3457 init_sal references. Adjust.
3458
3459 2017-09-04 Pedro Alves <palves@redhat.com>
3460
3461 * ax-gdb.c (agent_command_1): Use range-for.
3462 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3463 * breakpoint.c: Include "common/array-view.h".
3464 (init_breakpoint_sal, create_breakpoint_sal): Change sals
3465 parameter from struct symtabs_and_lines to
3466 array_view<symtab_and_line>. Adjust. Use range-for. Update.
3467 (breakpoint_sals_to_pc): Change sals parameter from struct
3468 symtabs_and_lines to std::vector reference.
3469 (check_fast_tracepoint_sals): Change sals parameter from struct
3470 symtabs_and_lines to std::array_view. Use range-for.
3471 (decode_static_tracepoint_spec): Return a std::vector instead of
3472 symtabs_and_lines. Update.
3473 (create_breakpoint): Update.
3474 (break_range_command, until_break_command, clear_command): Update.
3475 (base_breakpoint_decode_location, bkpt_decode_location)
3476 (bkpt_probe_create_sals_from_location)
3477 (bkpt_probe_decode_location, tracepoint_decode_location)
3478 (tracepoint_probe_decode_location)
3479 (strace_marker_create_sals_from_location): Return a std::vector
3480 instead of symtabs_and_lines.
3481 (strace_marker_create_breakpoints_sal): Update.
3482 (strace_marker_decode_location): Return a std::vector instead of
3483 symtabs_and_lines. Update.
3484 (update_breakpoint_locations): Change struct symtabs_and_lines
3485 parameters to gdb::array_view. Adjust.
3486 (location_to_sals): Return a std::vector instead of
3487 symtabs_and_lines. Update.
3488 (breakpoint_re_set_default): Use std::vector instead of struct
3489 symtabs_and_lines.
3490 (decode_location_default): Return a std::vector instead of
3491 symtabs_and_lines. Update.
3492 * breakpoint.h: Include "common/array-view.h".
3493 (struct breakpoint_ops) <decode_location>: Now returns a
3494 std::vector instead of returning a symtabs_and_lines via output
3495 parameter.
3496 (update_breakpoint_locations): Change sals parameters to use
3497 gdb::array_view.
3498 * cli/cli-cmds.c (edit_command, list_command): Update to use
3499 std::vector and gdb::array_view.
3500 (ambiguous_line_spec): Adjust to use gdb::array_view and
3501 range-for.
3502 (compare_symtabs): Rename to ...
3503 (cmp_symtabs): ... this. Change parameters to symtab_and_line
3504 const reference and adjust.
3505 (filter_sals): Rewrite using std::vector and standard algorithms.
3506 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3507 (jump_command): Update to use std::vector.
3508 * linespec.c (struct linespec_state) <canonical_names>: Update
3509 comment.
3510 (add_sal_to_sals_basic): Delete.
3511 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3512 (decode_line_2, create_sals_line_offset)
3513 (convert_address_location_to_sals, convert_linespec_to_sals)
3514 (convert_explicit_location_to_sals, parse_linespec)
3515 (event_location_to_sals, decode_line_full, decode_line_1)
3516 (decode_line_with_current_source)
3517 (decode_line_with_last_displayed, decode_objc)
3518 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3519 (linespec_result::~linespec_result): Adjust to use std::vector
3520 instead of symtabs_and_lines.
3521 * linespec.h (linespec_sals::sals): Now a std::vector.
3522 (struct linespec_result): Use std::vector, bool, and in-class
3523 initialization.
3524 (decode_line_1, decode_line_with_current_source)
3525 (decode_line_with_last_displayed): Return std::vector.
3526 * macrocmd.c (info_macros_command): Use std::vector.
3527 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3528 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3529 std::vector.
3530 * probe.h (parse_probes): Return a std::vector.
3531 * python/python.c (gdbpy_decode_line): Use std::vector and
3532 gdb::array_view.
3533 * source.c (select_source_symtab, line_info): Use std::vector.
3534 * stack.c (func_command): Use std::vector.
3535 * symtab.h (struct symtabs_and_lines): Delete.
3536 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3537
3538 2017-09-04 Pedro Alves <palves@redhat.com>
3539
3540 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3541 unittests/array-view-selftests.c.
3542 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3543 * common/array-view.h: New file.
3544 * unittests/array-view-selftests.c: New file.
3545
3546 2017-09-04 Pedro Alves <palves@redhat.com>
3547
3548 * cli/cli-cmds.c (edit_command): Pass message to
3549 ambiguous_line_spec.
3550 (list_command): Pass message to ambiguous_line_spec. Say
3551 "first"/"last" instead of "start" and "end" to be consistent with
3552 the manual.
3553 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3554 them to print formatted message.
3555
3556 2017-09-04 Pedro Alves <palves@redhat.com>
3557
3558 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3559 ftrace_update_insns by reference instead of pointer.
3560
3561 2017-09-04 Yao Qi <yao.qi@linaro.org>
3562
3563 * i386-go32-tdep.c: Include x86-xstate.h.
3564 (i386_go32_init_abi): Call i386_target_description.
3565 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3566 if xcr0 is X86_XSTATE_X87_MASK.
3567 * i386-tdep.h (tdesc_i386): Remove the declaration.
3568 (tdesc_i386_mmx): Likewise.
3569
3570 2017-09-04 Yao Qi <yao.qi@linaro.org>
3571
3572 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3573 X86_XSTATE_SSE_MASK instead of 0.
3574
3575 2017-09-04 Yao Qi <yao.qi@linaro.org>
3576
3577 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3578 i386_target_description.
3579 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3580 i386_target_description.
3581 * i386-tdep.c (i386_gdbarch_init): Likewise.
3582
3583 2017-09-04 Yao Qi <yao.qi@linaro.org>
3584
3585 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3586 (x86_darwin_init_abi_64): Call amd64_target_description.
3587 * amd64-dicos-tdep.c: Likewise.
3588 * amd64-fbsd-nat.c: Likewise.
3589 * amd64-fbsd-tdep.c: Likewise.
3590 * amd64-nbsd-tdep.c: Likewise.
3591 * amd64-obsd-tdep.c: Likewise.
3592 * amd64-sol2-tdep.c: Likewise.
3593 * amd64-windows-tdep.c: Likewise.
3594 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3595
3596 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3597
3598 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3599 (btrace_function) <insn>: Change type to use std::vector.
3600 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3601 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3602 ftrace_update_insns, ftrace_compute_global_level_offset,
3603 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3604 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3605 change to std::vector.
3606 (ftrace_update_insns): Adjust to change to std::vector, change
3607 type of INSN parameter.
3608 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3609 * record-btrace.c (btrace_call_history_insn_range,
3610 btrace_compute_src_line_range,
3611 record_btrace_frame_prev_register): Adjust to change to
3612 std::vector.
3613 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3614 to change to std::vector.
3615
3616 2017-09-03 Tom Tromey <tom@tromey.com>
3617
3618 * corefile.c (reopen_exec_file): Use std::string.
3619
3620 2017-09-03 Tom Tromey <tom@tromey.com>
3621
3622 * compile/compile.c (compile_register_name_mangled): Return
3623 std::string.
3624 * compile/compile-loc2c.c (pushf_register_address): Update.
3625 (pushf_register): Update.
3626 * compile/compile-c-types.c (convert_array): Update.
3627 * compile/compile-c-symbols.c (generate_vla_size): Update.
3628 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3629 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3630 (convert_one_symbol): Update.
3631 (generate_c_for_for_one_variable): Update.
3632 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3633 std::string.
3634 (generate_register_struct): Update.
3635 * compile/compile-internal.h (c_get_range_decl_name): Return a
3636 std::string.
3637 (compile_register_name_mangled): Return std::string.
3638
3639 2017-09-03 Tom Tromey <tom@tromey.com>
3640
3641 * utils.c (perror_string): Return a std::string.
3642 (throw_perror_with_name, perror_warning_with_name): Update.
3643
3644 2017-09-03 Tom Tromey <tom@tromey.com>
3645
3646 * demangle.c (demangle_command): Use std::string,
3647 unique_xmalloc_ptr.
3648
3649 2017-09-03 Tom Tromey <tom@tromey.com>
3650
3651 * cli/cli-setshow.c (do_set_command): Use std::string.
3652
3653 2017-09-03 Tom Tromey <tom@tromey.com>
3654
3655 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3656
3657 2017-09-03 Tom Tromey <tom@tromey.com>
3658
3659 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3660
3661 2017-09-03 Tom Tromey <tom@tromey.com>
3662
3663 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3664 gdb::unique_xmalloc_ptr.
3665
3666 2017-09-03 Tom Tromey <tom@tromey.com>
3667
3668 * thread.c (print_thread_info_1): Use string_printf.
3669 (thread_apply_command, thread_apply_all_command): Use
3670 std::string.
3671
3672 2017-09-03 Tom Tromey <tom@tromey.com>
3673
3674 * valprint.c (val_print_string): Update.
3675 * gdbcore.h (memory_error_message): Return std::string.
3676 * corefile.c (memory_error_message): Return std::string.
3677 (memory_error): Update.
3678 * breakpoint.c (insert_bp_location): Update.
3679
3680 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3681
3682 * target/waitstatus.h (target_waitstatus_to_string): Change
3683 return type to std::string.
3684 * target/waitstatus.c (target_waitstatus_to_string): Return
3685 std::string.
3686 * target.h (target_waitstatus_to_string): Remove declaration.
3687 * infrun.c (resume, clear_proceed_status_thread,
3688 print_target_wait_results, do_target_wait, save_waitstatus,
3689 stop_all_threads): Adjust.
3690 * record-btrace.c (record_btrace_wait): Adjust.
3691 * target-debug.h
3692 (target_debug_print_struct_target_waitstatus_p): Adjust.
3693
3694 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3695
3696 PR gdb/22046
3697 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3698 detection.
3699
3700 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3701
3702 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3703 for setting/unsetting environment variables on the remote target.
3704 (New remote packets): Add entries for QEnvironmentHexEncoded,
3705 QEnvironmentUnset and QEnvironmentReset.
3706 * common/environ.c (gdb_environ::operator=): Extend method to
3707 handle m_user_set_env_list and m_user_unset_env_list.
3708 (gdb_environ::clear): Likewise.
3709 (match_var_in_string): Change type of first parameter from 'char
3710 *' to 'const char *'.
3711 (gdb_environ::set): Extend method to handle
3712 m_user_set_env_list and m_user_unset_env_list.
3713 (gdb_environ::unset): Likewise.
3714 (gdb_environ::clear_user_set_env): New method.
3715 (gdb_environ::user_set_envp): Likewise.
3716 (gdb_environ::user_unset_envp): Likewise.
3717 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3718 m_user_unset_env_list on move constructor/assignment.
3719 (unset): Add new default parameter 'update_unset_list = true'.
3720 (clear_user_set_env): New method.
3721 (user_set_envp): Likewise.
3722 (user_unset_envp): Likewise.
3723 (m_user_set_env_list): New std::set.
3724 (m_user_unset_env_list): Likewise.
3725 * common/rsp-low.c (hex2str): New function.
3726 (bin2hex): New overload for bin2hex function.
3727 * common/rsp-low.c (hex2str): New prototype.
3728 (str2hex): New overload prototype.
3729 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3730 QEnvironmentUnset and QEnvironmentReset.
3731 (remote_protocol_features): Add QEnvironmentHexEncoded,
3732 QEnvironmentUnset and QEnvironmentReset packets.
3733 (send_environment_packet): New function.
3734 (extended_remote_environment_support): Likewise.
3735 (extended_remote_create_inferior): Call
3736 extended_remote_environment_support.
3737 (_initialize_remote): Add QEnvironmentHexEncoded,
3738 QEnvironmentUnset and QEnvironmentReset packet configs.
3739 * unittests/environ-selftests.c (gdb_selftest_env_var):
3740 New variable.
3741 (test_vector_initialization): New function.
3742 (test_init_from_host_environ): Likewise.
3743 (test_reinit_from_host_environ): Likewise.
3744 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3745 Likewise.
3746 (test_unset_set_empty_vector): Likewise.
3747 (test_vector_clear): Likewise.
3748 (test_std_move): Likewise.
3749 (test_move_constructor):
3750 (test_self_move): Likewise.
3751 (test_set_unset_reset): Likewise.
3752 (run_tests): Rewrite in terms of the functions above.
3753
3754 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
3755
3756 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3757 (adi_available): Use a temp variable of type CORE_ADDR as argument
3758 3 when calling target_auxv_search.
3759 (adi_normalize_address): Use masks and xor operators to calculate
3760 normalized address.
3761 (adi_read_versions, adi_write_versions, adi_print_versions)
3762 (do_examine, do_assign): Use paddress.
3763
3764 2017-08-29 John Baldwin <jhb@FreeBSD.org>
3765
3766 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3767 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3768 out of loop and add supply of FIR.
3769 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3770 add collect of FIR.
3771
3772 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3773
3774 PR gdb/21827
3775 * cli/cli-script.c (define_command): Don't convert command name
3776 to lower case.
3777
3778 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3779
3780 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3781 Update all callers accordingly. Remove all code blocks handling
3782 the case where DISPP is not NULL.
3783
3784 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3785
3786 PR symtab/22003
3787 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3788 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3789 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3790
3791 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3792
3793 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3794 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3795 (read_comp_units_from_section): New parameter abbrev_section, use
3796 read_and_check_comp_unit_head, allocate signatured_type if needed.
3797 (create_all_comp_units): Update read_comp_units_from_section caller.
3798
3799 2017-08-23 Pedro Alves <palves@redhat.com>
3800
3801 PR remote/21852
3802 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3803 to null_ptid and switch to thread without reading the registers
3804 after adding the inferior.
3805
3806 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3807
3808 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3809 compile-gcc.
3810 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3811 (compile_to_object): Implement compile_gcc.
3812 (_initialize_compile): Install "set compile-gcc". Initialize
3813 compile_gcc.
3814
3815 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3816
3817 * compile/compile.c (compile_to_object): Conditionally call
3818 set_verbose. Conditionally call compile or compile_v0.
3819
3820 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3821
3822 * sparc64-tdep.h: (adi_normalize_address): New export.
3823 * sparc-nat.h: (open_adi_tag_fd): New export.
3824 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3825 * sparc64-linux-tdep.c:
3826 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3827 (sparc64_linux_handle_segmentation_fault): New function.
3828 (sparc64_linux_init_abi): Register
3829 sparc64_linux_handle_segmentation_fault
3830 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3831 (sparc64_addr_bits_remove): New function.
3832 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3833 (MAX_PROC_NAME_SIZE): New macro.
3834 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3835 (sparc64adilist): New variable.
3836 (adi_proc_list): New variable.
3837 (find_adi_info): New function.
3838 (add_adi_info): New function.
3839 (get_adi_info_proc): New function.
3840 (get_adi_info): New function.
3841 (info_adi_command): New function.
3842 (read_maps_entry): New function.
3843 (adi_available): New function.
3844 (adi_normalize_address): New function.
3845 (adi_align_address): New function.
3846 (adi_convert_byte_count): New function.
3847 (adi_tag_fd): New function.
3848 (adi_is_addr_mapped): New function.
3849 (adi_read_versions): New function.
3850 (adi_write_versions): New function.
3851 (adi_print_versions): New function.
3852 (do_examine): New function.
3853 (do_assign): New function.
3854 (adi_examine_command): New function.
3855 (adi_assign_command): New function.
3856 (_initialize_sparc64_adi_tdep): New function.
3857
3858 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3859
3860 * breakpoint.c (breakpoints_info): Rename to ...
3861 (info_breakpoints_command): ... this.
3862 (watchpoints_info): Rename to ...
3863 (info_watchpoints_command): ... this.
3864 (tracepoints_info): Rename to ...
3865 (info_tracepoints_command): ... this.
3866 (_initialize_breakpoint): Adjust.
3867 * dcache.c (dcache_info): Rename to ...
3868 (info_display_command): ... this.
3869 (_initialize_dcache): Adjust.
3870 * frame.h (args_info): Rename to ...
3871 (info_args_command): ... this.
3872 (locals_info): Rename to ...
3873 (info_locals_command): ... this.
3874 * infcmd.c (nofp_registers_info): Rename to ...
3875 (info_registers_command): ... this.
3876 (float_info): Rename to ...
3877 (info_float_command): ... this.
3878 (program_info): Rename to ...
3879 (info_program_command): ... this.
3880 (all_registers_info): Rename to ...
3881 (info_all_registers_command): ... this.
3882 (vector_info): Rename to ...
3883 (info_vector_command): ... this.
3884 (float_info): Rename to ...
3885 (info_float_command): ... this.
3886 (_initialize_infcmd): Adjust.
3887 * inferior.h (term_info): Rename to ...
3888 (info_terminal_command): ... this.
3889 * inflow.c (term_info): Rename to ...
3890 (info_terminal_command): ... this.
3891 (_initialize_inflow): Adjust.
3892 * infrun.c (signals_info): Rename to ...
3893 (info_signals_command): ... this.
3894 (_initialize_infrun): Adjust.
3895 * objc-lang.c (classes_info): Rename to ...
3896 (info_classes_command): ... this.
3897 (selectors_info): Rename to ...
3898 (info_selectors_command): ... this.
3899 (_initialize_objc_language): Adjust.
3900 * printcmd.c (sym_info): Rename to ...
3901 (info_symbol_command): ... this.
3902 (address_info): Rename to ...
3903 (info_address_command): ... this.
3904 (display_info): Rename to ...
3905 (info_display_command): ... this.
3906 (_initialize_printcmd): Adjust.
3907 * reverse.c (bookmarks_info): Rename to ...
3908 (info_breakpoints_command): ... this.
3909 (_initialize_reverse): Adjust.
3910 * ser-go32.c (dos_info): Rename to ...
3911 (info_serial_command): ... this.
3912 (_initialize_ser_dos): Adjust.
3913 * skip.c (skip_info): Rename to ...
3914 (info_skip_command): ... this.
3915 (_initialize_step_skip): Adjust.
3916 * source.c (line_info): Rename to ...
3917 (info_line_command): ... this.
3918 (source_info): Rename to ...
3919 (info_source_command)
3920 * stack.c (frame_info): Rename to ...
3921 (info_frame_command): ... this.
3922 (locals_info): Rename to ...
3923 (info_locals_command): ... this.
3924 (args_info): Rename to ...
3925 (info_args_command): ... this.
3926 (_initialize_stack): Adjust.
3927 * symtab.c (sources_info): Rename to ...
3928 (info_sources_command): ... this.
3929 (variables_info): Rename to ...
3930 (info_variables_command): ... this.
3931 (functions_info): Rename to ...
3932 (info_functions_command): ... this.
3933 (types_info): Rename to ...
3934 (info_types_command): ... this.
3935 (_initialize_symtab): Adjust.
3936 * target.c (target_info): Rename to ...
3937 (info_target_command): ... this.
3938 (initialize_targets): Adjust.
3939 * tracepoint.c (tvariables_info): Rename to ...
3940 (info_tvariables_command): ... this.
3941 (scope_info): Rename to ...
3942 (info_scope_command): ... this.
3943 (trace_dump_actions): Adjust.
3944 (_initialize_tracepoint): Adjust.
3945
3946 2017-08-22 Tom Tromey <tom@tromey.com>
3947
3948 * breakpoint.h (install_breakpoint): Update.
3949 * breakpoint.c (add_solib_catchpoint): Update.
3950 (install_breakpoint): Change argument to a std::unique_ptr.
3951 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3952 (create_breakpoint_sal, create_breakpoint): Update.
3953 (watch_command_1, catch_exec_command_1)
3954 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3955 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3956 Return the breakpoint.
3957 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3958 (new_single_step_breakpoint): Update.
3959 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3960 std::unique_ptr.
3961 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3962 std::unique_ptr.
3963 * break-catch-sig.c (create_signal_catchpoint): Use
3964 std::unique_ptr.
3965 * ada-lang.c (create_ada_exception_catchpoint): Use
3966 std::unique_ptr.
3967
3968 2017-08-22 Tom Tromey <tom@tromey.com>
3969
3970 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3971
3972 2017-08-22 Tom Tromey <tom@tromey.com>
3973
3974 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3975 (lookup_partial_symbol): Update.
3976
3977 2017-08-22 Tom Tromey <tom@tromey.com>
3978
3979 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3980 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3981 (find_and_open_source, symtab_to_fullname): Update.
3982 * psymtab.c (psymtab_to_fullname): Update.
3983
3984 2017-08-22 Tom Tromey <tom@tromey.com>
3985
3986 * exec.c (exec_file_attach): Update.
3987 * linux-thread-db.c (try_thread_db_load): Update.
3988 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3989 * utils.c (gdb_realpath): Change return type.
3990 (gdb_realpath_keepfile): Update.
3991 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3992 (_initialize_utils): Register the new self test.
3993 * source.c (openp): Update.
3994 (find_and_open_source): Update.
3995 * nto-tdep.c (nto_find_and_open_solib): Update.
3996 * main.c (set_gdb_data_directory): Update.
3997 (captured_main_1): Update.
3998 * dwarf2read.c (dwarf2_get_dwz_file): Update
3999 (dw2_map_symbol_filenames): Update.
4000 * auto-load.c (auto_load_safe_path_vec_update): Update.
4001 (filename_is_in_auto_load_safe_path_vec): Change type of
4002 "filename_realp".
4003 (auto_load_objfile_script): Update.
4004 (file_is_auto_load_safe): Update. Use std::string.
4005 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4006
4007 2017-08-22 Tom Tromey <tom@tromey.com>
4008
4009 * utils.c (gdb_realpath_keepfile): Return a
4010 gdb::unique_xmalloc_ptr.
4011 * exec.c (exec_file_attach): Update.
4012 * utils.h (gdb_realpath_keepfile): Return a
4013 gdb::unique_xmalloc_ptr.
4014
4015 2017-08-22 Tom Tromey <tom@tromey.com>
4016
4017 * compile/compile.c (compile_file_command): Use
4018 gdb::unique_xmalloc_ptr, std::string.
4019 * utils.c (gdb_abspath): Change return type.
4020 * source.c (openp): Update.
4021 * objfiles.c (allocate_objfile): Update.
4022 * main.c (set_gdb_data_directory): Update.
4023 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4024
4025 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
4026
4027 * cli-cmds.c (list_commands): List actual code around more than
4028 one location.
4029
4030 2017-08-21 John Baldwin <jhb@FreeBSD.org>
4031
4032 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4033
4034 2017-08-21 Pedro Alves <palves@redhat.com>
4035
4036 PR gdb/19487
4037 * c-exp.y (variable production): Handle function aliases.
4038 * minsyms.c (msymbol_is_text): New function.
4039 * minsyms.h (msymbol_is_text): Declare.
4040 * symtab.c (find_function_alias_target): New function.
4041 * symtab.h (find_function_alias_target): Declare.
4042
4043 2017-08-21 Pedro Alves <palves@redhat.com>
4044
4045 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4046 typedefs.
4047 * typeprint.c (whatis_exp): If handling "whatis", and expression
4048 is OP_TYPE, strip one typedef level. Otherwise don't strip
4049 typedefs here.
4050 * valops.c (value_cast): Save "to" type before resolving
4051 stubs/typedefs. Use that type as resulting value's type.
4052
4053 2017-08-18 Tom Tromey <tom@tromey.com>
4054 Pedro Alves <palves@redhat.com>
4055
4056 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4057 * sol-thread.c (sol_thread_resume, sol_thread_wait)
4058 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4059 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4060 * proc-service.c (ps_xfer_memory): Use scoped_restore.
4061 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4062 (linux_get_siginfo_data): Add "thread" argument. Use
4063 scoped_restore.
4064 * linux-nat.c (linux_child_follow_fork)
4065 (check_stopped_by_watchpoint): Use scoped_restore.
4066 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4067 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4068 (restore_inferior_ptid, save_inferior_ptid): Remove.
4069 * btrace.c (btrace_fetch): Use scoped_restore.
4070 * bsd-uthread.c (bsd_uthread_fetch_registers)
4071 (bsd_uthread_store_registers): Use scoped_restore.
4072 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4073 scoped_restore.
4074 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4075 (aix_thread_xfer_partial): Use scoped_restore.
4076 * inferior.h (save_inferior_ptid): Remove.
4077
4078 2017-08-18 Yao Qi <yao.qi@linaro.org>
4079
4080 PR tdep/21818
4081 * arm-tdep.c (gdb_print_insn_arm): Mark
4082 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4083
4084 2017-08-18 Yao Qi <yao.qi@linaro.org>
4085
4086 * NEWS: Mention GDBserver's new option "--selftest".
4087 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4088 * selftest.c: Move it to common/selftest.c.
4089 * selftest.h: Move it to common/selftest.h.
4090 * selftest-arch.c (reset): New function.
4091 (tests_with_arch): Call reset.
4092
4093 2017-08-18 Yao Qi <yao.qi@linaro.org>
4094
4095 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4096 instead of exception_fprintf and printf_filtered.
4097
4098 2017-08-18 Yao Qi <yao.qi@linaro.org>
4099
4100 * selftest.c (register_self_test): Rename it to
4101 selftests::register_test.
4102 (run_self_tests): selftest::run_tests.
4103 * selftest.h: Update declarations.
4104 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4105 selftests::register_test_foreach_arch.
4106 * selftest-arch.h: Update declaration.
4107 * aarch64-tdep.c: Update.
4108 * arm-tdep.c: Likewise.
4109 * disasm-selftests.c: Likewise.
4110 * dwarf2loc.c: Likewise.
4111 * dwarf2-frame.c: Likewise.
4112 * findvar.c: Likewise.
4113 * gdbarch-selftests.c: Likewise.
4114 * maint.c (maintenance_selftest): Likewise.
4115 * regcache.c: Likewise.
4116 * rust-exp.y: Likewise.
4117 * selftest-arch.c: Likewise.
4118 * unittests/environ-selftests.c: Likewise.
4119 * unittests/function-view-selftests.c: Likewise.
4120 * unittests/offset-type-selftests.c: Likewise.
4121 * unittests/optional-selftests.c: Likewise.
4122 * unittests/scoped_restore-selftests.c: Likewise.
4123 * utils-selftests.c: Likewise.
4124
4125 2017-08-17 Pedro Alves <palves@redhat.com>
4126
4127 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4128 local.
4129
4130 2017-08-17 Pedro Alves <palves@redhat.com>
4131
4132 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4133 field.
4134 (reset_die_in_process): Delete, replaced by ...
4135 (process_die_scope): ... this new class. Make it responsible for
4136 freeing cu->line_header too.
4137 (process_die): Use process_die_scope.
4138 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4139 cu->line_header_die_owner. Don't release the line header if it's
4140 owned by the CU.
4141 (setup_type_unit_groups): Make the CU/DIE own the line header.
4142 Don't release the line header here.
4143
4144 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4145
4146 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4147
4148 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4149
4150 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4151 Single-Key mode
4152
4153 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4154
4155 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4156 mode command list.
4157
4158 2017-08-15 Stafford Horne <shorne@gmail.com>
4159
4160 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4161
4162 2017-08-15 Stafford Horne <shorne@gmail.com>
4163
4164 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4165
4166 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4167
4168 PR gdb/21954
4169 * infcmd.c (unset_environment_command): Use the 'clear' method on
4170 the environment instead of resetting it.
4171
4172 2017-08-15 John Baldwin <jhb@FreeBSD.org>
4173
4174 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4175 platforms.
4176
4177 2017-08-14 Tom Tromey <tom@tromey.com>
4178
4179 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4180 (print_binary_chars): Likewise.
4181 (BITS_IN_BYTES): Remove.
4182
4183 2017-08-14 Tom Tromey <tom@tromey.com>
4184
4185 PR gdb/21675
4186 * valprint.c (LOW_ZERO): Change value to 034.
4187 (print_octal_chars): Add static_asserts for octal constants.
4188 * printcmd.c (print_scalar_formatted): Add 'd' case.
4189
4190 2017-08-11 Tom Tromey <tom@tromey.com>
4191
4192 * symfile.c (add_symbol_file_command): Use std::vector.
4193
4194 2017-08-14 Tom Tromey <tom@tromey.com>
4195
4196 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4197 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4198 std::move.
4199 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4200
4201 2017-08-11 Pedro Alves <palves@redhat.com>
4202
4203 * infrun.c (process_event_stop_test): Adjust
4204 function_name_is_marked_for_skip call.
4205 * skip.c: Include <list>.
4206 (skiplist_entry): Make it a class with private fields, and
4207 getters/setters.
4208 (skiplist_entry_chain): Delete.
4209 (skiplist_entries): New.
4210 (skiplist_entry_count): Delete.
4211 (highest_skiplist_entry_num): New.
4212 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4213 (add_skiplist_entry): Delete.
4214 (skiplist_entry::skiplist_entry): New.
4215 (skiplist_entry::add_entry): New.
4216 (skip_file_command, skip_function): Adjust.
4217 (compile_skip_regexp): Delete.
4218 (skip_command): Don't compile regexp here. Adjust to use
4219 skiplist_entry::add_entry.
4220 (skip_info): Adjust to use range-for and getters.
4221 (skip_enable_command, skip_disable_command): Adjust to use
4222 range-for and setters.
4223 (skip_delete_command): Adjust to use std::list.
4224 (add_skiplist_entry): Delete.
4225 (skip_file_p): Delete, refactored as ...
4226 (skiplist_entry::do_skip_file_p): ... this new method.
4227 (skip_gfile_p): Delete, refactored as ...
4228 (skiplist_entry::do_gskip_file_p): ... this new method.
4229 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4230 (skiplist_entry::skip_function_p): ... this new method.
4231 (function_name_is_marked_for_skip): Now returns bool, and takes
4232 the function sal by const reference. Adjust to use range-for and
4233 skiplist_entry methods.
4234 (_initialize_step_skip): Remove references to
4235 skiplist_entry_chain, skiplist_entry_count.
4236 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4237 takes the function sal by const reference.
4238
4239 2017-08-11 Yao Qi <yao.qi@linaro.org>
4240
4241 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4242 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4243 (dwarf2_frame_cache):
4244 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4245 RETURN_MASK_ALL and set *this_case to NULL.
4246 * frame-unwind.h: Update comments.
4247
4248 2017-08-11 Yao Qi <yao.qi@linaro.org>
4249
4250 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4251 (dwarf2_frame_state_copy_regs): Remove.
4252 (dwarf2_frame_state_free_regs): Remove.
4253 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4254 (dwarf2_restore_rule): Call method .alloc_regs instead of
4255 dwarf2_frame_state_alloc_regs.
4256 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4257 constructor. Call std::move.
4258 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4259 (dwarf2_frame_cache): Likewise.
4260
4261 [GDB_SELF_TEST]: Include selftest.h and
4262 selftest-arch.h.
4263 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4264 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4265 execute_cfa_program_test.
4266
4267 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4268 copy ctor, assignment operator, move assignment.
4269 <alloc_regs>: New method.
4270 <swap>: New method.
4271 (struct dwarf2_frame_state): Delete dtor.
4272 (dwarf2_frame_state_alloc_regs): Remove declaration.
4273 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4274 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4275
4276 2017-08-11 Yao Qi <yao.qi@linaro.org>
4277
4278 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4279 (dwarf2_frame_state::dwarf2_frame_state): New.
4280 (dwarf2_frame_state::~dwarf2_frame_state): New.
4281 (dwarf2_fetch_cfa_info): Update.
4282 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
4283 rather than a pointer. Update code.
4284 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4285 dtor.
4286 <data_align, code_align, retaddr_column>: Change them to const.
4287 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4288 to bool.
4289
4290 2017-08-11 Yao Qi <yao.qi@linaro.org>
4291
4292 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4293 <loc.exp>: New field.
4294 * dwarf2-frame.c (execute_cfa_program): Update.
4295 (dwarf2_frame_prev_register): Update.
4296
4297 2017-08-10 Pedro Alves <palves@redhat.com>
4298
4299 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4300
4301 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4302
4303 * fbsd-nat.c (struct fbsd_fork_info): Remove.
4304 (fbsd_pending_children): Use std::list.
4305 (fbsd_remember_child): Likewise.
4306 (fbsd_is_child_pending): Likewise.
4307 (fbsd_pending_vfork_done): Use std::forward_list.
4308 (fbsd_add_vfork_done): Likewise.
4309 (fbsd_is_vfork_done_pending): Likewise.
4310 (fbsd_next_vfork_done): Likewise.
4311
4312 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4313
4314 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4315 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4316 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4317 for `mapfilename'.
4318 (fbsd_xfer_partial): Use gdb::byte_vector.
4319 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4320
4321 2017-08-09 John Baldwin <jhb@FreeBSD.org>
4322
4323 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4324 "filestuff.h".
4325 (fbsd_find_memory_regions): Fix `mapfile' initialization.
4326
4327 2017-08-09 Tom Tromey <tom@tromey.com>
4328
4329 * skip.c (skiplist_entry): New constructor.
4330 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4331 (skiplist_entry::file_is_glob): Now bool.
4332 (skiplist_entry::file, skiplist_entry::function): Now
4333 std::string.
4334 (make_skip_entry): Return a unique_ptr. Use new.
4335 (free_skiplist_entry, free_skiplist_entry_cleanup)
4336 (make_free_skiplist_entry_cleanup): Remove.
4337 (skip_command, skip_disable_command, add_skiplist_entry)
4338 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4339 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4340 (function_name_is_marked_for_skip): Update.
4341 (skip_delete_command): Update. Use delete.
4342
4343 2017-08-09 Jiong Wang <jiong.wang@arm.com>
4344
4345 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4346 (aarch64_linux_core_read_description): New function.
4347 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4348
4349 2017-08-09 Pedro Alves <palves@redhat.com>
4350
4351 * cp-name-parser.y (cp_comp_to_string): Return a
4352 gdb::unique_xmalloc_ptr<char>.
4353 * cp-support.c (replace_typedefs_qualified_name)
4354 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4355 (cp_canonicalize_string_full): Use op= instead of explicit
4356 convertion.
4357 (cp_class_name_from_physname, method_name_from_physname)
4358 (cp_func_name, cp_remove_params): Adjust to use
4359 gdb::unique_xmalloc_ptr<char>.
4360 * cp-support.h (cp_comp_to_string): Return a
4361 gdb::unique_xmalloc_ptr<char>.
4362 * python/py-type.c (typy_lookup_type): Adjust to use
4363 gdb::unique_xmalloc_ptr<char>.
4364
4365 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
4366
4367 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4368
4369 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
4370 Yao Qi <yao.qi@linaro.org>
4371
4372 * cp-support.c (cp_canonicalize_string_full): Use
4373 gdb::unique_xmalloc_ptr<char>.
4374 (cp_canonicalize_string): Likewise.
4375
4376 2017-08-09 Yao Qi <yao.qi@linaro.org>
4377
4378 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4379 * regformats/i386/amd64-avx-avx512.dat: Remove.
4380 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4381 * regformats/i386/amd64-avx-mpx.dat:Remove.
4382 * regformats/i386/amd64-avx.dat: Remove.
4383 * regformats/i386/amd64-mpx.dat: Remove.
4384 * regformats/i386/i386-avx-avx512.dat: Remove.
4385 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4386 * regformats/i386/i386-avx-mpx.dat: Remove.
4387 * regformats/i386/i386-mmx.dat: Remove.
4388 * regformats/i386/i386-mpx.dat: Remove.
4389
4390 2017-08-09 Yao Qi <yao.qi@linaro.org>
4391
4392 * amd64-tdep.h (tdesc_x32): Remove the declaration.
4393 * amd64-tdep.c: Don't include features/i386/x32*.c.
4394 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4395 functions.
4396 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4397 and i386/x32-avx-avx512.
4398 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4399 and i386/x32.xml.
4400 * features/i386/x32-avx-avx512.c: Removed.
4401 * features/i386/x32-avx-avx512.xml: Removed.
4402 * features/i386/x32-avx.c: Removed.
4403 * features/i386/x32-avx.xml: Removed.
4404 * features/i386/x32.c: Removed.
4405 * features/i386/x32.xml: Removed.
4406 * regformats/i386/x32-avx-avx512.dat: Removed.
4407 * regformats/i386/x32-avx.dat: Removed.
4408 * regformats/i386/x32.dat: Removed.
4409
4410 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4411
4412 PR breakpoints/21886
4413 * mem-break.c (default_memory_insert_breakpoint): Use
4414 `->placed_address' rather than `->reqstd_address' for the
4415 breakpoint location.
4416
4417 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4418
4419 * arch-utils.c (default_print_insn): Remove arch/mach/endian
4420 assertions.
4421
4422 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4423
4424 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4425 a union of `tdep_info', `tdesc_data' and `id'.
4426 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4427 rather than `info.tdep_info'.
4428 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4429 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4430 * i386-tdep.c (i386_gdbarch_init): Likewise.
4431 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4432 * mips-tdep.c (mips_gdbarch_init): Likewise.
4433 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4434 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4435 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4436 `info.tdep_info'.
4437 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4438 `info.tdep_info'.
4439 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4440 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4441 `info.tdep_info'.
4442 * spu-tdep.c (spu_gdbarch_init): Likewise.
4443 * gdbarch.h: Regenerate.
4444
4445 2017-08-07 Leszek Swirski <leszeks@google.com>
4446
4447 PR symtab/20899
4448 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4449
4450 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
4451
4452 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4453 (gdbsim_open): Rename gdb_argv args object to argv.
4454
4455 2017-08-05 Tom Tromey <tom@tromey.com>
4456
4457 * compile/compile-object-load.c (compile_object_load): Use
4458 gdb::unique_xmalloc_ptr.
4459 * cli/cli-dump.c (scan_filename): Rename from
4460 scan_filename_with_cleanup. Change return type.
4461 (scan_expression): Rename from scan_expression_with_cleanup.
4462 Change return type.
4463 (dump_memory_to_file, dump_value_to_file, restore_command):
4464 Use gdb::unique_xmalloc_ptr. Update.
4465 * cli/cli-cmds.c (find_and_open_script): Use
4466 gdb::unique_xmalloc_ptr.
4467 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4468 * symmisc.c (maintenance_print_symbols)
4469 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4470 * symfile.c (symfile_bfd_open, generic_load)
4471 (add_symbol_file_command, remove_symbol_file_command): Use
4472 gdb::unique_xmalloc_ptr.
4473 * source.c (openp): Use gdb::unique_xmalloc_ptr.
4474 * psymtab.c (maintenance_print_psymbols): Use
4475 gdb::unique_xmalloc_ptr.
4476 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4477 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4478 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4479 (reload_shared_libraries_1): Likewise.
4480
4481 2017-08-05 Tom Tromey <tom@tromey.com>
4482
4483 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4484 (rust_op_vector, rust_set_vector): New typedefs.
4485 (current_parser): New global.
4486 (work_obstack): Change to pointer type. Update all users.
4487 (rust_ast, pstate): Remove globals.
4488 (struct rust_parser): New.
4489 (%union) <params, field_inits>: Change type.
4490 (start, tuple_expr, unit_expr, struct_expr_list, literal)
4491 (field_expr, expr_list, maybe_expr_list, type_list): Update.
4492 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4493 (convert_params_to_types, convert_params_to_expression): Change
4494 type of "params".
4495 (ast_string): Change type of "fields".
4496 (rust_parse): Make a rust_parser. Remove cleanups.
4497 (rust_lex_tests): Make and install an auto_obstack.
4498
4499 2017-08-04 Yao Qi <yao.qi@linaro.org>
4500
4501 * configure.srv (ipa_x32_linux_regobj): New.
4502 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4503 instead of X86_TDESC_AVX512.
4504 (initialize_low_tracepoint): Call
4505 init_registers_x32_avx_avx512_linux.
4506
4507 2017-08-04 Yao Qi <yao.qi@linaro.org>
4508
4509 * utils.h (gdb_argv): Add namespace std for nullptr_t.
4510
4511 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4512
4513 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4514
4515 2017-08-03 Tom Tromey <tom@tromey.com>
4516
4517 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4518 Remove.
4519 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4520
4521 2017-08-03 Tom Tromey <tom@tromey.com>
4522
4523 * python/py-param.c (compute_enum_values): Use gdb_argv.
4524
4525 2017-08-03 Tom Tromey <tom@tromey.com>
4526
4527 * utils.h (struct gdb_argv_deleter): New.
4528 (gdb_argv): New class.
4529 * utils.c (gdb_argv::reset): New method.
4530 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4531 * tracefile.c (tsave_command): Use gdb_argv.
4532 * top.c (new_ui_command): Use gdb_argv.
4533 * symmisc.c (maintenance_print_symbols)
4534 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4535 * symfile.c (symbol_file_command, generic_load)
4536 (remove_symbol_file_command): Use gdb_argv.
4537 * stack.c (backtrace_command): Use gdb_argv.
4538 * source.c (add_path, show_substitute_path_command)
4539 (unset_substitute_path_command, set_substitute_path_command):
4540 Use gdb_argv.
4541 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4542 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4543 * remote.c (extended_remote_run, remote_put_command)
4544 (remote_get_command, remote_delete_command): Use gdb_argv.
4545 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4546 (gdbsim_open): Use gdb_argv.
4547 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4548 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4549 * procfs.c (procfs_info_proc): Use gdb_argv.
4550 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4551 * infrun.c (handle_command): Use gdb_argv.
4552 * inferior.c (add_inferior_command, clone_inferior_command):
4553 Use gdb_argv.
4554 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4555 * exec.c (exec_file_command): Use gdb_argv.
4556 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4557 * compile/compile.c (build_argc_argv): Use gdb_argv.
4558
4559 2017-08-03 Tom Tromey <tom@tromey.com>
4560
4561 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4562
4563 2017-08-03 Tom Tromey <tom@tromey.com>
4564
4565 * python/python.c (compute_python_string): Return std::string.
4566 (gdbpy_eval_from_control_command): Update.
4567 (do_start_initialization): Use std::string.
4568 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4569 xstrprintf.
4570 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4571 xstrprintf.
4572
4573 2017-08-03 Tom Tromey <tom@tromey.com>
4574
4575 * top.h (do_restore_instream_cleanup): Remove.
4576 * top.c (do_restore_instream_cleanup): Remove.
4577 (read_command_file): Use scoped_restore.
4578 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4579
4580 2017-08-03 Tom Tromey <tom@tromey.com>
4581
4582 * cli/cli-script.c (execute_user_command)
4583 (execute_control_command): Use scoped_restore.
4584
4585 2017-08-03 Tom Tromey <tom@tromey.com>
4586
4587 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4588 (execute_user_command): Remove user_call_depth; use
4589 user_args_stack's size instead.
4590
4591 2017-08-03 Tom Tromey <tom@tromey.com>
4592
4593 * top.h (in_user_command): Remove.
4594 * top.c (in_user_command): Remove.
4595 * cli/cli-script.c (do_restore_user_call_depth)
4596 (execute_user_command): Update.
4597
4598 2017-08-03 Tom Tromey <tom@tromey.com>
4599
4600 * valops.c (search_struct_method): Use gdb::byte_vector.
4601 * valarith.c (value_concat): Use std::vector.
4602 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4603 (simple_search_memory): Likewise.
4604 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4605 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4606 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4607 * elfread.c (elf_rel_plt_read): Use std::string.
4608 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4609 * cli/cli-dump.c (restore_section_callback): Use
4610 gdb::byte_vector.
4611
4612 2017-08-03 Tom Tromey <tom@tromey.com>
4613
4614 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4615
4616 2017-08-03 Tom Tromey <tom@tromey.com>
4617
4618 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4619 (tui_register_format): Use scoped_restore.
4620
4621 2017-08-03 Tom Tromey <tom@tromey.com>
4622
4623 * reverse.c (exec_direction_default): Remove.
4624 (exec_reverse_once): Use scoped_restore.
4625 * remote.c (restore_remote_timeout): Remove.
4626 (remote_flash_erase, remote_flash_write, remote_flash_done)
4627 (readchar, remote_serial_write): Use scoped_restore.
4628 * cli/cli-script.c (struct source_cleanup_lines_args)
4629 (source_cleanup_lines): Remove.
4630 (script_from_file): Use scoped_restore.
4631 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4632 (source_command): Use scoped_restore.
4633
4634 2017-08-03 Tom Tromey <tom@tromey.com>
4635
4636 * utils.h (make_cleanup_free_so): Remove.
4637 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4638 * solist.h (struct so_deleter): New.
4639 (so_list_up): New typedef.
4640 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4641
4642 2017-08-03 Tom Tromey <tom@tromey.com>
4643
4644 * utils.h (make_cleanup_restore_current_language): Remove.
4645 * utils.c (do_restore_current_language)
4646 (make_cleanup_restore_current_language): Remove.
4647 * parse.c (parse_exp_in_context_1)
4648 (parse_expression_with_language): Use
4649 scoped_restore_current_language.
4650 * mi/mi-main.c (mi_cmd_execute): Use
4651 scoped_restore_current_language.
4652 * language.h (scoped_restore_current_language): New class.
4653
4654 2017-08-03 Tom Tromey <tom@tromey.com>
4655
4656 * compile/compile.c (cleanup_unlink_file): Remove.
4657 (compile_to_object): Use gdb::unlinker.
4658 (eval_compile_command): Likewise.
4659
4660 2017-08-03 Tom Tromey <tom@tromey.com>
4661
4662 * utils.h (make_cleanup_fclose): Remove.
4663 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4664
4665 2017-08-03 Tom Tromey <tom@tromey.com>
4666
4667 * top.c (open_terminal_stream): Return gdb_file_up.
4668 (new_ui_command): Update.
4669
4670 2017-08-03 Tom Tromey <tom@tromey.com>
4671
4672 * source.c (print_source_lines_base, forward_search_command)
4673 (reverse_search_command): Use gdb_file_up.
4674
4675 2017-08-03 Tom Tromey <tom@tromey.com>
4676
4677 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4678
4679 2017-08-03 Tom Tromey <tom@tromey.com>
4680
4681 * cli/cli-cmds.c (find_and_open_script): Change return type.
4682 Remove "streamp" and "full_path" parameters.
4683 (source_script_with_search): Update.
4684 * auto-load.c (source_script_file): Update.
4685 * cli/cli-cmds.h (find_and_open_script): Change type.
4686 (open_script): New struct.
4687
4688 2017-08-03 Tom Tromey <tom@tromey.com>
4689
4690 * xml-support.c (xml_fetch_content_from_file): Update.
4691 * ui-file.c (stdio_file::open): Update.
4692 * tracefile-tfile.c (tfile_start): Update.
4693 * remote.c (remote_file_put, remote_file_get): Update.
4694 * nat/linux-procfs.c (linux_proc_get_int)
4695 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4696 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4697 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4698 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4699 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4700 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4701 * linux-nat.c (linux_proc_pending_signals): Update.
4702 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4703 (file_closer): Remove.
4704 * compile/compile.c (compile_to_object): Update.
4705 * common/filestuff.h (struct gdb_file_deleter): New.
4706 (gdb_file_up): New typedef.
4707 (gdb_fopen_cloexec): Change return type.
4708 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4709 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4710 (dump_binary_file, restore_binary_file): Update.
4711 * auto-load.c (auto_load_objfile_script_1): Update.
4712
4713 2017-08-03 Tom Tromey <tom@tromey.com>
4714
4715 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4716 (info_static_tracepoint_markers_command): Likewise.
4717 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4718 * skip.c (skip_info): Use ui_out_emit_table.
4719 * progspace.c (print_program_space): Use ui_out_emit_table.
4720 * osdata.c (info_osdata): Use ui_out_emit_table.
4721 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4722 ui_out_emit_table.
4723 * linux-thread-db.c (info_auto_load_libthread_db): Use
4724 ui_out_emit_table.
4725 * inferior.c (print_inferior): Use ui_out_emit_table.
4726 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4727 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4728 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4729 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4730 * ui-out.h (class ui_out_emit_table): New.
4731
4732 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4733
4734 * mips-tdep.c (mips_fpu_type_str): New function.
4735 (mips_dump_tdep): Call it.
4736
4737 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4738
4739 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4740 `->mips_fpu_type'.
4741
4742 2017-07-31 Xavier Roirand <roirand@adacore.com>
4743
4744 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4745
4746 2017-07-27 Xavier Roirand <roirand@adacore.com>
4747
4748 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4749
4750 2017-07-26 Yao Qi <yao.qi@linaro.org>
4751
4752 * cli/cli-cmds.c (maintenancechecklist): New variable.
4753 * gdbcmd.h (maintenancechecklist): Declare it.
4754 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4755 Call i386_linux_read_description with different masks.
4756 * maint.c (maintenance_check_command): New function.
4757 (_initialize_maint_cmds): Call add_prefix_cmd.
4758 * target-descriptions.c (tdesc_reg): override operator != and ==.
4759 (tdesc_type): Likewise.
4760 (tdesc_feature): Likewise.
4761 (target_desc): Likewise.
4762 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4763 (maintenance_check_xml_descriptions): New function.
4764 (_initialize_target_descriptions) Add command "xml-descriptions".
4765 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4766
4767 2017-07-26 Yao Qi <yao.qi@linaro.org>
4768
4769 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4770 Include features/i386/32bit-*.c.
4771 (i386_linux_read_description): Generate target description if it
4772 doesn't exist.
4773 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4774 functions.
4775 * features/i386/32bit-linux.c: Re-generated.
4776 * features/i386/32bit-sse.c: Likewise.
4777 * target-descriptions.c (print_c_feature::visit): Print code to
4778 set register number if needed.
4779 (print_c_feature) <m_next_regnum>: New field.
4780
4781 2017-07-26 Yao Qi <yao.qi@linaro.org>
4782
4783 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4784 (FEATURE_XMLFILES): New.
4785 (FEATURE_CFILES): New.
4786 New rules.
4787 (clean-cfiles): Remove generated c files.
4788 * features/i386/32bit-avx.c: Generated.
4789 * features/i386/32bit-avx512.c: Generated.
4790 * features/i386/32bit-core.c: Generated.
4791 * features/i386/32bit-linux.c: Generated.
4792 * features/i386/32bit-mpx.c: Generated.
4793 * features/i386/32bit-pkeys.c: Generated.
4794 * features/i386/32bit-sse.c: Generated.
4795 * target-descriptions.c: Include algorithm.
4796 (tdesc_element_visitor): Add method visit_end.
4797 (print_c_tdesc): Implement visit_end.
4798 (print_c_tdesc:: m_filename_after_features): Move it to
4799 protected.
4800 (print_c_feature): New class.
4801 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4802 name starts with "i386/32bit-".
4803
4804 2017-07-26 Yao Qi <yao.qi@linaro.org>
4805
4806 * target-descriptions.c (tdesc_element_visitor): New class.
4807 (tdesc_element): New class.
4808 (tdesc_reg): Inherit from tdesc_element.
4809 (tdesc_reg::accept): New function.
4810 (tdesc_type): Inherit from tdesc_element.
4811 (tdesc_type::accept): New function.
4812 (tdesc_feature): Inherit from tdesc_element.
4813 (tdesc_feature::accept): New function.
4814 (target_desc): Inherit from tdesc_element.
4815 (target_desc::target_desc): New.
4816 (target_desc::~target_desc): New.
4817 (target_desc::accept): New.
4818 (allocate_target_description): Use new.
4819 (free_target_description): Use delete.
4820 (print_c_tdesc): New class.
4821 (maint_print_c_tdesc_cmd): Adjust.
4822
4823 * features/aarch64.c: Re-generated.
4824 * features/arc-arcompact.c: Re-generated.
4825 * features/arc-v2.c: Re-generated.
4826 * features/arm/arm-with-iwmmxt.c: Re-generated.
4827 * features/arm/arm-with-m.c: Re-generated.
4828 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4829 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4830 * features/arm/arm-with-neon.c: Re-generated.
4831 * features/arm/arm-with-vfpv2.c: Re-generated.
4832 * features/arm/arm-with-vfpv3.c: Re-generated.
4833 * features/i386/amd64-avx-avx512.c: Re-generated.
4834 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4835 * features/i386/amd64-avx.c: Re-generated.
4836 * features/i386/amd64-avx-linux.c: Re-generated.
4837 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4838 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4839 * features/i386/amd64-avx-mpx.c: Re-generated.
4840 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4841 * features/i386/amd64.c: Re-generated.
4842 * features/i386/amd64-linux.c: Re-generated.
4843 * features/i386/amd64-mpx.c: Re-generated.
4844 * features/i386/amd64-mpx-linux.c: Re-generated.
4845 * features/i386/i386-avx-avx512.c: Re-generated.
4846 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4847 * features/i386/i386-avx.c: Re-generated.
4848 * features/i386/i386-avx-linux.c: Re-generated.
4849 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4850 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4851 * features/i386/i386-avx-mpx.c: Re-generated.
4852 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4853 * features/i386/i386.c: Re-generated.
4854 * features/i386/i386-linux.c: Re-generated.
4855 * features/i386/i386-mmx.c: Re-generated.
4856 * features/i386/i386-mmx-linux.c: Re-generated.
4857 * features/i386/i386-mpx.c: Re-generated.
4858 * features/i386/i386-mpx-linux.c: Re-generated.
4859 * features/i386/x32-avx-avx512.c: Re-generated.
4860 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4861 * features/i386/x32-avx.c: Re-generated.
4862 * features/i386/x32-avx-linux.c: Re-generated.
4863 * features/i386/x32.c: Re-generated.
4864 * features/i386/x32-linux.c: Re-generated.
4865 * features/microblaze.c: Re-generated.
4866 * features/microblaze-with-stack-protect.c: Re-generated.
4867 * features/mips64-dsp-linux.c: Re-generated.
4868 * features/mips64-linux.c: Re-generated.
4869 * features/mips-dsp-linux.c: Re-generated.
4870 * features/mips-linux.c: Re-generated.
4871 * features/nds32.c: Re-generated.
4872 * features/nios2.c: Re-generated.
4873 * features/nios2-linux.c: Re-generated.
4874 * features/rs6000/powerpc-32.c: Re-generated.
4875 * features/rs6000/powerpc-32l.c: Re-generated.
4876 * features/rs6000/powerpc-403.c: Re-generated.
4877 * features/rs6000/powerpc-403gc.c : Re-generated.
4878 * features/rs6000/powerpc-405.c: Re-generated.
4879 * features/rs6000/powerpc-505.c: Re-generated.
4880 * features/rs6000/powerpc-601.c: Re-generated.
4881 * features/rs6000/powerpc-602.c: Re-generated.
4882 * features/rs6000/powerpc-603.c: Re-generated.
4883 * features/rs6000/powerpc-604.c: Re-generated.
4884 * features/rs6000/powerpc-64.c: Re-generated.
4885 * features/rs6000/powerpc-64l.c: Re-generated.
4886 * features/rs6000/powerpc-7400.c: Re-generated.
4887 * features/rs6000/powerpc-750.c: Re-generated.
4888 * features/rs6000/powerpc-860.c: Re-generated.
4889 * features/rs6000/powerpc-altivec32.c: Re-generated.
4890 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4891 * features/rs6000/powerpc-altivec64.c: Re-generated.
4892 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4893 * features/rs6000/powerpc-cell32l.c: Re-generated.
4894 * features/rs6000/powerpc-cell64l.c: Re-generated.
4895 * features/rs6000/powerpc-e500.c: Re-generated.
4896 * features/rs6000/powerpc-e500l.c: Re-generated.
4897 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4898 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4899 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4900 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4901 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4902 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4903 * features/rs6000/powerpc-vsx32.c: Re-generated.
4904 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4905 * features/rs6000/powerpc-vsx64.c: Re-generated.
4906 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4907 * features/rs6000/rs6000.c: Re-generated.
4908 * features/s390-linux32.c: Re-generated.
4909 * features/s390-linux32v1.c: Re-generated.
4910 * features/s390-linux32v2.c: Re-generated.
4911 * features/s390-linux64.c: Re-generated.
4912 * features/s390-linux64v1.c: Re-generated.
4913 * features/s390-linux64v2.c: Re-generated.
4914 * features/s390-te-linux64.c: Re-generated.
4915 * features/s390-tevx-linux64.c: Re-generated.
4916 * features/s390-vx-linux64.c: Re-generated.
4917 * features/s390x-linux64.c: Re-generated.
4918 * features/s390x-linux64v1.c: Re-generated.
4919 * features/s390x-linux64v2.c: Re-generated.
4920 * features/s390x-te-linux64.c: Re-generated.
4921 * features/s390x-tevx-linux64.c: Re-generated.
4922 * features/s390x-vx-linux64.c: Re-generated.
4923 * features/sparc/sparc32-solaris.c: Re-generated.
4924 * features/sparc/sparc64-solaris.c: Re-generated.
4925 * features/tic6x-c62x.c: Re-generated.
4926 * features/tic6x-c62x-linux.c: Re-generated.
4927 * features/tic6x-c64x.c: Re-generated.
4928 * features/tic6x-c64x-linux.c: Re-generated.
4929 * features/tic6x-c64xp.c: Re-generated.
4930 * features/tic6x-c64xp-linux.c: Re-generated.
4931
4932 2017-07-26 Yao Qi <yao.qi@linaro.org>
4933
4934 * i386-linux-tdep.c (i386_linux_read_description): New function.
4935 (i386_linux_core_read_description): Call
4936 i386_linux_read_description.
4937 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4938 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4939 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4940 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4941 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4942 * x86-linux-nat.c (x86_linux_read_description): Call
4943 i386_linux_read_description.
4944
4945 2017-07-26 Yao Qi <yao.qi@linaro.org>
4946
4947 * NEWS: Mention it.
4948 * features/Makefile (%.c: %.xml): Pass the xml file name to
4949 command "maint print c-tdesc".
4950 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4951 name from 'arg'.
4952
4953 2017-07-26 Yao Qi <yao.qi@linaro.org>
4954
4955 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4956 in-class initialization.
4957 (tdesc_create_feature): Call new instead of XCNEW.
4958 (free_target_description): Ue delete.
4959
4960 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4961
4962 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4963
4964 2017-07-25 Yao Qi <yao.qi@linaro.org>
4965
4966 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4967 constant.
4968 (amd64_x32_init_abi): Likewise.
4969 * amd64-tdep.h (amd64_init_abi): Update declaration.
4970 (amd64_x32_init_abi): Likewise.
4971
4972 2017-07-25 Yao Qi <yao.qi@linaro.org>
4973
4974 PR tdep/21717
4975 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4976 condition for FPSCR.
4977 (arm_linux_store_inferior_registers): Likewise.
4978
4979 2017-07-22 Tom Tromey <tom@tromey.com>
4980
4981 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4982 <syscalls_counts>: Now a std::vector.
4983 (get_catch_syscall_inferior_data): Use "new".
4984 (catch_syscall_inferior_data_cleanup): Use "delete".
4985 (insert_catch_syscall, remove_catch_syscall)
4986 (clear_syscall_counts): Update.
4987
4988 2017-07-22 Tom Tromey <tom@tromey.com>
4989
4990 * break-catch-syscall.c (syscall_catchpoint)
4991 <syscalls_to_be_caught>: Now a std::vector<int>
4992 (~syscall_catchpoint): Remove.
4993 (insert_catch_syscall, remove_catch_syscall)
4994 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4995 (print_mention_catch_syscall, print_recreate_catch_syscall):
4996 Update.
4997 (create_syscall_event_catchpoint): Change type of "filter"
4998 parameter.
4999 (catch_syscall_split_args): Return a std::vector.
5000 (catch_syscall_command_1, catching_syscall_number_1): Update.
5001
5002 2017-07-22 Tom Tromey <tom@tromey.com>
5003
5004 * break-catch-throw.c (struct exception_catchpoint)
5005 <exception_rx>: Now a std::string.
5006 (~exception_catchpoint): Remove.
5007 (print_one_detail_exception_catchpoint): Update.
5008 (handle_gnu_v3_exceptions): Change type of except_rx.
5009 (extract_exception_regexp): Return a std::string.
5010 (catch_exception_command_1): Update.
5011
5012 2017-07-22 Tom Tromey <tom@tromey.com>
5013
5014 * break-catch-sig.c (gdb_signal_type): Remove typedef.
5015 (struct signal_catchpoint) <signals_to_be_caught>: Now a
5016 std::vector.
5017 <catch_all>: Now a bool.
5018 (~signal_catchpoint): Remove.
5019 (signal_catchpoint_insert_location)
5020 (signal_catchpoint_remove_location)
5021 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5022 (signal_catchpoint_print_mention)
5023 (signal_catchpoint_print_recreate)
5024 (signal_catchpoint_explains_signal): Update.
5025 (create_signal_catchpoint): Change type of "filter" and
5026 "catch_all".
5027 (catch_signal_split_args): Return a std::vector. Change type of
5028 "catch_all".
5029 (catch_signal_command): Update.
5030
5031 2017-07-20 Pedro Alves <palves@redhat.com>
5032
5033 * ada-lang.c (ada_language_defn): Make extern.
5034 (_initialize_ada_language): Remove add_language call.
5035 * c-lang.c (c_language_defn, cplus_language_defn)
5036 (asm_language_defn, minimal_language_defn): Make extern.
5037 (_initialize_c_language): Delete.
5038 * completer.c (compare_cstrings): Delete, moved to utils.h.
5039 * d-lang.c (d_language_defn): Make extern.
5040 (_initialize_d_language): Remove add_language calls.
5041 * defs.h (enum language): Add comment.
5042 * f-lang.c (f_language_defn): Make extern.
5043 (_initialize_f_language): Remove add_language call.
5044 * go-lang.c (go_language_defn): Make extern.
5045 (_initialize_go_language): Remove add_language call.
5046 * language.c: Include <algorithm>.
5047 (languages): Redefine as const array.
5048 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5049 (set_language_command): Handle "local". Use for-range loop.
5050 (set_language): Remove loop.
5051 (language_enum): Rewrite.
5052 (language_def, language_str): Remove loops.
5053 (add_language): Delete.
5054 (add_set_language_command): New, based on add_languages.
5055 (skip_language_trampoline): Adjust.
5056 (local_language_defn): Delete.
5057 (language_gdbarch_post_init): Adjust.
5058 (_initialize_language): Remove add_language calls. Call
5059 add_set_language_command.
5060 * language.h (add_language): Delete.
5061 (auto_language_defn)
5062 (unknown_language_defn, minimal_language_defn, ada_language_defn)
5063 (asm_language_defn, c_language_defn, cplus_language_defn)
5064 (d_language_defn, f_language_defn, go_language_defn)
5065 (m2_language_defn, objc_language_defn, opencl_language_defn)
5066 (pascal_language_defn, rust_language_defn): Declare.
5067 * m2-lang.c (m2_language_defn): Make extern.
5068 (_initialize_m2_language): Remove add_language call.
5069 * objc-lang.c (objc_language_defn): Make extern.
5070 (_initialize_objc_language): Remove add_language call.
5071 * opencl-lang.c (opencl_language_defn): Make extern.
5072 (_initialize_opencl_language): Remove add_language call.
5073 * p-lang.c (pascal_language_defn): Make extern.
5074 (_initialize_pascal_language): Delete.
5075 * rust-lang.c (rust_language_defn): Make extern.
5076 (_initialize_rust_language): Delete.
5077 * utils.h (compare_cstrings): New static inline function.
5078
5079 2017-07-20 Pedro Alves <palves@redhat.com>
5080
5081 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5082 (get_var_value): Constify parameters.
5083 (get_int_var_value): Change prototype.
5084 (to_fixed_range_type): Adjust.
5085 * ada-lang.h (get_int_var_value): Change prototype.
5086
5087 2017-07-20 Pedro Alves <palves@redhat.com>
5088
5089 * dwarf2read.c (dw2_lookup_symbol): Use
5090 SYMBOL_MATCHES_SEARCH_NAME.
5091 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5092
5093 2017-07-20 Pedro Alves <palves@redhat.com>
5094
5095 * block.c (block_iter_name_step, block_iter_name_first)
5096 (block_iter_name_next): Delete.
5097 (block_lookup_symbol_primary): Adjust to use
5098 dict_iter_match_first/dict_iter_match_next.
5099 * block.h (block_iter_name_first, block_iter_name_next): Delete
5100 declarations.
5101 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5102 dict_iter_match_first/dict_iter_match_next.
5103
5104 2017-07-20 Pedro Alves <palves@redhat.com>
5105
5106 * cp-support.c (cp_find_first_component_aux): Add missing case for
5107 end of string.
5108
5109 2017-07-18 David Blaikie <dblaikie@gmail.com>
5110
5111 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5112 of dwo_cu's dwo_file.
5113
5114 2017-07-18 Yao Qi <yao.qi@linaro.org>
5115
5116 * remote.c (store_registers_using_G): Remove one line comment.
5117
5118 2017-07-18 Yao Qi <yao.qi@linaro.org>
5119
5120 * regcache.c (regcache_cpy): Simplify it.
5121 (regcache::cpy_no_passthrough): Remove it.
5122 * regcache.h (cpy_no_passthrough): Remove it.
5123 (regcache_dup, regcache_cpy): Update comments.
5124
5125 2017-07-18 Pedro Alves <palves@redhat.com>
5126
5127 * remote-sim.c (sim_command_completer): Adjust to work with a
5128 completion_tracker instead of a VEC.
5129
5130 2017-07-17 Pedro Alves <palves@redhat.com>
5131
5132 * completer.c (complete_source_filenames): New function.
5133 (complete_address_and_linespec_locations): New function.
5134 (location_completer): Use complete_address_and_linespec_locations.
5135 (completion_tracker::build_completion_result): Honor the tracker's
5136 request to suppress append.
5137 * completer.h (completion_tracker::suppress_append_ws)
5138 (completion_tracker::set_suppress_append_ws): New methods.
5139 (completion_tracker::m_suppress_append_ws): New field.
5140 (complete_source_filenames): New declaration.
5141 * linespec.c (linespec_complete_what): New.
5142 (struct ls_parser) <complete_what, completion_word,
5143 completion_quote_char, completion_quote_end, completion_tracker>:
5144 New fields.
5145 (string_find_incomplete_keyword_at_end): New.
5146 (linespec_lexer_lex_string): Record quote char. If in completion
5147 mode, don't throw.
5148 (linespec_lexer_consume_token): Advance the completion word point.
5149 (linespec_lexer_peek_token): Save/restore completion info.
5150 (save_stream_and_consume_token): New.
5151 (set_completion_after_number): New.
5152 (linespec_parse_basic): Set what to complete next depending on
5153 token. Handle function and label completions specially.
5154 (parse_linespec): Disable objc shortcut in completion mode. Set
5155 what to complete next depending on token type. Skip keyword if in
5156 completion mode.
5157 (complete_linespec_component, linespec_complete): New.
5158 * linespec.h (linespec_complete): Declare.
5159
5160 2017-07-17 Pedro Alves <palves@redhat.com>
5161
5162 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5163 Handle 'operator<' / 'operator<<'.
5164
5165 2017-07-17 Pedro Alves <palves@redhat.com>
5166
5167 * completer.c (collect_explicit_location_matches): Handle
5168 MATCH_LABEL.
5169 (convert_explicit_location_to_linespec): New, factored out from
5170 ...
5171 (convert_explicit_location_to_sals): ... this.
5172 (complete_label): New.
5173 (linespec_complete_label, find_label_symbols_in_block): New.
5174 (find_label_symbols): Add completion_mode parameter and adjust to
5175 call find_label_symbols_in_block.
5176 * linespec.h (linespec_complete_label): Declare.
5177
5178 2017-07-17 Pedro Alves <palves@redhat.com>
5179
5180 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5181 complete_symbol_mode parameter.
5182 * cli/cli-cmds.c (complete_command): Get the completion result out
5183 of the handle_brkchars tracker if used a custom word point.
5184 * completer.c: Include "linespec.h".
5185 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5186 (advance_to_expression_complete_word_point): New.
5187 (completion_tracker::completes_to_completion_word): New.
5188 (complete_files_symbols): Pass down
5189 complete_symbol_mode::EXPRESSION.
5190 (explicit_options, probe_options): New.
5191 (collect_explicit_location_matches): Complete on the
5192 explictit_loc->foo instead of word. Use
5193 linespec_complete_function. Handle MATCH_LINE. Handle offering
5194 keyword and options completions.
5195 (backup_text_ptr): Delete.
5196 (skip_keyword): New.
5197 (complete_explicit_location): Remove 'word' parameter. Add
5198 language, quoted_arg_start and quoted_arg_end parameters.
5199 Rewrite, parsing left to right.
5200 (location_completer): Rewrite.
5201 (location_completer_handle_brkchars): New function.
5202 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5203 (enum complete_line_internal_reason): Adjust comments.
5204 (completion_tracker::discard_completions): New.
5205 (completer_handle_brkchars_func_for_completer): Handle
5206 location_completer.
5207 (gdb_custom_word_point_brkchars)
5208 (gdb_org_rl_basic_quote_characters): New.
5209 (gdb_completion_word_break_characters_throw)
5210 (completion_find_completion_word): Handle trackers that use a
5211 custom word point.
5212 (completion_tracker::advance_custom_word_point_by): New.
5213 (completion_tracker::build_completion_result): Don't rely on
5214 readline appending the quote char.
5215 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5216 use a custom word point.
5217 (gdb_rl_attempted_completion_function): Restore
5218 rl_basic_quote_characters.
5219 * completer.h (class completion_tracker): Extend intro comment.
5220 (completion_tracker::set_quote_char)
5221 (completion_tracker::quote_char)
5222 (completion_tracker::set_use_custom_word_point)
5223 (completion_tracker::use_custom_word_point)
5224 (completion_tracker::custom_word_point)
5225 (completion_tracker::set_custom_word_point)
5226 (completion_tracker::advance_custom_word_point_by)
5227 (completion_tracker::completes_to_completion_word)
5228 (completion_tracker::discard_completions): New methods.
5229 (completion_tracker::m_quote_char)
5230 (completion_tracker::m_use_custom_word_point)
5231 (completion_tracker::m_custom_word_point): New fields.
5232 (advance_to_expression_complete_word_point): Declare.
5233 * f-lang.c (f_collect_symbol_completion_matches): Add
5234 complete_symbol_mode parameter.
5235 * language.h (struct language_defn)
5236 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5237 parameter.
5238 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5239 (linespec_complete_function): New function.
5240 (linespec_lexer_lex_keyword): Adjust.
5241 * linespec.h (linespec_keywords, linespec_complete_function): New
5242 declarations.
5243 * location.c (find_end_quote): New function.
5244 (explicit_location_lex_one): Add explicit_completion_info
5245 parameter. Save quoting info. Don't throw if being called for
5246 completion. Don't handle Ada operators here.
5247 (is_cp_operator, skip_op_false_positives, first_of)
5248 (explicit_location_lex_one_function): New function.
5249 (string_to_explicit_location): Replace 'dont_throw' parameter with
5250 an explicit_completion_info pointer parameter. Handle it. Don't
5251 use explicit_location_lex_one to lex function names. Use
5252 explicit_location_lex_one_function instead.
5253 * location.h (struct explicit_completion_info): New.
5254 (string_to_explicit_location): Replace 'dont_throw' parameter with
5255 an explicit_completion_info pointer parameter.
5256 * symtab.c (default_collect_symbol_completion_matches_break_on):
5257 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5258 (default_collect_symbol_completion_matches)
5259 (collect_symbol_completion_matches): Add complete_symbol_mode
5260 parameter.
5261 (collect_symbol_completion_matches_type): Pass down
5262 complete_symbol_mode::EXPRESSION.
5263 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5264 parameter. Handle LINESPEC mode.
5265 * symtab.h (complete_symbol_mode): New.
5266 (default_collect_symbol_completion_matches_break_on)
5267 (default_collect_symbol_completion_matches)
5268 (collect_symbol_completion_matches)
5269 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5270 parameter.
5271
5272 2017-07-17 Pedro Alves <palves@redhat.com>
5273
5274 * utils.c (enum class strncmp_iw_mode): New.
5275 (strcmp_iw): Rename to ...
5276 (strncmp_iw_with_mode): ... this. Add string2_len and mode
5277 parameters. Handle them.
5278 (strncmp_iw): New.
5279 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5280 * utils.h (strncmp_iw): Declare.
5281 (strcmp_iw): Move describing comments here.
5282
5283 2017-07-17 Pedro Alves <palves@redhat.com>
5284
5285 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5286 CP_OPERATOR_STR.
5287 * c-typeprint.c (is_type_conversion_operator): Use
5288 CP_OPERATOR_STR.
5289 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5290 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5291 CP_OPERATOR_LEN.
5292 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5293 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5294 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5295 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5296 CP_OPERATOR_STR.
5297 * location.c: Include "cp-support.h".
5298 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5299 CP_OPERATOR_STR.
5300 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5301 CP_OPERATOR_LEN.
5302
5303 2017-07-17 Pedro Alves <palves@redhat.com>
5304
5305 * cli/cli-cmds.c (complete_command): Use a completion tracker
5306 along with completion_find_completion_word for handle_brkchars
5307 phase.
5308 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5309 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5310 (struct gdb_rl_completion_word_info): New.
5311 (gdb_rl_find_completion_word): New.
5312 (completion_find_completion_word): New.
5313 * completer.h (completion_find_completion_word): Declare.
5314
5315 2017-07-17 Pedro Alves <palves@redhat.com>
5316
5317 * ada-lang.c (symbol_completion_match): Adjust comments.
5318 (symbol_completion_add): Replace vector parameter with
5319 completion_tracker parameter. Use it.
5320 (ada_make_symbol_completion_list): Rename to...
5321 (ada_collect_symbol_completion_matches): ... this. Add
5322 completion_tracker parameter and use it.
5323 (ada_language_defn): Adjust.
5324 * break-catch-syscall.c (catch_syscall_completer): Adjust
5325 prototype and work with completion_tracker instead of VEC.
5326 * breakpoint.c (condition_completer): Adjust prototype and work
5327 with completion_tracker instead of VEC.
5328 * c-lang.c (c_language_defn, cplus_language_defn)
5329 (asm_language_defn, minimal_language_defn): Adjust to renames.
5330 * cli/cli-cmds.c (complete_command): Rework using
5331 completion_tracker. Catch exceptions when completing.
5332 * cli/cli-decode.c (integer_unlimited_completer)
5333 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5334 with completion_tracker instead of VEC.
5335 * command.h (struct completion_tracker): Forward declare.
5336 (completer_ftype, completer_handle_brkchars_ftype): Change
5337 types.
5338 (complete_on_cmdlist, complete_on_enum): Adjust.
5339 * completer.c: Include <algorithm>.
5340 (struct gdb_completer_state): New.
5341 (current_completion): New global.
5342 (readline_line_completion_function): Delete.
5343 (noop_completer, filename_completer)
5344 (filename_completer_handle_brkchars, complete_files_symbols)
5345 (linespec_location_completer): Adjust to work with a
5346 completion_tracker instead of a VEC.
5347 (string_or_empty): New.
5348 (collect_explicit_location_matches): Adjust to work with a
5349 completion_tracker instead of a VEC.
5350 (explicit_location_completer): Rename to ...
5351 (complete_explicit_location): ... this and adjust to work with a
5352 completion_tracker instead of a VEC.
5353 (location_completer): Adjust to work with a completion_tracker
5354 instead of a VEC.
5355 (add_struct_fields): Adjust to work with a completion_list instead
5356 of VEC.
5357 (expression_completer): Rename to ...
5358 (complete_expression): ... this and adjust to work with a
5359 completion_tracker instead of a VEC. Use complete_files_symbols.
5360 (expression_completer): Reimplement on top of complete_expression.
5361 (symbol_completer): Adjust to work with a completion_tracker
5362 instead of a VEC.
5363 (enum complete_line_internal_reason): Add describing comments.
5364 (complete_line_internal_normal_command): Adjust to work with a
5365 completion_tracker instead of a VEC.
5366 (complete_line_internal): Rename to ...
5367 (complete_line_internal_1): ... this and adjust to work with a
5368 completion_tracker instead of a VEC. Assert TEXT is NULL in the
5369 handle_brkchars phase.
5370 (new_completion_tracker): Delete.
5371 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5372 complete_line_internal_1.
5373 (free_completion_tracker): Delete.
5374 (INITIAL_COMPLETION_HTAB_SIZE): New.
5375 (completion_tracker::completion_tracker)
5376 (completion_tracker::~completion_tracker): New.
5377 (maybe_add_completion): Delete.
5378 (completion_tracker::maybe_add_completion)
5379 (completion_tracker::add_completion)
5380 (completion_tracker::add_completions): New.
5381 (throw_max_completions_reached_error): Delete.
5382 (complete_line): Adjust to work with a completion_tracker instead
5383 of a VEC. Don't create a completion_tracker_t or check for max
5384 completions here.
5385 (command_completer, command_completer_handle_brkchars)
5386 (signal_completer, reg_or_group_completer_1)
5387 (reg_or_group_completer, default_completer_handle_brkchars):
5388 Adjust to work with a completion_tracker.
5389 (gdb_completion_word_break_characters_throw): New.
5390 (gdb_completion_word_break_characters): Reimplement.
5391 (line_completion_function): Delete.
5392 (completion_tracker::recompute_lowest_common_denominator)
5393 (expand_preserving_ws)
5394 (completion_tracker::build_completion_result)
5395 (completion_result::completion_result)
5396 (completion_result::completion_result)
5397 (completion_result::~completion_result)
5398 (completion_result::completion_result)
5399 (completion_result::release_match_list, compare_cstrings)
5400 (completion_result::sort_match_list)
5401 (completion_result::reset_match_list)
5402 (gdb_rl_attempted_completion_function_throw)
5403 (gdb_rl_attempted_completion_function): New.
5404 * completer.h (completion_list, struct completion_result)
5405 (class completion_tracker): New.
5406 (complete_line): Add completion_tracker parameter.
5407 (readline_line_completion_function): Delete.
5408 (gdb_rl_attempted_completion_function): New.
5409 (noop_completer, filename_completer, expression_completer)
5410 (location_completer, symbol_completer, command_completer)
5411 (signal_completer, reg_or_group_completer): Update prototypes.
5412 (completion_tracker_t, new_completion_tracker)
5413 (make_cleanup_free_completion_tracker): Delete.
5414 (enum maybe_add_completion_enum): Delete.
5415 (maybe_add_completion): Delete.
5416 (throw_max_completions_reached_error): Delete.
5417 * corefile.c (complete_set_gnutarget): Adjust to work with a
5418 completion_tracker instead of a VEC.
5419 * cp-abi.c (cp_abi_completer): Adjust to work with a
5420 completion_tracker instead of a VEC.
5421 * d-lang.c (d_language_defn): Adjust.
5422 * disasm.c (disassembler_options_completer): Adjust to work with a
5423 completion_tracker instead of a VEC.
5424 * f-lang.c (f_make_symbol_completion_list): Rename to ...
5425 (f_collect_symbol_completion_matches): ... this. Adjust to work
5426 with a completion_tracker instead of a VEC.
5427 (f_language_defn): Adjust.
5428 * go-lang.c (go_language_defn): Adjust.
5429 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5430 Adjust to work with a completion_tracker instead of a VEC.
5431 * infrun.c (handle_completer): Likewise.
5432 * interps.c (interpreter_completer): Likewise.
5433 * interps.h (interpreter_completer): Likewise.
5434 * language.c (unknown_language_defn, auto_language_defn)
5435 (local_language_defn): Adjust.
5436 * language.h (language_defn::la_make_symbol_completion_list):
5437 Rename to ...
5438 (language_defn::la_collect_symbol_completion_matches): ... this
5439 and adjust to work with a completion_tracker instead of a VEC.
5440 * m2-lang.c (m2_language_defn): Adjust.
5441 * objc-lang.c (objc_language_defn): Adjust.
5442 * opencl-lang.c (opencl_language_defn): Adjust.
5443 * p-lang.c (pascal_language_defn): Adjust.
5444 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5445 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5446 with a completion_tracker.
5447 * rust-lang.c (rust_language_defn): Adjust.
5448 * symtab.c (free_completion_list, do_free_completion_list)
5449 (return_val, completion_tracker): Delete.
5450 (completion_list_add_name, completion_list_add_symbol)
5451 (completion_list_add_msymbol, completion_list_objc_symbol)
5452 (completion_list_add_fields, add_symtab_completions): Add
5453 completion_tracker parameter and use it.
5454 (default_make_symbol_completion_list_break_on_1): Rename to...
5455 (default_collect_symbol_completion_matches_break_on): ... this.
5456 Add completion_tracker parameter and use it instead of allocating
5457 a completion tracker here.
5458 (default_make_symbol_completion_list_break_on): Delete old
5459 implementation.
5460 (default_make_symbol_completion_list): Delete.
5461 (default_collect_symbol_completion_matches): New.
5462 (make_symbol_completion_list): Delete.
5463 (collect_symbol_completion_matches): New.
5464 (make_symbol_completion_type): Rename to ...
5465 (collect_symbol_completion_matches_type): ... this. Add
5466 completion_tracker parameter and use it instead of VEC.
5467 (make_file_symbol_completion_list_1): Rename to...
5468 (collect_file_symbol_completion_matches): ... this. Add
5469 completion_tracker parameter and use it instead of VEC.
5470 (make_file_symbol_completion_list): Delete.
5471 (add_filename_to_list): Use completion_list instead of a VEC.
5472 (add_partial_filename_data::list): Now a completion_list.
5473 (make_source_files_completion_list): Work with a completion_list
5474 instead of a VEC.
5475 * symtab.h: Include "completer.h".
5476 (default_make_symbol_completion_list_break_on)
5477 (default_make_symbol_completion_list, make_symbol_completion_list)
5478 (make_symbol_completion_type, make_file_symbol_completion_list)
5479 (make_source_files_completion_list): Delete.
5480 (default_collect_symbol_completion_matches_break_on)
5481 (default_collect_symbol_completion_matches)
5482 (collect_symbol_completion_matches)
5483 (collect_symbol_completion_matches_type)
5484 (collect_file_symbol_completion_matches)
5485 (make_source_files_completion_list): New.
5486 * top.c (init_main): Don't install a rl_completion_entry_function
5487 hook. Install a rl_attempted_completion_function hook instead.
5488 * tui/tui-layout.c (layout_completer): Adjust to work with a
5489 completion_tracker.
5490 * tui/tui-regs.c (tui_reggroup_completer):
5491 * tui/tui-win.c (window_name_completer, focus_completer)
5492 (winheight_completer): Adjust to work with a completion_tracker.
5493 * value.c: Include "completer.h".
5494 (complete_internalvar): Adjust to work with a completion_tracker.
5495 * value.h (complete_internalvar): Likewise.
5496
5497 2017-07-17 Pedro Alves <palves@redhat.com>
5498
5499 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5500 renames.
5501 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5502 comments to completer_ftype's declaration.
5503 <completer_handle_brkchars>: Change type to
5504 completer_handle_brkchars_ftype.
5505 * command.h (completer_ftype): Add describing comment and give
5506 names to parameters.
5507 (completer_ftype_void): Rename to ...
5508 (completer_handle_brkchars_ftype) ... this. Add describing comment.
5509 (set_cmd_completer_handle_brkchars): Adjust.
5510 * completer.c (filename_completer_handle_brkchars): New function.
5511 (complete_line_internal_normal_command): New function, factored
5512 out from ...
5513 (complete_line_internal): ... here.
5514 (command_completer_handle_brkchars)
5515 (default_completer_handle_brkchars)
5516 (completer_handle_brkchars_func_for_completer): New functions.
5517 * completer.h (set_gdb_completion_word_break_characters): Delete
5518 declaration.
5519 (completer_handle_brkchars_func_for_completer): New declaration.
5520 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5521 completer_handle_brkchars_func_for_completer.
5522
5523 2017-07-17 Pedro Alves <palves@redhat.com>
5524
5525 * completer.c (symbol_completer): New function, based on
5526 make_symbol_completion_list_fn.
5527 * completer.h (symbol_completer): New declaration.
5528 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5529 * python/py-cmd.c (completers): Adjust.
5530 * symtab.c (make_symbol_completion_list_fn): Delete.
5531 * symtab.h (make_symbol_completion_list_fn): Delete.
5532 * cli/cli-decode.c (add_cmd): Adjust.
5533
5534 2017-07-17 Pedro Alves <palves@redhat.com>
5535
5536 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5537 * dwarf2read.c: Include "filename-seen-cache.h".
5538 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5539 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5540 * filename-seen-cache.c: New file.
5541 * filename-seen-cache.h: New file.
5542 * symtab.c: Include "filename-seen-cache.h".
5543 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5544 (create_filename_seen_cache, clear_filename_seen_cache)
5545 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5546 to filename-seen-cache.h/filename-seen-cache.c.
5547 (output_source_filename, sources_info)
5548 (maybe_add_partial_symtab_filename)
5549 (make_source_files_completion_list): Adjust to use
5550 filename_seen_cache.
5551
5552 2017-07-17 Pedro Alves <palves@redhat.com>
5553
5554 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5555 fields.
5556 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5557 dwarf2_debug_sections*)): New.
5558 (dwarf2_per_objfile::dwarf2_per_objfile(const
5559 dwarf2_per_objfile&)): Declare as deleted.
5560 (dwarf2_per_objfile::operator=): Declare as deleted.
5561 (dwarf2_per_objfile::dwarf2_per_objfile)
5562 (dwarf2_per_objfile::~dwarf2_per_objfile)
5563 (dwarf2_per_objfile::free_cached_comp_units): New.
5564 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5565 ctor. Call dwarf2_per_objfile's ctor manually.
5566 (dwarf2_locate_sections): Deleted/refactored as ...
5567 (dwarf2_per_objfile::locate_sections): ... this new method.
5568 (free_cached_comp_units): Defer to
5569 dwarf2_per_objfile::free_cached_comp_units.
5570 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5571
5572 2017-07-14 Tom Tromey <tom@tromey.com>
5573
5574 PR rust/21764:
5575 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5576 parameter.
5577 <UNOP_SIZEOF>: Split into separate case.
5578 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5579
5580 2017-07-14 Tom Tromey <tom@tromey.com>
5581
5582 PR rust/21763:
5583 * symtab.c (symbol_matches_domain): Add language_rust to special
5584 case.
5585 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5586 treat LOC_TYPEDEF symbols as variables.
5587
5588 2017-07-14 Pedro Alves <palves@redhat.com>
5589
5590 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5591 symtabs matching all symtabs with SRCFILE as file name instead of
5592 only considering the first hit, with lookup_symtab.
5593
5594 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5595
5596 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5597 operator_name parameters.
5598 (gen_expr): Update function call.
5599
5600 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5601
5602 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5603 parameter.
5604 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5605 Likewise.
5606 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5607 parameter, use agent_expr::gdbarch instead, update function
5608 calls.
5609 (locexpr_tracepoint_var_ref): Likewise.
5610 (loclist_tracepoint_var_ref): Likewise.
5611 * ax-gdb.c (gen_trace_static_fields): Likewise.
5612 (gen_traced_pop): Likewise.
5613 (gen_frame_args_address): Likewise.
5614 (gen_frame_locals_address): Likewise.
5615 (gen_var_ref): Likewise.
5616 (gen_struct_ref_recursive): Likewise.
5617 (gen_static_field): Likewise.
5618 (gen_maybe_namespace_elt): Likewise.
5619 (gen_expr): Likewise.
5620 (gen_trace_for_var): Likewise.
5621 (gen_trace_for_expr): Likewise.
5622 (gen_trace_for_return_address): Likewise.
5623
5624 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5625
5626 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5627 parameter.
5628 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5629
5630 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5631
5632 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5633 from ax, update calls.
5634 (gen_usual_arithmetic): Likewise.
5635 (gen_integral_promotions): Likewise.
5636 (gen_bitfield_ref): Likewise.
5637 (gen_primitive_field): Likewise.
5638 (gen_struct_ref_recursive): Likewise.
5639 (gen_struct_ref): Likewise.
5640 (gen_maybe_namespace_elt): Likewise.
5641 (gen_struct_elt_for_reference): Likewise.
5642 (gen_namespace_elt): Likewise.
5643 (gen_aggregate_elt_ref): Likewise.
5644 (gen_expr): Get gdbarch from ax, update calls.
5645 (gen_expr_binop_rest): Likewise.
5646
5647 2017-07-13 Pedro Alves <palves@redhat.com>
5648
5649 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5650 as default tdesc.
5651 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5652 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5653 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5654 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5655 tdep.
5656 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5657 Get final tdesc from the tdep.
5658 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5659 default tdesc.
5660 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5661 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5662 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5663 Use it as default tdesc.
5664 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5665 down to amd_init_abi. No longer handle fallback tdesc here.
5666 * amd64-tdep.h (tdesc_x32): Declare.
5667 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5668 parameter.
5669 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5670 as default tdesc.
5671
5672 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5673
5674 * s390-linux-tdep.c (s390_process_record): Add support for
5675 instructions new in arch12.
5676
5677 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5678
5679 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5680 PT_GETFSBASE and PT_GETGSBASE.
5681 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5682 PT_SETGSBASE.
5683
5684 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5685
5686 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5687 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5688 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5689 those rules.
5690 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5691 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5692 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5693 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5694 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5695 * features/i386/amd64.xml: Add 64bit-segments.xml.
5696 * features/i386/amd64-avx-avx512.c: Regenerated.
5697 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5698 * features/i386/amd64-avx-mpx.c: Regenerated.
5699 * features/i386/amd64-avx.c: Regenerated.
5700 * features/i386/amd64-mpx.c: Regenerated.
5701 * features/i386/amd64.c: Regenerated.
5702 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5703 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5704 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5705 * regformats/i386/amd64-avx.dat: Regenerated.
5706 * regformats/i386/amd64-mpx.dat: Regenerated.
5707 * regformats/i386/amd64.dat: Regenerated.
5708
5709 2017-07-10 Yao Qi <yao.qi@linaro.org>
5710
5711 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5712 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5713
5714 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5715
5716 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5717 unsetenv.
5718 * gnulib/aclocal.m4: Regenerate.
5719 * gnulib/config.in: Regenerate.
5720 * gnulib/configure: Regenerate.
5721 * gnulib/import/Makefile.am: Regenerate.
5722 * gnulib/import/Makefile.in: Regenerate.
5723 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5724 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5725 * gnulib/import/m4/environ.m4: New file.
5726 * gnulib/import/m4/setenv.m4: New file.
5727 * gnulib/import/setenv.c: New file.
5728 * gnulib/import/unsetenv.c: New file.
5729
5730 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5731
5732 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5733 address when op is DW_OP_addr.
5734
5735 2017-07-09 Tom Tromey <tom@tromey.com>
5736
5737 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5738 check and apply to outer type.
5739
5740 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5741
5742 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5743 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5744 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5745 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5746
5747 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5748
5749 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5750
5751 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5752
5753 * corelow.c (get_core_siginfo): Remove.
5754 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5755 instead of get_core_siginfo.
5756 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5757 * gdbarch.h: Re-generate.
5758 * gdbarch.c: Re-generate.
5759 * linux-tdep.c (linux_core_xfer_siginfo): New.
5760 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5761
5762 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5763
5764 * corelow.c (thread_section_name): Move to ...
5765 * gdbcore.h (thread_section_name): ... here.
5766
5767 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5768
5769 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5770 (struct siginfo32): New.
5771 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5772 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5773 via ptrace(PT_LWPINFO).
5774
5775 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5776
5777 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5778 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5779 (fbsd_get_siginfo_type): New.
5780 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5781 (_initialize_fbsd_tdep): New.
5782
5783 2017-07-06 David Blaikie <dblaikie@gmail.com>
5784
5785 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5786 a singular dwo_unit*) to support multiple CUs in the same way that
5787 multiple TUs are supported.
5788 (create_cus_hash_table): Replace create_dwo_cu with a function for
5789 parsing multiple CUs from a DWO file.
5790 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5791 create_dwo_cu.
5792 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5793 htab_find, rather than comparing the signature to a singleton CU in
5794 the dwo_file.
5795
5796 2017-07-06 Pedro Alves <palves@redhat.com>
5797
5798 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5799
5800 2017-07-04 Pedro Alves <palves@redhat.com>
5801
5802 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5803 * gdbtypes.h (TYPE_STATIC): Delete.
5804 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5805 is_synchronized, is_native>: Delete.
5806 <dummy>: Bump.
5807 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5808 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5809 (TYPE_FN_FIELD_ABSTRACT): Delete.
5810
5811 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5812
5813 * buffer.h (buffer_finish): Fix spelling mistakes.
5814
5815 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5816
5817 * .dir-locals.el: Automatically switch to C-style comments in
5818 versions of Emacs that support the feature.
5819
5820 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5821 Pedro Alves <palves@redhat.com>
5822
5823 PR cli/21688
5824 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5825 (process_next_line): New variable 'inline_cmd'.
5826 Adjust 'if' clauses for "python", "compile" and "guile" to use
5827 'command_name_equals' and check for '!inline_cmd'.
5828
5829 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5830
5831 PR cli/21688
5832 * cli/cli-script.c (command_name_equals_not_inline): New function.
5833 (process_next_line): Adjust 'if' clauses for "python", "compile"
5834 and "guile" to use command_name_equals_not_inline.
5835
5836 2017-06-29 Pedro Alves <palves@redhat.com>
5837
5838 * completer.c (expression_completer): Call
5839 linespec_location_completer instead of location_completer.
5840
5841 2017-06-29 Pedro Alves <palves@redhat.com>
5842
5843 * completer.c (expression_completer): Remove code that recomputes
5844 'text' from 'word'.
5845
5846 2017-06-29 Yao Qi <yao.qi@linaro.org>
5847
5848 * regformats/regdat.sh: Generate code with
5849 "ifndef IN_PROCESS_AGENT".
5850
5851 2017-06-28 Pedro Alves <palves@redhat.com>
5852
5853 * command.h: Include "common/scoped_restore.h".
5854
5855 2017-06-28 Yao Qi <yao.qi@linaro.org>
5856
5857 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5858 instead of obstack_grow.
5859
5860 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5861
5862 PR gdb/21337
5863 * symfile.c (reread_symbols): Call objfiles_changed just before
5864 read_symbols.
5865
5866 2017-06-27 Pedro Alves <palves@redhat.com>
5867
5868 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5869 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5870 (completion_list_add_symbol, completion_list_add_msymbol):
5871 ... these new functions.
5872 (add_symtab_completions)
5873 (default_make_symbol_completion_list_break_on_1): Adjust.
5874
5875 2017-06-27 Pedro Alves <palves@redhat.com>
5876
5877 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5878 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5879 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5880 dtor.
5881 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5882 'storage_obstack' field an auto_obstack. In-class initialize all
5883 non-bitfield fields. Make minsyms_read bool.
5884 * symfile.c (read_symbols): Adjust.
5885
5886 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5887
5888 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5889 (gdbsim_store_register): Likewise.
5890
5891 2017-06-27 Pedro Alves <palves@redhat.com>
5892
5893 * c-exp.y (name_obstack): Now an auto_obstack.
5894 (yylex): Use auto_obstack::clear.
5895 (c_parse): Use auto_obstack::clear instead of reinitializing and
5896 freeing the obstack.
5897 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5898 * d-exp.y (name_obstack): Now an auto_obstack.
5899 (yylex): Use auto_obstack::clear.
5900 (d_parse): Use auto_obstack::clear instead of reinitializing and
5901 freeing the obstack.
5902 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5903 auto_obstack.
5904 * dwarf2read.c (create_addrmap_from_index)
5905 (dwarf2_build_psymtabs_hard)
5906 (update_enumeration_type_from_children): Likewise.
5907 * gdb_obstack.h (auto_obstack): New type.
5908 * go-exp.y (name_obstack): Now an auto_obstack.
5909 (build_packaged_name): Use auto_obstack::clear.
5910 (go_parse): Use auto_obstack::clear instead of reinitializing and
5911 freeing the obstack.
5912 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5913 auto_obstack.
5914 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5915 * rust-exp.y (work_obstack): Now an auto_obstack.
5916 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5917 reinitializing and freeing the obstack.
5918 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5919 (host_char_to_target): Use auto_obstack.
5920 * utils.h (make_cleanup_obstack_free): Delete declaration.
5921 * valprint.c (generic_emit_char, generic_printstr): Use
5922 auto_obstack.
5923
5924 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5925
5926 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5927 thread.
5928 (darwin_init_thread_list): Don't update dummy thread.
5929 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5930
5931 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5932
5933 * record-full.c (netorder16): Remove.
5934
5935 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5936
5937 * common/diagnostics.h: Define macros for GCC.
5938 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5939 * common/vec.h: Include diagnostics.h.
5940 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5941 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5942 warning.
5943
5944 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5945
5946 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5947 New macro.
5948 * ada-lex.l: Ignore deprecated register warnings.
5949
5950 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5951
5952 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5953 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5954
5955 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5956
5957 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5958 its own line.
5959
5960 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5961
5962 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5963
5964 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5965
5966 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5967 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5968 (xtensa_register_read_masked): Likewise.
5969
5970 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5971
5972 * common/environ.c (gdb_environ::unset): Update comment.
5973
5974 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5975
5976 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5977 registers.
5978
5979 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5980
5981 * record-full.c (record_full_exec_insn): Use byte_vector.
5982
5983 2017-06-22 Yao Qi <yao.qi@linaro.org>
5984
5985 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5986 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5987
5988 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5989
5990 * remote.c (cached_reg): Move from here...
5991 * regcache.h (cached_reg): ...to here.
5992 * python/py-unwind.c (struct reg_info): Remove.
5993 (cached_frame_info): Use cached_reg_t.
5994 (pyuw_prev_register): Likewise.
5995 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5996 (pyuw_dealloc_cache): Free all registers.
5997
5998 2017-06-22 Pedro Alves <palves@redhat.com>
5999 Simon Marchi <simon.marchi@ericsson.com>
6000
6001 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6002 warning.
6003 * common/diagnostics.h: New file.
6004
6005 2017-06-22 Pedro Alves <palves@redhat.com>
6006
6007 * common/agent.h: Add include guards.
6008
6009 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
6010
6011 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6012 talk about addressable units instead of bytes.
6013
6014 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6015
6016 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6017 of '::const_iterator'.
6018
6019 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6020
6021 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6022 'unittests/environ-selftests.c'.
6023 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6024 * charset.c (find_charset_names): Declare object 'iconv_env'.
6025 Update code to use 'iconv_env' object. Remove call to
6026 'free_environ'.
6027 * common/environ.c: Include <utility>.
6028 (make_environ): Delete function.
6029 (free_environ): Delete function.
6030 (gdb_environ::clear): New function.
6031 (gdb_environ::operator=): New function.
6032 (gdb_environ::get): Likewise.
6033 (environ_vector): Delete function.
6034 (set_in_environ): Delete function.
6035 (gdb_environ::set): New function.
6036 (unset_in_environ): Delete function.
6037 (gdb_environ::unset): New function.
6038 (gdb_environ::envp): Likewise.
6039 * common/environ.h: Include <vector>.
6040 (struct gdb_environ): Delete; transform into...
6041 (class gdb_environ): ... this class.
6042 (free_environ): Delete prototype.
6043 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6044 environ_vector): Likewise.
6045 * infcmd.c (run_command_1): Update code to call
6046 'envp' from 'gdb_environ' class.
6047 (environment_info): Update code to call methods from 'gdb_environ'
6048 class.
6049 (unset_environment_command): Likewise.
6050 (path_info): Likewise.
6051 (path_command): Likewise.
6052 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6053 (inferior::inferior): Initialize 'environment' using the host's
6054 information.
6055 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6056 Include "environ.h".
6057 (class inferior) <environment>: Change type from 'struct
6058 gdb_environ' to 'gdb_environ'.
6059 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6060 methods from 'gdb_environ' class.
6061 * solib.c (solib_find_1): Likewise
6062 * unittests/environ-selftests.c: New file.
6063
6064 2017-06-20 Yao Qi <yao.qi@linaro.org>
6065
6066 * features/i386/i386-linux.xml: Exchange the order of including
6067 32bit-linux.xml and 32bit-sse.xml.
6068 * features/i386/i386-linux.c: Regenerated.
6069
6070 2017-06-20 Yao Qi <yao.qi@linaro.org>
6071
6072 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6073 Delete copy ctor and assignment operator.
6074 (tdesc_type): Likewise.
6075 (tdesc_feature): Likewise.
6076 (tdesc_free_reg): Remove.
6077 (tdesc_create_reg): Use new.
6078 (tdesc_free_type): Remove.
6079 (tdesc_create_vector): Use new.
6080 (tdesc_create_union): Likewise.
6081 (tdesc_create_flags): Likewise.
6082 (tdesc_create_enum): Likewise.
6083 (tdesc_free_feature): Delete.
6084 (free_target_description): Use delete.
6085
6086 2017-06-19 John Baldwin <jhb@FreeBSD.org>
6087
6088 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6089 registers.
6090
6091 2017-06-19 Pedro Alves <palves@redhat.com>
6092
6093 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6094 after gdb::unlinker.
6095
6096 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6097
6098 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6099 gdb_environ to access an environment variable.
6100
6101 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6102
6103 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6104 gdb_byte*.
6105
6106 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6107
6108 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6109
6110 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6111
6112 * configure: Re-generate.
6113 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6114
6115 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6116
6117 * configure: Re-generate.
6118 * warning.m4: Pass -Werror to compiler when checking for
6119 supported warning flags.
6120
6121 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6122
6123 * Makefile.in (COMPILE.pre): Add "-x c++".
6124
6125 2017-06-16 Alan Hayward <alan.hayward@arm.com>
6126 Pedro Alves <palves@redhat.com>
6127 Yao Qi <yao.qi@linaro.org>
6128
6129 * defs.h (RequireLongest): New.
6130 (extract_integer): Declare function template.
6131 (extract_signed_integer): Remove the declaration, but define it
6132 static inline.
6133 (extract_unsigned_integer): Likewise.
6134 (store_integer): Declare function template.
6135 (store_signed_integer): Remove the declaration, but define it
6136 static inline.
6137 (store_unsigned_integer): Likewise.
6138 * findvar.c (extract_integer): New function template.
6139 (extract_signed_integer): Remove.
6140 (extract_unsigned_integer): Remove.
6141 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6142 instantiations.
6143 (store_integer): New function template.
6144 (store_signed_integer): Remove.
6145 (store_unsigned_integer): Remove.
6146 (store_integer): Explicit instantiations.
6147 * regcache.c (regcache_raw_read_signed): Update.
6148 (regcache::raw_read): New function.
6149 (regcache::raw_read_signed): Remove.
6150 (regcache::raw_read_unsigned): Remove.
6151 (regcache_raw_read_unsigned): Update.
6152 (regcache_raw_write_unsigned): Update.
6153 (regcache::raw_write_signed): Remove.
6154 (regcache::raw_write): New function.
6155 (regcache_cooked_read_signed): Update.
6156 (regcache::raw_write_unsigned): Remove.
6157 (regcache::cooked_read_signed): Remove.
6158 (regcache_cooked_read_unsigned): Update.
6159 (regcache::cooked_read_unsigned): Remove.
6160 (regcache_cooked_write_signed): Update.
6161 (regcache_cooked_write_unsigned): Update.
6162 * regcache.h (regcache) <raw_read_signed>: Remove.
6163 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6164 <raw_read, raw_write>: New.
6165 <cooked_read_signed, cooked_write_signed>: Remove.
6166 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6167 <cooked_read, cooked_write>: New.
6168 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6169 (sh64_pseudo_register_write): Update.
6170
6171 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6172
6173 * arc-tdep.c (arc_disassembler_options): New variable.
6174 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6175 of default_print_insn.
6176 (arc_delayed_print_insn): Set info->section when needed,
6177 use default_print_insn to retrieve a disassembler.
6178
6179 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6180
6181 PR gdb/21574
6182 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6183 to mention $SHELL and startup-with-shell.
6184
6185 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6186
6187 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6188
6189 2017-06-14 Yao Qi <yao.qi@linaro.org>
6190
6191 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6192 default_print_insn instead of print_insn_aarch64.
6193 * arm-tdep.c (gdb_print_insn_arm): Call
6194 default_print_insn instead of print_insn_big_arm
6195 and print_insn_little_arm.
6196 * i386-tdep.c (i386_print_insn): Call default_print_insn
6197 instead of print_insn_i386.
6198 * ia64-tdep.c (ia64_print_insn): Call
6199 default_print_insn instead of print_insn_ia64.
6200 * mips-tdep.c (gdb_print_insn_mips): Call
6201 default_print_insn instead of print_insn_big_mips
6202 and print_insn_little_mips.
6203 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6204 instead of print_insn_spu.
6205
6206 2017-06-14 Pedro Alves <palves@redhat.com>
6207
6208 * ada-lang.c: Include "common/byte-vector.h".
6209 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6210 * charset.c (wchar_iterator::iterate): Resize the vector instead
6211 of reserving it.
6212 * common/byte-vector.h: Include "common/def-vector.h".
6213 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6214 * cli/cli-dump.c: Include "common/byte-vector.h".
6215 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6216 * common/byte-vector.h: New file.
6217 * common/def-vector.h: New file.
6218 * common/default-init-alloc.h: New file.
6219 * dwarf2loc.c: Include "common/byte-vector.h".
6220 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6221 instead of reserving it.
6222 * dwarf2read.c: Include "common/byte-vector.h".
6223 (data_buf::m_vec): Now a gdb::byte_vector.
6224 * gdb_regex.c: Include "common/def-vector.h".
6225 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6226 * mi/mi-main.c: Include "common/byte-vector.h".
6227 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6228 * printcmd.c: Include "common/byte-vector.h".
6229 (print_scalar_formatted): Use gdb::byte_vector.
6230 * valprint.c: Include "common/byte-vector.h".
6231 (maybe_negate_by_bytes, print_decimal_chars): Use
6232 gdb::byte_vector.
6233
6234 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6235
6236 * darwin-nat.c: Include "nat/fork-inferior.h".
6237
6238 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6239
6240 * configure.nat: Factor out Darwin bits that are not
6241 architecture-specific. Add fork-inferior.o.
6242
6243 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6244
6245 * configure.nat: Factor out AIX bits that are not
6246 architecture-specific. Add fork-inferior.o.
6247
6248 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6249
6250 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6251 (read_pieced_value, write_pieced_value): ...here. Reduce to
6252 wrappers that just call rw_pieced_value.
6253
6254 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6255
6256 * dwarf2loc.c (write_pieced_value): When writing the data for a
6257 memory piece, use write_memory_with_notification instead of
6258 write_memory.
6259
6260 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6261
6262 * valops.c (read_value_memory): Change embedded_offset to
6263 represent a bit offset instead of a byte offset.
6264 * value.h (read_value_memory): Adjust comment.
6265
6266 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6267
6268 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6269 dest_offset_bits and source_offset_bits.
6270 (write_pieced_value): Likewise.
6271
6272 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6273
6274 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6275 given by DW_OP_bit_piece.
6276 (write_pieced_value): Likewise.
6277
6278 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6279
6280 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6281 some other preparations to the places where sufficient information
6282 is available.
6283 (write_pieced_value): Likewise.
6284
6285 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6286
6287 * dwarf2loc.c (bits_to_bytes): New function.
6288 (read_pieced_value): Fix offset calculations for register pieces
6289 on big-endian targets.
6290 (write_pieced_value): Likewise.
6291
6292 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6293
6294 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6295 (write_pieced_value): Likewise.
6296
6297 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6298
6299 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6300 transfer the source value's least significant bits, instead of its
6301 lowest-addressed ones. Rename type_len to max_offset.
6302 (read_pieced_value): Mirror above changes to write_pieced_value as
6303 applicable.
6304
6305 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6306
6307 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6308 truncate full bytes from dest_offset_bits before using it as an
6309 offset into the buffer.
6310
6311 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6312
6313 * dwarf2loc.c (write_pieced_value): Include transfer size in
6314 byte-wise check.
6315
6316 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6317
6318 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6319 calculation of this_size.
6320
6321 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6322
6323 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6324 when targeting a bit-field.
6325 (write_pieced_value): Likewise.
6326
6327 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6328
6329 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6330 (allocate_piece_closure): Drop addr_size parameter.
6331 (dwarf2_evaluate_loc_desc_full): Adjust call to
6332 allocate_piece_closure.
6333
6334 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6335
6336 PR gdb/21226
6337 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6338 the LSB end, independent of endianness.
6339
6340 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6341
6342 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6343 size capping.
6344
6345 2017-06-13 Yao Qi <yao.qi@linaro.org>
6346
6347 * mips-linux-nat.c: Move include features/mips*-linux.c to
6348 mips-linux-tdep.c.
6349 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6350 to mips-linux-tdep.c.
6351 * mips-linux-tdep.c: Include features/mips*-linux.c
6352 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6353 functions.
6354 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6355 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6356 (tdesc_mips64_dsp_linux): Declare.
6357
6358 2017-06-12 Tom Tromey <tom@tromey.com>
6359
6360 * valprint.h (val_print_type_code_int): Remove.
6361 * valprint.c (generic_val_print_int): Always call
6362 val_print_scalar_formatted.
6363 (val_print_type_code_int): Remove.
6364 * printcmd.c (print_scalar_formatted): Handle options->format==0.
6365 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6366 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6367 * ada-valprint.c (ada_val_print_num): Use
6368 val_print_scalar_formatted.
6369
6370 2017-06-12 Tom Tromey <tom@tromey.com>
6371
6372 * printcmd.c (print_scalar_formatted): Unify the two switches.
6373 Don't convert scalars to LONGEST.
6374
6375 2017-06-12 Tom Tromey <tom@tromey.com>
6376
6377 PR exp/16225:
6378 * valprint.h (print_decimal_chars): Update.
6379 * valprint.c (maybe_negate_by_bytes): New function.
6380 (print_decimal_chars): Add "is_signed" argument.
6381 * printcmd.c (print_scalar_formatted): Update.
6382
6383 2017-06-12 Tom Tromey <tom@tromey.com>
6384
6385 PR exp/16225:
6386 * valprint.h (print_binary_chars, print_hex_chars): Update.
6387 * valprint.c (val_print_type_code_int): Update.
6388 (print_binary_chars): Add "zero_pad" argument.
6389 (emit_octal_digit): New function.
6390 (print_octal_chars): Don't zero-pad.
6391 (print_decimal_chars): Likewise.
6392 (print_hex_chars): Add "zero_pad" argument.
6393 * sh64-tdep.c (sh64_do_fp_register): Update.
6394 * regcache.c (regcache::dump): Update.
6395 * printcmd.c (print_scalar_formatted): Update.
6396 * infcmd.c (default_print_one_register_info): Update.
6397
6398 2017-06-12 Pedro Alves <palves@redhat.com>
6399 Alan Hayward <alan.hayward@arm.com>
6400
6401 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6402 (mips_eabi_push_dummy_call): Rename local 'regsize' to
6403 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
6404 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6405 Assert that abi_regsize bytes fit in 'ref_valbuf'.
6406
6407 2017-06-12 Pedro Alves <palves@redhat.com>
6408
6409 * dwarf2read.c (mapped_symtab::data): Now a vector of
6410 symtab_index_entry instead of vector of
6411 std::unique_ptr<symtab_index_entry>. All users adjusted to check
6412 whether an element's name is NULL instead of checking whether the
6413 element itself is NULL.
6414 (find_slot): Change return type. Adjust.
6415 (hash_expand, , add_index_entry, uniquify_cu_indices)
6416 (write_hash_table): Adjust.
6417
6418 2017-06-12 Pedro Alves <palves@redhat.com>
6419
6420 * dwarf2read.c (recursively_count_psymbols): New function.
6421 (write_psymtabs_to_index): Call it to compute number of psyms and
6422 pass estimate size of psyms_seen to unordered_set's ctor.
6423
6424 2017-06-12 Pedro Alves <palves@redhat.com>
6425
6426 * dwarf2read.c (write_hash_table): Check if key already exists
6427 before emplacing.
6428
6429 2017-06-12 Pedro Alves <palves@redhat.com>
6430
6431 * dwarf2read.c (data_buf::append_space): Rename to...
6432 (data_buf::grow): ... this, and make private. Adjust all callers.
6433 (data_buf::append_uint): New method.
6434 (add_address_entry, write_one_signatured_type)
6435 (write_psymtabs_to_index): Use it.
6436
6437 2017-06-12 Pedro Alves <palves@redhat.com>
6438
6439 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6440 (file_write (FILE *, const std::vector<Elem>&)): Delete.
6441 (data_buf::file_write): Call ::fwrite directly.
6442
6443 2017-06-12 Pedro Alves <palves@redhat.com>
6444
6445 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6446 std::vector::erase.
6447
6448 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6449
6450 Code cleanup: C++ify .gdb_index producer.
6451 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6452 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6453 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6454 (create_strtab, add_string): Remove.
6455 (file_write, data_buf): New.
6456 (struct symtab_index_entry): Use std::vector for cu_indices.
6457 (struct mapped_symtab): Use std::vector for data.
6458 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6459 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6460 Remove.
6461 (find_slot): Change return type. Update it to the new data structures.
6462 (hash_expand, add_index_entry): Update it to the new data structures.
6463 (offset_type_compare): Remove.
6464 (uniquify_cu_indices): Update it to the new data structures.
6465 (c_str_view, c_str_view_hasher, vector_hasher): New.
6466 (add_indices_to_cpool): Remove.
6467 (write_hash_table): Update it to the new data structures.
6468 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6469 (eq_psymtab_cu_index): Remove.
6470 (psym_index_map): New typedef.
6471 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6472 reference and std::unordered_map for cu_index_htab.
6473 (add_address_entry, add_address_entry_worker, write_address_map)
6474 (write_psymbols): Update it to the new data structures.
6475 (write_obstack): Remove.
6476 (struct signatured_type_index_data): Change types_list to a data_buf
6477 reference and psyms_seen to a std::unordered_set reference.
6478 (write_one_signatured_type, recursively_write_psymbols)
6479 (write_psymtabs_to_index): Update it to the new data structures.
6480
6481 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
6482
6483 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6484 separate-debug-file commands.
6485 * symfile.h (separate_debug_file_debug): New global.
6486 * symfile.c (separate_debug_file_debug): New global.
6487 (separate_debug_file_exists, find_separate_debug_file): Add
6488 debug output.
6489 (_initialize_symfile): Add "set debug separate-debug-file"
6490 command.
6491 * build-id.c (build_id_to_debug_bfd,
6492 find_separate_debug_file_by_buildid): Add debug output.
6493
6494 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6495
6496 * gdbarch.sh (displaced_step_free_closure): Remove.
6497 * gdbarch.h, gdbarch.c: Re-generate.
6498 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6499 displaced_step_free_closure.
6500 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6501 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6502 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6503 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6504 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6505 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6506 * arch-utils.h (simple_displaced_step_free_closure): Remove.
6507 * arch-utils.c (simple_displaced_step_free_closure): Remove.
6508 * infrun.c (displaced_step_clear): Call xfree instead of
6509 gdbarch_displaced_step_free_closure.
6510
6511 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6512
6513 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6514 NULL".
6515
6516 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6517
6518 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6519 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6520 (mn10300_push_dummy_call): Likewise.
6521
6522 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6523
6524 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6525
6526 2017-06-08 Alan Hayward <alan.hayward@arm.com>
6527
6528 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6529
6530 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6531
6532 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6533 able to start inferiors using a shell.
6534 (New remote packets): Announce new packet "QStartupWithShell".
6535 * remote.c: Add PACKET_QStartupWithShell.
6536 (extended_remote_create_inferior): Handle new
6537 PACKET_QStartupWithShell.
6538 (remote_protocol_features) <QStartupWithShell>: New entry for
6539 PACKET_QStartupWithShell.
6540 (_initialize_remote): Call "add_packet_config_cmd" for
6541 QStartupShell.
6542
6543 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6544 Pedro Alves <palves@redhat.com>
6545
6546 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6547 and "nat/fork-inferior.h".
6548 * common/common-inferior.h: New file, with contents from
6549 "gdb/inferior.h".
6550 * commom/common-utils.c: Include "common-utils.h".
6551 (stringify_argv): New function.
6552 * common/common-utils.h (stringify_argv): New prototype.
6553 * configure.nat: Add "fork-inferior.o" as a dependency for
6554 "*linux*", "fbsd*" and "nbsd*" hosts.
6555 * corefile.c (get_exec_file): Update comment.
6556 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6557 instead of "startup_inferior".
6558 (darwin_create_inferior): Call "add_thread_silent" after
6559 "fork_inferior".
6560 * fork-child.c: Cleanup unnecessary includes.
6561 (SHELL_FILE): Move to "common/common-fork-child.c".
6562 (environ): Likewise.
6563 (exec_wrapper): Initialize.
6564 (get_exec_wrapper): New function.
6565 (breakup_args): Move to "common/common-fork-child.c"; rename to
6566 "breakup_args_for_exec".
6567 (escape_bang_in_quoted_argument): Move to
6568 "common/common-fork-child.c".
6569 (saved_ui): New variable.
6570 (prefork_hook): New function.
6571 (postfork_hook): Likewise.
6572 (postfork_child_hook): Likewise.
6573 (gdb_startup_inferior): Likewise.
6574 (fork_inferior): Move to "common/common-fork-child.c". Update
6575 function to support gdbserver.
6576 (startup_inferior): Likewise.
6577 * gdbcore.h (get_exec_file): Remove declaration.
6578 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6579 instead of "startup_inferior". Call "add_thread_silent" after
6580 "fork_inferior".
6581 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6582 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6583 instead of "startup_inferior". Call "add_thread_silent" after
6584 "fork_inferior".
6585 * inferior.h: Include "common-inferior.h".
6586 (trace_start_error): Move to "common/common-utils.h".
6587 (trace_start_error_with_name): Likewise.
6588 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6589 (startup_inferior): Likewise.
6590 (gdb_startup_inferior): New prototype.
6591 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6592 * nat/fork-inferior.h: New file.
6593 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6594 instead of "startup_inferior". Call "add_thread_silent" after
6595 "fork_inferior".
6596 * target.h (target_terminal_init): Move prototype to
6597 "target/target.h".
6598 (target_terminal_inferior): Likewise.
6599 (target_terminal_ours): Likewise.
6600 * target/target.h (target_terminal_init): New prototype, moved
6601 from "target.h".
6602 (target_terminal_inferior): Likewise.
6603 (target_terminal_ours): Likewise.
6604 * utils.c (gdb_flush_out_err): New function.
6605
6606 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6607
6608 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6609 * common/common-gdbthread.h: New file, with parts from
6610 "gdb/gdbthread.h".
6611 * gdbthread.h: Include "common-gdbthread.h".
6612 (switch_to_thread): Moved to "common/common-gdbthread.h".
6613
6614 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6615
6616 * Makefile.in (SFILES): Add "common/job-control.c".
6617 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6618 (COMMON_OBS): Add "job-control.o".
6619 * common/job-control.c: New file, with contents from
6620 "gdb/inflow.c".
6621 * common/job-control.h: New file, with contents from "terminal.h".
6622 * fork-child.c: Include "job-control.h".
6623 * inflow.c: Include "job-control.h".
6624 (gdb_setpgid): Move to "common/common-inflow.c".
6625 (_initialize_inflow): Move setting of "job_control" to
6626 "handle_job_control".
6627 * terminal.h (job_control): Moved to "common/common-terminal.h".
6628 (gdb_setpgid): Likewise.
6629 * top.c: Include "job_control.h".
6630 * utils.c: Likewise.
6631 (job_control): Moved to "job-control.c".
6632
6633 2017-06-07 Pedro Alves <palves@redhat.com>
6634
6635 * Makefile.in (SFILES): Add gdb_regex.c.
6636 (COMMON_OBS): Add gdb_regex.o.
6637 * ada-lang.c (ada_add_standard_exceptions)
6638 (ada_add_exceptions_from_frame, name_matches_regex)
6639 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6640 parameter type to compiled_regex. Adjust.
6641 (ada_exceptions_list): Use compiled_regex.
6642 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6643 std::unique_ptr<compiled_regex>.
6644 (exception_catchpoint::~exception_catchpoint): Remove regfree
6645 call.
6646 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6647 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6648 * breakpoint.c (solib_catchpoint::compiled): Now a
6649 std::unique_ptr<compiled_regex>.
6650 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6651 (check_status_catch_solib): Adjust to use compiled_regex.
6652 (add_solib_catchpoint): Adjust to use compiled_regex.
6653 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6654 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6655 compiled_regex reference. Adjust to use it.
6656 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6657 declaration. Include "gdb_regex.h".
6658 (apropos_cmd): Change regex parameter to compiled_regex reference.
6659 * gdb_regex.c: New file.
6660 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6661 declarations.
6662 (class compiled_regex): New.
6663 * linux-tdep.c: Include "common/gdb_optional.h".
6664 (struct mapping_regexes): New, factored out from
6665 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6666 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6667 gdb::optional and remove cleanups. Adjust to compiled_regex.
6668 * probe.c: Include "common/gdb_optional.h".
6669 (collect_probes): Use compiled_regex and gdb::optional and remove
6670 cleanups.
6671 * skip.c: Include "common/gdb_optional.h".
6672 (skiplist_entry::compiled_function_regexp): Now a
6673 gdb::optional<compiled_regex>.
6674 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6675 (free_skiplist_entry): Remove regfree call.
6676 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6677 compiled_regex and gdb::optional.
6678 * symtab.c: Include "common/gdb_optional.h".
6679 (search_symbols): Use compiled_regex and gdb::optional.
6680 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6681 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6682 to gdb_regex.c.
6683
6684 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6685
6686 * regcache.c (regcache::save): Avoid buffer use.
6687 (regcache::dump): Likewise.
6688
6689 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6690
6691 * sh-tdep.c (sh_pseudo_register_read): Remove
6692 MAX_REGISTER_SIZE.
6693 (sh_pseudo_register_write): Likewise.
6694 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6695 (sh64_pseudo_register_write): Likewise
6696
6697 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6698
6699 * aarch64-tdep.c (aarch64_store_return_value): Use
6700 V_REGISTER_SIZE.
6701 (aarch64_pseudo_read_value): Likewise.
6702 (aarch64_pseudo_write): Likewise.
6703
6704 2017-06-06 Yao Qi <yao.qi@linaro.org>
6705
6706 * regformats/regdef.h (set_register_cache): Remove the
6707 declaration.
6708
6709 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6710
6711 * frame.c (frame_unwind_register_signed): Use
6712 frame_unwind_register_value.
6713
6714 2017-06-06 Pedro Alves <palves@redhat.com>
6715
6716 PR breakpoints/21553
6717 * breakpoint.c (create_breakpoints_sal_default)
6718 (init_breakpoint_sal, create_breakpoint_sal): Use
6719 gdb::unique_xmalloc_ptr for string parameters.
6720 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6721 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6722 (base_breakpoint_create_breakpoints_sal)
6723 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6724 (strace_marker_create_breakpoints_sal)
6725 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6726 string parameters.
6727 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6728 gdb::unique_xmalloc_ptr for string parameters.
6729 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6730 parameters.
6731
6732 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6733
6734 * alpha-tdep.c (alpha_register_to_value): Use
6735 get_frame_register_value.
6736 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6737
6738 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6739
6740 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6741 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6742 (ia64_value_to_register): Likewise.
6743 (ia64_extract_return_value): Likewise.
6744 (ia64_store_return_value): Likewise.
6745 (ia64_push_dummy_call): Likewise.
6746
6747 2017-06-04 Joel Brobecker <brobecker@adacore.com>
6748
6749 GDB 8.0 released.
6750
6751 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6752
6753 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6754
6755 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6756
6757 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6758 parameter.
6759 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6760
6761 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6762
6763 * event-loop.c (poll_timers): Unallocate timer using delete
6764 instead of xfree.
6765
6766 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6767
6768 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6769 (struct breakpoint) <~breakpoint>: New.
6770 (struct watchpoint): Inherit from breakpoint.
6771 <~watchpoint>: New.
6772 <base>: Remove.
6773 (struct tracepoint): Inherit from breakpoint.
6774 <base>: Remove.
6775 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6776 (struct longjmp_breakpoint): Inherit from breakpoint.
6777 <~longjmp_breakpoint>: New.
6778 <base>: Remove.
6779 (new_breakpoint_from_type): Remove casts.
6780 (watchpoint_in_thread_scope): Remove reference to base field.
6781 (watchpoint_del_at_next_stop): Likewise.
6782 (update_watchpoint): Likewise.
6783 (watchpoint_check): Likewise.
6784 (bpstat_check_watchpoint): Likewise.
6785 (set_longjmp_breakpoint): Likewise.
6786 (struct fork_catchpoint): Inherit from breakpoint.
6787 <base>: Remove.
6788 (struct solib_catchpoint): Inherit from breakpoint.
6789 <~solib_catchpoint>: New.
6790 <base>: Remove.
6791 (dtor_catch_solib): Change to ...
6792 (solib_catchpoint::~solib_catchpoint): ... this.
6793 (breakpoint_hit_catch_solib): Remove reference to base field.
6794 (add_solib_catchpoint): Likewise.
6795 (create_fork_vfork_event_catchpoint): Likewise.
6796 (struct exec_catchpoint): Inherit from breakpoint.
6797 <~exec_catchpoint>: New.
6798 <base>: Remove.
6799 (dtor_catch_exec): Change to ...
6800 (exec_catchpoint::~exec_catchpoint): ... this.
6801 (dtor_watchpoint): Change to ...
6802 (watchpoint::~watchpoint): ... this.
6803 (watch_command_1): Remove reference to base field.
6804 (catch_exec_command_1): Likewise.
6805 (base_breakpoint_dtor): Change to ...
6806 (breakpoint::~breakpoint): ... this.
6807 (base_breakpoint_ops): Remove dtor field value.
6808 (longjmp_bkpt_dtor): Change to ...
6809 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6810 (strace_marker_create_breakpoints_sal): Remove reference to base
6811 field.
6812 (delete_breakpoint): Don't manually call breakpoint destructor.
6813 (create_tracepoint_from_upload): Remove reference to base field.
6814 (trace_pass_set_count): Likewise.
6815 (initialize_breakpoint_ops): Don't initialize
6816 momentary_breakpoint_ops, don't set dtors.
6817 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6818 <~ada_catchpoint>: New.
6819 <base>: Remove.
6820 (create_excep_cond_exprs): Remove reference to base field.
6821 (dtor_exception): Change to ...
6822 (ada_catchpoint::~ada_catchpoint): ... this.
6823 (dtor_catch_exception): Remove.
6824 (dtor_catch_exception_unhandled): Remove.
6825 (dtor_catch_assert): Remove.
6826 (create_ada_exception_catchpoint): Remove reference to base
6827 field.
6828 (initialize_ada_catchpoint_ops): Don't set dtors.
6829 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6830 breakpoint.
6831 <~signal_catchpoint>: New.
6832 <base>: Remove.
6833 (signal_catchpoint_dtor): Change to ...
6834 (signal_catchpoint::~signal_catchpoint): ... this.
6835 (create_signal_catchpoint): Remove reference to base field.
6836 (initialize_signal_catchpoint_ops): Don't set dtor.
6837 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6838 from breakpoint.
6839 <~syscall_catchpoint>: New.
6840 <base>: Remove.
6841 (dtor_catch_syscall): Change to ...
6842 (syscall_catchpoint::~syscall_catchpoint): ... this.
6843 (create_syscall_event_catchpoint): Remove reference to base
6844 field.
6845 (initialize_syscall_catchpoint_ops): Don't set dtor.
6846 * break-catch-throw.c (struct exception_catchpoint): Inherit
6847 from breakpoint.
6848 <~exception_catchpoint>: New.
6849 <base>: Remove.
6850 (dtor_exception_catchpoint): Change to ...
6851 (exception_catchpoint::~exception_catchpoint): ... this.
6852 (handle_gnu_v3_exceptions): Remove reference to base field.
6853 (initialize_throw_catchpoint_ops): Don't set dtor.
6854 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6855 field.
6856 * remote.c (remote_get_tracepoint_status): Likewise.
6857 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6858 * tracefile.c (tracefile_fetch_registers): Likewise.
6859 * tracepoint.c (actions_command): Likewise.
6860 (validate_actionline): Likewise.
6861 (tfind_1): Likewise.
6862 (get_traceframe_location): Likewise.
6863 (find_matching_tracepoint_location): Likewise.
6864 (parse_tracepoint_status): Likewise.
6865 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6866
6867 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6868
6869 * breakpoint.c (struct longjmp_breakpoint): New struct.
6870 (is_tracepoint_type): Change return type to bool.
6871 (is_longjmp_type): New function.
6872 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6873 (set_raw_breakpoint_without_location): Use
6874 new_breakpoint_from_type.
6875 (set_raw_breakpoint): Likewise.
6876
6877 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6878
6879 * breakpoint.c (new_breakpoint_from_type): New function.
6880 (create_breakpoint_sal): Use new_breakpoint_from_type and
6881 unique_ptr.
6882 (create_breakpoint): Likewise.
6883
6884 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6885
6886 * memattr.c (mem_info_command): Rename to ...
6887 (info_mem_command): ... this.
6888 (mem_enable_command): Rename to ...
6889 (enable_mem_command): ... this.
6890 (mem_disable_command): Rename to ...
6891 (disable_mem_command): ... this.
6892 (mem_delete_command): Rename to ...
6893 (delete_mem_command): ... this.
6894 (_initialize_mem): Adjust function names.
6895
6896 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6897
6898 * btrace.c (handle_pt_insn_events): New.
6899 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6900 STATUS. Split into this and ...
6901 (handle_pt_insn_event_flags): ... this.
6902
6903 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6904
6905 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6906 and struct pt_insn.resynced.
6907 * configure: Regenerated.
6908 * config.in: Regenerated.
6909
6910 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6911
6912 * btrace.c (ftrace_find_call_by_number): New function.
6913 (ftrace_new_function): Store objects, not pointers.
6914 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6915 ftrace_new_gap, ftrace_update_function,
6916 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6917 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6918 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6919 btrace_ends_with_single_insn, btrace_call_get): Account for
6920 btrace_thread_info::functions now storing objects.
6921 * btrace.h (struct btrace_thread_info): Add constructor.
6922 (struct btrace_thread_info) <functions>: Make std::vector.
6923 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6924 Initialize with default values.
6925 * record-btrace.c (record_btrace_frame_sniffer): Account for
6926 btrace_thread_info::functions now storing objects.
6927
6928 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6929
6930 * btrace.c: Remove typedef bfun_s.
6931 (ftrace_new_gap): Directly add gaps to the list of gaps.
6932 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6933 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6934 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6935 instead of gdb VEC.
6936
6937 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6938
6939 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6940 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6941 with btrace_thread_info::next_segment and
6942 btrace_thread_info::prev_segment.
6943 * btrace.h: Remove struct btrace_func_link.
6944 (struct btrace_function): Replace pair of function segment pointers
6945 with pair of indices.
6946 * python/py-record-btrace.c (btpy_call_prev_sibling,
6947 btpy_call_next_sibling): Replace references to
6948 btrace_thread_info::segment with btrace_thread_info::next_segment and
6949 btrace_thread_info::prev_segment.
6950 * record-btrace.c (record_btrace_frame_this_id): Use
6951 btrace_find_call_by_number.
6952
6953 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6954
6955 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6956 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6957 btrace_insn_next, btrace_insn_prev): Remove references to
6958 btrace_thread_info::flow.
6959 * btrace.h (struct btrace_function): Remove FLOW.
6960
6961 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6962
6963 * btrace.c (ftrace_find_call_by_number): New function.
6964 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6965 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6966 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6967 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6968 index.
6969 * btrace.h (struct btrace_function): Turn UP into an index.
6970 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6971 as an index.
6972 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6973 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6974 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6975
6976 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6977
6978 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6979 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6980 ftrace_update_function, ftrace_compute_global_level_offset,
6981 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6982 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6983 btrace_insn_end, btrace_is_empty): Remove references to
6984 btrace_thread_info::begin and btrace_thread_info::end.
6985 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6986 (struct btrace_thread_info) <functions>: Adjust comment.
6987 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6988 btrace_thread_info::begin.
6989
6990 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6991
6992 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6993 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6994 ftrace_update_function): Remove arguments that implicitly were always
6995 BTINFO->END.
6996 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6997 Don't pass BTINFO->END.
6998
6999 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7000
7001 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7002 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7003 btrace_find_insn_by_number): Replace function segment pointer with
7004 index.
7005 (btrace_insn_cmp): Simplify.
7006 * btrace.h: (struct btrace_insn_iterator) Rename index to
7007 insn_index. Replace function segment pointer with index into function
7008 segment vector.
7009 * record-btrace.c (record_btrace_call_history): Replace function
7010 segment pointer use with index.
7011 (record_btrace_frame_sniffer): Retrieve function call segment through
7012 vector.
7013 (record_btrace_set_replay): Remove defunc't safety check.
7014
7015 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7016
7017 * btrace.c (btrace_ends_with_single_insn): New function.
7018 (btrace_call_get, btrace_call_number, btrace_call_begin,
7019 btrace_call_end, btrace_call_next, btrace_call_prev,
7020 btrace_find_call_by_number): Use index into call segment vector
7021 instead of pointer.
7022 (btrace_call_cmp): Simplify.
7023 * btrace.h (struct btrace_call_iterator): Replace function call segment
7024 pointer with index into vector.
7025 * record-btrace.c (record_btrace_call_history): Use index instead of
7026 pointer.
7027
7028 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7029
7030 * btrace.c (btrace_insn_begin, btrace_insn_end,
7031 btrace_find_insn_by_number): Add btinfo to iterator.
7032 * btrace.h (struct btrace_insn_iterator): Add btinfo.
7033
7034 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7035
7036 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7037 and save pointers directly.
7038 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7039 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7040 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
7041 changed signature of functions.
7042 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7043 (btrace_fetch): Remove code that adds btrace_function pointers to
7044 vector of btrace_functions.
7045 (btrace_clear): Simplify freeing vector of btrace_functions.
7046
7047 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
7048
7049 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7050 Replace VEC_* with std::vector functions.
7051 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7052 (struct btrace_thread_info)<functions>: Change type to std::vector.
7053
7054 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
7055
7056 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
7057 "Removed targets and native configurations" up. Merge duplicate
7058 "New commands" sub-sections. Add "New options" sub-sections.
7059
7060 2017-05-26 Alan Hayward <alan.hayward@arm.com>
7061
7062 * defs.h (copy_integer_to_size): New declaration.
7063 * findvar.c (copy_integer_to_size): New function.
7064 (do_cint_test): New selftest function.
7065 (copy_integer_to_size_test): Likewise.
7066 (_initialize_findvar): Likewise.
7067 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7068 (mips_fbsd_collect_reg): Use raw_collect_integer.
7069 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7070 (mips64_fill_gregset): Use raw_collect_integer
7071 (mips64_fill_fpregset): Use raw_supply_integer.
7072 * regcache.c (regcache::raw_supply_integer): New function.
7073 (regcache::raw_collect_integer): Likewise.
7074 * regcache.h: (regcache::raw_supply_integer): New declaration.
7075 (regcache::raw_collect_integer): Likewise.
7076
7077 2017-05-24 Yao Qi <yao.qi@linaro.org>
7078
7079 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7080 (COMMON_OBS): Add gdbarch-selftests.o.
7081 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7082 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7083 * gdbarch-selftests.c: New file.
7084 * regcache.h (regcache) <~regcache>: Mark it virtual if
7085 GDB_SELF_TEST.
7086 <raw_write>: Likewise.
7087
7088 2017-05-24 Yao Qi <yao.qi@linaro.org>
7089
7090 * regcache.c (current_regcache): Change it to
7091 regcache::current_regcache.
7092 (regcache_observer_target_changed): Update.
7093 (regcache_thread_ptid_changed): Make it a regcache static
7094 method.
7095 (regcache_thread_ptid_changed): Update.
7096 (class regcache_access): New.
7097 (current_regcache_test): Update.
7098 (_initialize_regcache): Update.
7099 * regcache.h: Include forward_list.
7100 (regcache): Declare regcache_thread_ptid_changed and declare
7101 registers_changed_ptid as friend.
7102
7103 2017-05-24 Yao Qi <yao.qi@linaro.org>
7104
7105 * i387-tdep.c (i387_register_to_value): Use register_size
7106 instead of TYPE_LENGTH.
7107 * m68k-tdep.c (m68k_register_to_value): Likewise.
7108
7109 2017-05-24 Yao Qi <yao.qi@linaro.org>
7110
7111 * i387-tdep.c (i387_convert_register_p): Return false if type
7112 code isn't TYPE_CODE_FLT.
7113
7114 2017-05-24 Yao Qi <yao.qi@linaro.org>
7115
7116 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7117 length is 4.
7118 (alpha_register_to_value): Remove type length check.
7119 (alpha_value_to_register): Likewise.
7120
7121 2017-05-24 Yao Qi <yao.qi@linaro.org>
7122
7123 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7124 TYPE_CODE_FLT.
7125
7126 2017-05-24 Yao Qi <yao.qi@linaro.org>
7127
7128 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7129 TYPE_CODE_FLT or not.
7130
7131 2017-05-24 Yao Qi <yao.qi@linaro.org>
7132
7133 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7134 * avr-tdep.c (avr_gdbarch_init): Likewise.
7135 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7136 * cris-tdep.c (cris_gdbarch_init): Likewise.
7137 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7138 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7139 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7140 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7141 * mep-tdep.c (mep_gdbarch_init): Likewise.
7142 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7143 * mips-tdep.c (mips_gdbarch_init): Likewise.
7144 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7145 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7146 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7147 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7148 * v850-tdep.c (v850_gdbarch_init): Likewise.
7149
7150 2017-05-24 Yao Qi <yao.qi@linaro.org>
7151
7152 * selftest-arch.c (tests_with_arch): Call registers_changed
7153 and reinit_frame_cache.
7154 * selftest.c (run_self_tests): Likewise.
7155
7156 2017-05-24 Yao Qi <yao.qi@linaro.org>
7157
7158 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7159 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7160
7161 2017-05-24 Yao Qi <yao.qi@linaro.org>
7162
7163 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7164 set_gdbarch_print_insn.
7165
7166 2017-05-24 Yao Qi <yao.qi@linaro.org>
7167
7168 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7169 set_gdbarch_print_insn.
7170
7171 2017-05-24 Yao Qi <yao.qi@linaro.org>
7172
7173 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7174 set_gdbarch_print_insn.
7175 * arc-tdep.c (arc_gdbarch_init): Likewise.
7176 * arch-utils.c: include dis-asm.h.
7177 (default_print_insn): New function.
7178 * arch-utils.h (default_print_insn): Declare.
7179 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7180 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7181 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7182 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7183 * frv-tdep.c (frv_gdbarch_init): Likewise.
7184 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7185 * gdbarch.sh (print_insn): Use default_print_insn.
7186 * gdbarch.c: Regenerated.
7187 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7188 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7189 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7190 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7191 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7192 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7193 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7194 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7195 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7196 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7197 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7198 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7199 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7200 * mt-tdep.c (mt_gdbarch_init): Likewise.
7201 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7202 * nios2-tdep.c (nios2_print_insn): Remove.
7203 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7204 * rx-tdep.c (rx_gdbarch_init): Likewise.
7205 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7206 * score-tdep.c (score_print_insn): Remove.
7207 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7208 * sh-tdep.c (sh_gdbarch_init): Likewise.
7209 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7210 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7211 * tic6x-tdep.c (tic6x_print_insn): Remove.
7212 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7213 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7214 * v850-tdep.c (v850_gdbarch_init): Likewise.
7215 * vax-tdep.c (vax_gdbarch_init): Likewise.
7216 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7217 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7218
7219 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7220
7221 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7222 (MIPS_FP0_REGNUM): Remove.
7223 (MIPS_FSR_REGNUM): Remove.
7224 (mips_fbsd_supply_fpregs): Use mips_regnum.
7225 (mips_fbsd_supply_gregs): Likewise.
7226 (mips_fbsd_collect_fpregs): Likewise.
7227 (mips_fbsd_collect_gregs): Likewise.
7228
7229 2017-05-23 John Baldwin <jhb@FreeBSD.org>
7230
7231 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7232 (getpfpregs_supplies): New function.
7233 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7234 getfpregs_supplies.
7235 (mips_fbsd_store_inferior_registers): Likewise.
7236
7237 2017-05-22 Pedro Alves <palves@redhat.com>
7238
7239 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7240 maintainer.
7241
7242 2017-05-22 Alan Hayward <alan.hayward@arm.com>
7243
7244 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7245 (store_register): Likewise.
7246 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7247 (get_decimal_float_return_value): Likewise.
7248 (do_ppc_sysv_return_value): Likewise.
7249 (ppc64_sysv_abi_push_integer): Likewise.
7250 (ppc64_sysv_abi_push_freg): Likewise.
7251 (ppc64_sysv_abi_return_value_base): Likewise.
7252 (ppc64_sysv_abi_return_value): Likewise.
7253 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7254 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7255 * rs6000-nat.c: Likewise.
7256 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7257 (rs6000_value_to_register): Likewise.
7258 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7259
7260 2017-05-21 Tom Tromey <tom@tromey.com>
7261
7262 PR rust/21466:
7263 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7264 arrays as "[T]", not "[T; ]".
7265
7266 2017-05-19 Tom Tromey <tom@tromey.com>
7267
7268 PR rust/21484:
7269 * rust-lang.c (exp_descriptor_rust): New function.
7270 (rust_language_defn): Use it.
7271 * p-lang.c (pascal_language_defn): Update.
7272 * opencl-lang.c (opencl_language_defn): Update.
7273 * objc-lang.c (objc_language_defn): Update.
7274 * m2-lang.c (m2_language_defn): Update.
7275 * language.h (struct language_defn)
7276 <la_watch_location_expression>: New member.
7277 * language.c (unknown_language_defn, auto_language_defn)
7278 (local_language_defn): Update.
7279 * go-lang.c (go_language_defn): Update.
7280 * f-lang.c (f_language_defn): Update.
7281 * d-lang.c (d_language_defn): Update.
7282 * c-lang.h (c_watch_location_expression): Declare.
7283 * c-lang.c (c_watch_location_expression): New function.
7284 (c_language_defn, cplus_language_defn, asm_language_defn)
7285 (minimal_language_defn): Use it.
7286 * breakpoint.c (watch_command_1): Call
7287 la_watch_location_expression.
7288 * ada-lang.c (ada_language_defn): Update.
7289
7290 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7291
7292 PR tui/21482
7293 * gdb_curses.h (NOMACROS): Define.
7294 (NCURSES_NOMACROS): Define.
7295
7296 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7297
7298 PR tui/21482
7299 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7300 arg to char *.
7301 * tui/tui-wingeneral.c (box_win): Likewise.
7302 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7303 (tui_show_source_line): Likewise.
7304 (tui_show_exec_info_content): Likewise.
7305
7306 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7307
7308 * sparc-tdep.c (sparc_structure_return_p)
7309 (sparc_arg_on_registers_p): New functions.
7310 (sparc32_store_arguments): Use them.
7311 * sparc64-tdep.c (sparc64_16_byte_align_p)
7312 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7313 Handle TYPE_CODE_ARRAY.
7314
7315 2017-05-17 Yao Qi <yao.qi@linaro.org>
7316
7317 * cli/cli-decode.c (add_alias_cmd): New function.
7318 * command.h (add_alias_cmd): Declare.
7319 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7320 instead call add_alias_cmd.
7321
7322 2017-05-17 Pedro Alves <palves@redhat.com>
7323
7324 * Makefile.in (nat_extra_makefile_frag): Rename to ...
7325 (nat_makefile_frag): ... this. All references updated.
7326 * configure.ac: Likewise.
7327 * configure.nat: Likewise. Enhance comments.
7328 * configure: Regenerate.
7329
7330 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7331
7332 * procfs.c (procfs_create_inferior): Change prototype to match
7333 definition.
7334
7335 2017-05-13 Eli Zaretskii <eliz@gnu.org>
7336
7337 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7338 C++ compiler warning.
7339
7340 2017-05-12 Tom Tromey <tom@tromey.com>
7341
7342 PR rust/21483:
7343 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7344 recurse, just call value_struct_elt directly.
7345
7346 2017-05-12 Tom Tromey <tom@tromey.com>
7347
7348 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7349 OP_RUST_ARRAY>: Fix.
7350
7351 2017-05-12 Tom Tromey <tom@tromey.com>
7352
7353 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7354
7355 2017-05-09 Yao Qi <yao.qi@linaro.org>
7356
7357 * regcache.c: Include <forward_list>.
7358 (struct regcache_list): Remove.
7359 (current_regcache): Update.
7360 (get_thread_arch_aspace_regcache): Update for std::forward_list.
7361 (regcache_thread_ptid_changed): Likewise.
7362 (registers_changed_ptid): Likewise.
7363 (current_regcache_size): Likewise.
7364
7365 2017-05-09 Yao Qi <yao.qi@linaro.org>
7366
7367 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7368 (current_regcache_size): New function.
7369 (current_regcache_test): New function.
7370 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7371
7372 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7373
7374 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7375 (print_gp_register_row): Use get_frame_register_value.
7376
7377 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7378
7379 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7380 (mips_supply_fpregset): Likewise.
7381 (mips64_supply_gregset): Likewise.
7382
7383 2017-05-08 Alan Hayward <alan.hayward@arm.com>
7384
7385 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
7386 regcache->raw_supply_zeroed.
7387
7388 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7389
7390 * configure.nat: Rearrange 'case' statements to match
7391 host before cpu.
7392
7393 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7394
7395 * Makefile.in: Remove "@host_makefile_frag@". Add variables
7396 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7397 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
7398 "@nat_extra_makefile_frag@".
7399 (Makefile): Remove dependency on "@frags@".
7400 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7401 (data-directory/Makefile): Likewise.
7402 * config/aarch64/linux.mh: Deleted; moved contents to
7403 "gdb/configure.nat".
7404 * config/alpha/alpha-linux.mh: Likewise.
7405 * config/alpha/nbsd.mh: Likewise.
7406 * config/arm/linux.mh: Likewise.
7407 * config/arm/nbsdelf.mh: Likewise.
7408 * config/i386/cygwin.mh: Likewise.
7409 * config/i386/cygwin64.mh: Likewise.
7410 * config/i386/darwin.mh: Likewise.
7411 * config/i386/fbsd.mh: Likewise.
7412 * config/i386/fbsd64.mh: Likewise.
7413 * config/i386/go32.mh: Likewise.
7414 * config/i386/i386gnu.mh: Likewise.
7415 * config/i386/i386sol2.mh: Likewise.
7416 * config/i386/linux.mh: Likewise.
7417 * config/i386/linux64.mh: Likewise.
7418 * config/i386/mingw.mh: Likewise.
7419 * config/i386/mingw64.mh: Likewise.
7420 * config/i386/nbsd64.mh: Likewise.
7421 * config/i386/nbsdelf.mh: Likewise.
7422 * config/i386/nto.mh: Likewise.
7423 * config/i386/obsd.mh: Likewise.
7424 * config/i386/obsd64.mh: Likewise.
7425 * config/i386/sol2-64.mh: Likewise.
7426 * config/ia64/linux.mh: Likewise.
7427 * config/m32r/linux.mh: Likewise.
7428 * config/m68k/linux.mh: Likewise.
7429 * config/m68k/nbsdelf.mh: Likewise.
7430 * config/m68k/obsd.mh: Likewise.
7431 * config/m88k/obsd.mh: Likewise.
7432 * config/mips/fbsd.mh: Likewise.
7433 * config/mips/linux.mh: Likewise.
7434 * config/mips/nbsd.mh: Likewise.
7435 * config/mips/obsd64.mh: Likewise.
7436 * config/pa/linux.mh: Likewise.
7437 * config/pa/nbsd.mh: Likewise.
7438 * config/pa/obsd.mh: Likewise.
7439 * config/powerpc/aix.mh: Likewise.
7440 * config/powerpc/fbsd.mh: Likewise.
7441 * config/powerpc/linux.mh: Likewise.
7442 * config/powerpc/nbsd.mh: Likewise.
7443 * config/powerpc/obsd.mh: Likewise.
7444 * config/powerpc/ppc64-linux.mh: Likewise.
7445 * config/powerpc/spu-linux.mh: Likewise.
7446 * config/s390/linux.mh: Likewise.
7447 * config/sh/nbsd.mh: Likewise.
7448 * config/sparc/fbsd.mh: Likewise.
7449 * config/sparc/linux.mh: Likewise.
7450 * config/sparc/linux64.mh: Likewise.
7451 * config/sparc/nbsd64.mh: Likewise.
7452 * config/sparc/nbsdelf.mh: Likewise.
7453 * config/sparc/obsd64.mh: Likewise.
7454 * config/sparc/sol2.mh: Likewise.
7455 * config/tilegx/linux.mh: Likewise.
7456 * config/vax/nbsdelf.mh: Likewise.
7457 * config/vax/obsd.mh: Likewise.
7458 * config/xtensa/linux.mh: Likewise.
7459 * config/i386/i386gnu.mn: New file, with excerpts from
7460 "config/i386/i386gnu.mh".
7461 * configure: Regenerate.
7462 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7463 *.mh files under "gdb/config".
7464 * configure.nat: New file, with contents from the
7465 "gdb/config/*/*.mh" files.
7466
7467 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
7468
7469 * btrace.c (btrace_clear): Free insn vector.
7470
7471 2017-05-05 Pedro Alves <palves@redhat.com>
7472
7473 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7474 * configure: Regenerate.
7475
7476 2017-05-04 Pedro Alves <palves@redhat.com>
7477
7478 * Makefile.in (SFILES): Add progspace-and-thread.c.
7479 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7480 (COMMON_OBS): Add progspace-and-thread.o.
7481 * breakpoint.c: Include "progspace-and-thread.h".
7482 (update_inserted_breakpoint_locations)
7483 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7484 Use scoped_restore_current_pspace_and_thread.
7485 (create_std_terminate_master_breakpoint): Use
7486 scoped_restore_current_program_space.
7487 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7488 (print_breakpoint_location): Use
7489 scoped_restore_current_program_space.
7490 (bp_loc_is_permanent): Use
7491 scoped_restore_current_pspace_and_thread.
7492 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7493 (download_tracepoint_locations): Use
7494 scoped_restore_current_pspace_and_thread.
7495 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7496 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7497 (enum step_over_calls_kind): Moved from inferior.h.
7498 (class scoped_restore_current_thread): New class.
7499 * gdbthread.h (make_cleanup_restore_current_thread): Delete
7500 declaration.
7501 (scoped_restore_current_thread): New class.
7502 * infcmd.c: Include "common/gdb_optional.h".
7503 (continue_1, proceed_after_attach): Use
7504 scoped_restore_current_thread.
7505 (notice_new_inferior): Use scoped_restore_current_thread.
7506 * inferior.c: Include "progspace-and-thread.h".
7507 (restore_inferior, save_current_inferior): Delete.
7508 (add_inferior_command, clone_inferior_command): Use
7509 scoped_restore_current_pspace_and_thread.
7510 * inferior.h (scoped_restore_current_inferior): New class.
7511 * infrun.c: Include "progspace-and-thread.h" and
7512 "common/gdb_optional.h".
7513 (follow_fork_inferior): Use
7514 scoped_restore_current_pspace_and_thread.
7515 (scoped_restore_exited_inferior): New class.
7516 (handle_vfork_child_exec_or_exit): Use
7517 scoped_restore_exited_inferior,
7518 scoped_restore_current_pspace_and_thread,
7519 scoped_restore_current_thread and scoped_restore.
7520 (fetch_inferior_event): Use scoped_restore_current_thread.
7521 * linespec.c (decode_line_full, decode_line_1): Use
7522 scoped_restore_current_program_space.
7523 * mi/mi-main.c: Include "progspace-and-thread.h".
7524 (exec_continue): Use scoped_restore_current_thread.
7525 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7526 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7527 * proc-service.c (ps_pglobal_lookup): Use
7528 scoped_restore_current_program_space.
7529 * progspace-and-thread.c: New file.
7530 * progspace-and-thread.h: New file.
7531 * progspace.c (release_program_space, clone_program_space): Use
7532 scoped_restore_current_program_space.
7533 (restore_program_space, save_current_program_space)
7534 (save_current_space_and_thread): Delete.
7535 (switch_to_program_space_and_thread): Moved to
7536 progspace-and-thread.c.
7537 * progspace.h (save_current_program_space)
7538 (save_current_space_and_thread): Delete declarations.
7539 (scoped_restore_current_program_space): New class.
7540 * remote.c (remote_btrace_maybe_reopen): Use
7541 scoped_restore_current_thread.
7542 * symtab.c: Include "progspace-and-thread.h".
7543 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7544 * thread.c (print_thread_info_1): Use
7545 scoped_restore_current_thread.
7546 (struct current_thread_cleanup): Delete.
7547 (do_restore_current_thread_cleanup)
7548 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7549 (scoped_restore_current_thread::~scoped_restore_current_thread):
7550 ... this new dtor.
7551 (make_cleanup_restore_current_thread): Rename/convert to ...
7552 (scoped_restore_current_thread::scoped_restore_current_thread):
7553 ... this new ctor.
7554 (thread_apply_all_command): Use scoped_restore_current_thread.
7555 (thread_apply_command): Use scoped_restore_current_thread.
7556 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7557 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7558
7559 2017-05-04 Pedro Alves <palves@redhat.com>
7560
7561 * thread.c (make_cleanup_restore_current_thread): Move
7562 find_thread_ptid call before the is_stopped call. Assert that the
7563 thread is found. Replace is_stopped call by checking the thread's
7564 state directly. Remove unnecessary NULL-thread check.
7565
7566 2017-05-04 Pedro Alves <palves@redhat.com>
7567
7568 * corelow.c (thread_section_name): New class.
7569 (get_core_register_section, get_core_siginfo): Use it.
7570
7571 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7572
7573 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7574 (get_core_register_section): Remove xfree of NULL pointer.
7575
7576 2017-05-03 Alan Hayward <alan.hayward@arm.com>
7577
7578 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7579 * regcache.c (regcache::raw_supply_zeroed): New function.
7580 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7581
7582 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7583
7584 * gdbarch.sh: Remove commented out definition of
7585 TARGET_CHAR_BIT.
7586 * gdbarch.h: Re-generate.
7587
7588 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7589
7590 * configure: Regenerate.
7591
7592 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7593
7594 * solib-target.c (solib_target_relocate_section_addresses):
7595 Remove num_section_bases, num_bases, segment_bases variables.
7596
7597 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7598
7599 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7600
7601 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7602
7603 * solib-target.c: Include <vector>
7604 (struct lm_info_target) <~lm_info_target>: Remove.
7605 <segment_bases, section_bases>: Change type to
7606 std::vector<CORE_ADDR>.
7607 (library_list_start_segment, library_list_start_section,
7608 library_list_end_library,
7609 solib_target_relocate_section_addresses): Adjust.
7610
7611 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7612
7613 * gdbarch.sh (software_single_step): Change return type to
7614 std::vector<CORE_ADDR>.
7615 * gdbarch.c, gdbarch.h: Re-generate.
7616 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7617 Adjust.
7618 (arm_deal_with_atomic_sequence_raw): Adjust.
7619 (thumb_get_next_pcs_raw): Adjust.
7620 (arm_get_next_pcs_raw): Adjust.
7621 (arm_get_next_pcs): Adjust.
7622 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7623 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7624 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7625 (alpha_software_single_step): Adjust.
7626 * alpha-tdep.h (alpha_software_single_step): Adjust.
7627 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7628 * arm-tdep.c (arm_software_single_step): Adjust.
7629 (arm_breakpoint_kind_from_current_state): Adjust.
7630 * arm-tdep.h (arm_software_single_step): Adjust.
7631 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7632 * cris-tdep.c (cris_software_single_step): Adjust.
7633 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7634 (micromips_deal_with_atomic_sequence): Adjust.
7635 (deal_with_atomic_sequence): Adjust.
7636 (mips_software_single_step): Adjust.
7637 * mips-tdep.h (mips_software_single_step): Adjust.
7638 * moxie-tdep.c (moxie_software_single_step): Adjust.
7639 * nios2-tdep.c (nios2_software_single_step): Adjust.
7640 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7641 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7642 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7643 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7644 * sparc-tdep.c (sparc_software_single_step): Adjust.
7645 * spu-tdep.c (spu_software_single_step): Adjust.
7646 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7647
7648 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7649
7650 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7651 * gdbarch.h: Re-generate.
7652
7653 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7654
7655 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7656 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7657 * python/py-instruction.c, python/py-instruction.h: New file.
7658 * python/py-record.c: Add py-instruction.h include.
7659 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7660 gdb.RecordInstruction.
7661 * python/python-internal.h: Add gdbpy_initialize_instruction
7662 declaration.
7663 * python/python.c (do_start_initialization): Add
7664 gdbpy_initialize_instruction.
7665
7666 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7667
7668 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7669 Remove.
7670 (btrace_func_from_recpy_func): New function.
7671 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7672 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7673 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7674 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7675 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7676 Also, use new helper functions.
7677 (btpy_list_item): Use new helper functions.
7678 (recpy_bt_function_call_history): Use new type name.
7679 (btpy_call_getset): Remove.
7680 (gdbpy_initialize_btrace): Remove code to initialize
7681 gdb.BtraceFunctionCall.
7682 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7683 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7684 recpy_bt_func_prev, recpy_bt_func_next): New export.
7685 * python/py-record.c (recpy_func_type): New static object.
7686 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7687 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7688 recpy_func_next): New function.
7689 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7690 (recpy_func_getset): New static object.
7691 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7692 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7693
7694 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7695
7696 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7697 (btpy_object, btpy_insn_type, btpy_new): Remove.
7698 (btpy_list_object): Use gdb.RecordInstruction type instead of
7699 gdb.BtraceInstruction type.
7700 (btrace_insn_from_recpy_insn): New function.
7701 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7702 btpy_new.
7703 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7704 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7705 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7706 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7707 instead of btpy_object.
7708 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7709 btpy_insn_data, btpy_insn_decode): Rename to ...
7710 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7711 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7712 recpy_bt_insn_decode): This. Also, use new helper functions.
7713 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7714 recpy_insn_type.
7715 (btpy_insn_getset): Remove.
7716 (gdbpy_initialize_btrace): Remove code to initialize
7717 gdb.BtraceInstruction. Use recpy_element_object.
7718 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7719 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7720 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7721 * python/py-record.c (recpy_insn_type): New static object.
7722 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7723 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7724 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7725 New function.
7726 (recpy_insn_getset): New static object.
7727 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7728 * python/py-record.h (recpy_element_object): New typedef.
7729 (recpy_insn_type, recpy_insn_new): New export.
7730
7731 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7732
7733 * py-record-btrace.c (btpy_insn_new): Removed.
7734 (btpy_insn_or_gap_new): New function.
7735 (btpy_insn_error): Removed.
7736 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7737 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7738 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7739 btpy_insn_or_gap_new instead of btpy_insn_new.
7740 (btpy_insn_getset): Remove btpy_insn_error.
7741 * py-record.c (recpy_gap_type): New static object.
7742 (recpy_gap_object): New typedef.
7743 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7744 recpy_gap_reason_string): New function.
7745 (recpy_gap_getset): New static object.
7746 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7747 * py-record.h (recpy_gap_new): New export.
7748
7749 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7750
7751 * python/py-record.c (recpy_ptid): Remove.
7752 (recpy_record_getset): Remove recpy_ptid.
7753
7754 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7755
7756 * btrace.c (btrace_fetch): Set inferior_ptid.
7757 * python/py-record-btrace.c: Add "py-record.h" include.
7758 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7759 recpy_bt_end, recpy_bt_instruction_history,
7760 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7761 in gdb.Record object instead of current ptid.
7762 * python/py-record.c: Include new "py-record.h" file.
7763 (recpy_record_object): Moved to py-record.h.
7764 * python/py-record.h: New file.
7765
7766 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7767
7768 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7769 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7770 indentation.
7771
7772 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7773
7774 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7775 the past maintainers section.
7776
7777 2017-04-28 Yao Qi <yao.qi@linaro.org>
7778
7779 * infcmd.c (get_return_value): Use regcache ctor, and remove
7780 cleanup.
7781
7782 2017-04-28 Yao Qi <yao.qi@linaro.org>
7783 Pedro Alves <palves@redhat.com>
7784
7785 * regcache.c (regcache::regcache): New tag dispatch ctor.
7786 (do_cooked_read): Moved above.
7787 (regcache_dup): Use the tag dispatch ctor..
7788 * regcache.h (regcache): Declare ctor, delete copy ctor and
7789 assignment operator, remove friend regcache_dup.
7790
7791 2017-04-28 Yao Qi <yao.qi@linaro.org>
7792
7793 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7794 call method save instead of regcache_cpy.
7795 * regcache.h (struct regcache): Make regcache_dup a friend.
7796
7797 2017-04-28 Yao Qi <yao.qi@linaro.org>
7798
7799 * regcache.c (struct regcache): Move to regcache.h
7800 (regcache::arch): New method.
7801 (regcache_get_ptid): Update.
7802 (get_regcache_arch): Call arch method.
7803 (get_regcache_aspace): Call method aspace.
7804 (register_buffer): Change it to method.
7805 (regcache_save): Change it to regcache::save.
7806 (regcache_restore): Likewise.
7807 (regcache_cpy_no_passthrough): Remove the declaration.
7808 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7809 (regcache_cpy_no_passthrough): Change it to method
7810 cpy_no_passthrough.
7811 (regcache_register_status): Change it to method
7812 get_register_status.
7813 (regcache_invalidate): Change it to method invalidate.
7814 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7815 (regcache_raw_update): Change it to method raw_update.
7816 (regcache_raw_read): Likewise.
7817 (regcache_raw_read_signed): Likewise.
7818 (regcache_raw_read_unsigned): Likewise.
7819 (regcache_raw_write_signed): Likewise.
7820 (regcache_raw_write_unsigned): Likewise.
7821 (regcache_cooked_read): Likewise.
7822 (regcache_cooked_read_value): Likewise.
7823 (regcache_cooked_read_signed): Likewise.
7824 (regcache_cooked_read_unsigned): Likewise.
7825 (regcache_cooked_write_signed): Likewise.
7826 (regcache_cooked_write_unsigned): Likewise.
7827 (regcache_raw_set_cached_value): Likewise.
7828 (regcache_raw_write): Likewise.
7829 (regcache_cooked_write): Likewise.
7830 (regcache_xfer_part): Likewise.
7831 (regcache_raw_read_part): Likewise.
7832 (regcache_raw_write_part): Likewise.
7833 (regcache_cooked_read_part): Likewise.
7834 (regcache_cooked_write_part): Likewise.
7835 (regcache_raw_supply): Likewise.
7836 (regcache_raw_collect): Likewise.
7837 (regcache_transfer_regset): Likewise.
7838 (regcache_supply_regset): Likewise.
7839 (regcache_collect_regset): Likewise.
7840 (regcache_debug_print_register): Likewise.
7841 (enum regcache_dump_what): Move it to regcache.h.
7842 (regcache_dump): Change it to method dump.
7843 * regcache.h (enum regcache_dump_what): New.
7844 (class regcache): New.
7845 * target.c (target_fetch_registers): Call method
7846 debug_print_register.
7847 (target_store_registers): Likewise.
7848
7849 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7850
7851 * windows-nat.c (struct lm_info_windows): Initialize field.
7852 (windows_make_so): Allocate lm_info_windows with new.
7853 (windows_free_so): Free lm_info_windows with delete.
7854
7855 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7856
7857 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7858 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7859 cleanup.
7860 (darwin_free_so): Free lm_info_darwin with delete.
7861
7862 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7863
7864 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7865 <l_addr_p>: Change type to bool.
7866 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7867 (svr4_free_so): Free lm_info_svr4 with delete.
7868 (svr4_copy_library_list): Replace memcpy with call to copy
7869 constructor.
7870 (library_list_start_library, svr4_default_sos): Allocate
7871 lm_info_svr4 with new.
7872
7873 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7874
7875 * solib-target.c (struct lm_info_target): Add destructor,
7876 initialize fields.
7877 <name>: Change type to std::string.
7878 (library_list_start_library): Allocate lm_info_target with new.
7879 (solib_target_free_library_list): Free lm_info_target with
7880 delete.
7881 (solib_target_current_sos): Adapt to std::string.
7882 (solib_target_free_so): Free lm_info_target with delete.
7883
7884 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7885
7886 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7887 fields.
7888 (frv_current_sos): Allocate lm_info_frv with new.
7889 (frv_relocate_main_executable): Free lm_info_frv with delete,
7890 allocate with new.
7891 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7892
7893 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7894
7895 * solib-frv.c (struct lm_info_frv): Fix indentation.
7896
7897 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7898
7899 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7900 map field.
7901 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7902 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7903 and allocate with new.
7904 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7905
7906 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7907
7908 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7909 <filename, member_name>: Change type to std::string.
7910 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7911 (library_list_start_library): Allocate lm_info_aix with new.
7912 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7913 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7914 with copy constructor.
7915
7916 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7917
7918 * solist.h (struct lm_info): Remove.
7919 (struct lm_info_base): New class.
7920 (struct so_list) <lm_info>: Change type to lm_info_base *.
7921 * nto-tdep.c (struct lm_info): Remove.
7922 (lm_addr): Adjust.
7923 * solib-aix.c (struct lm_info): Rename to ...
7924 (struct lm_info_aix): ... this. Extend lm_info_base.
7925 (lm_info_p): Rename to ...
7926 (lm_info_aix_p): ... this, and adjust.
7927 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7928 solib_aix_parse_libraries, library_list_start_library,
7929 solib_aix_free_library_list, solib_aix_parse_libraries,
7930 solib_aix_get_library_list,
7931 solib_aix_relocate_section_addresses, solib_aix_free_so,
7932 solib_aix_get_section_offsets,
7933 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7934 Adjust.
7935 (struct solib_aix_inferior_data) <library_list>: Adjust.
7936 * solib-darwin.c (struct lm_info): Rename to ...
7937 (struct lm_info_darwin): ... this. Extend lm_info_base.
7938 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7939 * solib-dsbt.c (struct lm_info): Rename to ...
7940 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7941 (struct dsbt_info) <main_executable_lm_info): Adjust.
7942 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7943 dsbt_relocate_section_addresses): Adjust.
7944 * solib-frv.c (struct lm_info): Rename to ...
7945 (struct lm_info_frv): ... this. Extend lm_info_base.
7946 (main_executable_lm_info): Adjust.
7947 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7948 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7949 find_canonical_descriptor_in_load_object,
7950 frv_fdpic_find_canonical_descriptor): Adjust.
7951 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7952 to lm_info_svr4.
7953 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7954 svr4_clear_so, svr4_copy_library_list,
7955 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7956 svr4_current_sos, svr4_fetch_objfile_link_map,
7957 solist_update_incremental): Adjust.
7958 * solib-svr4.h (struct lm_info_svr4): Move here from
7959 solib-svr4.c.
7960 * solib-target.c (struct lm_info): Rename to ...
7961 (struct lm_info_target): ... this. Extend lm_info_base.
7962 (lm_info_p): Rename to ...
7963 (lm_info_target_p): ... this.
7964 (solib_target_parse_libraries, library_list_start_segment,
7965 library_list_start_section, library_list_start_library,
7966 library_list_end_library, solib_target_free_library_list,
7967 solib_target_current_sos, solib_target_free_so,
7968 solib_target_relocate_section_addresses): Adjust.
7969 * windows-nat.c (struct lm_info): Rename to ...
7970 (struct lm_info_windows): ... this. Extend lm_info_base.
7971 (windows_make_so, handle_load_dll, handle_unload_dll,
7972 windows_xfer_shared_libraries): Adjust.
7973
7974 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7975
7976 * solib-darwin.c (struct darwin_so_list): Remove.
7977 (darwin_current_sos): Allocate an so_list object instead of a
7978 darwin_so_list, separately allocate an lm_info object.
7979 (darwin_free_so): Free lm_info.
7980
7981 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7982
7983 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7984 with fprintf_filtered.
7985
7986 2017-04-28 Yao Qi <yao.qi@linaro.org>
7987
7988 * regcache.c (regcache::regcache): New function.
7989 (regcache::~regcache): New function.
7990 (regcache_xmalloc_1): Remove.
7991 (regcache_xmalloc): Call new regcache.
7992 (regcache_xfree): Call delete regcache.
7993 (get_thread_arch_aspace_regcache): Call new regcache.
7994
7995 2017-04-28 Yao Qi <yao.qi@linaro.org>
7996
7997 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7998 lwp instead of ptid_get_lwp.
7999
8000 2017-04-28 Yao Qi <yao.qi@linaro.org>
8001
8002 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8003 lwp_info instead of getting from inferior_ptid.
8004
8005 2017-04-27 Keith Seitz <keiths@redhat.com>
8006
8007 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8008 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8009 (CV_CONVERSION_BADNESS): Define.
8010 (rank_one_type): Remove overly restrictive rvalue reference
8011 rank checks.
8012 Add cv-qualifier checks and subranks for type equality.
8013 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8014 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8015 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8016
8017 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
8018
8019 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8020 count when creating the object.
8021
8022 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
8023 Ulrich Weigand <uweigand@de.ibm.com>
8024
8025 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8026 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8027 is used in AIX.
8028 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8029 (process_xcoff_symbol): Likewise.
8030 (scan_xcoff_symtab): Likewise.
8031
8032 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8033
8034 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8035 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8036 (ia64_access_reg): Use get_frame_register_unsigned.
8037 (ia64_access_rse_reg): Likewise.
8038 (ia64_libunwind_frame_prev_register): Likewise.
8039
8040 2017-04-26 Jiong Wang <jiong.wang@arm.com>
8041
8042 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8043 * gdbarch.c: Regenerated.
8044 * gdbarch.h: Regenerated.
8045 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8046 visibility external.
8047 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8048 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8049 (enum cfa_how_kind): Move to ...
8050 (struct dwarf2_frame_state_reg_info): Likewise.
8051 (struct dwarf2_frame_state): Likewise.
8052 * dwarf2-frame.h: ... here.
8053 (dwarf2_frame_state_alloc_regs): New declaration.
8054 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8055 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8056
8057 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8058
8059 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8060 regcache_raw_read_unsigned.
8061 (xtensa_pseudo_register_write): Likewise.
8062
8063 2017-04-26 Alan Hayward <alan.hayward@arm.com>
8064
8065 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8066 (nds32_pseudo_register_write): Likewise.
8067
8068 2017-04-25 Yao Qi <yao.qi@linaro.org>
8069
8070 * regcache.c (struct regcache) <readonly_p>: Change its type
8071 to bool.
8072 (regcache_xmalloc_1): Update parameter type and callers update.
8073
8074 2017-04-25 Yao Qi <yao.qi@linaro.org>
8075
8076 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8077 set_gdbarch_wchar_bit.
8078 * arm-tdep.c (arm_gdbarch_init): Likewise.
8079
8080 2017-04-25 Pedro Alves <palves@redhat.com>
8081
8082 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8083 (BothAreRelocatable, memcopy, memmove): Don't define.
8084 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8085 macros.
8086
8087 2017-04-25 Pedro Alves <palves@redhat.com>
8088
8089 * common/common-defs.h: Include "common/poison.h".
8090 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8091 and adjust.
8092 * common/poison.h: New file.
8093 * common/traits.h: Include <type_traits>.
8094 (Not, Or, Requires): New, moved from common/function-view.h.
8095
8096 2017-04-25 Pedro Alves <palves@redhat.com>
8097
8098 * breakpoint.h (struct breakpoint): In-class initialize all
8099 fields. Make boolean fields "bool".
8100 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8101 memset call and initializations no longer necessary.
8102
8103 2017-04-25 Pedro Alves <palves@redhat.com>
8104
8105 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8106 reference.
8107 (pt_btrace_insn): New function.
8108 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8109
8110 2017-04-25 Pedro Alves <palves@redhat.com>
8111
8112 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8113 "base" field and inherit from "bp_location" instead. Add
8114 non-default ctor.
8115 (allocate_location_exception): Use new non-default ctor.
8116 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8117 (init_bp_location): Convert to ...
8118 (bp_location::bp_location): ... this new ctor, and remove memset
8119 call.
8120 (base_breakpoint_allocate_location): Use the new non-default ctor.
8121 * breakpoint.h (bp_location): Now a class. Declare default and
8122 non-default ctors. In-class initialize all members.
8123 (init_bp_location): Remove declaration.
8124
8125 2017-04-25 Pedro Alves <palves@redhat.com>
8126
8127 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8128 assignment operator.
8129
8130 2017-04-24 Yao Qi <yao.qi@linaro.org>
8131
8132 * doublest.c (convert_doublest_to_floatformat): Call
8133 floatformat_totalsize_bytes.
8134
8135 2017-04-22 Tom Tromey <tom@tromey.com>
8136
8137 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8138 ui_out_emit_list.
8139 * stack.c (print_frame): Use ui_out_emit_list.
8140 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8141 ui_out_emit_list.
8142 * mi/mi-main.c (print_one_inferior)
8143 (mi_cmd_data_list_register_names)
8144 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8145 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8146 ui_out_emit_list.
8147 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8148 (mi_output_solib_attribs): Use ui_out_emit_list,
8149 ui_out_emit_tuple.
8150 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8151 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8152 (mi_cmd_stack_list_args, list_args_or_locals): Use
8153 ui_out_emit_list.
8154 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8155 * breakpoint.c (print_solib_event, output_thread_groups): Use
8156 ui_out_emit_list.
8157
8158 2017-04-22 Tom Tromey <tom@tromey.com>
8159
8160 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8161 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8162 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8163
8164 2017-04-22 Tom Tromey <tom@tromey.com>
8165
8166 * tracepoint.c (tvariables_info_1)
8167 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8168
8169 2017-04-22 Tom Tromey <tom@tromey.com>
8170
8171 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8172 annotate_arg_emitter.
8173 * breakpoint.c (print_mention_watchpoint)
8174 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8175 * annotate.h (struct annotate_arg_emitter): New.
8176
8177 2017-04-22 Tom Tromey <tom@tromey.com>
8178
8179 * record-btrace.c (record_btrace_insn_history)
8180 (record_btrace_insn_history_range, record_btrace_call_history)
8181 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8182 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8183 ui_out_emit_tuple.
8184 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8185 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8186 * skip.c (skip_info): Use ui_out_emit_tuple.
8187 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8188 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8189 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8190 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8191 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8192 ui_out_emit_tuple.
8193 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8194 (output_register, mi_cmd_data_read_memory)
8195 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8196 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8197 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8198 Use ui_out_emit_tuple.
8199 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8200 ui_out_emit_tuple.
8201 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8202 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8203 * linux-thread-db.c (info_auto_load_libthread_db): Use
8204 ui_out_emit_tuple.
8205 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8206 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8207 * disasm.c (do_mixed_source_and_assembly_deprecated)
8208 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8209 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8210 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8211 * breakpoint.c (print_one_breakpoint_location)
8212 (print_one_breakpoint): Use ui_out_emit_tuple.
8213 * auto-load.c (print_script, info_auto_load_cmd): Use
8214 ui_out_emit_tuple.
8215 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8216
8217 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8218
8219 * thread.c (print_thread_info_1): Remove dead code.
8220
8221 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8222
8223 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8224 GDB_SELF_TEST.
8225 * arm-tdep.c (selftests::arm_record_test): Likewise.
8226
8227 2017-04-21 Yao Qi <yao.qi@linaro.org>
8228
8229 * regcache.c (regcache_restore): Remove argument 2. Replace
8230 argument 3 with regcache. Get register status from
8231 src->register_status and get register contents from
8232 register_buffer (src, regnum).
8233 (regcache_cpy): Update.
8234
8235 2017-04-19 Pedro Alves <palves@redhat.com>
8236
8237 * gdbthread.h (thread): Add missing closing parenthesis in
8238 comment.
8239
8240 2017-04-19 Pedro Alves <palves@redhat.com>
8241
8242 * common/refcounted-object.h: New file.
8243 * gdbthread.h: Include "common/refcounted-object.h".
8244 (thread_info): Inherit from refcounted_object and add comments.
8245 (thread_info::incref, thread_info::decref)
8246 (thread_info::m_refcount): Delete.
8247 (thread_info::deletable): Use the refcounted_object::refcount()
8248 method.
8249 * inferior.c (current_inferior_): Add comment.
8250 (set_current_inferior): Increment/decrement refcounts.
8251 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8252 not-deletable instead of comparing with the current inferior.
8253 (initialize_inferiors): Increment the initial inferior's refcount.
8254 * inferior.h (struct inferior): Forward declare.
8255 Include "common/refcounted-object.h".
8256 (current_inferior, set_current_inferior): Move declaration to
8257 before struct inferior's definition, and fix comment.
8258 (inferior): Inherit from refcounted_object. Add comments.
8259 * thread.c (switch_to_thread_no_regs): Reference the thread's
8260 inferior pointer directly instead of doing a ptid lookup.
8261 (switch_to_no_thread): New function.
8262 (switch_to_thread(thread_info *)): New function, factored out
8263 from ...
8264 (switch_to_thread(ptid_t)): ... this.
8265 (restore_current_thread): Delete.
8266 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8267 fields, and add 'inf' field.
8268 (do_restore_current_thread_cleanup): Check whether old->inf is
8269 alive instead of looking up an inferior by ptid. Use
8270 switch_to_thread and switch_to_no_thread.
8271 (restore_current_thread_cleanup_dtor): Use old->inf directly
8272 instead of lookup up an inferior by id. Decref the inferior.
8273 Don't restore 'removable'.
8274 (make_cleanup_restore_current_thread): Same the inferior pointer
8275 in old, instead of the inferior number. Incref the inferior.
8276 Don't save/clear 'removable'.
8277
8278 2017-04-19 Pedro Alves <palves@redhat.com>
8279
8280 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8281 unittests/scoped_restore-selftests.c.
8282 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8283 * common/scoped_restore.h (scoped_restore_base): Make "class".
8284 (scoped_restore_base::release): New public method.
8285 (scoped_restore_base::scoped_restore_base): New protected ctor.
8286 (scoped_restore_base::m_saved_var): New protected field.
8287 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8288 scoped_restore_base base class instead of m_saved_var directly.
8289 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8290 (scoped_restore_tmpl::scoped_restore_tmpl(const
8291 scoped_restore_tmpl<T>&)): Likewise.
8292 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8293 method.
8294 (scoped_restore_tmpl::saved_var): New method.
8295 (scoped_restore_tmpl::m_saved_var): Delete.
8296 * inferior.h (inferior::detaching): Now a bool.
8297 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8298 cleanup.
8299 * unittests/scoped_restore-selftests.c: New file.
8300
8301 2017-04-19 Pedro Alves <palves@redhat.com>
8302
8303 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8304 Re-sort in alphabetic order.
8305
8306 2017-04-18 Pedro Alves <palves@redhat.com>
8307
8308 * xml-support.c (obstack_xml_printf): Delete.
8309 * xml-support.h (obstack_xml_printf): Delete.
8310
8311 2017-04-18 Pedro Alves <palves@redhat.com>
8312
8313 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8314 vdebug, verror, body_text, start_element, end_element, name,
8315 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8316 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8317 is_xinclude>: Make private and add m_ prefix.
8318 (gdb_xml_parser::body_text): New method, based on ...
8319 (gdb_xml_body_text): ... this. Adjust.
8320 (gdb_xml_parser::vdebug): New method, based on ...
8321 (gdb_xml_debug): ... this. Adjust.
8322 (gdb_xml_parser::verror): New method, based on ...
8323 (gdb_xml_error): ... this. Adjust.
8324 (gdb_xml_parser::start_element): New method, based on ...
8325 (gdb_xml_start_element): ... this. Adjust.
8326 (gdb_xml_start_element_wrapper): Defer to
8327 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8328 (gdb_xml_parser::end_element): New method, based on ...
8329 (gdb_xml_end_element_wrapper): ... this. Adjust.
8330 (gdb_xml_parser::~gdb_xml_parser): Adjust.
8331 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8332 (gdb_xml_parser::use_dtd): New method, based on ...
8333 (gdb_xml_use_dtd): ... this. Adjust.
8334 (gdb_xml_parser::parse): New method, based on ...
8335 (gdb_xml_parse): ... this. Adjust.
8336 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8337 (xinclude_start_include): Adjust to call the parser's name method.
8338 (xml_xinclude_default, xml_xinclude_start_doctype)
8339 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8340 method.
8341 (xml_process_xincludes): Adjust to call parser methods.
8342 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8343 declarations.
8344
8345 2017-04-18 Pedro Alves <palves@redhat.com>
8346
8347 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8348 gdb::optional<std::string>.
8349 * xml-support.c: Include <string>.
8350 (scope_level::scope_level(scope_level &&))
8351 (scope_level::~scope_level): Delete.
8352 (scope_level::body): Now a std::string.
8353 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8354 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8355 parameter.
8356 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8357 (xinclude_parsing_data::output): Now a std::string reference.
8358 (xinclude_start_include): Adjust.
8359 (xml_xinclude_default): Adjust.
8360 (xml_process_xincludes): Add 'output' parameter, and return bool.
8361 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8362 and return bool.
8363 * xml-tdesc.c: Include <unordered_map> and <string>.
8364 (tdesc_xml_cache): Delete.
8365 (tdesc_xml_cache_s): Delete.
8366 (xml_cache): Now an std::unordered_map.
8367 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8368 (target_fetch_description_xml): Change return type to
8369 gdb::optional<std::string>, and adjust.
8370 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8371 (target_fetch_description_xml): Change return type to
8372 gdb::optional<std::string>.
8373
8374 2017-04-18 Pedro Alves <palves@redhat.com>
8375
8376 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8377 unittests/optional-selftests.c.
8378 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8379 * unittests/optional-selftests.c: New file.
8380 * unittests/optional/assignment/1.cc: New file.
8381 * unittests/optional/assignment/2.cc: New file.
8382 * unittests/optional/assignment/3.cc: New file.
8383 * unittests/optional/assignment/4.cc: New file.
8384 * unittests/optional/assignment/5.cc: New file.
8385 * unittests/optional/assignment/6.cc: New file.
8386 * unittests/optional/assignment/7.cc: New file.
8387 * unittests/optional/cons/copy.cc: New file.
8388 * unittests/optional/cons/default.cc: New file.
8389 * unittests/optional/cons/move.cc: New file.
8390 * unittests/optional/cons/value.cc: New file.
8391 * unittests/optional/in_place.cc: New file.
8392 * unittests/optional/observers/1.cc: New file.
8393 * unittests/optional/observers/2.cc: New file.
8394
8395 2017-04-18 Pedro Alves <palves@redhat.com>
8396
8397 * common/gdb_optional.h: Include common/traits.h.
8398 (in_place_t): New type.
8399 (in_place): New constexpr variable.
8400 (optional::optional): Remove member initialization of
8401 m_instantiated.
8402 (optional::optional(in_place_t...)): New constructor.
8403 (optional::~optional): Use reset.
8404 (optional::optional(const optional&)): New.
8405 (optional::optional(const optional&&)): New.
8406 (optional::optional(T &)): New.
8407 (optional::optional(T &&)): New.
8408 (operator::operator=(const optional &)): New.
8409 (operator::operator=(optional &&)): New.
8410 (operator::operator= (const T &))
8411 (operator::operator= (T &&))
8412 (operator::emplace (Args &&... args)): Return a T&. Use reset.
8413 (operator::reset): New.
8414 (operator::m_instantiated):: Add in-class initializer.
8415 * common/traits.h: Include <type_traits>.
8416 (struct And): New types.
8417
8418 2017-04-18 Pedro Alves <palves@redhat.com>
8419
8420 * xml-support.c: Include <vector>.
8421 (scope_level::scope_level(const gdb_xml_element *))
8422 (scope_level::scope_level(scope_level&&)): New.
8423 (scope_level::~scope_level): New.
8424 (scope_level_s): Delete.
8425 (gdb_xml_parser::scopes): Now a std::vector.
8426 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8427 Use std::vector.
8428 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8429 scope cleanup code.
8430 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8431 of the scopes member. Use std::vector::emplace_back.
8432
8433 2017-04-18 Pedro Alves <palves@redhat.com>
8434
8435 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
8436 a bool.
8437 (gdb_xml_end_element): Change type of first parameter.
8438 (gdb_xml_cleanup): Rename to ...
8439 (gdb_xml_parser::~gdb_xml_parser): ... this.
8440 (gdb_xml_create_parser_and_cleanup): Delete with ...
8441 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8442 to this new ctor.
8443 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8444 using gdb_xml_create_parser_and_cleanup.
8445 (xinclude_parsing_data): Add ctor/dtor.
8446 (xml_xinclude_cleanup): Delete.
8447 (xml_process_xincludes): Create a local xinclude_parsing_data
8448 instead of heap-allocating one. Create a local gdb_xml_parser
8449 instead of heap-allocating one with
8450 gdb_xml_create_parser_and_cleanup.
8451
8452 2017-04-18 John Baldwin <jhb@FreeBSD.org>
8453
8454 PR threads/20743
8455 * fbsd-nat.c (resume_one_thread_cb): Remove.
8456 (resume_all_threads_cb): Remove.
8457 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8458 iterate_over_threads.
8459
8460 2017-04-17 Joel Brobecker <brobecker@adacore.com>
8461
8462 * NEWS: Create a new section for the next release branch.
8463 Rename the section of the current branch, now that it has
8464 been cut.
8465
8466 2017-04-17 Joel Brobecker <brobecker@adacore.com>
8467
8468 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8469 * version.in: Bump version to 8.0.50.DATE-git.
8470
8471 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
8472
8473 PR gdb/21385
8474 * windows-nat.c (windows_create_inferior): Declare 'allargs'
8475 independently of the host, and fix build breakage on Cygwin.
8476
8477 2017-04-13 Pedro Alves <palves@redhat.com>
8478
8479 * inferior.c (free_inferior): Convert to ...
8480 (inferior::~inferior): ... this dtor.
8481 (inferior::inferior): New ctor, factored out from ...
8482 (add_inferior_silent): ... here. Allocate the inferior with a new
8483 expression.
8484 (delete_inferior): Call delete instead of free_inferior.
8485 * inferior.h (gdb_environ, continuation): Forward declare.
8486 (inferior): Now a class. Add in-class initialization to all
8487 members. Make boolean fields bool, except 'detaching'.
8488 (inferior::inferior): New explicit ctor.
8489 (inferior::~inferior): New.
8490
8491 2017-04-13 Pedro Alves <palves@redhat.com>
8492
8493 * inferior.c (init_inferior_list): Delete.
8494 * inferior.h (init_inferior_list): Delete.
8495
8496 2017-04-13 Pedro Alves <palves@redhat.com>
8497
8498 PR threads/13217
8499 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8500 (top level): Call it twice, with different thread sets.
8501
8502 2017-04-13 Pedro Alves <palves@redhat.com>
8503
8504 * thread.c: Include <algorithm>.
8505 (thread_array_cleanup): Delete.
8506 (scoped_inc_dec_ref): New class.
8507 (live_threads_count): New function.
8508 (set_thread_refcount): Delete.
8509 (tp_array_compar_ascending): Now a bool.
8510 (tp_array_compar): Convert to a std::sort comparison function.
8511 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8512 and live_threads_count.
8513
8514 2017-04-13 Pedro Alves <palves@redhat.com>
8515
8516 * infrun.c (follow_fork_inferior): Also switch the current
8517 inferior.
8518
8519 2017-04-13 Pedro Alves <palves@redhat.com>
8520
8521 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8522 before calling create_internal_breakpoint.
8523
8524 2017-04-13 Pedro Alves <palves@redhat.com>
8525
8526 * fork-child.c (execv_argv): New class.
8527 (breakup_args): Refactored as ...
8528 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8529 Copy arguments to storage and replace separators with NULL
8530 terminators in place.
8531 (escape_bang_in_quoted_argument): Adjust to return bool.
8532 (execv_argv::execv_argv): New ctor.
8533 (execv_argv::init_for_shell): New method, factored out from
8534 fork_inferior. Don't strdup strings into the vector.
8535 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8536 Remove free_vector_argv call.
8537
8538 2017-04-13 Yao Qi <yao.qi@linaro.org>
8539
8540 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8541 tdep->rx_psw_type.
8542
8543 2017-04-13 Yao Qi <yao.qi@linaro.org>
8544
8545 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8546 * rx-tdep.c (rx_gdbarch_init): Likewise.
8547
8548 2017-04-13 Pedro Alves <palves@redhat.com>
8549
8550 * breakpoint.h (struct breakpoint): Reindent.
8551
8552 2017-04-13 Pedro Alves <palves@redhat.com>
8553
8554 * breakpoint.c (bp_location): Rename to ...
8555 (bp_locations): ... this. All references updated.
8556 (bp_location_count): Rename to ...
8557 (bp_locations_count): ... this. All references updated.
8558 (bp_location_placed_address_before_address_max): Rename to ...
8559 (bp_locations_placed_address_before_address_max): ... this. All
8560 references updated.
8561 (bp_location_shadow_len_after_address_max): Rename to ...
8562 (bp_locations_shadow_len_after_address_max): ... this. All
8563 references updated.
8564 (bp_location_compare_addrs): Rename to ...
8565 (bp_locations_compare_addrs): ... this. All references updated.
8566 (bp_location_compare):Rename to ...
8567 (bp_locations_compare): ... this. All references updated.
8568 (bp_location_target_extensions_update): Rename to ...
8569 (bp_locations_target_extensions_update): ... this. All references
8570 updated.
8571
8572 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8573
8574 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8575 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8576 'sgtty.h'.
8577 * common/gdb_termios.h: New file, with parts of "terminal.h".
8578 * inflow.c: Include "gdb_termios.h".
8579 * ser-unix.c: Include "gdb_termios.h".
8580 * terminal.h: Move terminal-related defines to
8581 "common/gdb_termios.h".
8582
8583 2017-04-12 Tom Tromey <tom@tromey.com>
8584
8585 * probe.c (parse_probes): Update.
8586 * location.h (delete_event_location): Don't declare.
8587 (event_location_deleter::operator()): Update.
8588 * location.c (event_location_deleter::operator()): Rename from
8589 delete_event_location.
8590 * linespec.h (linespec_result) <location>: Change type to
8591 event_location_up.
8592 * linespec.c (canonicalize_linespec, event_location_to_sals)
8593 (decode_objc): Update.
8594 (linespec_result): Don't call delete_event_location.
8595 * breakpoint.c (create_breakpoints_sal)
8596 (bkpt_probe_create_sals_from_location)
8597 (strace_marker_create_sals_from_location): Update.
8598
8599 2017-04-12 Tom Tromey <tom@tromey.com>
8600
8601 * linespec.h (struct linespec_result): Add constructor and
8602 destructor.
8603 (init_linespec_result, destroy_linespec_result)
8604 (make_cleanup_destroy_linespec_result): Don't declare.
8605 * linespec.c (init_linespec_result): Remove.
8606 (linespec_result::~linespec_result): Rename from
8607 destroy_linespec_result. Update.
8608 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8609 Remove.
8610 * breakpoint.c (create_breakpoint, break_range_command)
8611 (decode_location_default): Update.
8612 * ax-gdb.c (agent_command_1): Update.
8613
8614 2017-04-12 Tom Tromey <tom@tromey.com>
8615
8616 * remote.c (remote_download_tracepoint): Update.
8617 * python/py-breakpoint.c (bppy_get_location): Update.
8618 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8619 (gdbscm_breakpoint_location): Update.
8620 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8621 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8622 Change type to event_location_up.
8623 * breakpoint.c (create_overlay_event_breakpoint)
8624 (create_longjmp_master_breakpoint)
8625 (create_std_terminate_master_breakpoint)
8626 (create_exception_master_breakpoint)
8627 (breakpoint_event_location_empty_p, print_breakpoint_location)
8628 (print_one_breakpoint_location, create_thread_event_breakpoint)
8629 (init_breakpoint_sal, create_breakpoint)
8630 (print_recreate_ranged_breakpoint, break_range_command)
8631 (init_ada_exception_breakpoint, say_where): Update.
8632 (base_breakpoint_dtor): Don't call delete_event_location.
8633 (bkpt_print_recreate, tracepoint_print_recreate)
8634 (dprintf_print_recreate, update_static_tracepoint)
8635 (breakpoint_re_set_default): Update.
8636
8637 2017-04-12 Tom Tromey <tom@tromey.com>
8638
8639 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8640 type of "to_do". Update.
8641 (compute_stack_depth): Use std::vector.
8642
8643 2017-04-12 Tom Tromey <tom@tromey.com>
8644
8645 * printcmd.c (find_instruction_backward): Use std::vector.
8646
8647 2017-04-12 Tom Tromey <tom@tromey.com>
8648
8649 * symfile.c (objfilep): Remove typedef.
8650 (reread_symbols): Use a std::vector.
8651
8652 2017-04-12 Tom Tromey <tom@tromey.com>
8653
8654 * mi/mi-main.c (exec_direction_forward): Remove.
8655 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8656 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8657 scoped_restore.
8658 * guile/guile.c (guile_repl_command, guile_command)
8659 (gdbscm_execute_gdb_command): Use scoped_restore.
8660 * go-exp.y (go_parse): Use scoped_restore.
8661 * d-exp.y (d_parse): Use scoped_restore.
8662 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8663 * c-exp.y (c_parse): Use scoped_restore.
8664
8665 2017-04-12 Tom Tromey <tom@tromey.com>
8666
8667 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8668 (mi_parse): Update return type.
8669 (mi_parse_free): Remove.
8670 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8671 (mi_parse::~mi_parse): Rename from mi_parse_free.
8672 (mi_parse_cleanup): Remove.
8673 (mi_parse): Return a unique_ptr. Use new.
8674 * mi/mi-main.c (mi_execute_command): Update.
8675
8676 2017-04-12 Tom Tromey <tom@tromey.com>
8677
8678 * location.c (explicit_location_lex_one): Return a
8679 unique_xmalloc_ptr.
8680 (string_to_explicit_location): Update. Remove cleanups.
8681
8682 2017-04-12 Tom Tromey <tom@tromey.com>
8683
8684 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8685 (compare_value_and_voffset): Change type. Update.
8686 (compute_vtable_size): Change type of "offset_vec".
8687 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8688 (gnuv3_get_typeid): Remove extraneous declaration.
8689
8690 2017-04-12 Tom Tromey <tom@tromey.com>
8691
8692 * charset.h (wchar_iterator): Fix comment.
8693
8694 2017-04-12 Tom Tromey <tom@tromey.com>
8695
8696 * charset.c (iconv_wrapper): New class.
8697 (cleanup_iconv): Remove.
8698 (convert_between_encodings): Use it.
8699
8700 2017-04-12 Tom Tromey <tom@tromey.com>
8701
8702 * symfile.h (increment_reading_symtab): Update type.
8703 * symfile.c (decrement_reading_symtab): Remove.
8704 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8705 * psymtab.c (psymtab_to_symtab): Update.
8706 * dwarf2read.c (dw2_instantiate_symtab): Update.
8707
8708 2017-04-12 Tom Tromey <tom@tromey.com>
8709
8710 * jit.c (struct jit_reader): Declare separately. Add constructor
8711 and destructor. Change type of "handle".
8712 (loaded_jit_reader): Define separately.
8713 (jit_reader_load): Update. New "new".
8714 (jit_reader_unload_command): Use "delete".
8715 * gdb-dlfcn.h (struct dlclose_deleter): New.
8716 (gdb_dlhandle_up): New typedef.
8717 (gdb_dlopen, gdb_dlsym): Update types.
8718 (gdb_dlclose): Remove.
8719 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8720 (gdb_dlsym): Change type of "handle".
8721 (make_cleanup_dlclose): Remove.
8722 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8723 * compile/compile-c-support.c (load_libcc): Update.
8724
8725 2017-04-12 Tom Tromey <tom@tromey.com>
8726
8727 * symtab.h (find_pcs_for_symtab_line): Change return type.
8728 * symtab.c (find_pcs_for_symtab_line): Change return type.
8729 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8730 type of "vec". Update.
8731 (ltpy_get_pcs_for_line): Update.
8732 * linespec.c (decode_digits_ordinary): Update.
8733
8734 2017-04-12 Tom Tromey <tom@tromey.com>
8735
8736 * tracepoint.c (actions_command): Update.
8737 * python/python.c (python_command, python_interactive_command):
8738 Update.
8739 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8740 * guile/guile.c (guile_command): Update.
8741 * defs.h (read_command_lines, read_command_lines_1): Return
8742 command_line_up.
8743 (command_lines_deleter): New struct.
8744 (command_line_up): New typedef.
8745 * compile/compile.c (compile_code_command)
8746 (compile_print_command): Update.
8747 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8748 command_line_up.
8749 (make_cleanup_free_command_lines): Remove.
8750 * cli/cli-script.c (get_command_line, read_command_lines_1)
8751 (copy_command_lines): Return command_line_up.
8752 (while_command, if_command, read_command_lines, define_command)
8753 (document_command): Update.
8754 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8755 Remove.
8756 * breakpoint.h (breakpoint_set_commands): Change type of
8757 "commands".
8758 * breakpoint.c (breakpoint_set_commands): Change type of
8759 "commands". Update.
8760 (do_map_commands_command, update_dprintf_command_list)
8761 (create_tracepoint_from_upload): Update.
8762
8763 2017-04-12 Tom Tromey <tom@tromey.com>
8764
8765 * tracepoint.c (scope_info): Update.
8766 * spu-tdep.c (spu_catch_start): Update.
8767 * python/python.c (gdbpy_decode_line): Update.
8768 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8769 * python/py-breakpoint.c (bppy_init): Update.
8770 * probe.c (parse_probes): Update.
8771 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8772 * location.h (event_location_deleter): New struct.
8773 (event_location_up): New typedef.
8774 (new_linespec_location, new_address_location, new_probe_location)
8775 (new_explicit_location, copy_event_location)
8776 (string_to_event_location, string_to_event_location_basic)
8777 (string_to_explicit_location): Update return type.
8778 (make_cleanup_delete_event_location): Remove.
8779 * location.c (new_linespec_location, new_address_location)
8780 (new_probe_location, new_explicit_location, copy_event_location):
8781 Return event_location_up.
8782 (delete_event_location_cleanup)
8783 (make_cleanup_delete_event_location): Remove.
8784 (string_to_explicit_location, string_to_event_location_basic)
8785 (string_to_event_location): Return event_location_up.
8786 * linespec.c (canonicalize_linespec, event_location_to_sals)
8787 (decode_line_with_current_source)
8788 (decode_line_with_last_displayed, decode_objc): Update.
8789 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8790 * completer.c (location_completer): Update.
8791 * cli/cli-cmds.c (edit_command, list_command): Update.
8792 * breakpoint.c (create_overlay_event_breakpoint)
8793 (create_longjmp_master_breakpoint)
8794 (create_std_terminate_master_breakpoint)
8795 (create_exception_master_breakpoint)
8796 (create_thread_event_breakpoint): Update.
8797 (init_breakpoint_sal): Update. Remove some dead code.
8798 (create_breakpoint_sal): Change type of "location". Update.
8799 (create_breakpoints_sal, create_breakpoint, break_command_1)
8800 (dprintf_command, break_range_command, until_break_command)
8801 (init_ada_exception_breakpoint)
8802 (strace_marker_create_sals_from_location)
8803 (update_static_tracepoint, trace_command, ftrace_command)
8804 (strace_command, create_tracepoint_from_upload): Update.
8805 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8806 * ax-gdb.c (agent_command_1): Update.
8807
8808 2017-04-12 Pedro Alves <palves@redhat.com>
8809
8810 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8811 * configure.tgt: Handle i[34567]86-*-go32* and
8812 i[34567]86-*-msdosdjgpp*.
8813 * i386-tdep.c (i386_svr4_reg_to_regnum):
8814 Make extern.
8815 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8816 i386-go32-tdep.c.
8817 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8818 * i386-go32-tdep.c: New file.
8819 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8820 declarations.
8821
8822 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8823
8824 * aix-thread.c (pd_status2str): Change return type to const char *.
8825
8826 2017-04-12 Pedro Alves <palves@redhat.com>
8827
8828 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8829 calls to set_gdbarch_gnu_triplet_regexp.
8830
8831 2017-04-12 Pedro Alves <palves@redhat.com>
8832
8833 PR gdb/21323
8834 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8835 New enum value.
8836 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8837 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8838 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8839 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8840 * gdbarch.h, gdbarch.c: Regenerate.
8841 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8842 gdbarch_wchar_bit and gdbarch_wchar_signed.
8843 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8844 * arm-tdep.c (arm_gdbarch_init): Likewise.
8845 * avr-tdep.c (avr_gdbarch_init): Likewise.
8846 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8847 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8848 * i386-tdep.c (i386_go32_init_abi): Likewise.
8849 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8850 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8851 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8852 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8853 * sh-tdep.c (sh_gdbarch_init): Likewise.
8854 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8855 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8856 * windows-tdep.c (windows_init_abi): Likewise.
8857 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8858
8859 2017-04-12 Pedro Alves <palves@redhat.com>
8860
8861 PR c++/21323
8862 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8863 cplus_primitive_type_char32_t>: New enum values.
8864 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8865 and cplus_primitive_type_char32_t.
8866 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8867 32, use the archtecture's built-in type for char16_t and char32_t,
8868 respectively. Otherwise, fallback to init_integer_type as before,
8869 but make the type unsigned, and issue a complaint.
8870 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8871
8872 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8873
8874 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8875 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8876
8877 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8878
8879 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8880 'const char *'.
8881
8882 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8883
8884 * common/common-utils.c (free_vector_argv): New function.
8885 * common/common-utils.h: Include <vector>.
8886 (free_vector_argv): New prototype.
8887 * darwin-nat.c (darwin_create_inferior): Rewrite function
8888 prototype in order to constify "exec_file" and accept a
8889 "std::string" for "allargs".
8890 * fork-child.c: Include <vector>.
8891 (breakup_args): Rewrite function, using C++.
8892 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8893 and accept "std::string" for "allargs". Update the code to
8894 calculate "argv" based on "allargs". Update calls to "exec_fun"
8895 and "execvp".
8896 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8897 order to constify "exec_file" and accept a "std::string" for
8898 "allargs".
8899 * go32-nat.c (go32_create_inferior): Likewise.
8900 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8901 * infcmd.c (run_command_1): Constify "exec_file". Use
8902 "std::string" for inferior arguments.
8903 * inferior.h (fork_inferior): Update prototype.
8904 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8905 prototype in order to constify "exec_file" and accept a
8906 "std::string" for "allargs".
8907 * nto-procfs.c (procfs_create_inferior): Likewise.
8908 * procfs.c (procfs_create_inferior): Likewise.
8909 * remote-sim.c (gdbsim_create_inferior): Likewise.
8910 * remote.c (extended_remote_run): Update code to accept
8911 "std::string" as argument.
8912 (extended_remote_create_inferior): Rewrite function prototype in
8913 order to constify "exec_file" and accept a "std::string" for
8914 "allargs".
8915 * rs6000-nat.c (super_create_inferior): Likewise.
8916 (rs6000_create_inferior): Likewise.
8917 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8918 * windows-nat.c (windows_create_inferior): Likewise.
8919
8920 2017-04-11 Pedro Alves <palves@redhat.com>
8921
8922 * thread.c: Fix whitespace throughout.
8923
8924 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8925
8926 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8927
8928 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8929
8930 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8931
8932 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8933
8934 PR gdb/21364
8935 * osdata.c (info_osdata): Check if 'type' is an empty string
8936 instead of NULL.
8937
8938 2017-04-10 Pedro Alves <palves@redhat.com>
8939
8940 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8941 (ptid_to_global_thread_id, in_thread_list)
8942 (do_captured_list_thread_ids, set_resumed, set_running)
8943 (set_executing, set_stop_requested, finish_thread_state)
8944 (validate_registers_access, can_access_registers_ptid)
8945 (print_thread_info_1, switch_to_thread)
8946 (do_restore_current_thread_cleanup)
8947 (make_cleanup_restore_current_thread, thread_command)
8948 (thread_name_command): Use operator== instead of ptid_equal.
8949
8950 2017-04-10 Pedro Alves <palves@redhat.com>
8951
8952 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8953 (current_thread_cleanup_chain): Delete.
8954 (restore_current_thread_cleanup_dtor)
8955 (make_cleanup_restore_current_thread): Remove references to
8956 current_thread_cleanup_chain.
8957
8958 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8959
8960 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8961 REG_UNKNOWN.
8962
8963 2017-04-10 Yao Qi <yao.qi@linaro.org>
8964
8965 PR gdb/19942
8966 * gdbthread.h (thread_info::deletable): New method.
8967 (thread_info::incref): New method.
8968 (thread_info::decref): New method.
8969 (thread_info::refcount): Move it to private.
8970 * infrun.c (save_stop_context): Call inc_refcount.
8971 (release_stop_context_cleanup): Likewise.
8972 * thread.c (set_thread_exited): New function.
8973 (init_thread_list): Delete "tp" only it is deletable, otherwise
8974 call set_thread_exited.
8975 (delete_thread_1): Call set_thread_exited.
8976 (current_thread_cleanup) <inferior_pid>: Remove.
8977 <thread>: New field.
8978 (restore_current_thread_ptid_changed): Removed.
8979 (do_restore_current_thread_cleanup): Adjust.
8980 (restore_current_thread_cleanup_dtor): Don't call
8981 find_thread_ptid.
8982 (set_thread_refcount): Use dec_refcount.
8983 (make_cleanup_restore_current_thread): Adjust.
8984 (thread_apply_all_command): Call inc_refcount.
8985 (_initialize_thread): Don't call
8986 observer_attach_thread_ptid_changed.
8987
8988 2017-04-10 Yao Qi <yao.qi@linaro.org>
8989
8990 * thread.c (delete_thread_1): Hoist code on marking thread as
8991 exited.
8992
8993 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8994
8995 * windows-nat.c (windows_detach): Initialize ptid with
8996 minus_one_ptid.
8997
8998 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8999
9000 * unittests/ptid-selftests.c: Fix erroneous assert messages.
9001
9002 2017-04-07 Alan Hayward <alan.hayward@arm.com>
9003
9004 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9005 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9006 (bfin_pseudo_register_write): Likewise
9007
9008 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
9009
9010 * common/ptid.h (struct ptid): Change to...
9011 (class ptid_t): ... this.
9012 <ptid_t>: New constructors.
9013 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9014 matches>: New methods.
9015 <make_null, make_minus_one>: New static methods.
9016 <pid>: Rename to...
9017 <m_pid>: ...this.
9018 <lwp>: Rename to...
9019 <m_lwp>: ...this.
9020 <tid>: Rename to...
9021 <m_tid>: ...this.
9022 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9023 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9024 as references, move comment to class ptid_t.
9025 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9026 ptid_t static methods.
9027 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9028 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9029 Take ptid arguments as references, implement using ptid_t methods.
9030 * unittests/ptid-selftests.c: New file.
9031 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9032 unittests/ptid-selftests.c.
9033 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9034
9035 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
9036
9037 * python/python.c (python_run_simple_file): Cast mode literal to
9038 non-const char pointer as expected by PyFile_FromString.
9039
9040 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
9041
9042 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9043 minus_one_ptid and null_ptid.
9044
9045 2017-04-05 Pedro Alves <palves@redhat.com>
9046
9047 * warning.m4 (build_warnings): Remove -Wno-write-strings.
9048 * configure: Regenerate.
9049
9050 2017-04-05 Pedro Alves <palves@redhat.com>
9051
9052 * ada-exp.y (yyerror): Constify.
9053 * ada-lang.c (bound_name, get_selections)
9054 (ada_variant_discrim_type)
9055 (ada_variant_discrim_name, ada_value_struct_elt)
9056 (ada_lookup_struct_elt_type, is_unchecked_variant)
9057 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9058 (catch_ada_exception_command_split)
9059 (catch_ada_assert_command_split, catch_assert_command)
9060 (ada_op_name): Constify.
9061 * ada-lang.h (ada_yyerror, get_selections)
9062 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9063 * arc-tdep.c (arc_print_frame_cache): Constify.
9064 * arm-tdep.c (arm_skip_stub): Constify.
9065 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9066 (gen_aggregate_elt_ref): Constify.
9067 * bcache.c (print_bcache_statistics): Constify.
9068 * bcache.h (print_bcache_statistics): Constify.
9069 * break-catch-throw.c (catch_exception_command_1):
9070 * breakpoint.c (struct ep_type_description::description):
9071 Constify.
9072 (add_solib_catchpoint): Constify.
9073 (catch_fork_command_1): Add cast.
9074 (add_catch_command): Constify.
9075 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9076 Constify.
9077 * bsd-uthread.c (bsd_uthread_state): Constify.
9078 * buildsym.c (patch_subfile_names): Constify.
9079 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9080 Constify.
9081 * c-exp.y (yyerror): Constify.
9082 (token::oper): Constify.
9083 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9084 * c-varobj.c (cplus_describe_child): Constify.
9085 * charset.c (find_charset_names): Add cast.
9086 (find_charset_names): Constify array and add const_cast.
9087 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9088 (edit_command): Constify.
9089 * cli/cli-decode.c (lookup_cmd): Constify.
9090 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9091 Constify.
9092 (struct dump_context): Constify.
9093 (add_dump_command, restore_command): Constify.
9094 * cli/cli-script.c (get_command_line): Constify.
9095 * cli/cli-script.h (get_command_line): Constify.
9096 * cli/cli-utils.c (check_for_argument): Constify.
9097 * cli/cli-utils.h (check_for_argument): Constify.
9098 * coff-pe-read.c (struct read_pe_section_data): Constify.
9099 * command.h (lookup_cmd): Constify.
9100 * common/print-utils.c (decimal2str): Constify.
9101 * completer.c (gdb_print_filename): Constify.
9102 * corefile.c (set_gnutarget): Constify.
9103 * cp-name-parser.y (yyerror): Constify.
9104 * cp-valprint.c (cp_print_class_member): Constify.
9105 * cris-tdep.c (cris_register_name, crisv32_register_name):
9106 Constify.
9107 * d-exp.y (yyerror): Constify.
9108 (struct token::oper): Constify.
9109 * d-lang.h (d_yyerror): Constify.
9110 * dbxread.c (struct header_file_location::name): Constify.
9111 (add_old_header_file, add_new_header_file, last_function_name)
9112 (dbx_next_symbol_text, add_bincl_to_list)
9113 (find_corresponding_bincl_psymtab, set_namestring)
9114 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9115 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9116 * defs.h (command_line_input, print_address_symbolic)
9117 (deprecated_readline_begin_hook): Constify.
9118 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9119 Constify.
9120 * event-top.c (handle_line_of_input): Constify and add cast.
9121 * exceptions.c (catch_errors): Constify.
9122 * exceptions.h (catch_errors): Constify.
9123 * expprint.c (print_subexp_standard, op_string, op_name)
9124 (op_name_standard, dump_raw_expression, dump_raw_expression):
9125 * expression.h (op_name, op_string, dump_raw_expression):
9126 Constify.
9127 * f-exp.y (yyerror): Constify.
9128 (struct token::oper): Constify.
9129 (struct f77_boolean_val::name): Constify.
9130 * f-lang.c (f_word_break_characters): Constify.
9131 * f-lang.h (f_yyerror): Constify.
9132 * fork-child.c (fork_inferior): Add cast.
9133 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9134 (new_variant): Constify.
9135 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9136 * gdbarch.c: Regenerate.
9137 * gdbcore.h (set_gnutarget): Constify.
9138 * go-exp.y (yyerror): Constify.
9139 (token::oper): Constify.
9140 * go-lang.h (go_yyerror): Constify.
9141 * go32-nat.c (go32_sysinfo): Constify.
9142 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9143 * guile/scm-cmd.c (cmdscm_function): Constify.
9144 * guile/scm-param.c (pascm_param_value): Constify.
9145 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9146 (h8300sx_register_name): Constify.
9147 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9148 Constify.
9149 * ia64-tdep.c (ia64_register_names): Constify.
9150 * infcmd.c (construct_inferior_arguments): Constify.
9151 (path_command, attach_post_wait): Constify.
9152 * language.c (show_range_command, show_case_command)
9153 (unk_lang_error): Constify.
9154 * language.h (language_defn::la_error)
9155 (language_defn::la_name_of_this): Constify.
9156 * linespec.c (decode_line_2): Constify.
9157 * linux-thread-db.c (thread_db_err_str): Constify.
9158 * lm32-tdep.c (lm32_register_name): Constify.
9159 * m2-exp.y (yyerror): Constify.
9160 * m2-lang.h (m2_yyerror): Constify.
9161 * m32r-tdep.c (m32r_register_names): Constify and make static.
9162 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9163 * m88k-tdep.c (m88k_register_name): Constify.
9164 * macroexp.c (appendmem): Constify.
9165 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9166 (upgrade_type, parse_external, parse_partial_symbols)
9167 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9168 (new_symbol): Constify.
9169 * memattr.c (mem_info_command): Constify.
9170 * mep-tdep.c (register_name_from_keyword): Constify.
9171 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9172 Constify.
9173 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9174 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9175 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9176 cast.
9177 (mi_execute_async_cli_command): Constify.
9178 * mips-tdep.c (mips_register_name): Constify.
9179 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9180 (am33_register_name, am33_2_register_name)
9181 * moxie-tdep.c (moxie_register_names): Constify.
9182 * nat/linux-osdata.c (osdata_type): Constify fields.
9183 * nto-tdep.c (nto_parse_redirection): Constify.
9184 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9185 (lookup_child_selector): Constify.
9186 (objc_methcall::name): Constify.
9187 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9188 (lookup_struct_typedef): Constify.
9189 * objfiles.c (pc_in_section): Constify.
9190 * objfiles.h (pc_in_section): Constify.
9191 * p-exp.y (struct token::oper): Constify.
9192 (yyerror): Constify.
9193 * p-lang.h (pascal_yyerror): Constify.
9194 * parser-defs.h (op_name_standard): Constify.
9195 (op_print::string): Constify.
9196 (exp_descriptor::op_name): Constify.
9197 * printcmd.c (print_address_symbolic): Constify.
9198 * psymtab.c (print_partial_symbols): Constify.
9199 * python/py-breakpoint.c (stop_func): Constify.
9200 (bppy_get_expression): Constify.
9201 * python/py-cmd.c (cmdpy_completer::name): Constify.
9202 (cmdpy_function): Constify.
9203 * python/py-event.c (evpy_add_attribute)
9204 (gdbpy_initialize_event_generic): Constify.
9205 * python/py-event.h (evpy_add_attribute)
9206 (gdbpy_initialize_event_generic): Constify.
9207 * python/py-evts.c (add_new_registry): Constify.
9208 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9209 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9210 * python/py-inferior.c (get_buffer): Add cast.
9211 * python/py-param.c (parm_constant::name): Constify.
9212 * python/py-unwind.c (fprint_frame_id): Constify.
9213 * python/python.c (gdbpy_parameter_value): Constify.
9214 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9215 * remote.c (memory_packet_config::name): Constify.
9216 (show_packet_config_cmd, remote_write_bytes)
9217 (remote_buffer_add_string):
9218 * reverse.c (exec_reverse_once): Constify.
9219 * rs6000-tdep.c (variant::name, variant::description): Constify.
9220 * rust-exp.y (rustyyerror): Constify.
9221 * rust-lang.c (rust_op_name): Constify.
9222 * rust-lang.h (rustyyerror): Constify.
9223 * serial.h (serial_ops::name): Constify.
9224 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9225 (sh_sh3e_register_name, sh_sh2e_register_name)
9226 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9227 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9228 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9229 (sh_sh4al_dsp_register_name): Constify.
9230 * sh64-tdep.c (sh64_register_name): Constify.
9231 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9232 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9233 * stabsread.c (patch_block_stabs, read_type_number)
9234 (ref_map::stabs, ref_add, process_reference)
9235 (symbol_reference_defined, define_symbol, define_symbol)
9236 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9237 (read_one_struct_field, read_struct_fields, read_baseclasses)
9238 (read_tilde_fields, read_struct_type, read_array_type)
9239 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9240 (read_huge_number, read_range_type, read_args, common_block_start)
9241 (find_name_end): Constify.
9242 * stabsread.h (common_block_start, define_symbol)
9243 (process_one_symbol, symbol_reference_defined, ref_add):
9244 * symfile.c (get_section_index, add_symbol_file_command):
9245 * symfile.h (get_section_index): Constify.
9246 * target-descriptions.c (tdesc_type::name): Constify.
9247 (tdesc_free_type): Add cast.
9248 * target.c (find_default_run_target):
9249 (add_deprecated_target_alias, find_default_run_target)
9250 (target_announce_detach): Constify.
9251 (do_option): Constify.
9252 * target.h (add_deprecated_target_alias): Constify.
9253 * thread.c (print_thread_info_1): Constify.
9254 * top.c (deprecated_readline_begin_hook, command_line_input):
9255 Constify.
9256 (init_main): Add casts.
9257 * top.h (handle_line_of_input): Constify.
9258 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9259 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9260 (tfind_command): Rename to ...
9261 (tfind_command_1): ... this and constify.
9262 (tfind_command): New function.
9263 (tfind_end_command, tfind_start_command): Adjust.
9264 (encode_source_string): Constify.
9265 * tracepoint.h (encode_source_string): Constify.
9266 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9267 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9268 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9269 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9270 * tui/tui-win.c (parse_scrolling_args): Constify.
9271 * tui/tui-windata.c (tui_erase_data_content): Constify.
9272 * tui/tui-windata.h (tui_erase_data_content): Constify.
9273 * tui/tui-winsource.c (tui_erase_source_content): Constify.
9274 * tui/tui.c (tui_enable): Add cast.
9275 * utils.c (defaulted_query): Constify.
9276 (init_page_info): Add cast.
9277 (puts_debug, subset_compare): Constify.
9278 * utils.h (subset_compare): Constify.
9279 * varobj.c (varobj_format_string): Constify.
9280 * varobj.h (varobj_format_string): Constify.
9281 * vax-tdep.c (vax_register_name): Constify.
9282 * windows-nat.c (windows_detach): Constify.
9283 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9284 * xml-support.c (gdb_xml_end_element): Constify.
9285 * xml-tdesc.c (tdesc_start_reg): Constify.
9286 * xstormy16-tdep.c (xstormy16_register_name): Constify.
9287 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9288 * xtensa-tdep.h (xtensa_register_t::name): Constify.
9289
9290 2017-04-05 Pedro Alves <palves@redhat.com>
9291
9292 * proc-api.c (struct trans): Constify.
9293 (procfs_note): Constify.
9294 * proc-events.c (struct trans, syscall_table):
9295 * proc-flags.c (struct trans): Constify.
9296 * proc-utils.h (procfs_note): Constify.
9297 * proc-why.c (struct trans): Constify.
9298 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9299 (procfs_detach): Constify.
9300 * sol-thread.c (struct string_map): Constify.
9301 (td_err_string, td_state_string): Constify.
9302
9303 2017-04-05 Pedro Alves <palves@redhat.com>
9304
9305 * proc-api.c (procfs_filename): Don't initialize
9306 procfs_filename.
9307 (prepare_to_trace): Assume procfs_filename is non-NULL.
9308 (_initialize_proc_api): Give procfs_filename a default value here.
9309
9310 2017-04-05 Pedro Alves <palves@redhat.com>
9311
9312 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9313 'cond_string' parameter.
9314 (extract_exception_regexp): Constify 'string' parameter.
9315 (catch_exception_command_1): Constify.
9316 * breakpoint.c (init_catchpoint)
9317 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9318 parameter.
9319 (ep_parse_optional_if_clause, catch_fork_command_1)
9320 (catch_exec_command_1): Constify.
9321 * breakpoint.h (init_catchpoint): Constify 'cond_string'
9322 parameter.
9323 (ep_parse_optional_if_clause): Constify.
9324 * cli/cli-utils.c (remove_trailing_whitespace)
9325 (check_for_argument): Constify.
9326 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9327 non-const overload.
9328 (check_for_argument): Likewise.
9329
9330 2017-04-05 Pedro Alves <palves@redhat.com>
9331
9332 * event-top.c (command_line_handler): Add cast to execute_command
9333 call.
9334 * record-btrace.c (cmd_record_btrace_bts_start)
9335 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9336 (cmd_record_btrace_start): Add cast to execute_command call.
9337 * record-full.c (record_full_goto_insn):
9338 * record.c (record_start, record_stop): Add cast to
9339 execute_command_to_string calls.
9340 (cmd_record_start): Add cast to execute_command calls.
9341
9342 2017-04-05 Pedro Alves <palves@redhat.com>
9343
9344 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9345 static inline function.
9346 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9347 array and use gdb_PyArg_ParseTupleAndKeywords.
9348 * python/py-cmd.c (cmdpy_init): Likewise.
9349 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9350 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9351 (infpy_search_memory): Likewise.
9352 * python/py-objfile.c (objfpy_add_separate_debug_file)
9353 (gdbpy_lookup_objfile): Likewise.
9354 * python/py-symbol.c (gdbpy_lookup_symbol)
9355 (gdbpy_lookup_global_symbol): Likewise.
9356 * python/py-type.c (gdbpy_lookup_type): Likewise.
9357 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9358 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9359 Likewise.
9360
9361 2017-04-05 Pedro Alves <palves@redhat.com>
9362
9363 * python/python-internal.h (gdb_PyGetSetDef): New type.
9364 * python/py-block.c (block_object_getset)
9365 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9366 * python/py-event.c (event_object_getset)
9367 (finish_breakpoint_object_getset): Likewise.
9368 * python/py-inferior.c (inferior_object_getset): Likewise.
9369 * python/py-infthread.c (thread_object_getset): Likewise.
9370 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9371 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9372 * python/py-objfile.c (objfile_getset): Likewise.
9373 * python/py-progspace.c (pspace_getset): Likewise.
9374 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9375 Likewise.
9376 * python/py-record.c (recpy_record_getset): Likewise.
9377 * python/py-symbol.c (symbol_object_getset): Likewise.
9378 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9379 Likewise.
9380 * python/py-type.c (type_object_getset, field_object_getset):
9381 Likewise.
9382 * python/py-value.c (value_object_getset): Likewise.
9383
9384 2017-04-05 Pedro Alves <palves@redhat.com>
9385
9386 * python/python-internal.h (gdb_PyObject_CallMethod)
9387 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9388 New functions.
9389 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9390 (PySys_GetObject, PySys_SetPath): New macros.
9391
9392 2017-04-05 Pedro Alves <palves@redhat.com>
9393
9394 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9395 info_osdata_command.
9396 * osdata.c (info_osdata_command): Rename to ...
9397 (info_osdata): ... this. Constify 'type' parameter, and remove
9398 the 'from_tty' parameter. Accept NULL TYPE.
9399 (info_osdata_command): New function.
9400 * osdata.h (info_osdata_command): Remove declaration.
9401 (info_osdata): New declaration.
9402
9403 2017-04-05 Pedro Alves <palves@redhat.com>
9404
9405 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9406 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9407 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9408 parameter.
9409 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9410 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9411 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9412 parameter.
9413 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9414 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9415 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9416 (mi_cmd_file_list_exec_source_files)
9417 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9418 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9419 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9420 parameter.
9421 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9422 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9423 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9424 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9425 (mi_cmd_stack_info_frame): Constify 'command' parameter.
9426 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9427 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9428 'command' parameter.
9429 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9430 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9431 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9432 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9433 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9434 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9435 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9436 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9437 (mi_cmd_var_set_update_range): Constify 'command' parameter.
9438 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9439 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9440 parameter.
9441 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9442 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9443 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9444 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9445 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9446 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9447 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9448 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9449 (mi_cmd_data_list_changed_registers)
9450 (mi_cmd_data_write_register_values)
9451 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9452 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9453 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9454 (mi_cmd_list_features, mi_cmd_list_target_features)
9455 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9456 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9457 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9458 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9459 (mi_cmd_trace_frame_collected): Constify 'command'
9460 parameter.
9461 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9462 'command' parameter.
9463
9464 2017-04-05 Pedro Alves <palves@redhat.com>
9465
9466 * ada-lang.c (ada_completer_word_break_characters): Now a const
9467 array.
9468 (ada_get_gdb_completer_word_break_characters): Constify.
9469 * completer.c (gdb_completer_command_word_break_characters)
9470 (gdb_completer_file_name_break_characters)
9471 (gdb_completer_quote_characters): Now const arrays.
9472 (get_gdb_completer_quote_characters): Constify.
9473 (set_rl_completer_word_break_characters): New function.
9474 (set_gdb_completion_word_break_characters)
9475 (complete_line_internal): Use it.
9476 * completer.h (get_gdb_completer_quote_characters): Constify.
9477 (set_rl_completer_word_break_characters): Declare.
9478 * f-lang.c (f_word_break_characters): Constify.
9479 * language.c (default_word_break_characters): Constify.
9480 * language.h (language_defn::la_word_break_characters): Constify.
9481 (default_word_break_characters): Constify.
9482 * top.c (init_main): Use set_rl_completer_word_break_characters.
9483
9484 2017-04-05 Pedro Alves <palves@redhat.com>
9485
9486 * aix-thread.c (aix_thread_pid_to_str)
9487 (aix_thread_extra_thread_info): Constify.
9488 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9489 * bsd-uthread.c (bsd_uthread_extra_thread_info)
9490 (bsd_uthread_pid_to_str): Constify.
9491 * corelow.c (core_pid_to_str): Constify.
9492 * darwin-nat.c (darwin_pid_to_str): Constify.
9493 * fbsd-nat.c (fbsd_pid_to_str): Constify.
9494 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9495 Constify.
9496 * gnu-nat.c (gnu_pid_to_str): Constify.
9497 * go32-nat.c (go32_pid_to_str): Constify.
9498 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9499 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9500 * inferior.c (inferior_pid_to_str): Constify.
9501 * linux-nat.c (linux_nat_pid_to_str): Constify.
9502 * linux-tdep.c (linux_core_pid_to_str): Constify.
9503 * linux-thread-db.c (thread_db_pid_to_str)
9504 (thread_db_extra_thread_info): Constify.
9505 * nto-tdep.c (nto_extra_thread_info): Constify.
9506 * nto-tdep.h (nto_extra_thread_info): Constify.
9507 * obsd-nat.c (obsd_pid_to_str): Constify.
9508 * procfs.c (procfs_pid_to_str): Constify.
9509 * ravenscar-thread.c (ravenscar_extra_thread_info)
9510 (ravenscar_pid_to_str): Constify.
9511 * remote-sim.c (gdbsim_pid_to_str): Constify.
9512 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9513 Constify.
9514 * sol-thread.c (solaris_pid_to_str): Constify.
9515 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9516 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9517 * target.c (default_pid_to_str, target_pid_to_str)
9518 (normal_pid_to_str, default_pid_to_str): Constify.
9519 * target.h (target_ops::to_pid_to_str)
9520 (target_ops::to_extra_thread_info): Constify.
9521 (target_pid_to_str, normal_pid_to_str): Constify.
9522 * windows-nat.c (windows_pid_to_str): Constify.
9523 * gdbarch.sh (core_pid_to_str): Constify.
9524 * target-delegates.c: Regenerate.
9525 * gdbarch.h, gdbarch.c: Regenerate.
9526
9527 2017-04-05 Pedro Alves <palves@redhat.com>
9528
9529 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9530 the memory of the temporary warning_pre_print override.
9531 * utils.c (warning_pre_print): Constify.
9532 * utils.h (warning_pre_print): Constify.
9533
9534 2017-04-05 Pedro Alves <palves@redhat.com>
9535
9536 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9537 (shell_command): New function.
9538 (make_command): Use std::string.
9539 (init_cli_cmds): Register shell_command instead of shell_escape.
9540
9541 2017-04-05 Pedro Alves <palves@redhat.com>
9542
9543 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9544 * tracepoint.c (default_collect): Don't initialize.
9545
9546 2017-04-05 Pedro Alves <palves@redhat.com>
9547
9548 * macroexp.c (macro_buffer::shared): Now a bool.
9549 (init_buffer): Update.
9550 (init_shared_buffer): Constify 'addr' parameter.
9551 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9552 casts.
9553
9554 2017-04-05 Pedro Alves <palves@redhat.com>
9555
9556 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9557 * disasm.c (set_disassembler_options): Constify local.
9558 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9559
9560 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9561
9562 PR gdb/21352
9563 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9564 option.
9565
9566 2017-04-05 Yao Qi <yao.qi@linaro.org>
9567
9568 * frame.c (frame_unwind_register_unsigned): Call
9569 frame_unwind_register_value.
9570
9571 2017-04-05 Yao Qi <yao.qi@linaro.org>
9572
9573 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9574 Use gdb_test_multiple, and don't match anchor.
9575
9576 2017-04-05 Pedro Alves <palves@redhat.com>
9577
9578 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9579 (Write After Approval): Remove Simon Marchi.
9580
9581 2017-04-05 Pedro Alves <palves@redhat.com>
9582
9583 * common/gdb_optional.h (optional::optional): Make constexpr and
9584 initialize m_dummy.
9585
9586 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9587
9588 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9589 (amd64fbsd_jmp_buf_reg_offset): Remove.
9590 (amd64fbsd_supply_uthread): Remove function.
9591 (amd64fbsd_collect_uthread): Remove function.
9592 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9593 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9594 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9595 (fbsd-nat.c): Update comment.
9596 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9597 (i386fbsd_jmp_buf_reg_offset): Remove.
9598 (i386fbsd_supply_uthread): Remove function.
9599 (i386fbsd_collect_uthread): Remove function.
9600 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9601
9602 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9603
9604 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9605 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9606 * NEWS: Mention that support for FreeBSD/alpha was removed.
9607 * alpha-fbsd-tdep.c: Delete file.
9608 * config/alpha/fbsd.mh: Delete file.
9609 * configure.host: Delete alpha*-*-freebsd* and
9610 alpha*-*-kfreebsd*-gnu.
9611 * configure.tgt: Delete alpha*-*-freebsd* and
9612 alpha*-*-kfreebsd*-gnu.
9613
9614 2017-04-04 John Baldwin <jhb@FreeBSD.org>
9615
9616 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9617 amd64bsd_store_inferior_registers): Use ptid from regcache.
9618
9619 2017-04-04 Pedro Alves <palves@redhat.com>
9620
9621 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9622 data fields, make them private and add "m_" prefixes.
9623 (lnp_state_machine::lnp_state_machine): New ctor.
9624 (record_line, check_line_address, handle_set_discriminator)
9625 (handle_set_address, handle_advance_pc, handle_special_opcode)
9626 (handle_advance_line, handle_set_file, handle_negate_stmt)
9627 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9628 (end_sequence, advance_line): New methods.
9629 (m_gdbarch, m_record_lines_p): New fields.
9630 (lnp_reader_state): Delete.
9631 (dwarf_record_line): Rename to ...
9632 (lnp_state_machine::record_line): ... adjust.
9633 (init_lnp_state_machine): Delete.
9634 (lnp_state_machine::lnp_state_machine): New.
9635 (check_line_address): Rename to ...
9636 (lnp_state_machine::check_line_address): This.
9637 (dwarf_decode_lines_1): Remove reference to "reader_state".
9638 Adjust lnp_state_machine having a non-default ctor. Use bool.
9639 State machine internal state manipulation moved to
9640 lnp_state_machine methods.
9641
9642 2017-04-04 Pedro Alves <palves@redhat.com>
9643
9644 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9645 unittests/offset-type-selftests.c.
9646 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9647 * common/offset-type.h: New file.
9648 * common/preprocessor.h: New file.
9649 * common/traits.h: New file.
9650 * common/valid-expr.h: New file.
9651 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9652 sect_offset and cu_offset strong typedefs throughout.
9653 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9654 typedefs throughout.
9655 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9656 sect_offset and cu_offset strong typedefs throughout.
9657 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9658 typedefs throughout.
9659 * gdbtypes.h: Include "common/offset-type.h".
9660 (cu_offset): Now an offset type (strong typedef) instead of a
9661 struct.
9662 (sect_offset): Likewise.
9663 (union call_site_parameter_u): Rename "param_offset" field to
9664 "param_cu_off".
9665 * unittests/offset-type-selftests.c: New file.
9666
9667 2017-04-04 Pedro Alves <palves@redhat.com>
9668
9669 * common/underlying.h: New file.
9670 * dwarf2read.c: Include "common/gdb_optional.h" and
9671 "common/underlying.h".
9672 (dir_index, file_name_index): New types.
9673 (file_entry): Use them.
9674 (file_entry::include): Use to_underlying.
9675 (line_header::add_file_name): Use dir_index.
9676 (read_formatted_entries): Use gdb::optional. Read form before
9677 writting to file_entry.
9678 (dwarf_decode_line_header): Use dir_index.
9679 (lnp_state_machine::current_file): Use to_underlying.
9680 (lnp_state_machine::file): Change type to file_name_index.
9681 (dwarf_record_line): Use to_underlying.
9682 (init_lnp_state_machine): Use file_name_index.
9683 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9684
9685 2017-04-04 Pedro Alves <palves@redhat.com>
9686
9687 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9688 operator bool, has_value and get methods.
9689
9690 2017-04-04 Pedro Alves <palves@redhat.com>
9691
9692 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9693 fields.
9694 (line_header): Initialize all data fields. Change type of
9695 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9696 Change type of include_dirs to std::vector<const char *>. Remove
9697 num_include_dirs, include_dirs_size. Change type of file_names to
9698 std::vector<file_entry>. Remove num_file_names, file_names_size.
9699 (line_header::line_header): New.
9700 (line_header::add_include_dir, line_header::add_file_name): New
9701 methods.
9702 (line_header::include_dir_at): Remove NULL check.
9703 (line_header::file_name_at): Add const overload.
9704 (line_header_up): New unique_ptr typedef.
9705 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9706 std::vector. Remove free_line_header call.
9707 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9708 free_line_header call.
9709 (free_cu_line_header): Delete.
9710 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9711 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9712 Adjust to use std::vector.
9713 (free_line_header): Delete.
9714 (free_line_header_voidp): Use delete.
9715 (add_include_dir): Replace with ...
9716 (line_header::add_include_dir): ... this method. Use std::vector.
9717 (add_file_name): Replace with ...
9718 (line_header::add_file_name): ... this method. Use std::vector.
9719 (add_include_dir_stub): Delete.
9720 (read_formatted_entries): Remove memset.
9721 (dwarf_decode_line_header): Return a line_header_up instead of a
9722 raw pointer. Remove cleanup handling. Pass lambdas to
9723 read_formatted_entries. Adjust to use line_header methods.
9724 (dwarf_decode_lines_1): Adjust to use line_header methods.
9725 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9726 use std::vector.
9727
9728 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9729
9730 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9731 instead of struct ptid.
9732
9733 2017-05-04 Alan Hayward <alan.hayward@arm.com>
9734
9735 * frame.c (get_frame_register_bytes): Unwind using value.
9736 (put_frame_register_bytes): Likewise.
9737
9738 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9739
9740 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9741 aggregate-like.
9742
9743 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9744
9745 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9746
9747 2017-03-29 Yao Qi <yao.qi@linaro.org>
9748
9749 * gdbthread.h (struct thread_info): Declare constructor and
9750 destructor. Add some in-class member initializers.
9751 * thread.c (free_thread): Remove.
9752 (init_thread_list): Call delete instead of free_thread.
9753 (new_thread): Call thread_info constructor.
9754 (thread_info::thread_info): New function.
9755 (thread_info::~thread_info): New function.
9756 (delete_thread_1): Call delete instead of free_thread.
9757 (make_cleanup_restore_current_thread): Move tp and frame to
9758 inner block.
9759
9760 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9761
9762 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9763 (arc_skip_prologue): Likewise.
9764 (arc_make_frame_cache): Likewise.
9765 (arc_pv_get_operand): New function.
9766 (arc_is_in_prologue): Likewise.
9767 (arc_analyze_prologue): Likewise.
9768 (arc_print_frame_cache): Likewise.
9769 (MAX_PROLOGUE_LENGTH): New constant.
9770
9771 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9772
9773 * configure.tgt: Add arc-insn.o.
9774 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9775 (dump_arc_instruction_command): New function.
9776 (arc_fprintf_disasm): Likewise.
9777 (arc_disassemble_info): Likewise.
9778 (arc_insn_get_operand_value): Likewise.
9779 (arc_insn_get_operand_value_signed): Likewise.
9780 (arc_insn_get_memory_base_reg): Likewise.
9781 (arc_insn_get_memory_offset): Likewise.
9782 (arc_insn_get_branch_target): Likewise.
9783 (arc_insn_dump): Likewise.
9784 (arc_insn_get_linear_next_pc): Likewise.
9785 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9786 (arc_disassemble_info): Likewise.
9787 (arc_insn_get_branch_target): Likewise.
9788 (arc_insn_get_linear_next_pc): Likewise.
9789 * NEWS: Mention new "maint print arc arc-instruction".
9790
9791 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9792
9793 * arc-tdep (maintenance_print_arc_list): New variable.
9794 (maintenance_print_arc_command): New function.
9795
9796 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9797
9798 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9799 Add "limm" and "reserved".
9800 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9801 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9802 * arc-tdep.h (arc_regnum): Likewise.
9803
9804 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9805
9806 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9807 for THREADPTR register.
9808 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9809 register.
9810 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9811 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9812 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9813
9814 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9815
9816 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9817 registers above gdbarch_num_regs (gdbarch) as privileged in
9818 call0 ABI.
9819
9820 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9821
9822 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9823 for a single specified register or for all registers in
9824 a0_base..a0_base + C0_NREGS range.
9825 (supply_gregset_reg): Call regcache_raw_supply for a single
9826 specified register or for all registers in a0_base..a0_base +
9827 C0_NREGS range.
9828
9829 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9830
9831 * arch/xtensa.h (C0_NREGS): Add definition.
9832 * xtensa-tdep.c (C0_NREGS): Remove definition.
9833
9834 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9835
9836 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9837 Drop xtensa_default_isa initialization.
9838 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9839
9840 2017-03-27 Pedro Alves <palves@redhat.com>
9841
9842 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9843 (file_entry::include_dir): New method.
9844 (line_header::include_dir_at, line_header::file_name_at): New
9845 methods.
9846 (setup_type_unit_groups, setup_type_unit_groups)
9847 (psymtab_include_file_name): Simplify using the new methods.
9848 (lnp_state_machine) <the_line_header>: New field.
9849 <file>: Add comment.
9850 (lnp_state_machine::current_file): New method.
9851 (dwarf_record_line): Simplify using the new methods.
9852 (init_lnp_state_machine): Initialize the "the_line_header" field.
9853 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9854 Simplify using the new methods.
9855
9856 2017-03-27 Pedro Alves <palves@redhat.com>
9857
9858 * cp-name-parser.y (make_empty): Delete.
9859 (demangler_special, nested_name, ptr_operator, array_indicator)
9860 (direct_declarator, declarator_1): Use fill_comp instead of
9861 make_empty.
9862
9863 2017-03-27 Pedro Alves <palves@redhat.com>
9864
9865 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9866 to ATTRIBUTE_PRINTF.
9867 * solib-target.c (library_list_start_list): Print "string" not
9868 "version".
9869 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9870 gdb_xml_error call.
9871
9872 2017-03-27 Pedro Alves <palves@redhat.com>
9873
9874 * dwarf2read.c (struct file_and_directory): New.
9875 (dwarf2_get_dwz_file): Adjust to use std::string.
9876 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9877 (find_file_and_directory): Adjust to return a file_and_directory
9878 object.
9879 (read_file_scope): Adjust to use file_and_directory. Remove
9880 make_cleanup/do_cleanups calls.
9881 (open_and_init_dwp_file): Adjust to use std::string. Remove
9882 make_cleanup/do_cleanups calls.
9883 * python/python.c (do_start_initialization): Adjust to ldirname
9884 returning a std::string.
9885 * utils.c (ldirname): Now returns a std::string.
9886 * utils.h (ldirname): Change return type to std::string.
9887 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9888 returning a std::string.
9889 * xml-tdesc.c (file_read_description_xml): Likewise.
9890
9891 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9892
9893 * regcache.c (regcache_debug_print_register): New function.
9894 * regcache.h (regcache_debug_print_register): New declaration.
9895 * target.c (debug_print_register): Remove.
9896 (target_fetch_registers): Call regcache_debug_print_register.
9897 (target_store_registers): Likewise.
9898
9899 2017-03-24 Pádraig Brady <pbrady@fb.com>
9900
9901 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9902 reference beyond the 'lh->include_dirs' array before accessing to
9903 it.
9904 (psymtab_include_file_name): Likewise.
9905 (dwarf_decode_lines_1): Likewise.
9906 (dwarf_decode_lines): Likewise.
9907 (file_file_name): Likewise.
9908
9909 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9910
9911 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9912 inferior_ptid.
9913 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9914 ps_lsetfpregs): Likewise.
9915 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9916 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9917 ps_lsetfpregs): Likewise.
9918 * target.c (target_fetch_registers, target_store_registers):
9919 Remove asserts.
9920
9921 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9922
9923 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9924
9925 2017-03-23 Yao Qi <yao.qi@linaro.org>
9926
9927 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9928 (_initialize_aarch64_tdep): Register it.
9929 (aarch64_record_load_store): Handle PRFM instruction.
9930 (aarch64_process_record_test): New function.
9931
9932 2017-03-23 Yao Qi <yao.qi@linaro.org>
9933
9934 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9935 indentation.
9936
9937 2017-03-23 Yao Qi <yao.qi@linaro.org>
9938
9939 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9940
9941 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9942
9943 python/python.c (do_start_initialization): Fix memory leak.
9944
9945 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9946
9947 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9948 using get_ptrace_pid.
9949 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9950 inferior_ptid.
9951 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9952 inferior_ptid instead of pid.
9953
9954 2017-03-22 Yao Qi <yao.qi@linaro.org>
9955
9956 * aarch64-tdep.c: Wrap locally used classes in anonymous
9957 namespace.
9958 * arm-tdep.c: Likewise.
9959 * linespec.c: Likewise.
9960 * ui-out.c: Likewise.
9961
9962 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9963
9964 PR gdb/19637
9965 * python/lib/gdb/printer/bound_registers.py: Import sys.
9966
9967 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9968
9969 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9970 windows_thread_info parameter and use it instead of
9971 current_thread.
9972 (windows_fetch_inferior_registers): Don't set current_thread,
9973 pass the thread to do_windows_fetch_inferior_registers. Use
9974 ptid from regcache instead of inferior_ptid.
9975 (do_windows_store_inferior_registers): Add windows_thread_info
9976 parameter and use it instead of current_thread.
9977 (windows_store_inferior_registers): Don't set current_thread,
9978 pass the thread to do_windows_store_inferior_registers. Use
9979 ptid from regcache instead of inferior_ptid.
9980
9981 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9982
9983 * ser-mingw.c (ser_windows_raw): Remove reference to
9984 struct serial::current_timeout.
9985
9986 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9987
9988 PR tdep/20928
9989 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9990 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9991 (sparc64_fsr_type): Fix %fsr decoding.
9992
9993 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9994
9995 * python/py-record-btrace.c (btpy_insn_data): Change return type
9996 for Python 2.
9997
9998 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9999
10000 * spu-linux-nat.c (spu_fetch_inferior_registers,
10001 spu_store_inferior_registers): Use ptid from regcache, set and
10002 restore inferior_ptid.
10003 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10004 Likewise.
10005
10006 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
10007
10008 * i386-linux-nat.c (fetch_register, store_register,
10009 i386_linux_fetch_inferior_registers,
10010 i386_linux_store_inferior_registers): Use ptid from regcache.
10011 * ia64-linux-nat.c (ia64_linux_fetch_register,
10012 ia64_linux_store_register): Likewise.
10013 * inf-ptrace.c (inf_ptrace_fetch_register,
10014 inf_ptrace_store_register): Likewise.
10015 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10016 m32r_linux_store_inferior_registers): Likewise.
10017 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10018 m68kbsd_store_inferior_registers): Likewise.
10019 * m68k-linux-nat.c (fetch_register, store_register,
10020 m68k_linux_fetch_inferior_registers,
10021 m68k_linux_store_inferior_registers): Likewise.
10022 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10023 m88kbsd_store_inferior_registers): Likewise.
10024 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10025 mips_fbsd_store_inferior_registers): Likewise.
10026 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10027 mips64_linux_regsets_store_registers): Likewise.
10028 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10029 mipsnbsd_store_inferior_registers): Likewise.
10030 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10031 mips64obsd_store_inferior_registers): Likewise.
10032 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10033 Likewise.
10034 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10035 ppcfbsd_store_inferior_registers): Likewise.
10036 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10037 ppc_linux_store_inferior_registers): Likewise.
10038 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10039 ppcnbsd_store_inferior_registers): Likewise.
10040 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10041 ppcobsd_store_registers): Likewise.
10042 * procfs.c (procfs_fetch_registers, procfs_store_registers):
10043 Likewise.
10044 * ravenscar-thread.c (ravenscar_fetch_registers,
10045 ravenscar_store_registers, ravenscar_prepare_to_store):
10046 Likewise.
10047 * record-btrace.c (record_btrace_fetch_registers,
10048 record_btrace_store_registers, record_btrace_prepare_to_store):
10049 Likewise.
10050 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10051 Lookup inferior using ptid from regcache, instead of
10052 current_inferior.
10053 * remote.c (remote_fetch_registers, remote_store_registers): Use
10054 ptid from regcache.
10055 * rs6000-nat.c (fetch_register, store_register): Likewise.
10056 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10057 s390_linux_store_inferior_registers): Likewise.
10058 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10059 shnbsd_store_inferior_registers): Likewise.
10060 * sol-thread.c (sol_thread_fetch_registers,
10061 sol_thread_store_registers): Likewise.
10062 * sparc-nat.c (sparc_fetch_inferior_registers,
10063 sparc_store_inferior_registers): Likewise.
10064 * tilegx-linux-nat.c (fetch_inferior_registers,
10065 store_inferior_registers): Likewise.
10066 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10067 vaxbsd_store_inferior_registers): Likewise.
10068 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10069 store_xtregs): Likewise.
10070
10071 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10072
10073 PR gdb/14441
10074 * NEWS: Mention support for rvalue references in GDB and python.
10075 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10076 supports both lvalue and rvalue references.
10077
10078 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10079
10080 PR gdb/14441
10081 * gdbtypes.c (rank_one_type): Implement overloading
10082 resolution rules regarding rvalue references.
10083
10084 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10085
10086 PR gdb/14441
10087 * aarch64-tdep.c (aarch64_type_align)
10088 (aarch64_extract_return_value, aarch64_store_return_value): Change
10089 lvalue reference type checks to general reference type checks.
10090 * amd64-tdep.c (amd64_classify): Likewise.
10091 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10092 Likewise.
10093 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10094 (arm_store_return_value): Likewise.
10095 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10096 * c-typeprint.c (c_print_type): Likewise.
10097 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10098 (cplus_number_of_children, cplus_describe_child): Likewise.
10099 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10100 * completer.c (expression_completer): Likewise.
10101 * cp-support.c (make_symbol_overload_list_adl_namespace):
10102 Likewise.
10103 * darwin-nat-info.c (info_mach_region_command): Likewise.
10104 * dwarf2loc.c (entry_data_value_coerce_ref)
10105 (value_of_dwarf_reg_entry): Likewise.
10106 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10107 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10108 Likewise.
10109 * findvar.c (extract_typed_address, store_typed_address):
10110 Likewise.
10111 * gdbtypes.c (rank_one_type): Likewise.
10112 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10113 * infcall.c (value_arg_coerce): Likewise.
10114 * language.c (pointer_type): Likewise.
10115 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10116 Likewise.
10117 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10118 * mn10300-tdep.c (mn10300_type_align): Likewise.
10119 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10120 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10121 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10122 Likewise.
10123 * printcmd.c (print_formatted, x_command): Likewise.
10124 * python/py-type.c (typy_get_composite, typy_template_argument):
10125 Likewise.
10126 * python/py-value.c (valpy_referenced_value)
10127 (valpy_get_dynamic_type, value_has_field): Likewise.
10128 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10129 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10130 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10131 * spu-tdep.c (spu_scalar_value_p): Likewise.
10132 * symtab.c (lookup_symbol_aux): Likewise.
10133 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10134 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10135 Likewise.
10136 * valops.c (value_cast_pointers, value_cast)
10137 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10138 (value_struct_elt, value_struct_elt_bitpos)
10139 (value_find_oload_method_list, find_overload_match)
10140 (value_rtti_indirect_type): Likewise.
10141 * valprint.c (val_print_scalar_type_p, generic_val_print):
10142 Likewise.
10143 * value.c (value_actual_type, value_as_address, unpack_long)
10144 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10145 (coerce_ref): Likewise.
10146 * varobj.c (varobj_get_value_type): Likewise.
10147
10148 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10149
10150 PR gdb/14441
10151 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10152 table of constants.
10153 * python/lib/gdb/command/explore.py: Support exploring values
10154 of rvalue reference types.
10155 * python/lib/gdb/types.py: Implement get_basic_type() for
10156 rvalue reference types.
10157 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10158 constant.
10159 * python/py-value.c (valpy_getitem): Add an rvalue reference
10160 check.
10161 (valpy_reference_value): Add new parameter "refcode".
10162 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10163 New wrappers for valpy_reference_value().
10164 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10165 (gdbpy_invoke_xmethod): Likewise.
10166
10167 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10168
10169 PR gdb/14441
10170 * dwarf2read.c (process_die, read_type_die_1): Handle the
10171 DW_TAG_rvalue_reference_type DIE.
10172 (read_tag_reference_type): Add new parameter "refcode".
10173
10174 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10175
10176 PR gdb/14441
10177 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10178 (c_type_print_modifier, c_type_print_varspec_suffix)
10179 (c_type_print_base): Support printing rvalue reference types.
10180 * c-valprint.c (c_val_print, c_value_print): Support printing
10181 rvalue reference values.
10182
10183 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10184
10185 PR gdb/14441
10186 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10187 typename.
10188 * cp-support.c (replace_typedefs): Handle
10189 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10190 * python/py-type.c (typy_lookup_type): Likewise.
10191
10192 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10193
10194 PR gdb/14441
10195 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10196 * parse.c (insert_type): Change assert statement.
10197 (follow_types): Handle rvalue reference types.
10198 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10199 constant.
10200
10201 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10202
10203 PR gdb/14441
10204 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10205 value_ref() interface.
10206 * c-valprint.c (c_value_print): Likewise.
10207 * infcall.c (value_arg_coerce): Likewise.
10208 * python/py-value.c (valpy_reference_value): Likewise.
10209 * valops.c (value_cast, value_reinterpret_cast)
10210 (value_dynamic_cast, typecmp): Likewise.
10211 (value_ref): Parameterize by kind of return value reference type.
10212 * value.h (value_ref): Add new parameter "refcode".
10213
10214 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10215
10216 PR gdb/14441
10217 * dwarf2read.c (read_tag_reference_type): Use
10218 lookup_lvalue_reference_type() instead of lookup_reference_type().
10219 * eval.c (evaluate_subexp_standard): Likewise.
10220 * f-exp.y: Likewise.
10221 * gdbtypes.c (make_reference_type, lookup_reference_type):
10222 Generalize with rvalue reference types.
10223 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10224 convenience wrappers for lookup_reference_type().
10225 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10226 reference kind parameter.
10227 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10228 wrappers for lookup_reference_type().
10229 * guile/scm-type.c (gdbscm_type_reference): Use
10230 lookup_lvalue_reference_type() instead of lookup_reference_type().
10231 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10232 * parse.c (follow_types): Likewise.
10233 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10234 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10235 Likewise.
10236 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10237 (gdbpy_invoke_xmethod): Likewise.
10238 * stabsread.c: Provide extra argument to make_reference_type()
10239 call.
10240 * valops.c (value_ref, value_rtti_indirect_type): Use
10241 lookup_lvalue_reference_type() instead of lookup_reference_type().
10242
10243 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
10244
10245 PR gdb/14441
10246 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10247 (TYPE_IS_REFERENCE): New macro.
10248 (struct type): Add rvalue_reference_type field.
10249 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10250
10251 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10252
10253 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10254 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10255 New function definition.
10256 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10257 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10258 New function declaration.
10259 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10260 * mi/mi-interp.h: New file.
10261 * solib.c (info_sharedlibrary_command): Replace for loop with
10262 ALL_SO_LIBS macro
10263 * solib.h (update_solib_list): New function declaration.
10264 (so_list_head): Move macro.
10265 * solist.h (ALL_SO_LIBS): New macro.
10266
10267 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10268
10269 * infcmd.c (post_create_inferior): Remove unused argument in
10270 call to solib_add.
10271 * remote.c (remote_start_remote): Likewise.
10272 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10273 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10274 (enable_break): Likewise.
10275 * solib.c (update_solib_list): Remove unused target argument
10276 and its documentation.
10277 (solib_add): Remove unused target argument. Remove unused
10278 argument in call to update_solib_list.
10279 (info_sharedlibrary_command): Remove unused argument in call
10280 to update_solib_list.
10281 (sharedlibrary_command): Remove unused argument in call to
10282 solib_add.
10283 (handle_solib_event): Likewise.
10284 (reload_shared_libraries): Likewise.
10285 * solib.h (solib_add): Remove unused target argument.
10286
10287 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
10288
10289 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10290 (s390_displaced_step_fixup): Cover relative branches with the
10291 default fixup handling. This fixes lack of support for some
10292 relative branch instructions.
10293
10294 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10295
10296 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10297 ptid from regcache.
10298
10299 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10300
10301 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10302 i386_darwin_store_inferior_registers): Use ptid from regcache.
10303
10304 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10305
10306 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10307 i386bsd_store_inferior_registers): Use ptid from regcache.
10308
10309 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10310
10311 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10312 hppaobsd_store_registers): Use ptid from regcache.
10313
10314 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10315
10316 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10317 hppanbsd_store_registers): Use ptid from regcache.
10318
10319 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10320
10321 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10322 from regcache. Use get_ptrace_pid.
10323
10324 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10325
10326 * corelow.c (get_core_register_section): Use ptid from regcache,
10327 update doc.
10328
10329 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10330
10331 * bsd-uthread.c (bsd_uthread_fetch_registers,
10332 bsd_uthread_store_registers): Use ptid from regcache, set and
10333 restore inferior_ptid.
10334
10335 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10336
10337 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10338 fetch_fp_regs, store_register, store_regs, store_fp_register,
10339 store_fp_regs): Use ptid from regcache.
10340
10341 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10342
10343 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10344 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10345 store_vfp_regs): Use ptid from regcache.
10346
10347 2017-03-17 Pedro Alves <palves@redhat.com>
10348
10349 PR remote/21188
10350 * ser-base.c (ser_base_wait_for): Add comment.
10351 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10352 version.
10353 * ser-unix.c (hardwire_raw): Remove reference to
10354 scb->current_timeout.
10355 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10356 (hardwire_ops): Install ser_base_readchar instead of
10357 hardwire_readchar.
10358 * serial.h (struct serial) <current_timeout, timeout_remaining>:
10359 Remove fields.
10360
10361 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
10362
10363 PR gdb/19637
10364 * python/lib/gdb/printer/bound_registers.py: Add support for
10365 Python 3.
10366
10367 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
10368
10369 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10370 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10371 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10372 byte_offset to subobj_byte_offset. Fix the handling of
10373 DWARF_VALUE_STACK on big-endian targets when coming via an
10374 implicit pointer.
10375 (dwarf2_evaluate_loc_desc): Adjust call to
10376 dwarf2_evaluate_loc_desc_full.
10377 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10378 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10379
10380 2017-03-16 Yao Qi <yao.qi@linaro.org>
10381
10382 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10383 and REVSH instructions.
10384
10385 2017-03-16 Yao Qi <yao.qi@linaro.org>
10386
10387 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10388 (arm_record_test): Declare.
10389 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10390 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10391 align with the manual.
10392 (thumb_record_misc): Adjust the code order to align with the
10393 manual.
10394 (thumb2_record_decode_insn_handler): Fix instruction matching.
10395 (instruction_reader_thumb): New class.
10396 (arm_record_test): New function.
10397
10398 2017-03-16 Yao Qi <yao.qi@linaro.org>
10399
10400 * arm-tdep.c (abstract_memory_reader): New class.
10401 (instruction_reader): New class.
10402 (extract_arm_insn): Add argument 'reader'. Callers updated.
10403 (decode_insn): Likewise.
10404
10405 2017-03-16 Doug Evans <dje@google.com>
10406
10407 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10408 member. Change type of TYPE member to SCM. All uses updated.
10409 (lsscm_make_lazy_string_smob): Add assert.
10410 (lsscm_make_lazy_string): Flag bad length values.
10411 (lsscm_elt_type): New function.
10412 (gdbscm_lazy_string_to_value): Rewrite to use
10413 lsscm_safe_lazy_string_to_value.
10414 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10415 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10416 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
10417 in incoming type.
10418 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10419 * guile/scm-type.c (tyscm_scm_to_type): New function.
10420
10421 2017-03-15 Doug Evans <dje@google.com>
10422
10423 PR python/17728, python/18439, python/18779
10424 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10425 member. Change type of TYPE member to PyObject *. All uses updated.
10426 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10427 (gdbpy_create_lazy_string_object): Flag bad length values.
10428 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10429 Handle typedefs in incoming type.
10430 (stpy_lazy_string_elt_type): New function.
10431 (gdbpy_extract_lazy_string): Call it.
10432 * python/py-value.c (valpy_lazy_string): Flag bad length values.
10433 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
10434 typedefs in incoming type.
10435
10436 2017-03-16 Doug Evans <dje@google.com>
10437
10438 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10439 * guile/scm-type.c (tyscm_scm_to_type): New function.
10440
10441 2017-03-16 Jiong Wang <jiong.wang@arm.com>
10442
10443 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10444 "ULONGEST" for "skip".
10445
10446 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10447
10448 PR gdb/21220
10449 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10450 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10451 (inf_ptrace_peek_poke): ...here. New function. Now also loop
10452 over ptrace peek/poke until end of buffer or error.
10453
10454 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
10455
10456 * parse.c (length_of_subexp): Make static.
10457 * parser-defs.h (length_of_subexp): Remove.
10458
10459 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10460
10461 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10462 as well.
10463
10464 2017-03-14 Pedro Alves <palves@redhat.com>
10465
10466 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10467 (main): Use std::unique_ptr. Remove calls to
10468 cp_demangled_name_parse_free.
10469
10470 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10471
10472 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10473 alphabsd_store_inferior_registers): Use regcache->ptid instead
10474 of inferior_ptid.
10475
10476 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10477
10478 * aix-thread.c (aix_thread_fetch_registers,
10479 aix_thread_store_registers): Use regcache->ptid instead of
10480 inferior_ptid.
10481
10482 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10483
10484 * aarch64-linux-nat.c (fetch_gregs_from_thread,
10485 store_gregs_to_thread, fetch_fpregs_from_thread,
10486 store_fpregs_to_thread): Use regcache->ptid instead of
10487 inferior_ptid.
10488
10489 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10490
10491 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10492 amd64_linux_fetch_inferior_registers): Use regcache->ptid
10493 instead of inferior_ptid.
10494
10495 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10496
10497 * target.c (target_fetch_registers, target_store_registers): Add
10498 assert.
10499
10500 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10501
10502 * regcache.h (regcache_get_ptid): New function.
10503 * regcache.c (regcache_get_ptid): New function.
10504
10505 2017-03-13 Mark Wielaard <mark@klomp.org>
10506
10507 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10508
10509 2017-03-10 Keith Seitz <keiths@redhat.com>
10510
10511 PR c++/8218
10512 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10513
10514 2017-03-08 Pedro Alves <palves@redhat.com>
10515
10516 PR gdb/18360
10517 * infrun.c (start_step_over, do_target_resume, resume)
10518 (restart_threads): Assert we're not resuming a thread that is
10519 meant to be stopped.
10520 (infrun_thread_stop_requested_callback): Delete.
10521 (infrun_thread_stop_requested): If the thread is internally
10522 stopped, queue a pending stop event and clear the thread's
10523 inline-frame state.
10524 (handle_stop_requested): New function.
10525 (handle_syscall_event, handle_inferior_event_1): Use
10526 handle_stop_requested.
10527 (handle_stop_requested): New function.
10528 (handle_signal_stop): Set the thread's stop_signal here instead of
10529 at caller.
10530 (finish_step_over): Clear step over info unconditionally.
10531 (handle_signal_stop): If the user had interrupted the event
10532 thread, consider the stop a random signal.
10533 (handle_signal_stop) <signal arrived while stepping over
10534 breakpoint>: Don't restart threads here.
10535 (stop_waiting): Don't clear step-over info here.
10536
10537 2017-03-08 Pedro Alves <palves@redhat.com>
10538
10539 PR 21206
10540 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10541 goes to argument 2, not 1.
10542
10543 2017-03-08 Pedro Alves <palves@redhat.com>
10544
10545 PR cli/21218
10546 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10547 display_gdb_prompt.
10548 (command_line_input): Add comment.
10549
10550 2017-03-08 Pedro Alves <palves@redhat.com>
10551
10552 PR tui/21216
10553 * tui/tui-file.c (tui_file::write): New.
10554 * tui/tui-file.h (tui_file): Override "write".
10555 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10556 factored out from ...
10557 (tui_puts): ... here.
10558 (tui_putc): Use them.
10559 (tui_write): New function.
10560 * tui/tui-io.h (tui_write): Declare.
10561
10562 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10563
10564 * Makefile.in (SFILES): Replace "environ.c" with
10565 "common/environ.c".
10566 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10567 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10568 to...
10569 * common/environ.c: ... here.
10570 * environ.h: Moved to...
10571 * common/environ.h: ... here.
10572
10573 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10574
10575 * gdbarch.sh (pstring_ptr): New static function.
10576 (gdbarch_disassembler_options): Use it.
10577 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10578 not valid_disassembler_option->name.
10579 * gdbarch.c: Regenerate.
10580
10581 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10582
10583 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10584
10585 2017-03-07 Pedro Alves <palves@redhat.com>
10586
10587 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10588
10589 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
10590
10591 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10592 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10593 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10594 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10595
10596 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10597
10598 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10599
10600 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10601
10602 * remote.c (remote_add_target_side_commands): Use range-based
10603 for loop.
10604
10605 2017-03-03 Yao Qi <yao.qi@linaro.org>
10606
10607 PR gdb/21165
10608 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10609 value is lazy.
10610 * valprint.c (common_val_print): Likewise.
10611
10612 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10613
10614 * NEWS: Mention new set/show disassembler-options commands.
10615 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10616 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10617 (prospective_options): New static variable.
10618 (gdb_disassembler::gdb_disassembler): Initialize
10619 m_di.disassembler_options.
10620 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10621 (get_disassembler_options): New function.
10622 (set_disassembler_options): Likewise.
10623 (set_disassembler_options_sfunc): Likewise.
10624 (show_disassembler_options_sfunc): Likewise.
10625 (disassembler_options_completer): Likewise.
10626 (_initialize_disasm): Likewise.
10627 * disasm.h (get_disassembler_options): New prototype.
10628 (set_disassembler_options): Likewise.
10629 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10630 (gdbarch_verify_disassembler_options): Likewise.
10631 * gdbarch.c: Regenerate.
10632 * gdbarch.h: Likewise.
10633 * arm-tdep.c (num_disassembly_options): Delete.
10634 (set_disassembly_style): Likewise.
10635 (arm_disassembler_options): New static variable.
10636 (set_disassembly_style_sfunc): Convert short style name into long
10637 option name. Call set_disassembler_options.
10638 (show_disassembly_style_sfunc): New function.
10639 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10640 set_gdbarch_verify_disassembler_options.
10641 (_initialize_arm_tdep): Delete regnames variable and update callers.
10642 (arm_disassembler_options): Initialize.
10643 (disasm_options): New variable.
10644 (num_disassembly_options): Rename from this...
10645 (num_disassembly_styles): ...to this. Compute by scanning through
10646 disasm_options.
10647 (valid_disassembly_styles): Initialize using disasm_options.
10648 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10649 set_arm_regname_option.
10650 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10651 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10652 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10653 set_gdbarch_verify_disassembler_options.
10654 * s390-tdep.c (s390_disassembler_options): New static variable.
10655 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10656 set_gdbarch_verify_disassembler_options.
10657
10658 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10659
10660 * remote.c (remote_add_target_side_condition): Remove "struct"
10661 keyword from range-based for loop.
10662
10663 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10664
10665 * remote.c (remote_add_target_side_condition): Use range-based
10666 for loop. Update comment.
10667
10668 2017-02-27 Yao Qi <yao.qi@linaro.org>
10669
10670 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10671
10672 2017-02-26 Alan Hayward <alan.hayward@arm.com>
10673
10674 * regcache.c (regcache_raw_update): New function.
10675 (regcache_raw_read): Move code to regcache_raw_update.
10676 * regcache.h (regcache_raw_update): New declaration.
10677 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10678
10679 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10680
10681 * dwarf2read.c (create_debug_type_hash_table): Initialize
10682 header.signature and header.type_offset_in_tu.
10683
10684 2017-02-24 Pedro Alves <palves@redhat.com>
10685
10686 * symtab.c (make_file_symbol_completion_list_1): Use
10687 add_symtab_completions.
10688
10689 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10690
10691 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10692
10693 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10694
10695 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10696 I386_MAX_REGISTER_SIZE.
10697 (i386_pseudo_register_write): Likewise.
10698 (i386_process_record): Likewise.
10699 * i387-tdep.c (i387_supply_xsave): Likewise.
10700 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10701 (store_register): Likewise.
10702
10703 2017-02-23 Pedro Alves <palves@redhat.com>
10704
10705 * ada-lang.c: Include "common/function-view.h".
10706 (ada_iterate_over_symbols): Adjust to use function_view as
10707 callback type.
10708 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10709 (ada_make_symbol_completion_list): Use a lambda.
10710 (ada_exc_search_name_matches): Delete.
10711 (name_matches_regex): New.
10712 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10713 * compile/compile-c-support.c: Include "common/function-view.h".
10714 (print_one_macro): Change prototype to accept a ui_file pointer.
10715 (write_macro_definitions): Use a lambda.
10716 * dwarf2read.c: Include "common/function-view.h".
10717 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10718 (dw2_expand_symtabs_matching): Adjust to use function_view as
10719 callback type.
10720 * language.h: Include "common/function-view.h".
10721 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10722 function_view as callback type.
10723 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10724 * linespec.c: Include "common/function-view.h".
10725 (collect_info::add_symbol): New method.
10726 (struct symbol_and_data_callback, iterate_inline_only, struct
10727 symbol_matcher_data, iterate_name_matcher): Delete.
10728 (iterate_over_all_matching_symtabs): Adjust to use function_view
10729 as callback type and lambdas.
10730 (iterate_over_file_blocks): Adjust to use function_view as
10731 callback type.
10732 (decode_compound_collector): Now a class with private fields.
10733 (decode_compound_collector::release_symbols): New method.
10734 (collect_one_symbol): Rename to...
10735 (decode_compound_collector::operator()): ... this and adjust.
10736 (lookup_prefix_sym): decode_compound_collector construction bits
10737 move to decode_compound_collector ctor. Pass the
10738 decode_compound_collector object directly as callback. Remove
10739 cleanups and use decode_compound_collector::release_symbols
10740 instead.
10741 (symtab_collector): Now a class with private fields.
10742 (symtab_collector::release_symtabs): New method.
10743 (add_symtabs_to_list): Rename to...
10744 (symtab_collector::operator()): ... this and adjust.
10745 (collect_symtabs_from_filename): symtab_collector construction
10746 bits move to symtab_collector ctor. Pass the symtab_collector
10747 object directly as callback. Remove cleanups and use
10748 symtab_collector::release_symtabs instead.
10749 (collect_symbols): Delete.
10750 (add_matching_symbols_to_info): Use lambdas.
10751 * macrocmd.c (print_macro_callback): Delete.
10752 (info_macro_command): Use a lambda.
10753 (info_macros_command): Pass print_macro_definition as callable
10754 directly.
10755 (print_one_macro): Remove 'ignore' parameter.
10756 (macro_list_command): Adjust.
10757 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10758 (macro_for_each_data::user_data): Delete field.
10759 (foreach_macro): Adjust to call the function_view.
10760 (macro_for_each): Adjust to use function_view as callback type.
10761 (foreach_macro_in_scope): Adjust to call the function_view.
10762 (macro_for_each_in_scope): Adjust to use function_view as callback
10763 type.
10764 * macrotab.h: Include "common/function-view.h".
10765 (macro_callback_fn): Declare a prototype instead of a pointer.
10766 Remove "user_data" parameter.
10767 (macro_for_each, macro_for_each_in_scope): Adjust to use
10768 function_view as callback type.
10769 * psymtab.c (partial_map_expand_apply)
10770 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10771 Adjust to use function_view as callback type and to return bool.
10772 (psym_expand_symtabs_matching): Adjust to use function_view as
10773 callback types.
10774 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10775 to use function_view as callback type and to return bool.
10776 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10777 callback types.
10778 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10779 as callback types.
10780 * symfile.h: Include "common/function-view.h".
10781 (expand_symtabs_file_matcher_ftype)
10782 (expand_symtabs_symbol_matcher_ftype)
10783 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10784 return bool.
10785 (quick_symbol_functions::map_symtabs_matching_filename)
10786 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10787 function_view as callback type and return bool.
10788 (expand_symtabs_matching): Adjust to use function_view as callback
10789 type.
10790 (maintenance_expand_name_matcher)
10791 (maintenance_expand_file_matcher): Delete.
10792 (maintenance_expand_symtabs): Use lambdas.
10793 * symtab.c (iterate_over_some_symtabs): Adjust to use
10794 function_view as callback types and return bool.
10795 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10796 of a cleanup.
10797 (lookup_symtab_callback): Delete.
10798 (lookup_symtab): Use a lambda.
10799 (iterate_over_symbols): Adjust to use function_view as callback
10800 type.
10801 (struct search_symbols_data, search_symbols_file_matches)
10802 (search_symbols_name_matches): Delete.
10803 (search_symbols): Use a pair of lambdas.
10804 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10805 (symtab_expansion_callback): Delete.
10806 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10807 * symtab.h: Include "common/function-view.h".
10808 (iterate_over_some_symtabs): Adjust to use function_view as
10809 callback type and return bool.
10810 (iterate_over_symtabs): Adjust to use function_view as callback
10811 type.
10812 (symbol_found_callback_ftype): Remove 'data' parameter and return
10813 bool.
10814 (iterate_over_symbols): Adjust to use function_view as callback
10815 type.
10816
10817 2017-02-23 Pedro Alves <palves@redhat.com>
10818
10819 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10820 (%.o) <unittests/%.c>: New pattern.
10821 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10822 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10823 * common/function-view.h: New file.
10824 * unittests/function-view-selftests.c: New file.
10825 * configure: Regenerate.
10826
10827 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10828
10829 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10830 inferior_ptid.
10831 * go32-nat.c (go32_thread_alive): Likewise.
10832
10833 2017-02-23 Yao Qi <yao.qi@linaro.org>
10834
10835 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10836 delete.
10837
10838 2017-02-23 Yao Qi <yao.qi@linaro.org>
10839
10840 * varobj.c (varobj_clear_saved_item): Use delete instead of
10841 xfree.
10842 (update_dynamic_varobj_children): Likewise.
10843
10844 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10845
10846 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10847
10848 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10849
10850 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10851 m_enum_value to 0 in default constructor.
10852
10853 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10854
10855 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10856 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10857 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10858 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10859 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10860 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10861 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10862 IS_STORE_CONDITIONAL_INSN.
10863
10864 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10865
10866 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10867
10868 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10869
10870 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10871
10872 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10873
10874 * dwarf2read.c (skip_one_die, read_attribute_value)
10875 (dwarf2_const_value_attr, dump_die_shallow)
10876 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10877 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10878
10879 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10880
10881 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10882 (dwarf_parse_macro_header): Accept DWARF version 5.
10883 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10884
10885 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10886
10887 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10888 DW_AT_GNU_*.
10889 * common/common-exceptions.h (enum errors): Likewise.
10890 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10891 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10892 (dwarf_expr_context::execute_stack_op): Likewise.
10893 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10894 Likewise.
10895 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10896 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10897 (show_entry_values_debug, call_site_to_target_addr)
10898 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10899 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10900 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10901 (value_of_dwarf_block_entry, indirect_pieced_value)
10902 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10903 (disassemble_dwarf_expression): Likewise.
10904 * dwarf2read.c (process_die, inherit_abstract_dies)
10905 (read_call_site_scope): Likewise.
10906 * gdbtypes.h (struct func_type, struct call_site_parameter)
10907 (struct call_site): Likewise.
10908 * stack.c (read_frame_arg): Likewise.
10909 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10910
10911 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10912
10913 * defs.h (read_unsigned_leb128): New declaration.
10914 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10915 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10916 (dwarf2_find_location_expression): Call also
10917 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10918 * dwarf2loc.h (dwarf2_version): New declaration.
10919 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10920 rnglists.
10921 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10922 .debug_rnglists.
10923 (struct dwop_section_names): Add loclists_dwo.
10924 (dwop_section_names): Add .debug_loclists.dwo.
10925 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10926 (struct dwarf2_per_cu_data): Add dwarf_version.
10927 (struct dwo_sections): Add loclists.
10928 (struct attr_abbrev): Add implicit_const.
10929 (read_indirect_line_string): New declaration.
10930 (read_unsigned_leb128): Delete declaration.
10931 (rcuh_kind): New definition.
10932 (read_and_check_comp_unit_head): Change parameter
10933 is_debug_types_section to section_kind.
10934 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10935 (read_comp_unit_head): Change parameter abfd to section, add parameter
10936 section_kind. Handle DWARF-5.
10937 (error_check_comp_unit_head): Accept also DWARF version 5.
10938 (read_and_check_comp_unit_head): Change parameter
10939 is_debug_types_section to section_kind.
10940 (read_and_check_type_unit_head): Delete function.
10941 (read_abbrev_offset): Handle DWARF-5.
10942 (create_debug_type_hash_table): Add parameter section_kind. Process
10943 only DW_UT_type. Use signature and type_offset_in_tu from struct
10944 comp_unit_head.
10945 (create_debug_types_hash_table): Update create_debug_type_hash_table
10946 caller.
10947 (create_all_type_units): Call create_debug_type_hash_table.
10948 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10949 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10950 caller.
10951 (skip_one_die): Handle DW_FORM_implicit_const.
10952 (dwarf2_rnglists_process): New function.
10953 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10954 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10955 (read_attribute_value): Handle DW_FORM_implicit_const,
10956 DW_FORM_line_strp.
10957 (read_attribute): Handle DW_FORM_implicit_const.
10958 (read_indirect_string_at_offset_from): New function from
10959 read_indirect_string_at_offset.
10960 (read_indirect_string_at_offset): Call
10961 read_indirect_string_at_offset_from.
10962 (read_indirect_line_string_at_offset): New function.
10963 (read_indirect_string): New function comment.
10964 (read_indirect_line_string): New function.
10965 (read_unsigned_leb128): Make it global.
10966 (dwarf2_string_attr): Handle DWARF-5.
10967 (add_include_dir_stub, read_formatted_entries): New functions.
10968 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10969 Handle DWARF-5.
10970 (per_cu_header_read_in): Update read_comp_unit_head caller.
10971 (dwarf2_version): New function.
10972 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10973 rnglists.
10974 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10975 fields.
10976
10977 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10978
10979 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10980
10981 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10982
10983 * dwarf2read.c (dwarf2_ranges_process): New function from
10984 dwarf2_ranges_read.
10985 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10986 dwarf2_ranges_process.
10987
10988 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10989
10990 * dwarf2read.c (create_debug_type_hash_table): New function from
10991 create_debug_types_hash_table.
10992 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10993 (create_all_type_units, open_and_init_dwo_file): Update
10994 create_debug_types_hash_table callers.
10995
10996 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10997
10998 PR gdb/16188
10999 * fork-child.c (trace_start_error): Fix thinko. va_end should
11000 refer to 'ap', not 'args'.
11001
11002 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
11003 Pedro Alves <palves@redhat.com>
11004
11005 PR gdb/16188
11006 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11007 calls succeeded.
11008 * fork-child.c (trace_start_error): New function.
11009 (trace_start_error_with_name): Likewise.
11010 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11011 * inf-ptrace.c (inf_ptrace_me): Likewise.
11012 * inferior.h (trace_start_error): New prototype.
11013 (trace_start_error_with_name): Likewise.
11014
11015 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
11016
11017 PR gdb/21164
11018 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11019 NULL before using it.
11020 * symmisc.c (maintenance_print_symbols): Likewise.
11021 (maintenance_print_msymbols): Likewise.
11022
11023 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11024
11025 * NEWS: Add record Python bindings entry.
11026
11027 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11028
11029 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11030 py-record-full.o.
11031 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11032 * python/py-record-btrace.c, python/py-record-btrace.h,
11033 python/py-record-full.c, python/py-record-full.h: New file.
11034 * python/py-record.c: Add include for py-record-btrace.h and
11035 py-record-full.h.
11036 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11037 recpy_instruction_history, recpy_function_call_history, recpy_begin,
11038 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11039 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11040 New definition.
11041 (gdbpy_initialize_btrace): New export.
11042 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11043
11044 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11045
11046 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11047 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11048 * python/py-record.c: New file.
11049 * python/python-internal.h (gdbpy_start_recording,
11050 gdbpy_current_recording, gdpy_stop_recording,
11051 gdbpy_initialize_record): New export.
11052 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11053 (python_GdbMethods): Add gdbpy_start_recording,
11054 gdbpy_current_recording and gdbpy_stop_recording.
11055
11056 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11057
11058 * record-btrace.c (record_btrace_record_method): New function.
11059 (init_record_btrace_ops): Initialize to_record_method.
11060 * record-full.c (record_full_record_method): New function.
11061 (init_record_full_ops, init_record_full_core_ops): Add
11062 record_full_record_method.
11063 * record.h (enum record_method): New enum.
11064 * target-debug.h (target_debug_print_enum_record_method: New define.
11065 * target-delegates.c: Regenerate.
11066 * target.c (target_record_method): New function.
11067 * target.h: Include record.h.
11068 (struct target_ops) <to_record_method>: New field.
11069 (target_record_method): New export.
11070
11071 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11072
11073 * record.h (record_start, record_stop): New export.
11074 * record.c (record_start, record_stop): New function.
11075
11076 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11077
11078 * btrace.c (btrace_fetch): Copy function call segments pointer
11079 into a vector.
11080 (btrace_clear): Clear the vector.
11081 (btrace_find_insn_by_number): Use binary search to find the correct
11082 function call segment.
11083 * btrace.h (brace_fun_p): New typedef.
11084 (struct btrace_thread_info) <functions>: New field.
11085
11086 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11087
11088 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11089 * btrace.c (btrace_decode_error): ... here. New function.
11090 * btrace.h (btrace_decode_error): New export.
11091
11092 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11093
11094 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11095 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11096 btrace_find_insn_by_number): Remove special case for gaps.
11097 * btrace.h (btrace_insn_get_error): New export.
11098 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11099 * record-btrace.c (btrace_insn_history): Print number for gaps.
11100 (record_btrace_info, record_btrace_goto): Handle gaps.
11101
11102 2017-02-14 Tom Tromey <tom@tromey.com>
11103
11104 PR python/13598:
11105 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11106 event.
11107 * python/py-evts.c (gdbpy_initialize_py_events): Add
11108 before_prompt registry.
11109 * python/py-events.h (events_object) <before_prompt>: New field.
11110
11111 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11112
11113 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11114
11115 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
11116
11117 * symfile (_initialize_symfile): Add usage text to the load command's
11118 help text.
11119
11120 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11121
11122 * utils.c (defaulted_query): Don't query on secondary UIs.
11123
11124 2017-02-10 Tom Tromey <tom@tromey.com>
11125
11126 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11127
11128 2017-02-10 Tom Tromey <tom@tromey.com>
11129
11130 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11131 "cleanup" local.
11132 * python/py-type.c (typy_legacy_template_argument): Remove
11133 unnecessary "cleanup" local.
11134
11135 2017-02-10 Tom Tromey <tom@tromey.com>
11136
11137 * python/python.c (do_start_initialization): New function, from
11138 _initialize_python.
11139 (_initialize_python): Call do_start_initialization.
11140 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11141 goto.
11142
11143 2017-02-10 Tom Tromey <tom@tromey.com>
11144
11145 * python/py-prettyprint.c (pretty_print_one_value): Use
11146 gdbpy_ref.
11147
11148 2017-02-10 Tom Tromey <tom@tromey.com>
11149
11150 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11151 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11152 gdbpy_ref.
11153 * python/py-type.c (field_new): Use gdbpy_ref.
11154 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11155 gdbpy_ref.
11156 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11157 (py_free_pspace): Likewise.
11158 (pspace_to_pspace_object): Likewise.
11159 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11160 (py_free_objfile): Likewise.
11161 (objfile_to_objfile_object): Likewise.
11162 * python/py-inferior.c (delete_thread_object): Use
11163 gdbpy_ref.
11164 (infpy_read_memory): Likewise.
11165 (py_free_inferior): Likewise.
11166 * python/py-evtregistry.c (create_eventregistry_object): Use
11167 gdbpy_ref.
11168 * python/py-event.c (create_event_object): Use gdbpy_ref.
11169
11170 2017-02-10 Tom Tromey <tom@tromey.com>
11171
11172 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11173 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11174 used.
11175 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11176 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11177 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11178 python/py-framefilter.c, python/py-function.c,
11179 python/py-inferior.c, python/py-infevents.c,
11180 python/py-linetable.c, python/py-newobjfileevent.c,
11181 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11182 python/py-signalevent.c, python/py-stopevent.c,
11183 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11184 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11185 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11186 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11187
11188 2017-02-10 Tom Tromey <tom@tromey.com>
11189
11190 * ui-out.h (ui_out_emit_type): New class.
11191 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11192 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11193 and ui_out_emit_tuple.
11194 (enumerate_locals): Likewise.
11195 (py_mi_print_variables, py_print_locals, py_print_args): Use
11196 ui_out_emit_list.
11197 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11198 ui_out_emit_list.
11199 * common/gdb_optional.h: New file.
11200
11201 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11202
11203 * MAINTAINERS (Write After Approval): Update my e-mail address.
11204
11205 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
11206
11207 PR gdb/21122
11208 * breakpoint.c (_initialize_breakpoint): Update the help description
11209 of the 'commands' command to indicate that it takes a list argument.
11210
11211 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11212
11213 * interps.c (current_interp_set_logging): Remove "return".
11214
11215 2017-02-09 Gary Benson <gbenson@redhat.com>
11216
11217 * symtab.c (add_symtab_completions): Prevent NULL pointer
11218 dereference.
11219
11220 2017-02-08 Pedro Alves <palves@redhat.com>
11221
11222 * interps.c (interp::interp): Remove reference to quiet_p.
11223 (interp_set): Make static. Remove dead "Switching to" output
11224 code.
11225 (interp_quiet_p, interp_set_quiet): Delete.
11226 (interpreter_exec_cmd): Don't set the interpreter quiet.
11227 * interps.h (interp_quiet_p): Make static.
11228 (class interp) <quiet_p>: Remove field
11229
11230 2017-02-08 Jerome Guitton <guitton@adacore.com>
11231
11232 * cli/cli-decode.c (find_command_name_length): Make it extern.
11233 * cli/cli-decode.h (find_command_name_length): Declare.
11234 * cli/cli-script.c (command_name_equals, line_first_arg):
11235 New functions.
11236 (process_next_line): Use cli-decode to parse command names.
11237 (build_command_line): Make args a constant pointer.
11238
11239 2017-02-08 Jerome Guitton <guitton@adacore.com>
11240
11241 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11242 Remove case-insensitive search.
11243
11244 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11245
11246 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11247 at the end of the line. Avoids an ARI warning.
11248
11249 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
11250
11251 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11252 rdseed instructions.
11253 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11254
11255 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11256
11257 PR tdep/20936
11258 Provide and use sparc32 and sparc64 target description XML files.
11259 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11260 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11261 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11262 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11263 * features/sparc/sparc32-solaris.xml: New file.
11264 * features/sparc/sparc64-solaris.xml: New file.
11265 * features/sparc/sparc32-solaris.c: Generated.
11266 * features/sparc/sparc64-solaris.c: Generated.
11267 * sparc-tdep.h: Account for differences in target descriptions.
11268 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11269 (sparc32_register_type): Use target provided registers.
11270 (validate_tdesc_registers): New function.
11271 (sparc32_gdbarch_init): Use tdesc_has_registers.
11272 Set pseudoregister functions.
11273 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11274 (sparc64_register_type): Use target provided registers.
11275 (sparc64_init_abi): Set pseudoregister functions.
11276
11277 2017-02-03 Tom Tromey <tom@tromey.com>
11278
11279 PR rust/21097:
11280 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11281 with a single member.
11282
11283 2017-02-03 Pedro Alves <palves@redhat.com>
11284
11285 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11286 (cli_interp_base::~cli_interp_base): New.
11287 (cli_interp): New struct.
11288 (as_cli_interp): Cast the interp itself to cli_interp.
11289 (cli_interpreter_pre_command_loop): Rename to ...
11290 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
11291 parameter.
11292 (cli_interpreter_init): Rename to ...
11293 (cli_interp::init): ... this. Remove 'self' parameter. Use
11294 boolean. Make extern.
11295 (cli_interpreter_resume): Rename to ...
11296 (cli_interp::resume): ... this. Remove 'data' parameter. Make
11297 extern.
11298 (cli_interpreter_suspend): Rename to ...
11299 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
11300 extern.
11301 (cli_interpreter_exec): Rename to ...
11302 (cli_interp::exec): ... this. Remove 'data' parameter. Make
11303 extern.
11304 (cli_interpreter_supports_command_editing): Rename to ...
11305 (cli_interp_base::supports_command_editing): ... this. Remove
11306 'interp' parameter. Make extern.
11307 (cli_ui_out): Rename to ...
11308 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
11309 Make extern.
11310 (cli_set_logging): Rename to ...
11311 (cli_interp_base::set_logging): ... this. Remove 'interp'
11312 parameter. Make extern.
11313 (cli_interp_procs): Delete.
11314 (cli_interp_factory): Adjust to use "new".
11315 * cli/cli-interp.h: Include "interps.h".
11316 (struct cli_interp_base): New struct.
11317 * interps.c (struct interp): Delete. Fields moved to interps.h.
11318 (interp_new): Delete.
11319 (interp::interp, interp::~interp): New.
11320 (interp_set): Use bool, and return void. Assume the interpreter
11321 has suspend, init and resume methods, and that the all return
11322 void.
11323 (set_top_level_interpreter): interp_set returns void.
11324 (interp_ui_out): Adapt.
11325 (current_interp_set_logging): Adapt.
11326 (interp_data): Delete.
11327 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11328 (interp_exec): Adapt.
11329 (top_level_interpreter_data): Delete.
11330 * interps.h (interp_init_ftype, interp_resume_ftype)
11331 (interp_suspend_ftype, interp_exec_ftype)
11332 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11333 (class interp): New.
11334 (interp_new): Delete.
11335 (interp_set): Now returns void. Use bool.
11336 (interp_data, top_level_interpreter_data): Delete.
11337 * mi/mi-common.h: Include interps.h.
11338 (class mi_interp): Inherit from interp. Define a ctor. Declare
11339 init, resume, suspect, exec, interp_ui_out, set_logging and
11340 pre_command_loop methods.
11341 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11342 (mi_interpreter_init): Rename to ...
11343 (mi_interp::init): ... this. Remove the 'interp' parameter, use
11344 bool, return void and make extern. Adjust.
11345 (mi_interpreter_resume): ... Rename to ...
11346 (mi_interp::resume): ... this. Remove the 'data' parameter,
11347 return void and make extern. Adjust.
11348 (mi_interpreter_suspend): ... Rename to ...
11349 (mi_interp::suspend): ... this. Remove the 'data' parameter,
11350 return void and make extern. Adjust.
11351 (mi_interpreter_exec): ... Rename to ...
11352 (mi_interp::exec): ... this. Remove the 'data' parameter and make
11353 extern. Adjust.
11354 (mi_interpreter_pre_command_loop): ... Rename to ...
11355 (mi_interp::pre_command_loop): ... this. Remove the 'self'
11356 parameter and make extern.
11357 (mi_on_normal_stop_1): Adjust.
11358 (mi_ui_out): Rename to ...
11359 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
11360 parameter and make extern. Adjust.
11361 (mi_set_logging): Rename to ...
11362 (mi_interp::set_logging): ... this. Remove the 'interp'
11363 parameter and make extern. Adjust.
11364 (mi_interp_procs): Delete.
11365 (mi_interp_factory): Adjust to use 'new'.
11366 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11367 (mi_print_exception, mi_execute_command, mi_load_progress):
11368 Adjust.
11369 * tui/tui-interp.c (tui_interp): New class.
11370 (as_tui_interp): Return a tui_interp pointer.
11371 (tui_on_normal_stop, tui_on_signal_received)
11372 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11373 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11374 to use interp::interp_ui_out.
11375 (tui_init): Rename to ...
11376 (tui_interp::init): ... this. Remove the 'self' parameter, use
11377 bool, return void and make extern. Adjust.
11378 (tui_resume): Rename to ...
11379 (tui_interp::resume): ... this. Remove the 'data' parameter,
11380 return void and make extern. Adjust.
11381 (tui_suspend): Rename to ...
11382 (tui_interp::suspend): ... this. Remove the 'data' parameter,
11383 return void and make extern. Adjust.
11384 (tui_ui_out): Rename to ...
11385 (tui_interp::interp_ui_out): ... this. Remove the 'self'
11386 parameter, and make extern. Adjust.
11387 (tui_exec): Rename to ...
11388 (tui_interp::exec): ... this. Remove the 'data' parameter and
11389 make extern.
11390 (tui_interp_procs): Delete.
11391 (tui_interp_factory): Use "new".
11392
11393 2017-02-02 Tom Tromey <tom@tromey.com>
11394
11395 * rust-exp.y (ends_raw_string, space_then_number)
11396 (rust_identifier_start_p): Return bool.
11397 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11398 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11399 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11400 (rust_chartype_p): Return bool.
11401 (val_print_struct, rust_print_struct_def, rust_print_type):
11402 Update.
11403 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11404 Return bool.
11405
11406 2017-02-02 Tom Tromey <tom@tromey.com>
11407
11408 * rust-lang.c: Reindent.
11409
11410 2017-02-02 Tom Tromey <tom@tromey.com>
11411
11412 * rust-lang.h (rust_crate_for_block): Update.
11413 * rust-lang.c (rust_crate_for_block): Return std::string.
11414 (rust_get_disr_info): Use std:;string, not
11415 gdb::unique_xmalloc_ptr.
11416 * rust-exp.y (crate_name): Update.
11417
11418 2017-02-02 Pedro Alves <palves@redhat.com>
11419
11420 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11421 field out of gdb_disassembler_test and make it static.
11422
11423 2017-02-02 Pedro Alves <palves@redhat.com>
11424
11425 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11426 mi1_interp and mi_interp fields.
11427
11428 2017-02-02 Pedro Alves <palves@redhat.com>
11429
11430 * cli/cli-interp.c (struct saved_output_files, saved_output):
11431 Moved from cli/cli-logging.c.
11432 (cli_set_logging): New function.
11433 (cli_interp_procs): Install cli_set_logging.
11434 * cli/cli-interp.h (make_logging_output, cli_set_logging):
11435 Declare.
11436 * cli/cli-logging.c (struct saved_output_files, saved_output):
11437 Moved to cli/cli-interp.c.
11438 (pop_output_files): Don't save outputs here.
11439 (make_logging_output): New function.
11440 (handle_redirections): Don't build tee nor save previous outputs
11441 here.
11442 * interps.c (current_interp_set_logging): Change prototype.
11443 Assume there's always a set_logging_proc method installed.
11444 * interps.h (interp_set_logging_ftype): Change prototype.
11445 (current_interp_set_logging): Change prototype and adjust comment.
11446 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
11447 use make_logging_output.
11448 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11449 2017-02-02 Pedro Alves <palves@redhat.com>
11450
11451 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11452 from ...
11453 (set_logging_overwrite): ... here.
11454 (logging_no_redirect_file): Delete.
11455 (set_logging_redirect): Don't handle redirection on the fly.
11456 Instead warn that "logging off" / "logging on" is necessary.
11457 (pop_output_files): Delete references to logging_no_redirect_file.
11458 (show_logging_command): Always speak in terms of what will happen
11459 once logging is reenabled.
11460
11461 2017-02-02 Pedro Alves <palves@redhat.com>
11462
11463 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11464
11465 2017-02-02 Pedro Alves <palves@redhat.com>
11466
11467 * disasm.c (gdb_pretty_print_insn): Rename to ...
11468 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11469 Remove gdbarch parameter. Adapt to clear the object's buffers
11470 instead of allocating new buffers, and to print using the object's
11471 gdb_disassembler instead of calling gdb_print_insn.
11472 (dump_insns): Use gdb_pretty_print_disassembler.
11473 * disasm.h (gdb_pretty_print_insn): Delete declaration.
11474 (gdb_pretty_print_disassembler): New class.
11475 * record-btrace.c (btrace_insn_history): Use
11476 gdb_pretty_print_disassembler.
11477
11478 2017-02-02 Pedro Alves <palves@redhat.com>
11479
11480 * ada-lang.c (type_as_string): Use string_file.
11481 * ada-valprint.c (ada_print_floating): Use string_file.
11482 * ada-varobj.c (ada_varobj_scalar_image)
11483 (ada_varobj_get_value_image): Use string_file.
11484 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11485 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11486 * breakpoint.c (update_inserted_breakpoint_locations)
11487 (insert_breakpoint_locations, reattach_breakpoints)
11488 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11489 (print_it_watchpoint): Use string_file.
11490 (save_breakpoints): Use stdio_file.
11491 * c-exp.y (oper): Use string_file.
11492 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11493 tee_file.
11494 (pop_output_files): Use delete.
11495 (handle_redirections): Use stdio_file and tee_file.
11496 * cli/cli-setshow.c (do_show_command): Use string_file.
11497 * compile/compile-c-support.c (c_compute_program): Use
11498 string_file.
11499 * compile/compile-c-symbols.c (generate_vla_size): Take a
11500 'string_file &' instead of a 'ui_file *'.
11501 (generate_c_for_for_one_variable): Take a 'string_file &' instead
11502 of a 'ui_file *'. Use string_file.
11503 (generate_c_for_variable_locations): Take a 'string_file &'
11504 instead of a 'ui_file *'.
11505 * compile/compile-internal.h (generate_c_for_for_one_variable):
11506 Take a 'string_file &' instead of a 'ui_file *'.
11507 * compile/compile-loc2c.c (push, pushf, unary, binary)
11508 (print_label, pushf_register_address, pushf_register)
11509 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11510 'ui_file *'. Adjust.
11511 * compile/compile.c (compile_to_object): Use string_file.
11512 * compile/compile.h (compile_dwarf_expr_to_c)
11513 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11514 'ui_file *'.
11515 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11516 (replace_typedefs_qualified_name): Use string_file and
11517 obstack_copy0.
11518 * disasm.c (gdb_pretty_print_insn): Use string_file.
11519 (gdb_disassembly): Adjust reference the null_stream global.
11520 (do_ui_file_delete): Delete.
11521 (gdb_insn_length): Use null_stream.
11522 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11523 * dwarf2loc.c (dwarf2_compile_property_to_c)
11524 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11525 'string_file &' instead of a 'ui_file *'.
11526 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11527 * dwarf2read.c (do_ui_file_peek_last): Delete.
11528 (dwarf2_compute_name): Use string_file.
11529 * event-top.c (gdb_setup_readline): Use stdio_file.
11530 * gdbarch.sh (verify_gdbarch): Use string_file.
11531 * gdbtypes.c (safe_parse_type): Use null_stream.
11532 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11533 string_file.
11534 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11535 'string_file *' instead of a 'ui_file *'.
11536 (gdbscm_arch_disassemble): Use string_file.
11537 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11538 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11539 inherits from ui_file.
11540 (ioscm_file_port_delete, ioscm_file_port_rewind)
11541 (ioscm_file_port_put): Delete.
11542 (ioscm_file_port_write): Rename to ...
11543 (ioscm_file_port::write): ... this. Remove file_port_magic
11544 checks.
11545 (ioscm_file_port_new): Delete.
11546 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11547 ui_file_up.
11548 * guile/scm-type.c (tyscm_type_name): Use string_file.
11549 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11550 Use string_file.
11551 * infcmd.c (print_return_value_1): Use string_file.
11552 * infrun.c (print_target_wait_results): Use string_file.
11553 * language.c (add_language): Use string_file.
11554 * location.c (explicit_to_string_internal): Use string_file.
11555 * main.c (captured_main_1): Use null_file.
11556 * maint.c (maintenance_print_architecture): Use stdio_file.
11557 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11558 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11559 event_channel>: Change type to mi_console_file pointer.
11560 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11561 (mi_console_file_delete): Delete.
11562 (struct mi_console_file): Delete.
11563 (mi_console_file_magic): Delete.
11564 (mi_console_file_new): Delete.
11565 (mi_console_file::mi_console_file): New.
11566 (mi_console_file_delete): Delete.
11567 (mi_console_file_fputs): Delete.
11568 (mi_console_file::write): New.
11569 (mi_console_raw_packet): Delete.
11570 (mi_console_file::flush): New.
11571 (mi_console_file_flush): Delete.
11572 (mi_console_set_raw): Rename to ...
11573 (mi_console_file::set_raw): ... this.
11574 * mi/mi-console.h (class mi_console_file): New class.
11575 (mi_console_file_new, mi_console_set_raw): Delete.
11576 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11577 (mi_set_logging): Use delete and tee_file. Adjust.
11578 * mi/mi-main.c (output_register): Use string_file.
11579 (mi_cmd_data_evaluate_expression): Use string_file.
11580 (mi_cmd_data_read_memory): Use string_file.
11581 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11582 * mi/mi-out.c (mi_ui_out::main_stream): New.
11583 (mi_ui_out::rewind): Use main_stream and
11584 string_file.
11585 (mi_ui_out::put): Use main_stream and string_file.
11586 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11587 Allocate a 'string_file' instead.
11588 (mi_out_new): Don't allocate a mem_fileopen stream here.
11589 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11590 (mi_ui_out::main_stream): Declare method.
11591 * printcmd.c (eval_command): Use string_file.
11592 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11593 * python/py-arch.c (archpy_disassemble): Use string_file.
11594 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11595 * python/py-frame.c (frapy_str): Use string_file.
11596 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11597 Use string_file.
11598 * python/py-type.c (typy_str): Use string_file.
11599 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11600 * python/py-value.c (valpy_str): Use string_file.
11601 * record-btrace.c (btrace_insn_history): Use string_file.
11602 * regcache.c (regcache_print): Use stdio_file.
11603 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11604 * remote.c (escape_buffer): Use string_file.
11605 * rust-lang.c (rust_get_disr_info): Use string_file.
11606 * serial.c (serial_open_ops_1): Use stdio_file.
11607 (do_serial_close): Use delete.
11608 * stack.c (print_frame_arg): Use string_file.
11609 (print_frame_args): Remove local mem_fileopen stream, not used.
11610 (print_frame): Use string_file.
11611 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11612 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11613 Take a 'string_file *' instead of a 'ui_file *'.
11614 * top.c (new_ui): Use stdio_file and stderr_file.
11615 (free_ui): Use delete.
11616 (execute_command_to_string): Use string_file.
11617 (quit_confirm): Use string_file.
11618 * tracepoint.c (collection_list::append_exp): Use string_file.
11619 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11620 * tui/tui-file.c: Don't include "ui-file.h".
11621 (enum streamtype, struct tui_stream): Delete.
11622 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11623 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11624 (tui_file::tui_file): New method.
11625 (tui_file_fputs): Delete.
11626 (tui_file_get_strbuf): Delete.
11627 (tui_file::puts): New method.
11628 (tui_file_adjust_strbuf): Delete.
11629 (tui_file_flush): Delete.
11630 (tui_file::flush): New method.
11631 * tui/tui-file.h: Tweak intro comment.
11632 Include ui-file.h.
11633 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11634 (tui_file_adjust_strbuf): Delete declarations.
11635 (class tui_file): New class.
11636 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11637 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11638 (tui_register_format): Use string_stream.
11639 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11640 (tui_get_function_from_frame): Use string_file.
11641 * typeprint.c (type_to_string): Use string_file.
11642 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11643 (null_stream): New global.
11644 (ui_file_delete): Delete.
11645 (ui_file::ui_file): New.
11646 (null_file_isatty): Delete.
11647 (ui_file::~ui_file): New.
11648 (null_file_rewind): Delete.
11649 (ui_file::printf): New.
11650 (null_file_put): Delete.
11651 (null_file_flush): Delete.
11652 (ui_file::putstr): New.
11653 (null_file_write): Delete.
11654 (ui_file::putstrn): New.
11655 (null_file_read): Delete.
11656 (ui_file::putc): New.
11657 (null_file_fputs): Delete.
11658 (null_file_write_async_safe): Delete.
11659 (ui_file::vprintf): New.
11660 (null_file_delete): Delete.
11661 (null_file::write): New.
11662 (null_file_fseek): Delete.
11663 (null_file::puts): New.
11664 (ui_file_data): Delete.
11665 (null_file::write_async_safe): New.
11666 (gdb_flush, ui_file_isatty): Adjust.
11667 (ui_file_put, ui_file_rewind): Delete.
11668 (ui_file_write): Adjust.
11669 (ui_file_write_for_put): Delete.
11670 (ui_file_write_async_safe, ui_file_read): Adjust.
11671 (ui_file_fseek): Delete.
11672 (fputs_unfiltered): Adjust.
11673 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11674 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11675 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11676 (set_ui_file_data): Delete.
11677 (string_file::~string_file, string_file::write)
11678 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11679 (do_ui_file_as_string, ui_file_as_string): Delete.
11680 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11681 (struct mem_file): Delete.
11682 (mem_file_new): Delete.
11683 (stdio_file::stdio_file): New.
11684 (mem_file_delete): Delete.
11685 (stdio_file::stdio_file): New.
11686 (mem_fileopen): Delete.
11687 (stdio_file::~stdio_file): New.
11688 (mem_file_rewind): Delete.
11689 (stdio_file::set_stream): New.
11690 (mem_file_put): Delete.
11691 (stdio_file::open): New.
11692 (mem_file_write): Delete.
11693 (stdio_file_magic, struct stdio_file): Delete.
11694 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11695 (stdio_file::flush): New.
11696 (stdio_file_read): Rename to ...
11697 (stdio_file::read): ... this. Adjust.
11698 (stdio_file_write): Rename to ...
11699 (stdio_file::write): ... this. Adjust.
11700 (stdio_file_write_async_safe): Rename to ...
11701 (stdio_file::write_async_safe) ... this. Adjust.
11702 (stdio_file_fputs): Rename to ...
11703 (stdio_file::puts) ... this. Adjust.
11704 (stdio_file_isatty): Delete.
11705 (stdio_file_fseek): Delete.
11706 (stdio_file::isatty): New.
11707 (stderr_file_write): Rename to ...
11708 (stderr_file::write) ... this. Adjust.
11709 (stderr_file_fputs): Rename to ...
11710 (stderr_file::puts) ... this. Adjust.
11711 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11712 (stderr_file::stderr_file): New.
11713 (tee_file_magic): Delete.
11714 (struct tee_file): Delete.
11715 (tee_file::tee_file): New.
11716 (tee_file_new): Delete.
11717 (tee_file::~tee_file): New.
11718 (tee_file_delete): Delete.
11719 (tee_file_flush): Rename to ...
11720 (tee_file::flush): ... this. Adjust.
11721 (tee_file_write): Rename to ...
11722 (tee_file::write): ... this. Adjust.
11723 (tee_file::write_async_safe): New.
11724 (tee_file_fputs): Rename to ...
11725 (tee_file::puts): ... this. Adjust.
11726 (tee_file_isatty): Rename to ...
11727 (tee_file::isatty): ... this. Adjust.
11728 * ui-file.h (struct obstack, struct ui_file): Don't
11729 forward-declare.
11730 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11731 (ui_file_write_ftype)
11732 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11733 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11734 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11735 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11736 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11737 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11738 (set_ui_file_fseek): Delete.
11739 (ui_file_data, ui_file_delete, ui_file_rewind)
11740 (struct ui_file): New.
11741 (ui_file_up): New.
11742 (class null_file): New.
11743 (null_stream): Declare.
11744 (ui_file_write_for_put, ui_file_put): Delete.
11745 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11746 Delete.
11747 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11748 (gdb_fopen, tee_file_new): Delete.
11749 (struct string_file): New.
11750 (struct stdio_file): New.
11751 (stdio_file_up): New.
11752 (struct stderr_file): New.
11753 (class tee_file): New.
11754 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11755 of a 'ui_file *'. Adjust.
11756 * ui-out.h (class ui_out) <field_stream>: Likewise.
11757 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11758 (null_stream): Delete.
11759 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11760 Adjust.
11761 * utils.h (struct ui_file): Delete forward declaration..
11762 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11763 (error_stream): Take a 'string_file &' instead of a
11764 'ui_file *'.
11765 * varobj.c (varobj_value_get_print_value): Use string_file.
11766 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11767 * gdbarch.c: Regenerate.
11768
11769 2017-02-02 Pedro Alves <palves@redhat.com>
11770
11771 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11772 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11773 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11774 Adjust to call gdb_print_insn instead of
11775 gdb_disassembler::print_insn.
11776 (dump_insns, do_mixed_source_and_assembly_deprecated)
11777 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11778 'gdbarch' parameter. Remove gdb_disassembler parameter.
11779 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11780 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11781 declaration.
11782 (gdb_pretty_print_insn): Re-add declaration.
11783 * record-btrace.c (btrace_insn_history): Don't allocate a
11784 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11785
11786 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11787
11788 * disasm.h (gdb_disassembly): Remove file_string parameter.
11789 * disasm.c (gdb_disassembly): Likewise.
11790 * cli/cli-cmds.c (print_disassembly): Adapt.
11791 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11792 * stack.c (do_gdb_disassembly): Likewise.
11793
11794 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11795
11796 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11797 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11798 targets. And if the implicit value is longer than needed, extract
11799 the first bytes instead of the "least significant" ones.
11800
11801 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11802
11803 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11804 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11805 (btrace_fetch): Assert can_access_registers_ptid.
11806 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11807 validate_registers_access.
11808
11809 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11810
11811 * gdbthread.h (can_access_registers_ptid): New.
11812 * thread.c (can_access_registers_ptid): New.
11813
11814 2017-02-01 Pedro Alves <palves@redhat.com>
11815
11816 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11817
11818 2017-01-31 Pedro Alves <palves@redhat.com>
11819
11820 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11821 Fix typos.
11822
11823 2017-01-31 Pedro Alves <palves@redhat.com>
11824
11825 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11826 not used.
11827
11828 2017-01-31 Pedro Alves <palves@redhat.com>
11829
11830 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11831
11832 2017-01-31 Pedro Alves <palves@redhat.com>
11833
11834 * common/scoped_restore.h
11835 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11836 change the value's parameter type to T2.
11837 (make_scoped_restore): Likewise.
11838
11839 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11840 Richard Henderson <rth@redhat.com>
11841
11842 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11843 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11844 GS_BASE for older kernels.
11845 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11846 GS_BASE for older kernels.
11847 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11848 and GS_BASE to the offset table.
11849 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11850 system register group.
11851 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11852 for older kernels.
11853 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11854 amd64 ABI.
11855 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11856 AMD64_GSBASE_REGNUM.
11857 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11858 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11859 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11860 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11861 i386/64bit-segments.xml in those rules.
11862 * features/i386/64bit-segments.xml: New file.
11863 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11864 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11865 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11866 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11867 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11868 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11869 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11870 * features/i386/amd64-avx-linux.c: Regenerated.
11871 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11872 * features/i386/amd64-avx-mpx.c: Regenerated.
11873 * features/i386/amd64-avx512-linux.c: Regenerated.
11874 * features/i386/amd64-linux.c: Regenerated.
11875 * features/i386/amd64-mpx-linux.c: Regenerated.
11876 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11877 * features/i386/i386-avx-mpx.c: Regenerated.
11878 * features/i386/x32-avx-linux.c: Regenerated.
11879 * features/i386/x32-avx512-linux.c: Regenerated.
11880 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11881 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11882 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11883 * regformats/i386/amd64-linux.dat: Regenerated.
11884 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11885 * regformats/i386/x32-avx-linux.dat: Regenerated.
11886 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11887 * regformats/i386/x32-linux.dat: Regenerated.
11888
11889 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11890
11891 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11892 Set to AMD64_NUM_REGS.
11893
11894 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11895
11896 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11897 that checks validity of a register number.
11898
11899 2017-01-27 Kees Cook <keescook@google.com>
11900
11901 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11902 fetch_fpregs if target has fpa registers.
11903 (arm_linux_store_inferior_registers): Call store_fpregs if target
11904 has fpa registers.
11905
11906 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11907
11908 * cris-tdep.c (cris_gdbarch_init): Remove check for
11909 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11910
11911 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11912
11913 * corelow.c (get_core_register_section): Check for regset
11914 existence before checking for REGSET_VARIABLE_SIZE.
11915
11916 2017-01-26 Yao Qi <yao.qi@linaro.org>
11917 Pedro Alves <palves@redhat.com>
11918
11919 PR gdb/20939
11920 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11921 call memory_error, save memaddr instead.
11922 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11923 negative, cal memory_error.
11924 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11925
11926 2017-01-26 Yao Qi <yao.qi@linaro.org>
11927
11928 * disasm-selftests.c (memory_error_test): New function.
11929 (_initialize_disasm_selftests): Register memory_error_test.
11930
11931 2017-01-26 Yao Qi <yao.qi@linaro.org>
11932
11933 * Makefile.in (SFILES): Add disasm-selftests.c and
11934 selftest-arch.c.
11935 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11936 * disasm-selftests.c: New file.
11937 * selftest-arch.c: New file.
11938 * selftest-arch.h: New file.
11939
11940 2017-01-26 Yao Qi <yao.qi@linaro.org>
11941
11942 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11943 to bfd_arch_mep. Don't return 0 if section is not
11944 found. Call print_insn_mep.
11945
11946 2017-01-26 Pedro Alves <palves@redhat.com>
11947 Yao Qi <yao.qi@linaro.org>
11948
11949 * arm-tdep.c: Include "disasm.h".
11950 (gdb_print_insn_arm): Update code to get gdbarch.
11951 * disasm.c (dis_asm_read_memory): Change it to
11952 gdb_disassembler::dis_asm_read_memory.
11953 (dis_asm_memory_error): Likewise.
11954 (dis_asm_print_address): Likewise.
11955 (gdb_pretty_print_insn): Change it to
11956 gdb_disassembler::pretty_print_insn.
11957 (dump_insns): Add one argument gdb_disassemlber. All
11958 callers updated.
11959 (do_mixed_source_and_assembly_deprecated): Likewise.
11960 (do_mixed_source_and_assembly): Likewise.
11961 (do_assembly_only): Likewise.
11962 (gdb_disassembler::gdb_disassembler): New.
11963 (gdb_disassembler::print_insn): New.
11964 * disasm.h (class gdb_disassembler): New.
11965 (gdb_pretty_print_insn): Remove declaration.
11966 (gdb_disassemble_info): Likewise.
11967 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11968 (gdbscm_disasm_read_memory_worker): Update.
11969 (gdbscm_disasm_read_memory): Update.
11970 (gdbscm_disasm_memory_error): Remove.
11971 (gdbscm_disasm_print_address): Remove.
11972 (gdbscm_disassembler::gdbscm_disassembler): New.
11973 (gdbscm_print_insn_from_port): Update.
11974 * mips-tdep.c: Include disasm.h.
11975 (gdb_print_insn_mips): Update code to get gdbarch.
11976 * record-btrace.c (btrace_insn_history): Update.
11977 * spu-tdep.c: Include disasm.h.
11978 (struct spu_dis_asm_data): Remove.
11979 (struct spu_dis_asm_info): New.
11980 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11981 SPU id.
11982 (gdb_print_insn_spu): Cast disassemble_info to
11983 spu_dis_asm_info.
11984
11985 2017-01-26 Yao Qi <yao.qi@linaro.org>
11986
11987 * disasm.c (do_ui_file_delete): Delete.
11988 (gdb_insn_length): Move code creating stream to ...
11989 * utils.c (null_stream): ... here. New function.
11990 * utils.h (null_stream): Declare.
11991
11992 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11993
11994 * python/py-inferior.c (find_thread_object): Return directly
11995 from the loop. Remove "found" variable.
11996
11997 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11998
11999 GDB 7.12.1 released.
12000
12001 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12002
12003 * python/py-function.c (fnpy_call): Reorder declarations to have
12004 the gdbpy_enter object declared first.
12005 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12006
12007 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
12008
12009 PR python/21068
12010 * python/python-internal.h (PyMem_RawMalloc): Define for
12011 Python < 3.4.
12012 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12013 PyMem_RawMalloc instead of PyMem_Malloc.
12014
12015 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
12016 Luis Machado <lgustavo@codesourcery.com>
12017
12018 * NEWS (New commands): Mention flash-erase.
12019 (New MI commands): Mention target-flash-erase.
12020 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12021 command.
12022 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12023 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12024 * target.c (flash_erase_command): New function.
12025 (initialize_targets): Add new flash-erase command.
12026 * target.h (flash_erase_command): New declaration.
12027
12028 2017-01-20 Joel Brobecker <brobecker@adacore.com>
12029
12030 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12031 HAVE_SYS_PROCFS_H is defined.
12032
12033 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12034
12035 * remote.c (struct cached_reg): Change data into a pointer.
12036 * (stop_reply_dtr): Free data pointers before deleting vector.
12037 (process_stop_reply): Likewise.
12038 (remote_parse_stop_reply): Allocate space for data
12039
12040 2017-01-18 Alan Hayward <alan.hayward@arm.com>
12041
12042 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12043 MAX_REGISTER_SIZE.
12044 (amd64_pseudo_register_read_value): Likewise.
12045 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12046 (store_register_using_P): Likewise.
12047 * regcache.c (regcache_xfer_part): Likewise.
12048
12049 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
12050
12051 Split real and pseudo registers.
12052 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12053 (sparc32_pseudo_regnum): New enum.
12054 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12055 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12056 (SPARC32_CP0_REGISTERS): New macro.
12057 (sparc32_pseudo_register_name): New function.
12058 (sparc32_register_name): Use sparc32_pseudo_register_name.
12059 (sparc32_pseudo_register_type): New function.
12060 (sparc32_register_type): Use sparc32_pseudo_register_type.
12061 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12062 pseudo register numbers.
12063 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12064 (SPARC64_CP0_REGISTERS): New macro.
12065 (sparc64_pseudo_register_name): New function.
12066 (sparc64_register_name): Use sparc64_pseudo_register_name.
12067 (sparc64_pseudo_register_type): New function.
12068 (sparc64_register_type): Use sparc64_pseudo_register_type.
12069 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12070 pseudo register numbers.
12071 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12072 sparc64_store_arguments): Handle pseudo register numbers.
12073
12074 2017-01-13 Yao Qi <yao.qi@linaro.org>
12075
12076 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12077 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12078 output.
12079 (getpkt_or_notif_sane_1): Likewise.
12080
12081 2017-01-13 Yao Qi <yao.qi@linaro.org>
12082
12083 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12084 of CC. Pass "-x c++-header" instead of "-x c".
12085
12086 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12087
12088 * remote.c (remote_can_async_p): Update comment.
12089
12090 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12091
12092 * linux-nat.c (linux_nat_can_async_p): Update comment.
12093
12094 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12095
12096 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12097
12098 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12099
12100 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12101
12102 2017-01-10 Tom Tromey <tom@tromey.com>
12103
12104 * python/py-type.c (typy_legacy_template_argument): Update.
12105 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12106 ~demangle_parse_info): Declare new members.
12107 (cp_demangled_name_to_comp): Return unique_ptr.
12108 (cp_demangled_name_parse_free)
12109 (make_cleanup_cp_demangled_name_parse_free)
12110 (cp_new_demangle_parse_info): Remove.
12111 * cp-support.c (do_demangled_name_parse_free_cleanup)
12112 (make_cleanup_cp_demangled_name_parse_free): Remove.
12113 (inspect_type, cp_canonicalize_string_full)
12114 (cp_canonicalize_string): Update.
12115 (mangled_name_to_comp): Change return type.
12116 (cp_class_name_from_physname, method_name_from_physname)
12117 (cp_func_name, cp_remove_params): Update.
12118 * cp-name-parser.y (demangle_parse_info): New constructor, from
12119 cp_new_demangle_parse_info.
12120 (~demangle_parse_info): New destructor, from
12121 cp_demangled_name_parse_free.
12122 (cp_merge_demangle_parse_infos): Update.
12123 (cp_demangled_name_to_comp): Change return type.
12124
12125 2017-01-10 Tom Tromey <tom@tromey.com>
12126
12127 * top.c (prevent_dont_repeat): Change return type.
12128 * python/python.c (execute_gdb_command): Use std::string.
12129 Update.
12130 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12131 * command.h (prevent_dont_repeat): Change return type.
12132 * breakpoint.c (bpstat_do_actions_1): Update.
12133
12134 2017-01-10 Tom Tromey <tom@tromey.com>
12135
12136 * value.h (scoped_value_mark::~scoped_value_mark): Call
12137 free_to_mark.
12138 (scoped_value_mark::free_to_mark): New method.
12139 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12140 scoped_value_mark.
12141
12142 2017-01-10 Tom Tromey <tom@tromey.com>
12143
12144 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12145 (valpy_reference_value, valpy_const_value, valpy_get_address)
12146 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12147 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12148 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12149 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12150 scoped_value_mark.
12151 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12152 * value.h (scoped_value_mark): New class.
12153
12154 2017-01-10 Tom Tromey <tom@tromey.com>
12155
12156 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12157 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12158 * psymtab.c (discard_psymtabs_upto): Remove.
12159 (make_cleanup_discard_psymtabs): Remove.
12160 (struct psymtab_state): Remove.
12161
12162 2017-01-10 Tom Tromey <tom@tromey.com>
12163
12164 * record-full.c (record_full_save_cleanups): Remove.
12165 (record_full_save): Use gdb::unlinker.
12166 * gcore.c (do_bfd_delete_cleanup): Remove.
12167 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12168 cleanups.
12169 * dwarf2read.c (unlink_if_set): Remove.
12170 (write_psymtabs_to_index): Use gdb::unlinker.
12171 * common/gdb_unlinker.h: New file.
12172
12173 2017-01-10 Tom Tromey <tom@tromey.com>
12174
12175 * windows-tdep.c (windows_xfer_shared_library): Update.
12176 * windows-nat.c (windows_make_so): Update.
12177 * utils.h (make_cleanup_bfd_unref): Remove.
12178 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12179 * symfile.h (symfile_bfd_open)
12180 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12181 * symfile.c (read_symbols, symbol_file_add)
12182 (separate_debug_file_exists): Update.
12183 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12184 (generic_load, reread_symbols): Update.
12185 * symfile-mem.c (symbol_file_add_from_memory): Update.
12186 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12187 (spu_symbol_file_add_from_memory): Update.
12188 * solist.h (struct target_so_ops) <bfd_open>: Return
12189 gdb_bfd_ref_ptr.
12190 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12191 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12192 gdb_bfd_ref_ptr.
12193 (solib_map_sections, reload_shared_libraries_1): Update.
12194 * solib-svr4.c (enable_break): Update.
12195 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12196 * solib-frv.c (enable_break2): Update.
12197 * solib-dsbt.c (enable_break): Update.
12198 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12199 gdb_bfd_ref_ptr.
12200 (darwin_solib_get_all_image_info_addr_at_init): Update.
12201 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12202 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12203 * record-full.c (record_full_save): Update.
12204 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12205 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12206 * minidebug.c (find_separate_debug_file_in_section): Return
12207 gdb_bfd_ref_ptr.
12208 * machoread.c (macho_add_oso_symfile): Change abfd to
12209 gdb_bfd_ref_ptr.
12210 (macho_symfile_read_all_oso): Update.
12211 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12212 (macho_symfile_read): Update.
12213 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12214 (jit_bfd_try_read_symtab): Update.
12215 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12216 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12217 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12218 gdb_bfd_ref_ptr.
12219 (gdb_bfd_ref_policy): New struct.
12220 (gdb_bfd_ref_ptr): New typedef.
12221 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12222 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12223 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12224 gdb_bfd_ref_ptr.
12225 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12226 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12227 (gcore_command): Update.
12228 * exec.c (exec_file_attach): Update.
12229 * elfread.c (elf_symfile_read): Update.
12230 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12231 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12232 (open_and_init_dwo_file): Update.
12233 (open_dwp_file): Return gdb_bfd_ref_ptr.
12234 (open_and_init_dwp_file): Update.
12235 * corelow.c (core_open): Update.
12236 * compile/compile-object-load.c (compile_object_load): Update.
12237 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12238 * coffread.c (coff_symfile_read): Update.
12239 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12240 gdb_bfd_ref_ptr. Rename.
12241 (dump_bfd_file, restore_command): Update.
12242 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12243 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12244 (find_separate_debug_file_by_buildid): Update.
12245
12246 2017-01-10 Tom Tromey <tom@tromey.com>
12247
12248 * common/gdb_ref_ptr.h: New file.
12249 * python/py-ref.h (struct gdbpy_ref_policy): New.
12250 (gdbpy_ref): Now a typedef.
12251
12252 2017-01-10 Tom Tromey <tom@tromey.com>
12253
12254 * utils.h (make_cleanup_htab_delete): Don't declare.
12255 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12256 Remove.
12257 * linespec.c (decode_compound_collector): Add constructor,
12258 destructor.
12259 (lookup_prefix_sym): Remove cleanup.
12260 (symtab_collector): Add constructor, destructor.
12261 (collect_symtabs_from_filename): Remove cleanup.
12262 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12263 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12264 Use htab_up.
12265 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12266 * dwarf2read.c (dw2_expand_symtabs_matching)
12267 (dw2_map_symbol_filenames, dwarf_decode_macros)
12268 (write_psymtabs_to_index): Use htab_up.
12269 * dwarf2loc.c (func_verify_no_selftailcall)
12270 (call_site_find_chain_1, func_verify_no_selftailcall)
12271 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12272 std::vector, gdb::unique_xmalloc_ptr.
12273 (call_sitep): Remove typedef.
12274 (dwarf2_locexpr_baton_eval): Remove unused variable.
12275
12276 2017-01-10 Tom Tromey <tom@tromey.com>
12277
12278 * python/python-internal.h (make_cleanup_py_decref)
12279 (make_cleanup_py_xdecref): Don't declare.
12280 * python/py-utils.c (py_decref, make_cleanup_py_decref)
12281 (py_xdecref, make_cleanup_py_xdecref): Remove.
12282
12283 2017-01-10 Tom Tromey <tom@tromey.com>
12284
12285 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12286 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12287
12288 2017-01-10 Tom Tromey <tom@tromey.com>
12289
12290 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12291
12292 2017-01-10 Tom Tromey <tom@tromey.com>
12293
12294 * python/py-utils.c (unicode_to_encoded_string)
12295 (python_string_to_target_string)
12296 (python_string_to_target_python_string)
12297 (python_string_to_host_string, gdbpy_obj_to_string)
12298 (get_addr_from_python): Use gdbpy_ref.
12299
12300 2017-01-10 Tom Tromey <tom@tromey.com>
12301
12302 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12303 gdbpy_ref.
12304
12305 2017-01-10 Tom Tromey <tom@tromey.com>
12306
12307 * python/python.c (eval_python_command, gdbpy_decode_line)
12308 (gdbpy_run_events, gdbpy_start_type_printers)
12309 (gdbpy_apply_type_printers): Use gdbpy_ref.
12310
12311 2017-01-10 Tom Tromey <tom@tromey.com>
12312
12313 * python/py-param.c (get_doc_string, compute_enum_values): Use
12314 gdbpy_ref.
12315
12316 2017-01-10 Tom Tromey <tom@tromey.com>
12317
12318 * python/py-inferior.c (find_thread_object, build_inferior_list):
12319 Use gdbpy_ref.
12320
12321 2017-01-10 Tom Tromey <tom@tromey.com>
12322
12323 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12324
12325 2017-01-10 Tom Tromey <tom@tromey.com>
12326
12327 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12328 gdbpy_ref.
12329
12330 2017-01-10 Tom Tromey <tom@tromey.com>
12331
12332 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
12333 extra incref.
12334 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12335 Use gdbpy_ref.
12336
12337 2017-01-10 Tom Tromey <tom@tromey.com>
12338
12339 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12340 gdbpy_ref.
12341
12342 2017-01-10 Tom Tromey <tom@tromey.com>
12343
12344 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
12345 decref results of PyArg_ParseTupleAndKeywords.
12346
12347 2017-01-10 Tom Tromey <tom@tromey.com>
12348
12349 * python/python.c (python_run_simple_file): Use
12350 unique_xmalloc_ptr, gdbpy_ref.
12351
12352 2017-01-10 Tom Tromey <tom@tromey.com>
12353
12354 * python/py-prettyprint.c (print_stack_unless_memory_error)
12355 (print_string_repr, print_children): Use gdbpy_ref.
12356 (dummy_python_frame): New class.
12357 (dummy_python_frame::dummy_python_frame): Rename from
12358 push_dummy_python_frame.
12359 (py_restore_tstate): Remove.
12360
12361 2017-01-10 Tom Tromey <tom@tromey.com>
12362
12363 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12364
12365 2017-01-10 Tom Tromey <tom@tromey.com>
12366
12367 * python/python.c (ensure_python_env, restore_python_env):
12368 Remove.
12369 * python/python-internal.h (ensure_python_env): Don't declare.
12370 * varobj.h (varobj_ensure_python_env): Don't declare.
12371 * varobj.c (varobj_ensure_python_env): Remove.
12372
12373 2017-01-10 Tom Tromey <tom@tromey.com>
12374
12375 * varobj.c (varobj_value_get_print_value): Use
12376 gdbpy_enter_varobj.
12377
12378 2017-01-10 Tom Tromey <tom@tromey.com>
12379
12380 * python/py-prettyprint.c (print_string_repr, print_children):
12381 Update.
12382 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12383 of "encoding".
12384 * varobj.c (varobj_value_get_print_value): Update.
12385 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12386
12387 2017-01-10 Tom Tromey <tom@tromey.com>
12388
12389 * varobj.c (varobj_get_display_hint)
12390 (dynamic_varobj_has_child_method, install_new_value_visualizer)
12391 (varobj_set_visualizer, free_variable): Use
12392 gdbpy_enter_varobj.
12393
12394 2017-01-10 Tom Tromey <tom@tromey.com>
12395
12396 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12397 (do_finish_initialization): New function. Use gdbpy_ref.
12398 (gdbpy_finish_initialization): Use gdbpy_enter. Call
12399 do_finish_initialization.
12400
12401 2017-01-10 Tom Tromey <tom@tromey.com>
12402
12403 * python/py-param.c (get_set_value, get_show_value): Use
12404 gdbpy_enter, gdbpy_ref.
12405
12406 2017-01-10 Tom Tromey <tom@tromey.com>
12407
12408 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12409
12410 2017-01-10 Tom Tromey <tom@tromey.com>
12411
12412 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12413
12414 2017-01-10 Tom Tromey <tom@tromey.com>
12415
12416 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12417 Use gdbpy_enter_varobj.
12418
12419 2017-01-10 Tom Tromey <tom@tromey.com>
12420
12421 * varobj.c (gdbpy_enter_varobj): New constructor.
12422 * python/python-internal.h (gdbpy_enter_varobj): New class.
12423 * python/py-varobj.c (py_varobj_get_iterator): Use
12424 gdbpy_enter_varobj.
12425
12426 2017-01-10 Tom Tromey <tom@tromey.com>
12427
12428 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12429 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12430 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12431 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12432 unique_xmalloc_ptr.
12433 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12434
12435 2017-01-10 Tom Tromey <tom@tromey.com>
12436
12437 * python/py-xmethods.c (invoke_match_method): Use
12438 gdbpy_ref.
12439
12440 2017-01-10 Tom Tromey <tom@tromey.com>
12441
12442 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12443 gdbpy_enter, gdbpy_ref.
12444
12445 2017-01-10 Tom Tromey <tom@tromey.com>
12446
12447 * python/python.c (python_interactive_command): Use gdbpy_enter.
12448
12449 2017-01-10 Tom Tromey <tom@tromey.com>
12450
12451 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12452 gdbpy_ref.
12453
12454 2017-01-10 Tom Tromey <tom@tromey.com>
12455
12456 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12457 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12458
12459 2017-01-10 Tom Tromey <tom@tromey.com>
12460
12461 * utils.h (htab_deleter): New struct.
12462 (htab_up): New typedef.
12463 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12464 gdbpy_enter, gdbpy_ref, htab_up.
12465
12466 2017-01-10 Tom Tromey <tom@tromey.com>
12467
12468 * python/py-unwind.c (pending_frame_invalidate): Remove.
12469 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12470
12471 2017-01-10 Tom Tromey <tom@tromey.com>
12472
12473 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12474 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12475
12476 2017-01-10 Tom Tromey <tom@tromey.com>
12477
12478 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12479
12480 2017-01-10 Tom Tromey <tom@tromey.com>
12481
12482 * python/python.c (gdbpy_eval_from_control_command)
12483 (gdbpy_source_script, gdbpy_run_events)
12484 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12485 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12486 gdbpy_enter.
12487
12488 2017-01-10 Tom Tromey <tom@tromey.com>
12489
12490 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12491
12492 2017-01-10 Tom Tromey <tom@tromey.com>
12493
12494 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12495
12496 2017-01-10 Tom Tromey <tom@tromey.com>
12497
12498 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12499 (python_on_inferior_call_pre, python_on_inferior_call_post)
12500 (python_on_memory_change, python_on_register_change)
12501 (python_inferior_exit, python_new_objfile, add_thread_object)
12502 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12503
12504 2017-01-10 Tom Tromey <tom@tromey.com>
12505
12506 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12507 (bpfinishpy_handle_exit): Use gdbpy_enter.
12508
12509 2017-01-10 Tom Tromey <tom@tromey.com>
12510
12511 * python/py-cmd.c (cmdpy_destroyer)
12512 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12513 gdbpy_enter.
12514
12515 2017-01-10 Tom Tromey <tom@tromey.com>
12516
12517 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12518 gdbpy_enter.
12519 (gdbpy_breakpoint_has_cond): Likewise.
12520
12521 2017-01-10 Tom Tromey <tom@tromey.com>
12522
12523 * python/python.c (gdbpy_enter): New constructor.
12524 (~gdbpy_enter): New destructor.
12525 (restore_python_env, ensure_python_env): Rewrite.
12526 * python/python-internal.h (gdbpy_enter): New class.
12527
12528 2017-01-10 Tom Tromey <tom@tromey.com>
12529
12530 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12531
12532 2017-01-10 Tom Tromey <tom@tromey.com>
12533
12534 * python/py-value.c (value_has_field, get_field_flag)
12535 (get_field_type, valpy_getitem, convert_value_from_python): Use
12536 gdbpy_ref.
12537
12538 2017-01-10 Tom Tromey <tom@tromey.com>
12539
12540 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12541 gdbpy_ref.
12542
12543 2017-01-10 Tom Tromey <tom@tromey.com>
12544
12545 * python/py-prettyprint.c (search_pp_list)
12546 (find_pretty_printer_from_objfiles)
12547 (find_pretty_printer_from_progspace)
12548 (find_pretty_printer_from_gdb, find_pretty_printer)
12549 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12550 gdbpy_ref.
12551
12552 2017-01-10 Tom Tromey <tom@tromey.com>
12553
12554 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12555
12556 2017-01-10 Tom Tromey <tom@tromey.com>
12557
12558 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12559 (ltpy_get_all_source_lines): Use gdbpy_ref.
12560
12561 2017-01-10 Tom Tromey <tom@tromey.com>
12562
12563 * python/py-framefilter.c (extract_sym, extract_value)
12564 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12565 gdbpy_ref.
12566
12567 2017-01-10 Tom Tromey <tom@tromey.com>
12568
12569 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12570
12571 2017-01-10 Tom Tromey <tom@tromey.com>
12572
12573 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12574
12575 2017-01-10 Tom Tromey <tom@tromey.com>
12576
12577 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12578 gdbpy_ref.
12579
12580 2017-01-10 Tom Tromey <tom@tromey.com>
12581
12582 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12583
12584 2017-01-10 Tom Tromey <tom@tromey.com>
12585
12586 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12587 (typy_range): Use gdbpy_ref.
12588
12589 2017-01-10 Tom Tromey <tom@tromey.com>
12590
12591 * python/py-threadevent.c (create_thread_event_object): Use
12592 gdbpy_ref.
12593 * python/py-stopevent.c (create_stop_event_object): Simplify.
12594 (emit_stop_event): Use gdbpy_ref.
12595 * python/py-signalevent.c (create_signal_event_object): Use
12596 gdbpy_ref.
12597 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12598 (emit_new_objfile_event, create_clear_objfiles_event_object)
12599 (emit_clear_objfiles_event): Use gdbpy_ref.
12600 * python/py-infevents.c (create_inferior_call_event_object)
12601 (create_register_changed_event_object)
12602 (create_memory_changed_event_object, emit_inferior_call_event)
12603 (emit_memory_changed_event, emit_register_changed_event): Use
12604 gdbpy_ref.
12605 * python/py-exitedevent.c (create_exited_event_object)
12606 (emit_exited_event): Use gdbpy_ref.
12607 * python/py-event.h (evpy_emit_event): Remove
12608 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12609 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12610 * python/py-continueevent.c (emit_continue_event): Use
12611 gdbpy_ref.
12612 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12613 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12614 gdbpy_ref.
12615 * python/py-bpevent.c (create_breakpoint_event_object): Use
12616 gdbpy_ref.
12617
12618 2017-01-10 Tom Tromey <tom@tromey.com>
12619
12620 * python/py-ref.h: New file.
12621
12622 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12623
12624 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12625 void.
12626 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12627 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12628 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12629 * ui-out.c (ui_out::redirect): Likewise.
12630 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12631 * cli/cli-logging.c (set_logging_redirect): Update call site of
12632 ui_out::redirect.
12633 (handle_redirections): Likewise.
12634 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12635 * top.c (execute_command_to_string): Likewise.
12636 * utils.c (do_ui_out_redirect_pop): Likewise.
12637
12638 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12639
12640 * stack.c (_initialize_stack): Update "frame" command help message.
12641
12642 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12643
12644 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12645
12646 2017-01-06 Yao Qi <yao.qi@linaro.org>
12647
12648 * x86-linux-nat.h: Include gdb_proc_service.h.
12649
12650 2017-01-06 Yao Qi <yao.qi@linaro.org>
12651
12652 * ser-base.h: Include serial.h.
12653
12654 2017-01-06 Yao Qi <yao.qi@linaro.org>
12655
12656 * ppc-linux-tdep.h: Include ppc-tdep.h.
12657
12658 2017-01-06 Yao Qi <yao.qi@linaro.org>
12659
12660 * nat/amd64-linux-siginfo.h: Include signal.h.
12661
12662 2017-01-06 Yao Qi <yao.qi@linaro.org>
12663
12664 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12665
12666 2017-01-06 Yao Qi <yao.qi@linaro.org>
12667
12668 * mi/mi-parse.h: Include mi-cmds.h.
12669
12670 2017-01-06 Yao Qi <yao.qi@linaro.org>
12671
12672 * inf-loop.c: Don't include "target.h".
12673 * inf-loop.h: Include it here.
12674
12675 2017-01-06 Yao Qi <yao.qi@linaro.org>
12676
12677 * dfp.h: Include "dboulest.h" and "expression.h".
12678
12679 2017-01-06 Yao Qi <yao.qi@linaro.org>
12680
12681 * ax-gdb.h: Include "ax.h".
12682
12683 2017-01-06 Yao Qi <yao.qi@linaro.org>
12684
12685 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12686 with nat/gdb_ptrace.h.
12687
12688 2017-01-05 Yao Qi <yao.qi@linaro.org>
12689
12690 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12691 new line.
12692 (mips64_fbsd_sigframe_init): Likewise.
12693
12694 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12695
12696 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12697 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12698
12699 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12700
12701 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12702 * NEWS: Mention new FreeBSD/mips native configuration.
12703 * config/mips/fbsd.mh: New file.
12704 * configure.host: Add mips*-*-freebsd*.
12705 * mips-fbsd-nat.c: New file.
12706
12707 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12708
12709 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12710 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12711 * NEWS: Mention new FreeBSD/mips target.
12712 * configure.tgt: Add mips*-*-freebsd*.
12713 * mips-fbsd-tdep.c: New file.
12714 * mips-fbsd-tdep.h: New file.
12715
12716 2017-01-04 Yao Qi <yao.qi@linaro.org>
12717
12718 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12719 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12720
12721 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12722
12723 Update copyright year range in all GDB files.
12724
12725 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12726
12727 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12728
12729 For older changes see ChangeLog-2016.
12730 \f
12731 Local Variables:
12732 mode: change-log
12733 left-margin: 8
12734 fill-column: 74
12735 version-control: never
12736 coding: utf-8
12737 End:
This page took 0.320949 seconds and 4 git commands to generate.