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