struct symtabs_and_lines -> std::vector<symtab_and_line>
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
6c5b2ebe
PA
12017-09-04 Pedro Alves <palves@redhat.com>
2
3 * ax-gdb.c (agent_command_1): Use range-for.
4 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5 * breakpoint.c: Include "common/array-view.h".
6 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7 parameter from struct symtabs_and_lines to
8 array_view<symtab_and_line>. Adjust. Use range-for. Update.
9 (breakpoint_sals_to_pc): Change sals parameter from struct
10 symtabs_and_lines to std::vector reference.
11 (check_fast_tracepoint_sals): Change sals parameter from struct
12 symtabs_and_lines to std::array_view. Use range-for.
13 (decode_static_tracepoint_spec): Return a std::vector instead of
14 symtabs_and_lines. Update.
15 (create_breakpoint): Update.
16 (break_range_command, until_break_command, clear_command): Update.
17 (base_breakpoint_decode_location, bkpt_decode_location)
18 (bkpt_probe_create_sals_from_location)
19 (bkpt_probe_decode_location, tracepoint_decode_location)
20 (tracepoint_probe_decode_location)
21 (strace_marker_create_sals_from_location): Return a std::vector
22 instead of symtabs_and_lines.
23 (strace_marker_create_breakpoints_sal): Update.
24 (strace_marker_decode_location): Return a std::vector instead of
25 symtabs_and_lines. Update.
26 (update_breakpoint_locations): Change struct symtabs_and_lines
27 parameters to gdb::array_view. Adjust.
28 (location_to_sals): Return a std::vector instead of
29 symtabs_and_lines. Update.
30 (breakpoint_re_set_default): Use std::vector instead of struct
31 symtabs_and_lines.
32 (decode_location_default): Return a std::vector instead of
33 symtabs_and_lines. Update.
34 * breakpoint.h: Include "common/array-view.h".
35 (struct breakpoint_ops) <decode_location>: Now returns a
36 std::vector instead of returning a symtabs_and_lines via output
37 parameter.
38 (update_breakpoint_locations): Change sals parameters to use
39 gdb::array_view.
40 * cli/cli-cmds.c (edit_command, list_command): Update to use
41 std::vector and gdb::array_view.
42 (ambiguous_line_spec): Adjust to use gdb::array_view and
43 range-for.
44 (compare_symtabs): Rename to ...
45 (cmp_symtabs): ... this. Change parameters to symtab_and_line
46 const reference and adjust.
47 (filter_sals): Rewrite using std::vector and standard algorithms.
48 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
49 (jump_command): Update to use std::vector.
50 * linespec.c (struct linespec_state) <canonical_names>: Update
51 comment.
52 (add_sal_to_sals_basic): Delete.
53 (add_sal_to_sals, filter_results, convert_results_to_lsals)
54 (decode_line_2, create_sals_line_offset)
55 (convert_address_location_to_sals, convert_linespec_to_sals)
56 (convert_explicit_location_to_sals, parse_linespec)
57 (event_location_to_sals, decode_line_full, decode_line_1)
58 (decode_line_with_current_source)
59 (decode_line_with_last_displayed, decode_objc)
60 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
61 (linespec_result::~linespec_result): Adjust to use std::vector
62 instead of symtabs_and_lines.
63 * linespec.h (linespec_sals::sals): Now a std::vector.
64 (struct linespec_result): Use std::vector, bool, and in-class
65 initialization.
66 (decode_line_1, decode_line_with_current_source)
67 (decode_line_with_last_displayed): Return std::vector.
68 * macrocmd.c (info_macros_command): Use std::vector.
69 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
70 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
71 std::vector.
72 * probe.h (parse_probes): Return a std::vector.
73 * python/python.c (gdbpy_decode_line): Use std::vector and
74 gdb::array_view.
75 * source.c (select_source_symtab, line_info): Use std::vector.
76 * stack.c (func_command): Use std::vector.
77 * symtab.h (struct symtabs_and_lines): Delete.
78 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
79
7c44b49c
PA
802017-09-04 Pedro Alves <palves@redhat.com>
81
82 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
83 unittests/array-view-selftests.c.
84 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
85 * common/array-view.h: New file.
86 * unittests/array-view-selftests.c: New file.
87
e439fa14
PA
882017-09-04 Pedro Alves <palves@redhat.com>
89
90 * cli/cli-cmds.c (edit_command): Pass message to
91 ambiguous_line_spec.
92 (list_command): Pass message to ambiguous_line_spec. Say
93 "first"/"last" instead of "start" and "end" to be consistent with
94 the manual.
95 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
96 them to print formatted message.
97
7525b645
PA
982017-09-04 Pedro Alves <palves@redhat.com>
99
100 * btrace.c (ftrace_add_pt): Pass btrace_insn to
101 ftrace_update_insns by reference instead of pointer.
102
badc0020
YQ
1032017-09-04 Yao Qi <yao.qi@linaro.org>
104
105 * i386-go32-tdep.c: Include x86-xstate.h.
106 (i386_go32_init_abi): Call i386_target_description.
107 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
108 if xcr0 is X86_XSTATE_X87_MASK.
109 * i386-tdep.h (tdesc_i386): Remove the declaration.
110 (tdesc_i386_mmx): Likewise.
111
d78bdb54
YQ
1122017-09-04 Yao Qi <yao.qi@linaro.org>
113
114 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
115 X86_XSTATE_SSE_MASK instead of 0.
116
ca1fa5ee
YQ
1172017-09-04 Yao Qi <yao.qi@linaro.org>
118
119 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
120 i386_target_description.
121 * i386-fbsd-nat.c (i386fbsd_read_description): Call
122 i386_target_description.
123 * i386-tdep.c (i386_gdbarch_init): Likewise.
124
2434b019
YQ
1252017-09-04 Yao Qi <yao.qi@linaro.org>
126
127 * amd64-darwin-tdep.c: Include "x86-xstate.h".
128 (x86_darwin_init_abi_64): Call amd64_target_description.
129 * amd64-dicos-tdep.c: Likewise.
130 * amd64-fbsd-nat.c: Likewise.
131 * amd64-fbsd-tdep.c: Likewise.
132 * amd64-nbsd-tdep.c: Likewise.
133 * amd64-obsd-tdep.c: Likewise.
134 * amd64-sol2-tdep.c: Likewise.
135 * amd64-windows-tdep.c: Likewise.
136 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
137
0860c437
SM
1382017-09-04 Simon Marchi <simon.marchi@ericsson.com>
139
140 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
141 (btrace_function) <insn>: Change type to use std::vector.
142 * btrace.c (ftrace_debug, ftrace_call_num_insn,
143 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
144 ftrace_update_insns, ftrace_compute_global_level_offset,
145 btrace_stitch_bts, btrace_clear, btrace_insn_get,
146 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
147 change to std::vector.
148 (ftrace_update_insns): Adjust to change to std::vector, change
149 type of INSN parameter.
150 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
151 * record-btrace.c (btrace_call_history_insn_range,
152 btrace_compute_src_line_range,
153 record_btrace_frame_prev_register): Adjust to change to
154 std::vector.
155 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
156 to change to std::vector.
157
0638b7f9
TT
1582017-09-03 Tom Tromey <tom@tromey.com>
159
160 * corefile.c (reopen_exec_file): Use std::string.
161
8f84fb0e
TT
1622017-09-03 Tom Tromey <tom@tromey.com>
163
164 * compile/compile.c (compile_register_name_mangled): Return
165 std::string.
166 * compile/compile-loc2c.c (pushf_register_address): Update.
167 (pushf_register): Update.
168 * compile/compile-c-types.c (convert_array): Update.
169 * compile/compile-c-symbols.c (generate_vla_size): Update.
170 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
171 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
172 (convert_one_symbol): Update.
173 (generate_c_for_for_one_variable): Update.
174 * compile/compile-c-support.c (c_get_range_decl_name): Return a
175 std::string.
176 (generate_register_struct): Update.
177 * compile/compile-internal.h (c_get_range_decl_name): Return a
178 std::string.
179 (compile_register_name_mangled): Return std::string.
180
18e9961f
TT
1812017-09-03 Tom Tromey <tom@tromey.com>
182
183 * utils.c (perror_string): Return a std::string.
184 (throw_perror_with_name, perror_warning_with_name): Update.
185
45343786
TT
1862017-09-03 Tom Tromey <tom@tromey.com>
187
188 * demangle.c (demangle_command): Use std::string,
189 unique_xmalloc_ptr.
190
b57af503
TT
1912017-09-03 Tom Tromey <tom@tromey.com>
192
193 * cli/cli-setshow.c (do_set_command): Use std::string.
194
6eecf35f
TT
1952017-09-03 Tom Tromey <tom@tromey.com>
196
197 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
198
56496dd4
TT
1992017-09-03 Tom Tromey <tom@tromey.com>
200
201 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
202
e91a1fa7
TT
2032017-09-03 Tom Tromey <tom@tromey.com>
204
205 * mi/mi-cmd-env.c (env_execute_cli_command): Use
206 gdb::unique_xmalloc_ptr.
207
7ffd83d7
TT
2082017-09-03 Tom Tromey <tom@tromey.com>
209
210 * thread.c (print_thread_info_1): Use string_printf.
211 (thread_apply_command, thread_apply_all_command): Use
212 std::string.
213
1ccbe998
TT
2142017-09-03 Tom Tromey <tom@tromey.com>
215
216 * valprint.c (val_print_string): Update.
217 * gdbcore.h (memory_error_message): Return std::string.
218 * corefile.c (memory_error_message): Return std::string.
219 (memory_error): Update.
220 * breakpoint.c (insert_bp_location): Update.
221
23fdd69e
SM
2222017-09-03 Simon Marchi <simon.marchi@ericsson.com>
223
224 * target/waitstatus.h (target_waitstatus_to_string): Change
225 return type to std::string.
226 * target/waitstatus.c (target_waitstatus_to_string): Return
227 std::string.
228 * target.h (target_waitstatus_to_string): Remove declaration.
229 * infrun.c (resume, clear_proceed_status_thread,
230 print_target_wait_results, do_target_wait, save_waitstatus,
231 stop_all_threads): Adjust.
232 * record-btrace.c (record_btrace_wait): Adjust.
233 * target-debug.h
234 (target_debug_print_struct_target_waitstatus_p): Adjust.
235
5c811d30
JK
2362017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
237
238 PR gdb/22046
239 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
240 detection.
241
0a2dde4a
SDJ
2422017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
243
244 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
245 for setting/unsetting environment variables on the remote target.
246 (New remote packets): Add entries for QEnvironmentHexEncoded,
247 QEnvironmentUnset and QEnvironmentReset.
248 * common/environ.c (gdb_environ::operator=): Extend method to
249 handle m_user_set_env_list and m_user_unset_env_list.
250 (gdb_environ::clear): Likewise.
251 (match_var_in_string): Change type of first parameter from 'char
252 *' to 'const char *'.
253 (gdb_environ::set): Extend method to handle
254 m_user_set_env_list and m_user_unset_env_list.
255 (gdb_environ::unset): Likewise.
256 (gdb_environ::clear_user_set_env): New method.
257 (gdb_environ::user_set_envp): Likewise.
258 (gdb_environ::user_unset_envp): Likewise.
259 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
260 m_user_unset_env_list on move constructor/assignment.
261 (unset): Add new default parameter 'update_unset_list = true'.
262 (clear_user_set_env): New method.
263 (user_set_envp): Likewise.
264 (user_unset_envp): Likewise.
265 (m_user_set_env_list): New std::set.
266 (m_user_unset_env_list): Likewise.
267 * common/rsp-low.c (hex2str): New function.
268 (bin2hex): New overload for bin2hex function.
269 * common/rsp-low.c (hex2str): New prototype.
270 (str2hex): New overload prototype.
271 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
272 QEnvironmentUnset and QEnvironmentReset.
273 (remote_protocol_features): Add QEnvironmentHexEncoded,
274 QEnvironmentUnset and QEnvironmentReset packets.
275 (send_environment_packet): New function.
276 (extended_remote_environment_support): Likewise.
277 (extended_remote_create_inferior): Call
278 extended_remote_environment_support.
279 (_initialize_remote): Add QEnvironmentHexEncoded,
280 QEnvironmentUnset and QEnvironmentReset packet configs.
281 * unittests/environ-selftests.c (gdb_selftest_env_var):
282 New variable.
283 (test_vector_initialization): New function.
284 (test_init_from_host_environ): Likewise.
285 (test_reinit_from_host_environ): Likewise.
286 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
287 Likewise.
288 (test_unset_set_empty_vector): Likewise.
289 (test_vector_clear): Likewise.
290 (test_std_move): Likewise.
291 (test_move_constructor):
292 (test_self_move): Likewise.
293 (test_set_unset_reset): Likewise.
294 (run_tests): Rewrite in terms of the functions above.
295
654670a4
WP
2962017-08-31 Weimin Pan <weimin.pan@oracle.com>
297
298 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
299 (adi_available): Use a temp variable of type CORE_ADDR as argument
300 3 when calling target_auxv_search.
301 (adi_normalize_address): Use masks and xor operators to calculate
302 normalized address.
303 (adi_read_versions, adi_write_versions, adi_print_versions)
304 (do_examine, do_assign): Use paddress.
305
7755ddb7
JB
3062017-08-29 John Baldwin <jhb@FreeBSD.org>
307
308 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
309 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
310 out of loop and add supply of FIR.
311 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
312 add collect of FIR.
313
fd437cbc
SM
3142017-08-28 Simon Marchi <simon.marchi@ericsson.com>
315
3804a343 316 PR gdb/21827
fd437cbc
SM
317 * cli/cli-script.c (define_command): Don't convert command name
318 to lower case.
319
988f6b3d
JB
3202017-08-25 Joel Brobecker <brobecker@adacore.com>
321
322 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
323 Update all callers accordingly. Remove all code blocks handling
324 the case where DISPP is not NULL.
325
663c44ac
JK
3262017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
327
328 PR symtab/22003
329 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
330 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
331 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
332
f1902523
JK
3332017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
334
335 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
336 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
337 (read_comp_units_from_section): New parameter abbrev_section, use
338 read_and_check_comp_unit_head, allocate signatured_type if needed.
339 (create_all_comp_units): Update read_comp_units_from_section caller.
340
87215ad1
SDJ
3412017-08-23 Pedro Alves <palves@redhat.com>
342
343 PR remote/21852
344 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
345 to null_ptid and switch to thread without reading the registers
346 after adding the inferior.
347
6e41ddec
JK
3482017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
349
350 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
351 compile-gcc.
352 * compile/compile.c (compile_gcc, show_compile_gcc): New.
353 (compile_to_object): Implement compile_gcc.
354 (_initialize_compile): Install "set compile-gcc". Initialize
355 compile_gcc.
356
e68c32d5
JK
3572017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
358
359 * compile/compile.c (compile_to_object): Conditionally call
360 set_verbose. Conditionally call compile or compile_v0.
361
58afddc6
WP
3622017-08-07 Weimin Pan <weimin.pan@oracle.com>
363
364 * sparc64-tdep.h: (adi_normalize_address): New export.
365 * sparc-nat.h: (open_adi_tag_fd): New export.
366 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
367 * sparc64-linux-tdep.c:
368 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
369 (sparc64_linux_handle_segmentation_fault): New function.
370 (sparc64_linux_init_abi): Register
371 sparc64_linux_handle_segmentation_fault
372 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
373 (sparc64_addr_bits_remove): New function.
374 (sparc64_init_abi): Register sparc64_addr_bits_remove.
375 (MAX_PROC_NAME_SIZE): New macro.
376 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
377 (sparc64adilist): New variable.
378 (adi_proc_list): New variable.
379 (find_adi_info): New function.
380 (add_adi_info): New function.
381 (get_adi_info_proc): New function.
382 (get_adi_info): New function.
383 (info_adi_command): New function.
384 (read_maps_entry): New function.
385 (adi_available): New function.
386 (adi_normalize_address): New function.
387 (adi_align_address): New function.
388 (adi_convert_byte_count): New function.
389 (adi_tag_fd): New function.
390 (adi_is_addr_mapped): New function.
391 (adi_read_versions): New function.
392 (adi_write_versions): New function.
393 (adi_print_versions): New function.
394 (do_examine): New function.
395 (do_assign): New function.
396 (adi_examine_command): New function.
397 (adi_assign_command): New function.
398 (_initialize_sparc64_adi_tdep): New function.
399
11db9430
SM
4002017-08-22 Simon Marchi <simon.marchi@ericsson.com>
401
402 * breakpoint.c (breakpoints_info): Rename to ...
403 (info_breakpoints_command): ... this.
404 (watchpoints_info): Rename to ...
405 (info_watchpoints_command): ... this.
406 (tracepoints_info): Rename to ...
407 (info_tracepoints_command): ... this.
408 (_initialize_breakpoint): Adjust.
409 * dcache.c (dcache_info): Rename to ...
410 (info_display_command): ... this.
411 (_initialize_dcache): Adjust.
412 * frame.h (args_info): Rename to ...
413 (info_args_command): ... this.
414 (locals_info): Rename to ...
415 (info_locals_command): ... this.
416 * infcmd.c (nofp_registers_info): Rename to ...
417 (info_registers_command): ... this.
418 (float_info): Rename to ...
419 (info_float_command): ... this.
420 (program_info): Rename to ...
421 (info_program_command): ... this.
422 (all_registers_info): Rename to ...
423 (info_all_registers_command): ... this.
424 (vector_info): Rename to ...
425 (info_vector_command): ... this.
426 (float_info): Rename to ...
427 (info_float_command): ... this.
428 (_initialize_infcmd): Adjust.
429 * inferior.h (term_info): Rename to ...
430 (info_terminal_command): ... this.
431 * inflow.c (term_info): Rename to ...
432 (info_terminal_command): ... this.
433 (_initialize_inflow): Adjust.
434 * infrun.c (signals_info): Rename to ...
435 (info_signals_command): ... this.
436 (_initialize_infrun): Adjust.
437 * objc-lang.c (classes_info): Rename to ...
438 (info_classes_command): ... this.
439 (selectors_info): Rename to ...
440 (info_selectors_command): ... this.
441 (_initialize_objc_language): Adjust.
442 * printcmd.c (sym_info): Rename to ...
443 (info_symbol_command): ... this.
444 (address_info): Rename to ...
445 (info_address_command): ... this.
446 (display_info): Rename to ...
447 (info_display_command): ... this.
448 (_initialize_printcmd): Adjust.
449 * reverse.c (bookmarks_info): Rename to ...
450 (info_breakpoints_command): ... this.
451 (_initialize_reverse): Adjust.
452 * ser-go32.c (dos_info): Rename to ...
453 (info_serial_command): ... this.
454 (_initialize_ser_dos): Adjust.
455 * skip.c (skip_info): Rename to ...
456 (info_skip_command): ... this.
457 (_initialize_step_skip): Adjust.
458 * source.c (line_info): Rename to ...
459 (info_line_command): ... this.
460 (source_info): Rename to ...
461 (info_source_command)
462 * stack.c (frame_info): Rename to ...
463 (info_frame_command): ... this.
464 (locals_info): Rename to ...
465 (info_locals_command): ... this.
466 (args_info): Rename to ...
467 (info_args_command): ... this.
468 (_initialize_stack): Adjust.
469 * symtab.c (sources_info): Rename to ...
470 (info_sources_command): ... this.
471 (variables_info): Rename to ...
472 (info_variables_command): ... this.
473 (functions_info): Rename to ...
474 (info_functions_command): ... this.
475 (types_info): Rename to ...
476 (info_types_command): ... this.
477 (_initialize_symtab): Adjust.
478 * target.c (target_info): Rename to ...
479 (info_target_command): ... this.
480 (initialize_targets): Adjust.
481 * tracepoint.c (tvariables_info): Rename to ...
482 (info_tvariables_command): ... this.
483 (scope_info): Rename to ...
484 (info_scope_command): ... this.
485 (trace_dump_actions): Adjust.
486 (_initialize_tracepoint): Adjust.
487
b270e6f9
TT
4882017-08-22 Tom Tromey <tom@tromey.com>
489
490 * breakpoint.h (install_breakpoint): Update.
491 * breakpoint.c (add_solib_catchpoint): Update.
492 (install_breakpoint): Change argument to a std::unique_ptr.
493 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
494 (create_breakpoint_sal, create_breakpoint): Update.
495 (watch_command_1, catch_exec_command_1)
496 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
497 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
498 Return the breakpoint.
499 (set_raw_breakpoint_without_location, set_raw_breakpoint)
500 (new_single_step_breakpoint): Update.
501 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
502 std::unique_ptr.
503 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
504 std::unique_ptr.
505 * break-catch-sig.c (create_signal_catchpoint): Use
506 std::unique_ptr.
507 * ada-lang.c (create_ada_exception_catchpoint): Use
508 std::unique_ptr.
509
36bd8eaa
TT
5102017-08-22 Tom Tromey <tom@tromey.com>
511
512 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
513
56f37645
TT
5142017-08-22 Tom Tromey <tom@tromey.com>
515
516 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
517 (lookup_partial_symbol): Update.
518
0b581c69
TT
5192017-08-22 Tom Tromey <tom@tromey.com>
520
521 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
522 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
523 (find_and_open_source, symtab_to_fullname): Update.
524 * psymtab.c (psymtab_to_fullname): Update.
525
14278e1f
TT
5262017-08-22 Tom Tromey <tom@tromey.com>
527
528 * exec.c (exec_file_attach): Update.
529 * linux-thread-db.c (try_thread_db_load): Update.
530 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
531 * utils.c (gdb_realpath): Change return type.
532 (gdb_realpath_keepfile): Update.
533 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
534 (_initialize_utils): Register the new self test.
535 * source.c (openp): Update.
536 (find_and_open_source): Update.
537 * nto-tdep.c (nto_find_and_open_solib): Update.
538 * main.c (set_gdb_data_directory): Update.
539 (captured_main_1): Update.
540 * dwarf2read.c (dwarf2_get_dwz_file): Update
541 (dw2_map_symbol_filenames): Update.
542 * auto-load.c (auto_load_safe_path_vec_update): Update.
543 (filename_is_in_auto_load_safe_path_vec): Change type of
544 "filename_realp".
545 (auto_load_objfile_script): Update.
546 (file_is_auto_load_safe): Update. Use std::string.
547 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
548
4971c9a7
TT
5492017-08-22 Tom Tromey <tom@tromey.com>
550
551 * utils.c (gdb_realpath_keepfile): Return a
552 gdb::unique_xmalloc_ptr.
553 * exec.c (exec_file_attach): Update.
554 * utils.h (gdb_realpath_keepfile): Return a
555 gdb::unique_xmalloc_ptr.
556
e3e41d58
TT
5572017-08-22 Tom Tromey <tom@tromey.com>
558
559 * compile/compile.c (compile_file_command): Use
560 gdb::unique_xmalloc_ptr, std::string.
561 * utils.c (gdb_abspath): Change return type.
562 * source.c (openp): Update.
563 * objfiles.c (allocate_objfile): Update.
564 * main.c (set_gdb_data_directory): Update.
565 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
566
0d999a6e
ZZ
5672017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
568
569 * cli-cmds.c (list_commands): List actual code around more than
570 one location.
571
329d5e7e
JB
5722017-08-21 John Baldwin <jhb@FreeBSD.org>
573
574 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
575
bf223d3e
PA
5762017-08-21 Pedro Alves <palves@redhat.com>
577
578 PR gdb/19487
579 * c-exp.y (variable production): Handle function aliases.
580 * minsyms.c (msymbol_is_text): New function.
581 * minsyms.h (msymbol_is_text): Declare.
582 * symtab.c (find_function_alias_target): New function.
583 * symtab.h (find_function_alias_target): Declare.
584
c973d0aa
PA
5852017-08-21 Pedro Alves <palves@redhat.com>
586
587 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
588 typedefs.
589 * typeprint.c (whatis_exp): If handling "whatis", and expression
590 is OP_TYPE, strip one typedef level. Otherwise don't strip
591 typedefs here.
592 * valops.c (value_cast): Save "to" type before resolving
593 stubs/typedefs. Use that type as resulting value's type.
594
2989a365
TT
5952017-08-18 Tom Tromey <tom@tromey.com>
596 Pedro Alves <palves@redhat.com>
597
598 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
599 * sol-thread.c (sol_thread_resume, sol_thread_wait)
600 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
601 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
602 * proc-service.c (ps_xfer_memory): Use scoped_restore.
603 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
604 (linux_get_siginfo_data): Add "thread" argument. Use
605 scoped_restore.
606 * linux-nat.c (linux_child_follow_fork)
607 (check_stopped_by_watchpoint): Use scoped_restore.
608 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
609 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
610 (restore_inferior_ptid, save_inferior_ptid): Remove.
611 * btrace.c (btrace_fetch): Use scoped_restore.
612 * bsd-uthread.c (bsd_uthread_fetch_registers)
613 (bsd_uthread_store_registers): Use scoped_restore.
614 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
615 scoped_restore.
616 * aix-thread.c (aix_thread_resume, aix_thread_wait)
617 (aix_thread_xfer_partial): Use scoped_restore.
618 * inferior.h (save_inferior_ptid): Remove.
619
e60eb288
YQ
6202017-08-18 Yao Qi <yao.qi@linaro.org>
621
622 PR tdep/21818
623 * arm-tdep.c (gdb_print_insn_arm): Mark
624 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
625
6d580b63
YQ
6262017-08-18 Yao Qi <yao.qi@linaro.org>
627
628 * NEWS: Mention GDBserver's new option "--selftest".
629 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
630 * selftest.c: Move it to common/selftest.c.
631 * selftest.h: Move it to common/selftest.h.
632 * selftest-arch.c (reset): New function.
633 (tests_with_arch): Call reset.
634
86dcbf50
YQ
6352017-08-18 Yao Qi <yao.qi@linaro.org>
636
637 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
638 instead of exception_fprintf and printf_filtered.
639
7649770c
YQ
6402017-08-18 Yao Qi <yao.qi@linaro.org>
641
642 * selftest.c (register_self_test): Rename it to
643 selftests::register_test.
644 (run_self_tests): selftest::run_tests.
645 * selftest.h: Update declarations.
646 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
647 selftests::register_test_foreach_arch.
648 * selftest-arch.h: Update declaration.
649 * aarch64-tdep.c: Update.
650 * arm-tdep.c: Likewise.
651 * disasm-selftests.c: Likewise.
652 * dwarf2loc.c: Likewise.
653 * dwarf2-frame.c: Likewise.
654 * findvar.c: Likewise.
655 * gdbarch-selftests.c: Likewise.
656 * maint.c (maintenance_selftest): Likewise.
657 * regcache.c: Likewise.
658 * rust-exp.y: Likewise.
659 * selftest-arch.c: Likewise.
660 * unittests/environ-selftests.c: Likewise.
661 * unittests/function-view-selftests.c: Likewise.
662 * unittests/offset-type-selftests.c: Likewise.
663 * unittests/optional-selftests.c: Likewise.
664 * unittests/scoped_restore-selftests.c: Likewise.
665 * utils-selftests.c: Likewise.
666
b0cba12e
PA
6672017-08-17 Pedro Alves <palves@redhat.com>
668
669 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
670 local.
671
4c8aa72d
PA
6722017-08-17 Pedro Alves <palves@redhat.com>
673
674 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
675 field.
676 (reset_die_in_process): Delete, replaced by ...
677 (process_die_scope): ... this new class. Make it responsible for
678 freeing cu->line_header too.
679 (process_die): Use process_die_scope.
680 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
681 cu->line_header_die_owner. Don't release the line header if it's
682 owned by the CU.
683 (setup_type_unit_groups): Make the CU/DIE own the line header.
684 Don't release the line header here.
685
ba713918
AL
6862017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
687
688 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
689
44d0fb3a
RK
6902017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
691
692 * NEWS: Mention new shortcuts for nexti and stepi in TUI
693 Single-Key mode
694
a5afdb16
RK
6952017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
696
697 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
698 mode command list.
699
47613aeb
SH
7002017-08-15 Stafford Horne <shorne@gmail.com>
701
702 * MAINTAINERS (Write After Approval): Add Stafford Horne.
703
9c3cc999
SH
7042017-08-15 Stafford Horne <shorne@gmail.com>
705
706 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
707
206726fb
SDJ
7082017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
709
710 PR gdb/21954
711 * infcmd.c (unset_environment_command): Use the 'clear' method on
712 the environment instead of resetting it.
713
0335ac6d
JB
7142017-08-15 John Baldwin <jhb@FreeBSD.org>
715
716 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
717 platforms.
718
d3abe1c8
TT
7192017-08-14 Tom Tromey <tom@tromey.com>
720
721 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
722 (print_binary_chars): Likewise.
723 (BITS_IN_BYTES): Remove.
724
d6382fff
TT
7252017-08-14 Tom Tromey <tom@tromey.com>
726
727 PR gdb/21675
728 * valprint.c (LOW_ZERO): Change value to 034.
729 (print_octal_chars): Add static_asserts for octal constants.
730 * printcmd.c (print_scalar_formatted): Add 'd' case.
731
f978cb06
TT
7322017-08-11 Tom Tromey <tom@tromey.com>
733
734 * symfile.c (add_symbol_file_command): Use std::vector.
735
2f5404b3
TT
7362017-08-14 Tom Tromey <tom@tromey.com>
737
738 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
739 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
740 std::move.
741 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
742
de7985c3
PA
7432017-08-11 Pedro Alves <palves@redhat.com>
744
745 * infrun.c (process_event_stop_test): Adjust
746 function_name_is_marked_for_skip call.
747 * skip.c: Include <list>.
748 (skiplist_entry): Make it a class with private fields, and
749 getters/setters.
750 (skiplist_entry_chain): Delete.
751 (skiplist_entries): New.
752 (skiplist_entry_count): Delete.
753 (highest_skiplist_entry_num): New.
754 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
755 (add_skiplist_entry): Delete.
756 (skiplist_entry::skiplist_entry): New.
757 (skiplist_entry::add_entry): New.
758 (skip_file_command, skip_function): Adjust.
759 (compile_skip_regexp): Delete.
760 (skip_command): Don't compile regexp here. Adjust to use
761 skiplist_entry::add_entry.
762 (skip_info): Adjust to use range-for and getters.
763 (skip_enable_command, skip_disable_command): Adjust to use
764 range-for and setters.
765 (skip_delete_command): Adjust to use std::list.
766 (add_skiplist_entry): Delete.
767 (skip_file_p): Delete, refactored as ...
768 (skiplist_entry::do_skip_file_p): ... this new method.
769 (skip_gfile_p): Delete, refactored as ...
770 (skiplist_entry::do_gskip_file_p): ... this new method.
771 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
772 (skiplist_entry::skip_function_p): ... this new method.
773 (function_name_is_marked_for_skip): Now returns bool, and takes
774 the function sal by const reference. Adjust to use range-for and
775 skiplist_entry methods.
776 (_initialize_step_skip): Remove references to
777 skiplist_entry_chain, skiplist_entry_count.
778 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
779 takes the function sal by const reference.
780
be7d3cd5
YQ
7812017-08-11 Yao Qi <yao.qi@linaro.org>
782
783 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
784 (dwarf2_frame_cache): Remove reset_cache_cleanup.
785 (dwarf2_frame_cache):
786 * frame-unwind.c (frame_unwind_try_unwinder): Catch
787 RETURN_MASK_ALL and set *this_case to NULL.
788 * frame-unwind.h: Update comments.
789
1c90d9f0
YQ
7902017-08-11 Yao Qi <yao.qi@linaro.org>
791
792 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
793 (dwarf2_frame_state_copy_regs): Remove.
794 (dwarf2_frame_state_free_regs): Remove.
795 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
796 (dwarf2_restore_rule): Call method .alloc_regs instead of
797 dwarf2_frame_state_alloc_regs.
798 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
799 constructor. Call std::move.
800 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
801 (dwarf2_frame_cache): Likewise.
802
803 [GDB_SELF_TEST]: Include selftest.h and
804 selftest-arch.h.
805 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
806 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
807 execute_cfa_program_test.
808
809 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
810 copy ctor, assignment operator, move assignment.
811 <alloc_regs>: New method.
812 <swap>: New method.
813 (struct dwarf2_frame_state): Delete dtor.
814 (dwarf2_frame_state_alloc_regs): Remove declaration.
815 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
816 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
817
afe37d6b
YQ
8182017-08-11 Yao Qi <yao.qi@linaro.org>
819
820 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
821 (dwarf2_frame_state::dwarf2_frame_state): New.
822 (dwarf2_frame_state::~dwarf2_frame_state): New.
823 (dwarf2_fetch_cfa_info): Update.
824 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
825 rather than a pointer. Update code.
826 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
827 dtor.
828 <data_align, code_align, retaddr_column>: Change them to const.
829 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
830 to bool.
831
b348037f
YQ
8322017-08-11 Yao Qi <yao.qi@linaro.org>
833
834 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
835 <loc.exp>: New field.
836 * dwarf2-frame.c (execute_cfa_program): Update.
837 (dwarf2_frame_prev_register): Update.
838
e7c9de26
PA
8392017-08-10 Pedro Alves <palves@redhat.com>
840
841 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
842
e8c6b620
JB
8432017-08-09 John Baldwin <jhb@FreeBSD.org>
844
845 * fbsd-nat.c (struct fbsd_fork_info): Remove.
846 (fbsd_pending_children): Use std::list.
847 (fbsd_remember_child): Likewise.
848 (fbsd_is_child_pending): Likewise.
849 (fbsd_pending_vfork_done): Use std::forward_list.
850 (fbsd_add_vfork_done): Likewise.
851 (fbsd_is_vfork_done_pending): Likewise.
852 (fbsd_next_vfork_done): Likewise.
853
e4a26669
JB
8542017-08-09 John Baldwin <jhb@FreeBSD.org>
855
856 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
857 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
858 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
859 for `mapfilename'.
860 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 861 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 862
142311d3
JB
8632017-08-09 John Baldwin <jhb@FreeBSD.org>
864
865 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
866 "filestuff.h".
867 (fbsd_find_memory_regions): Fix `mapfile' initialization.
868
42fa2e0e
TT
8692017-08-09 Tom Tromey <tom@tromey.com>
870
871 * skip.c (skiplist_entry): New constructor.
872 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
873 (skiplist_entry::file_is_glob): Now bool.
874 (skiplist_entry::file, skiplist_entry::function): Now
875 std::string.
876 (make_skip_entry): Return a unique_ptr. Use new.
877 (free_skiplist_entry, free_skiplist_entry_cleanup)
878 (make_free_skiplist_entry_cleanup): Remove.
879 (skip_command, skip_disable_command, add_skiplist_entry)
880 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
881 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
882 (function_name_is_marked_for_skip): Update.
883 (skip_delete_command): Update. Use delete.
884
cd3af38d
JW
8852017-08-09 Jiong Wang <jiong.wang@arm.com>
886
887 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
888 (aarch64_linux_core_read_description): New function.
889 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
890
29592bde
PA
8912017-08-09 Pedro Alves <palves@redhat.com>
892
893 * cp-name-parser.y (cp_comp_to_string): Return a
894 gdb::unique_xmalloc_ptr<char>.
895 * cp-support.c (replace_typedefs_qualified_name)
896 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
897 (cp_canonicalize_string_full): Use op= instead of explicit
898 convertion.
899 (cp_class_name_from_physname, method_name_from_physname)
900 (cp_func_name, cp_remove_params): Adjust to use
901 gdb::unique_xmalloc_ptr<char>.
902 * cp-support.h (cp_comp_to_string): Return a
903 gdb::unique_xmalloc_ptr<char>.
904 * python/py-type.c (typy_lookup_type): Adjust to use
905 gdb::unique_xmalloc_ptr<char>.
906
b3340438
L
9072017-08-09 H.J. Lu <hongjiu.lu@intel.com>
908
909 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
910
e88e8651
YQ
9112017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
912 Yao Qi <yao.qi@linaro.org>
913
914 * cp-support.c (cp_canonicalize_string_full): Use
915 gdb::unique_xmalloc_ptr<char>.
916 (cp_canonicalize_string): Likewise.
917
f5a29eb0
YQ
9182017-08-09 Yao Qi <yao.qi@linaro.org>
919
920 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
921 * regformats/i386/amd64-avx-avx512.dat: Remove.
922 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
923 * regformats/i386/amd64-avx-mpx.dat:Remove.
924 * regformats/i386/amd64-avx.dat: Remove.
925 * regformats/i386/amd64-mpx.dat: Remove.
926 * regformats/i386/i386-avx-avx512.dat: Remove.
927 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
928 * regformats/i386/i386-avx-mpx.dat: Remove.
929 * regformats/i386/i386-mmx.dat: Remove.
930 * regformats/i386/i386-mpx.dat: Remove.
931
57757c2f
YQ
9322017-08-09 Yao Qi <yao.qi@linaro.org>
933
934 * amd64-tdep.h (tdesc_x32): Remove the declaration.
935 * amd64-tdep.c: Don't include features/i386/x32*.c.
936 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
937 functions.
938 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
939 and i386/x32-avx-avx512.
940 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
941 and i386/x32.xml.
942 * features/i386/x32-avx-avx512.c: Removed.
943 * features/i386/x32-avx-avx512.xml: Removed.
944 * features/i386/x32-avx.c: Removed.
945 * features/i386/x32-avx.xml: Removed.
946 * features/i386/x32.c: Removed.
947 * features/i386/x32.xml: Removed.
948 * regformats/i386/x32-avx-avx512.dat: Removed.
949 * regformats/i386/x32-avx.dat: Removed.
950 * regformats/i386/x32.dat: Removed.
951
ba7b109b
MR
9522017-08-07 Maciej W. Rozycki <macro@imgtec.com>
953
954 PR breakpoints/21886
955 * mem-break.c (default_memory_insert_breakpoint): Use
956 `->placed_address' rather than `->reqstd_address' for the
957 breakpoint location.
958
e347efc3
MR
9592017-08-07 Maciej W. Rozycki <macro@imgtec.com>
960
961 * arch-utils.c (default_print_insn): Remove arch/mach/endian
962 assertions.
963
0dba2a6c
MR
9642017-08-07 Maciej W. Rozycki <macro@imgtec.com>
965
966 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
967 a union of `tdep_info', `tdesc_data' and `id'.
968 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
969 rather than `info.tdep_info'.
970 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
971 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
972 * i386-tdep.c (i386_gdbarch_init): Likewise.
973 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
974 * mips-tdep.c (mips_gdbarch_init): Likewise.
975 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
976 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
977 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
978 `info.tdep_info'.
979 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
980 `info.tdep_info'.
981 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
982 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
983 `info.tdep_info'.
984 * spu-tdep.c (spu_gdbarch_init): Likewise.
985 * gdbarch.h: Regenerate.
986
16eb6b2d
LS
9872017-08-07 Leszek Swirski <leszeks@google.com>
988
7b005726 989 PR symtab/20899
16eb6b2d
LS
990 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
991
74cbb09e
SM
9922017-08-07 Simon Marchi <simon.marchi@ericsson.com>
993
994 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
995 (gdbsim_open): Rename gdb_argv args object to argv.
996
ee0c3293
TT
9972017-08-05 Tom Tromey <tom@tromey.com>
998
999 * compile/compile-object-load.c (compile_object_load): Use
1000 gdb::unique_xmalloc_ptr.
1001 * cli/cli-dump.c (scan_filename): Rename from
1002 scan_filename_with_cleanup. Change return type.
1003 (scan_expression): Rename from scan_expression_with_cleanup.
1004 Change return type.
1005 (dump_memory_to_file, dump_value_to_file, restore_command):
1006 Use gdb::unique_xmalloc_ptr. Update.
1007 * cli/cli-cmds.c (find_and_open_script): Use
1008 gdb::unique_xmalloc_ptr.
1009 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1010 * symmisc.c (maintenance_print_symbols)
1011 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1012 * symfile.c (symfile_bfd_open, generic_load)
1013 (add_symbol_file_command, remove_symbol_file_command): Use
1014 gdb::unique_xmalloc_ptr.
1015 * source.c (openp): Use gdb::unique_xmalloc_ptr.
1016 * psymtab.c (maintenance_print_psymbols): Use
1017 gdb::unique_xmalloc_ptr.
1018 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1019 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1020 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1021 (reload_shared_libraries_1): Likewise.
1022
3232fabd
TT
10232017-08-05 Tom Tromey <tom@tromey.com>
1024
1025 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1026 (rust_op_vector, rust_set_vector): New typedefs.
1027 (current_parser): New global.
1028 (work_obstack): Change to pointer type. Update all users.
1029 (rust_ast, pstate): Remove globals.
1030 (struct rust_parser): New.
1031 (%union) <params, field_inits>: Change type.
1032 (start, tuple_expr, unit_expr, struct_expr_list, literal)
1033 (field_expr, expr_list, maybe_expr_list, type_list): Update.
1034 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1035 (convert_params_to_types, convert_params_to_expression): Change
1036 type of "params".
1037 (ast_string): Change type of "fields".
1038 (rust_parse): Make a rust_parser. Remove cleanups.
1039 (rust_lex_tests): Make and install an auto_obstack.
1040
f02fd774
YQ
10412017-08-04 Yao Qi <yao.qi@linaro.org>
1042
1043 * configure.srv (ipa_x32_linux_regobj): New.
1044 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1045 instead of X86_TDESC_AVX512.
1046 (initialize_low_tracepoint): Call
1047 init_registers_x32_avx_avx512_linux.
1048
91975afd
YQ
10492017-08-04 Yao Qi <yao.qi@linaro.org>
1050
1051 * utils.h (gdb_argv): Add namespace std for nullptr_t.
1052
2331fa3a
RK
10532017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
1054
1055 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1056
744e4fe1
TT
10572017-08-03 Tom Tromey <tom@tromey.com>
1058
1059 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1060 Remove.
1061 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1062
1c034b67
TT
10632017-08-03 Tom Tromey <tom@tromey.com>
1064
1065 * python/py-param.c (compute_enum_values): Use gdb_argv.
1066
773a1edc
TT
10672017-08-03 Tom Tromey <tom@tromey.com>
1068
1069 * utils.h (struct gdb_argv_deleter): New.
1070 (gdb_argv): New class.
1071 * utils.c (gdb_argv::reset): New method.
1072 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1073 * tracefile.c (tsave_command): Use gdb_argv.
1074 * top.c (new_ui_command): Use gdb_argv.
1075 * symmisc.c (maintenance_print_symbols)
1076 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1077 * symfile.c (symbol_file_command, generic_load)
1078 (remove_symbol_file_command): Use gdb_argv.
1079 * stack.c (backtrace_command): Use gdb_argv.
1080 * source.c (add_path, show_substitute_path_command)
1081 (unset_substitute_path_command, set_substitute_path_command):
1082 Use gdb_argv.
1083 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
1084 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1085 * remote.c (extended_remote_run, remote_put_command)
1086 (remote_get_command, remote_delete_command): Use gdb_argv.
1087 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1088 (gdbsim_open): Use gdb_argv.
1089 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1090 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1091 * procfs.c (procfs_info_proc): Use gdb_argv.
1092 * interps.c (interpreter_exec_cmd): Use gdb_argv.
1093 * infrun.c (handle_command): Use gdb_argv.
1094 * inferior.c (add_inferior_command, clone_inferior_command):
1095 Use gdb_argv.
1096 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1097 * exec.c (exec_file_command): Use gdb_argv.
1098 * cli/cli-cmds.c (alias_command): Use gdb_argv.
1099 * compile/compile.c (build_argc_argv): Use gdb_argv.
1100
0d50bde3
TT
11012017-08-03 Tom Tromey <tom@tromey.com>
1102
1103 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1104
7f968c89
TT
11052017-08-03 Tom Tromey <tom@tromey.com>
1106
1107 * python/python.c (compute_python_string): Return std::string.
1108 (gdbpy_eval_from_control_command): Update.
1109 (do_start_initialization): Use std::string.
1110 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1111 xstrprintf.
1112 * python/py-breakpoint.c (local_setattro): Use string_printf, not
1113 xstrprintf.
1114
3c9ebddd
TT
11152017-08-03 Tom Tromey <tom@tromey.com>
1116
1117 * top.h (do_restore_instream_cleanup): Remove.
1118 * top.c (do_restore_instream_cleanup): Remove.
1119 (read_command_file): Use scoped_restore.
1120 * cli/cli-script.c (execute_user_command): Use scoped_restore.
1121
b51b225e
TT
11222017-08-03 Tom Tromey <tom@tromey.com>
1123
1124 * cli/cli-script.c (execute_user_command)
1125 (execute_control_command): Use scoped_restore.
1126
ac991630
TT
11272017-08-03 Tom Tromey <tom@tromey.com>
1128
1129 * cli/cli-script.c (do_restore_user_call_depth): Remove.
1130 (execute_user_command): Remove user_call_depth; use
1131 user_args_stack's size instead.
1132
898e0c8e
TT
11332017-08-03 Tom Tromey <tom@tromey.com>
1134
1135 * top.h (in_user_command): Remove.
1136 * top.c (in_user_command): Remove.
1137 * cli/cli-script.c (do_restore_user_call_depth)
1138 (execute_user_command): Update.
1139
26fcd5d7
TT
11402017-08-03 Tom Tromey <tom@tromey.com>
1141
1142 * valops.c (search_struct_method): Use gdb::byte_vector.
1143 * valarith.c (value_concat): Use std::vector.
1144 * target.c (memory_xfer_partial): Use gdb::byte_vector.
1145 (simple_search_memory): Likewise.
1146 * printcmd.c (find_string_backward): Use gdb::byte_vector.
1147 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1148 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1149 * elfread.c (elf_rel_plt_read): Use std::string.
1150 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1151 * cli/cli-dump.c (restore_section_callback): Use
1152 gdb::byte_vector.
1153
7c218e6c
TT
11542017-08-03 Tom Tromey <tom@tromey.com>
1155
1156 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1157
31b68d4a
TT
11582017-08-03 Tom Tromey <tom@tromey.com>
1159
1160 * tui/tui-regs.c (tui_restore_gdbout): Remove.
1161 (tui_register_format): Use scoped_restore.
1162
2ec845e7
TT
11632017-08-03 Tom Tromey <tom@tromey.com>
1164
1165 * reverse.c (exec_direction_default): Remove.
1166 (exec_reverse_once): Use scoped_restore.
1167 * remote.c (restore_remote_timeout): Remove.
1168 (remote_flash_erase, remote_flash_write, remote_flash_done)
1169 (readchar, remote_serial_write): Use scoped_restore.
1170 * cli/cli-script.c (struct source_cleanup_lines_args)
1171 (source_cleanup_lines): Remove.
1172 (script_from_file): Use scoped_restore.
1173 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1174 (source_command): Use scoped_restore.
1175
b3bc8453
TT
11762017-08-03 Tom Tromey <tom@tromey.com>
1177
1178 * utils.h (make_cleanup_free_so): Remove.
1179 * utils.c (do_free_so, make_cleanup_free_so): Remove.
1180 * solist.h (struct so_deleter): New.
1181 (so_list_up): New typedef.
1182 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1183
e3ad2841
TT
11842017-08-03 Tom Tromey <tom@tromey.com>
1185
1186 * utils.h (make_cleanup_restore_current_language): Remove.
1187 * utils.c (do_restore_current_language)
1188 (make_cleanup_restore_current_language): Remove.
1189 * parse.c (parse_exp_in_context_1)
1190 (parse_expression_with_language): Use
1191 scoped_restore_current_language.
1192 * mi/mi-main.c (mi_cmd_execute): Use
1193 scoped_restore_current_language.
1194 * language.h (scoped_restore_current_language): New class.
1195
b80cf838
TT
11962017-08-03 Tom Tromey <tom@tromey.com>
1197
1198 * compile/compile.c (cleanup_unlink_file): Remove.
1199 (compile_to_object): Use gdb::unlinker.
1200 (eval_compile_command): Likewise.
1201
fad0444a
TT
12022017-08-03 Tom Tromey <tom@tromey.com>
1203
1204 * utils.h (make_cleanup_fclose): Remove.
1205 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1206
6e7bc05c
TT
12072017-08-03 Tom Tromey <tom@tromey.com>
1208
1209 * top.c (open_terminal_stream): Return gdb_file_up.
1210 (new_ui_command): Update.
1211
4a45905b
TT
12122017-08-03 Tom Tromey <tom@tromey.com>
1213
1214 * source.c (print_source_lines_base, forward_search_command)
1215 (reverse_search_command): Use gdb_file_up.
1216
7cd06d6e
TT
12172017-08-03 Tom Tromey <tom@tromey.com>
1218
1219 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1220
ed166945
TT
12212017-08-03 Tom Tromey <tom@tromey.com>
1222
1223 * cli/cli-cmds.c (find_and_open_script): Change return type.
1224 Remove "streamp" and "full_path" parameters.
1225 (source_script_with_search): Update.
1226 * auto-load.c (source_script_file): Update.
1227 * cli/cli-cmds.h (find_and_open_script): Change type.
1228 (open_script): New struct.
1229
d419f42d
TT
12302017-08-03 Tom Tromey <tom@tromey.com>
1231
1232 * xml-support.c (xml_fetch_content_from_file): Update.
1233 * ui-file.c (stdio_file::open): Update.
1234 * tracefile-tfile.c (tfile_start): Update.
1235 * remote.c (remote_file_put, remote_file_get): Update.
1236 * nat/linux-procfs.c (linux_proc_get_int)
1237 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1238 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1239 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1240 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1241 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1242 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1243 * linux-nat.c (linux_proc_pending_signals): Update.
1244 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1245 (file_closer): Remove.
1246 * compile/compile.c (compile_to_object): Update.
1247 * common/filestuff.h (struct gdb_file_deleter): New.
1248 (gdb_file_up): New typedef.
1249 (gdb_fopen_cloexec): Change return type.
1250 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1251 * cli/cli-dump.c (fopen_with_cleanup): Remove.
1252 (dump_binary_file, restore_binary_file): Update.
1253 * auto-load.c (auto_load_objfile_script_1): Update.
1254
4a2b031d
TT
12552017-08-03 Tom Tromey <tom@tromey.com>
1256
1257 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1258 (info_static_tracepoint_markers_command): Likewise.
1259 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1260 * skip.c (skip_info): Use ui_out_emit_table.
1261 * progspace.c (print_program_space): Use ui_out_emit_table.
1262 * osdata.c (info_osdata): Use ui_out_emit_table.
1263 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1264 ui_out_emit_table.
1265 * linux-thread-db.c (info_auto_load_libthread_db): Use
1266 ui_out_emit_table.
1267 * inferior.c (print_inferior): Use ui_out_emit_table.
1268 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1269 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1270 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1271 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1272 * ui-out.h (class ui_out_emit_table): New.
1273
a4f320fd
MR
12742017-08-02 Maciej W. Rozycki <macro@imgtec.com>
1275
1276 * mips-tdep.c (mips_fpu_type_str): New function.
1277 (mips_dump_tdep): Call it.
1278
a2f1f308
MR
12792017-08-01 Maciej W. Rozycki <macro@imgtec.com>
1280
1281 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1282 `->mips_fpu_type'.
1283
7e5ed83b
XR
12842017-07-31 Xavier Roirand <roirand@adacore.com>
1285
1286 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1287
4c9dc811
XR
12882017-07-27 Xavier Roirand <roirand@adacore.com>
1289
1290 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1291
27d41eac
YQ
12922017-07-26 Yao Qi <yao.qi@linaro.org>
1293
1294 * cli/cli-cmds.c (maintenancechecklist): New variable.
1295 * gdbcmd.h (maintenancechecklist): Declare it.
1296 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1297 Call i386_linux_read_description with different masks.
1298 * maint.c (maintenance_check_command): New function.
1299 (_initialize_maint_cmds): Call add_prefix_cmd.
1300 * target-descriptions.c (tdesc_reg): override operator != and ==.
1301 (tdesc_type): Likewise.
1302 (tdesc_feature): Likewise.
1303 (target_desc): Likewise.
1304 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1305 (maintenance_check_xml_descriptions): New function.
1306 (_initialize_target_descriptions) Add command "xml-descriptions".
1307 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1308
ea03d0d3
YQ
13092017-07-26 Yao Qi <yao.qi@linaro.org>
1310
1311 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1312 Include features/i386/32bit-*.c.
1313 (i386_linux_read_description): Generate target description if it
1314 doesn't exist.
1315 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1316 functions.
1317 * features/i386/32bit-linux.c: Re-generated.
1318 * features/i386/32bit-sse.c: Likewise.
1319 * target-descriptions.c (print_c_feature::visit): Print code to
1320 set register number if needed.
1321 (print_c_feature) <m_next_regnum>: New field.
1322
25aa13e5
YQ
13232017-07-26 Yao Qi <yao.qi@linaro.org>
1324
1325 * features/Makefile (CFILES): Rename with TDESC_CFILES.
1326 (FEATURE_XMLFILES): New.
1327 (FEATURE_CFILES): New.
1328 New rules.
1329 (clean-cfiles): Remove generated c files.
1330 * features/i386/32bit-avx.c: Generated.
1331 * features/i386/32bit-avx512.c: Generated.
1332 * features/i386/32bit-core.c: Generated.
1333 * features/i386/32bit-linux.c: Generated.
1334 * features/i386/32bit-mpx.c: Generated.
1335 * features/i386/32bit-pkeys.c: Generated.
1336 * features/i386/32bit-sse.c: Generated.
1337 * target-descriptions.c: Include algorithm.
1338 (tdesc_element_visitor): Add method visit_end.
1339 (print_c_tdesc): Implement visit_end.
1340 (print_c_tdesc:: m_filename_after_features): Move it to
1341 protected.
1342 (print_c_feature): New class.
1343 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1344 name starts with "i386/32bit-".
1345
6eb1e6a8
YQ
13462017-07-26 Yao Qi <yao.qi@linaro.org>
1347
1348 * target-descriptions.c (tdesc_element_visitor): New class.
1349 (tdesc_element): New class.
1350 (tdesc_reg): Inherit from tdesc_element.
1351 (tdesc_reg::accept): New function.
1352 (tdesc_type): Inherit from tdesc_element.
1353 (tdesc_type::accept): New function.
1354 (tdesc_feature): Inherit from tdesc_element.
1355 (tdesc_feature::accept): New function.
1356 (target_desc): Inherit from tdesc_element.
1357 (target_desc::target_desc): New.
1358 (target_desc::~target_desc): New.
1359 (target_desc::accept): New.
1360 (allocate_target_description): Use new.
1361 (free_target_description): Use delete.
1362 (print_c_tdesc): New class.
1363 (maint_print_c_tdesc_cmd): Adjust.
1364
1365 * features/aarch64.c: Re-generated.
1366 * features/arc-arcompact.c: Re-generated.
1367 * features/arc-v2.c: Re-generated.
1368 * features/arm/arm-with-iwmmxt.c: Re-generated.
1369 * features/arm/arm-with-m.c: Re-generated.
1370 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1371 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1372 * features/arm/arm-with-neon.c: Re-generated.
1373 * features/arm/arm-with-vfpv2.c: Re-generated.
1374 * features/arm/arm-with-vfpv3.c: Re-generated.
1375 * features/i386/amd64-avx-avx512.c: Re-generated.
1376 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1377 * features/i386/amd64-avx.c: Re-generated.
1378 * features/i386/amd64-avx-linux.c: Re-generated.
1379 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1380 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1381 * features/i386/amd64-avx-mpx.c: Re-generated.
1382 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1383 * features/i386/amd64.c: Re-generated.
1384 * features/i386/amd64-linux.c: Re-generated.
1385 * features/i386/amd64-mpx.c: Re-generated.
1386 * features/i386/amd64-mpx-linux.c: Re-generated.
1387 * features/i386/i386-avx-avx512.c: Re-generated.
1388 * features/i386/i386-avx-avx512-linux.c: Re-generated.
1389 * features/i386/i386-avx.c: Re-generated.
1390 * features/i386/i386-avx-linux.c: Re-generated.
1391 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1392 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1393 * features/i386/i386-avx-mpx.c: Re-generated.
1394 * features/i386/i386-avx-mpx-linux.c: Re-generated.
1395 * features/i386/i386.c: Re-generated.
1396 * features/i386/i386-linux.c: Re-generated.
1397 * features/i386/i386-mmx.c: Re-generated.
1398 * features/i386/i386-mmx-linux.c: Re-generated.
1399 * features/i386/i386-mpx.c: Re-generated.
1400 * features/i386/i386-mpx-linux.c: Re-generated.
1401 * features/i386/x32-avx-avx512.c: Re-generated.
1402 * features/i386/x32-avx-avx512-linux.c: Re-generated.
1403 * features/i386/x32-avx.c: Re-generated.
1404 * features/i386/x32-avx-linux.c: Re-generated.
1405 * features/i386/x32.c: Re-generated.
1406 * features/i386/x32-linux.c: Re-generated.
1407 * features/microblaze.c: Re-generated.
1408 * features/microblaze-with-stack-protect.c: Re-generated.
1409 * features/mips64-dsp-linux.c: Re-generated.
1410 * features/mips64-linux.c: Re-generated.
1411 * features/mips-dsp-linux.c: Re-generated.
1412 * features/mips-linux.c: Re-generated.
1413 * features/nds32.c: Re-generated.
1414 * features/nios2.c: Re-generated.
1415 * features/nios2-linux.c: Re-generated.
1416 * features/rs6000/powerpc-32.c: Re-generated.
1417 * features/rs6000/powerpc-32l.c: Re-generated.
1418 * features/rs6000/powerpc-403.c: Re-generated.
1419 * features/rs6000/powerpc-403gc.c : Re-generated.
1420 * features/rs6000/powerpc-405.c: Re-generated.
1421 * features/rs6000/powerpc-505.c: Re-generated.
1422 * features/rs6000/powerpc-601.c: Re-generated.
1423 * features/rs6000/powerpc-602.c: Re-generated.
1424 * features/rs6000/powerpc-603.c: Re-generated.
1425 * features/rs6000/powerpc-604.c: Re-generated.
1426 * features/rs6000/powerpc-64.c: Re-generated.
1427 * features/rs6000/powerpc-64l.c: Re-generated.
1428 * features/rs6000/powerpc-7400.c: Re-generated.
1429 * features/rs6000/powerpc-750.c: Re-generated.
1430 * features/rs6000/powerpc-860.c: Re-generated.
1431 * features/rs6000/powerpc-altivec32.c: Re-generated.
1432 * features/rs6000/powerpc-altivec32l.c: Re-generated.
1433 * features/rs6000/powerpc-altivec64.c: Re-generated.
1434 * features/rs6000/powerpc-altivec64l.c: Re-generated.
1435 * features/rs6000/powerpc-cell32l.c: Re-generated.
1436 * features/rs6000/powerpc-cell64l.c: Re-generated.
1437 * features/rs6000/powerpc-e500.c: Re-generated.
1438 * features/rs6000/powerpc-e500l.c: Re-generated.
1439 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1440 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1441 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1442 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1443 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1444 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1445 * features/rs6000/powerpc-vsx32.c: Re-generated.
1446 * features/rs6000/powerpc-vsx32l.c: Re-generated.
1447 * features/rs6000/powerpc-vsx64.c: Re-generated.
1448 * features/rs6000/powerpc-vsx64l.c: Re-generated.
1449 * features/rs6000/rs6000.c: Re-generated.
1450 * features/s390-linux32.c: Re-generated.
1451 * features/s390-linux32v1.c: Re-generated.
1452 * features/s390-linux32v2.c: Re-generated.
1453 * features/s390-linux64.c: Re-generated.
1454 * features/s390-linux64v1.c: Re-generated.
1455 * features/s390-linux64v2.c: Re-generated.
1456 * features/s390-te-linux64.c: Re-generated.
1457 * features/s390-tevx-linux64.c: Re-generated.
1458 * features/s390-vx-linux64.c: Re-generated.
1459 * features/s390x-linux64.c: Re-generated.
1460 * features/s390x-linux64v1.c: Re-generated.
1461 * features/s390x-linux64v2.c: Re-generated.
1462 * features/s390x-te-linux64.c: Re-generated.
1463 * features/s390x-tevx-linux64.c: Re-generated.
1464 * features/s390x-vx-linux64.c: Re-generated.
1465 * features/sparc/sparc32-solaris.c: Re-generated.
1466 * features/sparc/sparc64-solaris.c: Re-generated.
1467 * features/tic6x-c62x.c: Re-generated.
1468 * features/tic6x-c62x-linux.c: Re-generated.
1469 * features/tic6x-c64x.c: Re-generated.
1470 * features/tic6x-c64x-linux.c: Re-generated.
1471 * features/tic6x-c64xp.c: Re-generated.
1472 * features/tic6x-c64xp-linux.c: Re-generated.
1473
35b4818d
YQ
14742017-07-26 Yao Qi <yao.qi@linaro.org>
1475
1476 * i386-linux-tdep.c (i386_linux_read_description): New function.
1477 (i386_linux_core_read_description): Call
1478 i386_linux_read_description.
1479 * i386-linux-tdep.h (i386_linux_read_description): Declare.
1480 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1481 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1482 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1483 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1484 * x86-linux-nat.c (x86_linux_read_description): Call
1485 i386_linux_read_description.
1486
8e2141c6
YQ
14872017-07-26 Yao Qi <yao.qi@linaro.org>
1488
1489 * NEWS: Mention it.
1490 * features/Makefile (%.c: %.xml): Pass the xml file name to
1491 command "maint print c-tdesc".
1492 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1493 name from 'arg'.
1494
b468ff4c
YQ
14952017-07-26 Yao Qi <yao.qi@linaro.org>
1496
1497 * target-descriptions.c (target_desc): Add ctor and dtor. Do
1498 in-class initialization.
1499 (tdesc_create_feature): Call new instead of XCNEW.
1500 (free_target_description): Ue delete.
1501
b9c0e1b4
JB
15022017-07-25 John Baldwin <jhb@FreeBSD.org>
1503
1504 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1505
a04b5337
YQ
15062017-07-25 Yao Qi <yao.qi@linaro.org>
1507
1508 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1509 constant.
1510 (amd64_x32_init_abi): Likewise.
1511 * amd64-tdep.h (amd64_init_abi): Update declaration.
1512 (amd64_x32_init_abi): Likewise.
1513
02ad7fc2
YQ
15142017-07-25 Yao Qi <yao.qi@linaro.org>
1515
1516 PR tdep/21717
1517 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1518 condition for FPSCR.
1519 (arm_linux_store_inferior_registers): Likewise.
1520
b6f48cb0
TT
15212017-07-22 Tom Tromey <tom@tromey.com>
1522
1523 * break-catch-syscall.c (struct catch_syscall_inferior_data)
1524 <syscalls_counts>: Now a std::vector.
1525 (get_catch_syscall_inferior_data): Use "new".
1526 (catch_syscall_inferior_data_cleanup): Use "delete".
1527 (insert_catch_syscall, remove_catch_syscall)
1528 (clear_syscall_counts): Update.
1529
e12c9b7a
TT
15302017-07-22 Tom Tromey <tom@tromey.com>
1531
1532 * break-catch-syscall.c (syscall_catchpoint)
1533 <syscalls_to_be_caught>: Now a std::vector<int>
1534 (~syscall_catchpoint): Remove.
1535 (insert_catch_syscall, remove_catch_syscall)
1536 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
1537 (print_mention_catch_syscall, print_recreate_catch_syscall):
1538 Update.
1539 (create_syscall_event_catchpoint): Change type of "filter"
1540 parameter.
1541 (catch_syscall_split_args): Return a std::vector.
1542 (catch_syscall_command_1, catching_syscall_number_1): Update.
1543
4fa8aeac
TT
15442017-07-22 Tom Tromey <tom@tromey.com>
1545
1546 * break-catch-throw.c (struct exception_catchpoint)
1547 <exception_rx>: Now a std::string.
1548 (~exception_catchpoint): Remove.
1549 (print_one_detail_exception_catchpoint): Update.
1550 (handle_gnu_v3_exceptions): Change type of except_rx.
1551 (extract_exception_regexp): Return a std::string.
1552 (catch_exception_command_1): Update.
1553
f746a154
TT
15542017-07-22 Tom Tromey <tom@tromey.com>
1555
1556 * break-catch-sig.c (gdb_signal_type): Remove typedef.
1557 (struct signal_catchpoint) <signals_to_be_caught>: Now a
1558 std::vector.
1559 <catch_all>: Now a bool.
1560 (~signal_catchpoint): Remove.
1561 (signal_catchpoint_insert_location)
1562 (signal_catchpoint_remove_location)
1563 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
1564 (signal_catchpoint_print_mention)
1565 (signal_catchpoint_print_recreate)
1566 (signal_catchpoint_explains_signal): Update.
1567 (create_signal_catchpoint): Change type of "filter" and
1568 "catch_all".
1569 (catch_signal_split_args): Return a std::vector. Change type of
1570 "catch_all".
1571 (catch_signal_command): Update.
1572
47e77640
PA
15732017-07-20 Pedro Alves <palves@redhat.com>
1574
1575 * ada-lang.c (ada_language_defn): Make extern.
1576 (_initialize_ada_language): Remove add_language call.
1577 * c-lang.c (c_language_defn, cplus_language_defn)
1578 (asm_language_defn, minimal_language_defn): Make extern.
1579 (_initialize_c_language): Delete.
1580 * completer.c (compare_cstrings): Delete, moved to utils.h.
1581 * d-lang.c (d_language_defn): Make extern.
1582 (_initialize_d_language): Remove add_language calls.
1583 * defs.h (enum language): Add comment.
1584 * f-lang.c (f_language_defn): Make extern.
1585 (_initialize_f_language): Remove add_language call.
1586 * go-lang.c (go_language_defn): Make extern.
1587 (_initialize_go_language): Remove add_language call.
1588 * language.c: Include <algorithm>.
1589 (languages): Redefine as const array.
1590 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
1591 (set_language_command): Handle "local". Use for-range loop.
1592 (set_language): Remove loop.
1593 (language_enum): Rewrite.
1594 (language_def, language_str): Remove loops.
1595 (add_language): Delete.
1596 (add_set_language_command): New, based on add_languages.
1597 (skip_language_trampoline): Adjust.
1598 (local_language_defn): Delete.
1599 (language_gdbarch_post_init): Adjust.
1600 (_initialize_language): Remove add_language calls. Call
1601 add_set_language_command.
1602 * language.h (add_language): Delete.
1603 (auto_language_defn)
1604 (unknown_language_defn, minimal_language_defn, ada_language_defn)
1605 (asm_language_defn, c_language_defn, cplus_language_defn)
1606 (d_language_defn, f_language_defn, go_language_defn)
1607 (m2_language_defn, objc_language_defn, opencl_language_defn)
1608 (pascal_language_defn, rust_language_defn): Declare.
1609 * m2-lang.c (m2_language_defn): Make extern.
1610 (_initialize_m2_language): Remove add_language call.
1611 * objc-lang.c (objc_language_defn): Make extern.
1612 (_initialize_objc_language): Remove add_language call.
1613 * opencl-lang.c (opencl_language_defn): Make extern.
1614 (_initialize_opencl_language): Remove add_language call.
1615 * p-lang.c (pascal_language_defn): Make extern.
1616 (_initialize_pascal_language): Delete.
1617 * rust-lang.c (rust_language_defn): Make extern.
1618 (_initialize_rust_language): Delete.
1619 * utils.h (compare_cstrings): New static inline function.
1620
edb0c9cb
PA
16212017-07-20 Pedro Alves <palves@redhat.com>
1622
1623 * ada-lang.c (ada_to_fixed_type_1): Adjust.
1624 (get_var_value): Constify parameters.
1625 (get_int_var_value): Change prototype.
1626 (to_fixed_range_type): Adjust.
1627 * ada-lang.h (get_int_var_value): Change prototype.
1628
a778f165
PA
16292017-07-20 Pedro Alves <palves@redhat.com>
1630
1631 * dwarf2read.c (dw2_lookup_symbol): Use
1632 SYMBOL_MATCHES_SEARCH_NAME.
1633 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
1634
42edd901
PA
16352017-07-20 Pedro Alves <palves@redhat.com>
1636
1637 * block.c (block_iter_name_step, block_iter_name_first)
1638 (block_iter_name_next): Delete.
1639 (block_lookup_symbol_primary): Adjust to use
1640 dict_iter_match_first/dict_iter_match_next.
1641 * block.h (block_iter_name_first, block_iter_name_next): Delete
1642 declarations.
1643 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
1644 dict_iter_match_first/dict_iter_match_next.
1645
cf325299
PA
16462017-07-20 Pedro Alves <palves@redhat.com>
1647
1648 * cp-support.c (cp_find_first_component_aux): Add missing case for
1649 end of string.
1650
c5ed0576
DB
16512017-07-18 David Blaikie <dblaikie@gmail.com>
1652
1653 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
1654 of dwo_cu's dwo_file.
1655
27841e76
YQ
16562017-07-18 Yao Qi <yao.qi@linaro.org>
1657
1658 * remote.c (store_registers_using_G): Remove one line comment.
1659
cfb7e58b
YQ
16602017-07-18 Yao Qi <yao.qi@linaro.org>
1661
1662 * regcache.c (regcache_cpy): Simplify it.
1663 (regcache::cpy_no_passthrough): Remove it.
1664 * regcache.h (cpy_no_passthrough): Remove it.
1665 (regcache_dup, regcache_cpy): Update comments.
1666
386535dd
PA
16672017-07-18 Pedro Alves <palves@redhat.com>
1668
1669 * remote-sim.c (sim_command_completer): Adjust to work with a
1670 completion_tracker instead of a VEC.
1671
c45ec17c
PA
16722017-07-17 Pedro Alves <palves@redhat.com>
1673
1674 * completer.c (complete_source_filenames): New function.
1675 (complete_address_and_linespec_locations): New function.
1676 (location_completer): Use complete_address_and_linespec_locations.
1677 (completion_tracker::build_completion_result): Honor the tracker's
1678 request to suppress append.
1679 * completer.h (completion_tracker::suppress_append_ws)
1680 (completion_tracker::set_suppress_append_ws): New methods.
1681 (completion_tracker::m_suppress_append_ws): New field.
1682 (complete_source_filenames): New declaration.
1683 * linespec.c (linespec_complete_what): New.
1684 (struct ls_parser) <complete_what, completion_word,
1685 completion_quote_char, completion_quote_end, completion_tracker>:
1686 New fields.
1687 (string_find_incomplete_keyword_at_end): New.
1688 (linespec_lexer_lex_string): Record quote char. If in completion
1689 mode, don't throw.
1690 (linespec_lexer_consume_token): Advance the completion word point.
1691 (linespec_lexer_peek_token): Save/restore completion info.
1692 (save_stream_and_consume_token): New.
1693 (set_completion_after_number): New.
1694 (linespec_parse_basic): Set what to complete next depending on
1695 token. Handle function and label completions specially.
1696 (parse_linespec): Disable objc shortcut in completion mode. Set
1697 what to complete next depending on token type. Skip keyword if in
1698 completion mode.
1699 (complete_linespec_component, linespec_complete): New.
1700 * linespec.h (linespec_complete): Declare.
1701
be966d42
PA
17022017-07-17 Pedro Alves <palves@redhat.com>
1703
1704 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
1705 Handle 'operator<' / 'operator<<'.
1706
a2459270
PA
17072017-07-17 Pedro Alves <palves@redhat.com>
1708
1709 * completer.c (collect_explicit_location_matches): Handle
1710 MATCH_LABEL.
1711 (convert_explicit_location_to_linespec): New, factored out from
1712 ...
1713 (convert_explicit_location_to_sals): ... this.
1714 (complete_label): New.
1715 (linespec_complete_label, find_label_symbols_in_block): New.
1716 (find_label_symbols): Add completion_mode parameter and adjust to
1717 call find_label_symbols_in_block.
1718 * linespec.h (linespec_complete_label): Declare.
1719
c6756f62
PA
17202017-07-17 Pedro Alves <palves@redhat.com>
1721
1722 * ada-lang.c (ada_collect_symbol_completion_matches): Add
1723 complete_symbol_mode parameter.
1724 * cli/cli-cmds.c (complete_command): Get the completion result out
1725 of the handle_brkchars tracker if used a custom word point.
1726 * completer.c: Include "linespec.h".
1727 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
1728 (advance_to_expression_complete_word_point): New.
1729 (completion_tracker::completes_to_completion_word): New.
1730 (complete_files_symbols): Pass down
1731 complete_symbol_mode::EXPRESSION.
1732 (explicit_options, probe_options): New.
1733 (collect_explicit_location_matches): Complete on the
1734 explictit_loc->foo instead of word. Use
1735 linespec_complete_function. Handle MATCH_LINE. Handle offering
1736 keyword and options completions.
1737 (backup_text_ptr): Delete.
1738 (skip_keyword): New.
1739 (complete_explicit_location): Remove 'word' parameter. Add
1740 language, quoted_arg_start and quoted_arg_end parameters.
1741 Rewrite, parsing left to right.
1742 (location_completer): Rewrite.
1743 (location_completer_handle_brkchars): New function.
1744 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
1745 (enum complete_line_internal_reason): Adjust comments.
1746 (completion_tracker::discard_completions): New.
1747 (completer_handle_brkchars_func_for_completer): Handle
1748 location_completer.
1749 (gdb_custom_word_point_brkchars)
1750 (gdb_org_rl_basic_quote_characters): New.
1751 (gdb_completion_word_break_characters_throw)
1752 (completion_find_completion_word): Handle trackers that use a
1753 custom word point.
1754 (completion_tracker::advance_custom_word_point_by): New.
1755 (completion_tracker::build_completion_result): Don't rely on
1756 readline appending the quote char.
1757 (gdb_rl_attempted_completion_function_throw): Handle trackers that
1758 use a custom word point.
1759 (gdb_rl_attempted_completion_function): Restore
1760 rl_basic_quote_characters.
1761 * completer.h (class completion_tracker): Extend intro comment.
1762 (completion_tracker::set_quote_char)
1763 (completion_tracker::quote_char)
1764 (completion_tracker::set_use_custom_word_point)
1765 (completion_tracker::use_custom_word_point)
1766 (completion_tracker::custom_word_point)
1767 (completion_tracker::set_custom_word_point)
1768 (completion_tracker::advance_custom_word_point_by)
1769 (completion_tracker::completes_to_completion_word)
1770 (completion_tracker::discard_completions): New methods.
1771 (completion_tracker::m_quote_char)
1772 (completion_tracker::m_use_custom_word_point)
1773 (completion_tracker::m_custom_word_point): New fields.
1774 (advance_to_expression_complete_word_point): Declare.
1775 * f-lang.c (f_collect_symbol_completion_matches): Add
1776 complete_symbol_mode parameter.
1777 * language.h (struct language_defn)
1778 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
1779 parameter.
1780 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
1781 (linespec_complete_function): New function.
1782 (linespec_lexer_lex_keyword): Adjust.
1783 * linespec.h (linespec_keywords, linespec_complete_function): New
1784 declarations.
1785 * location.c (find_end_quote): New function.
1786 (explicit_location_lex_one): Add explicit_completion_info
1787 parameter. Save quoting info. Don't throw if being called for
1788 completion. Don't handle Ada operators here.
1789 (is_cp_operator, skip_op_false_positives, first_of)
1790 (explicit_location_lex_one_function): New function.
1791 (string_to_explicit_location): Replace 'dont_throw' parameter with
1792 an explicit_completion_info pointer parameter. Handle it. Don't
1793 use explicit_location_lex_one to lex function names. Use
1794 explicit_location_lex_one_function instead.
1795 * location.h (struct explicit_completion_info): New.
1796 (string_to_explicit_location): Replace 'dont_throw' parameter with
1797 an explicit_completion_info pointer parameter.
1798 * symtab.c (default_collect_symbol_completion_matches_break_on):
1799 Add complete_symbol_mode parameter. Handle LINESPEC mode.
1800 (default_collect_symbol_completion_matches)
1801 (collect_symbol_completion_matches): Add complete_symbol_mode
1802 parameter.
1803 (collect_symbol_completion_matches_type): Pass down
1804 complete_symbol_mode::EXPRESSION.
1805 (collect_file_symbol_completion_matches): Add complete_symbol_mode
1806 parameter. Handle LINESPEC mode.
1807 * symtab.h (complete_symbol_mode): New.
1808 (default_collect_symbol_completion_matches_break_on)
1809 (default_collect_symbol_completion_matches)
1810 (collect_symbol_completion_matches)
1811 (collect_file_symbol_completion_matches): Add complete_symbol_mode
1812 parameter.
1813
1d550c82
PA
18142017-07-17 Pedro Alves <palves@redhat.com>
1815
1816 * utils.c (enum class strncmp_iw_mode): New.
1817 (strcmp_iw): Rename to ...
1818 (strncmp_iw_with_mode): ... this. Add string2_len and mode
1819 parameters. Handle them.
1820 (strncmp_iw): New.
1821 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
1822 * utils.h (strncmp_iw): Declare.
1823 (strcmp_iw): Move describing comments here.
1824
8090b426
PA
18252017-07-17 Pedro Alves <palves@redhat.com>
1826
1827 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
1828 CP_OPERATOR_STR.
1829 * c-typeprint.c (is_type_conversion_operator): Use
1830 CP_OPERATOR_STR.
1831 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
1832 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
1833 CP_OPERATOR_LEN.
1834 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
1835 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
1836 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
1837 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
1838 CP_OPERATOR_STR.
1839 * location.c: Include "cp-support.h".
1840 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
1841 CP_OPERATOR_STR.
1842 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
1843 CP_OPERATOR_LEN.
1844
6a2c1b87
PA
18452017-07-17 Pedro Alves <palves@redhat.com>
1846
1847 * cli/cli-cmds.c (complete_command): Use a completion tracker
1848 along with completion_find_completion_word for handle_brkchars
1849 phase.
1850 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
1851 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
1852 (struct gdb_rl_completion_word_info): New.
1853 (gdb_rl_find_completion_word): New.
1854 (completion_find_completion_word): New.
1855 * completer.h (completion_find_completion_word): Declare.
1856
eb3ff9a5
PA
18572017-07-17 Pedro Alves <palves@redhat.com>
1858
1859 * ada-lang.c (symbol_completion_match): Adjust comments.
1860 (symbol_completion_add): Replace vector parameter with
1861 completion_tracker parameter. Use it.
1862 (ada_make_symbol_completion_list): Rename to...
1863 (ada_collect_symbol_completion_matches): ... this. Add
1864 completion_tracker parameter and use it.
1865 (ada_language_defn): Adjust.
1866 * break-catch-syscall.c (catch_syscall_completer): Adjust
1867 prototype and work with completion_tracker instead of VEC.
1868 * breakpoint.c (condition_completer): Adjust prototype and work
1869 with completion_tracker instead of VEC.
1870 * c-lang.c (c_language_defn, cplus_language_defn)
1871 (asm_language_defn, minimal_language_defn): Adjust to renames.
1872 * cli/cli-cmds.c (complete_command): Rework using
1873 completion_tracker. Catch exceptions when completing.
1874 * cli/cli-decode.c (integer_unlimited_completer)
1875 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
1876 with completion_tracker instead of VEC.
1877 * command.h (struct completion_tracker): Forward declare.
1878 (completer_ftype, completer_handle_brkchars_ftype): Change
1879 types.
1880 (complete_on_cmdlist, complete_on_enum): Adjust.
1881 * completer.c: Include <algorithm>.
1882 (struct gdb_completer_state): New.
1883 (current_completion): New global.
1884 (readline_line_completion_function): Delete.
1885 (noop_completer, filename_completer)
1886 (filename_completer_handle_brkchars, complete_files_symbols)
1887 (linespec_location_completer): Adjust to work with a
1888 completion_tracker instead of a VEC.
1889 (string_or_empty): New.
1890 (collect_explicit_location_matches): Adjust to work with a
1891 completion_tracker instead of a VEC.
1892 (explicit_location_completer): Rename to ...
1893 (complete_explicit_location): ... this and adjust to work with a
1894 completion_tracker instead of a VEC.
1895 (location_completer): Adjust to work with a completion_tracker
1896 instead of a VEC.
1897 (add_struct_fields): Adjust to work with a completion_list instead
1898 of VEC.
1899 (expression_completer): Rename to ...
1900 (complete_expression): ... this and adjust to work with a
1901 completion_tracker instead of a VEC. Use complete_files_symbols.
1902 (expression_completer): Reimplement on top of complete_expression.
1903 (symbol_completer): Adjust to work with a completion_tracker
1904 instead of a VEC.
1905 (enum complete_line_internal_reason): Add describing comments.
1906 (complete_line_internal_normal_command): Adjust to work with a
1907 completion_tracker instead of a VEC.
1908 (complete_line_internal): Rename to ...
1909 (complete_line_internal_1): ... this and adjust to work with a
1910 completion_tracker instead of a VEC. Assert TEXT is NULL in the
1911 handle_brkchars phase.
1912 (new_completion_tracker): Delete.
1913 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
1914 complete_line_internal_1.
1915 (free_completion_tracker): Delete.
1916 (INITIAL_COMPLETION_HTAB_SIZE): New.
1917 (completion_tracker::completion_tracker)
1918 (completion_tracker::~completion_tracker): New.
1919 (maybe_add_completion): Delete.
1920 (completion_tracker::maybe_add_completion)
1921 (completion_tracker::add_completion)
1922 (completion_tracker::add_completions): New.
1923 (throw_max_completions_reached_error): Delete.
1924 (complete_line): Adjust to work with a completion_tracker instead
1925 of a VEC. Don't create a completion_tracker_t or check for max
1926 completions here.
1927 (command_completer, command_completer_handle_brkchars)
1928 (signal_completer, reg_or_group_completer_1)
1929 (reg_or_group_completer, default_completer_handle_brkchars):
1930 Adjust to work with a completion_tracker.
1931 (gdb_completion_word_break_characters_throw): New.
1932 (gdb_completion_word_break_characters): Reimplement.
1933 (line_completion_function): Delete.
1934 (completion_tracker::recompute_lowest_common_denominator)
1935 (expand_preserving_ws)
1936 (completion_tracker::build_completion_result)
1937 (completion_result::completion_result)
1938 (completion_result::completion_result)
1939 (completion_result::~completion_result)
1940 (completion_result::completion_result)
1941 (completion_result::release_match_list, compare_cstrings)
1942 (completion_result::sort_match_list)
1943 (completion_result::reset_match_list)
1944 (gdb_rl_attempted_completion_function_throw)
1945 (gdb_rl_attempted_completion_function): New.
1946 * completer.h (completion_list, struct completion_result)
1947 (class completion_tracker): New.
1948 (complete_line): Add completion_tracker parameter.
1949 (readline_line_completion_function): Delete.
1950 (gdb_rl_attempted_completion_function): New.
1951 (noop_completer, filename_completer, expression_completer)
1952 (location_completer, symbol_completer, command_completer)
1953 (signal_completer, reg_or_group_completer): Update prototypes.
1954 (completion_tracker_t, new_completion_tracker)
1955 (make_cleanup_free_completion_tracker): Delete.
1956 (enum maybe_add_completion_enum): Delete.
1957 (maybe_add_completion): Delete.
1958 (throw_max_completions_reached_error): Delete.
1959 * corefile.c (complete_set_gnutarget): Adjust to work with a
1960 completion_tracker instead of a VEC.
1961 * cp-abi.c (cp_abi_completer): Adjust to work with a
1962 completion_tracker instead of a VEC.
1963 * d-lang.c (d_language_defn): Adjust.
1964 * disasm.c (disassembler_options_completer): Adjust to work with a
1965 completion_tracker instead of a VEC.
1966 * f-lang.c (f_make_symbol_completion_list): Rename to ...
1967 (f_collect_symbol_completion_matches): ... this. Adjust to work
1968 with a completion_tracker instead of a VEC.
1969 (f_language_defn): Adjust.
1970 * go-lang.c (go_language_defn): Adjust.
1971 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
1972 Adjust to work with a completion_tracker instead of a VEC.
1973 * infrun.c (handle_completer): Likewise.
1974 * interps.c (interpreter_completer): Likewise.
1975 * interps.h (interpreter_completer): Likewise.
1976 * language.c (unknown_language_defn, auto_language_defn)
1977 (local_language_defn): Adjust.
1978 * language.h (language_defn::la_make_symbol_completion_list):
1979 Rename to ...
1980 (language_defn::la_collect_symbol_completion_matches): ... this
1981 and adjust to work with a completion_tracker instead of a VEC.
1982 * m2-lang.c (m2_language_defn): Adjust.
1983 * objc-lang.c (objc_language_defn): Adjust.
1984 * opencl-lang.c (opencl_language_defn): Adjust.
1985 * p-lang.c (pascal_language_defn): Adjust.
1986 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
1987 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
1988 with a completion_tracker.
1989 * rust-lang.c (rust_language_defn): Adjust.
1990 * symtab.c (free_completion_list, do_free_completion_list)
1991 (return_val, completion_tracker): Delete.
1992 (completion_list_add_name, completion_list_add_symbol)
1993 (completion_list_add_msymbol, completion_list_objc_symbol)
1994 (completion_list_add_fields, add_symtab_completions): Add
1995 completion_tracker parameter and use it.
1996 (default_make_symbol_completion_list_break_on_1): Rename to...
1997 (default_collect_symbol_completion_matches_break_on): ... this.
1998 Add completion_tracker parameter and use it instead of allocating
1999 a completion tracker here.
2000 (default_make_symbol_completion_list_break_on): Delete old
2001 implementation.
2002 (default_make_symbol_completion_list): Delete.
2003 (default_collect_symbol_completion_matches): New.
2004 (make_symbol_completion_list): Delete.
2005 (collect_symbol_completion_matches): New.
2006 (make_symbol_completion_type): Rename to ...
2007 (collect_symbol_completion_matches_type): ... this. Add
2008 completion_tracker parameter and use it instead of VEC.
2009 (make_file_symbol_completion_list_1): Rename to...
2010 (collect_file_symbol_completion_matches): ... this. Add
2011 completion_tracker parameter and use it instead of VEC.
2012 (make_file_symbol_completion_list): Delete.
2013 (add_filename_to_list): Use completion_list instead of a VEC.
2014 (add_partial_filename_data::list): Now a completion_list.
2015 (make_source_files_completion_list): Work with a completion_list
2016 instead of a VEC.
2017 * symtab.h: Include "completer.h".
2018 (default_make_symbol_completion_list_break_on)
2019 (default_make_symbol_completion_list, make_symbol_completion_list)
2020 (make_symbol_completion_type, make_file_symbol_completion_list)
2021 (make_source_files_completion_list): Delete.
2022 (default_collect_symbol_completion_matches_break_on)
2023 (default_collect_symbol_completion_matches)
2024 (collect_symbol_completion_matches)
2025 (collect_symbol_completion_matches_type)
2026 (collect_file_symbol_completion_matches)
2027 (make_source_files_completion_list): New.
2028 * top.c (init_main): Don't install a rl_completion_entry_function
2029 hook. Install a rl_attempted_completion_function hook instead.
2030 * tui/tui-layout.c (layout_completer): Adjust to work with a
2031 completion_tracker.
2032 * tui/tui-regs.c (tui_reggroup_completer):
2033 * tui/tui-win.c (window_name_completer, focus_completer)
2034 (winheight_completer): Adjust to work with a completion_tracker.
2035 * value.c: Include "completer.h".
2036 (complete_internalvar): Adjust to work with a completion_tracker.
2037 * value.h (complete_internalvar): Likewise.
2038
6e1dbf8c
PA
20392017-07-17 Pedro Alves <palves@redhat.com>
2040
2041 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2042 renames.
2043 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2044 comments to completer_ftype's declaration.
2045 <completer_handle_brkchars>: Change type to
2046 completer_handle_brkchars_ftype.
2047 * command.h (completer_ftype): Add describing comment and give
2048 names to parameters.
2049 (completer_ftype_void): Rename to ...
2050 (completer_handle_brkchars_ftype) ... this. Add describing comment.
2051 (set_cmd_completer_handle_brkchars): Adjust.
2052 * completer.c (filename_completer_handle_brkchars): New function.
2053 (complete_line_internal_normal_command): New function, factored
2054 out from ...
2055 (complete_line_internal): ... here.
2056 (command_completer_handle_brkchars)
2057 (default_completer_handle_brkchars)
2058 (completer_handle_brkchars_func_for_completer): New functions.
2059 * completer.h (set_gdb_completion_word_break_characters): Delete
2060 declaration.
2061 (completer_handle_brkchars_func_for_completer): New declaration.
2062 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2063 completer_handle_brkchars_func_for_completer.
2064
78b13106
PA
20652017-07-17 Pedro Alves <palves@redhat.com>
2066
2067 * completer.c (symbol_completer): New function, based on
2068 make_symbol_completion_list_fn.
2069 * completer.h (symbol_completer): New declaration.
2070 * guile/scm-cmd.c (cmdscm_completers): Adjust.
2071 * python/py-cmd.c (completers): Adjust.
2072 * symtab.c (make_symbol_completion_list_fn): Delete.
2073 * symtab.h (make_symbol_completion_list_fn): Delete.
2074 * cli/cli-decode.c (add_cmd): Adjust.
2075
bbf2f4df
PA
20762017-07-17 Pedro Alves <palves@redhat.com>
2077
2078 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2079 * dwarf2read.c: Include "filename-seen-cache.h".
2080 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2081 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2082 * filename-seen-cache.c: New file.
2083 * filename-seen-cache.h: New file.
2084 * symtab.c: Include "filename-seen-cache.h".
2085 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2086 (create_filename_seen_cache, clear_filename_seen_cache)
2087 (delete_filename_seen_cache, filename_seen): Delete, parts moved
2088 to filename-seen-cache.h/filename-seen-cache.c.
2089 (output_source_filename, sources_info)
2090 (maybe_add_partial_symtab_filename)
2091 (make_source_files_completion_list): Adjust to use
2092 filename_seen_cache.
2093
330cdd98
PA
20942017-07-17 Pedro Alves <palves@redhat.com>
2095
2096 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2097 fields.
2098 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2099 dwarf2_debug_sections*)): New.
2100 (dwarf2_per_objfile::dwarf2_per_objfile(const
2101 dwarf2_per_objfile&)): Declare as deleted.
2102 (dwarf2_per_objfile::operator=): Declare as deleted.
2103 (dwarf2_per_objfile::dwarf2_per_objfile)
2104 (dwarf2_per_objfile::~dwarf2_per_objfile)
2105 (dwarf2_per_objfile::free_cached_comp_units): New.
2106 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2107 ctor. Call dwarf2_per_objfile's ctor manually.
2108 (dwarf2_locate_sections): Deleted/refactored as ...
2109 (dwarf2_per_objfile::locate_sections): ... this new method.
2110 (free_cached_comp_units): Defer to
2111 dwarf2_per_objfile::free_cached_comp_units.
2112 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2113
8880f2a9
TT
21142017-07-14 Tom Tromey <tom@tromey.com>
2115
2116 PR rust/21764:
2117 * rust-exp.y (convert_ast_to_expression): Add "want_type"
2118 parameter.
2119 <UNOP_SIZEOF>: Split into separate case.
2120 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
2121
65547233
TT
21222017-07-14 Tom Tromey <tom@tromey.com>
2123
2124 PR rust/21763:
2125 * symtab.c (symbol_matches_domain): Add language_rust to special
2126 case.
2127 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2128 treat LOC_TYPEDEF symbols as variables.
2129
8f14146e
PA
21302017-07-14 Pedro Alves <palves@redhat.com>
2131
2132 * symtab.c (make_file_symbol_completion_list_1): Iterate over
2133 symtabs matching all symtabs with SRCFILE as file name instead of
2134 only considering the first hit, with lookup_symtab.
2135
2347965c
SM
21362017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2137
2138 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2139 operator_name parameters.
2140 (gen_expr): Update function call.
2141
40f4af28
SM
21422017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2143
2144 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2145 parameter.
2146 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2147 Likewise.
2148 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2149 parameter, use agent_expr::gdbarch instead, update function
2150 calls.
2151 (locexpr_tracepoint_var_ref): Likewise.
2152 (loclist_tracepoint_var_ref): Likewise.
2153 * ax-gdb.c (gen_trace_static_fields): Likewise.
2154 (gen_traced_pop): Likewise.
2155 (gen_frame_args_address): Likewise.
2156 (gen_frame_locals_address): Likewise.
2157 (gen_var_ref): Likewise.
2158 (gen_struct_ref_recursive): Likewise.
2159 (gen_static_field): Likewise.
2160 (gen_maybe_namespace_elt): Likewise.
2161 (gen_expr): Likewise.
2162 (gen_trace_for_var): Likewise.
2163 (gen_trace_for_expr): Likewise.
2164 (gen_trace_for_return_address): Likewise.
2165
053f8057
SM
21662017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2167
2168 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2169 parameter.
2170 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2171
6661ad48
SM
21722017-07-14 Simon Marchi <simon.marchi@ericsson.com>
2173
2174 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2175 from ax, update calls.
2176 (gen_usual_arithmetic): Likewise.
2177 (gen_integral_promotions): Likewise.
2178 (gen_bitfield_ref): Likewise.
2179 (gen_primitive_field): Likewise.
2180 (gen_struct_ref_recursive): Likewise.
2181 (gen_struct_ref): Likewise.
2182 (gen_maybe_namespace_elt): Likewise.
2183 (gen_struct_elt_for_reference): Likewise.
2184 (gen_namespace_elt): Likewise.
2185 (gen_aggregate_elt_ref): Likewise.
2186 (gen_expr): Get gdbarch from ax, update calls.
2187 (gen_expr_binop_rest): Likewise.
2188
c55a47e7
PA
21892017-07-13 Pedro Alves <palves@redhat.com>
2190
2191 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2192 as default tdesc.
2193 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2194 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2195 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2196 tdesc_amd64_linux as default tdesc. Get final tdesc from the
2197 tdep.
2198 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2199 Get final tdesc from the tdep.
2200 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2201 default tdesc.
2202 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2203 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2204 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2205 Use it as default tdesc.
2206 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2207 down to amd_init_abi. No longer handle fallback tdesc here.
2208 * amd64-tdep.h (tdesc_x32): Declare.
2209 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2210 parameter.
2211 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2212 as default tdesc.
2213
55efceab
AA
22142017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2215
2216 * s390-linux-tdep.c (s390_process_record): Add support for
2217 instructions new in arch12.
2218
0aa37b65
JB
22192017-07-11 John Baldwin <jhb@FreeBSD.org>
2220
2221 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2222 PT_GETFSBASE and PT_GETGSBASE.
2223 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2224 PT_SETGSBASE.
2225
48aeef91
JB
22262017-07-11 John Baldwin <jhb@FreeBSD.org>
2227
2228 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2229 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2230 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2231 those rules.
2232 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2233 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2234 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2235 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2236 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2237 * features/i386/amd64.xml: Add 64bit-segments.xml.
2238 * features/i386/amd64-avx-avx512.c: Regenerated.
2239 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2240 * features/i386/amd64-avx-mpx.c: Regenerated.
2241 * features/i386/amd64-avx.c: Regenerated.
2242 * features/i386/amd64-mpx.c: Regenerated.
2243 * features/i386/amd64.c: Regenerated.
2244 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2245 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2246 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2247 * regformats/i386/amd64-avx.dat: Regenerated.
2248 * regformats/i386/amd64-mpx.dat: Regenerated.
2249 * regformats/i386/amd64.dat: Regenerated.
2250
77c501bc
YQ
22512017-07-10 Yao Qi <yao.qi@linaro.org>
2252
2253 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2254 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2255
6dc8d757
AK
22562017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
2257
2258 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2259 unsetenv.
2260 * gnulib/aclocal.m4: Regenerate.
2261 * gnulib/config.in: Regenerate.
2262 * gnulib/configure: Regenerate.
2263 * gnulib/import/Makefile.am: Regenerate.
2264 * gnulib/import/Makefile.in: Regenerate.
2265 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2266 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2267 * gnulib/import/m4/environ.m4: New file.
2268 * gnulib/import/m4/setenv.m4: New file.
2269 * gnulib/import/setenv.c: New file.
2270 * gnulib/import/unsetenv.c: New file.
2271
266934d1
SM
22722017-07-09 Simon Marchi <simon.marchi@ericsson.com>
2273
2274 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2275 address when op is DW_OP_addr.
2276
03278692
TT
22772017-07-09 Tom Tromey <tom@tromey.com>
2278
2279 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2280 check and apply to outer type.
2281
4b654465
JB
22822017-07-07 John Baldwin <jhb@FreeBSD.org>
2283
2284 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2285 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2286 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2287 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2288
2af9fc44
JB
22892017-07-07 John Baldwin <jhb@FreeBSD.org>
2290
2291 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2292
382b69bb
JB
22932017-07-07 John Baldwin <jhb@FreeBSD.org>
2294
2295 * corelow.c (get_core_siginfo): Remove.
2296 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2297 instead of get_core_siginfo.
2298 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2299 * gdbarch.h: Re-generate.
2300 * gdbarch.c: Re-generate.
2301 * linux-tdep.c (linux_core_xfer_siginfo): New.
2302 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2303
6e5eab33
JB
23042017-07-07 John Baldwin <jhb@FreeBSD.org>
2305
2306 * corelow.c (thread_section_name): Move to ...
2307 * gdbcore.h (thread_section_name): ... here.
2308
929edea9
JB
23092017-07-07 John Baldwin <jhb@FreeBSD.org>
2310
2311 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2312 (struct siginfo32): New.
2313 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2314 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2315 via ptrace(PT_LWPINFO).
2316
762c974a
JB
23172017-07-07 John Baldwin <jhb@FreeBSD.org>
2318
2319 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2320 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2321 (fbsd_get_siginfo_type): New.
2322 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2323 (_initialize_fbsd_tdep): New.
2324
33c5cd75
DB
23252017-07-06 David Blaikie <dblaikie@gmail.com>
2326
2327 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2328 a singular dwo_unit*) to support multiple CUs in the same way that
2329 multiple TUs are supported.
2330 (create_cus_hash_table): Replace create_dwo_cu with a function for
2331 parsing multiple CUs from a DWO file.
2332 (open_and_init_dwo_file): Use create_cus_hash_table rather than
2333 create_dwo_cu.
2334 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2335 htab_find, rather than comparing the signature to a singleton CU in
2336 the dwo_file.
2337
8455d262
PA
23382017-07-06 Pedro Alves <palves@redhat.com>
2339
2340 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2341
4da3eb35
PA
23422017-07-04 Pedro Alves <palves@redhat.com>
2343
2344 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2345 * gdbtypes.h (TYPE_STATIC): Delete.
2346 (struct fn_field) <is_public, is_abstract, is_static, is_final,
2347 is_synchronized, is_native>: Delete.
2348 <dummy>: Bump.
2349 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2350 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2351 (TYPE_FN_FIELD_ABSTRACT): Delete.
2352
5bfd255c
SM
23532017-07-03 Simon Marchi <simon.marchi@ericsson.com>
2354
2355 * buffer.h (buffer_finish): Fix spelling mistakes.
2356
25c54127
EZ
23572017-07-01 Eli Zaretskii <eliz@gnu.org>
2358
2359 * .dir-locals.el: Automatically switch to C-style comments in
2360 versions of Emacs that support the feature.
2361
dc4bde35
SDJ
23622017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2363 Pedro Alves <palves@redhat.com>
2364
2365 PR cli/21688
2366 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2367 (process_next_line): New variable 'inline_cmd'.
2368 Adjust 'if' clauses for "python", "compile" and "guile" to use
2369 'command_name_equals' and check for '!inline_cmd'.
2370
51ed89aa
SDJ
23712017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
2372
2373 PR cli/21688
2374 * cli/cli-script.c (command_name_equals_not_inline): New function.
2375 (process_next_line): Adjust 'if' clauses for "python", "compile"
2376 and "guile" to use command_name_equals_not_inline.
2377
eb17d413
PA
23782017-06-29 Pedro Alves <palves@redhat.com>
2379
2380 * completer.c (expression_completer): Call
2381 linespec_location_completer instead of location_completer.
2382
195bcdd5
PA
23832017-06-29 Pedro Alves <palves@redhat.com>
2384
2385 * completer.c (expression_completer): Remove code that recomputes
2386 'text' from 'word'.
2387
adc764e7
YQ
23882017-06-29 Yao Qi <yao.qi@linaro.org>
2389
2390 * regformats/regdat.sh: Generate code with
2391 "ifndef IN_PROCESS_AGENT".
2392
6e75794e
PA
23932017-06-28 Pedro Alves <palves@redhat.com>
2394
2395 * command.h: Include "common/scoped_restore.h".
2396
bc491f2e
YQ
23972017-06-28 Yao Qi <yao.qi@linaro.org>
2398
2399 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2400 instead of obstack_grow.
2401
41664b45
DG
24022017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
2403
2404 PR gdb/21337
2405 * symfile.c (reread_symbols): Call objfiles_changed just before
2406 read_symbols.
2407
6da67eb1
PA
24082017-06-27 Pedro Alves <palves@redhat.com>
2409
2410 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2411 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2412 (completion_list_add_symbol, completion_list_add_msymbol):
2413 ... these new functions.
2414 (add_symtab_completions)
2415 (default_make_symbol_completion_list_break_on_1): Adjust.
2416
23732b1e
PA
24172017-06-27 Pedro Alves <palves@redhat.com>
2418
2419 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2420 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
2421 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2422 dtor.
2423 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
2424 'storage_obstack' field an auto_obstack. In-class initialize all
2425 non-bitfield fields. Make minsyms_read bool.
2426 * symfile.c (read_symbols): Adjust.
2427
a4d1e79a
AH
24282017-06-27 Alan Hayward <alan.hayward@arm.com>
2429
2430 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2431 (gdbsim_store_register): Likewise.
2432
8268c778
PA
24332017-06-27 Pedro Alves <palves@redhat.com>
2434
2435 * c-exp.y (name_obstack): Now an auto_obstack.
2436 (yylex): Use auto_obstack::clear.
2437 (c_parse): Use auto_obstack::clear instead of reinitializing and
2438 freeing the obstack.
2439 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2440 * d-exp.y (name_obstack): Now an auto_obstack.
2441 (yylex): Use auto_obstack::clear.
2442 (d_parse): Use auto_obstack::clear instead of reinitializing and
2443 freeing the obstack.
2444 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2445 auto_obstack.
2446 * dwarf2read.c (create_addrmap_from_index)
2447 (dwarf2_build_psymtabs_hard)
2448 (update_enumeration_type_from_children): Likewise.
2449 * gdb_obstack.h (auto_obstack): New type.
2450 * go-exp.y (name_obstack): Now an auto_obstack.
2451 (build_packaged_name): Use auto_obstack::clear.
2452 (go_parse): Use auto_obstack::clear instead of reinitializing and
2453 freeing the obstack.
2454 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2455 auto_obstack.
2456 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2457 * rust-exp.y (work_obstack): Now an auto_obstack.
2458 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2459 reinitializing and freeing the obstack.
2460 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2461 (host_char_to_target): Use auto_obstack.
2462 * utils.h (make_cleanup_obstack_free): Delete declaration.
2463 * valprint.c (generic_emit_char, generic_printstr): Use
2464 auto_obstack.
2465
db665f42
SM
24662017-06-27 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2469 thread.
2470 (darwin_init_thread_list): Don't update dummy thread.
2471 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2472
873c0814
SM
24732017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2474
2475 * record-full.c (netorder16): Remove.
2476
8b5a7a6e
SM
24772017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 * common/diagnostics.h: Define macros for GCC.
2480 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2481 * common/vec.h: Include diagnostics.h.
2482 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2483 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2484 warning.
2485
d1435379
SM
24862017-06-26 Simon Marchi <simon.marchi@ericsson.com>
2487
2488 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2489 New macro.
2490 * ada-lex.l: Ignore deprecated register warnings.
2491
cc75e0fd
SM
24922017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2493
2494 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2495 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2496
07809eaf
SM
24972017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2498
2499 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2500 its own line.
2501
f076f034
SM
25022017-06-25 Simon Marchi <simon.marchi@ericsson.com>
2503
2504 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2505
0dd5cbc5
AH
25062017-06-23 Alan Hayward <alan.hayward@arm.com>
2507
2508 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2509 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2510 (xtensa_register_read_masked): Likewise.
2511
d4c6ce5b
SDJ
25122017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
2513
2514 * common/environ.c (gdb_environ::unset): Update comment.
2515
16892a03
AH
25162017-06-22 Alan Hayward <alan.hayward@arm.com>
2517
2518 * python/py-unwind.c (pyuw_sniffer): Allocate space for
2519 registers.
2520
d7dcbefc
AH
25212017-06-22 Alan Hayward <alan.hayward@arm.com>
2522
2523 * record-full.c (record_full_exec_insn): Use byte_vector.
2524
b30ff123
YQ
25252017-06-22 Yao Qi <yao.qi@linaro.org>
2526
2527 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
2528 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2529
4fa847d7
AH
25302017-06-22 Alan Hayward <alan.hayward@arm.com>
2531
2532 * remote.c (cached_reg): Move from here...
2533 * regcache.h (cached_reg): ...to here.
2534 * python/py-unwind.c (struct reg_info): Remove.
2535 (cached_frame_info): Use cached_reg_t.
2536 (pyuw_prev_register): Likewise.
2537 (pyuw_sniffer): Use cached_reg_t and allocate registers.
2538 (pyuw_dealloc_cache): Free all registers.
2539
f4906a9a
PA
25402017-06-22 Pedro Alves <palves@redhat.com>
2541 Simon Marchi <simon.marchi@ericsson.com>
2542
2543 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
2544 warning.
2545 * common/diagnostics.h: New file.
2546
b45a1208
PA
25472017-06-22 Pedro Alves <palves@redhat.com>
2548
2549 * common/agent.h: Add include guards.
2550
e4da2c61
SM
25512017-06-21 Simon Marchi <simon.marchi@ericsson.com>
2552
2553 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
2554 talk about addressable units instead of bytes.
2555
96160d60
SDJ
25562017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2557
2558 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
2559 of '::const_iterator'.
2560
9a6c7d9c
SDJ
25612017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2562
2563 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2564 'unittests/environ-selftests.c'.
2565 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
2566 * charset.c (find_charset_names): Declare object 'iconv_env'.
2567 Update code to use 'iconv_env' object. Remove call to
2568 'free_environ'.
2569 * common/environ.c: Include <utility>.
2570 (make_environ): Delete function.
2571 (free_environ): Delete function.
2572 (gdb_environ::clear): New function.
2573 (gdb_environ::operator=): New function.
2574 (gdb_environ::get): Likewise.
2575 (environ_vector): Delete function.
2576 (set_in_environ): Delete function.
2577 (gdb_environ::set): New function.
2578 (unset_in_environ): Delete function.
2579 (gdb_environ::unset): New function.
2580 (gdb_environ::envp): Likewise.
2581 * common/environ.h: Include <vector>.
2582 (struct gdb_environ): Delete; transform into...
2583 (class gdb_environ): ... this class.
2584 (free_environ): Delete prototype.
2585 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
2586 environ_vector): Likewise.
2587 * infcmd.c (run_command_1): Update code to call
2588 'envp' from 'gdb_environ' class.
2589 (environment_info): Update code to call methods from 'gdb_environ'
2590 class.
2591 (unset_environment_command): Likewise.
2592 (path_info): Likewise.
2593 (path_command): Likewise.
2594 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
2595 (inferior::inferior): Initialize 'environment' using the host's
2596 information.
2597 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
2598 Include "environ.h".
2599 (class inferior) <environment>: Change type from 'struct
2600 gdb_environ' to 'gdb_environ'.
2601 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
2602 methods from 'gdb_environ' class.
2603 * solib.c (solib_find_1): Likewise
2604 * unittests/environ-selftests.c: New file.
2605
75c554cf
YQ
26062017-06-20 Yao Qi <yao.qi@linaro.org>
2607
2608 * features/i386/i386-linux.xml: Exchange the order of including
2609 32bit-linux.xml and 32bit-sse.xml.
2610 * features/i386/i386-linux.c: Regenerated.
2611
72ddacb7
YQ
26122017-06-20 Yao Qi <yao.qi@linaro.org>
2613
2614 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
2615 Delete copy ctor and assignment operator.
2616 (tdesc_type): Likewise.
2617 (tdesc_feature): Likewise.
2618 (tdesc_free_reg): Remove.
2619 (tdesc_create_reg): Use new.
2620 (tdesc_free_type): Remove.
2621 (tdesc_create_vector): Use new.
2622 (tdesc_create_union): Likewise.
2623 (tdesc_create_flags): Likewise.
2624 (tdesc_create_enum): Likewise.
2625 (tdesc_free_feature): Delete.
2626 (free_target_description): Use delete.
2627
325c9fd4
JB
26282017-06-19 John Baldwin <jhb@FreeBSD.org>
2629
2630 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
2631 registers.
2632
16b7a719
PA
26332017-06-19 Pedro Alves <palves@redhat.com>
2634
2635 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
2636 after gdb::unlinker.
2637
1c8e01c9
SDJ
26382017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
2639
2640 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
2641 gdb_environ to access an environment variable.
2642
ffce45d2
TP
26432017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2644
2645 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
2646 gdb_byte*.
2647
1d4fbac9
SM
26482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2649
2650 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
2651
8465943a
SM
26522017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * configure: Re-generate.
2655 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
2656
3e019bdc
SM
26572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2658
2659 * configure: Re-generate.
2660 * warning.m4: Pass -Werror to compiler when checking for
2661 supported warning flags.
2662
cf0dd6f0
SM
26632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2664
2665 * Makefile.in (COMPILE.pre): Add "-x c++".
2666
6f98355c
YQ
26672017-06-16 Alan Hayward <alan.hayward@arm.com>
2668 Pedro Alves <palves@redhat.com>
2669 Yao Qi <yao.qi@linaro.org>
2670
2671 * defs.h (RequireLongest): New.
2672 (extract_integer): Declare function template.
2673 (extract_signed_integer): Remove the declaration, but define it
2674 static inline.
2675 (extract_unsigned_integer): Likewise.
2676 (store_integer): Declare function template.
2677 (store_signed_integer): Remove the declaration, but define it
2678 static inline.
2679 (store_unsigned_integer): Likewise.
2680 * findvar.c (extract_integer): New function template.
2681 (extract_signed_integer): Remove.
2682 (extract_unsigned_integer): Remove.
2683 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
2684 instantiations.
2685 (store_integer): New function template.
2686 (store_signed_integer): Remove.
2687 (store_unsigned_integer): Remove.
2688 (store_integer): Explicit instantiations.
2689 * regcache.c (regcache_raw_read_signed): Update.
2690 (regcache::raw_read): New function.
2691 (regcache::raw_read_signed): Remove.
2692 (regcache::raw_read_unsigned): Remove.
2693 (regcache_raw_read_unsigned): Update.
2694 (regcache_raw_write_unsigned): Update.
2695 (regcache::raw_write_signed): Remove.
2696 (regcache::raw_write): New function.
2697 (regcache_cooked_read_signed): Update.
2698 (regcache::raw_write_unsigned): Remove.
2699 (regcache::cooked_read_signed): Remove.
2700 (regcache_cooked_read_unsigned): Update.
2701 (regcache::cooked_read_unsigned): Remove.
2702 (regcache_cooked_write_signed): Update.
2703 (regcache_cooked_write_unsigned): Update.
2704 * regcache.h (regcache) <raw_read_signed>: Remove.
2705 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
2706 <raw_read, raw_write>: New.
2707 <cooked_read_signed, cooked_write_signed>: Remove.
2708 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
2709 <cooked_read, cooked_write>: New.
2710 * sh64-tdep.c (sh64_pseudo_register_read): Update.
2711 (sh64_pseudo_register_write): Update.
2712
a87dc45a
AK
27132017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
2714
2715 * arc-tdep.c (arc_disassembler_options): New variable.
2716 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
2717 of default_print_insn.
2718 (arc_delayed_print_insn): Set info->section when needed,
2719 use default_print_insn to retrieve a disassembler.
2720
45159d6a
SDJ
27212017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
2722
2723 PR gdb/21574
2724 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
2725 to mention $SHELL and startup-with-shell.
2726
b46c4cf0
MF
27272017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2728
2729 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
2730
6394c606
YQ
27312017-06-14 Yao Qi <yao.qi@linaro.org>
2732
2733 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
2734 default_print_insn instead of print_insn_aarch64.
2735 * arm-tdep.c (gdb_print_insn_arm): Call
2736 default_print_insn instead of print_insn_big_arm
2737 and print_insn_little_arm.
2738 * i386-tdep.c (i386_print_insn): Call default_print_insn
2739 instead of print_insn_i386.
2740 * ia64-tdep.c (ia64_print_insn): Call
2741 default_print_insn instead of print_insn_ia64.
2742 * mips-tdep.c (gdb_print_insn_mips): Call
2743 default_print_insn instead of print_insn_big_mips
2744 and print_insn_little_mips.
2745 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
2746 instead of print_insn_spu.
2747
d5722aa2
PA
27482017-06-14 Pedro Alves <palves@redhat.com>
2749
2750 * ada-lang.c: Include "common/byte-vector.h".
2751 (ada_value_primitive_packed_val): Use gdb::byte_vector.
2752 * charset.c (wchar_iterator::iterate): Resize the vector instead
2753 of reserving it.
2754 * common/byte-vector.h: Include "common/def-vector.h".
2755 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
2756 * cli/cli-dump.c: Include "common/byte-vector.h".
2757 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
2758 * common/byte-vector.h: New file.
2759 * common/def-vector.h: New file.
2760 * common/default-init-alloc.h: New file.
2761 * dwarf2loc.c: Include "common/byte-vector.h".
2762 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
2763 instead of reserving it.
2764 * dwarf2read.c: Include "common/byte-vector.h".
2765 (data_buf::m_vec): Now a gdb::byte_vector.
2766 * gdb_regex.c: Include "common/def-vector.h".
2767 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
2768 * mi/mi-main.c: Include "common/byte-vector.h".
2769 (mi_cmd_data_read_memory): Use gdb::byte_vector.
2770 * printcmd.c: Include "common/byte-vector.h".
2771 (print_scalar_formatted): Use gdb::byte_vector.
2772 * valprint.c: Include "common/byte-vector.h".
2773 (maybe_negate_by_bytes, print_decimal_chars): Use
2774 gdb::byte_vector.
2775
01ec7a27
SM
27762017-06-13 Simon Marchi <simon.marchi@ericsson.com>
2777
2778 * darwin-nat.c: Include "nat/fork-inferior.h".
2779
848d9074
SM
27802017-06-13 Simon Marchi <simon.marchi@ericsson.com>
2781
2782 * configure.nat: Factor out Darwin bits that are not
2783 architecture-specific. Add fork-inferior.o.
2784
3b912944
SM
27852017-06-13 Simon Marchi <simon.marchi@ericsson.com>
2786
2787 * configure.nat: Factor out AIX bits that are not
2788 architecture-specific. Add fork-inferior.o.
2789
55acdf22
AA
27902017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2791
2792 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
2793 (read_pieced_value, write_pieced_value): ...here. Reduce to
2794 wrappers that just call rw_pieced_value.
2795
f65e2044
AA
27962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2797
2798 * dwarf2loc.c (write_pieced_value): When writing the data for a
2799 memory piece, use write_memory_with_notification instead of
2800 write_memory.
2801
23f945bf
AA
28022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2803
2804 * valops.c (read_value_memory): Change embedded_offset to
2805 represent a bit offset instead of a byte offset.
2806 * value.h (read_value_memory): Adjust comment.
2807
f236533e
AA
28082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2809
2810 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
2811 dest_offset_bits and source_offset_bits.
2812 (write_pieced_value): Likewise.
2813
65d84b76
AA
28142017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2815
2816 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
2817 given by DW_OP_bit_piece.
2818 (write_pieced_value): Likewise.
2819
242d31ab
AA
28202017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2821
2822 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
2823 some other preparations to the places where sufficient information
2824 is available.
2825 (write_pieced_value): Likewise.
2826
03c8af18
AA
28272017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2828
2829 * dwarf2loc.c (bits_to_bytes): New function.
2830 (read_pieced_value): Fix offset calculations for register pieces
2831 on big-endian targets.
2832 (write_pieced_value): Likewise.
2833
840989c1
AA
28342017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2835
2836 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
2837 (write_pieced_value): Likewise.
2838
359b19bb
AA
28392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2840
2841 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
2842 transfer the source value's least significant bits, instead of its
2843 lowest-addressed ones. Rename type_len to max_offset.
2844 (read_pieced_value): Mirror above changes to write_pieced_value as
2845 applicable.
2846
07c9ca3b
AA
28472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2848
2849 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
2850 truncate full bytes from dest_offset_bits before using it as an
2851 offset into the buffer.
2852
f1cc9874
AA
28532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2854
2855 * dwarf2loc.c (write_pieced_value): Include transfer size in
2856 byte-wise check.
2857
cdaac320
AA
28582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2859
2860 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
2861 calculation of this_size.
2862
af547a96
AA
28632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2864
2865 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
2866 when targeting a bit-field.
2867 (write_pieced_value): Likewise.
2868
ddd7882a
AA
28692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2870
2871 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
2872 (allocate_piece_closure): Drop addr_size parameter.
2873 (dwarf2_evaluate_loc_desc_full): Adjust call to
2874 allocate_piece_closure.
2875
e9352324
AA
28762017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2877
2878 PR gdb/21226
2879 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
2880 the LSB end, independent of endianness.
2881
d5d1163e
AA
28822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2883
2884 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
2885 size capping.
2886
032bb6ea
YQ
28872017-06-13 Yao Qi <yao.qi@linaro.org>
2888
2889 * mips-linux-nat.c: Move include features/mips*-linux.c to
2890 mips-linux-tdep.c.
2891 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
2892 to mips-linux-tdep.c.
2893 * mips-linux-tdep.c: Include features/mips*-linux.c
2894 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
2895 functions.
2896 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
2897 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
2898 (tdesc_mips64_dsp_linux): Declare.
2899
f12f6bad
TT
29002017-06-12 Tom Tromey <tom@tromey.com>
2901
2902 * valprint.h (val_print_type_code_int): Remove.
2903 * valprint.c (generic_val_print_int): Always call
2904 val_print_scalar_formatted.
2905 (val_print_type_code_int): Remove.
2906 * printcmd.c (print_scalar_formatted): Handle options->format==0.
2907 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
2908 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
2909 * ada-valprint.c (ada_val_print_num): Use
2910 val_print_scalar_formatted.
2911
d9109c80
TT
29122017-06-12 Tom Tromey <tom@tromey.com>
2913
2914 * printcmd.c (print_scalar_formatted): Unify the two switches.
2915 Don't convert scalars to LONGEST.
2916
4ac0cb1c
TT
29172017-06-12 Tom Tromey <tom@tromey.com>
2918
2919 PR exp/16225:
2920 * valprint.h (print_decimal_chars): Update.
2921 * valprint.c (maybe_negate_by_bytes): New function.
2922 (print_decimal_chars): Add "is_signed" argument.
2923 * printcmd.c (print_scalar_formatted): Update.
2924
30a25466
TT
29252017-06-12 Tom Tromey <tom@tromey.com>
2926
2927 PR exp/16225:
2928 * valprint.h (print_binary_chars, print_hex_chars): Update.
2929 * valprint.c (val_print_type_code_int): Update.
2930 (print_binary_chars): Add "zero_pad" argument.
2931 (emit_octal_digit): New function.
2932 (print_octal_chars): Don't zero-pad.
2933 (print_decimal_chars): Likewise.
2934 (print_hex_chars): Add "zero_pad" argument.
2935 * sh64-tdep.c (sh64_do_fp_register): Update.
2936 * regcache.c (regcache::dump): Update.
2937 * printcmd.c (print_scalar_formatted): Update.
2938 * infcmd.c (default_print_one_register_info): Update.
2939
b3464d03
PA
29402017-06-12 Pedro Alves <palves@redhat.com>
2941 Alan Hayward <alan.hayward@arm.com>
2942
2943 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
2944 (mips_eabi_push_dummy_call): Rename local 'regsize' to
2945 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
2946 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
2947 Assert that abi_regsize bytes fit in 'ref_valbuf'.
2948
4b76cda9
PA
29492017-06-12 Pedro Alves <palves@redhat.com>
2950
2951 * dwarf2read.c (mapped_symtab::data): Now a vector of
2952 symtab_index_entry instead of vector of
2953 std::unique_ptr<symtab_index_entry>. All users adjusted to check
2954 whether an element's name is NULL instead of checking whether the
2955 element itself is NULL.
2956 (find_slot): Change return type. Adjust.
2957 (hash_expand, , add_index_entry, uniquify_cu_indices)
2958 (write_hash_table): Adjust.
2959
e8f8bcb3
PA
29602017-06-12 Pedro Alves <palves@redhat.com>
2961
2962 * dwarf2read.c (recursively_count_psymbols): New function.
2963 (write_psymtabs_to_index): Call it to compute number of psyms and
2964 pass estimate size of psyms_seen to unordered_set's ctor.
2965
70a1152b
PA
29662017-06-12 Pedro Alves <palves@redhat.com>
2967
2968 * dwarf2read.c (write_hash_table): Check if key already exists
2969 before emplacing.
2970
c2f134ac
PA
29712017-06-12 Pedro Alves <palves@redhat.com>
2972
2973 * dwarf2read.c (data_buf::append_space): Rename to...
2974 (data_buf::grow): ... this, and make private. Adjust all callers.
2975 (data_buf::append_uint): New method.
2976 (add_address_entry, write_one_signatured_type)
2977 (write_psymtabs_to_index): Use it.
2978
a81e6d4d
PA
29792017-06-12 Pedro Alves <palves@redhat.com>
2980
2981 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
2982 (file_write (FILE *, const std::vector<Elem>&)): Delete.
2983 (data_buf::file_write): Call ::fwrite directly.
2984
6fd931f2
PA
29852017-06-12 Pedro Alves <palves@redhat.com>
2986
2987 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
2988 std::vector::erase.
2989
bc8f2430
JK
29902017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2991
2992 Code cleanup: C++ify .gdb_index producer.
2993 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
2994 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
2995 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
2996 (create_strtab, add_string): Remove.
2997 (file_write, data_buf): New.
2998 (struct symtab_index_entry): Use std::vector for cu_indices.
2999 (struct mapped_symtab): Use std::vector for data.
3000 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3001 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3002 Remove.
3003 (find_slot): Change return type. Update it to the new data structures.
3004 (hash_expand, add_index_entry): Update it to the new data structures.
3005 (offset_type_compare): Remove.
3006 (uniquify_cu_indices): Update it to the new data structures.
3007 (c_str_view, c_str_view_hasher, vector_hasher): New.
3008 (add_indices_to_cpool): Remove.
3009 (write_hash_table): Update it to the new data structures.
3010 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3011 (eq_psymtab_cu_index): Remove.
3012 (psym_index_map): New typedef.
3013 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3014 reference and std::unordered_map for cu_index_htab.
3015 (add_address_entry, add_address_entry_worker, write_address_map)
3016 (write_psymbols): Update it to the new data structures.
3017 (write_obstack): Remove.
3018 (struct signatured_type_index_data): Change types_list to a data_buf
3019 reference and psyms_seen to a std::unordered_set reference.
3020 (write_one_signatured_type, recursively_write_psymbols)
3021 (write_psymtabs_to_index): Update it to the new data structures.
3022
c4dcb155
SM
30232017-06-11 Simon Marchi <simon.marchi@ericsson.com>
3024
3025 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3026 separate-debug-file commands.
3027 * symfile.h (separate_debug_file_debug): New global.
3028 * symfile.c (separate_debug_file_debug): New global.
3029 (separate_debug_file_exists, find_separate_debug_file): Add
3030 debug output.
3031 (_initialize_symfile): Add "set debug separate-debug-file"
3032 command.
3033 * build-id.c (build_id_to_debug_bfd,
3034 find_separate_debug_file_by_buildid): Add debug output.
3035
6d45d4b4
SM
30362017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3037
3038 * gdbarch.sh (displaced_step_free_closure): Remove.
3039 * gdbarch.h, gdbarch.c: Re-generate.
3040 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3041 displaced_step_free_closure.
3042 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3043 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3044 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3045 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3046 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3047 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3048 * arch-utils.h (simple_displaced_step_free_closure): Remove.
3049 * arch-utils.c (simple_displaced_step_free_closure): Remove.
3050 * infrun.c (displaced_step_clear): Call xfree instead of
3051 gdbarch_displaced_step_free_closure.
3052
2f91880f
SDJ
30532017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
3054
3055 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3056 NULL".
3057
b8b6e72f
AH
30582017-06-08 Alan Hayward <alan.hayward@arm.com>
3059
3060 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3061 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3062 (mn10300_push_dummy_call): Likewise.
3063
5369082e
AH
30642017-06-08 Alan Hayward <alan.hayward@arm.com>
3065
3066 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3067
ff4ca5ac
AH
30682017-06-08 Alan Hayward <alan.hayward@arm.com>
3069
3070 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3071
aefd8b33
SDJ
30722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3073
3074 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3075 able to start inferiors using a shell.
3076 (New remote packets): Announce new packet "QStartupWithShell".
3077 * remote.c: Add PACKET_QStartupWithShell.
3078 (extended_remote_create_inferior): Handle new
3079 PACKET_QStartupWithShell.
3080 (remote_protocol_features) <QStartupWithShell>: New entry for
3081 PACKET_QStartupWithShell.
3082 (_initialize_remote): Call "add_packet_config_cmd" for
3083 QStartupShell.
3084
2090129c
SDJ
30852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3086 Pedro Alves <palves@redhat.com>
3087
3088 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3089 and "nat/fork-inferior.h".
3090 * common/common-inferior.h: New file, with contents from
3091 "gdb/inferior.h".
3092 * commom/common-utils.c: Include "common-utils.h".
3093 (stringify_argv): New function.
3094 * common/common-utils.h (stringify_argv): New prototype.
3095 * configure.nat: Add "fork-inferior.o" as a dependency for
3096 "*linux*", "fbsd*" and "nbsd*" hosts.
3097 * corefile.c (get_exec_file): Update comment.
3098 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3099 instead of "startup_inferior".
3100 (darwin_create_inferior): Call "add_thread_silent" after
3101 "fork_inferior".
3102 * fork-child.c: Cleanup unnecessary includes.
3103 (SHELL_FILE): Move to "common/common-fork-child.c".
3104 (environ): Likewise.
3105 (exec_wrapper): Initialize.
3106 (get_exec_wrapper): New function.
3107 (breakup_args): Move to "common/common-fork-child.c"; rename to
3108 "breakup_args_for_exec".
3109 (escape_bang_in_quoted_argument): Move to
3110 "common/common-fork-child.c".
3111 (saved_ui): New variable.
3112 (prefork_hook): New function.
3113 (postfork_hook): Likewise.
3114 (postfork_child_hook): Likewise.
3115 (gdb_startup_inferior): Likewise.
3116 (fork_inferior): Move to "common/common-fork-child.c". Update
3117 function to support gdbserver.
3118 (startup_inferior): Likewise.
3119 * gdbcore.h (get_exec_file): Remove declaration.
3120 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3121 instead of "startup_inferior". Call "add_thread_silent" after
3122 "fork_inferior".
3123 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3124 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3125 instead of "startup_inferior". Call "add_thread_silent" after
3126 "fork_inferior".
3127 * inferior.h: Include "common-inferior.h".
3128 (trace_start_error): Move to "common/common-utils.h".
3129 (trace_start_error_with_name): Likewise.
3130 (fork_inferior): Move prototype to "nat/fork-inferior.h".
3131 (startup_inferior): Likewise.
3132 (gdb_startup_inferior): New prototype.
3133 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3134 * nat/fork-inferior.h: New file.
3135 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3136 instead of "startup_inferior". Call "add_thread_silent" after
3137 "fork_inferior".
3138 * target.h (target_terminal_init): Move prototype to
3139 "target/target.h".
3140 (target_terminal_inferior): Likewise.
3141 (target_terminal_ours): Likewise.
3142 * target/target.h (target_terminal_init): New prototype, moved
3143 from "target.h".
3144 (target_terminal_inferior): Likewise.
3145 (target_terminal_ours): Likewise.
3146 * utils.c (gdb_flush_out_err): New function.
3147
043a4934
SDJ
31482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3149
3150 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3151 * common/common-gdbthread.h: New file, with parts from
3152 "gdb/gdbthread.h".
3153 * gdbthread.h: Include "common-gdbthread.h".
3154 (switch_to_thread): Moved to "common/common-gdbthread.h".
3155
15652511
SDJ
31562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3157
3158 * Makefile.in (SFILES): Add "common/job-control.c".
3159 (HFILES_NO_SRCDIR): Add "common/job-control.h".
3160 (COMMON_OBS): Add "job-control.o".
3161 * common/job-control.c: New file, with contents from
3162 "gdb/inflow.c".
3163 * common/job-control.h: New file, with contents from "terminal.h".
3164 * fork-child.c: Include "job-control.h".
3165 * inflow.c: Include "job-control.h".
3166 (gdb_setpgid): Move to "common/common-inflow.c".
3167 (_initialize_inflow): Move setting of "job_control" to
3168 "handle_job_control".
3169 * terminal.h (job_control): Moved to "common/common-terminal.h".
3170 (gdb_setpgid): Likewise.
3171 * top.c: Include "job_control.h".
3172 * utils.c: Likewise.
3173 (job_control): Moved to "job-control.c".
3174
2d7cc5c7
PA
31752017-06-07 Pedro Alves <palves@redhat.com>
3176
3177 * Makefile.in (SFILES): Add gdb_regex.c.
3178 (COMMON_OBS): Add gdb_regex.o.
3179 * ada-lang.c (ada_add_standard_exceptions)
3180 (ada_add_exceptions_from_frame, name_matches_regex)
3181 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3182 parameter type to compiled_regex. Adjust.
3183 (ada_exceptions_list): Use compiled_regex.
3184 * break-catch-throw.c (exception_catchpoint::pattern): Now a
3185 std::unique_ptr<compiled_regex>.
3186 (exception_catchpoint::~exception_catchpoint): Remove regfree
3187 call.
3188 (check_status_exception_catchpoint): Adjust to use compiled_regex.
3189 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3190 * breakpoint.c (solib_catchpoint::compiled): Now a
3191 std::unique_ptr<compiled_regex>.
3192 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3193 (check_status_catch_solib): Adjust to use compiled_regex.
3194 (add_solib_catchpoint): Adjust to use compiled_regex.
3195 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3196 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3197 compiled_regex reference. Adjust to use it.
3198 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3199 declaration. Include "gdb_regex.h".
3200 (apropos_cmd): Change regex parameter to compiled_regex reference.
3201 * gdb_regex.c: New file.
3202 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3203 declarations.
3204 (class compiled_regex): New.
3205 * linux-tdep.c: Include "common/gdb_optional.h".
3206 (struct mapping_regexes): New, factored out from
3207 mapping_is_anonymous_p, and adjusted to use compiled_regex.
3208 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3209 gdb::optional and remove cleanups. Adjust to compiled_regex.
3210 * probe.c: Include "common/gdb_optional.h".
3211 (collect_probes): Use compiled_regex and gdb::optional and remove
3212 cleanups.
3213 * skip.c: Include "common/gdb_optional.h".
3214 (skiplist_entry::compiled_function_regexp): Now a
3215 gdb::optional<compiled_regex>.
3216 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3217 (free_skiplist_entry): Remove regfree call.
3218 (compile_skip_regexp, skip_rfunction_p): Adjust to use
3219 compiled_regex and gdb::optional.
3220 * symtab.c: Include "common/gdb_optional.h".
3221 (search_symbols): Use compiled_regex and gdb::optional.
3222 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3223 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
3224 to gdb_regex.c.
3225
50d6adef
AH
32262017-06-07 Alan Hayward <alan.hayward@arm.com>
3227
3228 * regcache.c (regcache::save): Avoid buffer use.
3229 (regcache::dump): Likewise.
3230
4a8a33c8
AH
32312017-06-07 Alan Hayward <alan.hayward@arm.com>
3232
3233 * sh-tdep.c (sh_pseudo_register_read): Remove
3234 MAX_REGISTER_SIZE.
3235 (sh_pseudo_register_write): Likewise.
3236 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3237 (sh64_pseudo_register_write): Likewise
3238
d1be909e
AH
32392017-06-07 Alan Hayward <alan.hayward@arm.com>
3240
3241 * aarch64-tdep.c (aarch64_store_return_value): Use
3242 V_REGISTER_SIZE.
3243 (aarch64_pseudo_read_value): Likewise.
3244 (aarch64_pseudo_write): Likewise.
3245
f4a65042
YQ
32462017-06-06 Yao Qi <yao.qi@linaro.org>
3247
3248 * regformats/regdef.h (set_register_cache): Remove the
3249 declaration.
3250
9f7fb0aa
AH
32512017-06-06 Alan Hayward <alan.hayward@arm.com>
3252
3253 * frame.c (frame_unwind_register_signed): Use
3254 frame_unwind_register_value.
3255
e1e01040
PA
32562017-06-06 Pedro Alves <palves@redhat.com>
3257
3258 PR breakpoints/21553
3259 * breakpoint.c (create_breakpoints_sal_default)
3260 (init_breakpoint_sal, create_breakpoint_sal): Use
3261 gdb::unique_xmalloc_ptr for string parameters.
3262 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3263 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
3264 (base_breakpoint_create_breakpoints_sal)
3265 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3266 (strace_marker_create_breakpoints_sal)
3267 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3268 string parameters.
3269 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3270 gdb::unique_xmalloc_ptr for string parameters.
3271 (create_breakpoint): Constify 'extra_string' and 'cond_string'
3272 parameters.
3273
fbe654c8
AH
32742017-06-06 Alan Hayward <alan.hayward@arm.com>
3275
3276 * alpha-tdep.c (alpha_register_to_value): Use
3277 get_frame_register_value.
3278 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3279
ae0d01d6
AH
32802017-06-06 Alan Hayward <alan.hayward@arm.com>
3281
3282 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3283 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3284 (ia64_value_to_register): Likewise.
3285 (ia64_extract_return_value): Likewise.
3286 (ia64_store_return_value): Likewise.
3287 (ia64_push_dummy_call): Likewise.
3288
49cf576c
JB
32892017-06-04 Joel Brobecker <brobecker@adacore.com>
3290
3291 GDB 8.0 released.
3292
26b6a6ab
SM
32932017-06-03 Simon Marchi <simon.marchi@ericsson.com>
3294
3295 * x86-linux-nat.c (struct arch_lwp_info): Remove.
3296
22827c51
SM
32972017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
3298
3299 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3300 parameter.
3301 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3302
0e05cf3a
SM
33032017-06-02 Simon Marchi <simon.marchi@ericsson.com>
3304
3305 * event-loop.c (poll_timers): Unallocate timer using delete
3306 instead of xfree.
3307
c1fc2657
SM
33082017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3309
3310 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3311 (struct breakpoint) <~breakpoint>: New.
3312 (struct watchpoint): Inherit from breakpoint.
3313 <~watchpoint>: New.
3314 <base>: Remove.
3315 (struct tracepoint): Inherit from breakpoint.
3316 <base>: Remove.
3317 * breakpoint.c (longjmp_breakpoint_ops): Remove.
3318 (struct longjmp_breakpoint): Inherit from breakpoint.
3319 <~longjmp_breakpoint>: New.
3320 <base>: Remove.
3321 (new_breakpoint_from_type): Remove casts.
3322 (watchpoint_in_thread_scope): Remove reference to base field.
3323 (watchpoint_del_at_next_stop): Likewise.
3324 (update_watchpoint): Likewise.
3325 (watchpoint_check): Likewise.
3326 (bpstat_check_watchpoint): Likewise.
3327 (set_longjmp_breakpoint): Likewise.
3328 (struct fork_catchpoint): Inherit from breakpoint.
3329 <base>: Remove.
3330 (struct solib_catchpoint): Inherit from breakpoint.
3331 <~solib_catchpoint>: New.
3332 <base>: Remove.
3333 (dtor_catch_solib): Change to ...
3334 (solib_catchpoint::~solib_catchpoint): ... this.
3335 (breakpoint_hit_catch_solib): Remove reference to base field.
3336 (add_solib_catchpoint): Likewise.
3337 (create_fork_vfork_event_catchpoint): Likewise.
3338 (struct exec_catchpoint): Inherit from breakpoint.
3339 <~exec_catchpoint>: New.
3340 <base>: Remove.
3341 (dtor_catch_exec): Change to ...
3342 (exec_catchpoint::~exec_catchpoint): ... this.
3343 (dtor_watchpoint): Change to ...
3344 (watchpoint::~watchpoint): ... this.
3345 (watch_command_1): Remove reference to base field.
3346 (catch_exec_command_1): Likewise.
3347 (base_breakpoint_dtor): Change to ...
3348 (breakpoint::~breakpoint): ... this.
3349 (base_breakpoint_ops): Remove dtor field value.
3350 (longjmp_bkpt_dtor): Change to ...
3351 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3352 (strace_marker_create_breakpoints_sal): Remove reference to base
3353 field.
3354 (delete_breakpoint): Don't manually call breakpoint destructor.
3355 (create_tracepoint_from_upload): Remove reference to base field.
3356 (trace_pass_set_count): Likewise.
3357 (initialize_breakpoint_ops): Don't initialize
3358 momentary_breakpoint_ops, don't set dtors.
3359 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3360 <~ada_catchpoint>: New.
3361 <base>: Remove.
3362 (create_excep_cond_exprs): Remove reference to base field.
3363 (dtor_exception): Change to ...
3364 (ada_catchpoint::~ada_catchpoint): ... this.
3365 (dtor_catch_exception): Remove.
3366 (dtor_catch_exception_unhandled): Remove.
3367 (dtor_catch_assert): Remove.
3368 (create_ada_exception_catchpoint): Remove reference to base
3369 field.
3370 (initialize_ada_catchpoint_ops): Don't set dtors.
3371 * break-catch-sig.c (struct signal_catchpoint): Inherit from
3372 breakpoint.
3373 <~signal_catchpoint>: New.
3374 <base>: Remove.
3375 (signal_catchpoint_dtor): Change to ...
3376 (signal_catchpoint::~signal_catchpoint): ... this.
3377 (create_signal_catchpoint): Remove reference to base field.
3378 (initialize_signal_catchpoint_ops): Don't set dtor.
3379 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3380 from breakpoint.
3381 <~syscall_catchpoint>: New.
3382 <base>: Remove.
3383 (dtor_catch_syscall): Change to ...
3384 (syscall_catchpoint::~syscall_catchpoint): ... this.
3385 (create_syscall_event_catchpoint): Remove reference to base
3386 field.
3387 (initialize_syscall_catchpoint_ops): Don't set dtor.
3388 * break-catch-throw.c (struct exception_catchpoint): Inherit
3389 from breakpoint.
3390 <~exception_catchpoint>: New.
3391 <base>: Remove.
3392 (dtor_exception_catchpoint): Change to ...
3393 (exception_catchpoint::~exception_catchpoint): ... this.
3394 (handle_gnu_v3_exceptions): Remove reference to base field.
3395 (initialize_throw_catchpoint_ops): Don't set dtor.
3396 * ctf.c (ctf_get_traceframe_address): Remove reference to base
3397 field.
3398 * remote.c (remote_get_tracepoint_status): Likewise.
3399 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3400 * tracefile.c (tracefile_fetch_registers): Likewise.
3401 * tracepoint.c (actions_command): Likewise.
3402 (validate_actionline): Likewise.
3403 (tfind_1): Likewise.
3404 (get_traceframe_location): Likewise.
3405 (find_matching_tracepoint_location): Likewise.
3406 (parse_tracepoint_status): Likewise.
3407 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3408
3b0871f4
SM
34092017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3410
3411 * breakpoint.c (struct longjmp_breakpoint): New struct.
3412 (is_tracepoint_type): Change return type to bool.
3413 (is_longjmp_type): New function.
3414 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3415 (set_raw_breakpoint_without_location): Use
3416 new_breakpoint_from_type.
3417 (set_raw_breakpoint): Likewise.
3418
a5e364af
SM
34192017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
3420
3421 * breakpoint.c (new_breakpoint_from_type): New function.
3422 (create_breakpoint_sal): Use new_breakpoint_from_type and
3423 unique_ptr.
3424 (create_breakpoint): Likewise.
3425
ae3b3f34
SM
34262017-05-31 Simon Marchi <simon.marchi@ericsson.com>
3427
3428 * memattr.c (mem_info_command): Rename to ...
3429 (info_mem_command): ... this.
3430 (mem_enable_command): Rename to ...
3431 (enable_mem_command): ... this.
3432 (mem_disable_command): Rename to ...
3433 (disable_mem_command): ... this.
3434 (mem_delete_command): Rename to ...
3435 (delete_mem_command): ... this.
3436 (_initialize_mem): Adjust function names.
3437
13ace077
MM
34382017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3439
3440 * btrace.c (handle_pt_insn_events): New.
3441 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
3442 STATUS. Split into this and ...
3443 (handle_pt_insn_event_flags): ... this.
3444
c56ccc05
MM
34452017-05-31 Markus Metzger <markus.t.metzger@intel.com>
3446
3447 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3448 and struct pt_insn.resynced.
3449 * configure: Regenerated.
3450 * config.in: Regenerated.
3451
08c3f6d2
TW
34522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3453
3454 * btrace.c (ftrace_find_call_by_number): New function.
3455 (ftrace_new_function): Store objects, not pointers.
3456 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3457 ftrace_new_gap, ftrace_update_function,
3458 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3459 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3460 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3461 btrace_ends_with_single_insn, btrace_call_get): Account for
3462 btrace_thread_info::functions now storing objects.
3463 * btrace.h (struct btrace_thread_info): Add constructor.
3464 (struct btrace_thread_info) <functions>: Make std::vector.
3465 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3466 Initialize with default values.
3467 * record-btrace.c (record_btrace_frame_sniffer): Account for
3468 btrace_thread_info::functions now storing objects.
3469
8ffd39f2
TW
34702017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3471
3472 * btrace.c: Remove typedef bfun_s.
3473 (ftrace_new_gap): Directly add gaps to the list of gaps.
3474 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3475 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3476 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3477 instead of gdb VEC.
3478
4aeb0dfc
TW
34792017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3480
3481 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3482 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3483 with btrace_thread_info::next_segment and
3484 btrace_thread_info::prev_segment.
3485 * btrace.h: Remove struct btrace_func_link.
3486 (struct btrace_function): Replace pair of function segment pointers
3487 with pair of indices.
3488 * python/py-record-btrace.c (btpy_call_prev_sibling,
3489 btpy_call_next_sibling): Replace references to
3490 btrace_thread_info::segment with btrace_thread_info::next_segment and
3491 btrace_thread_info::prev_segment.
3492 * record-btrace.c (record_btrace_frame_this_id): Use
3493 btrace_find_call_by_number.
3494
eb8f2b9c
TW
34952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3496
3497 * btrace.c (ftrace_new_function, ftrace_fixup_level,
3498 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3499 btrace_insn_next, btrace_insn_prev): Remove references to
3500 btrace_thread_info::flow.
3501 * btrace.h (struct btrace_function): Remove FLOW.
3502
42bfe59e
TW
35032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3504
3505 * btrace.c (ftrace_find_call_by_number): New function.
3506 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3507 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3508 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3509 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3510 index.
3511 * btrace.h (struct btrace_function): Turn UP into an index.
3512 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3513 as an index.
3514 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3515 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3516 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3517
b54b03bd
TW
35182017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3519
3520 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3521 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3522 ftrace_update_function, ftrace_compute_global_level_offset,
3523 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3524 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
3525 btrace_insn_end, btrace_is_empty): Remove references to
3526 btrace_thread_info::begin and btrace_thread_info::end.
3527 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
3528 (struct btrace_thread_info) <functions>: Adjust comment.
3529 * record-btrace.c (record_btrace_start_replaying): Remove reference to
3530 btrace_thread_info::begin.
3531
8286623c
TW
35322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3533
3534 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3535 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3536 ftrace_update_function): Remove arguments that implicitly were always
3537 BTINFO->END.
3538 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
3539 Don't pass BTINFO->END.
3540
a0f1b963
TW
35412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3542
3543 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
3544 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
3545 btrace_find_insn_by_number): Replace function segment pointer with
3546 index.
3547 (btrace_insn_cmp): Simplify.
3548 * btrace.h: (struct btrace_insn_iterator) Rename index to
3549 insn_index. Replace function segment pointer with index into function
3550 segment vector.
3551 * record-btrace.c (record_btrace_call_history): Replace function
3552 segment pointer use with index.
3553 (record_btrace_frame_sniffer): Retrieve function call segment through
3554 vector.
3555 (record_btrace_set_replay): Remove defunc't safety check.
3556
f158f208
TW
35572017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3558
3559 * btrace.c (btrace_ends_with_single_insn): New function.
3560 (btrace_call_get, btrace_call_number, btrace_call_begin,
3561 btrace_call_end, btrace_call_next, btrace_call_prev,
3562 btrace_find_call_by_number): Use index into call segment vector
3563 instead of pointer.
3564 (btrace_call_cmp): Simplify.
3565 * btrace.h (struct btrace_call_iterator): Replace function call segment
3566 pointer with index into vector.
3567 * record-btrace.c (record_btrace_call_history): Use index instead of
3568 pointer.
3569
521103fd
TW
35702017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3571
3572 * btrace.c (btrace_insn_begin, btrace_insn_end,
3573 btrace_find_insn_by_number): Add btinfo to iterator.
3574 * btrace.h (struct btrace_insn_iterator): Add btinfo.
3575
17b89b34
TW
35762017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3577
3578 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
3579 and save pointers directly.
3580 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
3581 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
3582 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
3583 changed signature of functions.
3584 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
3585 (btrace_fetch): Remove code that adds btrace_function pointers to
3586 vector of btrace_functions.
3587 (btrace_clear): Simplify freeing vector of btrace_functions.
3588
2b51eddc
TW
35892017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
3590
3591 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
3592 Replace VEC_* with std::vector functions.
3593 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
3594 (struct btrace_thread_info)<functions>: Change type to std::vector.
3595
db6be0d5
SM
35962017-05-30 Simon Marchi <simon.marchi@ericsson.com>
3597
3598 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
3599 "Removed targets and native configurations" up. Merge duplicate
3600 "New commands" sub-sections. Add "New options" sub-sections.
3601
b057297a
AH
36022017-05-26 Alan Hayward <alan.hayward@arm.com>
3603
3604 * defs.h (copy_integer_to_size): New declaration.
3605 * findvar.c (copy_integer_to_size): New function.
3606 (do_cint_test): New selftest function.
3607 (copy_integer_to_size_test): Likewise.
3608 (_initialize_findvar): Likewise.
3609 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
3610 (mips_fbsd_collect_reg): Use raw_collect_integer.
3611 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
3612 (mips64_fill_gregset): Use raw_collect_integer
3613 (mips64_fill_fpregset): Use raw_supply_integer.
3614 * regcache.c (regcache::raw_supply_integer): New function.
3615 (regcache::raw_collect_integer): Likewise.
3616 * regcache.h: (regcache::raw_supply_integer): New declaration.
3617 (regcache::raw_collect_integer): Likewise.
3618
b77b02a5
YQ
36192017-05-24 Yao Qi <yao.qi@linaro.org>
3620
3621 * Makefile.in (SFILES): Add gdbarch-selftests.c.
3622 (COMMON_OBS): Add gdbarch-selftests.o.
3623 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
3624 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
3625 * gdbarch-selftests.c: New file.
3626 * regcache.h (regcache) <~regcache>: Mark it virtual if
3627 GDB_SELF_TEST.
3628 <raw_write>: Likewise.
3629
e521e87e
YQ
36302017-05-24 Yao Qi <yao.qi@linaro.org>
3631
3632 * regcache.c (current_regcache): Change it to
3633 regcache::current_regcache.
3634 (regcache_observer_target_changed): Update.
3635 (regcache_thread_ptid_changed): Make it a regcache static
3636 method.
3637 (regcache_thread_ptid_changed): Update.
3638 (class regcache_access): New.
3639 (current_regcache_test): Update.
3640 (_initialize_regcache): Update.
3641 * regcache.h: Include forward_list.
3642 (regcache): Declare regcache_thread_ptid_changed and declare
3643 registers_changed_ptid as friend.
3644
d8e07dda
YQ
36452017-05-24 Yao Qi <yao.qi@linaro.org>
3646
3647 * i387-tdep.c (i387_register_to_value): Use register_size
3648 instead of TYPE_LENGTH.
3649 * m68k-tdep.c (m68k_register_to_value): Likewise.
3650
8c8f9122
YQ
36512017-05-24 Yao Qi <yao.qi@linaro.org>
3652
3653 * i387-tdep.c (i387_convert_register_p): Return false if type
3654 code isn't TYPE_CODE_FLT.
3655
68fce50f
YQ
36562017-05-24 Yao Qi <yao.qi@linaro.org>
3657
3658 * alpha-tdep.c (alpha_convert_register_p): Return true if type
3659 length is 4.
3660 (alpha_register_to_value): Remove type length check.
3661 (alpha_value_to_register): Likewise.
3662
88954b49
YQ
36632017-05-24 Yao Qi <yao.qi@linaro.org>
3664
3665 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
3666 TYPE_CODE_FLT.
3667
e3ec9b69
YQ
36682017-05-24 Yao Qi <yao.qi@linaro.org>
3669
3670 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
3671 TYPE_CODE_FLT or not.
3672
cdd238da
YQ
36732017-05-24 Yao Qi <yao.qi@linaro.org>
3674
3675 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
3676 * avr-tdep.c (avr_gdbarch_init): Likewise.
3677 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3678 * cris-tdep.c (cris_gdbarch_init): Likewise.
3679 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3680 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3681 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3682 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
3683 * mep-tdep.c (mep_gdbarch_init): Likewise.
3684 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3685 * mips-tdep.c (mips_gdbarch_init): Likewise.
3686 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3687 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3688 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3689 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3690 * v850-tdep.c (v850_gdbarch_init): Likewise.
3691
7a3929c4
YQ
36922017-05-24 Yao Qi <yao.qi@linaro.org>
3693
3694 * selftest-arch.c (tests_with_arch): Call registers_changed
3695 and reinit_frame_cache.
3696 * selftest.c (run_self_tests): Likewise.
3697
f4985dba
YQ
36982017-05-24 Yao Qi <yao.qi@linaro.org>
3699
3700 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
3701 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
3702
ab20fa4a
YQ
37032017-05-24 Yao Qi <yao.qi@linaro.org>
3704
3705 * rl78-tdep.c (rl78_gdbarch_init): Don't call
3706 set_gdbarch_print_insn.
3707
f532ab94
YQ
37082017-05-24 Yao Qi <yao.qi@linaro.org>
3709
3710 * h8300-tdep.c (h8300_gdbarch_init): Don't call
3711 set_gdbarch_print_insn.
3712
39503f82
YQ
37132017-05-24 Yao Qi <yao.qi@linaro.org>
3714
3715 * alpha-tdep.c (alpha_gdbarch_init): Don't call
3716 set_gdbarch_print_insn.
3717 * arc-tdep.c (arc_gdbarch_init): Likewise.
3718 * arch-utils.c: include dis-asm.h.
3719 (default_print_insn): New function.
3720 * arch-utils.h (default_print_insn): Declare.
3721 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
3722 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3723 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
3724 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
3725 * frv-tdep.c (frv_gdbarch_init): Likewise.
3726 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3727 * gdbarch.sh (print_insn): Use default_print_insn.
3728 * gdbarch.c: Regenerated.
3729 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
3730 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
3731 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3732 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
3733 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3734 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
3735 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
3736 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
3737 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
3738 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3739 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3740 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3741 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3742 * mt-tdep.c (mt_gdbarch_init): Likewise.
3743 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3744 * nios2-tdep.c (nios2_print_insn): Remove.
3745 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
3746 * rx-tdep.c (rx_gdbarch_init): Likewise.
3747 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3748 * score-tdep.c (score_print_insn): Remove.
3749 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
3750 * sh-tdep.c (sh_gdbarch_init): Likewise.
3751 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3752 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3753 * tic6x-tdep.c (tic6x_print_insn): Remove.
3754 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
3755 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
3756 * v850-tdep.c (v850_gdbarch_init): Likewise.
3757 * vax-tdep.c (vax_gdbarch_init): Likewise.
3758 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3759 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
3760
f7241d4f
JB
37612017-05-23 John Baldwin <jhb@FreeBSD.org>
3762
3763 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
3764 (MIPS_FP0_REGNUM): Remove.
3765 (MIPS_FSR_REGNUM): Remove.
3766 (mips_fbsd_supply_fpregs): Use mips_regnum.
3767 (mips_fbsd_supply_gregs): Likewise.
3768 (mips_fbsd_collect_fpregs): Likewise.
3769 (mips_fbsd_collect_gregs): Likewise.
3770
d489d81d
JB
37712017-05-23 John Baldwin <jhb@FreeBSD.org>
3772
3773 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
3774 (getpfpregs_supplies): New function.
3775 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
3776 getfpregs_supplies.
3777 (mips_fbsd_store_inferior_registers): Likewise.
3778
e11b3cdc
PA
37792017-05-22 Pedro Alves <palves@redhat.com>
3780
3781 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
3782 maintainer.
3783
0f068fb5
AH
37842017-05-22 Alan Hayward <alan.hayward@arm.com>
3785
3786 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
3787 (store_register): Likewise.
3788 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
3789 (get_decimal_float_return_value): Likewise.
3790 (do_ppc_sysv_return_value): Likewise.
3791 (ppc64_sysv_abi_push_integer): Likewise.
3792 (ppc64_sysv_abi_push_freg): Likewise.
3793 (ppc64_sysv_abi_return_value_base): Likewise.
3794 (ppc64_sysv_abi_return_value): Likewise.
3795 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
3796 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
3797 * rs6000-nat.c: Likewise.
3798 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
3799 (rs6000_value_to_register): Likewise.
3800 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
3801
e6cf65f2
TT
38022017-05-21 Tom Tromey <tom@tromey.com>
3803
3804 PR rust/21466:
3805 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
3806 arrays as "[T]", not "[T; ]".
3807
43cc5389
TT
38082017-05-19 Tom Tromey <tom@tromey.com>
3809
3810 PR rust/21484:
3811 * rust-lang.c (exp_descriptor_rust): New function.
3812 (rust_language_defn): Use it.
3813 * p-lang.c (pascal_language_defn): Update.
3814 * opencl-lang.c (opencl_language_defn): Update.
3815 * objc-lang.c (objc_language_defn): Update.
3816 * m2-lang.c (m2_language_defn): Update.
3817 * language.h (struct language_defn)
3818 <la_watch_location_expression>: New member.
3819 * language.c (unknown_language_defn, auto_language_defn)
3820 (local_language_defn): Update.
3821 * go-lang.c (go_language_defn): Update.
3822 * f-lang.c (f_language_defn): Update.
3823 * d-lang.c (d_language_defn): Update.
3824 * c-lang.h (c_watch_location_expression): Declare.
3825 * c-lang.c (c_watch_location_expression): New function.
3826 (c_language_defn, cplus_language_defn, asm_language_defn)
3827 (minimal_language_defn): Use it.
3828 * breakpoint.c (watch_command_1): Call
3829 la_watch_location_expression.
3830 * ada-lang.c (ada_language_defn): Update.
3831
7a6e7fcc
RO
38322017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3833
6e7e1744
RO
3834 PR tui/21482
3835 * gdb_curses.h (NOMACROS): Define.
3836 (NCURSES_NOMACROS): Define.
3837
38382017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3839
3840 PR tui/21482
7a6e7fcc
RO
3841 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
3842 arg to char *.
3843 * tui/tui-wingeneral.c (box_win): Likewise.
3844 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
3845 (tui_show_source_line): Likewise.
3846 (tui_show_exec_info_content): Likewise.
3847
1933fd8e
VM
38482017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
3849
3850 * sparc-tdep.c (sparc_structure_return_p)
3851 (sparc_arg_on_registers_p): New functions.
3852 (sparc32_store_arguments): Use them.
3853 * sparc64-tdep.c (sparc64_16_byte_align_p)
3854 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
3855 Handle TYPE_CODE_ARRAY.
3856
21873064
YQ
38572017-05-17 Yao Qi <yao.qi@linaro.org>
3858
3859 * cli/cli-decode.c (add_alias_cmd): New function.
3860 * command.h (add_alias_cmd): Declare.
3861 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
3862 instead call add_alias_cmd.
3863
2b351b19
PA
38642017-05-17 Pedro Alves <palves@redhat.com>
3865
3866 * Makefile.in (nat_extra_makefile_frag): Rename to ...
3867 (nat_makefile_frag): ... this. All references updated.
3868 * configure.ac: Likewise.
3869 * configure.nat: Likewise. Enhance comments.
3870 * configure: Regenerate.
3871
5f2ad7a3
RO
38722017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3873
3874 * procfs.c (procfs_create_inferior): Change prototype to match
3875 definition.
3876
adf3dde5
EZ
38772017-05-13 Eli Zaretskii <eliz@gnu.org>
3878
3879 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
3880 C++ compiler warning.
3881
6830f270
TT
38822017-05-12 Tom Tromey <tom@tromey.com>
3883
3884 PR rust/21483:
3885 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
3886 recurse, just call value_struct_elt directly.
3887
68f2f2e3
TT
38882017-05-12 Tom Tromey <tom@tromey.com>
3889
3890 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
3891 OP_RUST_ARRAY>: Fix.
3892
256afbc2
TT
38932017-05-12 Tom Tromey <tom@tromey.com>
3894
3895 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
3896
94bb8dfe
YQ
38972017-05-09 Yao Qi <yao.qi@linaro.org>
3898
3899 * regcache.c: Include <forward_list>.
3900 (struct regcache_list): Remove.
3901 (current_regcache): Update.
3902 (get_thread_arch_aspace_regcache): Update for std::forward_list.
3903 (regcache_thread_ptid_changed): Likewise.
3904 (registers_changed_ptid): Likewise.
3905 (current_regcache_size): Likewise.
3906
8248946c
YQ
39072017-05-09 Yao Qi <yao.qi@linaro.org>
3908
3909 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
3910 (current_regcache_size): New function.
3911 (current_regcache_test): New function.
3912 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
3913
313c5961
AH
39142017-05-08 Alan Hayward <alan.hayward@arm.com>
3915
3916 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
3917 (print_gp_register_row): Use get_frame_register_value.
3918
27bfc1d1
AH
39192017-05-08 Alan Hayward <alan.hayward@arm.com>
3920
3921 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
3922 (mips_supply_fpregset): Likewise.
3923 (mips64_supply_gregset): Likewise.
3924
146e6c5c
AH
39252017-05-08 Alan Hayward <alan.hayward@arm.com>
3926
3927 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
3928 regcache->raw_supply_zeroed.
3929
e50f25ec
SDJ
39302017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3931
3932 * configure.nat: Rearrange 'case' statements to match
3933 host before cpu.
3934
21ea5acd
SDJ
39352017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3936
3937 * Makefile.in: Remove "@host_makefile_frag@". Add variables
3938 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
3939 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
3940 "@nat_extra_makefile_frag@".
3941 (Makefile): Remove dependency on "@frags@".
3942 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
3943 (data-directory/Makefile): Likewise.
3944 * config/aarch64/linux.mh: Deleted; moved contents to
3945 "gdb/configure.nat".
3946 * config/alpha/alpha-linux.mh: Likewise.
3947 * config/alpha/nbsd.mh: Likewise.
3948 * config/arm/linux.mh: Likewise.
3949 * config/arm/nbsdelf.mh: Likewise.
3950 * config/i386/cygwin.mh: Likewise.
3951 * config/i386/cygwin64.mh: Likewise.
3952 * config/i386/darwin.mh: Likewise.
3953 * config/i386/fbsd.mh: Likewise.
3954 * config/i386/fbsd64.mh: Likewise.
3955 * config/i386/go32.mh: Likewise.
3956 * config/i386/i386gnu.mh: Likewise.
3957 * config/i386/i386sol2.mh: Likewise.
3958 * config/i386/linux.mh: Likewise.
3959 * config/i386/linux64.mh: Likewise.
3960 * config/i386/mingw.mh: Likewise.
3961 * config/i386/mingw64.mh: Likewise.
3962 * config/i386/nbsd64.mh: Likewise.
3963 * config/i386/nbsdelf.mh: Likewise.
3964 * config/i386/nto.mh: Likewise.
3965 * config/i386/obsd.mh: Likewise.
3966 * config/i386/obsd64.mh: Likewise.
3967 * config/i386/sol2-64.mh: Likewise.
3968 * config/ia64/linux.mh: Likewise.
3969 * config/m32r/linux.mh: Likewise.
3970 * config/m68k/linux.mh: Likewise.
3971 * config/m68k/nbsdelf.mh: Likewise.
3972 * config/m68k/obsd.mh: Likewise.
3973 * config/m88k/obsd.mh: Likewise.
3974 * config/mips/fbsd.mh: Likewise.
3975 * config/mips/linux.mh: Likewise.
3976 * config/mips/nbsd.mh: Likewise.
3977 * config/mips/obsd64.mh: Likewise.
3978 * config/pa/linux.mh: Likewise.
3979 * config/pa/nbsd.mh: Likewise.
3980 * config/pa/obsd.mh: Likewise.
3981 * config/powerpc/aix.mh: Likewise.
3982 * config/powerpc/fbsd.mh: Likewise.
3983 * config/powerpc/linux.mh: Likewise.
3984 * config/powerpc/nbsd.mh: Likewise.
3985 * config/powerpc/obsd.mh: Likewise.
3986 * config/powerpc/ppc64-linux.mh: Likewise.
3987 * config/powerpc/spu-linux.mh: Likewise.
3988 * config/s390/linux.mh: Likewise.
3989 * config/sh/nbsd.mh: Likewise.
3990 * config/sparc/fbsd.mh: Likewise.
3991 * config/sparc/linux.mh: Likewise.
3992 * config/sparc/linux64.mh: Likewise.
3993 * config/sparc/nbsd64.mh: Likewise.
3994 * config/sparc/nbsdelf.mh: Likewise.
3995 * config/sparc/obsd64.mh: Likewise.
3996 * config/sparc/sol2.mh: Likewise.
3997 * config/tilegx/linux.mh: Likewise.
3998 * config/vax/nbsdelf.mh: Likewise.
3999 * config/vax/obsd.mh: Likewise.
4000 * config/xtensa/linux.mh: Likewise.
4001 * config/i386/i386gnu.mn: New file, with excerpts from
4002 "config/i386/i386gnu.mh".
4003 * configure: Regenerate.
4004 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4005 *.mh files under "gdb/config".
4006 * configure.nat: New file, with contents from the
4007 "gdb/config/*/*.mh" files.
4008
7ed1acaf
TW
40092017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
4010
4011 * btrace.c (btrace_clear): Free insn vector.
4012
e13cb306
PA
40132017-05-05 Pedro Alves <palves@redhat.com>
4014
4015 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4016 * configure: Regenerate.
4017
5ed8105e
PA
40182017-05-04 Pedro Alves <palves@redhat.com>
4019
4020 * Makefile.in (SFILES): Add progspace-and-thread.c.
4021 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4022 (COMMON_OBS): Add progspace-and-thread.o.
4023 * breakpoint.c: Include "progspace-and-thread.h".
4024 (update_inserted_breakpoint_locations)
4025 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4026 Use scoped_restore_current_pspace_and_thread.
4027 (create_std_terminate_master_breakpoint): Use
4028 scoped_restore_current_program_space.
4029 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4030 (print_breakpoint_location): Use
4031 scoped_restore_current_program_space.
4032 (bp_loc_is_permanent): Use
4033 scoped_restore_current_pspace_and_thread.
4034 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4035 (download_tracepoint_locations): Use
4036 scoped_restore_current_pspace_and_thread.
4037 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4038 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4039 (enum step_over_calls_kind): Moved from inferior.h.
4040 (class scoped_restore_current_thread): New class.
4041 * gdbthread.h (make_cleanup_restore_current_thread): Delete
4042 declaration.
4043 (scoped_restore_current_thread): New class.
4044 * infcmd.c: Include "common/gdb_optional.h".
4045 (continue_1, proceed_after_attach): Use
4046 scoped_restore_current_thread.
4047 (notice_new_inferior): Use scoped_restore_current_thread.
4048 * inferior.c: Include "progspace-and-thread.h".
4049 (restore_inferior, save_current_inferior): Delete.
4050 (add_inferior_command, clone_inferior_command): Use
4051 scoped_restore_current_pspace_and_thread.
4052 * inferior.h (scoped_restore_current_inferior): New class.
4053 * infrun.c: Include "progspace-and-thread.h" and
4054 "common/gdb_optional.h".
4055 (follow_fork_inferior): Use
4056 scoped_restore_current_pspace_and_thread.
4057 (scoped_restore_exited_inferior): New class.
4058 (handle_vfork_child_exec_or_exit): Use
4059 scoped_restore_exited_inferior,
4060 scoped_restore_current_pspace_and_thread,
4061 scoped_restore_current_thread and scoped_restore.
4062 (fetch_inferior_event): Use scoped_restore_current_thread.
4063 * linespec.c (decode_line_full, decode_line_1): Use
4064 scoped_restore_current_program_space.
4065 * mi/mi-main.c: Include "progspace-and-thread.h".
4066 (exec_continue): Use scoped_restore_current_thread.
4067 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4068 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4069 * proc-service.c (ps_pglobal_lookup): Use
4070 scoped_restore_current_program_space.
4071 * progspace-and-thread.c: New file.
4072 * progspace-and-thread.h: New file.
4073 * progspace.c (release_program_space, clone_program_space): Use
4074 scoped_restore_current_program_space.
4075 (restore_program_space, save_current_program_space)
4076 (save_current_space_and_thread): Delete.
4077 (switch_to_program_space_and_thread): Moved to
4078 progspace-and-thread.c.
4079 * progspace.h (save_current_program_space)
4080 (save_current_space_and_thread): Delete declarations.
4081 (scoped_restore_current_program_space): New class.
4082 * remote.c (remote_btrace_maybe_reopen): Use
4083 scoped_restore_current_thread.
4084 * symtab.c: Include "progspace-and-thread.h".
4085 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4086 * thread.c (print_thread_info_1): Use
4087 scoped_restore_current_thread.
4088 (struct current_thread_cleanup): Delete.
4089 (do_restore_current_thread_cleanup)
4090 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4091 (scoped_restore_current_thread::~scoped_restore_current_thread):
4092 ... this new dtor.
4093 (make_cleanup_restore_current_thread): Rename/convert to ...
4094 (scoped_restore_current_thread::scoped_restore_current_thread):
4095 ... this new ctor.
4096 (thread_apply_all_command): Use scoped_restore_current_thread.
4097 (thread_apply_command): Use scoped_restore_current_thread.
4098 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4099 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4100
f6223dbb
PA
41012017-05-04 Pedro Alves <palves@redhat.com>
4102
4103 * thread.c (make_cleanup_restore_current_thread): Move
4104 find_thread_ptid call before the is_stopped call. Assert that the
4105 thread is found. Replace is_stopped call by checking the thread's
4106 state directly. Remove unnecessary NULL-thread check.
4107
3c3ae77e
PA
41082017-05-04 Pedro Alves <palves@redhat.com>
4109
4110 * corelow.c (thread_section_name): New class.
4111 (get_core_register_section, get_core_siginfo): Use it.
4112
45eba0ab
AA
41132017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
4114
4115 * corelow.c (sniff_core_bfd): Remove extra semicolon.
4116 (get_core_register_section): Remove xfree of NULL pointer.
4117
f81fdd35
AH
41182017-05-03 Alan Hayward <alan.hayward@arm.com>
4119
4120 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4121 * regcache.c (regcache::raw_supply_zeroed): New function.
4122 * regcache.h (regcache::raw_supply_zeroed): New declaration.
4123
35837774
SM
41242017-05-03 Simon Marchi <simon.marchi@ericsson.com>
4125
4126 * gdbarch.sh: Remove commented out definition of
4127 TARGET_CHAR_BIT.
4128 * gdbarch.h: Re-generate.
4129
c94fee56
SDJ
41302017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4131
4132 * configure: Regenerate.
4133
d17f7b36
SM
41342017-05-02 Simon Marchi <simon.marchi@ericsson.com>
4135
4136 * solib-target.c (solib_target_relocate_section_addresses):
4137 Remove num_section_bases, num_bases, segment_bases variables.
4138
b560ebd6
SM
41392017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4140
4141 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4142
f2f46dfc
SM
41432017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4144
4145 * solib-target.c: Include <vector>
4146 (struct lm_info_target) <~lm_info_target>: Remove.
4147 <segment_bases, section_bases>: Change type to
4148 std::vector<CORE_ADDR>.
4149 (library_list_start_segment, library_list_start_section,
4150 library_list_end_library,
4151 solib_target_relocate_section_addresses): Adjust.
4152
a0ff9e1a
SM
41532017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4154
4155 * gdbarch.sh (software_single_step): Change return type to
4156 std::vector<CORE_ADDR>.
4157 * gdbarch.c, gdbarch.h: Re-generate.
4158 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4159 Adjust.
4160 (arm_deal_with_atomic_sequence_raw): Adjust.
4161 (thumb_get_next_pcs_raw): Adjust.
4162 (arm_get_next_pcs_raw): Adjust.
4163 (arm_get_next_pcs): Adjust.
4164 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4165 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4166 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4167 (alpha_software_single_step): Adjust.
4168 * alpha-tdep.h (alpha_software_single_step): Adjust.
4169 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4170 * arm-tdep.c (arm_software_single_step): Adjust.
4171 (arm_breakpoint_kind_from_current_state): Adjust.
4172 * arm-tdep.h (arm_software_single_step): Adjust.
4173 * breakpoint.c (insert_single_step_breakpoint): Adjust.
4174 * cris-tdep.c (cris_software_single_step): Adjust.
4175 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4176 (micromips_deal_with_atomic_sequence): Adjust.
4177 (deal_with_atomic_sequence): Adjust.
4178 (mips_software_single_step): Adjust.
4179 * mips-tdep.h (mips_software_single_step): Adjust.
4180 * moxie-tdep.c (moxie_software_single_step): Adjust.
4181 * nios2-tdep.c (nios2_software_single_step): Adjust.
4182 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4183 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4184 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4185 * s390-linux-tdep.c (s390_software_single_step): Adjust.
4186 * sparc-tdep.c (sparc_software_single_step): Adjust.
4187 * spu-tdep.c (spu_software_single_step): Adjust.
4188 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4189
ea480a30
SM
41902017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4191
4192 * gdbarch.sh: Use semi-colon as field separator instead of colon.
4193 * gdbarch.h: Re-generate.
4194
d050f7d7
TW
41952017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4196
4197 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4198 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4199 * python/py-instruction.c, python/py-instruction.h: New file.
4200 * python/py-record.c: Add py-instruction.h include.
4201 (gdbpy_initialize_record): Make gdb.Instruction a super class of
4202 gdb.RecordInstruction.
4203 * python/python-internal.h: Add gdbpy_initialize_instruction
4204 declaration.
4205 * python/python.c (do_start_initialization): Add
4206 gdbpy_initialize_instruction.
4207
14f819c8
TW
42082017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4209
4210 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4211 Remove.
4212 (btrace_func_from_recpy_func): New function.
4213 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4214 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4215 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4216 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4217 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4218 Also, use new helper functions.
4219 (btpy_list_item): Use new helper functions.
4220 (recpy_bt_function_call_history): Use new type name.
4221 (btpy_call_getset): Remove.
4222 (gdbpy_initialize_btrace): Remove code to initialize
4223 gdb.BtraceFunctionCall.
4224 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4225 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4226 recpy_bt_func_prev, recpy_bt_func_next): New export.
4227 * python/py-record.c (recpy_func_type): New static object.
4228 (recpy_func_new, recpy_func_level, recpy_func_symbol,
4229 recpy_func_instructions, recpy_func_up, recpy_func_prev,
4230 recpy_func_next): New function.
4231 (recpy_element_hash, recpy_element_richcompare): Updated comment.
4232 (recpy_func_getset): New static object.
4233 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4234 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4235
0ed5da75
TW
42362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4237
4238 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4239 (btpy_object, btpy_insn_type, btpy_new): Remove.
4240 (btpy_list_object): Use gdb.RecordInstruction type instead of
4241 gdb.BtraceInstruction type.
4242 (btrace_insn_from_recpy_insn): New function.
4243 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4244 btpy_new.
4245 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4246 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4247 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4248 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4249 instead of btpy_object.
4250 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4251 btpy_insn_data, btpy_insn_decode): Rename to ...
4252 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4253 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4254 recpy_bt_insn_decode): This. Also, use new helper functions.
4255 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4256 recpy_insn_type.
4257 (btpy_insn_getset): Remove.
4258 (gdbpy_initialize_btrace): Remove code to initialize
4259 gdb.BtraceInstruction. Use recpy_element_object.
4260 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4261 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4262 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4263 * python/py-record.c (recpy_insn_type): New static object.
4264 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4265 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4266 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4267 New function.
4268 (recpy_insn_getset): New static object.
4269 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4270 * python/py-record.h (recpy_element_object): New typedef.
4271 (recpy_insn_type, recpy_insn_new): New export.
4272
913aeadd
TW
42732017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4274
4275 * py-record-btrace.c (btpy_insn_new): Removed.
4276 (btpy_insn_or_gap_new): New function.
4277 (btpy_insn_error): Removed.
4278 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4279 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4280 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4281 btpy_insn_or_gap_new instead of btpy_insn_new.
4282 (btpy_insn_getset): Remove btpy_insn_error.
4283 * py-record.c (recpy_gap_type): New static object.
4284 (recpy_gap_object): New typedef.
4285 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4286 recpy_gap_reason_string): New function.
4287 (recpy_gap_getset): New static object.
4288 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4289 * py-record.h (recpy_gap_new): New export.
4290
a3be24ad
TW
42912017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4292
4293 * python/py-record.c (recpy_ptid): Remove.
4294 (recpy_record_getset): Remove recpy_ptid.
4295
ae20e79a
TW
42962017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4297
4298 * btrace.c (btrace_fetch): Set inferior_ptid.
4299 * python/py-record-btrace.c: Add "py-record.h" include.
4300 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4301 recpy_bt_end, recpy_bt_instruction_history,
4302 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4303 in gdb.Record object instead of current ptid.
4304 * python/py-record.c: Include new "py-record.h" file.
4305 (recpy_record_object): Moved to py-record.h.
4306 * python/py-record.h: New file.
4307
8d0050ea
TW
43082017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
4309
4310 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4311 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4312 indentation.
4313
3f380b50
JB
43142017-05-01 Joel Brobecker <brobecker@adacore.com>
4315
4316 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4317 the past maintainers section.
4318
07495424
YQ
43192017-04-28 Yao Qi <yao.qi@linaro.org>
4320
4321 * infcmd.c (get_return_value): Use regcache ctor, and remove
4322 cleanup.
4323
deb1fa3e
YQ
43242017-04-28 Yao Qi <yao.qi@linaro.org>
4325 Pedro Alves <palves@redhat.com>
4326
4327 * regcache.c (regcache::regcache): New tag dispatch ctor.
4328 (do_cooked_read): Moved above.
4329 (regcache_dup): Use the tag dispatch ctor..
4330 * regcache.h (regcache): Declare ctor, delete copy ctor and
4331 assignment operator, remove friend regcache_dup.
4332
b421c83c
YQ
43332017-04-28 Yao Qi <yao.qi@linaro.org>
4334
4335 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4336 call method save instead of regcache_cpy.
4337 * regcache.h (struct regcache): Make regcache_dup a friend.
4338
ef79d9a3
YQ
43392017-04-28 Yao Qi <yao.qi@linaro.org>
4340
4341 * regcache.c (struct regcache): Move to regcache.h
4342 (regcache::arch): New method.
4343 (regcache_get_ptid): Update.
4344 (get_regcache_arch): Call arch method.
4345 (get_regcache_aspace): Call method aspace.
4346 (register_buffer): Change it to method.
4347 (regcache_save): Change it to regcache::save.
4348 (regcache_restore): Likewise.
4349 (regcache_cpy_no_passthrough): Remove the declaration.
4350 (regcache_cpy): Call methods restore and cpy_no_passthrough.
4351 (regcache_cpy_no_passthrough): Change it to method
4352 cpy_no_passthrough.
4353 (regcache_register_status): Change it to method
4354 get_register_status.
4355 (regcache_invalidate): Change it to method invalidate.
4356 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4357 (regcache_raw_update): Change it to method raw_update.
4358 (regcache_raw_read): Likewise.
4359 (regcache_raw_read_signed): Likewise.
4360 (regcache_raw_read_unsigned): Likewise.
4361 (regcache_raw_write_signed): Likewise.
4362 (regcache_raw_write_unsigned): Likewise.
4363 (regcache_cooked_read): Likewise.
4364 (regcache_cooked_read_value): Likewise.
4365 (regcache_cooked_read_signed): Likewise.
4366 (regcache_cooked_read_unsigned): Likewise.
4367 (regcache_cooked_write_signed): Likewise.
4368 (regcache_cooked_write_unsigned): Likewise.
4369 (regcache_raw_set_cached_value): Likewise.
4370 (regcache_raw_write): Likewise.
4371 (regcache_cooked_write): Likewise.
4372 (regcache_xfer_part): Likewise.
4373 (regcache_raw_read_part): Likewise.
4374 (regcache_raw_write_part): Likewise.
4375 (regcache_cooked_read_part): Likewise.
4376 (regcache_cooked_write_part): Likewise.
4377 (regcache_raw_supply): Likewise.
4378 (regcache_raw_collect): Likewise.
4379 (regcache_transfer_regset): Likewise.
4380 (regcache_supply_regset): Likewise.
4381 (regcache_collect_regset): Likewise.
4382 (regcache_debug_print_register): Likewise.
4383 (enum regcache_dump_what): Move it to regcache.h.
4384 (regcache_dump): Change it to method dump.
4385 * regcache.h (enum regcache_dump_what): New.
4386 (class regcache): New.
4387 * target.c (target_fetch_registers): Call method
4388 debug_print_register.
4389 (target_store_registers): Likewise.
4390
f8fdb78e
SM
43912017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4392
4393 * windows-nat.c (struct lm_info_windows): Initialize field.
4394 (windows_make_so): Allocate lm_info_windows with new.
4395 (windows_free_so): Free lm_info_windows with delete.
4396
9ccbfd7b
SM
43972017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4398
4399 * solib-darwin.c (struct lm_info_darwin): Initialize field.
4400 (darwin_current_sos): Allocate lm_info_darwin with new, remove
4401 cleanup.
4402 (darwin_free_so): Free lm_info_darwin with delete.
4403
76e75227
SM
44042017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4405
4406 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4407 <l_addr_p>: Change type to bool.
4408 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4409 (svr4_free_so): Free lm_info_svr4 with delete.
4410 (svr4_copy_library_list): Replace memcpy with call to copy
4411 constructor.
4412 (library_list_start_library, svr4_default_sos): Allocate
4413 lm_info_svr4 with new.
4414
51046d9e
SM
44152017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4416
4417 * solib-target.c (struct lm_info_target): Add destructor,
4418 initialize fields.
4419 <name>: Change type to std::string.
4420 (library_list_start_library): Allocate lm_info_target with new.
4421 (solib_target_free_library_list): Free lm_info_target with
4422 delete.
4423 (solib_target_current_sos): Adapt to std::string.
4424 (solib_target_free_so): Free lm_info_target with delete.
4425
4023ae76
SM
44262017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4427
4428 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4429 fields.
4430 (frv_current_sos): Allocate lm_info_frv with new.
4431 (frv_relocate_main_executable): Free lm_info_frv with delete,
4432 allocate with new.
4433 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4434
af43057b
SM
44352017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4436
4437 * solib-frv.c (struct lm_info_frv): Fix indentation.
4438
b0911207
SM
44392017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4440
4441 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4442 map field.
4443 (dsbt_current_sos): Allocate lm_info_dsbt with new.
4444 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4445 and allocate with new.
4446 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4447
6c401f72
SM
44482017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4449
4450 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4451 <filename, member_name>: Change type to std::string.
4452 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4453 (library_list_start_library): Allocate lm_info_aix with new.
4454 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4455 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4456 with copy constructor.
4457
d0e449a1
SM
44582017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4459
4460 * solist.h (struct lm_info): Remove.
4461 (struct lm_info_base): New class.
4462 (struct so_list) <lm_info>: Change type to lm_info_base *.
4463 * nto-tdep.c (struct lm_info): Remove.
4464 (lm_addr): Adjust.
4465 * solib-aix.c (struct lm_info): Rename to ...
4466 (struct lm_info_aix): ... this. Extend lm_info_base.
4467 (lm_info_p): Rename to ...
4468 (lm_info_aix_p): ... this, and adjust.
4469 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4470 solib_aix_parse_libraries, library_list_start_library,
4471 solib_aix_free_library_list, solib_aix_parse_libraries,
4472 solib_aix_get_library_list,
4473 solib_aix_relocate_section_addresses, solib_aix_free_so,
4474 solib_aix_get_section_offsets,
4475 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4476 Adjust.
4477 (struct solib_aix_inferior_data) <library_list>: Adjust.
4478 * solib-darwin.c (struct lm_info): Rename to ...
4479 (struct lm_info_darwin): ... this. Extend lm_info_base.
4480 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4481 * solib-dsbt.c (struct lm_info): Rename to ...
4482 (struct lm_info_dsbt): ... this. Extend lm_info_base.
4483 (struct dsbt_info) <main_executable_lm_info): Adjust.
4484 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4485 dsbt_relocate_section_addresses): Adjust.
4486 * solib-frv.c (struct lm_info): Rename to ...
4487 (struct lm_info_frv): ... this. Extend lm_info_base.
4488 (main_executable_lm_info): Adjust.
4489 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4490 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4491 find_canonical_descriptor_in_load_object,
4492 frv_fdpic_find_canonical_descriptor): Adjust.
4493 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4494 to lm_info_svr4.
4495 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4496 svr4_clear_so, svr4_copy_library_list,
4497 library_list_start_library, svr4_default_sos, svr4_read_so_list,
4498 svr4_current_sos, svr4_fetch_objfile_link_map,
4499 solist_update_incremental): Adjust.
4500 * solib-svr4.h (struct lm_info_svr4): Move here from
4501 solib-svr4.c.
4502 * solib-target.c (struct lm_info): Rename to ...
4503 (struct lm_info_target): ... this. Extend lm_info_base.
4504 (lm_info_p): Rename to ...
4505 (lm_info_target_p): ... this.
4506 (solib_target_parse_libraries, library_list_start_segment,
4507 library_list_start_section, library_list_start_library,
4508 library_list_end_library, solib_target_free_library_list,
4509 solib_target_current_sos, solib_target_free_so,
4510 solib_target_relocate_section_addresses): Adjust.
4511 * windows-nat.c (struct lm_info): Rename to ...
4512 (struct lm_info_windows): ... this. Extend lm_info_base.
4513 (windows_make_so, handle_load_dll, handle_unload_dll,
4514 windows_xfer_shared_libraries): Adjust.
4515
434a4023
SM
45162017-04-28 Simon Marchi <simon.marchi@ericsson.com>
4517
4518 * solib-darwin.c (struct darwin_so_list): Remove.
4519 (darwin_current_sos): Allocate an so_list object instead of a
4520 darwin_so_list, separately allocate an lm_info object.
4521 (darwin_free_so): Free lm_info.
4522
428544e8
JB
45232017-04-28 John Baldwin <jhb@FreeBSD.org>
4524
4525 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
4526 with fprintf_filtered.
4527
4621115f
YQ
45282017-04-28 Yao Qi <yao.qi@linaro.org>
4529
4530 * regcache.c (regcache::regcache): New function.
4531 (regcache::~regcache): New function.
4532 (regcache_xmalloc_1): Remove.
4533 (regcache_xmalloc): Call new regcache.
4534 (regcache_xfree): Call delete regcache.
4535 (get_thread_arch_aspace_regcache): Call new regcache.
4536
339053c2
YQ
45372017-04-28 Yao Qi <yao.qi@linaro.org>
4538
4539 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
4540 lwp instead of ptid_get_lwp.
4541
7974a605
YQ
45422017-04-28 Yao Qi <yao.qi@linaro.org>
4543
4544 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
4545 lwp_info instead of getting from inferior_ptid.
4546
e15c3eb4
KS
45472017-04-27 Keith Seitz <keiths@redhat.com>
4548
4549 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
4550 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
4551 (CV_CONVERSION_BADNESS): Define.
4552 (rank_one_type): Remove overly restrictive rvalue reference
4553 rank checks.
4554 Add cv-qualifier checks and subranks for type equality.
4555 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
4556 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
4557 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
4558
72bc1d24
SM
45592017-04-27 Simon Marchi <simon.marchi@ericsson.com>
4560
4561 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
4562 count when creating the object.
4563
55bcecda
UW
45642017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
4565 Ulrich Weigand <uweigand@de.ibm.com>
4566
4567 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
4568 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
4569 is used in AIX.
4570 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
4571 (process_xcoff_symbol): Likewise.
4572 (scan_xcoff_symtab): Likewise.
4573
5c99fcf8
AH
45742017-04-26 Alan Hayward <alan.hayward@arm.com>
4575
4576 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
4577 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
4578 (ia64_access_reg): Use get_frame_register_unsigned.
4579 (ia64_access_rse_reg): Likewise.
4580 (ia64_libunwind_frame_prev_register): Likewise.
4581
b41c5a85
JW
45822017-04-26 Jiong Wang <jiong.wang@arm.com>
4583
4584 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
4585 * gdbarch.c: Regenerated.
4586 * gdbarch.h: Regenerated.
4587 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
4588 visibility external.
4589 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
4590 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
4591 (enum cfa_how_kind): Move to ...
4592 (struct dwarf2_frame_state_reg_info): Likewise.
4593 (struct dwarf2_frame_state): Likewise.
4594 * dwarf2-frame.h: ... here.
4595 (dwarf2_frame_state_alloc_regs): New declaration.
4596 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
4597 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
4598
c185f580
AH
45992017-04-26 Alan Hayward <alan.hayward@arm.com>
4600
4601 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
4602 regcache_raw_read_unsigned.
4603 (xtensa_pseudo_register_write): Likewise.
4604
19c45594
AH
46052017-04-26 Alan Hayward <alan.hayward@arm.com>
4606
4607 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
4608 (nds32_pseudo_register_write): Likewise.
4609
4658f12e
YQ
46102017-04-25 Yao Qi <yao.qi@linaro.org>
4611
4612 * regcache.c (struct regcache) <readonly_p>: Change its type
4613 to bool.
4614 (regcache_xmalloc_1): Update parameter type and callers update.
4615
d581dda8
YQ
46162017-04-25 Yao Qi <yao.qi@linaro.org>
4617
4618 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
4619 set_gdbarch_wchar_bit.
4620 * arm-tdep.c (arm_gdbarch_init): Likewise.
4621
debed3db
PA
46222017-04-25 Pedro Alves <palves@redhat.com>
4623
4624 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
4625 (BothAreRelocatable, memcopy, memmove): Don't define.
4626 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
4627 macros.
4628
b0b92aeb
PA
46292017-04-25 Pedro Alves <palves@redhat.com>
4630
4631 * common/common-defs.h: Include "common/poison.h".
4632 * common/function-view.h: (Not, Or, Requires): Move to traits.h
4633 and adjust.
4634 * common/poison.h: New file.
4635 * common/traits.h: Include <type_traits>.
4636 (Not, Or, Requires): New, moved from common/function-view.h.
4637
16c4d54a
PA
46382017-04-25 Pedro Alves <palves@redhat.com>
4639
4640 * breakpoint.h (struct breakpoint): In-class initialize all
4641 fields. Make boolean fields "bool".
4642 * breakpoint.c (init_raw_breakpoint_without_location): Remove
4643 memset call and initializations no longer necessary.
4644
b5c36682
PA
46452017-04-25 Pedro Alves <palves@redhat.com>
4646
4647 * btrace.c (pt_btrace_insn_flags): Change parameter type to
4648 reference.
4649 (pt_btrace_insn): New function.
4650 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
4651
5625a286
PA
46522017-04-25 Pedro Alves <palves@redhat.com>
4653
4654 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
4655 "base" field and inherit from "bp_location" instead. Add
4656 non-default ctor.
4657 (allocate_location_exception): Use new non-default ctor.
4658 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
4659 (init_bp_location): Convert to ...
4660 (bp_location::bp_location): ... this new ctor, and remove memset
4661 call.
4662 (base_breakpoint_allocate_location): Use the new non-default ctor.
4663 * breakpoint.h (bp_location): Now a class. Declare default and
4664 non-default ctors. In-class initialize all members.
4665 (init_bp_location): Remove declaration.
4666
23bcc18f
PA
46672017-04-25 Pedro Alves <palves@redhat.com>
4668
4669 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
4670 assignment operator.
4671
e1ba3053
YQ
46722017-04-24 Yao Qi <yao.qi@linaro.org>
4673
4674 * doublest.c (convert_doublest_to_floatformat): Call
4675 floatformat_totalsize_bytes.
4676
10f489e5
TT
46772017-04-22 Tom Tromey <tom@tromey.com>
4678
4679 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4680 ui_out_emit_list.
4681 * stack.c (print_frame): Use ui_out_emit_list.
4682 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4683 ui_out_emit_list.
4684 * mi/mi-main.c (print_one_inferior)
4685 (mi_cmd_data_list_register_names)
4686 (mi_cmd_data_list_register_values, mi_cmd_list_features)
4687 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
4688 ui_out_emit_list.
4689 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
4690 (mi_output_solib_attribs): Use ui_out_emit_list,
4691 ui_out_emit_tuple.
4692 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
4693 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
4694 (mi_cmd_stack_list_args, list_args_or_locals): Use
4695 ui_out_emit_list.
4696 * disasm.c (do_assembly_only): Use ui_out_emit_list.
4697 * breakpoint.c (print_solib_event, output_thread_groups): Use
4698 ui_out_emit_list.
4699
0092b74d
TT
47002017-04-22 Tom Tromey <tom@tromey.com>
4701
4702 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
4703 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
4704 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
4705
a14a62dd
TT
47062017-04-22 Tom Tromey <tom@tromey.com>
4707
4708 * tracepoint.c (tvariables_info_1)
4709 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
4710
46b9c129
TT
47112017-04-22 Tom Tromey <tom@tromey.com>
4712
4713 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
4714 annotate_arg_emitter.
4715 * breakpoint.c (print_mention_watchpoint)
4716 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
4717 * annotate.h (struct annotate_arg_emitter): New.
4718
2e783024
TT
47192017-04-22 Tom Tromey <tom@tromey.com>
4720
4721 * record-btrace.c (record_btrace_insn_history)
4722 (record_btrace_insn_history_range, record_btrace_call_history)
4723 (record_btrace_call_history_range): Use ui_out_emit_tuple.
4724 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
4725 ui_out_emit_tuple.
4726 * stack.c (print_frame_info): Use ui_out_emit_tuple.
4727 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
4728 * skip.c (skip_info): Use ui_out_emit_tuple.
4729 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
4730 * progspace.c (print_program_space): Use ui_out_emit_tuple.
4731 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
4732 * osdata.c (info_osdata): Use ui_out_emit_tuple.
4733 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4734 ui_out_emit_tuple.
4735 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
4736 (output_register, mi_cmd_data_read_memory)
4737 (mi_cmd_data_read_memory_bytes, mi_load_progress)
4738 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
4739 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
4740 Use ui_out_emit_tuple.
4741 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
4742 ui_out_emit_tuple.
4743 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4744 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
4745 * linux-thread-db.c (info_auto_load_libthread_db): Use
4746 ui_out_emit_tuple.
4747 * inferior.c (print_inferior): Use ui_out_emit_tuple.
4748 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
4749 * disasm.c (do_mixed_source_and_assembly_deprecated)
4750 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
4751 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
4752 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
4753 * breakpoint.c (print_one_breakpoint_location)
4754 (print_one_breakpoint): Use ui_out_emit_tuple.
4755 * auto-load.c (print_script, info_auto_load_cmd): Use
4756 ui_out_emit_tuple.
4757 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
4758
9be21bb4
SM
47592017-04-21 Simon Marchi <simon.marchi@ericsson.com>
4760
4761 * thread.c (print_thread_info_1): Remove dead code.
4762
0d4c07af
JK
47632017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4764
4765 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
4766 GDB_SELF_TEST.
4767 * arm-tdep.c (selftests::arm_record_test): Likewise.
4768
4daf993d
YQ
47692017-04-21 Yao Qi <yao.qi@linaro.org>
4770
4771 * regcache.c (regcache_restore): Remove argument 2. Replace
4772 argument 3 with regcache. Get register status from
4773 src->register_status and get register contents from
4774 register_buffer (src, regnum).
4775 (regcache_cpy): Update.
4776
a6c21d4a
PA
47772017-04-19 Pedro Alves <palves@redhat.com>
4778
4779 * gdbthread.h (thread): Add missing closing parenthesis in
4780 comment.
4781
3a3fd0fd
PA
47822017-04-19 Pedro Alves <palves@redhat.com>
4783
4784 * common/refcounted-object.h: New file.
4785 * gdbthread.h: Include "common/refcounted-object.h".
4786 (thread_info): Inherit from refcounted_object and add comments.
4787 (thread_info::incref, thread_info::decref)
4788 (thread_info::m_refcount): Delete.
4789 (thread_info::deletable): Use the refcounted_object::refcount()
4790 method.
4791 * inferior.c (current_inferior_): Add comment.
4792 (set_current_inferior): Increment/decrement refcounts.
4793 (prune_inferiors, remove_inferior_command): Skip inferiors marked
4794 not-deletable instead of comparing with the current inferior.
4795 (initialize_inferiors): Increment the initial inferior's refcount.
4796 * inferior.h (struct inferior): Forward declare.
4797 Include "common/refcounted-object.h".
4798 (current_inferior, set_current_inferior): Move declaration to
4799 before struct inferior's definition, and fix comment.
4800 (inferior): Inherit from refcounted_object. Add comments.
4801 * thread.c (switch_to_thread_no_regs): Reference the thread's
4802 inferior pointer directly instead of doing a ptid lookup.
4803 (switch_to_no_thread): New function.
4804 (switch_to_thread(thread_info *)): New function, factored out
4805 from ...
4806 (switch_to_thread(ptid_t)): ... this.
4807 (restore_current_thread): Delete.
4808 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
4809 fields, and add 'inf' field.
4810 (do_restore_current_thread_cleanup): Check whether old->inf is
4811 alive instead of looking up an inferior by ptid. Use
4812 switch_to_thread and switch_to_no_thread.
4813 (restore_current_thread_cleanup_dtor): Use old->inf directly
4814 instead of lookup up an inferior by id. Decref the inferior.
4815 Don't restore 'removable'.
4816 (make_cleanup_restore_current_thread): Same the inferior pointer
4817 in old, instead of the inferior number. Incref the inferior.
4818 Don't save/clear 'removable'.
4819
9bcb1f16
PA
48202017-04-19 Pedro Alves <palves@redhat.com>
4821
4822 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4823 unittests/scoped_restore-selftests.c.
4824 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
4825 * common/scoped_restore.h (scoped_restore_base): Make "class".
4826 (scoped_restore_base::release): New public method.
4827 (scoped_restore_base::scoped_restore_base): New protected ctor.
4828 (scoped_restore_base::m_saved_var): New protected field.
4829 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
4830 scoped_restore_base base class instead of m_saved_var directly.
4831 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
4832 (scoped_restore_tmpl::scoped_restore_tmpl(const
4833 scoped_restore_tmpl<T>&)): Likewise.
4834 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
4835 method.
4836 (scoped_restore_tmpl::saved_var): New method.
4837 (scoped_restore_tmpl::m_saved_var): Delete.
4838 * inferior.h (inferior::detaching): Now a bool.
4839 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
4840 cleanup.
4841 * unittests/scoped_restore-selftests.c: New file.
4842
26fcd539
PA
48432017-04-19 Pedro Alves <palves@redhat.com>
4844
4845 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
4846 Re-sort in alphabetic order.
4847
fdd243b0
PA
48482017-04-18 Pedro Alves <palves@redhat.com>
4849
4850 * xml-support.c (obstack_xml_printf): Delete.
4851 * xml-support.h (obstack_xml_printf): Delete.
4852
4895cde2
PA
48532017-04-18 Pedro Alves <palves@redhat.com>
4854
4855 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
4856 vdebug, verror, body_text, start_element, end_element, name,
4857 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
4858 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
4859 is_xinclude>: Make private and add m_ prefix.
4860 (gdb_xml_parser::body_text): New method, based on ...
4861 (gdb_xml_body_text): ... this. Adjust.
4862 (gdb_xml_parser::vdebug): New method, based on ...
4863 (gdb_xml_debug): ... this. Adjust.
4864 (gdb_xml_parser::verror): New method, based on ...
4865 (gdb_xml_error): ... this. Adjust.
4866 (gdb_xml_parser::start_element): New method, based on ...
4867 (gdb_xml_start_element): ... this. Adjust.
4868 (gdb_xml_start_element_wrapper): Defer to
4869 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
4870 (gdb_xml_parser::end_element): New method, based on ...
4871 (gdb_xml_end_element_wrapper): ... this. Adjust.
4872 (gdb_xml_parser::~gdb_xml_parser): Adjust.
4873 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
4874 (gdb_xml_parser::use_dtd): New method, based on ...
4875 (gdb_xml_use_dtd): ... this. Adjust.
4876 (gdb_xml_parser::parse): New method, based on ...
4877 (gdb_xml_parse): ... this. Adjust.
4878 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
4879 (xinclude_start_include): Adjust to call the parser's name method.
4880 (xml_xinclude_default, xml_xinclude_start_doctype)
4881 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
4882 method.
4883 (xml_process_xincludes): Adjust to call parser methods.
4884 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
4885 declarations.
4886
bd8a901f
PA
48872017-04-18 Pedro Alves <palves@redhat.com>
4888
4889 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
4890 gdb::optional<std::string>.
4891 * xml-support.c: Include <string>.
4892 (scope_level::scope_level(scope_level &&))
4893 (scope_level::~scope_level): Delete.
4894 (scope_level::body): Now a std::string.
4895 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
4896 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
4897 parameter.
4898 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
4899 (xinclude_parsing_data::output): Now a std::string reference.
4900 (xinclude_start_include): Adjust.
4901 (xml_xinclude_default): Adjust.
4902 (xml_process_xincludes): Add 'output' parameter, and return bool.
4903 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
4904 and return bool.
4905 * xml-tdesc.c: Include <unordered_map> and <string>.
4906 (tdesc_xml_cache): Delete.
4907 (tdesc_xml_cache_s): Delete.
4908 (xml_cache): Now an std::unordered_map.
4909 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
4910 (target_fetch_description_xml): Change return type to
4911 gdb::optional<std::string>, and adjust.
4912 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
4913 (target_fetch_description_xml): Change return type to
4914 gdb::optional<std::string>.
4915
d35d1958
PA
49162017-04-18 Pedro Alves <palves@redhat.com>
4917
4918 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4919 unittests/optional-selftests.c.
4920 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
4921 * unittests/optional-selftests.c: New file.
4922 * unittests/optional/assignment/1.cc: New file.
4923 * unittests/optional/assignment/2.cc: New file.
4924 * unittests/optional/assignment/3.cc: New file.
4925 * unittests/optional/assignment/4.cc: New file.
4926 * unittests/optional/assignment/5.cc: New file.
4927 * unittests/optional/assignment/6.cc: New file.
4928 * unittests/optional/assignment/7.cc: New file.
4929 * unittests/optional/cons/copy.cc: New file.
4930 * unittests/optional/cons/default.cc: New file.
4931 * unittests/optional/cons/move.cc: New file.
4932 * unittests/optional/cons/value.cc: New file.
4933 * unittests/optional/in_place.cc: New file.
4934 * unittests/optional/observers/1.cc: New file.
4935 * unittests/optional/observers/2.cc: New file.
4936
22796e97
PA
49372017-04-18 Pedro Alves <palves@redhat.com>
4938
4939 * common/gdb_optional.h: Include common/traits.h.
4940 (in_place_t): New type.
4941 (in_place): New constexpr variable.
4942 (optional::optional): Remove member initialization of
4943 m_instantiated.
4944 (optional::optional(in_place_t...)): New constructor.
4945 (optional::~optional): Use reset.
4946 (optional::optional(const optional&)): New.
4947 (optional::optional(const optional&&)): New.
4948 (optional::optional(T &)): New.
4949 (optional::optional(T &&)): New.
4950 (operator::operator=(const optional &)): New.
4951 (operator::operator=(optional &&)): New.
4952 (operator::operator= (const T &))
4953 (operator::operator= (T &&))
4954 (operator::emplace (Args &&... args)): Return a T&. Use reset.
4955 (operator::reset): New.
4956 (operator::m_instantiated):: Add in-class initializer.
4957 * common/traits.h: Include <type_traits>.
4958 (struct And): New types.
4959
a7fc9b61
PA
49602017-04-18 Pedro Alves <palves@redhat.com>
4961
4962 * xml-support.c: Include <vector>.
4963 (scope_level::scope_level(const gdb_xml_element *))
4964 (scope_level::scope_level(scope_level&&)): New.
4965 (scope_level::~scope_level): New.
4966 (scope_level_s): Delete.
4967 (gdb_xml_parser::scopes): Now a std::vector.
4968 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
4969 Use std::vector.
4970 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
4971 scope cleanup code.
4972 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
4973 of the scopes member. Use std::vector::emplace_back.
4974
010151c9
PA
49752017-04-18 Pedro Alves <palves@redhat.com>
4976
4977 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
4978 a bool.
4979 (gdb_xml_end_element): Change type of first parameter.
4980 (gdb_xml_cleanup): Rename to ...
4981 (gdb_xml_parser::~gdb_xml_parser): ... this.
4982 (gdb_xml_create_parser_and_cleanup): Delete with ...
4983 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
4984 to this new ctor.
4985 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
4986 using gdb_xml_create_parser_and_cleanup.
4987 (xinclude_parsing_data): Add ctor/dtor.
4988 (xml_xinclude_cleanup): Delete.
4989 (xml_process_xincludes): Create a local xinclude_parsing_data
4990 instead of heap-allocating one. Create a local gdb_xml_parser
4991 instead of heap-allocating one with
4992 gdb_xml_create_parser_and_cleanup.
4993
d56060f0
JB
49942017-04-18 John Baldwin <jhb@FreeBSD.org>
4995
4996 PR threads/20743
4997 * fbsd-nat.c (resume_one_thread_cb): Remove.
4998 (resume_all_threads_cb): Remove.
4999 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5000 iterate_over_threads.
5001
305d16a9
JB
50022017-04-17 Joel Brobecker <brobecker@adacore.com>
5003
5004 * NEWS: Create a new section for the next release branch.
5005 Rename the section of the current branch, now that it has
5006 been cut.
5007
8bb57231
JB
50082017-04-17 Joel Brobecker <brobecker@adacore.com>
5009
5010 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5011 * version.in: Bump version to 8.0.50.DATE-git.
5012
096c92dd
SDJ
50132017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
5014
5015 PR gdb/21385
5016 * windows-nat.c (windows_create_inferior): Declare 'allargs'
5017 independently of the host, and fix build breakage on Cygwin.
5018
0550c955
PA
50192017-04-13 Pedro Alves <palves@redhat.com>
5020
5021 * inferior.c (free_inferior): Convert to ...
5022 (inferior::~inferior): ... this dtor.
5023 (inferior::inferior): New ctor, factored out from ...
5024 (add_inferior_silent): ... here. Allocate the inferior with a new
5025 expression.
5026 (delete_inferior): Call delete instead of free_inferior.
5027 * inferior.h (gdb_environ, continuation): Forward declare.
5028 (inferior): Now a class. Add in-class initialization to all
5029 members. Make boolean fields bool, except 'detaching'.
5030 (inferior::inferior): New explicit ctor.
5031 (inferior::~inferior): New.
5032
e3d60dfc
PA
50332017-04-13 Pedro Alves <palves@redhat.com>
5034
5035 * inferior.c (init_inferior_list): Delete.
5036 * inferior.h (init_inferior_list): Delete.
5037
5fd69d0a
PA
50382017-04-13 Pedro Alves <palves@redhat.com>
5039
5040 PR threads/13217
5041 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5042 (top level): Call it twice, with different thread sets.
5043
c6609450
PA
50442017-04-13 Pedro Alves <palves@redhat.com>
5045
5046 * thread.c: Include <algorithm>.
5047 (thread_array_cleanup): Delete.
5048 (scoped_inc_dec_ref): New class.
5049 (live_threads_count): New function.
5050 (set_thread_refcount): Delete.
5051 (tp_array_compar_ascending): Now a bool.
5052 (tp_array_compar): Convert to a std::sort comparison function.
5053 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5054 and live_threads_count.
5055
2a00d7ce
PA
50562017-04-13 Pedro Alves <palves@redhat.com>
5057
5058 * infrun.c (follow_fork_inferior): Also switch the current
5059 inferior.
5060
441d7c93
PA
50612017-04-13 Pedro Alves <palves@redhat.com>
5062
5063 * breakpoint.c (watch_command_1): Save watchpoint-frame info
5064 before calling create_internal_breakpoint.
5065
808480f6
PA
50662017-04-13 Pedro Alves <palves@redhat.com>
5067
5068 * fork-child.c (execv_argv): New class.
5069 (breakup_args): Refactored as ...
5070 (execv_argv::init_for_no_shell): .. this method of execv_argv.
5071 Copy arguments to storage and replace separators with NULL
5072 terminators in place.
5073 (escape_bang_in_quoted_argument): Adjust to return bool.
5074 (execv_argv::execv_argv): New ctor.
5075 (execv_argv::init_for_shell): New method, factored out from
5076 fork_inferior. Don't strdup strings into the vector.
5077 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
5078 Remove free_vector_argv call.
5079
ad3d022a
YQ
50802017-04-13 Yao Qi <yao.qi@linaro.org>
5081
5082 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5083 tdep->rx_psw_type.
5084
e6ddc3bf
YQ
50852017-04-13 Yao Qi <yao.qi@linaro.org>
5086
5087 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5088 * rx-tdep.c (rx_gdbarch_init): Likewise.
5089
bfb8cf90
PA
50902017-04-13 Pedro Alves <palves@redhat.com>
5091
5092 * breakpoint.h (struct breakpoint): Reindent.
5093
f5336ca5
PA
50942017-04-13 Pedro Alves <palves@redhat.com>
5095
5096 * breakpoint.c (bp_location): Rename to ...
5097 (bp_locations): ... this. All references updated.
5098 (bp_location_count): Rename to ...
5099 (bp_locations_count): ... this. All references updated.
5100 (bp_location_placed_address_before_address_max): Rename to ...
5101 (bp_locations_placed_address_before_address_max): ... this. All
5102 references updated.
5103 (bp_location_shadow_len_after_address_max): Rename to ...
5104 (bp_locations_shadow_len_after_address_max): ... this. All
5105 references updated.
5106 (bp_location_compare_addrs): Rename to ...
5107 (bp_locations_compare_addrs): ... this. All references updated.
5108 (bp_location_compare):Rename to ...
5109 (bp_locations_compare): ... this. All references updated.
5110 (bp_location_target_extensions_update): Rename to ...
5111 (bp_locations_target_extensions_update): ... this. All references
5112 updated.
5113
be628ab8
SDJ
51142017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5115
5116 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5117 * common/common.m4: Check headers 'termios.h', 'termio.h' and
5118 'sgtty.h'.
5119 * common/gdb_termios.h: New file, with parts of "terminal.h".
5120 * inflow.c: Include "gdb_termios.h".
5121 * ser-unix.c: Include "gdb_termios.h".
5122 * terminal.h: Move terminal-related defines to
5123 "common/gdb_termios.h".
5124
8e9e35b1
TT
51252017-04-12 Tom Tromey <tom@tromey.com>
5126
5127 * probe.c (parse_probes): Update.
5128 * location.h (delete_event_location): Don't declare.
5129 (event_location_deleter::operator()): Update.
5130 * location.c (event_location_deleter::operator()): Rename from
5131 delete_event_location.
5132 * linespec.h (linespec_result) <location>: Change type to
5133 event_location_up.
5134 * linespec.c (canonicalize_linespec, event_location_to_sals)
5135 (decode_objc): Update.
5136 (linespec_result): Don't call delete_event_location.
5137 * breakpoint.c (create_breakpoints_sal)
5138 (bkpt_probe_create_sals_from_location)
5139 (strace_marker_create_sals_from_location): Update.
5140
16e802b9
TT
51412017-04-12 Tom Tromey <tom@tromey.com>
5142
5143 * linespec.h (struct linespec_result): Add constructor and
5144 destructor.
5145 (init_linespec_result, destroy_linespec_result)
5146 (make_cleanup_destroy_linespec_result): Don't declare.
5147 * linespec.c (init_linespec_result): Remove.
5148 (linespec_result::~linespec_result): Rename from
5149 destroy_linespec_result. Update.
5150 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5151 Remove.
5152 * breakpoint.c (create_breakpoint, break_range_command)
5153 (decode_location_default): Update.
5154 * ax-gdb.c (agent_command_1): Update.
5155
d28cd78a
TT
51562017-04-12 Tom Tromey <tom@tromey.com>
5157
5158 * remote.c (remote_download_tracepoint): Update.
5159 * python/py-breakpoint.c (bppy_get_location): Update.
5160 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5161 (gdbscm_breakpoint_location): Update.
5162 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5163 * breakpoint.h (struct breakpoint) <location, location_range_end>:
5164 Change type to event_location_up.
5165 * breakpoint.c (create_overlay_event_breakpoint)
5166 (create_longjmp_master_breakpoint)
5167 (create_std_terminate_master_breakpoint)
5168 (create_exception_master_breakpoint)
5169 (breakpoint_event_location_empty_p, print_breakpoint_location)
5170 (print_one_breakpoint_location, create_thread_event_breakpoint)
5171 (init_breakpoint_sal, create_breakpoint)
5172 (print_recreate_ranged_breakpoint, break_range_command)
5173 (init_ada_exception_breakpoint, say_where): Update.
5174 (base_breakpoint_dtor): Don't call delete_event_location.
5175 (bkpt_print_recreate, tracepoint_print_recreate)
5176 (dprintf_print_recreate, update_static_tracepoint)
5177 (breakpoint_re_set_default): Update.
5178
711799d5
TT
51792017-04-12 Tom Tromey <tom@tromey.com>
5180
5181 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5182 type of "to_do". Update.
5183 (compute_stack_depth): Use std::vector.
5184
52d214d3
TT
51852017-04-12 Tom Tromey <tom@tromey.com>
5186
5187 * printcmd.c (find_instruction_backward): Use std::vector.
5188
4c404b8b
TT
51892017-04-12 Tom Tromey <tom@tromey.com>
5190
5191 * symfile.c (objfilep): Remove typedef.
5192 (reread_symbols): Use a std::vector.
5193
156d9eab
TT
51942017-04-12 Tom Tromey <tom@tromey.com>
5195
5196 * mi/mi-main.c (exec_direction_forward): Remove.
5197 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5198 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5199 scoped_restore.
5200 * guile/guile.c (guile_repl_command, guile_command)
5201 (gdbscm_execute_gdb_command): Use scoped_restore.
5202 * go-exp.y (go_parse): Use scoped_restore.
5203 * d-exp.y (d_parse): Use scoped_restore.
5204 * cli/cli-decode.c (cmd_func): Use scoped_restore.
5205 * c-exp.y (c_parse): Use scoped_restore.
5206
4d89769a
TT
52072017-04-12 Tom Tromey <tom@tromey.com>
5208
5209 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5210 (mi_parse): Update return type.
5211 (mi_parse_free): Remove.
5212 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5213 (mi_parse::~mi_parse): Rename from mi_parse_free.
5214 (mi_parse_cleanup): Remove.
5215 (mi_parse): Return a unique_ptr. Use new.
5216 * mi/mi-main.c (mi_execute_command): Update.
5217
4b217cc7
TT
52182017-04-12 Tom Tromey <tom@tromey.com>
5219
5220 * location.c (explicit_location_lex_one): Return a
5221 unique_xmalloc_ptr.
5222 (string_to_explicit_location): Update. Remove cleanups.
5223
59d3651b
TT
52242017-04-12 Tom Tromey <tom@tromey.com>
5225
5226 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5227 (compare_value_and_voffset): Change type. Update.
5228 (compute_vtable_size): Change type of "offset_vec".
5229 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
5230 (gnuv3_get_typeid): Remove extraneous declaration.
5231
b24b0d6c
TT
52322017-04-12 Tom Tromey <tom@tromey.com>
5233
5234 * charset.h (wchar_iterator): Fix comment.
5235
80a3b8c5
TT
52362017-04-12 Tom Tromey <tom@tromey.com>
5237
5238 * charset.c (iconv_wrapper): New class.
5239 (cleanup_iconv): Remove.
5240 (convert_between_encodings): Use it.
5241
c83dd867
TT
52422017-04-12 Tom Tromey <tom@tromey.com>
5243
5244 * symfile.h (increment_reading_symtab): Update type.
5245 * symfile.c (decrement_reading_symtab): Remove.
5246 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5247 * psymtab.c (psymtab_to_symtab): Update.
5248 * dwarf2read.c (dw2_instantiate_symtab): Update.
5249
0e8621a0
TT
52502017-04-12 Tom Tromey <tom@tromey.com>
5251
5252 * jit.c (struct jit_reader): Declare separately. Add constructor
5253 and destructor. Change type of "handle".
5254 (loaded_jit_reader): Define separately.
5255 (jit_reader_load): Update. New "new".
5256 (jit_reader_unload_command): Use "delete".
5257 * gdb-dlfcn.h (struct dlclose_deleter): New.
5258 (gdb_dlhandle_up): New typedef.
5259 (gdb_dlopen, gdb_dlsym): Update types.
5260 (gdb_dlclose): Remove.
5261 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5262 (gdb_dlsym): Change type of "handle".
5263 (make_cleanup_dlclose): Remove.
5264 (dlclose_deleter::operator()): Rename from gdb_dlclose.
5265 * compile/compile-c-support.c (load_libcc): Update.
5266
67d89901
TT
52672017-04-12 Tom Tromey <tom@tromey.com>
5268
5269 * symtab.h (find_pcs_for_symtab_line): Change return type.
5270 * symtab.c (find_pcs_for_symtab_line): Change return type.
5271 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5272 type of "vec". Update.
5273 (ltpy_get_pcs_for_line): Update.
5274 * linespec.c (decode_digits_ordinary): Update.
5275
93921405
TT
52762017-04-12 Tom Tromey <tom@tromey.com>
5277
5278 * tracepoint.c (actions_command): Update.
5279 * python/python.c (python_command, python_interactive_command):
5280 Update.
5281 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5282 * guile/guile.c (guile_command): Update.
5283 * defs.h (read_command_lines, read_command_lines_1): Return
5284 command_line_up.
5285 (command_lines_deleter): New struct.
5286 (command_line_up): New typedef.
5287 * compile/compile.c (compile_code_command)
5288 (compile_print_command): Update.
5289 * cli/cli-script.h (get_command_line, copy_command_lines): Return
5290 command_line_up.
5291 (make_cleanup_free_command_lines): Remove.
5292 * cli/cli-script.c (get_command_line, read_command_lines_1)
5293 (copy_command_lines): Return command_line_up.
5294 (while_command, if_command, read_command_lines, define_command)
5295 (document_command): Update.
5296 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5297 Remove.
5298 * breakpoint.h (breakpoint_set_commands): Change type of
5299 "commands".
5300 * breakpoint.c (breakpoint_set_commands): Change type of
5301 "commands". Update.
5302 (do_map_commands_command, update_dprintf_command_list)
5303 (create_tracepoint_from_upload): Update.
5304
ffc2605c
TT
53052017-04-12 Tom Tromey <tom@tromey.com>
5306
5307 * tracepoint.c (scope_info): Update.
5308 * spu-tdep.c (spu_catch_start): Update.
5309 * python/python.c (gdbpy_decode_line): Update.
5310 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5311 * python/py-breakpoint.c (bppy_init): Update.
5312 * probe.c (parse_probes): Update.
5313 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5314 * location.h (event_location_deleter): New struct.
5315 (event_location_up): New typedef.
5316 (new_linespec_location, new_address_location, new_probe_location)
5317 (new_explicit_location, copy_event_location)
5318 (string_to_event_location, string_to_event_location_basic)
5319 (string_to_explicit_location): Update return type.
5320 (make_cleanup_delete_event_location): Remove.
5321 * location.c (new_linespec_location, new_address_location)
5322 (new_probe_location, new_explicit_location, copy_event_location):
5323 Return event_location_up.
5324 (delete_event_location_cleanup)
5325 (make_cleanup_delete_event_location): Remove.
5326 (string_to_explicit_location, string_to_event_location_basic)
5327 (string_to_event_location): Return event_location_up.
5328 * linespec.c (canonicalize_linespec, event_location_to_sals)
5329 (decode_line_with_current_source)
5330 (decode_line_with_last_displayed, decode_objc): Update.
5331 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5332 * completer.c (location_completer): Update.
5333 * cli/cli-cmds.c (edit_command, list_command): Update.
5334 * breakpoint.c (create_overlay_event_breakpoint)
5335 (create_longjmp_master_breakpoint)
5336 (create_std_terminate_master_breakpoint)
5337 (create_exception_master_breakpoint)
5338 (create_thread_event_breakpoint): Update.
5339 (init_breakpoint_sal): Update. Remove some dead code.
5340 (create_breakpoint_sal): Change type of "location". Update.
5341 (create_breakpoints_sal, create_breakpoint, break_command_1)
5342 (dprintf_command, break_range_command, until_break_command)
5343 (init_ada_exception_breakpoint)
5344 (strace_marker_create_sals_from_location)
5345 (update_static_tracepoint, trace_command, ftrace_command)
5346 (strace_command, create_tracepoint_from_upload): Update.
5347 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5348 * ax-gdb.c (agent_command_1): Update.
5349
8f10c932
PA
53502017-04-12 Pedro Alves <palves@redhat.com>
5351
5352 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5353 * configure.tgt: Handle i[34567]86-*-go32* and
5354 i[34567]86-*-msdosdjgpp*.
5355 * i386-tdep.c (i386_svr4_reg_to_regnum):
5356 Make extern.
5357 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5358 i386-go32-tdep.c.
5359 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5360 * i386-go32-tdep.c: New file.
5361 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5362 declarations.
5363
0a31ccfb
SM
53642017-04-12 Simon Marchi <simon.marchi@ericsson.com>
5365
5366 * aix-thread.c (pd_status2str): Change return type to const char *.
5367
e9bb3fbb
PA
53682017-04-12 Pedro Alves <palves@redhat.com>
5369
5370 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5371 calls to set_gdbarch_gnu_triplet_regexp.
5372
53375380
PA
53732017-04-12 Pedro Alves <palves@redhat.com>
5374
5375 PR gdb/21323
5376 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5377 New enum value.
5378 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5379 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5380 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5381 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5382 * gdbarch.h, gdbarch.c: Regenerate.
5383 * aarch64-tdep.c (aarch64_gdbarch_init): Override
5384 gdbarch_wchar_bit and gdbarch_wchar_signed.
5385 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5386 * arm-tdep.c (arm_gdbarch_init): Likewise.
5387 * avr-tdep.c (avr_gdbarch_init): Likewise.
5388 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5389 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5390 * i386-tdep.c (i386_go32_init_abi): Likewise.
5391 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5392 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5393 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5394 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5395 * sh-tdep.c (sh_gdbarch_init): Likewise.
5396 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5397 * sparc64-tdep.c (sparc64_init_abi): Likewise.
5398 * windows-tdep.c (windows_init_abi): Likewise.
5399 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5400
53e710ac
PA
54012017-04-12 Pedro Alves <palves@redhat.com>
5402
5403 PR c++/21323
5404 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5405 cplus_primitive_type_char32_t>: New enum values.
5406 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5407 and cplus_primitive_type_char32_t.
5408 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5409 32, use the archtecture's built-in type for char16_t and char32_t,
5410 respectively. Otherwise, fallback to init_integer_type as before,
5411 but make the type unsigned, and issue a complaint.
5412 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5413
ab0538b8
AH
54142017-04-12 Alan Hayward <alan.hayward@arm.com>
5415
5e0e0422 5416 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
5417 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5418
5430098f
SDJ
54192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5420
5421 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5422 'const char *'.
5423
7c5ded6a
SDJ
54242017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5425
5426 * common/common-utils.c (free_vector_argv): New function.
5427 * common/common-utils.h: Include <vector>.
5428 (free_vector_argv): New prototype.
5429 * darwin-nat.c (darwin_create_inferior): Rewrite function
5430 prototype in order to constify "exec_file" and accept a
5431 "std::string" for "allargs".
5432 * fork-child.c: Include <vector>.
5433 (breakup_args): Rewrite function, using C++.
5434 (fork_inferior): Rewrite function header, constify "exec_file_arg"
5435 and accept "std::string" for "allargs". Update the code to
5436 calculate "argv" based on "allargs". Update calls to "exec_fun"
5437 and "execvp".
5438 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5439 order to constify "exec_file" and accept a "std::string" for
5440 "allargs".
5441 * go32-nat.c (go32_create_inferior): Likewise.
5442 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5443 * infcmd.c (run_command_1): Constify "exec_file". Use
5444 "std::string" for inferior arguments.
5445 * inferior.h (fork_inferior): Update prototype.
5446 * linux-nat.c (linux_nat_create_inferior): Rewrite function
5447 prototype in order to constify "exec_file" and accept a
5448 "std::string" for "allargs".
5449 * nto-procfs.c (procfs_create_inferior): Likewise.
5450 * procfs.c (procfs_create_inferior): Likewise.
5451 * remote-sim.c (gdbsim_create_inferior): Likewise.
5452 * remote.c (extended_remote_run): Update code to accept
5453 "std::string" as argument.
5454 (extended_remote_create_inferior): Rewrite function prototype in
5455 order to constify "exec_file" and accept a "std::string" for
5456 "allargs".
5457 * rs6000-nat.c (super_create_inferior): Likewise.
5458 (rs6000_create_inferior): Likewise.
5459 * target.h (struct target_ops) <to_create_inferior>: Likewise.
5460 * windows-nat.c (windows_create_inferior): Likewise.
5461
ae0eee42
PA
54622017-04-11 Pedro Alves <palves@redhat.com>
5463
5464 * thread.c: Fix whitespace throughout.
5465
a6acac06
PR
54662017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
5467
5468 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5469
64403bd1
AH
54702017-04-11 Alan Hayward <alan.hayward@arm.com>
5471
5472 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5473
a5bef50f
SDJ
54742017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
5475
5476 PR gdb/21364
5477 * osdata.c (info_osdata): Check if 'type' is an empty string
5478 instead of NULL.
5479
9295a5a9
PA
54802017-04-10 Pedro Alves <palves@redhat.com>
5481
5482 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5483 (ptid_to_global_thread_id, in_thread_list)
5484 (do_captured_list_thread_ids, set_resumed, set_running)
5485 (set_executing, set_stop_requested, finish_thread_state)
5486 (validate_registers_access, can_access_registers_ptid)
5487 (print_thread_info_1, switch_to_thread)
5488 (do_restore_current_thread_cleanup)
5489 (make_cleanup_restore_current_thread, thread_command)
5490 (thread_name_command): Use operator== instead of ptid_equal.
5491
996812e3
PA
54922017-04-10 Pedro Alves <palves@redhat.com>
5493
5494 * thread.c (struct current_thread_cleanup) <next>: Delete field.
5495 (current_thread_cleanup_chain): Delete.
5496 (restore_current_thread_cleanup_dtor)
5497 (make_cleanup_restore_current_thread): Remove references to
5498 current_thread_cleanup_chain.
5499
845b344f
AH
55002017-04-10 Alan Hayward <alan.hayward@arm.com>
5501
5502 * msp430-tdep.c (msp430_pseudo_register_read): Never return
5503 REG_UNKNOWN.
5504
803bdfe4
YQ
55052017-04-10 Yao Qi <yao.qi@linaro.org>
5506
5507 PR gdb/19942
5508 * gdbthread.h (thread_info::deletable): New method.
5509 (thread_info::incref): New method.
5510 (thread_info::decref): New method.
5511 (thread_info::refcount): Move it to private.
5512 * infrun.c (save_stop_context): Call inc_refcount.
5513 (release_stop_context_cleanup): Likewise.
5514 * thread.c (set_thread_exited): New function.
5515 (init_thread_list): Delete "tp" only it is deletable, otherwise
5516 call set_thread_exited.
5517 (delete_thread_1): Call set_thread_exited.
5518 (current_thread_cleanup) <inferior_pid>: Remove.
5519 <thread>: New field.
5520 (restore_current_thread_ptid_changed): Removed.
5521 (do_restore_current_thread_cleanup): Adjust.
5522 (restore_current_thread_cleanup_dtor): Don't call
5523 find_thread_ptid.
5524 (set_thread_refcount): Use dec_refcount.
5525 (make_cleanup_restore_current_thread): Adjust.
5526 (thread_apply_all_command): Call inc_refcount.
5527 (_initialize_thread): Don't call
5528 observer_attach_thread_ptid_changed.
5529
8c25b497
YQ
55302017-04-10 Yao Qi <yao.qi@linaro.org>
5531
5532 * thread.c (delete_thread_1): Hoist code on marking thread as
5533 exited.
5534
8473b447
SM
55352017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5536
5537 * windows-nat.c (windows_detach): Initialize ptid with
5538 minus_one_ptid.
5539
6670ec13
SM
55402017-04-07 Simon Marchi <simon.marchi@ericsson.com>
5541
5542 * unittests/ptid-selftests.c: Fix erroneous assert messages.
5543
ba2f91bb
AH
55442017-04-07 Alan Hayward <alan.hayward@arm.com>
5545
5546 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
5547 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
5548 (bfin_pseudo_register_write): Likewise
5549
436252de
SM
55502017-04-06 Simon Marchi <simon.marchi@ericsson.com>
5551
5552 * common/ptid.h (struct ptid): Change to...
5553 (class ptid_t): ... this.
5554 <ptid_t>: New constructors.
5555 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
5556 matches>: New methods.
5557 <make_null, make_minus_one>: New static methods.
5558 <pid>: Rename to...
5559 <m_pid>: ...this.
5560 <lwp>: Rename to...
5561 <m_lwp>: ...this.
5562 <tid>: Rename to...
5563 <m_tid>: ...this.
5564 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
5565 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
5566 as references, move comment to class ptid_t.
5567 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
5568 ptid_t static methods.
5569 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
5570 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
5571 Take ptid arguments as references, implement using ptid_t methods.
5572 * unittests/ptid-selftests.c: New file.
5573 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5574 unittests/ptid-selftests.c.
5575 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
5576
0dedf377
TP
55772017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
5578
5579 * python/python.c (python_run_simple_file): Cast mode literal to
5580 non-const char pointer as expected by PyFile_FromString.
5581
4e9868d4
SM
55822017-04-05 Simon Marchi <simon.marchi@ericsson.com>
5583
5584 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
5585 minus_one_ptid and null_ptid.
5586
9bf2a700
PA
55872017-04-05 Pedro Alves <palves@redhat.com>
5588
5589 * warning.m4 (build_warnings): Remove -Wno-write-strings.
5590 * configure: Regenerate.
5591
a121b7c1
PA
55922017-04-05 Pedro Alves <palves@redhat.com>
5593
5594 * ada-exp.y (yyerror): Constify.
5595 * ada-lang.c (bound_name, get_selections)
5596 (ada_variant_discrim_type)
5597 (ada_variant_discrim_name, ada_value_struct_elt)
5598 (ada_lookup_struct_elt_type, is_unchecked_variant)
5599 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
5600 (catch_ada_exception_command_split)
5601 (catch_ada_assert_command_split, catch_assert_command)
5602 (ada_op_name): Constify.
5603 * ada-lang.h (ada_yyerror, get_selections)
5604 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
5605 * arc-tdep.c (arc_print_frame_cache): Constify.
5606 * arm-tdep.c (arm_skip_stub): Constify.
5607 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
5608 (gen_aggregate_elt_ref): Constify.
5609 * bcache.c (print_bcache_statistics): Constify.
5610 * bcache.h (print_bcache_statistics): Constify.
5611 * break-catch-throw.c (catch_exception_command_1):
5612 * breakpoint.c (struct ep_type_description::description):
5613 Constify.
5614 (add_solib_catchpoint): Constify.
5615 (catch_fork_command_1): Add cast.
5616 (add_catch_command): Constify.
5617 * breakpoint.h (add_catch_command, add_solib_catchpoint):
5618 Constify.
5619 * bsd-uthread.c (bsd_uthread_state): Constify.
5620 * buildsym.c (patch_subfile_names): Constify.
5621 * buildsym.h (next_symbol_text_func, patch_subfile_names):
5622 Constify.
5623 * c-exp.y (yyerror): Constify.
5624 (token::oper): Constify.
5625 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
5626 * c-varobj.c (cplus_describe_child): Constify.
5627 * charset.c (find_charset_names): Add cast.
5628 (find_charset_names): Constify array and add const_cast.
5629 * cli/cli-cmds.c (complete_command, cd_command): Constify.
5630 (edit_command): Constify.
5631 * cli/cli-decode.c (lookup_cmd): Constify.
5632 * cli/cli-dump.c (dump_memory_command, dump_value_command):
5633 Constify.
5634 (struct dump_context): Constify.
5635 (add_dump_command, restore_command): Constify.
5636 * cli/cli-script.c (get_command_line): Constify.
5637 * cli/cli-script.h (get_command_line): Constify.
5638 * cli/cli-utils.c (check_for_argument): Constify.
5639 * cli/cli-utils.h (check_for_argument): Constify.
5640 * coff-pe-read.c (struct read_pe_section_data): Constify.
5641 * command.h (lookup_cmd): Constify.
5642 * common/print-utils.c (decimal2str): Constify.
5643 * completer.c (gdb_print_filename): Constify.
5644 * corefile.c (set_gnutarget): Constify.
5645 * cp-name-parser.y (yyerror): Constify.
5646 * cp-valprint.c (cp_print_class_member): Constify.
5647 * cris-tdep.c (cris_register_name, crisv32_register_name):
5648 Constify.
5649 * d-exp.y (yyerror): Constify.
5650 (struct token::oper): Constify.
5651 * d-lang.h (d_yyerror): Constify.
5652 * dbxread.c (struct header_file_location::name): Constify.
5653 (add_old_header_file, add_new_header_file, last_function_name)
5654 (dbx_next_symbol_text, add_bincl_to_list)
5655 (find_corresponding_bincl_psymtab, set_namestring)
5656 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
5657 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
5658 * defs.h (command_line_input, print_address_symbolic)
5659 (deprecated_readline_begin_hook): Constify.
5660 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
5661 Constify.
5662 * event-top.c (handle_line_of_input): Constify and add cast.
5663 * exceptions.c (catch_errors): Constify.
5664 * exceptions.h (catch_errors): Constify.
5665 * expprint.c (print_subexp_standard, op_string, op_name)
5666 (op_name_standard, dump_raw_expression, dump_raw_expression):
5667 * expression.h (op_name, op_string, dump_raw_expression):
5668 Constify.
5669 * f-exp.y (yyerror): Constify.
5670 (struct token::oper): Constify.
5671 (struct f77_boolean_val::name): Constify.
5672 * f-lang.c (f_word_break_characters): Constify.
5673 * f-lang.h (f_yyerror): Constify.
5674 * fork-child.c (fork_inferior): Add cast.
5675 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
5676 (new_variant): Constify.
5677 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
5678 * gdbarch.c: Regenerate.
5679 * gdbcore.h (set_gnutarget): Constify.
5680 * go-exp.y (yyerror): Constify.
5681 (token::oper): Constify.
5682 * go-lang.h (go_yyerror): Constify.
5683 * go32-nat.c (go32_sysinfo): Constify.
5684 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
5685 * guile/scm-cmd.c (cmdscm_function): Constify.
5686 * guile/scm-param.c (pascm_param_value): Constify.
5687 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
5688 (h8300sx_register_name): Constify.
5689 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
5690 Constify.
5691 * ia64-tdep.c (ia64_register_names): Constify.
5692 * infcmd.c (construct_inferior_arguments): Constify.
5693 (path_command, attach_post_wait): Constify.
5694 * language.c (show_range_command, show_case_command)
5695 (unk_lang_error): Constify.
5696 * language.h (language_defn::la_error)
5697 (language_defn::la_name_of_this): Constify.
5698 * linespec.c (decode_line_2): Constify.
5699 * linux-thread-db.c (thread_db_err_str): Constify.
5700 * lm32-tdep.c (lm32_register_name): Constify.
5701 * m2-exp.y (yyerror): Constify.
5702 * m2-lang.h (m2_yyerror): Constify.
5703 * m32r-tdep.c (m32r_register_names): Constify and make static.
5704 * m68hc11-tdep.c (m68hc11_register_names): Constify.
5705 * m88k-tdep.c (m88k_register_name): Constify.
5706 * macroexp.c (appendmem): Constify.
5707 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
5708 (upgrade_type, parse_external, parse_partial_symbols)
5709 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
5710 (new_symbol): Constify.
5711 * memattr.c (mem_info_command): Constify.
5712 * mep-tdep.c (register_name_from_keyword): Constify.
5713 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
5714 Constify.
5715 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
5716 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
5717 * mi/mi-main.c (captured_mi_execute_command): Constify and add
5718 cast.
5719 (mi_execute_async_cli_command): Constify.
5720 * mips-tdep.c (mips_register_name): Constify.
5721 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
5722 (am33_register_name, am33_2_register_name)
5723 * moxie-tdep.c (moxie_register_names): Constify.
5724 * nat/linux-osdata.c (osdata_type): Constify fields.
5725 * nto-tdep.c (nto_parse_redirection): Constify.
5726 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
5727 (lookup_child_selector): Constify.
5728 (objc_methcall::name): Constify.
5729 * objc-lang.h (lookup_objc_class, lookup_child_selector)
5730 (lookup_struct_typedef): Constify.
5731 * objfiles.c (pc_in_section): Constify.
5732 * objfiles.h (pc_in_section): Constify.
5733 * p-exp.y (struct token::oper): Constify.
5734 (yyerror): Constify.
5735 * p-lang.h (pascal_yyerror): Constify.
5736 * parser-defs.h (op_name_standard): Constify.
5737 (op_print::string): Constify.
5738 (exp_descriptor::op_name): Constify.
5739 * printcmd.c (print_address_symbolic): Constify.
5740 * psymtab.c (print_partial_symbols): Constify.
5741 * python/py-breakpoint.c (stop_func): Constify.
5742 (bppy_get_expression): Constify.
5743 * python/py-cmd.c (cmdpy_completer::name): Constify.
5744 (cmdpy_function): Constify.
5745 * python/py-event.c (evpy_add_attribute)
5746 (gdbpy_initialize_event_generic): Constify.
5747 * python/py-event.h (evpy_add_attribute)
5748 (gdbpy_initialize_event_generic): Constify.
5749 * python/py-evts.c (add_new_registry): Constify.
5750 * python/py-finishbreakpoint.c (outofscope_func): Constify.
5751 * python/py-framefilter.c (get_py_iter_from_func): Constify.
5752 * python/py-inferior.c (get_buffer): Add cast.
5753 * python/py-param.c (parm_constant::name): Constify.
5754 * python/py-unwind.c (fprint_frame_id): Constify.
5755 * python/python.c (gdbpy_parameter_value): Constify.
5756 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
5757 * remote.c (memory_packet_config::name): Constify.
5758 (show_packet_config_cmd, remote_write_bytes)
5759 (remote_buffer_add_string):
5760 * reverse.c (exec_reverse_once): Constify.
5761 * rs6000-tdep.c (variant::name, variant::description): Constify.
5762 * rust-exp.y (rustyyerror): Constify.
5763 * rust-lang.c (rust_op_name): Constify.
5764 * rust-lang.h (rustyyerror): Constify.
5765 * serial.h (serial_ops::name): Constify.
5766 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
5767 (sh_sh3e_register_name, sh_sh2e_register_name)
5768 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
5769 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
5770 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
5771 (sh_sh4al_dsp_register_name): Constify.
5772 * sh64-tdep.c (sh64_register_name): Constify.
5773 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
5774 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
5775 * stabsread.c (patch_block_stabs, read_type_number)
5776 (ref_map::stabs, ref_add, process_reference)
5777 (symbol_reference_defined, define_symbol, define_symbol)
5778 (error_type, read_type, read_member_functions, read_cpp_abbrev)
5779 (read_one_struct_field, read_struct_fields, read_baseclasses)
5780 (read_tilde_fields, read_struct_type, read_array_type)
5781 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
5782 (read_huge_number, read_range_type, read_args, common_block_start)
5783 (find_name_end): Constify.
5784 * stabsread.h (common_block_start, define_symbol)
5785 (process_one_symbol, symbol_reference_defined, ref_add):
5786 * symfile.c (get_section_index, add_symbol_file_command):
5787 * symfile.h (get_section_index): Constify.
5788 * target-descriptions.c (tdesc_type::name): Constify.
5789 (tdesc_free_type): Add cast.
5790 * target.c (find_default_run_target):
5791 (add_deprecated_target_alias, find_default_run_target)
5792 (target_announce_detach): Constify.
5793 (do_option): Constify.
5794 * target.h (add_deprecated_target_alias): Constify.
5795 * thread.c (print_thread_info_1): Constify.
5796 * top.c (deprecated_readline_begin_hook, command_line_input):
5797 Constify.
5798 (init_main): Add casts.
5799 * top.h (handle_line_of_input): Constify.
5800 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
5801 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
5802 (tfind_command): Rename to ...
5803 (tfind_command_1): ... this and constify.
5804 (tfind_command): New function.
5805 (tfind_end_command, tfind_start_command): Adjust.
5806 (encode_source_string): Constify.
5807 * tracepoint.h (encode_source_string): Constify.
5808 * tui/tui-data.c (tui_partial_win_by_name): Constify.
5809 * tui/tui-data.h (tui_partial_win_by_name): Constify.
5810 * tui/tui-source.c (tui_set_source_content_nil): Constify.
5811 * tui/tui-source.h (tui_set_source_content_nil): Constify.
5812 * tui/tui-win.c (parse_scrolling_args): Constify.
5813 * tui/tui-windata.c (tui_erase_data_content): Constify.
5814 * tui/tui-windata.h (tui_erase_data_content): Constify.
5815 * tui/tui-winsource.c (tui_erase_source_content): Constify.
5816 * tui/tui.c (tui_enable): Add cast.
5817 * utils.c (defaulted_query): Constify.
5818 (init_page_info): Add cast.
5819 (puts_debug, subset_compare): Constify.
5820 * utils.h (subset_compare): Constify.
5821 * varobj.c (varobj_format_string): Constify.
5822 * varobj.h (varobj_format_string): Constify.
5823 * vax-tdep.c (vax_register_name): Constify.
5824 * windows-nat.c (windows_detach): Constify.
5825 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
5826 * xml-support.c (gdb_xml_end_element): Constify.
5827 * xml-tdesc.c (tdesc_start_reg): Constify.
5828 * xstormy16-tdep.c (xstormy16_register_name): Constify.
5829 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
5830 * xtensa-tdep.h (xtensa_register_t::name): Constify.
5831
995816ba
PA
58322017-04-05 Pedro Alves <palves@redhat.com>
5833
5834 * proc-api.c (struct trans): Constify.
5835 (procfs_note): Constify.
5836 * proc-events.c (struct trans, syscall_table):
5837 * proc-flags.c (struct trans): Constify.
5838 * proc-utils.h (procfs_note): Constify.
5839 * proc-why.c (struct trans): Constify.
5840 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
5841 (procfs_detach): Constify.
5842 * sol-thread.c (struct string_map): Constify.
5843 (td_err_string, td_state_string): Constify.
5844
3e83a920
PA
58452017-04-05 Pedro Alves <palves@redhat.com>
5846
5847 * proc-api.c (procfs_filename): Don't initialize
5848 procfs_filename.
5849 (prepare_to_trace): Assume procfs_filename is non-NULL.
5850 (_initialize_proc_api): Give procfs_filename a default value here.
5851
63160a43
PA
58522017-04-05 Pedro Alves <palves@redhat.com>
5853
5854 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
5855 'cond_string' parameter.
5856 (extract_exception_regexp): Constify 'string' parameter.
5857 (catch_exception_command_1): Constify.
5858 * breakpoint.c (init_catchpoint)
5859 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
5860 parameter.
5861 (ep_parse_optional_if_clause, catch_fork_command_1)
5862 (catch_exec_command_1): Constify.
5863 * breakpoint.h (init_catchpoint): Constify 'cond_string'
5864 parameter.
5865 (ep_parse_optional_if_clause): Constify.
5866 * cli/cli-utils.c (remove_trailing_whitespace)
5867 (check_for_argument): Constify.
5868 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
5869 non-const overload.
5870 (check_for_argument): Likewise.
5871
9b2eba3d
PA
58722017-04-05 Pedro Alves <palves@redhat.com>
5873
5874 * event-top.c (command_line_handler): Add cast to execute_command
5875 call.
5876 * record-btrace.c (cmd_record_btrace_bts_start)
5877 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
5878 (cmd_record_btrace_start): Add cast to execute_command call.
5879 * record-full.c (record_full_goto_insn):
5880 * record.c (record_start, record_stop): Add cast to
5881 execute_command_to_string calls.
5882 (cmd_record_start): Add cast to execute_command calls.
5883
2adadf51
PA
58842017-04-05 Pedro Alves <palves@redhat.com>
5885
5886 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
5887 static inline function.
5888 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
5889 array and use gdb_PyArg_ParseTupleAndKeywords.
5890 * python/py-cmd.c (cmdpy_init): Likewise.
5891 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
5892 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
5893 (infpy_search_memory): Likewise.
5894 * python/py-objfile.c (objfpy_add_separate_debug_file)
5895 (gdbpy_lookup_objfile): Likewise.
5896 * python/py-symbol.c (gdbpy_lookup_symbol)
5897 (gdbpy_lookup_global_symbol): Likewise.
5898 * python/py-type.c (gdbpy_lookup_type): Likewise.
5899 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
5900 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
5901 Likewise.
5902
0d1f4ceb
PA
59032017-04-05 Pedro Alves <palves@redhat.com>
5904
5905 * python/python-internal.h (gdb_PyGetSetDef): New type.
5906 * python/py-block.c (block_object_getset)
5907 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
5908 * python/py-event.c (event_object_getset)
5909 (finish_breakpoint_object_getset): Likewise.
5910 * python/py-inferior.c (inferior_object_getset): Likewise.
5911 * python/py-infthread.c (thread_object_getset): Likewise.
5912 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
5913 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
5914 * python/py-objfile.c (objfile_getset): Likewise.
5915 * python/py-progspace.c (pspace_getset): Likewise.
5916 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
5917 Likewise.
5918 * python/py-record.c (recpy_record_getset): Likewise.
5919 * python/py-symbol.c (symbol_object_getset): Likewise.
5920 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
5921 Likewise.
5922 * python/py-type.c (type_object_getset, field_object_getset):
5923 Likewise.
5924 * python/py-value.c (value_object_getset): Likewise.
5925
4d759979
PA
59262017-04-05 Pedro Alves <palves@redhat.com>
5927
5928 * python/python-internal.h (gdb_PyObject_CallMethod)
5929 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
5930 New functions.
5931 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
5932 (PySys_GetObject, PySys_SetPath): New macros.
5933
fdf9e36f
PA
59342017-04-05 Pedro Alves <palves@redhat.com>
5935
5936 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
5937 info_osdata_command.
5938 * osdata.c (info_osdata_command): Rename to ...
5939 (info_osdata): ... this. Constify 'type' parameter, and remove
5940 the 'from_tty' parameter. Accept NULL TYPE.
5941 (info_osdata_command): New function.
5942 * osdata.h (info_osdata_command): Remove declaration.
5943 (info_osdata): New declaration.
5944
9f33b8b7
PA
59452017-04-05 Pedro Alves <palves@redhat.com>
5946
5947 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
5948 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
5949 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
5950 parameter.
5951 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
5952 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
5953 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
5954 parameter.
5955 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
5956 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
5957 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
5958 (mi_cmd_file_list_exec_source_files)
5959 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
5960 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5961 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
5962 parameter.
5963 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
5964 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
5965 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
5966 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
5967 (mi_cmd_stack_info_frame): Constify 'command' parameter.
5968 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
5969 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
5970 'command' parameter.
5971 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
5972 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
5973 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
5974 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
5975 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
5976 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
5977 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
5978 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
5979 (mi_cmd_var_set_update_range): Constify 'command' parameter.
5980 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
5981 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
5982 parameter.
5983 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
5984 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
5985 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
5986 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
5987 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
5988 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
5989 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
5990 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
5991 (mi_cmd_data_list_changed_registers)
5992 (mi_cmd_data_write_register_values)
5993 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
5994 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
5995 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
5996 (mi_cmd_list_features, mi_cmd_list_target_features)
5997 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
5998 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
5999 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6000 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6001 (mi_cmd_trace_frame_collected): Constify 'command'
6002 parameter.
6003 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6004 'command' parameter.
6005
67cb5b2d
PA
60062017-04-05 Pedro Alves <palves@redhat.com>
6007
6008 * ada-lang.c (ada_completer_word_break_characters): Now a const
6009 array.
6010 (ada_get_gdb_completer_word_break_characters): Constify.
6011 * completer.c (gdb_completer_command_word_break_characters)
6012 (gdb_completer_file_name_break_characters)
6013 (gdb_completer_quote_characters): Now const arrays.
6014 (get_gdb_completer_quote_characters): Constify.
6015 (set_rl_completer_word_break_characters): New function.
6016 (set_gdb_completion_word_break_characters)
6017 (complete_line_internal): Use it.
6018 * completer.h (get_gdb_completer_quote_characters): Constify.
6019 (set_rl_completer_word_break_characters): Declare.
6020 * f-lang.c (f_word_break_characters): Constify.
6021 * language.c (default_word_break_characters): Constify.
6022 * language.h (language_defn::la_word_break_characters): Constify.
6023 (default_word_break_characters): Constify.
6024 * top.c (init_main): Use set_rl_completer_word_break_characters.
6025
7a114964
PA
60262017-04-05 Pedro Alves <palves@redhat.com>
6027
6028 * aix-thread.c (aix_thread_pid_to_str)
6029 (aix_thread_extra_thread_info): Constify.
6030 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6031 * bsd-uthread.c (bsd_uthread_extra_thread_info)
6032 (bsd_uthread_pid_to_str): Constify.
6033 * corelow.c (core_pid_to_str): Constify.
6034 * darwin-nat.c (darwin_pid_to_str): Constify.
6035 * fbsd-nat.c (fbsd_pid_to_str): Constify.
6036 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6037 Constify.
6038 * gnu-nat.c (gnu_pid_to_str): Constify.
6039 * go32-nat.c (go32_pid_to_str): Constify.
6040 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6041 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6042 * inferior.c (inferior_pid_to_str): Constify.
6043 * linux-nat.c (linux_nat_pid_to_str): Constify.
6044 * linux-tdep.c (linux_core_pid_to_str): Constify.
6045 * linux-thread-db.c (thread_db_pid_to_str)
6046 (thread_db_extra_thread_info): Constify.
6047 * nto-tdep.c (nto_extra_thread_info): Constify.
6048 * nto-tdep.h (nto_extra_thread_info): Constify.
6049 * obsd-nat.c (obsd_pid_to_str): Constify.
6050 * procfs.c (procfs_pid_to_str): Constify.
6051 * ravenscar-thread.c (ravenscar_extra_thread_info)
6052 (ravenscar_pid_to_str): Constify.
6053 * remote-sim.c (gdbsim_pid_to_str): Constify.
6054 * remote.c (remote_threads_extra_info, remote_pid_to_str):
6055 Constify.
6056 * sol-thread.c (solaris_pid_to_str): Constify.
6057 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6058 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6059 * target.c (default_pid_to_str, target_pid_to_str)
6060 (normal_pid_to_str, default_pid_to_str): Constify.
6061 * target.h (target_ops::to_pid_to_str)
6062 (target_ops::to_extra_thread_info): Constify.
6063 (target_pid_to_str, normal_pid_to_str): Constify.
6064 * windows-nat.c (windows_pid_to_str): Constify.
6065 * gdbarch.sh (core_pid_to_str): Constify.
6066 * target-delegates.c: Regenerate.
6067 * gdbarch.h, gdbarch.c: Regenerate.
6068
69bbf465
PA
60692017-04-05 Pedro Alves <palves@redhat.com>
6070
6071 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6072 the memory of the temporary warning_pre_print override.
6073 * utils.c (warning_pre_print): Constify.
6074 * utils.h (warning_pre_print): Constify.
6075
be47f9e8
PA
60762017-04-05 Pedro Alves <palves@redhat.com>
6077
6078 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6079 (shell_command): New function.
6080 (make_command): Use std::string.
6081 (init_cli_cmds): Register shell_command instead of shell_escape.
6082
bde6261a
PA
60832017-04-05 Pedro Alves <palves@redhat.com>
6084
6085 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6086 * tracepoint.c (default_collect): Don't initialize.
6087
b38ef47f
PA
60882017-04-05 Pedro Alves <palves@redhat.com>
6089
6090 * macroexp.c (macro_buffer::shared): Now a bool.
6091 (init_buffer): Update.
6092 (init_shared_buffer): Constify 'addr' parameter.
6093 (substitute_args, expand, macro_expand, macro_expand_next): Remove
6094 casts.
6095
f995bbe8
PA
60962017-04-05 Pedro Alves <palves@redhat.com>
6097
6098 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6099 * disasm.c (set_disassembler_options): Constify local.
6100 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6101
4a596fe2
SDJ
61022017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
6103
6104 PR gdb/21352
6105 * tracefile.c (tsave_command): Fix argument parsing for '-r'
6106 option.
6107
2cad08ea
YQ
61082017-04-05 Yao Qi <yao.qi@linaro.org>
6109
6110 * frame.c (frame_unwind_register_unsigned): Call
6111 frame_unwind_register_value.
6112
55a98976
YQ
61132017-04-05 Yao Qi <yao.qi@linaro.org>
6114
6115 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6116 Use gdb_test_multiple, and don't match anchor.
6117
4ac40124
PA
61182017-04-05 Pedro Alves <palves@redhat.com>
6119
6120 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6121 (Write After Approval): Remove Simon Marchi.
6122
c053b654
PA
61232017-04-05 Pedro Alves <palves@redhat.com>
6124
6125 * common/gdb_optional.h (optional::optional): Make constexpr and
6126 initialize m_dummy.
6127
4c7bf4f9
JB
61282017-04-04 John Baldwin <jhb@FreeBSD.org>
6129
6130 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6131 (amd64fbsd_jmp_buf_reg_offset): Remove.
6132 (amd64fbsd_supply_uthread): Remove function.
6133 (amd64fbsd_collect_uthread): Remove function.
6134 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6135 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6136 (x86_64-*-freebsd*): Remove bsd-uthread.o.
6137 (fbsd-nat.c): Update comment.
6138 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6139 (i386fbsd_jmp_buf_reg_offset): Remove.
6140 (i386fbsd_supply_uthread): Remove function.
6141 (i386fbsd_collect_uthread): Remove function.
6142 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6143
1e1a8bef
JB
61442017-04-04 John Baldwin <jhb@FreeBSD.org>
6145
6146 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6147 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6148 * NEWS: Mention that support for FreeBSD/alpha was removed.
6149 * alpha-fbsd-tdep.c: Delete file.
6150 * config/alpha/fbsd.mh: Delete file.
6151 * configure.host: Delete alpha*-*-freebsd* and
6152 alpha*-*-kfreebsd*-gnu.
6153 * configure.tgt: Delete alpha*-*-freebsd* and
6154 alpha*-*-kfreebsd*-gnu.
6155
49907934
JB
61562017-04-04 John Baldwin <jhb@FreeBSD.org>
6157
6158 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6159 amd64bsd_store_inferior_registers): Use ptid from regcache.
6160
6f77053d
PA
61612017-04-04 Pedro Alves <palves@redhat.com>
6162
6163 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
6164 data fields, make them private and add "m_" prefixes.
6165 (lnp_state_machine::lnp_state_machine): New ctor.
6166 (record_line, check_line_address, handle_set_discriminator)
6167 (handle_set_address, handle_advance_pc, handle_special_opcode)
6168 (handle_advance_line, handle_set_file, handle_negate_stmt)
6169 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6170 (end_sequence, advance_line): New methods.
6171 (m_gdbarch, m_record_lines_p): New fields.
6172 (lnp_reader_state): Delete.
6173 (dwarf_record_line): Rename to ...
6174 (lnp_state_machine::record_line): ... adjust.
6175 (init_lnp_state_machine): Delete.
6176 (lnp_state_machine::lnp_state_machine): New.
6177 (check_line_address): Rename to ...
6178 (lnp_state_machine::check_line_address): This.
6179 (dwarf_decode_lines_1): Remove reference to "reader_state".
6180 Adjust lnp_state_machine having a non-default ctor. Use bool.
6181 State machine internal state manipulation moved to
6182 lnp_state_machine methods.
6183
9c541725
PA
61842017-04-04 Pedro Alves <palves@redhat.com>
6185
6186 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6187 unittests/offset-type-selftests.c.
6188 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6189 * common/offset-type.h: New file.
6190 * common/preprocessor.h: New file.
6191 * common/traits.h: New file.
6192 * common/valid-expr.h: New file.
6193 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
6194 sect_offset and cu_offset strong typedefs throughout.
6195 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6196 typedefs throughout.
6197 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
6198 sect_offset and cu_offset strong typedefs throughout.
6199 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6200 typedefs throughout.
6201 * gdbtypes.h: Include "common/offset-type.h".
6202 (cu_offset): Now an offset type (strong typedef) instead of a
6203 struct.
6204 (sect_offset): Likewise.
6205 (union call_site_parameter_u): Rename "param_offset" field to
6206 "param_cu_off".
6207 * unittests/offset-type-selftests.c: New file.
6208
ecfb656c
PA
62092017-04-04 Pedro Alves <palves@redhat.com>
6210
6211 * common/underlying.h: New file.
6212 * dwarf2read.c: Include "common/gdb_optional.h" and
6213 "common/underlying.h".
6214 (dir_index, file_name_index): New types.
6215 (file_entry): Use them.
6216 (file_entry::include): Use to_underlying.
6217 (line_header::add_file_name): Use dir_index.
6218 (read_formatted_entries): Use gdb::optional. Read form before
6219 writting to file_entry.
6220 (dwarf_decode_line_header): Use dir_index.
6221 (lnp_state_machine::current_file): Use to_underlying.
6222 (lnp_state_machine::file): Change type to file_name_index.
6223 (dwarf_record_line): Use to_underlying.
6224 (init_lnp_state_machine): Use file_name_index.
6225 (dwarf_decode_lines_1): Use dir_index and file_name_index.
6226
d194f1fe
PA
62272017-04-04 Pedro Alves <palves@redhat.com>
6228
6229 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6230 operator bool, has_value and get methods.
6231
fff8551c
PA
62322017-04-04 Pedro Alves <palves@redhat.com>
6233
6234 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6235 fields.
6236 (line_header): Initialize all data fields. Change type of
6237 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6238 Change type of include_dirs to std::vector<const char *>. Remove
6239 num_include_dirs, include_dirs_size. Change type of file_names to
6240 std::vector<file_entry>. Remove num_file_names, file_names_size.
6241 (line_header::line_header): New.
6242 (line_header::add_include_dir, line_header::add_file_name): New
6243 methods.
6244 (line_header::include_dir_at): Remove NULL check.
6245 (line_header::file_name_at): Add const overload.
6246 (line_header_up): New unique_ptr typedef.
6247 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
6248 std::vector. Remove free_line_header call.
6249 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
6250 free_line_header call.
6251 (free_cu_line_header): Delete.
6252 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6253 (setup_type_unit_groups): Use line_header_up instead of cleanups.
6254 Adjust to use std::vector.
6255 (free_line_header): Delete.
6256 (free_line_header_voidp): Use delete.
6257 (add_include_dir): Replace with ...
6258 (line_header::add_include_dir): ... this method. Use std::vector.
6259 (add_file_name): Replace with ...
6260 (line_header::add_file_name): ... this method. Use std::vector.
6261 (add_include_dir_stub): Delete.
6262 (read_formatted_entries): Remove memset.
6263 (dwarf_decode_line_header): Return a line_header_up instead of a
6264 raw pointer. Remove cleanup handling. Pass lambdas to
6265 read_formatted_entries. Adjust to use line_header methods.
6266 (dwarf_decode_lines_1): Adjust to use line_header methods.
6267 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6268 use std::vector.
6269
d62a8ae2
SM
62702017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
6271
6272 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6273 instead of struct ptid.
6274
db3a1dc7
AH
62752017-05-04 Alan Hayward <alan.hayward@arm.com>
6276
6277 * frame.c (get_frame_register_bytes): Unwind using value.
6278 (put_frame_register_bytes): Likewise.
6279
b1b45502
IB
62802017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
6281
6282 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6283 aggregate-like.
6284
ec13808e
JK
62852017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
6286
6287 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6288
12316564
YQ
62892017-03-29 Yao Qi <yao.qi@linaro.org>
6290
6291 * gdbthread.h (struct thread_info): Declare constructor and
6292 destructor. Add some in-class member initializers.
6293 * thread.c (free_thread): Remove.
6294 (init_thread_list): Call delete instead of free_thread.
6295 (new_thread): Call thread_info constructor.
6296 (thread_info::thread_info): New function.
6297 (thread_info::~thread_info): New function.
6298 (delete_thread_1): Call delete instead of free_thread.
6299 (make_cleanup_restore_current_thread): Move tp and frame to
6300 inner block.
6301
fe5f7374
AK
63022017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6303
6304 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6305 (arc_skip_prologue): Likewise.
6306 (arc_make_frame_cache): Likewise.
6307 (arc_pv_get_operand): New function.
6308 (arc_is_in_prologue): Likewise.
6309 (arc_analyze_prologue): Likewise.
6310 (arc_print_frame_cache): Likewise.
6311 (MAX_PROLOGUE_LENGTH): New constant.
6312
eea78757
AK
63132017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6314
6315 * configure.tgt: Add arc-insn.o.
6316 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6317 (dump_arc_instruction_command): New function.
6318 (arc_fprintf_disasm): Likewise.
6319 (arc_disassemble_info): Likewise.
6320 (arc_insn_get_operand_value): Likewise.
6321 (arc_insn_get_operand_value_signed): Likewise.
6322 (arc_insn_get_memory_base_reg): Likewise.
6323 (arc_insn_get_memory_offset): Likewise.
6324 (arc_insn_get_branch_target): Likewise.
6325 (arc_insn_dump): Likewise.
6326 (arc_insn_get_linear_next_pc): Likewise.
6327 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6328 (arc_disassemble_info): Likewise.
6329 (arc_insn_get_branch_target): Likewise.
6330 (arc_insn_get_linear_next_pc): Likewise.
6331 * NEWS: Mention new "maint print arc arc-instruction".
6332
3be78afd
AK
63332017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6334
6335 * arc-tdep (maintenance_print_arc_list): New variable.
6336 (maintenance_print_arc_command): New function.
6337
296ec4fa
AK
63382017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
6339
6340 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6341 Add "limm" and "reserved".
6342 (arc_cannot_fetch_register, arc_cannot_store_register): Add
6343 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6344 * arc-tdep.h (arc_regnum): Likewise.
6345
f74f865e
MF
63462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6347
6348 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6349 for THREADPTR register.
6350 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6351 register.
6352 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6353 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6354 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6355
0d0bf81a
MF
63562017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6357
6358 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6359 registers above gdbarch_num_regs (gdbarch) as privileged in
6360 call0 ABI.
6361
0ce4291e
MF
63622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6363
6364 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6365 for a single specified register or for all registers in
6366 a0_base..a0_base + C0_NREGS range.
6367 (supply_gregset_reg): Call regcache_raw_supply for a single
6368 specified register or for all registers in a0_base..a0_base +
6369 C0_NREGS range.
6370
c56054f9
MF
63712017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6372
6373 * arch/xtensa.h (C0_NREGS): Add definition.
6374 * xtensa-tdep.c (C0_NREGS): Remove definition.
6375
a4398628
MF
63762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6377
6378 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6379 Drop xtensa_default_isa initialization.
6380 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6381
8c43009f
PA
63822017-03-27 Pedro Alves <palves@redhat.com>
6383
6384 * dwarf2read.c (file_entry) <dir_index>: Add comment.
6385 (file_entry::include_dir): New method.
6386 (line_header::include_dir_at, line_header::file_name_at): New
6387 methods.
6388 (setup_type_unit_groups, setup_type_unit_groups)
6389 (psymtab_include_file_name): Simplify using the new methods.
6390 (lnp_state_machine) <the_line_header>: New field.
6391 <file>: Add comment.
6392 (lnp_state_machine::current_file): New method.
6393 (dwarf_record_line): Simplify using the new methods.
6394 (init_lnp_state_machine): Initialize the "the_line_header" field.
6395 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6396 Simplify using the new methods.
6397
a7e80b9e
PA
63982017-03-27 Pedro Alves <palves@redhat.com>
6399
6400 * cp-name-parser.y (make_empty): Delete.
6401 (demangler_special, nested_name, ptr_operator, array_indicator)
6402 (direct_declarator, declarator_1): Use fill_comp instead of
6403 make_empty.
6404
21047726
PA
64052017-03-27 Pedro Alves <palves@redhat.com>
6406
6407 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6408 to ATTRIBUTE_PRINTF.
6409 * solib-target.c (library_list_start_list): Print "string" not
6410 "version".
6411 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6412 gdb_xml_error call.
6413
d721ba37
PA
64142017-03-27 Pedro Alves <palves@redhat.com>
6415
6416 * dwarf2read.c (struct file_and_directory): New.
6417 (dwarf2_get_dwz_file): Adjust to use std::string.
6418 (dw2_get_file_names_reader): Adjust to use file_and_directory.
6419 (find_file_and_directory): Adjust to return a file_and_directory
6420 object.
6421 (read_file_scope): Adjust to use file_and_directory. Remove
6422 make_cleanup/do_cleanups calls.
6423 (open_and_init_dwp_file): Adjust to use std::string. Remove
6424 make_cleanup/do_cleanups calls.
6425 * python/python.c (do_start_initialization): Adjust to ldirname
6426 returning a std::string.
6427 * utils.c (ldirname): Now returns a std::string.
6428 * utils.h (ldirname): Change return type to std::string.
6429 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6430 returning a std::string.
6431 * xml-tdesc.c (file_read_description_xml): Likewise.
6432
ed771251
AH
64332017-03-24 Alan Hayward <alan.hayward@arm.com>
6434
6435 * regcache.c (regcache_debug_print_register): New function.
6436 * regcache.h (regcache_debug_print_register): New declaration.
6437 * target.c (debug_print_register): Remove.
6438 (target_fetch_registers): Call regcache_debug_print_register.
6439 (target_store_registers): Likewise.
6440
568c1b9f
PB
64412017-03-24 Pádraig Brady <pbrady@fb.com>
6442
6443 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6444 reference beyond the 'lh->include_dirs' array before accessing to
6445 it.
6446 (psymtab_include_file_name): Likewise.
6447 (dwarf_decode_lines_1): Likewise.
6448 (dwarf_decode_lines): Likewise.
6449 (file_file_name): Likewise.
6450
3e00d44f
SM
64512017-03-23 Simon Marchi <simon.marchi@ericsson.com>
6452
6453 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6454 inferior_ptid.
6455 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6456 ps_lsetfpregs): Likewise.
6457 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6458 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6459 ps_lsetfpregs): Likewise.
6460 * target.c (target_fetch_registers, target_store_registers):
6461 Remove asserts.
6462
077ae656
AH
64632017-03-23 Alan Hayward <alan.hayward@arm.com>
6464
6465 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6466
1e2b521d
YQ
64672017-03-23 Yao Qi <yao.qi@linaro.org>
6468
6469 * aarch64-tdep.c (aarch64_process_record_test): Declare.
6470 (_initialize_aarch64_tdep): Register it.
6471 (aarch64_record_load_store): Handle PRFM instruction.
6472 (aarch64_process_record_test): New function.
6473
33877125
YQ
64742017-03-23 Yao Qi <yao.qi@linaro.org>
6475
6476 * aarch64-tdep.c (aarch64_record_load_store): Fix code
6477 indentation.
6478
a0eef940
YQ
64792017-03-23 Yao Qi <yao.qi@linaro.org>
6480
6481 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6482
3f2a3564
PR
64832017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
6484
6485 python/python.c (do_start_initialization): Fix memory leak.
6486
b67aeab0
SM
64872017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
6488
6489 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6490 using get_ptrace_pid.
6491 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6492 inferior_ptid.
6493 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6494 inferior_ptid instead of pid.
6495
ffdbe864
YQ
64962017-03-22 Yao Qi <yao.qi@linaro.org>
6497
6498 * aarch64-tdep.c: Wrap locally used classes in anonymous
6499 namespace.
6500 * arm-tdep.c: Likewise.
6501 * linespec.c: Likewise.
6502 * ui-out.c: Likewise.
6503
9d736fbf
JG
65042017-03-22 Jonah Graham <jonah@kichwacoders.com>
6505
6506 PR gdb/19637
6507 * python/lib/gdb/printer/bound_registers.py: Import sys.
6508
3de88e9a
SM
65092017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6510
6511 * windows-nat.c (do_windows_fetch_inferior_registers): Add
6512 windows_thread_info parameter and use it instead of
6513 current_thread.
6514 (windows_fetch_inferior_registers): Don't set current_thread,
6515 pass the thread to do_windows_fetch_inferior_registers. Use
6516 ptid from regcache instead of inferior_ptid.
6517 (do_windows_store_inferior_registers): Add windows_thread_info
6518 parameter and use it instead of current_thread.
6519 (windows_store_inferior_registers): Don't set current_thread,
6520 pass the thread to do_windows_store_inferior_registers. Use
6521 ptid from regcache instead of inferior_ptid.
6522
0e7b8f61
SM
65232017-03-21 Simon Marchi <simon.marchi@ericsson.com>
6524
6525 * ser-mingw.c (ser_windows_raw): Remove reference to
6526 struct serial::current_timeout.
6527
5badf10a
IR
65282017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
6529
6530 PR tdep/20928
6531 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
6532 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
6533 (sparc64_fsr_type): Fix %fsr decoding.
6534
cee59b3f
TW
65352017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
6536
6537 * python/py-record-btrace.c (btpy_insn_data): Change return type
6538 for Python 2.
6539
639a9038
SM
65402017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6541
6542 * spu-linux-nat.c (spu_fetch_inferior_registers,
6543 spu_store_inferior_registers): Use ptid from regcache, set and
6544 restore inferior_ptid.
6545 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
6546 Likewise.
6547
bcc0c096
SM
65482017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
6549
6550 * i386-linux-nat.c (fetch_register, store_register,
6551 i386_linux_fetch_inferior_registers,
6552 i386_linux_store_inferior_registers): Use ptid from regcache.
6553 * ia64-linux-nat.c (ia64_linux_fetch_register,
6554 ia64_linux_store_register): Likewise.
6555 * inf-ptrace.c (inf_ptrace_fetch_register,
6556 inf_ptrace_store_register): Likewise.
6557 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
6558 m32r_linux_store_inferior_registers): Likewise.
6559 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
6560 m68kbsd_store_inferior_registers): Likewise.
6561 * m68k-linux-nat.c (fetch_register, store_register,
6562 m68k_linux_fetch_inferior_registers,
6563 m68k_linux_store_inferior_registers): Likewise.
6564 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
6565 m88kbsd_store_inferior_registers): Likewise.
6566 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
6567 mips_fbsd_store_inferior_registers): Likewise.
6568 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
6569 mips64_linux_regsets_store_registers): Likewise.
6570 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
6571 mipsnbsd_store_inferior_registers): Likewise.
6572 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
6573 mips64obsd_store_inferior_registers): Likewise.
6574 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
6575 Likewise.
6576 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
6577 ppcfbsd_store_inferior_registers): Likewise.
6578 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
6579 ppc_linux_store_inferior_registers): Likewise.
6580 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
6581 ppcnbsd_store_inferior_registers): Likewise.
6582 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
6583 ppcobsd_store_registers): Likewise.
6584 * procfs.c (procfs_fetch_registers, procfs_store_registers):
6585 Likewise.
6586 * ravenscar-thread.c (ravenscar_fetch_registers,
6587 ravenscar_store_registers, ravenscar_prepare_to_store):
6588 Likewise.
6589 * record-btrace.c (record_btrace_fetch_registers,
6590 record_btrace_store_registers, record_btrace_prepare_to_store):
6591 Likewise.
6592 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
6593 Lookup inferior using ptid from regcache, instead of
6594 current_inferior.
6595 * remote.c (remote_fetch_registers, remote_store_registers): Use
6596 ptid from regcache.
6597 * rs6000-nat.c (fetch_register, store_register): Likewise.
6598 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
6599 s390_linux_store_inferior_registers): Likewise.
6600 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
6601 shnbsd_store_inferior_registers): Likewise.
6602 * sol-thread.c (sol_thread_fetch_registers,
6603 sol_thread_store_registers): Likewise.
6604 * sparc-nat.c (sparc_fetch_inferior_registers,
6605 sparc_store_inferior_registers): Likewise.
6606 * tilegx-linux-nat.c (fetch_inferior_registers,
6607 store_inferior_registers): Likewise.
6608 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
6609 vaxbsd_store_inferior_registers): Likewise.
6610 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
6611 store_xtregs): Likewise.
6612
c0f55cc6
AV
66132017-03-20 Artemiy Volkov <artemiyv@acm.org>
6614
6615 PR gdb/14441
6616 * NEWS: Mention support for rvalue references in GDB and python.
6617 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
6618 supports both lvalue and rvalue references.
6619
15c0a2a9
AV
66202017-03-20 Artemiy Volkov <artemiyv@acm.org>
6621
6622 PR gdb/14441
6623 * gdbtypes.c (rank_one_type): Implement overloading
6624 resolution rules regarding rvalue references.
6625
aa006118
AV
66262017-03-20 Artemiy Volkov <artemiyv@acm.org>
6627
6628 PR gdb/14441
6629 * aarch64-tdep.c (aarch64_type_align)
6630 (aarch64_extract_return_value, aarch64_store_return_value): Change
6631 lvalue reference type checks to general reference type checks.
6632 * amd64-tdep.c (amd64_classify): Likewise.
6633 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
6634 Likewise.
6635 * arm-tdep.c (arm_type_align, arm_extract_return_value)
6636 (arm_store_return_value): Likewise.
6637 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
6638 * c-typeprint.c (c_print_type): Likewise.
6639 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
6640 (cplus_number_of_children, cplus_describe_child): Likewise.
6641 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
6642 * completer.c (expression_completer): Likewise.
6643 * cp-support.c (make_symbol_overload_list_adl_namespace):
6644 Likewise.
6645 * darwin-nat-info.c (info_mach_region_command): Likewise.
6646 * dwarf2loc.c (entry_data_value_coerce_ref)
6647 (value_of_dwarf_reg_entry): Likewise.
6648 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
6649 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
6650 Likewise.
6651 * findvar.c (extract_typed_address, store_typed_address):
6652 Likewise.
6653 * gdbtypes.c (rank_one_type): Likewise.
6654 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
6655 * infcall.c (value_arg_coerce): Likewise.
6656 * language.c (pointer_type): Likewise.
6657 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
6658 Likewise.
6659 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
6660 * mn10300-tdep.c (mn10300_type_align): Likewise.
6661 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
6662 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
6663 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
6664 Likewise.
6665 * printcmd.c (print_formatted, x_command): Likewise.
6666 * python/py-type.c (typy_get_composite, typy_template_argument):
6667 Likewise.
6668 * python/py-value.c (valpy_referenced_value)
6669 (valpy_get_dynamic_type, value_has_field): Likewise.
6670 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
6671 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
6672 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
6673 * spu-tdep.c (spu_scalar_value_p): Likewise.
6674 * symtab.c (lookup_symbol_aux): Likewise.
6675 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
6676 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
6677 Likewise.
6678 * valops.c (value_cast_pointers, value_cast)
6679 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
6680 (value_struct_elt, value_struct_elt_bitpos)
6681 (value_find_oload_method_list, find_overload_match)
6682 (value_rtti_indirect_type): Likewise.
6683 * valprint.c (val_print_scalar_type_p, generic_val_print):
6684 Likewise.
6685 * value.c (value_actual_type, value_as_address, unpack_long)
6686 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
6687 (coerce_ref): Likewise.
6688 * varobj.c (varobj_get_value_type): Likewise.
6689
3fcf899d
AV
66902017-03-20 Artemiy Volkov <artemiyv@acm.org>
6691
6692 PR gdb/14441
6693 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
6694 table of constants.
6695 * python/lib/gdb/command/explore.py: Support exploring values
6696 of rvalue reference types.
6697 * python/lib/gdb/types.py: Implement get_basic_type() for
6698 rvalue reference types.
6699 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
6700 constant.
6701 * python/py-value.c (valpy_getitem): Add an rvalue reference
6702 check.
6703 (valpy_reference_value): Add new parameter "refcode".
6704 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
6705 New wrappers for valpy_reference_value().
6706 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6707 (gdbpy_invoke_xmethod): Likewise.
6708
4297a3f0
AV
67092017-03-20 Artemiy Volkov <artemiyv@acm.org>
6710
6711 PR gdb/14441
6712 * dwarf2read.c (process_die, read_type_die_1): Handle the
6713 DW_TAG_rvalue_reference_type DIE.
6714 (read_tag_reference_type): Add new parameter "refcode".
6715
e1cb3213
AV
67162017-03-20 Artemiy Volkov <artemiyv@acm.org>
6717
6718 PR gdb/14441
6719 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
6720 (c_type_print_modifier, c_type_print_varspec_suffix)
6721 (c_type_print_base): Support printing rvalue reference types.
6722 * c-valprint.c (c_val_print, c_value_print): Support printing
6723 rvalue reference values.
6724
e4347c89
AV
67252017-03-20 Artemiy Volkov <artemiyv@acm.org>
6726
6727 PR gdb/14441
6728 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
6729 typename.
6730 * cp-support.c (replace_typedefs): Handle
6731 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
6732 * python/py-type.c (typy_lookup_type): Likewise.
6733
53cc15f5
AV
67342017-03-20 Artemiy Volkov <artemiyv@acm.org>
6735
6736 PR gdb/14441
6737 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
6738 * parse.c (insert_type): Change assert statement.
6739 (follow_types): Handle rvalue reference types.
6740 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
6741 constant.
6742
a65cfae5
AV
67432017-03-20 Artemiy Volkov <artemiyv@acm.org>
6744
6745 PR gdb/14441
6746 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
6747 value_ref() interface.
6748 * c-valprint.c (c_value_print): Likewise.
6749 * infcall.c (value_arg_coerce): Likewise.
6750 * python/py-value.c (valpy_reference_value): Likewise.
6751 * valops.c (value_cast, value_reinterpret_cast)
6752 (value_dynamic_cast, typecmp): Likewise.
6753 (value_ref): Parameterize by kind of return value reference type.
6754 * value.h (value_ref): Add new parameter "refcode".
6755
3b224330
AV
67562017-03-20 Artemiy Volkov <artemiyv@acm.org>
6757
6758 PR gdb/14441
6759 * dwarf2read.c (read_tag_reference_type): Use
6760 lookup_lvalue_reference_type() instead of lookup_reference_type().
6761 * eval.c (evaluate_subexp_standard): Likewise.
6762 * f-exp.y: Likewise.
6763 * gdbtypes.c (make_reference_type, lookup_reference_type):
6764 Generalize with rvalue reference types.
6765 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
6766 convenience wrappers for lookup_reference_type().
6767 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
6768 reference kind parameter.
6769 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
6770 wrappers for lookup_reference_type().
6771 * guile/scm-type.c (gdbscm_type_reference): Use
6772 lookup_lvalue_reference_type() instead of lookup_reference_type().
6773 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
6774 * parse.c (follow_types): Likewise.
6775 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
6776 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
6777 Likewise.
6778 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6779 (gdbpy_invoke_xmethod): Likewise.
6780 * stabsread.c: Provide extra argument to make_reference_type()
6781 call.
6782 * valops.c (value_ref, value_rtti_indirect_type): Use
6783 lookup_lvalue_reference_type() instead of lookup_reference_type().
6784
f9aeb8d4
AV
67852017-03-20 Artemiy Volkov <artemiyv@acm.org>
6786
6787 PR gdb/14441
6788 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
6789 (TYPE_IS_REFERENCE): New macro.
6790 (struct type): Add rvalue_reference_type field.
6791 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
6792
51457a05
MAL
67932017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
6794
6795 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
6796 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
6797 New function definition.
6798 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
6799 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
6800 New function declaration.
6801 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
6802 * mi/mi-interp.h: New file.
6803 * solib.c (info_sharedlibrary_command): Replace for loop with
6804 ALL_SO_LIBS macro
6805 * solib.h (update_solib_list): New function declaration.
6806 (so_list_head): Move macro.
6807 * solist.h (ALL_SO_LIBS): New macro.
6808
e696b3ad
MAL
68092017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
6810
6811 * infcmd.c (post_create_inferior): Remove unused argument in
6812 call to solib_add.
6813 * remote.c (remote_start_remote): Likewise.
6814 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
6815 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
6816 (enable_break): Likewise.
6817 * solib.c (update_solib_list): Remove unused target argument
6818 and its documentation.
6819 (solib_add): Remove unused target argument. Remove unused
6820 argument in call to update_solib_list.
6821 (info_sharedlibrary_command): Remove unused argument in call
6822 to update_solib_list.
6823 (sharedlibrary_command): Remove unused argument in call to
6824 solib_add.
6825 (handle_solib_event): Likewise.
6826 (reload_shared_libraries): Likewise.
6827 * solib.h (solib_add): Remove unused target argument.
6828
dcb84eda
AA
68292017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
6830
6831 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
6832 (s390_displaced_step_fixup): Cover relative branches with the
6833 default fixup handling. This fixes lack of support for some
6834 relative branch instructions.
6835
d9cb6cdc
SM
68362017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6837
6838 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
6839 ptid from regcache.
6840
1afaf9f4
SM
68412017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6842
6843 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
6844 i386_darwin_store_inferior_registers): Use ptid from regcache.
6845
aac12e24
SM
68462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6847
6848 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
6849 i386bsd_store_inferior_registers): Use ptid from regcache.
6850
bbe1eef1
SM
68512017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6852
6853 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
6854 hppaobsd_store_registers): Use ptid from regcache.
6855
10799020
SM
68562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6857
6858 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
6859 hppanbsd_store_registers): Use ptid from regcache.
6860
00204cf7
SM
68612017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6862
6863 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
6864 from regcache. Use get_ptrace_pid.
6865
11a33714
SM
68662017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6867
6868 * corelow.c (get_core_register_section): Use ptid from regcache,
6869 update doc.
6870
317cd492
SM
68712017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6872
6873 * bsd-uthread.c (bsd_uthread_fetch_registers,
6874 bsd_uthread_store_registers): Use ptid from regcache, set and
6875 restore inferior_ptid.
6876
9ac8a7c2
SM
68772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6878
6879 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
6880 fetch_fp_regs, store_register, store_regs, store_fp_register,
6881 store_fp_regs): Use ptid from regcache.
6882
4ac4bb6a
SM
68832017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
6884
6885 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
6886 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
6887 store_vfp_regs): Use ptid from regcache.
6888
9bcbdca8
PA
68892017-03-17 Pedro Alves <palves@redhat.com>
6890
6891 PR remote/21188
6892 * ser-base.c (ser_base_wait_for): Add comment.
6893 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
6894 version.
6895 * ser-unix.c (hardwire_raw): Remove reference to
6896 scb->current_timeout.
6897 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
6898 (hardwire_ops): Install ser_base_readchar instead of
6899 hardwire_readchar.
6900 * serial.h (struct serial) <current_timeout, timeout_remaining>:
6901 Remove fields.
6902
7503099f
JG
69032017-03-17 Jonah Graham <jonah@kichwacoders.com>
6904
6905 PR gdb/19637
6906 * python/lib/gdb/printer/bound_registers.py: Add support for
6907 Python 3.
6908
7942e96e
AA
69092017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6910
6911 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
6912 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
6913 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
6914 byte_offset to subobj_byte_offset. Fix the handling of
6915 DWARF_VALUE_STACK on big-endian targets when coming via an
6916 implicit pointer.
6917 (dwarf2_evaluate_loc_desc): Adjust call to
6918 dwarf2_evaluate_loc_desc_full.
6919 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
6920 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
6921
ba14f379
YQ
69222017-03-16 Yao Qi <yao.qi@linaro.org>
6923
6924 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
6925 and REVSH instructions.
6926
b121eeb9
YQ
69272017-03-16 Yao Qi <yao.qi@linaro.org>
6928
6929 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
6930 (arm_record_test): Declare.
6931 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
6932 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
6933 align with the manual.
6934 (thumb_record_misc): Adjust the code order to align with the
6935 manual.
6936 (thumb2_record_decode_insn_handler): Fix instruction matching.
6937 (instruction_reader_thumb): New class.
6938 (arm_record_test): New function.
6939
728a7913
YQ
69402017-03-16 Yao Qi <yao.qi@linaro.org>
6941
6942 * arm-tdep.c (abstract_memory_reader): New class.
6943 (instruction_reader): New class.
6944 (extract_arm_insn): Add argument 'reader'. Callers updated.
6945 (decode_insn): Likewise.
6946
34b43320
DE
69472017-03-16 Doug Evans <dje@google.com>
6948
a7c0469f
DE
6949 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
6950 member. Change type of TYPE member to SCM. All uses updated.
6951 (lsscm_make_lazy_string_smob): Add assert.
6952 (lsscm_make_lazy_string): Flag bad length values.
6953 (lsscm_elt_type): New function.
6954 (gdbscm_lazy_string_to_value): Rewrite to use
6955 lsscm_safe_lazy_string_to_value.
6956 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
6957 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
6958 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
6959 in incoming type.
6960 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6961 * guile/scm-type.c (tyscm_scm_to_type): New function.
6962
69632017-03-15 Doug Evans <dje@google.com>
6964
34b43320
DE
6965 PR python/17728, python/18439, python/18779
6966 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
6967 member. Change type of TYPE member to PyObject *. All uses updated.
6968 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
6969 (gdbpy_create_lazy_string_object): Flag bad length values.
6970 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
6971 Handle typedefs in incoming type.
6972 (stpy_lazy_string_elt_type): New function.
6973 (gdbpy_extract_lazy_string): Call it.
6974 * python/py-value.c (valpy_lazy_string): Flag bad length values.
6975 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
6976 typedefs in incoming type.
6977
a3a5fecc
DE
69782017-03-16 Doug Evans <dje@google.com>
6979
6980 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6981 * guile/scm-type.c (tyscm_scm_to_type): New function.
6982
28f1c605
JW
69832017-03-16 Jiong Wang <jiong.wang@arm.com>
6984
6985 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
6986 "ULONGEST" for "skip".
6987
87c336f6
AA
69882017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
6989
6990 PR gdb/21220
6991 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
6992 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
6993 (inf_ptrace_peek_poke): ...here. New function. Now also loop
6994 over ptrace peek/poke until end of buffer or error.
6995
cf81cf60
SM
69962017-03-14 Simon Marchi <simon.marchi@ericsson.com>
6997
6998 * parse.c (length_of_subexp): Make static.
6999 * parser-defs.h (length_of_subexp): Remove.
7000
a379284a
AA
70012017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
7002
7003 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7004 as well.
7005
8a6200ba
PA
70062017-03-14 Pedro Alves <palves@redhat.com>
7007
7008 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7009 (main): Use std::unique_ptr. Remove calls to
7010 cp_demangled_name_parse_free.
7011
f79ec206
SM
70122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7013
7014 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7015 alphabsd_store_inferior_registers): Use regcache->ptid instead
7016 of inferior_ptid.
7017
edb5fb00
SM
70182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7019
7020 * aix-thread.c (aix_thread_fetch_registers,
7021 aix_thread_store_registers): Use regcache->ptid instead of
7022 inferior_ptid.
7023
55119686
SM
70242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7025
7026 * aarch64-linux-nat.c (fetch_gregs_from_thread,
7027 store_gregs_to_thread, fetch_fpregs_from_thread,
7028 store_fpregs_to_thread): Use regcache->ptid instead of
7029 inferior_ptid.
7030
6a06fbb7
SM
70312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7032
7033 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7034 amd64_linux_fetch_inferior_registers): Use regcache->ptid
7035 instead of inferior_ptid.
7036
c6386875
SM
70372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7038
7039 * target.c (target_fetch_registers, target_store_registers): Add
7040 assert.
7041
ddaaf0fb
SM
70422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7043
7044 * regcache.h (regcache_get_ptid): New function.
7045 * regcache.c (regcache_get_ptid): New function.
7046
b9da89d1 70472017-03-13 Mark Wielaard <mark@klomp.org>
7048
7049 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7050
5f4d1085
KS
70512017-03-10 Keith Seitz <keiths@redhat.com>
7052
7053 PR c++/8218
7054 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7055
c65d6b55
PA
70562017-03-08 Pedro Alves <palves@redhat.com>
7057
7058 PR gdb/18360
7059 * infrun.c (start_step_over, do_target_resume, resume)
7060 (restart_threads): Assert we're not resuming a thread that is
7061 meant to be stopped.
7062 (infrun_thread_stop_requested_callback): Delete.
7063 (infrun_thread_stop_requested): If the thread is internally
7064 stopped, queue a pending stop event and clear the thread's
7065 inline-frame state.
7066 (handle_stop_requested): New function.
7067 (handle_syscall_event, handle_inferior_event_1): Use
7068 handle_stop_requested.
7069 (handle_stop_requested): New function.
7070 (handle_signal_stop): Set the thread's stop_signal here instead of
7071 at caller.
7072 (finish_step_over): Clear step over info unconditionally.
7073 (handle_signal_stop): If the user had interrupted the event
7074 thread, consider the stop a random signal.
7075 (handle_signal_stop) <signal arrived while stepping over
7076 breakpoint>: Don't restart threads here.
7077 (stop_waiting): Don't clear step-over info here.
7078
15c22686
PA
70792017-03-08 Pedro Alves <palves@redhat.com>
7080
7081 PR 21206
7082 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7083 goes to argument 2, not 1.
7084
6e5d74e7
PA
70852017-03-08 Pedro Alves <palves@redhat.com>
7086
7087 PR cli/21218
7088 * top.c (gdb_readline_wrapper): Avoid passing NULL to
7089 display_gdb_prompt.
7090 (command_line_input): Add comment.
7091
9753a2f6
PA
70922017-03-08 Pedro Alves <palves@redhat.com>
7093
7094 PR tui/21216
7095 * tui/tui-file.c (tui_file::write): New.
7096 * tui/tui-file.h (tui_file): Override "write".
7097 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7098 factored out from ...
7099 (tui_puts): ... here.
7100 (tui_putc): Use them.
7101 (tui_write): New function.
7102 * tui/tui-io.h (tui_write): Declare.
7103
1672e0d9
SDJ
71042017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7105
7106 * Makefile.in (SFILES): Replace "environ.c" with
7107 "common/environ.c".
7108 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7109 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
7110 to...
7111 * common/environ.c: ... here.
7112 * environ.h: Moved to...
7113 * common/environ.h: ... here.
7114
f7bb4e3a
PB
71152017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7116
7117 * gdbarch.sh (pstring_ptr): New static function.
7118 (gdbarch_disassembler_options): Use it.
7119 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7120 not valid_disassembler_option->name.
7121 * gdbarch.c: Regenerate.
7122
e45ced6c
PB
71232017-03-07 Peter Bergner <bergner@vnet.ibm.com>
7124
7125 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7126
5f6fd321
PA
71272017-03-07 Pedro Alves <palves@redhat.com>
7128
7129 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7130
6dbb839a 71312017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
7132
7133 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7134 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7135 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 7136 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 7137
d274ecf4
SM
71382017-03-06 Simon Marchi <simon.marchi@ericsson.com>
7139
7140 * xtensa-linux-nat.c (fetch_gregs): Remove const.
7141
df97be55
SM
71422017-03-03 Simon Marchi <simon.marchi@ericsson.com>
7143
7144 * remote.c (remote_add_target_side_commands): Use range-based
7145 for loop.
7146
7d45f3df
YQ
71472017-03-03 Yao Qi <yao.qi@linaro.org>
7148
7149 PR gdb/21165
7150 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7151 value is lazy.
7152 * valprint.c (common_val_print): Likewise.
7153
65b48a81
PB
71542017-02-28 Peter Bergner <bergner@vnet.ibm.com>
7155
7156 * NEWS: Mention new set/show disassembler-options commands.
7157 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7158 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7159 (prospective_options): New static variable.
7160 (gdb_disassembler::gdb_disassembler): Initialize
7161 m_di.disassembler_options.
7162 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7163 (get_disassembler_options): New function.
7164 (set_disassembler_options): Likewise.
7165 (set_disassembler_options_sfunc): Likewise.
7166 (show_disassembler_options_sfunc): Likewise.
7167 (disassembler_options_completer): Likewise.
7168 (_initialize_disasm): Likewise.
7169 * disasm.h (get_disassembler_options): New prototype.
7170 (set_disassembler_options): Likewise.
7171 * gdbarch.sh (gdbarch_disassembler_options): New variable.
7172 (gdbarch_verify_disassembler_options): Likewise.
7173 * gdbarch.c: Regenerate.
7174 * gdbarch.h: Likewise.
7175 * arm-tdep.c (num_disassembly_options): Delete.
7176 (set_disassembly_style): Likewise.
7177 (arm_disassembler_options): New static variable.
7178 (set_disassembly_style_sfunc): Convert short style name into long
7179 option name. Call set_disassembler_options.
7180 (show_disassembly_style_sfunc): New function.
7181 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7182 set_gdbarch_verify_disassembler_options.
7183 (_initialize_arm_tdep): Delete regnames variable and update callers.
7184 (arm_disassembler_options): Initialize.
7185 (disasm_options): New variable.
7186 (num_disassembly_options): Rename from this...
7187 (num_disassembly_styles): ...to this. Compute by scanning through
7188 disasm_options.
7189 (valid_disassembly_styles): Initialize using disasm_options.
7190 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7191 set_arm_regname_option.
7192 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7193 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7194 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7195 set_gdbarch_verify_disassembler_options.
7196 * s390-tdep.c (s390_disassembler_options): New static variable.
7197 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7198 set_gdbarch_verify_disassembler_options.
7199
d538e36d
SM
72002017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7201
7202 * remote.c (remote_add_target_side_condition): Remove "struct"
7203 keyword from range-based for loop.
7204
83621223
SM
72052017-02-27 Simon Marchi <simon.marchi@ericsson.com>
7206
7207 * remote.c (remote_add_target_side_condition): Use range-based
7208 for loop. Update comment.
7209
2123df0e
YQ
72102017-02-27 Yao Qi <yao.qi@linaro.org>
7211
7212 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7213
8e368124
AH
72142017-02-26 Alan Hayward <alan.hayward@arm.com>
7215
7216 * regcache.c (regcache_raw_update): New function.
7217 (regcache_raw_read): Move code to regcache_raw_update.
7218 * regcache.h (regcache_raw_update): New declaration.
7219 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7220
a49dd8dd
JK
72212017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
7222
7223 * dwarf2read.c (create_debug_type_hash_table): Initialize
7224 header.signature and header.type_offset_in_tu.
7225
34e4bae9
PA
72262017-02-24 Pedro Alves <palves@redhat.com>
7227
7228 * symtab.c (make_file_symbol_completion_list_1): Use
7229 add_symtab_completions.
7230
b0e4b369
AH
72312017-02-24 Alan Hayward <alan.hayward@arm.com>
7232
7233 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7234
975c21ab
AH
72352017-02-24 Alan Hayward <alan.hayward@arm.com>
7236
7237 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7238 I386_MAX_REGISTER_SIZE.
7239 (i386_pseudo_register_write): Likewise.
7240 (i386_process_record): Likewise.
7241 * i387-tdep.c (i387_supply_xsave): Likewise.
7242 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7243 (store_register): Likewise.
7244
14bc53a8
PA
72452017-02-23 Pedro Alves <palves@redhat.com>
7246
7247 * ada-lang.c: Include "common/function-view.h".
7248 (ada_iterate_over_symbols): Adjust to use function_view as
7249 callback type.
7250 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7251 (ada_make_symbol_completion_list): Use a lambda.
7252 (ada_exc_search_name_matches): Delete.
7253 (name_matches_regex): New.
7254 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7255 * compile/compile-c-support.c: Include "common/function-view.h".
7256 (print_one_macro): Change prototype to accept a ui_file pointer.
7257 (write_macro_definitions): Use a lambda.
7258 * dwarf2read.c: Include "common/function-view.h".
7259 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7260 (dw2_expand_symtabs_matching): Adjust to use function_view as
7261 callback type.
7262 * language.h: Include "common/function-view.h".
7263 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7264 function_view as callback type.
7265 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7266 * linespec.c: Include "common/function-view.h".
7267 (collect_info::add_symbol): New method.
7268 (struct symbol_and_data_callback, iterate_inline_only, struct
7269 symbol_matcher_data, iterate_name_matcher): Delete.
7270 (iterate_over_all_matching_symtabs): Adjust to use function_view
7271 as callback type and lambdas.
7272 (iterate_over_file_blocks): Adjust to use function_view as
7273 callback type.
7274 (decode_compound_collector): Now a class with private fields.
7275 (decode_compound_collector::release_symbols): New method.
7276 (collect_one_symbol): Rename to...
7277 (decode_compound_collector::operator()): ... this and adjust.
7278 (lookup_prefix_sym): decode_compound_collector construction bits
7279 move to decode_compound_collector ctor. Pass the
7280 decode_compound_collector object directly as callback. Remove
7281 cleanups and use decode_compound_collector::release_symbols
7282 instead.
7283 (symtab_collector): Now a class with private fields.
7284 (symtab_collector::release_symtabs): New method.
7285 (add_symtabs_to_list): Rename to...
7286 (symtab_collector::operator()): ... this and adjust.
7287 (collect_symtabs_from_filename): symtab_collector construction
7288 bits move to symtab_collector ctor. Pass the symtab_collector
7289 object directly as callback. Remove cleanups and use
7290 symtab_collector::release_symtabs instead.
7291 (collect_symbols): Delete.
7292 (add_matching_symbols_to_info): Use lambdas.
7293 * macrocmd.c (print_macro_callback): Delete.
7294 (info_macro_command): Use a lambda.
7295 (info_macros_command): Pass print_macro_definition as callable
7296 directly.
7297 (print_one_macro): Remove 'ignore' parameter.
7298 (macro_list_command): Adjust.
7299 * macrotab.c (macro_for_each_data::fn): Now a function_view.
7300 (macro_for_each_data::user_data): Delete field.
7301 (foreach_macro): Adjust to call the function_view.
7302 (macro_for_each): Adjust to use function_view as callback type.
7303 (foreach_macro_in_scope): Adjust to call the function_view.
7304 (macro_for_each_in_scope): Adjust to use function_view as callback
7305 type.
7306 * macrotab.h: Include "common/function-view.h".
7307 (macro_callback_fn): Declare a prototype instead of a pointer.
7308 Remove "user_data" parameter.
7309 (macro_for_each, macro_for_each_in_scope): Adjust to use
7310 function_view as callback type.
7311 * psymtab.c (partial_map_expand_apply)
7312 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7313 Adjust to use function_view as callback type and to return bool.
7314 (psym_expand_symtabs_matching): Adjust to use function_view as
7315 callback types.
7316 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7317 to use function_view as callback type and to return bool.
7318 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7319 callback types.
7320 * symfile.c (expand_symtabs_matching): Adjust to use function_view
7321 as callback types.
7322 * symfile.h: Include "common/function-view.h".
7323 (expand_symtabs_file_matcher_ftype)
7324 (expand_symtabs_symbol_matcher_ftype)
7325 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7326 return bool.
7327 (quick_symbol_functions::map_symtabs_matching_filename)
7328 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7329 function_view as callback type and return bool.
7330 (expand_symtabs_matching): Adjust to use function_view as callback
7331 type.
7332 (maintenance_expand_name_matcher)
7333 (maintenance_expand_file_matcher): Delete.
7334 (maintenance_expand_symtabs): Use lambdas.
7335 * symtab.c (iterate_over_some_symtabs): Adjust to use
7336 function_view as callback types and return bool.
7337 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
7338 of a cleanup.
7339 (lookup_symtab_callback): Delete.
7340 (lookup_symtab): Use a lambda.
7341 (iterate_over_symbols): Adjust to use function_view as callback
7342 type.
7343 (struct search_symbols_data, search_symbols_file_matches)
7344 (search_symbols_name_matches): Delete.
7345 (search_symbols): Use a pair of lambdas.
7346 (struct add_name_data, add_macro_name, symbol_completion_matcher)
7347 (symtab_expansion_callback): Delete.
7348 (default_make_symbol_completion_list_break_on_1): Use lambdas.
7349 * symtab.h: Include "common/function-view.h".
7350 (iterate_over_some_symtabs): Adjust to use function_view as
7351 callback type and return bool.
7352 (iterate_over_symtabs): Adjust to use function_view as callback
7353 type.
7354 (symbol_found_callback_ftype): Remove 'data' parameter and return
7355 bool.
7356 (iterate_over_symbols): Adjust to use function_view as callback
7357 type.
7358
07e253aa
PA
73592017-02-23 Pedro Alves <palves@redhat.com>
7360
7361 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7362 (%.o) <unittests/%.c>: New pattern.
7363 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7364 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7365 * common/function-view.h: New file.
7366 * unittests/function-view-selftests.c: New file.
7367 * configure: Regenerate.
7368
8eaf5320
SM
73692017-02-23 Simon Marchi <simon.marchi@ericsson.com>
7370
7371 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7372 inferior_ptid.
7373 * go32-nat.c (go32_thread_alive): Likewise.
7374
38768751
YQ
73752017-02-23 Yao Qi <yao.qi@linaro.org>
7376
7377 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7378 delete.
7379
0a8beaba
YQ
73802017-02-23 Yao Qi <yao.qi@linaro.org>
7381
7382 * varobj.c (varobj_clear_saved_item): Use delete instead of
7383 xfree.
7384 (update_dynamic_varobj_children): Likewise.
7385
58fdfd2c
JK
73862017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7387
7388 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7389
1b90b139
SM
73902017-02-21 Simon Marchi <simon.marchi@ericsson.com>
7391
7392 * common/enum-flags.h (enum_flags::enum_flags): Initialize
7393 m_enum_value to 0 in default constructor.
7394
2039d74e
EBM
73952017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7396
7397 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7398 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7399 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7400 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7401 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7402 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7403 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7404 IS_STORE_CONDITIONAL_INSN.
7405
7814882a
JK
74062017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7407
7408 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7409
0ae60b63
JK
74102017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7411
7412 * NEWS (Changes since GDB 7.12): Add DWARF-5.
7413
0224619f
JK
74142017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7415
7416 * dwarf2read.c (skip_one_die, read_attribute_value)
7417 (dwarf2_const_value_attr, dump_die_shallow)
7418 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7419 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7420
0af92d60
JK
74212017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7422
7423 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7424 (dwarf_parse_macro_header): Accept DWARF version 5.
7425 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7426
216f72a1
JK
74272017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7428
7429 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7430 DW_AT_GNU_*.
7431 * common/common-exceptions.h (enum errors): Likewise.
7432 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7433 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7434 (dwarf_expr_context::execute_stack_op): Likewise.
7435 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7436 Likewise.
7437 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7438 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7439 (show_entry_values_debug, call_site_to_target_addr)
7440 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7441 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7442 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7443 (value_of_dwarf_block_entry, indirect_pieced_value)
7444 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7445 (disassemble_dwarf_expression): Likewise.
7446 * dwarf2read.c (process_die, inherit_abstract_dies)
7447 (read_call_site_scope): Likewise.
7448 * gdbtypes.h (struct func_type, struct call_site_parameter)
7449 (struct call_site): Likewise.
7450 * stack.c (read_frame_arg): Likewise.
7451 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7452
43988095
JK
74532017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7454
7455 * defs.h (read_unsigned_leb128): New declaration.
7456 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7457 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7458 (dwarf2_find_location_expression): Call also
7459 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
7460 * dwarf2loc.h (dwarf2_version): New declaration.
7461 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7462 rnglists.
7463 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7464 .debug_rnglists.
7465 (struct dwop_section_names): Add loclists_dwo.
7466 (dwop_section_names): Add .debug_loclists.dwo.
7467 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7468 (struct dwarf2_per_cu_data): Add dwarf_version.
7469 (struct dwo_sections): Add loclists.
7470 (struct attr_abbrev): Add implicit_const.
7471 (read_indirect_line_string): New declaration.
7472 (read_unsigned_leb128): Delete declaration.
7473 (rcuh_kind): New definition.
7474 (read_and_check_comp_unit_head): Change parameter
7475 is_debug_types_section to section_kind.
7476 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7477 (read_comp_unit_head): Change parameter abfd to section, add parameter
7478 section_kind. Handle DWARF-5.
7479 (error_check_comp_unit_head): Accept also DWARF version 5.
7480 (read_and_check_comp_unit_head): Change parameter
7481 is_debug_types_section to section_kind.
7482 (read_and_check_type_unit_head): Delete function.
7483 (read_abbrev_offset): Handle DWARF-5.
7484 (create_debug_type_hash_table): Add parameter section_kind. Process
7485 only DW_UT_type. Use signature and type_offset_in_tu from struct
7486 comp_unit_head.
7487 (create_debug_types_hash_table): Update create_debug_type_hash_table
7488 caller.
7489 (create_all_type_units): Call create_debug_type_hash_table.
7490 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7491 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7492 caller.
7493 (skip_one_die): Handle DW_FORM_implicit_const.
7494 (dwarf2_rnglists_process): New function.
7495 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7496 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7497 (read_attribute_value): Handle DW_FORM_implicit_const,
7498 DW_FORM_line_strp.
7499 (read_attribute): Handle DW_FORM_implicit_const.
7500 (read_indirect_string_at_offset_from): New function from
7501 read_indirect_string_at_offset.
7502 (read_indirect_string_at_offset): Call
7503 read_indirect_string_at_offset_from.
7504 (read_indirect_line_string_at_offset): New function.
7505 (read_indirect_string): New function comment.
7506 (read_indirect_line_string): New function.
7507 (read_unsigned_leb128): Make it global.
7508 (dwarf2_string_attr): Handle DWARF-5.
7509 (add_include_dir_stub, read_formatted_entries): New functions.
7510 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7511 Handle DWARF-5.
7512 (per_cu_header_read_in): Update read_comp_unit_head caller.
7513 (dwarf2_version): New function.
7514 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7515 rnglists.
7516 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7517 fields.
7518
22d2f3ab
JK
75192017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7520
7521 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7522
5f46c5a5
JK
75232017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7524
7525 * dwarf2read.c (dwarf2_ranges_process): New function from
7526 dwarf2_ranges_read.
7527 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
7528 dwarf2_ranges_process.
7529
78d4d2c5
JK
75302017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7531
7532 * dwarf2read.c (create_debug_type_hash_table): New function from
7533 create_debug_types_hash_table.
7534 (create_debug_types_hash_table): Call create_debug_type_hash_table.
7535 (create_all_type_units, open_and_init_dwo_file): Update
7536 create_debug_types_hash_table callers.
7537
1b076f25
SDJ
75382017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7539
7540 PR gdb/16188
7541 * fork-child.c (trace_start_error): Fix thinko. va_end should
7542 refer to 'ap', not 'args'.
7543
0db8980c
SDJ
75442017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7545 Pedro Alves <palves@redhat.com>
7546
7547 PR gdb/16188
7548 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
7549 calls succeeded.
7550 * fork-child.c (trace_start_error): New function.
7551 (trace_start_error_with_name): Likewise.
7552 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
7553 * inf-ptrace.c (inf_ptrace_me): Likewise.
7554 * inferior.h (trace_start_error): New prototype.
7555 (trace_start_error_with_name): Likewise.
7556
99e8a4f9
SDJ
75572017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
7558
7559 PR gdb/21164
7560 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
7561 NULL before using it.
7562 * symmisc.c (maintenance_print_symbols): Likewise.
7563 (maintenance_print_msymbols): Likewise.
7564
4e746bb6
TW
75652017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7566
7567 * NEWS: Add record Python bindings entry.
7568
75692017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7570
7571 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
7572 py-record-full.o.
7573 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
7574 * python/py-record-btrace.c, python/py-record-btrace.h,
7575 python/py-record-full.c, python/py-record-full.h: New file.
7576 * python/py-record.c: Add include for py-record-btrace.h and
7577 py-record-full.h.
7578 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
7579 recpy_instruction_history, recpy_function_call_history, recpy_begin,
7580 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
7581 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
7582 New definition.
7583 (gdbpy_initialize_btrace): New export.
7584 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
7585
75862017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7587
7588 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
7589 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
7590 * python/py-record.c: New file.
7591 * python/python-internal.h (gdbpy_start_recording,
7592 gdbpy_current_recording, gdpy_stop_recording,
7593 gdbpy_initialize_record): New export.
7594 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
7595 (python_GdbMethods): Add gdbpy_start_recording,
7596 gdbpy_current_recording and gdbpy_stop_recording.
7597
75982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7599
7600 * record-btrace.c (record_btrace_record_method): New function.
7601 (init_record_btrace_ops): Initialize to_record_method.
7602 * record-full.c (record_full_record_method): New function.
7603 (init_record_full_ops, init_record_full_core_ops): Add
7604 record_full_record_method.
7605 * record.h (enum record_method): New enum.
7606 * target-debug.h (target_debug_print_enum_record_method: New define.
7607 * target-delegates.c: Regenerate.
7608 * target.c (target_record_method): New function.
7609 * target.h: Include record.h.
7610 (struct target_ops) <to_record_method>: New field.
7611 (target_record_method): New export.
7612
76132017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7614
7615 * record.h (record_start, record_stop): New export.
7616 * record.c (record_start, record_stop): New function.
7617
76182017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7619
7620 * btrace.c (btrace_fetch): Copy function call segments pointer
7621 into a vector.
7622 (btrace_clear): Clear the vector.
7623 (btrace_find_insn_by_number): Use binary search to find the correct
7624 function call segment.
7625 * btrace.h (brace_fun_p): New typedef.
7626 (struct btrace_thread_info) <functions>: New field.
7627
76282017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7629
7630 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
7631 * btrace.c (btrace_decode_error): ... here. New function.
7632 * btrace.h (btrace_decode_error): New export.
7633
76342017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
7635
7636 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
7637 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
7638 btrace_find_insn_by_number): Remove special case for gaps.
7639 * btrace.h (btrace_insn_get_error): New export.
7640 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
7641 * record-btrace.c (btrace_insn_history): Print number for gaps.
7642 (record_btrace_info, record_btrace_goto): Handle gaps.
7643
3f77c769
TT
76442017-02-14 Tom Tromey <tom@tromey.com>
7645
7646 PR python/13598:
7647 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
7648 event.
7649 * python/py-evts.c (gdbpy_initialize_py_events): Add
7650 before_prompt registry.
7651 * python/py-events.h (events_object) <before_prompt>: New field.
7652
4c2c7ac6
MM
76532017-02-14 Markus Metzger <markus.t.metzger@intel.com>
7654
7655 * btrace.c (ftrace_new_switch): Preserve up link and flags.
7656
5cf30ebf
LM
76572017-02-13 Luis Machado <lgustavo@codesourcery.com>
7658
7659 * symfile (_initialize_symfile): Add usage text to the load command's
7660 help text.
7661
26a06916
SM
76622017-02-10 Simon Marchi <simon.marchi@ericsson.com>
7663
7664 * utils.c (defaulted_query): Don't query on secondary UIs.
7665
0b145e37
TT
76662017-02-10 Tom Tromey <tom@tromey.com>
7667
7668 * rust-lang.c (rust_get_disr_info): Remove unused variable.
7669
2d8365c4
TT
76702017-02-10 Tom Tromey <tom@tromey.com>
7671
7672 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
7673 "cleanup" local.
7674 * python/py-type.c (typy_legacy_template_argument): Remove
7675 unnecessary "cleanup" local.
7676
2bb8f231
TT
76772017-02-10 Tom Tromey <tom@tromey.com>
7678
7679 * python/python.c (do_start_initialization): New function, from
7680 _initialize_python.
7681 (_initialize_python): Call do_start_initialization.
7682 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
7683 goto.
7684
1bdfaf42
TT
76852017-02-10 Tom Tromey <tom@tromey.com>
7686
7687 * python/py-prettyprint.c (pretty_print_one_value): Use
7688 gdbpy_ref.
7689
88b6faea
TT
76902017-02-10 Tom Tromey <tom@tromey.com>
7691
7692 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
7693 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
7694 gdbpy_ref.
7695 * python/py-type.c (field_new): Use gdbpy_ref.
7696 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
7697 gdbpy_ref.
7698 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
7699 (py_free_pspace): Likewise.
7700 (pspace_to_pspace_object): Likewise.
7701 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
7702 (py_free_objfile): Likewise.
7703 (objfile_to_objfile_object): Likewise.
7704 * python/py-inferior.c (delete_thread_object): Use
7705 gdbpy_ref.
7706 (infpy_read_memory): Likewise.
7707 (py_free_inferior): Likewise.
7708 * python/py-evtregistry.c (create_eventregistry_object): Use
7709 gdbpy_ref.
7710 * python/py-event.c (create_event_object): Use gdbpy_ref.
7711
7780f186
TT
77122017-02-10 Tom Tromey <tom@tromey.com>
7713
7714 * python/py-ref.h (gdbpy_ref_policy): Now a template.
7715 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
7716 used.
7717 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
7718 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
7719 python/py-exitedevent.c, python/py-finishbreakpoint.c,
7720 python/py-framefilter.c, python/py-function.c,
7721 python/py-inferior.c, python/py-infevents.c,
7722 python/py-linetable.c, python/py-newobjfileevent.c,
7723 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
7724 python/py-signalevent.c, python/py-stopevent.c,
7725 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
7726 python/py-unwind.c, python/py-utils.c, python/py-value.c,
7727 python/py-varobj.c, python/py-xmethods.c, python/python.c,
7728 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
7729
d4b0bb18
TT
77302017-02-10 Tom Tromey <tom@tromey.com>
7731
7732 * ui-out.h (ui_out_emit_type): New class.
7733 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
7734 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
7735 and ui_out_emit_tuple.
7736 (enumerate_locals): Likewise.
7737 (py_mi_print_variables, py_print_locals, py_print_args): Use
7738 ui_out_emit_list.
7739 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
7740 ui_out_emit_list.
7741 * common/gdb_optional.h: New file.
7742
f67f945c
MG
77432017-02-10 Martin Galvan <martingalvan@sourceware.org>
7744
7745 * MAINTAINERS (Write After Approval): Update my e-mail address.
7746
18da0c51
MG
77472017-02-10 Martin Galvan <martingalvan@sourceware.org>
7748
7749 PR gdb/21122
7750 * breakpoint.c (_initialize_breakpoint): Update the help description
7751 of the 'commands' command to indicate that it takes a list argument.
7752
62c14536
SM
77532017-02-09 Simon Marchi <simon.marchi@ericsson.com>
7754
7755 * interps.c (current_interp_set_logging): Remove "return".
7756
ff6fa247
GB
77572017-02-09 Gary Benson <gbenson@redhat.com>
7758
7759 * symtab.c (add_symtab_completions): Prevent NULL pointer
7760 dereference.
7761
a474bd8e
PA
77622017-02-08 Pedro Alves <palves@redhat.com>
7763
7764 * interps.c (interp::interp): Remove reference to quiet_p.
7765 (interp_set): Make static. Remove dead "Switching to" output
7766 code.
7767 (interp_quiet_p, interp_set_quiet): Delete.
7768 (interpreter_exec_cmd): Don't set the interpreter quiet.
7769 * interps.h (interp_quiet_p): Make static.
7770 (class interp) <quiet_p>: Remove field
7771
3d7b173c
JG
77722017-02-08 Jerome Guitton <guitton@adacore.com>
7773
604c4576
JG
7774 * cli/cli-decode.c (find_command_name_length): Make it extern.
7775 * cli/cli-decode.h (find_command_name_length): Declare.
7776 * cli/cli-script.c (command_name_equals, line_first_arg):
7777 New functions.
7778 (process_next_line): Use cli-decode to parse command names.
7779 (build_command_line): Make args a constant pointer.
7780
77812017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 7782
3d7b173c
JG
7783 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
7784 Remove case-insensitive search.
7785
1291063d
JM
77862017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
7787
7788 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
7789 at the end of the line. Avoids an ARI warning.
7790
20b477a7
LM
77912017-02-06 Luis Machado <lgustavo@codesourcery.com>
7792
7793 * NEWS: Mention support for record/replay of Intel 64 rdrand and
7794 rdseed instructions.
7795 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
7796
3f7b46f2
IR
77972017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
7798
7799 PR tdep/20936
7800 Provide and use sparc32 and sparc64 target description XML files.
7801 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
7802 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
7803 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
7804 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
7805 * features/sparc/sparc32-solaris.xml: New file.
7806 * features/sparc/sparc64-solaris.xml: New file.
7807 * features/sparc/sparc32-solaris.c: Generated.
7808 * features/sparc/sparc64-solaris.c: Generated.
7809 * sparc-tdep.h: Account for differences in target descriptions.
7810 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
7811 (sparc32_register_type): Use target provided registers.
7812 (validate_tdesc_registers): New function.
7813 (sparc32_gdbarch_init): Use tdesc_has_registers.
7814 Set pseudoregister functions.
7815 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
7816 (sparc64_register_type): Use target provided registers.
7817 (sparc64_init_abi): Set pseudoregister functions.
7818
f0fd41c1
TT
78192017-02-03 Tom Tromey <tom@tromey.com>
7820
7821 PR rust/21097:
7822 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
7823 with a single member.
7824
d6f9b0fb
PA
78252017-02-03 Pedro Alves <palves@redhat.com>
7826
7827 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
7828 (cli_interp_base::~cli_interp_base): New.
7829 (cli_interp): New struct.
7830 (as_cli_interp): Cast the interp itself to cli_interp.
7831 (cli_interpreter_pre_command_loop): Rename to ...
7832 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
7833 parameter.
7834 (cli_interpreter_init): Rename to ...
7835 (cli_interp::init): ... this. Remove 'self' parameter. Use
7836 boolean. Make extern.
7837 (cli_interpreter_resume): Rename to ...
7838 (cli_interp::resume): ... this. Remove 'data' parameter. Make
7839 extern.
7840 (cli_interpreter_suspend): Rename to ...
7841 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
7842 extern.
7843 (cli_interpreter_exec): Rename to ...
7844 (cli_interp::exec): ... this. Remove 'data' parameter. Make
7845 extern.
7846 (cli_interpreter_supports_command_editing): Rename to ...
7847 (cli_interp_base::supports_command_editing): ... this. Remove
7848 'interp' parameter. Make extern.
7849 (cli_ui_out): Rename to ...
7850 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
7851 Make extern.
7852 (cli_set_logging): Rename to ...
7853 (cli_interp_base::set_logging): ... this. Remove 'interp'
7854 parameter. Make extern.
7855 (cli_interp_procs): Delete.
7856 (cli_interp_factory): Adjust to use "new".
7857 * cli/cli-interp.h: Include "interps.h".
7858 (struct cli_interp_base): New struct.
7859 * interps.c (struct interp): Delete. Fields moved to interps.h.
7860 (interp_new): Delete.
7861 (interp::interp, interp::~interp): New.
7862 (interp_set): Use bool, and return void. Assume the interpreter
7863 has suspend, init and resume methods, and that the all return
7864 void.
7865 (set_top_level_interpreter): interp_set returns void.
7866 (interp_ui_out): Adapt.
7867 (current_interp_set_logging): Adapt.
7868 (interp_data): Delete.
7869 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
7870 (interp_exec): Adapt.
7871 (top_level_interpreter_data): Delete.
7872 * interps.h (interp_init_ftype, interp_resume_ftype)
7873 (interp_suspend_ftype, interp_exec_ftype)
7874 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
7875 (class interp): New.
7876 (interp_new): Delete.
7877 (interp_set): Now returns void. Use bool.
7878 (interp_data, top_level_interpreter_data): Delete.
7879 * mi/mi-common.h: Include interps.h.
7880 (class mi_interp): Inherit from interp. Define a ctor. Declare
7881 init, resume, suspect, exec, interp_ui_out, set_logging and
7882 pre_command_loop methods.
7883 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
7884 (mi_interpreter_init): Rename to ...
7885 (mi_interp::init): ... this. Remove the 'interp' parameter, use
7886 bool, return void and make extern. Adjust.
7887 (mi_interpreter_resume): ... Rename to ...
7888 (mi_interp::resume): ... this. Remove the 'data' parameter,
7889 return void and make extern. Adjust.
7890 (mi_interpreter_suspend): ... Rename to ...
7891 (mi_interp::suspend): ... this. Remove the 'data' parameter,
7892 return void and make extern. Adjust.
7893 (mi_interpreter_exec): ... Rename to ...
7894 (mi_interp::exec): ... this. Remove the 'data' parameter and make
7895 extern. Adjust.
7896 (mi_interpreter_pre_command_loop): ... Rename to ...
7897 (mi_interp::pre_command_loop): ... this. Remove the 'self'
7898 parameter and make extern.
7899 (mi_on_normal_stop_1): Adjust.
7900 (mi_ui_out): Rename to ...
7901 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
7902 parameter and make extern. Adjust.
7903 (mi_set_logging): Rename to ...
7904 (mi_interp::set_logging): ... this. Remove the 'interp'
7905 parameter and make extern. Adjust.
7906 (mi_interp_procs): Delete.
7907 (mi_interp_factory): Adjust to use 'new'.
7908 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
7909 (mi_print_exception, mi_execute_command, mi_load_progress):
7910 Adjust.
7911 * tui/tui-interp.c (tui_interp): New class.
7912 (as_tui_interp): Return a tui_interp pointer.
7913 (tui_on_normal_stop, tui_on_signal_received)
7914 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
7915 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
7916 to use interp::interp_ui_out.
7917 (tui_init): Rename to ...
7918 (tui_interp::init): ... this. Remove the 'self' parameter, use
7919 bool, return void and make extern. Adjust.
7920 (tui_resume): Rename to ...
7921 (tui_interp::resume): ... this. Remove the 'data' parameter,
7922 return void and make extern. Adjust.
7923 (tui_suspend): Rename to ...
7924 (tui_interp::suspend): ... this. Remove the 'data' parameter,
7925 return void and make extern. Adjust.
7926 (tui_ui_out): Rename to ...
7927 (tui_interp::interp_ui_out): ... this. Remove the 'self'
7928 parameter, and make extern. Adjust.
7929 (tui_exec): Rename to ...
7930 (tui_interp::exec): ... this. Remove the 'data' parameter and
7931 make extern.
7932 (tui_interp_procs): Delete.
7933 (tui_interp_factory): Use "new".
7934
65c40c95
TT
79352017-02-02 Tom Tromey <tom@tromey.com>
7936
7937 * rust-exp.y (ends_raw_string, space_then_number)
7938 (rust_identifier_start_p): Return bool.
7939 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
7940 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
7941 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
7942 (rust_chartype_p): Return bool.
7943 (val_print_struct, rust_print_struct_def, rust_print_type):
7944 Update.
7945 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
7946 Return bool.
7947
b50f188d
TT
79482017-02-02 Tom Tromey <tom@tromey.com>
7949
7950 * rust-lang.c: Reindent.
7951
03c85b11
TT
79522017-02-02 Tom Tromey <tom@tromey.com>
7953
7954 * rust-lang.h (rust_crate_for_block): Update.
7955 * rust-lang.c (rust_crate_for_block): Return std::string.
7956 (rust_get_disr_info): Use std:;string, not
7957 gdb::unique_xmalloc_ptr.
7958 * rust-exp.y (crate_name): Update.
7959
9b6da501
PA
79602017-02-02 Pedro Alves <palves@redhat.com>
7961
7962 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
7963 field out of gdb_disassembler_test and make it static.
7964
ec4cb20b
PA
79652017-02-02 Pedro Alves <palves@redhat.com>
7966
7967 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
7968 mi1_interp and mi_interp fields.
7969
5be5dbf0
PA
79702017-02-02 Pedro Alves <palves@redhat.com>
7971
616268b6
PA
7972 * cli/cli-interp.c (struct saved_output_files, saved_output):
7973 Moved from cli/cli-logging.c.
7974 (cli_set_logging): New function.
7975 (cli_interp_procs): Install cli_set_logging.
7976 * cli/cli-interp.h (make_logging_output, cli_set_logging):
7977 Declare.
7978 * cli/cli-logging.c (struct saved_output_files, saved_output):
7979 Moved to cli/cli-interp.c.
7980 (pop_output_files): Don't save outputs here.
7981 (make_logging_output): New function.
7982 (handle_redirections): Don't build tee nor save previous outputs
7983 here.
7984 * interps.c (current_interp_set_logging): Change prototype.
7985 Assume there's always a set_logging_proc method installed.
7986 * interps.h (interp_set_logging_ftype): Change prototype.
7987 (current_interp_set_logging): Change prototype and adjust comment.
7988 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
7989 use make_logging_output.
7990 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
79912017-02-02 Pedro Alves <palves@redhat.com>
7992
5be5dbf0
PA
7993 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
7994 from ...
7995 (set_logging_overwrite): ... here.
7996 (logging_no_redirect_file): Delete.
7997 (set_logging_redirect): Don't handle redirection on the fly.
7998 Instead warn that "logging off" / "logging on" is necessary.
7999 (pop_output_files): Delete references to logging_no_redirect_file.
8000 (show_logging_command): Always speak in terms of what will happen
8001 once logging is reenabled.
8002
c99cc448
PA
80032017-02-02 Pedro Alves <palves@redhat.com>
8004
8005 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8006
8b172ce7
PA
80072017-02-02 Pedro Alves <palves@redhat.com>
8008
8009 * disasm.c (gdb_pretty_print_insn): Rename to ...
8010 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8011 Remove gdbarch parameter. Adapt to clear the object's buffers
8012 instead of allocating new buffers, and to print using the object's
8013 gdb_disassembler instead of calling gdb_print_insn.
8014 (dump_insns): Use gdb_pretty_print_disassembler.
8015 * disasm.h (gdb_pretty_print_insn): Delete declaration.
8016 (gdb_pretty_print_disassembler): New class.
8017 * record-btrace.c (btrace_insn_history): Use
8018 gdb_pretty_print_disassembler.
8019
d7e74731
PA
80202017-02-02 Pedro Alves <palves@redhat.com>
8021
8022 * ada-lang.c (type_as_string): Use string_file.
8023 * ada-valprint.c (ada_print_floating): Use string_file.
8024 * ada-varobj.c (ada_varobj_scalar_image)
8025 (ada_varobj_get_value_image): Use string_file.
8026 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8027 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8028 * breakpoint.c (update_inserted_breakpoint_locations)
8029 (insert_breakpoint_locations, reattach_breakpoints)
8030 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8031 (print_it_watchpoint): Use string_file.
8032 (save_breakpoints): Use stdio_file.
8033 * c-exp.y (oper): Use string_file.
8034 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8035 tee_file.
8036 (pop_output_files): Use delete.
8037 (handle_redirections): Use stdio_file and tee_file.
8038 * cli/cli-setshow.c (do_show_command): Use string_file.
8039 * compile/compile-c-support.c (c_compute_program): Use
8040 string_file.
8041 * compile/compile-c-symbols.c (generate_vla_size): Take a
8042 'string_file &' instead of a 'ui_file *'.
8043 (generate_c_for_for_one_variable): Take a 'string_file &' instead
8044 of a 'ui_file *'. Use string_file.
8045 (generate_c_for_variable_locations): Take a 'string_file &'
8046 instead of a 'ui_file *'.
8047 * compile/compile-internal.h (generate_c_for_for_one_variable):
8048 Take a 'string_file &' instead of a 'ui_file *'.
8049 * compile/compile-loc2c.c (push, pushf, unary, binary)
8050 (print_label, pushf_register_address, pushf_register)
8051 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8052 'ui_file *'. Adjust.
8053 * compile/compile.c (compile_to_object): Use string_file.
8054 * compile/compile.h (compile_dwarf_expr_to_c)
8055 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8056 'ui_file *'.
8057 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8058 (replace_typedefs_qualified_name): Use string_file and
8059 obstack_copy0.
8060 * disasm.c (gdb_pretty_print_insn): Use string_file.
8061 (gdb_disassembly): Adjust reference the null_stream global.
8062 (do_ui_file_delete): Delete.
8063 (gdb_insn_length): Use null_stream.
8064 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8065 * dwarf2loc.c (dwarf2_compile_property_to_c)
8066 (locexpr_generate_c_location, loclist_generate_c_location): Take a
8067 'string_file &' instead of a 'ui_file *'.
8068 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8069 * dwarf2read.c (do_ui_file_peek_last): Delete.
8070 (dwarf2_compute_name): Use string_file.
8071 * event-top.c (gdb_setup_readline): Use stdio_file.
8072 * gdbarch.sh (verify_gdbarch): Use string_file.
8073 * gdbtypes.c (safe_parse_type): Use null_stream.
8074 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8075 string_file.
8076 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8077 'string_file *' instead of a 'ui_file *'.
8078 (gdbscm_arch_disassemble): Use string_file.
8079 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8080 * guile/scm-ports.c (class ioscm_file_port): Now a class that
8081 inherits from ui_file.
8082 (ioscm_file_port_delete, ioscm_file_port_rewind)
8083 (ioscm_file_port_put): Delete.
8084 (ioscm_file_port_write): Rename to ...
8085 (ioscm_file_port::write): ... this. Remove file_port_magic
8086 checks.
8087 (ioscm_file_port_new): Delete.
8088 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8089 ui_file_up.
8090 * guile/scm-type.c (tyscm_type_name): Use string_file.
8091 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8092 Use string_file.
8093 * infcmd.c (print_return_value_1): Use string_file.
8094 * infrun.c (print_target_wait_results): Use string_file.
8095 * language.c (add_language): Use string_file.
8096 * location.c (explicit_to_string_internal): Use string_file.
8097 * main.c (captured_main_1): Use null_file.
8098 * maint.c (maintenance_print_architecture): Use stdio_file.
8099 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8100 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8101 event_channel>: Change type to mi_console_file pointer.
8102 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8103 (mi_console_file_delete): Delete.
8104 (struct mi_console_file): Delete.
8105 (mi_console_file_magic): Delete.
8106 (mi_console_file_new): Delete.
8107 (mi_console_file::mi_console_file): New.
8108 (mi_console_file_delete): Delete.
8109 (mi_console_file_fputs): Delete.
8110 (mi_console_file::write): New.
8111 (mi_console_raw_packet): Delete.
8112 (mi_console_file::flush): New.
8113 (mi_console_file_flush): Delete.
8114 (mi_console_set_raw): Rename to ...
8115 (mi_console_file::set_raw): ... this.
8116 * mi/mi-console.h (class mi_console_file): New class.
8117 (mi_console_file_new, mi_console_set_raw): Delete.
8118 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8119 (mi_set_logging): Use delete and tee_file. Adjust.
8120 * mi/mi-main.c (output_register): Use string_file.
8121 (mi_cmd_data_evaluate_expression): Use string_file.
8122 (mi_cmd_data_read_memory): Use string_file.
8123 (mi_cmd_execute, print_variable_or_computed): Use string_file.
8124 * mi/mi-out.c (mi_ui_out::main_stream): New.
8125 (mi_ui_out::rewind): Use main_stream and
8126 string_file.
8127 (mi_ui_out::put): Use main_stream and string_file.
8128 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8129 Allocate a 'string_file' instead.
8130 (mi_out_new): Don't allocate a mem_fileopen stream here.
8131 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8132 (mi_ui_out::main_stream): Declare method.
8133 * printcmd.c (eval_command): Use string_file.
8134 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8135 * python/py-arch.c (archpy_disassemble): Use string_file.
8136 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8137 * python/py-frame.c (frapy_str): Use string_file.
8138 * python/py-framefilter.c (py_print_type, py_print_single_arg):
8139 Use string_file.
8140 * python/py-type.c (typy_str): Use string_file.
8141 * python/py-unwind.c (unwind_infopy_str): Use string_file.
8142 * python/py-value.c (valpy_str): Use string_file.
8143 * record-btrace.c (btrace_insn_history): Use string_file.
8144 * regcache.c (regcache_print): Use stdio_file.
8145 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8146 * remote.c (escape_buffer): Use string_file.
8147 * rust-lang.c (rust_get_disr_info): Use string_file.
8148 * serial.c (serial_open_ops_1): Use stdio_file.
8149 (do_serial_close): Use delete.
8150 * stack.c (print_frame_arg): Use string_file.
8151 (print_frame_args): Remove local mem_fileopen stream, not used.
8152 (print_frame): Use string_file.
8153 * symmisc.c (maintenance_print_symbols): Use stdio_file.
8154 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8155 Take a 'string_file *' instead of a 'ui_file *'.
8156 * top.c (new_ui): Use stdio_file and stderr_file.
8157 (free_ui): Use delete.
8158 (execute_command_to_string): Use string_file.
8159 (quit_confirm): Use string_file.
8160 * tracepoint.c (collection_list::append_exp): Use string_file.
8161 * tui/tui-disasm.c (tui_disassemble): Use string_file.
8162 * tui/tui-file.c: Don't include "ui-file.h".
8163 (enum streamtype, struct tui_stream): Delete.
8164 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8165 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8166 (tui_file::tui_file): New method.
8167 (tui_file_fputs): Delete.
8168 (tui_file_get_strbuf): Delete.
8169 (tui_file::puts): New method.
8170 (tui_file_adjust_strbuf): Delete.
8171 (tui_file_flush): Delete.
8172 (tui_file::flush): New method.
8173 * tui/tui-file.h: Tweak intro comment.
8174 Include ui-file.h.
8175 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8176 (tui_file_adjust_strbuf): Delete declarations.
8177 (class tui_file): New class.
8178 * tui/tui-io.c (tui_initialize_io): Use tui_file.
8179 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8180 (tui_register_format): Use string_stream.
8181 * tui/tui-stack.c (tui_make_status_line): Use string_file.
8182 (tui_get_function_from_frame): Use string_file.
8183 * typeprint.c (type_to_string): Use string_file.
8184 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8185 (null_stream): New global.
8186 (ui_file_delete): Delete.
8187 (ui_file::ui_file): New.
8188 (null_file_isatty): Delete.
8189 (ui_file::~ui_file): New.
8190 (null_file_rewind): Delete.
8191 (ui_file::printf): New.
8192 (null_file_put): Delete.
8193 (null_file_flush): Delete.
8194 (ui_file::putstr): New.
8195 (null_file_write): Delete.
8196 (ui_file::putstrn): New.
8197 (null_file_read): Delete.
8198 (ui_file::putc): New.
8199 (null_file_fputs): Delete.
8200 (null_file_write_async_safe): Delete.
8201 (ui_file::vprintf): New.
8202 (null_file_delete): Delete.
8203 (null_file::write): New.
8204 (null_file_fseek): Delete.
8205 (null_file::puts): New.
8206 (ui_file_data): Delete.
8207 (null_file::write_async_safe): New.
8208 (gdb_flush, ui_file_isatty): Adjust.
8209 (ui_file_put, ui_file_rewind): Delete.
8210 (ui_file_write): Adjust.
8211 (ui_file_write_for_put): Delete.
8212 (ui_file_write_async_safe, ui_file_read): Adjust.
8213 (ui_file_fseek): Delete.
8214 (fputs_unfiltered): Adjust.
8215 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8216 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8217 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8218 (set_ui_file_data): Delete.
8219 (string_file::~string_file, string_file::write)
8220 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8221 (do_ui_file_as_string, ui_file_as_string): Delete.
8222 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8223 (struct mem_file): Delete.
8224 (mem_file_new): Delete.
8225 (stdio_file::stdio_file): New.
8226 (mem_file_delete): Delete.
8227 (stdio_file::stdio_file): New.
8228 (mem_fileopen): Delete.
8229 (stdio_file::~stdio_file): New.
8230 (mem_file_rewind): Delete.
8231 (stdio_file::set_stream): New.
8232 (mem_file_put): Delete.
8233 (stdio_file::open): New.
8234 (mem_file_write): Delete.
8235 (stdio_file_magic, struct stdio_file): Delete.
8236 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8237 (stdio_file::flush): New.
8238 (stdio_file_read): Rename to ...
8239 (stdio_file::read): ... this. Adjust.
8240 (stdio_file_write): Rename to ...
8241 (stdio_file::write): ... this. Adjust.
8242 (stdio_file_write_async_safe): Rename to ...
8243 (stdio_file::write_async_safe) ... this. Adjust.
8244 (stdio_file_fputs): Rename to ...
8245 (stdio_file::puts) ... this. Adjust.
8246 (stdio_file_isatty): Delete.
8247 (stdio_file_fseek): Delete.
8248 (stdio_file::isatty): New.
8249 (stderr_file_write): Rename to ...
8250 (stderr_file::write) ... this. Adjust.
8251 (stderr_file_fputs): Rename to ...
8252 (stderr_file::puts) ... this. Adjust.
8253 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8254 (stderr_file::stderr_file): New.
8255 (tee_file_magic): Delete.
8256 (struct tee_file): Delete.
8257 (tee_file::tee_file): New.
8258 (tee_file_new): Delete.
8259 (tee_file::~tee_file): New.
8260 (tee_file_delete): Delete.
8261 (tee_file_flush): Rename to ...
8262 (tee_file::flush): ... this. Adjust.
8263 (tee_file_write): Rename to ...
8264 (tee_file::write): ... this. Adjust.
8265 (tee_file::write_async_safe): New.
8266 (tee_file_fputs): Rename to ...
8267 (tee_file::puts): ... this. Adjust.
8268 (tee_file_isatty): Rename to ...
8269 (tee_file::isatty): ... this. Adjust.
8270 * ui-file.h (struct obstack, struct ui_file): Don't
8271 forward-declare.
8272 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8273 (ui_file_write_ftype)
8274 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8275 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8276 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8277 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8278 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8279 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8280 (set_ui_file_fseek): Delete.
8281 (ui_file_data, ui_file_delete, ui_file_rewind)
8282 (struct ui_file): New.
8283 (ui_file_up): New.
8284 (class null_file): New.
8285 (null_stream): Declare.
8286 (ui_file_write_for_put, ui_file_put): Delete.
8287 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8288 Delete.
8289 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8290 (gdb_fopen, tee_file_new): Delete.
8291 (struct string_file): New.
8292 (struct stdio_file): New.
8293 (stdio_file_up): New.
8294 (struct stderr_file): New.
8295 (class tee_file): New.
8296 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8297 of a 'ui_file *'. Adjust.
8298 * ui-out.h (class ui_out) <field_stream>: Likewise.
8299 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8300 (null_stream): Delete.
8301 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8302 Adjust.
8303 * utils.h (struct ui_file): Delete forward declaration..
8304 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8305 (error_stream): Take a 'string_file &' instead of a
8306 'ui_file *'.
8307 * varobj.c (varobj_value_get_print_value): Use string_file.
8308 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8309 * gdbarch.c: Regenerate.
8310
187808b0
PA
83112017-02-02 Pedro Alves <palves@redhat.com>
8312
8313 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8314 (gdb_pretty_print_insn): ... this. Now a free function. Add back
8315 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
8316 Adjust to call gdb_print_insn instead of
8317 gdb_disassembler::print_insn.
8318 (dump_insns, do_mixed_source_and_assembly_deprecated)
8319 (do_mixed_source_and_assembly, do_assembly_only): Add back a
8320 'gdbarch' parameter. Remove gdb_disassembler parameter.
8321 (gdb_disassembly): Don't allocate a gdb_disassembler here.
8322 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8323 declaration.
8324 (gdb_pretty_print_insn): Re-add declaration.
8325 * record-btrace.c (btrace_insn_history): Don't allocate a
8326 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
8327
7a8eb317
SM
83282017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
8329
8330 * disasm.h (gdb_disassembly): Remove file_string parameter.
8331 * disasm.c (gdb_disassembly): Likewise.
8332 * cli/cli-cmds.c (print_disassembly): Adapt.
8333 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8334 * stack.c (do_gdb_disassembly): Likewise.
8335
7346ef59
AA
83362017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
8337
8338 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8339 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8340 targets. And if the implicit value is longer than needed, extract
8341 the first bytes instead of the "least significant" ones.
8342
cd4007e4
MM
83432017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8344
8345 * btrace.c (btrace_enable): Do not call btrace_add_pc for
8346 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8347 (btrace_fetch): Assert can_access_registers_ptid.
8348 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8349 validate_registers_access.
8350
cf77c34e
MM
83512017-02-01 Markus Metzger <markus.t.metzger@intel.com>
8352
8353 * gdbthread.h (can_access_registers_ptid): New.
8354 * thread.c (can_access_registers_ptid): New.
8355
be85ce7d
PA
83562017-02-01 Pedro Alves <palves@redhat.com>
8357
8358 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8359
29b0b251
PA
83602017-01-31 Pedro Alves <palves@redhat.com>
8361
8362 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8363 Fix typos.
8364
289b5b24
PA
83652017-01-31 Pedro Alves <palves@redhat.com>
8366
8367 * stack.c (print_frame_args): Remove local mem_fileopen stream,
8368 not used.
8369
b47413b4
PA
83702017-01-31 Pedro Alves <palves@redhat.com>
8371
8372 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8373
60adb36c
PA
83742017-01-31 Pedro Alves <palves@redhat.com>
8375
8376 * common/scoped_restore.h
8377 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8378 change the value's parameter type to T2.
8379 (make_scoped_restore): Likewise.
8380
2735833d
WT
83812017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8382 Richard Henderson <rth@redhat.com>
8383
8384 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8385 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8386 GS_BASE for older kernels.
8387 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8388 GS_BASE for older kernels.
8389 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8390 and GS_BASE to the offset table.
8391 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8392 system register group.
8393 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8394 for older kernels.
8395 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8396 amd64 ABI.
8397 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8398 AMD64_GSBASE_REGNUM.
8399 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8400 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8401 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8402 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8403 i386/64bit-segments.xml in those rules.
8404 * features/i386/64bit-segments.xml: New file.
8405 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8406 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8407 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8408 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8409 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8410 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8411 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8412 * features/i386/amd64-avx-linux.c: Regenerated.
8413 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8414 * features/i386/amd64-avx-mpx.c: Regenerated.
8415 * features/i386/amd64-avx512-linux.c: Regenerated.
8416 * features/i386/amd64-linux.c: Regenerated.
8417 * features/i386/amd64-mpx-linux.c: Regenerated.
8418 * features/i386/i386-avx-mpx-linux.c: Regenerated.
8419 * features/i386/i386-avx-mpx.c: Regenerated.
8420 * features/i386/x32-avx-linux.c: Regenerated.
8421 * features/i386/x32-avx512-linux.c: Regenerated.
8422 * regformats/i386/amd64-avx-linux.dat: Regenerated.
8423 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8424 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8425 * regformats/i386/amd64-linux.dat: Regenerated.
8426 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8427 * regformats/i386/x32-avx-linux.dat: Regenerated.
8428 * regformats/i386/x32-avx512-linux.dat: Regenerated.
8429 * regformats/i386/x32-linux.dat: Regenerated.
8430
8884e97e
WT
84312017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8432
8433 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8434 Set to AMD64_NUM_REGS.
8435
7005d26a
WT
84362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8437
8438 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8439 that checks validity of a register number.
8440
4bd2e1b2
KC
84412017-01-27 Kees Cook <keescook@google.com>
8442
8443 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8444 fetch_fpregs if target has fpa registers.
8445 (arm_linux_store_inferior_registers): Call store_fpregs if target
8446 has fpa registers.
8447
7cf1de6c
AA
84482017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
8449
8450 * cris-tdep.c (cris_gdbarch_init): Remove check for
8451 info.byte_order and force it to BFD_ENDIAN_LITTLE.
8452
874a1c8c
AT
84532017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
8454
8455 * corelow.c (get_core_register_section): Check for regset
8456 existence before checking for REGSET_VARIABLE_SIZE.
8457
d8b49cf0
YQ
84582017-01-26 Yao Qi <yao.qi@linaro.org>
8459 Pedro Alves <palves@redhat.com>
8460
8461 PR gdb/20939
8462 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8463 call memory_error, save memaddr instead.
8464 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8465 negative, cal memory_error.
8466 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8467
658ca58c
YQ
84682017-01-26 Yao Qi <yao.qi@linaro.org>
8469
8470 * disasm-selftests.c (memory_error_test): New function.
8471 (_initialize_disasm_selftests): Register memory_error_test.
8472
79843d45
YQ
84732017-01-26 Yao Qi <yao.qi@linaro.org>
8474
8475 * Makefile.in (SFILES): Add disasm-selftests.c and
8476 selftest-arch.c.
8477 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8478 * disasm-selftests.c: New file.
8479 * selftest-arch.c: New file.
8480 * selftest-arch.h: New file.
8481
8cafda32
YQ
84822017-01-26 Yao Qi <yao.qi@linaro.org>
8483
8484 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8485 to bfd_arch_mep. Don't return 0 if section is not
8486 found. Call print_insn_mep.
8487
e47ad6c0
YQ
84882017-01-26 Pedro Alves <palves@redhat.com>
8489 Yao Qi <yao.qi@linaro.org>
8490
8491 * arm-tdep.c: Include "disasm.h".
8492 (gdb_print_insn_arm): Update code to get gdbarch.
8493 * disasm.c (dis_asm_read_memory): Change it to
8494 gdb_disassembler::dis_asm_read_memory.
8495 (dis_asm_memory_error): Likewise.
8496 (dis_asm_print_address): Likewise.
8497 (gdb_pretty_print_insn): Change it to
8498 gdb_disassembler::pretty_print_insn.
8499 (dump_insns): Add one argument gdb_disassemlber. All
8500 callers updated.
8501 (do_mixed_source_and_assembly_deprecated): Likewise.
8502 (do_mixed_source_and_assembly): Likewise.
8503 (do_assembly_only): Likewise.
8504 (gdb_disassembler::gdb_disassembler): New.
8505 (gdb_disassembler::print_insn): New.
8506 * disasm.h (class gdb_disassembler): New.
8507 (gdb_pretty_print_insn): Remove declaration.
8508 (gdb_disassemble_info): Likewise.
8509 * guile/scm-disasm.c (class gdbscm_disassembler): New.
8510 (gdbscm_disasm_read_memory_worker): Update.
8511 (gdbscm_disasm_read_memory): Update.
8512 (gdbscm_disasm_memory_error): Remove.
8513 (gdbscm_disasm_print_address): Remove.
8514 (gdbscm_disassembler::gdbscm_disassembler): New.
8515 (gdbscm_print_insn_from_port): Update.
8516 * mips-tdep.c: Include disasm.h.
8517 (gdb_print_insn_mips): Update code to get gdbarch.
8518 * record-btrace.c (btrace_insn_history): Update.
8519 * spu-tdep.c: Include disasm.h.
8520 (struct spu_dis_asm_data): Remove.
8521 (struct spu_dis_asm_info): New.
8522 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8523 SPU id.
8524 (gdb_print_insn_spu): Cast disassemble_info to
8525 spu_dis_asm_info.
8526
80d75874
YQ
85272017-01-26 Yao Qi <yao.qi@linaro.org>
8528
8529 * disasm.c (do_ui_file_delete): Delete.
8530 (gdb_insn_length): Move code creating stream to ...
8531 * utils.c (null_stream): ... here. New function.
8532 * utils.h (null_stream): Declare.
8533
60685cd0
SM
85342017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
8535
8536 * python/py-inferior.c (find_thread_object): Return directly
8537 from the loop. Remove "found" variable.
8538
eb1cdb62
JB
85392017-01-21 Joel Brobecker <brobecker@adacore.com>
8540
8541 GDB 7.12.1 released.
8542
b1ce6568
SM
85432017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8544
8545 * python/py-function.c (fnpy_call): Reorder declarations to have
8546 the gdbpy_enter object declared first.
8547 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
8548
6f8b0407
SM
85492017-01-20 Simon Marchi <simon.marchi@ericsson.com>
8550
fec93fb1 8551 PR python/21068
6f8b0407
SM
8552 * python/python-internal.h (PyMem_RawMalloc): Define for
8553 Python < 3.4.
8554 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
8555 PyMem_RawMalloc instead of PyMem_Malloc.
8556
78cbbba8
LM
85572017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
8558 Luis Machado <lgustavo@codesourcery.com>
8559
8560 * NEWS (New commands): Mention flash-erase.
8561 (New MI commands): Mention target-flash-erase.
8562 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
8563 command.
8564 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
8565 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
8566 * target.c (flash_erase_command): New function.
8567 (initialize_targets): Add new flash-erase command.
8568 * target.h (flash_erase_command): New declaration.
8569
2132fe85
JB
85702017-01-20 Joel Brobecker <brobecker@adacore.com>
8571
8572 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
8573 HAVE_SYS_PROCFS_H is defined.
8574
d1dff226
AH
85752017-01-18 Alan Hayward <alan.hayward@arm.com>
8576
8577 * remote.c (struct cached_reg): Change data into a pointer.
8578 * (stop_reply_dtr): Free data pointers before deleting vector.
8579 (process_stop_reply): Likewise.
8580 (remote_parse_stop_reply): Allocate space for data
8581
9890e433
AH
85822017-01-18 Alan Hayward <alan.hayward@arm.com>
8583
8584 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
8585 MAX_REGISTER_SIZE.
8586 (amd64_pseudo_register_read_value): Likewise.
8587 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
8588 (store_register_using_P): Likewise.
8589 * regcache.c (regcache_xfer_part): Likewise.
8590
7a36499a
IR
85912017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
8592
8593 Split real and pseudo registers.
8594 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
8595 (sparc32_pseudo_regnum): New enum.
8596 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
8597 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
8598 (SPARC32_CP0_REGISTERS): New macro.
8599 (sparc32_pseudo_register_name): New function.
8600 (sparc32_register_name): Use sparc32_pseudo_register_name.
8601 (sparc32_pseudo_register_type): New function.
8602 (sparc32_register_type): Use sparc32_pseudo_register_type.
8603 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
8604 pseudo register numbers.
8605 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
8606 (SPARC64_CP0_REGISTERS): New macro.
8607 (sparc64_pseudo_register_name): New function.
8608 (sparc64_register_name): Use sparc64_pseudo_register_name.
8609 (sparc64_pseudo_register_type): New function.
8610 (sparc64_register_type): Use sparc64_pseudo_register_type.
8611 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
8612 pseudo register numbers.
8613 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
8614 sparc64_store_arguments): Handle pseudo register numbers.
8615
6f8976bf
YQ
86162017-01-13 Yao Qi <yao.qi@linaro.org>
8617
8618 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
8619 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
8620 output.
8621 (getpkt_or_notif_sane_1): Likewise.
8622
e4241ace
YQ
86232017-01-13 Yao Qi <yao.qi@linaro.org>
8624
8625 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
8626 of CC. Pass "-x c++-header" instead of "-x c".
8627
3015c064
SM
86282017-01-12 Simon Marchi <simon.marchi@ericsson.com>
8629
8630 * remote.c (remote_can_async_p): Update comment.
8631
fde1b17d
SM
86322017-01-12 Simon Marchi <simon.marchi@ericsson.com>
8633
8634 * linux-nat.c (linux_nat_can_async_p): Update comment.
8635
ca1ca08b
SM
86362017-01-12 Simon Marchi <simon.marchi@ericsson.com>
8637
8638 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
8639
4ad2da73
SM
86402017-01-11 Simon Marchi <simon.marchi@ericsson.com>
8641
8642 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
8643
c8b23b3f
TT
86442017-01-10 Tom Tromey <tom@tromey.com>
8645
8646 * python/py-type.c (typy_legacy_template_argument): Update.
8647 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
8648 ~demangle_parse_info): Declare new members.
8649 (cp_demangled_name_to_comp): Return unique_ptr.
8650 (cp_demangled_name_parse_free)
8651 (make_cleanup_cp_demangled_name_parse_free)
8652 (cp_new_demangle_parse_info): Remove.
8653 * cp-support.c (do_demangled_name_parse_free_cleanup)
8654 (make_cleanup_cp_demangled_name_parse_free): Remove.
8655 (inspect_type, cp_canonicalize_string_full)
8656 (cp_canonicalize_string): Update.
8657 (mangled_name_to_comp): Change return type.
8658 (cp_class_name_from_physname, method_name_from_physname)
8659 (cp_func_name, cp_remove_params): Update.
8660 * cp-name-parser.y (demangle_parse_info): New constructor, from
8661 cp_new_demangle_parse_info.
8662 (~demangle_parse_info): New destructor, from
8663 cp_demangled_name_parse_free.
8664 (cp_merge_demangle_parse_infos): Update.
8665 (cp_demangled_name_to_comp): Change return type.
8666
1ac32117
TT
86672017-01-10 Tom Tromey <tom@tromey.com>
8668
8669 * top.c (prevent_dont_repeat): Change return type.
8670 * python/python.c (execute_gdb_command): Use std::string.
8671 Update.
8672 * guile/guile.c (gdbscm_execute_gdb_command): Update.
8673 * command.h (prevent_dont_repeat): Change return type.
8674 * breakpoint.c (bpstat_do_actions_1): Update.
8675
0cf08227
TT
86762017-01-10 Tom Tromey <tom@tromey.com>
8677
8678 * value.h (scoped_value_mark::~scoped_value_mark): Call
8679 free_to_mark.
8680 (scoped_value_mark::free_to_mark): New method.
8681 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
8682 scoped_value_mark.
8683
eb115069
TT
86842017-01-10 Tom Tromey <tom@tromey.com>
8685
8686 * python/py-value.c (valpy_dereference, valpy_referenced_value)
8687 (valpy_reference_value, valpy_const_value, valpy_get_address)
8688 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
8689 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
8690 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
8691 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
8692 scoped_value_mark.
8693 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
8694 * value.h (scoped_value_mark): New class.
8695
906768f9
TT
86962017-01-10 Tom Tromey <tom@tromey.com>
8697
8698 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
8699 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
8700 * psymtab.c (discard_psymtabs_upto): Remove.
8701 (make_cleanup_discard_psymtabs): Remove.
8702 (struct psymtab_state): Remove.
8703
bef155c3
TT
87042017-01-10 Tom Tromey <tom@tromey.com>
8705
8706 * record-full.c (record_full_save_cleanups): Remove.
8707 (record_full_save): Use gdb::unlinker.
8708 * gcore.c (do_bfd_delete_cleanup): Remove.
8709 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
8710 cleanups.
8711 * dwarf2read.c (unlink_if_set): Remove.
8712 (write_psymtabs_to_index): Use gdb::unlinker.
8713 * common/gdb_unlinker.h: New file.
8714
192b62ce
TT
87152017-01-10 Tom Tromey <tom@tromey.com>
8716
8717 * windows-tdep.c (windows_xfer_shared_library): Update.
8718 * windows-nat.c (windows_make_so): Update.
8719 * utils.h (make_cleanup_bfd_unref): Remove.
8720 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
8721 * symfile.h (symfile_bfd_open)
8722 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
8723 * symfile.c (read_symbols, symbol_file_add)
8724 (separate_debug_file_exists): Update.
8725 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
8726 (generic_load, reread_symbols): Update.
8727 * symfile-mem.c (symbol_file_add_from_memory): Update.
8728 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
8729 (spu_symbol_file_add_from_memory): Update.
8730 * solist.h (struct target_so_ops) <bfd_open>: Return
8731 gdb_bfd_ref_ptr.
8732 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
8733 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
8734 gdb_bfd_ref_ptr.
8735 (solib_map_sections, reload_shared_libraries_1): Update.
8736 * solib-svr4.c (enable_break): Update.
8737 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
8738 * solib-frv.c (enable_break2): Update.
8739 * solib-dsbt.c (enable_break): Update.
8740 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
8741 gdb_bfd_ref_ptr.
8742 (darwin_solib_get_all_image_info_addr_at_init): Update.
8743 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
8744 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
8745 * record-full.c (record_full_save): Update.
8746 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
8747 * procfs.c (insert_dbx_link_bpt_in_file): Update.
8748 * minidebug.c (find_separate_debug_file_in_section): Return
8749 gdb_bfd_ref_ptr.
8750 * machoread.c (macho_add_oso_symfile): Change abfd to
8751 gdb_bfd_ref_ptr.
8752 (macho_symfile_read_all_oso): Update.
8753 (macho_check_dsym): Return gdb_bfd_ref_ptr.
8754 (macho_symfile_read): Update.
8755 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
8756 (jit_bfd_try_read_symtab): Update.
8757 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8758 (gdb_bfd_openw, gdb_bfd_openr_iovec)
8759 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8760 gdb_bfd_ref_ptr.
8761 (gdb_bfd_ref_policy): New struct.
8762 (gdb_bfd_ref_ptr): New typedef.
8763 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8764 (gdb_bfd_openw, gdb_bfd_openr_iovec)
8765 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8766 gdb_bfd_ref_ptr.
8767 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8768 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8769 (gcore_command): Update.
8770 * exec.c (exec_file_attach): Update.
8771 * elfread.c (elf_symfile_read): Update.
8772 * dwarf2read.c (dwarf2_get_dwz_file): Update.
8773 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
8774 (open_and_init_dwo_file): Update.
8775 (open_dwp_file): Return gdb_bfd_ref_ptr.
8776 (open_and_init_dwp_file): Update.
8777 * corelow.c (core_open): Update.
8778 * compile/compile-object-load.c (compile_object_load): Update.
8779 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
8780 * coffread.c (coff_symfile_read): Update.
8781 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
8782 gdb_bfd_ref_ptr. Rename.
8783 (dump_bfd_file, restore_command): Update.
8784 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8785 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8786 (find_separate_debug_file_by_buildid): Update.
8787
50315b21
TT
87882017-01-10 Tom Tromey <tom@tromey.com>
8789
8790 * common/gdb_ref_ptr.h: New file.
8791 * python/py-ref.h (struct gdbpy_ref_policy): New.
8792 (gdbpy_ref): Now a typedef.
8793
fc4007c9
TT
87942017-01-10 Tom Tromey <tom@tromey.com>
8795
8796 * utils.h (make_cleanup_htab_delete): Don't declare.
8797 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
8798 Remove.
8799 * linespec.c (decode_compound_collector): Add constructor,
8800 destructor.
8801 (lookup_prefix_sym): Remove cleanup.
8802 (symtab_collector): Add constructor, destructor.
8803 (collect_symtabs_from_filename): Remove cleanup.
8804 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
8805 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
8806 Use htab_up.
8807 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
8808 * dwarf2read.c (dw2_expand_symtabs_matching)
8809 (dw2_map_symbol_filenames, dwarf_decode_macros)
8810 (write_psymtabs_to_index): Use htab_up.
8811 * dwarf2loc.c (func_verify_no_selftailcall)
8812 (call_site_find_chain_1, func_verify_no_selftailcall)
8813 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
8814 std::vector, gdb::unique_xmalloc_ptr.
8815 (call_sitep): Remove typedef.
8816 (dwarf2_locexpr_baton_eval): Remove unused variable.
8817
8dbcee67
TT
88182017-01-10 Tom Tromey <tom@tromey.com>
8819
8820 * python/python-internal.h (make_cleanup_py_decref)
8821 (make_cleanup_py_xdecref): Don't declare.
8822 * python/py-utils.c (py_decref, make_cleanup_py_decref)
8823 (py_xdecref, make_cleanup_py_xdecref): Remove.
8824
13df46cc
TT
88252017-01-10 Tom Tromey <tom@tromey.com>
8826
8827 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
8828 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
8829
06fc9bf7
TT
88302017-01-10 Tom Tromey <tom@tromey.com>
8831
8832 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
8833
830a4934
TT
88342017-01-10 Tom Tromey <tom@tromey.com>
8835
8836 * python/py-utils.c (unicode_to_encoded_string)
8837 (python_string_to_target_string)
8838 (python_string_to_target_python_string)
8839 (python_string_to_host_string, gdbpy_obj_to_string)
8840 (get_addr_from_python): Use gdbpy_ref.
8841
4586d543
TT
88422017-01-10 Tom Tromey <tom@tromey.com>
8843
8844 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
8845 gdbpy_ref.
8846
59876f8f
TT
88472017-01-10 Tom Tromey <tom@tromey.com>
8848
8849 * python/python.c (eval_python_command, gdbpy_decode_line)
8850 (gdbpy_run_events, gdbpy_start_type_printers)
8851 (gdbpy_apply_type_printers): Use gdbpy_ref.
8852
97d83487
TT
88532017-01-10 Tom Tromey <tom@tromey.com>
8854
8855 * python/py-param.c (get_doc_string, compute_enum_values): Use
8856 gdbpy_ref.
8857
9205649a
TT
88582017-01-10 Tom Tromey <tom@tromey.com>
8859
8860 * python/py-inferior.c (find_thread_object, build_inferior_list):
8861 Use gdbpy_ref.
8862
74c49d45
TT
88632017-01-10 Tom Tromey <tom@tromey.com>
8864
8865 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8866
16361ffb
TT
88672017-01-10 Tom Tromey <tom@tromey.com>
8868
8869 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
8870 gdbpy_ref.
8871
905f2cca
TT
88722017-01-10 Tom Tromey <tom@tromey.com>
8873
8874 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
8875 extra incref.
8876 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
8877 Use gdbpy_ref.
8878
64081434
TT
88792017-01-10 Tom Tromey <tom@tromey.com>
8880
8881 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8882 gdbpy_ref.
8883
59e9e831
TT
88842017-01-10 Tom Tromey <tom@tromey.com>
8885
8886 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
8887 decref results of PyArg_ParseTupleAndKeywords.
8888
9de10f6d
TT
88892017-01-10 Tom Tromey <tom@tromey.com>
8890
8891 * python/python.c (python_run_simple_file): Use
8892 unique_xmalloc_ptr, gdbpy_ref.
8893
2bd5759d
TT
88942017-01-10 Tom Tromey <tom@tromey.com>
8895
8896 * python/py-prettyprint.c (print_stack_unless_memory_error)
8897 (print_string_repr, print_children): Use gdbpy_ref.
8898 (dummy_python_frame): New class.
8899 (dummy_python_frame::dummy_python_frame): Rename from
8900 push_dummy_python_frame.
8901 (py_restore_tstate): Remove.
8902
3b4e0e01
TT
89032017-01-10 Tom Tromey <tom@tromey.com>
8904
8905 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8906
17a22718
TT
89072017-01-10 Tom Tromey <tom@tromey.com>
8908
8909 * python/python.c (ensure_python_env, restore_python_env):
8910 Remove.
8911 * python/python-internal.h (ensure_python_env): Don't declare.
8912 * varobj.h (varobj_ensure_python_env): Don't declare.
8913 * varobj.c (varobj_ensure_python_env): Remove.
8914
68cdc557
TT
89152017-01-10 Tom Tromey <tom@tromey.com>
8916
8917 * varobj.c (varobj_value_get_print_value): Use
8918 gdbpy_enter_varobj.
8919
1eba6383
TT
89202017-01-10 Tom Tromey <tom@tromey.com>
8921
8922 * python/py-prettyprint.c (print_string_repr, print_children):
8923 Update.
8924 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
8925 of "encoding".
8926 * varobj.c (varobj_value_get_print_value): Update.
8927 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
8928
bde7b3e3
TT
89292017-01-10 Tom Tromey <tom@tromey.com>
8930
8931 * varobj.c (varobj_get_display_hint)
8932 (dynamic_varobj_has_child_method, install_new_value_visualizer)
8933 (varobj_set_visualizer, free_variable): Use
8934 gdbpy_enter_varobj.
8935
a7785f8c
TT
89362017-01-10 Tom Tromey <tom@tromey.com>
8937
8938 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
8939 (do_finish_initialization): New function. Use gdbpy_ref.
8940 (gdbpy_finish_initialization): Use gdbpy_enter. Call
8941 do_finish_initialization.
8942
2865bfce
TT
89432017-01-10 Tom Tromey <tom@tromey.com>
8944
8945 * python/py-param.c (get_set_value, get_show_value): Use
8946 gdbpy_enter, gdbpy_ref.
8947
0e9dcc75
TT
89482017-01-10 Tom Tromey <tom@tromey.com>
8949
8950 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
8951
12a5cedd
TT
89522017-01-10 Tom Tromey <tom@tromey.com>
8953
8954 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
8955
788f2586
TT
89562017-01-10 Tom Tromey <tom@tromey.com>
8957
8958 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
8959 Use gdbpy_enter_varobj.
8960
6cd67bea
TT
89612017-01-10 Tom Tromey <tom@tromey.com>
8962
8963 * varobj.c (gdbpy_enter_varobj): New constructor.
8964 * python/python-internal.h (gdbpy_enter_varobj): New class.
8965 * python/py-varobj.c (py_varobj_get_iterator): Use
8966 gdbpy_enter_varobj.
8967
14b122bf
TT
89682017-01-10 Tom Tromey <tom@tromey.com>
8969
8970 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
8971 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8972 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
8973 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
8974 unique_xmalloc_ptr.
8975 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
8976
bf1ca3b9
TT
89772017-01-10 Tom Tromey <tom@tromey.com>
8978
8979 * python/py-xmethods.c (invoke_match_method): Use
8980 gdbpy_ref.
8981
572a5524
TT
89822017-01-10 Tom Tromey <tom@tromey.com>
8983
8984 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
8985 gdbpy_enter, gdbpy_ref.
8986
396a78b6
TT
89872017-01-10 Tom Tromey <tom@tromey.com>
8988
8989 * python/python.c (python_interactive_command): Use gdbpy_enter.
8990
a88b13c7
TT
89912017-01-10 Tom Tromey <tom@tromey.com>
8992
8993 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
8994 gdbpy_ref.
8995
e9f0c363
TT
89962017-01-10 Tom Tromey <tom@tromey.com>
8997
8998 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
8999 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9000
6349f452
TT
90012017-01-10 Tom Tromey <tom@tromey.com>
9002
9003 * utils.h (htab_deleter): New struct.
9004 (htab_up): New typedef.
9005 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9006 gdbpy_enter, gdbpy_ref, htab_up.
9007
c0171de6
TT
90082017-01-10 Tom Tromey <tom@tromey.com>
9009
9010 * python/py-unwind.c (pending_frame_invalidate): Remove.
9011 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9012
f18e226f
TT
90132017-01-10 Tom Tromey <tom@tromey.com>
9014
9015 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9016 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9017
c57af3f1
TT
90182017-01-10 Tom Tromey <tom@tromey.com>
9019
9020 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9021
60e600ec
TT
90222017-01-10 Tom Tromey <tom@tromey.com>
9023
9024 * python/python.c (gdbpy_eval_from_control_command)
9025 (gdbpy_source_script, gdbpy_run_events)
9026 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9027 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9028 gdbpy_enter.
9029
bf7da5b0
TT
90302017-01-10 Tom Tromey <tom@tromey.com>
9031
9032 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9033
2d38bced
TT
90342017-01-10 Tom Tromey <tom@tromey.com>
9035
9036 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9037
07bc7329
TT
90382017-01-10 Tom Tromey <tom@tromey.com>
9039
9040 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9041 (python_on_inferior_call_pre, python_on_inferior_call_post)
9042 (python_on_memory_change, python_on_register_change)
9043 (python_inferior_exit, python_new_objfile, add_thread_object)
9044 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9045
6e7c365e
TT
90462017-01-10 Tom Tromey <tom@tromey.com>
9047
9048 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9049 (bpfinishpy_handle_exit): Use gdbpy_enter.
9050
6ba0cd40
TT
90512017-01-10 Tom Tromey <tom@tromey.com>
9052
9053 * python/py-cmd.c (cmdpy_destroyer)
9054 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9055 gdbpy_enter.
9056
de2dc875
TT
90572017-01-10 Tom Tromey <tom@tromey.com>
9058
9059 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9060 gdbpy_enter.
9061 (gdbpy_breakpoint_has_cond): Likewise.
9062
4ecee2c4
TT
90632017-01-10 Tom Tromey <tom@tromey.com>
9064
9065 * python/python.c (gdbpy_enter): New constructor.
9066 (~gdbpy_enter): New destructor.
9067 (restore_python_env, ensure_python_env): Rewrite.
9068 * python/python-internal.h (gdbpy_enter): New class.
9069
37fce74f
TT
90702017-01-10 Tom Tromey <tom@tromey.com>
9071
9072 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9073
53a0cca3
TT
90742017-01-10 Tom Tromey <tom@tromey.com>
9075
9076 * python/py-value.c (value_has_field, get_field_flag)
9077 (get_field_type, valpy_getitem, convert_value_from_python): Use
9078 gdbpy_ref.
9079
ff3724f5
TT
90802017-01-10 Tom Tromey <tom@tromey.com>
9081
9082 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9083 gdbpy_ref.
9084
0700aea5
TT
90852017-01-10 Tom Tromey <tom@tromey.com>
9086
9087 * python/py-prettyprint.c (search_pp_list)
9088 (find_pretty_printer_from_objfiles)
9089 (find_pretty_printer_from_progspace)
9090 (find_pretty_printer_from_gdb, find_pretty_printer)
9091 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9092 gdbpy_ref.
9093
1bb44c9f
TT
90942017-01-10 Tom Tromey <tom@tromey.com>
9095
9096 * python/py-param.c (call_doc_function): Use gdbpy_ref.
9097
87ce03fd
TT
90982017-01-10 Tom Tromey <tom@tromey.com>
9099
9100 * python/py-linetable.c (build_line_table_tuple_from_pcs)
9101 (ltpy_get_all_source_lines): Use gdbpy_ref.
9102
ee0a3fb8
TT
91032017-01-10 Tom Tromey <tom@tromey.com>
9104
9105 * python/py-framefilter.c (extract_sym, extract_value)
9106 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9107 gdbpy_ref.
9108
bf2a52fa
TT
91092017-01-10 Tom Tromey <tom@tromey.com>
9110
9111 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9112
f59fe7f8
TT
91132017-01-10 Tom Tromey <tom@tromey.com>
9114
9115 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9116
80bd970a
TT
91172017-01-10 Tom Tromey <tom@tromey.com>
9118
9119 * python/py-function.c (convert_values_to_python, fnpy_init): Use
9120 gdbpy_ref.
9121
d1b3de2e
TT
91222017-01-10 Tom Tromey <tom@tromey.com>
9123
9124 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9125
3bb43384
TT
91262017-01-10 Tom Tromey <tom@tromey.com>
9127
9128 * python/py-type.c (convert_field, make_fielditem, typy_fields)
9129 (typy_range): Use gdbpy_ref.
9130
abf5651e
TT
91312017-01-10 Tom Tromey <tom@tromey.com>
9132
9133 * python/py-threadevent.c (create_thread_event_object): Use
9134 gdbpy_ref.
9135 * python/py-stopevent.c (create_stop_event_object): Simplify.
9136 (emit_stop_event): Use gdbpy_ref.
9137 * python/py-signalevent.c (create_signal_event_object): Use
9138 gdbpy_ref.
9139 * python/py-newobjfileevent.c (create_new_objfile_event_object)
9140 (emit_new_objfile_event, create_clear_objfiles_event_object)
9141 (emit_clear_objfiles_event): Use gdbpy_ref.
9142 * python/py-infevents.c (create_inferior_call_event_object)
9143 (create_register_changed_event_object)
9144 (create_memory_changed_event_object, emit_inferior_call_event)
9145 (emit_memory_changed_event, emit_register_changed_event): Use
9146 gdbpy_ref.
9147 * python/py-exitedevent.c (create_exited_event_object)
9148 (emit_exited_event): Use gdbpy_ref.
9149 * python/py-event.h (evpy_emit_event): Remove
9150 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9151 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9152 * python/py-continueevent.c (emit_continue_event): Use
9153 gdbpy_ref.
9154 * python/py-breakpoint.c (gdbpy_breakpoint_created)
9155 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9156 gdbpy_ref.
9157 * python/py-bpevent.c (create_breakpoint_event_object): Use
9158 gdbpy_ref.
9159
a68ff33e
TT
91602017-01-10 Tom Tromey <tom@tromey.com>
9161
9162 * python/py-ref.h: New file.
9163
7becfd03
SM
91642017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9165
9166 * cli-out.c (cli_ui_out::do_redirect): Change return type to
9167 void.
9168 * cli-out.h (cli_ui_out::do_redirect): Likewise.
9169 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9170 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9171 * ui-out.c (ui_out::redirect): Likewise.
9172 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9173 * cli/cli-logging.c (set_logging_redirect): Update call site of
9174 ui_out::redirect.
9175 (handle_redirections): Likewise.
9176 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9177 * top.c (execute_command_to_string): Likewise.
9178 * utils.c (do_ui_out_redirect_pop): Likewise.
9179
df294654
SM
91802017-01-10 Simon Marchi <simon.marchi@ericsson.com>
9181
9182 * stack.c (_initialize_stack): Update "frame" command help message.
9183
f5e6296e
IB
91842017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
9185
9186 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9187
0e2d6fa6
YQ
91882017-01-06 Yao Qi <yao.qi@linaro.org>
9189
9190 * x86-linux-nat.h: Include gdb_proc_service.h.
9191
44d6d3f9
YQ
91922017-01-06 Yao Qi <yao.qi@linaro.org>
9193
9194 * ser-base.h: Include serial.h.
9195
656731fe
YQ
91962017-01-06 Yao Qi <yao.qi@linaro.org>
9197
9198 * ppc-linux-tdep.h: Include ppc-tdep.h.
9199
1ca8f924
YQ
92002017-01-06 Yao Qi <yao.qi@linaro.org>
9201
9202 * nat/amd64-linux-siginfo.h: Include signal.h.
9203
bc3008c4
YQ
92042017-01-06 Yao Qi <yao.qi@linaro.org>
9205
9206 * nat/aarch64-linux-hw-point.h: Include break-common.h.
9207
66c80d03
YQ
92082017-01-06 Yao Qi <yao.qi@linaro.org>
9209
9210 * mi/mi-parse.h: Include mi-cmds.h.
9211
051d2dda
YQ
92122017-01-06 Yao Qi <yao.qi@linaro.org>
9213
9214 * inf-loop.c: Don't include "target.h".
9215 * inf-loop.h: Include it here.
9216
8018d34f
YQ
92172017-01-06 Yao Qi <yao.qi@linaro.org>
9218
9219 * dfp.h: Include "dboulest.h" and "expression.h".
9220
c0b8369c
YQ
92212017-01-06 Yao Qi <yao.qi@linaro.org>
9222
9223 * ax-gdb.h: Include "ax.h".
9224
ad5cba2a
YQ
92252017-01-06 Yao Qi <yao.qi@linaro.org>
9226
9227 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9228 with nat/gdb_ptrace.h.
9229
1c33cd7f
YQ
92302017-01-05 Yao Qi <yao.qi@linaro.org>
9231
9232 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9233 new line.
9234 (mips64_fbsd_sigframe_init): Likewise.
9235
c988ac1d
JB
92362017-01-04 John Baldwin <jhb@FreeBSD.org>
9237
9238 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9239 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9240
b268007c
JB
92412017-01-04 John Baldwin <jhb@FreeBSD.org>
9242
9243 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9244 * NEWS: Mention new FreeBSD/mips native configuration.
9245 * config/mips/fbsd.mh: New file.
9246 * configure.host: Add mips*-*-freebsd*.
9247 * mips-fbsd-nat.c: New file.
9248
387360da
JB
92492017-01-04 John Baldwin <jhb@FreeBSD.org>
9250
9251 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9252 (ALLDEPFILES): Add mips-fbsd-tdep.c.
9253 * NEWS: Mention new FreeBSD/mips target.
9254 * configure.tgt: Add mips*-*-freebsd*.
9255 * mips-fbsd-tdep.c: New file.
9256 * mips-fbsd-tdep.h: New file.
9257
2aaaf250
YQ
92582017-01-04 Yao Qi <yao.qi@linaro.org>
9259
9260 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9261 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9262
61baf725
JB
92632017-01-01 Joel Brobecker <brobecker@adacore.com>
9264
6dbb839a 9265 Update copyright year range in all GDB files.
61baf725 9266
c113e7ff 92672017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 9268
c113e7ff 9269 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 9270
c113e7ff 9271For older changes see ChangeLog-2016.
c906108c
SS
9272\f
9273Local Variables:
9274mode: change-log
9275left-margin: 8
9276fill-column: 74
9277version-control: never
57da7796 9278coding: utf-8
c906108c 9279End:
This page took 2.89373 seconds and 4 git commands to generate.