1 2017-07-17 Pedro Alves <palves@redhat.com>
3 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4 Handle 'operator<' / 'operator<<'.
6 2017-07-17 Pedro Alves <palves@redhat.com>
8 * completer.c (collect_explicit_location_matches): Handle
10 (convert_explicit_location_to_linespec): New, factored out from
12 (convert_explicit_location_to_sals): ... this.
13 (complete_label): New.
14 (linespec_complete_label, find_label_symbols_in_block): New.
15 (find_label_symbols): Add completion_mode parameter and adjust to
16 call find_label_symbols_in_block.
17 * linespec.h (linespec_complete_label): Declare.
19 2017-07-17 Pedro Alves <palves@redhat.com>
21 * ada-lang.c (ada_collect_symbol_completion_matches): Add
22 complete_symbol_mode parameter.
23 * cli/cli-cmds.c (complete_command): Get the completion result out
24 of the handle_brkchars tracker if used a custom word point.
25 * completer.c: Include "linespec.h".
26 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
27 (advance_to_expression_complete_word_point): New.
28 (completion_tracker::completes_to_completion_word): New.
29 (complete_files_symbols): Pass down
30 complete_symbol_mode::EXPRESSION.
31 (explicit_options, probe_options): New.
32 (collect_explicit_location_matches): Complete on the
33 explictit_loc->foo instead of word. Use
34 linespec_complete_function. Handle MATCH_LINE. Handle offering
35 keyword and options completions.
36 (backup_text_ptr): Delete.
38 (complete_explicit_location): Remove 'word' parameter. Add
39 language, quoted_arg_start and quoted_arg_end parameters.
40 Rewrite, parsing left to right.
41 (location_completer): Rewrite.
42 (location_completer_handle_brkchars): New function.
43 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
44 (enum complete_line_internal_reason): Adjust comments.
45 (completion_tracker::discard_completions): New.
46 (completer_handle_brkchars_func_for_completer): Handle
48 (gdb_custom_word_point_brkchars)
49 (gdb_org_rl_basic_quote_characters): New.
50 (gdb_completion_word_break_characters_throw)
51 (completion_find_completion_word): Handle trackers that use a
53 (completion_tracker::advance_custom_word_point_by): New.
54 (completion_tracker::build_completion_result): Don't rely on
55 readline appending the quote char.
56 (gdb_rl_attempted_completion_function_throw): Handle trackers that
57 use a custom word point.
58 (gdb_rl_attempted_completion_function): Restore
59 rl_basic_quote_characters.
60 * completer.h (class completion_tracker): Extend intro comment.
61 (completion_tracker::set_quote_char)
62 (completion_tracker::quote_char)
63 (completion_tracker::set_use_custom_word_point)
64 (completion_tracker::use_custom_word_point)
65 (completion_tracker::custom_word_point)
66 (completion_tracker::set_custom_word_point)
67 (completion_tracker::advance_custom_word_point_by)
68 (completion_tracker::completes_to_completion_word)
69 (completion_tracker::discard_completions): New methods.
70 (completion_tracker::m_quote_char)
71 (completion_tracker::m_use_custom_word_point)
72 (completion_tracker::m_custom_word_point): New fields.
73 (advance_to_expression_complete_word_point): Declare.
74 * f-lang.c (f_collect_symbol_completion_matches): Add
75 complete_symbol_mode parameter.
76 * language.h (struct language_defn)
77 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
79 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
80 (linespec_complete_function): New function.
81 (linespec_lexer_lex_keyword): Adjust.
82 * linespec.h (linespec_keywords, linespec_complete_function): New
84 * location.c (find_end_quote): New function.
85 (explicit_location_lex_one): Add explicit_completion_info
86 parameter. Save quoting info. Don't throw if being called for
87 completion. Don't handle Ada operators here.
88 (is_cp_operator, skip_op_false_positives, first_of)
89 (explicit_location_lex_one_function): New function.
90 (string_to_explicit_location): Replace 'dont_throw' parameter with
91 an explicit_completion_info pointer parameter. Handle it. Don't
92 use explicit_location_lex_one to lex function names. Use
93 explicit_location_lex_one_function instead.
94 * location.h (struct explicit_completion_info): New.
95 (string_to_explicit_location): Replace 'dont_throw' parameter with
96 an explicit_completion_info pointer parameter.
97 * symtab.c (default_collect_symbol_completion_matches_break_on):
98 Add complete_symbol_mode parameter. Handle LINESPEC mode.
99 (default_collect_symbol_completion_matches)
100 (collect_symbol_completion_matches): Add complete_symbol_mode
102 (collect_symbol_completion_matches_type): Pass down
103 complete_symbol_mode::EXPRESSION.
104 (collect_file_symbol_completion_matches): Add complete_symbol_mode
105 parameter. Handle LINESPEC mode.
106 * symtab.h (complete_symbol_mode): New.
107 (default_collect_symbol_completion_matches_break_on)
108 (default_collect_symbol_completion_matches)
109 (collect_symbol_completion_matches)
110 (collect_file_symbol_completion_matches): Add complete_symbol_mode
113 2017-07-17 Pedro Alves <palves@redhat.com>
115 * utils.c (enum class strncmp_iw_mode): New.
116 (strcmp_iw): Rename to ...
117 (strncmp_iw_with_mode): ... this. Add string2_len and mode
118 parameters. Handle them.
120 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
121 * utils.h (strncmp_iw): Declare.
122 (strcmp_iw): Move describing comments here.
124 2017-07-17 Pedro Alves <palves@redhat.com>
126 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
128 * c-typeprint.c (is_type_conversion_operator): Use
130 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
131 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
133 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
134 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
135 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
136 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
138 * location.c: Include "cp-support.h".
139 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
141 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
144 2017-07-17 Pedro Alves <palves@redhat.com>
146 * cli/cli-cmds.c (complete_command): Use a completion tracker
147 along with completion_find_completion_word for handle_brkchars
149 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
150 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
151 (struct gdb_rl_completion_word_info): New.
152 (gdb_rl_find_completion_word): New.
153 (completion_find_completion_word): New.
154 * completer.h (completion_find_completion_word): Declare.
156 2017-07-17 Pedro Alves <palves@redhat.com>
158 * ada-lang.c (symbol_completion_match): Adjust comments.
159 (symbol_completion_add): Replace vector parameter with
160 completion_tracker parameter. Use it.
161 (ada_make_symbol_completion_list): Rename to...
162 (ada_collect_symbol_completion_matches): ... this. Add
163 completion_tracker parameter and use it.
164 (ada_language_defn): Adjust.
165 * break-catch-syscall.c (catch_syscall_completer): Adjust
166 prototype and work with completion_tracker instead of VEC.
167 * breakpoint.c (condition_completer): Adjust prototype and work
168 with completion_tracker instead of VEC.
169 * c-lang.c (c_language_defn, cplus_language_defn)
170 (asm_language_defn, minimal_language_defn): Adjust to renames.
171 * cli/cli-cmds.c (complete_command): Rework using
172 completion_tracker. Catch exceptions when completing.
173 * cli/cli-decode.c (integer_unlimited_completer)
174 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
175 with completion_tracker instead of VEC.
176 * command.h (struct completion_tracker): Forward declare.
177 (completer_ftype, completer_handle_brkchars_ftype): Change
179 (complete_on_cmdlist, complete_on_enum): Adjust.
180 * completer.c: Include <algorithm>.
181 (struct gdb_completer_state): New.
182 (current_completion): New global.
183 (readline_line_completion_function): Delete.
184 (noop_completer, filename_completer)
185 (filename_completer_handle_brkchars, complete_files_symbols)
186 (linespec_location_completer): Adjust to work with a
187 completion_tracker instead of a VEC.
188 (string_or_empty): New.
189 (collect_explicit_location_matches): Adjust to work with a
190 completion_tracker instead of a VEC.
191 (explicit_location_completer): Rename to ...
192 (complete_explicit_location): ... this and adjust to work with a
193 completion_tracker instead of a VEC.
194 (location_completer): Adjust to work with a completion_tracker
196 (add_struct_fields): Adjust to work with a completion_list instead
198 (expression_completer): Rename to ...
199 (complete_expression): ... this and adjust to work with a
200 completion_tracker instead of a VEC. Use complete_files_symbols.
201 (expression_completer): Reimplement on top of complete_expression.
202 (symbol_completer): Adjust to work with a completion_tracker
204 (enum complete_line_internal_reason): Add describing comments.
205 (complete_line_internal_normal_command): Adjust to work with a
206 completion_tracker instead of a VEC.
207 (complete_line_internal): Rename to ...
208 (complete_line_internal_1): ... this and adjust to work with a
209 completion_tracker instead of a VEC. Assert TEXT is NULL in the
210 handle_brkchars phase.
211 (new_completion_tracker): Delete.
212 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
213 complete_line_internal_1.
214 (free_completion_tracker): Delete.
215 (INITIAL_COMPLETION_HTAB_SIZE): New.
216 (completion_tracker::completion_tracker)
217 (completion_tracker::~completion_tracker): New.
218 (maybe_add_completion): Delete.
219 (completion_tracker::maybe_add_completion)
220 (completion_tracker::add_completion)
221 (completion_tracker::add_completions): New.
222 (throw_max_completions_reached_error): Delete.
223 (complete_line): Adjust to work with a completion_tracker instead
224 of a VEC. Don't create a completion_tracker_t or check for max
226 (command_completer, command_completer_handle_brkchars)
227 (signal_completer, reg_or_group_completer_1)
228 (reg_or_group_completer, default_completer_handle_brkchars):
229 Adjust to work with a completion_tracker.
230 (gdb_completion_word_break_characters_throw): New.
231 (gdb_completion_word_break_characters): Reimplement.
232 (line_completion_function): Delete.
233 (completion_tracker::recompute_lowest_common_denominator)
234 (expand_preserving_ws)
235 (completion_tracker::build_completion_result)
236 (completion_result::completion_result)
237 (completion_result::completion_result)
238 (completion_result::~completion_result)
239 (completion_result::completion_result)
240 (completion_result::release_match_list, compare_cstrings)
241 (completion_result::sort_match_list)
242 (completion_result::reset_match_list)
243 (gdb_rl_attempted_completion_function_throw)
244 (gdb_rl_attempted_completion_function): New.
245 * completer.h (completion_list, struct completion_result)
246 (class completion_tracker): New.
247 (complete_line): Add completion_tracker parameter.
248 (readline_line_completion_function): Delete.
249 (gdb_rl_attempted_completion_function): New.
250 (noop_completer, filename_completer, expression_completer)
251 (location_completer, symbol_completer, command_completer)
252 (signal_completer, reg_or_group_completer): Update prototypes.
253 (completion_tracker_t, new_completion_tracker)
254 (make_cleanup_free_completion_tracker): Delete.
255 (enum maybe_add_completion_enum): Delete.
256 (maybe_add_completion): Delete.
257 (throw_max_completions_reached_error): Delete.
258 * corefile.c (complete_set_gnutarget): Adjust to work with a
259 completion_tracker instead of a VEC.
260 * cp-abi.c (cp_abi_completer): Adjust to work with a
261 completion_tracker instead of a VEC.
262 * d-lang.c (d_language_defn): Adjust.
263 * disasm.c (disassembler_options_completer): Adjust to work with a
264 completion_tracker instead of a VEC.
265 * f-lang.c (f_make_symbol_completion_list): Rename to ...
266 (f_collect_symbol_completion_matches): ... this. Adjust to work
267 with a completion_tracker instead of a VEC.
268 (f_language_defn): Adjust.
269 * go-lang.c (go_language_defn): Adjust.
270 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
271 Adjust to work with a completion_tracker instead of a VEC.
272 * infrun.c (handle_completer): Likewise.
273 * interps.c (interpreter_completer): Likewise.
274 * interps.h (interpreter_completer): Likewise.
275 * language.c (unknown_language_defn, auto_language_defn)
276 (local_language_defn): Adjust.
277 * language.h (language_defn::la_make_symbol_completion_list):
279 (language_defn::la_collect_symbol_completion_matches): ... this
280 and adjust to work with a completion_tracker instead of a VEC.
281 * m2-lang.c (m2_language_defn): Adjust.
282 * objc-lang.c (objc_language_defn): Adjust.
283 * opencl-lang.c (opencl_language_defn): Adjust.
284 * p-lang.c (pascal_language_defn): Adjust.
285 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
286 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
287 with a completion_tracker.
288 * rust-lang.c (rust_language_defn): Adjust.
289 * symtab.c (free_completion_list, do_free_completion_list)
290 (return_val, completion_tracker): Delete.
291 (completion_list_add_name, completion_list_add_symbol)
292 (completion_list_add_msymbol, completion_list_objc_symbol)
293 (completion_list_add_fields, add_symtab_completions): Add
294 completion_tracker parameter and use it.
295 (default_make_symbol_completion_list_break_on_1): Rename to...
296 (default_collect_symbol_completion_matches_break_on): ... this.
297 Add completion_tracker parameter and use it instead of allocating
298 a completion tracker here.
299 (default_make_symbol_completion_list_break_on): Delete old
301 (default_make_symbol_completion_list): Delete.
302 (default_collect_symbol_completion_matches): New.
303 (make_symbol_completion_list): Delete.
304 (collect_symbol_completion_matches): New.
305 (make_symbol_completion_type): Rename to ...
306 (collect_symbol_completion_matches_type): ... this. Add
307 completion_tracker parameter and use it instead of VEC.
308 (make_file_symbol_completion_list_1): Rename to...
309 (collect_file_symbol_completion_matches): ... this. Add
310 completion_tracker parameter and use it instead of VEC.
311 (make_file_symbol_completion_list): Delete.
312 (add_filename_to_list): Use completion_list instead of a VEC.
313 (add_partial_filename_data::list): Now a completion_list.
314 (make_source_files_completion_list): Work with a completion_list
316 * symtab.h: Include "completer.h".
317 (default_make_symbol_completion_list_break_on)
318 (default_make_symbol_completion_list, make_symbol_completion_list)
319 (make_symbol_completion_type, make_file_symbol_completion_list)
320 (make_source_files_completion_list): Delete.
321 (default_collect_symbol_completion_matches_break_on)
322 (default_collect_symbol_completion_matches)
323 (collect_symbol_completion_matches)
324 (collect_symbol_completion_matches_type)
325 (collect_file_symbol_completion_matches)
326 (make_source_files_completion_list): New.
327 * top.c (init_main): Don't install a rl_completion_entry_function
328 hook. Install a rl_attempted_completion_function hook instead.
329 * tui/tui-layout.c (layout_completer): Adjust to work with a
331 * tui/tui-regs.c (tui_reggroup_completer):
332 * tui/tui-win.c (window_name_completer, focus_completer)
333 (winheight_completer): Adjust to work with a completion_tracker.
334 * value.c: Include "completer.h".
335 (complete_internalvar): Adjust to work with a completion_tracker.
336 * value.h (complete_internalvar): Likewise.
338 2017-07-17 Pedro Alves <palves@redhat.com>
340 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
342 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
343 comments to completer_ftype's declaration.
344 <completer_handle_brkchars>: Change type to
345 completer_handle_brkchars_ftype.
346 * command.h (completer_ftype): Add describing comment and give
348 (completer_ftype_void): Rename to ...
349 (completer_handle_brkchars_ftype) ... this. Add describing comment.
350 (set_cmd_completer_handle_brkchars): Adjust.
351 * completer.c (filename_completer_handle_brkchars): New function.
352 (complete_line_internal_normal_command): New function, factored
354 (complete_line_internal): ... here.
355 (command_completer_handle_brkchars)
356 (default_completer_handle_brkchars)
357 (completer_handle_brkchars_func_for_completer): New functions.
358 * completer.h (set_gdb_completion_word_break_characters): Delete
360 (completer_handle_brkchars_func_for_completer): New declaration.
361 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
362 completer_handle_brkchars_func_for_completer.
364 2017-07-17 Pedro Alves <palves@redhat.com>
366 * completer.c (symbol_completer): New function, based on
367 make_symbol_completion_list_fn.
368 * completer.h (symbol_completer): New declaration.
369 * guile/scm-cmd.c (cmdscm_completers): Adjust.
370 * python/py-cmd.c (completers): Adjust.
371 * symtab.c (make_symbol_completion_list_fn): Delete.
372 * symtab.h (make_symbol_completion_list_fn): Delete.
373 * cli/cli-decode.c (add_cmd): Adjust.
375 2017-07-17 Pedro Alves <palves@redhat.com>
377 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
378 * dwarf2read.c: Include "filename-seen-cache.h".
379 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
380 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
381 * filename-seen-cache.c: New file.
382 * filename-seen-cache.h: New file.
383 * symtab.c: Include "filename-seen-cache.h".
384 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
385 (create_filename_seen_cache, clear_filename_seen_cache)
386 (delete_filename_seen_cache, filename_seen): Delete, parts moved
387 to filename-seen-cache.h/filename-seen-cache.c.
388 (output_source_filename, sources_info)
389 (maybe_add_partial_symtab_filename)
390 (make_source_files_completion_list): Adjust to use
393 2017-07-17 Pedro Alves <palves@redhat.com>
395 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
397 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
398 dwarf2_debug_sections*)): New.
399 (dwarf2_per_objfile::dwarf2_per_objfile(const
400 dwarf2_per_objfile&)): Declare as deleted.
401 (dwarf2_per_objfile::operator=): Declare as deleted.
402 (dwarf2_per_objfile::dwarf2_per_objfile)
403 (dwarf2_per_objfile::~dwarf2_per_objfile)
404 (dwarf2_per_objfile::free_cached_comp_units): New.
405 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
406 ctor. Call dwarf2_per_objfile's ctor manually.
407 (dwarf2_locate_sections): Deleted/refactored as ...
408 (dwarf2_per_objfile::locate_sections): ... this new method.
409 (free_cached_comp_units): Defer to
410 dwarf2_per_objfile::free_cached_comp_units.
411 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
413 2017-07-14 Tom Tromey <tom@tromey.com>
416 * rust-exp.y (convert_ast_to_expression): Add "want_type"
418 <UNOP_SIZEOF>: Split into separate case.
419 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
421 2017-07-14 Tom Tromey <tom@tromey.com>
424 * symtab.c (symbol_matches_domain): Add language_rust to special
426 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
427 treat LOC_TYPEDEF symbols as variables.
429 2017-07-14 Pedro Alves <palves@redhat.com>
431 * symtab.c (make_file_symbol_completion_list_1): Iterate over
432 symtabs matching all symtabs with SRCFILE as file name instead of
433 only considering the first hit, with lookup_symtab.
435 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
437 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
438 operator_name parameters.
439 (gen_expr): Update function call.
441 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
443 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
445 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
447 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
448 parameter, use agent_expr::gdbarch instead, update function
450 (locexpr_tracepoint_var_ref): Likewise.
451 (loclist_tracepoint_var_ref): Likewise.
452 * ax-gdb.c (gen_trace_static_fields): Likewise.
453 (gen_traced_pop): Likewise.
454 (gen_frame_args_address): Likewise.
455 (gen_frame_locals_address): Likewise.
456 (gen_var_ref): Likewise.
457 (gen_struct_ref_recursive): Likewise.
458 (gen_static_field): Likewise.
459 (gen_maybe_namespace_elt): Likewise.
460 (gen_expr): Likewise.
461 (gen_trace_for_var): Likewise.
462 (gen_trace_for_expr): Likewise.
463 (gen_trace_for_return_address): Likewise.
465 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
467 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
469 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
471 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
473 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
474 from ax, update calls.
475 (gen_usual_arithmetic): Likewise.
476 (gen_integral_promotions): Likewise.
477 (gen_bitfield_ref): Likewise.
478 (gen_primitive_field): Likewise.
479 (gen_struct_ref_recursive): Likewise.
480 (gen_struct_ref): Likewise.
481 (gen_maybe_namespace_elt): Likewise.
482 (gen_struct_elt_for_reference): Likewise.
483 (gen_namespace_elt): Likewise.
484 (gen_aggregate_elt_ref): Likewise.
485 (gen_expr): Get gdbarch from ax, update calls.
486 (gen_expr_binop_rest): Likewise.
488 2017-07-13 Pedro Alves <palves@redhat.com>
490 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
492 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
493 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
494 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
495 tdesc_amd64_linux as default tdesc. Get final tdesc from the
497 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
498 Get final tdesc from the tdep.
499 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
501 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
502 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
503 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
504 Use it as default tdesc.
505 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
506 down to amd_init_abi. No longer handle fallback tdesc here.
507 * amd64-tdep.h (tdesc_x32): Declare.
508 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
510 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
513 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
515 * s390-linux-tdep.c (s390_process_record): Add support for
516 instructions new in arch12.
518 2017-07-11 John Baldwin <jhb@FreeBSD.org>
520 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
521 PT_GETFSBASE and PT_GETGSBASE.
522 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
525 2017-07-11 John Baldwin <jhb@FreeBSD.org>
527 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
528 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
529 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
531 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
532 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
533 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
534 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
535 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
536 * features/i386/amd64.xml: Add 64bit-segments.xml.
537 * features/i386/amd64-avx-avx512.c: Regenerated.
538 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
539 * features/i386/amd64-avx-mpx.c: Regenerated.
540 * features/i386/amd64-avx.c: Regenerated.
541 * features/i386/amd64-mpx.c: Regenerated.
542 * features/i386/amd64.c: Regenerated.
543 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
544 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
545 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
546 * regformats/i386/amd64-avx.dat: Regenerated.
547 * regformats/i386/amd64-mpx.dat: Regenerated.
548 * regformats/i386/amd64.dat: Regenerated.
550 2017-07-10 Yao Qi <yao.qi@linaro.org>
552 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
553 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
555 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
557 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
559 * gnulib/aclocal.m4: Regenerate.
560 * gnulib/config.in: Regenerate.
561 * gnulib/configure: Regenerate.
562 * gnulib/import/Makefile.am: Regenerate.
563 * gnulib/import/Makefile.in: Regenerate.
564 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
565 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
566 * gnulib/import/m4/environ.m4: New file.
567 * gnulib/import/m4/setenv.m4: New file.
568 * gnulib/import/setenv.c: New file.
569 * gnulib/import/unsetenv.c: New file.
571 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
573 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
574 address when op is DW_OP_addr.
576 2017-07-09 Tom Tromey <tom@tromey.com>
578 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
579 check and apply to outer type.
581 2017-07-07 John Baldwin <jhb@FreeBSD.org>
583 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
584 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
585 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
586 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
588 2017-07-07 John Baldwin <jhb@FreeBSD.org>
590 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
592 2017-07-07 John Baldwin <jhb@FreeBSD.org>
594 * corelow.c (get_core_siginfo): Remove.
595 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
596 instead of get_core_siginfo.
597 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
598 * gdbarch.h: Re-generate.
599 * gdbarch.c: Re-generate.
600 * linux-tdep.c (linux_core_xfer_siginfo): New.
601 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
603 2017-07-07 John Baldwin <jhb@FreeBSD.org>
605 * corelow.c (thread_section_name): Move to ...
606 * gdbcore.h (thread_section_name): ... here.
608 2017-07-07 John Baldwin <jhb@FreeBSD.org>
610 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
611 (struct siginfo32): New.
612 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
613 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
614 via ptrace(PT_LWPINFO).
616 2017-07-07 John Baldwin <jhb@FreeBSD.org>
618 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
619 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
620 (fbsd_get_siginfo_type): New.
621 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
622 (_initialize_fbsd_tdep): New.
624 2017-07-06 David Blaikie <dblaikie@gmail.com>
626 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
627 a singular dwo_unit*) to support multiple CUs in the same way that
628 multiple TUs are supported.
629 (create_cus_hash_table): Replace create_dwo_cu with a function for
630 parsing multiple CUs from a DWO file.
631 (open_and_init_dwo_file): Use create_cus_hash_table rather than
633 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
634 htab_find, rather than comparing the signature to a singleton CU in
637 2017-07-06 Pedro Alves <palves@redhat.com>
639 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
641 2017-07-04 Pedro Alves <palves@redhat.com>
643 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
644 * gdbtypes.h (TYPE_STATIC): Delete.
645 (struct fn_field) <is_public, is_abstract, is_static, is_final,
646 is_synchronized, is_native>: Delete.
648 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
649 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
650 (TYPE_FN_FIELD_ABSTRACT): Delete.
652 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
654 * buffer.h (buffer_finish): Fix spelling mistakes.
656 2017-07-01 Eli Zaretskii <eliz@gnu.org>
658 * .dir-locals.el: Automatically switch to C-style comments in
659 versions of Emacs that support the feature.
661 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
662 Pedro Alves <palves@redhat.com>
665 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
666 (process_next_line): New variable 'inline_cmd'.
667 Adjust 'if' clauses for "python", "compile" and "guile" to use
668 'command_name_equals' and check for '!inline_cmd'.
670 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
673 * cli/cli-script.c (command_name_equals_not_inline): New function.
674 (process_next_line): Adjust 'if' clauses for "python", "compile"
675 and "guile" to use command_name_equals_not_inline.
677 2017-06-29 Pedro Alves <palves@redhat.com>
679 * completer.c (expression_completer): Call
680 linespec_location_completer instead of location_completer.
682 2017-06-29 Pedro Alves <palves@redhat.com>
684 * completer.c (expression_completer): Remove code that recomputes
687 2017-06-29 Yao Qi <yao.qi@linaro.org>
689 * regformats/regdat.sh: Generate code with
690 "ifndef IN_PROCESS_AGENT".
692 2017-06-28 Pedro Alves <palves@redhat.com>
694 * command.h: Include "common/scoped_restore.h".
696 2017-06-28 Yao Qi <yao.qi@linaro.org>
698 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
699 instead of obstack_grow.
701 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
704 * symfile.c (reread_symbols): Call objfiles_changed just before
707 2017-06-27 Pedro Alves <palves@redhat.com>
709 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
710 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
711 (completion_list_add_symbol, completion_list_add_msymbol):
712 ... these new functions.
713 (add_symtab_completions)
714 (default_make_symbol_completion_list_break_on_1): Adjust.
716 2017-06-27 Pedro Alves <palves@redhat.com>
718 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
719 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
720 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
722 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
723 'storage_obstack' field an auto_obstack. In-class initialize all
724 non-bitfield fields. Make minsyms_read bool.
725 * symfile.c (read_symbols): Adjust.
727 2017-06-27 Alan Hayward <alan.hayward@arm.com>
729 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
730 (gdbsim_store_register): Likewise.
732 2017-06-27 Pedro Alves <palves@redhat.com>
734 * c-exp.y (name_obstack): Now an auto_obstack.
735 (yylex): Use auto_obstack::clear.
736 (c_parse): Use auto_obstack::clear instead of reinitializing and
738 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
739 * d-exp.y (name_obstack): Now an auto_obstack.
740 (yylex): Use auto_obstack::clear.
741 (d_parse): Use auto_obstack::clear instead of reinitializing and
743 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
745 * dwarf2read.c (create_addrmap_from_index)
746 (dwarf2_build_psymtabs_hard)
747 (update_enumeration_type_from_children): Likewise.
748 * gdb_obstack.h (auto_obstack): New type.
749 * go-exp.y (name_obstack): Now an auto_obstack.
750 (build_packaged_name): Use auto_obstack::clear.
751 (go_parse): Use auto_obstack::clear instead of reinitializing and
753 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
755 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
756 * rust-exp.y (work_obstack): Now an auto_obstack.
757 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
758 reinitializing and freeing the obstack.
759 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
760 (host_char_to_target): Use auto_obstack.
761 * utils.h (make_cleanup_obstack_free): Delete declaration.
762 * valprint.c (generic_emit_char, generic_printstr): Use
765 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
767 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
769 (darwin_init_thread_list): Don't update dummy thread.
770 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
772 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
774 * record-full.c (netorder16): Remove.
776 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
778 * common/diagnostics.h: Define macros for GCC.
779 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
780 * common/vec.h: Include diagnostics.h.
781 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
782 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
785 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
787 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
789 * ada-lex.l: Ignore deprecated register warnings.
791 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
793 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
794 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
796 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
798 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
801 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
803 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
805 2017-06-23 Alan Hayward <alan.hayward@arm.com>
807 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
808 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
809 (xtensa_register_read_masked): Likewise.
811 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
813 * common/environ.c (gdb_environ::unset): Update comment.
815 2017-06-22 Alan Hayward <alan.hayward@arm.com>
817 * python/py-unwind.c (pyuw_sniffer): Allocate space for
820 2017-06-22 Alan Hayward <alan.hayward@arm.com>
822 * record-full.c (record_full_exec_insn): Use byte_vector.
824 2017-06-22 Yao Qi <yao.qi@linaro.org>
826 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
827 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
829 2017-06-22 Alan Hayward <alan.hayward@arm.com>
831 * remote.c (cached_reg): Move from here...
832 * regcache.h (cached_reg): ...to here.
833 * python/py-unwind.c (struct reg_info): Remove.
834 (cached_frame_info): Use cached_reg_t.
835 (pyuw_prev_register): Likewise.
836 (pyuw_sniffer): Use cached_reg_t and allocate registers.
837 (pyuw_dealloc_cache): Free all registers.
839 2017-06-22 Pedro Alves <palves@redhat.com>
840 Simon Marchi <simon.marchi@ericsson.com>
842 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
844 * common/diagnostics.h: New file.
846 2017-06-22 Pedro Alves <palves@redhat.com>
848 * common/agent.h: Add include guards.
850 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
852 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
853 talk about addressable units instead of bytes.
855 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
857 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
858 of '::const_iterator'.
860 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
862 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
863 'unittests/environ-selftests.c'.
864 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
865 * charset.c (find_charset_names): Declare object 'iconv_env'.
866 Update code to use 'iconv_env' object. Remove call to
868 * common/environ.c: Include <utility>.
869 (make_environ): Delete function.
870 (free_environ): Delete function.
871 (gdb_environ::clear): New function.
872 (gdb_environ::operator=): New function.
873 (gdb_environ::get): Likewise.
874 (environ_vector): Delete function.
875 (set_in_environ): Delete function.
876 (gdb_environ::set): New function.
877 (unset_in_environ): Delete function.
878 (gdb_environ::unset): New function.
879 (gdb_environ::envp): Likewise.
880 * common/environ.h: Include <vector>.
881 (struct gdb_environ): Delete; transform into...
882 (class gdb_environ): ... this class.
883 (free_environ): Delete prototype.
884 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
885 environ_vector): Likewise.
886 * infcmd.c (run_command_1): Update code to call
887 'envp' from 'gdb_environ' class.
888 (environment_info): Update code to call methods from 'gdb_environ'
890 (unset_environment_command): Likewise.
891 (path_info): Likewise.
892 (path_command): Likewise.
893 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
894 (inferior::inferior): Initialize 'environment' using the host's
896 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
898 (class inferior) <environment>: Change type from 'struct
899 gdb_environ' to 'gdb_environ'.
900 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
901 methods from 'gdb_environ' class.
902 * solib.c (solib_find_1): Likewise
903 * unittests/environ-selftests.c: New file.
905 2017-06-20 Yao Qi <yao.qi@linaro.org>
907 * features/i386/i386-linux.xml: Exchange the order of including
908 32bit-linux.xml and 32bit-sse.xml.
909 * features/i386/i386-linux.c: Regenerated.
911 2017-06-20 Yao Qi <yao.qi@linaro.org>
913 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
914 Delete copy ctor and assignment operator.
915 (tdesc_type): Likewise.
916 (tdesc_feature): Likewise.
917 (tdesc_free_reg): Remove.
918 (tdesc_create_reg): Use new.
919 (tdesc_free_type): Remove.
920 (tdesc_create_vector): Use new.
921 (tdesc_create_union): Likewise.
922 (tdesc_create_flags): Likewise.
923 (tdesc_create_enum): Likewise.
924 (tdesc_free_feature): Delete.
925 (free_target_description): Use delete.
927 2017-06-19 John Baldwin <jhb@FreeBSD.org>
929 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
932 2017-06-19 Pedro Alves <palves@redhat.com>
934 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
937 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
939 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
940 gdb_environ to access an environment variable.
942 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
944 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
947 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
949 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
951 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
953 * configure: Re-generate.
954 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
956 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
958 * configure: Re-generate.
959 * warning.m4: Pass -Werror to compiler when checking for
960 supported warning flags.
962 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
964 * Makefile.in (COMPILE.pre): Add "-x c++".
966 2017-06-16 Alan Hayward <alan.hayward@arm.com>
967 Pedro Alves <palves@redhat.com>
968 Yao Qi <yao.qi@linaro.org>
970 * defs.h (RequireLongest): New.
971 (extract_integer): Declare function template.
972 (extract_signed_integer): Remove the declaration, but define it
974 (extract_unsigned_integer): Likewise.
975 (store_integer): Declare function template.
976 (store_signed_integer): Remove the declaration, but define it
978 (store_unsigned_integer): Likewise.
979 * findvar.c (extract_integer): New function template.
980 (extract_signed_integer): Remove.
981 (extract_unsigned_integer): Remove.
982 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
984 (store_integer): New function template.
985 (store_signed_integer): Remove.
986 (store_unsigned_integer): Remove.
987 (store_integer): Explicit instantiations.
988 * regcache.c (regcache_raw_read_signed): Update.
989 (regcache::raw_read): New function.
990 (regcache::raw_read_signed): Remove.
991 (regcache::raw_read_unsigned): Remove.
992 (regcache_raw_read_unsigned): Update.
993 (regcache_raw_write_unsigned): Update.
994 (regcache::raw_write_signed): Remove.
995 (regcache::raw_write): New function.
996 (regcache_cooked_read_signed): Update.
997 (regcache::raw_write_unsigned): Remove.
998 (regcache::cooked_read_signed): Remove.
999 (regcache_cooked_read_unsigned): Update.
1000 (regcache::cooked_read_unsigned): Remove.
1001 (regcache_cooked_write_signed): Update.
1002 (regcache_cooked_write_unsigned): Update.
1003 * regcache.h (regcache) <raw_read_signed>: Remove.
1004 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
1005 <raw_read, raw_write>: New.
1006 <cooked_read_signed, cooked_write_signed>: Remove.
1007 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
1008 <cooked_read, cooked_write>: New.
1009 * sh64-tdep.c (sh64_pseudo_register_read): Update.
1010 (sh64_pseudo_register_write): Update.
1012 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
1014 * arc-tdep.c (arc_disassembler_options): New variable.
1015 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
1016 of default_print_insn.
1017 (arc_delayed_print_insn): Set info->section when needed,
1018 use default_print_insn to retrieve a disassembler.
1020 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
1023 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
1024 to mention $SHELL and startup-with-shell.
1026 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1028 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
1030 2017-06-14 Yao Qi <yao.qi@linaro.org>
1032 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
1033 default_print_insn instead of print_insn_aarch64.
1034 * arm-tdep.c (gdb_print_insn_arm): Call
1035 default_print_insn instead of print_insn_big_arm
1036 and print_insn_little_arm.
1037 * i386-tdep.c (i386_print_insn): Call default_print_insn
1038 instead of print_insn_i386.
1039 * ia64-tdep.c (ia64_print_insn): Call
1040 default_print_insn instead of print_insn_ia64.
1041 * mips-tdep.c (gdb_print_insn_mips): Call
1042 default_print_insn instead of print_insn_big_mips
1043 and print_insn_little_mips.
1044 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
1045 instead of print_insn_spu.
1047 2017-06-14 Pedro Alves <palves@redhat.com>
1049 * ada-lang.c: Include "common/byte-vector.h".
1050 (ada_value_primitive_packed_val): Use gdb::byte_vector.
1051 * charset.c (wchar_iterator::iterate): Resize the vector instead
1053 * common/byte-vector.h: Include "common/def-vector.h".
1054 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
1055 * cli/cli-dump.c: Include "common/byte-vector.h".
1056 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
1057 * common/byte-vector.h: New file.
1058 * common/def-vector.h: New file.
1059 * common/default-init-alloc.h: New file.
1060 * dwarf2loc.c: Include "common/byte-vector.h".
1061 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
1062 instead of reserving it.
1063 * dwarf2read.c: Include "common/byte-vector.h".
1064 (data_buf::m_vec): Now a gdb::byte_vector.
1065 * gdb_regex.c: Include "common/def-vector.h".
1066 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
1067 * mi/mi-main.c: Include "common/byte-vector.h".
1068 (mi_cmd_data_read_memory): Use gdb::byte_vector.
1069 * printcmd.c: Include "common/byte-vector.h".
1070 (print_scalar_formatted): Use gdb::byte_vector.
1071 * valprint.c: Include "common/byte-vector.h".
1072 (maybe_negate_by_bytes, print_decimal_chars): Use
1075 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1077 * darwin-nat.c: Include "nat/fork-inferior.h".
1079 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1081 * configure.nat: Factor out Darwin bits that are not
1082 architecture-specific. Add fork-inferior.o.
1084 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1086 * configure.nat: Factor out AIX bits that are not
1087 architecture-specific. Add fork-inferior.o.
1089 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1091 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
1092 (read_pieced_value, write_pieced_value): ...here. Reduce to
1093 wrappers that just call rw_pieced_value.
1095 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1097 * dwarf2loc.c (write_pieced_value): When writing the data for a
1098 memory piece, use write_memory_with_notification instead of
1101 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1103 * valops.c (read_value_memory): Change embedded_offset to
1104 represent a bit offset instead of a byte offset.
1105 * value.h (read_value_memory): Adjust comment.
1107 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1109 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
1110 dest_offset_bits and source_offset_bits.
1111 (write_pieced_value): Likewise.
1113 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1115 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
1116 given by DW_OP_bit_piece.
1117 (write_pieced_value): Likewise.
1119 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1121 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
1122 some other preparations to the places where sufficient information
1124 (write_pieced_value): Likewise.
1126 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1128 * dwarf2loc.c (bits_to_bytes): New function.
1129 (read_pieced_value): Fix offset calculations for register pieces
1130 on big-endian targets.
1131 (write_pieced_value): Likewise.
1133 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1135 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
1136 (write_pieced_value): Likewise.
1138 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1140 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
1141 transfer the source value's least significant bits, instead of its
1142 lowest-addressed ones. Rename type_len to max_offset.
1143 (read_pieced_value): Mirror above changes to write_pieced_value as
1146 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1148 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
1149 truncate full bytes from dest_offset_bits before using it as an
1150 offset into the buffer.
1152 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1154 * dwarf2loc.c (write_pieced_value): Include transfer size in
1157 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1159 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
1160 calculation of this_size.
1162 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1164 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
1165 when targeting a bit-field.
1166 (write_pieced_value): Likewise.
1168 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1170 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
1171 (allocate_piece_closure): Drop addr_size parameter.
1172 (dwarf2_evaluate_loc_desc_full): Adjust call to
1173 allocate_piece_closure.
1175 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1178 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
1179 the LSB end, independent of endianness.
1181 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1183 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
1186 2017-06-13 Yao Qi <yao.qi@linaro.org>
1188 * mips-linux-nat.c: Move include features/mips*-linux.c to
1190 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
1191 to mips-linux-tdep.c.
1192 * mips-linux-tdep.c: Include features/mips*-linux.c
1193 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
1195 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
1196 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
1197 (tdesc_mips64_dsp_linux): Declare.
1199 2017-06-12 Tom Tromey <tom@tromey.com>
1201 * valprint.h (val_print_type_code_int): Remove.
1202 * valprint.c (generic_val_print_int): Always call
1203 val_print_scalar_formatted.
1204 (val_print_type_code_int): Remove.
1205 * printcmd.c (print_scalar_formatted): Handle options->format==0.
1206 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
1207 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
1208 * ada-valprint.c (ada_val_print_num): Use
1209 val_print_scalar_formatted.
1211 2017-06-12 Tom Tromey <tom@tromey.com>
1213 * printcmd.c (print_scalar_formatted): Unify the two switches.
1214 Don't convert scalars to LONGEST.
1216 2017-06-12 Tom Tromey <tom@tromey.com>
1219 * valprint.h (print_decimal_chars): Update.
1220 * valprint.c (maybe_negate_by_bytes): New function.
1221 (print_decimal_chars): Add "is_signed" argument.
1222 * printcmd.c (print_scalar_formatted): Update.
1224 2017-06-12 Tom Tromey <tom@tromey.com>
1227 * valprint.h (print_binary_chars, print_hex_chars): Update.
1228 * valprint.c (val_print_type_code_int): Update.
1229 (print_binary_chars): Add "zero_pad" argument.
1230 (emit_octal_digit): New function.
1231 (print_octal_chars): Don't zero-pad.
1232 (print_decimal_chars): Likewise.
1233 (print_hex_chars): Add "zero_pad" argument.
1234 * sh64-tdep.c (sh64_do_fp_register): Update.
1235 * regcache.c (regcache::dump): Update.
1236 * printcmd.c (print_scalar_formatted): Update.
1237 * infcmd.c (default_print_one_register_info): Update.
1239 2017-06-12 Pedro Alves <palves@redhat.com>
1240 Alan Hayward <alan.hayward@arm.com>
1242 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
1243 (mips_eabi_push_dummy_call): Rename local 'regsize' to
1244 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
1245 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
1246 Assert that abi_regsize bytes fit in 'ref_valbuf'.
1248 2017-06-12 Pedro Alves <palves@redhat.com>
1250 * dwarf2read.c (mapped_symtab::data): Now a vector of
1251 symtab_index_entry instead of vector of
1252 std::unique_ptr<symtab_index_entry>. All users adjusted to check
1253 whether an element's name is NULL instead of checking whether the
1254 element itself is NULL.
1255 (find_slot): Change return type. Adjust.
1256 (hash_expand, , add_index_entry, uniquify_cu_indices)
1257 (write_hash_table): Adjust.
1259 2017-06-12 Pedro Alves <palves@redhat.com>
1261 * dwarf2read.c (recursively_count_psymbols): New function.
1262 (write_psymtabs_to_index): Call it to compute number of psyms and
1263 pass estimate size of psyms_seen to unordered_set's ctor.
1265 2017-06-12 Pedro Alves <palves@redhat.com>
1267 * dwarf2read.c (write_hash_table): Check if key already exists
1270 2017-06-12 Pedro Alves <palves@redhat.com>
1272 * dwarf2read.c (data_buf::append_space): Rename to...
1273 (data_buf::grow): ... this, and make private. Adjust all callers.
1274 (data_buf::append_uint): New method.
1275 (add_address_entry, write_one_signatured_type)
1276 (write_psymtabs_to_index): Use it.
1278 2017-06-12 Pedro Alves <palves@redhat.com>
1280 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
1281 (file_write (FILE *, const std::vector<Elem>&)): Delete.
1282 (data_buf::file_write): Call ::fwrite directly.
1284 2017-06-12 Pedro Alves <palves@redhat.com>
1286 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
1289 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1291 Code cleanup: C++ify .gdb_index producer.
1292 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
1293 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
1294 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
1295 (create_strtab, add_string): Remove.
1296 (file_write, data_buf): New.
1297 (struct symtab_index_entry): Use std::vector for cu_indices.
1298 (struct mapped_symtab): Use std::vector for data.
1299 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
1300 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
1302 (find_slot): Change return type. Update it to the new data structures.
1303 (hash_expand, add_index_entry): Update it to the new data structures.
1304 (offset_type_compare): Remove.
1305 (uniquify_cu_indices): Update it to the new data structures.
1306 (c_str_view, c_str_view_hasher, vector_hasher): New.
1307 (add_indices_to_cpool): Remove.
1308 (write_hash_table): Update it to the new data structures.
1309 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
1310 (eq_psymtab_cu_index): Remove.
1311 (psym_index_map): New typedef.
1312 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
1313 reference and std::unordered_map for cu_index_htab.
1314 (add_address_entry, add_address_entry_worker, write_address_map)
1315 (write_psymbols): Update it to the new data structures.
1316 (write_obstack): Remove.
1317 (struct signatured_type_index_data): Change types_list to a data_buf
1318 reference and psyms_seen to a std::unordered_set reference.
1319 (write_one_signatured_type, recursively_write_psymbols)
1320 (write_psymtabs_to_index): Update it to the new data structures.
1322 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
1324 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
1325 separate-debug-file commands.
1326 * symfile.h (separate_debug_file_debug): New global.
1327 * symfile.c (separate_debug_file_debug): New global.
1328 (separate_debug_file_exists, find_separate_debug_file): Add
1330 (_initialize_symfile): Add "set debug separate-debug-file"
1332 * build-id.c (build_id_to_debug_bfd,
1333 find_separate_debug_file_by_buildid): Add debug output.
1335 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1337 * gdbarch.sh (displaced_step_free_closure): Remove.
1338 * gdbarch.h, gdbarch.c: Re-generate.
1339 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
1340 displaced_step_free_closure.
1341 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
1342 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
1343 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1344 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
1345 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1346 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
1347 * arch-utils.h (simple_displaced_step_free_closure): Remove.
1348 * arch-utils.c (simple_displaced_step_free_closure): Remove.
1349 * infrun.c (displaced_step_clear): Call xfree instead of
1350 gdbarch_displaced_step_free_closure.
1352 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
1354 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
1357 2017-06-08 Alan Hayward <alan.hayward@arm.com>
1359 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
1360 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
1361 (mn10300_push_dummy_call): Likewise.
1363 2017-06-08 Alan Hayward <alan.hayward@arm.com>
1365 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
1367 2017-06-08 Alan Hayward <alan.hayward@arm.com>
1369 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
1371 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1373 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
1374 able to start inferiors using a shell.
1375 (New remote packets): Announce new packet "QStartupWithShell".
1376 * remote.c: Add PACKET_QStartupWithShell.
1377 (extended_remote_create_inferior): Handle new
1378 PACKET_QStartupWithShell.
1379 (remote_protocol_features) <QStartupWithShell>: New entry for
1380 PACKET_QStartupWithShell.
1381 (_initialize_remote): Call "add_packet_config_cmd" for
1384 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1385 Pedro Alves <palves@redhat.com>
1387 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
1388 and "nat/fork-inferior.h".
1389 * common/common-inferior.h: New file, with contents from
1391 * commom/common-utils.c: Include "common-utils.h".
1392 (stringify_argv): New function.
1393 * common/common-utils.h (stringify_argv): New prototype.
1394 * configure.nat: Add "fork-inferior.o" as a dependency for
1395 "*linux*", "fbsd*" and "nbsd*" hosts.
1396 * corefile.c (get_exec_file): Update comment.
1397 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
1398 instead of "startup_inferior".
1399 (darwin_create_inferior): Call "add_thread_silent" after
1401 * fork-child.c: Cleanup unnecessary includes.
1402 (SHELL_FILE): Move to "common/common-fork-child.c".
1403 (environ): Likewise.
1404 (exec_wrapper): Initialize.
1405 (get_exec_wrapper): New function.
1406 (breakup_args): Move to "common/common-fork-child.c"; rename to
1407 "breakup_args_for_exec".
1408 (escape_bang_in_quoted_argument): Move to
1409 "common/common-fork-child.c".
1410 (saved_ui): New variable.
1411 (prefork_hook): New function.
1412 (postfork_hook): Likewise.
1413 (postfork_child_hook): Likewise.
1414 (gdb_startup_inferior): Likewise.
1415 (fork_inferior): Move to "common/common-fork-child.c". Update
1416 function to support gdbserver.
1417 (startup_inferior): Likewise.
1418 * gdbcore.h (get_exec_file): Remove declaration.
1419 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
1420 instead of "startup_inferior". Call "add_thread_silent" after
1422 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
1423 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
1424 instead of "startup_inferior". Call "add_thread_silent" after
1426 * inferior.h: Include "common-inferior.h".
1427 (trace_start_error): Move to "common/common-utils.h".
1428 (trace_start_error_with_name): Likewise.
1429 (fork_inferior): Move prototype to "nat/fork-inferior.h".
1430 (startup_inferior): Likewise.
1431 (gdb_startup_inferior): New prototype.
1432 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
1433 * nat/fork-inferior.h: New file.
1434 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
1435 instead of "startup_inferior". Call "add_thread_silent" after
1437 * target.h (target_terminal_init): Move prototype to
1439 (target_terminal_inferior): Likewise.
1440 (target_terminal_ours): Likewise.
1441 * target/target.h (target_terminal_init): New prototype, moved
1443 (target_terminal_inferior): Likewise.
1444 (target_terminal_ours): Likewise.
1445 * utils.c (gdb_flush_out_err): New function.
1447 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1449 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
1450 * common/common-gdbthread.h: New file, with parts from
1452 * gdbthread.h: Include "common-gdbthread.h".
1453 (switch_to_thread): Moved to "common/common-gdbthread.h".
1455 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1457 * Makefile.in (SFILES): Add "common/job-control.c".
1458 (HFILES_NO_SRCDIR): Add "common/job-control.h".
1459 (COMMON_OBS): Add "job-control.o".
1460 * common/job-control.c: New file, with contents from
1462 * common/job-control.h: New file, with contents from "terminal.h".
1463 * fork-child.c: Include "job-control.h".
1464 * inflow.c: Include "job-control.h".
1465 (gdb_setpgid): Move to "common/common-inflow.c".
1466 (_initialize_inflow): Move setting of "job_control" to
1467 "handle_job_control".
1468 * terminal.h (job_control): Moved to "common/common-terminal.h".
1469 (gdb_setpgid): Likewise.
1470 * top.c: Include "job_control.h".
1471 * utils.c: Likewise.
1472 (job_control): Moved to "job-control.c".
1474 2017-06-07 Pedro Alves <palves@redhat.com>
1476 * Makefile.in (SFILES): Add gdb_regex.c.
1477 (COMMON_OBS): Add gdb_regex.o.
1478 * ada-lang.c (ada_add_standard_exceptions)
1479 (ada_add_exceptions_from_frame, name_matches_regex)
1480 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
1481 parameter type to compiled_regex. Adjust.
1482 (ada_exceptions_list): Use compiled_regex.
1483 * break-catch-throw.c (exception_catchpoint::pattern): Now a
1484 std::unique_ptr<compiled_regex>.
1485 (exception_catchpoint::~exception_catchpoint): Remove regfree
1487 (check_status_exception_catchpoint): Adjust to use compiled_regex.
1488 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
1489 * breakpoint.c (solib_catchpoint::compiled): Now a
1490 std::unique_ptr<compiled_regex>.
1491 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
1492 (check_status_catch_solib): Adjust to use compiled_regex.
1493 (add_solib_catchpoint): Adjust to use compiled_regex.
1494 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
1495 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
1496 compiled_regex reference. Adjust to use it.
1497 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
1498 declaration. Include "gdb_regex.h".
1499 (apropos_cmd): Change regex parameter to compiled_regex reference.
1500 * gdb_regex.c: New file.
1501 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
1503 (class compiled_regex): New.
1504 * linux-tdep.c: Include "common/gdb_optional.h".
1505 (struct mapping_regexes): New, factored out from
1506 mapping_is_anonymous_p, and adjusted to use compiled_regex.
1507 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
1508 gdb::optional and remove cleanups. Adjust to compiled_regex.
1509 * probe.c: Include "common/gdb_optional.h".
1510 (collect_probes): Use compiled_regex and gdb::optional and remove
1512 * skip.c: Include "common/gdb_optional.h".
1513 (skiplist_entry::compiled_function_regexp): Now a
1514 gdb::optional<compiled_regex>.
1515 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
1516 (free_skiplist_entry): Remove regfree call.
1517 (compile_skip_regexp, skip_rfunction_p): Adjust to use
1518 compiled_regex and gdb::optional.
1519 * symtab.c: Include "common/gdb_optional.h".
1520 (search_symbols): Use compiled_regex and gdb::optional.
1521 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
1522 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
1525 2017-06-07 Alan Hayward <alan.hayward@arm.com>
1527 * regcache.c (regcache::save): Avoid buffer use.
1528 (regcache::dump): Likewise.
1530 2017-06-07 Alan Hayward <alan.hayward@arm.com>
1532 * sh-tdep.c (sh_pseudo_register_read): Remove
1534 (sh_pseudo_register_write): Likewise.
1535 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
1536 (sh64_pseudo_register_write): Likewise
1538 2017-06-07 Alan Hayward <alan.hayward@arm.com>
1540 * aarch64-tdep.c (aarch64_store_return_value): Use
1542 (aarch64_pseudo_read_value): Likewise.
1543 (aarch64_pseudo_write): Likewise.
1545 2017-06-06 Yao Qi <yao.qi@linaro.org>
1547 * regformats/regdef.h (set_register_cache): Remove the
1550 2017-06-06 Alan Hayward <alan.hayward@arm.com>
1552 * frame.c (frame_unwind_register_signed): Use
1553 frame_unwind_register_value.
1555 2017-06-06 Pedro Alves <palves@redhat.com>
1557 PR breakpoints/21553
1558 * breakpoint.c (create_breakpoints_sal_default)
1559 (init_breakpoint_sal, create_breakpoint_sal): Use
1560 gdb::unique_xmalloc_ptr for string parameters.
1561 (create_breakpoint): Constify 'extra_string' and 'cond_string'
1562 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
1563 (base_breakpoint_create_breakpoints_sal)
1564 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
1565 (strace_marker_create_breakpoints_sal)
1566 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
1568 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
1569 gdb::unique_xmalloc_ptr for string parameters.
1570 (create_breakpoint): Constify 'extra_string' and 'cond_string'
1573 2017-06-06 Alan Hayward <alan.hayward@arm.com>
1575 * alpha-tdep.c (alpha_register_to_value): Use
1576 get_frame_register_value.
1577 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
1579 2017-06-06 Alan Hayward <alan.hayward@arm.com>
1581 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
1582 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
1583 (ia64_value_to_register): Likewise.
1584 (ia64_extract_return_value): Likewise.
1585 (ia64_store_return_value): Likewise.
1586 (ia64_push_dummy_call): Likewise.
1588 2017-06-04 Joel Brobecker <brobecker@adacore.com>
1592 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
1594 * x86-linux-nat.c (struct arch_lwp_info): Remove.
1596 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
1598 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
1600 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
1602 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
1604 * event-loop.c (poll_timers): Unallocate timer using delete
1607 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
1609 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
1610 (struct breakpoint) <~breakpoint>: New.
1611 (struct watchpoint): Inherit from breakpoint.
1614 (struct tracepoint): Inherit from breakpoint.
1616 * breakpoint.c (longjmp_breakpoint_ops): Remove.
1617 (struct longjmp_breakpoint): Inherit from breakpoint.
1618 <~longjmp_breakpoint>: New.
1620 (new_breakpoint_from_type): Remove casts.
1621 (watchpoint_in_thread_scope): Remove reference to base field.
1622 (watchpoint_del_at_next_stop): Likewise.
1623 (update_watchpoint): Likewise.
1624 (watchpoint_check): Likewise.
1625 (bpstat_check_watchpoint): Likewise.
1626 (set_longjmp_breakpoint): Likewise.
1627 (struct fork_catchpoint): Inherit from breakpoint.
1629 (struct solib_catchpoint): Inherit from breakpoint.
1630 <~solib_catchpoint>: New.
1632 (dtor_catch_solib): Change to ...
1633 (solib_catchpoint::~solib_catchpoint): ... this.
1634 (breakpoint_hit_catch_solib): Remove reference to base field.
1635 (add_solib_catchpoint): Likewise.
1636 (create_fork_vfork_event_catchpoint): Likewise.
1637 (struct exec_catchpoint): Inherit from breakpoint.
1638 <~exec_catchpoint>: New.
1640 (dtor_catch_exec): Change to ...
1641 (exec_catchpoint::~exec_catchpoint): ... this.
1642 (dtor_watchpoint): Change to ...
1643 (watchpoint::~watchpoint): ... this.
1644 (watch_command_1): Remove reference to base field.
1645 (catch_exec_command_1): Likewise.
1646 (base_breakpoint_dtor): Change to ...
1647 (breakpoint::~breakpoint): ... this.
1648 (base_breakpoint_ops): Remove dtor field value.
1649 (longjmp_bkpt_dtor): Change to ...
1650 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
1651 (strace_marker_create_breakpoints_sal): Remove reference to base
1653 (delete_breakpoint): Don't manually call breakpoint destructor.
1654 (create_tracepoint_from_upload): Remove reference to base field.
1655 (trace_pass_set_count): Likewise.
1656 (initialize_breakpoint_ops): Don't initialize
1657 momentary_breakpoint_ops, don't set dtors.
1658 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
1659 <~ada_catchpoint>: New.
1661 (create_excep_cond_exprs): Remove reference to base field.
1662 (dtor_exception): Change to ...
1663 (ada_catchpoint::~ada_catchpoint): ... this.
1664 (dtor_catch_exception): Remove.
1665 (dtor_catch_exception_unhandled): Remove.
1666 (dtor_catch_assert): Remove.
1667 (create_ada_exception_catchpoint): Remove reference to base
1669 (initialize_ada_catchpoint_ops): Don't set dtors.
1670 * break-catch-sig.c (struct signal_catchpoint): Inherit from
1672 <~signal_catchpoint>: New.
1674 (signal_catchpoint_dtor): Change to ...
1675 (signal_catchpoint::~signal_catchpoint): ... this.
1676 (create_signal_catchpoint): Remove reference to base field.
1677 (initialize_signal_catchpoint_ops): Don't set dtor.
1678 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
1680 <~syscall_catchpoint>: New.
1682 (dtor_catch_syscall): Change to ...
1683 (syscall_catchpoint::~syscall_catchpoint): ... this.
1684 (create_syscall_event_catchpoint): Remove reference to base
1686 (initialize_syscall_catchpoint_ops): Don't set dtor.
1687 * break-catch-throw.c (struct exception_catchpoint): Inherit
1689 <~exception_catchpoint>: New.
1691 (dtor_exception_catchpoint): Change to ...
1692 (exception_catchpoint::~exception_catchpoint): ... this.
1693 (handle_gnu_v3_exceptions): Remove reference to base field.
1694 (initialize_throw_catchpoint_ops): Don't set dtor.
1695 * ctf.c (ctf_get_traceframe_address): Remove reference to base
1697 * remote.c (remote_get_tracepoint_status): Likewise.
1698 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
1699 * tracefile.c (tracefile_fetch_registers): Likewise.
1700 * tracepoint.c (actions_command): Likewise.
1701 (validate_actionline): Likewise.
1702 (tfind_1): Likewise.
1703 (get_traceframe_location): Likewise.
1704 (find_matching_tracepoint_location): Likewise.
1705 (parse_tracepoint_status): Likewise.
1706 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
1708 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
1710 * breakpoint.c (struct longjmp_breakpoint): New struct.
1711 (is_tracepoint_type): Change return type to bool.
1712 (is_longjmp_type): New function.
1713 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
1714 (set_raw_breakpoint_without_location): Use
1715 new_breakpoint_from_type.
1716 (set_raw_breakpoint): Likewise.
1718 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
1720 * breakpoint.c (new_breakpoint_from_type): New function.
1721 (create_breakpoint_sal): Use new_breakpoint_from_type and
1723 (create_breakpoint): Likewise.
1725 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
1727 * memattr.c (mem_info_command): Rename to ...
1728 (info_mem_command): ... this.
1729 (mem_enable_command): Rename to ...
1730 (enable_mem_command): ... this.
1731 (mem_disable_command): Rename to ...
1732 (disable_mem_command): ... this.
1733 (mem_delete_command): Rename to ...
1734 (delete_mem_command): ... this.
1735 (_initialize_mem): Adjust function names.
1737 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
1739 * btrace.c (handle_pt_insn_events): New.
1740 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
1741 STATUS. Split into this and ...
1742 (handle_pt_insn_event_flags): ... this.
1744 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
1746 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
1747 and struct pt_insn.resynced.
1748 * configure: Regenerated.
1749 * config.in: Regenerated.
1751 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1753 * btrace.c (ftrace_find_call_by_number): New function.
1754 (ftrace_new_function): Store objects, not pointers.
1755 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
1756 ftrace_new_gap, ftrace_update_function,
1757 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
1758 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
1759 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
1760 btrace_ends_with_single_insn, btrace_call_get): Account for
1761 btrace_thread_info::functions now storing objects.
1762 * btrace.h (struct btrace_thread_info): Add constructor.
1763 (struct btrace_thread_info) <functions>: Make std::vector.
1764 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
1765 Initialize with default values.
1766 * record-btrace.c (record_btrace_frame_sniffer): Account for
1767 btrace_thread_info::functions now storing objects.
1769 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1771 * btrace.c: Remove typedef bfun_s.
1772 (ftrace_new_gap): Directly add gaps to the list of gaps.
1773 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
1774 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
1775 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
1778 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1780 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
1781 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
1782 with btrace_thread_info::next_segment and
1783 btrace_thread_info::prev_segment.
1784 * btrace.h: Remove struct btrace_func_link.
1785 (struct btrace_function): Replace pair of function segment pointers
1786 with pair of indices.
1787 * python/py-record-btrace.c (btpy_call_prev_sibling,
1788 btpy_call_next_sibling): Replace references to
1789 btrace_thread_info::segment with btrace_thread_info::next_segment and
1790 btrace_thread_info::prev_segment.
1791 * record-btrace.c (record_btrace_frame_this_id): Use
1792 btrace_find_call_by_number.
1794 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1796 * btrace.c (ftrace_new_function, ftrace_fixup_level,
1797 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
1798 btrace_insn_next, btrace_insn_prev): Remove references to
1799 btrace_thread_info::flow.
1800 * btrace.h (struct btrace_function): Remove FLOW.
1802 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1804 * btrace.c (ftrace_find_call_by_number): New function.
1805 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
1806 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
1807 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
1808 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
1810 * btrace.h (struct btrace_function): Turn UP into an index.
1811 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
1813 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
1814 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
1815 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
1817 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1819 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
1820 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
1821 ftrace_update_function, ftrace_compute_global_level_offset,
1822 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
1823 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
1824 btrace_insn_end, btrace_is_empty): Remove references to
1825 btrace_thread_info::begin and btrace_thread_info::end.
1826 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
1827 (struct btrace_thread_info) <functions>: Adjust comment.
1828 * record-btrace.c (record_btrace_start_replaying): Remove reference to
1829 btrace_thread_info::begin.
1831 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1833 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
1834 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
1835 ftrace_update_function): Remove arguments that implicitly were always
1837 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
1838 Don't pass BTINFO->END.
1840 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1842 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
1843 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
1844 btrace_find_insn_by_number): Replace function segment pointer with
1846 (btrace_insn_cmp): Simplify.
1847 * btrace.h: (struct btrace_insn_iterator) Rename index to
1848 insn_index. Replace function segment pointer with index into function
1850 * record-btrace.c (record_btrace_call_history): Replace function
1851 segment pointer use with index.
1852 (record_btrace_frame_sniffer): Retrieve function call segment through
1854 (record_btrace_set_replay): Remove defunc't safety check.
1856 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1858 * btrace.c (btrace_ends_with_single_insn): New function.
1859 (btrace_call_get, btrace_call_number, btrace_call_begin,
1860 btrace_call_end, btrace_call_next, btrace_call_prev,
1861 btrace_find_call_by_number): Use index into call segment vector
1863 (btrace_call_cmp): Simplify.
1864 * btrace.h (struct btrace_call_iterator): Replace function call segment
1865 pointer with index into vector.
1866 * record-btrace.c (record_btrace_call_history): Use index instead of
1869 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1871 * btrace.c (btrace_insn_begin, btrace_insn_end,
1872 btrace_find_insn_by_number): Add btinfo to iterator.
1873 * btrace.h (struct btrace_insn_iterator): Add btinfo.
1875 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1877 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
1878 and save pointers directly.
1879 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
1880 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
1881 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
1882 changed signature of functions.
1883 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
1884 (btrace_fetch): Remove code that adds btrace_function pointers to
1885 vector of btrace_functions.
1886 (btrace_clear): Simplify freeing vector of btrace_functions.
1888 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1890 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
1891 Replace VEC_* with std::vector functions.
1892 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
1893 (struct btrace_thread_info)<functions>: Change type to std::vector.
1895 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
1897 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
1898 "Removed targets and native configurations" up. Merge duplicate
1899 "New commands" sub-sections. Add "New options" sub-sections.
1901 2017-05-26 Alan Hayward <alan.hayward@arm.com>
1903 * defs.h (copy_integer_to_size): New declaration.
1904 * findvar.c (copy_integer_to_size): New function.
1905 (do_cint_test): New selftest function.
1906 (copy_integer_to_size_test): Likewise.
1907 (_initialize_findvar): Likewise.
1908 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
1909 (mips_fbsd_collect_reg): Use raw_collect_integer.
1910 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
1911 (mips64_fill_gregset): Use raw_collect_integer
1912 (mips64_fill_fpregset): Use raw_supply_integer.
1913 * regcache.c (regcache::raw_supply_integer): New function.
1914 (regcache::raw_collect_integer): Likewise.
1915 * regcache.h: (regcache::raw_supply_integer): New declaration.
1916 (regcache::raw_collect_integer): Likewise.
1918 2017-05-24 Yao Qi <yao.qi@linaro.org>
1920 * Makefile.in (SFILES): Add gdbarch-selftests.c.
1921 (COMMON_OBS): Add gdbarch-selftests.o.
1922 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
1923 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
1924 * gdbarch-selftests.c: New file.
1925 * regcache.h (regcache) <~regcache>: Mark it virtual if
1927 <raw_write>: Likewise.
1929 2017-05-24 Yao Qi <yao.qi@linaro.org>
1931 * regcache.c (current_regcache): Change it to
1932 regcache::current_regcache.
1933 (regcache_observer_target_changed): Update.
1934 (regcache_thread_ptid_changed): Make it a regcache static
1936 (regcache_thread_ptid_changed): Update.
1937 (class regcache_access): New.
1938 (current_regcache_test): Update.
1939 (_initialize_regcache): Update.
1940 * regcache.h: Include forward_list.
1941 (regcache): Declare regcache_thread_ptid_changed and declare
1942 registers_changed_ptid as friend.
1944 2017-05-24 Yao Qi <yao.qi@linaro.org>
1946 * i387-tdep.c (i387_register_to_value): Use register_size
1947 instead of TYPE_LENGTH.
1948 * m68k-tdep.c (m68k_register_to_value): Likewise.
1950 2017-05-24 Yao Qi <yao.qi@linaro.org>
1952 * i387-tdep.c (i387_convert_register_p): Return false if type
1953 code isn't TYPE_CODE_FLT.
1955 2017-05-24 Yao Qi <yao.qi@linaro.org>
1957 * alpha-tdep.c (alpha_convert_register_p): Return true if type
1959 (alpha_register_to_value): Remove type length check.
1960 (alpha_value_to_register): Likewise.
1962 2017-05-24 Yao Qi <yao.qi@linaro.org>
1964 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
1967 2017-05-24 Yao Qi <yao.qi@linaro.org>
1969 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
1970 TYPE_CODE_FLT or not.
1972 2017-05-24 Yao Qi <yao.qi@linaro.org>
1974 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
1975 * avr-tdep.c (avr_gdbarch_init): Likewise.
1976 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1977 * cris-tdep.c (cris_gdbarch_init): Likewise.
1978 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1979 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1980 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1981 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
1982 * mep-tdep.c (mep_gdbarch_init): Likewise.
1983 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1984 * mips-tdep.c (mips_gdbarch_init): Likewise.
1985 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1986 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1987 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1988 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1989 * v850-tdep.c (v850_gdbarch_init): Likewise.
1991 2017-05-24 Yao Qi <yao.qi@linaro.org>
1993 * selftest-arch.c (tests_with_arch): Call registers_changed
1994 and reinit_frame_cache.
1995 * selftest.c (run_self_tests): Likewise.
1997 2017-05-24 Yao Qi <yao.qi@linaro.org>
1999 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
2000 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
2002 2017-05-24 Yao Qi <yao.qi@linaro.org>
2004 * rl78-tdep.c (rl78_gdbarch_init): Don't call
2005 set_gdbarch_print_insn.
2007 2017-05-24 Yao Qi <yao.qi@linaro.org>
2009 * h8300-tdep.c (h8300_gdbarch_init): Don't call
2010 set_gdbarch_print_insn.
2012 2017-05-24 Yao Qi <yao.qi@linaro.org>
2014 * alpha-tdep.c (alpha_gdbarch_init): Don't call
2015 set_gdbarch_print_insn.
2016 * arc-tdep.c (arc_gdbarch_init): Likewise.
2017 * arch-utils.c: include dis-asm.h.
2018 (default_print_insn): New function.
2019 * arch-utils.h (default_print_insn): Declare.
2020 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
2021 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2022 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
2023 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
2024 * frv-tdep.c (frv_gdbarch_init): Likewise.
2025 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2026 * gdbarch.sh (print_insn): Use default_print_insn.
2027 * gdbarch.c: Regenerated.
2028 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
2029 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
2030 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2031 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
2032 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2033 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
2034 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
2035 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
2036 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
2037 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2038 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2039 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2040 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2041 * mt-tdep.c (mt_gdbarch_init): Likewise.
2042 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2043 * nios2-tdep.c (nios2_print_insn): Remove.
2044 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
2045 * rx-tdep.c (rx_gdbarch_init): Likewise.
2046 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2047 * score-tdep.c (score_print_insn): Remove.
2048 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
2049 * sh-tdep.c (sh_gdbarch_init): Likewise.
2050 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2051 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2052 * tic6x-tdep.c (tic6x_print_insn): Remove.
2053 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
2054 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
2055 * v850-tdep.c (v850_gdbarch_init): Likewise.
2056 * vax-tdep.c (vax_gdbarch_init): Likewise.
2057 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
2058 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
2060 2017-05-23 John Baldwin <jhb@FreeBSD.org>
2062 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
2063 (MIPS_FP0_REGNUM): Remove.
2064 (MIPS_FSR_REGNUM): Remove.
2065 (mips_fbsd_supply_fpregs): Use mips_regnum.
2066 (mips_fbsd_supply_gregs): Likewise.
2067 (mips_fbsd_collect_fpregs): Likewise.
2068 (mips_fbsd_collect_gregs): Likewise.
2070 2017-05-23 John Baldwin <jhb@FreeBSD.org>
2072 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
2073 (getpfpregs_supplies): New function.
2074 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
2076 (mips_fbsd_store_inferior_registers): Likewise.
2078 2017-05-22 Pedro Alves <palves@redhat.com>
2080 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
2083 2017-05-22 Alan Hayward <alan.hayward@arm.com>
2085 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
2086 (store_register): Likewise.
2087 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
2088 (get_decimal_float_return_value): Likewise.
2089 (do_ppc_sysv_return_value): Likewise.
2090 (ppc64_sysv_abi_push_integer): Likewise.
2091 (ppc64_sysv_abi_push_freg): Likewise.
2092 (ppc64_sysv_abi_return_value_base): Likewise.
2093 (ppc64_sysv_abi_return_value): Likewise.
2094 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
2095 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
2096 * rs6000-nat.c: Likewise.
2097 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
2098 (rs6000_value_to_register): Likewise.
2099 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
2101 2017-05-21 Tom Tromey <tom@tromey.com>
2104 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
2105 arrays as "[T]", not "[T; ]".
2107 2017-05-19 Tom Tromey <tom@tromey.com>
2110 * rust-lang.c (exp_descriptor_rust): New function.
2111 (rust_language_defn): Use it.
2112 * p-lang.c (pascal_language_defn): Update.
2113 * opencl-lang.c (opencl_language_defn): Update.
2114 * objc-lang.c (objc_language_defn): Update.
2115 * m2-lang.c (m2_language_defn): Update.
2116 * language.h (struct language_defn)
2117 <la_watch_location_expression>: New member.
2118 * language.c (unknown_language_defn, auto_language_defn)
2119 (local_language_defn): Update.
2120 * go-lang.c (go_language_defn): Update.
2121 * f-lang.c (f_language_defn): Update.
2122 * d-lang.c (d_language_defn): Update.
2123 * c-lang.h (c_watch_location_expression): Declare.
2124 * c-lang.c (c_watch_location_expression): New function.
2125 (c_language_defn, cplus_language_defn, asm_language_defn)
2126 (minimal_language_defn): Use it.
2127 * breakpoint.c (watch_command_1): Call
2128 la_watch_location_expression.
2129 * ada-lang.c (ada_language_defn): Update.
2131 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2134 * gdb_curses.h (NOMACROS): Define.
2135 (NCURSES_NOMACROS): Define.
2137 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2140 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
2142 * tui/tui-wingeneral.c (box_win): Likewise.
2143 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
2144 (tui_show_source_line): Likewise.
2145 (tui_show_exec_info_content): Likewise.
2147 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
2149 * sparc-tdep.c (sparc_structure_return_p)
2150 (sparc_arg_on_registers_p): New functions.
2151 (sparc32_store_arguments): Use them.
2152 * sparc64-tdep.c (sparc64_16_byte_align_p)
2153 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
2154 Handle TYPE_CODE_ARRAY.
2156 2017-05-17 Yao Qi <yao.qi@linaro.org>
2158 * cli/cli-decode.c (add_alias_cmd): New function.
2159 * command.h (add_alias_cmd): Declare.
2160 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
2161 instead call add_alias_cmd.
2163 2017-05-17 Pedro Alves <palves@redhat.com>
2165 * Makefile.in (nat_extra_makefile_frag): Rename to ...
2166 (nat_makefile_frag): ... this. All references updated.
2167 * configure.ac: Likewise.
2168 * configure.nat: Likewise. Enhance comments.
2169 * configure: Regenerate.
2171 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2173 * procfs.c (procfs_create_inferior): Change prototype to match
2176 2017-05-13 Eli Zaretskii <eliz@gnu.org>
2178 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
2179 C++ compiler warning.
2181 2017-05-12 Tom Tromey <tom@tromey.com>
2184 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
2185 recurse, just call value_struct_elt directly.
2187 2017-05-12 Tom Tromey <tom@tromey.com>
2189 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
2190 OP_RUST_ARRAY>: Fix.
2192 2017-05-12 Tom Tromey <tom@tromey.com>
2194 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
2196 2017-05-09 Yao Qi <yao.qi@linaro.org>
2198 * regcache.c: Include <forward_list>.
2199 (struct regcache_list): Remove.
2200 (current_regcache): Update.
2201 (get_thread_arch_aspace_regcache): Update for std::forward_list.
2202 (regcache_thread_ptid_changed): Likewise.
2203 (registers_changed_ptid): Likewise.
2204 (current_regcache_size): Likewise.
2206 2017-05-09 Yao Qi <yao.qi@linaro.org>
2208 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
2209 (current_regcache_size): New function.
2210 (current_regcache_test): New function.
2211 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
2213 2017-05-08 Alan Hayward <alan.hayward@arm.com>
2215 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
2216 (print_gp_register_row): Use get_frame_register_value.
2218 2017-05-08 Alan Hayward <alan.hayward@arm.com>
2220 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
2221 (mips_supply_fpregset): Likewise.
2222 (mips64_supply_gregset): Likewise.
2224 2017-05-08 Alan Hayward <alan.hayward@arm.com>
2226 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
2227 regcache->raw_supply_zeroed.
2229 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2231 * configure.nat: Rearrange 'case' statements to match
2234 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2236 * Makefile.in: Remove "@host_makefile_frag@". Add variables
2237 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
2238 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
2239 "@nat_extra_makefile_frag@".
2240 (Makefile): Remove dependency on "@frags@".
2241 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
2242 (data-directory/Makefile): Likewise.
2243 * config/aarch64/linux.mh: Deleted; moved contents to
2244 "gdb/configure.nat".
2245 * config/alpha/alpha-linux.mh: Likewise.
2246 * config/alpha/nbsd.mh: Likewise.
2247 * config/arm/linux.mh: Likewise.
2248 * config/arm/nbsdelf.mh: Likewise.
2249 * config/i386/cygwin.mh: Likewise.
2250 * config/i386/cygwin64.mh: Likewise.
2251 * config/i386/darwin.mh: Likewise.
2252 * config/i386/fbsd.mh: Likewise.
2253 * config/i386/fbsd64.mh: Likewise.
2254 * config/i386/go32.mh: Likewise.
2255 * config/i386/i386gnu.mh: Likewise.
2256 * config/i386/i386sol2.mh: Likewise.
2257 * config/i386/linux.mh: Likewise.
2258 * config/i386/linux64.mh: Likewise.
2259 * config/i386/mingw.mh: Likewise.
2260 * config/i386/mingw64.mh: Likewise.
2261 * config/i386/nbsd64.mh: Likewise.
2262 * config/i386/nbsdelf.mh: Likewise.
2263 * config/i386/nto.mh: Likewise.
2264 * config/i386/obsd.mh: Likewise.
2265 * config/i386/obsd64.mh: Likewise.
2266 * config/i386/sol2-64.mh: Likewise.
2267 * config/ia64/linux.mh: Likewise.
2268 * config/m32r/linux.mh: Likewise.
2269 * config/m68k/linux.mh: Likewise.
2270 * config/m68k/nbsdelf.mh: Likewise.
2271 * config/m68k/obsd.mh: Likewise.
2272 * config/m88k/obsd.mh: Likewise.
2273 * config/mips/fbsd.mh: Likewise.
2274 * config/mips/linux.mh: Likewise.
2275 * config/mips/nbsd.mh: Likewise.
2276 * config/mips/obsd64.mh: Likewise.
2277 * config/pa/linux.mh: Likewise.
2278 * config/pa/nbsd.mh: Likewise.
2279 * config/pa/obsd.mh: Likewise.
2280 * config/powerpc/aix.mh: Likewise.
2281 * config/powerpc/fbsd.mh: Likewise.
2282 * config/powerpc/linux.mh: Likewise.
2283 * config/powerpc/nbsd.mh: Likewise.
2284 * config/powerpc/obsd.mh: Likewise.
2285 * config/powerpc/ppc64-linux.mh: Likewise.
2286 * config/powerpc/spu-linux.mh: Likewise.
2287 * config/s390/linux.mh: Likewise.
2288 * config/sh/nbsd.mh: Likewise.
2289 * config/sparc/fbsd.mh: Likewise.
2290 * config/sparc/linux.mh: Likewise.
2291 * config/sparc/linux64.mh: Likewise.
2292 * config/sparc/nbsd64.mh: Likewise.
2293 * config/sparc/nbsdelf.mh: Likewise.
2294 * config/sparc/obsd64.mh: Likewise.
2295 * config/sparc/sol2.mh: Likewise.
2296 * config/tilegx/linux.mh: Likewise.
2297 * config/vax/nbsdelf.mh: Likewise.
2298 * config/vax/obsd.mh: Likewise.
2299 * config/xtensa/linux.mh: Likewise.
2300 * config/i386/i386gnu.mn: New file, with excerpts from
2301 "config/i386/i386gnu.mh".
2302 * configure: Regenerate.
2303 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
2304 *.mh files under "gdb/config".
2305 * configure.nat: New file, with contents from the
2306 "gdb/config/*/*.mh" files.
2308 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
2310 * btrace.c (btrace_clear): Free insn vector.
2312 2017-05-05 Pedro Alves <palves@redhat.com>
2314 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
2315 * configure: Regenerate.
2317 2017-05-04 Pedro Alves <palves@redhat.com>
2319 * Makefile.in (SFILES): Add progspace-and-thread.c.
2320 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
2321 (COMMON_OBS): Add progspace-and-thread.o.
2322 * breakpoint.c: Include "progspace-and-thread.h".
2323 (update_inserted_breakpoint_locations)
2324 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
2325 Use scoped_restore_current_pspace_and_thread.
2326 (create_std_terminate_master_breakpoint): Use
2327 scoped_restore_current_program_space.
2328 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
2329 (print_breakpoint_location): Use
2330 scoped_restore_current_program_space.
2331 (bp_loc_is_permanent): Use
2332 scoped_restore_current_pspace_and_thread.
2333 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
2334 (download_tracepoint_locations): Use
2335 scoped_restore_current_pspace_and_thread.
2336 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
2337 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
2338 (enum step_over_calls_kind): Moved from inferior.h.
2339 (class scoped_restore_current_thread): New class.
2340 * gdbthread.h (make_cleanup_restore_current_thread): Delete
2342 (scoped_restore_current_thread): New class.
2343 * infcmd.c: Include "common/gdb_optional.h".
2344 (continue_1, proceed_after_attach): Use
2345 scoped_restore_current_thread.
2346 (notice_new_inferior): Use scoped_restore_current_thread.
2347 * inferior.c: Include "progspace-and-thread.h".
2348 (restore_inferior, save_current_inferior): Delete.
2349 (add_inferior_command, clone_inferior_command): Use
2350 scoped_restore_current_pspace_and_thread.
2351 * inferior.h (scoped_restore_current_inferior): New class.
2352 * infrun.c: Include "progspace-and-thread.h" and
2353 "common/gdb_optional.h".
2354 (follow_fork_inferior): Use
2355 scoped_restore_current_pspace_and_thread.
2356 (scoped_restore_exited_inferior): New class.
2357 (handle_vfork_child_exec_or_exit): Use
2358 scoped_restore_exited_inferior,
2359 scoped_restore_current_pspace_and_thread,
2360 scoped_restore_current_thread and scoped_restore.
2361 (fetch_inferior_event): Use scoped_restore_current_thread.
2362 * linespec.c (decode_line_full, decode_line_1): Use
2363 scoped_restore_current_program_space.
2364 * mi/mi-main.c: Include "progspace-and-thread.h".
2365 (exec_continue): Use scoped_restore_current_thread.
2366 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
2367 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
2368 * proc-service.c (ps_pglobal_lookup): Use
2369 scoped_restore_current_program_space.
2370 * progspace-and-thread.c: New file.
2371 * progspace-and-thread.h: New file.
2372 * progspace.c (release_program_space, clone_program_space): Use
2373 scoped_restore_current_program_space.
2374 (restore_program_space, save_current_program_space)
2375 (save_current_space_and_thread): Delete.
2376 (switch_to_program_space_and_thread): Moved to
2377 progspace-and-thread.c.
2378 * progspace.h (save_current_program_space)
2379 (save_current_space_and_thread): Delete declarations.
2380 (scoped_restore_current_program_space): New class.
2381 * remote.c (remote_btrace_maybe_reopen): Use
2382 scoped_restore_current_thread.
2383 * symtab.c: Include "progspace-and-thread.h".
2384 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
2385 * thread.c (print_thread_info_1): Use
2386 scoped_restore_current_thread.
2387 (struct current_thread_cleanup): Delete.
2388 (do_restore_current_thread_cleanup)
2389 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
2390 (scoped_restore_current_thread::~scoped_restore_current_thread):
2392 (make_cleanup_restore_current_thread): Rename/convert to ...
2393 (scoped_restore_current_thread::scoped_restore_current_thread):
2395 (thread_apply_all_command): Use scoped_restore_current_thread.
2396 (thread_apply_command): Use scoped_restore_current_thread.
2397 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
2398 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
2400 2017-05-04 Pedro Alves <palves@redhat.com>
2402 * thread.c (make_cleanup_restore_current_thread): Move
2403 find_thread_ptid call before the is_stopped call. Assert that the
2404 thread is found. Replace is_stopped call by checking the thread's
2405 state directly. Remove unnecessary NULL-thread check.
2407 2017-05-04 Pedro Alves <palves@redhat.com>
2409 * corelow.c (thread_section_name): New class.
2410 (get_core_register_section, get_core_siginfo): Use it.
2412 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2414 * corelow.c (sniff_core_bfd): Remove extra semicolon.
2415 (get_core_register_section): Remove xfree of NULL pointer.
2417 2017-05-03 Alan Hayward <alan.hayward@arm.com>
2419 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
2420 * regcache.c (regcache::raw_supply_zeroed): New function.
2421 * regcache.h (regcache::raw_supply_zeroed): New declaration.
2423 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
2425 * gdbarch.sh: Remove commented out definition of
2427 * gdbarch.h: Re-generate.
2429 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2431 * configure: Regenerate.
2433 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
2435 * solib-target.c (solib_target_relocate_section_addresses):
2436 Remove num_section_bases, num_bases, segment_bases variables.
2438 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2440 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
2442 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2444 * solib-target.c: Include <vector>
2445 (struct lm_info_target) <~lm_info_target>: Remove.
2446 <segment_bases, section_bases>: Change type to
2447 std::vector<CORE_ADDR>.
2448 (library_list_start_segment, library_list_start_section,
2449 library_list_end_library,
2450 solib_target_relocate_section_addresses): Adjust.
2452 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2454 * gdbarch.sh (software_single_step): Change return type to
2455 std::vector<CORE_ADDR>.
2456 * gdbarch.c, gdbarch.h: Re-generate.
2457 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
2459 (arm_deal_with_atomic_sequence_raw): Adjust.
2460 (thumb_get_next_pcs_raw): Adjust.
2461 (arm_get_next_pcs_raw): Adjust.
2462 (arm_get_next_pcs): Adjust.
2463 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
2464 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
2465 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
2466 (alpha_software_single_step): Adjust.
2467 * alpha-tdep.h (alpha_software_single_step): Adjust.
2468 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
2469 * arm-tdep.c (arm_software_single_step): Adjust.
2470 (arm_breakpoint_kind_from_current_state): Adjust.
2471 * arm-tdep.h (arm_software_single_step): Adjust.
2472 * breakpoint.c (insert_single_step_breakpoint): Adjust.
2473 * cris-tdep.c (cris_software_single_step): Adjust.
2474 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
2475 (micromips_deal_with_atomic_sequence): Adjust.
2476 (deal_with_atomic_sequence): Adjust.
2477 (mips_software_single_step): Adjust.
2478 * mips-tdep.h (mips_software_single_step): Adjust.
2479 * moxie-tdep.c (moxie_software_single_step): Adjust.
2480 * nios2-tdep.c (nios2_software_single_step): Adjust.
2481 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
2482 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
2483 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
2484 * s390-linux-tdep.c (s390_software_single_step): Adjust.
2485 * sparc-tdep.c (sparc_software_single_step): Adjust.
2486 * spu-tdep.c (spu_software_single_step): Adjust.
2487 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
2489 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2491 * gdbarch.sh: Use semi-colon as field separator instead of colon.
2492 * gdbarch.h: Re-generate.
2494 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2496 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
2497 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
2498 * python/py-instruction.c, python/py-instruction.h: New file.
2499 * python/py-record.c: Add py-instruction.h include.
2500 (gdbpy_initialize_record): Make gdb.Instruction a super class of
2501 gdb.RecordInstruction.
2502 * python/python-internal.h: Add gdbpy_initialize_instruction
2504 * python/python.c (do_start_initialization): Add
2505 gdbpy_initialize_instruction.
2507 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2509 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
2511 (btrace_func_from_recpy_func): New function.
2512 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
2513 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
2514 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
2515 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
2516 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
2517 Also, use new helper functions.
2518 (btpy_list_item): Use new helper functions.
2519 (recpy_bt_function_call_history): Use new type name.
2520 (btpy_call_getset): Remove.
2521 (gdbpy_initialize_btrace): Remove code to initialize
2522 gdb.BtraceFunctionCall.
2523 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
2524 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
2525 recpy_bt_func_prev, recpy_bt_func_next): New export.
2526 * python/py-record.c (recpy_func_type): New static object.
2527 (recpy_func_new, recpy_func_level, recpy_func_symbol,
2528 recpy_func_instructions, recpy_func_up, recpy_func_prev,
2529 recpy_func_next): New function.
2530 (recpy_element_hash, recpy_element_richcompare): Updated comment.
2531 (recpy_func_getset): New static object.
2532 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
2533 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
2535 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2537 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
2538 (btpy_object, btpy_insn_type, btpy_new): Remove.
2539 (btpy_list_object): Use gdb.RecordInstruction type instead of
2540 gdb.BtraceInstruction type.
2541 (btrace_insn_from_recpy_insn): New function.
2542 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
2544 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
2545 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
2546 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
2547 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
2548 instead of btpy_object.
2549 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2550 btpy_insn_data, btpy_insn_decode): Rename to ...
2551 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
2552 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
2553 recpy_bt_insn_decode): This. Also, use new helper functions.
2554 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
2556 (btpy_insn_getset): Remove.
2557 (gdbpy_initialize_btrace): Remove code to initialize
2558 gdb.BtraceInstruction. Use recpy_element_object.
2559 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
2560 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
2561 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
2562 * python/py-record.c (recpy_insn_type): New static object.
2563 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
2564 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
2565 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
2567 (recpy_insn_getset): New static object.
2568 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
2569 * python/py-record.h (recpy_element_object): New typedef.
2570 (recpy_insn_type, recpy_insn_new): New export.
2572 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2574 * py-record-btrace.c (btpy_insn_new): Removed.
2575 (btpy_insn_or_gap_new): New function.
2576 (btpy_insn_error): Removed.
2577 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2578 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
2579 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
2580 btpy_insn_or_gap_new instead of btpy_insn_new.
2581 (btpy_insn_getset): Remove btpy_insn_error.
2582 * py-record.c (recpy_gap_type): New static object.
2583 (recpy_gap_object): New typedef.
2584 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
2585 recpy_gap_reason_string): New function.
2586 (recpy_gap_getset): New static object.
2587 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
2588 * py-record.h (recpy_gap_new): New export.
2590 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2592 * python/py-record.c (recpy_ptid): Remove.
2593 (recpy_record_getset): Remove recpy_ptid.
2595 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2597 * btrace.c (btrace_fetch): Set inferior_ptid.
2598 * python/py-record-btrace.c: Add "py-record.h" include.
2599 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
2600 recpy_bt_end, recpy_bt_instruction_history,
2601 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
2602 in gdb.Record object instead of current ptid.
2603 * python/py-record.c: Include new "py-record.h" file.
2604 (recpy_record_object): Moved to py-record.h.
2605 * python/py-record.h: New file.
2607 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2609 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
2610 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
2613 2017-05-01 Joel Brobecker <brobecker@adacore.com>
2615 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
2616 the past maintainers section.
2618 2017-04-28 Yao Qi <yao.qi@linaro.org>
2620 * infcmd.c (get_return_value): Use regcache ctor, and remove
2623 2017-04-28 Yao Qi <yao.qi@linaro.org>
2624 Pedro Alves <palves@redhat.com>
2626 * regcache.c (regcache::regcache): New tag dispatch ctor.
2627 (do_cooked_read): Moved above.
2628 (regcache_dup): Use the tag dispatch ctor..
2629 * regcache.h (regcache): Declare ctor, delete copy ctor and
2630 assignment operator, remove friend regcache_dup.
2632 2017-04-28 Yao Qi <yao.qi@linaro.org>
2634 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
2635 call method save instead of regcache_cpy.
2636 * regcache.h (struct regcache): Make regcache_dup a friend.
2638 2017-04-28 Yao Qi <yao.qi@linaro.org>
2640 * regcache.c (struct regcache): Move to regcache.h
2641 (regcache::arch): New method.
2642 (regcache_get_ptid): Update.
2643 (get_regcache_arch): Call arch method.
2644 (get_regcache_aspace): Call method aspace.
2645 (register_buffer): Change it to method.
2646 (regcache_save): Change it to regcache::save.
2647 (regcache_restore): Likewise.
2648 (regcache_cpy_no_passthrough): Remove the declaration.
2649 (regcache_cpy): Call methods restore and cpy_no_passthrough.
2650 (regcache_cpy_no_passthrough): Change it to method
2652 (regcache_register_status): Change it to method
2653 get_register_status.
2654 (regcache_invalidate): Change it to method invalidate.
2655 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
2656 (regcache_raw_update): Change it to method raw_update.
2657 (regcache_raw_read): Likewise.
2658 (regcache_raw_read_signed): Likewise.
2659 (regcache_raw_read_unsigned): Likewise.
2660 (regcache_raw_write_signed): Likewise.
2661 (regcache_raw_write_unsigned): Likewise.
2662 (regcache_cooked_read): Likewise.
2663 (regcache_cooked_read_value): Likewise.
2664 (regcache_cooked_read_signed): Likewise.
2665 (regcache_cooked_read_unsigned): Likewise.
2666 (regcache_cooked_write_signed): Likewise.
2667 (regcache_cooked_write_unsigned): Likewise.
2668 (regcache_raw_set_cached_value): Likewise.
2669 (regcache_raw_write): Likewise.
2670 (regcache_cooked_write): Likewise.
2671 (regcache_xfer_part): Likewise.
2672 (regcache_raw_read_part): Likewise.
2673 (regcache_raw_write_part): Likewise.
2674 (regcache_cooked_read_part): Likewise.
2675 (regcache_cooked_write_part): Likewise.
2676 (regcache_raw_supply): Likewise.
2677 (regcache_raw_collect): Likewise.
2678 (regcache_transfer_regset): Likewise.
2679 (regcache_supply_regset): Likewise.
2680 (regcache_collect_regset): Likewise.
2681 (regcache_debug_print_register): Likewise.
2682 (enum regcache_dump_what): Move it to regcache.h.
2683 (regcache_dump): Change it to method dump.
2684 * regcache.h (enum regcache_dump_what): New.
2685 (class regcache): New.
2686 * target.c (target_fetch_registers): Call method
2687 debug_print_register.
2688 (target_store_registers): Likewise.
2690 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2692 * windows-nat.c (struct lm_info_windows): Initialize field.
2693 (windows_make_so): Allocate lm_info_windows with new.
2694 (windows_free_so): Free lm_info_windows with delete.
2696 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2698 * solib-darwin.c (struct lm_info_darwin): Initialize field.
2699 (darwin_current_sos): Allocate lm_info_darwin with new, remove
2701 (darwin_free_so): Free lm_info_darwin with delete.
2703 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2705 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
2706 <l_addr_p>: Change type to bool.
2707 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
2708 (svr4_free_so): Free lm_info_svr4 with delete.
2709 (svr4_copy_library_list): Replace memcpy with call to copy
2711 (library_list_start_library, svr4_default_sos): Allocate
2712 lm_info_svr4 with new.
2714 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2716 * solib-target.c (struct lm_info_target): Add destructor,
2718 <name>: Change type to std::string.
2719 (library_list_start_library): Allocate lm_info_target with new.
2720 (solib_target_free_library_list): Free lm_info_target with
2722 (solib_target_current_sos): Adapt to std::string.
2723 (solib_target_free_so): Free lm_info_target with delete.
2725 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2727 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
2729 (frv_current_sos): Allocate lm_info_frv with new.
2730 (frv_relocate_main_executable): Free lm_info_frv with delete,
2732 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
2734 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2736 * solib-frv.c (struct lm_info_frv): Fix indentation.
2738 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2740 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
2742 (dsbt_current_sos): Allocate lm_info_dsbt with new.
2743 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
2744 and allocate with new.
2745 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
2747 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2749 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
2750 <filename, member_name>: Change type to std::string.
2751 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
2752 (library_list_start_library): Allocate lm_info_aix with new.
2753 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
2754 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
2755 with copy constructor.
2757 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2759 * solist.h (struct lm_info): Remove.
2760 (struct lm_info_base): New class.
2761 (struct so_list) <lm_info>: Change type to lm_info_base *.
2762 * nto-tdep.c (struct lm_info): Remove.
2764 * solib-aix.c (struct lm_info): Rename to ...
2765 (struct lm_info_aix): ... this. Extend lm_info_base.
2766 (lm_info_p): Rename to ...
2767 (lm_info_aix_p): ... this, and adjust.
2768 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
2769 solib_aix_parse_libraries, library_list_start_library,
2770 solib_aix_free_library_list, solib_aix_parse_libraries,
2771 solib_aix_get_library_list,
2772 solib_aix_relocate_section_addresses, solib_aix_free_so,
2773 solib_aix_get_section_offsets,
2774 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
2776 (struct solib_aix_inferior_data) <library_list>: Adjust.
2777 * solib-darwin.c (struct lm_info): Rename to ...
2778 (struct lm_info_darwin): ... this. Extend lm_info_base.
2779 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
2780 * solib-dsbt.c (struct lm_info): Rename to ...
2781 (struct lm_info_dsbt): ... this. Extend lm_info_base.
2782 (struct dsbt_info) <main_executable_lm_info): Adjust.
2783 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
2784 dsbt_relocate_section_addresses): Adjust.
2785 * solib-frv.c (struct lm_info): Rename to ...
2786 (struct lm_info_frv): ... this. Extend lm_info_base.
2787 (main_executable_lm_info): Adjust.
2788 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
2789 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
2790 find_canonical_descriptor_in_load_object,
2791 frv_fdpic_find_canonical_descriptor): Adjust.
2792 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
2794 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
2795 svr4_clear_so, svr4_copy_library_list,
2796 library_list_start_library, svr4_default_sos, svr4_read_so_list,
2797 svr4_current_sos, svr4_fetch_objfile_link_map,
2798 solist_update_incremental): Adjust.
2799 * solib-svr4.h (struct lm_info_svr4): Move here from
2801 * solib-target.c (struct lm_info): Rename to ...
2802 (struct lm_info_target): ... this. Extend lm_info_base.
2803 (lm_info_p): Rename to ...
2804 (lm_info_target_p): ... this.
2805 (solib_target_parse_libraries, library_list_start_segment,
2806 library_list_start_section, library_list_start_library,
2807 library_list_end_library, solib_target_free_library_list,
2808 solib_target_current_sos, solib_target_free_so,
2809 solib_target_relocate_section_addresses): Adjust.
2810 * windows-nat.c (struct lm_info): Rename to ...
2811 (struct lm_info_windows): ... this. Extend lm_info_base.
2812 (windows_make_so, handle_load_dll, handle_unload_dll,
2813 windows_xfer_shared_libraries): Adjust.
2815 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2817 * solib-darwin.c (struct darwin_so_list): Remove.
2818 (darwin_current_sos): Allocate an so_list object instead of a
2819 darwin_so_list, separately allocate an lm_info object.
2820 (darwin_free_so): Free lm_info.
2822 2017-04-28 John Baldwin <jhb@FreeBSD.org>
2824 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
2825 with fprintf_filtered.
2827 2017-04-28 Yao Qi <yao.qi@linaro.org>
2829 * regcache.c (regcache::regcache): New function.
2830 (regcache::~regcache): New function.
2831 (regcache_xmalloc_1): Remove.
2832 (regcache_xmalloc): Call new regcache.
2833 (regcache_xfree): Call delete regcache.
2834 (get_thread_arch_aspace_regcache): Call new regcache.
2836 2017-04-28 Yao Qi <yao.qi@linaro.org>
2838 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
2839 lwp instead of ptid_get_lwp.
2841 2017-04-28 Yao Qi <yao.qi@linaro.org>
2843 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
2844 lwp_info instead of getting from inferior_ptid.
2846 2017-04-27 Keith Seitz <keiths@redhat.com>
2848 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
2849 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
2850 (CV_CONVERSION_BADNESS): Define.
2851 (rank_one_type): Remove overly restrictive rvalue reference
2853 Add cv-qualifier checks and subranks for type equality.
2854 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
2855 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
2856 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
2858 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
2860 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
2861 count when creating the object.
2863 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2864 Ulrich Weigand <uweigand@de.ibm.com>
2866 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
2867 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
2869 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
2870 (process_xcoff_symbol): Likewise.
2871 (scan_xcoff_symtab): Likewise.
2873 2017-04-26 Alan Hayward <alan.hayward@arm.com>
2875 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
2876 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
2877 (ia64_access_reg): Use get_frame_register_unsigned.
2878 (ia64_access_rse_reg): Likewise.
2879 (ia64_libunwind_frame_prev_register): Likewise.
2881 2017-04-26 Jiong Wang <jiong.wang@arm.com>
2883 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
2884 * gdbarch.c: Regenerated.
2885 * gdbarch.h: Regenerated.
2886 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
2887 visibility external.
2888 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
2889 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
2890 (enum cfa_how_kind): Move to ...
2891 (struct dwarf2_frame_state_reg_info): Likewise.
2892 (struct dwarf2_frame_state): Likewise.
2893 * dwarf2-frame.h: ... here.
2894 (dwarf2_frame_state_alloc_regs): New declaration.
2895 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
2896 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
2898 2017-04-26 Alan Hayward <alan.hayward@arm.com>
2900 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
2901 regcache_raw_read_unsigned.
2902 (xtensa_pseudo_register_write): Likewise.
2904 2017-04-26 Alan Hayward <alan.hayward@arm.com>
2906 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
2907 (nds32_pseudo_register_write): Likewise.
2909 2017-04-25 Yao Qi <yao.qi@linaro.org>
2911 * regcache.c (struct regcache) <readonly_p>: Change its type
2913 (regcache_xmalloc_1): Update parameter type and callers update.
2915 2017-04-25 Yao Qi <yao.qi@linaro.org>
2917 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
2918 set_gdbarch_wchar_bit.
2919 * arm-tdep.c (arm_gdbarch_init): Likewise.
2921 2017-04-25 Pedro Alves <palves@redhat.com>
2923 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
2924 (BothAreRelocatable, memcopy, memmove): Don't define.
2925 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
2928 2017-04-25 Pedro Alves <palves@redhat.com>
2930 * common/common-defs.h: Include "common/poison.h".
2931 * common/function-view.h: (Not, Or, Requires): Move to traits.h
2933 * common/poison.h: New file.
2934 * common/traits.h: Include <type_traits>.
2935 (Not, Or, Requires): New, moved from common/function-view.h.
2937 2017-04-25 Pedro Alves <palves@redhat.com>
2939 * breakpoint.h (struct breakpoint): In-class initialize all
2940 fields. Make boolean fields "bool".
2941 * breakpoint.c (init_raw_breakpoint_without_location): Remove
2942 memset call and initializations no longer necessary.
2944 2017-04-25 Pedro Alves <palves@redhat.com>
2946 * btrace.c (pt_btrace_insn_flags): Change parameter type to
2948 (pt_btrace_insn): New function.
2949 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
2951 2017-04-25 Pedro Alves <palves@redhat.com>
2953 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
2954 "base" field and inherit from "bp_location" instead. Add
2956 (allocate_location_exception): Use new non-default ctor.
2957 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
2958 (init_bp_location): Convert to ...
2959 (bp_location::bp_location): ... this new ctor, and remove memset
2961 (base_breakpoint_allocate_location): Use the new non-default ctor.
2962 * breakpoint.h (bp_location): Now a class. Declare default and
2963 non-default ctors. In-class initialize all members.
2964 (init_bp_location): Remove declaration.
2966 2017-04-25 Pedro Alves <palves@redhat.com>
2968 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
2969 assignment operator.
2971 2017-04-24 Yao Qi <yao.qi@linaro.org>
2973 * doublest.c (convert_doublest_to_floatformat): Call
2974 floatformat_totalsize_bytes.
2976 2017-04-22 Tom Tromey <tom@tromey.com>
2978 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2980 * stack.c (print_frame): Use ui_out_emit_list.
2981 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2983 * mi/mi-main.c (print_one_inferior)
2984 (mi_cmd_data_list_register_names)
2985 (mi_cmd_data_list_register_values, mi_cmd_list_features)
2986 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
2988 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
2989 (mi_output_solib_attribs): Use ui_out_emit_list,
2991 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
2992 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
2993 (mi_cmd_stack_list_args, list_args_or_locals): Use
2995 * disasm.c (do_assembly_only): Use ui_out_emit_list.
2996 * breakpoint.c (print_solib_event, output_thread_groups): Use
2999 2017-04-22 Tom Tromey <tom@tromey.com>
3001 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
3002 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
3003 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
3005 2017-04-22 Tom Tromey <tom@tromey.com>
3007 * tracepoint.c (tvariables_info_1)
3008 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
3010 2017-04-22 Tom Tromey <tom@tromey.com>
3012 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
3013 annotate_arg_emitter.
3014 * breakpoint.c (print_mention_watchpoint)
3015 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
3016 * annotate.h (struct annotate_arg_emitter): New.
3018 2017-04-22 Tom Tromey <tom@tromey.com>
3020 * record-btrace.c (record_btrace_insn_history)
3021 (record_btrace_insn_history_range, record_btrace_call_history)
3022 (record_btrace_call_history_range): Use ui_out_emit_tuple.
3023 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
3025 * stack.c (print_frame_info): Use ui_out_emit_tuple.
3026 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
3027 * skip.c (skip_info): Use ui_out_emit_tuple.
3028 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
3029 * progspace.c (print_program_space): Use ui_out_emit_tuple.
3030 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
3031 * osdata.c (info_osdata): Use ui_out_emit_tuple.
3032 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3034 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
3035 (output_register, mi_cmd_data_read_memory)
3036 (mi_cmd_data_read_memory_bytes, mi_load_progress)
3037 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
3038 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
3039 Use ui_out_emit_tuple.
3040 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
3042 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3043 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
3044 * linux-thread-db.c (info_auto_load_libthread_db): Use
3046 * inferior.c (print_inferior): Use ui_out_emit_tuple.
3047 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
3048 * disasm.c (do_mixed_source_and_assembly_deprecated)
3049 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
3050 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
3051 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
3052 * breakpoint.c (print_one_breakpoint_location)
3053 (print_one_breakpoint): Use ui_out_emit_tuple.
3054 * auto-load.c (print_script, info_auto_load_cmd): Use
3056 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
3058 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
3060 * thread.c (print_thread_info_1): Remove dead code.
3062 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3064 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
3066 * arm-tdep.c (selftests::arm_record_test): Likewise.
3068 2017-04-21 Yao Qi <yao.qi@linaro.org>
3070 * regcache.c (regcache_restore): Remove argument 2. Replace
3071 argument 3 with regcache. Get register status from
3072 src->register_status and get register contents from
3073 register_buffer (src, regnum).
3074 (regcache_cpy): Update.
3076 2017-04-19 Pedro Alves <palves@redhat.com>
3078 * gdbthread.h (thread): Add missing closing parenthesis in
3081 2017-04-19 Pedro Alves <palves@redhat.com>
3083 * common/refcounted-object.h: New file.
3084 * gdbthread.h: Include "common/refcounted-object.h".
3085 (thread_info): Inherit from refcounted_object and add comments.
3086 (thread_info::incref, thread_info::decref)
3087 (thread_info::m_refcount): Delete.
3088 (thread_info::deletable): Use the refcounted_object::refcount()
3090 * inferior.c (current_inferior_): Add comment.
3091 (set_current_inferior): Increment/decrement refcounts.
3092 (prune_inferiors, remove_inferior_command): Skip inferiors marked
3093 not-deletable instead of comparing with the current inferior.
3094 (initialize_inferiors): Increment the initial inferior's refcount.
3095 * inferior.h (struct inferior): Forward declare.
3096 Include "common/refcounted-object.h".
3097 (current_inferior, set_current_inferior): Move declaration to
3098 before struct inferior's definition, and fix comment.
3099 (inferior): Inherit from refcounted_object. Add comments.
3100 * thread.c (switch_to_thread_no_regs): Reference the thread's
3101 inferior pointer directly instead of doing a ptid lookup.
3102 (switch_to_no_thread): New function.
3103 (switch_to_thread(thread_info *)): New function, factored out
3105 (switch_to_thread(ptid_t)): ... this.
3106 (restore_current_thread): Delete.
3107 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
3108 fields, and add 'inf' field.
3109 (do_restore_current_thread_cleanup): Check whether old->inf is
3110 alive instead of looking up an inferior by ptid. Use
3111 switch_to_thread and switch_to_no_thread.
3112 (restore_current_thread_cleanup_dtor): Use old->inf directly
3113 instead of lookup up an inferior by id. Decref the inferior.
3114 Don't restore 'removable'.
3115 (make_cleanup_restore_current_thread): Same the inferior pointer
3116 in old, instead of the inferior number. Incref the inferior.
3117 Don't save/clear 'removable'.
3119 2017-04-19 Pedro Alves <palves@redhat.com>
3121 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3122 unittests/scoped_restore-selftests.c.
3123 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
3124 * common/scoped_restore.h (scoped_restore_base): Make "class".
3125 (scoped_restore_base::release): New public method.
3126 (scoped_restore_base::scoped_restore_base): New protected ctor.
3127 (scoped_restore_base::m_saved_var): New protected field.
3128 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
3129 scoped_restore_base base class instead of m_saved_var directly.
3130 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
3131 (scoped_restore_tmpl::scoped_restore_tmpl(const
3132 scoped_restore_tmpl<T>&)): Likewise.
3133 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
3135 (scoped_restore_tmpl::saved_var): New method.
3136 (scoped_restore_tmpl::m_saved_var): Delete.
3137 * inferior.h (inferior::detaching): Now a bool.
3138 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
3140 * unittests/scoped_restore-selftests.c: New file.
3142 2017-04-19 Pedro Alves <palves@redhat.com>
3144 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
3145 Re-sort in alphabetic order.
3147 2017-04-18 Pedro Alves <palves@redhat.com>
3149 * xml-support.c (obstack_xml_printf): Delete.
3150 * xml-support.h (obstack_xml_printf): Delete.
3152 2017-04-18 Pedro Alves <palves@redhat.com>
3154 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
3155 vdebug, verror, body_text, start_element, end_element, name,
3156 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
3157 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
3158 is_xinclude>: Make private and add m_ prefix.
3159 (gdb_xml_parser::body_text): New method, based on ...
3160 (gdb_xml_body_text): ... this. Adjust.
3161 (gdb_xml_parser::vdebug): New method, based on ...
3162 (gdb_xml_debug): ... this. Adjust.
3163 (gdb_xml_parser::verror): New method, based on ...
3164 (gdb_xml_error): ... this. Adjust.
3165 (gdb_xml_parser::start_element): New method, based on ...
3166 (gdb_xml_start_element): ... this. Adjust.
3167 (gdb_xml_start_element_wrapper): Defer to
3168 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
3169 (gdb_xml_parser::end_element): New method, based on ...
3170 (gdb_xml_end_element_wrapper): ... this. Adjust.
3171 (gdb_xml_parser::~gdb_xml_parser): Adjust.
3172 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
3173 (gdb_xml_parser::use_dtd): New method, based on ...
3174 (gdb_xml_use_dtd): ... this. Adjust.
3175 (gdb_xml_parser::parse): New method, based on ...
3176 (gdb_xml_parse): ... this. Adjust.
3177 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
3178 (xinclude_start_include): Adjust to call the parser's name method.
3179 (xml_xinclude_default, xml_xinclude_start_doctype)
3180 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
3182 (xml_process_xincludes): Adjust to call parser methods.
3183 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
3186 2017-04-18 Pedro Alves <palves@redhat.com>
3188 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
3189 gdb::optional<std::string>.
3190 * xml-support.c: Include <string>.
3191 (scope_level::scope_level(scope_level &&))
3192 (scope_level::~scope_level): Delete.
3193 (scope_level::body): Now a std::string.
3194 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
3195 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
3197 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
3198 (xinclude_parsing_data::output): Now a std::string reference.
3199 (xinclude_start_include): Adjust.
3200 (xml_xinclude_default): Adjust.
3201 (xml_process_xincludes): Add 'output' parameter, and return bool.
3202 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
3204 * xml-tdesc.c: Include <unordered_map> and <string>.
3205 (tdesc_xml_cache): Delete.
3206 (tdesc_xml_cache_s): Delete.
3207 (xml_cache): Now an std::unordered_map.
3208 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
3209 (target_fetch_description_xml): Change return type to
3210 gdb::optional<std::string>, and adjust.
3211 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
3212 (target_fetch_description_xml): Change return type to
3213 gdb::optional<std::string>.
3215 2017-04-18 Pedro Alves <palves@redhat.com>
3217 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3218 unittests/optional-selftests.c.
3219 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
3220 * unittests/optional-selftests.c: New file.
3221 * unittests/optional/assignment/1.cc: New file.
3222 * unittests/optional/assignment/2.cc: New file.
3223 * unittests/optional/assignment/3.cc: New file.
3224 * unittests/optional/assignment/4.cc: New file.
3225 * unittests/optional/assignment/5.cc: New file.
3226 * unittests/optional/assignment/6.cc: New file.
3227 * unittests/optional/assignment/7.cc: New file.
3228 * unittests/optional/cons/copy.cc: New file.
3229 * unittests/optional/cons/default.cc: New file.
3230 * unittests/optional/cons/move.cc: New file.
3231 * unittests/optional/cons/value.cc: New file.
3232 * unittests/optional/in_place.cc: New file.
3233 * unittests/optional/observers/1.cc: New file.
3234 * unittests/optional/observers/2.cc: New file.
3236 2017-04-18 Pedro Alves <palves@redhat.com>
3238 * common/gdb_optional.h: Include common/traits.h.
3239 (in_place_t): New type.
3240 (in_place): New constexpr variable.
3241 (optional::optional): Remove member initialization of
3243 (optional::optional(in_place_t...)): New constructor.
3244 (optional::~optional): Use reset.
3245 (optional::optional(const optional&)): New.
3246 (optional::optional(const optional&&)): New.
3247 (optional::optional(T &)): New.
3248 (optional::optional(T &&)): New.
3249 (operator::operator=(const optional &)): New.
3250 (operator::operator=(optional &&)): New.
3251 (operator::operator= (const T &))
3252 (operator::operator= (T &&))
3253 (operator::emplace (Args &&... args)): Return a T&. Use reset.
3254 (operator::reset): New.
3255 (operator::m_instantiated):: Add in-class initializer.
3256 * common/traits.h: Include <type_traits>.
3257 (struct And): New types.
3259 2017-04-18 Pedro Alves <palves@redhat.com>
3261 * xml-support.c: Include <vector>.
3262 (scope_level::scope_level(const gdb_xml_element *))
3263 (scope_level::scope_level(scope_level&&)): New.
3264 (scope_level::~scope_level): New.
3265 (scope_level_s): Delete.
3266 (gdb_xml_parser::scopes): Now a std::vector.
3267 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
3269 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
3271 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
3272 of the scopes member. Use std::vector::emplace_back.
3274 2017-04-18 Pedro Alves <palves@redhat.com>
3276 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
3278 (gdb_xml_end_element): Change type of first parameter.
3279 (gdb_xml_cleanup): Rename to ...
3280 (gdb_xml_parser::~gdb_xml_parser): ... this.
3281 (gdb_xml_create_parser_and_cleanup): Delete with ...
3282 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
3284 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
3285 using gdb_xml_create_parser_and_cleanup.
3286 (xinclude_parsing_data): Add ctor/dtor.
3287 (xml_xinclude_cleanup): Delete.
3288 (xml_process_xincludes): Create a local xinclude_parsing_data
3289 instead of heap-allocating one. Create a local gdb_xml_parser
3290 instead of heap-allocating one with
3291 gdb_xml_create_parser_and_cleanup.
3293 2017-04-18 John Baldwin <jhb@FreeBSD.org>
3296 * fbsd-nat.c (resume_one_thread_cb): Remove.
3297 (resume_all_threads_cb): Remove.
3298 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
3299 iterate_over_threads.
3301 2017-04-17 Joel Brobecker <brobecker@adacore.com>
3303 * NEWS: Create a new section for the next release branch.
3304 Rename the section of the current branch, now that it has
3307 2017-04-17 Joel Brobecker <brobecker@adacore.com>
3309 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
3310 * version.in: Bump version to 8.0.50.DATE-git.
3312 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
3315 * windows-nat.c (windows_create_inferior): Declare 'allargs'
3316 independently of the host, and fix build breakage on Cygwin.
3318 2017-04-13 Pedro Alves <palves@redhat.com>
3320 * inferior.c (free_inferior): Convert to ...
3321 (inferior::~inferior): ... this dtor.
3322 (inferior::inferior): New ctor, factored out from ...
3323 (add_inferior_silent): ... here. Allocate the inferior with a new
3325 (delete_inferior): Call delete instead of free_inferior.
3326 * inferior.h (gdb_environ, continuation): Forward declare.
3327 (inferior): Now a class. Add in-class initialization to all
3328 members. Make boolean fields bool, except 'detaching'.
3329 (inferior::inferior): New explicit ctor.
3330 (inferior::~inferior): New.
3332 2017-04-13 Pedro Alves <palves@redhat.com>
3334 * inferior.c (init_inferior_list): Delete.
3335 * inferior.h (init_inferior_list): Delete.
3337 2017-04-13 Pedro Alves <palves@redhat.com>
3340 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
3341 (top level): Call it twice, with different thread sets.
3343 2017-04-13 Pedro Alves <palves@redhat.com>
3345 * thread.c: Include <algorithm>.
3346 (thread_array_cleanup): Delete.
3347 (scoped_inc_dec_ref): New class.
3348 (live_threads_count): New function.
3349 (set_thread_refcount): Delete.
3350 (tp_array_compar_ascending): Now a bool.
3351 (tp_array_compar): Convert to a std::sort comparison function.
3352 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
3353 and live_threads_count.
3355 2017-04-13 Pedro Alves <palves@redhat.com>
3357 * infrun.c (follow_fork_inferior): Also switch the current
3360 2017-04-13 Pedro Alves <palves@redhat.com>
3362 * breakpoint.c (watch_command_1): Save watchpoint-frame info
3363 before calling create_internal_breakpoint.
3365 2017-04-13 Pedro Alves <palves@redhat.com>
3367 * fork-child.c (execv_argv): New class.
3368 (breakup_args): Refactored as ...
3369 (execv_argv::init_for_no_shell): .. this method of execv_argv.
3370 Copy arguments to storage and replace separators with NULL
3371 terminators in place.
3372 (escape_bang_in_quoted_argument): Adjust to return bool.
3373 (execv_argv::execv_argv): New ctor.
3374 (execv_argv::init_for_shell): New method, factored out from
3375 fork_inferior. Don't strdup strings into the vector.
3376 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
3377 Remove free_vector_argv call.
3379 2017-04-13 Yao Qi <yao.qi@linaro.org>
3381 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
3384 2017-04-13 Yao Qi <yao.qi@linaro.org>
3386 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
3387 * rx-tdep.c (rx_gdbarch_init): Likewise.
3389 2017-04-13 Pedro Alves <palves@redhat.com>
3391 * breakpoint.h (struct breakpoint): Reindent.
3393 2017-04-13 Pedro Alves <palves@redhat.com>
3395 * breakpoint.c (bp_location): Rename to ...
3396 (bp_locations): ... this. All references updated.
3397 (bp_location_count): Rename to ...
3398 (bp_locations_count): ... this. All references updated.
3399 (bp_location_placed_address_before_address_max): Rename to ...
3400 (bp_locations_placed_address_before_address_max): ... this. All
3402 (bp_location_shadow_len_after_address_max): Rename to ...
3403 (bp_locations_shadow_len_after_address_max): ... this. All
3405 (bp_location_compare_addrs): Rename to ...
3406 (bp_locations_compare_addrs): ... this. All references updated.
3407 (bp_location_compare):Rename to ...
3408 (bp_locations_compare): ... this. All references updated.
3409 (bp_location_target_extensions_update): Rename to ...
3410 (bp_locations_target_extensions_update): ... this. All references
3413 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3415 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
3416 * common/common.m4: Check headers 'termios.h', 'termio.h' and
3418 * common/gdb_termios.h: New file, with parts of "terminal.h".
3419 * inflow.c: Include "gdb_termios.h".
3420 * ser-unix.c: Include "gdb_termios.h".
3421 * terminal.h: Move terminal-related defines to
3422 "common/gdb_termios.h".
3424 2017-04-12 Tom Tromey <tom@tromey.com>
3426 * probe.c (parse_probes): Update.
3427 * location.h (delete_event_location): Don't declare.
3428 (event_location_deleter::operator()): Update.
3429 * location.c (event_location_deleter::operator()): Rename from
3430 delete_event_location.
3431 * linespec.h (linespec_result) <location>: Change type to
3433 * linespec.c (canonicalize_linespec, event_location_to_sals)
3434 (decode_objc): Update.
3435 (linespec_result): Don't call delete_event_location.
3436 * breakpoint.c (create_breakpoints_sal)
3437 (bkpt_probe_create_sals_from_location)
3438 (strace_marker_create_sals_from_location): Update.
3440 2017-04-12 Tom Tromey <tom@tromey.com>
3442 * linespec.h (struct linespec_result): Add constructor and
3444 (init_linespec_result, destroy_linespec_result)
3445 (make_cleanup_destroy_linespec_result): Don't declare.
3446 * linespec.c (init_linespec_result): Remove.
3447 (linespec_result::~linespec_result): Rename from
3448 destroy_linespec_result. Update.
3449 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
3451 * breakpoint.c (create_breakpoint, break_range_command)
3452 (decode_location_default): Update.
3453 * ax-gdb.c (agent_command_1): Update.
3455 2017-04-12 Tom Tromey <tom@tromey.com>
3457 * remote.c (remote_download_tracepoint): Update.
3458 * python/py-breakpoint.c (bppy_get_location): Update.
3459 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
3460 (gdbscm_breakpoint_location): Update.
3461 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
3462 * breakpoint.h (struct breakpoint) <location, location_range_end>:
3463 Change type to event_location_up.
3464 * breakpoint.c (create_overlay_event_breakpoint)
3465 (create_longjmp_master_breakpoint)
3466 (create_std_terminate_master_breakpoint)
3467 (create_exception_master_breakpoint)
3468 (breakpoint_event_location_empty_p, print_breakpoint_location)
3469 (print_one_breakpoint_location, create_thread_event_breakpoint)
3470 (init_breakpoint_sal, create_breakpoint)
3471 (print_recreate_ranged_breakpoint, break_range_command)
3472 (init_ada_exception_breakpoint, say_where): Update.
3473 (base_breakpoint_dtor): Don't call delete_event_location.
3474 (bkpt_print_recreate, tracepoint_print_recreate)
3475 (dprintf_print_recreate, update_static_tracepoint)
3476 (breakpoint_re_set_default): Update.
3478 2017-04-12 Tom Tromey <tom@tromey.com>
3480 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3481 type of "to_do". Update.
3482 (compute_stack_depth): Use std::vector.
3484 2017-04-12 Tom Tromey <tom@tromey.com>
3486 * printcmd.c (find_instruction_backward): Use std::vector.
3488 2017-04-12 Tom Tromey <tom@tromey.com>
3490 * symfile.c (objfilep): Remove typedef.
3491 (reread_symbols): Use a std::vector.
3493 2017-04-12 Tom Tromey <tom@tromey.com>
3495 * mi/mi-main.c (exec_direction_forward): Remove.
3496 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
3497 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3499 * guile/guile.c (guile_repl_command, guile_command)
3500 (gdbscm_execute_gdb_command): Use scoped_restore.
3501 * go-exp.y (go_parse): Use scoped_restore.
3502 * d-exp.y (d_parse): Use scoped_restore.
3503 * cli/cli-decode.c (cmd_func): Use scoped_restore.
3504 * c-exp.y (c_parse): Use scoped_restore.
3506 2017-04-12 Tom Tromey <tom@tromey.com>
3508 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
3509 (mi_parse): Update return type.
3510 (mi_parse_free): Remove.
3511 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
3512 (mi_parse::~mi_parse): Rename from mi_parse_free.
3513 (mi_parse_cleanup): Remove.
3514 (mi_parse): Return a unique_ptr. Use new.
3515 * mi/mi-main.c (mi_execute_command): Update.
3517 2017-04-12 Tom Tromey <tom@tromey.com>
3519 * location.c (explicit_location_lex_one): Return a
3521 (string_to_explicit_location): Update. Remove cleanups.
3523 2017-04-12 Tom Tromey <tom@tromey.com>
3525 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
3526 (compare_value_and_voffset): Change type. Update.
3527 (compute_vtable_size): Change type of "offset_vec".
3528 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
3529 (gnuv3_get_typeid): Remove extraneous declaration.
3531 2017-04-12 Tom Tromey <tom@tromey.com>
3533 * charset.h (wchar_iterator): Fix comment.
3535 2017-04-12 Tom Tromey <tom@tromey.com>
3537 * charset.c (iconv_wrapper): New class.
3538 (cleanup_iconv): Remove.
3539 (convert_between_encodings): Use it.
3541 2017-04-12 Tom Tromey <tom@tromey.com>
3543 * symfile.h (increment_reading_symtab): Update type.
3544 * symfile.c (decrement_reading_symtab): Remove.
3545 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
3546 * psymtab.c (psymtab_to_symtab): Update.
3547 * dwarf2read.c (dw2_instantiate_symtab): Update.
3549 2017-04-12 Tom Tromey <tom@tromey.com>
3551 * jit.c (struct jit_reader): Declare separately. Add constructor
3552 and destructor. Change type of "handle".
3553 (loaded_jit_reader): Define separately.
3554 (jit_reader_load): Update. New "new".
3555 (jit_reader_unload_command): Use "delete".
3556 * gdb-dlfcn.h (struct dlclose_deleter): New.
3557 (gdb_dlhandle_up): New typedef.
3558 (gdb_dlopen, gdb_dlsym): Update types.
3559 (gdb_dlclose): Remove.
3560 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
3561 (gdb_dlsym): Change type of "handle".
3562 (make_cleanup_dlclose): Remove.
3563 (dlclose_deleter::operator()): Rename from gdb_dlclose.
3564 * compile/compile-c-support.c (load_libcc): Update.
3566 2017-04-12 Tom Tromey <tom@tromey.com>
3568 * symtab.h (find_pcs_for_symtab_line): Change return type.
3569 * symtab.c (find_pcs_for_symtab_line): Change return type.
3570 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
3571 type of "vec". Update.
3572 (ltpy_get_pcs_for_line): Update.
3573 * linespec.c (decode_digits_ordinary): Update.
3575 2017-04-12 Tom Tromey <tom@tromey.com>
3577 * tracepoint.c (actions_command): Update.
3578 * python/python.c (python_command, python_interactive_command):
3580 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3581 * guile/guile.c (guile_command): Update.
3582 * defs.h (read_command_lines, read_command_lines_1): Return
3584 (command_lines_deleter): New struct.
3585 (command_line_up): New typedef.
3586 * compile/compile.c (compile_code_command)
3587 (compile_print_command): Update.
3588 * cli/cli-script.h (get_command_line, copy_command_lines): Return
3590 (make_cleanup_free_command_lines): Remove.
3591 * cli/cli-script.c (get_command_line, read_command_lines_1)
3592 (copy_command_lines): Return command_line_up.
3593 (while_command, if_command, read_command_lines, define_command)
3594 (document_command): Update.
3595 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
3597 * breakpoint.h (breakpoint_set_commands): Change type of
3599 * breakpoint.c (breakpoint_set_commands): Change type of
3601 (do_map_commands_command, update_dprintf_command_list)
3602 (create_tracepoint_from_upload): Update.
3604 2017-04-12 Tom Tromey <tom@tromey.com>
3606 * tracepoint.c (scope_info): Update.
3607 * spu-tdep.c (spu_catch_start): Update.
3608 * python/python.c (gdbpy_decode_line): Update.
3609 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
3610 * python/py-breakpoint.c (bppy_init): Update.
3611 * probe.c (parse_probes): Update.
3612 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
3613 * location.h (event_location_deleter): New struct.
3614 (event_location_up): New typedef.
3615 (new_linespec_location, new_address_location, new_probe_location)
3616 (new_explicit_location, copy_event_location)
3617 (string_to_event_location, string_to_event_location_basic)
3618 (string_to_explicit_location): Update return type.
3619 (make_cleanup_delete_event_location): Remove.
3620 * location.c (new_linespec_location, new_address_location)
3621 (new_probe_location, new_explicit_location, copy_event_location):
3622 Return event_location_up.
3623 (delete_event_location_cleanup)
3624 (make_cleanup_delete_event_location): Remove.
3625 (string_to_explicit_location, string_to_event_location_basic)
3626 (string_to_event_location): Return event_location_up.
3627 * linespec.c (canonicalize_linespec, event_location_to_sals)
3628 (decode_line_with_current_source)
3629 (decode_line_with_last_displayed, decode_objc): Update.
3630 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
3631 * completer.c (location_completer): Update.
3632 * cli/cli-cmds.c (edit_command, list_command): Update.
3633 * breakpoint.c (create_overlay_event_breakpoint)
3634 (create_longjmp_master_breakpoint)
3635 (create_std_terminate_master_breakpoint)
3636 (create_exception_master_breakpoint)
3637 (create_thread_event_breakpoint): Update.
3638 (init_breakpoint_sal): Update. Remove some dead code.
3639 (create_breakpoint_sal): Change type of "location". Update.
3640 (create_breakpoints_sal, create_breakpoint, break_command_1)
3641 (dprintf_command, break_range_command, until_break_command)
3642 (init_ada_exception_breakpoint)
3643 (strace_marker_create_sals_from_location)
3644 (update_static_tracepoint, trace_command, ftrace_command)
3645 (strace_command, create_tracepoint_from_upload): Update.
3646 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3647 * ax-gdb.c (agent_command_1): Update.
3649 2017-04-12 Pedro Alves <palves@redhat.com>
3651 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
3652 * configure.tgt: Handle i[34567]86-*-go32* and
3653 i[34567]86-*-msdosdjgpp*.
3654 * i386-tdep.c (i386_svr4_reg_to_regnum):
3656 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
3658 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
3659 * i386-go32-tdep.c: New file.
3660 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
3663 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
3665 * aix-thread.c (pd_status2str): Change return type to const char *.
3667 2017-04-12 Pedro Alves <palves@redhat.com>
3669 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
3670 calls to set_gdbarch_gnu_triplet_regexp.
3672 2017-04-12 Pedro Alves <palves@redhat.com>
3675 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
3677 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
3678 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
3679 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
3680 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
3681 * gdbarch.h, gdbarch.c: Regenerate.
3682 * aarch64-tdep.c (aarch64_gdbarch_init): Override
3683 gdbarch_wchar_bit and gdbarch_wchar_signed.
3684 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
3685 * arm-tdep.c (arm_gdbarch_init): Likewise.
3686 * avr-tdep.c (avr_gdbarch_init): Likewise.
3687 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
3688 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
3689 * i386-tdep.c (i386_go32_init_abi): Likewise.
3690 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3691 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3692 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3693 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3694 * sh-tdep.c (sh_gdbarch_init): Likewise.
3695 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3696 * sparc64-tdep.c (sparc64_init_abi): Likewise.
3697 * windows-tdep.c (windows_init_abi): Likewise.
3698 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3700 2017-04-12 Pedro Alves <palves@redhat.com>
3703 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
3704 cplus_primitive_type_char32_t>: New enum values.
3705 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
3706 and cplus_primitive_type_char32_t.
3707 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
3708 32, use the archtecture's built-in type for char16_t and char32_t,
3709 respectively. Otherwise, fallback to init_integer_type as before,
3710 but make the type unsigned, and issue a complaint.
3711 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
3713 2017-04-12 Alan Hayward <alan.hayward@arm.com>
3715 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
3716 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
3718 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3720 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
3723 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3725 * common/common-utils.c (free_vector_argv): New function.
3726 * common/common-utils.h: Include <vector>.
3727 (free_vector_argv): New prototype.
3728 * darwin-nat.c (darwin_create_inferior): Rewrite function
3729 prototype in order to constify "exec_file" and accept a
3730 "std::string" for "allargs".
3731 * fork-child.c: Include <vector>.
3732 (breakup_args): Rewrite function, using C++.
3733 (fork_inferior): Rewrite function header, constify "exec_file_arg"
3734 and accept "std::string" for "allargs". Update the code to
3735 calculate "argv" based on "allargs". Update calls to "exec_fun"
3737 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
3738 order to constify "exec_file" and accept a "std::string" for
3740 * go32-nat.c (go32_create_inferior): Likewise.
3741 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
3742 * infcmd.c (run_command_1): Constify "exec_file". Use
3743 "std::string" for inferior arguments.
3744 * inferior.h (fork_inferior): Update prototype.
3745 * linux-nat.c (linux_nat_create_inferior): Rewrite function
3746 prototype in order to constify "exec_file" and accept a
3747 "std::string" for "allargs".
3748 * nto-procfs.c (procfs_create_inferior): Likewise.
3749 * procfs.c (procfs_create_inferior): Likewise.
3750 * remote-sim.c (gdbsim_create_inferior): Likewise.
3751 * remote.c (extended_remote_run): Update code to accept
3752 "std::string" as argument.
3753 (extended_remote_create_inferior): Rewrite function prototype in
3754 order to constify "exec_file" and accept a "std::string" for
3756 * rs6000-nat.c (super_create_inferior): Likewise.
3757 (rs6000_create_inferior): Likewise.
3758 * target.h (struct target_ops) <to_create_inferior>: Likewise.
3759 * windows-nat.c (windows_create_inferior): Likewise.
3761 2017-04-11 Pedro Alves <palves@redhat.com>
3763 * thread.c: Fix whitespace throughout.
3765 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
3767 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
3769 2017-04-11 Alan Hayward <alan.hayward@arm.com>
3771 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
3773 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
3776 * osdata.c (info_osdata): Check if 'type' is an empty string
3779 2017-04-10 Pedro Alves <palves@redhat.com>
3781 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
3782 (ptid_to_global_thread_id, in_thread_list)
3783 (do_captured_list_thread_ids, set_resumed, set_running)
3784 (set_executing, set_stop_requested, finish_thread_state)
3785 (validate_registers_access, can_access_registers_ptid)
3786 (print_thread_info_1, switch_to_thread)
3787 (do_restore_current_thread_cleanup)
3788 (make_cleanup_restore_current_thread, thread_command)
3789 (thread_name_command): Use operator== instead of ptid_equal.
3791 2017-04-10 Pedro Alves <palves@redhat.com>
3793 * thread.c (struct current_thread_cleanup) <next>: Delete field.
3794 (current_thread_cleanup_chain): Delete.
3795 (restore_current_thread_cleanup_dtor)
3796 (make_cleanup_restore_current_thread): Remove references to
3797 current_thread_cleanup_chain.
3799 2017-04-10 Alan Hayward <alan.hayward@arm.com>
3801 * msp430-tdep.c (msp430_pseudo_register_read): Never return
3804 2017-04-10 Yao Qi <yao.qi@linaro.org>
3807 * gdbthread.h (thread_info::deletable): New method.
3808 (thread_info::incref): New method.
3809 (thread_info::decref): New method.
3810 (thread_info::refcount): Move it to private.
3811 * infrun.c (save_stop_context): Call inc_refcount.
3812 (release_stop_context_cleanup): Likewise.
3813 * thread.c (set_thread_exited): New function.
3814 (init_thread_list): Delete "tp" only it is deletable, otherwise
3815 call set_thread_exited.
3816 (delete_thread_1): Call set_thread_exited.
3817 (current_thread_cleanup) <inferior_pid>: Remove.
3818 <thread>: New field.
3819 (restore_current_thread_ptid_changed): Removed.
3820 (do_restore_current_thread_cleanup): Adjust.
3821 (restore_current_thread_cleanup_dtor): Don't call
3823 (set_thread_refcount): Use dec_refcount.
3824 (make_cleanup_restore_current_thread): Adjust.
3825 (thread_apply_all_command): Call inc_refcount.
3826 (_initialize_thread): Don't call
3827 observer_attach_thread_ptid_changed.
3829 2017-04-10 Yao Qi <yao.qi@linaro.org>
3831 * thread.c (delete_thread_1): Hoist code on marking thread as
3834 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3836 * windows-nat.c (windows_detach): Initialize ptid with
3839 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
3841 * unittests/ptid-selftests.c: Fix erroneous assert messages.
3843 2017-04-07 Alan Hayward <alan.hayward@arm.com>
3845 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
3846 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
3847 (bfin_pseudo_register_write): Likewise
3849 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3851 * common/ptid.h (struct ptid): Change to...
3852 (class ptid_t): ... this.
3853 <ptid_t>: New constructors.
3854 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
3855 matches>: New methods.
3856 <make_null, make_minus_one>: New static methods.
3863 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
3864 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
3865 as references, move comment to class ptid_t.
3866 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
3867 ptid_t static methods.
3868 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
3869 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
3870 Take ptid arguments as references, implement using ptid_t methods.
3871 * unittests/ptid-selftests.c: New file.
3872 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3873 unittests/ptid-selftests.c.
3874 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
3876 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
3878 * python/python.c (python_run_simple_file): Cast mode literal to
3879 non-const char pointer as expected by PyFile_FromString.
3881 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
3883 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
3884 minus_one_ptid and null_ptid.
3886 2017-04-05 Pedro Alves <palves@redhat.com>
3888 * warning.m4 (build_warnings): Remove -Wno-write-strings.
3889 * configure: Regenerate.
3891 2017-04-05 Pedro Alves <palves@redhat.com>
3893 * ada-exp.y (yyerror): Constify.
3894 * ada-lang.c (bound_name, get_selections)
3895 (ada_variant_discrim_type)
3896 (ada_variant_discrim_name, ada_value_struct_elt)
3897 (ada_lookup_struct_elt_type, is_unchecked_variant)
3898 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
3899 (catch_ada_exception_command_split)
3900 (catch_ada_assert_command_split, catch_assert_command)
3901 (ada_op_name): Constify.
3902 * ada-lang.h (ada_yyerror, get_selections)
3903 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
3904 * arc-tdep.c (arc_print_frame_cache): Constify.
3905 * arm-tdep.c (arm_skip_stub): Constify.
3906 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
3907 (gen_aggregate_elt_ref): Constify.
3908 * bcache.c (print_bcache_statistics): Constify.
3909 * bcache.h (print_bcache_statistics): Constify.
3910 * break-catch-throw.c (catch_exception_command_1):
3911 * breakpoint.c (struct ep_type_description::description):
3913 (add_solib_catchpoint): Constify.
3914 (catch_fork_command_1): Add cast.
3915 (add_catch_command): Constify.
3916 * breakpoint.h (add_catch_command, add_solib_catchpoint):
3918 * bsd-uthread.c (bsd_uthread_state): Constify.
3919 * buildsym.c (patch_subfile_names): Constify.
3920 * buildsym.h (next_symbol_text_func, patch_subfile_names):
3922 * c-exp.y (yyerror): Constify.
3923 (token::oper): Constify.
3924 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
3925 * c-varobj.c (cplus_describe_child): Constify.
3926 * charset.c (find_charset_names): Add cast.
3927 (find_charset_names): Constify array and add const_cast.
3928 * cli/cli-cmds.c (complete_command, cd_command): Constify.
3929 (edit_command): Constify.
3930 * cli/cli-decode.c (lookup_cmd): Constify.
3931 * cli/cli-dump.c (dump_memory_command, dump_value_command):
3933 (struct dump_context): Constify.
3934 (add_dump_command, restore_command): Constify.
3935 * cli/cli-script.c (get_command_line): Constify.
3936 * cli/cli-script.h (get_command_line): Constify.
3937 * cli/cli-utils.c (check_for_argument): Constify.
3938 * cli/cli-utils.h (check_for_argument): Constify.
3939 * coff-pe-read.c (struct read_pe_section_data): Constify.
3940 * command.h (lookup_cmd): Constify.
3941 * common/print-utils.c (decimal2str): Constify.
3942 * completer.c (gdb_print_filename): Constify.
3943 * corefile.c (set_gnutarget): Constify.
3944 * cp-name-parser.y (yyerror): Constify.
3945 * cp-valprint.c (cp_print_class_member): Constify.
3946 * cris-tdep.c (cris_register_name, crisv32_register_name):
3948 * d-exp.y (yyerror): Constify.
3949 (struct token::oper): Constify.
3950 * d-lang.h (d_yyerror): Constify.
3951 * dbxread.c (struct header_file_location::name): Constify.
3952 (add_old_header_file, add_new_header_file, last_function_name)
3953 (dbx_next_symbol_text, add_bincl_to_list)
3954 (find_corresponding_bincl_psymtab, set_namestring)
3955 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
3956 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
3957 * defs.h (command_line_input, print_address_symbolic)
3958 (deprecated_readline_begin_hook): Constify.
3959 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
3961 * event-top.c (handle_line_of_input): Constify and add cast.
3962 * exceptions.c (catch_errors): Constify.
3963 * exceptions.h (catch_errors): Constify.
3964 * expprint.c (print_subexp_standard, op_string, op_name)
3965 (op_name_standard, dump_raw_expression, dump_raw_expression):
3966 * expression.h (op_name, op_string, dump_raw_expression):
3968 * f-exp.y (yyerror): Constify.
3969 (struct token::oper): Constify.
3970 (struct f77_boolean_val::name): Constify.
3971 * f-lang.c (f_word_break_characters): Constify.
3972 * f-lang.h (f_yyerror): Constify.
3973 * fork-child.c (fork_inferior): Add cast.
3974 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
3975 (new_variant): Constify.
3976 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
3977 * gdbarch.c: Regenerate.
3978 * gdbcore.h (set_gnutarget): Constify.
3979 * go-exp.y (yyerror): Constify.
3980 (token::oper): Constify.
3981 * go-lang.h (go_yyerror): Constify.
3982 * go32-nat.c (go32_sysinfo): Constify.
3983 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
3984 * guile/scm-cmd.c (cmdscm_function): Constify.
3985 * guile/scm-param.c (pascm_param_value): Constify.
3986 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
3987 (h8300sx_register_name): Constify.
3988 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
3990 * ia64-tdep.c (ia64_register_names): Constify.
3991 * infcmd.c (construct_inferior_arguments): Constify.
3992 (path_command, attach_post_wait): Constify.
3993 * language.c (show_range_command, show_case_command)
3994 (unk_lang_error): Constify.
3995 * language.h (language_defn::la_error)
3996 (language_defn::la_name_of_this): Constify.
3997 * linespec.c (decode_line_2): Constify.
3998 * linux-thread-db.c (thread_db_err_str): Constify.
3999 * lm32-tdep.c (lm32_register_name): Constify.
4000 * m2-exp.y (yyerror): Constify.
4001 * m2-lang.h (m2_yyerror): Constify.
4002 * m32r-tdep.c (m32r_register_names): Constify and make static.
4003 * m68hc11-tdep.c (m68hc11_register_names): Constify.
4004 * m88k-tdep.c (m88k_register_name): Constify.
4005 * macroexp.c (appendmem): Constify.
4006 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
4007 (upgrade_type, parse_external, parse_partial_symbols)
4008 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
4009 (new_symbol): Constify.
4010 * memattr.c (mem_info_command): Constify.
4011 * mep-tdep.c (register_name_from_keyword): Constify.
4012 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
4014 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
4015 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
4016 * mi/mi-main.c (captured_mi_execute_command): Constify and add
4018 (mi_execute_async_cli_command): Constify.
4019 * mips-tdep.c (mips_register_name): Constify.
4020 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
4021 (am33_register_name, am33_2_register_name)
4022 * moxie-tdep.c (moxie_register_names): Constify.
4023 * nat/linux-osdata.c (osdata_type): Constify fields.
4024 * nto-tdep.c (nto_parse_redirection): Constify.
4025 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
4026 (lookup_child_selector): Constify.
4027 (objc_methcall::name): Constify.
4028 * objc-lang.h (lookup_objc_class, lookup_child_selector)
4029 (lookup_struct_typedef): Constify.
4030 * objfiles.c (pc_in_section): Constify.
4031 * objfiles.h (pc_in_section): Constify.
4032 * p-exp.y (struct token::oper): Constify.
4033 (yyerror): Constify.
4034 * p-lang.h (pascal_yyerror): Constify.
4035 * parser-defs.h (op_name_standard): Constify.
4036 (op_print::string): Constify.
4037 (exp_descriptor::op_name): Constify.
4038 * printcmd.c (print_address_symbolic): Constify.
4039 * psymtab.c (print_partial_symbols): Constify.
4040 * python/py-breakpoint.c (stop_func): Constify.
4041 (bppy_get_expression): Constify.
4042 * python/py-cmd.c (cmdpy_completer::name): Constify.
4043 (cmdpy_function): Constify.
4044 * python/py-event.c (evpy_add_attribute)
4045 (gdbpy_initialize_event_generic): Constify.
4046 * python/py-event.h (evpy_add_attribute)
4047 (gdbpy_initialize_event_generic): Constify.
4048 * python/py-evts.c (add_new_registry): Constify.
4049 * python/py-finishbreakpoint.c (outofscope_func): Constify.
4050 * python/py-framefilter.c (get_py_iter_from_func): Constify.
4051 * python/py-inferior.c (get_buffer): Add cast.
4052 * python/py-param.c (parm_constant::name): Constify.
4053 * python/py-unwind.c (fprint_frame_id): Constify.
4054 * python/python.c (gdbpy_parameter_value): Constify.
4055 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
4056 * remote.c (memory_packet_config::name): Constify.
4057 (show_packet_config_cmd, remote_write_bytes)
4058 (remote_buffer_add_string):
4059 * reverse.c (exec_reverse_once): Constify.
4060 * rs6000-tdep.c (variant::name, variant::description): Constify.
4061 * rust-exp.y (rustyyerror): Constify.
4062 * rust-lang.c (rust_op_name): Constify.
4063 * rust-lang.h (rustyyerror): Constify.
4064 * serial.h (serial_ops::name): Constify.
4065 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
4066 (sh_sh3e_register_name, sh_sh2e_register_name)
4067 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
4068 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
4069 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
4070 (sh_sh4al_dsp_register_name): Constify.
4071 * sh64-tdep.c (sh64_register_name): Constify.
4072 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
4073 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
4074 * stabsread.c (patch_block_stabs, read_type_number)
4075 (ref_map::stabs, ref_add, process_reference)
4076 (symbol_reference_defined, define_symbol, define_symbol)
4077 (error_type, read_type, read_member_functions, read_cpp_abbrev)
4078 (read_one_struct_field, read_struct_fields, read_baseclasses)
4079 (read_tilde_fields, read_struct_type, read_array_type)
4080 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
4081 (read_huge_number, read_range_type, read_args, common_block_start)
4082 (find_name_end): Constify.
4083 * stabsread.h (common_block_start, define_symbol)
4084 (process_one_symbol, symbol_reference_defined, ref_add):
4085 * symfile.c (get_section_index, add_symbol_file_command):
4086 * symfile.h (get_section_index): Constify.
4087 * target-descriptions.c (tdesc_type::name): Constify.
4088 (tdesc_free_type): Add cast.
4089 * target.c (find_default_run_target):
4090 (add_deprecated_target_alias, find_default_run_target)
4091 (target_announce_detach): Constify.
4092 (do_option): Constify.
4093 * target.h (add_deprecated_target_alias): Constify.
4094 * thread.c (print_thread_info_1): Constify.
4095 * top.c (deprecated_readline_begin_hook, command_line_input):
4097 (init_main): Add casts.
4098 * top.h (handle_line_of_input): Constify.
4099 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
4100 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
4101 (tfind_command): Rename to ...
4102 (tfind_command_1): ... this and constify.
4103 (tfind_command): New function.
4104 (tfind_end_command, tfind_start_command): Adjust.
4105 (encode_source_string): Constify.
4106 * tracepoint.h (encode_source_string): Constify.
4107 * tui/tui-data.c (tui_partial_win_by_name): Constify.
4108 * tui/tui-data.h (tui_partial_win_by_name): Constify.
4109 * tui/tui-source.c (tui_set_source_content_nil): Constify.
4110 * tui/tui-source.h (tui_set_source_content_nil): Constify.
4111 * tui/tui-win.c (parse_scrolling_args): Constify.
4112 * tui/tui-windata.c (tui_erase_data_content): Constify.
4113 * tui/tui-windata.h (tui_erase_data_content): Constify.
4114 * tui/tui-winsource.c (tui_erase_source_content): Constify.
4115 * tui/tui.c (tui_enable): Add cast.
4116 * utils.c (defaulted_query): Constify.
4117 (init_page_info): Add cast.
4118 (puts_debug, subset_compare): Constify.
4119 * utils.h (subset_compare): Constify.
4120 * varobj.c (varobj_format_string): Constify.
4121 * varobj.h (varobj_format_string): Constify.
4122 * vax-tdep.c (vax_register_name): Constify.
4123 * windows-nat.c (windows_detach): Constify.
4124 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
4125 * xml-support.c (gdb_xml_end_element): Constify.
4126 * xml-tdesc.c (tdesc_start_reg): Constify.
4127 * xstormy16-tdep.c (xstormy16_register_name): Constify.
4128 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
4129 * xtensa-tdep.h (xtensa_register_t::name): Constify.
4131 2017-04-05 Pedro Alves <palves@redhat.com>
4133 * proc-api.c (struct trans): Constify.
4134 (procfs_note): Constify.
4135 * proc-events.c (struct trans, syscall_table):
4136 * proc-flags.c (struct trans): Constify.
4137 * proc-utils.h (procfs_note): Constify.
4138 * proc-why.c (struct trans): Constify.
4139 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
4140 (procfs_detach): Constify.
4141 * sol-thread.c (struct string_map): Constify.
4142 (td_err_string, td_state_string): Constify.
4144 2017-04-05 Pedro Alves <palves@redhat.com>
4146 * proc-api.c (procfs_filename): Don't initialize
4148 (prepare_to_trace): Assume procfs_filename is non-NULL.
4149 (_initialize_proc_api): Give procfs_filename a default value here.
4151 2017-04-05 Pedro Alves <palves@redhat.com>
4153 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
4154 'cond_string' parameter.
4155 (extract_exception_regexp): Constify 'string' parameter.
4156 (catch_exception_command_1): Constify.
4157 * breakpoint.c (init_catchpoint)
4158 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
4160 (ep_parse_optional_if_clause, catch_fork_command_1)
4161 (catch_exec_command_1): Constify.
4162 * breakpoint.h (init_catchpoint): Constify 'cond_string'
4164 (ep_parse_optional_if_clause): Constify.
4165 * cli/cli-utils.c (remove_trailing_whitespace)
4166 (check_for_argument): Constify.
4167 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
4169 (check_for_argument): Likewise.
4171 2017-04-05 Pedro Alves <palves@redhat.com>
4173 * event-top.c (command_line_handler): Add cast to execute_command
4175 * record-btrace.c (cmd_record_btrace_bts_start)
4176 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
4177 (cmd_record_btrace_start): Add cast to execute_command call.
4178 * record-full.c (record_full_goto_insn):
4179 * record.c (record_start, record_stop): Add cast to
4180 execute_command_to_string calls.
4181 (cmd_record_start): Add cast to execute_command calls.
4183 2017-04-05 Pedro Alves <palves@redhat.com>
4185 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
4186 static inline function.
4187 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
4188 array and use gdb_PyArg_ParseTupleAndKeywords.
4189 * python/py-cmd.c (cmdpy_init): Likewise.
4190 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
4191 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
4192 (infpy_search_memory): Likewise.
4193 * python/py-objfile.c (objfpy_add_separate_debug_file)
4194 (gdbpy_lookup_objfile): Likewise.
4195 * python/py-symbol.c (gdbpy_lookup_symbol)
4196 (gdbpy_lookup_global_symbol): Likewise.
4197 * python/py-type.c (gdbpy_lookup_type): Likewise.
4198 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
4199 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
4202 2017-04-05 Pedro Alves <palves@redhat.com>
4204 * python/python-internal.h (gdb_PyGetSetDef): New type.
4205 * python/py-block.c (block_object_getset)
4206 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
4207 * python/py-event.c (event_object_getset)
4208 (finish_breakpoint_object_getset): Likewise.
4209 * python/py-inferior.c (inferior_object_getset): Likewise.
4210 * python/py-infthread.c (thread_object_getset): Likewise.
4211 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
4212 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
4213 * python/py-objfile.c (objfile_getset): Likewise.
4214 * python/py-progspace.c (pspace_getset): Likewise.
4215 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
4217 * python/py-record.c (recpy_record_getset): Likewise.
4218 * python/py-symbol.c (symbol_object_getset): Likewise.
4219 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
4221 * python/py-type.c (type_object_getset, field_object_getset):
4223 * python/py-value.c (value_object_getset): Likewise.
4225 2017-04-05 Pedro Alves <palves@redhat.com>
4227 * python/python-internal.h (gdb_PyObject_CallMethod)
4228 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
4230 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
4231 (PySys_GetObject, PySys_SetPath): New macros.
4233 2017-04-05 Pedro Alves <palves@redhat.com>
4235 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
4236 info_osdata_command.
4237 * osdata.c (info_osdata_command): Rename to ...
4238 (info_osdata): ... this. Constify 'type' parameter, and remove
4239 the 'from_tty' parameter. Accept NULL TYPE.
4240 (info_osdata_command): New function.
4241 * osdata.h (info_osdata_command): Remove declaration.
4242 (info_osdata): New declaration.
4244 2017-04-05 Pedro Alves <palves@redhat.com>
4246 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
4247 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
4248 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
4250 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
4251 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
4252 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
4254 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
4255 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
4256 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
4257 (mi_cmd_file_list_exec_source_files)
4258 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
4259 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4260 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
4262 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
4263 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
4264 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
4265 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
4266 (mi_cmd_stack_info_frame): Constify 'command' parameter.
4267 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
4268 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
4269 'command' parameter.
4270 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
4271 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
4272 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
4273 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
4274 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
4275 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
4276 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
4277 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
4278 (mi_cmd_var_set_update_range): Constify 'command' parameter.
4279 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
4280 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
4282 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
4283 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
4284 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
4285 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
4286 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
4287 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
4288 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
4289 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
4290 (mi_cmd_data_list_changed_registers)
4291 (mi_cmd_data_write_register_values)
4292 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
4293 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
4294 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
4295 (mi_cmd_list_features, mi_cmd_list_target_features)
4296 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
4297 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
4298 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
4299 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
4300 (mi_cmd_trace_frame_collected): Constify 'command'
4302 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
4303 'command' parameter.
4305 2017-04-05 Pedro Alves <palves@redhat.com>
4307 * ada-lang.c (ada_completer_word_break_characters): Now a const
4309 (ada_get_gdb_completer_word_break_characters): Constify.
4310 * completer.c (gdb_completer_command_word_break_characters)
4311 (gdb_completer_file_name_break_characters)
4312 (gdb_completer_quote_characters): Now const arrays.
4313 (get_gdb_completer_quote_characters): Constify.
4314 (set_rl_completer_word_break_characters): New function.
4315 (set_gdb_completion_word_break_characters)
4316 (complete_line_internal): Use it.
4317 * completer.h (get_gdb_completer_quote_characters): Constify.
4318 (set_rl_completer_word_break_characters): Declare.
4319 * f-lang.c (f_word_break_characters): Constify.
4320 * language.c (default_word_break_characters): Constify.
4321 * language.h (language_defn::la_word_break_characters): Constify.
4322 (default_word_break_characters): Constify.
4323 * top.c (init_main): Use set_rl_completer_word_break_characters.
4325 2017-04-05 Pedro Alves <palves@redhat.com>
4327 * aix-thread.c (aix_thread_pid_to_str)
4328 (aix_thread_extra_thread_info): Constify.
4329 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
4330 * bsd-uthread.c (bsd_uthread_extra_thread_info)
4331 (bsd_uthread_pid_to_str): Constify.
4332 * corelow.c (core_pid_to_str): Constify.
4333 * darwin-nat.c (darwin_pid_to_str): Constify.
4334 * fbsd-nat.c (fbsd_pid_to_str): Constify.
4335 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
4337 * gnu-nat.c (gnu_pid_to_str): Constify.
4338 * go32-nat.c (go32_pid_to_str): Constify.
4339 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
4340 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
4341 * inferior.c (inferior_pid_to_str): Constify.
4342 * linux-nat.c (linux_nat_pid_to_str): Constify.
4343 * linux-tdep.c (linux_core_pid_to_str): Constify.
4344 * linux-thread-db.c (thread_db_pid_to_str)
4345 (thread_db_extra_thread_info): Constify.
4346 * nto-tdep.c (nto_extra_thread_info): Constify.
4347 * nto-tdep.h (nto_extra_thread_info): Constify.
4348 * obsd-nat.c (obsd_pid_to_str): Constify.
4349 * procfs.c (procfs_pid_to_str): Constify.
4350 * ravenscar-thread.c (ravenscar_extra_thread_info)
4351 (ravenscar_pid_to_str): Constify.
4352 * remote-sim.c (gdbsim_pid_to_str): Constify.
4353 * remote.c (remote_threads_extra_info, remote_pid_to_str):
4355 * sol-thread.c (solaris_pid_to_str): Constify.
4356 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
4357 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
4358 * target.c (default_pid_to_str, target_pid_to_str)
4359 (normal_pid_to_str, default_pid_to_str): Constify.
4360 * target.h (target_ops::to_pid_to_str)
4361 (target_ops::to_extra_thread_info): Constify.
4362 (target_pid_to_str, normal_pid_to_str): Constify.
4363 * windows-nat.c (windows_pid_to_str): Constify.
4364 * gdbarch.sh (core_pid_to_str): Constify.
4365 * target-delegates.c: Regenerate.
4366 * gdbarch.h, gdbarch.c: Regenerate.
4368 2017-04-05 Pedro Alves <palves@redhat.com>
4370 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
4371 the memory of the temporary warning_pre_print override.
4372 * utils.c (warning_pre_print): Constify.
4373 * utils.h (warning_pre_print): Constify.
4375 2017-04-05 Pedro Alves <palves@redhat.com>
4377 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
4378 (shell_command): New function.
4379 (make_command): Use std::string.
4380 (init_cli_cmds): Register shell_command instead of shell_escape.
4382 2017-04-05 Pedro Alves <palves@redhat.com>
4384 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
4385 * tracepoint.c (default_collect): Don't initialize.
4387 2017-04-05 Pedro Alves <palves@redhat.com>
4389 * macroexp.c (macro_buffer::shared): Now a bool.
4390 (init_buffer): Update.
4391 (init_shared_buffer): Constify 'addr' parameter.
4392 (substitute_args, expand, macro_expand, macro_expand_next): Remove
4395 2017-04-05 Pedro Alves <palves@redhat.com>
4397 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
4398 * disasm.c (set_disassembler_options): Constify local.
4399 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
4401 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
4404 * tracefile.c (tsave_command): Fix argument parsing for '-r'
4407 2017-04-05 Yao Qi <yao.qi@linaro.org>
4409 * frame.c (frame_unwind_register_unsigned): Call
4410 frame_unwind_register_value.
4412 2017-04-05 Yao Qi <yao.qi@linaro.org>
4414 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
4415 Use gdb_test_multiple, and don't match anchor.
4417 2017-04-05 Pedro Alves <palves@redhat.com>
4419 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
4420 (Write After Approval): Remove Simon Marchi.
4422 2017-04-05 Pedro Alves <palves@redhat.com>
4424 * common/gdb_optional.h (optional::optional): Make constexpr and
4427 2017-04-04 John Baldwin <jhb@FreeBSD.org>
4429 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
4430 (amd64fbsd_jmp_buf_reg_offset): Remove.
4431 (amd64fbsd_supply_uthread): Remove function.
4432 (amd64fbsd_collect_uthread): Remove function.
4433 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
4434 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
4435 (x86_64-*-freebsd*): Remove bsd-uthread.o.
4436 (fbsd-nat.c): Update comment.
4437 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
4438 (i386fbsd_jmp_buf_reg_offset): Remove.
4439 (i386fbsd_supply_uthread): Remove function.
4440 (i386fbsd_collect_uthread): Remove function.
4441 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
4443 2017-04-04 John Baldwin <jhb@FreeBSD.org>
4445 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
4446 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
4447 * NEWS: Mention that support for FreeBSD/alpha was removed.
4448 * alpha-fbsd-tdep.c: Delete file.
4449 * config/alpha/fbsd.mh: Delete file.
4450 * configure.host: Delete alpha*-*-freebsd* and
4451 alpha*-*-kfreebsd*-gnu.
4452 * configure.tgt: Delete alpha*-*-freebsd* and
4453 alpha*-*-kfreebsd*-gnu.
4455 2017-04-04 John Baldwin <jhb@FreeBSD.org>
4457 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
4458 amd64bsd_store_inferior_registers): Use ptid from regcache.
4460 2017-04-04 Pedro Alves <palves@redhat.com>
4462 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
4463 data fields, make them private and add "m_" prefixes.
4464 (lnp_state_machine::lnp_state_machine): New ctor.
4465 (record_line, check_line_address, handle_set_discriminator)
4466 (handle_set_address, handle_advance_pc, handle_special_opcode)
4467 (handle_advance_line, handle_set_file, handle_negate_stmt)
4468 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
4469 (end_sequence, advance_line): New methods.
4470 (m_gdbarch, m_record_lines_p): New fields.
4471 (lnp_reader_state): Delete.
4472 (dwarf_record_line): Rename to ...
4473 (lnp_state_machine::record_line): ... adjust.
4474 (init_lnp_state_machine): Delete.
4475 (lnp_state_machine::lnp_state_machine): New.
4476 (check_line_address): Rename to ...
4477 (lnp_state_machine::check_line_address): This.
4478 (dwarf_decode_lines_1): Remove reference to "reader_state".
4479 Adjust lnp_state_machine having a non-default ctor. Use bool.
4480 State machine internal state manipulation moved to
4481 lnp_state_machine methods.
4483 2017-04-04 Pedro Alves <palves@redhat.com>
4485 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4486 unittests/offset-type-selftests.c.
4487 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
4488 * common/offset-type.h: New file.
4489 * common/preprocessor.h: New file.
4490 * common/traits.h: New file.
4491 * common/valid-expr.h: New file.
4492 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
4493 sect_offset and cu_offset strong typedefs throughout.
4494 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
4495 typedefs throughout.
4496 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
4497 sect_offset and cu_offset strong typedefs throughout.
4498 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
4499 typedefs throughout.
4500 * gdbtypes.h: Include "common/offset-type.h".
4501 (cu_offset): Now an offset type (strong typedef) instead of a
4503 (sect_offset): Likewise.
4504 (union call_site_parameter_u): Rename "param_offset" field to
4506 * unittests/offset-type-selftests.c: New file.
4508 2017-04-04 Pedro Alves <palves@redhat.com>
4510 * common/underlying.h: New file.
4511 * dwarf2read.c: Include "common/gdb_optional.h" and
4512 "common/underlying.h".
4513 (dir_index, file_name_index): New types.
4514 (file_entry): Use them.
4515 (file_entry::include): Use to_underlying.
4516 (line_header::add_file_name): Use dir_index.
4517 (read_formatted_entries): Use gdb::optional. Read form before
4518 writting to file_entry.
4519 (dwarf_decode_line_header): Use dir_index.
4520 (lnp_state_machine::current_file): Use to_underlying.
4521 (lnp_state_machine::file): Change type to file_name_index.
4522 (dwarf_record_line): Use to_underlying.
4523 (init_lnp_state_machine): Use file_name_index.
4524 (dwarf_decode_lines_1): Use dir_index and file_name_index.
4526 2017-04-04 Pedro Alves <palves@redhat.com>
4528 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
4529 operator bool, has_value and get methods.
4531 2017-04-04 Pedro Alves <palves@redhat.com>
4533 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
4535 (line_header): Initialize all data fields. Change type of
4536 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
4537 Change type of include_dirs to std::vector<const char *>. Remove
4538 num_include_dirs, include_dirs_size. Change type of file_names to
4539 std::vector<file_entry>. Remove num_file_names, file_names_size.
4540 (line_header::line_header): New.
4541 (line_header::add_include_dir, line_header::add_file_name): New
4543 (line_header::include_dir_at): Remove NULL check.
4544 (line_header::file_name_at): Add const overload.
4545 (line_header_up): New unique_ptr typedef.
4546 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
4547 std::vector. Remove free_line_header call.
4548 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
4549 free_line_header call.
4550 (free_cu_line_header): Delete.
4551 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
4552 (setup_type_unit_groups): Use line_header_up instead of cleanups.
4553 Adjust to use std::vector.
4554 (free_line_header): Delete.
4555 (free_line_header_voidp): Use delete.
4556 (add_include_dir): Replace with ...
4557 (line_header::add_include_dir): ... this method. Use std::vector.
4558 (add_file_name): Replace with ...
4559 (line_header::add_file_name): ... this method. Use std::vector.
4560 (add_include_dir_stub): Delete.
4561 (read_formatted_entries): Remove memset.
4562 (dwarf_decode_line_header): Return a line_header_up instead of a
4563 raw pointer. Remove cleanup handling. Pass lambdas to
4564 read_formatted_entries. Adjust to use line_header methods.
4565 (dwarf_decode_lines_1): Adjust to use line_header methods.
4566 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
4569 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
4571 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
4572 instead of struct ptid.
4574 2017-05-04 Alan Hayward <alan.hayward@arm.com>
4576 * frame.c (get_frame_register_bytes): Unwind using value.
4577 (put_frame_register_bytes): Likewise.
4579 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
4581 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
4584 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
4586 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
4588 2017-03-29 Yao Qi <yao.qi@linaro.org>
4590 * gdbthread.h (struct thread_info): Declare constructor and
4591 destructor. Add some in-class member initializers.
4592 * thread.c (free_thread): Remove.
4593 (init_thread_list): Call delete instead of free_thread.
4594 (new_thread): Call thread_info constructor.
4595 (thread_info::thread_info): New function.
4596 (thread_info::~thread_info): New function.
4597 (delete_thread_1): Call delete instead of free_thread.
4598 (make_cleanup_restore_current_thread): Move tp and frame to
4601 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4603 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
4604 (arc_skip_prologue): Likewise.
4605 (arc_make_frame_cache): Likewise.
4606 (arc_pv_get_operand): New function.
4607 (arc_is_in_prologue): Likewise.
4608 (arc_analyze_prologue): Likewise.
4609 (arc_print_frame_cache): Likewise.
4610 (MAX_PROLOGUE_LENGTH): New constant.
4612 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4614 * configure.tgt: Add arc-insn.o.
4615 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
4616 (dump_arc_instruction_command): New function.
4617 (arc_fprintf_disasm): Likewise.
4618 (arc_disassemble_info): Likewise.
4619 (arc_insn_get_operand_value): Likewise.
4620 (arc_insn_get_operand_value_signed): Likewise.
4621 (arc_insn_get_memory_base_reg): Likewise.
4622 (arc_insn_get_memory_offset): Likewise.
4623 (arc_insn_get_branch_target): Likewise.
4624 (arc_insn_dump): Likewise.
4625 (arc_insn_get_linear_next_pc): Likewise.
4626 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
4627 (arc_disassemble_info): Likewise.
4628 (arc_insn_get_branch_target): Likewise.
4629 (arc_insn_get_linear_next_pc): Likewise.
4630 * NEWS: Mention new "maint print arc arc-instruction".
4632 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4634 * arc-tdep (maintenance_print_arc_list): New variable.
4635 (maintenance_print_arc_command): New function.
4637 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4639 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
4640 Add "limm" and "reserved".
4641 (arc_cannot_fetch_register, arc_cannot_store_register): Add
4642 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
4643 * arc-tdep.h (arc_regnum): Likewise.
4645 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4647 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4648 for THREADPTR register.
4649 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
4651 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
4652 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
4653 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
4655 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4657 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
4658 registers above gdbarch_num_regs (gdbarch) as privileged in
4661 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4663 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4664 for a single specified register or for all registers in
4665 a0_base..a0_base + C0_NREGS range.
4666 (supply_gregset_reg): Call regcache_raw_supply for a single
4667 specified register or for all registers in a0_base..a0_base +
4670 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4672 * arch/xtensa.h (C0_NREGS): Add definition.
4673 * xtensa-tdep.c (C0_NREGS): Remove definition.
4675 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4677 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
4678 Drop xtensa_default_isa initialization.
4679 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
4681 2017-03-27 Pedro Alves <palves@redhat.com>
4683 * dwarf2read.c (file_entry) <dir_index>: Add comment.
4684 (file_entry::include_dir): New method.
4685 (line_header::include_dir_at, line_header::file_name_at): New
4687 (setup_type_unit_groups, setup_type_unit_groups)
4688 (psymtab_include_file_name): Simplify using the new methods.
4689 (lnp_state_machine) <the_line_header>: New field.
4690 <file>: Add comment.
4691 (lnp_state_machine::current_file): New method.
4692 (dwarf_record_line): Simplify using the new methods.
4693 (init_lnp_state_machine): Initialize the "the_line_header" field.
4694 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
4695 Simplify using the new methods.
4697 2017-03-27 Pedro Alves <palves@redhat.com>
4699 * cp-name-parser.y (make_empty): Delete.
4700 (demangler_special, nested_name, ptr_operator, array_indicator)
4701 (direct_declarator, declarator_1): Use fill_comp instead of
4704 2017-03-27 Pedro Alves <palves@redhat.com>
4706 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
4707 to ATTRIBUTE_PRINTF.
4708 * solib-target.c (library_list_start_list): Print "string" not
4710 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
4713 2017-03-27 Pedro Alves <palves@redhat.com>
4715 * dwarf2read.c (struct file_and_directory): New.
4716 (dwarf2_get_dwz_file): Adjust to use std::string.
4717 (dw2_get_file_names_reader): Adjust to use file_and_directory.
4718 (find_file_and_directory): Adjust to return a file_and_directory
4720 (read_file_scope): Adjust to use file_and_directory. Remove
4721 make_cleanup/do_cleanups calls.
4722 (open_and_init_dwp_file): Adjust to use std::string. Remove
4723 make_cleanup/do_cleanups calls.
4724 * python/python.c (do_start_initialization): Adjust to ldirname
4725 returning a std::string.
4726 * utils.c (ldirname): Now returns a std::string.
4727 * utils.h (ldirname): Change return type to std::string.
4728 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
4729 returning a std::string.
4730 * xml-tdesc.c (file_read_description_xml): Likewise.
4732 2017-03-24 Alan Hayward <alan.hayward@arm.com>
4734 * regcache.c (regcache_debug_print_register): New function.
4735 * regcache.h (regcache_debug_print_register): New declaration.
4736 * target.c (debug_print_register): Remove.
4737 (target_fetch_registers): Call regcache_debug_print_register.
4738 (target_store_registers): Likewise.
4740 2017-03-24 Pádraig Brady <pbrady@fb.com>
4742 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
4743 reference beyond the 'lh->include_dirs' array before accessing to
4745 (psymtab_include_file_name): Likewise.
4746 (dwarf_decode_lines_1): Likewise.
4747 (dwarf_decode_lines): Likewise.
4748 (file_file_name): Likewise.
4750 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
4752 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
4754 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4755 ps_lsetfpregs): Likewise.
4756 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
4757 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4758 ps_lsetfpregs): Likewise.
4759 * target.c (target_fetch_registers, target_store_registers):
4762 2017-03-23 Alan Hayward <alan.hayward@arm.com>
4764 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
4766 2017-03-23 Yao Qi <yao.qi@linaro.org>
4768 * aarch64-tdep.c (aarch64_process_record_test): Declare.
4769 (_initialize_aarch64_tdep): Register it.
4770 (aarch64_record_load_store): Handle PRFM instruction.
4771 (aarch64_process_record_test): New function.
4773 2017-03-23 Yao Qi <yao.qi@linaro.org>
4775 * aarch64-tdep.c (aarch64_record_load_store): Fix code
4778 2017-03-23 Yao Qi <yao.qi@linaro.org>
4780 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
4782 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4784 python/python.c (do_start_initialization): Fix memory leak.
4786 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4788 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
4789 using get_ptrace_pid.
4790 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
4792 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
4793 inferior_ptid instead of pid.
4795 2017-03-22 Yao Qi <yao.qi@linaro.org>
4797 * aarch64-tdep.c: Wrap locally used classes in anonymous
4799 * arm-tdep.c: Likewise.
4800 * linespec.c: Likewise.
4801 * ui-out.c: Likewise.
4803 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
4806 * python/lib/gdb/printer/bound_registers.py: Import sys.
4808 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
4810 * windows-nat.c (do_windows_fetch_inferior_registers): Add
4811 windows_thread_info parameter and use it instead of
4813 (windows_fetch_inferior_registers): Don't set current_thread,
4814 pass the thread to do_windows_fetch_inferior_registers. Use
4815 ptid from regcache instead of inferior_ptid.
4816 (do_windows_store_inferior_registers): Add windows_thread_info
4817 parameter and use it instead of current_thread.
4818 (windows_store_inferior_registers): Don't set current_thread,
4819 pass the thread to do_windows_store_inferior_registers. Use
4820 ptid from regcache instead of inferior_ptid.
4822 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
4824 * ser-mingw.c (ser_windows_raw): Remove reference to
4825 struct serial::current_timeout.
4827 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
4830 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
4831 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
4832 (sparc64_fsr_type): Fix %fsr decoding.
4834 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
4836 * python/py-record-btrace.c (btpy_insn_data): Change return type
4839 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
4841 * spu-linux-nat.c (spu_fetch_inferior_registers,
4842 spu_store_inferior_registers): Use ptid from regcache, set and
4843 restore inferior_ptid.
4844 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
4847 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
4849 * i386-linux-nat.c (fetch_register, store_register,
4850 i386_linux_fetch_inferior_registers,
4851 i386_linux_store_inferior_registers): Use ptid from regcache.
4852 * ia64-linux-nat.c (ia64_linux_fetch_register,
4853 ia64_linux_store_register): Likewise.
4854 * inf-ptrace.c (inf_ptrace_fetch_register,
4855 inf_ptrace_store_register): Likewise.
4856 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
4857 m32r_linux_store_inferior_registers): Likewise.
4858 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
4859 m68kbsd_store_inferior_registers): Likewise.
4860 * m68k-linux-nat.c (fetch_register, store_register,
4861 m68k_linux_fetch_inferior_registers,
4862 m68k_linux_store_inferior_registers): Likewise.
4863 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
4864 m88kbsd_store_inferior_registers): Likewise.
4865 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
4866 mips_fbsd_store_inferior_registers): Likewise.
4867 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
4868 mips64_linux_regsets_store_registers): Likewise.
4869 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
4870 mipsnbsd_store_inferior_registers): Likewise.
4871 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
4872 mips64obsd_store_inferior_registers): Likewise.
4873 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
4875 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
4876 ppcfbsd_store_inferior_registers): Likewise.
4877 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
4878 ppc_linux_store_inferior_registers): Likewise.
4879 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
4880 ppcnbsd_store_inferior_registers): Likewise.
4881 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
4882 ppcobsd_store_registers): Likewise.
4883 * procfs.c (procfs_fetch_registers, procfs_store_registers):
4885 * ravenscar-thread.c (ravenscar_fetch_registers,
4886 ravenscar_store_registers, ravenscar_prepare_to_store):
4888 * record-btrace.c (record_btrace_fetch_registers,
4889 record_btrace_store_registers, record_btrace_prepare_to_store):
4891 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
4892 Lookup inferior using ptid from regcache, instead of
4894 * remote.c (remote_fetch_registers, remote_store_registers): Use
4896 * rs6000-nat.c (fetch_register, store_register): Likewise.
4897 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
4898 s390_linux_store_inferior_registers): Likewise.
4899 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
4900 shnbsd_store_inferior_registers): Likewise.
4901 * sol-thread.c (sol_thread_fetch_registers,
4902 sol_thread_store_registers): Likewise.
4903 * sparc-nat.c (sparc_fetch_inferior_registers,
4904 sparc_store_inferior_registers): Likewise.
4905 * tilegx-linux-nat.c (fetch_inferior_registers,
4906 store_inferior_registers): Likewise.
4907 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
4908 vaxbsd_store_inferior_registers): Likewise.
4909 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
4910 store_xtregs): Likewise.
4912 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4915 * NEWS: Mention support for rvalue references in GDB and python.
4916 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
4917 supports both lvalue and rvalue references.
4919 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4922 * gdbtypes.c (rank_one_type): Implement overloading
4923 resolution rules regarding rvalue references.
4925 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4928 * aarch64-tdep.c (aarch64_type_align)
4929 (aarch64_extract_return_value, aarch64_store_return_value): Change
4930 lvalue reference type checks to general reference type checks.
4931 * amd64-tdep.c (amd64_classify): Likewise.
4932 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
4934 * arm-tdep.c (arm_type_align, arm_extract_return_value)
4935 (arm_store_return_value): Likewise.
4936 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
4937 * c-typeprint.c (c_print_type): Likewise.
4938 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
4939 (cplus_number_of_children, cplus_describe_child): Likewise.
4940 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4941 * completer.c (expression_completer): Likewise.
4942 * cp-support.c (make_symbol_overload_list_adl_namespace):
4944 * darwin-nat-info.c (info_mach_region_command): Likewise.
4945 * dwarf2loc.c (entry_data_value_coerce_ref)
4946 (value_of_dwarf_reg_entry): Likewise.
4947 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
4948 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
4950 * findvar.c (extract_typed_address, store_typed_address):
4952 * gdbtypes.c (rank_one_type): Likewise.
4953 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
4954 * infcall.c (value_arg_coerce): Likewise.
4955 * language.c (pointer_type): Likewise.
4956 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
4958 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
4959 * mn10300-tdep.c (mn10300_type_align): Likewise.
4960 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
4961 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
4962 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
4964 * printcmd.c (print_formatted, x_command): Likewise.
4965 * python/py-type.c (typy_get_composite, typy_template_argument):
4967 * python/py-value.c (valpy_referenced_value)
4968 (valpy_get_dynamic_type, value_has_field): Likewise.
4969 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
4970 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
4971 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
4972 * spu-tdep.c (spu_scalar_value_p): Likewise.
4973 * symtab.c (lookup_symbol_aux): Likewise.
4974 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
4975 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
4977 * valops.c (value_cast_pointers, value_cast)
4978 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
4979 (value_struct_elt, value_struct_elt_bitpos)
4980 (value_find_oload_method_list, find_overload_match)
4981 (value_rtti_indirect_type): Likewise.
4982 * valprint.c (val_print_scalar_type_p, generic_val_print):
4984 * value.c (value_actual_type, value_as_address, unpack_long)
4985 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
4986 (coerce_ref): Likewise.
4987 * varobj.c (varobj_get_value_type): Likewise.
4989 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4992 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
4994 * python/lib/gdb/command/explore.py: Support exploring values
4995 of rvalue reference types.
4996 * python/lib/gdb/types.py: Implement get_basic_type() for
4997 rvalue reference types.
4998 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
5000 * python/py-value.c (valpy_getitem): Add an rvalue reference
5002 (valpy_reference_value): Add new parameter "refcode".
5003 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
5004 New wrappers for valpy_reference_value().
5005 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5006 (gdbpy_invoke_xmethod): Likewise.
5008 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5011 * dwarf2read.c (process_die, read_type_die_1): Handle the
5012 DW_TAG_rvalue_reference_type DIE.
5013 (read_tag_reference_type): Add new parameter "refcode".
5015 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5018 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
5019 (c_type_print_modifier, c_type_print_varspec_suffix)
5020 (c_type_print_base): Support printing rvalue reference types.
5021 * c-valprint.c (c_val_print, c_value_print): Support printing
5022 rvalue reference values.
5024 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5027 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
5029 * cp-support.c (replace_typedefs): Handle
5030 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
5031 * python/py-type.c (typy_lookup_type): Likewise.
5033 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5036 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
5037 * parse.c (insert_type): Change assert statement.
5038 (follow_types): Handle rvalue reference types.
5039 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
5042 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5045 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
5046 value_ref() interface.
5047 * c-valprint.c (c_value_print): Likewise.
5048 * infcall.c (value_arg_coerce): Likewise.
5049 * python/py-value.c (valpy_reference_value): Likewise.
5050 * valops.c (value_cast, value_reinterpret_cast)
5051 (value_dynamic_cast, typecmp): Likewise.
5052 (value_ref): Parameterize by kind of return value reference type.
5053 * value.h (value_ref): Add new parameter "refcode".
5055 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5058 * dwarf2read.c (read_tag_reference_type): Use
5059 lookup_lvalue_reference_type() instead of lookup_reference_type().
5060 * eval.c (evaluate_subexp_standard): Likewise.
5061 * f-exp.y: Likewise.
5062 * gdbtypes.c (make_reference_type, lookup_reference_type):
5063 Generalize with rvalue reference types.
5064 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
5065 convenience wrappers for lookup_reference_type().
5066 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
5067 reference kind parameter.
5068 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
5069 wrappers for lookup_reference_type().
5070 * guile/scm-type.c (gdbscm_type_reference): Use
5071 lookup_lvalue_reference_type() instead of lookup_reference_type().
5072 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
5073 * parse.c (follow_types): Likewise.
5074 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
5075 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
5077 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5078 (gdbpy_invoke_xmethod): Likewise.
5079 * stabsread.c: Provide extra argument to make_reference_type()
5081 * valops.c (value_ref, value_rtti_indirect_type): Use
5082 lookup_lvalue_reference_type() instead of lookup_reference_type().
5084 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5087 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
5088 (TYPE_IS_REFERENCE): New macro.
5089 (struct type): Add rvalue_reference_type field.
5090 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
5092 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
5094 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
5095 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
5096 New function definition.
5097 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
5098 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
5099 New function declaration.
5100 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
5101 * mi/mi-interp.h: New file.
5102 * solib.c (info_sharedlibrary_command): Replace for loop with
5104 * solib.h (update_solib_list): New function declaration.
5105 (so_list_head): Move macro.
5106 * solist.h (ALL_SO_LIBS): New macro.
5108 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
5110 * infcmd.c (post_create_inferior): Remove unused argument in
5112 * remote.c (remote_start_remote): Likewise.
5113 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
5114 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
5115 (enable_break): Likewise.
5116 * solib.c (update_solib_list): Remove unused target argument
5117 and its documentation.
5118 (solib_add): Remove unused target argument. Remove unused
5119 argument in call to update_solib_list.
5120 (info_sharedlibrary_command): Remove unused argument in call
5121 to update_solib_list.
5122 (sharedlibrary_command): Remove unused argument in call to
5124 (handle_solib_event): Likewise.
5125 (reload_shared_libraries): Likewise.
5126 * solib.h (solib_add): Remove unused target argument.
5128 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
5130 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
5131 (s390_displaced_step_fixup): Cover relative branches with the
5132 default fixup handling. This fixes lack of support for some
5133 relative branch instructions.
5135 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5137 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
5140 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5142 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
5143 i386_darwin_store_inferior_registers): Use ptid from regcache.
5145 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5147 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
5148 i386bsd_store_inferior_registers): Use ptid from regcache.
5150 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5152 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
5153 hppaobsd_store_registers): Use ptid from regcache.
5155 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5157 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
5158 hppanbsd_store_registers): Use ptid from regcache.
5160 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5162 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
5163 from regcache. Use get_ptrace_pid.
5165 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5167 * corelow.c (get_core_register_section): Use ptid from regcache,
5170 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5172 * bsd-uthread.c (bsd_uthread_fetch_registers,
5173 bsd_uthread_store_registers): Use ptid from regcache, set and
5174 restore inferior_ptid.
5176 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5178 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
5179 fetch_fp_regs, store_register, store_regs, store_fp_register,
5180 store_fp_regs): Use ptid from regcache.
5182 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5184 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
5185 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
5186 store_vfp_regs): Use ptid from regcache.
5188 2017-03-17 Pedro Alves <palves@redhat.com>
5191 * ser-base.c (ser_base_wait_for): Add comment.
5192 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
5194 * ser-unix.c (hardwire_raw): Remove reference to
5195 scb->current_timeout.
5196 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
5197 (hardwire_ops): Install ser_base_readchar instead of
5199 * serial.h (struct serial) <current_timeout, timeout_remaining>:
5202 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
5205 * python/lib/gdb/printer/bound_registers.py: Add support for
5208 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5210 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
5211 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
5212 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
5213 byte_offset to subobj_byte_offset. Fix the handling of
5214 DWARF_VALUE_STACK on big-endian targets when coming via an
5216 (dwarf2_evaluate_loc_desc): Adjust call to
5217 dwarf2_evaluate_loc_desc_full.
5218 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
5219 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
5221 2017-03-16 Yao Qi <yao.qi@linaro.org>
5223 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
5224 and REVSH instructions.
5226 2017-03-16 Yao Qi <yao.qi@linaro.org>
5228 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
5229 (arm_record_test): Declare.
5230 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
5231 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
5232 align with the manual.
5233 (thumb_record_misc): Adjust the code order to align with the
5235 (thumb2_record_decode_insn_handler): Fix instruction matching.
5236 (instruction_reader_thumb): New class.
5237 (arm_record_test): New function.
5239 2017-03-16 Yao Qi <yao.qi@linaro.org>
5241 * arm-tdep.c (abstract_memory_reader): New class.
5242 (instruction_reader): New class.
5243 (extract_arm_insn): Add argument 'reader'. Callers updated.
5244 (decode_insn): Likewise.
5246 2017-03-16 Doug Evans <dje@google.com>
5248 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
5249 member. Change type of TYPE member to SCM. All uses updated.
5250 (lsscm_make_lazy_string_smob): Add assert.
5251 (lsscm_make_lazy_string): Flag bad length values.
5252 (lsscm_elt_type): New function.
5253 (gdbscm_lazy_string_to_value): Rewrite to use
5254 lsscm_safe_lazy_string_to_value.
5255 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
5256 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
5257 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
5259 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
5260 * guile/scm-type.c (tyscm_scm_to_type): New function.
5262 2017-03-15 Doug Evans <dje@google.com>
5264 PR python/17728, python/18439, python/18779
5265 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
5266 member. Change type of TYPE member to PyObject *. All uses updated.
5267 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
5268 (gdbpy_create_lazy_string_object): Flag bad length values.
5269 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
5270 Handle typedefs in incoming type.
5271 (stpy_lazy_string_elt_type): New function.
5272 (gdbpy_extract_lazy_string): Call it.
5273 * python/py-value.c (valpy_lazy_string): Flag bad length values.
5274 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
5275 typedefs in incoming type.
5277 2017-03-16 Doug Evans <dje@google.com>
5279 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
5280 * guile/scm-type.c (tyscm_scm_to_type): New function.
5282 2017-03-16 Jiong Wang <jiong.wang@arm.com>
5284 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
5285 "ULONGEST" for "skip".
5287 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
5290 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
5291 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
5292 (inf_ptrace_peek_poke): ...here. New function. Now also loop
5293 over ptrace peek/poke until end of buffer or error.
5295 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
5297 * parse.c (length_of_subexp): Make static.
5298 * parser-defs.h (length_of_subexp): Remove.
5300 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
5302 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
5305 2017-03-14 Pedro Alves <palves@redhat.com>
5307 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
5308 (main): Use std::unique_ptr. Remove calls to
5309 cp_demangled_name_parse_free.
5311 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5313 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
5314 alphabsd_store_inferior_registers): Use regcache->ptid instead
5317 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5319 * aix-thread.c (aix_thread_fetch_registers,
5320 aix_thread_store_registers): Use regcache->ptid instead of
5323 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5325 * aarch64-linux-nat.c (fetch_gregs_from_thread,
5326 store_gregs_to_thread, fetch_fpregs_from_thread,
5327 store_fpregs_to_thread): Use regcache->ptid instead of
5330 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5332 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
5333 amd64_linux_fetch_inferior_registers): Use regcache->ptid
5334 instead of inferior_ptid.
5336 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5338 * target.c (target_fetch_registers, target_store_registers): Add
5341 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5343 * regcache.h (regcache_get_ptid): New function.
5344 * regcache.c (regcache_get_ptid): New function.
5346 2017-03-13 Mark Wielaard <mark@klomp.org>
5348 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
5350 2017-03-10 Keith Seitz <keiths@redhat.com>
5353 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
5355 2017-03-08 Pedro Alves <palves@redhat.com>
5358 * infrun.c (start_step_over, do_target_resume, resume)
5359 (restart_threads): Assert we're not resuming a thread that is
5360 meant to be stopped.
5361 (infrun_thread_stop_requested_callback): Delete.
5362 (infrun_thread_stop_requested): If the thread is internally
5363 stopped, queue a pending stop event and clear the thread's
5365 (handle_stop_requested): New function.
5366 (handle_syscall_event, handle_inferior_event_1): Use
5367 handle_stop_requested.
5368 (handle_stop_requested): New function.
5369 (handle_signal_stop): Set the thread's stop_signal here instead of
5371 (finish_step_over): Clear step over info unconditionally.
5372 (handle_signal_stop): If the user had interrupted the event
5373 thread, consider the stop a random signal.
5374 (handle_signal_stop) <signal arrived while stepping over
5375 breakpoint>: Don't restart threads here.
5376 (stop_waiting): Don't clear step-over info here.
5378 2017-03-08 Pedro Alves <palves@redhat.com>
5381 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
5382 goes to argument 2, not 1.
5384 2017-03-08 Pedro Alves <palves@redhat.com>
5387 * top.c (gdb_readline_wrapper): Avoid passing NULL to
5389 (command_line_input): Add comment.
5391 2017-03-08 Pedro Alves <palves@redhat.com>
5394 * tui/tui-file.c (tui_file::write): New.
5395 * tui/tui-file.h (tui_file): Override "write".
5396 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
5397 factored out from ...
5398 (tui_puts): ... here.
5399 (tui_putc): Use them.
5400 (tui_write): New function.
5401 * tui/tui-io.h (tui_write): Declare.
5403 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5405 * Makefile.in (SFILES): Replace "environ.c" with
5407 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
5408 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
5410 * common/environ.c: ... here.
5411 * environ.h: Moved to...
5412 * common/environ.h: ... here.
5414 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
5416 * gdbarch.sh (pstring_ptr): New static function.
5417 (gdbarch_disassembler_options): Use it.
5418 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
5419 not valid_disassembler_option->name.
5420 * gdbarch.c: Regenerate.
5422 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
5424 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
5426 2017-03-07 Pedro Alves <palves@redhat.com>
5428 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
5430 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
5432 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
5433 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
5434 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
5435 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
5437 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
5439 * xtensa-linux-nat.c (fetch_gregs): Remove const.
5441 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
5443 * remote.c (remote_add_target_side_commands): Use range-based
5446 2017-03-03 Yao Qi <yao.qi@linaro.org>
5449 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
5451 * valprint.c (common_val_print): Likewise.
5453 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
5455 * NEWS: Mention new set/show disassembler-options commands.
5456 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
5457 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
5458 (prospective_options): New static variable.
5459 (gdb_disassembler::gdb_disassembler): Initialize
5460 m_di.disassembler_options.
5461 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
5462 (get_disassembler_options): New function.
5463 (set_disassembler_options): Likewise.
5464 (set_disassembler_options_sfunc): Likewise.
5465 (show_disassembler_options_sfunc): Likewise.
5466 (disassembler_options_completer): Likewise.
5467 (_initialize_disasm): Likewise.
5468 * disasm.h (get_disassembler_options): New prototype.
5469 (set_disassembler_options): Likewise.
5470 * gdbarch.sh (gdbarch_disassembler_options): New variable.
5471 (gdbarch_verify_disassembler_options): Likewise.
5472 * gdbarch.c: Regenerate.
5473 * gdbarch.h: Likewise.
5474 * arm-tdep.c (num_disassembly_options): Delete.
5475 (set_disassembly_style): Likewise.
5476 (arm_disassembler_options): New static variable.
5477 (set_disassembly_style_sfunc): Convert short style name into long
5478 option name. Call set_disassembler_options.
5479 (show_disassembly_style_sfunc): New function.
5480 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
5481 set_gdbarch_verify_disassembler_options.
5482 (_initialize_arm_tdep): Delete regnames variable and update callers.
5483 (arm_disassembler_options): Initialize.
5484 (disasm_options): New variable.
5485 (num_disassembly_options): Rename from this...
5486 (num_disassembly_styles): ...to this. Compute by scanning through
5488 (valid_disassembly_styles): Initialize using disasm_options.
5489 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
5490 set_arm_regname_option.
5491 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
5492 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
5493 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
5494 set_gdbarch_verify_disassembler_options.
5495 * s390-tdep.c (s390_disassembler_options): New static variable.
5496 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
5497 set_gdbarch_verify_disassembler_options.
5499 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
5501 * remote.c (remote_add_target_side_condition): Remove "struct"
5502 keyword from range-based for loop.
5504 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
5506 * remote.c (remote_add_target_side_condition): Use range-based
5507 for loop. Update comment.
5509 2017-02-27 Yao Qi <yao.qi@linaro.org>
5511 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
5513 2017-02-26 Alan Hayward <alan.hayward@arm.com>
5515 * regcache.c (regcache_raw_update): New function.
5516 (regcache_raw_read): Move code to regcache_raw_update.
5517 * regcache.h (regcache_raw_update): New declaration.
5518 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
5520 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
5522 * dwarf2read.c (create_debug_type_hash_table): Initialize
5523 header.signature and header.type_offset_in_tu.
5525 2017-02-24 Pedro Alves <palves@redhat.com>
5527 * symtab.c (make_file_symbol_completion_list_1): Use
5528 add_symtab_completions.
5530 2017-02-24 Alan Hayward <alan.hayward@arm.com>
5532 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
5534 2017-02-24 Alan Hayward <alan.hayward@arm.com>
5536 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
5537 I386_MAX_REGISTER_SIZE.
5538 (i386_pseudo_register_write): Likewise.
5539 (i386_process_record): Likewise.
5540 * i387-tdep.c (i387_supply_xsave): Likewise.
5541 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
5542 (store_register): Likewise.
5544 2017-02-23 Pedro Alves <palves@redhat.com>
5546 * ada-lang.c: Include "common/function-view.h".
5547 (ada_iterate_over_symbols): Adjust to use function_view as
5549 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
5550 (ada_make_symbol_completion_list): Use a lambda.
5551 (ada_exc_search_name_matches): Delete.
5552 (name_matches_regex): New.
5553 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
5554 * compile/compile-c-support.c: Include "common/function-view.h".
5555 (print_one_macro): Change prototype to accept a ui_file pointer.
5556 (write_macro_definitions): Use a lambda.
5557 * dwarf2read.c: Include "common/function-view.h".
5558 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
5559 (dw2_expand_symtabs_matching): Adjust to use function_view as
5561 * language.h: Include "common/function-view.h".
5562 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
5563 function_view as callback type.
5564 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
5565 * linespec.c: Include "common/function-view.h".
5566 (collect_info::add_symbol): New method.
5567 (struct symbol_and_data_callback, iterate_inline_only, struct
5568 symbol_matcher_data, iterate_name_matcher): Delete.
5569 (iterate_over_all_matching_symtabs): Adjust to use function_view
5570 as callback type and lambdas.
5571 (iterate_over_file_blocks): Adjust to use function_view as
5573 (decode_compound_collector): Now a class with private fields.
5574 (decode_compound_collector::release_symbols): New method.
5575 (collect_one_symbol): Rename to...
5576 (decode_compound_collector::operator()): ... this and adjust.
5577 (lookup_prefix_sym): decode_compound_collector construction bits
5578 move to decode_compound_collector ctor. Pass the
5579 decode_compound_collector object directly as callback. Remove
5580 cleanups and use decode_compound_collector::release_symbols
5582 (symtab_collector): Now a class with private fields.
5583 (symtab_collector::release_symtabs): New method.
5584 (add_symtabs_to_list): Rename to...
5585 (symtab_collector::operator()): ... this and adjust.
5586 (collect_symtabs_from_filename): symtab_collector construction
5587 bits move to symtab_collector ctor. Pass the symtab_collector
5588 object directly as callback. Remove cleanups and use
5589 symtab_collector::release_symtabs instead.
5590 (collect_symbols): Delete.
5591 (add_matching_symbols_to_info): Use lambdas.
5592 * macrocmd.c (print_macro_callback): Delete.
5593 (info_macro_command): Use a lambda.
5594 (info_macros_command): Pass print_macro_definition as callable
5596 (print_one_macro): Remove 'ignore' parameter.
5597 (macro_list_command): Adjust.
5598 * macrotab.c (macro_for_each_data::fn): Now a function_view.
5599 (macro_for_each_data::user_data): Delete field.
5600 (foreach_macro): Adjust to call the function_view.
5601 (macro_for_each): Adjust to use function_view as callback type.
5602 (foreach_macro_in_scope): Adjust to call the function_view.
5603 (macro_for_each_in_scope): Adjust to use function_view as callback
5605 * macrotab.h: Include "common/function-view.h".
5606 (macro_callback_fn): Declare a prototype instead of a pointer.
5607 Remove "user_data" parameter.
5608 (macro_for_each, macro_for_each_in_scope): Adjust to use
5609 function_view as callback type.
5610 * psymtab.c (partial_map_expand_apply)
5611 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
5612 Adjust to use function_view as callback type and to return bool.
5613 (psym_expand_symtabs_matching): Adjust to use function_view as
5615 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
5616 to use function_view as callback type and to return bool.
5617 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
5619 * symfile.c (expand_symtabs_matching): Adjust to use function_view
5621 * symfile.h: Include "common/function-view.h".
5622 (expand_symtabs_file_matcher_ftype)
5623 (expand_symtabs_symbol_matcher_ftype)
5624 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
5626 (quick_symbol_functions::map_symtabs_matching_filename)
5627 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
5628 function_view as callback type and return bool.
5629 (expand_symtabs_matching): Adjust to use function_view as callback
5631 (maintenance_expand_name_matcher)
5632 (maintenance_expand_file_matcher): Delete.
5633 (maintenance_expand_symtabs): Use lambdas.
5634 * symtab.c (iterate_over_some_symtabs): Adjust to use
5635 function_view as callback types and return bool.
5636 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
5638 (lookup_symtab_callback): Delete.
5639 (lookup_symtab): Use a lambda.
5640 (iterate_over_symbols): Adjust to use function_view as callback
5642 (struct search_symbols_data, search_symbols_file_matches)
5643 (search_symbols_name_matches): Delete.
5644 (search_symbols): Use a pair of lambdas.
5645 (struct add_name_data, add_macro_name, symbol_completion_matcher)
5646 (symtab_expansion_callback): Delete.
5647 (default_make_symbol_completion_list_break_on_1): Use lambdas.
5648 * symtab.h: Include "common/function-view.h".
5649 (iterate_over_some_symtabs): Adjust to use function_view as
5650 callback type and return bool.
5651 (iterate_over_symtabs): Adjust to use function_view as callback
5653 (symbol_found_callback_ftype): Remove 'data' parameter and return
5655 (iterate_over_symbols): Adjust to use function_view as callback
5658 2017-02-23 Pedro Alves <palves@redhat.com>
5660 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
5661 (%.o) <unittests/%.c>: New pattern.
5662 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
5663 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
5664 * common/function-view.h: New file.
5665 * unittests/function-view-selftests.c: New file.
5666 * configure: Regenerate.
5668 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
5670 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
5672 * go32-nat.c (go32_thread_alive): Likewise.
5674 2017-02-23 Yao Qi <yao.qi@linaro.org>
5676 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
5679 2017-02-23 Yao Qi <yao.qi@linaro.org>
5681 * varobj.c (varobj_clear_saved_item): Use delete instead of
5683 (update_dynamic_varobj_children): Likewise.
5685 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5687 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
5689 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
5691 * common/enum-flags.h (enum_flags::enum_flags): Initialize
5692 m_enum_value to 0 in default constructor.
5694 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5696 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
5697 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
5698 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
5699 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
5700 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
5701 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
5702 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
5703 IS_STORE_CONDITIONAL_INSN.
5705 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5707 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
5709 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5711 * NEWS (Changes since GDB 7.12): Add DWARF-5.
5713 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5715 * dwarf2read.c (skip_one_die, read_attribute_value)
5716 (dwarf2_const_value_attr, dump_die_shallow)
5717 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5718 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
5720 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5722 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
5723 (dwarf_parse_macro_header): Accept DWARF version 5.
5724 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
5726 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5728 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
5730 * common/common-exceptions.h (enum errors): Likewise.
5731 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
5732 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
5733 (dwarf_expr_context::execute_stack_op): Likewise.
5734 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
5736 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
5737 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
5738 (show_entry_values_debug, call_site_to_target_addr)
5739 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
5740 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
5741 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
5742 (value_of_dwarf_block_entry, indirect_pieced_value)
5743 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
5744 (disassemble_dwarf_expression): Likewise.
5745 * dwarf2read.c (process_die, inherit_abstract_dies)
5746 (read_call_site_scope): Likewise.
5747 * gdbtypes.h (struct func_type, struct call_site_parameter)
5748 (struct call_site): Likewise.
5749 * stack.c (read_frame_arg): Likewise.
5750 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
5752 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5754 * defs.h (read_unsigned_leb128): New declaration.
5755 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
5756 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
5757 (dwarf2_find_location_expression): Call also
5758 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
5759 * dwarf2loc.h (dwarf2_version): New declaration.
5760 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
5762 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
5764 (struct dwop_section_names): Add loclists_dwo.
5765 (dwop_section_names): Add .debug_loclists.dwo.
5766 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
5767 (struct dwarf2_per_cu_data): Add dwarf_version.
5768 (struct dwo_sections): Add loclists.
5769 (struct attr_abbrev): Add implicit_const.
5770 (read_indirect_line_string): New declaration.
5771 (read_unsigned_leb128): Delete declaration.
5772 (rcuh_kind): New definition.
5773 (read_and_check_comp_unit_head): Change parameter
5774 is_debug_types_section to section_kind.
5775 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
5776 (read_comp_unit_head): Change parameter abfd to section, add parameter
5777 section_kind. Handle DWARF-5.
5778 (error_check_comp_unit_head): Accept also DWARF version 5.
5779 (read_and_check_comp_unit_head): Change parameter
5780 is_debug_types_section to section_kind.
5781 (read_and_check_type_unit_head): Delete function.
5782 (read_abbrev_offset): Handle DWARF-5.
5783 (create_debug_type_hash_table): Add parameter section_kind. Process
5784 only DW_UT_type. Use signature and type_offset_in_tu from struct
5786 (create_debug_types_hash_table): Update create_debug_type_hash_table
5788 (create_all_type_units): Call create_debug_type_hash_table.
5789 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
5790 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
5792 (skip_one_die): Handle DW_FORM_implicit_const.
5793 (dwarf2_rnglists_process): New function.
5794 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
5795 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
5796 (read_attribute_value): Handle DW_FORM_implicit_const,
5798 (read_attribute): Handle DW_FORM_implicit_const.
5799 (read_indirect_string_at_offset_from): New function from
5800 read_indirect_string_at_offset.
5801 (read_indirect_string_at_offset): Call
5802 read_indirect_string_at_offset_from.
5803 (read_indirect_line_string_at_offset): New function.
5804 (read_indirect_string): New function comment.
5805 (read_indirect_line_string): New function.
5806 (read_unsigned_leb128): Make it global.
5807 (dwarf2_string_attr): Handle DWARF-5.
5808 (add_include_dir_stub, read_formatted_entries): New functions.
5809 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
5811 (per_cu_header_read_in): Update read_comp_unit_head caller.
5812 (dwarf2_version): New function.
5813 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
5815 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
5818 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5820 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
5822 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5824 * dwarf2read.c (dwarf2_ranges_process): New function from
5826 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
5827 dwarf2_ranges_process.
5829 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5831 * dwarf2read.c (create_debug_type_hash_table): New function from
5832 create_debug_types_hash_table.
5833 (create_debug_types_hash_table): Call create_debug_type_hash_table.
5834 (create_all_type_units, open_and_init_dwo_file): Update
5835 create_debug_types_hash_table callers.
5837 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
5840 * fork-child.c (trace_start_error): Fix thinko. va_end should
5841 refer to 'ap', not 'args'.
5843 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
5844 Pedro Alves <palves@redhat.com>
5847 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
5849 * fork-child.c (trace_start_error): New function.
5850 (trace_start_error_with_name): Likewise.
5851 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
5852 * inf-ptrace.c (inf_ptrace_me): Likewise.
5853 * inferior.h (trace_start_error): New prototype.
5854 (trace_start_error_with_name): Likewise.
5856 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
5859 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
5860 NULL before using it.
5861 * symmisc.c (maintenance_print_symbols): Likewise.
5862 (maintenance_print_msymbols): Likewise.
5864 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5866 * NEWS: Add record Python bindings entry.
5868 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5870 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
5872 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
5873 * python/py-record-btrace.c, python/py-record-btrace.h,
5874 python/py-record-full.c, python/py-record-full.h: New file.
5875 * python/py-record.c: Add include for py-record-btrace.h and
5877 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
5878 recpy_instruction_history, recpy_function_call_history, recpy_begin,
5879 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
5880 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
5882 (gdbpy_initialize_btrace): New export.
5883 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
5885 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5887 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
5888 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
5889 * python/py-record.c: New file.
5890 * python/python-internal.h (gdbpy_start_recording,
5891 gdbpy_current_recording, gdpy_stop_recording,
5892 gdbpy_initialize_record): New export.
5893 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
5894 (python_GdbMethods): Add gdbpy_start_recording,
5895 gdbpy_current_recording and gdbpy_stop_recording.
5897 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5899 * record-btrace.c (record_btrace_record_method): New function.
5900 (init_record_btrace_ops): Initialize to_record_method.
5901 * record-full.c (record_full_record_method): New function.
5902 (init_record_full_ops, init_record_full_core_ops): Add
5903 record_full_record_method.
5904 * record.h (enum record_method): New enum.
5905 * target-debug.h (target_debug_print_enum_record_method: New define.
5906 * target-delegates.c: Regenerate.
5907 * target.c (target_record_method): New function.
5908 * target.h: Include record.h.
5909 (struct target_ops) <to_record_method>: New field.
5910 (target_record_method): New export.
5912 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5914 * record.h (record_start, record_stop): New export.
5915 * record.c (record_start, record_stop): New function.
5917 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5919 * btrace.c (btrace_fetch): Copy function call segments pointer
5921 (btrace_clear): Clear the vector.
5922 (btrace_find_insn_by_number): Use binary search to find the correct
5923 function call segment.
5924 * btrace.h (brace_fun_p): New typedef.
5925 (struct btrace_thread_info) <functions>: New field.
5927 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5929 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
5930 * btrace.c (btrace_decode_error): ... here. New function.
5931 * btrace.h (btrace_decode_error): New export.
5933 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5935 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
5936 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
5937 btrace_find_insn_by_number): Remove special case for gaps.
5938 * btrace.h (btrace_insn_get_error): New export.
5939 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
5940 * record-btrace.c (btrace_insn_history): Print number for gaps.
5941 (record_btrace_info, record_btrace_goto): Handle gaps.
5943 2017-02-14 Tom Tromey <tom@tromey.com>
5946 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
5948 * python/py-evts.c (gdbpy_initialize_py_events): Add
5949 before_prompt registry.
5950 * python/py-events.h (events_object) <before_prompt>: New field.
5952 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
5954 * btrace.c (ftrace_new_switch): Preserve up link and flags.
5956 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
5958 * symfile (_initialize_symfile): Add usage text to the load command's
5961 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
5963 * utils.c (defaulted_query): Don't query on secondary UIs.
5965 2017-02-10 Tom Tromey <tom@tromey.com>
5967 * rust-lang.c (rust_get_disr_info): Remove unused variable.
5969 2017-02-10 Tom Tromey <tom@tromey.com>
5971 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
5973 * python/py-type.c (typy_legacy_template_argument): Remove
5974 unnecessary "cleanup" local.
5976 2017-02-10 Tom Tromey <tom@tromey.com>
5978 * python/python.c (do_start_initialization): New function, from
5980 (_initialize_python): Call do_start_initialization.
5981 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
5984 2017-02-10 Tom Tromey <tom@tromey.com>
5986 * python/py-prettyprint.c (pretty_print_one_value): Use
5989 2017-02-10 Tom Tromey <tom@tromey.com>
5991 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
5992 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
5994 * python/py-type.c (field_new): Use gdbpy_ref.
5995 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
5997 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
5998 (py_free_pspace): Likewise.
5999 (pspace_to_pspace_object): Likewise.
6000 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
6001 (py_free_objfile): Likewise.
6002 (objfile_to_objfile_object): Likewise.
6003 * python/py-inferior.c (delete_thread_object): Use
6005 (infpy_read_memory): Likewise.
6006 (py_free_inferior): Likewise.
6007 * python/py-evtregistry.c (create_eventregistry_object): Use
6009 * python/py-event.c (create_event_object): Use gdbpy_ref.
6011 2017-02-10 Tom Tromey <tom@tromey.com>
6013 * python/py-ref.h (gdbpy_ref_policy): Now a template.
6014 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
6016 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
6017 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
6018 python/py-exitedevent.c, python/py-finishbreakpoint.c,
6019 python/py-framefilter.c, python/py-function.c,
6020 python/py-inferior.c, python/py-infevents.c,
6021 python/py-linetable.c, python/py-newobjfileevent.c,
6022 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
6023 python/py-signalevent.c, python/py-stopevent.c,
6024 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
6025 python/py-unwind.c, python/py-utils.c, python/py-value.c,
6026 python/py-varobj.c, python/py-xmethods.c, python/python.c,
6027 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
6029 2017-02-10 Tom Tromey <tom@tromey.com>
6031 * ui-out.h (ui_out_emit_type): New class.
6032 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
6033 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
6034 and ui_out_emit_tuple.
6035 (enumerate_locals): Likewise.
6036 (py_mi_print_variables, py_print_locals, py_print_args): Use
6038 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
6040 * common/gdb_optional.h: New file.
6042 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
6044 * MAINTAINERS (Write After Approval): Update my e-mail address.
6046 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
6049 * breakpoint.c (_initialize_breakpoint): Update the help description
6050 of the 'commands' command to indicate that it takes a list argument.
6052 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
6054 * interps.c (current_interp_set_logging): Remove "return".
6056 2017-02-09 Gary Benson <gbenson@redhat.com>
6058 * symtab.c (add_symtab_completions): Prevent NULL pointer
6061 2017-02-08 Pedro Alves <palves@redhat.com>
6063 * interps.c (interp::interp): Remove reference to quiet_p.
6064 (interp_set): Make static. Remove dead "Switching to" output
6066 (interp_quiet_p, interp_set_quiet): Delete.
6067 (interpreter_exec_cmd): Don't set the interpreter quiet.
6068 * interps.h (interp_quiet_p): Make static.
6069 (class interp) <quiet_p>: Remove field
6071 2017-02-08 Jerome Guitton <guitton@adacore.com>
6073 * cli/cli-decode.c (find_command_name_length): Make it extern.
6074 * cli/cli-decode.h (find_command_name_length): Declare.
6075 * cli/cli-script.c (command_name_equals, line_first_arg):
6077 (process_next_line): Use cli-decode to parse command names.
6078 (build_command_line): Make args a constant pointer.
6080 2017-02-08 Jerome Guitton <guitton@adacore.com>
6082 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
6083 Remove case-insensitive search.
6085 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
6087 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
6088 at the end of the line. Avoids an ARI warning.
6090 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
6092 * NEWS: Mention support for record/replay of Intel 64 rdrand and
6093 rdseed instructions.
6094 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
6096 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
6099 Provide and use sparc32 and sparc64 target description XML files.
6100 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
6101 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
6102 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
6103 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
6104 * features/sparc/sparc32-solaris.xml: New file.
6105 * features/sparc/sparc64-solaris.xml: New file.
6106 * features/sparc/sparc32-solaris.c: Generated.
6107 * features/sparc/sparc64-solaris.c: Generated.
6108 * sparc-tdep.h: Account for differences in target descriptions.
6109 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
6110 (sparc32_register_type): Use target provided registers.
6111 (validate_tdesc_registers): New function.
6112 (sparc32_gdbarch_init): Use tdesc_has_registers.
6113 Set pseudoregister functions.
6114 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
6115 (sparc64_register_type): Use target provided registers.
6116 (sparc64_init_abi): Set pseudoregister functions.
6118 2017-02-03 Tom Tromey <tom@tromey.com>
6121 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
6122 with a single member.
6124 2017-02-03 Pedro Alves <palves@redhat.com>
6126 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
6127 (cli_interp_base::~cli_interp_base): New.
6128 (cli_interp): New struct.
6129 (as_cli_interp): Cast the interp itself to cli_interp.
6130 (cli_interpreter_pre_command_loop): Rename to ...
6131 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
6133 (cli_interpreter_init): Rename to ...
6134 (cli_interp::init): ... this. Remove 'self' parameter. Use
6135 boolean. Make extern.
6136 (cli_interpreter_resume): Rename to ...
6137 (cli_interp::resume): ... this. Remove 'data' parameter. Make
6139 (cli_interpreter_suspend): Rename to ...
6140 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
6142 (cli_interpreter_exec): Rename to ...
6143 (cli_interp::exec): ... this. Remove 'data' parameter. Make
6145 (cli_interpreter_supports_command_editing): Rename to ...
6146 (cli_interp_base::supports_command_editing): ... this. Remove
6147 'interp' parameter. Make extern.
6148 (cli_ui_out): Rename to ...
6149 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
6151 (cli_set_logging): Rename to ...
6152 (cli_interp_base::set_logging): ... this. Remove 'interp'
6153 parameter. Make extern.
6154 (cli_interp_procs): Delete.
6155 (cli_interp_factory): Adjust to use "new".
6156 * cli/cli-interp.h: Include "interps.h".
6157 (struct cli_interp_base): New struct.
6158 * interps.c (struct interp): Delete. Fields moved to interps.h.
6159 (interp_new): Delete.
6160 (interp::interp, interp::~interp): New.
6161 (interp_set): Use bool, and return void. Assume the interpreter
6162 has suspend, init and resume methods, and that the all return
6164 (set_top_level_interpreter): interp_set returns void.
6165 (interp_ui_out): Adapt.
6166 (current_interp_set_logging): Adapt.
6167 (interp_data): Delete.
6168 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
6169 (interp_exec): Adapt.
6170 (top_level_interpreter_data): Delete.
6171 * interps.h (interp_init_ftype, interp_resume_ftype)
6172 (interp_suspend_ftype, interp_exec_ftype)
6173 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
6174 (class interp): New.
6175 (interp_new): Delete.
6176 (interp_set): Now returns void. Use bool.
6177 (interp_data, top_level_interpreter_data): Delete.
6178 * mi/mi-common.h: Include interps.h.
6179 (class mi_interp): Inherit from interp. Define a ctor. Declare
6180 init, resume, suspect, exec, interp_ui_out, set_logging and
6181 pre_command_loop methods.
6182 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
6183 (mi_interpreter_init): Rename to ...
6184 (mi_interp::init): ... this. Remove the 'interp' parameter, use
6185 bool, return void and make extern. Adjust.
6186 (mi_interpreter_resume): ... Rename to ...
6187 (mi_interp::resume): ... this. Remove the 'data' parameter,
6188 return void and make extern. Adjust.
6189 (mi_interpreter_suspend): ... Rename to ...
6190 (mi_interp::suspend): ... this. Remove the 'data' parameter,
6191 return void and make extern. Adjust.
6192 (mi_interpreter_exec): ... Rename to ...
6193 (mi_interp::exec): ... this. Remove the 'data' parameter and make
6195 (mi_interpreter_pre_command_loop): ... Rename to ...
6196 (mi_interp::pre_command_loop): ... this. Remove the 'self'
6197 parameter and make extern.
6198 (mi_on_normal_stop_1): Adjust.
6199 (mi_ui_out): Rename to ...
6200 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
6201 parameter and make extern. Adjust.
6202 (mi_set_logging): Rename to ...
6203 (mi_interp::set_logging): ... this. Remove the 'interp'
6204 parameter and make extern. Adjust.
6205 (mi_interp_procs): Delete.
6206 (mi_interp_factory): Adjust to use 'new'.
6207 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
6208 (mi_print_exception, mi_execute_command, mi_load_progress):
6210 * tui/tui-interp.c (tui_interp): New class.
6211 (as_tui_interp): Return a tui_interp pointer.
6212 (tui_on_normal_stop, tui_on_signal_received)
6213 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
6214 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
6215 to use interp::interp_ui_out.
6216 (tui_init): Rename to ...
6217 (tui_interp::init): ... this. Remove the 'self' parameter, use
6218 bool, return void and make extern. Adjust.
6219 (tui_resume): Rename to ...
6220 (tui_interp::resume): ... this. Remove the 'data' parameter,
6221 return void and make extern. Adjust.
6222 (tui_suspend): Rename to ...
6223 (tui_interp::suspend): ... this. Remove the 'data' parameter,
6224 return void and make extern. Adjust.
6225 (tui_ui_out): Rename to ...
6226 (tui_interp::interp_ui_out): ... this. Remove the 'self'
6227 parameter, and make extern. Adjust.
6228 (tui_exec): Rename to ...
6229 (tui_interp::exec): ... this. Remove the 'data' parameter and
6231 (tui_interp_procs): Delete.
6232 (tui_interp_factory): Use "new".
6234 2017-02-02 Tom Tromey <tom@tromey.com>
6236 * rust-exp.y (ends_raw_string, space_then_number)
6237 (rust_identifier_start_p): Return bool.
6238 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
6239 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
6240 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
6241 (rust_chartype_p): Return bool.
6242 (val_print_struct, rust_print_struct_def, rust_print_type):
6244 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
6247 2017-02-02 Tom Tromey <tom@tromey.com>
6249 * rust-lang.c: Reindent.
6251 2017-02-02 Tom Tromey <tom@tromey.com>
6253 * rust-lang.h (rust_crate_for_block): Update.
6254 * rust-lang.c (rust_crate_for_block): Return std::string.
6255 (rust_get_disr_info): Use std:;string, not
6256 gdb::unique_xmalloc_ptr.
6257 * rust-exp.y (crate_name): Update.
6259 2017-02-02 Pedro Alves <palves@redhat.com>
6261 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
6262 field out of gdb_disassembler_test and make it static.
6264 2017-02-02 Pedro Alves <palves@redhat.com>
6266 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
6267 mi1_interp and mi_interp fields.
6269 2017-02-02 Pedro Alves <palves@redhat.com>
6271 * cli/cli-interp.c (struct saved_output_files, saved_output):
6272 Moved from cli/cli-logging.c.
6273 (cli_set_logging): New function.
6274 (cli_interp_procs): Install cli_set_logging.
6275 * cli/cli-interp.h (make_logging_output, cli_set_logging):
6277 * cli/cli-logging.c (struct saved_output_files, saved_output):
6278 Moved to cli/cli-interp.c.
6279 (pop_output_files): Don't save outputs here.
6280 (make_logging_output): New function.
6281 (handle_redirections): Don't build tee nor save previous outputs
6283 * interps.c (current_interp_set_logging): Change prototype.
6284 Assume there's always a set_logging_proc method installed.
6285 * interps.h (interp_set_logging_ftype): Change prototype.
6286 (current_interp_set_logging): Change prototype and adjust comment.
6287 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
6288 use make_logging_output.
6289 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
6290 2017-02-02 Pedro Alves <palves@redhat.com>
6292 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
6294 (set_logging_overwrite): ... here.
6295 (logging_no_redirect_file): Delete.
6296 (set_logging_redirect): Don't handle redirection on the fly.
6297 Instead warn that "logging off" / "logging on" is necessary.
6298 (pop_output_files): Delete references to logging_no_redirect_file.
6299 (show_logging_command): Always speak in terms of what will happen
6300 once logging is reenabled.
6302 2017-02-02 Pedro Alves <palves@redhat.com>
6304 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
6306 2017-02-02 Pedro Alves <palves@redhat.com>
6308 * disasm.c (gdb_pretty_print_insn): Rename to ...
6309 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
6310 Remove gdbarch parameter. Adapt to clear the object's buffers
6311 instead of allocating new buffers, and to print using the object's
6312 gdb_disassembler instead of calling gdb_print_insn.
6313 (dump_insns): Use gdb_pretty_print_disassembler.
6314 * disasm.h (gdb_pretty_print_insn): Delete declaration.
6315 (gdb_pretty_print_disassembler): New class.
6316 * record-btrace.c (btrace_insn_history): Use
6317 gdb_pretty_print_disassembler.
6319 2017-02-02 Pedro Alves <palves@redhat.com>
6321 * ada-lang.c (type_as_string): Use string_file.
6322 * ada-valprint.c (ada_print_floating): Use string_file.
6323 * ada-varobj.c (ada_varobj_scalar_image)
6324 (ada_varobj_get_value_image): Use string_file.
6325 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
6326 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
6327 * breakpoint.c (update_inserted_breakpoint_locations)
6328 (insert_breakpoint_locations, reattach_breakpoints)
6329 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
6330 (print_it_watchpoint): Use string_file.
6331 (save_breakpoints): Use stdio_file.
6332 * c-exp.y (oper): Use string_file.
6333 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
6335 (pop_output_files): Use delete.
6336 (handle_redirections): Use stdio_file and tee_file.
6337 * cli/cli-setshow.c (do_show_command): Use string_file.
6338 * compile/compile-c-support.c (c_compute_program): Use
6340 * compile/compile-c-symbols.c (generate_vla_size): Take a
6341 'string_file &' instead of a 'ui_file *'.
6342 (generate_c_for_for_one_variable): Take a 'string_file &' instead
6343 of a 'ui_file *'. Use string_file.
6344 (generate_c_for_variable_locations): Take a 'string_file &'
6345 instead of a 'ui_file *'.
6346 * compile/compile-internal.h (generate_c_for_for_one_variable):
6347 Take a 'string_file &' instead of a 'ui_file *'.
6348 * compile/compile-loc2c.c (push, pushf, unary, binary)
6349 (print_label, pushf_register_address, pushf_register)
6350 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
6351 'ui_file *'. Adjust.
6352 * compile/compile.c (compile_to_object): Use string_file.
6353 * compile/compile.h (compile_dwarf_expr_to_c)
6354 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
6356 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
6357 (replace_typedefs_qualified_name): Use string_file and
6359 * disasm.c (gdb_pretty_print_insn): Use string_file.
6360 (gdb_disassembly): Adjust reference the null_stream global.
6361 (do_ui_file_delete): Delete.
6362 (gdb_insn_length): Use null_stream.
6363 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
6364 * dwarf2loc.c (dwarf2_compile_property_to_c)
6365 (locexpr_generate_c_location, loclist_generate_c_location): Take a
6366 'string_file &' instead of a 'ui_file *'.
6367 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
6368 * dwarf2read.c (do_ui_file_peek_last): Delete.
6369 (dwarf2_compute_name): Use string_file.
6370 * event-top.c (gdb_setup_readline): Use stdio_file.
6371 * gdbarch.sh (verify_gdbarch): Use string_file.
6372 * gdbtypes.c (safe_parse_type): Use null_stream.
6373 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
6375 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
6376 'string_file *' instead of a 'ui_file *'.
6377 (gdbscm_arch_disassemble): Use string_file.
6378 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
6379 * guile/scm-ports.c (class ioscm_file_port): Now a class that
6380 inherits from ui_file.
6381 (ioscm_file_port_delete, ioscm_file_port_rewind)
6382 (ioscm_file_port_put): Delete.
6383 (ioscm_file_port_write): Rename to ...
6384 (ioscm_file_port::write): ... this. Remove file_port_magic
6386 (ioscm_file_port_new): Delete.
6387 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
6389 * guile/scm-type.c (tyscm_type_name): Use string_file.
6390 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
6392 * infcmd.c (print_return_value_1): Use string_file.
6393 * infrun.c (print_target_wait_results): Use string_file.
6394 * language.c (add_language): Use string_file.
6395 * location.c (explicit_to_string_internal): Use string_file.
6396 * main.c (captured_main_1): Use null_file.
6397 * maint.c (maintenance_print_architecture): Use stdio_file.
6398 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
6399 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
6400 event_channel>: Change type to mi_console_file pointer.
6401 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
6402 (mi_console_file_delete): Delete.
6403 (struct mi_console_file): Delete.
6404 (mi_console_file_magic): Delete.
6405 (mi_console_file_new): Delete.
6406 (mi_console_file::mi_console_file): New.
6407 (mi_console_file_delete): Delete.
6408 (mi_console_file_fputs): Delete.
6409 (mi_console_file::write): New.
6410 (mi_console_raw_packet): Delete.
6411 (mi_console_file::flush): New.
6412 (mi_console_file_flush): Delete.
6413 (mi_console_set_raw): Rename to ...
6414 (mi_console_file::set_raw): ... this.
6415 * mi/mi-console.h (class mi_console_file): New class.
6416 (mi_console_file_new, mi_console_set_raw): Delete.
6417 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
6418 (mi_set_logging): Use delete and tee_file. Adjust.
6419 * mi/mi-main.c (output_register): Use string_file.
6420 (mi_cmd_data_evaluate_expression): Use string_file.
6421 (mi_cmd_data_read_memory): Use string_file.
6422 (mi_cmd_execute, print_variable_or_computed): Use string_file.
6423 * mi/mi-out.c (mi_ui_out::main_stream): New.
6424 (mi_ui_out::rewind): Use main_stream and
6426 (mi_ui_out::put): Use main_stream and string_file.
6427 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
6428 Allocate a 'string_file' instead.
6429 (mi_out_new): Don't allocate a mem_fileopen stream here.
6430 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
6431 (mi_ui_out::main_stream): Declare method.
6432 * printcmd.c (eval_command): Use string_file.
6433 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
6434 * python/py-arch.c (archpy_disassemble): Use string_file.
6435 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
6436 * python/py-frame.c (frapy_str): Use string_file.
6437 * python/py-framefilter.c (py_print_type, py_print_single_arg):
6439 * python/py-type.c (typy_str): Use string_file.
6440 * python/py-unwind.c (unwind_infopy_str): Use string_file.
6441 * python/py-value.c (valpy_str): Use string_file.
6442 * record-btrace.c (btrace_insn_history): Use string_file.
6443 * regcache.c (regcache_print): Use stdio_file.
6444 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
6445 * remote.c (escape_buffer): Use string_file.
6446 * rust-lang.c (rust_get_disr_info): Use string_file.
6447 * serial.c (serial_open_ops_1): Use stdio_file.
6448 (do_serial_close): Use delete.
6449 * stack.c (print_frame_arg): Use string_file.
6450 (print_frame_args): Remove local mem_fileopen stream, not used.
6451 (print_frame): Use string_file.
6452 * symmisc.c (maintenance_print_symbols): Use stdio_file.
6453 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
6454 Take a 'string_file *' instead of a 'ui_file *'.
6455 * top.c (new_ui): Use stdio_file and stderr_file.
6456 (free_ui): Use delete.
6457 (execute_command_to_string): Use string_file.
6458 (quit_confirm): Use string_file.
6459 * tracepoint.c (collection_list::append_exp): Use string_file.
6460 * tui/tui-disasm.c (tui_disassemble): Use string_file.
6461 * tui/tui-file.c: Don't include "ui-file.h".
6462 (enum streamtype, struct tui_stream): Delete.
6463 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
6464 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
6465 (tui_file::tui_file): New method.
6466 (tui_file_fputs): Delete.
6467 (tui_file_get_strbuf): Delete.
6468 (tui_file::puts): New method.
6469 (tui_file_adjust_strbuf): Delete.
6470 (tui_file_flush): Delete.
6471 (tui_file::flush): New method.
6472 * tui/tui-file.h: Tweak intro comment.
6474 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
6475 (tui_file_adjust_strbuf): Delete declarations.
6476 (class tui_file): New class.
6477 * tui/tui-io.c (tui_initialize_io): Use tui_file.
6478 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
6479 (tui_register_format): Use string_stream.
6480 * tui/tui-stack.c (tui_make_status_line): Use string_file.
6481 (tui_get_function_from_frame): Use string_file.
6482 * typeprint.c (type_to_string): Use string_file.
6483 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
6484 (null_stream): New global.
6485 (ui_file_delete): Delete.
6486 (ui_file::ui_file): New.
6487 (null_file_isatty): Delete.
6488 (ui_file::~ui_file): New.
6489 (null_file_rewind): Delete.
6490 (ui_file::printf): New.
6491 (null_file_put): Delete.
6492 (null_file_flush): Delete.
6493 (ui_file::putstr): New.
6494 (null_file_write): Delete.
6495 (ui_file::putstrn): New.
6496 (null_file_read): Delete.
6497 (ui_file::putc): New.
6498 (null_file_fputs): Delete.
6499 (null_file_write_async_safe): Delete.
6500 (ui_file::vprintf): New.
6501 (null_file_delete): Delete.
6502 (null_file::write): New.
6503 (null_file_fseek): Delete.
6504 (null_file::puts): New.
6505 (ui_file_data): Delete.
6506 (null_file::write_async_safe): New.
6507 (gdb_flush, ui_file_isatty): Adjust.
6508 (ui_file_put, ui_file_rewind): Delete.
6509 (ui_file_write): Adjust.
6510 (ui_file_write_for_put): Delete.
6511 (ui_file_write_async_safe, ui_file_read): Adjust.
6512 (ui_file_fseek): Delete.
6513 (fputs_unfiltered): Adjust.
6514 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
6515 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
6516 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
6517 (set_ui_file_data): Delete.
6518 (string_file::~string_file, string_file::write)
6519 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
6520 (do_ui_file_as_string, ui_file_as_string): Delete.
6521 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
6522 (struct mem_file): Delete.
6523 (mem_file_new): Delete.
6524 (stdio_file::stdio_file): New.
6525 (mem_file_delete): Delete.
6526 (stdio_file::stdio_file): New.
6527 (mem_fileopen): Delete.
6528 (stdio_file::~stdio_file): New.
6529 (mem_file_rewind): Delete.
6530 (stdio_file::set_stream): New.
6531 (mem_file_put): Delete.
6532 (stdio_file::open): New.
6533 (mem_file_write): Delete.
6534 (stdio_file_magic, struct stdio_file): Delete.
6535 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
6536 (stdio_file::flush): New.
6537 (stdio_file_read): Rename to ...
6538 (stdio_file::read): ... this. Adjust.
6539 (stdio_file_write): Rename to ...
6540 (stdio_file::write): ... this. Adjust.
6541 (stdio_file_write_async_safe): Rename to ...
6542 (stdio_file::write_async_safe) ... this. Adjust.
6543 (stdio_file_fputs): Rename to ...
6544 (stdio_file::puts) ... this. Adjust.
6545 (stdio_file_isatty): Delete.
6546 (stdio_file_fseek): Delete.
6547 (stdio_file::isatty): New.
6548 (stderr_file_write): Rename to ...
6549 (stderr_file::write) ... this. Adjust.
6550 (stderr_file_fputs): Rename to ...
6551 (stderr_file::puts) ... this. Adjust.
6552 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
6553 (stderr_file::stderr_file): New.
6554 (tee_file_magic): Delete.
6555 (struct tee_file): Delete.
6556 (tee_file::tee_file): New.
6557 (tee_file_new): Delete.
6558 (tee_file::~tee_file): New.
6559 (tee_file_delete): Delete.
6560 (tee_file_flush): Rename to ...
6561 (tee_file::flush): ... this. Adjust.
6562 (tee_file_write): Rename to ...
6563 (tee_file::write): ... this. Adjust.
6564 (tee_file::write_async_safe): New.
6565 (tee_file_fputs): Rename to ...
6566 (tee_file::puts): ... this. Adjust.
6567 (tee_file_isatty): Rename to ...
6568 (tee_file::isatty): ... this. Adjust.
6569 * ui-file.h (struct obstack, struct ui_file): Don't
6571 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
6572 (ui_file_write_ftype)
6573 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
6574 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
6575 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
6576 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
6577 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
6578 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
6579 (set_ui_file_fseek): Delete.
6580 (ui_file_data, ui_file_delete, ui_file_rewind)
6581 (struct ui_file): New.
6583 (class null_file): New.
6584 (null_stream): Declare.
6585 (ui_file_write_for_put, ui_file_put): Delete.
6586 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
6588 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
6589 (gdb_fopen, tee_file_new): Delete.
6590 (struct string_file): New.
6591 (struct stdio_file): New.
6592 (stdio_file_up): New.
6593 (struct stderr_file): New.
6594 (class tee_file): New.
6595 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
6596 of a 'ui_file *'. Adjust.
6597 * ui-out.h (class ui_out) <field_stream>: Likewise.
6598 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
6599 (null_stream): Delete.
6600 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
6602 * utils.h (struct ui_file): Delete forward declaration..
6603 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
6604 (error_stream): Take a 'string_file &' instead of a
6606 * varobj.c (varobj_value_get_print_value): Use string_file.
6607 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
6608 * gdbarch.c: Regenerate.
6610 2017-02-02 Pedro Alves <palves@redhat.com>
6612 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
6613 (gdb_pretty_print_insn): ... this. Now a free function. Add back
6614 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
6615 Adjust to call gdb_print_insn instead of
6616 gdb_disassembler::print_insn.
6617 (dump_insns, do_mixed_source_and_assembly_deprecated)
6618 (do_mixed_source_and_assembly, do_assembly_only): Add back a
6619 'gdbarch' parameter. Remove gdb_disassembler parameter.
6620 (gdb_disassembly): Don't allocate a gdb_disassembler here.
6621 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
6623 (gdb_pretty_print_insn): Re-add declaration.
6624 * record-btrace.c (btrace_insn_history): Don't allocate a
6625 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
6627 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
6629 * disasm.h (gdb_disassembly): Remove file_string parameter.
6630 * disasm.c (gdb_disassembly): Likewise.
6631 * cli/cli-cmds.c (print_disassembly): Adapt.
6632 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
6633 * stack.c (do_gdb_disassembly): Likewise.
6635 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
6637 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
6638 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
6639 targets. And if the implicit value is longer than needed, extract
6640 the first bytes instead of the "least significant" ones.
6642 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
6644 * btrace.c (btrace_enable): Do not call btrace_add_pc for
6645 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
6646 (btrace_fetch): Assert can_access_registers_ptid.
6647 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
6648 validate_registers_access.
6650 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
6652 * gdbthread.h (can_access_registers_ptid): New.
6653 * thread.c (can_access_registers_ptid): New.
6655 2017-02-01 Pedro Alves <palves@redhat.com>
6657 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
6659 2017-01-31 Pedro Alves <palves@redhat.com>
6661 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
6664 2017-01-31 Pedro Alves <palves@redhat.com>
6666 * stack.c (print_frame_args): Remove local mem_fileopen stream,
6669 2017-01-31 Pedro Alves <palves@redhat.com>
6671 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
6673 2017-01-31 Pedro Alves <palves@redhat.com>
6675 * common/scoped_restore.h
6676 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
6677 change the value's parameter type to T2.
6678 (make_scoped_restore): Likewise.
6680 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6681 Richard Henderson <rth@redhat.com>
6683 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
6684 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
6685 GS_BASE for older kernels.
6686 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
6687 GS_BASE for older kernels.
6688 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
6689 and GS_BASE to the offset table.
6690 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
6691 system register group.
6692 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
6694 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
6696 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
6697 AMD64_GSBASE_REGNUM.
6698 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
6699 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
6700 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
6701 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
6702 i386/64bit-segments.xml in those rules.
6703 * features/i386/64bit-segments.xml: New file.
6704 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
6705 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
6706 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
6707 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
6708 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
6709 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
6710 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
6711 * features/i386/amd64-avx-linux.c: Regenerated.
6712 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
6713 * features/i386/amd64-avx-mpx.c: Regenerated.
6714 * features/i386/amd64-avx512-linux.c: Regenerated.
6715 * features/i386/amd64-linux.c: Regenerated.
6716 * features/i386/amd64-mpx-linux.c: Regenerated.
6717 * features/i386/i386-avx-mpx-linux.c: Regenerated.
6718 * features/i386/i386-avx-mpx.c: Regenerated.
6719 * features/i386/x32-avx-linux.c: Regenerated.
6720 * features/i386/x32-avx512-linux.c: Regenerated.
6721 * regformats/i386/amd64-avx-linux.dat: Regenerated.
6722 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
6723 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
6724 * regformats/i386/amd64-linux.dat: Regenerated.
6725 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
6726 * regformats/i386/x32-avx-linux.dat: Regenerated.
6727 * regformats/i386/x32-avx512-linux.dat: Regenerated.
6728 * regformats/i386/x32-linux.dat: Regenerated.
6730 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6732 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
6733 Set to AMD64_NUM_REGS.
6735 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6737 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
6738 that checks validity of a register number.
6740 2017-01-27 Kees Cook <keescook@google.com>
6742 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
6743 fetch_fpregs if target has fpa registers.
6744 (arm_linux_store_inferior_registers): Call store_fpregs if target
6747 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
6749 * cris-tdep.c (cris_gdbarch_init): Remove check for
6750 info.byte_order and force it to BFD_ENDIAN_LITTLE.
6752 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
6754 * corelow.c (get_core_register_section): Check for regset
6755 existence before checking for REGSET_VARIABLE_SIZE.
6757 2017-01-26 Yao Qi <yao.qi@linaro.org>
6758 Pedro Alves <palves@redhat.com>
6761 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
6762 call memory_error, save memaddr instead.
6763 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
6764 negative, cal memory_error.
6765 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
6767 2017-01-26 Yao Qi <yao.qi@linaro.org>
6769 * disasm-selftests.c (memory_error_test): New function.
6770 (_initialize_disasm_selftests): Register memory_error_test.
6772 2017-01-26 Yao Qi <yao.qi@linaro.org>
6774 * Makefile.in (SFILES): Add disasm-selftests.c and
6776 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
6777 * disasm-selftests.c: New file.
6778 * selftest-arch.c: New file.
6779 * selftest-arch.h: New file.
6781 2017-01-26 Yao Qi <yao.qi@linaro.org>
6783 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
6784 to bfd_arch_mep. Don't return 0 if section is not
6785 found. Call print_insn_mep.
6787 2017-01-26 Pedro Alves <palves@redhat.com>
6788 Yao Qi <yao.qi@linaro.org>
6790 * arm-tdep.c: Include "disasm.h".
6791 (gdb_print_insn_arm): Update code to get gdbarch.
6792 * disasm.c (dis_asm_read_memory): Change it to
6793 gdb_disassembler::dis_asm_read_memory.
6794 (dis_asm_memory_error): Likewise.
6795 (dis_asm_print_address): Likewise.
6796 (gdb_pretty_print_insn): Change it to
6797 gdb_disassembler::pretty_print_insn.
6798 (dump_insns): Add one argument gdb_disassemlber. All
6800 (do_mixed_source_and_assembly_deprecated): Likewise.
6801 (do_mixed_source_and_assembly): Likewise.
6802 (do_assembly_only): Likewise.
6803 (gdb_disassembler::gdb_disassembler): New.
6804 (gdb_disassembler::print_insn): New.
6805 * disasm.h (class gdb_disassembler): New.
6806 (gdb_pretty_print_insn): Remove declaration.
6807 (gdb_disassemble_info): Likewise.
6808 * guile/scm-disasm.c (class gdbscm_disassembler): New.
6809 (gdbscm_disasm_read_memory_worker): Update.
6810 (gdbscm_disasm_read_memory): Update.
6811 (gdbscm_disasm_memory_error): Remove.
6812 (gdbscm_disasm_print_address): Remove.
6813 (gdbscm_disassembler::gdbscm_disassembler): New.
6814 (gdbscm_print_insn_from_port): Update.
6815 * mips-tdep.c: Include disasm.h.
6816 (gdb_print_insn_mips): Update code to get gdbarch.
6817 * record-btrace.c (btrace_insn_history): Update.
6818 * spu-tdep.c: Include disasm.h.
6819 (struct spu_dis_asm_data): Remove.
6820 (struct spu_dis_asm_info): New.
6821 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
6823 (gdb_print_insn_spu): Cast disassemble_info to
6826 2017-01-26 Yao Qi <yao.qi@linaro.org>
6828 * disasm.c (do_ui_file_delete): Delete.
6829 (gdb_insn_length): Move code creating stream to ...
6830 * utils.c (null_stream): ... here. New function.
6831 * utils.h (null_stream): Declare.
6833 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
6835 * python/py-inferior.c (find_thread_object): Return directly
6836 from the loop. Remove "found" variable.
6838 2017-01-21 Joel Brobecker <brobecker@adacore.com>
6840 GDB 7.12.1 released.
6842 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
6844 * python/py-function.c (fnpy_call): Reorder declarations to have
6845 the gdbpy_enter object declared first.
6846 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
6848 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
6851 * python/python-internal.h (PyMem_RawMalloc): Define for
6853 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
6854 PyMem_RawMalloc instead of PyMem_Malloc.
6856 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
6857 Luis Machado <lgustavo@codesourcery.com>
6859 * NEWS (New commands): Mention flash-erase.
6860 (New MI commands): Mention target-flash-erase.
6861 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
6863 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
6864 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
6865 * target.c (flash_erase_command): New function.
6866 (initialize_targets): Add new flash-erase command.
6867 * target.h (flash_erase_command): New declaration.
6869 2017-01-20 Joel Brobecker <brobecker@adacore.com>
6871 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
6872 HAVE_SYS_PROCFS_H is defined.
6874 2017-01-18 Alan Hayward <alan.hayward@arm.com>
6876 * remote.c (struct cached_reg): Change data into a pointer.
6877 * (stop_reply_dtr): Free data pointers before deleting vector.
6878 (process_stop_reply): Likewise.
6879 (remote_parse_stop_reply): Allocate space for data
6881 2017-01-18 Alan Hayward <alan.hayward@arm.com>
6883 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
6885 (amd64_pseudo_register_read_value): Likewise.
6886 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
6887 (store_register_using_P): Likewise.
6888 * regcache.c (regcache_xfer_part): Likewise.
6890 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
6892 Split real and pseudo registers.
6893 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
6894 (sparc32_pseudo_regnum): New enum.
6895 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
6896 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
6897 (SPARC32_CP0_REGISTERS): New macro.
6898 (sparc32_pseudo_register_name): New function.
6899 (sparc32_register_name): Use sparc32_pseudo_register_name.
6900 (sparc32_pseudo_register_type): New function.
6901 (sparc32_register_type): Use sparc32_pseudo_register_type.
6902 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
6903 pseudo register numbers.
6904 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
6905 (SPARC64_CP0_REGISTERS): New macro.
6906 (sparc64_pseudo_register_name): New function.
6907 (sparc64_register_name): Use sparc64_pseudo_register_name.
6908 (sparc64_pseudo_register_type): New function.
6909 (sparc64_register_type): Use sparc64_pseudo_register_type.
6910 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
6911 pseudo register numbers.
6912 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
6913 sparc64_store_arguments): Handle pseudo register numbers.
6915 2017-01-13 Yao Qi <yao.qi@linaro.org>
6917 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
6918 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
6920 (getpkt_or_notif_sane_1): Likewise.
6922 2017-01-13 Yao Qi <yao.qi@linaro.org>
6924 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
6925 of CC. Pass "-x c++-header" instead of "-x c".
6927 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6929 * remote.c (remote_can_async_p): Update comment.
6931 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6933 * linux-nat.c (linux_nat_can_async_p): Update comment.
6935 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6937 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
6939 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
6941 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
6943 2017-01-10 Tom Tromey <tom@tromey.com>
6945 * python/py-type.c (typy_legacy_template_argument): Update.
6946 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
6947 ~demangle_parse_info): Declare new members.
6948 (cp_demangled_name_to_comp): Return unique_ptr.
6949 (cp_demangled_name_parse_free)
6950 (make_cleanup_cp_demangled_name_parse_free)
6951 (cp_new_demangle_parse_info): Remove.
6952 * cp-support.c (do_demangled_name_parse_free_cleanup)
6953 (make_cleanup_cp_demangled_name_parse_free): Remove.
6954 (inspect_type, cp_canonicalize_string_full)
6955 (cp_canonicalize_string): Update.
6956 (mangled_name_to_comp): Change return type.
6957 (cp_class_name_from_physname, method_name_from_physname)
6958 (cp_func_name, cp_remove_params): Update.
6959 * cp-name-parser.y (demangle_parse_info): New constructor, from
6960 cp_new_demangle_parse_info.
6961 (~demangle_parse_info): New destructor, from
6962 cp_demangled_name_parse_free.
6963 (cp_merge_demangle_parse_infos): Update.
6964 (cp_demangled_name_to_comp): Change return type.
6966 2017-01-10 Tom Tromey <tom@tromey.com>
6968 * top.c (prevent_dont_repeat): Change return type.
6969 * python/python.c (execute_gdb_command): Use std::string.
6971 * guile/guile.c (gdbscm_execute_gdb_command): Update.
6972 * command.h (prevent_dont_repeat): Change return type.
6973 * breakpoint.c (bpstat_do_actions_1): Update.
6975 2017-01-10 Tom Tromey <tom@tromey.com>
6977 * value.h (scoped_value_mark::~scoped_value_mark): Call
6979 (scoped_value_mark::free_to_mark): New method.
6980 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
6983 2017-01-10 Tom Tromey <tom@tromey.com>
6985 * python/py-value.c (valpy_dereference, valpy_referenced_value)
6986 (valpy_reference_value, valpy_const_value, valpy_get_address)
6987 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
6988 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
6989 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
6990 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
6992 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
6993 * value.h (scoped_value_mark): New class.
6995 2017-01-10 Tom Tromey <tom@tromey.com>
6997 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
6998 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
6999 * psymtab.c (discard_psymtabs_upto): Remove.
7000 (make_cleanup_discard_psymtabs): Remove.
7001 (struct psymtab_state): Remove.
7003 2017-01-10 Tom Tromey <tom@tromey.com>
7005 * record-full.c (record_full_save_cleanups): Remove.
7006 (record_full_save): Use gdb::unlinker.
7007 * gcore.c (do_bfd_delete_cleanup): Remove.
7008 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
7010 * dwarf2read.c (unlink_if_set): Remove.
7011 (write_psymtabs_to_index): Use gdb::unlinker.
7012 * common/gdb_unlinker.h: New file.
7014 2017-01-10 Tom Tromey <tom@tromey.com>
7016 * windows-tdep.c (windows_xfer_shared_library): Update.
7017 * windows-nat.c (windows_make_so): Update.
7018 * utils.h (make_cleanup_bfd_unref): Remove.
7019 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
7020 * symfile.h (symfile_bfd_open)
7021 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
7022 * symfile.c (read_symbols, symbol_file_add)
7023 (separate_debug_file_exists): Update.
7024 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
7025 (generic_load, reread_symbols): Update.
7026 * symfile-mem.c (symbol_file_add_from_memory): Update.
7027 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
7028 (spu_symbol_file_add_from_memory): Update.
7029 * solist.h (struct target_so_ops) <bfd_open>: Return
7031 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
7032 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
7034 (solib_map_sections, reload_shared_libraries_1): Update.
7035 * solib-svr4.c (enable_break): Update.
7036 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
7037 * solib-frv.c (enable_break2): Update.
7038 * solib-dsbt.c (enable_break): Update.
7039 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
7041 (darwin_solib_get_all_image_info_addr_at_init): Update.
7042 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
7043 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
7044 * record-full.c (record_full_save): Update.
7045 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
7046 * procfs.c (insert_dbx_link_bpt_in_file): Update.
7047 * minidebug.c (find_separate_debug_file_in_section): Return
7049 * machoread.c (macho_add_oso_symfile): Change abfd to
7051 (macho_symfile_read_all_oso): Update.
7052 (macho_check_dsym): Return gdb_bfd_ref_ptr.
7053 (macho_symfile_read): Update.
7054 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
7055 (jit_bfd_try_read_symtab): Update.
7056 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7057 (gdb_bfd_openw, gdb_bfd_openr_iovec)
7058 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7060 (gdb_bfd_ref_policy): New struct.
7061 (gdb_bfd_ref_ptr): New typedef.
7062 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7063 (gdb_bfd_openw, gdb_bfd_openr_iovec)
7064 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7066 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7067 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7068 (gcore_command): Update.
7069 * exec.c (exec_file_attach): Update.
7070 * elfread.c (elf_symfile_read): Update.
7071 * dwarf2read.c (dwarf2_get_dwz_file): Update.
7072 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
7073 (open_and_init_dwo_file): Update.
7074 (open_dwp_file): Return gdb_bfd_ref_ptr.
7075 (open_and_init_dwp_file): Update.
7076 * corelow.c (core_open): Update.
7077 * compile/compile-object-load.c (compile_object_load): Update.
7078 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
7079 * coffread.c (coff_symfile_read): Update.
7080 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
7081 gdb_bfd_ref_ptr. Rename.
7082 (dump_bfd_file, restore_command): Update.
7083 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7084 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7085 (find_separate_debug_file_by_buildid): Update.
7087 2017-01-10 Tom Tromey <tom@tromey.com>
7089 * common/gdb_ref_ptr.h: New file.
7090 * python/py-ref.h (struct gdbpy_ref_policy): New.
7091 (gdbpy_ref): Now a typedef.
7093 2017-01-10 Tom Tromey <tom@tromey.com>
7095 * utils.h (make_cleanup_htab_delete): Don't declare.
7096 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
7098 * linespec.c (decode_compound_collector): Add constructor,
7100 (lookup_prefix_sym): Remove cleanup.
7101 (symtab_collector): Add constructor, destructor.
7102 (collect_symtabs_from_filename): Remove cleanup.
7103 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
7104 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
7106 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
7107 * dwarf2read.c (dw2_expand_symtabs_matching)
7108 (dw2_map_symbol_filenames, dwarf_decode_macros)
7109 (write_psymtabs_to_index): Use htab_up.
7110 * dwarf2loc.c (func_verify_no_selftailcall)
7111 (call_site_find_chain_1, func_verify_no_selftailcall)
7112 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
7113 std::vector, gdb::unique_xmalloc_ptr.
7114 (call_sitep): Remove typedef.
7115 (dwarf2_locexpr_baton_eval): Remove unused variable.
7117 2017-01-10 Tom Tromey <tom@tromey.com>
7119 * python/python-internal.h (make_cleanup_py_decref)
7120 (make_cleanup_py_xdecref): Don't declare.
7121 * python/py-utils.c (py_decref, make_cleanup_py_decref)
7122 (py_xdecref, make_cleanup_py_xdecref): Remove.
7124 2017-01-10 Tom Tromey <tom@tromey.com>
7126 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
7127 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
7129 2017-01-10 Tom Tromey <tom@tromey.com>
7131 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
7133 2017-01-10 Tom Tromey <tom@tromey.com>
7135 * python/py-utils.c (unicode_to_encoded_string)
7136 (python_string_to_target_string)
7137 (python_string_to_target_python_string)
7138 (python_string_to_host_string, gdbpy_obj_to_string)
7139 (get_addr_from_python): Use gdbpy_ref.
7141 2017-01-10 Tom Tromey <tom@tromey.com>
7143 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
7146 2017-01-10 Tom Tromey <tom@tromey.com>
7148 * python/python.c (eval_python_command, gdbpy_decode_line)
7149 (gdbpy_run_events, gdbpy_start_type_printers)
7150 (gdbpy_apply_type_printers): Use gdbpy_ref.
7152 2017-01-10 Tom Tromey <tom@tromey.com>
7154 * python/py-param.c (get_doc_string, compute_enum_values): Use
7157 2017-01-10 Tom Tromey <tom@tromey.com>
7159 * python/py-inferior.c (find_thread_object, build_inferior_list):
7162 2017-01-10 Tom Tromey <tom@tromey.com>
7164 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7166 2017-01-10 Tom Tromey <tom@tromey.com>
7168 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
7171 2017-01-10 Tom Tromey <tom@tromey.com>
7173 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
7175 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
7178 2017-01-10 Tom Tromey <tom@tromey.com>
7180 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7183 2017-01-10 Tom Tromey <tom@tromey.com>
7185 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
7186 decref results of PyArg_ParseTupleAndKeywords.
7188 2017-01-10 Tom Tromey <tom@tromey.com>
7190 * python/python.c (python_run_simple_file): Use
7191 unique_xmalloc_ptr, gdbpy_ref.
7193 2017-01-10 Tom Tromey <tom@tromey.com>
7195 * python/py-prettyprint.c (print_stack_unless_memory_error)
7196 (print_string_repr, print_children): Use gdbpy_ref.
7197 (dummy_python_frame): New class.
7198 (dummy_python_frame::dummy_python_frame): Rename from
7199 push_dummy_python_frame.
7200 (py_restore_tstate): Remove.
7202 2017-01-10 Tom Tromey <tom@tromey.com>
7204 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7206 2017-01-10 Tom Tromey <tom@tromey.com>
7208 * python/python.c (ensure_python_env, restore_python_env):
7210 * python/python-internal.h (ensure_python_env): Don't declare.
7211 * varobj.h (varobj_ensure_python_env): Don't declare.
7212 * varobj.c (varobj_ensure_python_env): Remove.
7214 2017-01-10 Tom Tromey <tom@tromey.com>
7216 * varobj.c (varobj_value_get_print_value): Use
7219 2017-01-10 Tom Tromey <tom@tromey.com>
7221 * python/py-prettyprint.c (print_string_repr, print_children):
7223 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
7225 * varobj.c (varobj_value_get_print_value): Update.
7226 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
7228 2017-01-10 Tom Tromey <tom@tromey.com>
7230 * varobj.c (varobj_get_display_hint)
7231 (dynamic_varobj_has_child_method, install_new_value_visualizer)
7232 (varobj_set_visualizer, free_variable): Use
7235 2017-01-10 Tom Tromey <tom@tromey.com>
7237 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
7238 (do_finish_initialization): New function. Use gdbpy_ref.
7239 (gdbpy_finish_initialization): Use gdbpy_enter. Call
7240 do_finish_initialization.
7242 2017-01-10 Tom Tromey <tom@tromey.com>
7244 * python/py-param.c (get_set_value, get_show_value): Use
7245 gdbpy_enter, gdbpy_ref.
7247 2017-01-10 Tom Tromey <tom@tromey.com>
7249 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
7251 2017-01-10 Tom Tromey <tom@tromey.com>
7253 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
7255 2017-01-10 Tom Tromey <tom@tromey.com>
7257 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
7258 Use gdbpy_enter_varobj.
7260 2017-01-10 Tom Tromey <tom@tromey.com>
7262 * varobj.c (gdbpy_enter_varobj): New constructor.
7263 * python/python-internal.h (gdbpy_enter_varobj): New class.
7264 * python/py-varobj.c (py_varobj_get_iterator): Use
7267 2017-01-10 Tom Tromey <tom@tromey.com>
7269 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
7270 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
7271 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
7272 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
7274 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
7276 2017-01-10 Tom Tromey <tom@tromey.com>
7278 * python/py-xmethods.c (invoke_match_method): Use
7281 2017-01-10 Tom Tromey <tom@tromey.com>
7283 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
7284 gdbpy_enter, gdbpy_ref.
7286 2017-01-10 Tom Tromey <tom@tromey.com>
7288 * python/python.c (python_interactive_command): Use gdbpy_enter.
7290 2017-01-10 Tom Tromey <tom@tromey.com>
7292 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
7295 2017-01-10 Tom Tromey <tom@tromey.com>
7297 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
7298 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
7300 2017-01-10 Tom Tromey <tom@tromey.com>
7302 * utils.h (htab_deleter): New struct.
7303 (htab_up): New typedef.
7304 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
7305 gdbpy_enter, gdbpy_ref, htab_up.
7307 2017-01-10 Tom Tromey <tom@tromey.com>
7309 * python/py-unwind.c (pending_frame_invalidate): Remove.
7310 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
7312 2017-01-10 Tom Tromey <tom@tromey.com>
7314 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
7315 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
7317 2017-01-10 Tom Tromey <tom@tromey.com>
7319 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
7321 2017-01-10 Tom Tromey <tom@tromey.com>
7323 * python/python.c (gdbpy_eval_from_control_command)
7324 (gdbpy_source_script, gdbpy_run_events)
7325 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
7326 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
7329 2017-01-10 Tom Tromey <tom@tromey.com>
7331 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
7333 2017-01-10 Tom Tromey <tom@tromey.com>
7335 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
7337 2017-01-10 Tom Tromey <tom@tromey.com>
7339 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
7340 (python_on_inferior_call_pre, python_on_inferior_call_post)
7341 (python_on_memory_change, python_on_register_change)
7342 (python_inferior_exit, python_new_objfile, add_thread_object)
7343 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
7345 2017-01-10 Tom Tromey <tom@tromey.com>
7347 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
7348 (bpfinishpy_handle_exit): Use gdbpy_enter.
7350 2017-01-10 Tom Tromey <tom@tromey.com>
7352 * python/py-cmd.c (cmdpy_destroyer)
7353 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
7356 2017-01-10 Tom Tromey <tom@tromey.com>
7358 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7360 (gdbpy_breakpoint_has_cond): Likewise.
7362 2017-01-10 Tom Tromey <tom@tromey.com>
7364 * python/python.c (gdbpy_enter): New constructor.
7365 (~gdbpy_enter): New destructor.
7366 (restore_python_env, ensure_python_env): Rewrite.
7367 * python/python-internal.h (gdbpy_enter): New class.
7369 2017-01-10 Tom Tromey <tom@tromey.com>
7371 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
7373 2017-01-10 Tom Tromey <tom@tromey.com>
7375 * python/py-value.c (value_has_field, get_field_flag)
7376 (get_field_type, valpy_getitem, convert_value_from_python): Use
7379 2017-01-10 Tom Tromey <tom@tromey.com>
7381 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
7384 2017-01-10 Tom Tromey <tom@tromey.com>
7386 * python/py-prettyprint.c (search_pp_list)
7387 (find_pretty_printer_from_objfiles)
7388 (find_pretty_printer_from_progspace)
7389 (find_pretty_printer_from_gdb, find_pretty_printer)
7390 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
7393 2017-01-10 Tom Tromey <tom@tromey.com>
7395 * python/py-param.c (call_doc_function): Use gdbpy_ref.
7397 2017-01-10 Tom Tromey <tom@tromey.com>
7399 * python/py-linetable.c (build_line_table_tuple_from_pcs)
7400 (ltpy_get_all_source_lines): Use gdbpy_ref.
7402 2017-01-10 Tom Tromey <tom@tromey.com>
7404 * python/py-framefilter.c (extract_sym, extract_value)
7405 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
7408 2017-01-10 Tom Tromey <tom@tromey.com>
7410 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
7412 2017-01-10 Tom Tromey <tom@tromey.com>
7414 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
7416 2017-01-10 Tom Tromey <tom@tromey.com>
7418 * python/py-function.c (convert_values_to_python, fnpy_init): Use
7421 2017-01-10 Tom Tromey <tom@tromey.com>
7423 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
7425 2017-01-10 Tom Tromey <tom@tromey.com>
7427 * python/py-type.c (convert_field, make_fielditem, typy_fields)
7428 (typy_range): Use gdbpy_ref.
7430 2017-01-10 Tom Tromey <tom@tromey.com>
7432 * python/py-threadevent.c (create_thread_event_object): Use
7434 * python/py-stopevent.c (create_stop_event_object): Simplify.
7435 (emit_stop_event): Use gdbpy_ref.
7436 * python/py-signalevent.c (create_signal_event_object): Use
7438 * python/py-newobjfileevent.c (create_new_objfile_event_object)
7439 (emit_new_objfile_event, create_clear_objfiles_event_object)
7440 (emit_clear_objfiles_event): Use gdbpy_ref.
7441 * python/py-infevents.c (create_inferior_call_event_object)
7442 (create_register_changed_event_object)
7443 (create_memory_changed_event_object, emit_inferior_call_event)
7444 (emit_memory_changed_event, emit_register_changed_event): Use
7446 * python/py-exitedevent.c (create_exited_event_object)
7447 (emit_exited_event): Use gdbpy_ref.
7448 * python/py-event.h (evpy_emit_event): Remove
7449 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
7450 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
7451 * python/py-continueevent.c (emit_continue_event): Use
7453 * python/py-breakpoint.c (gdbpy_breakpoint_created)
7454 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
7456 * python/py-bpevent.c (create_breakpoint_event_object): Use
7459 2017-01-10 Tom Tromey <tom@tromey.com>
7461 * python/py-ref.h: New file.
7463 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
7465 * cli-out.c (cli_ui_out::do_redirect): Change return type to
7467 * cli-out.h (cli_ui_out::do_redirect): Likewise.
7468 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
7469 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
7470 * ui-out.c (ui_out::redirect): Likewise.
7471 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
7472 * cli/cli-logging.c (set_logging_redirect): Update call site of
7474 (handle_redirections): Likewise.
7475 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
7476 * top.c (execute_command_to_string): Likewise.
7477 * utils.c (do_ui_out_redirect_pop): Likewise.
7479 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
7481 * stack.c (_initialize_stack): Update "frame" command help message.
7483 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
7485 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
7487 2017-01-06 Yao Qi <yao.qi@linaro.org>
7489 * x86-linux-nat.h: Include gdb_proc_service.h.
7491 2017-01-06 Yao Qi <yao.qi@linaro.org>
7493 * ser-base.h: Include serial.h.
7495 2017-01-06 Yao Qi <yao.qi@linaro.org>
7497 * ppc-linux-tdep.h: Include ppc-tdep.h.
7499 2017-01-06 Yao Qi <yao.qi@linaro.org>
7501 * nat/amd64-linux-siginfo.h: Include signal.h.
7503 2017-01-06 Yao Qi <yao.qi@linaro.org>
7505 * nat/aarch64-linux-hw-point.h: Include break-common.h.
7507 2017-01-06 Yao Qi <yao.qi@linaro.org>
7509 * mi/mi-parse.h: Include mi-cmds.h.
7511 2017-01-06 Yao Qi <yao.qi@linaro.org>
7513 * inf-loop.c: Don't include "target.h".
7514 * inf-loop.h: Include it here.
7516 2017-01-06 Yao Qi <yao.qi@linaro.org>
7518 * dfp.h: Include "dboulest.h" and "expression.h".
7520 2017-01-06 Yao Qi <yao.qi@linaro.org>
7522 * ax-gdb.h: Include "ax.h".
7524 2017-01-06 Yao Qi <yao.qi@linaro.org>
7526 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
7527 with nat/gdb_ptrace.h.
7529 2017-01-05 Yao Qi <yao.qi@linaro.org>
7531 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
7533 (mips64_fbsd_sigframe_init): Likewise.
7535 2017-01-04 John Baldwin <jhb@FreeBSD.org>
7537 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
7538 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
7540 2017-01-04 John Baldwin <jhb@FreeBSD.org>
7542 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7543 * NEWS: Mention new FreeBSD/mips native configuration.
7544 * config/mips/fbsd.mh: New file.
7545 * configure.host: Add mips*-*-freebsd*.
7546 * mips-fbsd-nat.c: New file.
7548 2017-01-04 John Baldwin <jhb@FreeBSD.org>
7550 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
7551 (ALLDEPFILES): Add mips-fbsd-tdep.c.
7552 * NEWS: Mention new FreeBSD/mips target.
7553 * configure.tgt: Add mips*-*-freebsd*.
7554 * mips-fbsd-tdep.c: New file.
7555 * mips-fbsd-tdep.h: New file.
7557 2017-01-04 Yao Qi <yao.qi@linaro.org>
7559 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
7560 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
7562 2017-01-01 Joel Brobecker <brobecker@adacore.com>
7564 Update copyright year range in all GDB files.
7566 2017-01-01 Joel Brobecker <brobecker@adacore.com>
7568 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
7570 For older changes see ChangeLog-2016.
7576 version-control: never