Remove unnecessary parentheses in declarations
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
7fa29be9
EB
12017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2
3 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4 parentheses in the declaration.
5 (macro_lookup_inclusion): Likewise.
6 (macro_lookup_definition): Likewise.
7 * p-lang.h (pascal_builtin_types): Likewise.
8 * tui/tui-data.c (tui_win_list): Likewise.
9 * tui/tui-data.h (tui_win_list): Likewise.
10 * utils.h (make_cleanup_free_section_addr_info): Likewise.
11
d9b477e3
KB
122017-10-11 Mark Rages <markrages@gmail.com>
13
14 * target-memory.c (block_boundaries): Fix for block address not
15 aligned on block size.
16
65630365
PA
172017-10-10 Pedro Alves <palves@redhat.com>
18 Tom Tromey <tom@tromey.com>
19
20 * breakpoint.c (struct captured_breakpoint_query_args)
21 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
22 (print_breakpoint): New.
23 * breakpoint.h (print_breakpoint): Declare.
24 * common/common-exceptions.h (enum return_reason): Remove
25 references to catch_exceptions.
26 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
27 Delete.
28 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
29 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
30 * gdb.h: Delete.
31 * gdbthread.h (thread_select): Declare.
32 * mi/mi-cmd-break.c: Don't include gdb.h.
33 (breakpoint_notify): Use print_breakpoint.
34 * mi/mi-cmd-catch.c: Don't include gdb.h.
35 * mi/mi-interp.c: Don't include gdb.h.
36 (mi_print_breakpoint_for_event): New.
37 (mi_breakpoint_created, mi_breakpoint_modified): Use
38 mi_print_breakpoint_for_event.
39 * mi/mi-main.c: Don't include gdb.h.
40 (mi_cmd_thread_select): Parse the global thread ID here. Use
41 thread_select instead of gdb_thread_select.
42 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
43 of using gdb_list_thread_ids.
44 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
45 FILEIO_ENOSYS here.
46 (remote_fileio_request): Use TRY/CATCH instead of
47 catch_exceptions.
48 * symfile-mem.c (struct symbol_file_add_from_memory_args)
49 (symbol_file_add_from_memory_wrapper): Delete.
50 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
51 * thread.c: Don't include gdb.h.
52 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
53 (thread_alive): Use thread_select.
54 (do_captured_thread_select): Delete, parts salvaged as ...
55 (thread_select): ... this new function.
56 (gdb_thread_select): Delete.
57
bf469271
PA
582017-10-10 Pedro Alves <palves@redhat.com>
59 Tom Tromey <tom@tromey.com>
60
61 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
62 and reverse logic.
63 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
64 No longer macros. Instead ...
65 (enum wp_check_result): They're now values of this new
66 enumeration.
67 (watchpoint_check): Change return type to wp_check_result and
68 parameter type to bpstat.
69 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
70 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
71 catch_errors. Reverse logic of watchpoint_check call.
72 (breakpoint_re_set_one): Now returns void and takes a breakpoint
73 pointer as parameter.
74 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
75 * common/common-exceptions.c (throw_exception_sjlj): Update
76 comments to avoid mentioning catch_errors.
77 * exceptions.c (catch_errors): Delete.
78 * exceptions.h: Update comments to avoid mentioning catch_errors.
79 (catch_errors_ftype, catch_errors): Delete.
80 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
81 (hook_stop_stub): Delete.
82 (restore_selected_frame): Change return type to void, and
83 parameter type to const frame_id &.
84 (restore_infcall_control_state): Use TRY/CATCH instead of
85 catch_errors.
86 * main.c (captured_command_loop): Return void and remove
87 parameter. Remove references to catch_errors.
88 (captured_main): Use TRY/CATCH instead of catch_errors.
89 * objc-lang.c (objc_submethod_helper_data)
90 (find_objc_msgcall_submethod_helper): Delete.
91 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
92 catch_errors.
93 * record-full.c (record_full_message): Return void.
94 (record_full_message_args, record_full_message_wrapper): Delete.
95 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
96 instead of catch_errors.
97 * solib-aix.c (solib_aix_open_symbol_file_object): Change
98 parameter type to int.
99 * solib-darwin.c (open_symbol_file_object): Ditto.
100 * solib-dsbt.c (open_symbol_file_object): Ditto.
101 * solib-frv.c (open_symbol_file_object): Ditto.
102 * solib-svr4.c (open_symbol_file_object): Ditto.
103 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
104 * solib.c (update_solib_list): Use TRY/CATCH instead of
105 catch_errors.
106 * solist.h (struct target_so_ops) <open_symbol_file_object>:
107 Change type.
108 * symmisc.c (struct print_symbol_args): Remove.
109 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
110 (print_symbol): Change type.
111 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
112 and remove parameters.
113 (catch_errors): New.
114 (get_windows_debug_event): Adjust.
115
1a56bfa5
TT
1162017-10-09 Tom Tromey <tom@tromey.com>
117
118 * mi/mi-main.c (free_splay_tree): Remove.
119 (list_available_thread_groups): Use splay_tree_up.
120 * common/gdb_splay_tree.h: New file.
121
0c478e2d
TT
1222017-10-09 Tom Tromey <tom@tromey.com>
123
124 * mi/mi-main.c (do_nothing): Remove.
125 (list_available_thread_groups): Update.
126
cbd2b4e3
PA
1272017-10-09 Pedro Alves <palves@redhat.com>
128
129 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
130 reading registers when switching context.
131
a181c0bf
JB
1322017-10-09 John Baldwin <jhb@FreeBSD.org>
133
134 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
135 (fbsd_convert_siginfo): Likewise.
136 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
137
6e66f753
SM
1382017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
139
140 * configure.ac (try_guile_versions): Remove guile-2.2.
141 * configure: Regenerate.
142
890e9790
TT
1432017-10-09 Tom Tromey <tom@tromey.com>
144
145 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
146 (COMPILE.pre): Use $(CXX).
147
109483d9
PA
1482017-10-09 Pedro Alves <palves@redhat.com>
149
150 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
151 Use bool.
152 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
153 * cp-support.h (cp_remove_params): Now returns a
154 gdb::unique_xmalloc_ptr.
155 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
156 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
157 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
158 returning a gdb::unique_xmalloc_ptr.
159 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
160 * stack.c (find_frame_funname): Adjust to cp_remove_params
161 returning a gdb::unique_xmalloc_ptr.
162
791afaa2
TT
1632017-10-08 Tom Tromey <tom@tromey.com>
164
165 * dwarf2read.c (dwarf2_get_dwz_file): Use
166 gdb::unique_xmalloc_ptr.
167 (find_slot_in_mapped_hash): Likewise.
168 (dwarf2_physname): Likewise.
169 (create_dwo_unit_in_dwp_v1): Use std::string.
170 (create_dwo_unit_in_dwp_v2): Likewise.
171 (lookup_dwo_cutu): Likewise.
172 (inherit_abstract_dies): Use std::vector.
173 (read_array_type): Likewise.
174 (dwarf_decode_macros): Remove unused declaration.
175 (unsigned_int_compar): Remove.
176 (dwarf2_build_psymtabs_hard): Use scoped_restore.
177 (psymtabs_addrmap_cleanup): Remove.
178
30a9c02f
TT
1792017-10-08 Tom Tromey <tom@tromey.com>
180
181 * frame-unwind.c (frame_unwind_try_unwinder): Update.
182 * frame.h (frame_cleanup_after_sniffer): Declare.
183 (frame_prepare_for_sniffer): Return void.
184 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
185 type of argument.
186 (frame_prepare_for_sniffer): Return void.
187
757325a3
TT
1882017-10-08 Tom Tromey <tom@tromey.com>
189
190 * utils.h (make_cleanup_value_free): Remove.
191 * utils.c (do_value_free, struct cleanup): Remove.
192 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
193 Use gdb_value_up.
194 * value.h (struct value_deleter): New.
195 (gdb_value_up): New typedef.
196
b9c04fb2
TT
1972017-10-08 Tom Tromey <tom@tromey.com>
198
199 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
200 (make_cleanup_free_search_symbols): Remove.
201 (search_symbols): Return std::vector.
202 (symbol_search::compare_search_syms): Now member of
203 symbol_search. Change arguments.
204 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
205 (symtab_symbol_info, rbreak_command): Update.
206 * symtab.h (struct symbol_search) <next>: Remove.
207 Add constructors.
208 (symbol_search::operator<): New function.
209 (symbol_search::operator==): New function.
210 (search_symbols): Remove std::vector.
211 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
212 (symbol_search::compare_search_syms): Declare.
213
0d28b0a5
YQ
2142017-10-06 Yao Qi <yao.qi@linaro.org>
215
216 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
217 arch/aarch64-insn.o.
218 Remove one rule.
219 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
220
71917808
YQ
2212017-10-06 Yao Qi <yao.qi@linaro.org>
222
223 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
224 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
225 arch/arm-linux.o respectively.
226 * configure.tgt: Likewise.
227
2081b2b2
YQ
2282017-10-06 Yao Qi <yao.qi@linaro.org>
229
230 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
231 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
232
a1b85d28
PA
2332017-10-06 Pedro Alves <palves@redhat.com>
234
235 * windows-nat.c: Include <algorithm>.
236
d97987e2
YQ
2372017-10-06 Yao Qi <yao.qi@linaro.org>
238
239 * configure.tgt (i386_tobjs): New variable.
240 (amd64_tobjs): New variable.
241 Set $cpu_obs and $os_obs.
242
f38307f5
YQ
2432017-10-06 Yao Qi <yao.qi@linaro.org>
244
245 * Makefile.in (CONFIG_SRC_SUBDIR): New.
246 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
247 (clean): Remove object files and dependency files.
248 (distclean): Remove the directory.
249 * configure.ac: Invoke AC_CONFIG_COMMANDS.
250 * configure: Re-generated.
251 * configure.tgt: Replace amd64.o with arch/amd64.o.
252
2f924de6
JM
2532017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
254
255 PR build/22188
256 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
257 and SETEND.
258
2fd9d7ca
PA
2592017-10-05 Pedro Alves <palves@redhat.com>
260
261 * linux-nat.c (linux_child_follow_fork): When following the parent
262 and detaching the child, consult the parent thread's architecture
263 instead of the child's.
264
d13b8493
UW
2652017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
266
267 * ax.h: Do not include "doublest.h".
268 (union agent_val): Remove.
269
3b4b2f16
UW
2702017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
271
272 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
273 (decimal_to_string): Return std::string object.
274 (decimal_from_string): Accept std::string object. Return bool.
275 (decimal_from_integral, decimal_from_doublest): Remove.
276 (decimal_from_longest): Add prototype.
277 (decimal_from_ulongest): Likewise.
278 (decimal_to_longest): Likewise.
279 (decimal_from_doublest): Likewise.
280 * dfp.c: Do not include "gdbtypes.h" or "value.h".
281 (MAX_DECIMAL_STRING): Move here.
282 (decimal_to_string): Return std::string object.
283 (decimal_from_string): Accept std::string object. Return bool.
284 (decimal_from_integral): Remove, replace by ...
285 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
286 (decimal_to_longest): New function.
287 (decimal_from_floating): Remove, replace by ...
288 (decimal_from_doublest): ... this new function.
289 (decimal_to_doublest): Update to new decimal_to_string interface.
290
291 * value.c (unpack_long): Use decimal_to_longest.
292 * valops.c (value_cast): Use decimal_from_doublest instead of
293 decimal_from_floating. Use decimal_from_[u]longest isntead of
294 decimal_from_integral.
295 * valarith.c (value_args_as_decimal): Likewise.
296 * valprint.c (print_decimal_floating): Update to new
297 decimal_to_string interface.
298 * printcmd.c (printf_decfloat): Likewise.
299 * c-exp.y (parse_number): Update to new decimal_from_string interface.
300
1841ee5d
UW
3012017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
302
303 * doublest.h: Do not include "floatformat.h". Remove stale comments.
304 * gdbtypes.c: Include "floatformat.h".
305 * value.c: Likewise.
306 * m68k-tdep.c: Likewise.
307
308 * findvar.c: Do not include "floatformat.h".
309 * amd64-darwin-tdep.c: Likewise.
310 * arm-linux-tdep.c: Likewise.
311 * i386-darwin-tdep.c: Likewise.
312 * i387-tdep.c: Likewise.
313 * m68k-linux-tdep.c: Likewise.
314 * mep-tdep.c: Likewise.
315 * mips-tdep.c: Likewise.
316 * nios2-tdep.c: Likewise.
317 * s390-linux-tdep.c: Likewise.
318 * sparc-obsd-tdep.c: Likewise.
319 * sparc-tdep.c: Likewise.
320 * sparc64-tdep.c: Likewise.
321 * spu-tdep.c: Likewise.
322 * tic6x-tdep.c: Likewise.
323 * tilegx-tdep.c: Likewise.
324 * vax-tdep.c: Likewise.
325 * xstormy16-tdep.c: Likewise.
326 * xtensa-tdep.c: Likewise.
327
328 * top.c: Do not include "doublest.h".
329 * aarch64-tdep.c: Likewise.
330 * alpha-tdep.c: Likewise.
331 * arm-linux-tdep.c: Likewise.
332 * m68k-linux-tdep.c: Likewise.
333 * tilegx-tdep.c: Likewise.
334 * xstormy16-tdep.c: Likewise.
335
a80a6471
JB
3362017-10-05 John Baldwin <jhb@FreeBSD.org>
337
338 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
339 (mipsn32_fbsd_sigframe): Define.
340 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
341 for FreeBSD/mipsn32.
342
12c4bd7f
JB
3432017-10-05 John Baldwin <jhb@FreeBSD.org>
344
345 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
346 AT_HWCAP.
347
c91933e9
TG
3482017-10-05 Tristan Gingold <tgingold@free.fr>
349
350 * MAINTAINERS (Misc): Update my email address.
351
5cd63fda
PA
3522017-10-04 Pedro Alves <palves@redhat.com>
353
354 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
355 it instead of target_gdbarch.
356 (get_remote_state, get_remote_packet_size): Adjust
357 get_remote_arch_state calls, passing down target_gdbarch
358 explicitly.
359 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
360 'gdbarch' and use it instead of target_gdbarch.
361 (get_memory_packet_size): Adjust get_remote_arch_state calls,
362 passing down target_gdbarch explicitly.
363 (struct stop_reply) <arch>: New field.
364 (remote_parse_stop_reply): Use the stopped thread's architecture,
365 not the current inferior's. Save the architecture in the
366 stop_reply.
367 (process_stop_reply): Use the stop reply's architecture.
368 (process_g_packet, remote_fetch_registers)
369 (remote_prepare_to_store, store_registers_using_G)
370 (remote_store_registers): Adjust get_remote_arch_state calls,
371 using the regcache's architecture.
372 (remote_get_trace_status): Adjust get_remote_arch_state calls,
373 passing down target_gdbarch explicitly.
374 * spu-multiarch.c (spu_thread_architecture): Defer to the target
375 beneath instead of calling target_gdbarch.
376 * target.c (default_thread_architecture): Use the specified
377 inferior's architecture, instead of the current inferior's
378 architecture (via target_gdbarch).
379
ed4227b7
PA
3802017-10-04 Pedro Alves <palves@redhat.com>
381
382 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
383 case.
384 (regcache_print): Handle !target_has_registers here instead.
385
55b11ddf
PA
3862017-10-04 Pedro Alves <palves@redhat.com>
387
388 * frame.c (create_test_frame): Delete.
389 * frame.h (create_test_frame): Delete.
390 * gdbarch-selftests.c: Include gdbthread.h and target.h.
391 (class regcache_test): Delete.
392 (test_target_has_registers, test_target_has_stack)
393 (test_target_has_memory, test_target_prepare_to_store)
394 (test_target_store_registers): New functions.
395 (test_target_ops): New class.
396 (register_to_value_test): Error out if there's already a
397 process_stratum (or higher) target pushed. Create a fuller mock
398 environment, with mock target_ops, inferior, address space, thread
399 and inferior_ptid.
400 * progspace.c (struct address_space): Move to ...
401 * progspace.h (struct address_space): ... here.
402 * regcache.h (regcache::~regcache, regcache::raw_write)
403 [GDB_SELF_TEST]: No longer virtual.
404
4c71c105
SM
4052017-10-04 Simon Marchi <simon.marchi@ericsson.com>
406
407 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
408
73dcd72d
PA
4092017-10-04 Pedro Alves <palves@redhat.com>
410
411 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
412 out of 'between TRY and CATCH'.
413
44704526
PA
4142017-10-04 Pedro Alves <palves@redhat.com>
415
416 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
417 * common/common-exceptions.h (TRY): Open an outermost scope.
418 Expand intro comment.
419 (CATCH): Reindent.
420 (END_CATCH): Close the outermost scope.
421 * completer.c (complete_line_internal): Add missing END_CATCH.
422
bc3b087d
SDJ
4232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
424
425 * NEWS (Changes since GDB 8.0): Add entry about new
426 'set-cwd-on-gdbserver' feature.
427 (New remote packets): Add entry for QSetWorkingDir.
428 * common/common-inferior.h (set_inferior_cwd): New prototype.
429 * infcmd.c (set_inferior_cwd): Remove "static".
430 (show_cwd_command): Expand text to include remote debugging.
431 * remote.c: Add PACKET_QSetWorkingDir.
432 (remote_protocol_features) <QSetWorkingDir>: New entry for
433 PACKET_QSetWorkingDir.
434 (extended_remote_set_inferior_cwd): New function.
435 (extended_remote_create_inferior): Call
436 "extended_remote_set_inferior_cwd".
437 (_initialize_remote): Call "add_packet_config_cmd" for
438 QSetWorkingDir.
439
d092c5a2
SDJ
4402017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
441
442 * NEWS (New commands): Mention "set/show cwd".
443 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
444 "cd" command's help text.
445 * common/common-inferior.h (get_inferior_cwd): New prototype.
446 * infcmd.c (inferior_cwd_scratch): New global variable.
447 (set_inferior_cwd): New function.
448 (get_inferior_cwd): Likewise.
449 (set_cwd_command): Likewise.
450 (show_cwd_command): Likewise.
451 (_initialize_infcmd): Add "set/show cwd" commands.
452 * inferior.h (class inferior) <cwd>: New field.
453 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
454 (fork_inferior): Change inferior's cwd before its execution.
455 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
456 to CreateProcess.
457
7da0a886
SDJ
4582017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
459
460 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
461 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
462 (COMMON_OBS): Add gdb_tilde_expand.o.
463 * common/gdb_tilde_expand.c: New file.
464 * common/gdb_tilde_expand.h: Likewise.
465
db8dd160
MR
4662017-10-03 Maciej W. Rozycki <macro@imgtec.com>
467
468 * gdbarch.sh (objfile): Remove duplicate declaration.
469 * gdbarch.h: Regenerate.
470
f8bfbf22
TT
4712017-10-03 Tom Tromey <tom@tromey.com>
472
473 * utils.c (internal_vproblem): Use string_vprintf.
474
5178ed48
TT
4752017-10-03 Tom Tromey <tom@tromey.com>
476
477 * printcmd.c (info_symbol_command): Use std::string.
478
8cff8730
TT
4792017-10-03 Tom Tromey <tom@tromey.com>
480
481 * top.c (gdb_safe_append_history): Use std::string.
482
895b8f30
TT
4832017-10-03 Tom Tromey <tom@tromey.com>
484
485 * event-top.c (stdin_event_handler): Update.
486 * main.c (captured_main_1): Update.
487 * top.h (make_delete_ui_cleanup): Remove.
488 (struct ui): Add constructor and destructor.
489 (new_ui, delete_ui): Remove.
490 * top.c (make_delete_ui_cleanup): Remove.
491 (new_ui_command): Use std::unique_ptr.
492 (delete_ui_cleanup): Remove.
493 (ui::ui): Rename from new_ui. Update.
494 (free_ui): Remove.
495 (ui::~ui): Rename from delete_ui. Update.
496
0efef640
TT
4972017-10-03 Tom Tromey <tom@tromey.com>
498
499 * symfile.c (load_progress): Use gdb::byte_vector.
500
245ad7d3
TT
5012017-10-03 Tom Tromey <tom@tromey.com>
502
503 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
504 declaration.
505 * printcmd.c (x_command): Remove unused declaration.
506 * symfile.c (symbol_file_command): Remove unused declaration.
507
e05550d7
TT
5082017-10-03 Tom Tromey <tom@tromey.com>
509
510 * utils.c (internal_vproblem): Use std::string.
511 (defaulted_query): Likewise.
512
b95de2b7
TT
5132017-10-03 Tom Tromey <tom@tromey.com>
514
515 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
516 * top.c (execute_command_to_string): Update.
517 * utils.c (make_cleanup_restore_page_info): Remove.
518 (do_restore_page_info_cleanup): Remove.
519 (set_batch_flag_and_restore_page_info):
520 New.
521 (make_cleanup_restore_page_info): Remove.
522 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
523 (~set_batch_flag_and_restore_page_info): New
524 (make_cleanup_restore_uinteger): Remove.
525 (make_cleanup_restore_integer): Remove.
526 (struct restore_integer_closure): Remove.
527 (restore_integer): Remove.
528 * utils.h (struct set_batch_flag_and_restore_page_info): New
529 class.
530 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
531 (make_cleanup_restore_page_info): Remove.
532 (make_cleanup_restore_uinteger) Remove.
533 (make_cleanup_restore_integer) Remove.
534
07036511
TT
5352017-10-03 Tom Tromey <tom@tromey.com>
536
537 * record-full.h (record_full_gdb_operation_disable_set): Return
538 scoped_restore_tmpl<int>.
539 * infrun.c (adjust_pc_after_break): Update.
540 (handle_signal_stop): Update.
541 * record-full.c (record_full_gdb_operation_disable_set): Return
542 scoped_restore_tmpl<int>.
543 (record_full_wait_1, record_full_insert_breakpoint)
544 (record_full_remove_breakpoint, record_full_save)
545 (record_full_goto_insn): Update.
546
45320ffa
TT
5472017-10-02 Tom Tromey <tom@tromey.com>
548
549 PR rust/22236:
550 * rust-lang.c (rust_val_print_str): New function.
551 (val_print_struct): Call it.
552 (rust_subscript): Preserve name of slice type.
553
b3e3859b
TT
5542017-10-02 Tom Tromey <tom@tromey.com>
555
556 * rust-lang.c (rust_subscript): Handle slices in
557 EVAL_AVOID_SIDE_EFFECTS case.
558
01af5e0d
TT
5592017-10-02 Tom Tromey <tom@tromey.com>
560
561 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
562
888e3ddb
TT
5632017-10-02 Tom Tromey <tom@tromey.com>
564
565 * rust-lang.h (rust_slice_type): Add "extern".
566
cc536b21
PA
5672017-10-02 Tom Tromey <tom@tromey.com>
568 Pedro Alves <palves@redhat.com>
569
570 * ada-lang.h (ada_exc_info::operator<): Make const.
571 (ada_exc_info::operator==): Make const.
572 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
573 Make const.
574
386c8614
TT
5752017-09-29 Tom Tromey <tom@tromey.com>
576
577 * target.c (read_whatever_is_readable): Change type of "result".
578 Update.
579 (free_memory_read_result_vector): Remove.
580 (read_memory_robust): Change return type. Update.
581 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
582 bin2hex, std::string.
583 * target.h (memory_read_result_s): Remove typedef.
584 (free_memory_read_result_vector): Remove.
585 (read_memory_robust): Return std::vector.
586
789c4b5e
TT
5872017-09-29 Tom Tromey <tom@tromey.com>
588
589 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
590
ab816a27
TT
5912017-09-29 Tom Tromey <tom@tromey.com>
592
593 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
594 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
595 operator< and operator==.
596 (ada_exceptions_list): Return a std::vector.
597 * ada-lang.c (ada_exc_info::operator<): Rename from
598 compare_ada_exception_info.
599 (ada_exc_info::operator==): New.
600 (sort_remove_dups_ada_exceptions_list): Change type of
601 "exceptions".
602 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
603 (ada_add_global_exceptions): Likewise.
604 (ada_exceptions_list_1): Return a std::vector.
605 (ada_exceptions_list): Likewise.
606
52f9abe4
TT
6072017-09-29 Tom Tromey <tom@tromey.com>
608
609 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
610 'std::set *'.
611 (print_one_inferior): Update.
612 (free_vector_of_ints): Remove.
613 (list_available_thread_groups): Change "ids" to std::set.
614 (mi_cmd_list_thread_groups): Update.
615 (struct collect_cores_data) <core>: Now a std::set.
616 (collect_cores): Update.
617 (unique): Remove.
618 (print_one_inferior): Update.
619
dcd5ddcc
TT
6202017-09-29 Tom Tromey <tom@tromey.com>
621
622 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
623 (mi_execute_async_cli_command): Likewise.
624 (mi_cmd_trace_frame_collected): Use field_fmt.
625
45d288cc
TT
6262017-09-29 Tom Tromey <tom@tromey.com>
627
628 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
629 gdb::byte_vector.
630
6afe2f4a
TT
6312017-09-29 Tom Tromey <tom@tromey.com>
632
633 * mi/mi-parse.c (mi_parse): Remove unused declaration.
634
9813429a
TT
6352017-09-29 Tom Tromey <tom@tromey.com>
636
637 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
638
2d6960b4
TT
6392017-09-29 Tom Tromey <tom@tromey.com>
640
641 * varobj.h (varobj_gen_name): Return std::string.
642 * varobj.c (varobj_gen_name): Return std::string.
643 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
644 (mi_cmd_var_delete): Don't copy "name".
645
784c453a
TT
6462017-09-29 Tom Tromey <tom@tromey.com>
647
648 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
649 (mi_cmd_break_insert_1): Update.
650
a9bc57b9
TT
6512017-09-29 Tom Tromey <tom@tromey.com>
652
653 * target.h (make_scoped_defer_target_commit_resume): Update.
654 * target.c (make_scoped_defer_target_commit_resume): Rename from
655 make_cleanup_defer_target_commit_resume. Return a
656 scoped_restore.
657 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
658
9754d8c4
TT
6592017-09-29 Tom Tromey <tom@tromey.com>
660
661 * main.c (captured_main_1): Remove unused declaration.
662 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
663
99ef965c
TT
6642017-09-29 Tom Tromey <tom@tromey.com>
665
666 * symtab.c (search_symbols): Remove unused outer cleanup.
667 (make_source_files_completion_list): Remove unused declaration.
668
42518ba7
TT
6692017-09-29 Tom Tromey <tom@tromey.com>
670
671 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
672
726b2169
TT
6732017-09-29 Tom Tromey <tom@tromey.com>
674
675 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
676 gdb::byte_vector.
677
55b06432
TT
6782017-09-29 Tom Tromey <tom@tromey.com>
679
680 * complaints.c (vcomplaint): Use std::string.
681
8abcee91
TT
6822017-09-29 Tom Tromey <tom@tromey.com>
683
684 * tracepoint.c (trace_variable_command): Use std::string.
685 (encode_actions_1): Remove unused declarations.
686 (create_tsv_from_upload): Use std::string.
687
6ad94bc7
TT
6882017-09-29 Tom Tromey <tom@tromey.com>
689
690 * cp-support.c (gdb_demangle): Use std::string.
691
2003f3d8
TT
6922017-09-29 Tom Tromey <tom@tromey.com>
693
694 * stack.c (parse_frame_specification): Use std::string
695 (info_frame_command): Use gdb::unique_xmalloc_ptr.
696
8f8accb5
TT
6972017-09-29 Tom Tromey <tom@tromey.com>
698
699 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
700
200aa7b1
TT
7012017-09-29 Tom Tromey <tom@tromey.com>
702
703 * utils.c (vfprintf_maybe_filtered): Use std::string.
704 (vfprintf_unfiltered): Likewise.
705
606aae8a
TT
7062017-09-29 Tom Tromey <tom@tromey.com>
707
708 * event-top.c (top_level_prompt): Return std::string.
709 (display_gdb_prompt): Update.
710
bd413795
TT
7112017-09-29 Tom Tromey <tom@tromey.com>
712
713 * unittests/common-utils-selftests.c (format): New function.
714 (string_vprintf_tests): New function.
715 (_initialize_common_utils_selftests): Register new tests.
716 * common/common-utils.c (string_vprintf): New function.
717 * common/common-utils.h (string_vprintf): Declare.
718
256642e8
PA
7192017-09-29 Pedro Alves <palves@redhat.com>
720
721 * common/rsp-low.c (unpack_varlen_hex): Constify.
722 * common/rsp-low.h (unpack_varlen_hex): Constify.
723 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
724 Constify.
725 * remote.c (remote_set_permissions, read_ptid)
726 (remote_current_thread, remote_get_threads_with_qthreadinfo)
727 (remote_static_tracepoint_marker_at)
728 (remote_static_tracepoint_markers_by_strid)
729 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
730 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
731 (parse_tracepoint_definition, parse_tsv_definition)
732 (parse_static_tracepoint_marker_definition): Constify.
733 * tracepoint.h (parse_static_tracepoint_marker_definition)
734 (parse_trace_status, parse_tracepoint_status)
735 (parse_tracepoint_definition, parse_tsv_definition): Constify.
736
b6bb3468
PA
7372017-09-29 Pedro Alves <palves@redhat.com>
738
739 * remote.c (target_buf, target_buf_size): Delete.
740 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
741 Use the connection's packet buffer instead.
742 All callers adjusted.
743 (_initialize_remote): Remove references to target_buf and
744 target_buf_size.
745
b2f8eb7a
PA
7462017-09-28 Pedro Alves <palves@redhat.com>
747
748 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
749 unittests/common-utils-selftests.c.
750 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
751 (COMMON_OBS): Remove utils-selftests.o.
752 * utils-selftests.c: Move to ...
753 * unittests/common-utils-selftests.c: ... here and rename self
754 test to "string_printf".
755
08302ed2
DE
7562017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
757
758 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
759 having NULL cus or tus.
760
96a5a1d3
UW
7612017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
762
763 * arm-tdep.c: (convert_from_extended): Remove.
764 (convert_to_extended): Likewise.
765 (arm_extract_return_value): Use convert_typed_floating.
766 (arm_store_return_value): Likewise.
767
768 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
769 * sh-tdep.c: Do not include "floatformat.h".
770 (sh_littlebyte_bigword_type): New function.
771 (sh_register_convert_to_virtual): Use convert_typed_floating.
772 (sh_register_convert_to_raw): Likewise.
773 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
774 (sh64_littlebyte_bigword_type): New function.
775 (sh64_extract_return_value): Use convert_typed_floating.
776 (sh64_register_convert_to_virtual): Likewise.
777 (sh64_register_convert_to_raw): Likewise.
778
0db7851f
UW
7792017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
780
781 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
782 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
783
784 * gdbtypes.h (union type_specific): Make field floatformat hold
785 just a single struct floatformat, not an array.
786 (floatformat_from_type): Move here.
787 * gdbtypes.c (floatformat_from_type): Move here. Update to
788 changed TYPE_FLOATFORMAT definition.
789 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
790 (recursive_dump_type): Likewise.
791 (init_float_type): Install correct floatformat for byte order.
792 (arch_float_type): Likewise.
793
77b7c781
UW
7942017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
795
796 * gdbtypes.c (init_type): Change incoming argument from
797 length-in-bytes to length-in-bits. Assert length is a
798 multiple of TARGET_CHAR_BITS.
799 (arch_type, arch_flags_type): Likewise.
800 (init_integer_type): Update call to init_type.
801 (init_character_type): Likewise.
802 (init_boolean_type): Likewise.
803 (init_float_type): Likewise.
804 (init_decfloat_type): Likewise.
805 (init_complex_type): Likewise.
806 (init_pointer_type): Likewise.
807 (objfile_type): Likewise.
808 (arch_integer_type): Update call to arch_type.
809 (arch_character_type): Likewise.
810 (arch_boolean_type): Likewise.
811 (arch_float_type): Likewise.
812 (arch_decfloat_type): Likewise.
813 (arch_complex_type): Likewise.
814 (arch_pointer_type): Likewise.
815 (gdbtypes_post_init): Likewise.
816
817 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
818 (read_base_type): Likewise.
819 * mdebugread.c (basic_type): Likewise.
820 * stabsread.c (dbx_init_float_type): Likewise.
821 (rs6000_builtin_type): Likewise.
822 (read_range_type): Likewise. Also, fix call to init_integer_type
823 with erroneous length argument.
824
825 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
826 * d-lang.c (build_d_types): Likewise.
827 * f-lang.c (build_fortran_types): Likewise.
828 * go-lang.c (build_go_types): Likewise.
829 * opencl-lang.c (build_opencl_types): Likewise.
830 * jit.c (finalize_symtab): Likewise.
831 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
832 (build_std_type_info_type): Likewise.
833 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
834 update call to arch_flags_type.
835
836 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
837 arch_type.
838 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
839 * windows-tdep.c (windows_get_tlb_type): Likewise.
840
841 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
842 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
843 * m32c-tdep.c (make_types): Likewise.
844 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
845 (rl78_psw_type): Update call to arch_flags_type.
846 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
847 * rx-tdep.c (rx_psw_type): Likewise.
848 (rx_fpsw_type): Likewise.
849 * sparc-tdep.c (sparc_psr_type): Likewise.
850 (sparc_fsr_type): Likewise.
851 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
852 (sparc64_ccr_type): Likewise.
853 (sparc64_fsr_type): Likewise.
854 (sparc64_fprs_type): Likewise.
855
f21b4d5c
TT
8562017-09-27 Tom Tromey <tom@tromey.com>
857
858 * findcmd.c (find_command): Constify.
859
643c2ffa
TT
8602017-09-27 Tom Tromey <tom@tromey.com>
861
862 * ada-tasks.c (task_command_1, task_command): Constify.
863
510e5e56
TT
8642017-09-27 Tom Tromey <tom@tromey.com>
865
866 * symtab.c (maintenance_print_symbol_cache)
867 (maintenance_flush_symbol_cache)
868 (maintenance_print_symbol_cache_statistics): Constify.
869
e503b191
TT
8702017-09-27 Tom Tromey <tom@tromey.com>
871
872 * inferior.c (detach_inferior_command, kill_inferior_command)
873 (inferior_command): Constify.
874
4e001312
TT
8752017-09-27 Tom Tromey <tom@tromey.com>
876
877 * regcache.c (regcache_print, maintenance_print_registers)
878 (maintenance_print_raw_registers)
879 (maintenance_print_cooked_registers)
880 (maintenance_print_register_groups)
881 (maintenance_print_remote_registers): Constify.
882
77763700
TT
8832017-09-27 Tom Tromey <tom@tromey.com>
884
885 * printcmd.c (map_display_numbers, undisplay_command)
886 (enable_disable_display_command, enable_display_command)
887 (disable_display_command): Constify.
888
4495129a
TT
8892017-09-27 Tom Tromey <tom@tromey.com>
890
891 * breakpoint.h (delete_command): Don't declare.
892 * breakpoint.c (delete_command, enable_once_command)
893 (enable_count_command, enable_delete_command, breakpoint_1)
894 (maintenance_info_breakpoints, stopin_command, stopat_command)
895 (delete_command, delete_trace_command, save_breakpoints)
896 (save_breakpoints_command, save_tracepoints_command): Constify.
897
3088cf40
TT
8982017-09-27 Tom Tromey <tom@tromey.com>
899
900 * macrocmd.c (macro_expand_command, macro_expand_once_command)
901 (skip_ws, extract_identifier, macro_define_command)
902 (macro_undef_command, macro_list_command): Constify.
903
69f476a3
TT
9042017-09-27 Tom Tromey <tom@tromey.com>
905
906 * infcmd.c (environment_info, set_environment_command)
907 (unset_environment_command, path_info, info_proc_cmd_1)
908 (info_proc_cmd_mappings, info_proc_cmd_stat)
909 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
910 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
911
c4a3e68e
TT
9122017-09-27 Tom Tromey <tom@tromey.com>
913
914 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
915 Constify.
916
c9d31bd6
TT
9172017-09-27 Tom Tromey <tom@tromey.com>
918
919 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
920
1f3f85eb
TT
9212017-09-27 Tom Tromey <tom@tromey.com>
922
923 * demangle.c (demangle_command): Constify.
924
9c504b5d
TT
9252017-09-27 Tom Tromey <tom@tromey.com>
926
927 * progspace.c (maintenance_info_program_spaces_command):
928 Constify.
929
6663cf91
TT
9302017-09-27 Tom Tromey <tom@tromey.com>
931
932 * compile/compile.c (check_raw_argument, compile_file_command)
933 (compile_code_command, compile_print_command): Constify.
934
34e5fa26
TT
9352017-09-27 Tom Tromey <tom@tromey.com>
936
937 * reggroups.c (maintenance_print_reggroups): Constify.
938
8384c356
TT
9392017-09-27 Tom Tromey <tom@tromey.com>
940
941 * dwarf2read.c (save_gdb_index_command): Constify.
942
884beb0c
TT
9432017-09-27 Tom Tromey <tom@tromey.com>
944
945 * stap-probe.c (info_probes_stap_command): Constify.
946
e0b2930c
TT
9472017-09-27 Tom Tromey <tom@tromey.com>
948
949 * fork-child.c (unset_exec_wrapper_command): Constify.
950
f938677d
TT
9512017-09-27 Tom Tromey <tom@tromey.com>
952
953 * btrace.c (get_uint, get_context_size, no_chunk)
954 (maint_btrace_packet_history_cmd)
955 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
956 (maint_info_btrace_cmd): Constify.
957
8949cb87
TT
9582017-09-27 Tom Tromey <tom@tromey.com>
959
960 * reverse.c (delete_bookmark_command): Constify.
961
ac88e2de
TT
9622017-09-27 Tom Tromey <tom@tromey.com>
963
964 * remote.c (set_memory_packet_size)
965 (set_memory_write_packet_size, show_memory_write_packet_size)
966 (set_memory_read_packet_size, show_memory_read_packet_size)
967 (compare_sections_command, packet_command, remote_put_command)
968 (remote_get_command, remote_delete_command): Constify.
969
bd4c9dfe
TT
9702017-09-27 Tom Tromey <tom@tromey.com>
971
972 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
973 (set_mipsfpu_double_command, set_mipsfpu_none_command)
974 (set_mipsfpu_auto_command): Constify.
975
5e93d4c6
TT
9762017-09-27 Tom Tromey <tom@tromey.com>
977
978 * cli/cli-cmds.h (cd_command): Constify.
979 * cli/cli-cmds.c (cd_command): Constify.
980
fc41a75b
TT
9812017-09-27 Tom Tromey <tom@tromey.com>
982
983 * thread.c (thread_name_command, thread_find_command): Constify.
984
67810076
TT
9852017-09-27 Tom Tromey <tom@tromey.com>
986
987 * probe.c (enable_probes_command, disable_probes_command):
988 Constify.
989
1d8b34a7
TT
9902017-09-27 Tom Tromey <tom@tromey.com>
991
992 * symfile.c (symbol_file_command): Constify.
993 * gdbcore.h (deprecated_file_changed_hook): Constify.
994 * exec.c (deprecated_file_changed_hook, exec_file_command)
995 (file_command): Constify.
996 * defs.h (symbol_file_command): Constify.
997
442019e1
TT
9982017-09-27 Tom Tromey <tom@tromey.com>
999
1000 * remote-fileio.c (set_system_call_allowed)
1001 (show_system_call_allowed): Constify.
1002
2983f7cb
TT
10032017-09-27 Tom Tromey <tom@tromey.com>
1004
1005 * tracepoint.c (delete_trace_variable_command)
1006 (tfind_end_command, tfind_start_command, tfind_pc_command)
1007 (tfind_tracepoint_command, tfind_line_command)
1008 (tfind_range_command, tfind_outside_command): Constify.
1009
4fd41b24
TT
10102017-09-27 Tom Tromey <tom@tromey.com>
1011
1012 * ax-gdb.c (maint_agent_printf_command, agent_command)
1013 (agent_eval_command): Constify.
1014
f2fc3015
TT
10152017-09-27 Tom Tromey <tom@tromey.com>
1016
1017 * tracepoint.c (info_scope_command): Constify.
1018 * python/python.c (gdbpy_decode_line): Constify.
1019 * python/py-breakpoint.c (bppy_init): Constify.
1020 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1021 * location.h: (new_linespec_location)
1022 (string_to_event_location_basic, string_to_event_location):
1023 Constify.
1024 * location.c (new_linespec_location)
1025 (string_to_event_location_basic, string_to_event_location):
1026 Constify.
1027 * linespec.h (decode_line_with_current_source)
1028 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1029 * linespec.c (linespec_lex_to_end)
1030 (decode_line_with_current_source)
1031 (decode_line_with_last_displayed): Constify.
1032 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1033 Constify.
1034 * cli/cli-cmds.c (edit_command, list_command): Constify.
1035 * breakpoint.h (until_break_command, watch_command_wrapper)
1036 (awatch_command_wrapper, rwatch_command_wrapper)
1037 (init_ada_exception_breakpoint): Constify.
1038 * breakpoint.c (break_command_1, dprintf_command)
1039 (break_range_command, watch_command_wrapper)
1040 (rwatch_command_wrapper, awatch_command_wrapper)
1041 (until_break_command, init_ada_exception_breakpoint)
1042 (strace_marker_create_sals_from_location, trace_command)
1043 (ftrace_command, strace_command, struct tracepoint): Constify.
1044 * ax-gdb.c (agent_command_1): Constify.
1045 * ada-lang.c (ada_exception_sal): Constify.
1046
8c2f95f4
TT
10472017-09-27 Tom Tromey <tom@tromey.com>
1048
1049 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1050 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1051 (get_context_size, no_chunk, get_insn_history_modifiers)
1052 (cmd_record_insn_history, get_call_history_modifiers)
1053 (cmd_record_call_history): Constify.
1054
a0d65762
TT
10552017-09-27 Tom Tromey <tom@tromey.com>
1056
1057 * source.c (show_substitute_path_command)
1058 (unset_substitute_path_command, set_substitute_path_command):
1059 Constify.
1060
58971144
TT
10612017-09-27 Tom Tromey <tom@tromey.com>
1062
1063 * typeprint.c (maintenance_print_type): Constify.
1064 * maint.c (maintenance_dump_me, maintenance_demangle)
1065 (maintenance_time_display, maintenance_info_sections)
1066 (maintenance_print_statistics, maintenance_deprecate)
1067 (maintenance_undeprecate): Constify.
1068 (maintenance_do_deprecate): Constify. Use std::string.
1069 (maintenance_selftest): Constify.
1070 * gdbtypes.h (maintenance_print_type): Constify.
1071
c482f52c
TT
10722017-09-27 Tom Tromey <tom@tromey.com>
1073
1074 * hppa-tdep.c (unwind_command): Constify.
1075
e100df1a
TT
10762017-09-27 Tom Tromey <tom@tromey.com>
1077
1078 * target-descriptions.c (unset_tdesc_filename_cmd)
1079 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1080 Constify.
1081
31d56ade
TT
10822017-09-27 Tom Tromey <tom@tromey.com>
1083
1084 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1085
b961da0b
TT
10862017-09-27 Tom Tromey <tom@tromey.com>
1087
1088 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1089
e2d8ae16
TT
10902017-09-27 Tom Tromey <tom@tromey.com>
1091
1092 * tui/tui-regs.c (tui_reg_command): Constify.
1093
863779b0
TT
10942017-09-27 Tom Tromey <tom@tromey.com>
1095
1096 * skip.c (skip_file_command, skip_function_command)
1097 (skip_enable_command, skip_disable_command, skip_delete_command):
1098 Constify.
1099
cdb34d4a
TT
11002017-09-27 Tom Tromey <tom@tromey.com>
1101
1102 * record-btrace.c (cmd_record_btrace_bts_start)
1103 (cmd_record_btrace_pt_start): Constify.
1104
e99c83e7
TT
11052017-09-27 Tom Tromey <tom@tromey.com>
1106
1107 * symmisc.c (maintenance_print_symbols)
1108 (maintenance_print_msymbols, maintenance_print_objfiles)
1109 (maintenance_info_symtabs, maintenance_check_symtabs)
1110 (maintenance_expand_symtabs, maintenance_info_line_tables):
1111 Constify.
1112
32faf971
TT
11132017-09-27 Tom Tromey <tom@tromey.com>
1114
1115 * top.c (new_ui_command): Constify.
1116
2cf311eb
TT
11172017-09-27 Tom Tromey <tom@tromey.com>
1118
1119 * symfile.c (add_symbol_file_command)
1120 (remove_symbol_file_command, list_overlays_command)
1121 (map_overlay_command, unmap_overlay_command)
1122 (overlay_auto_command, overlay_manual_command)
1123 (overlay_off_command, overlay_load_command): Constify.
1124
e6738699
TT
11252017-09-27 Tom Tromey <tom@tromey.com>
1126
1127 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1128 (info_spu_mailbox_command, info_spu_dma_command)
1129 (info_spu_proxydma_command): Constify.
1130
aa360cd5
TT
11312017-09-27 Tom Tromey <tom@tromey.com>
1132
1133 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1134
898241a5
TT
11352017-09-27 Tom Tromey <tom@tromey.com>
1136
1137 * cli/cli-script.c (user_defined_command): Constify.
1138
2d0ac106
TT
11392017-09-27 Tom Tromey <tom@tromey.com>
1140
1141 * cli/cli-dump.c (dump_memory_command, dump_value_command)
1142 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1143 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1144 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1145 (dump_binary_value, append_binary_memory, append_binary_value):
1146 Constify.
1147 (struct dump_context) <func>: Constify.
1148 (add_dump_command): Update.
1149
dede02ce
TT
11502017-09-27 Tom Tromey <tom@tromey.com>
1151
1152 * cli/cli-cmds.c (show_version, show_configuration)
1153 (source_command, show_user): Constify.
1154
d3cb6b99
TT
11552017-09-27 Tom Tromey <tom@tromey.com>
1156
1157 * target.c (maintenance_print_target_stack): Constify.
1158
1970a12f
TT
11592017-09-27 Tom Tromey <tom@tromey.com>
1160
1161 * interps.c (interpreter_exec_cmd): Constify.
1162
41243651
TT
11632017-09-27 Tom Tromey <tom@tromey.com>
1164
1165 * record-full.c (cmd_record_full_restore): Constify.
1166
4465d9db
TT
11672017-09-27 Tom Tromey <tom@tromey.com>
1168
1169 * memattr.c (enable_mem_command, disable_mem_command)
1170 (delete_mem_command): Constify.
1171
ad25e423
TT
11722017-09-27 Tom Tromey <tom@tromey.com>
1173
1174 * value.c (show_convenience): Constify.
1175
d64097b1
TT
11762017-09-27 Tom Tromey <tom@tromey.com>
1177
1178 * gdbcore.h (core_file_command): Update.
1179 * corefile.c (core_file_command): Constify.
1180
4d4589ef
TT
11812017-09-27 Tom Tromey <tom@tromey.com>
1182
1183 * user-regs.c (maintenance_print_user_registers): Constify.
1184
32a7bf17
TT
11852017-09-27 Tom Tromey <tom@tromey.com>
1186
1187 * cp-namespace.c (maintenance_cplus_namespace): Constify.
1188
4a475551
TT
11892017-09-27 Tom Tromey <tom@tromey.com>
1190
1191 * cp-support.c (first_component_command): Constify.
1192
990b9f9f
TT
11932017-09-27 Tom Tromey <tom@tromey.com>
1194
1195 * psymtab.c (maintenance_print_psymbols)
1196 (maintenance_info_psymtabs, maintenance_check_psymtabs):
1197 Constify.
1198
c281872e
TT
11992017-09-27 Tom Tromey <tom@tromey.com>
1200
1201 * windows-tdep.c (display_tib): Constify.
1202
5b64bf74
TT
12032017-09-27 Tom Tromey <tom@tromey.com>
1204
1205 * linux-fork.c (delete_checkpoint_command)
1206 (detach_checkpoint_command): Constify.
1207
4ada038f
TT
12082017-09-27 Tom Tromey <tom@tromey.com>
1209
1210 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1211
57f5a81b
TT
12122017-09-27 Tom Tromey <tom@tromey.com>
1213
1214 * arc-tdep.c (dump_arc_instruction_command): Constify.
1215
b0a8e6c4
TT
12162017-09-27 Tom Tromey <tom@tromey.com>
1217
1218 * valprint.c (set_radix, show_radix): Constify.
1219
8d97dc1c
TT
12202017-09-27 Tom Tromey <tom@tromey.com>
1221
1222 * dtrace-probe.c (info_probes_dtrace_command): Constify.
1223
eb7c454d
TT
12242017-09-27 Tom Tromey <tom@tromey.com>
1225
1226 * command.h (not_just_help_class_command): Update.
1227 * cli/cli-decode.h (not_just_help_class_command): Update.
1228 * cli/cli-decode.c (not_just_help_class_command): Constify.
1229
e4e33335
TT
12302017-09-27 Tom Tromey <tom@tromey.com>
1231
1232 * gdb_bfd.c (maintenance_info_bfds): Constify.
1233
0450cc4c
TT
12342017-09-27 Tom Tromey <tom@tromey.com>
1235
1236 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1237 overloads.
1238 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
1239 (do_const_cfunc): New function.
1240 (cmd_cfunc_eq): New overload.
1241 (cli_user_command_p): Check do_const_cfunc.
1242 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1243 const_cfunc.
1244 * command.h (add_cmd): Add const overload and no-function
1245 overload.
1246 (set_cmd_cfunc): Add const overload.
1247 (cmd_const_cfunc_ftype): Declare.
1248 (cmd_cfunc_eq): Add const overload.
1249 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1250 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1251 overload.
1252
a9bbfbd8
TT
12532017-09-27 Tom Tromey <tom@tromey.com>
1254
1255 * macroexp.c (get_next_token_for_substitution): New function.
1256 (substitute_args): Call it. Check for __VA_OPT__.
1257
5230b05a
WT
12582017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1259 Pedro Alves <palves@redhat.com>
1260
1261 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1262 producer_is_icc_lt_14.
1263 (producer_is_icc_lt_14): New function.
1264 (check_producer): Add code for checking version of ICC.
1265 (producer_is_icc): Move to producer.c.
1266 (read_structure_type): Restrict ICC workaround to ICC<14.
1267 * producer.c: Include selftest.h.
1268 (producer_is_icc, producer_parsing_tests, _initialize_producer):
1269 New functions.
1270 * producer.h (producer_is_icc): New declaration.
1271
b32b108a
WT
12722017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
1273
1274 * Makefile.in (SFILES): Add producer.c.
1275 (COMMON_OBS): Add producer.o
1276 * amd64-tdep.c (producer.h): Add new include.
1277 * dwarf2read.c (producer.h): Add new include.
1278 * producer.c: New file.
1279 * producer.h: New file.
1280 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1281 producer.c.
1282 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1283 producer.h.
1284
5007d765
MK
12852017-09-26 Matthias Klose <doko@ubuntu.com>
1286
1287 * configure.ac: Search ncursesw before ncurses.
1288 Check ncursesw/ncurses.h before ncurses/ncurses.h.
1289 * gdb_curses.h: Include <ncursesw/ncurses.h>
1290 * config.in, configure: Regenerate.
1291
281c4447
RO
12922017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1293
1294 PR gdb/22185
1295 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1296 obsolete.
1297 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1298 Remove i386sol2 support.
1299 * configure.nat <i386sol2>: Remove.
1300 <sol2-64>: Fold into ...
1301 <sol2>: ... this.
1302 Move common settings to default section.
1303 Add sol-thread.o.
1304 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1305 x86_64-*-solaris2.1[0-9]*>: Rename to ...
1306 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1307 <i[34567]86-*-solaris*>: Remove.
1308 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1309
1310 * configure.ac: Remove wctype in libw check.
1311 (_MSE_INT_H): Don't define on Solaris 7-9.
1312 <solaris*>: Remove libthread_db.so.1 check.
1313 * configure: Regenerate.
1314 * config.in: Regenerate.
1315
1316 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1317 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1318 (gdb_ps_size_t): Remove.
1319 Use base types in users.
1320 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1321
1322 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1323
39b06c20
RO
13242017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1325
1326 PR build/22206
1327 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1328 (adi_is_addr_mapped): Likewise.
1329 (PSR_ICC): Don't redefine.
1330 (PSR_IMPL): Likewise.
1331
6c3e20f1
TT
13322017-09-25 Tom Tromey <tom@tromey.com>
1333
1334 * regcache.c (regcache::dump): Use string_printf.
1335
b292235f
TT
13362017-09-25 Tom Tromey <tom@tromey.com>
1337
1338 * regcache.c (class regcache_invalidator): New.
1339 (struct register_to_invalidate): Remove.
1340 (make_cleanup_regcache_invalidate): Remove.
1341 (regcache::raw_write): Use regcache_invalidator.
1342
9ac86b52
TT
13432017-09-25 Tom Tromey <tom@tromey.com>
1344
1345 * spu-tdep.c (spu2ppu_sniffer): Update.
1346 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1347 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1348 Remove.
1349 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1350 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1351 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1352 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1353 (frame_pop): Update.
1354
c0e383c6
TT
13552017-09-25 Tom Tromey <tom@tromey.com>
1356
1357 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1358 * regcache.h (regcache_xfree): Don't declare.
1359 * regcache.c (regcache_xfree): Remove.
1360 (do_regcache_xfree): Use delete.
1361 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1362 * linux-fork.c (free_fork): Use delete.
1363 (fork_save_infrun_state): Likewise.
1364 * jit.c (jit_dealloc_cache): Use delete.
1365 * infrun.c (discard_infcall_suspend_state): Use delete.
1366
791199cc
TT
13672017-09-25 Tom Tromey <tom@tromey.com>
1368
1369 * regcache.h (regcache_xmalloc): Don't declare.
1370 (regcache_raw_set_cached_value): Update comment.
1371 * regcache.c (regcache_xmalloc): Remove.
1372 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1373 * jit.c (jit_frame_sniffer): Use new.
1374 * frame.c (frame_save_as_regcache): Use new.
1375
289e23aa
AA
13762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1377
1378 * NEWS: Advertise support for guarded-storage registers on IBM z.
1379
1b63490c
AA
13802017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1381
1382 * s390-linux-nat.c (have_regset_gs): New static variable.
1383 (s390_linux_fetch_inferior_registers): Handle guarded-storage
1384 control block and guarded-storage broadcast control regsets.
1385 (s390_read_description): Detect whether the target has
1386 guarded-storage support, return appropriate tdesc.
1387 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1388 (features/s390x-gs-linux64.c): Likewise.
1389 (struct gdbarch_tdep) <have_gs>: New field.
1390 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1391 (s390_gsbc_regset): New variables.
1392 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1393 and s390_gsbc_regset, if applicable.
1394 (s390_core_read_description): Check whether core file was from a
1395 target with guarded-storage support; include appropriate regsets.
1396 (s390_gdbarch_init): Add registers for guarded-storage support.
1397 (_initialize_s390_tdep): Initialize new target descriptions that
1398 include registers for guarded-storage support.
1399 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1400 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1401 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1402 (S390_NUM_REGS): Adjust macro definition.
1403 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1404 (tdesc_s390x_gs_linux64): New declarations.
1405
96235dc1
AA
14062017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1407
1408 * features/s390-gs-linux64.xml: New file.
1409 * features/s390-gs.xml: New file.
1410 * features/s390-gsbc.xml: New file.
1411 * features/s390x-gs-linux64.xml: New file.
1412 * features/Makefile (WHICH): Add s390-gs-linux64 and
1413 s390x-gs-linux64.
1414 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1415 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1416 * features/s390-gs-linux64.c: New generated file.
1417 * features/s390x-gs-linux64.c: New file.
1418 * regformats/s390-gs-linux64.dat: New file.
1419 * regformats/s390x-gs-linux64.dat: New file.
1420
b4a7c699
TT
14212017-09-23 Tom Tromey <tom@tromey.com>
1422
1423 * defs.h (make_cleanup_override_quit_handler): Don't declare.
1424
c2f97536
TT
14252017-09-22 Tom Tromey <tom@tromey.com>
1426
1427 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1428 type to scoped_restore_tmpl.
1429 <scoped_input_handler>: Initialize m_quit_handler directly.
1430
43573013
SDJ
14312017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1432
1433 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1434 (cd_command): Likewise. Free "current_directory" before
1435 assigning to it.
1436 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1437 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1438 * top.c (gdb_dirbuf): Remove global declaration.
1439 * top.h (gdb_dirbuf): Likewise.
1440
6ec2e0f5
SDJ
14412017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
1442
1443 * gnulib/aclocal.m4: Regenerate.
1444 * gnulib/config.in: Regenerate.
1445 * gnulib/configure: Regenerate.
1446 * gnulib/import/Makefile.am: Regenerate.
1447 * gnulib/import/Makefile.in: Regenerate.
1448 * gnulib/import/assure.h: New file.
1449 * gnulib/import/at-func.c: Likewise
1450 * gnulib/import/chdir-long.c: New file.
1451 * gnulib/import/chdir-long.h: New file.
1452 * gnulib/import/cloexec.c: New file.
1453 * gnulib/import/cloexec.h: New file.
1454 * gnulib/import/close.c: New file.
1455 * gnulib/import/closedir.c: New file.
1456 * gnulib/import/dirent-private.h: New file.
1457 * gnulib/import/dup-safer.c: New file.
1458 * gnulib/import/dup.c: New file.
1459 * gnulib/import/dup2.c: New file.
1460 * gnulib/import/error.c: New file.
1461 * gnulib/import/error.h: New file.
1462 * gnulib/import/exitfail.c: New file.
1463 * gnulib/import/exitfail.h: New file.
1464 * gnulib/import/fchdir.c: New file.
1465 * gnulib/import/fcntl.c: New file.
1466 * gnulib/import/fcntl.in.h: New file.
1467 * gnulib/import/fd-hook.c: New file.
1468 * gnulib/import/fd-hook.h: New file.
1469 * gnulib/import/fd-safer.c: New file.
1470 * gnulib/import/fdopendir.c: New file.
1471 * gnulib/import/filename.h: New file.
1472 * gnulib/import/filenamecat-lgpl.c: New file.
1473 * gnulib/import/filenamecat.h: New file.
1474 * gnulib/import/fstat.c: New file.
1475 * gnulib/import/fstatat.c: New file.
1476 * gnulib/import/getcwd-lgpl.c: New file.
1477 * gnulib/import/getcwd.c: New file.
1478 * gnulib/import/getdtablesize.c: New file.
1479 * gnulib/import/getlogin_r.c: New file.
1480 * gnulib/import/getprogname.c: New file.
1481 * gnulib/import/getprogname.h: New file.
1482 * gnulib/import/gettext.h: New file.
1483 * gnulib/import/glob-libc.h: New file.
1484 * gnulib/import/glob.c: New file.
1485 * gnulib/import/glob.in.h: New file.
1486 * gnulib/import/intprops.h: New file.
1487 * gnulib/import/m4/chdir-long.m4: New file.
1488 * gnulib/import/m4/close.m4: New file.
1489 * gnulib/import/m4/closedir.m4: New file.
1490 * gnulib/import/m4/d-ino.m4: New file.
1491 * gnulib/import/m4/d-type.m4: New file.
1492 * gnulib/import/m4/dup.m4: New file.
1493 * gnulib/import/m4/dup2.m4: New file.
1494 * gnulib/import/m4/error.m4: New file.
1495 * gnulib/import/m4/fchdir.m4: New file.
1496 * gnulib/import/m4/fcntl.m4: New file.
1497 * gnulib/import/m4/fcntl_h.m4: New file.
1498 * gnulib/import/m4/fdopendir.m4: New file.
1499 * gnulib/import/m4/filenamecat.m4: New file.
1500 * gnulib/import/m4/fstat.m4: New file.
1501 * gnulib/import/m4/fstatat.m4: New file.
1502 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1503 * gnulib/import/m4/getcwd-path-max.m4: New file.
1504 * gnulib/import/m4/getcwd.m4: New file.
1505 * gnulib/import/m4/getdtablesize.m4: New file.
1506 * gnulib/import/m4/getlogin_r.m4: New file.
1507 * gnulib/import/m4/getprogname.m4: New file.
1508 * gnulib/import/m4/glob.m4: New file.
1509 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1510 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1511 * gnulib/import/m4/mempcpy.m4: New file.
1512 * gnulib/import/m4/memrchr.m4: New file.
1513 * gnulib/import/m4/mode_t.m4: New file.
1514 * gnulib/import/m4/msvc-inval.m4: New file.
1515 * gnulib/import/m4/msvc-nothrow.m4: New file.
1516 * gnulib/import/m4/open.m4: New file.
1517 * gnulib/import/m4/openat.m4: New file.
1518 * gnulib/import/m4/opendir.m4: New file.
1519 * gnulib/import/m4/readdir.m4: New file.
1520 * gnulib/import/m4/realloc.m4: New file.
1521 * gnulib/import/m4/rewinddir.m4: New file.
1522 * gnulib/import/m4/save-cwd.m4: New file.
1523 * gnulib/import/m4/strdup.m4: New file.
1524 * gnulib/import/m4/strerror.m4: New file.
1525 * gnulib/import/m4/unistd-safer.m4: New file.
1526 * gnulib/import/mempcpy.c: New file.
1527 * gnulib/import/memrchr.c: New file.
1528 * gnulib/import/msvc-inval.c: New file.
1529 * gnulib/import/msvc-inval.h: New file.
1530 * gnulib/import/msvc-nothrow.c: New file.
1531 * gnulib/import/msvc-nothrow.h: New file.
1532 * gnulib/import/open.c: New file.
1533 * gnulib/import/openat-die.c: New file.
1534 * gnulib/import/openat-priv.h: New file.
1535 * gnulib/import/openat-proc.c: New file.
1536 * gnulib/import/openat.c: New file.
1537 * gnulib/import/openat.h: New file.
1538 * gnulib/import/opendir.c: New file.
1539 * gnulib/import/pipe-safer.c: New file.
1540 * gnulib/import/readdir.c: New file.
1541 * gnulib/import/realloc.c: New file.
1542 * gnulib/import/rewinddir.c: New file.
1543 * gnulib/import/save-cwd.c: New file.
1544 * gnulib/import/save-cwd.h: New file.
1545 * gnulib/import/strdup.c: New file.
1546 * gnulib/import/strerror-override.c: New file.
1547 * gnulib/import/strerror-override.h: New file.
1548 * gnulib/import/strerror.c: New file.
1549 * gnulib/import/unistd--.h: New file.
1550 * gnulib/import/unistd-safer.h: New file.
1551 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1552 "getcwd" and "glob".
1553 * ser-tcp.c: Undefine "close" before redefining it.
1554
432ae719
SM
15552017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1556
1557 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1558 get rid of res_val.
1559
4fa7574e
RO
15602017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1561
1562 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1563 <sol2,sparc>: Likewise.
1564 <sol2-64,i386>: Likewise.
1565
1566 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1567 -Wdeprecated-declarations on *-*-solaris*.
1568 * configure: Regenerate.
1569
1570 * procfs.c: Include "nat/inferior.h".
1571 (procfs_info_proc): Fix typo.
1572
f6327dcb
KB
15732017-09-21 Kevin Buettner <kevinb@redhat.com>
1574
1575 * remote.c (vector): Include.
1576 (struct private_thread_info): Add field, thread_handle.
1577 (free_private_thread_info): Deallocate storage associated with
1578 thread handle.
1579 (get_private_info_thread): Initialize `thread_handle' field.
1580 (struct thread_item): Add field, thread_handle.
1581 (clear_threads_listing_context): Deallocate storage associated
1582 with thread handle.
1583 (start_thread): Add support for "handle" attribute.
1584 (thread_attributes): Add "handle".
1585 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1586 field.
1587 (remote_update_thread_list): Update thread_handle.
1588 (remote_thread_handle_to_thread_info): New function.
1589 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1590
fbbe5337
KB
15912017-09-21 Kevin Buettner <kevinb@redhat.com>
1592
1593 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1594 function.
1595 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1596 * python/python-internal.h (thread_object_type): Declare.
1597
e04ee09e
KB
15982017-09-21 Kevin Buettner <kevinb@redhat.com>
1599
1600 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1601 (target_thread_handle_to_thread_info): Declare.
1602 * target.c (target_thread_handle_to_thread_info): New function.
1603 * target-delegates.c: Regenerate.
1604 * gdbthread.h (find_thread_by_handle): Declare.
1605 * thread.c (find_thread_by_handle): New function.
1606 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1607 function.
1608 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1609
1e5b66ed
SM
16102017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1611
1612 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1613
ebe48ba0
SM
16142017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1615
1616 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1617
0a0bf5dc
YQ
16182017-09-21 Yao Qi <yao.qi@linaro.org>
1619
1620 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1621 to gdb_target_obs.
1622
d1b0a7bf
TT
16232017-09-20 Tom Tromey <tom@tromey.com>
1624
1625 * breakpoint.c (struct counted_command_line): Remove.
1626 (breakpoint_commands): Update.
1627 (alloc_counted_command_line, incref_counted_command_line)
1628 (decref_counted_command_line, do_cleanup_counted_command_line)
1629 (make_cleanup_decref_counted_command_line): Remove.
1630 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1631 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1632 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1633 (save_breakpoints): Update.
1634 * breakpoint.h (counted_command_line): Now a typedef to
1635 shared_ptr.
1636 (struct breakpoint) <commands>: Now a counted_command_line.
1637 (struct bpstats) <command>: Likewise.
1638
48649e1b
TT
16392017-09-20 Tom Tromey <tom@tromey.com>
1640
1641 * breakpoint.c (struct commands_info, do_map_commands_command):
1642 Remove.
1643 (commands_command_1): Update.
1644 (iterate_over_related_breakpoints): Take a function_view.
1645 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1646 (delete_command): Update.
1647 (map_breakpoint_numbers): Take a function_view.
1648 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1649 (disable_command): Update.
1650 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1651 (enable_command): Update.
1652 (struct disp_data, do_enable_breakpoint_disp)
1653 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1654 (do_map_enable_delete_breakpoint): Remove.
1655 (enable_once_command, enable_count_command, enable_delete_command)
1656 (delete_trace_variable_command): Update.
1657
04afa70c
TT
16582017-09-20 Tom Tromey <tom@tromey.com>
1659
1660 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1661 (bpstat_clear): Use delete.
1662 (bpstats): New constructors.
1663 (bpstat_copy, bpstat_stop_status): Use new.
1664 (dprintf_after_condition_true): Update.
1665 * breakpoint.h (bpstats::bpstats): Add constructors.
1666 (bpstats::~bpstats): Add destructor.
1667
c83833f4
PA
16682017-09-20 Pedro Alves <palves@redhat.com>
1669
1670 * eval.c (make_params): Delete, refactored as ...
1671 (class fake_method): ... this new type's ctor.
1672 (fake_method::~fake_method): New.
1673 (evaluate_subexp_standard): Use 'fake_method'.
1674
223ffa71
TT
16752017-09-20 Tom Tromey <tom@tromey.com>
1676
1677 * windows-nat.c (get_windows_debug_event, windows_wait)
1678 (do_initial_windows_stuff, windows_attach): Update.
1679 * utils.c (vwarning, internal_vproblem): Update.
1680 (ui_unregister_input_event_handler_cleanup)
1681 (prepare_to_handle_input): Remove.
1682 (class scoped_input_handler): New.
1683 (defaulted_query, prompt_for_continue): Update.
1684 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1685 Update.
1686 * top.c (undo_terminal_modifications_before_exit): Update.
1687 * target/target.h (target_terminal_init, target_terminal_inferior)
1688 (target_terminal_ours): Don't declare.
1689 (class target_terminal): New.
1690 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1691 (target_terminal_ours_for_output)
1692 (make_cleanup_restore_target_terminal): Don't declare.
1693 (target_terminal_info): Remove.
1694 * target.c (enum terminal_state, terminal_state): Remove.
1695 (target_terminal::terminal_state): Define.
1696 (target_terminal::init): Rename from target_terminal_init.
1697 (target_terminal::inferior): Rename from
1698 target_terminal_inferior.
1699 (target_terminal::ours): Rename from target_terminal_ours.
1700 (target_terminal::ours_for_output): Rename from
1701 target_terminal_ours_for_output.
1702 (target_terminal::info): New method.
1703 (cleanup_restore_target_terminal)
1704 (make_cleanup_restore_target_terminal): Remove.
1705 * solib.c (handle_solib_event): Update.
1706 * remote.c (remote_serial_quit_handler): Update.
1707 (remote_terminal_inferior, remote_wait_as): Update.
1708 * record-full.c (record_full_wait_1): Update.
1709 * nto-procfs.c (procfs_create_inferior): Update.
1710 * nat/fork-inferior.c (startup_inferior): Update.
1711 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1712 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1713 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1714 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1715 (mi_breakpoint_created, mi_breakpoint_deleted)
1716 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1717 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1718 (mi_user_selected_context_changed, report_initial_inferior):
1719 Update.
1720 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1721 (linux_nat_terminal_inferior): Update.
1722 * infrun.c (follow_fork_inferior)
1723 (handle_vfork_child_exec_or_exit, do_target_resume)
1724 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1725 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1726 Update.
1727 * inflow.c (child_terminal_init, info_terminal_command): Update.
1728 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1729 (attach_command): Update.
1730 * infcall.c (call_thread_fsm_should_stop): Update.
1731 * gnu-nat.c (gnu_attach): Update.
1732 * extension.c (struct active_ext_lang_state)
1733 (restore_active_ext_lang): Update.
1734 * exceptions.c (print_flush): Update.
1735 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1736 (struct quit_handler_cleanup_data, restore_quit_handler)
1737 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1738 Remove.
1739 * cp-support.c (gdb_demangle): Update.
1740 * breakpoint.c (update_inserted_breakpoint_locations)
1741 (insert_breakpoint_locations, handle_jit_event)
1742 (disable_breakpoints_in_unloaded_shlib): Update.
1743 * annotate.c (annotate_breakpoints_invalid)
1744 (annotate_frames_invalid): Update.
1745
013af3fc
TT
17462017-09-20 Tom Tromey <tom@tromey.com>
1747
1748 * main.c (catch_command_errors): Rename from
1749 catch_command_errors_const.
1750 (captured_main_1): Update.
1751
06871ae8
PA
17522017-09-20 Pedro Alves <palves@redhat.com>
1753
1754 * cli/cli-cmds.c (list_command): Use print_sal_location.
1755 (print_sal_location): New function.
1756 (ambiguous_line_spec): Use print_sal_location.
1757 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1758 * symtab.c (find_function_start_sal): Likewise.
1759 * symtab.h (symtab_and_line::symbol): New field.
1760
e5f25bc5
PA
17612017-09-20 Pedro Alves <palves@redhat.com>
1762
1763 * linespec.c (minsym_found): Handle non-text minsyms.
1764 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1765
1b7fa39e
WT
17662017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1767
1768 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1769 backslash.
1770
37dd0825
WT
17712017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1772
1773 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1774 vmovups instead vmovaps.
1775 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1776
4e5a4f58
JB
17772017-09-19 John Baldwin <jhb@FreeBSD.org>
1778
1779 * NEWS (Changes since GDB 8.0): Add starti.
1780 * infcmd.c (enum run_break): New.
1781 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1782 case.
1783 (run_command): Use enum run_how.
1784 (start_command): Likewise.
1785 (starti_command): New function.
1786 (RUN_ARGS_HELP): New macro.
1787 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1788 commands. Add starti command.
1789
aa70c9f1
YQ
17902017-09-19 Yao Qi <yao.qi@linaro.org>
1791
1792 * Makefile.in (monitor.o): Remove the rule.
1793
d6541620
YQ
17942017-09-19 Yao Qi <yao.qi@linaro.org>
1795
1796 * annotate.h (struct annotate_arg_emitter): Use
1797 DISABLE_COPY_AND_ASSIGN.
1798 * common/refcounted-object.h (refcounted_object): Likewise.
1799 * completer.h (struct completion_result): Likewise.
1800 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1801 * filename-seen-cache.h (filename_seen_cache): Likewise.
1802 * gdbcore.h (thread_section_name): Likewise.
1803 * gdb_regex.h (compiled_regex): Likewise.
1804 * gdbthread.h (scoped_restore_current_thread): Likewise.
1805 * inferior.h (scoped_restore_current_inferior): Likewise.
1806 * jit.c (jit_reader): Likewise.
1807 * linespec.h (struct linespec_result): Likewise.
1808 * mi/mi-parse.h (struct mi_parse): Likewise.
1809 * nat/fork-inferior.c (execv_argv): Likewise.
1810 * progspace.h (scoped_restore_current_program_space): Likewise.
1811 * python/python-internal.h (class gdbpy_enter): Likewise.
1812 * regcache.h (regcache): Likewise.
1813 * target-descriptions.c (struct tdesc_reg): Likewise.
1814 (struct tdesc_type): Likewise.
1815 (struct tdesc_feature): Likewise.
1816 * ui-out.h (ui_out_emit_type): Likewise.
1817
0615127c
SM
18182017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1819
1820 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1821 label abort_expression.
1822
5e187554
SM
18232017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * common/buffer.c (buffer_xml_printf): Adjust.
1826 * common/xml-utils.c (xml_escape_text): Change return type to
1827 std::string, update code accordingly.
1828 * common/xml-utils.h (xml_escape_text): Change return type to
1829 std::string.
1830 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1831 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1832 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1833 Adjust.
1834
c3d7b541
SM
18352017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1836
1837 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1838 (SUBDIR_UNITTESTS_OBS): Add new object file.
1839 * unittests/xml-utils-selftests.c: New file.
1840
1526853e
SM
18412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1842
1843 * common/selftest.h (selftest): New struct/interface.
1844 (register_test): Add name parameter, add new overload.
1845 (run_tests): Add filter parameter.
1846 (for_each_selftest_ftype): New typedef.
1847 (for_each_selftest): New declaration.
1848 * common/selftest.c (tests): Change type to
1849 map<string, unique_ptr<selftest>>.
1850 (simple_selftest): New struct.
1851 (register_test): New function.
1852 (register_test): Add name parameter and use it.
1853 (run_tests): Add filter parameter and use it. Add prints.
1854 Adjust to vector -> map change.
1855 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1856 registering selftests.
1857 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1858 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1859 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1860 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1861 * findvar.c (_initialize_findvar): Likewise.
1862 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1863 * maint.c (maintenance_selftest): Update call to run_tests.
1864 (maintenance_info_selftests): New function.
1865 (_initialize_maint_cmds): Register "maintenance info selftests"
1866 command. Update "maintenance selftest" doc.
1867 * regcache.c (_initialize_regcache): Add names when registering
1868 selftests.
1869 * rust-exp.y (_initialize_rust_exp): Likewise.
1870 * selftest-arch.c (gdbarch_selftest): New struct.
1871 (gdbarch_tests): Remove.
1872 (register_test_foreach_arch): Add name parameter. Call
1873 register_test.
1874 (tests_with_arch): Remove, move most content to
1875 gdbarch_selftest::operator().
1876 (_initialize_selftests_foreach_arch): Remove.
1877 * selftest-arch.h (register_test_foreach_arch): Add name
1878 parameter.
1879 (run_tests_with_arch): New declaration.
1880 * utils-selftests.c (_initialize_utils_selftests): Add names
1881 when registering selftests.
1882 * utils.c (_initialize_utils): Likewise.
1883 * unittests/array-view-selftests.c
1884 (_initialize_array_view_selftests): Likewise.
1885 * unittests/environ-selftests.c (_initialize_environ_selftests):
1886 Likewise.
1887 * unittests/function-view-selftests.c
1888 (_initialize_function_view_selftests): Likewise.
1889 * unittests/offset-type-selftests.c
1890 (_initialize_offset_type_selftests): Likewise.
1891 * unittests/optional-selftests.c
1892 (_initialize_optional_selftests): Likewise.
1893 * unittests/scoped_restore-selftests.c
1894 (_initialize_scoped_restore_selftests): Likewise.
1895 * NEWS: Document "maintenance selftest" and "maint info
1896 selftests".
1897
5846367a
SM
18982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1899
1900 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1901 scoped_restore.
1902
bd77e8ff
SM
19032017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1904
1905 * mi/mi-main.c (mi_load_progress): Make uiout variable
1906 a unique_ptr.
1907
26a67918
PA
19082017-09-15 Pedro Alves <palves@redhat.com>
1909
1910 * compile/compile-c-types.c (convert_enum, convert_int)
1911 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1912
3f8a7804
SM
19132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1914
1915 * dwarf2read.c (copy_string): Remove.
1916 (parse_macro_definition): Replace copy_string with savestring.
1917
8d200706
YQ
19182017-09-15 Yao Qi <yao.qi@linaro.org>
1919
1920 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1921 gdb_target_obs.
1922 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1923 Likewise.
1924 (i[34567]86-*-linux*): Likewise.
1925
d185219d
SM
19262017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1927
1928 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1929 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1930 <stack>: Change type to std::vector.
1931 <stack_len, stack_allocated>: Remove.
1932 <grow_stack>: Remove.
1933 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1934 (dwarf_expr_context::~dwarf_expr_context): Remove.
1935 (dwarf_expr_context::grow_stack): Remove.
1936 (dwarf_expr_context::push): Adjust.
1937 (dwarf_expr_context::pop): Adjust.
1938 (dwarf_expr_context::fetch): Adjust.
1939 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1940 (dwarf_expr_context::stack_empty_p): Adjust.
1941 (dwarf_expr_context::execute_stack_op): Adjust.
1942
eccd80d6
SM
19432017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1946 return type to bool.
1947 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1948
69009882
SM
19492017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1952 Change type to bool.
1953 (dwarf_stack_value) <in_stack_memory>: Likewise.
1954 (dwarf_expr_context) <push_address>: Change parameter type to
1955 bool.
1956 <fetch_in_stack_memory>: Change return type to bool.
1957 <push>: Change parameter type to bool.
1958 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1959 to bool.
1960 (dwarf_expr_context::push_address): Likewise.
1961 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1962 to bool.
1963 (dwarf_expr_context::execute_stack_op): Adjust.
1964 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1965
1e467161
SM
19662017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1967
1968 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1969 (struct dwarf_expr_context) <n_pieces>: Remove.
1970 <pieces>: Change type to std::vector.
1971 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1972 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1973 pieces.
1974 (dwarf_expr_context::add_piece): Adjust.
1975 * dwarf2loc.c (struct piece_closure): Initialize fields.
1976 <n_pieces>: Remove.
1977 <pieces>: Change type to std::vector.
1978 (allocate_piece_closure): Adjust, change parameter to
1979 std::vector rvalue and std::move it to piece_closure.
1980 (rw_pieced_value): Adjust.
1981 (check_pieced_synthetic_pointer): Adjust.
1982 (indirect_synthetic_pointer): Adjust.
1983 (coerce_pieced_ref): Adjust.
1984 (free_pieced_value_closure): Adjust. Use delete to free
1985 piece_closure.
1986 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1987 to allocate_piece_closure.
1988 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1989
0782db84
SM
19902017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1991
1992 * probe.h (probe_ops_cp): Remove typedef.
1993 (DEF_VEC_P (probe_ops_cp)): Remove.
1994 (all_probe_ops): Change type to std::vector.
1995 * probe.c (info_probes_for_ops): Adjust to vector change.
1996 (probe_linespec_to_ops): Likewise.
1997 (all_probe_ops): Change type to std::vector.
1998 (_initialize_probe): Adjust to vector change.
1999 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2000 * elfread.c (elf_get_probes): Likewise.
2001 * stap-probe.c (_initialize_stap_probe): Likewise.
2002
1eac6bea
SM
20032017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2004
2005 * probe.h (struct bound_probe): Define constructors.
2006 * probe.c (bound_probe_s): Remove typedef.
2007 (DEF_VEC_O (bound_probe_s)): Remove VEC.
2008 (collect_probes): Change return type to std::vector, remove
2009 cleanup.
2010 (compare_probes): Return bool, change parameter type. Change
2011 semantic to "less than".
2012 (gen_ui_out_table_header_info): Change parameter to std::vector
2013 and update.
2014 (exists_probe_with_pops): Likewise.
2015 (info_probes_for_ops): Update to std::vector change.
2016 (enable_probes_command): Likewise.
2017 (disable_probes_command): Likewise.
2018
aaa63a31
SM
20192017-09-12 Simon Marchi <simon.marchi@ericsson.com>
2020
2021 * probe.h (struct probe_ops) <get_probes>: Change parameter from
2022 vec to std::vector.
2023 * probe.c (parse_probes_in_pspace): Update.
2024 (find_probes_in_objfile): Update.
2025 (find_probe_by_pc): Update.
2026 (collect_probes): Update.
2027 (probe_any_get_probes): Update.
2028 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2029 return type to reference to std::vector.
2030 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2031 std::vector and update.
2032 (dtrace_process_dof): Likewise.
2033 (dtrace_get_probes): Likewise.
2034 * elfread.c (elf_get_probes): Change return type to std::vector,
2035 store an std::vector in bfd_data.
2036 (probe_key_free): Update to std::vector.
2037 * stap-probe.c (handle_stap_probe): Change parameter to
2038 std::vector and update.
2039 (stap_get_probes): Likewise.
2040 * symfile-debug.c (debug_sym_get_probes): Change return type to
2041 std::vector and update.
2042
cb85b21b
TT
20432017-09-11 Tom Tromey <tom@tromey.com>
2044
2045 * breakpoint.c (program_breakpoint_here_p): Update.
2046 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2047 from make_show_memory_breakpoints_cleanup. Return a
2048 scoped_restore_tmpl<int>.
2049 (restore_show_memory_breakpoints): Remove.
2050 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2051 * mem-break.c (memory_validate_breakpoint): Update.
2052 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2053 (ia64_memory_remove_breakpoint): Update.
2054 (ia64_breakpoint_from_pc): Update.
2055 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2056 from make_show_memory_breakpoints_cleanup.
2057
8fbc99ef
TT
20582017-09-11 Tom Tromey <tom@tromey.com>
2059
2060 * d-namespace.c (d_lookup_symbol): Use std::string.
2061 (find_symbol_in_baseclass): Likewise.
2062
50feb4bd
TT
20632017-09-11 Tom Tromey <tom@tromey.com>
2064
2065 * ctf.c (ctf_start): Use std::string.
2066
c6dc63a1
TT
20672017-09-11 Tom Tromey <tom@tromey.com>
2068
2069 * ada-lang.c (is_known_support_routine): Update.
2070 (ada_unhandled_exception_name_addr_from_raise): Update.
2071 * guile/scm-frame.c (gdbscm_frame_name): Update.
2072 * python/py-frame.c (frapy_name): Update.
2073 (frapy_function): Update.
2074 * stack.h (find_frame_funname): Update.
2075 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2076 (print_frame): Update.
2077
d6b9b80f
TT
20782017-09-11 Tom Tromey <tom@tromey.com>
2079
2080 * findcmd.c (put_bits): Take a gdb::byte_vector.
2081 (parse_find_args): Return gdb::byte_vector. "args" now const.
2082 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
2083 cleanups.
2084 (find_command): Update.
2085
a9921622
TT
20862017-09-11 Tom Tromey <tom@tromey.com>
2087
2088 * cli/cli-script.c (class scoped_restore_hook_in): New.
2089 (clear_hook_in_cleanup): Remove.
2090 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2091 scoped_restore_hook_in.
2092
be0d7abb
TT
20932017-09-11 Tom Tromey <tom@tromey.com>
2094
2095 * cli/cli-script.c (restore_interp): Remove.
2096 (read_command_lines): Use scoped_restore_interp.
2097 * interps.c (scoped_restore_interp::set_temp): Rename from
2098 interp_set_temp.
2099 * interps.h (class scoped_restore_interp): New.
2100 (interp_set_temp): Remove.
2101
00f675ff
TT
21022017-09-11 Tom Tromey <tom@tromey.com>
2103
2104 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2105 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2106 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2107 scoped_restore.
2108 (mi_cmd_break_insert_1): Update.
2109 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2110 scoped_restore.
2111
cb791d59
TT
21122017-09-11 Tom Tromey <tom@tromey.com>
2113
2114 * demangle.c (demangle_command): Update.
2115 * breakpoint.c (disable_command): Update.
2116 (enable_command): Update.
2117 (find_location_by_number): Make "number" const. Use
2118 get_number_trailer.
2119 * cli/cli-utils.c (extract_arg): Return std::string.
2120 * probe.c (parse_probe_linespec): Update. Change types.
2121 (collect_probes): Take string arguments.
2122 (parse_probe_linespec): Likewise.
2123 (info_probes_for_ops): Update.
2124 (enable_probes_command): Update.
2125 (disable_probes_command): Update.
2126 * break-catch-sig.c (catch_signal_split_args): Update.
2127 * mi/mi-parse.c (mi_parse): Update.
2128
2039bd9f
TT
21292017-09-11 Tom Tromey <tom@tromey.com>
2130
2131 * language.h (language_enum): Make argument const.
2132 * language.c (language_enum): Make argument const.
2133
f1735a53
TT
21342017-09-11 Tom Tromey <tom@tromey.com>
2135
2136 * common/common-utils.h (skip_to_space): Remove macro, redeclare
2137 as function.
2138 (skip_to_space): Rename from skip_to_space_const.
2139 * common/common-utils.c (skip_to_space): New function.
2140 (skip_to_space): Rename from skip_to_space_const.
2141 * cli/cli-utils.h (get_number): Rename from get_number_const.
2142 (extract_arg): Rename from extract_arg_const.
2143 * cli/cli-utils.c (get_number): Rename from get_number_const.
2144 (extract_arg): Rename from extract_arg_const.
2145 (number_or_range_parser::get_number): Use ::get_number.
2146 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2147 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2148 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2149 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2150 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2151 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2152 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2153 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2154
7d221d74
TT
21552017-09-11 Tom Tromey <tom@tromey.com>
2156
2157 * python/python.c (do_start_initialization): Use
2158 py-event-types.def to initialize types.
2159 Define all object type structures.
2160 * python/python-internal.h: Don't declare event initialization
2161 functions.
2162 * python/py-threadevent.c (thread_event_object_type): Don't
2163 define.
2164 * python/py-stopevent.c (stop_event_object_type): Don't define.
2165 * python/py-signalevent.c (signal_event_object_type): Don't
2166 declare or define.
2167 * python/py-newobjfileevent.c (new_objfile_event_object_type)
2168 (clear_objfiles_event_object_type): Don't declare or define.
2169 * python/py-infevents.c (inferior_call_pre_event_object_type)
2170 (inferior_call_post_event_object_type)
2171 (register_changed_event_object_type)
2172 (memory_changed_event_object_type): Don't declare or define.
2173 * python/py-inferior.c (new_thread_event_object_type)
2174 (new_inferior_event_object_type)
2175 (inferior_deleted_event_object_type): Don't declare or define.
2176 * python/py-exitedevent.c (exited_event_object_type): Don't
2177 declare or define.
2178 * python/py-evts.c (gdbpy_initialize_py_events): Use
2179 py-all-events.def.
2180 * python/py-events.h (thread_event_object_type): Don't declare.
2181 (events_object): Use py-all-events.def.
2182 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
2183 py-event-types.def.
2184 * python/py-event-types.def: New file.
2185 * python/py-continueevent.c (create_continue_event_object): Don't
2186 declare or define.
2187 * python/py-bpevent.c (breakpoint_event_object_type): Don't
2188 declare or define.
2189 * python/py-all-events.def: New file.
2190
35c61a1d
TT
21912017-09-11 Tom Tromey <tom@tromey.com>
2192
2193 * python/py-threadevent.c (create_thread_event_object): Return
2194 gdbpy_ref.
2195 * python/py-stopevent.h (create_stop_event_object)
2196 (create_breakpoint_event_object, create_signal_event_object):
2197 Update.
2198 * python/py-stopevent.c (create_stop_event_object): Return
2199 gdbpy_ref.
2200 (emit_stop_event): Update.
2201 * python/py-signalevent.c (create_signal_event_object): Return
2202 gdbpy_ref.
2203 * python/py-infevents.c (create_inferior_call_event_object):
2204 Update.
2205 * python/py-event.h (create_event_object)
2206 (create_thread_event_object): Update.
2207 * python/py-event.c (create_event_object): Return gdbpy_ref.
2208 * python/py-continueevent.c: Return gdbpy_ref.
2209 * python/py-bpevent.c (create_breakpoint_event_object): Return
2210 gdbpy_ref.
2211
7c96f8c1
TT
22122017-09-11 Tom Tromey <tom@tromey.com>
2213
2214 PR python/15622:
2215 * NEWS: Add entry.
2216 * python/python.c (do_start_initialization): Initialize new event
2217 types.
2218 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2219 (gdbpy_initialize_inferior_deleted_event)
2220 (gdbpy_initialize_new_thread_event): Declare.
2221 * python/py-threadevent.c (create_thread_event_object): Add option
2222 "thread" parameter.
2223 * python/py-inferior.c (new_thread_event_object_type)
2224 (new_inferior_event_object_type)
2225 (inferior_deleted_event_object_type): Declare.
2226 (python_new_inferior, python_inferior_deleted): New functions.
2227 (add_thread_object): Emit new_thread event.
2228 (gdbpy_initialize_inferior): Attach new functions to corresponding
2229 observers.
2230 (new_thread, new_inferior, inferior_deleted): Define new event
2231 types.
2232 * python/py-evts.c (gdbpy_initialize_py_events): Add new
2233 registries.
2234 * python/py-events.h (events_object) <new_inferior,
2235 inferior_deleted, new_thread>: New fields.
2236 * python/py-event.h (create_thread_event_breakpoint): Add optional
2237 "thread" parameter.
2238
72542b8e
AB
22392017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2240
2241 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2242 check current_ui instead.
2243 (internal_vproblem): Likewise.
2244
0d64823e
SM
22452017-09-09 Simon Marchi <simon.marchi@ericsson.com>
2246
2247 * thread.c (print_thread_info_1): Remove unnecessary calls to
2248 uiout->is_mi_like_p.
2249
eb1e02fd
TT
22502017-09-09 Tom Tromey <tom@tromey.com>
2251
2252 * namespace.h (add_using_directive): Update.
2253 * namespace.c (add_using_directive): Change type of excludes to
2254 std::vector.
2255 * dwarf2read.c (read_import_statement): Use std::vector.
2256 (read_namespace): Update.
2257 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2258
0fc21fd8
TT
22592017-09-09 Tom Tromey <tom@tromey.com>
2260
2261 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2262
49663d05
TT
22632017-09-09 Tom Tromey <tom@tromey.com>
2264
2265 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2266
0b868b60
TT
22672017-09-09 Tom Tromey <tom@tromey.com>
2268
2269 * stack.c (func_command): Use gdb::def_vector.
2270
c0470d48
TT
22712017-09-09 Tom Tromey <tom@tromey.com>
2272
2273 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2274 ui_out_emit_list, ui_out_emit_tuple.
2275 (mi_cmd_var_update): Likewise.
2276
ca5909c7
TT
22772017-09-09 Tom Tromey <tom@tromey.com>
2278
2279 * mi/mi-interp.c (mi_user_selected_context_changed): Use
2280 ui_out_redirect_pop.
2281 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2282 ui_out_redirect_pop.
2283 * utils.c (do_ui_out_redirect_pop)
2284 (make_cleanup_ui_out_redirect_pop): Remove.
2285 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2286 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2287 * ui-out.h (ui_out_redirect_pop): New class.
2288
e6a2252a
TT
22892017-09-09 Tom Tromey <tom@tromey.com>
2290
2291 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2292 (list_available_thread_groups, mi_cmd_list_thread_groups)
2293 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2294 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2295 Likewise.
2296
393702cd
TT
22972017-09-09 Tom Tromey <tom@tromey.com>
2298
2299 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2300 ui_out_emit_tuple.
2301
76f9c9cf
TT
23022017-09-09 Tom Tromey <tom@tromey.com>
2303
2304 * target.c (flash_erase_command): Use ui_out_emit_tuple.
2305 * stack.c (print_frame): Use ui_out_emit_tuple.
2306 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2307 (info_spu_mailbox_command, info_spu_dma_command)
2308 (info_spu_proxydma_command): Likewise.
2309 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2310 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2311 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2312 ui_out_emit_tuple.
2313 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2314
dc9fe180
TT
23152017-09-09 Tom Tromey <tom@tromey.com>
2316
2317 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2318 (class ui_out_emit_table): Update comment.
2319 * ui-out.c (do_cleanup_table_end)
2320 (make_cleanup_ui_out_table_begin_end): Remove.
2321 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2322 (info_spu_dma_cmdlist): Likewise.
2323 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2324 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2325 ui_out_emit_table.
2326
f8cc3da6
TT
23272017-09-09 Tom Tromey <tom@tromey.com>
2328
2329 * thread.c (print_thread_info_1): Use ui_out_emit_table,
2330 ui_out_emit_list, gdb::optional.
2331
481695ed
JB
23322017-09-09 John Baldwin <jhb@FreeBSD.org>
2333
2334 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2335 prototype.
2336 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2337 prototype.
2338 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2339 prototype.
2340 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2341 * ada-exp.y: Remove _initialize_ada_exp prototype.
2342 * ada-lang.c: Remove _initialize_ada_language prototype.
2343 * ada-tasks.c: Remove _initialize_tasks prototype.
2344 * addrmap.c: Remove _initialize_addrmap prototype.
2345 * agent.c: Remove _initialize_agent prototype.
2346 * aix-thread.c: Remove _initialize_aix_thread prototype.
2347 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2348 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2349 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2350 prototype.
2351 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2352 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2353 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2354 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2355 prototype.
2356 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2357 prototype.
2358 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2359 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2360 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2361 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2362 prototype.
2363 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2364 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2365 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2366 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2367 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2368 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2369 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2370 prototype.
2371 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2372 prototype.
2373 * annotate.c: Remove _initialize_annotate prototype.
2374 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2375 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2376 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2377 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2378 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2379 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2380 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2381 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2382 prototype.
2383 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2384 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2385 * auto-load.c: Remove _initialize_auto_load prototype.
2386 * auxv.c: Remove _initialize_auxv prototype.
2387 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2388 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2389 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2390 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2391 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2392 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2393 prototype.
2394 * break-catch-throw.c: Remove _initialize_break_catch_throw
2395 prototype.
2396 * breakpoint.c: Remove _initialize_breakpoint prototype.
2397 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2398 * btrace.c: Remove _initialize_btrace prototype.
2399 * charset.c: Remove _initialize_charset prototype.
2400 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2401 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2402 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2403 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2404 * cli/cli-script.c: Remove _initialize_cli_script prototype.
2405 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2406 * coffread.c: Remove _initialize_coffread prototype.
2407 * compile/compile.c: Remove _initialize_compile prototype.
2408 * complaints.c: Remove _initialize_complaints prototype.
2409 * completer.c: Remove _initialize_completer prototype.
2410 * copying.awk: Remove _initialize_copying prototype.
2411 * copying.c: Regenerate.
2412 * core-regset.c: Remove _initialize_core_regset prototype.
2413 * corefile.c: Remove _initialize_core prototype.
2414 * corelow.c: Remove _initialize_corelow prototype.
2415 * cp-abi.c: Remove _initialize_cp_abi prototype.
2416 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2417 * cp-support.c: Remove _initialize_cp_support prototype.
2418 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2419 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2420 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2421 * ctf.c: Remove _initialize_ctf prototype.
2422 * d-lang.c: Remove _initialize_d_language prototype.
2423 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2424 prototype.
2425 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2426 * dbxread.c: Remove _initialize_dbxread prototype.
2427 * dcache.c: Remove _initialize_dcache prototype.
2428 * demangle.c: Remove _initialize_demangler prototype.
2429 * disasm-selftests.c: Remove _initialize_disasm_selftests
2430 prototype.
2431 * disasm.c: Remove _initialize_disasm prototype.
2432 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2433 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2434 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2435 prototype.
2436 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2437 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2438 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2439 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2440 * elfread.c: Remove _initialize_elfread prototype.
2441 * exec.c: Remove _initialize_exec prototype.
2442 * extension.c: Remove _initialize_extension prototype.
2443 * f-lang.c: Remove _initialize_f_language prototype.
2444 * f-valprint.c: Remove _initialize_f_valprint prototype.
2445 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2446 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2447 * filesystem.c: Remove _initialize_filesystem prototype.
2448 * findcmd.c: Remove _initialize_mem_search prototype.
2449 * fork-child.c: Remove _initialize_fork_child prototype.
2450 * frame-base.c: Remove _initialize_frame_base prototype.
2451 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2452 * frame.c: Remove _initialize_frame prototype.
2453 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2454 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2455 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2456 * gcore.c: Remove _initialize_gcore prototype.
2457 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2458 * gdbarch.c: Regenerate.
2459 * gdbarch.sh: Remove _initialize_gdbarch prototype.
2460 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2461 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2462 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2463 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2464 * go-lang.c: Remove _initialize_go_language prototype.
2465 * go32-nat.c: Remove _initialize_go32_nat prototype.
2466 * guile/guile.c: Remove _initialize_guile prototype.
2467 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2468 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2469 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2470 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2471 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2472 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2473 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2474 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2475 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2476 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2477 prototype.
2478 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2479 prototype.
2480 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2481 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2482 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2483 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2484 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2485 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2486 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2487 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2488 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2489 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2490 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2491 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2492 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2493 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2494 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2495 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2496 prototype.
2497 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2498 prototype.
2499 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2500 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2501 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2502 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2503 * infcall.c: Remove _initialize_infcall prototype.
2504 * infcmd.c: Remove _initialize_infcmd prototype.
2505 * inferior.c: Remove _initialize_inferiors prototype.
2506 * inflow.c: Remove _initialize_inflow prototype.
2507 * infrun.c: Remove _initialize_infrun prototype.
2508 * interps.c: Remove _initialize_interpreter prototype.
2509 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2510 * jit.c: Remove _initialize_jit prototype.
2511 * language.c: Remove _initialize_language prototype.
2512 * linux-fork.c: Remove _initialize_linux_fork prototype.
2513 * linux-nat.c: Remove _initialize_linux_nat prototype.
2514 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2515 * linux-thread-db.c: Remove _initialize_thread_db prototype.
2516 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2517 * m2-lang.c: Remove _initialize_m2_language prototype.
2518 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2519 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2520 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2521 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2522 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2523 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2524 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2525 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2526 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2527 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2528 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2529 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2530 * machoread.c: Remove _initialize_machoread prototype.
2531 * macrocmd.c: Remove _initialize_macrocmd prototype.
2532 * macroscope.c: Remove _initialize_macroscope prototype.
2533 * maint.c: Remove _initialize_maint_cmds prototype.
2534 * mdebugread.c: Remove _initialize_mdebugread prototype.
2535 * memattr.c: Remove _initialize_mem prototype.
2536 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2537 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2538 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2539 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2540 * mi/mi-main.c: Remove _initialize_mi_main prototype.
2541 * microblaze-linux-tdep.c: Remove
2542 _initialize_microblaze_linux_tdep prototype.
2543 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2544 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2545 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2546 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2547 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2548 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2549 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2550 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2551 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2552 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2553 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2554 prototype.
2555 * mipsread.c: Remove _initialize_mipsread prototype.
2556 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2557 prototype.
2558 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2559 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2560 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2561 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2562 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2563 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2564 prototype.
2565 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2566 * nto-procfs.c: Remove _initialize_procfs prototype.
2567 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2568 * objc-lang.c: Remove _initialize_objc_language prototype.
2569 * objfiles.c: Remove _initialize_objfiles prototype.
2570 * observer.c: Remove observer_test_first_notification_function,
2571 observer_test_second_notification_function,
2572 observer_test_third_notification_function, and
2573 _initialize_observer prototypes.
2574 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2575 * osabi.c: Remove _initialize_gdb_osabi prototype.
2576 * osdata.c: Remove _initialize_osdata prototype.
2577 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2578 * parse.c: Remove _initialize_parse prototype.
2579 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2580 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2581 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2582 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2583 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2584 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2585 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2586 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2587 * printcmd.c: Remove _initialize_printcmd prototype.
2588 * probe.c: Remove _initialize_probe prototype.
2589 * proc-api.c: Remove _initialize_proc_api prototype.
2590 * proc-events.c: Remove _initialize_proc_events prototype.
2591 * proc-service.c: Remove _initialize_proc_service prototype.
2592 * procfs.c: Remove _initialize_procfs prototype.
2593 * psymtab.c: Remove _initialize_psymtab prototype.
2594 * python/python.c: Remove _initialize_python prototype.
2595 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2596 * record-btrace.c: Remove _initialize_record_btrace prototype.
2597 * record-full.c: Remove _initialize_record_full prototype.
2598 * record.c: Remove _initialize_record prototype.
2599 * regcache.c: Remove _initialize_regcache prototype.
2600 * reggroups.c: Remove _initialize_reggroup prototype.
2601 * remote-notif.c: Remove _initialize_notif prototype.
2602 * remote-sim.c: Remove _initialize_remote_sim prototype.
2603 * remote.c: Remove _initialize_remote prototype.
2604 * reverse.c: Remove _initialize_reverse prototype.
2605 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2606 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2607 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2608 prototype.
2609 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2610 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2611 * rust-exp.y: Remove _initialize_rust_exp prototype.
2612 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2613 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2614 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2615 * score-tdep.c: Remove _initialize_score_tdep prototype.
2616 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2617 prototype.
2618 * ser-go32.c: Remove _initialize_ser_dos prototype.
2619 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2620 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2621 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2622 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2623 * serial.c: Remove _initialize_serial prototype.
2624 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2625 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2626 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2627 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2628 * skip.c: Remove _initialize_step_skip prototype.
2629 * sol-thread.c: Remove _initialize_sol_thread prototype.
2630 * solib-aix.c: Remove _initialize_solib_aix prototype.
2631 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2632 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2633 * solib-frv.c: Remove _initialize_frv_solib prototype.
2634 * solib-spu.c: Remove _initialize_spu_solib prototype.
2635 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2636 * solib-target.c: Remove _initialize_solib_target prototype.
2637 * solib.c: Remove _initialize_solib prototype.
2638 * source.c: Remove _initialize_source prototype.
2639 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2640 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2641 prototype.
2642 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2643 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2644 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2645 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2646 prototype.
2647 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2648 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2649 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2650 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2651 prototype.
2652 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2653 prototype.
2654 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2655 prototype.
2656 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2657 prototype.
2658 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2659 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2660 prototype.
2661 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2662 prototype.
2663 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2664 prototype.
2665 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2666 prototype.
2667 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2668 prototype.
2669 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2670 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2671 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2672 * stabsread.c: Remove _initialize_stabsread prototype.
2673 * stack.c: Remove _initialize_stack prototype.
2674 * stap-probe.c: Remove _initialize_stap_probe prototype.
2675 * std-regs.c: Remove _initialize_frame_reg prototype.
2676 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2677 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2678 * symfile.c: Remove _initialize_symfile prototype.
2679 * symmisc.c: Remove _initialize_symmisc prototype.
2680 * symtab.c: Remove _initialize_symtab prototype.
2681 * target-dcache.c: Remove _initialize_target_dcache prototype.
2682 * target-descriptions.c: Remove _initialize_target_descriptions
2683 prototype.
2684 * thread.c: Remove _initialize_thread prototype.
2685 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2686 prototype.
2687 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2688 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2689 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2690 prototype.
2691 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2692 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2693 * tracefile.c: Remove _initialize_tracefile prototype.
2694 * tracepoint.c: Remove _initialize_tracepoint prototype.
2695 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2696 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2697 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2698 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2699 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2700 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2701 * tui/tui.c: Remove _initialize_tui prototype.
2702 * typeprint.c: Remove _initialize_typeprint prototype.
2703 * user-regs.c: Remove _initialize_user_regs prototype.
2704 * utils.c: Remove _initialize_utils prototype.
2705 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2706 * valarith.c: Remove _initialize_valarith prototype.
2707 * valops.c: Remove _initialize_valops prototype.
2708 * valprint.c: Remove _initialize_valprint prototype.
2709 * value.c: Remove _initialize_values prototype.
2710 * varobj.c: Remove _initialize_varobj prototype.
2711 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2712 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2713 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2714 * windows-nat.c: Remove _initialize_windows_nat,
2715 _initialize_check_for_gdb_ini, and _initialize_loadable
2716 prototypes.
2717 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2718 * xcoffread.c: Remove _initialize_xcoffread prototype.
2719 * xml-support.c: Remove _initialize_xml_support prototype.
2720 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2721 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2722 prototype.
2723 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2724 prototype.
2725 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2726
a611b5cb
KS
27272017-09-08 Keith Seitz <keiths@redhat.com>
2728
2729 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2730 field.
2731
469412dd
CW
27322017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2733
2734 * f-valprint.c (f_val_print): Remove check for one byte
2735 sized integers. Remove printing of character type.
2736
a5ad232b
FP
27372017-09-08 Frank Penczek <frank.penczek@intel.com>
2738 Christoph Weinmann <christoph.t.weinmann@intel.com>
2739 Bernhard Heckel <bernhard.heckel@intel.com>
2740
2741 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2742 to maintain proper indentation when printing pointers/refs.
2743
e5014227
JB
27442017-09-07 Joel Brobecker <brobecker@adacore.com>
2745
2746 GDB 8.0.1 released.
2747
63c99141
JB
27482017-09-07 Joel Brobecker <brobecker@adacore.com>
2749
2750 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2751
69c1e056
TT
27522017-09-05 Tom Tromey <tom@tromey.com>
2753
2754 * parse.c (funcall_chain): Now a std::vector.
2755 (start_arglist, end_arglist): Simplify.
2756 (free_funcalls): Remove.
2757 (parse_exp_in_context_1): Remove cleanup.
2758
fef704bf
TT
27592017-09-05 Tom Tromey <tom@tromey.com>
2760
2761 * go-exp.y (go_parse): Don't create a cleanup.
2762
5613c585
TT
27632017-09-05 Tom Tromey <tom@tromey.com>
2764
2765 * d-exp.y (PrimaryExpression): Use std::string.
2766 (d_parse): Don't create a cleanup.
2767
eae49211
TT
27682017-09-05 Tom Tromey <tom@tromey.com>
2769
2770 * utils.c (do_clear_parser_state): Remove.
2771 (make_cleanup_clear_parser_state): Remove.
2772 * p-exp.y (pascal_parse): Use scoped_restore.
2773 * m2-exp.y (m2_parse): Use scoped_restore.
2774 * f-exp.y (f_parse): Use scoped_restore.
2775 * d-exp.y (d_parse): Use scoped_restore.
2776 * c-exp.y (c_parse): Use scoped_restore.
2777 * ada-exp.y (ada_parse): Use scoped_restore.
2778 * utils.h (make_cleanup_clear_parser_state): Remove.
2779
73b9be8b
KS
27802017-09-06 Keith Seitz <keiths@redhat.com>
2781
2782 * dwarf2read.c (dw2_linkage_name_attr): New function.
2783 (dw2_linkage_name): New function.
2784 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2785 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2786 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2787
a102602b
KR
27882017-09-06 Kamil Rytarowski <n54@gmx.com>
2789
2790 * config/djgpp/djconfig.sh: Correct shell portability issue.
2791
28ad437d
KR
27922017-09-06 Kamil Rytarowski <n54@gmx.com>
2793
2794 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2795
351787dd
JB
27962017-09-06 John Baldwin <jhb@FreeBSD.org>
2797
2798 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2799 * NEWS: Mention new FreeBSD/mips native configuration.
2800 * configure.host: Add aarch64*-*-freebsd*.
2801 * configure.nat: Likewise.
2802 * aarch64-fbsd-nat.c: New file.
2803
c0f84956
JB
28042017-09-06 John Baldwin <jhb@FreeBSD.org>
2805
2806 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2807 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2808 * NEWS: Mention new FreeBSD/aarch64 target.
2809 * configure.tgt: Add aarch64*-*-freebsd*.
2810 * aarch64-fbsd-tdep.c: New file.
2811 * aarch64-fbsd-tdep.h: New file.
2812
7610297a
KR
28132017-09-06 Kamil Rytarowski <n54@gmx.com>
2814
2815 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2816
fbd1b771
JK
28172017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2818
2819 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2820 of TLS symbols.
2821
5ca79eae
PW
28222017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2823
2824 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2825 call.
2826
bf93d7ba
SM
28272017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 * infrun.c (follow_exec): Call add_thread after
2830 target_find_description.
2831
1bb7c059
SM
28322017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2833
2834 * infrun.c (handle_inferior_event_1): When exec'ing, read
2835 stop_pc after follow_exec.
2836
fc809827
SM
28372017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2838
2839 * remote.c (process_g_packet): Update error message.
2840
d2fcdd85
YQ
28412017-09-05 Yao Qi <yao.qi@linaro.org>
2842
2843 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2844 targets.
2845
e69570ee
PA
28462017-09-05 Pedro Alves <palves@redhat.com>
2847
2848 * eval.c (eval_call, evaluate_funcall): New functions, factored
2849 out from ...
2850 (evaluate_subexp_standard): ... this.
2851
22916b07
YQ
28522017-09-05 Yao Qi <yao.qi@linaro.org>
2853
2854 * amd64-tdep.c (amd64_target_description): Create target
2855 descriptions.
2856 (_initialize_amd64_tdep): Don't call functions
2857 initialize_tdesc_amd64_*. Add self tests.
2858 * arch/amd64.c (amd64_create_target_description): Add parameter
2859 is_linux. Call set_tdesc_osabi if is_linux is true.
2860 * arch/amd64.h (amd64_create_target_description): Update the
2861 declaration.
2862 * arch/i386.c (i386_create_target_description): Add parameter
2863 is_linux. Call set_tdesc_osabi if is_linux is true.
2864 * arch/i386.h (i386_create_target_description): Update
2865 declaration.
2866 * configure.tgt: Add i386.o to gdb_target_obs.
2867 * features/Makefile (XMLTOC): Remove i386/*.xml.
2868 * features/i386/amd64-avx-avx512.c: Remove.
2869 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2870 * features/i386/amd64-avx-mpx.c: Remove.
2871 * features/i386/amd64-avx.c: Remove.
2872 * features/i386/amd64-mpx.c: Remove.
2873 * features/i386/amd64.c: Remove.
2874 * features/i386/i386-avx-avx512.c: Remove.
2875 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2876 * features/i386/i386-avx-mpx.c: Remove.
2877 * features/i386/i386-avx.c: Remove.
2878 * features/i386/i386-mmx.c: Remove.
2879 * features/i386/i386-mpx.c: Remove.
2880 * features/i386/i386.c: Remove.
2881 * i386-tdep.c: Don't include features/i386/i386*.c., include
2882 target-descriptions.h and arch/i386.h.
2883 (i386_target_description): Create target descriptions.
2884 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2885 functions. Do self tests.
2886
0854b7b1
YQ
28872017-09-05 Yao Qi <yao.qi@linaro.org>
2888
2889 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2890 * features/i386/amd64-avx-avx512-linux.c: Removed.
2891 * features/i386/amd64-avx-linux.c: Removed.
2892 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2893 * features/i386/amd64-avx-mpx-linux.c: Removed.
2894 * features/i386/amd64-linux.c: Removed.
2895 * features/i386/amd64-mpx-linux.c: Removed.
2896 * features/i386/x32-avx-avx512-linux.c: Removed.
2897 * features/i386/x32-avx-linux.c: Removed.
2898 * features/i386/x32-linux.c: Removed.
2899
b4570e4b
YQ
29002017-09-05 Yao Qi <yao.qi@linaro.org>
2901
2902 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2903 features/i386/*.c.
2904 (amd64_linux_read_description): Call
2905 amd64_create_target_description.
2906 * arch/amd64.c: New file.
2907 * arch/amd64.h: New file.
2908 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2909 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2910
6c73f67f
YQ
29112017-09-05 Yao Qi <yao.qi@linaro.org>
2912
2913 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2914 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2915 (amd64_linux_read_description): Create target descriptions.
2916 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2917 functions. Add unit tests.
2918 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2919 x32-core.xml.
2920 * features/i386/64bit-avx.c: Generated.
2921 * features/i386/64bit-avx512.c: Generated.
2922 * features/i386/64bit-core.c: Generated.
2923 * features/i386/64bit-linux.c: Generated.
2924 * features/i386/64bit-mpx.c: Generated.
2925 * features/i386/64bit-pkeys.c: Generated.
2926 * features/i386/64bit-segments.c: Generated.
2927 * features/i386/64bit-sse.c: Generated.
2928 * features/i386/x32-core.c: Generated.
2929 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2930 c files for amd64-linux and x32-linux.
2931
9d3d478b
YQ
29322017-09-05 Yao Qi <yao.qi@linaro.org>
2933
2934 * amd64-linux-tdep.c (amd64_linux_read_description): New
2935 function.
2936 (amd64_linux_core_read_description): Call
2937 amd64_linux_read_description.
2938 (amd64_linux_init_abi): Likewise.
2939 (amd64_x32_linux_init_abi): Likewise.
2940 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2941 * x86-linux-nat.c (x86_linux_read_description): Call
2942 amd64_linux_read_description.
2943
b9f1d50f
YQ
29442017-09-05 Yao Qi <yao.qi@linaro.org>
2945
2946 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2947 comments.
2948
188c9e6d
YQ
29492017-09-05 Yao Qi <yao.qi@linaro.org>
2950
2951 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2952 * features/i386/i386-avx-avx512-linux.c: Remove.
2953 * features/i386/i386-avx-linux.c: Remove.
2954 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2955 * features/i386/i386-avx-mpx-linux.c: Remove.
2956 * features/i386/i386-linux.c: Remove.
2957 * features/i386/i386-mmx-linux.c: Remove.
2958 * features/i386/i386-mpx-linux.c: Remove.
2959
5f035c07
YQ
29602017-09-05 Yao Qi <yao.qi@linaro.org>
2961
2962 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2963 (SFILES): Add arch/i386.c.
2964 (HFILES_NO_SRCDIR): Add arch/i386.h.
2965 * arch/i386.c: New file.
2966 * arch/i386.h: New file.
2967 * arch/tdesc.h (allocate_target_description): Declare.
2968 (set_tdesc_architecture): Declare.
2969 (set_tdesc_osabi): Declare.
2970 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2971 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2972 include arch/i386.h.
2973 (i386_linux_read_description): Remove code and call
2974 i386_create_target_description.
2975 (set_tdesc_architecture): New function.
2976 (set_tdesc_osabi): New function.
2977 * target-descriptions.h (allocate_target_description): Remove.
2978
0abe8a89
YQ
29792017-09-05 Yao Qi <yao.qi@linaro.org>
2980
2981 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2982 * target-descriptions.c (tdesc_create_feature): Likewise, and
2983 adjust code.
2984 * features/i386/32bit-avx.c: Re-generated.
2985 * features/i386/32bit-avx512.c: Re-generated.
2986 * features/i386/32bit-core.c: Re-generated.
2987 * features/i386/32bit-linux.c: Re-generated.
2988 * features/i386/32bit-mpx.c: Re-generated.
2989 * features/i386/32bit-pkeys.c: Re-generated.
2990 * features/i386/32bit-sse.c: Re-generated.
2991
0a188386
YQ
29922017-09-05 Yao Qi <yao.qi@linaro.org>
2993
2994 * regformats/regdef.h (struct reg): Override operator == and !=.
2995
f49ff000
YQ
29962017-09-05 Yao Qi <yao.qi@linaro.org>
2997
2998 * arch/tdesc.h: New file.
2999 * regformats/regdat.sh: Generate code using tdesc_create_reg.
3000 * target-descriptions.c: Update comments.
3001 * target-descriptions.h: Include "arch/tdesc.h". Remove the
3002 declarations.
3003 * features/i386/32bit-avx.c: Re-generated.
3004 * features/i386/32bit-avx512.c: Re-generated.
3005 * features/i386/32bit-core.c: Re-generated.
3006 * features/i386/32bit-linux.c: Re-generated.
3007 * features/i386/32bit-mpx.c: Re-generated.
3008 * features/i386/32bit-pkeys.c: Re-generated.
3009 * features/i386/32bit-sse.c: Re-generated.
3010
f7000548
YQ
30112017-09-05 Yao Qi <yao.qi@linaro.org>
3012
3013 * regformats/regdat.sh: Update generated code.
3014
c9a5e2a5
YQ
30152017-09-05 Yao Qi <yao.qi@linaro.org>
3016
3017 * regformats/regdat.sh: Adjust code order.
3018
d6b687ac
SM
30192017-09-05 Simon Marchi <simon.marchi@ericsson.com>
3020
3021 * expprint.c (dump_subexp_body_standard): Use constant format
3022 string in fprintf_filtered call.
3023
a379bfd0
JB
30242017-09-04 John Baldwin <jhb@FreeBSD.org>
3025
3026 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3027 NetBSD/i386.
3028 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3029
f7efc967
JB
30302017-09-04 John Baldwin <jhb@FreeBSD.org>
3031
3032 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3033
c49fbc6c
JB
30342017-09-04 John Baldwin <jhb@FreeBSD.org>
3035
3036 * bsd-kvm.o: Define _KMEMUSER.
3037 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3038 * configure: Regenerate.
3039
26562e73
JB
30402017-09-04 John Baldwin <jhb@FreeBSD.org>
3041
3042 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3043 * i386-fbsd-nat.c: Likewise.
3044
31cf1487
JB
30452017-09-04 John Baldwin <jhb@FreeBSD.org>
3046
3047 * unittests/array-view-selftests.c: Add include of <array>.
3048
5b9f8a7c
JB
30492017-09-04 John Baldwin <jhb@FreeBSD.org>
3050
3051 * spu-tdep.c (flush_ea_cache): Add missing argument to
3052 call_function_by_hand.
3053
d69cf9b2
PA
30542017-09-04 Pedro Alves <palves@redhat.com>
3055
3056 * NEWS (Safer support for debugging with no debug info): New.
3057
3693fdb3
PA
30582017-09-04 Pedro Alves <palves@redhat.com>
3059
3060 * c-exp.y (function_method, function_method_void): Add current
3061 instance flags to TYPE_INSTANCE.
3062 * dwarf2read.c (check_modifier): New.
3063 (compute_delayed_physnames): Assert that only C++ adds delayed
3064 physnames. Mark fn_fields as const/volatile depending on
3065 physname.
3066 * eval.c (make_params): New type_instance_flags parameter. Use
3067 it as the new type's instance flags.
3068 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3069 flags element and pass it to make_params.
3070 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3071 instance flags element.
3072 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3073 * gdbtypes.h: Include "enum-flags.h".
3074 (type_instance_flags): New enum-flags type.
3075 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3076 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3077 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3078 (follow_type_instance_flags): New function.
3079 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3080 * parser-defs.h (follow_type_instance_flags): Declare.
3081 * valops.c (value_struct_elt_for_reference): const/volatile must
3082 match too.
3083
e68cb8e0
PA
30842017-09-04 Pedro Alves <palves@redhat.com>
3085
3086 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3087 function/method scopes; lookup the nested name as a function local
3088 static variable.
3089
858be34c
PA
30902017-09-04 Pedro Alves <palves@redhat.com>
3091
3092 (%type <voidval>): Add function_method.
3093 * c-exp.y (exp): New production for calls with no arguments.
3094 (function_method, function_method_void_or_typelist): New
3095 productions.
3096 (exp): New production for "method()::static_var".
3097 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3098 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3099 Handle OP_FUNC_STATIC_VAR.
3100 * parse.c (operator_length_standard):
3101 Handle OP_FUNC_STATIC_VAR.
3102
dd5901a6
PA
31032017-09-04 Pedro Alves <palves@redhat.com>
3104
3105 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3106 handling.
3107 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3108 Ditto.
3109 * parse.c (operator_length_standard, operator_check_standard):
3110 Ditto.
3111 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3112
46a4882b
PA
31132017-09-04 Pedro Alves <palves@redhat.com>
3114
3115 * ax-gdb.c: Include "typeprint.h".
3116 (gen_expr_for_cast): New function.
3117 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3118 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3119 type is unknown.
3120 * dwarf2read.c (new_symbol_full): Fallback to int instead of
3121 nodebug_data_symbol.
3122 * eval.c: Include "typeprint.h".
3123 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3124 Error out if symbol has unknown type.
3125 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3126 evaluate_subexp_for_cast.
3127 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3128 OP_VAR_MSYM_VALUE.
3129 (evaluate_subexp_for_cast): New function.
3130 * gdbtypes.c (init_nodebug_var_type): New function.
3131 (objfile_type): Use it to initialize types of variables with no
3132 debug info.
3133 * typeprint.c (error_unknown_type): New.
3134 * typeprint.h (error_unknown_type): New declaration.
3135 * compile/compile-c-types.c (convert_type_basic): Handle
3136 TYPE_CODE_ERROR; warn and fallback to int for variables with
3137 unknown type.
3138
fe13dfec
PA
31392017-09-04 Pedro Alves <palves@redhat.com>
3140
3141 * eval.c (evaluate_var_value): New function, factored out from ...
3142 (evaluate_subexp_standard): ... here.
3143
d008ee21
PA
31442017-09-04 Pedro Alves <palves@redhat.com>
3145
3146 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3147 Remove useless assignments to 'op'.
3148
827d0c51
PA
31492017-09-04 Pedro Alves <palves@redhat.com>
3150
3151 * eval.c (eval_skip_value): New function.
3152 (evaluate_subexp_standard): Use it.
3153
2c5a2be1
PA
31542017-09-04 Pedro Alves <palves@redhat.com>
3155
3156 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3157 function name from symbol/minsym and pass it to
3158 error_call_unknown_return_type.
3159
74ea4be4
PA
31602017-09-04 Pedro Alves <palves@redhat.com>
3161
3162 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3163 * ax-gdb.c (gen_msym_var_ref): New function.
3164 (gen_expr): Handle OP_VAR_MSYM_VALUE.
3165 * eval.c (evaluate_var_msym_value): New function.
3166 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3167 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3168 to call_function_by_hand.
3169 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3170 Handle OP_VAR_MSYM_VALUE.
3171 (union exp_element) <msymbol>: New field.
3172 * minsyms.h (struct type): Forward declare.
3173 (find_minsym_type_and_address): Declare.
3174 * parse.c (write_exp_elt_msym): New function.
3175 (write_exp_msymbol): Delete, refactored as ...
3176 (find_minsym_type_and_address): ... this new function.
3177 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3178 (operator_length_standard, operator_check_standard): Handle
3179 OP_VAR_MSYM_VALUE.
3180 * std-operator.def (OP_VAR_MSYM_VALUE): New.
3181
7022349d
PA
31822017-09-04 Pedro Alves <palves@redhat.com>
3183
3184 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3185 TYPE_GNU_IFUNC specially here. Throw error if return type is
3186 unknown.
3187 * ada-typeprint.c (print_func_type): Handle functions with unknown
3188 return type.
3189 * c-typeprint.c (c_type_print_base): Handle functions and methods
3190 with unknown return type.
3191 * compile/compile-c-symbols.c (convert_symbol_bmsym)
3192 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3193 * compile/compile-c-types.c: Include "objfiles.h".
3194 (convert_func): For functions with unknown return type, warn and
3195 default to int.
3196 * compile/compile-object-run.c (compile_object_run): Adjust call
3197 to call_function_by_hand_dummy.
3198 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3199 call_function_by_hand.
3200 * eval.c (evaluate_subexp_standard): Adjust calls to
3201 call_function_by_hand. Handle functions and methods with unknown
3202 return type. Pass expect_type to call_function_by_hand.
3203 * f-typeprint.c (f_type_print_base): Handle functions with unknown
3204 return type.
3205 * gcore.c (call_target_sbrk): Adjust call to
3206 call_function_by_hand.
3207 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3208 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
3209 an integer address type instead of nodebug.
3210 * guile/scm-value.c (gdbscm_value_call): Adjust call to
3211 call_function_by_hand.
3212 * infcall.c (error_call_unknown_return_type): New function.
3213 (call_function_by_hand): New "default_return_type" parameter.
3214 Pass it down.
3215 (call_function_by_hand_dummy): New "default_return_type"
3216 parameter. Use it instead of defaulting to int. If there's no
3217 default and the return type is unknown, throw an error. If
3218 there's a default return type, and the called function has no
3219 debug info, then assume the function is prototyped.
3220 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3221 New "default_return_type" parameter.
3222 (error_call_unknown_return_type): New declaration.
3223 * linux-fork.c (call_lseek): Cast return type of lseek.
3224 (inferior_call_waitpid, checkpoint_command): Adjust calls to
3225 call_function_by_hand.
3226 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3227 calls to call_function_by_hand.
3228 * m2-typeprint.c (m2_procedure): Handle functions with unknown
3229 return type.
3230 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3231 (value_nsstring, print_object_command): Adjust calls to
3232 call_function_by_hand.
3233 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3234 functions with unknown return type.
3235 (pascal_type_print_func_varspec_suffix): New function.
3236 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3237 TYPE_CODE_METHOD>: Use it.
3238 * python/py-value.c (valpy_call): Adjust call to
3239 call_function_by_hand.
3240 * rust-lang.c (rust_evaluate_funcall): Adjust call to
3241 call_function_by_hand.
3242 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3243 call_function_by_hand.
3244 * valops.c (value_allocate_space_in_inferior): Adjust call to
3245 call_function_by_hand.
3246 * typeprint.c (type_print_unknown_return_type): New function.
3247 * typeprint.h (type_print_unknown_return_type): New declaration.
3248
54990598
PA
32492017-09-04 Pedro Alves <palves@redhat.com>
3250
3251 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3252 types with more than one parameter as prototyped.
3253
9a24775b
PA
32542017-09-04 Pedro Alves <palves@redhat.com>
3255
3256 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3257 (disassemble_command): Use gdb_disassembly_flags instead of bare
3258 int.
3259 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3260 (dump_insns, do_mixed_source_and_assembly_deprecated)
3261 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3262 Use gdb_disassembly_flags instead of bare int.
3263 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3264 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3265 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3266 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
3267 (enum gdb_disassembly_flag): ... values of this new enumeration.
3268 (gdb_disassembly_flags): Define.
3269 (gdb_disassembly)
3270 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3271 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3272 gdb_disassembly_flags instead of bare int.
3273 * record-btrace.c (btrace_insn_history)
3274 (record_btrace_insn_history, record_btrace_insn_history_range)
3275 (record_btrace_insn_history_from): Use gdb_disassembly_flags
3276 instead of bare int.
3277 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3278 Use gdb_disassembly_flags instead of bare int.
3279 * target-debug.h (target_debug_print_gdb_disassembly_flags):
3280 Define.
3281 * target-delegates.c: Regenerate.
3282 * target.c (target_insn_history, target_insn_history_from)
3283 (target_insn_history_range): Use gdb_disassembly_flags instead of
3284 bare int.
3285 * target.h: Include "disasm.h".
3286 (struct target_ops) <to_insn_history, to_insn_history_from,
3287 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3288 int.
3289 (target_insn_history, target_insn_history_from)
3290 (target_insn_history_range): Use gdb_disassembly_flags instead of
3291 bare int.
3292
80a65e9b
SM
32932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3294
3295 * cli/cli-script.c (build_command_line): For if/while commands,
3296 check whether args is empty.
3297
6b66338c
SM
32982017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3299
3300 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3301 (enum command_control_type): Likewise.
3302 (struct command_line): Likewise.
3303 (free_command_lines): Likewise.
3304 (struct command_lines_deleter): Likewise.
3305 (command_line_up): Likewise.
3306 (read_command_lines): Likewise.
3307 (read_command_lines_1): Likewise.
3308 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3309 (enum command_control_type): Likewise.
3310 (struct command_line): Likewise.
3311 (free_command_lines): Likewise.
3312 (struct command_lines_deleter): Likewise.
3313 (command_line_up): Likewise.
3314 (read_command_lines): Likewise.
3315 (read_command_lines_1): Likewise.
3316 * breakpoint.h: Include cli/cli-script.h.
3317 * extension-priv.h: Likewise.
3318 * gdbcmd.h: Likewise.
3319
51abb421
PA
33202017-09-04 Pedro Alves <palves@redhat.com>
3321
3322 * ada-lang.c (is_known_support_routine): Move sal declaration to
3323 where it is initialized.
3324 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3325 (parse_breakpoint_sals, decode_static_tracepoint_spec)
3326 (clear_command, update_static_tracepoint): Remove init_sal
3327 references. Move declarations closer to initializations.
3328 * cli/cli-cmds.c (list_command): Move sal declarations closer to
3329 initializations.
3330 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3331 references. Move sal declarations closer to initializations.
3332 * frame.c (find_frame_sal): Return a symtab_and_line via function
3333 return instead of output parameter. Remove init_sal references.
3334 * frame.h (find_frame_sal): Return a symtab_and_line via function
3335 return instead of output parameter.
3336 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3337 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3338 instead of memset.
3339 (gdbscm_find_pc_line): Remove init_sal reference.
3340 * infcall.c (call_function_by_hand_dummy): Remove init_sal
3341 references. Move declarations closer to initializations.
3342 * infcmd.c (set_step_frame): Update. Move declarations closer to
3343 initializations.
3344 (finish_backward): Remove init_sal references. Move declarations
3345 closer to initializations.
3346 * infrun.c (process_event_stop_test, handle_step_into_function)
3347 (insert_hp_step_resume_breakpoint_at_frame)
3348 (insert_step_resume_breakpoint_at_caller): Likewise.
3349 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3350 (symbol_to_sal): Likewise.
3351 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3352 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3353 to its initialization.
3354 * reverse.c (save_bookmark_command): Use new/delete. Remove
3355 init_sal references. Move declarations closer to initializations.
3356 * source.c (get_current_source_symtab_and_line): Remove brace
3357 initialization.
3358 (set_current_source_symtab_and_line): Now takes the sal by const
3359 reference. Remove brace initialization.
3360 (line_info): Remove init_sal reference.
3361 * source.h (set_current_source_symtab_and_line): Now takes a
3362 symtab_and_line via const reference.
3363 * stack.c (set_current_sal_from_frame): Adjust.
3364 (print_frame_info): Adjust.
3365 (get_last_displayed_sal): Return the sal via function return
3366 instead of via output parameter. Simplify.
3367 (frame_info): Adjust.
3368 * stack.h (get_last_displayed_sal): Return the sal via function
3369 return instead of via output parameter.
3370 * symtab.c (init_sal): Delete.
3371 (find_pc_sect_line): Remove init_sal references. Move
3372 declarations closer to initializations.
3373 (find_function_start_sal): Remove init_sal references. Move
3374 declarations closer to initializations.
3375 * symtab.h (struct symtab_and_line): In-class initialize all
3376 fields.
3377 * tracepoint.c (set_traceframe_context)
3378 (print_one_static_tracepoint_marker): Remove init_sal references.
3379 Move declarations closer to initializations.
3380 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3381 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
3382 declarations closer to initializations.
3383 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3384 init_sal references. Adjust.
3385
6c5b2ebe
PA
33862017-09-04 Pedro Alves <palves@redhat.com>
3387
3388 * ax-gdb.c (agent_command_1): Use range-for.
3389 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3390 * breakpoint.c: Include "common/array-view.h".
3391 (init_breakpoint_sal, create_breakpoint_sal): Change sals
3392 parameter from struct symtabs_and_lines to
3393 array_view<symtab_and_line>. Adjust. Use range-for. Update.
3394 (breakpoint_sals_to_pc): Change sals parameter from struct
3395 symtabs_and_lines to std::vector reference.
3396 (check_fast_tracepoint_sals): Change sals parameter from struct
3397 symtabs_and_lines to std::array_view. Use range-for.
3398 (decode_static_tracepoint_spec): Return a std::vector instead of
3399 symtabs_and_lines. Update.
3400 (create_breakpoint): Update.
3401 (break_range_command, until_break_command, clear_command): Update.
3402 (base_breakpoint_decode_location, bkpt_decode_location)
3403 (bkpt_probe_create_sals_from_location)
3404 (bkpt_probe_decode_location, tracepoint_decode_location)
3405 (tracepoint_probe_decode_location)
3406 (strace_marker_create_sals_from_location): Return a std::vector
3407 instead of symtabs_and_lines.
3408 (strace_marker_create_breakpoints_sal): Update.
3409 (strace_marker_decode_location): Return a std::vector instead of
3410 symtabs_and_lines. Update.
3411 (update_breakpoint_locations): Change struct symtabs_and_lines
3412 parameters to gdb::array_view. Adjust.
3413 (location_to_sals): Return a std::vector instead of
3414 symtabs_and_lines. Update.
3415 (breakpoint_re_set_default): Use std::vector instead of struct
3416 symtabs_and_lines.
3417 (decode_location_default): Return a std::vector instead of
3418 symtabs_and_lines. Update.
3419 * breakpoint.h: Include "common/array-view.h".
3420 (struct breakpoint_ops) <decode_location>: Now returns a
3421 std::vector instead of returning a symtabs_and_lines via output
3422 parameter.
3423 (update_breakpoint_locations): Change sals parameters to use
3424 gdb::array_view.
3425 * cli/cli-cmds.c (edit_command, list_command): Update to use
3426 std::vector and gdb::array_view.
3427 (ambiguous_line_spec): Adjust to use gdb::array_view and
3428 range-for.
3429 (compare_symtabs): Rename to ...
3430 (cmp_symtabs): ... this. Change parameters to symtab_and_line
3431 const reference and adjust.
3432 (filter_sals): Rewrite using std::vector and standard algorithms.
3433 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3434 (jump_command): Update to use std::vector.
3435 * linespec.c (struct linespec_state) <canonical_names>: Update
3436 comment.
3437 (add_sal_to_sals_basic): Delete.
3438 (add_sal_to_sals, filter_results, convert_results_to_lsals)
3439 (decode_line_2, create_sals_line_offset)
3440 (convert_address_location_to_sals, convert_linespec_to_sals)
3441 (convert_explicit_location_to_sals, parse_linespec)
3442 (event_location_to_sals, decode_line_full, decode_line_1)
3443 (decode_line_with_current_source)
3444 (decode_line_with_last_displayed, decode_objc)
3445 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3446 (linespec_result::~linespec_result): Adjust to use std::vector
3447 instead of symtabs_and_lines.
3448 * linespec.h (linespec_sals::sals): Now a std::vector.
3449 (struct linespec_result): Use std::vector, bool, and in-class
3450 initialization.
3451 (decode_line_1, decode_line_with_current_source)
3452 (decode_line_with_last_displayed): Return std::vector.
3453 * macrocmd.c (info_macros_command): Use std::vector.
3454 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3455 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3456 std::vector.
3457 * probe.h (parse_probes): Return a std::vector.
3458 * python/python.c (gdbpy_decode_line): Use std::vector and
3459 gdb::array_view.
3460 * source.c (select_source_symtab, line_info): Use std::vector.
3461 * stack.c (func_command): Use std::vector.
3462 * symtab.h (struct symtabs_and_lines): Delete.
3463 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3464
7c44b49c
PA
34652017-09-04 Pedro Alves <palves@redhat.com>
3466
3467 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3468 unittests/array-view-selftests.c.
3469 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3470 * common/array-view.h: New file.
3471 * unittests/array-view-selftests.c: New file.
3472
e439fa14
PA
34732017-09-04 Pedro Alves <palves@redhat.com>
3474
3475 * cli/cli-cmds.c (edit_command): Pass message to
3476 ambiguous_line_spec.
3477 (list_command): Pass message to ambiguous_line_spec. Say
3478 "first"/"last" instead of "start" and "end" to be consistent with
3479 the manual.
3480 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
3481 them to print formatted message.
3482
7525b645
PA
34832017-09-04 Pedro Alves <palves@redhat.com>
3484
3485 * btrace.c (ftrace_add_pt): Pass btrace_insn to
3486 ftrace_update_insns by reference instead of pointer.
3487
badc0020
YQ
34882017-09-04 Yao Qi <yao.qi@linaro.org>
3489
3490 * i386-go32-tdep.c: Include x86-xstate.h.
3491 (i386_go32_init_abi): Call i386_target_description.
3492 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3493 if xcr0 is X86_XSTATE_X87_MASK.
3494 * i386-tdep.h (tdesc_i386): Remove the declaration.
3495 (tdesc_i386_mmx): Likewise.
3496
d78bdb54
YQ
34972017-09-04 Yao Qi <yao.qi@linaro.org>
3498
3499 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3500 X86_XSTATE_SSE_MASK instead of 0.
3501
ca1fa5ee
YQ
35022017-09-04 Yao Qi <yao.qi@linaro.org>
3503
3504 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3505 i386_target_description.
3506 * i386-fbsd-nat.c (i386fbsd_read_description): Call
3507 i386_target_description.
3508 * i386-tdep.c (i386_gdbarch_init): Likewise.
3509
2434b019
YQ
35102017-09-04 Yao Qi <yao.qi@linaro.org>
3511
3512 * amd64-darwin-tdep.c: Include "x86-xstate.h".
3513 (x86_darwin_init_abi_64): Call amd64_target_description.
3514 * amd64-dicos-tdep.c: Likewise.
3515 * amd64-fbsd-nat.c: Likewise.
3516 * amd64-fbsd-tdep.c: Likewise.
3517 * amd64-nbsd-tdep.c: Likewise.
3518 * amd64-obsd-tdep.c: Likewise.
3519 * amd64-sol2-tdep.c: Likewise.
3520 * amd64-windows-tdep.c: Likewise.
3521 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3522
0860c437
SM
35232017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3524
3525 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3526 (btrace_function) <insn>: Change type to use std::vector.
3527 * btrace.c (ftrace_debug, ftrace_call_num_insn,
3528 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3529 ftrace_update_insns, ftrace_compute_global_level_offset,
3530 btrace_stitch_bts, btrace_clear, btrace_insn_get,
3531 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3532 change to std::vector.
3533 (ftrace_update_insns): Adjust to change to std::vector, change
3534 type of INSN parameter.
3535 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3536 * record-btrace.c (btrace_call_history_insn_range,
3537 btrace_compute_src_line_range,
3538 record_btrace_frame_prev_register): Adjust to change to
3539 std::vector.
3540 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3541 to change to std::vector.
3542
0638b7f9
TT
35432017-09-03 Tom Tromey <tom@tromey.com>
3544
3545 * corefile.c (reopen_exec_file): Use std::string.
3546
8f84fb0e
TT
35472017-09-03 Tom Tromey <tom@tromey.com>
3548
3549 * compile/compile.c (compile_register_name_mangled): Return
3550 std::string.
3551 * compile/compile-loc2c.c (pushf_register_address): Update.
3552 (pushf_register): Update.
3553 * compile/compile-c-types.c (convert_array): Update.
3554 * compile/compile-c-symbols.c (generate_vla_size): Update.
3555 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3556 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3557 (convert_one_symbol): Update.
3558 (generate_c_for_for_one_variable): Update.
3559 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3560 std::string.
3561 (generate_register_struct): Update.
3562 * compile/compile-internal.h (c_get_range_decl_name): Return a
3563 std::string.
3564 (compile_register_name_mangled): Return std::string.
3565
18e9961f
TT
35662017-09-03 Tom Tromey <tom@tromey.com>
3567
3568 * utils.c (perror_string): Return a std::string.
3569 (throw_perror_with_name, perror_warning_with_name): Update.
3570
45343786
TT
35712017-09-03 Tom Tromey <tom@tromey.com>
3572
3573 * demangle.c (demangle_command): Use std::string,
3574 unique_xmalloc_ptr.
3575
b57af503
TT
35762017-09-03 Tom Tromey <tom@tromey.com>
3577
3578 * cli/cli-setshow.c (do_set_command): Use std::string.
3579
6eecf35f
TT
35802017-09-03 Tom Tromey <tom@tromey.com>
3581
3582 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3583
56496dd4
TT
35842017-09-03 Tom Tromey <tom@tromey.com>
3585
3586 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3587
e91a1fa7
TT
35882017-09-03 Tom Tromey <tom@tromey.com>
3589
3590 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3591 gdb::unique_xmalloc_ptr.
3592
7ffd83d7
TT
35932017-09-03 Tom Tromey <tom@tromey.com>
3594
3595 * thread.c (print_thread_info_1): Use string_printf.
3596 (thread_apply_command, thread_apply_all_command): Use
3597 std::string.
3598
1ccbe998
TT
35992017-09-03 Tom Tromey <tom@tromey.com>
3600
3601 * valprint.c (val_print_string): Update.
3602 * gdbcore.h (memory_error_message): Return std::string.
3603 * corefile.c (memory_error_message): Return std::string.
3604 (memory_error): Update.
3605 * breakpoint.c (insert_bp_location): Update.
3606
23fdd69e
SM
36072017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3608
3609 * target/waitstatus.h (target_waitstatus_to_string): Change
3610 return type to std::string.
3611 * target/waitstatus.c (target_waitstatus_to_string): Return
3612 std::string.
3613 * target.h (target_waitstatus_to_string): Remove declaration.
3614 * infrun.c (resume, clear_proceed_status_thread,
3615 print_target_wait_results, do_target_wait, save_waitstatus,
3616 stop_all_threads): Adjust.
3617 * record-btrace.c (record_btrace_wait): Adjust.
3618 * target-debug.h
3619 (target_debug_print_struct_target_waitstatus_p): Adjust.
3620
5c811d30
JK
36212017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3622
3623 PR gdb/22046
3624 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3625 detection.
3626
0a2dde4a
SDJ
36272017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3628
3629 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3630 for setting/unsetting environment variables on the remote target.
3631 (New remote packets): Add entries for QEnvironmentHexEncoded,
3632 QEnvironmentUnset and QEnvironmentReset.
3633 * common/environ.c (gdb_environ::operator=): Extend method to
3634 handle m_user_set_env_list and m_user_unset_env_list.
3635 (gdb_environ::clear): Likewise.
3636 (match_var_in_string): Change type of first parameter from 'char
3637 *' to 'const char *'.
3638 (gdb_environ::set): Extend method to handle
3639 m_user_set_env_list and m_user_unset_env_list.
3640 (gdb_environ::unset): Likewise.
3641 (gdb_environ::clear_user_set_env): New method.
3642 (gdb_environ::user_set_envp): Likewise.
3643 (gdb_environ::user_unset_envp): Likewise.
3644 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3645 m_user_unset_env_list on move constructor/assignment.
3646 (unset): Add new default parameter 'update_unset_list = true'.
3647 (clear_user_set_env): New method.
3648 (user_set_envp): Likewise.
3649 (user_unset_envp): Likewise.
3650 (m_user_set_env_list): New std::set.
3651 (m_user_unset_env_list): Likewise.
3652 * common/rsp-low.c (hex2str): New function.
3653 (bin2hex): New overload for bin2hex function.
3654 * common/rsp-low.c (hex2str): New prototype.
3655 (str2hex): New overload prototype.
3656 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3657 QEnvironmentUnset and QEnvironmentReset.
3658 (remote_protocol_features): Add QEnvironmentHexEncoded,
3659 QEnvironmentUnset and QEnvironmentReset packets.
3660 (send_environment_packet): New function.
3661 (extended_remote_environment_support): Likewise.
3662 (extended_remote_create_inferior): Call
3663 extended_remote_environment_support.
3664 (_initialize_remote): Add QEnvironmentHexEncoded,
3665 QEnvironmentUnset and QEnvironmentReset packet configs.
3666 * unittests/environ-selftests.c (gdb_selftest_env_var):
3667 New variable.
3668 (test_vector_initialization): New function.
3669 (test_init_from_host_environ): Likewise.
3670 (test_reinit_from_host_environ): Likewise.
3671 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3672 Likewise.
3673 (test_unset_set_empty_vector): Likewise.
3674 (test_vector_clear): Likewise.
3675 (test_std_move): Likewise.
3676 (test_move_constructor):
3677 (test_self_move): Likewise.
3678 (test_set_unset_reset): Likewise.
3679 (run_tests): Rewrite in terms of the functions above.
3680
654670a4
WP
36812017-08-31 Weimin Pan <weimin.pan@oracle.com>
3682
3683 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3684 (adi_available): Use a temp variable of type CORE_ADDR as argument
3685 3 when calling target_auxv_search.
3686 (adi_normalize_address): Use masks and xor operators to calculate
3687 normalized address.
3688 (adi_read_versions, adi_write_versions, adi_print_versions)
3689 (do_examine, do_assign): Use paddress.
3690
7755ddb7
JB
36912017-08-29 John Baldwin <jhb@FreeBSD.org>
3692
3693 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3694 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3695 out of loop and add supply of FIR.
3696 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3697 add collect of FIR.
3698
fd437cbc
SM
36992017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3700
3804a343 3701 PR gdb/21827
fd437cbc
SM
3702 * cli/cli-script.c (define_command): Don't convert command name
3703 to lower case.
3704
988f6b3d
JB
37052017-08-25 Joel Brobecker <brobecker@adacore.com>
3706
3707 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3708 Update all callers accordingly. Remove all code blocks handling
3709 the case where DISPP is not NULL.
3710
663c44ac
JK
37112017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3712
3713 PR symtab/22003
3714 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3715 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3716 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3717
f1902523
JK
37182017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3719
3720 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3721 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3722 (read_comp_units_from_section): New parameter abbrev_section, use
3723 read_and_check_comp_unit_head, allocate signatured_type if needed.
3724 (create_all_comp_units): Update read_comp_units_from_section caller.
3725
87215ad1
SDJ
37262017-08-23 Pedro Alves <palves@redhat.com>
3727
3728 PR remote/21852
3729 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3730 to null_ptid and switch to thread without reading the registers
3731 after adding the inferior.
3732
6e41ddec
JK
37332017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3734
3735 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3736 compile-gcc.
3737 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3738 (compile_to_object): Implement compile_gcc.
3739 (_initialize_compile): Install "set compile-gcc". Initialize
3740 compile_gcc.
3741
e68c32d5
JK
37422017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3743
3744 * compile/compile.c (compile_to_object): Conditionally call
3745 set_verbose. Conditionally call compile or compile_v0.
3746
58afddc6
WP
37472017-08-07 Weimin Pan <weimin.pan@oracle.com>
3748
3749 * sparc64-tdep.h: (adi_normalize_address): New export.
3750 * sparc-nat.h: (open_adi_tag_fd): New export.
3751 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3752 * sparc64-linux-tdep.c:
3753 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3754 (sparc64_linux_handle_segmentation_fault): New function.
3755 (sparc64_linux_init_abi): Register
3756 sparc64_linux_handle_segmentation_fault
3757 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3758 (sparc64_addr_bits_remove): New function.
3759 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3760 (MAX_PROC_NAME_SIZE): New macro.
3761 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3762 (sparc64adilist): New variable.
3763 (adi_proc_list): New variable.
3764 (find_adi_info): New function.
3765 (add_adi_info): New function.
3766 (get_adi_info_proc): New function.
3767 (get_adi_info): New function.
3768 (info_adi_command): New function.
3769 (read_maps_entry): New function.
3770 (adi_available): New function.
3771 (adi_normalize_address): New function.
3772 (adi_align_address): New function.
3773 (adi_convert_byte_count): New function.
3774 (adi_tag_fd): New function.
3775 (adi_is_addr_mapped): New function.
3776 (adi_read_versions): New function.
3777 (adi_write_versions): New function.
3778 (adi_print_versions): New function.
3779 (do_examine): New function.
3780 (do_assign): New function.
3781 (adi_examine_command): New function.
3782 (adi_assign_command): New function.
3783 (_initialize_sparc64_adi_tdep): New function.
3784
11db9430
SM
37852017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3786
3787 * breakpoint.c (breakpoints_info): Rename to ...
3788 (info_breakpoints_command): ... this.
3789 (watchpoints_info): Rename to ...
3790 (info_watchpoints_command): ... this.
3791 (tracepoints_info): Rename to ...
3792 (info_tracepoints_command): ... this.
3793 (_initialize_breakpoint): Adjust.
3794 * dcache.c (dcache_info): Rename to ...
3795 (info_display_command): ... this.
3796 (_initialize_dcache): Adjust.
3797 * frame.h (args_info): Rename to ...
3798 (info_args_command): ... this.
3799 (locals_info): Rename to ...
3800 (info_locals_command): ... this.
3801 * infcmd.c (nofp_registers_info): Rename to ...
3802 (info_registers_command): ... this.
3803 (float_info): Rename to ...
3804 (info_float_command): ... this.
3805 (program_info): Rename to ...
3806 (info_program_command): ... this.
3807 (all_registers_info): Rename to ...
3808 (info_all_registers_command): ... this.
3809 (vector_info): Rename to ...
3810 (info_vector_command): ... this.
3811 (float_info): Rename to ...
3812 (info_float_command): ... this.
3813 (_initialize_infcmd): Adjust.
3814 * inferior.h (term_info): Rename to ...
3815 (info_terminal_command): ... this.
3816 * inflow.c (term_info): Rename to ...
3817 (info_terminal_command): ... this.
3818 (_initialize_inflow): Adjust.
3819 * infrun.c (signals_info): Rename to ...
3820 (info_signals_command): ... this.
3821 (_initialize_infrun): Adjust.
3822 * objc-lang.c (classes_info): Rename to ...
3823 (info_classes_command): ... this.
3824 (selectors_info): Rename to ...
3825 (info_selectors_command): ... this.
3826 (_initialize_objc_language): Adjust.
3827 * printcmd.c (sym_info): Rename to ...
3828 (info_symbol_command): ... this.
3829 (address_info): Rename to ...
3830 (info_address_command): ... this.
3831 (display_info): Rename to ...
3832 (info_display_command): ... this.
3833 (_initialize_printcmd): Adjust.
3834 * reverse.c (bookmarks_info): Rename to ...
3835 (info_breakpoints_command): ... this.
3836 (_initialize_reverse): Adjust.
3837 * ser-go32.c (dos_info): Rename to ...
3838 (info_serial_command): ... this.
3839 (_initialize_ser_dos): Adjust.
3840 * skip.c (skip_info): Rename to ...
3841 (info_skip_command): ... this.
3842 (_initialize_step_skip): Adjust.
3843 * source.c (line_info): Rename to ...
3844 (info_line_command): ... this.
3845 (source_info): Rename to ...
3846 (info_source_command)
3847 * stack.c (frame_info): Rename to ...
3848 (info_frame_command): ... this.
3849 (locals_info): Rename to ...
3850 (info_locals_command): ... this.
3851 (args_info): Rename to ...
3852 (info_args_command): ... this.
3853 (_initialize_stack): Adjust.
3854 * symtab.c (sources_info): Rename to ...
3855 (info_sources_command): ... this.
3856 (variables_info): Rename to ...
3857 (info_variables_command): ... this.
3858 (functions_info): Rename to ...
3859 (info_functions_command): ... this.
3860 (types_info): Rename to ...
3861 (info_types_command): ... this.
3862 (_initialize_symtab): Adjust.
3863 * target.c (target_info): Rename to ...
3864 (info_target_command): ... this.
3865 (initialize_targets): Adjust.
3866 * tracepoint.c (tvariables_info): Rename to ...
3867 (info_tvariables_command): ... this.
3868 (scope_info): Rename to ...
3869 (info_scope_command): ... this.
3870 (trace_dump_actions): Adjust.
3871 (_initialize_tracepoint): Adjust.
3872
b270e6f9
TT
38732017-08-22 Tom Tromey <tom@tromey.com>
3874
3875 * breakpoint.h (install_breakpoint): Update.
3876 * breakpoint.c (add_solib_catchpoint): Update.
3877 (install_breakpoint): Change argument to a std::unique_ptr.
3878 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3879 (create_breakpoint_sal, create_breakpoint): Update.
3880 (watch_command_1, catch_exec_command_1)
3881 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3882 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3883 Return the breakpoint.
3884 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3885 (new_single_step_breakpoint): Update.
3886 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3887 std::unique_ptr.
3888 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3889 std::unique_ptr.
3890 * break-catch-sig.c (create_signal_catchpoint): Use
3891 std::unique_ptr.
3892 * ada-lang.c (create_ada_exception_catchpoint): Use
3893 std::unique_ptr.
3894
36bd8eaa
TT
38952017-08-22 Tom Tromey <tom@tromey.com>
3896
3897 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3898
56f37645
TT
38992017-08-22 Tom Tromey <tom@tromey.com>
3900
3901 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3902 (lookup_partial_symbol): Update.
3903
0b581c69
TT
39042017-08-22 Tom Tromey <tom@tromey.com>
3905
3906 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3907 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3908 (find_and_open_source, symtab_to_fullname): Update.
3909 * psymtab.c (psymtab_to_fullname): Update.
3910
14278e1f
TT
39112017-08-22 Tom Tromey <tom@tromey.com>
3912
3913 * exec.c (exec_file_attach): Update.
3914 * linux-thread-db.c (try_thread_db_load): Update.
3915 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3916 * utils.c (gdb_realpath): Change return type.
3917 (gdb_realpath_keepfile): Update.
3918 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3919 (_initialize_utils): Register the new self test.
3920 * source.c (openp): Update.
3921 (find_and_open_source): Update.
3922 * nto-tdep.c (nto_find_and_open_solib): Update.
3923 * main.c (set_gdb_data_directory): Update.
3924 (captured_main_1): Update.
3925 * dwarf2read.c (dwarf2_get_dwz_file): Update
3926 (dw2_map_symbol_filenames): Update.
3927 * auto-load.c (auto_load_safe_path_vec_update): Update.
3928 (filename_is_in_auto_load_safe_path_vec): Change type of
3929 "filename_realp".
3930 (auto_load_objfile_script): Update.
3931 (file_is_auto_load_safe): Update. Use std::string.
3932 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3933
4971c9a7
TT
39342017-08-22 Tom Tromey <tom@tromey.com>
3935
3936 * utils.c (gdb_realpath_keepfile): Return a
3937 gdb::unique_xmalloc_ptr.
3938 * exec.c (exec_file_attach): Update.
3939 * utils.h (gdb_realpath_keepfile): Return a
3940 gdb::unique_xmalloc_ptr.
3941
e3e41d58
TT
39422017-08-22 Tom Tromey <tom@tromey.com>
3943
3944 * compile/compile.c (compile_file_command): Use
3945 gdb::unique_xmalloc_ptr, std::string.
3946 * utils.c (gdb_abspath): Change return type.
3947 * source.c (openp): Update.
3948 * objfiles.c (allocate_objfile): Update.
3949 * main.c (set_gdb_data_directory): Update.
3950 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3951
0d999a6e
ZZ
39522017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3953
3954 * cli-cmds.c (list_commands): List actual code around more than
3955 one location.
3956
329d5e7e
JB
39572017-08-21 John Baldwin <jhb@FreeBSD.org>
3958
3959 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3960
bf223d3e
PA
39612017-08-21 Pedro Alves <palves@redhat.com>
3962
3963 PR gdb/19487
3964 * c-exp.y (variable production): Handle function aliases.
3965 * minsyms.c (msymbol_is_text): New function.
3966 * minsyms.h (msymbol_is_text): Declare.
3967 * symtab.c (find_function_alias_target): New function.
3968 * symtab.h (find_function_alias_target): Declare.
3969
c973d0aa
PA
39702017-08-21 Pedro Alves <palves@redhat.com>
3971
3972 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3973 typedefs.
3974 * typeprint.c (whatis_exp): If handling "whatis", and expression
3975 is OP_TYPE, strip one typedef level. Otherwise don't strip
3976 typedefs here.
3977 * valops.c (value_cast): Save "to" type before resolving
3978 stubs/typedefs. Use that type as resulting value's type.
3979
2989a365
TT
39802017-08-18 Tom Tromey <tom@tromey.com>
3981 Pedro Alves <palves@redhat.com>
3982
3983 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3984 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3985 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3986 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3987 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3988 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3989 (linux_get_siginfo_data): Add "thread" argument. Use
3990 scoped_restore.
3991 * linux-nat.c (linux_child_follow_fork)
3992 (check_stopped_by_watchpoint): Use scoped_restore.
3993 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3994 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3995 (restore_inferior_ptid, save_inferior_ptid): Remove.
3996 * btrace.c (btrace_fetch): Use scoped_restore.
3997 * bsd-uthread.c (bsd_uthread_fetch_registers)
3998 (bsd_uthread_store_registers): Use scoped_restore.
3999 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4000 scoped_restore.
4001 * aix-thread.c (aix_thread_resume, aix_thread_wait)
4002 (aix_thread_xfer_partial): Use scoped_restore.
4003 * inferior.h (save_inferior_ptid): Remove.
4004
e60eb288
YQ
40052017-08-18 Yao Qi <yao.qi@linaro.org>
4006
4007 PR tdep/21818
4008 * arm-tdep.c (gdb_print_insn_arm): Mark
4009 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4010
6d580b63
YQ
40112017-08-18 Yao Qi <yao.qi@linaro.org>
4012
4013 * NEWS: Mention GDBserver's new option "--selftest".
4014 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4015 * selftest.c: Move it to common/selftest.c.
4016 * selftest.h: Move it to common/selftest.h.
4017 * selftest-arch.c (reset): New function.
4018 (tests_with_arch): Call reset.
4019
86dcbf50
YQ
40202017-08-18 Yao Qi <yao.qi@linaro.org>
4021
4022 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
4023 instead of exception_fprintf and printf_filtered.
4024
7649770c
YQ
40252017-08-18 Yao Qi <yao.qi@linaro.org>
4026
4027 * selftest.c (register_self_test): Rename it to
4028 selftests::register_test.
4029 (run_self_tests): selftest::run_tests.
4030 * selftest.h: Update declarations.
4031 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4032 selftests::register_test_foreach_arch.
4033 * selftest-arch.h: Update declaration.
4034 * aarch64-tdep.c: Update.
4035 * arm-tdep.c: Likewise.
4036 * disasm-selftests.c: Likewise.
4037 * dwarf2loc.c: Likewise.
4038 * dwarf2-frame.c: Likewise.
4039 * findvar.c: Likewise.
4040 * gdbarch-selftests.c: Likewise.
4041 * maint.c (maintenance_selftest): Likewise.
4042 * regcache.c: Likewise.
4043 * rust-exp.y: Likewise.
4044 * selftest-arch.c: Likewise.
4045 * unittests/environ-selftests.c: Likewise.
4046 * unittests/function-view-selftests.c: Likewise.
4047 * unittests/offset-type-selftests.c: Likewise.
4048 * unittests/optional-selftests.c: Likewise.
4049 * unittests/scoped_restore-selftests.c: Likewise.
4050 * utils-selftests.c: Likewise.
4051
b0cba12e
PA
40522017-08-17 Pedro Alves <palves@redhat.com>
4053
4054 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4055 local.
4056
4c8aa72d
PA
40572017-08-17 Pedro Alves <palves@redhat.com>
4058
4059 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4060 field.
4061 (reset_die_in_process): Delete, replaced by ...
4062 (process_die_scope): ... this new class. Make it responsible for
4063 freeing cu->line_header too.
4064 (process_die): Use process_die_scope.
4065 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4066 cu->line_header_die_owner. Don't release the line header if it's
4067 owned by the CU.
4068 (setup_type_unit_groups): Make the CU/DIE own the line header.
4069 Don't release the line header here.
4070
ba713918
AL
40712017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
4072
4073 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4074
44d0fb3a
RK
40752017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
4076
4077 * NEWS: Mention new shortcuts for nexti and stepi in TUI
4078 Single-Key mode
4079
a5afdb16
RK
40802017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
4081
4082 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4083 mode command list.
4084
47613aeb
SH
40852017-08-15 Stafford Horne <shorne@gmail.com>
4086
4087 * MAINTAINERS (Write After Approval): Add Stafford Horne.
4088
9c3cc999
SH
40892017-08-15 Stafford Horne <shorne@gmail.com>
4090
4091 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4092
206726fb
SDJ
40932017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
4094
4095 PR gdb/21954
4096 * infcmd.c (unset_environment_command): Use the 'clear' method on
4097 the environment instead of resetting it.
4098
0335ac6d
JB
40992017-08-15 John Baldwin <jhb@FreeBSD.org>
4100
4101 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4102 platforms.
4103
d3abe1c8
TT
41042017-08-14 Tom Tromey <tom@tromey.com>
4105
4106 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4107 (print_binary_chars): Likewise.
4108 (BITS_IN_BYTES): Remove.
4109
d6382fff
TT
41102017-08-14 Tom Tromey <tom@tromey.com>
4111
4112 PR gdb/21675
4113 * valprint.c (LOW_ZERO): Change value to 034.
4114 (print_octal_chars): Add static_asserts for octal constants.
4115 * printcmd.c (print_scalar_formatted): Add 'd' case.
4116
f978cb06
TT
41172017-08-11 Tom Tromey <tom@tromey.com>
4118
4119 * symfile.c (add_symbol_file_command): Use std::vector.
4120
2f5404b3
TT
41212017-08-14 Tom Tromey <tom@tromey.com>
4122
4123 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4124 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4125 std::move.
4126 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4127
de7985c3
PA
41282017-08-11 Pedro Alves <palves@redhat.com>
4129
4130 * infrun.c (process_event_stop_test): Adjust
4131 function_name_is_marked_for_skip call.
4132 * skip.c: Include <list>.
4133 (skiplist_entry): Make it a class with private fields, and
4134 getters/setters.
4135 (skiplist_entry_chain): Delete.
4136 (skiplist_entries): New.
4137 (skiplist_entry_count): Delete.
4138 (highest_skiplist_entry_num): New.
4139 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4140 (add_skiplist_entry): Delete.
4141 (skiplist_entry::skiplist_entry): New.
4142 (skiplist_entry::add_entry): New.
4143 (skip_file_command, skip_function): Adjust.
4144 (compile_skip_regexp): Delete.
4145 (skip_command): Don't compile regexp here. Adjust to use
4146 skiplist_entry::add_entry.
4147 (skip_info): Adjust to use range-for and getters.
4148 (skip_enable_command, skip_disable_command): Adjust to use
4149 range-for and setters.
4150 (skip_delete_command): Adjust to use std::list.
4151 (add_skiplist_entry): Delete.
4152 (skip_file_p): Delete, refactored as ...
4153 (skiplist_entry::do_skip_file_p): ... this new method.
4154 (skip_gfile_p): Delete, refactored as ...
4155 (skiplist_entry::do_gskip_file_p): ... this new method.
4156 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4157 (skiplist_entry::skip_function_p): ... this new method.
4158 (function_name_is_marked_for_skip): Now returns bool, and takes
4159 the function sal by const reference. Adjust to use range-for and
4160 skiplist_entry methods.
4161 (_initialize_step_skip): Remove references to
4162 skiplist_entry_chain, skiplist_entry_count.
4163 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4164 takes the function sal by const reference.
4165
be7d3cd5
YQ
41662017-08-11 Yao Qi <yao.qi@linaro.org>
4167
4168 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4169 (dwarf2_frame_cache): Remove reset_cache_cleanup.
4170 (dwarf2_frame_cache):
4171 * frame-unwind.c (frame_unwind_try_unwinder): Catch
4172 RETURN_MASK_ALL and set *this_case to NULL.
4173 * frame-unwind.h: Update comments.
4174
1c90d9f0
YQ
41752017-08-11 Yao Qi <yao.qi@linaro.org>
4176
4177 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4178 (dwarf2_frame_state_copy_regs): Remove.
4179 (dwarf2_frame_state_free_regs): Remove.
4180 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4181 (dwarf2_restore_rule): Call method .alloc_regs instead of
4182 dwarf2_frame_state_alloc_regs.
4183 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
4184 constructor. Call std::move.
4185 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4186 (dwarf2_frame_cache): Likewise.
4187
4188 [GDB_SELF_TEST]: Include selftest.h and
4189 selftest-arch.h.
4190 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4191 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4192 execute_cfa_program_test.
4193
4194 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4195 copy ctor, assignment operator, move assignment.
4196 <alloc_regs>: New method.
4197 <swap>: New method.
4198 (struct dwarf2_frame_state): Delete dtor.
4199 (dwarf2_frame_state_alloc_regs): Remove declaration.
4200 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4201 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4202
afe37d6b
YQ
42032017-08-11 Yao Qi <yao.qi@linaro.org>
4204
4205 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4206 (dwarf2_frame_state::dwarf2_frame_state): New.
4207 (dwarf2_frame_state::~dwarf2_frame_state): New.
4208 (dwarf2_fetch_cfa_info): Update.
4209 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
4210 rather than a pointer. Update code.
4211 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4212 dtor.
4213 <data_align, code_align, retaddr_column>: Change them to const.
4214 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4215 to bool.
4216
b348037f
YQ
42172017-08-11 Yao Qi <yao.qi@linaro.org>
4218
4219 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4220 <loc.exp>: New field.
4221 * dwarf2-frame.c (execute_cfa_program): Update.
4222 (dwarf2_frame_prev_register): Update.
4223
e7c9de26
PA
42242017-08-10 Pedro Alves <palves@redhat.com>
4225
4226 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4227
e8c6b620
JB
42282017-08-09 John Baldwin <jhb@FreeBSD.org>
4229
4230 * fbsd-nat.c (struct fbsd_fork_info): Remove.
4231 (fbsd_pending_children): Use std::list.
4232 (fbsd_remember_child): Likewise.
4233 (fbsd_is_child_pending): Likewise.
4234 (fbsd_pending_vfork_done): Use std::forward_list.
4235 (fbsd_add_vfork_done): Likewise.
4236 (fbsd_is_vfork_done_pending): Likewise.
4237 (fbsd_next_vfork_done): Likewise.
4238
e4a26669
JB
42392017-08-09 John Baldwin <jhb@FreeBSD.org>
4240
4241 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4242 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4243 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4244 for `mapfilename'.
4245 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 4246 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 4247
142311d3
JB
42482017-08-09 John Baldwin <jhb@FreeBSD.org>
4249
4250 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4251 "filestuff.h".
4252 (fbsd_find_memory_regions): Fix `mapfile' initialization.
4253
42fa2e0e
TT
42542017-08-09 Tom Tromey <tom@tromey.com>
4255
4256 * skip.c (skiplist_entry): New constructor.
4257 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4258 (skiplist_entry::file_is_glob): Now bool.
4259 (skiplist_entry::file, skiplist_entry::function): Now
4260 std::string.
4261 (make_skip_entry): Return a unique_ptr. Use new.
4262 (free_skiplist_entry, free_skiplist_entry_cleanup)
4263 (make_free_skiplist_entry_cleanup): Remove.
4264 (skip_command, skip_disable_command, add_skiplist_entry)
4265 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4266 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4267 (function_name_is_marked_for_skip): Update.
4268 (skip_delete_command): Update. Use delete.
4269
cd3af38d
JW
42702017-08-09 Jiong Wang <jiong.wang@arm.com>
4271
4272 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4273 (aarch64_linux_core_read_description): New function.
4274 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4275
29592bde
PA
42762017-08-09 Pedro Alves <palves@redhat.com>
4277
4278 * cp-name-parser.y (cp_comp_to_string): Return a
4279 gdb::unique_xmalloc_ptr<char>.
4280 * cp-support.c (replace_typedefs_qualified_name)
4281 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4282 (cp_canonicalize_string_full): Use op= instead of explicit
4283 convertion.
4284 (cp_class_name_from_physname, method_name_from_physname)
4285 (cp_func_name, cp_remove_params): Adjust to use
4286 gdb::unique_xmalloc_ptr<char>.
4287 * cp-support.h (cp_comp_to_string): Return a
4288 gdb::unique_xmalloc_ptr<char>.
4289 * python/py-type.c (typy_lookup_type): Adjust to use
4290 gdb::unique_xmalloc_ptr<char>.
4291
b3340438
L
42922017-08-09 H.J. Lu <hongjiu.lu@intel.com>
4293
4294 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4295
e88e8651
YQ
42962017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
4297 Yao Qi <yao.qi@linaro.org>
4298
4299 * cp-support.c (cp_canonicalize_string_full): Use
4300 gdb::unique_xmalloc_ptr<char>.
4301 (cp_canonicalize_string): Likewise.
4302
f5a29eb0
YQ
43032017-08-09 Yao Qi <yao.qi@linaro.org>
4304
4305 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4306 * regformats/i386/amd64-avx-avx512.dat: Remove.
4307 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4308 * regformats/i386/amd64-avx-mpx.dat:Remove.
4309 * regformats/i386/amd64-avx.dat: Remove.
4310 * regformats/i386/amd64-mpx.dat: Remove.
4311 * regformats/i386/i386-avx-avx512.dat: Remove.
4312 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4313 * regformats/i386/i386-avx-mpx.dat: Remove.
4314 * regformats/i386/i386-mmx.dat: Remove.
4315 * regformats/i386/i386-mpx.dat: Remove.
4316
57757c2f
YQ
43172017-08-09 Yao Qi <yao.qi@linaro.org>
4318
4319 * amd64-tdep.h (tdesc_x32): Remove the declaration.
4320 * amd64-tdep.c: Don't include features/i386/x32*.c.
4321 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4322 functions.
4323 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4324 and i386/x32-avx-avx512.
4325 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4326 and i386/x32.xml.
4327 * features/i386/x32-avx-avx512.c: Removed.
4328 * features/i386/x32-avx-avx512.xml: Removed.
4329 * features/i386/x32-avx.c: Removed.
4330 * features/i386/x32-avx.xml: Removed.
4331 * features/i386/x32.c: Removed.
4332 * features/i386/x32.xml: Removed.
4333 * regformats/i386/x32-avx-avx512.dat: Removed.
4334 * regformats/i386/x32-avx.dat: Removed.
4335 * regformats/i386/x32.dat: Removed.
4336
ba7b109b
MR
43372017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4338
4339 PR breakpoints/21886
4340 * mem-break.c (default_memory_insert_breakpoint): Use
4341 `->placed_address' rather than `->reqstd_address' for the
4342 breakpoint location.
4343
e347efc3
MR
43442017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4345
4346 * arch-utils.c (default_print_insn): Remove arch/mach/endian
4347 assertions.
4348
0dba2a6c
MR
43492017-08-07 Maciej W. Rozycki <macro@imgtec.com>
4350
4351 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4352 a union of `tdep_info', `tdesc_data' and `id'.
4353 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4354 rather than `info.tdep_info'.
4355 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4356 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4357 * i386-tdep.c (i386_gdbarch_init): Likewise.
4358 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4359 * mips-tdep.c (mips_gdbarch_init): Likewise.
4360 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4361 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4362 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4363 `info.tdep_info'.
4364 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4365 `info.tdep_info'.
4366 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4367 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4368 `info.tdep_info'.
4369 * spu-tdep.c (spu_gdbarch_init): Likewise.
4370 * gdbarch.h: Regenerate.
4371
16eb6b2d
LS
43722017-08-07 Leszek Swirski <leszeks@google.com>
4373
7b005726 4374 PR symtab/20899
16eb6b2d
LS
4375 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4376
74cbb09e
SM
43772017-08-07 Simon Marchi <simon.marchi@ericsson.com>
4378
4379 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4380 (gdbsim_open): Rename gdb_argv args object to argv.
4381
ee0c3293
TT
43822017-08-05 Tom Tromey <tom@tromey.com>
4383
4384 * compile/compile-object-load.c (compile_object_load): Use
4385 gdb::unique_xmalloc_ptr.
4386 * cli/cli-dump.c (scan_filename): Rename from
4387 scan_filename_with_cleanup. Change return type.
4388 (scan_expression): Rename from scan_expression_with_cleanup.
4389 Change return type.
4390 (dump_memory_to_file, dump_value_to_file, restore_command):
4391 Use gdb::unique_xmalloc_ptr. Update.
4392 * cli/cli-cmds.c (find_and_open_script): Use
4393 gdb::unique_xmalloc_ptr.
4394 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4395 * symmisc.c (maintenance_print_symbols)
4396 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4397 * symfile.c (symfile_bfd_open, generic_load)
4398 (add_symbol_file_command, remove_symbol_file_command): Use
4399 gdb::unique_xmalloc_ptr.
4400 * source.c (openp): Use gdb::unique_xmalloc_ptr.
4401 * psymtab.c (maintenance_print_psymbols): Use
4402 gdb::unique_xmalloc_ptr.
4403 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4404 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4405 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4406 (reload_shared_libraries_1): Likewise.
4407
3232fabd
TT
44082017-08-05 Tom Tromey <tom@tromey.com>
4409
4410 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4411 (rust_op_vector, rust_set_vector): New typedefs.
4412 (current_parser): New global.
4413 (work_obstack): Change to pointer type. Update all users.
4414 (rust_ast, pstate): Remove globals.
4415 (struct rust_parser): New.
4416 (%union) <params, field_inits>: Change type.
4417 (start, tuple_expr, unit_expr, struct_expr_list, literal)
4418 (field_expr, expr_list, maybe_expr_list, type_list): Update.
4419 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4420 (convert_params_to_types, convert_params_to_expression): Change
4421 type of "params".
4422 (ast_string): Change type of "fields".
4423 (rust_parse): Make a rust_parser. Remove cleanups.
4424 (rust_lex_tests): Make and install an auto_obstack.
4425
f02fd774
YQ
44262017-08-04 Yao Qi <yao.qi@linaro.org>
4427
4428 * configure.srv (ipa_x32_linux_regobj): New.
4429 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4430 instead of X86_TDESC_AVX512.
4431 (initialize_low_tracepoint): Call
4432 init_registers_x32_avx_avx512_linux.
4433
91975afd
YQ
44342017-08-04 Yao Qi <yao.qi@linaro.org>
4435
4436 * utils.h (gdb_argv): Add namespace std for nullptr_t.
4437
2331fa3a
RK
44382017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
4439
4440 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4441
744e4fe1
TT
44422017-08-03 Tom Tromey <tom@tromey.com>
4443
4444 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4445 Remove.
4446 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4447
1c034b67
TT
44482017-08-03 Tom Tromey <tom@tromey.com>
4449
4450 * python/py-param.c (compute_enum_values): Use gdb_argv.
4451
773a1edc
TT
44522017-08-03 Tom Tromey <tom@tromey.com>
4453
4454 * utils.h (struct gdb_argv_deleter): New.
4455 (gdb_argv): New class.
4456 * utils.c (gdb_argv::reset): New method.
4457 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4458 * tracefile.c (tsave_command): Use gdb_argv.
4459 * top.c (new_ui_command): Use gdb_argv.
4460 * symmisc.c (maintenance_print_symbols)
4461 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4462 * symfile.c (symbol_file_command, generic_load)
4463 (remove_symbol_file_command): Use gdb_argv.
4464 * stack.c (backtrace_command): Use gdb_argv.
4465 * source.c (add_path, show_substitute_path_command)
4466 (unset_substitute_path_command, set_substitute_path_command):
4467 Use gdb_argv.
4468 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
4469 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4470 * remote.c (extended_remote_run, remote_put_command)
4471 (remote_get_command, remote_delete_command): Use gdb_argv.
4472 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4473 (gdbsim_open): Use gdb_argv.
4474 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4475 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4476 * procfs.c (procfs_info_proc): Use gdb_argv.
4477 * interps.c (interpreter_exec_cmd): Use gdb_argv.
4478 * infrun.c (handle_command): Use gdb_argv.
4479 * inferior.c (add_inferior_command, clone_inferior_command):
4480 Use gdb_argv.
4481 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4482 * exec.c (exec_file_command): Use gdb_argv.
4483 * cli/cli-cmds.c (alias_command): Use gdb_argv.
4484 * compile/compile.c (build_argc_argv): Use gdb_argv.
4485
0d50bde3
TT
44862017-08-03 Tom Tromey <tom@tromey.com>
4487
4488 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4489
7f968c89
TT
44902017-08-03 Tom Tromey <tom@tromey.com>
4491
4492 * python/python.c (compute_python_string): Return std::string.
4493 (gdbpy_eval_from_control_command): Update.
4494 (do_start_initialization): Use std::string.
4495 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4496 xstrprintf.
4497 * python/py-breakpoint.c (local_setattro): Use string_printf, not
4498 xstrprintf.
4499
3c9ebddd
TT
45002017-08-03 Tom Tromey <tom@tromey.com>
4501
4502 * top.h (do_restore_instream_cleanup): Remove.
4503 * top.c (do_restore_instream_cleanup): Remove.
4504 (read_command_file): Use scoped_restore.
4505 * cli/cli-script.c (execute_user_command): Use scoped_restore.
4506
b51b225e
TT
45072017-08-03 Tom Tromey <tom@tromey.com>
4508
4509 * cli/cli-script.c (execute_user_command)
4510 (execute_control_command): Use scoped_restore.
4511
ac991630
TT
45122017-08-03 Tom Tromey <tom@tromey.com>
4513
4514 * cli/cli-script.c (do_restore_user_call_depth): Remove.
4515 (execute_user_command): Remove user_call_depth; use
4516 user_args_stack's size instead.
4517
898e0c8e
TT
45182017-08-03 Tom Tromey <tom@tromey.com>
4519
4520 * top.h (in_user_command): Remove.
4521 * top.c (in_user_command): Remove.
4522 * cli/cli-script.c (do_restore_user_call_depth)
4523 (execute_user_command): Update.
4524
26fcd5d7
TT
45252017-08-03 Tom Tromey <tom@tromey.com>
4526
4527 * valops.c (search_struct_method): Use gdb::byte_vector.
4528 * valarith.c (value_concat): Use std::vector.
4529 * target.c (memory_xfer_partial): Use gdb::byte_vector.
4530 (simple_search_memory): Likewise.
4531 * printcmd.c (find_string_backward): Use gdb::byte_vector.
4532 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4533 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4534 * elfread.c (elf_rel_plt_read): Use std::string.
4535 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4536 * cli/cli-dump.c (restore_section_callback): Use
4537 gdb::byte_vector.
4538
7c218e6c
TT
45392017-08-03 Tom Tromey <tom@tromey.com>
4540
4541 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4542
31b68d4a
TT
45432017-08-03 Tom Tromey <tom@tromey.com>
4544
4545 * tui/tui-regs.c (tui_restore_gdbout): Remove.
4546 (tui_register_format): Use scoped_restore.
4547
2ec845e7
TT
45482017-08-03 Tom Tromey <tom@tromey.com>
4549
4550 * reverse.c (exec_direction_default): Remove.
4551 (exec_reverse_once): Use scoped_restore.
4552 * remote.c (restore_remote_timeout): Remove.
4553 (remote_flash_erase, remote_flash_write, remote_flash_done)
4554 (readchar, remote_serial_write): Use scoped_restore.
4555 * cli/cli-script.c (struct source_cleanup_lines_args)
4556 (source_cleanup_lines): Remove.
4557 (script_from_file): Use scoped_restore.
4558 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4559 (source_command): Use scoped_restore.
4560
b3bc8453
TT
45612017-08-03 Tom Tromey <tom@tromey.com>
4562
4563 * utils.h (make_cleanup_free_so): Remove.
4564 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4565 * solist.h (struct so_deleter): New.
4566 (so_list_up): New typedef.
4567 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4568
e3ad2841
TT
45692017-08-03 Tom Tromey <tom@tromey.com>
4570
4571 * utils.h (make_cleanup_restore_current_language): Remove.
4572 * utils.c (do_restore_current_language)
4573 (make_cleanup_restore_current_language): Remove.
4574 * parse.c (parse_exp_in_context_1)
4575 (parse_expression_with_language): Use
4576 scoped_restore_current_language.
4577 * mi/mi-main.c (mi_cmd_execute): Use
4578 scoped_restore_current_language.
4579 * language.h (scoped_restore_current_language): New class.
4580
b80cf838
TT
45812017-08-03 Tom Tromey <tom@tromey.com>
4582
4583 * compile/compile.c (cleanup_unlink_file): Remove.
4584 (compile_to_object): Use gdb::unlinker.
4585 (eval_compile_command): Likewise.
4586
fad0444a
TT
45872017-08-03 Tom Tromey <tom@tromey.com>
4588
4589 * utils.h (make_cleanup_fclose): Remove.
4590 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4591
6e7bc05c
TT
45922017-08-03 Tom Tromey <tom@tromey.com>
4593
4594 * top.c (open_terminal_stream): Return gdb_file_up.
4595 (new_ui_command): Update.
4596
4a45905b
TT
45972017-08-03 Tom Tromey <tom@tromey.com>
4598
4599 * source.c (print_source_lines_base, forward_search_command)
4600 (reverse_search_command): Use gdb_file_up.
4601
7cd06d6e
TT
46022017-08-03 Tom Tromey <tom@tromey.com>
4603
4604 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4605
ed166945
TT
46062017-08-03 Tom Tromey <tom@tromey.com>
4607
4608 * cli/cli-cmds.c (find_and_open_script): Change return type.
4609 Remove "streamp" and "full_path" parameters.
4610 (source_script_with_search): Update.
4611 * auto-load.c (source_script_file): Update.
4612 * cli/cli-cmds.h (find_and_open_script): Change type.
4613 (open_script): New struct.
4614
d419f42d
TT
46152017-08-03 Tom Tromey <tom@tromey.com>
4616
4617 * xml-support.c (xml_fetch_content_from_file): Update.
4618 * ui-file.c (stdio_file::open): Update.
4619 * tracefile-tfile.c (tfile_start): Update.
4620 * remote.c (remote_file_put, remote_file_get): Update.
4621 * nat/linux-procfs.c (linux_proc_get_int)
4622 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4623 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4624 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4625 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4626 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4627 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4628 * linux-nat.c (linux_proc_pending_signals): Update.
4629 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4630 (file_closer): Remove.
4631 * compile/compile.c (compile_to_object): Update.
4632 * common/filestuff.h (struct gdb_file_deleter): New.
4633 (gdb_file_up): New typedef.
4634 (gdb_fopen_cloexec): Change return type.
4635 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4636 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4637 (dump_binary_file, restore_binary_file): Update.
4638 * auto-load.c (auto_load_objfile_script_1): Update.
4639
4a2b031d
TT
46402017-08-03 Tom Tromey <tom@tromey.com>
4641
4642 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4643 (info_static_tracepoint_markers_command): Likewise.
4644 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4645 * skip.c (skip_info): Use ui_out_emit_table.
4646 * progspace.c (print_program_space): Use ui_out_emit_table.
4647 * osdata.c (info_osdata): Use ui_out_emit_table.
4648 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4649 ui_out_emit_table.
4650 * linux-thread-db.c (info_auto_load_libthread_db): Use
4651 ui_out_emit_table.
4652 * inferior.c (print_inferior): Use ui_out_emit_table.
4653 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4654 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4655 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4656 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4657 * ui-out.h (class ui_out_emit_table): New.
4658
a4f320fd
MR
46592017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4660
4661 * mips-tdep.c (mips_fpu_type_str): New function.
4662 (mips_dump_tdep): Call it.
4663
a2f1f308
MR
46642017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4665
4666 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4667 `->mips_fpu_type'.
4668
7e5ed83b
XR
46692017-07-31 Xavier Roirand <roirand@adacore.com>
4670
4671 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4672
4c9dc811
XR
46732017-07-27 Xavier Roirand <roirand@adacore.com>
4674
4675 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4676
27d41eac
YQ
46772017-07-26 Yao Qi <yao.qi@linaro.org>
4678
4679 * cli/cli-cmds.c (maintenancechecklist): New variable.
4680 * gdbcmd.h (maintenancechecklist): Declare it.
4681 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4682 Call i386_linux_read_description with different masks.
4683 * maint.c (maintenance_check_command): New function.
4684 (_initialize_maint_cmds): Call add_prefix_cmd.
4685 * target-descriptions.c (tdesc_reg): override operator != and ==.
4686 (tdesc_type): Likewise.
4687 (tdesc_feature): Likewise.
4688 (target_desc): Likewise.
4689 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4690 (maintenance_check_xml_descriptions): New function.
4691 (_initialize_target_descriptions) Add command "xml-descriptions".
4692 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4693
ea03d0d3
YQ
46942017-07-26 Yao Qi <yao.qi@linaro.org>
4695
4696 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4697 Include features/i386/32bit-*.c.
4698 (i386_linux_read_description): Generate target description if it
4699 doesn't exist.
4700 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4701 functions.
4702 * features/i386/32bit-linux.c: Re-generated.
4703 * features/i386/32bit-sse.c: Likewise.
4704 * target-descriptions.c (print_c_feature::visit): Print code to
4705 set register number if needed.
4706 (print_c_feature) <m_next_regnum>: New field.
4707
25aa13e5
YQ
47082017-07-26 Yao Qi <yao.qi@linaro.org>
4709
4710 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4711 (FEATURE_XMLFILES): New.
4712 (FEATURE_CFILES): New.
4713 New rules.
4714 (clean-cfiles): Remove generated c files.
4715 * features/i386/32bit-avx.c: Generated.
4716 * features/i386/32bit-avx512.c: Generated.
4717 * features/i386/32bit-core.c: Generated.
4718 * features/i386/32bit-linux.c: Generated.
4719 * features/i386/32bit-mpx.c: Generated.
4720 * features/i386/32bit-pkeys.c: Generated.
4721 * features/i386/32bit-sse.c: Generated.
4722 * target-descriptions.c: Include algorithm.
4723 (tdesc_element_visitor): Add method visit_end.
4724 (print_c_tdesc): Implement visit_end.
4725 (print_c_tdesc:: m_filename_after_features): Move it to
4726 protected.
4727 (print_c_feature): New class.
4728 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4729 name starts with "i386/32bit-".
4730
6eb1e6a8
YQ
47312017-07-26 Yao Qi <yao.qi@linaro.org>
4732
4733 * target-descriptions.c (tdesc_element_visitor): New class.
4734 (tdesc_element): New class.
4735 (tdesc_reg): Inherit from tdesc_element.
4736 (tdesc_reg::accept): New function.
4737 (tdesc_type): Inherit from tdesc_element.
4738 (tdesc_type::accept): New function.
4739 (tdesc_feature): Inherit from tdesc_element.
4740 (tdesc_feature::accept): New function.
4741 (target_desc): Inherit from tdesc_element.
4742 (target_desc::target_desc): New.
4743 (target_desc::~target_desc): New.
4744 (target_desc::accept): New.
4745 (allocate_target_description): Use new.
4746 (free_target_description): Use delete.
4747 (print_c_tdesc): New class.
4748 (maint_print_c_tdesc_cmd): Adjust.
4749
4750 * features/aarch64.c: Re-generated.
4751 * features/arc-arcompact.c: Re-generated.
4752 * features/arc-v2.c: Re-generated.
4753 * features/arm/arm-with-iwmmxt.c: Re-generated.
4754 * features/arm/arm-with-m.c: Re-generated.
4755 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4756 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4757 * features/arm/arm-with-neon.c: Re-generated.
4758 * features/arm/arm-with-vfpv2.c: Re-generated.
4759 * features/arm/arm-with-vfpv3.c: Re-generated.
4760 * features/i386/amd64-avx-avx512.c: Re-generated.
4761 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4762 * features/i386/amd64-avx.c: Re-generated.
4763 * features/i386/amd64-avx-linux.c: Re-generated.
4764 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4765 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4766 * features/i386/amd64-avx-mpx.c: Re-generated.
4767 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4768 * features/i386/amd64.c: Re-generated.
4769 * features/i386/amd64-linux.c: Re-generated.
4770 * features/i386/amd64-mpx.c: Re-generated.
4771 * features/i386/amd64-mpx-linux.c: Re-generated.
4772 * features/i386/i386-avx-avx512.c: Re-generated.
4773 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4774 * features/i386/i386-avx.c: Re-generated.
4775 * features/i386/i386-avx-linux.c: Re-generated.
4776 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4777 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4778 * features/i386/i386-avx-mpx.c: Re-generated.
4779 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4780 * features/i386/i386.c: Re-generated.
4781 * features/i386/i386-linux.c: Re-generated.
4782 * features/i386/i386-mmx.c: Re-generated.
4783 * features/i386/i386-mmx-linux.c: Re-generated.
4784 * features/i386/i386-mpx.c: Re-generated.
4785 * features/i386/i386-mpx-linux.c: Re-generated.
4786 * features/i386/x32-avx-avx512.c: Re-generated.
4787 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4788 * features/i386/x32-avx.c: Re-generated.
4789 * features/i386/x32-avx-linux.c: Re-generated.
4790 * features/i386/x32.c: Re-generated.
4791 * features/i386/x32-linux.c: Re-generated.
4792 * features/microblaze.c: Re-generated.
4793 * features/microblaze-with-stack-protect.c: Re-generated.
4794 * features/mips64-dsp-linux.c: Re-generated.
4795 * features/mips64-linux.c: Re-generated.
4796 * features/mips-dsp-linux.c: Re-generated.
4797 * features/mips-linux.c: Re-generated.
4798 * features/nds32.c: Re-generated.
4799 * features/nios2.c: Re-generated.
4800 * features/nios2-linux.c: Re-generated.
4801 * features/rs6000/powerpc-32.c: Re-generated.
4802 * features/rs6000/powerpc-32l.c: Re-generated.
4803 * features/rs6000/powerpc-403.c: Re-generated.
4804 * features/rs6000/powerpc-403gc.c : Re-generated.
4805 * features/rs6000/powerpc-405.c: Re-generated.
4806 * features/rs6000/powerpc-505.c: Re-generated.
4807 * features/rs6000/powerpc-601.c: Re-generated.
4808 * features/rs6000/powerpc-602.c: Re-generated.
4809 * features/rs6000/powerpc-603.c: Re-generated.
4810 * features/rs6000/powerpc-604.c: Re-generated.
4811 * features/rs6000/powerpc-64.c: Re-generated.
4812 * features/rs6000/powerpc-64l.c: Re-generated.
4813 * features/rs6000/powerpc-7400.c: Re-generated.
4814 * features/rs6000/powerpc-750.c: Re-generated.
4815 * features/rs6000/powerpc-860.c: Re-generated.
4816 * features/rs6000/powerpc-altivec32.c: Re-generated.
4817 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4818 * features/rs6000/powerpc-altivec64.c: Re-generated.
4819 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4820 * features/rs6000/powerpc-cell32l.c: Re-generated.
4821 * features/rs6000/powerpc-cell64l.c: Re-generated.
4822 * features/rs6000/powerpc-e500.c: Re-generated.
4823 * features/rs6000/powerpc-e500l.c: Re-generated.
4824 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4825 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4826 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4827 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4828 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4829 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4830 * features/rs6000/powerpc-vsx32.c: Re-generated.
4831 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4832 * features/rs6000/powerpc-vsx64.c: Re-generated.
4833 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4834 * features/rs6000/rs6000.c: Re-generated.
4835 * features/s390-linux32.c: Re-generated.
4836 * features/s390-linux32v1.c: Re-generated.
4837 * features/s390-linux32v2.c: Re-generated.
4838 * features/s390-linux64.c: Re-generated.
4839 * features/s390-linux64v1.c: Re-generated.
4840 * features/s390-linux64v2.c: Re-generated.
4841 * features/s390-te-linux64.c: Re-generated.
4842 * features/s390-tevx-linux64.c: Re-generated.
4843 * features/s390-vx-linux64.c: Re-generated.
4844 * features/s390x-linux64.c: Re-generated.
4845 * features/s390x-linux64v1.c: Re-generated.
4846 * features/s390x-linux64v2.c: Re-generated.
4847 * features/s390x-te-linux64.c: Re-generated.
4848 * features/s390x-tevx-linux64.c: Re-generated.
4849 * features/s390x-vx-linux64.c: Re-generated.
4850 * features/sparc/sparc32-solaris.c: Re-generated.
4851 * features/sparc/sparc64-solaris.c: Re-generated.
4852 * features/tic6x-c62x.c: Re-generated.
4853 * features/tic6x-c62x-linux.c: Re-generated.
4854 * features/tic6x-c64x.c: Re-generated.
4855 * features/tic6x-c64x-linux.c: Re-generated.
4856 * features/tic6x-c64xp.c: Re-generated.
4857 * features/tic6x-c64xp-linux.c: Re-generated.
4858
35b4818d
YQ
48592017-07-26 Yao Qi <yao.qi@linaro.org>
4860
4861 * i386-linux-tdep.c (i386_linux_read_description): New function.
4862 (i386_linux_core_read_description): Call
4863 i386_linux_read_description.
4864 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4865 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4866 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4867 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4868 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4869 * x86-linux-nat.c (x86_linux_read_description): Call
4870 i386_linux_read_description.
4871
8e2141c6
YQ
48722017-07-26 Yao Qi <yao.qi@linaro.org>
4873
4874 * NEWS: Mention it.
4875 * features/Makefile (%.c: %.xml): Pass the xml file name to
4876 command "maint print c-tdesc".
4877 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4878 name from 'arg'.
4879
b468ff4c
YQ
48802017-07-26 Yao Qi <yao.qi@linaro.org>
4881
4882 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4883 in-class initialization.
4884 (tdesc_create_feature): Call new instead of XCNEW.
4885 (free_target_description): Ue delete.
4886
b9c0e1b4
JB
48872017-07-25 John Baldwin <jhb@FreeBSD.org>
4888
4889 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4890
a04b5337
YQ
48912017-07-25 Yao Qi <yao.qi@linaro.org>
4892
4893 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4894 constant.
4895 (amd64_x32_init_abi): Likewise.
4896 * amd64-tdep.h (amd64_init_abi): Update declaration.
4897 (amd64_x32_init_abi): Likewise.
4898
02ad7fc2
YQ
48992017-07-25 Yao Qi <yao.qi@linaro.org>
4900
4901 PR tdep/21717
4902 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4903 condition for FPSCR.
4904 (arm_linux_store_inferior_registers): Likewise.
4905
b6f48cb0
TT
49062017-07-22 Tom Tromey <tom@tromey.com>
4907
4908 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4909 <syscalls_counts>: Now a std::vector.
4910 (get_catch_syscall_inferior_data): Use "new".
4911 (catch_syscall_inferior_data_cleanup): Use "delete".
4912 (insert_catch_syscall, remove_catch_syscall)
4913 (clear_syscall_counts): Update.
4914
e12c9b7a
TT
49152017-07-22 Tom Tromey <tom@tromey.com>
4916
4917 * break-catch-syscall.c (syscall_catchpoint)
4918 <syscalls_to_be_caught>: Now a std::vector<int>
4919 (~syscall_catchpoint): Remove.
4920 (insert_catch_syscall, remove_catch_syscall)
4921 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4922 (print_mention_catch_syscall, print_recreate_catch_syscall):
4923 Update.
4924 (create_syscall_event_catchpoint): Change type of "filter"
4925 parameter.
4926 (catch_syscall_split_args): Return a std::vector.
4927 (catch_syscall_command_1, catching_syscall_number_1): Update.
4928
4fa8aeac
TT
49292017-07-22 Tom Tromey <tom@tromey.com>
4930
4931 * break-catch-throw.c (struct exception_catchpoint)
4932 <exception_rx>: Now a std::string.
4933 (~exception_catchpoint): Remove.
4934 (print_one_detail_exception_catchpoint): Update.
4935 (handle_gnu_v3_exceptions): Change type of except_rx.
4936 (extract_exception_regexp): Return a std::string.
4937 (catch_exception_command_1): Update.
4938
f746a154
TT
49392017-07-22 Tom Tromey <tom@tromey.com>
4940
4941 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4942 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4943 std::vector.
4944 <catch_all>: Now a bool.
4945 (~signal_catchpoint): Remove.
4946 (signal_catchpoint_insert_location)
4947 (signal_catchpoint_remove_location)
4948 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4949 (signal_catchpoint_print_mention)
4950 (signal_catchpoint_print_recreate)
4951 (signal_catchpoint_explains_signal): Update.
4952 (create_signal_catchpoint): Change type of "filter" and
4953 "catch_all".
4954 (catch_signal_split_args): Return a std::vector. Change type of
4955 "catch_all".
4956 (catch_signal_command): Update.
4957
47e77640
PA
49582017-07-20 Pedro Alves <palves@redhat.com>
4959
4960 * ada-lang.c (ada_language_defn): Make extern.
4961 (_initialize_ada_language): Remove add_language call.
4962 * c-lang.c (c_language_defn, cplus_language_defn)
4963 (asm_language_defn, minimal_language_defn): Make extern.
4964 (_initialize_c_language): Delete.
4965 * completer.c (compare_cstrings): Delete, moved to utils.h.
4966 * d-lang.c (d_language_defn): Make extern.
4967 (_initialize_d_language): Remove add_language calls.
4968 * defs.h (enum language): Add comment.
4969 * f-lang.c (f_language_defn): Make extern.
4970 (_initialize_f_language): Remove add_language call.
4971 * go-lang.c (go_language_defn): Make extern.
4972 (_initialize_go_language): Remove add_language call.
4973 * language.c: Include <algorithm>.
4974 (languages): Redefine as const array.
4975 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4976 (set_language_command): Handle "local". Use for-range loop.
4977 (set_language): Remove loop.
4978 (language_enum): Rewrite.
4979 (language_def, language_str): Remove loops.
4980 (add_language): Delete.
4981 (add_set_language_command): New, based on add_languages.
4982 (skip_language_trampoline): Adjust.
4983 (local_language_defn): Delete.
4984 (language_gdbarch_post_init): Adjust.
4985 (_initialize_language): Remove add_language calls. Call
4986 add_set_language_command.
4987 * language.h (add_language): Delete.
4988 (auto_language_defn)
4989 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4990 (asm_language_defn, c_language_defn, cplus_language_defn)
4991 (d_language_defn, f_language_defn, go_language_defn)
4992 (m2_language_defn, objc_language_defn, opencl_language_defn)
4993 (pascal_language_defn, rust_language_defn): Declare.
4994 * m2-lang.c (m2_language_defn): Make extern.
4995 (_initialize_m2_language): Remove add_language call.
4996 * objc-lang.c (objc_language_defn): Make extern.
4997 (_initialize_objc_language): Remove add_language call.
4998 * opencl-lang.c (opencl_language_defn): Make extern.
4999 (_initialize_opencl_language): Remove add_language call.
5000 * p-lang.c (pascal_language_defn): Make extern.
5001 (_initialize_pascal_language): Delete.
5002 * rust-lang.c (rust_language_defn): Make extern.
5003 (_initialize_rust_language): Delete.
5004 * utils.h (compare_cstrings): New static inline function.
5005
edb0c9cb
PA
50062017-07-20 Pedro Alves <palves@redhat.com>
5007
5008 * ada-lang.c (ada_to_fixed_type_1): Adjust.
5009 (get_var_value): Constify parameters.
5010 (get_int_var_value): Change prototype.
5011 (to_fixed_range_type): Adjust.
5012 * ada-lang.h (get_int_var_value): Change prototype.
5013
a778f165
PA
50142017-07-20 Pedro Alves <palves@redhat.com>
5015
5016 * dwarf2read.c (dw2_lookup_symbol): Use
5017 SYMBOL_MATCHES_SEARCH_NAME.
5018 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5019
42edd901
PA
50202017-07-20 Pedro Alves <palves@redhat.com>
5021
5022 * block.c (block_iter_name_step, block_iter_name_first)
5023 (block_iter_name_next): Delete.
5024 (block_lookup_symbol_primary): Adjust to use
5025 dict_iter_match_first/dict_iter_match_next.
5026 * block.h (block_iter_name_first, block_iter_name_next): Delete
5027 declarations.
5028 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5029 dict_iter_match_first/dict_iter_match_next.
5030
cf325299
PA
50312017-07-20 Pedro Alves <palves@redhat.com>
5032
5033 * cp-support.c (cp_find_first_component_aux): Add missing case for
5034 end of string.
5035
c5ed0576
DB
50362017-07-18 David Blaikie <dblaikie@gmail.com>
5037
5038 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5039 of dwo_cu's dwo_file.
5040
27841e76
YQ
50412017-07-18 Yao Qi <yao.qi@linaro.org>
5042
5043 * remote.c (store_registers_using_G): Remove one line comment.
5044
cfb7e58b
YQ
50452017-07-18 Yao Qi <yao.qi@linaro.org>
5046
5047 * regcache.c (regcache_cpy): Simplify it.
5048 (regcache::cpy_no_passthrough): Remove it.
5049 * regcache.h (cpy_no_passthrough): Remove it.
5050 (regcache_dup, regcache_cpy): Update comments.
5051
386535dd
PA
50522017-07-18 Pedro Alves <palves@redhat.com>
5053
5054 * remote-sim.c (sim_command_completer): Adjust to work with a
5055 completion_tracker instead of a VEC.
5056
c45ec17c
PA
50572017-07-17 Pedro Alves <palves@redhat.com>
5058
5059 * completer.c (complete_source_filenames): New function.
5060 (complete_address_and_linespec_locations): New function.
5061 (location_completer): Use complete_address_and_linespec_locations.
5062 (completion_tracker::build_completion_result): Honor the tracker's
5063 request to suppress append.
5064 * completer.h (completion_tracker::suppress_append_ws)
5065 (completion_tracker::set_suppress_append_ws): New methods.
5066 (completion_tracker::m_suppress_append_ws): New field.
5067 (complete_source_filenames): New declaration.
5068 * linespec.c (linespec_complete_what): New.
5069 (struct ls_parser) <complete_what, completion_word,
5070 completion_quote_char, completion_quote_end, completion_tracker>:
5071 New fields.
5072 (string_find_incomplete_keyword_at_end): New.
5073 (linespec_lexer_lex_string): Record quote char. If in completion
5074 mode, don't throw.
5075 (linespec_lexer_consume_token): Advance the completion word point.
5076 (linespec_lexer_peek_token): Save/restore completion info.
5077 (save_stream_and_consume_token): New.
5078 (set_completion_after_number): New.
5079 (linespec_parse_basic): Set what to complete next depending on
5080 token. Handle function and label completions specially.
5081 (parse_linespec): Disable objc shortcut in completion mode. Set
5082 what to complete next depending on token type. Skip keyword if in
5083 completion mode.
5084 (complete_linespec_component, linespec_complete): New.
5085 * linespec.h (linespec_complete): Declare.
5086
be966d42
PA
50872017-07-17 Pedro Alves <palves@redhat.com>
5088
5089 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5090 Handle 'operator<' / 'operator<<'.
5091
a2459270
PA
50922017-07-17 Pedro Alves <palves@redhat.com>
5093
5094 * completer.c (collect_explicit_location_matches): Handle
5095 MATCH_LABEL.
5096 (convert_explicit_location_to_linespec): New, factored out from
5097 ...
5098 (convert_explicit_location_to_sals): ... this.
5099 (complete_label): New.
5100 (linespec_complete_label, find_label_symbols_in_block): New.
5101 (find_label_symbols): Add completion_mode parameter and adjust to
5102 call find_label_symbols_in_block.
5103 * linespec.h (linespec_complete_label): Declare.
5104
c6756f62
PA
51052017-07-17 Pedro Alves <palves@redhat.com>
5106
5107 * ada-lang.c (ada_collect_symbol_completion_matches): Add
5108 complete_symbol_mode parameter.
5109 * cli/cli-cmds.c (complete_command): Get the completion result out
5110 of the handle_brkchars tracker if used a custom word point.
5111 * completer.c: Include "linespec.h".
5112 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5113 (advance_to_expression_complete_word_point): New.
5114 (completion_tracker::completes_to_completion_word): New.
5115 (complete_files_symbols): Pass down
5116 complete_symbol_mode::EXPRESSION.
5117 (explicit_options, probe_options): New.
5118 (collect_explicit_location_matches): Complete on the
5119 explictit_loc->foo instead of word. Use
5120 linespec_complete_function. Handle MATCH_LINE. Handle offering
5121 keyword and options completions.
5122 (backup_text_ptr): Delete.
5123 (skip_keyword): New.
5124 (complete_explicit_location): Remove 'word' parameter. Add
5125 language, quoted_arg_start and quoted_arg_end parameters.
5126 Rewrite, parsing left to right.
5127 (location_completer): Rewrite.
5128 (location_completer_handle_brkchars): New function.
5129 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5130 (enum complete_line_internal_reason): Adjust comments.
5131 (completion_tracker::discard_completions): New.
5132 (completer_handle_brkchars_func_for_completer): Handle
5133 location_completer.
5134 (gdb_custom_word_point_brkchars)
5135 (gdb_org_rl_basic_quote_characters): New.
5136 (gdb_completion_word_break_characters_throw)
5137 (completion_find_completion_word): Handle trackers that use a
5138 custom word point.
5139 (completion_tracker::advance_custom_word_point_by): New.
5140 (completion_tracker::build_completion_result): Don't rely on
5141 readline appending the quote char.
5142 (gdb_rl_attempted_completion_function_throw): Handle trackers that
5143 use a custom word point.
5144 (gdb_rl_attempted_completion_function): Restore
5145 rl_basic_quote_characters.
5146 * completer.h (class completion_tracker): Extend intro comment.
5147 (completion_tracker::set_quote_char)
5148 (completion_tracker::quote_char)
5149 (completion_tracker::set_use_custom_word_point)
5150 (completion_tracker::use_custom_word_point)
5151 (completion_tracker::custom_word_point)
5152 (completion_tracker::set_custom_word_point)
5153 (completion_tracker::advance_custom_word_point_by)
5154 (completion_tracker::completes_to_completion_word)
5155 (completion_tracker::discard_completions): New methods.
5156 (completion_tracker::m_quote_char)
5157 (completion_tracker::m_use_custom_word_point)
5158 (completion_tracker::m_custom_word_point): New fields.
5159 (advance_to_expression_complete_word_point): Declare.
5160 * f-lang.c (f_collect_symbol_completion_matches): Add
5161 complete_symbol_mode parameter.
5162 * language.h (struct language_defn)
5163 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5164 parameter.
5165 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
5166 (linespec_complete_function): New function.
5167 (linespec_lexer_lex_keyword): Adjust.
5168 * linespec.h (linespec_keywords, linespec_complete_function): New
5169 declarations.
5170 * location.c (find_end_quote): New function.
5171 (explicit_location_lex_one): Add explicit_completion_info
5172 parameter. Save quoting info. Don't throw if being called for
5173 completion. Don't handle Ada operators here.
5174 (is_cp_operator, skip_op_false_positives, first_of)
5175 (explicit_location_lex_one_function): New function.
5176 (string_to_explicit_location): Replace 'dont_throw' parameter with
5177 an explicit_completion_info pointer parameter. Handle it. Don't
5178 use explicit_location_lex_one to lex function names. Use
5179 explicit_location_lex_one_function instead.
5180 * location.h (struct explicit_completion_info): New.
5181 (string_to_explicit_location): Replace 'dont_throw' parameter with
5182 an explicit_completion_info pointer parameter.
5183 * symtab.c (default_collect_symbol_completion_matches_break_on):
5184 Add complete_symbol_mode parameter. Handle LINESPEC mode.
5185 (default_collect_symbol_completion_matches)
5186 (collect_symbol_completion_matches): Add complete_symbol_mode
5187 parameter.
5188 (collect_symbol_completion_matches_type): Pass down
5189 complete_symbol_mode::EXPRESSION.
5190 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5191 parameter. Handle LINESPEC mode.
5192 * symtab.h (complete_symbol_mode): New.
5193 (default_collect_symbol_completion_matches_break_on)
5194 (default_collect_symbol_completion_matches)
5195 (collect_symbol_completion_matches)
5196 (collect_file_symbol_completion_matches): Add complete_symbol_mode
5197 parameter.
5198
1d550c82
PA
51992017-07-17 Pedro Alves <palves@redhat.com>
5200
5201 * utils.c (enum class strncmp_iw_mode): New.
5202 (strcmp_iw): Rename to ...
5203 (strncmp_iw_with_mode): ... this. Add string2_len and mode
5204 parameters. Handle them.
5205 (strncmp_iw): New.
5206 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5207 * utils.h (strncmp_iw): Declare.
5208 (strcmp_iw): Move describing comments here.
5209
8090b426
PA
52102017-07-17 Pedro Alves <palves@redhat.com>
5211
5212 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5213 CP_OPERATOR_STR.
5214 * c-typeprint.c (is_type_conversion_operator): Use
5215 CP_OPERATOR_STR.
5216 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5217 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5218 CP_OPERATOR_LEN.
5219 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5220 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5221 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5222 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5223 CP_OPERATOR_STR.
5224 * location.c: Include "cp-support.h".
5225 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5226 CP_OPERATOR_STR.
5227 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5228 CP_OPERATOR_LEN.
5229
6a2c1b87
PA
52302017-07-17 Pedro Alves <palves@redhat.com>
5231
5232 * cli/cli-cmds.c (complete_command): Use a completion tracker
5233 along with completion_find_completion_word for handle_brkchars
5234 phase.
5235 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5236 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5237 (struct gdb_rl_completion_word_info): New.
5238 (gdb_rl_find_completion_word): New.
5239 (completion_find_completion_word): New.
5240 * completer.h (completion_find_completion_word): Declare.
5241
eb3ff9a5
PA
52422017-07-17 Pedro Alves <palves@redhat.com>
5243
5244 * ada-lang.c (symbol_completion_match): Adjust comments.
5245 (symbol_completion_add): Replace vector parameter with
5246 completion_tracker parameter. Use it.
5247 (ada_make_symbol_completion_list): Rename to...
5248 (ada_collect_symbol_completion_matches): ... this. Add
5249 completion_tracker parameter and use it.
5250 (ada_language_defn): Adjust.
5251 * break-catch-syscall.c (catch_syscall_completer): Adjust
5252 prototype and work with completion_tracker instead of VEC.
5253 * breakpoint.c (condition_completer): Adjust prototype and work
5254 with completion_tracker instead of VEC.
5255 * c-lang.c (c_language_defn, cplus_language_defn)
5256 (asm_language_defn, minimal_language_defn): Adjust to renames.
5257 * cli/cli-cmds.c (complete_command): Rework using
5258 completion_tracker. Catch exceptions when completing.
5259 * cli/cli-decode.c (integer_unlimited_completer)
5260 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5261 with completion_tracker instead of VEC.
5262 * command.h (struct completion_tracker): Forward declare.
5263 (completer_ftype, completer_handle_brkchars_ftype): Change
5264 types.
5265 (complete_on_cmdlist, complete_on_enum): Adjust.
5266 * completer.c: Include <algorithm>.
5267 (struct gdb_completer_state): New.
5268 (current_completion): New global.
5269 (readline_line_completion_function): Delete.
5270 (noop_completer, filename_completer)
5271 (filename_completer_handle_brkchars, complete_files_symbols)
5272 (linespec_location_completer): Adjust to work with a
5273 completion_tracker instead of a VEC.
5274 (string_or_empty): New.
5275 (collect_explicit_location_matches): Adjust to work with a
5276 completion_tracker instead of a VEC.
5277 (explicit_location_completer): Rename to ...
5278 (complete_explicit_location): ... this and adjust to work with a
5279 completion_tracker instead of a VEC.
5280 (location_completer): Adjust to work with a completion_tracker
5281 instead of a VEC.
5282 (add_struct_fields): Adjust to work with a completion_list instead
5283 of VEC.
5284 (expression_completer): Rename to ...
5285 (complete_expression): ... this and adjust to work with a
5286 completion_tracker instead of a VEC. Use complete_files_symbols.
5287 (expression_completer): Reimplement on top of complete_expression.
5288 (symbol_completer): Adjust to work with a completion_tracker
5289 instead of a VEC.
5290 (enum complete_line_internal_reason): Add describing comments.
5291 (complete_line_internal_normal_command): Adjust to work with a
5292 completion_tracker instead of a VEC.
5293 (complete_line_internal): Rename to ...
5294 (complete_line_internal_1): ... this and adjust to work with a
5295 completion_tracker instead of a VEC. Assert TEXT is NULL in the
5296 handle_brkchars phase.
5297 (new_completion_tracker): Delete.
5298 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5299 complete_line_internal_1.
5300 (free_completion_tracker): Delete.
5301 (INITIAL_COMPLETION_HTAB_SIZE): New.
5302 (completion_tracker::completion_tracker)
5303 (completion_tracker::~completion_tracker): New.
5304 (maybe_add_completion): Delete.
5305 (completion_tracker::maybe_add_completion)
5306 (completion_tracker::add_completion)
5307 (completion_tracker::add_completions): New.
5308 (throw_max_completions_reached_error): Delete.
5309 (complete_line): Adjust to work with a completion_tracker instead
5310 of a VEC. Don't create a completion_tracker_t or check for max
5311 completions here.
5312 (command_completer, command_completer_handle_brkchars)
5313 (signal_completer, reg_or_group_completer_1)
5314 (reg_or_group_completer, default_completer_handle_brkchars):
5315 Adjust to work with a completion_tracker.
5316 (gdb_completion_word_break_characters_throw): New.
5317 (gdb_completion_word_break_characters): Reimplement.
5318 (line_completion_function): Delete.
5319 (completion_tracker::recompute_lowest_common_denominator)
5320 (expand_preserving_ws)
5321 (completion_tracker::build_completion_result)
5322 (completion_result::completion_result)
5323 (completion_result::completion_result)
5324 (completion_result::~completion_result)
5325 (completion_result::completion_result)
5326 (completion_result::release_match_list, compare_cstrings)
5327 (completion_result::sort_match_list)
5328 (completion_result::reset_match_list)
5329 (gdb_rl_attempted_completion_function_throw)
5330 (gdb_rl_attempted_completion_function): New.
5331 * completer.h (completion_list, struct completion_result)
5332 (class completion_tracker): New.
5333 (complete_line): Add completion_tracker parameter.
5334 (readline_line_completion_function): Delete.
5335 (gdb_rl_attempted_completion_function): New.
5336 (noop_completer, filename_completer, expression_completer)
5337 (location_completer, symbol_completer, command_completer)
5338 (signal_completer, reg_or_group_completer): Update prototypes.
5339 (completion_tracker_t, new_completion_tracker)
5340 (make_cleanup_free_completion_tracker): Delete.
5341 (enum maybe_add_completion_enum): Delete.
5342 (maybe_add_completion): Delete.
5343 (throw_max_completions_reached_error): Delete.
5344 * corefile.c (complete_set_gnutarget): Adjust to work with a
5345 completion_tracker instead of a VEC.
5346 * cp-abi.c (cp_abi_completer): Adjust to work with a
5347 completion_tracker instead of a VEC.
5348 * d-lang.c (d_language_defn): Adjust.
5349 * disasm.c (disassembler_options_completer): Adjust to work with a
5350 completion_tracker instead of a VEC.
5351 * f-lang.c (f_make_symbol_completion_list): Rename to ...
5352 (f_collect_symbol_completion_matches): ... this. Adjust to work
5353 with a completion_tracker instead of a VEC.
5354 (f_language_defn): Adjust.
5355 * go-lang.c (go_language_defn): Adjust.
5356 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5357 Adjust to work with a completion_tracker instead of a VEC.
5358 * infrun.c (handle_completer): Likewise.
5359 * interps.c (interpreter_completer): Likewise.
5360 * interps.h (interpreter_completer): Likewise.
5361 * language.c (unknown_language_defn, auto_language_defn)
5362 (local_language_defn): Adjust.
5363 * language.h (language_defn::la_make_symbol_completion_list):
5364 Rename to ...
5365 (language_defn::la_collect_symbol_completion_matches): ... this
5366 and adjust to work with a completion_tracker instead of a VEC.
5367 * m2-lang.c (m2_language_defn): Adjust.
5368 * objc-lang.c (objc_language_defn): Adjust.
5369 * opencl-lang.c (opencl_language_defn): Adjust.
5370 * p-lang.c (pascal_language_defn): Adjust.
5371 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5372 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5373 with a completion_tracker.
5374 * rust-lang.c (rust_language_defn): Adjust.
5375 * symtab.c (free_completion_list, do_free_completion_list)
5376 (return_val, completion_tracker): Delete.
5377 (completion_list_add_name, completion_list_add_symbol)
5378 (completion_list_add_msymbol, completion_list_objc_symbol)
5379 (completion_list_add_fields, add_symtab_completions): Add
5380 completion_tracker parameter and use it.
5381 (default_make_symbol_completion_list_break_on_1): Rename to...
5382 (default_collect_symbol_completion_matches_break_on): ... this.
5383 Add completion_tracker parameter and use it instead of allocating
5384 a completion tracker here.
5385 (default_make_symbol_completion_list_break_on): Delete old
5386 implementation.
5387 (default_make_symbol_completion_list): Delete.
5388 (default_collect_symbol_completion_matches): New.
5389 (make_symbol_completion_list): Delete.
5390 (collect_symbol_completion_matches): New.
5391 (make_symbol_completion_type): Rename to ...
5392 (collect_symbol_completion_matches_type): ... this. Add
5393 completion_tracker parameter and use it instead of VEC.
5394 (make_file_symbol_completion_list_1): Rename to...
5395 (collect_file_symbol_completion_matches): ... this. Add
5396 completion_tracker parameter and use it instead of VEC.
5397 (make_file_symbol_completion_list): Delete.
5398 (add_filename_to_list): Use completion_list instead of a VEC.
5399 (add_partial_filename_data::list): Now a completion_list.
5400 (make_source_files_completion_list): Work with a completion_list
5401 instead of a VEC.
5402 * symtab.h: Include "completer.h".
5403 (default_make_symbol_completion_list_break_on)
5404 (default_make_symbol_completion_list, make_symbol_completion_list)
5405 (make_symbol_completion_type, make_file_symbol_completion_list)
5406 (make_source_files_completion_list): Delete.
5407 (default_collect_symbol_completion_matches_break_on)
5408 (default_collect_symbol_completion_matches)
5409 (collect_symbol_completion_matches)
5410 (collect_symbol_completion_matches_type)
5411 (collect_file_symbol_completion_matches)
5412 (make_source_files_completion_list): New.
5413 * top.c (init_main): Don't install a rl_completion_entry_function
5414 hook. Install a rl_attempted_completion_function hook instead.
5415 * tui/tui-layout.c (layout_completer): Adjust to work with a
5416 completion_tracker.
5417 * tui/tui-regs.c (tui_reggroup_completer):
5418 * tui/tui-win.c (window_name_completer, focus_completer)
5419 (winheight_completer): Adjust to work with a completion_tracker.
5420 * value.c: Include "completer.h".
5421 (complete_internalvar): Adjust to work with a completion_tracker.
5422 * value.h (complete_internalvar): Likewise.
5423
6e1dbf8c
PA
54242017-07-17 Pedro Alves <palves@redhat.com>
5425
5426 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5427 renames.
5428 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5429 comments to completer_ftype's declaration.
5430 <completer_handle_brkchars>: Change type to
5431 completer_handle_brkchars_ftype.
5432 * command.h (completer_ftype): Add describing comment and give
5433 names to parameters.
5434 (completer_ftype_void): Rename to ...
5435 (completer_handle_brkchars_ftype) ... this. Add describing comment.
5436 (set_cmd_completer_handle_brkchars): Adjust.
5437 * completer.c (filename_completer_handle_brkchars): New function.
5438 (complete_line_internal_normal_command): New function, factored
5439 out from ...
5440 (complete_line_internal): ... here.
5441 (command_completer_handle_brkchars)
5442 (default_completer_handle_brkchars)
5443 (completer_handle_brkchars_func_for_completer): New functions.
5444 * completer.h (set_gdb_completion_word_break_characters): Delete
5445 declaration.
5446 (completer_handle_brkchars_func_for_completer): New declaration.
5447 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5448 completer_handle_brkchars_func_for_completer.
5449
78b13106
PA
54502017-07-17 Pedro Alves <palves@redhat.com>
5451
5452 * completer.c (symbol_completer): New function, based on
5453 make_symbol_completion_list_fn.
5454 * completer.h (symbol_completer): New declaration.
5455 * guile/scm-cmd.c (cmdscm_completers): Adjust.
5456 * python/py-cmd.c (completers): Adjust.
5457 * symtab.c (make_symbol_completion_list_fn): Delete.
5458 * symtab.h (make_symbol_completion_list_fn): Delete.
5459 * cli/cli-decode.c (add_cmd): Adjust.
5460
bbf2f4df
PA
54612017-07-17 Pedro Alves <palves@redhat.com>
5462
5463 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5464 * dwarf2read.c: Include "filename-seen-cache.h".
5465 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5466 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5467 * filename-seen-cache.c: New file.
5468 * filename-seen-cache.h: New file.
5469 * symtab.c: Include "filename-seen-cache.h".
5470 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5471 (create_filename_seen_cache, clear_filename_seen_cache)
5472 (delete_filename_seen_cache, filename_seen): Delete, parts moved
5473 to filename-seen-cache.h/filename-seen-cache.c.
5474 (output_source_filename, sources_info)
5475 (maybe_add_partial_symtab_filename)
5476 (make_source_files_completion_list): Adjust to use
5477 filename_seen_cache.
5478
330cdd98
PA
54792017-07-17 Pedro Alves <palves@redhat.com>
5480
5481 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5482 fields.
5483 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5484 dwarf2_debug_sections*)): New.
5485 (dwarf2_per_objfile::dwarf2_per_objfile(const
5486 dwarf2_per_objfile&)): Declare as deleted.
5487 (dwarf2_per_objfile::operator=): Declare as deleted.
5488 (dwarf2_per_objfile::dwarf2_per_objfile)
5489 (dwarf2_per_objfile::~dwarf2_per_objfile)
5490 (dwarf2_per_objfile::free_cached_comp_units): New.
5491 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5492 ctor. Call dwarf2_per_objfile's ctor manually.
5493 (dwarf2_locate_sections): Deleted/refactored as ...
5494 (dwarf2_per_objfile::locate_sections): ... this new method.
5495 (free_cached_comp_units): Defer to
5496 dwarf2_per_objfile::free_cached_comp_units.
5497 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5498
8880f2a9
TT
54992017-07-14 Tom Tromey <tom@tromey.com>
5500
5501 PR rust/21764:
5502 * rust-exp.y (convert_ast_to_expression): Add "want_type"
5503 parameter.
5504 <UNOP_SIZEOF>: Split into separate case.
5505 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
5506
65547233
TT
55072017-07-14 Tom Tromey <tom@tromey.com>
5508
5509 PR rust/21763:
5510 * symtab.c (symbol_matches_domain): Add language_rust to special
5511 case.
5512 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5513 treat LOC_TYPEDEF symbols as variables.
5514
8f14146e
PA
55152017-07-14 Pedro Alves <palves@redhat.com>
5516
5517 * symtab.c (make_file_symbol_completion_list_1): Iterate over
5518 symtabs matching all symtabs with SRCFILE as file name instead of
5519 only considering the first hit, with lookup_symtab.
5520
2347965c
SM
55212017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5522
5523 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5524 operator_name parameters.
5525 (gen_expr): Update function call.
5526
40f4af28
SM
55272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5528
5529 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5530 parameter.
5531 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5532 Likewise.
5533 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5534 parameter, use agent_expr::gdbarch instead, update function
5535 calls.
5536 (locexpr_tracepoint_var_ref): Likewise.
5537 (loclist_tracepoint_var_ref): Likewise.
5538 * ax-gdb.c (gen_trace_static_fields): Likewise.
5539 (gen_traced_pop): Likewise.
5540 (gen_frame_args_address): Likewise.
5541 (gen_frame_locals_address): Likewise.
5542 (gen_var_ref): Likewise.
5543 (gen_struct_ref_recursive): Likewise.
5544 (gen_static_field): Likewise.
5545 (gen_maybe_namespace_elt): Likewise.
5546 (gen_expr): Likewise.
5547 (gen_trace_for_var): Likewise.
5548 (gen_trace_for_expr): Likewise.
5549 (gen_trace_for_return_address): Likewise.
5550
053f8057
SM
55512017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5552
5553 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5554 parameter.
5555 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5556
6661ad48
SM
55572017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5558
5559 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5560 from ax, update calls.
5561 (gen_usual_arithmetic): Likewise.
5562 (gen_integral_promotions): Likewise.
5563 (gen_bitfield_ref): Likewise.
5564 (gen_primitive_field): Likewise.
5565 (gen_struct_ref_recursive): Likewise.
5566 (gen_struct_ref): Likewise.
5567 (gen_maybe_namespace_elt): Likewise.
5568 (gen_struct_elt_for_reference): Likewise.
5569 (gen_namespace_elt): Likewise.
5570 (gen_aggregate_elt_ref): Likewise.
5571 (gen_expr): Get gdbarch from ax, update calls.
5572 (gen_expr_binop_rest): Likewise.
5573
c55a47e7
PA
55742017-07-13 Pedro Alves <palves@redhat.com>
5575
5576 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5577 as default tdesc.
5578 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5579 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5580 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5581 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5582 tdep.
5583 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5584 Get final tdesc from the tdep.
5585 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5586 default tdesc.
5587 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5588 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5589 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5590 Use it as default tdesc.
5591 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5592 down to amd_init_abi. No longer handle fallback tdesc here.
5593 * amd64-tdep.h (tdesc_x32): Declare.
5594 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5595 parameter.
5596 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5597 as default tdesc.
5598
55efceab
AA
55992017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5600
5601 * s390-linux-tdep.c (s390_process_record): Add support for
5602 instructions new in arch12.
5603
0aa37b65
JB
56042017-07-11 John Baldwin <jhb@FreeBSD.org>
5605
5606 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5607 PT_GETFSBASE and PT_GETGSBASE.
5608 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5609 PT_SETGSBASE.
5610
48aeef91
JB
56112017-07-11 John Baldwin <jhb@FreeBSD.org>
5612
5613 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5614 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5615 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5616 those rules.
5617 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5618 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5619 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5620 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5621 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5622 * features/i386/amd64.xml: Add 64bit-segments.xml.
5623 * features/i386/amd64-avx-avx512.c: Regenerated.
5624 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5625 * features/i386/amd64-avx-mpx.c: Regenerated.
5626 * features/i386/amd64-avx.c: Regenerated.
5627 * features/i386/amd64-mpx.c: Regenerated.
5628 * features/i386/amd64.c: Regenerated.
5629 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5630 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5631 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5632 * regformats/i386/amd64-avx.dat: Regenerated.
5633 * regformats/i386/amd64-mpx.dat: Regenerated.
5634 * regformats/i386/amd64.dat: Regenerated.
5635
77c501bc
YQ
56362017-07-10 Yao Qi <yao.qi@linaro.org>
5637
5638 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5639 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5640
6dc8d757
AK
56412017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5642
5643 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5644 unsetenv.
5645 * gnulib/aclocal.m4: Regenerate.
5646 * gnulib/config.in: Regenerate.
5647 * gnulib/configure: Regenerate.
5648 * gnulib/import/Makefile.am: Regenerate.
5649 * gnulib/import/Makefile.in: Regenerate.
5650 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5651 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5652 * gnulib/import/m4/environ.m4: New file.
5653 * gnulib/import/m4/setenv.m4: New file.
5654 * gnulib/import/setenv.c: New file.
5655 * gnulib/import/unsetenv.c: New file.
5656
266934d1
SM
56572017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5658
5659 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5660 address when op is DW_OP_addr.
5661
03278692
TT
56622017-07-09 Tom Tromey <tom@tromey.com>
5663
5664 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5665 check and apply to outer type.
5666
4b654465
JB
56672017-07-07 John Baldwin <jhb@FreeBSD.org>
5668
5669 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5670 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5671 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5672 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5673
2af9fc44
JB
56742017-07-07 John Baldwin <jhb@FreeBSD.org>
5675
5676 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5677
382b69bb
JB
56782017-07-07 John Baldwin <jhb@FreeBSD.org>
5679
5680 * corelow.c (get_core_siginfo): Remove.
5681 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5682 instead of get_core_siginfo.
5683 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5684 * gdbarch.h: Re-generate.
5685 * gdbarch.c: Re-generate.
5686 * linux-tdep.c (linux_core_xfer_siginfo): New.
5687 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5688
6e5eab33
JB
56892017-07-07 John Baldwin <jhb@FreeBSD.org>
5690
5691 * corelow.c (thread_section_name): Move to ...
5692 * gdbcore.h (thread_section_name): ... here.
5693
929edea9
JB
56942017-07-07 John Baldwin <jhb@FreeBSD.org>
5695
5696 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5697 (struct siginfo32): New.
5698 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5699 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5700 via ptrace(PT_LWPINFO).
5701
762c974a
JB
57022017-07-07 John Baldwin <jhb@FreeBSD.org>
5703
5704 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5705 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5706 (fbsd_get_siginfo_type): New.
5707 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5708 (_initialize_fbsd_tdep): New.
5709
33c5cd75
DB
57102017-07-06 David Blaikie <dblaikie@gmail.com>
5711
5712 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5713 a singular dwo_unit*) to support multiple CUs in the same way that
5714 multiple TUs are supported.
5715 (create_cus_hash_table): Replace create_dwo_cu with a function for
5716 parsing multiple CUs from a DWO file.
5717 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5718 create_dwo_cu.
5719 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5720 htab_find, rather than comparing the signature to a singleton CU in
5721 the dwo_file.
5722
8455d262
PA
57232017-07-06 Pedro Alves <palves@redhat.com>
5724
5725 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5726
4da3eb35
PA
57272017-07-04 Pedro Alves <palves@redhat.com>
5728
5729 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5730 * gdbtypes.h (TYPE_STATIC): Delete.
5731 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5732 is_synchronized, is_native>: Delete.
5733 <dummy>: Bump.
5734 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5735 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5736 (TYPE_FN_FIELD_ABSTRACT): Delete.
5737
5bfd255c
SM
57382017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5739
5740 * buffer.h (buffer_finish): Fix spelling mistakes.
5741
25c54127
EZ
57422017-07-01 Eli Zaretskii <eliz@gnu.org>
5743
5744 * .dir-locals.el: Automatically switch to C-style comments in
5745 versions of Emacs that support the feature.
5746
dc4bde35
SDJ
57472017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5748 Pedro Alves <palves@redhat.com>
5749
5750 PR cli/21688
5751 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5752 (process_next_line): New variable 'inline_cmd'.
5753 Adjust 'if' clauses for "python", "compile" and "guile" to use
5754 'command_name_equals' and check for '!inline_cmd'.
5755
51ed89aa
SDJ
57562017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5757
5758 PR cli/21688
5759 * cli/cli-script.c (command_name_equals_not_inline): New function.
5760 (process_next_line): Adjust 'if' clauses for "python", "compile"
5761 and "guile" to use command_name_equals_not_inline.
5762
eb17d413
PA
57632017-06-29 Pedro Alves <palves@redhat.com>
5764
5765 * completer.c (expression_completer): Call
5766 linespec_location_completer instead of location_completer.
5767
195bcdd5
PA
57682017-06-29 Pedro Alves <palves@redhat.com>
5769
5770 * completer.c (expression_completer): Remove code that recomputes
5771 'text' from 'word'.
5772
adc764e7
YQ
57732017-06-29 Yao Qi <yao.qi@linaro.org>
5774
5775 * regformats/regdat.sh: Generate code with
5776 "ifndef IN_PROCESS_AGENT".
5777
6e75794e
PA
57782017-06-28 Pedro Alves <palves@redhat.com>
5779
5780 * command.h: Include "common/scoped_restore.h".
5781
bc491f2e
YQ
57822017-06-28 Yao Qi <yao.qi@linaro.org>
5783
5784 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5785 instead of obstack_grow.
5786
41664b45
DG
57872017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5788
5789 PR gdb/21337
5790 * symfile.c (reread_symbols): Call objfiles_changed just before
5791 read_symbols.
5792
6da67eb1
PA
57932017-06-27 Pedro Alves <palves@redhat.com>
5794
5795 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5796 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5797 (completion_list_add_symbol, completion_list_add_msymbol):
5798 ... these new functions.
5799 (add_symtab_completions)
5800 (default_make_symbol_completion_list_break_on_1): Adjust.
5801
23732b1e
PA
58022017-06-27 Pedro Alves <palves@redhat.com>
5803
5804 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5805 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5806 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5807 dtor.
5808 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5809 'storage_obstack' field an auto_obstack. In-class initialize all
5810 non-bitfield fields. Make minsyms_read bool.
5811 * symfile.c (read_symbols): Adjust.
5812
a4d1e79a
AH
58132017-06-27 Alan Hayward <alan.hayward@arm.com>
5814
5815 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5816 (gdbsim_store_register): Likewise.
5817
8268c778
PA
58182017-06-27 Pedro Alves <palves@redhat.com>
5819
5820 * c-exp.y (name_obstack): Now an auto_obstack.
5821 (yylex): Use auto_obstack::clear.
5822 (c_parse): Use auto_obstack::clear instead of reinitializing and
5823 freeing the obstack.
5824 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5825 * d-exp.y (name_obstack): Now an auto_obstack.
5826 (yylex): Use auto_obstack::clear.
5827 (d_parse): Use auto_obstack::clear instead of reinitializing and
5828 freeing the obstack.
5829 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5830 auto_obstack.
5831 * dwarf2read.c (create_addrmap_from_index)
5832 (dwarf2_build_psymtabs_hard)
5833 (update_enumeration_type_from_children): Likewise.
5834 * gdb_obstack.h (auto_obstack): New type.
5835 * go-exp.y (name_obstack): Now an auto_obstack.
5836 (build_packaged_name): Use auto_obstack::clear.
5837 (go_parse): Use auto_obstack::clear instead of reinitializing and
5838 freeing the obstack.
5839 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5840 auto_obstack.
5841 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5842 * rust-exp.y (work_obstack): Now an auto_obstack.
5843 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5844 reinitializing and freeing the obstack.
5845 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5846 (host_char_to_target): Use auto_obstack.
5847 * utils.h (make_cleanup_obstack_free): Delete declaration.
5848 * valprint.c (generic_emit_char, generic_printstr): Use
5849 auto_obstack.
5850
db665f42
SM
58512017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5852
5853 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5854 thread.
5855 (darwin_init_thread_list): Don't update dummy thread.
5856 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5857
873c0814
SM
58582017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5859
5860 * record-full.c (netorder16): Remove.
5861
8b5a7a6e
SM
58622017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5863
5864 * common/diagnostics.h: Define macros for GCC.
5865 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5866 * common/vec.h: Include diagnostics.h.
5867 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5868 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5869 warning.
5870
d1435379
SM
58712017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5872
5873 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5874 New macro.
5875 * ada-lex.l: Ignore deprecated register warnings.
5876
cc75e0fd
SM
58772017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5878
5879 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5880 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5881
07809eaf
SM
58822017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5883
5884 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5885 its own line.
5886
f076f034
SM
58872017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5888
5889 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5890
0dd5cbc5
AH
58912017-06-23 Alan Hayward <alan.hayward@arm.com>
5892
5893 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5894 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5895 (xtensa_register_read_masked): Likewise.
5896
d4c6ce5b
SDJ
58972017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5898
5899 * common/environ.c (gdb_environ::unset): Update comment.
5900
16892a03
AH
59012017-06-22 Alan Hayward <alan.hayward@arm.com>
5902
5903 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5904 registers.
5905
d7dcbefc
AH
59062017-06-22 Alan Hayward <alan.hayward@arm.com>
5907
5908 * record-full.c (record_full_exec_insn): Use byte_vector.
5909
b30ff123
YQ
59102017-06-22 Yao Qi <yao.qi@linaro.org>
5911
5912 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5913 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5914
4fa847d7
AH
59152017-06-22 Alan Hayward <alan.hayward@arm.com>
5916
5917 * remote.c (cached_reg): Move from here...
5918 * regcache.h (cached_reg): ...to here.
5919 * python/py-unwind.c (struct reg_info): Remove.
5920 (cached_frame_info): Use cached_reg_t.
5921 (pyuw_prev_register): Likewise.
5922 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5923 (pyuw_dealloc_cache): Free all registers.
5924
f4906a9a
PA
59252017-06-22 Pedro Alves <palves@redhat.com>
5926 Simon Marchi <simon.marchi@ericsson.com>
5927
5928 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5929 warning.
5930 * common/diagnostics.h: New file.
5931
b45a1208
PA
59322017-06-22 Pedro Alves <palves@redhat.com>
5933
5934 * common/agent.h: Add include guards.
5935
e4da2c61
SM
59362017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5937
5938 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5939 talk about addressable units instead of bytes.
5940
96160d60
SDJ
59412017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5942
5943 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5944 of '::const_iterator'.
5945
9a6c7d9c
SDJ
59462017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5947
5948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5949 'unittests/environ-selftests.c'.
5950 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5951 * charset.c (find_charset_names): Declare object 'iconv_env'.
5952 Update code to use 'iconv_env' object. Remove call to
5953 'free_environ'.
5954 * common/environ.c: Include <utility>.
5955 (make_environ): Delete function.
5956 (free_environ): Delete function.
5957 (gdb_environ::clear): New function.
5958 (gdb_environ::operator=): New function.
5959 (gdb_environ::get): Likewise.
5960 (environ_vector): Delete function.
5961 (set_in_environ): Delete function.
5962 (gdb_environ::set): New function.
5963 (unset_in_environ): Delete function.
5964 (gdb_environ::unset): New function.
5965 (gdb_environ::envp): Likewise.
5966 * common/environ.h: Include <vector>.
5967 (struct gdb_environ): Delete; transform into...
5968 (class gdb_environ): ... this class.
5969 (free_environ): Delete prototype.
5970 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5971 environ_vector): Likewise.
5972 * infcmd.c (run_command_1): Update code to call
5973 'envp' from 'gdb_environ' class.
5974 (environment_info): Update code to call methods from 'gdb_environ'
5975 class.
5976 (unset_environment_command): Likewise.
5977 (path_info): Likewise.
5978 (path_command): Likewise.
5979 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5980 (inferior::inferior): Initialize 'environment' using the host's
5981 information.
5982 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5983 Include "environ.h".
5984 (class inferior) <environment>: Change type from 'struct
5985 gdb_environ' to 'gdb_environ'.
5986 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5987 methods from 'gdb_environ' class.
5988 * solib.c (solib_find_1): Likewise
5989 * unittests/environ-selftests.c: New file.
5990
75c554cf
YQ
59912017-06-20 Yao Qi <yao.qi@linaro.org>
5992
5993 * features/i386/i386-linux.xml: Exchange the order of including
5994 32bit-linux.xml and 32bit-sse.xml.
5995 * features/i386/i386-linux.c: Regenerated.
5996
72ddacb7
YQ
59972017-06-20 Yao Qi <yao.qi@linaro.org>
5998
5999 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6000 Delete copy ctor and assignment operator.
6001 (tdesc_type): Likewise.
6002 (tdesc_feature): Likewise.
6003 (tdesc_free_reg): Remove.
6004 (tdesc_create_reg): Use new.
6005 (tdesc_free_type): Remove.
6006 (tdesc_create_vector): Use new.
6007 (tdesc_create_union): Likewise.
6008 (tdesc_create_flags): Likewise.
6009 (tdesc_create_enum): Likewise.
6010 (tdesc_free_feature): Delete.
6011 (free_target_description): Use delete.
6012
325c9fd4
JB
60132017-06-19 John Baldwin <jhb@FreeBSD.org>
6014
6015 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6016 registers.
6017
16b7a719
PA
60182017-06-19 Pedro Alves <palves@redhat.com>
6019
6020 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6021 after gdb::unlinker.
6022
1c8e01c9
SDJ
60232017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
6024
6025 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6026 gdb_environ to access an environment variable.
6027
ffce45d2
TP
60282017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6029
6030 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6031 gdb_byte*.
6032
1d4fbac9
SM
60332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6034
6035 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6036
8465943a
SM
60372017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6038
6039 * configure: Re-generate.
6040 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6041
3e019bdc
SM
60422017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6043
6044 * configure: Re-generate.
6045 * warning.m4: Pass -Werror to compiler when checking for
6046 supported warning flags.
6047
cf0dd6f0
SM
60482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6049
6050 * Makefile.in (COMPILE.pre): Add "-x c++".
6051
6f98355c
YQ
60522017-06-16 Alan Hayward <alan.hayward@arm.com>
6053 Pedro Alves <palves@redhat.com>
6054 Yao Qi <yao.qi@linaro.org>
6055
6056 * defs.h (RequireLongest): New.
6057 (extract_integer): Declare function template.
6058 (extract_signed_integer): Remove the declaration, but define it
6059 static inline.
6060 (extract_unsigned_integer): Likewise.
6061 (store_integer): Declare function template.
6062 (store_signed_integer): Remove the declaration, but define it
6063 static inline.
6064 (store_unsigned_integer): Likewise.
6065 * findvar.c (extract_integer): New function template.
6066 (extract_signed_integer): Remove.
6067 (extract_unsigned_integer): Remove.
6068 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6069 instantiations.
6070 (store_integer): New function template.
6071 (store_signed_integer): Remove.
6072 (store_unsigned_integer): Remove.
6073 (store_integer): Explicit instantiations.
6074 * regcache.c (regcache_raw_read_signed): Update.
6075 (regcache::raw_read): New function.
6076 (regcache::raw_read_signed): Remove.
6077 (regcache::raw_read_unsigned): Remove.
6078 (regcache_raw_read_unsigned): Update.
6079 (regcache_raw_write_unsigned): Update.
6080 (regcache::raw_write_signed): Remove.
6081 (regcache::raw_write): New function.
6082 (regcache_cooked_read_signed): Update.
6083 (regcache::raw_write_unsigned): Remove.
6084 (regcache::cooked_read_signed): Remove.
6085 (regcache_cooked_read_unsigned): Update.
6086 (regcache::cooked_read_unsigned): Remove.
6087 (regcache_cooked_write_signed): Update.
6088 (regcache_cooked_write_unsigned): Update.
6089 * regcache.h (regcache) <raw_read_signed>: Remove.
6090 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6091 <raw_read, raw_write>: New.
6092 <cooked_read_signed, cooked_write_signed>: Remove.
6093 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6094 <cooked_read, cooked_write>: New.
6095 * sh64-tdep.c (sh64_pseudo_register_read): Update.
6096 (sh64_pseudo_register_write): Update.
6097
a87dc45a
AK
60982017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
6099
6100 * arc-tdep.c (arc_disassembler_options): New variable.
6101 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6102 of default_print_insn.
6103 (arc_delayed_print_insn): Set info->section when needed,
6104 use default_print_insn to retrieve a disassembler.
6105
45159d6a
SDJ
61062017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
6107
6108 PR gdb/21574
6109 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6110 to mention $SHELL and startup-with-shell.
6111
b46c4cf0
MF
61122017-06-14 Max Filippov <jcmvbkbc@gmail.com>
6113
6114 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6115
6394c606
YQ
61162017-06-14 Yao Qi <yao.qi@linaro.org>
6117
6118 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6119 default_print_insn instead of print_insn_aarch64.
6120 * arm-tdep.c (gdb_print_insn_arm): Call
6121 default_print_insn instead of print_insn_big_arm
6122 and print_insn_little_arm.
6123 * i386-tdep.c (i386_print_insn): Call default_print_insn
6124 instead of print_insn_i386.
6125 * ia64-tdep.c (ia64_print_insn): Call
6126 default_print_insn instead of print_insn_ia64.
6127 * mips-tdep.c (gdb_print_insn_mips): Call
6128 default_print_insn instead of print_insn_big_mips
6129 and print_insn_little_mips.
6130 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6131 instead of print_insn_spu.
6132
d5722aa2
PA
61332017-06-14 Pedro Alves <palves@redhat.com>
6134
6135 * ada-lang.c: Include "common/byte-vector.h".
6136 (ada_value_primitive_packed_val): Use gdb::byte_vector.
6137 * charset.c (wchar_iterator::iterate): Resize the vector instead
6138 of reserving it.
6139 * common/byte-vector.h: Include "common/def-vector.h".
6140 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6141 * cli/cli-dump.c: Include "common/byte-vector.h".
6142 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6143 * common/byte-vector.h: New file.
6144 * common/def-vector.h: New file.
6145 * common/default-init-alloc.h: New file.
6146 * dwarf2loc.c: Include "common/byte-vector.h".
6147 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6148 instead of reserving it.
6149 * dwarf2read.c: Include "common/byte-vector.h".
6150 (data_buf::m_vec): Now a gdb::byte_vector.
6151 * gdb_regex.c: Include "common/def-vector.h".
6152 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6153 * mi/mi-main.c: Include "common/byte-vector.h".
6154 (mi_cmd_data_read_memory): Use gdb::byte_vector.
6155 * printcmd.c: Include "common/byte-vector.h".
6156 (print_scalar_formatted): Use gdb::byte_vector.
6157 * valprint.c: Include "common/byte-vector.h".
6158 (maybe_negate_by_bytes, print_decimal_chars): Use
6159 gdb::byte_vector.
6160
01ec7a27
SM
61612017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6162
6163 * darwin-nat.c: Include "nat/fork-inferior.h".
6164
848d9074
SM
61652017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6166
6167 * configure.nat: Factor out Darwin bits that are not
6168 architecture-specific. Add fork-inferior.o.
6169
3b912944
SM
61702017-06-13 Simon Marchi <simon.marchi@ericsson.com>
6171
6172 * configure.nat: Factor out AIX bits that are not
6173 architecture-specific. Add fork-inferior.o.
6174
55acdf22
AA
61752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6176
6177 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
6178 (read_pieced_value, write_pieced_value): ...here. Reduce to
6179 wrappers that just call rw_pieced_value.
6180
f65e2044
AA
61812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6182
6183 * dwarf2loc.c (write_pieced_value): When writing the data for a
6184 memory piece, use write_memory_with_notification instead of
6185 write_memory.
6186
23f945bf
AA
61872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6188
6189 * valops.c (read_value_memory): Change embedded_offset to
6190 represent a bit offset instead of a byte offset.
6191 * value.h (read_value_memory): Adjust comment.
6192
f236533e
AA
61932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6194
6195 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6196 dest_offset_bits and source_offset_bits.
6197 (write_pieced_value): Likewise.
6198
65d84b76
AA
61992017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6200
6201 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6202 given by DW_OP_bit_piece.
6203 (write_pieced_value): Likewise.
6204
242d31ab
AA
62052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6206
6207 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6208 some other preparations to the places where sufficient information
6209 is available.
6210 (write_pieced_value): Likewise.
6211
03c8af18
AA
62122017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6213
6214 * dwarf2loc.c (bits_to_bytes): New function.
6215 (read_pieced_value): Fix offset calculations for register pieces
6216 on big-endian targets.
6217 (write_pieced_value): Likewise.
6218
840989c1
AA
62192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6220
6221 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6222 (write_pieced_value): Likewise.
6223
359b19bb
AA
62242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6225
6226 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6227 transfer the source value's least significant bits, instead of its
6228 lowest-addressed ones. Rename type_len to max_offset.
6229 (read_pieced_value): Mirror above changes to write_pieced_value as
6230 applicable.
6231
07c9ca3b
AA
62322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6233
6234 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6235 truncate full bytes from dest_offset_bits before using it as an
6236 offset into the buffer.
6237
f1cc9874
AA
62382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6239
6240 * dwarf2loc.c (write_pieced_value): Include transfer size in
6241 byte-wise check.
6242
cdaac320
AA
62432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6244
6245 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6246 calculation of this_size.
6247
af547a96
AA
62482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6249
6250 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6251 when targeting a bit-field.
6252 (write_pieced_value): Likewise.
6253
ddd7882a
AA
62542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6255
6256 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6257 (allocate_piece_closure): Drop addr_size parameter.
6258 (dwarf2_evaluate_loc_desc_full): Adjust call to
6259 allocate_piece_closure.
6260
e9352324
AA
62612017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6262
6263 PR gdb/21226
6264 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6265 the LSB end, independent of endianness.
6266
d5d1163e
AA
62672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6268
6269 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6270 size capping.
6271
032bb6ea
YQ
62722017-06-13 Yao Qi <yao.qi@linaro.org>
6273
6274 * mips-linux-nat.c: Move include features/mips*-linux.c to
6275 mips-linux-tdep.c.
6276 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6277 to mips-linux-tdep.c.
6278 * mips-linux-tdep.c: Include features/mips*-linux.c
6279 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6280 functions.
6281 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6282 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6283 (tdesc_mips64_dsp_linux): Declare.
6284
f12f6bad
TT
62852017-06-12 Tom Tromey <tom@tromey.com>
6286
6287 * valprint.h (val_print_type_code_int): Remove.
6288 * valprint.c (generic_val_print_int): Always call
6289 val_print_scalar_formatted.
6290 (val_print_type_code_int): Remove.
6291 * printcmd.c (print_scalar_formatted): Handle options->format==0.
6292 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6293 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6294 * ada-valprint.c (ada_val_print_num): Use
6295 val_print_scalar_formatted.
6296
d9109c80
TT
62972017-06-12 Tom Tromey <tom@tromey.com>
6298
6299 * printcmd.c (print_scalar_formatted): Unify the two switches.
6300 Don't convert scalars to LONGEST.
6301
4ac0cb1c
TT
63022017-06-12 Tom Tromey <tom@tromey.com>
6303
6304 PR exp/16225:
6305 * valprint.h (print_decimal_chars): Update.
6306 * valprint.c (maybe_negate_by_bytes): New function.
6307 (print_decimal_chars): Add "is_signed" argument.
6308 * printcmd.c (print_scalar_formatted): Update.
6309
30a25466
TT
63102017-06-12 Tom Tromey <tom@tromey.com>
6311
6312 PR exp/16225:
6313 * valprint.h (print_binary_chars, print_hex_chars): Update.
6314 * valprint.c (val_print_type_code_int): Update.
6315 (print_binary_chars): Add "zero_pad" argument.
6316 (emit_octal_digit): New function.
6317 (print_octal_chars): Don't zero-pad.
6318 (print_decimal_chars): Likewise.
6319 (print_hex_chars): Add "zero_pad" argument.
6320 * sh64-tdep.c (sh64_do_fp_register): Update.
6321 * regcache.c (regcache::dump): Update.
6322 * printcmd.c (print_scalar_formatted): Update.
6323 * infcmd.c (default_print_one_register_info): Update.
6324
b3464d03
PA
63252017-06-12 Pedro Alves <palves@redhat.com>
6326 Alan Hayward <alan.hayward@arm.com>
6327
6328 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6329 (mips_eabi_push_dummy_call): Rename local 'regsize' to
6330 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
6331 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6332 Assert that abi_regsize bytes fit in 'ref_valbuf'.
6333
4b76cda9
PA
63342017-06-12 Pedro Alves <palves@redhat.com>
6335
6336 * dwarf2read.c (mapped_symtab::data): Now a vector of
6337 symtab_index_entry instead of vector of
6338 std::unique_ptr<symtab_index_entry>. All users adjusted to check
6339 whether an element's name is NULL instead of checking whether the
6340 element itself is NULL.
6341 (find_slot): Change return type. Adjust.
6342 (hash_expand, , add_index_entry, uniquify_cu_indices)
6343 (write_hash_table): Adjust.
6344
e8f8bcb3
PA
63452017-06-12 Pedro Alves <palves@redhat.com>
6346
6347 * dwarf2read.c (recursively_count_psymbols): New function.
6348 (write_psymtabs_to_index): Call it to compute number of psyms and
6349 pass estimate size of psyms_seen to unordered_set's ctor.
6350
70a1152b
PA
63512017-06-12 Pedro Alves <palves@redhat.com>
6352
6353 * dwarf2read.c (write_hash_table): Check if key already exists
6354 before emplacing.
6355
c2f134ac
PA
63562017-06-12 Pedro Alves <palves@redhat.com>
6357
6358 * dwarf2read.c (data_buf::append_space): Rename to...
6359 (data_buf::grow): ... this, and make private. Adjust all callers.
6360 (data_buf::append_uint): New method.
6361 (add_address_entry, write_one_signatured_type)
6362 (write_psymtabs_to_index): Use it.
6363
a81e6d4d
PA
63642017-06-12 Pedro Alves <palves@redhat.com>
6365
6366 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6367 (file_write (FILE *, const std::vector<Elem>&)): Delete.
6368 (data_buf::file_write): Call ::fwrite directly.
6369
6fd931f2
PA
63702017-06-12 Pedro Alves <palves@redhat.com>
6371
6372 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6373 std::vector::erase.
6374
bc8f2430
JK
63752017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6376
6377 Code cleanup: C++ify .gdb_index producer.
6378 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6379 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6380 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6381 (create_strtab, add_string): Remove.
6382 (file_write, data_buf): New.
6383 (struct symtab_index_entry): Use std::vector for cu_indices.
6384 (struct mapped_symtab): Use std::vector for data.
6385 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6386 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6387 Remove.
6388 (find_slot): Change return type. Update it to the new data structures.
6389 (hash_expand, add_index_entry): Update it to the new data structures.
6390 (offset_type_compare): Remove.
6391 (uniquify_cu_indices): Update it to the new data structures.
6392 (c_str_view, c_str_view_hasher, vector_hasher): New.
6393 (add_indices_to_cpool): Remove.
6394 (write_hash_table): Update it to the new data structures.
6395 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6396 (eq_psymtab_cu_index): Remove.
6397 (psym_index_map): New typedef.
6398 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6399 reference and std::unordered_map for cu_index_htab.
6400 (add_address_entry, add_address_entry_worker, write_address_map)
6401 (write_psymbols): Update it to the new data structures.
6402 (write_obstack): Remove.
6403 (struct signatured_type_index_data): Change types_list to a data_buf
6404 reference and psyms_seen to a std::unordered_set reference.
6405 (write_one_signatured_type, recursively_write_psymbols)
6406 (write_psymtabs_to_index): Update it to the new data structures.
6407
c4dcb155
SM
64082017-06-11 Simon Marchi <simon.marchi@ericsson.com>
6409
6410 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6411 separate-debug-file commands.
6412 * symfile.h (separate_debug_file_debug): New global.
6413 * symfile.c (separate_debug_file_debug): New global.
6414 (separate_debug_file_exists, find_separate_debug_file): Add
6415 debug output.
6416 (_initialize_symfile): Add "set debug separate-debug-file"
6417 command.
6418 * build-id.c (build_id_to_debug_bfd,
6419 find_separate_debug_file_by_buildid): Add debug output.
6420
6d45d4b4
SM
64212017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6422
6423 * gdbarch.sh (displaced_step_free_closure): Remove.
6424 * gdbarch.h, gdbarch.c: Re-generate.
6425 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6426 displaced_step_free_closure.
6427 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6428 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6429 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6430 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6431 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6432 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6433 * arch-utils.h (simple_displaced_step_free_closure): Remove.
6434 * arch-utils.c (simple_displaced_step_free_closure): Remove.
6435 * infrun.c (displaced_step_clear): Call xfree instead of
6436 gdbarch_displaced_step_free_closure.
6437
2f91880f
SDJ
64382017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
6439
6440 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6441 NULL".
6442
b8b6e72f
AH
64432017-06-08 Alan Hayward <alan.hayward@arm.com>
6444
6445 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6446 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6447 (mn10300_push_dummy_call): Likewise.
6448
5369082e
AH
64492017-06-08 Alan Hayward <alan.hayward@arm.com>
6450
6451 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6452
ff4ca5ac
AH
64532017-06-08 Alan Hayward <alan.hayward@arm.com>
6454
6455 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6456
aefd8b33
SDJ
64572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6458
6459 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6460 able to start inferiors using a shell.
6461 (New remote packets): Announce new packet "QStartupWithShell".
6462 * remote.c: Add PACKET_QStartupWithShell.
6463 (extended_remote_create_inferior): Handle new
6464 PACKET_QStartupWithShell.
6465 (remote_protocol_features) <QStartupWithShell>: New entry for
6466 PACKET_QStartupWithShell.
6467 (_initialize_remote): Call "add_packet_config_cmd" for
6468 QStartupShell.
6469
2090129c
SDJ
64702017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6471 Pedro Alves <palves@redhat.com>
6472
6473 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6474 and "nat/fork-inferior.h".
6475 * common/common-inferior.h: New file, with contents from
6476 "gdb/inferior.h".
6477 * commom/common-utils.c: Include "common-utils.h".
6478 (stringify_argv): New function.
6479 * common/common-utils.h (stringify_argv): New prototype.
6480 * configure.nat: Add "fork-inferior.o" as a dependency for
6481 "*linux*", "fbsd*" and "nbsd*" hosts.
6482 * corefile.c (get_exec_file): Update comment.
6483 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6484 instead of "startup_inferior".
6485 (darwin_create_inferior): Call "add_thread_silent" after
6486 "fork_inferior".
6487 * fork-child.c: Cleanup unnecessary includes.
6488 (SHELL_FILE): Move to "common/common-fork-child.c".
6489 (environ): Likewise.
6490 (exec_wrapper): Initialize.
6491 (get_exec_wrapper): New function.
6492 (breakup_args): Move to "common/common-fork-child.c"; rename to
6493 "breakup_args_for_exec".
6494 (escape_bang_in_quoted_argument): Move to
6495 "common/common-fork-child.c".
6496 (saved_ui): New variable.
6497 (prefork_hook): New function.
6498 (postfork_hook): Likewise.
6499 (postfork_child_hook): Likewise.
6500 (gdb_startup_inferior): Likewise.
6501 (fork_inferior): Move to "common/common-fork-child.c". Update
6502 function to support gdbserver.
6503 (startup_inferior): Likewise.
6504 * gdbcore.h (get_exec_file): Remove declaration.
6505 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6506 instead of "startup_inferior". Call "add_thread_silent" after
6507 "fork_inferior".
6508 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6509 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6510 instead of "startup_inferior". Call "add_thread_silent" after
6511 "fork_inferior".
6512 * inferior.h: Include "common-inferior.h".
6513 (trace_start_error): Move to "common/common-utils.h".
6514 (trace_start_error_with_name): Likewise.
6515 (fork_inferior): Move prototype to "nat/fork-inferior.h".
6516 (startup_inferior): Likewise.
6517 (gdb_startup_inferior): New prototype.
6518 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6519 * nat/fork-inferior.h: New file.
6520 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6521 instead of "startup_inferior". Call "add_thread_silent" after
6522 "fork_inferior".
6523 * target.h (target_terminal_init): Move prototype to
6524 "target/target.h".
6525 (target_terminal_inferior): Likewise.
6526 (target_terminal_ours): Likewise.
6527 * target/target.h (target_terminal_init): New prototype, moved
6528 from "target.h".
6529 (target_terminal_inferior): Likewise.
6530 (target_terminal_ours): Likewise.
6531 * utils.c (gdb_flush_out_err): New function.
6532
043a4934
SDJ
65332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6534
6535 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6536 * common/common-gdbthread.h: New file, with parts from
6537 "gdb/gdbthread.h".
6538 * gdbthread.h: Include "common-gdbthread.h".
6539 (switch_to_thread): Moved to "common/common-gdbthread.h".
6540
15652511
SDJ
65412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6542
6543 * Makefile.in (SFILES): Add "common/job-control.c".
6544 (HFILES_NO_SRCDIR): Add "common/job-control.h".
6545 (COMMON_OBS): Add "job-control.o".
6546 * common/job-control.c: New file, with contents from
6547 "gdb/inflow.c".
6548 * common/job-control.h: New file, with contents from "terminal.h".
6549 * fork-child.c: Include "job-control.h".
6550 * inflow.c: Include "job-control.h".
6551 (gdb_setpgid): Move to "common/common-inflow.c".
6552 (_initialize_inflow): Move setting of "job_control" to
6553 "handle_job_control".
6554 * terminal.h (job_control): Moved to "common/common-terminal.h".
6555 (gdb_setpgid): Likewise.
6556 * top.c: Include "job_control.h".
6557 * utils.c: Likewise.
6558 (job_control): Moved to "job-control.c".
6559
2d7cc5c7
PA
65602017-06-07 Pedro Alves <palves@redhat.com>
6561
6562 * Makefile.in (SFILES): Add gdb_regex.c.
6563 (COMMON_OBS): Add gdb_regex.o.
6564 * ada-lang.c (ada_add_standard_exceptions)
6565 (ada_add_exceptions_from_frame, name_matches_regex)
6566 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6567 parameter type to compiled_regex. Adjust.
6568 (ada_exceptions_list): Use compiled_regex.
6569 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6570 std::unique_ptr<compiled_regex>.
6571 (exception_catchpoint::~exception_catchpoint): Remove regfree
6572 call.
6573 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6574 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6575 * breakpoint.c (solib_catchpoint::compiled): Now a
6576 std::unique_ptr<compiled_regex>.
6577 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6578 (check_status_catch_solib): Adjust to use compiled_regex.
6579 (add_solib_catchpoint): Adjust to use compiled_regex.
6580 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6581 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6582 compiled_regex reference. Adjust to use it.
6583 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6584 declaration. Include "gdb_regex.h".
6585 (apropos_cmd): Change regex parameter to compiled_regex reference.
6586 * gdb_regex.c: New file.
6587 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6588 declarations.
6589 (class compiled_regex): New.
6590 * linux-tdep.c: Include "common/gdb_optional.h".
6591 (struct mapping_regexes): New, factored out from
6592 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6593 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6594 gdb::optional and remove cleanups. Adjust to compiled_regex.
6595 * probe.c: Include "common/gdb_optional.h".
6596 (collect_probes): Use compiled_regex and gdb::optional and remove
6597 cleanups.
6598 * skip.c: Include "common/gdb_optional.h".
6599 (skiplist_entry::compiled_function_regexp): Now a
6600 gdb::optional<compiled_regex>.
6601 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6602 (free_skiplist_entry): Remove regfree call.
6603 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6604 compiled_regex and gdb::optional.
6605 * symtab.c: Include "common/gdb_optional.h".
6606 (search_symbols): Use compiled_regex and gdb::optional.
6607 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6608 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6609 to gdb_regex.c.
6610
50d6adef
AH
66112017-06-07 Alan Hayward <alan.hayward@arm.com>
6612
6613 * regcache.c (regcache::save): Avoid buffer use.
6614 (regcache::dump): Likewise.
6615
4a8a33c8
AH
66162017-06-07 Alan Hayward <alan.hayward@arm.com>
6617
6618 * sh-tdep.c (sh_pseudo_register_read): Remove
6619 MAX_REGISTER_SIZE.
6620 (sh_pseudo_register_write): Likewise.
6621 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6622 (sh64_pseudo_register_write): Likewise
6623
d1be909e
AH
66242017-06-07 Alan Hayward <alan.hayward@arm.com>
6625
6626 * aarch64-tdep.c (aarch64_store_return_value): Use
6627 V_REGISTER_SIZE.
6628 (aarch64_pseudo_read_value): Likewise.
6629 (aarch64_pseudo_write): Likewise.
6630
f4a65042
YQ
66312017-06-06 Yao Qi <yao.qi@linaro.org>
6632
6633 * regformats/regdef.h (set_register_cache): Remove the
6634 declaration.
6635
9f7fb0aa
AH
66362017-06-06 Alan Hayward <alan.hayward@arm.com>
6637
6638 * frame.c (frame_unwind_register_signed): Use
6639 frame_unwind_register_value.
6640
e1e01040
PA
66412017-06-06 Pedro Alves <palves@redhat.com>
6642
6643 PR breakpoints/21553
6644 * breakpoint.c (create_breakpoints_sal_default)
6645 (init_breakpoint_sal, create_breakpoint_sal): Use
6646 gdb::unique_xmalloc_ptr for string parameters.
6647 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6648 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6649 (base_breakpoint_create_breakpoints_sal)
6650 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6651 (strace_marker_create_breakpoints_sal)
6652 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6653 string parameters.
6654 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6655 gdb::unique_xmalloc_ptr for string parameters.
6656 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6657 parameters.
6658
fbe654c8
AH
66592017-06-06 Alan Hayward <alan.hayward@arm.com>
6660
6661 * alpha-tdep.c (alpha_register_to_value): Use
6662 get_frame_register_value.
6663 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6664
ae0d01d6
AH
66652017-06-06 Alan Hayward <alan.hayward@arm.com>
6666
6667 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6668 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6669 (ia64_value_to_register): Likewise.
6670 (ia64_extract_return_value): Likewise.
6671 (ia64_store_return_value): Likewise.
6672 (ia64_push_dummy_call): Likewise.
6673
49cf576c
JB
66742017-06-04 Joel Brobecker <brobecker@adacore.com>
6675
6676 GDB 8.0 released.
6677
26b6a6ab
SM
66782017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6679
6680 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6681
22827c51
SM
66822017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6683
6684 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6685 parameter.
6686 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6687
0e05cf3a
SM
66882017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6689
6690 * event-loop.c (poll_timers): Unallocate timer using delete
6691 instead of xfree.
6692
c1fc2657
SM
66932017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6694
6695 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6696 (struct breakpoint) <~breakpoint>: New.
6697 (struct watchpoint): Inherit from breakpoint.
6698 <~watchpoint>: New.
6699 <base>: Remove.
6700 (struct tracepoint): Inherit from breakpoint.
6701 <base>: Remove.
6702 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6703 (struct longjmp_breakpoint): Inherit from breakpoint.
6704 <~longjmp_breakpoint>: New.
6705 <base>: Remove.
6706 (new_breakpoint_from_type): Remove casts.
6707 (watchpoint_in_thread_scope): Remove reference to base field.
6708 (watchpoint_del_at_next_stop): Likewise.
6709 (update_watchpoint): Likewise.
6710 (watchpoint_check): Likewise.
6711 (bpstat_check_watchpoint): Likewise.
6712 (set_longjmp_breakpoint): Likewise.
6713 (struct fork_catchpoint): Inherit from breakpoint.
6714 <base>: Remove.
6715 (struct solib_catchpoint): Inherit from breakpoint.
6716 <~solib_catchpoint>: New.
6717 <base>: Remove.
6718 (dtor_catch_solib): Change to ...
6719 (solib_catchpoint::~solib_catchpoint): ... this.
6720 (breakpoint_hit_catch_solib): Remove reference to base field.
6721 (add_solib_catchpoint): Likewise.
6722 (create_fork_vfork_event_catchpoint): Likewise.
6723 (struct exec_catchpoint): Inherit from breakpoint.
6724 <~exec_catchpoint>: New.
6725 <base>: Remove.
6726 (dtor_catch_exec): Change to ...
6727 (exec_catchpoint::~exec_catchpoint): ... this.
6728 (dtor_watchpoint): Change to ...
6729 (watchpoint::~watchpoint): ... this.
6730 (watch_command_1): Remove reference to base field.
6731 (catch_exec_command_1): Likewise.
6732 (base_breakpoint_dtor): Change to ...
6733 (breakpoint::~breakpoint): ... this.
6734 (base_breakpoint_ops): Remove dtor field value.
6735 (longjmp_bkpt_dtor): Change to ...
6736 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6737 (strace_marker_create_breakpoints_sal): Remove reference to base
6738 field.
6739 (delete_breakpoint): Don't manually call breakpoint destructor.
6740 (create_tracepoint_from_upload): Remove reference to base field.
6741 (trace_pass_set_count): Likewise.
6742 (initialize_breakpoint_ops): Don't initialize
6743 momentary_breakpoint_ops, don't set dtors.
6744 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6745 <~ada_catchpoint>: New.
6746 <base>: Remove.
6747 (create_excep_cond_exprs): Remove reference to base field.
6748 (dtor_exception): Change to ...
6749 (ada_catchpoint::~ada_catchpoint): ... this.
6750 (dtor_catch_exception): Remove.
6751 (dtor_catch_exception_unhandled): Remove.
6752 (dtor_catch_assert): Remove.
6753 (create_ada_exception_catchpoint): Remove reference to base
6754 field.
6755 (initialize_ada_catchpoint_ops): Don't set dtors.
6756 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6757 breakpoint.
6758 <~signal_catchpoint>: New.
6759 <base>: Remove.
6760 (signal_catchpoint_dtor): Change to ...
6761 (signal_catchpoint::~signal_catchpoint): ... this.
6762 (create_signal_catchpoint): Remove reference to base field.
6763 (initialize_signal_catchpoint_ops): Don't set dtor.
6764 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6765 from breakpoint.
6766 <~syscall_catchpoint>: New.
6767 <base>: Remove.
6768 (dtor_catch_syscall): Change to ...
6769 (syscall_catchpoint::~syscall_catchpoint): ... this.
6770 (create_syscall_event_catchpoint): Remove reference to base
6771 field.
6772 (initialize_syscall_catchpoint_ops): Don't set dtor.
6773 * break-catch-throw.c (struct exception_catchpoint): Inherit
6774 from breakpoint.
6775 <~exception_catchpoint>: New.
6776 <base>: Remove.
6777 (dtor_exception_catchpoint): Change to ...
6778 (exception_catchpoint::~exception_catchpoint): ... this.
6779 (handle_gnu_v3_exceptions): Remove reference to base field.
6780 (initialize_throw_catchpoint_ops): Don't set dtor.
6781 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6782 field.
6783 * remote.c (remote_get_tracepoint_status): Likewise.
6784 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6785 * tracefile.c (tracefile_fetch_registers): Likewise.
6786 * tracepoint.c (actions_command): Likewise.
6787 (validate_actionline): Likewise.
6788 (tfind_1): Likewise.
6789 (get_traceframe_location): Likewise.
6790 (find_matching_tracepoint_location): Likewise.
6791 (parse_tracepoint_status): Likewise.
6792 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6793
3b0871f4
SM
67942017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6795
6796 * breakpoint.c (struct longjmp_breakpoint): New struct.
6797 (is_tracepoint_type): Change return type to bool.
6798 (is_longjmp_type): New function.
6799 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6800 (set_raw_breakpoint_without_location): Use
6801 new_breakpoint_from_type.
6802 (set_raw_breakpoint): Likewise.
6803
a5e364af
SM
68042017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6805
6806 * breakpoint.c (new_breakpoint_from_type): New function.
6807 (create_breakpoint_sal): Use new_breakpoint_from_type and
6808 unique_ptr.
6809 (create_breakpoint): Likewise.
6810
ae3b3f34
SM
68112017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6812
6813 * memattr.c (mem_info_command): Rename to ...
6814 (info_mem_command): ... this.
6815 (mem_enable_command): Rename to ...
6816 (enable_mem_command): ... this.
6817 (mem_disable_command): Rename to ...
6818 (disable_mem_command): ... this.
6819 (mem_delete_command): Rename to ...
6820 (delete_mem_command): ... this.
6821 (_initialize_mem): Adjust function names.
6822
13ace077
MM
68232017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6824
6825 * btrace.c (handle_pt_insn_events): New.
6826 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6827 STATUS. Split into this and ...
6828 (handle_pt_insn_event_flags): ... this.
6829
c56ccc05
MM
68302017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6831
6832 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6833 and struct pt_insn.resynced.
6834 * configure: Regenerated.
6835 * config.in: Regenerated.
6836
08c3f6d2
TW
68372017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6838
6839 * btrace.c (ftrace_find_call_by_number): New function.
6840 (ftrace_new_function): Store objects, not pointers.
6841 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6842 ftrace_new_gap, ftrace_update_function,
6843 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6844 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6845 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6846 btrace_ends_with_single_insn, btrace_call_get): Account for
6847 btrace_thread_info::functions now storing objects.
6848 * btrace.h (struct btrace_thread_info): Add constructor.
6849 (struct btrace_thread_info) <functions>: Make std::vector.
6850 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6851 Initialize with default values.
6852 * record-btrace.c (record_btrace_frame_sniffer): Account for
6853 btrace_thread_info::functions now storing objects.
6854
8ffd39f2
TW
68552017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6856
6857 * btrace.c: Remove typedef bfun_s.
6858 (ftrace_new_gap): Directly add gaps to the list of gaps.
6859 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6860 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6861 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6862 instead of gdb VEC.
6863
4aeb0dfc
TW
68642017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6865
6866 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6867 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6868 with btrace_thread_info::next_segment and
6869 btrace_thread_info::prev_segment.
6870 * btrace.h: Remove struct btrace_func_link.
6871 (struct btrace_function): Replace pair of function segment pointers
6872 with pair of indices.
6873 * python/py-record-btrace.c (btpy_call_prev_sibling,
6874 btpy_call_next_sibling): Replace references to
6875 btrace_thread_info::segment with btrace_thread_info::next_segment and
6876 btrace_thread_info::prev_segment.
6877 * record-btrace.c (record_btrace_frame_this_id): Use
6878 btrace_find_call_by_number.
6879
eb8f2b9c
TW
68802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6881
6882 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6883 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6884 btrace_insn_next, btrace_insn_prev): Remove references to
6885 btrace_thread_info::flow.
6886 * btrace.h (struct btrace_function): Remove FLOW.
6887
42bfe59e
TW
68882017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6889
6890 * btrace.c (ftrace_find_call_by_number): New function.
6891 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6892 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6893 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6894 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6895 index.
6896 * btrace.h (struct btrace_function): Turn UP into an index.
6897 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6898 as an index.
6899 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6900 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6901 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6902
b54b03bd
TW
69032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6904
6905 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6906 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6907 ftrace_update_function, ftrace_compute_global_level_offset,
6908 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6909 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6910 btrace_insn_end, btrace_is_empty): Remove references to
6911 btrace_thread_info::begin and btrace_thread_info::end.
6912 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6913 (struct btrace_thread_info) <functions>: Adjust comment.
6914 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6915 btrace_thread_info::begin.
6916
8286623c
TW
69172017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6918
6919 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6920 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6921 ftrace_update_function): Remove arguments that implicitly were always
6922 BTINFO->END.
6923 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6924 Don't pass BTINFO->END.
6925
a0f1b963
TW
69262017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6927
6928 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6929 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6930 btrace_find_insn_by_number): Replace function segment pointer with
6931 index.
6932 (btrace_insn_cmp): Simplify.
6933 * btrace.h: (struct btrace_insn_iterator) Rename index to
6934 insn_index. Replace function segment pointer with index into function
6935 segment vector.
6936 * record-btrace.c (record_btrace_call_history): Replace function
6937 segment pointer use with index.
6938 (record_btrace_frame_sniffer): Retrieve function call segment through
6939 vector.
6940 (record_btrace_set_replay): Remove defunc't safety check.
6941
f158f208
TW
69422017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6943
6944 * btrace.c (btrace_ends_with_single_insn): New function.
6945 (btrace_call_get, btrace_call_number, btrace_call_begin,
6946 btrace_call_end, btrace_call_next, btrace_call_prev,
6947 btrace_find_call_by_number): Use index into call segment vector
6948 instead of pointer.
6949 (btrace_call_cmp): Simplify.
6950 * btrace.h (struct btrace_call_iterator): Replace function call segment
6951 pointer with index into vector.
6952 * record-btrace.c (record_btrace_call_history): Use index instead of
6953 pointer.
6954
521103fd
TW
69552017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6956
6957 * btrace.c (btrace_insn_begin, btrace_insn_end,
6958 btrace_find_insn_by_number): Add btinfo to iterator.
6959 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6960
17b89b34
TW
69612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6962
6963 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6964 and save pointers directly.
6965 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6966 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6967 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6968 changed signature of functions.
6969 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6970 (btrace_fetch): Remove code that adds btrace_function pointers to
6971 vector of btrace_functions.
6972 (btrace_clear): Simplify freeing vector of btrace_functions.
6973
2b51eddc
TW
69742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6975
6976 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6977 Replace VEC_* with std::vector functions.
6978 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6979 (struct btrace_thread_info)<functions>: Change type to std::vector.
6980
db6be0d5
SM
69812017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6982
6983 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6984 "Removed targets and native configurations" up. Merge duplicate
6985 "New commands" sub-sections. Add "New options" sub-sections.
6986
b057297a
AH
69872017-05-26 Alan Hayward <alan.hayward@arm.com>
6988
6989 * defs.h (copy_integer_to_size): New declaration.
6990 * findvar.c (copy_integer_to_size): New function.
6991 (do_cint_test): New selftest function.
6992 (copy_integer_to_size_test): Likewise.
6993 (_initialize_findvar): Likewise.
6994 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6995 (mips_fbsd_collect_reg): Use raw_collect_integer.
6996 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6997 (mips64_fill_gregset): Use raw_collect_integer
6998 (mips64_fill_fpregset): Use raw_supply_integer.
6999 * regcache.c (regcache::raw_supply_integer): New function.
7000 (regcache::raw_collect_integer): Likewise.
7001 * regcache.h: (regcache::raw_supply_integer): New declaration.
7002 (regcache::raw_collect_integer): Likewise.
7003
b77b02a5
YQ
70042017-05-24 Yao Qi <yao.qi@linaro.org>
7005
7006 * Makefile.in (SFILES): Add gdbarch-selftests.c.
7007 (COMMON_OBS): Add gdbarch-selftests.o.
7008 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7009 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7010 * gdbarch-selftests.c: New file.
7011 * regcache.h (regcache) <~regcache>: Mark it virtual if
7012 GDB_SELF_TEST.
7013 <raw_write>: Likewise.
7014
e521e87e
YQ
70152017-05-24 Yao Qi <yao.qi@linaro.org>
7016
7017 * regcache.c (current_regcache): Change it to
7018 regcache::current_regcache.
7019 (regcache_observer_target_changed): Update.
7020 (regcache_thread_ptid_changed): Make it a regcache static
7021 method.
7022 (regcache_thread_ptid_changed): Update.
7023 (class regcache_access): New.
7024 (current_regcache_test): Update.
7025 (_initialize_regcache): Update.
7026 * regcache.h: Include forward_list.
7027 (regcache): Declare regcache_thread_ptid_changed and declare
7028 registers_changed_ptid as friend.
7029
d8e07dda
YQ
70302017-05-24 Yao Qi <yao.qi@linaro.org>
7031
7032 * i387-tdep.c (i387_register_to_value): Use register_size
7033 instead of TYPE_LENGTH.
7034 * m68k-tdep.c (m68k_register_to_value): Likewise.
7035
8c8f9122
YQ
70362017-05-24 Yao Qi <yao.qi@linaro.org>
7037
7038 * i387-tdep.c (i387_convert_register_p): Return false if type
7039 code isn't TYPE_CODE_FLT.
7040
68fce50f
YQ
70412017-05-24 Yao Qi <yao.qi@linaro.org>
7042
7043 * alpha-tdep.c (alpha_convert_register_p): Return true if type
7044 length is 4.
7045 (alpha_register_to_value): Remove type length check.
7046 (alpha_value_to_register): Likewise.
7047
88954b49
YQ
70482017-05-24 Yao Qi <yao.qi@linaro.org>
7049
7050 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7051 TYPE_CODE_FLT.
7052
e3ec9b69
YQ
70532017-05-24 Yao Qi <yao.qi@linaro.org>
7054
7055 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7056 TYPE_CODE_FLT or not.
7057
cdd238da
YQ
70582017-05-24 Yao Qi <yao.qi@linaro.org>
7059
7060 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7061 * avr-tdep.c (avr_gdbarch_init): Likewise.
7062 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7063 * cris-tdep.c (cris_gdbarch_init): Likewise.
7064 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7065 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7066 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7067 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7068 * mep-tdep.c (mep_gdbarch_init): Likewise.
7069 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7070 * mips-tdep.c (mips_gdbarch_init): Likewise.
7071 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7072 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7073 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7074 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7075 * v850-tdep.c (v850_gdbarch_init): Likewise.
7076
7a3929c4
YQ
70772017-05-24 Yao Qi <yao.qi@linaro.org>
7078
7079 * selftest-arch.c (tests_with_arch): Call registers_changed
7080 and reinit_frame_cache.
7081 * selftest.c (run_self_tests): Likewise.
7082
f4985dba
YQ
70832017-05-24 Yao Qi <yao.qi@linaro.org>
7084
7085 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7086 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7087
ab20fa4a
YQ
70882017-05-24 Yao Qi <yao.qi@linaro.org>
7089
7090 * rl78-tdep.c (rl78_gdbarch_init): Don't call
7091 set_gdbarch_print_insn.
7092
f532ab94
YQ
70932017-05-24 Yao Qi <yao.qi@linaro.org>
7094
7095 * h8300-tdep.c (h8300_gdbarch_init): Don't call
7096 set_gdbarch_print_insn.
7097
39503f82
YQ
70982017-05-24 Yao Qi <yao.qi@linaro.org>
7099
7100 * alpha-tdep.c (alpha_gdbarch_init): Don't call
7101 set_gdbarch_print_insn.
7102 * arc-tdep.c (arc_gdbarch_init): Likewise.
7103 * arch-utils.c: include dis-asm.h.
7104 (default_print_insn): New function.
7105 * arch-utils.h (default_print_insn): Declare.
7106 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7107 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7108 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7109 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7110 * frv-tdep.c (frv_gdbarch_init): Likewise.
7111 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7112 * gdbarch.sh (print_insn): Use default_print_insn.
7113 * gdbarch.c: Regenerated.
7114 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7115 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7116 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7117 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7118 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7119 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7120 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7121 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7122 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7123 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7124 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7125 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7126 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7127 * mt-tdep.c (mt_gdbarch_init): Likewise.
7128 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7129 * nios2-tdep.c (nios2_print_insn): Remove.
7130 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7131 * rx-tdep.c (rx_gdbarch_init): Likewise.
7132 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7133 * score-tdep.c (score_print_insn): Remove.
7134 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7135 * sh-tdep.c (sh_gdbarch_init): Likewise.
7136 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7137 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7138 * tic6x-tdep.c (tic6x_print_insn): Remove.
7139 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7140 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7141 * v850-tdep.c (v850_gdbarch_init): Likewise.
7142 * vax-tdep.c (vax_gdbarch_init): Likewise.
7143 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7144 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7145
f7241d4f
JB
71462017-05-23 John Baldwin <jhb@FreeBSD.org>
7147
7148 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7149 (MIPS_FP0_REGNUM): Remove.
7150 (MIPS_FSR_REGNUM): Remove.
7151 (mips_fbsd_supply_fpregs): Use mips_regnum.
7152 (mips_fbsd_supply_gregs): Likewise.
7153 (mips_fbsd_collect_fpregs): Likewise.
7154 (mips_fbsd_collect_gregs): Likewise.
7155
d489d81d
JB
71562017-05-23 John Baldwin <jhb@FreeBSD.org>
7157
7158 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7159 (getpfpregs_supplies): New function.
7160 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7161 getfpregs_supplies.
7162 (mips_fbsd_store_inferior_registers): Likewise.
7163
e11b3cdc
PA
71642017-05-22 Pedro Alves <palves@redhat.com>
7165
7166 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7167 maintainer.
7168
0f068fb5
AH
71692017-05-22 Alan Hayward <alan.hayward@arm.com>
7170
7171 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7172 (store_register): Likewise.
7173 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7174 (get_decimal_float_return_value): Likewise.
7175 (do_ppc_sysv_return_value): Likewise.
7176 (ppc64_sysv_abi_push_integer): Likewise.
7177 (ppc64_sysv_abi_push_freg): Likewise.
7178 (ppc64_sysv_abi_return_value_base): Likewise.
7179 (ppc64_sysv_abi_return_value): Likewise.
7180 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7181 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7182 * rs6000-nat.c: Likewise.
7183 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7184 (rs6000_value_to_register): Likewise.
7185 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7186
e6cf65f2
TT
71872017-05-21 Tom Tromey <tom@tromey.com>
7188
7189 PR rust/21466:
7190 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7191 arrays as "[T]", not "[T; ]".
7192
43cc5389
TT
71932017-05-19 Tom Tromey <tom@tromey.com>
7194
7195 PR rust/21484:
7196 * rust-lang.c (exp_descriptor_rust): New function.
7197 (rust_language_defn): Use it.
7198 * p-lang.c (pascal_language_defn): Update.
7199 * opencl-lang.c (opencl_language_defn): Update.
7200 * objc-lang.c (objc_language_defn): Update.
7201 * m2-lang.c (m2_language_defn): Update.
7202 * language.h (struct language_defn)
7203 <la_watch_location_expression>: New member.
7204 * language.c (unknown_language_defn, auto_language_defn)
7205 (local_language_defn): Update.
7206 * go-lang.c (go_language_defn): Update.
7207 * f-lang.c (f_language_defn): Update.
7208 * d-lang.c (d_language_defn): Update.
7209 * c-lang.h (c_watch_location_expression): Declare.
7210 * c-lang.c (c_watch_location_expression): New function.
7211 (c_language_defn, cplus_language_defn, asm_language_defn)
7212 (minimal_language_defn): Use it.
7213 * breakpoint.c (watch_command_1): Call
7214 la_watch_location_expression.
7215 * ada-lang.c (ada_language_defn): Update.
7216
7a6e7fcc
RO
72172017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7218
6e7e1744
RO
7219 PR tui/21482
7220 * gdb_curses.h (NOMACROS): Define.
7221 (NCURSES_NOMACROS): Define.
7222
72232017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7224
7225 PR tui/21482
7a6e7fcc
RO
7226 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7227 arg to char *.
7228 * tui/tui-wingeneral.c (box_win): Likewise.
7229 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7230 (tui_show_source_line): Likewise.
7231 (tui_show_exec_info_content): Likewise.
7232
1933fd8e
VM
72332017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7234
7235 * sparc-tdep.c (sparc_structure_return_p)
7236 (sparc_arg_on_registers_p): New functions.
7237 (sparc32_store_arguments): Use them.
7238 * sparc64-tdep.c (sparc64_16_byte_align_p)
7239 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7240 Handle TYPE_CODE_ARRAY.
7241
21873064
YQ
72422017-05-17 Yao Qi <yao.qi@linaro.org>
7243
7244 * cli/cli-decode.c (add_alias_cmd): New function.
7245 * command.h (add_alias_cmd): Declare.
7246 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7247 instead call add_alias_cmd.
7248
2b351b19
PA
72492017-05-17 Pedro Alves <palves@redhat.com>
7250
7251 * Makefile.in (nat_extra_makefile_frag): Rename to ...
7252 (nat_makefile_frag): ... this. All references updated.
7253 * configure.ac: Likewise.
7254 * configure.nat: Likewise. Enhance comments.
7255 * configure: Regenerate.
7256
5f2ad7a3
RO
72572017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7258
7259 * procfs.c (procfs_create_inferior): Change prototype to match
7260 definition.
7261
adf3dde5
EZ
72622017-05-13 Eli Zaretskii <eliz@gnu.org>
7263
7264 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7265 C++ compiler warning.
7266
6830f270
TT
72672017-05-12 Tom Tromey <tom@tromey.com>
7268
7269 PR rust/21483:
7270 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7271 recurse, just call value_struct_elt directly.
7272
68f2f2e3
TT
72732017-05-12 Tom Tromey <tom@tromey.com>
7274
7275 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7276 OP_RUST_ARRAY>: Fix.
7277
256afbc2
TT
72782017-05-12 Tom Tromey <tom@tromey.com>
7279
7280 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7281
94bb8dfe
YQ
72822017-05-09 Yao Qi <yao.qi@linaro.org>
7283
7284 * regcache.c: Include <forward_list>.
7285 (struct regcache_list): Remove.
7286 (current_regcache): Update.
7287 (get_thread_arch_aspace_regcache): Update for std::forward_list.
7288 (regcache_thread_ptid_changed): Likewise.
7289 (registers_changed_ptid): Likewise.
7290 (current_regcache_size): Likewise.
7291
8248946c
YQ
72922017-05-09 Yao Qi <yao.qi@linaro.org>
7293
7294 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7295 (current_regcache_size): New function.
7296 (current_regcache_test): New function.
7297 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7298
313c5961
AH
72992017-05-08 Alan Hayward <alan.hayward@arm.com>
7300
7301 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7302 (print_gp_register_row): Use get_frame_register_value.
7303
27bfc1d1
AH
73042017-05-08 Alan Hayward <alan.hayward@arm.com>
7305
7306 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7307 (mips_supply_fpregset): Likewise.
7308 (mips64_supply_gregset): Likewise.
7309
146e6c5c
AH
73102017-05-08 Alan Hayward <alan.hayward@arm.com>
7311
7312 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
7313 regcache->raw_supply_zeroed.
7314
e50f25ec
SDJ
73152017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7316
7317 * configure.nat: Rearrange 'case' statements to match
7318 host before cpu.
7319
21ea5acd
SDJ
73202017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7321
7322 * Makefile.in: Remove "@host_makefile_frag@". Add variables
7323 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7324 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
7325 "@nat_extra_makefile_frag@".
7326 (Makefile): Remove dependency on "@frags@".
7327 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7328 (data-directory/Makefile): Likewise.
7329 * config/aarch64/linux.mh: Deleted; moved contents to
7330 "gdb/configure.nat".
7331 * config/alpha/alpha-linux.mh: Likewise.
7332 * config/alpha/nbsd.mh: Likewise.
7333 * config/arm/linux.mh: Likewise.
7334 * config/arm/nbsdelf.mh: Likewise.
7335 * config/i386/cygwin.mh: Likewise.
7336 * config/i386/cygwin64.mh: Likewise.
7337 * config/i386/darwin.mh: Likewise.
7338 * config/i386/fbsd.mh: Likewise.
7339 * config/i386/fbsd64.mh: Likewise.
7340 * config/i386/go32.mh: Likewise.
7341 * config/i386/i386gnu.mh: Likewise.
7342 * config/i386/i386sol2.mh: Likewise.
7343 * config/i386/linux.mh: Likewise.
7344 * config/i386/linux64.mh: Likewise.
7345 * config/i386/mingw.mh: Likewise.
7346 * config/i386/mingw64.mh: Likewise.
7347 * config/i386/nbsd64.mh: Likewise.
7348 * config/i386/nbsdelf.mh: Likewise.
7349 * config/i386/nto.mh: Likewise.
7350 * config/i386/obsd.mh: Likewise.
7351 * config/i386/obsd64.mh: Likewise.
7352 * config/i386/sol2-64.mh: Likewise.
7353 * config/ia64/linux.mh: Likewise.
7354 * config/m32r/linux.mh: Likewise.
7355 * config/m68k/linux.mh: Likewise.
7356 * config/m68k/nbsdelf.mh: Likewise.
7357 * config/m68k/obsd.mh: Likewise.
7358 * config/m88k/obsd.mh: Likewise.
7359 * config/mips/fbsd.mh: Likewise.
7360 * config/mips/linux.mh: Likewise.
7361 * config/mips/nbsd.mh: Likewise.
7362 * config/mips/obsd64.mh: Likewise.
7363 * config/pa/linux.mh: Likewise.
7364 * config/pa/nbsd.mh: Likewise.
7365 * config/pa/obsd.mh: Likewise.
7366 * config/powerpc/aix.mh: Likewise.
7367 * config/powerpc/fbsd.mh: Likewise.
7368 * config/powerpc/linux.mh: Likewise.
7369 * config/powerpc/nbsd.mh: Likewise.
7370 * config/powerpc/obsd.mh: Likewise.
7371 * config/powerpc/ppc64-linux.mh: Likewise.
7372 * config/powerpc/spu-linux.mh: Likewise.
7373 * config/s390/linux.mh: Likewise.
7374 * config/sh/nbsd.mh: Likewise.
7375 * config/sparc/fbsd.mh: Likewise.
7376 * config/sparc/linux.mh: Likewise.
7377 * config/sparc/linux64.mh: Likewise.
7378 * config/sparc/nbsd64.mh: Likewise.
7379 * config/sparc/nbsdelf.mh: Likewise.
7380 * config/sparc/obsd64.mh: Likewise.
7381 * config/sparc/sol2.mh: Likewise.
7382 * config/tilegx/linux.mh: Likewise.
7383 * config/vax/nbsdelf.mh: Likewise.
7384 * config/vax/obsd.mh: Likewise.
7385 * config/xtensa/linux.mh: Likewise.
7386 * config/i386/i386gnu.mn: New file, with excerpts from
7387 "config/i386/i386gnu.mh".
7388 * configure: Regenerate.
7389 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7390 *.mh files under "gdb/config".
7391 * configure.nat: New file, with contents from the
7392 "gdb/config/*/*.mh" files.
7393
7ed1acaf
TW
73942017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
7395
7396 * btrace.c (btrace_clear): Free insn vector.
7397
e13cb306
PA
73982017-05-05 Pedro Alves <palves@redhat.com>
7399
7400 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7401 * configure: Regenerate.
7402
5ed8105e
PA
74032017-05-04 Pedro Alves <palves@redhat.com>
7404
7405 * Makefile.in (SFILES): Add progspace-and-thread.c.
7406 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7407 (COMMON_OBS): Add progspace-and-thread.o.
7408 * breakpoint.c: Include "progspace-and-thread.h".
7409 (update_inserted_breakpoint_locations)
7410 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7411 Use scoped_restore_current_pspace_and_thread.
7412 (create_std_terminate_master_breakpoint): Use
7413 scoped_restore_current_program_space.
7414 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7415 (print_breakpoint_location): Use
7416 scoped_restore_current_program_space.
7417 (bp_loc_is_permanent): Use
7418 scoped_restore_current_pspace_and_thread.
7419 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7420 (download_tracepoint_locations): Use
7421 scoped_restore_current_pspace_and_thread.
7422 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7423 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7424 (enum step_over_calls_kind): Moved from inferior.h.
7425 (class scoped_restore_current_thread): New class.
7426 * gdbthread.h (make_cleanup_restore_current_thread): Delete
7427 declaration.
7428 (scoped_restore_current_thread): New class.
7429 * infcmd.c: Include "common/gdb_optional.h".
7430 (continue_1, proceed_after_attach): Use
7431 scoped_restore_current_thread.
7432 (notice_new_inferior): Use scoped_restore_current_thread.
7433 * inferior.c: Include "progspace-and-thread.h".
7434 (restore_inferior, save_current_inferior): Delete.
7435 (add_inferior_command, clone_inferior_command): Use
7436 scoped_restore_current_pspace_and_thread.
7437 * inferior.h (scoped_restore_current_inferior): New class.
7438 * infrun.c: Include "progspace-and-thread.h" and
7439 "common/gdb_optional.h".
7440 (follow_fork_inferior): Use
7441 scoped_restore_current_pspace_and_thread.
7442 (scoped_restore_exited_inferior): New class.
7443 (handle_vfork_child_exec_or_exit): Use
7444 scoped_restore_exited_inferior,
7445 scoped_restore_current_pspace_and_thread,
7446 scoped_restore_current_thread and scoped_restore.
7447 (fetch_inferior_event): Use scoped_restore_current_thread.
7448 * linespec.c (decode_line_full, decode_line_1): Use
7449 scoped_restore_current_program_space.
7450 * mi/mi-main.c: Include "progspace-and-thread.h".
7451 (exec_continue): Use scoped_restore_current_thread.
7452 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7453 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7454 * proc-service.c (ps_pglobal_lookup): Use
7455 scoped_restore_current_program_space.
7456 * progspace-and-thread.c: New file.
7457 * progspace-and-thread.h: New file.
7458 * progspace.c (release_program_space, clone_program_space): Use
7459 scoped_restore_current_program_space.
7460 (restore_program_space, save_current_program_space)
7461 (save_current_space_and_thread): Delete.
7462 (switch_to_program_space_and_thread): Moved to
7463 progspace-and-thread.c.
7464 * progspace.h (save_current_program_space)
7465 (save_current_space_and_thread): Delete declarations.
7466 (scoped_restore_current_program_space): New class.
7467 * remote.c (remote_btrace_maybe_reopen): Use
7468 scoped_restore_current_thread.
7469 * symtab.c: Include "progspace-and-thread.h".
7470 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7471 * thread.c (print_thread_info_1): Use
7472 scoped_restore_current_thread.
7473 (struct current_thread_cleanup): Delete.
7474 (do_restore_current_thread_cleanup)
7475 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7476 (scoped_restore_current_thread::~scoped_restore_current_thread):
7477 ... this new dtor.
7478 (make_cleanup_restore_current_thread): Rename/convert to ...
7479 (scoped_restore_current_thread::scoped_restore_current_thread):
7480 ... this new ctor.
7481 (thread_apply_all_command): Use scoped_restore_current_thread.
7482 (thread_apply_command): Use scoped_restore_current_thread.
7483 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7484 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7485
f6223dbb
PA
74862017-05-04 Pedro Alves <palves@redhat.com>
7487
7488 * thread.c (make_cleanup_restore_current_thread): Move
7489 find_thread_ptid call before the is_stopped call. Assert that the
7490 thread is found. Replace is_stopped call by checking the thread's
7491 state directly. Remove unnecessary NULL-thread check.
7492
3c3ae77e
PA
74932017-05-04 Pedro Alves <palves@redhat.com>
7494
7495 * corelow.c (thread_section_name): New class.
7496 (get_core_register_section, get_core_siginfo): Use it.
7497
45eba0ab
AA
74982017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
7499
7500 * corelow.c (sniff_core_bfd): Remove extra semicolon.
7501 (get_core_register_section): Remove xfree of NULL pointer.
7502
f81fdd35
AH
75032017-05-03 Alan Hayward <alan.hayward@arm.com>
7504
7505 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7506 * regcache.c (regcache::raw_supply_zeroed): New function.
7507 * regcache.h (regcache::raw_supply_zeroed): New declaration.
7508
35837774
SM
75092017-05-03 Simon Marchi <simon.marchi@ericsson.com>
7510
7511 * gdbarch.sh: Remove commented out definition of
7512 TARGET_CHAR_BIT.
7513 * gdbarch.h: Re-generate.
7514
c94fee56
SDJ
75152017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7516
7517 * configure: Regenerate.
7518
d17f7b36
SM
75192017-05-02 Simon Marchi <simon.marchi@ericsson.com>
7520
7521 * solib-target.c (solib_target_relocate_section_addresses):
7522 Remove num_section_bases, num_bases, segment_bases variables.
7523
b560ebd6
SM
75242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7525
7526 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7527
f2f46dfc
SM
75282017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7529
7530 * solib-target.c: Include <vector>
7531 (struct lm_info_target) <~lm_info_target>: Remove.
7532 <segment_bases, section_bases>: Change type to
7533 std::vector<CORE_ADDR>.
7534 (library_list_start_segment, library_list_start_section,
7535 library_list_end_library,
7536 solib_target_relocate_section_addresses): Adjust.
7537
a0ff9e1a
SM
75382017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7539
7540 * gdbarch.sh (software_single_step): Change return type to
7541 std::vector<CORE_ADDR>.
7542 * gdbarch.c, gdbarch.h: Re-generate.
7543 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7544 Adjust.
7545 (arm_deal_with_atomic_sequence_raw): Adjust.
7546 (thumb_get_next_pcs_raw): Adjust.
7547 (arm_get_next_pcs_raw): Adjust.
7548 (arm_get_next_pcs): Adjust.
7549 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7550 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7551 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7552 (alpha_software_single_step): Adjust.
7553 * alpha-tdep.h (alpha_software_single_step): Adjust.
7554 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7555 * arm-tdep.c (arm_software_single_step): Adjust.
7556 (arm_breakpoint_kind_from_current_state): Adjust.
7557 * arm-tdep.h (arm_software_single_step): Adjust.
7558 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7559 * cris-tdep.c (cris_software_single_step): Adjust.
7560 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7561 (micromips_deal_with_atomic_sequence): Adjust.
7562 (deal_with_atomic_sequence): Adjust.
7563 (mips_software_single_step): Adjust.
7564 * mips-tdep.h (mips_software_single_step): Adjust.
7565 * moxie-tdep.c (moxie_software_single_step): Adjust.
7566 * nios2-tdep.c (nios2_software_single_step): Adjust.
7567 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7568 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7569 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7570 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7571 * sparc-tdep.c (sparc_software_single_step): Adjust.
7572 * spu-tdep.c (spu_software_single_step): Adjust.
7573 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7574
ea480a30
SM
75752017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7576
7577 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7578 * gdbarch.h: Re-generate.
7579
d050f7d7
TW
75802017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7581
7582 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7583 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7584 * python/py-instruction.c, python/py-instruction.h: New file.
7585 * python/py-record.c: Add py-instruction.h include.
7586 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7587 gdb.RecordInstruction.
7588 * python/python-internal.h: Add gdbpy_initialize_instruction
7589 declaration.
7590 * python/python.c (do_start_initialization): Add
7591 gdbpy_initialize_instruction.
7592
14f819c8
TW
75932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7594
7595 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7596 Remove.
7597 (btrace_func_from_recpy_func): New function.
7598 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7599 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7600 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7601 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7602 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7603 Also, use new helper functions.
7604 (btpy_list_item): Use new helper functions.
7605 (recpy_bt_function_call_history): Use new type name.
7606 (btpy_call_getset): Remove.
7607 (gdbpy_initialize_btrace): Remove code to initialize
7608 gdb.BtraceFunctionCall.
7609 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7610 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7611 recpy_bt_func_prev, recpy_bt_func_next): New export.
7612 * python/py-record.c (recpy_func_type): New static object.
7613 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7614 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7615 recpy_func_next): New function.
7616 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7617 (recpy_func_getset): New static object.
7618 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7619 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7620
0ed5da75
TW
76212017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7622
7623 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7624 (btpy_object, btpy_insn_type, btpy_new): Remove.
7625 (btpy_list_object): Use gdb.RecordInstruction type instead of
7626 gdb.BtraceInstruction type.
7627 (btrace_insn_from_recpy_insn): New function.
7628 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7629 btpy_new.
7630 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7631 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7632 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7633 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7634 instead of btpy_object.
7635 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7636 btpy_insn_data, btpy_insn_decode): Rename to ...
7637 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7638 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7639 recpy_bt_insn_decode): This. Also, use new helper functions.
7640 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7641 recpy_insn_type.
7642 (btpy_insn_getset): Remove.
7643 (gdbpy_initialize_btrace): Remove code to initialize
7644 gdb.BtraceInstruction. Use recpy_element_object.
7645 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7646 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7647 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7648 * python/py-record.c (recpy_insn_type): New static object.
7649 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7650 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7651 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7652 New function.
7653 (recpy_insn_getset): New static object.
7654 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7655 * python/py-record.h (recpy_element_object): New typedef.
7656 (recpy_insn_type, recpy_insn_new): New export.
7657
913aeadd
TW
76582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7659
7660 * py-record-btrace.c (btpy_insn_new): Removed.
7661 (btpy_insn_or_gap_new): New function.
7662 (btpy_insn_error): Removed.
7663 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7664 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7665 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7666 btpy_insn_or_gap_new instead of btpy_insn_new.
7667 (btpy_insn_getset): Remove btpy_insn_error.
7668 * py-record.c (recpy_gap_type): New static object.
7669 (recpy_gap_object): New typedef.
7670 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7671 recpy_gap_reason_string): New function.
7672 (recpy_gap_getset): New static object.
7673 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7674 * py-record.h (recpy_gap_new): New export.
7675
a3be24ad
TW
76762017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7677
7678 * python/py-record.c (recpy_ptid): Remove.
7679 (recpy_record_getset): Remove recpy_ptid.
7680
ae20e79a
TW
76812017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7682
7683 * btrace.c (btrace_fetch): Set inferior_ptid.
7684 * python/py-record-btrace.c: Add "py-record.h" include.
7685 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7686 recpy_bt_end, recpy_bt_instruction_history,
7687 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7688 in gdb.Record object instead of current ptid.
7689 * python/py-record.c: Include new "py-record.h" file.
7690 (recpy_record_object): Moved to py-record.h.
7691 * python/py-record.h: New file.
7692
8d0050ea
TW
76932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7694
7695 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7696 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7697 indentation.
7698
3f380b50
JB
76992017-05-01 Joel Brobecker <brobecker@adacore.com>
7700
7701 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7702 the past maintainers section.
7703
07495424
YQ
77042017-04-28 Yao Qi <yao.qi@linaro.org>
7705
7706 * infcmd.c (get_return_value): Use regcache ctor, and remove
7707 cleanup.
7708
deb1fa3e
YQ
77092017-04-28 Yao Qi <yao.qi@linaro.org>
7710 Pedro Alves <palves@redhat.com>
7711
7712 * regcache.c (regcache::regcache): New tag dispatch ctor.
7713 (do_cooked_read): Moved above.
7714 (regcache_dup): Use the tag dispatch ctor..
7715 * regcache.h (regcache): Declare ctor, delete copy ctor and
7716 assignment operator, remove friend regcache_dup.
7717
b421c83c
YQ
77182017-04-28 Yao Qi <yao.qi@linaro.org>
7719
7720 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7721 call method save instead of regcache_cpy.
7722 * regcache.h (struct regcache): Make regcache_dup a friend.
7723
ef79d9a3
YQ
77242017-04-28 Yao Qi <yao.qi@linaro.org>
7725
7726 * regcache.c (struct regcache): Move to regcache.h
7727 (regcache::arch): New method.
7728 (regcache_get_ptid): Update.
7729 (get_regcache_arch): Call arch method.
7730 (get_regcache_aspace): Call method aspace.
7731 (register_buffer): Change it to method.
7732 (regcache_save): Change it to regcache::save.
7733 (regcache_restore): Likewise.
7734 (regcache_cpy_no_passthrough): Remove the declaration.
7735 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7736 (regcache_cpy_no_passthrough): Change it to method
7737 cpy_no_passthrough.
7738 (regcache_register_status): Change it to method
7739 get_register_status.
7740 (regcache_invalidate): Change it to method invalidate.
7741 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7742 (regcache_raw_update): Change it to method raw_update.
7743 (regcache_raw_read): Likewise.
7744 (regcache_raw_read_signed): Likewise.
7745 (regcache_raw_read_unsigned): Likewise.
7746 (regcache_raw_write_signed): Likewise.
7747 (regcache_raw_write_unsigned): Likewise.
7748 (regcache_cooked_read): Likewise.
7749 (regcache_cooked_read_value): Likewise.
7750 (regcache_cooked_read_signed): Likewise.
7751 (regcache_cooked_read_unsigned): Likewise.
7752 (regcache_cooked_write_signed): Likewise.
7753 (regcache_cooked_write_unsigned): Likewise.
7754 (regcache_raw_set_cached_value): Likewise.
7755 (regcache_raw_write): Likewise.
7756 (regcache_cooked_write): Likewise.
7757 (regcache_xfer_part): Likewise.
7758 (regcache_raw_read_part): Likewise.
7759 (regcache_raw_write_part): Likewise.
7760 (regcache_cooked_read_part): Likewise.
7761 (regcache_cooked_write_part): Likewise.
7762 (regcache_raw_supply): Likewise.
7763 (regcache_raw_collect): Likewise.
7764 (regcache_transfer_regset): Likewise.
7765 (regcache_supply_regset): Likewise.
7766 (regcache_collect_regset): Likewise.
7767 (regcache_debug_print_register): Likewise.
7768 (enum regcache_dump_what): Move it to regcache.h.
7769 (regcache_dump): Change it to method dump.
7770 * regcache.h (enum regcache_dump_what): New.
7771 (class regcache): New.
7772 * target.c (target_fetch_registers): Call method
7773 debug_print_register.
7774 (target_store_registers): Likewise.
7775
f8fdb78e
SM
77762017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7777
7778 * windows-nat.c (struct lm_info_windows): Initialize field.
7779 (windows_make_so): Allocate lm_info_windows with new.
7780 (windows_free_so): Free lm_info_windows with delete.
7781
9ccbfd7b
SM
77822017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7783
7784 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7785 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7786 cleanup.
7787 (darwin_free_so): Free lm_info_darwin with delete.
7788
76e75227
SM
77892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7790
7791 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7792 <l_addr_p>: Change type to bool.
7793 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7794 (svr4_free_so): Free lm_info_svr4 with delete.
7795 (svr4_copy_library_list): Replace memcpy with call to copy
7796 constructor.
7797 (library_list_start_library, svr4_default_sos): Allocate
7798 lm_info_svr4 with new.
7799
51046d9e
SM
78002017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7801
7802 * solib-target.c (struct lm_info_target): Add destructor,
7803 initialize fields.
7804 <name>: Change type to std::string.
7805 (library_list_start_library): Allocate lm_info_target with new.
7806 (solib_target_free_library_list): Free lm_info_target with
7807 delete.
7808 (solib_target_current_sos): Adapt to std::string.
7809 (solib_target_free_so): Free lm_info_target with delete.
7810
4023ae76
SM
78112017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7812
7813 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7814 fields.
7815 (frv_current_sos): Allocate lm_info_frv with new.
7816 (frv_relocate_main_executable): Free lm_info_frv with delete,
7817 allocate with new.
7818 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7819
af43057b
SM
78202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7821
7822 * solib-frv.c (struct lm_info_frv): Fix indentation.
7823
b0911207
SM
78242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7825
7826 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7827 map field.
7828 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7829 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7830 and allocate with new.
7831 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7832
6c401f72
SM
78332017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7834
7835 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7836 <filename, member_name>: Change type to std::string.
7837 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7838 (library_list_start_library): Allocate lm_info_aix with new.
7839 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7840 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7841 with copy constructor.
7842
d0e449a1
SM
78432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7844
7845 * solist.h (struct lm_info): Remove.
7846 (struct lm_info_base): New class.
7847 (struct so_list) <lm_info>: Change type to lm_info_base *.
7848 * nto-tdep.c (struct lm_info): Remove.
7849 (lm_addr): Adjust.
7850 * solib-aix.c (struct lm_info): Rename to ...
7851 (struct lm_info_aix): ... this. Extend lm_info_base.
7852 (lm_info_p): Rename to ...
7853 (lm_info_aix_p): ... this, and adjust.
7854 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7855 solib_aix_parse_libraries, library_list_start_library,
7856 solib_aix_free_library_list, solib_aix_parse_libraries,
7857 solib_aix_get_library_list,
7858 solib_aix_relocate_section_addresses, solib_aix_free_so,
7859 solib_aix_get_section_offsets,
7860 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7861 Adjust.
7862 (struct solib_aix_inferior_data) <library_list>: Adjust.
7863 * solib-darwin.c (struct lm_info): Rename to ...
7864 (struct lm_info_darwin): ... this. Extend lm_info_base.
7865 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7866 * solib-dsbt.c (struct lm_info): Rename to ...
7867 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7868 (struct dsbt_info) <main_executable_lm_info): Adjust.
7869 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7870 dsbt_relocate_section_addresses): Adjust.
7871 * solib-frv.c (struct lm_info): Rename to ...
7872 (struct lm_info_frv): ... this. Extend lm_info_base.
7873 (main_executable_lm_info): Adjust.
7874 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7875 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7876 find_canonical_descriptor_in_load_object,
7877 frv_fdpic_find_canonical_descriptor): Adjust.
7878 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7879 to lm_info_svr4.
7880 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7881 svr4_clear_so, svr4_copy_library_list,
7882 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7883 svr4_current_sos, svr4_fetch_objfile_link_map,
7884 solist_update_incremental): Adjust.
7885 * solib-svr4.h (struct lm_info_svr4): Move here from
7886 solib-svr4.c.
7887 * solib-target.c (struct lm_info): Rename to ...
7888 (struct lm_info_target): ... this. Extend lm_info_base.
7889 (lm_info_p): Rename to ...
7890 (lm_info_target_p): ... this.
7891 (solib_target_parse_libraries, library_list_start_segment,
7892 library_list_start_section, library_list_start_library,
7893 library_list_end_library, solib_target_free_library_list,
7894 solib_target_current_sos, solib_target_free_so,
7895 solib_target_relocate_section_addresses): Adjust.
7896 * windows-nat.c (struct lm_info): Rename to ...
7897 (struct lm_info_windows): ... this. Extend lm_info_base.
7898 (windows_make_so, handle_load_dll, handle_unload_dll,
7899 windows_xfer_shared_libraries): Adjust.
7900
434a4023
SM
79012017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7902
7903 * solib-darwin.c (struct darwin_so_list): Remove.
7904 (darwin_current_sos): Allocate an so_list object instead of a
7905 darwin_so_list, separately allocate an lm_info object.
7906 (darwin_free_so): Free lm_info.
7907
428544e8
JB
79082017-04-28 John Baldwin <jhb@FreeBSD.org>
7909
7910 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7911 with fprintf_filtered.
7912
4621115f
YQ
79132017-04-28 Yao Qi <yao.qi@linaro.org>
7914
7915 * regcache.c (regcache::regcache): New function.
7916 (regcache::~regcache): New function.
7917 (regcache_xmalloc_1): Remove.
7918 (regcache_xmalloc): Call new regcache.
7919 (regcache_xfree): Call delete regcache.
7920 (get_thread_arch_aspace_regcache): Call new regcache.
7921
339053c2
YQ
79222017-04-28 Yao Qi <yao.qi@linaro.org>
7923
7924 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7925 lwp instead of ptid_get_lwp.
7926
7974a605
YQ
79272017-04-28 Yao Qi <yao.qi@linaro.org>
7928
7929 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7930 lwp_info instead of getting from inferior_ptid.
7931
e15c3eb4
KS
79322017-04-27 Keith Seitz <keiths@redhat.com>
7933
7934 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7935 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7936 (CV_CONVERSION_BADNESS): Define.
7937 (rank_one_type): Remove overly restrictive rvalue reference
7938 rank checks.
7939 Add cv-qualifier checks and subranks for type equality.
7940 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7941 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7942 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7943
72bc1d24
SM
79442017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7945
7946 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7947 count when creating the object.
7948
55bcecda
UW
79492017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7950 Ulrich Weigand <uweigand@de.ibm.com>
7951
7952 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7953 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7954 is used in AIX.
7955 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7956 (process_xcoff_symbol): Likewise.
7957 (scan_xcoff_symtab): Likewise.
7958
5c99fcf8
AH
79592017-04-26 Alan Hayward <alan.hayward@arm.com>
7960
7961 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7962 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7963 (ia64_access_reg): Use get_frame_register_unsigned.
7964 (ia64_access_rse_reg): Likewise.
7965 (ia64_libunwind_frame_prev_register): Likewise.
7966
b41c5a85
JW
79672017-04-26 Jiong Wang <jiong.wang@arm.com>
7968
7969 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7970 * gdbarch.c: Regenerated.
7971 * gdbarch.h: Regenerated.
7972 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7973 visibility external.
7974 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7975 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7976 (enum cfa_how_kind): Move to ...
7977 (struct dwarf2_frame_state_reg_info): Likewise.
7978 (struct dwarf2_frame_state): Likewise.
7979 * dwarf2-frame.h: ... here.
7980 (dwarf2_frame_state_alloc_regs): New declaration.
7981 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7982 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7983
c185f580
AH
79842017-04-26 Alan Hayward <alan.hayward@arm.com>
7985
7986 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7987 regcache_raw_read_unsigned.
7988 (xtensa_pseudo_register_write): Likewise.
7989
19c45594
AH
79902017-04-26 Alan Hayward <alan.hayward@arm.com>
7991
7992 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7993 (nds32_pseudo_register_write): Likewise.
7994
4658f12e
YQ
79952017-04-25 Yao Qi <yao.qi@linaro.org>
7996
7997 * regcache.c (struct regcache) <readonly_p>: Change its type
7998 to bool.
7999 (regcache_xmalloc_1): Update parameter type and callers update.
8000
d581dda8
YQ
80012017-04-25 Yao Qi <yao.qi@linaro.org>
8002
8003 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8004 set_gdbarch_wchar_bit.
8005 * arm-tdep.c (arm_gdbarch_init): Likewise.
8006
debed3db
PA
80072017-04-25 Pedro Alves <palves@redhat.com>
8008
8009 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8010 (BothAreRelocatable, memcopy, memmove): Don't define.
8011 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8012 macros.
8013
b0b92aeb
PA
80142017-04-25 Pedro Alves <palves@redhat.com>
8015
8016 * common/common-defs.h: Include "common/poison.h".
8017 * common/function-view.h: (Not, Or, Requires): Move to traits.h
8018 and adjust.
8019 * common/poison.h: New file.
8020 * common/traits.h: Include <type_traits>.
8021 (Not, Or, Requires): New, moved from common/function-view.h.
8022
16c4d54a
PA
80232017-04-25 Pedro Alves <palves@redhat.com>
8024
8025 * breakpoint.h (struct breakpoint): In-class initialize all
8026 fields. Make boolean fields "bool".
8027 * breakpoint.c (init_raw_breakpoint_without_location): Remove
8028 memset call and initializations no longer necessary.
8029
b5c36682
PA
80302017-04-25 Pedro Alves <palves@redhat.com>
8031
8032 * btrace.c (pt_btrace_insn_flags): Change parameter type to
8033 reference.
8034 (pt_btrace_insn): New function.
8035 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8036
5625a286
PA
80372017-04-25 Pedro Alves <palves@redhat.com>
8038
8039 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
8040 "base" field and inherit from "bp_location" instead. Add
8041 non-default ctor.
8042 (allocate_location_exception): Use new non-default ctor.
8043 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8044 (init_bp_location): Convert to ...
8045 (bp_location::bp_location): ... this new ctor, and remove memset
8046 call.
8047 (base_breakpoint_allocate_location): Use the new non-default ctor.
8048 * breakpoint.h (bp_location): Now a class. Declare default and
8049 non-default ctors. In-class initialize all members.
8050 (init_bp_location): Remove declaration.
8051
23bcc18f
PA
80522017-04-25 Pedro Alves <palves@redhat.com>
8053
8054 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8055 assignment operator.
8056
e1ba3053
YQ
80572017-04-24 Yao Qi <yao.qi@linaro.org>
8058
8059 * doublest.c (convert_doublest_to_floatformat): Call
8060 floatformat_totalsize_bytes.
8061
10f489e5
TT
80622017-04-22 Tom Tromey <tom@tromey.com>
8063
8064 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8065 ui_out_emit_list.
8066 * stack.c (print_frame): Use ui_out_emit_list.
8067 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8068 ui_out_emit_list.
8069 * mi/mi-main.c (print_one_inferior)
8070 (mi_cmd_data_list_register_names)
8071 (mi_cmd_data_list_register_values, mi_cmd_list_features)
8072 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8073 ui_out_emit_list.
8074 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8075 (mi_output_solib_attribs): Use ui_out_emit_list,
8076 ui_out_emit_tuple.
8077 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8078 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8079 (mi_cmd_stack_list_args, list_args_or_locals): Use
8080 ui_out_emit_list.
8081 * disasm.c (do_assembly_only): Use ui_out_emit_list.
8082 * breakpoint.c (print_solib_event, output_thread_groups): Use
8083 ui_out_emit_list.
8084
0092b74d
TT
80852017-04-22 Tom Tromey <tom@tromey.com>
8086
8087 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8088 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8089 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8090
a14a62dd
TT
80912017-04-22 Tom Tromey <tom@tromey.com>
8092
8093 * tracepoint.c (tvariables_info_1)
8094 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8095
46b9c129
TT
80962017-04-22 Tom Tromey <tom@tromey.com>
8097
8098 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8099 annotate_arg_emitter.
8100 * breakpoint.c (print_mention_watchpoint)
8101 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8102 * annotate.h (struct annotate_arg_emitter): New.
8103
2e783024
TT
81042017-04-22 Tom Tromey <tom@tromey.com>
8105
8106 * record-btrace.c (record_btrace_insn_history)
8107 (record_btrace_insn_history_range, record_btrace_call_history)
8108 (record_btrace_call_history_range): Use ui_out_emit_tuple.
8109 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8110 ui_out_emit_tuple.
8111 * stack.c (print_frame_info): Use ui_out_emit_tuple.
8112 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8113 * skip.c (skip_info): Use ui_out_emit_tuple.
8114 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8115 * progspace.c (print_program_space): Use ui_out_emit_tuple.
8116 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8117 * osdata.c (info_osdata): Use ui_out_emit_tuple.
8118 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8119 ui_out_emit_tuple.
8120 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8121 (output_register, mi_cmd_data_read_memory)
8122 (mi_cmd_data_read_memory_bytes, mi_load_progress)
8123 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8124 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8125 Use ui_out_emit_tuple.
8126 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8127 ui_out_emit_tuple.
8128 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8129 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8130 * linux-thread-db.c (info_auto_load_libthread_db): Use
8131 ui_out_emit_tuple.
8132 * inferior.c (print_inferior): Use ui_out_emit_tuple.
8133 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8134 * disasm.c (do_mixed_source_and_assembly_deprecated)
8135 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8136 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8137 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8138 * breakpoint.c (print_one_breakpoint_location)
8139 (print_one_breakpoint): Use ui_out_emit_tuple.
8140 * auto-load.c (print_script, info_auto_load_cmd): Use
8141 ui_out_emit_tuple.
8142 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8143
9be21bb4
SM
81442017-04-21 Simon Marchi <simon.marchi@ericsson.com>
8145
8146 * thread.c (print_thread_info_1): Remove dead code.
8147
0d4c07af
JK
81482017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8149
8150 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8151 GDB_SELF_TEST.
8152 * arm-tdep.c (selftests::arm_record_test): Likewise.
8153
4daf993d
YQ
81542017-04-21 Yao Qi <yao.qi@linaro.org>
8155
8156 * regcache.c (regcache_restore): Remove argument 2. Replace
8157 argument 3 with regcache. Get register status from
8158 src->register_status and get register contents from
8159 register_buffer (src, regnum).
8160 (regcache_cpy): Update.
8161
a6c21d4a
PA
81622017-04-19 Pedro Alves <palves@redhat.com>
8163
8164 * gdbthread.h (thread): Add missing closing parenthesis in
8165 comment.
8166
3a3fd0fd
PA
81672017-04-19 Pedro Alves <palves@redhat.com>
8168
8169 * common/refcounted-object.h: New file.
8170 * gdbthread.h: Include "common/refcounted-object.h".
8171 (thread_info): Inherit from refcounted_object and add comments.
8172 (thread_info::incref, thread_info::decref)
8173 (thread_info::m_refcount): Delete.
8174 (thread_info::deletable): Use the refcounted_object::refcount()
8175 method.
8176 * inferior.c (current_inferior_): Add comment.
8177 (set_current_inferior): Increment/decrement refcounts.
8178 (prune_inferiors, remove_inferior_command): Skip inferiors marked
8179 not-deletable instead of comparing with the current inferior.
8180 (initialize_inferiors): Increment the initial inferior's refcount.
8181 * inferior.h (struct inferior): Forward declare.
8182 Include "common/refcounted-object.h".
8183 (current_inferior, set_current_inferior): Move declaration to
8184 before struct inferior's definition, and fix comment.
8185 (inferior): Inherit from refcounted_object. Add comments.
8186 * thread.c (switch_to_thread_no_regs): Reference the thread's
8187 inferior pointer directly instead of doing a ptid lookup.
8188 (switch_to_no_thread): New function.
8189 (switch_to_thread(thread_info *)): New function, factored out
8190 from ...
8191 (switch_to_thread(ptid_t)): ... this.
8192 (restore_current_thread): Delete.
8193 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8194 fields, and add 'inf' field.
8195 (do_restore_current_thread_cleanup): Check whether old->inf is
8196 alive instead of looking up an inferior by ptid. Use
8197 switch_to_thread and switch_to_no_thread.
8198 (restore_current_thread_cleanup_dtor): Use old->inf directly
8199 instead of lookup up an inferior by id. Decref the inferior.
8200 Don't restore 'removable'.
8201 (make_cleanup_restore_current_thread): Same the inferior pointer
8202 in old, instead of the inferior number. Incref the inferior.
8203 Don't save/clear 'removable'.
8204
9bcb1f16
PA
82052017-04-19 Pedro Alves <palves@redhat.com>
8206
8207 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8208 unittests/scoped_restore-selftests.c.
8209 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8210 * common/scoped_restore.h (scoped_restore_base): Make "class".
8211 (scoped_restore_base::release): New public method.
8212 (scoped_restore_base::scoped_restore_base): New protected ctor.
8213 (scoped_restore_base::m_saved_var): New protected field.
8214 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8215 scoped_restore_base base class instead of m_saved_var directly.
8216 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8217 (scoped_restore_tmpl::scoped_restore_tmpl(const
8218 scoped_restore_tmpl<T>&)): Likewise.
8219 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8220 method.
8221 (scoped_restore_tmpl::saved_var): New method.
8222 (scoped_restore_tmpl::m_saved_var): Delete.
8223 * inferior.h (inferior::detaching): Now a bool.
8224 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8225 cleanup.
8226 * unittests/scoped_restore-selftests.c: New file.
8227
26fcd539
PA
82282017-04-19 Pedro Alves <palves@redhat.com>
8229
8230 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8231 Re-sort in alphabetic order.
8232
fdd243b0
PA
82332017-04-18 Pedro Alves <palves@redhat.com>
8234
8235 * xml-support.c (obstack_xml_printf): Delete.
8236 * xml-support.h (obstack_xml_printf): Delete.
8237
4895cde2
PA
82382017-04-18 Pedro Alves <palves@redhat.com>
8239
8240 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8241 vdebug, verror, body_text, start_element, end_element, name,
8242 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8243 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8244 is_xinclude>: Make private and add m_ prefix.
8245 (gdb_xml_parser::body_text): New method, based on ...
8246 (gdb_xml_body_text): ... this. Adjust.
8247 (gdb_xml_parser::vdebug): New method, based on ...
8248 (gdb_xml_debug): ... this. Adjust.
8249 (gdb_xml_parser::verror): New method, based on ...
8250 (gdb_xml_error): ... this. Adjust.
8251 (gdb_xml_parser::start_element): New method, based on ...
8252 (gdb_xml_start_element): ... this. Adjust.
8253 (gdb_xml_start_element_wrapper): Defer to
8254 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8255 (gdb_xml_parser::end_element): New method, based on ...
8256 (gdb_xml_end_element_wrapper): ... this. Adjust.
8257 (gdb_xml_parser::~gdb_xml_parser): Adjust.
8258 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8259 (gdb_xml_parser::use_dtd): New method, based on ...
8260 (gdb_xml_use_dtd): ... this. Adjust.
8261 (gdb_xml_parser::parse): New method, based on ...
8262 (gdb_xml_parse): ... this. Adjust.
8263 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8264 (xinclude_start_include): Adjust to call the parser's name method.
8265 (xml_xinclude_default, xml_xinclude_start_doctype)
8266 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8267 method.
8268 (xml_process_xincludes): Adjust to call parser methods.
8269 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8270 declarations.
8271
bd8a901f
PA
82722017-04-18 Pedro Alves <palves@redhat.com>
8273
8274 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8275 gdb::optional<std::string>.
8276 * xml-support.c: Include <string>.
8277 (scope_level::scope_level(scope_level &&))
8278 (scope_level::~scope_level): Delete.
8279 (scope_level::body): Now a std::string.
8280 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8281 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8282 parameter.
8283 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8284 (xinclude_parsing_data::output): Now a std::string reference.
8285 (xinclude_start_include): Adjust.
8286 (xml_xinclude_default): Adjust.
8287 (xml_process_xincludes): Add 'output' parameter, and return bool.
8288 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8289 and return bool.
8290 * xml-tdesc.c: Include <unordered_map> and <string>.
8291 (tdesc_xml_cache): Delete.
8292 (tdesc_xml_cache_s): Delete.
8293 (xml_cache): Now an std::unordered_map.
8294 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8295 (target_fetch_description_xml): Change return type to
8296 gdb::optional<std::string>, and adjust.
8297 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8298 (target_fetch_description_xml): Change return type to
8299 gdb::optional<std::string>.
8300
d35d1958
PA
83012017-04-18 Pedro Alves <palves@redhat.com>
8302
8303 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8304 unittests/optional-selftests.c.
8305 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8306 * unittests/optional-selftests.c: New file.
8307 * unittests/optional/assignment/1.cc: New file.
8308 * unittests/optional/assignment/2.cc: New file.
8309 * unittests/optional/assignment/3.cc: New file.
8310 * unittests/optional/assignment/4.cc: New file.
8311 * unittests/optional/assignment/5.cc: New file.
8312 * unittests/optional/assignment/6.cc: New file.
8313 * unittests/optional/assignment/7.cc: New file.
8314 * unittests/optional/cons/copy.cc: New file.
8315 * unittests/optional/cons/default.cc: New file.
8316 * unittests/optional/cons/move.cc: New file.
8317 * unittests/optional/cons/value.cc: New file.
8318 * unittests/optional/in_place.cc: New file.
8319 * unittests/optional/observers/1.cc: New file.
8320 * unittests/optional/observers/2.cc: New file.
8321
22796e97
PA
83222017-04-18 Pedro Alves <palves@redhat.com>
8323
8324 * common/gdb_optional.h: Include common/traits.h.
8325 (in_place_t): New type.
8326 (in_place): New constexpr variable.
8327 (optional::optional): Remove member initialization of
8328 m_instantiated.
8329 (optional::optional(in_place_t...)): New constructor.
8330 (optional::~optional): Use reset.
8331 (optional::optional(const optional&)): New.
8332 (optional::optional(const optional&&)): New.
8333 (optional::optional(T &)): New.
8334 (optional::optional(T &&)): New.
8335 (operator::operator=(const optional &)): New.
8336 (operator::operator=(optional &&)): New.
8337 (operator::operator= (const T &))
8338 (operator::operator= (T &&))
8339 (operator::emplace (Args &&... args)): Return a T&. Use reset.
8340 (operator::reset): New.
8341 (operator::m_instantiated):: Add in-class initializer.
8342 * common/traits.h: Include <type_traits>.
8343 (struct And): New types.
8344
a7fc9b61
PA
83452017-04-18 Pedro Alves <palves@redhat.com>
8346
8347 * xml-support.c: Include <vector>.
8348 (scope_level::scope_level(const gdb_xml_element *))
8349 (scope_level::scope_level(scope_level&&)): New.
8350 (scope_level::~scope_level): New.
8351 (scope_level_s): Delete.
8352 (gdb_xml_parser::scopes): Now a std::vector.
8353 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8354 Use std::vector.
8355 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8356 scope cleanup code.
8357 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8358 of the scopes member. Use std::vector::emplace_back.
8359
010151c9
PA
83602017-04-18 Pedro Alves <palves@redhat.com>
8361
8362 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
8363 a bool.
8364 (gdb_xml_end_element): Change type of first parameter.
8365 (gdb_xml_cleanup): Rename to ...
8366 (gdb_xml_parser::~gdb_xml_parser): ... this.
8367 (gdb_xml_create_parser_and_cleanup): Delete with ...
8368 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8369 to this new ctor.
8370 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8371 using gdb_xml_create_parser_and_cleanup.
8372 (xinclude_parsing_data): Add ctor/dtor.
8373 (xml_xinclude_cleanup): Delete.
8374 (xml_process_xincludes): Create a local xinclude_parsing_data
8375 instead of heap-allocating one. Create a local gdb_xml_parser
8376 instead of heap-allocating one with
8377 gdb_xml_create_parser_and_cleanup.
8378
d56060f0
JB
83792017-04-18 John Baldwin <jhb@FreeBSD.org>
8380
8381 PR threads/20743
8382 * fbsd-nat.c (resume_one_thread_cb): Remove.
8383 (resume_all_threads_cb): Remove.
8384 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8385 iterate_over_threads.
8386
305d16a9
JB
83872017-04-17 Joel Brobecker <brobecker@adacore.com>
8388
8389 * NEWS: Create a new section for the next release branch.
8390 Rename the section of the current branch, now that it has
8391 been cut.
8392
8bb57231
JB
83932017-04-17 Joel Brobecker <brobecker@adacore.com>
8394
8395 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8396 * version.in: Bump version to 8.0.50.DATE-git.
8397
096c92dd
SDJ
83982017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
8399
8400 PR gdb/21385
8401 * windows-nat.c (windows_create_inferior): Declare 'allargs'
8402 independently of the host, and fix build breakage on Cygwin.
8403
0550c955
PA
84042017-04-13 Pedro Alves <palves@redhat.com>
8405
8406 * inferior.c (free_inferior): Convert to ...
8407 (inferior::~inferior): ... this dtor.
8408 (inferior::inferior): New ctor, factored out from ...
8409 (add_inferior_silent): ... here. Allocate the inferior with a new
8410 expression.
8411 (delete_inferior): Call delete instead of free_inferior.
8412 * inferior.h (gdb_environ, continuation): Forward declare.
8413 (inferior): Now a class. Add in-class initialization to all
8414 members. Make boolean fields bool, except 'detaching'.
8415 (inferior::inferior): New explicit ctor.
8416 (inferior::~inferior): New.
8417
e3d60dfc
PA
84182017-04-13 Pedro Alves <palves@redhat.com>
8419
8420 * inferior.c (init_inferior_list): Delete.
8421 * inferior.h (init_inferior_list): Delete.
8422
5fd69d0a
PA
84232017-04-13 Pedro Alves <palves@redhat.com>
8424
8425 PR threads/13217
8426 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8427 (top level): Call it twice, with different thread sets.
8428
c6609450
PA
84292017-04-13 Pedro Alves <palves@redhat.com>
8430
8431 * thread.c: Include <algorithm>.
8432 (thread_array_cleanup): Delete.
8433 (scoped_inc_dec_ref): New class.
8434 (live_threads_count): New function.
8435 (set_thread_refcount): Delete.
8436 (tp_array_compar_ascending): Now a bool.
8437 (tp_array_compar): Convert to a std::sort comparison function.
8438 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8439 and live_threads_count.
8440
2a00d7ce
PA
84412017-04-13 Pedro Alves <palves@redhat.com>
8442
8443 * infrun.c (follow_fork_inferior): Also switch the current
8444 inferior.
8445
441d7c93
PA
84462017-04-13 Pedro Alves <palves@redhat.com>
8447
8448 * breakpoint.c (watch_command_1): Save watchpoint-frame info
8449 before calling create_internal_breakpoint.
8450
808480f6
PA
84512017-04-13 Pedro Alves <palves@redhat.com>
8452
8453 * fork-child.c (execv_argv): New class.
8454 (breakup_args): Refactored as ...
8455 (execv_argv::init_for_no_shell): .. this method of execv_argv.
8456 Copy arguments to storage and replace separators with NULL
8457 terminators in place.
8458 (escape_bang_in_quoted_argument): Adjust to return bool.
8459 (execv_argv::execv_argv): New ctor.
8460 (execv_argv::init_for_shell): New method, factored out from
8461 fork_inferior. Don't strdup strings into the vector.
8462 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
8463 Remove free_vector_argv call.
8464
ad3d022a
YQ
84652017-04-13 Yao Qi <yao.qi@linaro.org>
8466
8467 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8468 tdep->rx_psw_type.
8469
e6ddc3bf
YQ
84702017-04-13 Yao Qi <yao.qi@linaro.org>
8471
8472 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8473 * rx-tdep.c (rx_gdbarch_init): Likewise.
8474
bfb8cf90
PA
84752017-04-13 Pedro Alves <palves@redhat.com>
8476
8477 * breakpoint.h (struct breakpoint): Reindent.
8478
f5336ca5
PA
84792017-04-13 Pedro Alves <palves@redhat.com>
8480
8481 * breakpoint.c (bp_location): Rename to ...
8482 (bp_locations): ... this. All references updated.
8483 (bp_location_count): Rename to ...
8484 (bp_locations_count): ... this. All references updated.
8485 (bp_location_placed_address_before_address_max): Rename to ...
8486 (bp_locations_placed_address_before_address_max): ... this. All
8487 references updated.
8488 (bp_location_shadow_len_after_address_max): Rename to ...
8489 (bp_locations_shadow_len_after_address_max): ... this. All
8490 references updated.
8491 (bp_location_compare_addrs): Rename to ...
8492 (bp_locations_compare_addrs): ... this. All references updated.
8493 (bp_location_compare):Rename to ...
8494 (bp_locations_compare): ... this. All references updated.
8495 (bp_location_target_extensions_update): Rename to ...
8496 (bp_locations_target_extensions_update): ... this. All references
8497 updated.
8498
be628ab8
SDJ
84992017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8500
8501 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8502 * common/common.m4: Check headers 'termios.h', 'termio.h' and
8503 'sgtty.h'.
8504 * common/gdb_termios.h: New file, with parts of "terminal.h".
8505 * inflow.c: Include "gdb_termios.h".
8506 * ser-unix.c: Include "gdb_termios.h".
8507 * terminal.h: Move terminal-related defines to
8508 "common/gdb_termios.h".
8509
8e9e35b1
TT
85102017-04-12 Tom Tromey <tom@tromey.com>
8511
8512 * probe.c (parse_probes): Update.
8513 * location.h (delete_event_location): Don't declare.
8514 (event_location_deleter::operator()): Update.
8515 * location.c (event_location_deleter::operator()): Rename from
8516 delete_event_location.
8517 * linespec.h (linespec_result) <location>: Change type to
8518 event_location_up.
8519 * linespec.c (canonicalize_linespec, event_location_to_sals)
8520 (decode_objc): Update.
8521 (linespec_result): Don't call delete_event_location.
8522 * breakpoint.c (create_breakpoints_sal)
8523 (bkpt_probe_create_sals_from_location)
8524 (strace_marker_create_sals_from_location): Update.
8525
16e802b9
TT
85262017-04-12 Tom Tromey <tom@tromey.com>
8527
8528 * linespec.h (struct linespec_result): Add constructor and
8529 destructor.
8530 (init_linespec_result, destroy_linespec_result)
8531 (make_cleanup_destroy_linespec_result): Don't declare.
8532 * linespec.c (init_linespec_result): Remove.
8533 (linespec_result::~linespec_result): Rename from
8534 destroy_linespec_result. Update.
8535 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8536 Remove.
8537 * breakpoint.c (create_breakpoint, break_range_command)
8538 (decode_location_default): Update.
8539 * ax-gdb.c (agent_command_1): Update.
8540
d28cd78a
TT
85412017-04-12 Tom Tromey <tom@tromey.com>
8542
8543 * remote.c (remote_download_tracepoint): Update.
8544 * python/py-breakpoint.c (bppy_get_location): Update.
8545 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8546 (gdbscm_breakpoint_location): Update.
8547 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8548 * breakpoint.h (struct breakpoint) <location, location_range_end>:
8549 Change type to event_location_up.
8550 * breakpoint.c (create_overlay_event_breakpoint)
8551 (create_longjmp_master_breakpoint)
8552 (create_std_terminate_master_breakpoint)
8553 (create_exception_master_breakpoint)
8554 (breakpoint_event_location_empty_p, print_breakpoint_location)
8555 (print_one_breakpoint_location, create_thread_event_breakpoint)
8556 (init_breakpoint_sal, create_breakpoint)
8557 (print_recreate_ranged_breakpoint, break_range_command)
8558 (init_ada_exception_breakpoint, say_where): Update.
8559 (base_breakpoint_dtor): Don't call delete_event_location.
8560 (bkpt_print_recreate, tracepoint_print_recreate)
8561 (dprintf_print_recreate, update_static_tracepoint)
8562 (breakpoint_re_set_default): Update.
8563
711799d5
TT
85642017-04-12 Tom Tromey <tom@tromey.com>
8565
8566 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8567 type of "to_do". Update.
8568 (compute_stack_depth): Use std::vector.
8569
52d214d3
TT
85702017-04-12 Tom Tromey <tom@tromey.com>
8571
8572 * printcmd.c (find_instruction_backward): Use std::vector.
8573
4c404b8b
TT
85742017-04-12 Tom Tromey <tom@tromey.com>
8575
8576 * symfile.c (objfilep): Remove typedef.
8577 (reread_symbols): Use a std::vector.
8578
156d9eab
TT
85792017-04-12 Tom Tromey <tom@tromey.com>
8580
8581 * mi/mi-main.c (exec_direction_forward): Remove.
8582 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8583 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8584 scoped_restore.
8585 * guile/guile.c (guile_repl_command, guile_command)
8586 (gdbscm_execute_gdb_command): Use scoped_restore.
8587 * go-exp.y (go_parse): Use scoped_restore.
8588 * d-exp.y (d_parse): Use scoped_restore.
8589 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8590 * c-exp.y (c_parse): Use scoped_restore.
8591
4d89769a
TT
85922017-04-12 Tom Tromey <tom@tromey.com>
8593
8594 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8595 (mi_parse): Update return type.
8596 (mi_parse_free): Remove.
8597 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8598 (mi_parse::~mi_parse): Rename from mi_parse_free.
8599 (mi_parse_cleanup): Remove.
8600 (mi_parse): Return a unique_ptr. Use new.
8601 * mi/mi-main.c (mi_execute_command): Update.
8602
4b217cc7
TT
86032017-04-12 Tom Tromey <tom@tromey.com>
8604
8605 * location.c (explicit_location_lex_one): Return a
8606 unique_xmalloc_ptr.
8607 (string_to_explicit_location): Update. Remove cleanups.
8608
59d3651b
TT
86092017-04-12 Tom Tromey <tom@tromey.com>
8610
8611 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8612 (compare_value_and_voffset): Change type. Update.
8613 (compute_vtable_size): Change type of "offset_vec".
8614 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8615 (gnuv3_get_typeid): Remove extraneous declaration.
8616
b24b0d6c
TT
86172017-04-12 Tom Tromey <tom@tromey.com>
8618
8619 * charset.h (wchar_iterator): Fix comment.
8620
80a3b8c5
TT
86212017-04-12 Tom Tromey <tom@tromey.com>
8622
8623 * charset.c (iconv_wrapper): New class.
8624 (cleanup_iconv): Remove.
8625 (convert_between_encodings): Use it.
8626
c83dd867
TT
86272017-04-12 Tom Tromey <tom@tromey.com>
8628
8629 * symfile.h (increment_reading_symtab): Update type.
8630 * symfile.c (decrement_reading_symtab): Remove.
8631 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8632 * psymtab.c (psymtab_to_symtab): Update.
8633 * dwarf2read.c (dw2_instantiate_symtab): Update.
8634
0e8621a0
TT
86352017-04-12 Tom Tromey <tom@tromey.com>
8636
8637 * jit.c (struct jit_reader): Declare separately. Add constructor
8638 and destructor. Change type of "handle".
8639 (loaded_jit_reader): Define separately.
8640 (jit_reader_load): Update. New "new".
8641 (jit_reader_unload_command): Use "delete".
8642 * gdb-dlfcn.h (struct dlclose_deleter): New.
8643 (gdb_dlhandle_up): New typedef.
8644 (gdb_dlopen, gdb_dlsym): Update types.
8645 (gdb_dlclose): Remove.
8646 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8647 (gdb_dlsym): Change type of "handle".
8648 (make_cleanup_dlclose): Remove.
8649 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8650 * compile/compile-c-support.c (load_libcc): Update.
8651
67d89901
TT
86522017-04-12 Tom Tromey <tom@tromey.com>
8653
8654 * symtab.h (find_pcs_for_symtab_line): Change return type.
8655 * symtab.c (find_pcs_for_symtab_line): Change return type.
8656 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8657 type of "vec". Update.
8658 (ltpy_get_pcs_for_line): Update.
8659 * linespec.c (decode_digits_ordinary): Update.
8660
93921405
TT
86612017-04-12 Tom Tromey <tom@tromey.com>
8662
8663 * tracepoint.c (actions_command): Update.
8664 * python/python.c (python_command, python_interactive_command):
8665 Update.
8666 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8667 * guile/guile.c (guile_command): Update.
8668 * defs.h (read_command_lines, read_command_lines_1): Return
8669 command_line_up.
8670 (command_lines_deleter): New struct.
8671 (command_line_up): New typedef.
8672 * compile/compile.c (compile_code_command)
8673 (compile_print_command): Update.
8674 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8675 command_line_up.
8676 (make_cleanup_free_command_lines): Remove.
8677 * cli/cli-script.c (get_command_line, read_command_lines_1)
8678 (copy_command_lines): Return command_line_up.
8679 (while_command, if_command, read_command_lines, define_command)
8680 (document_command): Update.
8681 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8682 Remove.
8683 * breakpoint.h (breakpoint_set_commands): Change type of
8684 "commands".
8685 * breakpoint.c (breakpoint_set_commands): Change type of
8686 "commands". Update.
8687 (do_map_commands_command, update_dprintf_command_list)
8688 (create_tracepoint_from_upload): Update.
8689
ffc2605c
TT
86902017-04-12 Tom Tromey <tom@tromey.com>
8691
8692 * tracepoint.c (scope_info): Update.
8693 * spu-tdep.c (spu_catch_start): Update.
8694 * python/python.c (gdbpy_decode_line): Update.
8695 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8696 * python/py-breakpoint.c (bppy_init): Update.
8697 * probe.c (parse_probes): Update.
8698 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8699 * location.h (event_location_deleter): New struct.
8700 (event_location_up): New typedef.
8701 (new_linespec_location, new_address_location, new_probe_location)
8702 (new_explicit_location, copy_event_location)
8703 (string_to_event_location, string_to_event_location_basic)
8704 (string_to_explicit_location): Update return type.
8705 (make_cleanup_delete_event_location): Remove.
8706 * location.c (new_linespec_location, new_address_location)
8707 (new_probe_location, new_explicit_location, copy_event_location):
8708 Return event_location_up.
8709 (delete_event_location_cleanup)
8710 (make_cleanup_delete_event_location): Remove.
8711 (string_to_explicit_location, string_to_event_location_basic)
8712 (string_to_event_location): Return event_location_up.
8713 * linespec.c (canonicalize_linespec, event_location_to_sals)
8714 (decode_line_with_current_source)
8715 (decode_line_with_last_displayed, decode_objc): Update.
8716 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8717 * completer.c (location_completer): Update.
8718 * cli/cli-cmds.c (edit_command, list_command): Update.
8719 * breakpoint.c (create_overlay_event_breakpoint)
8720 (create_longjmp_master_breakpoint)
8721 (create_std_terminate_master_breakpoint)
8722 (create_exception_master_breakpoint)
8723 (create_thread_event_breakpoint): Update.
8724 (init_breakpoint_sal): Update. Remove some dead code.
8725 (create_breakpoint_sal): Change type of "location". Update.
8726 (create_breakpoints_sal, create_breakpoint, break_command_1)
8727 (dprintf_command, break_range_command, until_break_command)
8728 (init_ada_exception_breakpoint)
8729 (strace_marker_create_sals_from_location)
8730 (update_static_tracepoint, trace_command, ftrace_command)
8731 (strace_command, create_tracepoint_from_upload): Update.
8732 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8733 * ax-gdb.c (agent_command_1): Update.
8734
8f10c932
PA
87352017-04-12 Pedro Alves <palves@redhat.com>
8736
8737 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8738 * configure.tgt: Handle i[34567]86-*-go32* and
8739 i[34567]86-*-msdosdjgpp*.
8740 * i386-tdep.c (i386_svr4_reg_to_regnum):
8741 Make extern.
8742 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8743 i386-go32-tdep.c.
8744 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8745 * i386-go32-tdep.c: New file.
8746 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8747 declarations.
8748
0a31ccfb
SM
87492017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8750
8751 * aix-thread.c (pd_status2str): Change return type to const char *.
8752
e9bb3fbb
PA
87532017-04-12 Pedro Alves <palves@redhat.com>
8754
8755 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8756 calls to set_gdbarch_gnu_triplet_regexp.
8757
53375380
PA
87582017-04-12 Pedro Alves <palves@redhat.com>
8759
8760 PR gdb/21323
8761 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8762 New enum value.
8763 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8764 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8765 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8766 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8767 * gdbarch.h, gdbarch.c: Regenerate.
8768 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8769 gdbarch_wchar_bit and gdbarch_wchar_signed.
8770 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8771 * arm-tdep.c (arm_gdbarch_init): Likewise.
8772 * avr-tdep.c (avr_gdbarch_init): Likewise.
8773 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8774 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8775 * i386-tdep.c (i386_go32_init_abi): Likewise.
8776 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8777 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8778 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8779 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8780 * sh-tdep.c (sh_gdbarch_init): Likewise.
8781 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8782 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8783 * windows-tdep.c (windows_init_abi): Likewise.
8784 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8785
53e710ac
PA
87862017-04-12 Pedro Alves <palves@redhat.com>
8787
8788 PR c++/21323
8789 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8790 cplus_primitive_type_char32_t>: New enum values.
8791 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8792 and cplus_primitive_type_char32_t.
8793 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8794 32, use the archtecture's built-in type for char16_t and char32_t,
8795 respectively. Otherwise, fallback to init_integer_type as before,
8796 but make the type unsigned, and issue a complaint.
8797 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8798
ab0538b8
AH
87992017-04-12 Alan Hayward <alan.hayward@arm.com>
8800
5e0e0422 8801 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
8802 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8803
5430098f
SDJ
88042017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8805
8806 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8807 'const char *'.
8808
7c5ded6a
SDJ
88092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8810
8811 * common/common-utils.c (free_vector_argv): New function.
8812 * common/common-utils.h: Include <vector>.
8813 (free_vector_argv): New prototype.
8814 * darwin-nat.c (darwin_create_inferior): Rewrite function
8815 prototype in order to constify "exec_file" and accept a
8816 "std::string" for "allargs".
8817 * fork-child.c: Include <vector>.
8818 (breakup_args): Rewrite function, using C++.
8819 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8820 and accept "std::string" for "allargs". Update the code to
8821 calculate "argv" based on "allargs". Update calls to "exec_fun"
8822 and "execvp".
8823 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8824 order to constify "exec_file" and accept a "std::string" for
8825 "allargs".
8826 * go32-nat.c (go32_create_inferior): Likewise.
8827 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8828 * infcmd.c (run_command_1): Constify "exec_file". Use
8829 "std::string" for inferior arguments.
8830 * inferior.h (fork_inferior): Update prototype.
8831 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8832 prototype in order to constify "exec_file" and accept a
8833 "std::string" for "allargs".
8834 * nto-procfs.c (procfs_create_inferior): Likewise.
8835 * procfs.c (procfs_create_inferior): Likewise.
8836 * remote-sim.c (gdbsim_create_inferior): Likewise.
8837 * remote.c (extended_remote_run): Update code to accept
8838 "std::string" as argument.
8839 (extended_remote_create_inferior): Rewrite function prototype in
8840 order to constify "exec_file" and accept a "std::string" for
8841 "allargs".
8842 * rs6000-nat.c (super_create_inferior): Likewise.
8843 (rs6000_create_inferior): Likewise.
8844 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8845 * windows-nat.c (windows_create_inferior): Likewise.
8846
ae0eee42
PA
88472017-04-11 Pedro Alves <palves@redhat.com>
8848
8849 * thread.c: Fix whitespace throughout.
8850
a6acac06
PR
88512017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8852
8853 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8854
64403bd1
AH
88552017-04-11 Alan Hayward <alan.hayward@arm.com>
8856
8857 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8858
a5bef50f
SDJ
88592017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8860
8861 PR gdb/21364
8862 * osdata.c (info_osdata): Check if 'type' is an empty string
8863 instead of NULL.
8864
9295a5a9
PA
88652017-04-10 Pedro Alves <palves@redhat.com>
8866
8867 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8868 (ptid_to_global_thread_id, in_thread_list)
8869 (do_captured_list_thread_ids, set_resumed, set_running)
8870 (set_executing, set_stop_requested, finish_thread_state)
8871 (validate_registers_access, can_access_registers_ptid)
8872 (print_thread_info_1, switch_to_thread)
8873 (do_restore_current_thread_cleanup)
8874 (make_cleanup_restore_current_thread, thread_command)
8875 (thread_name_command): Use operator== instead of ptid_equal.
8876
996812e3
PA
88772017-04-10 Pedro Alves <palves@redhat.com>
8878
8879 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8880 (current_thread_cleanup_chain): Delete.
8881 (restore_current_thread_cleanup_dtor)
8882 (make_cleanup_restore_current_thread): Remove references to
8883 current_thread_cleanup_chain.
8884
845b344f
AH
88852017-04-10 Alan Hayward <alan.hayward@arm.com>
8886
8887 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8888 REG_UNKNOWN.
8889
803bdfe4
YQ
88902017-04-10 Yao Qi <yao.qi@linaro.org>
8891
8892 PR gdb/19942
8893 * gdbthread.h (thread_info::deletable): New method.
8894 (thread_info::incref): New method.
8895 (thread_info::decref): New method.
8896 (thread_info::refcount): Move it to private.
8897 * infrun.c (save_stop_context): Call inc_refcount.
8898 (release_stop_context_cleanup): Likewise.
8899 * thread.c (set_thread_exited): New function.
8900 (init_thread_list): Delete "tp" only it is deletable, otherwise
8901 call set_thread_exited.
8902 (delete_thread_1): Call set_thread_exited.
8903 (current_thread_cleanup) <inferior_pid>: Remove.
8904 <thread>: New field.
8905 (restore_current_thread_ptid_changed): Removed.
8906 (do_restore_current_thread_cleanup): Adjust.
8907 (restore_current_thread_cleanup_dtor): Don't call
8908 find_thread_ptid.
8909 (set_thread_refcount): Use dec_refcount.
8910 (make_cleanup_restore_current_thread): Adjust.
8911 (thread_apply_all_command): Call inc_refcount.
8912 (_initialize_thread): Don't call
8913 observer_attach_thread_ptid_changed.
8914
8c25b497
YQ
89152017-04-10 Yao Qi <yao.qi@linaro.org>
8916
8917 * thread.c (delete_thread_1): Hoist code on marking thread as
8918 exited.
8919
8473b447
SM
89202017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8921
8922 * windows-nat.c (windows_detach): Initialize ptid with
8923 minus_one_ptid.
8924
6670ec13
SM
89252017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8926
8927 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8928
ba2f91bb
AH
89292017-04-07 Alan Hayward <alan.hayward@arm.com>
8930
8931 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8932 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8933 (bfin_pseudo_register_write): Likewise
8934
436252de
SM
89352017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8936
8937 * common/ptid.h (struct ptid): Change to...
8938 (class ptid_t): ... this.
8939 <ptid_t>: New constructors.
8940 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8941 matches>: New methods.
8942 <make_null, make_minus_one>: New static methods.
8943 <pid>: Rename to...
8944 <m_pid>: ...this.
8945 <lwp>: Rename to...
8946 <m_lwp>: ...this.
8947 <tid>: Rename to...
8948 <m_tid>: ...this.
8949 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8950 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8951 as references, move comment to class ptid_t.
8952 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8953 ptid_t static methods.
8954 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8955 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8956 Take ptid arguments as references, implement using ptid_t methods.
8957 * unittests/ptid-selftests.c: New file.
8958 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8959 unittests/ptid-selftests.c.
8960 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8961
0dedf377
TP
89622017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8963
8964 * python/python.c (python_run_simple_file): Cast mode literal to
8965 non-const char pointer as expected by PyFile_FromString.
8966
4e9868d4
SM
89672017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8968
8969 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8970 minus_one_ptid and null_ptid.
8971
9bf2a700
PA
89722017-04-05 Pedro Alves <palves@redhat.com>
8973
8974 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8975 * configure: Regenerate.
8976
a121b7c1
PA
89772017-04-05 Pedro Alves <palves@redhat.com>
8978
8979 * ada-exp.y (yyerror): Constify.
8980 * ada-lang.c (bound_name, get_selections)
8981 (ada_variant_discrim_type)
8982 (ada_variant_discrim_name, ada_value_struct_elt)
8983 (ada_lookup_struct_elt_type, is_unchecked_variant)
8984 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8985 (catch_ada_exception_command_split)
8986 (catch_ada_assert_command_split, catch_assert_command)
8987 (ada_op_name): Constify.
8988 * ada-lang.h (ada_yyerror, get_selections)
8989 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8990 * arc-tdep.c (arc_print_frame_cache): Constify.
8991 * arm-tdep.c (arm_skip_stub): Constify.
8992 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8993 (gen_aggregate_elt_ref): Constify.
8994 * bcache.c (print_bcache_statistics): Constify.
8995 * bcache.h (print_bcache_statistics): Constify.
8996 * break-catch-throw.c (catch_exception_command_1):
8997 * breakpoint.c (struct ep_type_description::description):
8998 Constify.
8999 (add_solib_catchpoint): Constify.
9000 (catch_fork_command_1): Add cast.
9001 (add_catch_command): Constify.
9002 * breakpoint.h (add_catch_command, add_solib_catchpoint):
9003 Constify.
9004 * bsd-uthread.c (bsd_uthread_state): Constify.
9005 * buildsym.c (patch_subfile_names): Constify.
9006 * buildsym.h (next_symbol_text_func, patch_subfile_names):
9007 Constify.
9008 * c-exp.y (yyerror): Constify.
9009 (token::oper): Constify.
9010 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9011 * c-varobj.c (cplus_describe_child): Constify.
9012 * charset.c (find_charset_names): Add cast.
9013 (find_charset_names): Constify array and add const_cast.
9014 * cli/cli-cmds.c (complete_command, cd_command): Constify.
9015 (edit_command): Constify.
9016 * cli/cli-decode.c (lookup_cmd): Constify.
9017 * cli/cli-dump.c (dump_memory_command, dump_value_command):
9018 Constify.
9019 (struct dump_context): Constify.
9020 (add_dump_command, restore_command): Constify.
9021 * cli/cli-script.c (get_command_line): Constify.
9022 * cli/cli-script.h (get_command_line): Constify.
9023 * cli/cli-utils.c (check_for_argument): Constify.
9024 * cli/cli-utils.h (check_for_argument): Constify.
9025 * coff-pe-read.c (struct read_pe_section_data): Constify.
9026 * command.h (lookup_cmd): Constify.
9027 * common/print-utils.c (decimal2str): Constify.
9028 * completer.c (gdb_print_filename): Constify.
9029 * corefile.c (set_gnutarget): Constify.
9030 * cp-name-parser.y (yyerror): Constify.
9031 * cp-valprint.c (cp_print_class_member): Constify.
9032 * cris-tdep.c (cris_register_name, crisv32_register_name):
9033 Constify.
9034 * d-exp.y (yyerror): Constify.
9035 (struct token::oper): Constify.
9036 * d-lang.h (d_yyerror): Constify.
9037 * dbxread.c (struct header_file_location::name): Constify.
9038 (add_old_header_file, add_new_header_file, last_function_name)
9039 (dbx_next_symbol_text, add_bincl_to_list)
9040 (find_corresponding_bincl_psymtab, set_namestring)
9041 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9042 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9043 * defs.h (command_line_input, print_address_symbolic)
9044 (deprecated_readline_begin_hook): Constify.
9045 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9046 Constify.
9047 * event-top.c (handle_line_of_input): Constify and add cast.
9048 * exceptions.c (catch_errors): Constify.
9049 * exceptions.h (catch_errors): Constify.
9050 * expprint.c (print_subexp_standard, op_string, op_name)
9051 (op_name_standard, dump_raw_expression, dump_raw_expression):
9052 * expression.h (op_name, op_string, dump_raw_expression):
9053 Constify.
9054 * f-exp.y (yyerror): Constify.
9055 (struct token::oper): Constify.
9056 (struct f77_boolean_val::name): Constify.
9057 * f-lang.c (f_word_break_characters): Constify.
9058 * f-lang.h (f_yyerror): Constify.
9059 * fork-child.c (fork_inferior): Add cast.
9060 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9061 (new_variant): Constify.
9062 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9063 * gdbarch.c: Regenerate.
9064 * gdbcore.h (set_gnutarget): Constify.
9065 * go-exp.y (yyerror): Constify.
9066 (token::oper): Constify.
9067 * go-lang.h (go_yyerror): Constify.
9068 * go32-nat.c (go32_sysinfo): Constify.
9069 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9070 * guile/scm-cmd.c (cmdscm_function): Constify.
9071 * guile/scm-param.c (pascm_param_value): Constify.
9072 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9073 (h8300sx_register_name): Constify.
9074 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9075 Constify.
9076 * ia64-tdep.c (ia64_register_names): Constify.
9077 * infcmd.c (construct_inferior_arguments): Constify.
9078 (path_command, attach_post_wait): Constify.
9079 * language.c (show_range_command, show_case_command)
9080 (unk_lang_error): Constify.
9081 * language.h (language_defn::la_error)
9082 (language_defn::la_name_of_this): Constify.
9083 * linespec.c (decode_line_2): Constify.
9084 * linux-thread-db.c (thread_db_err_str): Constify.
9085 * lm32-tdep.c (lm32_register_name): Constify.
9086 * m2-exp.y (yyerror): Constify.
9087 * m2-lang.h (m2_yyerror): Constify.
9088 * m32r-tdep.c (m32r_register_names): Constify and make static.
9089 * m68hc11-tdep.c (m68hc11_register_names): Constify.
9090 * m88k-tdep.c (m88k_register_name): Constify.
9091 * macroexp.c (appendmem): Constify.
9092 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9093 (upgrade_type, parse_external, parse_partial_symbols)
9094 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9095 (new_symbol): Constify.
9096 * memattr.c (mem_info_command): Constify.
9097 * mep-tdep.c (register_name_from_keyword): Constify.
9098 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9099 Constify.
9100 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9101 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9102 * mi/mi-main.c (captured_mi_execute_command): Constify and add
9103 cast.
9104 (mi_execute_async_cli_command): Constify.
9105 * mips-tdep.c (mips_register_name): Constify.
9106 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9107 (am33_register_name, am33_2_register_name)
9108 * moxie-tdep.c (moxie_register_names): Constify.
9109 * nat/linux-osdata.c (osdata_type): Constify fields.
9110 * nto-tdep.c (nto_parse_redirection): Constify.
9111 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9112 (lookup_child_selector): Constify.
9113 (objc_methcall::name): Constify.
9114 * objc-lang.h (lookup_objc_class, lookup_child_selector)
9115 (lookup_struct_typedef): Constify.
9116 * objfiles.c (pc_in_section): Constify.
9117 * objfiles.h (pc_in_section): Constify.
9118 * p-exp.y (struct token::oper): Constify.
9119 (yyerror): Constify.
9120 * p-lang.h (pascal_yyerror): Constify.
9121 * parser-defs.h (op_name_standard): Constify.
9122 (op_print::string): Constify.
9123 (exp_descriptor::op_name): Constify.
9124 * printcmd.c (print_address_symbolic): Constify.
9125 * psymtab.c (print_partial_symbols): Constify.
9126 * python/py-breakpoint.c (stop_func): Constify.
9127 (bppy_get_expression): Constify.
9128 * python/py-cmd.c (cmdpy_completer::name): Constify.
9129 (cmdpy_function): Constify.
9130 * python/py-event.c (evpy_add_attribute)
9131 (gdbpy_initialize_event_generic): Constify.
9132 * python/py-event.h (evpy_add_attribute)
9133 (gdbpy_initialize_event_generic): Constify.
9134 * python/py-evts.c (add_new_registry): Constify.
9135 * python/py-finishbreakpoint.c (outofscope_func): Constify.
9136 * python/py-framefilter.c (get_py_iter_from_func): Constify.
9137 * python/py-inferior.c (get_buffer): Add cast.
9138 * python/py-param.c (parm_constant::name): Constify.
9139 * python/py-unwind.c (fprint_frame_id): Constify.
9140 * python/python.c (gdbpy_parameter_value): Constify.
9141 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9142 * remote.c (memory_packet_config::name): Constify.
9143 (show_packet_config_cmd, remote_write_bytes)
9144 (remote_buffer_add_string):
9145 * reverse.c (exec_reverse_once): Constify.
9146 * rs6000-tdep.c (variant::name, variant::description): Constify.
9147 * rust-exp.y (rustyyerror): Constify.
9148 * rust-lang.c (rust_op_name): Constify.
9149 * rust-lang.h (rustyyerror): Constify.
9150 * serial.h (serial_ops::name): Constify.
9151 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9152 (sh_sh3e_register_name, sh_sh2e_register_name)
9153 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9154 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9155 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9156 (sh_sh4al_dsp_register_name): Constify.
9157 * sh64-tdep.c (sh64_register_name): Constify.
9158 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9159 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9160 * stabsread.c (patch_block_stabs, read_type_number)
9161 (ref_map::stabs, ref_add, process_reference)
9162 (symbol_reference_defined, define_symbol, define_symbol)
9163 (error_type, read_type, read_member_functions, read_cpp_abbrev)
9164 (read_one_struct_field, read_struct_fields, read_baseclasses)
9165 (read_tilde_fields, read_struct_type, read_array_type)
9166 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9167 (read_huge_number, read_range_type, read_args, common_block_start)
9168 (find_name_end): Constify.
9169 * stabsread.h (common_block_start, define_symbol)
9170 (process_one_symbol, symbol_reference_defined, ref_add):
9171 * symfile.c (get_section_index, add_symbol_file_command):
9172 * symfile.h (get_section_index): Constify.
9173 * target-descriptions.c (tdesc_type::name): Constify.
9174 (tdesc_free_type): Add cast.
9175 * target.c (find_default_run_target):
9176 (add_deprecated_target_alias, find_default_run_target)
9177 (target_announce_detach): Constify.
9178 (do_option): Constify.
9179 * target.h (add_deprecated_target_alias): Constify.
9180 * thread.c (print_thread_info_1): Constify.
9181 * top.c (deprecated_readline_begin_hook, command_line_input):
9182 Constify.
9183 (init_main): Add casts.
9184 * top.h (handle_line_of_input): Constify.
9185 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9186 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9187 (tfind_command): Rename to ...
9188 (tfind_command_1): ... this and constify.
9189 (tfind_command): New function.
9190 (tfind_end_command, tfind_start_command): Adjust.
9191 (encode_source_string): Constify.
9192 * tracepoint.h (encode_source_string): Constify.
9193 * tui/tui-data.c (tui_partial_win_by_name): Constify.
9194 * tui/tui-data.h (tui_partial_win_by_name): Constify.
9195 * tui/tui-source.c (tui_set_source_content_nil): Constify.
9196 * tui/tui-source.h (tui_set_source_content_nil): Constify.
9197 * tui/tui-win.c (parse_scrolling_args): Constify.
9198 * tui/tui-windata.c (tui_erase_data_content): Constify.
9199 * tui/tui-windata.h (tui_erase_data_content): Constify.
9200 * tui/tui-winsource.c (tui_erase_source_content): Constify.
9201 * tui/tui.c (tui_enable): Add cast.
9202 * utils.c (defaulted_query): Constify.
9203 (init_page_info): Add cast.
9204 (puts_debug, subset_compare): Constify.
9205 * utils.h (subset_compare): Constify.
9206 * varobj.c (varobj_format_string): Constify.
9207 * varobj.h (varobj_format_string): Constify.
9208 * vax-tdep.c (vax_register_name): Constify.
9209 * windows-nat.c (windows_detach): Constify.
9210 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9211 * xml-support.c (gdb_xml_end_element): Constify.
9212 * xml-tdesc.c (tdesc_start_reg): Constify.
9213 * xstormy16-tdep.c (xstormy16_register_name): Constify.
9214 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9215 * xtensa-tdep.h (xtensa_register_t::name): Constify.
9216
995816ba
PA
92172017-04-05 Pedro Alves <palves@redhat.com>
9218
9219 * proc-api.c (struct trans): Constify.
9220 (procfs_note): Constify.
9221 * proc-events.c (struct trans, syscall_table):
9222 * proc-flags.c (struct trans): Constify.
9223 * proc-utils.h (procfs_note): Constify.
9224 * proc-why.c (struct trans): Constify.
9225 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9226 (procfs_detach): Constify.
9227 * sol-thread.c (struct string_map): Constify.
9228 (td_err_string, td_state_string): Constify.
9229
3e83a920
PA
92302017-04-05 Pedro Alves <palves@redhat.com>
9231
9232 * proc-api.c (procfs_filename): Don't initialize
9233 procfs_filename.
9234 (prepare_to_trace): Assume procfs_filename is non-NULL.
9235 (_initialize_proc_api): Give procfs_filename a default value here.
9236
63160a43
PA
92372017-04-05 Pedro Alves <palves@redhat.com>
9238
9239 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9240 'cond_string' parameter.
9241 (extract_exception_regexp): Constify 'string' parameter.
9242 (catch_exception_command_1): Constify.
9243 * breakpoint.c (init_catchpoint)
9244 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9245 parameter.
9246 (ep_parse_optional_if_clause, catch_fork_command_1)
9247 (catch_exec_command_1): Constify.
9248 * breakpoint.h (init_catchpoint): Constify 'cond_string'
9249 parameter.
9250 (ep_parse_optional_if_clause): Constify.
9251 * cli/cli-utils.c (remove_trailing_whitespace)
9252 (check_for_argument): Constify.
9253 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9254 non-const overload.
9255 (check_for_argument): Likewise.
9256
9b2eba3d
PA
92572017-04-05 Pedro Alves <palves@redhat.com>
9258
9259 * event-top.c (command_line_handler): Add cast to execute_command
9260 call.
9261 * record-btrace.c (cmd_record_btrace_bts_start)
9262 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9263 (cmd_record_btrace_start): Add cast to execute_command call.
9264 * record-full.c (record_full_goto_insn):
9265 * record.c (record_start, record_stop): Add cast to
9266 execute_command_to_string calls.
9267 (cmd_record_start): Add cast to execute_command calls.
9268
2adadf51
PA
92692017-04-05 Pedro Alves <palves@redhat.com>
9270
9271 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9272 static inline function.
9273 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9274 array and use gdb_PyArg_ParseTupleAndKeywords.
9275 * python/py-cmd.c (cmdpy_init): Likewise.
9276 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9277 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9278 (infpy_search_memory): Likewise.
9279 * python/py-objfile.c (objfpy_add_separate_debug_file)
9280 (gdbpy_lookup_objfile): Likewise.
9281 * python/py-symbol.c (gdbpy_lookup_symbol)
9282 (gdbpy_lookup_global_symbol): Likewise.
9283 * python/py-type.c (gdbpy_lookup_type): Likewise.
9284 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9285 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9286 Likewise.
9287
0d1f4ceb
PA
92882017-04-05 Pedro Alves <palves@redhat.com>
9289
9290 * python/python-internal.h (gdb_PyGetSetDef): New type.
9291 * python/py-block.c (block_object_getset)
9292 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9293 * python/py-event.c (event_object_getset)
9294 (finish_breakpoint_object_getset): Likewise.
9295 * python/py-inferior.c (inferior_object_getset): Likewise.
9296 * python/py-infthread.c (thread_object_getset): Likewise.
9297 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9298 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9299 * python/py-objfile.c (objfile_getset): Likewise.
9300 * python/py-progspace.c (pspace_getset): Likewise.
9301 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9302 Likewise.
9303 * python/py-record.c (recpy_record_getset): Likewise.
9304 * python/py-symbol.c (symbol_object_getset): Likewise.
9305 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9306 Likewise.
9307 * python/py-type.c (type_object_getset, field_object_getset):
9308 Likewise.
9309 * python/py-value.c (value_object_getset): Likewise.
9310
4d759979
PA
93112017-04-05 Pedro Alves <palves@redhat.com>
9312
9313 * python/python-internal.h (gdb_PyObject_CallMethod)
9314 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9315 New functions.
9316 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9317 (PySys_GetObject, PySys_SetPath): New macros.
9318
fdf9e36f
PA
93192017-04-05 Pedro Alves <palves@redhat.com>
9320
9321 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9322 info_osdata_command.
9323 * osdata.c (info_osdata_command): Rename to ...
9324 (info_osdata): ... this. Constify 'type' parameter, and remove
9325 the 'from_tty' parameter. Accept NULL TYPE.
9326 (info_osdata_command): New function.
9327 * osdata.h (info_osdata_command): Remove declaration.
9328 (info_osdata): New declaration.
9329
9f33b8b7
PA
93302017-04-05 Pedro Alves <palves@redhat.com>
9331
9332 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9333 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9334 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9335 parameter.
9336 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9337 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9338 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9339 parameter.
9340 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9341 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9342 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9343 (mi_cmd_file_list_exec_source_files)
9344 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9345 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9346 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9347 parameter.
9348 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9349 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9350 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9351 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9352 (mi_cmd_stack_info_frame): Constify 'command' parameter.
9353 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9354 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9355 'command' parameter.
9356 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9357 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9358 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9359 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9360 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9361 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9362 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9363 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9364 (mi_cmd_var_set_update_range): Constify 'command' parameter.
9365 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9366 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9367 parameter.
9368 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9369 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9370 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9371 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9372 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9373 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9374 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9375 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9376 (mi_cmd_data_list_changed_registers)
9377 (mi_cmd_data_write_register_values)
9378 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9379 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9380 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9381 (mi_cmd_list_features, mi_cmd_list_target_features)
9382 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9383 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9384 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9385 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9386 (mi_cmd_trace_frame_collected): Constify 'command'
9387 parameter.
9388 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9389 'command' parameter.
9390
67cb5b2d
PA
93912017-04-05 Pedro Alves <palves@redhat.com>
9392
9393 * ada-lang.c (ada_completer_word_break_characters): Now a const
9394 array.
9395 (ada_get_gdb_completer_word_break_characters): Constify.
9396 * completer.c (gdb_completer_command_word_break_characters)
9397 (gdb_completer_file_name_break_characters)
9398 (gdb_completer_quote_characters): Now const arrays.
9399 (get_gdb_completer_quote_characters): Constify.
9400 (set_rl_completer_word_break_characters): New function.
9401 (set_gdb_completion_word_break_characters)
9402 (complete_line_internal): Use it.
9403 * completer.h (get_gdb_completer_quote_characters): Constify.
9404 (set_rl_completer_word_break_characters): Declare.
9405 * f-lang.c (f_word_break_characters): Constify.
9406 * language.c (default_word_break_characters): Constify.
9407 * language.h (language_defn::la_word_break_characters): Constify.
9408 (default_word_break_characters): Constify.
9409 * top.c (init_main): Use set_rl_completer_word_break_characters.
9410
7a114964
PA
94112017-04-05 Pedro Alves <palves@redhat.com>
9412
9413 * aix-thread.c (aix_thread_pid_to_str)
9414 (aix_thread_extra_thread_info): Constify.
9415 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9416 * bsd-uthread.c (bsd_uthread_extra_thread_info)
9417 (bsd_uthread_pid_to_str): Constify.
9418 * corelow.c (core_pid_to_str): Constify.
9419 * darwin-nat.c (darwin_pid_to_str): Constify.
9420 * fbsd-nat.c (fbsd_pid_to_str): Constify.
9421 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9422 Constify.
9423 * gnu-nat.c (gnu_pid_to_str): Constify.
9424 * go32-nat.c (go32_pid_to_str): Constify.
9425 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9426 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9427 * inferior.c (inferior_pid_to_str): Constify.
9428 * linux-nat.c (linux_nat_pid_to_str): Constify.
9429 * linux-tdep.c (linux_core_pid_to_str): Constify.
9430 * linux-thread-db.c (thread_db_pid_to_str)
9431 (thread_db_extra_thread_info): Constify.
9432 * nto-tdep.c (nto_extra_thread_info): Constify.
9433 * nto-tdep.h (nto_extra_thread_info): Constify.
9434 * obsd-nat.c (obsd_pid_to_str): Constify.
9435 * procfs.c (procfs_pid_to_str): Constify.
9436 * ravenscar-thread.c (ravenscar_extra_thread_info)
9437 (ravenscar_pid_to_str): Constify.
9438 * remote-sim.c (gdbsim_pid_to_str): Constify.
9439 * remote.c (remote_threads_extra_info, remote_pid_to_str):
9440 Constify.
9441 * sol-thread.c (solaris_pid_to_str): Constify.
9442 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9443 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9444 * target.c (default_pid_to_str, target_pid_to_str)
9445 (normal_pid_to_str, default_pid_to_str): Constify.
9446 * target.h (target_ops::to_pid_to_str)
9447 (target_ops::to_extra_thread_info): Constify.
9448 (target_pid_to_str, normal_pid_to_str): Constify.
9449 * windows-nat.c (windows_pid_to_str): Constify.
9450 * gdbarch.sh (core_pid_to_str): Constify.
9451 * target-delegates.c: Regenerate.
9452 * gdbarch.h, gdbarch.c: Regenerate.
9453
69bbf465
PA
94542017-04-05 Pedro Alves <palves@redhat.com>
9455
9456 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9457 the memory of the temporary warning_pre_print override.
9458 * utils.c (warning_pre_print): Constify.
9459 * utils.h (warning_pre_print): Constify.
9460
be47f9e8
PA
94612017-04-05 Pedro Alves <palves@redhat.com>
9462
9463 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9464 (shell_command): New function.
9465 (make_command): Use std::string.
9466 (init_cli_cmds): Register shell_command instead of shell_escape.
9467
bde6261a
PA
94682017-04-05 Pedro Alves <palves@redhat.com>
9469
9470 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9471 * tracepoint.c (default_collect): Don't initialize.
9472
b38ef47f
PA
94732017-04-05 Pedro Alves <palves@redhat.com>
9474
9475 * macroexp.c (macro_buffer::shared): Now a bool.
9476 (init_buffer): Update.
9477 (init_shared_buffer): Constify 'addr' parameter.
9478 (substitute_args, expand, macro_expand, macro_expand_next): Remove
9479 casts.
9480
f995bbe8
PA
94812017-04-05 Pedro Alves <palves@redhat.com>
9482
9483 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9484 * disasm.c (set_disassembler_options): Constify local.
9485 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9486
4a596fe2
SDJ
94872017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
9488
9489 PR gdb/21352
9490 * tracefile.c (tsave_command): Fix argument parsing for '-r'
9491 option.
9492
2cad08ea
YQ
94932017-04-05 Yao Qi <yao.qi@linaro.org>
9494
9495 * frame.c (frame_unwind_register_unsigned): Call
9496 frame_unwind_register_value.
9497
55a98976
YQ
94982017-04-05 Yao Qi <yao.qi@linaro.org>
9499
9500 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9501 Use gdb_test_multiple, and don't match anchor.
9502
4ac40124
PA
95032017-04-05 Pedro Alves <palves@redhat.com>
9504
9505 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9506 (Write After Approval): Remove Simon Marchi.
9507
c053b654
PA
95082017-04-05 Pedro Alves <palves@redhat.com>
9509
9510 * common/gdb_optional.h (optional::optional): Make constexpr and
9511 initialize m_dummy.
9512
4c7bf4f9
JB
95132017-04-04 John Baldwin <jhb@FreeBSD.org>
9514
9515 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9516 (amd64fbsd_jmp_buf_reg_offset): Remove.
9517 (amd64fbsd_supply_uthread): Remove function.
9518 (amd64fbsd_collect_uthread): Remove function.
9519 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9520 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9521 (x86_64-*-freebsd*): Remove bsd-uthread.o.
9522 (fbsd-nat.c): Update comment.
9523 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9524 (i386fbsd_jmp_buf_reg_offset): Remove.
9525 (i386fbsd_supply_uthread): Remove function.
9526 (i386fbsd_collect_uthread): Remove function.
9527 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9528
1e1a8bef
JB
95292017-04-04 John Baldwin <jhb@FreeBSD.org>
9530
9531 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9532 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9533 * NEWS: Mention that support for FreeBSD/alpha was removed.
9534 * alpha-fbsd-tdep.c: Delete file.
9535 * config/alpha/fbsd.mh: Delete file.
9536 * configure.host: Delete alpha*-*-freebsd* and
9537 alpha*-*-kfreebsd*-gnu.
9538 * configure.tgt: Delete alpha*-*-freebsd* and
9539 alpha*-*-kfreebsd*-gnu.
9540
49907934
JB
95412017-04-04 John Baldwin <jhb@FreeBSD.org>
9542
9543 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9544 amd64bsd_store_inferior_registers): Use ptid from regcache.
9545
6f77053d
PA
95462017-04-04 Pedro Alves <palves@redhat.com>
9547
9548 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
9549 data fields, make them private and add "m_" prefixes.
9550 (lnp_state_machine::lnp_state_machine): New ctor.
9551 (record_line, check_line_address, handle_set_discriminator)
9552 (handle_set_address, handle_advance_pc, handle_special_opcode)
9553 (handle_advance_line, handle_set_file, handle_negate_stmt)
9554 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9555 (end_sequence, advance_line): New methods.
9556 (m_gdbarch, m_record_lines_p): New fields.
9557 (lnp_reader_state): Delete.
9558 (dwarf_record_line): Rename to ...
9559 (lnp_state_machine::record_line): ... adjust.
9560 (init_lnp_state_machine): Delete.
9561 (lnp_state_machine::lnp_state_machine): New.
9562 (check_line_address): Rename to ...
9563 (lnp_state_machine::check_line_address): This.
9564 (dwarf_decode_lines_1): Remove reference to "reader_state".
9565 Adjust lnp_state_machine having a non-default ctor. Use bool.
9566 State machine internal state manipulation moved to
9567 lnp_state_machine methods.
9568
9c541725
PA
95692017-04-04 Pedro Alves <palves@redhat.com>
9570
9571 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9572 unittests/offset-type-selftests.c.
9573 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9574 * common/offset-type.h: New file.
9575 * common/preprocessor.h: New file.
9576 * common/traits.h: New file.
9577 * common/valid-expr.h: New file.
9578 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9579 sect_offset and cu_offset strong typedefs throughout.
9580 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9581 typedefs throughout.
9582 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9583 sect_offset and cu_offset strong typedefs throughout.
9584 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9585 typedefs throughout.
9586 * gdbtypes.h: Include "common/offset-type.h".
9587 (cu_offset): Now an offset type (strong typedef) instead of a
9588 struct.
9589 (sect_offset): Likewise.
9590 (union call_site_parameter_u): Rename "param_offset" field to
9591 "param_cu_off".
9592 * unittests/offset-type-selftests.c: New file.
9593
ecfb656c
PA
95942017-04-04 Pedro Alves <palves@redhat.com>
9595
9596 * common/underlying.h: New file.
9597 * dwarf2read.c: Include "common/gdb_optional.h" and
9598 "common/underlying.h".
9599 (dir_index, file_name_index): New types.
9600 (file_entry): Use them.
9601 (file_entry::include): Use to_underlying.
9602 (line_header::add_file_name): Use dir_index.
9603 (read_formatted_entries): Use gdb::optional. Read form before
9604 writting to file_entry.
9605 (dwarf_decode_line_header): Use dir_index.
9606 (lnp_state_machine::current_file): Use to_underlying.
9607 (lnp_state_machine::file): Change type to file_name_index.
9608 (dwarf_record_line): Use to_underlying.
9609 (init_lnp_state_machine): Use file_name_index.
9610 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9611
d194f1fe
PA
96122017-04-04 Pedro Alves <palves@redhat.com>
9613
9614 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9615 operator bool, has_value and get methods.
9616
fff8551c
PA
96172017-04-04 Pedro Alves <palves@redhat.com>
9618
9619 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9620 fields.
9621 (line_header): Initialize all data fields. Change type of
9622 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9623 Change type of include_dirs to std::vector<const char *>. Remove
9624 num_include_dirs, include_dirs_size. Change type of file_names to
9625 std::vector<file_entry>. Remove num_file_names, file_names_size.
9626 (line_header::line_header): New.
9627 (line_header::add_include_dir, line_header::add_file_name): New
9628 methods.
9629 (line_header::include_dir_at): Remove NULL check.
9630 (line_header::file_name_at): Add const overload.
9631 (line_header_up): New unique_ptr typedef.
9632 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9633 std::vector. Remove free_line_header call.
9634 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9635 free_line_header call.
9636 (free_cu_line_header): Delete.
9637 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9638 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9639 Adjust to use std::vector.
9640 (free_line_header): Delete.
9641 (free_line_header_voidp): Use delete.
9642 (add_include_dir): Replace with ...
9643 (line_header::add_include_dir): ... this method. Use std::vector.
9644 (add_file_name): Replace with ...
9645 (line_header::add_file_name): ... this method. Use std::vector.
9646 (add_include_dir_stub): Delete.
9647 (read_formatted_entries): Remove memset.
9648 (dwarf_decode_line_header): Return a line_header_up instead of a
9649 raw pointer. Remove cleanup handling. Pass lambdas to
9650 read_formatted_entries. Adjust to use line_header methods.
9651 (dwarf_decode_lines_1): Adjust to use line_header methods.
9652 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9653 use std::vector.
9654
d62a8ae2
SM
96552017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9656
9657 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9658 instead of struct ptid.
9659
db3a1dc7
AH
96602017-05-04 Alan Hayward <alan.hayward@arm.com>
9661
9662 * frame.c (get_frame_register_bytes): Unwind using value.
9663 (put_frame_register_bytes): Likewise.
9664
b1b45502
IB
96652017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9666
9667 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9668 aggregate-like.
9669
ec13808e
JK
96702017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9671
9672 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9673
12316564
YQ
96742017-03-29 Yao Qi <yao.qi@linaro.org>
9675
9676 * gdbthread.h (struct thread_info): Declare constructor and
9677 destructor. Add some in-class member initializers.
9678 * thread.c (free_thread): Remove.
9679 (init_thread_list): Call delete instead of free_thread.
9680 (new_thread): Call thread_info constructor.
9681 (thread_info::thread_info): New function.
9682 (thread_info::~thread_info): New function.
9683 (delete_thread_1): Call delete instead of free_thread.
9684 (make_cleanup_restore_current_thread): Move tp and frame to
9685 inner block.
9686
fe5f7374
AK
96872017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9688
9689 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9690 (arc_skip_prologue): Likewise.
9691 (arc_make_frame_cache): Likewise.
9692 (arc_pv_get_operand): New function.
9693 (arc_is_in_prologue): Likewise.
9694 (arc_analyze_prologue): Likewise.
9695 (arc_print_frame_cache): Likewise.
9696 (MAX_PROLOGUE_LENGTH): New constant.
9697
eea78757
AK
96982017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9699
9700 * configure.tgt: Add arc-insn.o.
9701 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9702 (dump_arc_instruction_command): New function.
9703 (arc_fprintf_disasm): Likewise.
9704 (arc_disassemble_info): Likewise.
9705 (arc_insn_get_operand_value): Likewise.
9706 (arc_insn_get_operand_value_signed): Likewise.
9707 (arc_insn_get_memory_base_reg): Likewise.
9708 (arc_insn_get_memory_offset): Likewise.
9709 (arc_insn_get_branch_target): Likewise.
9710 (arc_insn_dump): Likewise.
9711 (arc_insn_get_linear_next_pc): Likewise.
9712 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9713 (arc_disassemble_info): Likewise.
9714 (arc_insn_get_branch_target): Likewise.
9715 (arc_insn_get_linear_next_pc): Likewise.
9716 * NEWS: Mention new "maint print arc arc-instruction".
9717
3be78afd
AK
97182017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9719
9720 * arc-tdep (maintenance_print_arc_list): New variable.
9721 (maintenance_print_arc_command): New function.
9722
296ec4fa
AK
97232017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9724
9725 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9726 Add "limm" and "reserved".
9727 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9728 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9729 * arc-tdep.h (arc_regnum): Likewise.
9730
f74f865e
MF
97312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9732
9733 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9734 for THREADPTR register.
9735 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9736 register.
9737 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9738 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9739 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9740
0d0bf81a
MF
97412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9742
9743 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9744 registers above gdbarch_num_regs (gdbarch) as privileged in
9745 call0 ABI.
9746
0ce4291e
MF
97472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9748
9749 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9750 for a single specified register or for all registers in
9751 a0_base..a0_base + C0_NREGS range.
9752 (supply_gregset_reg): Call regcache_raw_supply for a single
9753 specified register or for all registers in a0_base..a0_base +
9754 C0_NREGS range.
9755
c56054f9
MF
97562017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9757
9758 * arch/xtensa.h (C0_NREGS): Add definition.
9759 * xtensa-tdep.c (C0_NREGS): Remove definition.
9760
a4398628
MF
97612017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9762
9763 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9764 Drop xtensa_default_isa initialization.
9765 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9766
8c43009f
PA
97672017-03-27 Pedro Alves <palves@redhat.com>
9768
9769 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9770 (file_entry::include_dir): New method.
9771 (line_header::include_dir_at, line_header::file_name_at): New
9772 methods.
9773 (setup_type_unit_groups, setup_type_unit_groups)
9774 (psymtab_include_file_name): Simplify using the new methods.
9775 (lnp_state_machine) <the_line_header>: New field.
9776 <file>: Add comment.
9777 (lnp_state_machine::current_file): New method.
9778 (dwarf_record_line): Simplify using the new methods.
9779 (init_lnp_state_machine): Initialize the "the_line_header" field.
9780 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9781 Simplify using the new methods.
9782
a7e80b9e
PA
97832017-03-27 Pedro Alves <palves@redhat.com>
9784
9785 * cp-name-parser.y (make_empty): Delete.
9786 (demangler_special, nested_name, ptr_operator, array_indicator)
9787 (direct_declarator, declarator_1): Use fill_comp instead of
9788 make_empty.
9789
21047726
PA
97902017-03-27 Pedro Alves <palves@redhat.com>
9791
9792 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9793 to ATTRIBUTE_PRINTF.
9794 * solib-target.c (library_list_start_list): Print "string" not
9795 "version".
9796 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9797 gdb_xml_error call.
9798
d721ba37
PA
97992017-03-27 Pedro Alves <palves@redhat.com>
9800
9801 * dwarf2read.c (struct file_and_directory): New.
9802 (dwarf2_get_dwz_file): Adjust to use std::string.
9803 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9804 (find_file_and_directory): Adjust to return a file_and_directory
9805 object.
9806 (read_file_scope): Adjust to use file_and_directory. Remove
9807 make_cleanup/do_cleanups calls.
9808 (open_and_init_dwp_file): Adjust to use std::string. Remove
9809 make_cleanup/do_cleanups calls.
9810 * python/python.c (do_start_initialization): Adjust to ldirname
9811 returning a std::string.
9812 * utils.c (ldirname): Now returns a std::string.
9813 * utils.h (ldirname): Change return type to std::string.
9814 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9815 returning a std::string.
9816 * xml-tdesc.c (file_read_description_xml): Likewise.
9817
ed771251
AH
98182017-03-24 Alan Hayward <alan.hayward@arm.com>
9819
9820 * regcache.c (regcache_debug_print_register): New function.
9821 * regcache.h (regcache_debug_print_register): New declaration.
9822 * target.c (debug_print_register): Remove.
9823 (target_fetch_registers): Call regcache_debug_print_register.
9824 (target_store_registers): Likewise.
9825
568c1b9f
PB
98262017-03-24 Pádraig Brady <pbrady@fb.com>
9827
9828 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9829 reference beyond the 'lh->include_dirs' array before accessing to
9830 it.
9831 (psymtab_include_file_name): Likewise.
9832 (dwarf_decode_lines_1): Likewise.
9833 (dwarf_decode_lines): Likewise.
9834 (file_file_name): Likewise.
9835
3e00d44f
SM
98362017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9837
9838 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9839 inferior_ptid.
9840 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9841 ps_lsetfpregs): Likewise.
9842 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9843 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9844 ps_lsetfpregs): Likewise.
9845 * target.c (target_fetch_registers, target_store_registers):
9846 Remove asserts.
9847
077ae656
AH
98482017-03-23 Alan Hayward <alan.hayward@arm.com>
9849
9850 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9851
1e2b521d
YQ
98522017-03-23 Yao Qi <yao.qi@linaro.org>
9853
9854 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9855 (_initialize_aarch64_tdep): Register it.
9856 (aarch64_record_load_store): Handle PRFM instruction.
9857 (aarch64_process_record_test): New function.
9858
33877125
YQ
98592017-03-23 Yao Qi <yao.qi@linaro.org>
9860
9861 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9862 indentation.
9863
a0eef940
YQ
98642017-03-23 Yao Qi <yao.qi@linaro.org>
9865
9866 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9867
3f2a3564
PR
98682017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9869
9870 python/python.c (do_start_initialization): Fix memory leak.
9871
b67aeab0
SM
98722017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9873
9874 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9875 using get_ptrace_pid.
9876 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9877 inferior_ptid.
9878 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9879 inferior_ptid instead of pid.
9880
ffdbe864
YQ
98812017-03-22 Yao Qi <yao.qi@linaro.org>
9882
9883 * aarch64-tdep.c: Wrap locally used classes in anonymous
9884 namespace.
9885 * arm-tdep.c: Likewise.
9886 * linespec.c: Likewise.
9887 * ui-out.c: Likewise.
9888
9d736fbf
JG
98892017-03-22 Jonah Graham <jonah@kichwacoders.com>
9890
9891 PR gdb/19637
9892 * python/lib/gdb/printer/bound_registers.py: Import sys.
9893
3de88e9a
SM
98942017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9895
9896 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9897 windows_thread_info parameter and use it instead of
9898 current_thread.
9899 (windows_fetch_inferior_registers): Don't set current_thread,
9900 pass the thread to do_windows_fetch_inferior_registers. Use
9901 ptid from regcache instead of inferior_ptid.
9902 (do_windows_store_inferior_registers): Add windows_thread_info
9903 parameter and use it instead of current_thread.
9904 (windows_store_inferior_registers): Don't set current_thread,
9905 pass the thread to do_windows_store_inferior_registers. Use
9906 ptid from regcache instead of inferior_ptid.
9907
0e7b8f61
SM
99082017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9909
9910 * ser-mingw.c (ser_windows_raw): Remove reference to
9911 struct serial::current_timeout.
9912
5badf10a
IR
99132017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9914
9915 PR tdep/20928
9916 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9917 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9918 (sparc64_fsr_type): Fix %fsr decoding.
9919
cee59b3f
TW
99202017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9921
9922 * python/py-record-btrace.c (btpy_insn_data): Change return type
9923 for Python 2.
9924
639a9038
SM
99252017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9926
9927 * spu-linux-nat.c (spu_fetch_inferior_registers,
9928 spu_store_inferior_registers): Use ptid from regcache, set and
9929 restore inferior_ptid.
9930 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9931 Likewise.
9932
bcc0c096
SM
99332017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9934
9935 * i386-linux-nat.c (fetch_register, store_register,
9936 i386_linux_fetch_inferior_registers,
9937 i386_linux_store_inferior_registers): Use ptid from regcache.
9938 * ia64-linux-nat.c (ia64_linux_fetch_register,
9939 ia64_linux_store_register): Likewise.
9940 * inf-ptrace.c (inf_ptrace_fetch_register,
9941 inf_ptrace_store_register): Likewise.
9942 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9943 m32r_linux_store_inferior_registers): Likewise.
9944 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9945 m68kbsd_store_inferior_registers): Likewise.
9946 * m68k-linux-nat.c (fetch_register, store_register,
9947 m68k_linux_fetch_inferior_registers,
9948 m68k_linux_store_inferior_registers): Likewise.
9949 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9950 m88kbsd_store_inferior_registers): Likewise.
9951 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9952 mips_fbsd_store_inferior_registers): Likewise.
9953 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9954 mips64_linux_regsets_store_registers): Likewise.
9955 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9956 mipsnbsd_store_inferior_registers): Likewise.
9957 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9958 mips64obsd_store_inferior_registers): Likewise.
9959 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9960 Likewise.
9961 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9962 ppcfbsd_store_inferior_registers): Likewise.
9963 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9964 ppc_linux_store_inferior_registers): Likewise.
9965 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9966 ppcnbsd_store_inferior_registers): Likewise.
9967 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9968 ppcobsd_store_registers): Likewise.
9969 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9970 Likewise.
9971 * ravenscar-thread.c (ravenscar_fetch_registers,
9972 ravenscar_store_registers, ravenscar_prepare_to_store):
9973 Likewise.
9974 * record-btrace.c (record_btrace_fetch_registers,
9975 record_btrace_store_registers, record_btrace_prepare_to_store):
9976 Likewise.
9977 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9978 Lookup inferior using ptid from regcache, instead of
9979 current_inferior.
9980 * remote.c (remote_fetch_registers, remote_store_registers): Use
9981 ptid from regcache.
9982 * rs6000-nat.c (fetch_register, store_register): Likewise.
9983 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9984 s390_linux_store_inferior_registers): Likewise.
9985 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9986 shnbsd_store_inferior_registers): Likewise.
9987 * sol-thread.c (sol_thread_fetch_registers,
9988 sol_thread_store_registers): Likewise.
9989 * sparc-nat.c (sparc_fetch_inferior_registers,
9990 sparc_store_inferior_registers): Likewise.
9991 * tilegx-linux-nat.c (fetch_inferior_registers,
9992 store_inferior_registers): Likewise.
9993 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9994 vaxbsd_store_inferior_registers): Likewise.
9995 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9996 store_xtregs): Likewise.
9997
c0f55cc6
AV
99982017-03-20 Artemiy Volkov <artemiyv@acm.org>
9999
10000 PR gdb/14441
10001 * NEWS: Mention support for rvalue references in GDB and python.
10002 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10003 supports both lvalue and rvalue references.
10004
15c0a2a9
AV
100052017-03-20 Artemiy Volkov <artemiyv@acm.org>
10006
10007 PR gdb/14441
10008 * gdbtypes.c (rank_one_type): Implement overloading
10009 resolution rules regarding rvalue references.
10010
aa006118
AV
100112017-03-20 Artemiy Volkov <artemiyv@acm.org>
10012
10013 PR gdb/14441
10014 * aarch64-tdep.c (aarch64_type_align)
10015 (aarch64_extract_return_value, aarch64_store_return_value): Change
10016 lvalue reference type checks to general reference type checks.
10017 * amd64-tdep.c (amd64_classify): Likewise.
10018 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10019 Likewise.
10020 * arm-tdep.c (arm_type_align, arm_extract_return_value)
10021 (arm_store_return_value): Likewise.
10022 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10023 * c-typeprint.c (c_print_type): Likewise.
10024 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10025 (cplus_number_of_children, cplus_describe_child): Likewise.
10026 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10027 * completer.c (expression_completer): Likewise.
10028 * cp-support.c (make_symbol_overload_list_adl_namespace):
10029 Likewise.
10030 * darwin-nat-info.c (info_mach_region_command): Likewise.
10031 * dwarf2loc.c (entry_data_value_coerce_ref)
10032 (value_of_dwarf_reg_entry): Likewise.
10033 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10034 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10035 Likewise.
10036 * findvar.c (extract_typed_address, store_typed_address):
10037 Likewise.
10038 * gdbtypes.c (rank_one_type): Likewise.
10039 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10040 * infcall.c (value_arg_coerce): Likewise.
10041 * language.c (pointer_type): Likewise.
10042 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10043 Likewise.
10044 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10045 * mn10300-tdep.c (mn10300_type_align): Likewise.
10046 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10047 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10048 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10049 Likewise.
10050 * printcmd.c (print_formatted, x_command): Likewise.
10051 * python/py-type.c (typy_get_composite, typy_template_argument):
10052 Likewise.
10053 * python/py-value.c (valpy_referenced_value)
10054 (valpy_get_dynamic_type, value_has_field): Likewise.
10055 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10056 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10057 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10058 * spu-tdep.c (spu_scalar_value_p): Likewise.
10059 * symtab.c (lookup_symbol_aux): Likewise.
10060 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10061 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10062 Likewise.
10063 * valops.c (value_cast_pointers, value_cast)
10064 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10065 (value_struct_elt, value_struct_elt_bitpos)
10066 (value_find_oload_method_list, find_overload_match)
10067 (value_rtti_indirect_type): Likewise.
10068 * valprint.c (val_print_scalar_type_p, generic_val_print):
10069 Likewise.
10070 * value.c (value_actual_type, value_as_address, unpack_long)
10071 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10072 (coerce_ref): Likewise.
10073 * varobj.c (varobj_get_value_type): Likewise.
10074
3fcf899d
AV
100752017-03-20 Artemiy Volkov <artemiyv@acm.org>
10076
10077 PR gdb/14441
10078 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10079 table of constants.
10080 * python/lib/gdb/command/explore.py: Support exploring values
10081 of rvalue reference types.
10082 * python/lib/gdb/types.py: Implement get_basic_type() for
10083 rvalue reference types.
10084 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10085 constant.
10086 * python/py-value.c (valpy_getitem): Add an rvalue reference
10087 check.
10088 (valpy_reference_value): Add new parameter "refcode".
10089 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10090 New wrappers for valpy_reference_value().
10091 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10092 (gdbpy_invoke_xmethod): Likewise.
10093
4297a3f0
AV
100942017-03-20 Artemiy Volkov <artemiyv@acm.org>
10095
10096 PR gdb/14441
10097 * dwarf2read.c (process_die, read_type_die_1): Handle the
10098 DW_TAG_rvalue_reference_type DIE.
10099 (read_tag_reference_type): Add new parameter "refcode".
10100
e1cb3213
AV
101012017-03-20 Artemiy Volkov <artemiyv@acm.org>
10102
10103 PR gdb/14441
10104 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10105 (c_type_print_modifier, c_type_print_varspec_suffix)
10106 (c_type_print_base): Support printing rvalue reference types.
10107 * c-valprint.c (c_val_print, c_value_print): Support printing
10108 rvalue reference values.
10109
e4347c89
AV
101102017-03-20 Artemiy Volkov <artemiyv@acm.org>
10111
10112 PR gdb/14441
10113 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10114 typename.
10115 * cp-support.c (replace_typedefs): Handle
10116 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10117 * python/py-type.c (typy_lookup_type): Likewise.
10118
53cc15f5
AV
101192017-03-20 Artemiy Volkov <artemiyv@acm.org>
10120
10121 PR gdb/14441
10122 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10123 * parse.c (insert_type): Change assert statement.
10124 (follow_types): Handle rvalue reference types.
10125 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10126 constant.
10127
a65cfae5
AV
101282017-03-20 Artemiy Volkov <artemiyv@acm.org>
10129
10130 PR gdb/14441
10131 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10132 value_ref() interface.
10133 * c-valprint.c (c_value_print): Likewise.
10134 * infcall.c (value_arg_coerce): Likewise.
10135 * python/py-value.c (valpy_reference_value): Likewise.
10136 * valops.c (value_cast, value_reinterpret_cast)
10137 (value_dynamic_cast, typecmp): Likewise.
10138 (value_ref): Parameterize by kind of return value reference type.
10139 * value.h (value_ref): Add new parameter "refcode".
10140
3b224330
AV
101412017-03-20 Artemiy Volkov <artemiyv@acm.org>
10142
10143 PR gdb/14441
10144 * dwarf2read.c (read_tag_reference_type): Use
10145 lookup_lvalue_reference_type() instead of lookup_reference_type().
10146 * eval.c (evaluate_subexp_standard): Likewise.
10147 * f-exp.y: Likewise.
10148 * gdbtypes.c (make_reference_type, lookup_reference_type):
10149 Generalize with rvalue reference types.
10150 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10151 convenience wrappers for lookup_reference_type().
10152 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10153 reference kind parameter.
10154 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10155 wrappers for lookup_reference_type().
10156 * guile/scm-type.c (gdbscm_type_reference): Use
10157 lookup_lvalue_reference_type() instead of lookup_reference_type().
10158 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10159 * parse.c (follow_types): Likewise.
10160 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10161 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10162 Likewise.
10163 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10164 (gdbpy_invoke_xmethod): Likewise.
10165 * stabsread.c: Provide extra argument to make_reference_type()
10166 call.
10167 * valops.c (value_ref, value_rtti_indirect_type): Use
10168 lookup_lvalue_reference_type() instead of lookup_reference_type().
10169
f9aeb8d4
AV
101702017-03-20 Artemiy Volkov <artemiyv@acm.org>
10171
10172 PR gdb/14441
10173 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10174 (TYPE_IS_REFERENCE): New macro.
10175 (struct type): Add rvalue_reference_type field.
10176 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10177
51457a05
MAL
101782017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10179
10180 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10181 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10182 New function definition.
10183 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10184 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10185 New function declaration.
10186 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10187 * mi/mi-interp.h: New file.
10188 * solib.c (info_sharedlibrary_command): Replace for loop with
10189 ALL_SO_LIBS macro
10190 * solib.h (update_solib_list): New function declaration.
10191 (so_list_head): Move macro.
10192 * solist.h (ALL_SO_LIBS): New macro.
10193
e696b3ad
MAL
101942017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
10195
10196 * infcmd.c (post_create_inferior): Remove unused argument in
10197 call to solib_add.
10198 * remote.c (remote_start_remote): Likewise.
10199 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10200 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10201 (enable_break): Likewise.
10202 * solib.c (update_solib_list): Remove unused target argument
10203 and its documentation.
10204 (solib_add): Remove unused target argument. Remove unused
10205 argument in call to update_solib_list.
10206 (info_sharedlibrary_command): Remove unused argument in call
10207 to update_solib_list.
10208 (sharedlibrary_command): Remove unused argument in call to
10209 solib_add.
10210 (handle_solib_event): Likewise.
10211 (reload_shared_libraries): Likewise.
10212 * solib.h (solib_add): Remove unused target argument.
10213
dcb84eda
AA
102142017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
10215
10216 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10217 (s390_displaced_step_fixup): Cover relative branches with the
10218 default fixup handling. This fixes lack of support for some
10219 relative branch instructions.
10220
d9cb6cdc
SM
102212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10222
10223 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10224 ptid from regcache.
10225
1afaf9f4
SM
102262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10227
10228 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10229 i386_darwin_store_inferior_registers): Use ptid from regcache.
10230
aac12e24
SM
102312017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10232
10233 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10234 i386bsd_store_inferior_registers): Use ptid from regcache.
10235
bbe1eef1
SM
102362017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10237
10238 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10239 hppaobsd_store_registers): Use ptid from regcache.
10240
10799020
SM
102412017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10242
10243 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10244 hppanbsd_store_registers): Use ptid from regcache.
10245
00204cf7
SM
102462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10247
10248 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10249 from regcache. Use get_ptrace_pid.
10250
11a33714
SM
102512017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10252
10253 * corelow.c (get_core_register_section): Use ptid from regcache,
10254 update doc.
10255
317cd492
SM
102562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10257
10258 * bsd-uthread.c (bsd_uthread_fetch_registers,
10259 bsd_uthread_store_registers): Use ptid from regcache, set and
10260 restore inferior_ptid.
10261
9ac8a7c2
SM
102622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10263
10264 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10265 fetch_fp_regs, store_register, store_regs, store_fp_register,
10266 store_fp_regs): Use ptid from regcache.
10267
4ac4bb6a
SM
102682017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
10269
10270 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10271 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10272 store_vfp_regs): Use ptid from regcache.
10273
9bcbdca8
PA
102742017-03-17 Pedro Alves <palves@redhat.com>
10275
10276 PR remote/21188
10277 * ser-base.c (ser_base_wait_for): Add comment.
10278 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10279 version.
10280 * ser-unix.c (hardwire_raw): Remove reference to
10281 scb->current_timeout.
10282 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10283 (hardwire_ops): Install ser_base_readchar instead of
10284 hardwire_readchar.
10285 * serial.h (struct serial) <current_timeout, timeout_remaining>:
10286 Remove fields.
10287
7503099f
JG
102882017-03-17 Jonah Graham <jonah@kichwacoders.com>
10289
10290 PR gdb/19637
10291 * python/lib/gdb/printer/bound_registers.py: Add support for
10292 Python 3.
10293
7942e96e
AA
102942017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
10295
10296 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10297 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10298 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10299 byte_offset to subobj_byte_offset. Fix the handling of
10300 DWARF_VALUE_STACK on big-endian targets when coming via an
10301 implicit pointer.
10302 (dwarf2_evaluate_loc_desc): Adjust call to
10303 dwarf2_evaluate_loc_desc_full.
10304 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10305 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10306
ba14f379
YQ
103072017-03-16 Yao Qi <yao.qi@linaro.org>
10308
10309 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10310 and REVSH instructions.
10311
b121eeb9
YQ
103122017-03-16 Yao Qi <yao.qi@linaro.org>
10313
10314 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10315 (arm_record_test): Declare.
10316 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10317 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10318 align with the manual.
10319 (thumb_record_misc): Adjust the code order to align with the
10320 manual.
10321 (thumb2_record_decode_insn_handler): Fix instruction matching.
10322 (instruction_reader_thumb): New class.
10323 (arm_record_test): New function.
10324
728a7913
YQ
103252017-03-16 Yao Qi <yao.qi@linaro.org>
10326
10327 * arm-tdep.c (abstract_memory_reader): New class.
10328 (instruction_reader): New class.
10329 (extract_arm_insn): Add argument 'reader'. Callers updated.
10330 (decode_insn): Likewise.
10331
34b43320
DE
103322017-03-16 Doug Evans <dje@google.com>
10333
a7c0469f
DE
10334 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10335 member. Change type of TYPE member to SCM. All uses updated.
10336 (lsscm_make_lazy_string_smob): Add assert.
10337 (lsscm_make_lazy_string): Flag bad length values.
10338 (lsscm_elt_type): New function.
10339 (gdbscm_lazy_string_to_value): Rewrite to use
10340 lsscm_safe_lazy_string_to_value.
10341 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10342 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10343 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
10344 in incoming type.
10345 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10346 * guile/scm-type.c (tyscm_scm_to_type): New function.
10347
103482017-03-15 Doug Evans <dje@google.com>
10349
34b43320
DE
10350 PR python/17728, python/18439, python/18779
10351 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10352 member. Change type of TYPE member to PyObject *. All uses updated.
10353 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10354 (gdbpy_create_lazy_string_object): Flag bad length values.
10355 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10356 Handle typedefs in incoming type.
10357 (stpy_lazy_string_elt_type): New function.
10358 (gdbpy_extract_lazy_string): Call it.
10359 * python/py-value.c (valpy_lazy_string): Flag bad length values.
10360 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
10361 typedefs in incoming type.
10362
a3a5fecc
DE
103632017-03-16 Doug Evans <dje@google.com>
10364
10365 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10366 * guile/scm-type.c (tyscm_scm_to_type): New function.
10367
28f1c605
JW
103682017-03-16 Jiong Wang <jiong.wang@arm.com>
10369
10370 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10371 "ULONGEST" for "skip".
10372
87c336f6
AA
103732017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10374
10375 PR gdb/21220
10376 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10377 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10378 (inf_ptrace_peek_poke): ...here. New function. Now also loop
10379 over ptrace peek/poke until end of buffer or error.
10380
cf81cf60
SM
103812017-03-14 Simon Marchi <simon.marchi@ericsson.com>
10382
10383 * parse.c (length_of_subexp): Make static.
10384 * parser-defs.h (length_of_subexp): Remove.
10385
a379284a
AA
103862017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
10387
10388 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10389 as well.
10390
8a6200ba
PA
103912017-03-14 Pedro Alves <palves@redhat.com>
10392
10393 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10394 (main): Use std::unique_ptr. Remove calls to
10395 cp_demangled_name_parse_free.
10396
f79ec206
SM
103972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10398
10399 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10400 alphabsd_store_inferior_registers): Use regcache->ptid instead
10401 of inferior_ptid.
10402
edb5fb00
SM
104032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10404
10405 * aix-thread.c (aix_thread_fetch_registers,
10406 aix_thread_store_registers): Use regcache->ptid instead of
10407 inferior_ptid.
10408
55119686
SM
104092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10410
10411 * aarch64-linux-nat.c (fetch_gregs_from_thread,
10412 store_gregs_to_thread, fetch_fpregs_from_thread,
10413 store_fpregs_to_thread): Use regcache->ptid instead of
10414 inferior_ptid.
10415
6a06fbb7
SM
104162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10417
10418 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10419 amd64_linux_fetch_inferior_registers): Use regcache->ptid
10420 instead of inferior_ptid.
10421
c6386875
SM
104222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10423
10424 * target.c (target_fetch_registers, target_store_registers): Add
10425 assert.
10426
ddaaf0fb
SM
104272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
10428
10429 * regcache.h (regcache_get_ptid): New function.
10430 * regcache.c (regcache_get_ptid): New function.
10431
b9da89d1 104322017-03-13 Mark Wielaard <mark@klomp.org>
10433
10434 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10435
5f4d1085
KS
104362017-03-10 Keith Seitz <keiths@redhat.com>
10437
10438 PR c++/8218
10439 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10440
c65d6b55
PA
104412017-03-08 Pedro Alves <palves@redhat.com>
10442
10443 PR gdb/18360
10444 * infrun.c (start_step_over, do_target_resume, resume)
10445 (restart_threads): Assert we're not resuming a thread that is
10446 meant to be stopped.
10447 (infrun_thread_stop_requested_callback): Delete.
10448 (infrun_thread_stop_requested): If the thread is internally
10449 stopped, queue a pending stop event and clear the thread's
10450 inline-frame state.
10451 (handle_stop_requested): New function.
10452 (handle_syscall_event, handle_inferior_event_1): Use
10453 handle_stop_requested.
10454 (handle_stop_requested): New function.
10455 (handle_signal_stop): Set the thread's stop_signal here instead of
10456 at caller.
10457 (finish_step_over): Clear step over info unconditionally.
10458 (handle_signal_stop): If the user had interrupted the event
10459 thread, consider the stop a random signal.
10460 (handle_signal_stop) <signal arrived while stepping over
10461 breakpoint>: Don't restart threads here.
10462 (stop_waiting): Don't clear step-over info here.
10463
15c22686
PA
104642017-03-08 Pedro Alves <palves@redhat.com>
10465
10466 PR 21206
10467 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10468 goes to argument 2, not 1.
10469
6e5d74e7
PA
104702017-03-08 Pedro Alves <palves@redhat.com>
10471
10472 PR cli/21218
10473 * top.c (gdb_readline_wrapper): Avoid passing NULL to
10474 display_gdb_prompt.
10475 (command_line_input): Add comment.
10476
9753a2f6
PA
104772017-03-08 Pedro Alves <palves@redhat.com>
10478
10479 PR tui/21216
10480 * tui/tui-file.c (tui_file::write): New.
10481 * tui/tui-file.h (tui_file): Override "write".
10482 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10483 factored out from ...
10484 (tui_puts): ... here.
10485 (tui_putc): Use them.
10486 (tui_write): New function.
10487 * tui/tui-io.h (tui_write): Declare.
10488
1672e0d9
SDJ
104892017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
10490
10491 * Makefile.in (SFILES): Replace "environ.c" with
10492 "common/environ.c".
10493 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10494 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
10495 to...
10496 * common/environ.c: ... here.
10497 * environ.h: Moved to...
10498 * common/environ.h: ... here.
10499
f7bb4e3a
PB
105002017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10501
10502 * gdbarch.sh (pstring_ptr): New static function.
10503 (gdbarch_disassembler_options): Use it.
10504 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10505 not valid_disassembler_option->name.
10506 * gdbarch.c: Regenerate.
10507
e45ced6c
PB
105082017-03-07 Peter Bergner <bergner@vnet.ibm.com>
10509
10510 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10511
5f6fd321
PA
105122017-03-07 Pedro Alves <palves@redhat.com>
10513
10514 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10515
6dbb839a 105162017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
10517
10518 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10519 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10520 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 10521 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 10522
d274ecf4
SM
105232017-03-06 Simon Marchi <simon.marchi@ericsson.com>
10524
10525 * xtensa-linux-nat.c (fetch_gregs): Remove const.
10526
df97be55
SM
105272017-03-03 Simon Marchi <simon.marchi@ericsson.com>
10528
10529 * remote.c (remote_add_target_side_commands): Use range-based
10530 for loop.
10531
7d45f3df
YQ
105322017-03-03 Yao Qi <yao.qi@linaro.org>
10533
10534 PR gdb/21165
10535 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10536 value is lazy.
10537 * valprint.c (common_val_print): Likewise.
10538
65b48a81
PB
105392017-02-28 Peter Bergner <bergner@vnet.ibm.com>
10540
10541 * NEWS: Mention new set/show disassembler-options commands.
10542 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10543 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10544 (prospective_options): New static variable.
10545 (gdb_disassembler::gdb_disassembler): Initialize
10546 m_di.disassembler_options.
10547 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10548 (get_disassembler_options): New function.
10549 (set_disassembler_options): Likewise.
10550 (set_disassembler_options_sfunc): Likewise.
10551 (show_disassembler_options_sfunc): Likewise.
10552 (disassembler_options_completer): Likewise.
10553 (_initialize_disasm): Likewise.
10554 * disasm.h (get_disassembler_options): New prototype.
10555 (set_disassembler_options): Likewise.
10556 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10557 (gdbarch_verify_disassembler_options): Likewise.
10558 * gdbarch.c: Regenerate.
10559 * gdbarch.h: Likewise.
10560 * arm-tdep.c (num_disassembly_options): Delete.
10561 (set_disassembly_style): Likewise.
10562 (arm_disassembler_options): New static variable.
10563 (set_disassembly_style_sfunc): Convert short style name into long
10564 option name. Call set_disassembler_options.
10565 (show_disassembly_style_sfunc): New function.
10566 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10567 set_gdbarch_verify_disassembler_options.
10568 (_initialize_arm_tdep): Delete regnames variable and update callers.
10569 (arm_disassembler_options): Initialize.
10570 (disasm_options): New variable.
10571 (num_disassembly_options): Rename from this...
10572 (num_disassembly_styles): ...to this. Compute by scanning through
10573 disasm_options.
10574 (valid_disassembly_styles): Initialize using disasm_options.
10575 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10576 set_arm_regname_option.
10577 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10578 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10579 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10580 set_gdbarch_verify_disassembler_options.
10581 * s390-tdep.c (s390_disassembler_options): New static variable.
10582 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10583 set_gdbarch_verify_disassembler_options.
10584
d538e36d
SM
105852017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10586
10587 * remote.c (remote_add_target_side_condition): Remove "struct"
10588 keyword from range-based for loop.
10589
83621223
SM
105902017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10591
10592 * remote.c (remote_add_target_side_condition): Use range-based
10593 for loop. Update comment.
10594
2123df0e
YQ
105952017-02-27 Yao Qi <yao.qi@linaro.org>
10596
10597 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10598
8e368124
AH
105992017-02-26 Alan Hayward <alan.hayward@arm.com>
10600
10601 * regcache.c (regcache_raw_update): New function.
10602 (regcache_raw_read): Move code to regcache_raw_update.
10603 * regcache.h (regcache_raw_update): New declaration.
10604 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10605
a49dd8dd
JK
106062017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10607
10608 * dwarf2read.c (create_debug_type_hash_table): Initialize
10609 header.signature and header.type_offset_in_tu.
10610
34e4bae9
PA
106112017-02-24 Pedro Alves <palves@redhat.com>
10612
10613 * symtab.c (make_file_symbol_completion_list_1): Use
10614 add_symtab_completions.
10615
b0e4b369
AH
106162017-02-24 Alan Hayward <alan.hayward@arm.com>
10617
10618 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10619
975c21ab
AH
106202017-02-24 Alan Hayward <alan.hayward@arm.com>
10621
10622 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10623 I386_MAX_REGISTER_SIZE.
10624 (i386_pseudo_register_write): Likewise.
10625 (i386_process_record): Likewise.
10626 * i387-tdep.c (i387_supply_xsave): Likewise.
10627 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10628 (store_register): Likewise.
10629
14bc53a8
PA
106302017-02-23 Pedro Alves <palves@redhat.com>
10631
10632 * ada-lang.c: Include "common/function-view.h".
10633 (ada_iterate_over_symbols): Adjust to use function_view as
10634 callback type.
10635 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10636 (ada_make_symbol_completion_list): Use a lambda.
10637 (ada_exc_search_name_matches): Delete.
10638 (name_matches_regex): New.
10639 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10640 * compile/compile-c-support.c: Include "common/function-view.h".
10641 (print_one_macro): Change prototype to accept a ui_file pointer.
10642 (write_macro_definitions): Use a lambda.
10643 * dwarf2read.c: Include "common/function-view.h".
10644 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10645 (dw2_expand_symtabs_matching): Adjust to use function_view as
10646 callback type.
10647 * language.h: Include "common/function-view.h".
10648 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10649 function_view as callback type.
10650 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10651 * linespec.c: Include "common/function-view.h".
10652 (collect_info::add_symbol): New method.
10653 (struct symbol_and_data_callback, iterate_inline_only, struct
10654 symbol_matcher_data, iterate_name_matcher): Delete.
10655 (iterate_over_all_matching_symtabs): Adjust to use function_view
10656 as callback type and lambdas.
10657 (iterate_over_file_blocks): Adjust to use function_view as
10658 callback type.
10659 (decode_compound_collector): Now a class with private fields.
10660 (decode_compound_collector::release_symbols): New method.
10661 (collect_one_symbol): Rename to...
10662 (decode_compound_collector::operator()): ... this and adjust.
10663 (lookup_prefix_sym): decode_compound_collector construction bits
10664 move to decode_compound_collector ctor. Pass the
10665 decode_compound_collector object directly as callback. Remove
10666 cleanups and use decode_compound_collector::release_symbols
10667 instead.
10668 (symtab_collector): Now a class with private fields.
10669 (symtab_collector::release_symtabs): New method.
10670 (add_symtabs_to_list): Rename to...
10671 (symtab_collector::operator()): ... this and adjust.
10672 (collect_symtabs_from_filename): symtab_collector construction
10673 bits move to symtab_collector ctor. Pass the symtab_collector
10674 object directly as callback. Remove cleanups and use
10675 symtab_collector::release_symtabs instead.
10676 (collect_symbols): Delete.
10677 (add_matching_symbols_to_info): Use lambdas.
10678 * macrocmd.c (print_macro_callback): Delete.
10679 (info_macro_command): Use a lambda.
10680 (info_macros_command): Pass print_macro_definition as callable
10681 directly.
10682 (print_one_macro): Remove 'ignore' parameter.
10683 (macro_list_command): Adjust.
10684 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10685 (macro_for_each_data::user_data): Delete field.
10686 (foreach_macro): Adjust to call the function_view.
10687 (macro_for_each): Adjust to use function_view as callback type.
10688 (foreach_macro_in_scope): Adjust to call the function_view.
10689 (macro_for_each_in_scope): Adjust to use function_view as callback
10690 type.
10691 * macrotab.h: Include "common/function-view.h".
10692 (macro_callback_fn): Declare a prototype instead of a pointer.
10693 Remove "user_data" parameter.
10694 (macro_for_each, macro_for_each_in_scope): Adjust to use
10695 function_view as callback type.
10696 * psymtab.c (partial_map_expand_apply)
10697 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10698 Adjust to use function_view as callback type and to return bool.
10699 (psym_expand_symtabs_matching): Adjust to use function_view as
10700 callback types.
10701 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10702 to use function_view as callback type and to return bool.
10703 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10704 callback types.
10705 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10706 as callback types.
10707 * symfile.h: Include "common/function-view.h".
10708 (expand_symtabs_file_matcher_ftype)
10709 (expand_symtabs_symbol_matcher_ftype)
10710 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10711 return bool.
10712 (quick_symbol_functions::map_symtabs_matching_filename)
10713 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10714 function_view as callback type and return bool.
10715 (expand_symtabs_matching): Adjust to use function_view as callback
10716 type.
10717 (maintenance_expand_name_matcher)
10718 (maintenance_expand_file_matcher): Delete.
10719 (maintenance_expand_symtabs): Use lambdas.
10720 * symtab.c (iterate_over_some_symtabs): Adjust to use
10721 function_view as callback types and return bool.
10722 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10723 of a cleanup.
10724 (lookup_symtab_callback): Delete.
10725 (lookup_symtab): Use a lambda.
10726 (iterate_over_symbols): Adjust to use function_view as callback
10727 type.
10728 (struct search_symbols_data, search_symbols_file_matches)
10729 (search_symbols_name_matches): Delete.
10730 (search_symbols): Use a pair of lambdas.
10731 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10732 (symtab_expansion_callback): Delete.
10733 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10734 * symtab.h: Include "common/function-view.h".
10735 (iterate_over_some_symtabs): Adjust to use function_view as
10736 callback type and return bool.
10737 (iterate_over_symtabs): Adjust to use function_view as callback
10738 type.
10739 (symbol_found_callback_ftype): Remove 'data' parameter and return
10740 bool.
10741 (iterate_over_symbols): Adjust to use function_view as callback
10742 type.
10743
07e253aa
PA
107442017-02-23 Pedro Alves <palves@redhat.com>
10745
10746 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10747 (%.o) <unittests/%.c>: New pattern.
10748 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10749 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10750 * common/function-view.h: New file.
10751 * unittests/function-view-selftests.c: New file.
10752 * configure: Regenerate.
10753
8eaf5320
SM
107542017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10755
10756 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10757 inferior_ptid.
10758 * go32-nat.c (go32_thread_alive): Likewise.
10759
38768751
YQ
107602017-02-23 Yao Qi <yao.qi@linaro.org>
10761
10762 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10763 delete.
10764
0a8beaba
YQ
107652017-02-23 Yao Qi <yao.qi@linaro.org>
10766
10767 * varobj.c (varobj_clear_saved_item): Use delete instead of
10768 xfree.
10769 (update_dynamic_varobj_children): Likewise.
10770
58fdfd2c
JK
107712017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10772
10773 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10774
1b90b139
SM
107752017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10776
10777 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10778 m_enum_value to 0 in default constructor.
10779
2039d74e
EBM
107802017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10781
10782 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10783 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10784 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10785 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10786 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10787 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10788 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10789 IS_STORE_CONDITIONAL_INSN.
10790
7814882a
JK
107912017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10792
10793 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10794
0ae60b63
JK
107952017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10796
10797 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10798
0224619f
JK
107992017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10800
10801 * dwarf2read.c (skip_one_die, read_attribute_value)
10802 (dwarf2_const_value_attr, dump_die_shallow)
10803 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10804 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10805
0af92d60
JK
108062017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10807
10808 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10809 (dwarf_parse_macro_header): Accept DWARF version 5.
10810 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10811
216f72a1
JK
108122017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10813
10814 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10815 DW_AT_GNU_*.
10816 * common/common-exceptions.h (enum errors): Likewise.
10817 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10818 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10819 (dwarf_expr_context::execute_stack_op): Likewise.
10820 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10821 Likewise.
10822 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10823 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10824 (show_entry_values_debug, call_site_to_target_addr)
10825 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10826 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10827 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10828 (value_of_dwarf_block_entry, indirect_pieced_value)
10829 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10830 (disassemble_dwarf_expression): Likewise.
10831 * dwarf2read.c (process_die, inherit_abstract_dies)
10832 (read_call_site_scope): Likewise.
10833 * gdbtypes.h (struct func_type, struct call_site_parameter)
10834 (struct call_site): Likewise.
10835 * stack.c (read_frame_arg): Likewise.
10836 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10837
43988095
JK
108382017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10839
10840 * defs.h (read_unsigned_leb128): New declaration.
10841 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10842 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10843 (dwarf2_find_location_expression): Call also
10844 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10845 * dwarf2loc.h (dwarf2_version): New declaration.
10846 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10847 rnglists.
10848 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10849 .debug_rnglists.
10850 (struct dwop_section_names): Add loclists_dwo.
10851 (dwop_section_names): Add .debug_loclists.dwo.
10852 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10853 (struct dwarf2_per_cu_data): Add dwarf_version.
10854 (struct dwo_sections): Add loclists.
10855 (struct attr_abbrev): Add implicit_const.
10856 (read_indirect_line_string): New declaration.
10857 (read_unsigned_leb128): Delete declaration.
10858 (rcuh_kind): New definition.
10859 (read_and_check_comp_unit_head): Change parameter
10860 is_debug_types_section to section_kind.
10861 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10862 (read_comp_unit_head): Change parameter abfd to section, add parameter
10863 section_kind. Handle DWARF-5.
10864 (error_check_comp_unit_head): Accept also DWARF version 5.
10865 (read_and_check_comp_unit_head): Change parameter
10866 is_debug_types_section to section_kind.
10867 (read_and_check_type_unit_head): Delete function.
10868 (read_abbrev_offset): Handle DWARF-5.
10869 (create_debug_type_hash_table): Add parameter section_kind. Process
10870 only DW_UT_type. Use signature and type_offset_in_tu from struct
10871 comp_unit_head.
10872 (create_debug_types_hash_table): Update create_debug_type_hash_table
10873 caller.
10874 (create_all_type_units): Call create_debug_type_hash_table.
10875 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10876 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10877 caller.
10878 (skip_one_die): Handle DW_FORM_implicit_const.
10879 (dwarf2_rnglists_process): New function.
10880 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10881 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10882 (read_attribute_value): Handle DW_FORM_implicit_const,
10883 DW_FORM_line_strp.
10884 (read_attribute): Handle DW_FORM_implicit_const.
10885 (read_indirect_string_at_offset_from): New function from
10886 read_indirect_string_at_offset.
10887 (read_indirect_string_at_offset): Call
10888 read_indirect_string_at_offset_from.
10889 (read_indirect_line_string_at_offset): New function.
10890 (read_indirect_string): New function comment.
10891 (read_indirect_line_string): New function.
10892 (read_unsigned_leb128): Make it global.
10893 (dwarf2_string_attr): Handle DWARF-5.
10894 (add_include_dir_stub, read_formatted_entries): New functions.
10895 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10896 Handle DWARF-5.
10897 (per_cu_header_read_in): Update read_comp_unit_head caller.
10898 (dwarf2_version): New function.
10899 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10900 rnglists.
10901 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10902 fields.
10903
22d2f3ab
JK
109042017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10905
10906 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10907
5f46c5a5
JK
109082017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10909
10910 * dwarf2read.c (dwarf2_ranges_process): New function from
10911 dwarf2_ranges_read.
10912 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10913 dwarf2_ranges_process.
10914
78d4d2c5
JK
109152017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10916
10917 * dwarf2read.c (create_debug_type_hash_table): New function from
10918 create_debug_types_hash_table.
10919 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10920 (create_all_type_units, open_and_init_dwo_file): Update
10921 create_debug_types_hash_table callers.
10922
1b076f25
SDJ
109232017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10924
10925 PR gdb/16188
10926 * fork-child.c (trace_start_error): Fix thinko. va_end should
10927 refer to 'ap', not 'args'.
10928
0db8980c
SDJ
109292017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10930 Pedro Alves <palves@redhat.com>
10931
10932 PR gdb/16188
10933 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10934 calls succeeded.
10935 * fork-child.c (trace_start_error): New function.
10936 (trace_start_error_with_name): Likewise.
10937 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10938 * inf-ptrace.c (inf_ptrace_me): Likewise.
10939 * inferior.h (trace_start_error): New prototype.
10940 (trace_start_error_with_name): Likewise.
10941
99e8a4f9
SDJ
109422017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10943
10944 PR gdb/21164
10945 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10946 NULL before using it.
10947 * symmisc.c (maintenance_print_symbols): Likewise.
10948 (maintenance_print_msymbols): Likewise.
10949
4e746bb6
TW
109502017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10951
10952 * NEWS: Add record Python bindings entry.
10953
109542017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10955
10956 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10957 py-record-full.o.
10958 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10959 * python/py-record-btrace.c, python/py-record-btrace.h,
10960 python/py-record-full.c, python/py-record-full.h: New file.
10961 * python/py-record.c: Add include for py-record-btrace.h and
10962 py-record-full.h.
10963 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10964 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10965 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10966 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10967 New definition.
10968 (gdbpy_initialize_btrace): New export.
10969 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10970
109712017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10972
10973 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10974 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10975 * python/py-record.c: New file.
10976 * python/python-internal.h (gdbpy_start_recording,
10977 gdbpy_current_recording, gdpy_stop_recording,
10978 gdbpy_initialize_record): New export.
10979 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10980 (python_GdbMethods): Add gdbpy_start_recording,
10981 gdbpy_current_recording and gdbpy_stop_recording.
10982
109832017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10984
10985 * record-btrace.c (record_btrace_record_method): New function.
10986 (init_record_btrace_ops): Initialize to_record_method.
10987 * record-full.c (record_full_record_method): New function.
10988 (init_record_full_ops, init_record_full_core_ops): Add
10989 record_full_record_method.
10990 * record.h (enum record_method): New enum.
10991 * target-debug.h (target_debug_print_enum_record_method: New define.
10992 * target-delegates.c: Regenerate.
10993 * target.c (target_record_method): New function.
10994 * target.h: Include record.h.
10995 (struct target_ops) <to_record_method>: New field.
10996 (target_record_method): New export.
10997
109982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10999
11000 * record.h (record_start, record_stop): New export.
11001 * record.c (record_start, record_stop): New function.
11002
110032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11004
11005 * btrace.c (btrace_fetch): Copy function call segments pointer
11006 into a vector.
11007 (btrace_clear): Clear the vector.
11008 (btrace_find_insn_by_number): Use binary search to find the correct
11009 function call segment.
11010 * btrace.h (brace_fun_p): New typedef.
11011 (struct btrace_thread_info) <functions>: New field.
11012
110132017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11014
11015 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11016 * btrace.c (btrace_decode_error): ... here. New function.
11017 * btrace.h (btrace_decode_error): New export.
11018
110192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
11020
11021 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11022 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11023 btrace_find_insn_by_number): Remove special case for gaps.
11024 * btrace.h (btrace_insn_get_error): New export.
11025 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11026 * record-btrace.c (btrace_insn_history): Print number for gaps.
11027 (record_btrace_info, record_btrace_goto): Handle gaps.
11028
3f77c769
TT
110292017-02-14 Tom Tromey <tom@tromey.com>
11030
11031 PR python/13598:
11032 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11033 event.
11034 * python/py-evts.c (gdbpy_initialize_py_events): Add
11035 before_prompt registry.
11036 * python/py-events.h (events_object) <before_prompt>: New field.
11037
4c2c7ac6
MM
110382017-02-14 Markus Metzger <markus.t.metzger@intel.com>
11039
11040 * btrace.c (ftrace_new_switch): Preserve up link and flags.
11041
5cf30ebf
LM
110422017-02-13 Luis Machado <lgustavo@codesourcery.com>
11043
11044 * symfile (_initialize_symfile): Add usage text to the load command's
11045 help text.
11046
26a06916
SM
110472017-02-10 Simon Marchi <simon.marchi@ericsson.com>
11048
11049 * utils.c (defaulted_query): Don't query on secondary UIs.
11050
0b145e37
TT
110512017-02-10 Tom Tromey <tom@tromey.com>
11052
11053 * rust-lang.c (rust_get_disr_info): Remove unused variable.
11054
2d8365c4
TT
110552017-02-10 Tom Tromey <tom@tromey.com>
11056
11057 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11058 "cleanup" local.
11059 * python/py-type.c (typy_legacy_template_argument): Remove
11060 unnecessary "cleanup" local.
11061
2bb8f231
TT
110622017-02-10 Tom Tromey <tom@tromey.com>
11063
11064 * python/python.c (do_start_initialization): New function, from
11065 _initialize_python.
11066 (_initialize_python): Call do_start_initialization.
11067 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11068 goto.
11069
1bdfaf42
TT
110702017-02-10 Tom Tromey <tom@tromey.com>
11071
11072 * python/py-prettyprint.c (pretty_print_one_value): Use
11073 gdbpy_ref.
11074
88b6faea
TT
110752017-02-10 Tom Tromey <tom@tromey.com>
11076
11077 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11078 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11079 gdbpy_ref.
11080 * python/py-type.c (field_new): Use gdbpy_ref.
11081 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11082 gdbpy_ref.
11083 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11084 (py_free_pspace): Likewise.
11085 (pspace_to_pspace_object): Likewise.
11086 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11087 (py_free_objfile): Likewise.
11088 (objfile_to_objfile_object): Likewise.
11089 * python/py-inferior.c (delete_thread_object): Use
11090 gdbpy_ref.
11091 (infpy_read_memory): Likewise.
11092 (py_free_inferior): Likewise.
11093 * python/py-evtregistry.c (create_eventregistry_object): Use
11094 gdbpy_ref.
11095 * python/py-event.c (create_event_object): Use gdbpy_ref.
11096
7780f186
TT
110972017-02-10 Tom Tromey <tom@tromey.com>
11098
11099 * python/py-ref.h (gdbpy_ref_policy): Now a template.
11100 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11101 used.
11102 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11103 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11104 python/py-exitedevent.c, python/py-finishbreakpoint.c,
11105 python/py-framefilter.c, python/py-function.c,
11106 python/py-inferior.c, python/py-infevents.c,
11107 python/py-linetable.c, python/py-newobjfileevent.c,
11108 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11109 python/py-signalevent.c, python/py-stopevent.c,
11110 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11111 python/py-unwind.c, python/py-utils.c, python/py-value.c,
11112 python/py-varobj.c, python/py-xmethods.c, python/python.c,
11113 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11114
d4b0bb18
TT
111152017-02-10 Tom Tromey <tom@tromey.com>
11116
11117 * ui-out.h (ui_out_emit_type): New class.
11118 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11119 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11120 and ui_out_emit_tuple.
11121 (enumerate_locals): Likewise.
11122 (py_mi_print_variables, py_print_locals, py_print_args): Use
11123 ui_out_emit_list.
11124 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11125 ui_out_emit_list.
11126 * common/gdb_optional.h: New file.
11127
f67f945c
MG
111282017-02-10 Martin Galvan <martingalvan@sourceware.org>
11129
11130 * MAINTAINERS (Write After Approval): Update my e-mail address.
11131
18da0c51
MG
111322017-02-10 Martin Galvan <martingalvan@sourceware.org>
11133
11134 PR gdb/21122
11135 * breakpoint.c (_initialize_breakpoint): Update the help description
11136 of the 'commands' command to indicate that it takes a list argument.
11137
62c14536
SM
111382017-02-09 Simon Marchi <simon.marchi@ericsson.com>
11139
11140 * interps.c (current_interp_set_logging): Remove "return".
11141
ff6fa247
GB
111422017-02-09 Gary Benson <gbenson@redhat.com>
11143
11144 * symtab.c (add_symtab_completions): Prevent NULL pointer
11145 dereference.
11146
a474bd8e
PA
111472017-02-08 Pedro Alves <palves@redhat.com>
11148
11149 * interps.c (interp::interp): Remove reference to quiet_p.
11150 (interp_set): Make static. Remove dead "Switching to" output
11151 code.
11152 (interp_quiet_p, interp_set_quiet): Delete.
11153 (interpreter_exec_cmd): Don't set the interpreter quiet.
11154 * interps.h (interp_quiet_p): Make static.
11155 (class interp) <quiet_p>: Remove field
11156
3d7b173c
JG
111572017-02-08 Jerome Guitton <guitton@adacore.com>
11158
604c4576
JG
11159 * cli/cli-decode.c (find_command_name_length): Make it extern.
11160 * cli/cli-decode.h (find_command_name_length): Declare.
11161 * cli/cli-script.c (command_name_equals, line_first_arg):
11162 New functions.
11163 (process_next_line): Use cli-decode to parse command names.
11164 (build_command_line): Make args a constant pointer.
11165
111662017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 11167
3d7b173c
JG
11168 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11169 Remove case-insensitive search.
11170
1291063d
JM
111712017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
11172
11173 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11174 at the end of the line. Avoids an ARI warning.
11175
20b477a7
LM
111762017-02-06 Luis Machado <lgustavo@codesourcery.com>
11177
11178 * NEWS: Mention support for record/replay of Intel 64 rdrand and
11179 rdseed instructions.
11180 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11181
3f7b46f2
IR
111822017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
11183
11184 PR tdep/20936
11185 Provide and use sparc32 and sparc64 target description XML files.
11186 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11187 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11188 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11189 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11190 * features/sparc/sparc32-solaris.xml: New file.
11191 * features/sparc/sparc64-solaris.xml: New file.
11192 * features/sparc/sparc32-solaris.c: Generated.
11193 * features/sparc/sparc64-solaris.c: Generated.
11194 * sparc-tdep.h: Account for differences in target descriptions.
11195 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11196 (sparc32_register_type): Use target provided registers.
11197 (validate_tdesc_registers): New function.
11198 (sparc32_gdbarch_init): Use tdesc_has_registers.
11199 Set pseudoregister functions.
11200 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11201 (sparc64_register_type): Use target provided registers.
11202 (sparc64_init_abi): Set pseudoregister functions.
11203
f0fd41c1
TT
112042017-02-03 Tom Tromey <tom@tromey.com>
11205
11206 PR rust/21097:
11207 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11208 with a single member.
11209
d6f9b0fb
PA
112102017-02-03 Pedro Alves <palves@redhat.com>
11211
11212 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11213 (cli_interp_base::~cli_interp_base): New.
11214 (cli_interp): New struct.
11215 (as_cli_interp): Cast the interp itself to cli_interp.
11216 (cli_interpreter_pre_command_loop): Rename to ...
11217 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
11218 parameter.
11219 (cli_interpreter_init): Rename to ...
11220 (cli_interp::init): ... this. Remove 'self' parameter. Use
11221 boolean. Make extern.
11222 (cli_interpreter_resume): Rename to ...
11223 (cli_interp::resume): ... this. Remove 'data' parameter. Make
11224 extern.
11225 (cli_interpreter_suspend): Rename to ...
11226 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
11227 extern.
11228 (cli_interpreter_exec): Rename to ...
11229 (cli_interp::exec): ... this. Remove 'data' parameter. Make
11230 extern.
11231 (cli_interpreter_supports_command_editing): Rename to ...
11232 (cli_interp_base::supports_command_editing): ... this. Remove
11233 'interp' parameter. Make extern.
11234 (cli_ui_out): Rename to ...
11235 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
11236 Make extern.
11237 (cli_set_logging): Rename to ...
11238 (cli_interp_base::set_logging): ... this. Remove 'interp'
11239 parameter. Make extern.
11240 (cli_interp_procs): Delete.
11241 (cli_interp_factory): Adjust to use "new".
11242 * cli/cli-interp.h: Include "interps.h".
11243 (struct cli_interp_base): New struct.
11244 * interps.c (struct interp): Delete. Fields moved to interps.h.
11245 (interp_new): Delete.
11246 (interp::interp, interp::~interp): New.
11247 (interp_set): Use bool, and return void. Assume the interpreter
11248 has suspend, init and resume methods, and that the all return
11249 void.
11250 (set_top_level_interpreter): interp_set returns void.
11251 (interp_ui_out): Adapt.
11252 (current_interp_set_logging): Adapt.
11253 (interp_data): Delete.
11254 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11255 (interp_exec): Adapt.
11256 (top_level_interpreter_data): Delete.
11257 * interps.h (interp_init_ftype, interp_resume_ftype)
11258 (interp_suspend_ftype, interp_exec_ftype)
11259 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11260 (class interp): New.
11261 (interp_new): Delete.
11262 (interp_set): Now returns void. Use bool.
11263 (interp_data, top_level_interpreter_data): Delete.
11264 * mi/mi-common.h: Include interps.h.
11265 (class mi_interp): Inherit from interp. Define a ctor. Declare
11266 init, resume, suspect, exec, interp_ui_out, set_logging and
11267 pre_command_loop methods.
11268 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11269 (mi_interpreter_init): Rename to ...
11270 (mi_interp::init): ... this. Remove the 'interp' parameter, use
11271 bool, return void and make extern. Adjust.
11272 (mi_interpreter_resume): ... Rename to ...
11273 (mi_interp::resume): ... this. Remove the 'data' parameter,
11274 return void and make extern. Adjust.
11275 (mi_interpreter_suspend): ... Rename to ...
11276 (mi_interp::suspend): ... this. Remove the 'data' parameter,
11277 return void and make extern. Adjust.
11278 (mi_interpreter_exec): ... Rename to ...
11279 (mi_interp::exec): ... this. Remove the 'data' parameter and make
11280 extern. Adjust.
11281 (mi_interpreter_pre_command_loop): ... Rename to ...
11282 (mi_interp::pre_command_loop): ... this. Remove the 'self'
11283 parameter and make extern.
11284 (mi_on_normal_stop_1): Adjust.
11285 (mi_ui_out): Rename to ...
11286 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
11287 parameter and make extern. Adjust.
11288 (mi_set_logging): Rename to ...
11289 (mi_interp::set_logging): ... this. Remove the 'interp'
11290 parameter and make extern. Adjust.
11291 (mi_interp_procs): Delete.
11292 (mi_interp_factory): Adjust to use 'new'.
11293 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11294 (mi_print_exception, mi_execute_command, mi_load_progress):
11295 Adjust.
11296 * tui/tui-interp.c (tui_interp): New class.
11297 (as_tui_interp): Return a tui_interp pointer.
11298 (tui_on_normal_stop, tui_on_signal_received)
11299 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11300 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11301 to use interp::interp_ui_out.
11302 (tui_init): Rename to ...
11303 (tui_interp::init): ... this. Remove the 'self' parameter, use
11304 bool, return void and make extern. Adjust.
11305 (tui_resume): Rename to ...
11306 (tui_interp::resume): ... this. Remove the 'data' parameter,
11307 return void and make extern. Adjust.
11308 (tui_suspend): Rename to ...
11309 (tui_interp::suspend): ... this. Remove the 'data' parameter,
11310 return void and make extern. Adjust.
11311 (tui_ui_out): Rename to ...
11312 (tui_interp::interp_ui_out): ... this. Remove the 'self'
11313 parameter, and make extern. Adjust.
11314 (tui_exec): Rename to ...
11315 (tui_interp::exec): ... this. Remove the 'data' parameter and
11316 make extern.
11317 (tui_interp_procs): Delete.
11318 (tui_interp_factory): Use "new".
11319
65c40c95
TT
113202017-02-02 Tom Tromey <tom@tromey.com>
11321
11322 * rust-exp.y (ends_raw_string, space_then_number)
11323 (rust_identifier_start_p): Return bool.
11324 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11325 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11326 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11327 (rust_chartype_p): Return bool.
11328 (val_print_struct, rust_print_struct_def, rust_print_type):
11329 Update.
11330 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11331 Return bool.
11332
b50f188d
TT
113332017-02-02 Tom Tromey <tom@tromey.com>
11334
11335 * rust-lang.c: Reindent.
11336
03c85b11
TT
113372017-02-02 Tom Tromey <tom@tromey.com>
11338
11339 * rust-lang.h (rust_crate_for_block): Update.
11340 * rust-lang.c (rust_crate_for_block): Return std::string.
11341 (rust_get_disr_info): Use std:;string, not
11342 gdb::unique_xmalloc_ptr.
11343 * rust-exp.y (crate_name): Update.
11344
9b6da501
PA
113452017-02-02 Pedro Alves <palves@redhat.com>
11346
11347 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11348 field out of gdb_disassembler_test and make it static.
11349
ec4cb20b
PA
113502017-02-02 Pedro Alves <palves@redhat.com>
11351
11352 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11353 mi1_interp and mi_interp fields.
11354
5be5dbf0
PA
113552017-02-02 Pedro Alves <palves@redhat.com>
11356
616268b6
PA
11357 * cli/cli-interp.c (struct saved_output_files, saved_output):
11358 Moved from cli/cli-logging.c.
11359 (cli_set_logging): New function.
11360 (cli_interp_procs): Install cli_set_logging.
11361 * cli/cli-interp.h (make_logging_output, cli_set_logging):
11362 Declare.
11363 * cli/cli-logging.c (struct saved_output_files, saved_output):
11364 Moved to cli/cli-interp.c.
11365 (pop_output_files): Don't save outputs here.
11366 (make_logging_output): New function.
11367 (handle_redirections): Don't build tee nor save previous outputs
11368 here.
11369 * interps.c (current_interp_set_logging): Change prototype.
11370 Assume there's always a set_logging_proc method installed.
11371 * interps.h (interp_set_logging_ftype): Change prototype.
11372 (current_interp_set_logging): Change prototype and adjust comment.
11373 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
11374 use make_logging_output.
11375 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
113762017-02-02 Pedro Alves <palves@redhat.com>
11377
5be5dbf0
PA
11378 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11379 from ...
11380 (set_logging_overwrite): ... here.
11381 (logging_no_redirect_file): Delete.
11382 (set_logging_redirect): Don't handle redirection on the fly.
11383 Instead warn that "logging off" / "logging on" is necessary.
11384 (pop_output_files): Delete references to logging_no_redirect_file.
11385 (show_logging_command): Always speak in terms of what will happen
11386 once logging is reenabled.
11387
c99cc448
PA
113882017-02-02 Pedro Alves <palves@redhat.com>
11389
11390 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11391
8b172ce7
PA
113922017-02-02 Pedro Alves <palves@redhat.com>
11393
11394 * disasm.c (gdb_pretty_print_insn): Rename to ...
11395 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11396 Remove gdbarch parameter. Adapt to clear the object's buffers
11397 instead of allocating new buffers, and to print using the object's
11398 gdb_disassembler instead of calling gdb_print_insn.
11399 (dump_insns): Use gdb_pretty_print_disassembler.
11400 * disasm.h (gdb_pretty_print_insn): Delete declaration.
11401 (gdb_pretty_print_disassembler): New class.
11402 * record-btrace.c (btrace_insn_history): Use
11403 gdb_pretty_print_disassembler.
11404
d7e74731
PA
114052017-02-02 Pedro Alves <palves@redhat.com>
11406
11407 * ada-lang.c (type_as_string): Use string_file.
11408 * ada-valprint.c (ada_print_floating): Use string_file.
11409 * ada-varobj.c (ada_varobj_scalar_image)
11410 (ada_varobj_get_value_image): Use string_file.
11411 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11412 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11413 * breakpoint.c (update_inserted_breakpoint_locations)
11414 (insert_breakpoint_locations, reattach_breakpoints)
11415 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11416 (print_it_watchpoint): Use string_file.
11417 (save_breakpoints): Use stdio_file.
11418 * c-exp.y (oper): Use string_file.
11419 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11420 tee_file.
11421 (pop_output_files): Use delete.
11422 (handle_redirections): Use stdio_file and tee_file.
11423 * cli/cli-setshow.c (do_show_command): Use string_file.
11424 * compile/compile-c-support.c (c_compute_program): Use
11425 string_file.
11426 * compile/compile-c-symbols.c (generate_vla_size): Take a
11427 'string_file &' instead of a 'ui_file *'.
11428 (generate_c_for_for_one_variable): Take a 'string_file &' instead
11429 of a 'ui_file *'. Use string_file.
11430 (generate_c_for_variable_locations): Take a 'string_file &'
11431 instead of a 'ui_file *'.
11432 * compile/compile-internal.h (generate_c_for_for_one_variable):
11433 Take a 'string_file &' instead of a 'ui_file *'.
11434 * compile/compile-loc2c.c (push, pushf, unary, binary)
11435 (print_label, pushf_register_address, pushf_register)
11436 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11437 'ui_file *'. Adjust.
11438 * compile/compile.c (compile_to_object): Use string_file.
11439 * compile/compile.h (compile_dwarf_expr_to_c)
11440 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11441 'ui_file *'.
11442 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11443 (replace_typedefs_qualified_name): Use string_file and
11444 obstack_copy0.
11445 * disasm.c (gdb_pretty_print_insn): Use string_file.
11446 (gdb_disassembly): Adjust reference the null_stream global.
11447 (do_ui_file_delete): Delete.
11448 (gdb_insn_length): Use null_stream.
11449 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11450 * dwarf2loc.c (dwarf2_compile_property_to_c)
11451 (locexpr_generate_c_location, loclist_generate_c_location): Take a
11452 'string_file &' instead of a 'ui_file *'.
11453 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11454 * dwarf2read.c (do_ui_file_peek_last): Delete.
11455 (dwarf2_compute_name): Use string_file.
11456 * event-top.c (gdb_setup_readline): Use stdio_file.
11457 * gdbarch.sh (verify_gdbarch): Use string_file.
11458 * gdbtypes.c (safe_parse_type): Use null_stream.
11459 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11460 string_file.
11461 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11462 'string_file *' instead of a 'ui_file *'.
11463 (gdbscm_arch_disassemble): Use string_file.
11464 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11465 * guile/scm-ports.c (class ioscm_file_port): Now a class that
11466 inherits from ui_file.
11467 (ioscm_file_port_delete, ioscm_file_port_rewind)
11468 (ioscm_file_port_put): Delete.
11469 (ioscm_file_port_write): Rename to ...
11470 (ioscm_file_port::write): ... this. Remove file_port_magic
11471 checks.
11472 (ioscm_file_port_new): Delete.
11473 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11474 ui_file_up.
11475 * guile/scm-type.c (tyscm_type_name): Use string_file.
11476 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11477 Use string_file.
11478 * infcmd.c (print_return_value_1): Use string_file.
11479 * infrun.c (print_target_wait_results): Use string_file.
11480 * language.c (add_language): Use string_file.
11481 * location.c (explicit_to_string_internal): Use string_file.
11482 * main.c (captured_main_1): Use null_file.
11483 * maint.c (maintenance_print_architecture): Use stdio_file.
11484 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11485 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11486 event_channel>: Change type to mi_console_file pointer.
11487 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11488 (mi_console_file_delete): Delete.
11489 (struct mi_console_file): Delete.
11490 (mi_console_file_magic): Delete.
11491 (mi_console_file_new): Delete.
11492 (mi_console_file::mi_console_file): New.
11493 (mi_console_file_delete): Delete.
11494 (mi_console_file_fputs): Delete.
11495 (mi_console_file::write): New.
11496 (mi_console_raw_packet): Delete.
11497 (mi_console_file::flush): New.
11498 (mi_console_file_flush): Delete.
11499 (mi_console_set_raw): Rename to ...
11500 (mi_console_file::set_raw): ... this.
11501 * mi/mi-console.h (class mi_console_file): New class.
11502 (mi_console_file_new, mi_console_set_raw): Delete.
11503 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11504 (mi_set_logging): Use delete and tee_file. Adjust.
11505 * mi/mi-main.c (output_register): Use string_file.
11506 (mi_cmd_data_evaluate_expression): Use string_file.
11507 (mi_cmd_data_read_memory): Use string_file.
11508 (mi_cmd_execute, print_variable_or_computed): Use string_file.
11509 * mi/mi-out.c (mi_ui_out::main_stream): New.
11510 (mi_ui_out::rewind): Use main_stream and
11511 string_file.
11512 (mi_ui_out::put): Use main_stream and string_file.
11513 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11514 Allocate a 'string_file' instead.
11515 (mi_out_new): Don't allocate a mem_fileopen stream here.
11516 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11517 (mi_ui_out::main_stream): Declare method.
11518 * printcmd.c (eval_command): Use string_file.
11519 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11520 * python/py-arch.c (archpy_disassemble): Use string_file.
11521 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11522 * python/py-frame.c (frapy_str): Use string_file.
11523 * python/py-framefilter.c (py_print_type, py_print_single_arg):
11524 Use string_file.
11525 * python/py-type.c (typy_str): Use string_file.
11526 * python/py-unwind.c (unwind_infopy_str): Use string_file.
11527 * python/py-value.c (valpy_str): Use string_file.
11528 * record-btrace.c (btrace_insn_history): Use string_file.
11529 * regcache.c (regcache_print): Use stdio_file.
11530 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11531 * remote.c (escape_buffer): Use string_file.
11532 * rust-lang.c (rust_get_disr_info): Use string_file.
11533 * serial.c (serial_open_ops_1): Use stdio_file.
11534 (do_serial_close): Use delete.
11535 * stack.c (print_frame_arg): Use string_file.
11536 (print_frame_args): Remove local mem_fileopen stream, not used.
11537 (print_frame): Use string_file.
11538 * symmisc.c (maintenance_print_symbols): Use stdio_file.
11539 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11540 Take a 'string_file *' instead of a 'ui_file *'.
11541 * top.c (new_ui): Use stdio_file and stderr_file.
11542 (free_ui): Use delete.
11543 (execute_command_to_string): Use string_file.
11544 (quit_confirm): Use string_file.
11545 * tracepoint.c (collection_list::append_exp): Use string_file.
11546 * tui/tui-disasm.c (tui_disassemble): Use string_file.
11547 * tui/tui-file.c: Don't include "ui-file.h".
11548 (enum streamtype, struct tui_stream): Delete.
11549 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11550 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11551 (tui_file::tui_file): New method.
11552 (tui_file_fputs): Delete.
11553 (tui_file_get_strbuf): Delete.
11554 (tui_file::puts): New method.
11555 (tui_file_adjust_strbuf): Delete.
11556 (tui_file_flush): Delete.
11557 (tui_file::flush): New method.
11558 * tui/tui-file.h: Tweak intro comment.
11559 Include ui-file.h.
11560 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11561 (tui_file_adjust_strbuf): Delete declarations.
11562 (class tui_file): New class.
11563 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11564 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11565 (tui_register_format): Use string_stream.
11566 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11567 (tui_get_function_from_frame): Use string_file.
11568 * typeprint.c (type_to_string): Use string_file.
11569 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11570 (null_stream): New global.
11571 (ui_file_delete): Delete.
11572 (ui_file::ui_file): New.
11573 (null_file_isatty): Delete.
11574 (ui_file::~ui_file): New.
11575 (null_file_rewind): Delete.
11576 (ui_file::printf): New.
11577 (null_file_put): Delete.
11578 (null_file_flush): Delete.
11579 (ui_file::putstr): New.
11580 (null_file_write): Delete.
11581 (ui_file::putstrn): New.
11582 (null_file_read): Delete.
11583 (ui_file::putc): New.
11584 (null_file_fputs): Delete.
11585 (null_file_write_async_safe): Delete.
11586 (ui_file::vprintf): New.
11587 (null_file_delete): Delete.
11588 (null_file::write): New.
11589 (null_file_fseek): Delete.
11590 (null_file::puts): New.
11591 (ui_file_data): Delete.
11592 (null_file::write_async_safe): New.
11593 (gdb_flush, ui_file_isatty): Adjust.
11594 (ui_file_put, ui_file_rewind): Delete.
11595 (ui_file_write): Adjust.
11596 (ui_file_write_for_put): Delete.
11597 (ui_file_write_async_safe, ui_file_read): Adjust.
11598 (ui_file_fseek): Delete.
11599 (fputs_unfiltered): Adjust.
11600 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11601 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11602 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11603 (set_ui_file_data): Delete.
11604 (string_file::~string_file, string_file::write)
11605 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11606 (do_ui_file_as_string, ui_file_as_string): Delete.
11607 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11608 (struct mem_file): Delete.
11609 (mem_file_new): Delete.
11610 (stdio_file::stdio_file): New.
11611 (mem_file_delete): Delete.
11612 (stdio_file::stdio_file): New.
11613 (mem_fileopen): Delete.
11614 (stdio_file::~stdio_file): New.
11615 (mem_file_rewind): Delete.
11616 (stdio_file::set_stream): New.
11617 (mem_file_put): Delete.
11618 (stdio_file::open): New.
11619 (mem_file_write): Delete.
11620 (stdio_file_magic, struct stdio_file): Delete.
11621 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11622 (stdio_file::flush): New.
11623 (stdio_file_read): Rename to ...
11624 (stdio_file::read): ... this. Adjust.
11625 (stdio_file_write): Rename to ...
11626 (stdio_file::write): ... this. Adjust.
11627 (stdio_file_write_async_safe): Rename to ...
11628 (stdio_file::write_async_safe) ... this. Adjust.
11629 (stdio_file_fputs): Rename to ...
11630 (stdio_file::puts) ... this. Adjust.
11631 (stdio_file_isatty): Delete.
11632 (stdio_file_fseek): Delete.
11633 (stdio_file::isatty): New.
11634 (stderr_file_write): Rename to ...
11635 (stderr_file::write) ... this. Adjust.
11636 (stderr_file_fputs): Rename to ...
11637 (stderr_file::puts) ... this. Adjust.
11638 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11639 (stderr_file::stderr_file): New.
11640 (tee_file_magic): Delete.
11641 (struct tee_file): Delete.
11642 (tee_file::tee_file): New.
11643 (tee_file_new): Delete.
11644 (tee_file::~tee_file): New.
11645 (tee_file_delete): Delete.
11646 (tee_file_flush): Rename to ...
11647 (tee_file::flush): ... this. Adjust.
11648 (tee_file_write): Rename to ...
11649 (tee_file::write): ... this. Adjust.
11650 (tee_file::write_async_safe): New.
11651 (tee_file_fputs): Rename to ...
11652 (tee_file::puts): ... this. Adjust.
11653 (tee_file_isatty): Rename to ...
11654 (tee_file::isatty): ... this. Adjust.
11655 * ui-file.h (struct obstack, struct ui_file): Don't
11656 forward-declare.
11657 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11658 (ui_file_write_ftype)
11659 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11660 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11661 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11662 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11663 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11664 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11665 (set_ui_file_fseek): Delete.
11666 (ui_file_data, ui_file_delete, ui_file_rewind)
11667 (struct ui_file): New.
11668 (ui_file_up): New.
11669 (class null_file): New.
11670 (null_stream): Declare.
11671 (ui_file_write_for_put, ui_file_put): Delete.
11672 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11673 Delete.
11674 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11675 (gdb_fopen, tee_file_new): Delete.
11676 (struct string_file): New.
11677 (struct stdio_file): New.
11678 (stdio_file_up): New.
11679 (struct stderr_file): New.
11680 (class tee_file): New.
11681 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11682 of a 'ui_file *'. Adjust.
11683 * ui-out.h (class ui_out) <field_stream>: Likewise.
11684 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11685 (null_stream): Delete.
11686 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11687 Adjust.
11688 * utils.h (struct ui_file): Delete forward declaration..
11689 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11690 (error_stream): Take a 'string_file &' instead of a
11691 'ui_file *'.
11692 * varobj.c (varobj_value_get_print_value): Use string_file.
11693 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11694 * gdbarch.c: Regenerate.
11695
187808b0
PA
116962017-02-02 Pedro Alves <palves@redhat.com>
11697
11698 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11699 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11700 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11701 Adjust to call gdb_print_insn instead of
11702 gdb_disassembler::print_insn.
11703 (dump_insns, do_mixed_source_and_assembly_deprecated)
11704 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11705 'gdbarch' parameter. Remove gdb_disassembler parameter.
11706 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11707 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11708 declaration.
11709 (gdb_pretty_print_insn): Re-add declaration.
11710 * record-btrace.c (btrace_insn_history): Don't allocate a
11711 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11712
7a8eb317
SM
117132017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11714
11715 * disasm.h (gdb_disassembly): Remove file_string parameter.
11716 * disasm.c (gdb_disassembly): Likewise.
11717 * cli/cli-cmds.c (print_disassembly): Adapt.
11718 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11719 * stack.c (do_gdb_disassembly): Likewise.
11720
7346ef59
AA
117212017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11722
11723 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11724 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11725 targets. And if the implicit value is longer than needed, extract
11726 the first bytes instead of the "least significant" ones.
11727
cd4007e4
MM
117282017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11729
11730 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11731 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11732 (btrace_fetch): Assert can_access_registers_ptid.
11733 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11734 validate_registers_access.
11735
cf77c34e
MM
117362017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11737
11738 * gdbthread.h (can_access_registers_ptid): New.
11739 * thread.c (can_access_registers_ptid): New.
11740
be85ce7d
PA
117412017-02-01 Pedro Alves <palves@redhat.com>
11742
11743 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11744
29b0b251
PA
117452017-01-31 Pedro Alves <palves@redhat.com>
11746
11747 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11748 Fix typos.
11749
289b5b24
PA
117502017-01-31 Pedro Alves <palves@redhat.com>
11751
11752 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11753 not used.
11754
b47413b4
PA
117552017-01-31 Pedro Alves <palves@redhat.com>
11756
11757 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11758
60adb36c
PA
117592017-01-31 Pedro Alves <palves@redhat.com>
11760
11761 * common/scoped_restore.h
11762 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11763 change the value's parameter type to T2.
11764 (make_scoped_restore): Likewise.
11765
2735833d
WT
117662017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11767 Richard Henderson <rth@redhat.com>
11768
11769 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11770 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11771 GS_BASE for older kernels.
11772 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11773 GS_BASE for older kernels.
11774 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11775 and GS_BASE to the offset table.
11776 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11777 system register group.
11778 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11779 for older kernels.
11780 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11781 amd64 ABI.
11782 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11783 AMD64_GSBASE_REGNUM.
11784 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11785 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11786 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11787 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11788 i386/64bit-segments.xml in those rules.
11789 * features/i386/64bit-segments.xml: New file.
11790 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11791 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11792 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11793 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11794 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11795 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11796 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11797 * features/i386/amd64-avx-linux.c: Regenerated.
11798 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11799 * features/i386/amd64-avx-mpx.c: Regenerated.
11800 * features/i386/amd64-avx512-linux.c: Regenerated.
11801 * features/i386/amd64-linux.c: Regenerated.
11802 * features/i386/amd64-mpx-linux.c: Regenerated.
11803 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11804 * features/i386/i386-avx-mpx.c: Regenerated.
11805 * features/i386/x32-avx-linux.c: Regenerated.
11806 * features/i386/x32-avx512-linux.c: Regenerated.
11807 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11808 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11809 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11810 * regformats/i386/amd64-linux.dat: Regenerated.
11811 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11812 * regformats/i386/x32-avx-linux.dat: Regenerated.
11813 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11814 * regformats/i386/x32-linux.dat: Regenerated.
11815
8884e97e
WT
118162017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11817
11818 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11819 Set to AMD64_NUM_REGS.
11820
7005d26a
WT
118212017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11822
11823 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11824 that checks validity of a register number.
11825
4bd2e1b2
KC
118262017-01-27 Kees Cook <keescook@google.com>
11827
11828 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11829 fetch_fpregs if target has fpa registers.
11830 (arm_linux_store_inferior_registers): Call store_fpregs if target
11831 has fpa registers.
11832
7cf1de6c
AA
118332017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11834
11835 * cris-tdep.c (cris_gdbarch_init): Remove check for
11836 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11837
874a1c8c
AT
118382017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11839
11840 * corelow.c (get_core_register_section): Check for regset
11841 existence before checking for REGSET_VARIABLE_SIZE.
11842
d8b49cf0
YQ
118432017-01-26 Yao Qi <yao.qi@linaro.org>
11844 Pedro Alves <palves@redhat.com>
11845
11846 PR gdb/20939
11847 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11848 call memory_error, save memaddr instead.
11849 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11850 negative, cal memory_error.
11851 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11852
658ca58c
YQ
118532017-01-26 Yao Qi <yao.qi@linaro.org>
11854
11855 * disasm-selftests.c (memory_error_test): New function.
11856 (_initialize_disasm_selftests): Register memory_error_test.
11857
79843d45
YQ
118582017-01-26 Yao Qi <yao.qi@linaro.org>
11859
11860 * Makefile.in (SFILES): Add disasm-selftests.c and
11861 selftest-arch.c.
11862 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11863 * disasm-selftests.c: New file.
11864 * selftest-arch.c: New file.
11865 * selftest-arch.h: New file.
11866
8cafda32
YQ
118672017-01-26 Yao Qi <yao.qi@linaro.org>
11868
11869 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11870 to bfd_arch_mep. Don't return 0 if section is not
11871 found. Call print_insn_mep.
11872
e47ad6c0
YQ
118732017-01-26 Pedro Alves <palves@redhat.com>
11874 Yao Qi <yao.qi@linaro.org>
11875
11876 * arm-tdep.c: Include "disasm.h".
11877 (gdb_print_insn_arm): Update code to get gdbarch.
11878 * disasm.c (dis_asm_read_memory): Change it to
11879 gdb_disassembler::dis_asm_read_memory.
11880 (dis_asm_memory_error): Likewise.
11881 (dis_asm_print_address): Likewise.
11882 (gdb_pretty_print_insn): Change it to
11883 gdb_disassembler::pretty_print_insn.
11884 (dump_insns): Add one argument gdb_disassemlber. All
11885 callers updated.
11886 (do_mixed_source_and_assembly_deprecated): Likewise.
11887 (do_mixed_source_and_assembly): Likewise.
11888 (do_assembly_only): Likewise.
11889 (gdb_disassembler::gdb_disassembler): New.
11890 (gdb_disassembler::print_insn): New.
11891 * disasm.h (class gdb_disassembler): New.
11892 (gdb_pretty_print_insn): Remove declaration.
11893 (gdb_disassemble_info): Likewise.
11894 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11895 (gdbscm_disasm_read_memory_worker): Update.
11896 (gdbscm_disasm_read_memory): Update.
11897 (gdbscm_disasm_memory_error): Remove.
11898 (gdbscm_disasm_print_address): Remove.
11899 (gdbscm_disassembler::gdbscm_disassembler): New.
11900 (gdbscm_print_insn_from_port): Update.
11901 * mips-tdep.c: Include disasm.h.
11902 (gdb_print_insn_mips): Update code to get gdbarch.
11903 * record-btrace.c (btrace_insn_history): Update.
11904 * spu-tdep.c: Include disasm.h.
11905 (struct spu_dis_asm_data): Remove.
11906 (struct spu_dis_asm_info): New.
11907 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11908 SPU id.
11909 (gdb_print_insn_spu): Cast disassemble_info to
11910 spu_dis_asm_info.
11911
80d75874
YQ
119122017-01-26 Yao Qi <yao.qi@linaro.org>
11913
11914 * disasm.c (do_ui_file_delete): Delete.
11915 (gdb_insn_length): Move code creating stream to ...
11916 * utils.c (null_stream): ... here. New function.
11917 * utils.h (null_stream): Declare.
11918
60685cd0
SM
119192017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11920
11921 * python/py-inferior.c (find_thread_object): Return directly
11922 from the loop. Remove "found" variable.
11923
eb1cdb62
JB
119242017-01-21 Joel Brobecker <brobecker@adacore.com>
11925
11926 GDB 7.12.1 released.
11927
b1ce6568
SM
119282017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11929
11930 * python/py-function.c (fnpy_call): Reorder declarations to have
11931 the gdbpy_enter object declared first.
11932 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11933
6f8b0407
SM
119342017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11935
fec93fb1 11936 PR python/21068
6f8b0407
SM
11937 * python/python-internal.h (PyMem_RawMalloc): Define for
11938 Python < 3.4.
11939 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11940 PyMem_RawMalloc instead of PyMem_Malloc.
11941
78cbbba8
LM
119422017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11943 Luis Machado <lgustavo@codesourcery.com>
11944
11945 * NEWS (New commands): Mention flash-erase.
11946 (New MI commands): Mention target-flash-erase.
11947 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11948 command.
11949 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11950 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11951 * target.c (flash_erase_command): New function.
11952 (initialize_targets): Add new flash-erase command.
11953 * target.h (flash_erase_command): New declaration.
11954
2132fe85
JB
119552017-01-20 Joel Brobecker <brobecker@adacore.com>
11956
11957 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11958 HAVE_SYS_PROCFS_H is defined.
11959
d1dff226
AH
119602017-01-18 Alan Hayward <alan.hayward@arm.com>
11961
11962 * remote.c (struct cached_reg): Change data into a pointer.
11963 * (stop_reply_dtr): Free data pointers before deleting vector.
11964 (process_stop_reply): Likewise.
11965 (remote_parse_stop_reply): Allocate space for data
11966
9890e433
AH
119672017-01-18 Alan Hayward <alan.hayward@arm.com>
11968
11969 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11970 MAX_REGISTER_SIZE.
11971 (amd64_pseudo_register_read_value): Likewise.
11972 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11973 (store_register_using_P): Likewise.
11974 * regcache.c (regcache_xfer_part): Likewise.
11975
7a36499a
IR
119762017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11977
11978 Split real and pseudo registers.
11979 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11980 (sparc32_pseudo_regnum): New enum.
11981 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11982 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11983 (SPARC32_CP0_REGISTERS): New macro.
11984 (sparc32_pseudo_register_name): New function.
11985 (sparc32_register_name): Use sparc32_pseudo_register_name.
11986 (sparc32_pseudo_register_type): New function.
11987 (sparc32_register_type): Use sparc32_pseudo_register_type.
11988 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11989 pseudo register numbers.
11990 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11991 (SPARC64_CP0_REGISTERS): New macro.
11992 (sparc64_pseudo_register_name): New function.
11993 (sparc64_register_name): Use sparc64_pseudo_register_name.
11994 (sparc64_pseudo_register_type): New function.
11995 (sparc64_register_type): Use sparc64_pseudo_register_type.
11996 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11997 pseudo register numbers.
11998 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11999 sparc64_store_arguments): Handle pseudo register numbers.
12000
6f8976bf
YQ
120012017-01-13 Yao Qi <yao.qi@linaro.org>
12002
12003 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12004 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12005 output.
12006 (getpkt_or_notif_sane_1): Likewise.
12007
e4241ace
YQ
120082017-01-13 Yao Qi <yao.qi@linaro.org>
12009
12010 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12011 of CC. Pass "-x c++-header" instead of "-x c".
12012
3015c064
SM
120132017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12014
12015 * remote.c (remote_can_async_p): Update comment.
12016
fde1b17d
SM
120172017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12018
12019 * linux-nat.c (linux_nat_can_async_p): Update comment.
12020
ca1ca08b
SM
120212017-01-12 Simon Marchi <simon.marchi@ericsson.com>
12022
12023 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12024
4ad2da73
SM
120252017-01-11 Simon Marchi <simon.marchi@ericsson.com>
12026
12027 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12028
c8b23b3f
TT
120292017-01-10 Tom Tromey <tom@tromey.com>
12030
12031 * python/py-type.c (typy_legacy_template_argument): Update.
12032 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12033 ~demangle_parse_info): Declare new members.
12034 (cp_demangled_name_to_comp): Return unique_ptr.
12035 (cp_demangled_name_parse_free)
12036 (make_cleanup_cp_demangled_name_parse_free)
12037 (cp_new_demangle_parse_info): Remove.
12038 * cp-support.c (do_demangled_name_parse_free_cleanup)
12039 (make_cleanup_cp_demangled_name_parse_free): Remove.
12040 (inspect_type, cp_canonicalize_string_full)
12041 (cp_canonicalize_string): Update.
12042 (mangled_name_to_comp): Change return type.
12043 (cp_class_name_from_physname, method_name_from_physname)
12044 (cp_func_name, cp_remove_params): Update.
12045 * cp-name-parser.y (demangle_parse_info): New constructor, from
12046 cp_new_demangle_parse_info.
12047 (~demangle_parse_info): New destructor, from
12048 cp_demangled_name_parse_free.
12049 (cp_merge_demangle_parse_infos): Update.
12050 (cp_demangled_name_to_comp): Change return type.
12051
1ac32117
TT
120522017-01-10 Tom Tromey <tom@tromey.com>
12053
12054 * top.c (prevent_dont_repeat): Change return type.
12055 * python/python.c (execute_gdb_command): Use std::string.
12056 Update.
12057 * guile/guile.c (gdbscm_execute_gdb_command): Update.
12058 * command.h (prevent_dont_repeat): Change return type.
12059 * breakpoint.c (bpstat_do_actions_1): Update.
12060
0cf08227
TT
120612017-01-10 Tom Tromey <tom@tromey.com>
12062
12063 * value.h (scoped_value_mark::~scoped_value_mark): Call
12064 free_to_mark.
12065 (scoped_value_mark::free_to_mark): New method.
12066 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12067 scoped_value_mark.
12068
eb115069
TT
120692017-01-10 Tom Tromey <tom@tromey.com>
12070
12071 * python/py-value.c (valpy_dereference, valpy_referenced_value)
12072 (valpy_reference_value, valpy_const_value, valpy_get_address)
12073 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12074 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12075 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12076 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12077 scoped_value_mark.
12078 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12079 * value.h (scoped_value_mark): New class.
12080
906768f9
TT
120812017-01-10 Tom Tromey <tom@tromey.com>
12082
12083 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12084 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12085 * psymtab.c (discard_psymtabs_upto): Remove.
12086 (make_cleanup_discard_psymtabs): Remove.
12087 (struct psymtab_state): Remove.
12088
bef155c3
TT
120892017-01-10 Tom Tromey <tom@tromey.com>
12090
12091 * record-full.c (record_full_save_cleanups): Remove.
12092 (record_full_save): Use gdb::unlinker.
12093 * gcore.c (do_bfd_delete_cleanup): Remove.
12094 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
12095 cleanups.
12096 * dwarf2read.c (unlink_if_set): Remove.
12097 (write_psymtabs_to_index): Use gdb::unlinker.
12098 * common/gdb_unlinker.h: New file.
12099
192b62ce
TT
121002017-01-10 Tom Tromey <tom@tromey.com>
12101
12102 * windows-tdep.c (windows_xfer_shared_library): Update.
12103 * windows-nat.c (windows_make_so): Update.
12104 * utils.h (make_cleanup_bfd_unref): Remove.
12105 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12106 * symfile.h (symfile_bfd_open)
12107 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12108 * symfile.c (read_symbols, symbol_file_add)
12109 (separate_debug_file_exists): Update.
12110 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12111 (generic_load, reread_symbols): Update.
12112 * symfile-mem.c (symbol_file_add_from_memory): Update.
12113 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12114 (spu_symbol_file_add_from_memory): Update.
12115 * solist.h (struct target_so_ops) <bfd_open>: Return
12116 gdb_bfd_ref_ptr.
12117 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12118 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12119 gdb_bfd_ref_ptr.
12120 (solib_map_sections, reload_shared_libraries_1): Update.
12121 * solib-svr4.c (enable_break): Update.
12122 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12123 * solib-frv.c (enable_break2): Update.
12124 * solib-dsbt.c (enable_break): Update.
12125 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12126 gdb_bfd_ref_ptr.
12127 (darwin_solib_get_all_image_info_addr_at_init): Update.
12128 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12129 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12130 * record-full.c (record_full_save): Update.
12131 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12132 * procfs.c (insert_dbx_link_bpt_in_file): Update.
12133 * minidebug.c (find_separate_debug_file_in_section): Return
12134 gdb_bfd_ref_ptr.
12135 * machoread.c (macho_add_oso_symfile): Change abfd to
12136 gdb_bfd_ref_ptr.
12137 (macho_symfile_read_all_oso): Update.
12138 (macho_check_dsym): Return gdb_bfd_ref_ptr.
12139 (macho_symfile_read): Update.
12140 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12141 (jit_bfd_try_read_symtab): Update.
12142 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12143 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12144 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12145 gdb_bfd_ref_ptr.
12146 (gdb_bfd_ref_policy): New struct.
12147 (gdb_bfd_ref_ptr): New typedef.
12148 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12149 (gdb_bfd_openw, gdb_bfd_openr_iovec)
12150 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12151 gdb_bfd_ref_ptr.
12152 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12153 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12154 (gcore_command): Update.
12155 * exec.c (exec_file_attach): Update.
12156 * elfread.c (elf_symfile_read): Update.
12157 * dwarf2read.c (dwarf2_get_dwz_file): Update.
12158 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12159 (open_and_init_dwo_file): Update.
12160 (open_dwp_file): Return gdb_bfd_ref_ptr.
12161 (open_and_init_dwp_file): Update.
12162 * corelow.c (core_open): Update.
12163 * compile/compile-object-load.c (compile_object_load): Update.
12164 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12165 * coffread.c (coff_symfile_read): Update.
12166 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12167 gdb_bfd_ref_ptr. Rename.
12168 (dump_bfd_file, restore_command): Update.
12169 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12170 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12171 (find_separate_debug_file_by_buildid): Update.
12172
50315b21
TT
121732017-01-10 Tom Tromey <tom@tromey.com>
12174
12175 * common/gdb_ref_ptr.h: New file.
12176 * python/py-ref.h (struct gdbpy_ref_policy): New.
12177 (gdbpy_ref): Now a typedef.
12178
fc4007c9
TT
121792017-01-10 Tom Tromey <tom@tromey.com>
12180
12181 * utils.h (make_cleanup_htab_delete): Don't declare.
12182 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12183 Remove.
12184 * linespec.c (decode_compound_collector): Add constructor,
12185 destructor.
12186 (lookup_prefix_sym): Remove cleanup.
12187 (symtab_collector): Add constructor, destructor.
12188 (collect_symtabs_from_filename): Remove cleanup.
12189 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12190 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12191 Use htab_up.
12192 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12193 * dwarf2read.c (dw2_expand_symtabs_matching)
12194 (dw2_map_symbol_filenames, dwarf_decode_macros)
12195 (write_psymtabs_to_index): Use htab_up.
12196 * dwarf2loc.c (func_verify_no_selftailcall)
12197 (call_site_find_chain_1, func_verify_no_selftailcall)
12198 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12199 std::vector, gdb::unique_xmalloc_ptr.
12200 (call_sitep): Remove typedef.
12201 (dwarf2_locexpr_baton_eval): Remove unused variable.
12202
8dbcee67
TT
122032017-01-10 Tom Tromey <tom@tromey.com>
12204
12205 * python/python-internal.h (make_cleanup_py_decref)
12206 (make_cleanup_py_xdecref): Don't declare.
12207 * python/py-utils.c (py_decref, make_cleanup_py_decref)
12208 (py_xdecref, make_cleanup_py_xdecref): Remove.
12209
13df46cc
TT
122102017-01-10 Tom Tromey <tom@tromey.com>
12211
12212 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12213 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12214
06fc9bf7
TT
122152017-01-10 Tom Tromey <tom@tromey.com>
12216
12217 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12218
830a4934
TT
122192017-01-10 Tom Tromey <tom@tromey.com>
12220
12221 * python/py-utils.c (unicode_to_encoded_string)
12222 (python_string_to_target_string)
12223 (python_string_to_target_python_string)
12224 (python_string_to_host_string, gdbpy_obj_to_string)
12225 (get_addr_from_python): Use gdbpy_ref.
12226
4586d543
TT
122272017-01-10 Tom Tromey <tom@tromey.com>
12228
12229 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12230 gdbpy_ref.
12231
59876f8f
TT
122322017-01-10 Tom Tromey <tom@tromey.com>
12233
12234 * python/python.c (eval_python_command, gdbpy_decode_line)
12235 (gdbpy_run_events, gdbpy_start_type_printers)
12236 (gdbpy_apply_type_printers): Use gdbpy_ref.
12237
97d83487
TT
122382017-01-10 Tom Tromey <tom@tromey.com>
12239
12240 * python/py-param.c (get_doc_string, compute_enum_values): Use
12241 gdbpy_ref.
12242
9205649a
TT
122432017-01-10 Tom Tromey <tom@tromey.com>
12244
12245 * python/py-inferior.c (find_thread_object, build_inferior_list):
12246 Use gdbpy_ref.
12247
74c49d45
TT
122482017-01-10 Tom Tromey <tom@tromey.com>
12249
12250 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12251
16361ffb
TT
122522017-01-10 Tom Tromey <tom@tromey.com>
12253
12254 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12255 gdbpy_ref.
12256
905f2cca
TT
122572017-01-10 Tom Tromey <tom@tromey.com>
12258
12259 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
12260 extra incref.
12261 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12262 Use gdbpy_ref.
12263
64081434
TT
122642017-01-10 Tom Tromey <tom@tromey.com>
12265
12266 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12267 gdbpy_ref.
12268
59e9e831
TT
122692017-01-10 Tom Tromey <tom@tromey.com>
12270
12271 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
12272 decref results of PyArg_ParseTupleAndKeywords.
12273
9de10f6d
TT
122742017-01-10 Tom Tromey <tom@tromey.com>
12275
12276 * python/python.c (python_run_simple_file): Use
12277 unique_xmalloc_ptr, gdbpy_ref.
12278
2bd5759d
TT
122792017-01-10 Tom Tromey <tom@tromey.com>
12280
12281 * python/py-prettyprint.c (print_stack_unless_memory_error)
12282 (print_string_repr, print_children): Use gdbpy_ref.
12283 (dummy_python_frame): New class.
12284 (dummy_python_frame::dummy_python_frame): Rename from
12285 push_dummy_python_frame.
12286 (py_restore_tstate): Remove.
12287
3b4e0e01
TT
122882017-01-10 Tom Tromey <tom@tromey.com>
12289
12290 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12291
17a22718
TT
122922017-01-10 Tom Tromey <tom@tromey.com>
12293
12294 * python/python.c (ensure_python_env, restore_python_env):
12295 Remove.
12296 * python/python-internal.h (ensure_python_env): Don't declare.
12297 * varobj.h (varobj_ensure_python_env): Don't declare.
12298 * varobj.c (varobj_ensure_python_env): Remove.
12299
68cdc557
TT
123002017-01-10 Tom Tromey <tom@tromey.com>
12301
12302 * varobj.c (varobj_value_get_print_value): Use
12303 gdbpy_enter_varobj.
12304
1eba6383
TT
123052017-01-10 Tom Tromey <tom@tromey.com>
12306
12307 * python/py-prettyprint.c (print_string_repr, print_children):
12308 Update.
12309 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12310 of "encoding".
12311 * varobj.c (varobj_value_get_print_value): Update.
12312 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12313
bde7b3e3
TT
123142017-01-10 Tom Tromey <tom@tromey.com>
12315
12316 * varobj.c (varobj_get_display_hint)
12317 (dynamic_varobj_has_child_method, install_new_value_visualizer)
12318 (varobj_set_visualizer, free_variable): Use
12319 gdbpy_enter_varobj.
12320
a7785f8c
TT
123212017-01-10 Tom Tromey <tom@tromey.com>
12322
12323 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12324 (do_finish_initialization): New function. Use gdbpy_ref.
12325 (gdbpy_finish_initialization): Use gdbpy_enter. Call
12326 do_finish_initialization.
12327
2865bfce
TT
123282017-01-10 Tom Tromey <tom@tromey.com>
12329
12330 * python/py-param.c (get_set_value, get_show_value): Use
12331 gdbpy_enter, gdbpy_ref.
12332
0e9dcc75
TT
123332017-01-10 Tom Tromey <tom@tromey.com>
12334
12335 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12336
12a5cedd
TT
123372017-01-10 Tom Tromey <tom@tromey.com>
12338
12339 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12340
788f2586
TT
123412017-01-10 Tom Tromey <tom@tromey.com>
12342
12343 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12344 Use gdbpy_enter_varobj.
12345
6cd67bea
TT
123462017-01-10 Tom Tromey <tom@tromey.com>
12347
12348 * varobj.c (gdbpy_enter_varobj): New constructor.
12349 * python/python-internal.h (gdbpy_enter_varobj): New class.
12350 * python/py-varobj.c (py_varobj_get_iterator): Use
12351 gdbpy_enter_varobj.
12352
14b122bf
TT
123532017-01-10 Tom Tromey <tom@tromey.com>
12354
12355 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12356 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12357 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12358 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12359 unique_xmalloc_ptr.
12360 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12361
bf1ca3b9
TT
123622017-01-10 Tom Tromey <tom@tromey.com>
12363
12364 * python/py-xmethods.c (invoke_match_method): Use
12365 gdbpy_ref.
12366
572a5524
TT
123672017-01-10 Tom Tromey <tom@tromey.com>
12368
12369 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12370 gdbpy_enter, gdbpy_ref.
12371
396a78b6
TT
123722017-01-10 Tom Tromey <tom@tromey.com>
12373
12374 * python/python.c (python_interactive_command): Use gdbpy_enter.
12375
a88b13c7
TT
123762017-01-10 Tom Tromey <tom@tromey.com>
12377
12378 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12379 gdbpy_ref.
12380
e9f0c363
TT
123812017-01-10 Tom Tromey <tom@tromey.com>
12382
12383 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12384 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12385
6349f452
TT
123862017-01-10 Tom Tromey <tom@tromey.com>
12387
12388 * utils.h (htab_deleter): New struct.
12389 (htab_up): New typedef.
12390 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12391 gdbpy_enter, gdbpy_ref, htab_up.
12392
c0171de6
TT
123932017-01-10 Tom Tromey <tom@tromey.com>
12394
12395 * python/py-unwind.c (pending_frame_invalidate): Remove.
12396 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12397
f18e226f
TT
123982017-01-10 Tom Tromey <tom@tromey.com>
12399
12400 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12401 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12402
c57af3f1
TT
124032017-01-10 Tom Tromey <tom@tromey.com>
12404
12405 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12406
60e600ec
TT
124072017-01-10 Tom Tromey <tom@tromey.com>
12408
12409 * python/python.c (gdbpy_eval_from_control_command)
12410 (gdbpy_source_script, gdbpy_run_events)
12411 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12412 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12413 gdbpy_enter.
12414
bf7da5b0
TT
124152017-01-10 Tom Tromey <tom@tromey.com>
12416
12417 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12418
2d38bced
TT
124192017-01-10 Tom Tromey <tom@tromey.com>
12420
12421 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12422
07bc7329
TT
124232017-01-10 Tom Tromey <tom@tromey.com>
12424
12425 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12426 (python_on_inferior_call_pre, python_on_inferior_call_post)
12427 (python_on_memory_change, python_on_register_change)
12428 (python_inferior_exit, python_new_objfile, add_thread_object)
12429 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12430
6e7c365e
TT
124312017-01-10 Tom Tromey <tom@tromey.com>
12432
12433 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12434 (bpfinishpy_handle_exit): Use gdbpy_enter.
12435
6ba0cd40
TT
124362017-01-10 Tom Tromey <tom@tromey.com>
12437
12438 * python/py-cmd.c (cmdpy_destroyer)
12439 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12440 gdbpy_enter.
12441
de2dc875
TT
124422017-01-10 Tom Tromey <tom@tromey.com>
12443
12444 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12445 gdbpy_enter.
12446 (gdbpy_breakpoint_has_cond): Likewise.
12447
4ecee2c4
TT
124482017-01-10 Tom Tromey <tom@tromey.com>
12449
12450 * python/python.c (gdbpy_enter): New constructor.
12451 (~gdbpy_enter): New destructor.
12452 (restore_python_env, ensure_python_env): Rewrite.
12453 * python/python-internal.h (gdbpy_enter): New class.
12454
37fce74f
TT
124552017-01-10 Tom Tromey <tom@tromey.com>
12456
12457 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12458
53a0cca3
TT
124592017-01-10 Tom Tromey <tom@tromey.com>
12460
12461 * python/py-value.c (value_has_field, get_field_flag)
12462 (get_field_type, valpy_getitem, convert_value_from_python): Use
12463 gdbpy_ref.
12464
ff3724f5
TT
124652017-01-10 Tom Tromey <tom@tromey.com>
12466
12467 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12468 gdbpy_ref.
12469
0700aea5
TT
124702017-01-10 Tom Tromey <tom@tromey.com>
12471
12472 * python/py-prettyprint.c (search_pp_list)
12473 (find_pretty_printer_from_objfiles)
12474 (find_pretty_printer_from_progspace)
12475 (find_pretty_printer_from_gdb, find_pretty_printer)
12476 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12477 gdbpy_ref.
12478
1bb44c9f
TT
124792017-01-10 Tom Tromey <tom@tromey.com>
12480
12481 * python/py-param.c (call_doc_function): Use gdbpy_ref.
12482
87ce03fd
TT
124832017-01-10 Tom Tromey <tom@tromey.com>
12484
12485 * python/py-linetable.c (build_line_table_tuple_from_pcs)
12486 (ltpy_get_all_source_lines): Use gdbpy_ref.
12487
ee0a3fb8
TT
124882017-01-10 Tom Tromey <tom@tromey.com>
12489
12490 * python/py-framefilter.c (extract_sym, extract_value)
12491 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12492 gdbpy_ref.
12493
bf2a52fa
TT
124942017-01-10 Tom Tromey <tom@tromey.com>
12495
12496 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12497
f59fe7f8
TT
124982017-01-10 Tom Tromey <tom@tromey.com>
12499
12500 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12501
80bd970a
TT
125022017-01-10 Tom Tromey <tom@tromey.com>
12503
12504 * python/py-function.c (convert_values_to_python, fnpy_init): Use
12505 gdbpy_ref.
12506
d1b3de2e
TT
125072017-01-10 Tom Tromey <tom@tromey.com>
12508
12509 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12510
3bb43384
TT
125112017-01-10 Tom Tromey <tom@tromey.com>
12512
12513 * python/py-type.c (convert_field, make_fielditem, typy_fields)
12514 (typy_range): Use gdbpy_ref.
12515
abf5651e
TT
125162017-01-10 Tom Tromey <tom@tromey.com>
12517
12518 * python/py-threadevent.c (create_thread_event_object): Use
12519 gdbpy_ref.
12520 * python/py-stopevent.c (create_stop_event_object): Simplify.
12521 (emit_stop_event): Use gdbpy_ref.
12522 * python/py-signalevent.c (create_signal_event_object): Use
12523 gdbpy_ref.
12524 * python/py-newobjfileevent.c (create_new_objfile_event_object)
12525 (emit_new_objfile_event, create_clear_objfiles_event_object)
12526 (emit_clear_objfiles_event): Use gdbpy_ref.
12527 * python/py-infevents.c (create_inferior_call_event_object)
12528 (create_register_changed_event_object)
12529 (create_memory_changed_event_object, emit_inferior_call_event)
12530 (emit_memory_changed_event, emit_register_changed_event): Use
12531 gdbpy_ref.
12532 * python/py-exitedevent.c (create_exited_event_object)
12533 (emit_exited_event): Use gdbpy_ref.
12534 * python/py-event.h (evpy_emit_event): Remove
12535 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12536 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12537 * python/py-continueevent.c (emit_continue_event): Use
12538 gdbpy_ref.
12539 * python/py-breakpoint.c (gdbpy_breakpoint_created)
12540 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12541 gdbpy_ref.
12542 * python/py-bpevent.c (create_breakpoint_event_object): Use
12543 gdbpy_ref.
12544
a68ff33e
TT
125452017-01-10 Tom Tromey <tom@tromey.com>
12546
12547 * python/py-ref.h: New file.
12548
7becfd03
SM
125492017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12550
12551 * cli-out.c (cli_ui_out::do_redirect): Change return type to
12552 void.
12553 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12554 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12555 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12556 * ui-out.c (ui_out::redirect): Likewise.
12557 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12558 * cli/cli-logging.c (set_logging_redirect): Update call site of
12559 ui_out::redirect.
12560 (handle_redirections): Likewise.
12561 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12562 * top.c (execute_command_to_string): Likewise.
12563 * utils.c (do_ui_out_redirect_pop): Likewise.
12564
df294654
SM
125652017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12566
12567 * stack.c (_initialize_stack): Update "frame" command help message.
12568
f5e6296e
IB
125692017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12570
12571 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12572
0e2d6fa6
YQ
125732017-01-06 Yao Qi <yao.qi@linaro.org>
12574
12575 * x86-linux-nat.h: Include gdb_proc_service.h.
12576
44d6d3f9
YQ
125772017-01-06 Yao Qi <yao.qi@linaro.org>
12578
12579 * ser-base.h: Include serial.h.
12580
656731fe
YQ
125812017-01-06 Yao Qi <yao.qi@linaro.org>
12582
12583 * ppc-linux-tdep.h: Include ppc-tdep.h.
12584
1ca8f924
YQ
125852017-01-06 Yao Qi <yao.qi@linaro.org>
12586
12587 * nat/amd64-linux-siginfo.h: Include signal.h.
12588
bc3008c4
YQ
125892017-01-06 Yao Qi <yao.qi@linaro.org>
12590
12591 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12592
66c80d03
YQ
125932017-01-06 Yao Qi <yao.qi@linaro.org>
12594
12595 * mi/mi-parse.h: Include mi-cmds.h.
12596
051d2dda
YQ
125972017-01-06 Yao Qi <yao.qi@linaro.org>
12598
12599 * inf-loop.c: Don't include "target.h".
12600 * inf-loop.h: Include it here.
12601
8018d34f
YQ
126022017-01-06 Yao Qi <yao.qi@linaro.org>
12603
12604 * dfp.h: Include "dboulest.h" and "expression.h".
12605
c0b8369c
YQ
126062017-01-06 Yao Qi <yao.qi@linaro.org>
12607
12608 * ax-gdb.h: Include "ax.h".
12609
ad5cba2a
YQ
126102017-01-06 Yao Qi <yao.qi@linaro.org>
12611
12612 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12613 with nat/gdb_ptrace.h.
12614
1c33cd7f
YQ
126152017-01-05 Yao Qi <yao.qi@linaro.org>
12616
12617 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12618 new line.
12619 (mips64_fbsd_sigframe_init): Likewise.
12620
c988ac1d
JB
126212017-01-04 John Baldwin <jhb@FreeBSD.org>
12622
12623 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12624 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12625
b268007c
JB
126262017-01-04 John Baldwin <jhb@FreeBSD.org>
12627
12628 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12629 * NEWS: Mention new FreeBSD/mips native configuration.
12630 * config/mips/fbsd.mh: New file.
12631 * configure.host: Add mips*-*-freebsd*.
12632 * mips-fbsd-nat.c: New file.
12633
387360da
JB
126342017-01-04 John Baldwin <jhb@FreeBSD.org>
12635
12636 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12637 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12638 * NEWS: Mention new FreeBSD/mips target.
12639 * configure.tgt: Add mips*-*-freebsd*.
12640 * mips-fbsd-tdep.c: New file.
12641 * mips-fbsd-tdep.h: New file.
12642
2aaaf250
YQ
126432017-01-04 Yao Qi <yao.qi@linaro.org>
12644
12645 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12646 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12647
61baf725
JB
126482017-01-01 Joel Brobecker <brobecker@adacore.com>
12649
6dbb839a 12650 Update copyright year range in all GDB files.
61baf725 12651
c113e7ff 126522017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 12653
c113e7ff 12654 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 12655
c113e7ff 12656For older changes see ChangeLog-2016.
c906108c
SS
12657\f
12658Local Variables:
12659mode: change-log
12660left-margin: 8
12661fill-column: 74
12662version-control: never
57da7796 12663coding: utf-8
c906108c 12664End:
This page took 2.611192 seconds and 4 git commands to generate.