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