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