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