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