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