Make make-target-delegates grok namespace scope op and template params
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
10f64178
PA
12017-12-03 Pedro Alves <palves@redhat.com>
2
3 * make-target-delegates (munge_type): Also munge '<', '>', and
4 ':'. Avoid double underscores in identifiers, and trailing
5 underscores.
6 * target-debug.h
7 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
8 ...
9 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
10 * target-delegates.c: Regenerate.
11
6d83e819
SM
122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
13
14 * common/poison.h (XDELETE): Fix typo.
15
97cbe998
SDJ
162017-12-01 Andrew Cagney <cagney@redhat.com>
17 Joel Brobecker <brobecker@adacore.com>
18 Sergio Durigan Junior <sergiodj@redhat.com>
19
20 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
21 feature.
22 * coffread.c (coff_symfile_read): Do not map over sections with
23 'coff_locate_sections' if readnever is on.
24 * dwarf2read.c (dwarf2_has_info): Return 0 if
25 readnever is on.
26 * elfread.c (elf_symfile_read): Do not map over sections with
27 'elf_locate_sections' if readnever is on.
28 * main.c (validate_readnow_readnever): New function.
29 (captured_main_1): Add support for --readnever.
30 (print_gdb_help): Document --readnever.
31 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
32 flag.
33 * symfile.c (readnever_symbol_files): New global.
34 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
35 'READNEVER_SYMBOL_FILES' is set.
36 (validate_readnow_readnever): New function.
37 (symbol_file_command): Handle '-readnever' option.
38 Call 'validate_readnow_readnever'.
39 (add_symbol_file_command): Handle '-readnever' option.
40 Call 'validate_readnow_readnever'.
41 (_initialize_symfile): Document new '-readnever' option for
42 both 'symbol-file' and 'add-symbol-file' commands.
43 * top.h (readnever_symbol_files): New extern global.
44 * xcoffread.c (xcoff_initial_scan): Do not read debug
45 information if readnever is on.
46
40fc416f
SDJ
472017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
48
49 * symfile.c (symbol_file_command): Call
50 'symbol_file_add_main_1' only after processing all command
51 line options.
52 (add_symbol_file_command): Modify logic to make arguments
53 position-independent.
54
ec6a20c2
JB
552017-12-01 Joel Brobecker <brobecker@adacore.com>
56
57 * ada-lang.c (symbol_list_obstack): Delete.
58 (resolve_subexp): Make sure "candidates" gets xfree'ed.
59 (ada_lookup_symbol_list_worker): Remove the limitation that
60 the result is only good until the next call, now making it
61 the responsibility of the caller to free the result when no
62 longer needed. Adjust the function's intro comment accordingly.
63 (ada_lookup_symbol_list): Adjust the function's intro comment.
64 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
65 (ada_lookup_encoded_symbol, get_var_value): Likewise.
66 (_initialize_ada_language): Remove symbol_list_obstack
67 initialization.
68 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
69 (write_var_or_type, write_name_assoc): Likewise.
70
d0df06af
TT
712017-12-01 Tom Tromey <tom@tromey.com>
72
73 * Makefile.in (all_deps_files): New variable.
74 Include .Po files using all_deps_files.
75
2ee0c9b3
JB
762017-12-01 Joel Brobecker <brobecker@adacore.com>
77
78 * MAINTAINERS: Update list of maintainers, moving those who
79 stepped down or became inactive to the "Past Maintainers"
80 section.
81
44122162
RO
822017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
83
84 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
85 sys/proc.h.
86 (NEW_PROC_API): Remove.
87 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
88 Likewise.
89 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
90 * configure: Regenerate.
91 * config.in: Regenerate.
92 * gdbserver/configure: Regenerate.
93 * gdbserver/config.in: Regenerate.
94
95 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
96 NEW_PROC_API test.
97 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
98
99 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
100
101 * proc-api.c: Remove !NEW_PROC_API support.
102 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
103 Remove tests for macros always defined on Solaris.
104 * proc-events.c: Remove !NEW_PROC_API support.
105 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
106 HAVE_SYS_USER_H tests.
107 (init_syscall_table): Remove non-Solaris syscalls.
108 Remove tests for syscalls present on all Solaris versions.
109 Add missing Solaris 10+ syscalls.
110 (signal_table): Remove non-Solaris signals.
111 Remove tests for signals present on all Solaris versions.
112 (fault_table): Remove non-Solaris faults.
113 Remove tests for faults present on all Solaris versions.
114 * proc-flags.c: Remove !NEW_PROC_API support.
115 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
116 Remove non-Solaris flags.
117 * proc-why.c: Remove !NEW_PROC_API support.
118 (pr_why_table): Remove meaningless comments.
119 Remove tests for reasons present on all Solaris versions.
120 Remove OSF/1 cases.
121 (proc_prettyfprint_why): Likewise.
122
123 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
124 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
125 Remove WA_READ test, IRIX watchpoint support.
126 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
127 types. Change users.
128 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
129 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
130 Change callers.
131 Remove CTL_PROC_NAME_FMT tests.
132 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
133 users.
134 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
135 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
136 (proc_modify_flag): Replace GDBRESET by PCUNSET.
137 Remove PR_ASYNC, PR_KLC tests.
138 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
139 (proc_parent_pid): Remove PCWATCH etc. tests.
140 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
141 Remove PCAGENT test.
142 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
143 Remove SYS_lwpcreate || SYS_lwp_create test.
144 (proc_get_current_thread): Likewise.
145 [PIOCNTHR && PIOCTLIST]: Remove.
146 [PIOCLSTATUS]: Remove.
147 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
148 [PRFS_STOPEXEC]: Remove.
149 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
150 (syscall_is_exit): Likewise.
151 (syscall_is_exec): Likewise.
152 (syscall_is_lwp_create): Likewise.
153 Remove SYS_syssgi support.
154 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
155 [SYS_syssgi]: Remove.
156 Remove non-Solaris cases, conditionals.
157 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
158 Remove.
159 (procfs_init_inferior) [SYS_syssgi]: Remove.
160 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
161 (procfs_inferior_created) [SYS_syssgi]: Remove.
162 (procfs_set_watchpoint): Remove !AIX5 test.
163 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
164 case.
165 (mappingflags) [MA_PHYS]: Remove.
166 (info_mappings_callback): Remove PCAGENT test.
167 Remove PIOCOPENLWP || PCAGENT test.
168
e8020e54
RO
1692017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
170
171 * sol-thread.c (info_solthreads): Constify args.
172 Cast args to void *.
173
75059544
JB
1742017-11-29 John Baldwin <jhb@FreeBSD.org>
175
176 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
177
f5a91472
JB
1782017-11-29 Joel Brobecker <brobecker@adacore.com>
179
180 * ada-lang.c (to_fixed_range_type): Make sure that the size
181 of the range type being returned is the same as the size
182 of the range type being fixed.
183
bd69330d
PA
1842017-11-29 Pedro Alves <palves@redhat.com>
185
186 PR c++/19436
187 * NEWS: Mention setting breakpoints on functions with C++ ABI
188 tags.
189 * completer.h (completion_match_for_lcd) <match,
190 mark_ignored_range>: New methods.
191 <finish>: Consider ignored ranges.
192 <clear>: Clear ignored ranges.
193 <m_ignored_ranges, m_finished_storage>: New fields.
194 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
195 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
196 completion_match_for_lcd pointer to strncmp_iw_with_mode.
197 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
198 * language.c (default_symbol_name_matcher): Pass the
199 completion_match_for_lcd pointer to strncmp_iw_with_mode.
200 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
201 * utils.c (skip_abi_tag): New function.
202 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
203 Handle ABI tags.
204 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
205 parameter.
206
2072017-11-29 Pedro Alves <palves@redhat.com>
208
209 PR c++/19436
210 * NEWS: Mention setting breakpoints on functions with C++ ABI
211 tags.
212 * completer.h (completion_match_for_lcd) <match,
213 mark_ignored_range>: New methods.
214 <finish>: Consider ignored ranges.
215 <clear>: Clear ignored ranges.
216 <m_ignored_ranges, m_finished_storage>: New fields.
217 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
218 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
219 completion_match_for_lcd pointer to strncmp_iw_with_mode.
220 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
221 * language.c (default_symbol_name_matcher): Pass the
222 completion_match_for_lcd pointer to strncmp_iw_with_mode.
223 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
224 * utils.c (skip_abi_tag): New function.
225 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
226 Handle ABI tags.
227 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
228 parameter.
229
a20714ff
PA
2302017-11-29 Pedro Alves <palves@redhat.com>
231
232 * NEWS: Mention that breakpoints on C++ functions are now set on
233 on all namespaces/classes by default, and mention "break
234 -qualified".
235 * ax-gdb.c (agent_command_1): Adjust to pass a
236 symbol_name_match_type to new_linespec_location.
237 * breakpoint.c (parse_breakpoint_sals): Adjust to
238 get_linespec_location's return type change.
239 (strace_marker_create_sals_from_location): Adjust to pass a
240 symbol_name_match_type to new_linespec_location.
241 (strace_marker_decode_location): Adjust to get_linespec_location's
242 return type change.
243 (strace_command): Adjust to pass a symbol_name_match_type to
244 new_linespec_location.
245 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
246 mention "-qualified".
247 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
248 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
249 enumerator.
250 (complete_address_and_linespec_locations): New parameter
251 'match_type'. Pass it down.
252 (explicit_options): Add "-qualified".
253 (collect_explicit_location_matches): Pass the requested match type
254 to the linespec completers. Handle MATCH_QUALIFIED.
255 (location_completer): Handle "-qualified" combined with linespecs.
256 * cp-support.c (cp_search_name_hash): New.
257 (cp_symbol_name_matches_1): Implement wild matching for C++.
258 (cp_fq_symbol_name_matches): Reimplement.
259 (cp_get_symbol_name_matcher): Return different matchers depending
260 on the lookup name's match type.
261 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
262 * cp-support.h (cp_search_name_hash): New declaration.
263 * dwarf2read.c
264 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
265 symbols.
266 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
267 tests.
268 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
269 pass a symbol_name_match_type to new_linespec_location.
270 * linespec.c (linespec_parse_basic): Lookup function symbols using
271 the parser's symbol name match type.
272 (convert_explicit_location_to_linespec): New
273 symbol_name_match_type parameter. Pass it down to
274 find_linespec_symbols.
275 (convert_explicit_location_to_sals): Pass the location's name
276 match type to convert_explicit_location_to_linespec.
277 (parse_linespec): New match_type parameter. Save it in the
278 parser.
279 (linespec_parser_new): Default to symbol_name_match_type::WILD.
280 (linespec_complete_function): New symbol_name_match_type
281 parameter. Use it.
282 (complete_linespec_component): Pass down the parser's recorded
283 name match type.
284 (linespec_complete_label): New symbol_name_match_type parameter.
285 Use it.
286 (linespec_complete): New symbol_name_match_type parameter. Save
287 it in the parser and pass it down. Adjust to
288 get_linespec_location's prototype change.
289 (find_function_symbols, find_linespec_symbols): New
290 symbol_name_match_type parameter. Pass it down instead of
291 assuming symbol_name_match_type::WILD.
292 * linespec.h (linespec_complete, linespec_complete_function)
293 (linespec_complete_label): New symbol_name_match_type parameter.
294 * location.c (event_location::linespec_location): Now a struct
295 linespec_location.
296 (EL_LINESPEC): Adjust.
297 (initialize_explicit_location): Default to
298 symbol_name_match_type::WILD.
299 (new_linespec_location): New symbol_name_match_type parameter.
300 Record it in the location.
301 (get_linespec_location): Now returns a struct linespec_location.
302 (new_explicit_location): Also copy func_name_match_type.
303 (explicit_to_string_internal)
304 (string_to_explicit_location): Handle "-qualified".
305 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
306 Copy symbol_name_match_type fields.
307 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
308 type change.
309 (event_location_to_string): Adjust to LINESPEC_LOCATION type
310 change. Handle "-qualfied".
311 (string_to_explicit_location): Handle "-qualified".
312 (string_to_event_location_basic): New symbol_name_match_type
313 parameter. Pass it down.
314 (string_to_event_location): Handle "-qualified".
315 * location.h (struct linespec_location): New.
316 (explicit_location::func_name_match_type): New field.
317 (new_linespec_location): Now returns a const linespec_location *.
318 (string_to_event_location_basic): New symbol_name_match_type
319 parameter.
320 (explicit_completion_info::saw_explicit_location_option): New
321 field.
322 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
323 symbol_name_match_type to new_linespec_location.
324 * python/py-breakpoint.c (bppy_init): Likewise.
325 * python/python.c (gdbpy_decode_line): Likewise.
326
a207cff2
PA
3272017-11-29 Pedro Alves <palves@redhat.com>
328
329 * ada-lang.c (ada_lookup_name_info::matches): Change type of
330 parameter from completion_match to completion_match_result.
331 Adjust.
332 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
333 * completer.c (completion_tracker::maybe_add_completion): Add
334 match_for_lcd parameter and use it.
335 (completion_tracker::add_completion): Likewise.
336 * completer.h (class completion_match_for_lcd): New class.
337 (completion_match_result::match_for_lcd): New field.
338 (completion_match_result::set_match): New method.
339 (completion_tracker): Add comments.
340 (completion_tracker::add_completion): Add match_for_lcd parameter.
341 (completion_tracker::reset_completion_match_result): Reset
342 match_for_lcd too.
343 (completion_tracker::maybe_add_completion): Add match_for_lcd
344 parameter.
345 (completion_tracker::m_lowest_common_denominator_unique): Extend
346 comments.
347 * cp-support.c (cp_symbol_name_matches_1)
348 (cp_fq_symbol_name_matches): Change type of parameter from
349 completion_match to completion_match_result. Adjust.
350 * language.c (default_symbol_name_matcher): Change type of
351 parameter from completion_match to completion_match_result.
352 Adjust.
353 * language.h (completion_match_for_lcd): Forward declare.
354 (default_symbol_name_matcher): Change type of parameter from
355 completion_match to completion_match_result.
356 * symtab.c (compare_symbol_name): Adjust.
357 (completion_list_add_name): Pass the match_for_lcd to the tracker.
358 * symtab.h (ada_lookup_name_info::matches): Change type of
359 parameter from completion_match to completion_match_result.
360 (symbol_name_matcher_ftype): Likewise, and update comments.
361
4024cf2b
PA
3622017-11-29 Pedro Alves <palves@redhat.com>
363
364 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
365 * minsyms.c (msymbol_is_text): Delete.
366 (msymbol_is_function): New function.
367 * minsyms.h (msymbol_is_text): Delete.
368 (msymbol_is_function): New declaration.
369 * symtab.c (find_function_alias_target): Use msymbol_is_function.
370
5dcf52c1
TT
3712017-11-29 Tom Tromey <tom@tromey.com>
372
373 * Makefile.in (distclean): Handle the case where rmdir fails.
374
8ca2f0b9
TT
3752017-11-29 Tom Tromey <tom@tromey.com>
376
377 * symfile.c (_initialize_symfile): Update usage text for
378 add-symbol-file, symbol-file, load.
379
02ca603a
TT
3802017-11-29 Tom Tromey <tom@tromey.com>
381
382 * symfile.c (add_symbol_file_command): Error if some arguments to
383 -s are missing. Change unrecognized-argument error message.
384 (_initialize_symfile): Fix usage text for add-symbol-file.
385
18ca7347
TT
3862017-11-27 Tom Tromey <tom@tromey.com>
387
388 * Makefile.in (REMOTE_OBS): Remove.
389 (SFILES): Remove remote sources.
390 (COMMON_SFILES): Add remote sources.
391 (ALLDEPFILES): Remove dcache.c.
392
66599a7d
TT
3932017-11-27 Tom Tromey <tom@tromey.com>
394
395 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
396 variables.
397 (SFILES): Use SUBDIR_TARGET_SRCS.
398 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
399 (CONFIG_SRC_SUBDIR): Add target.
400 (%.o): Remove target rule.
401
4f04fba8
TT
4022017-11-27 Tom Tromey <tom@tromey.com>
403
404 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
405 registry.o, thread-fsm.o, debug.o.
406 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
407 thread-fsm.c, debug.c.
408
b5adff3b
TT
4092017-11-27 Tom Tromey <tom@tromey.com>
410
411 * Makefile.in (COMMON_SFILES): New.
412 (SFILES): Move some entries to COMMON_SFILES.
413 (COMMON_OBS): Use COMMON_SFILES.
414
afa0a411
TT
4152017-11-27 Tom Tromey <tom@tromey.com>
416
417 * Makefile.in (YYFILES): Update comment.
418 (YYOBJ): Redefine.
419
8fd8d003
TT
4202017-11-27 Tom Tromey <tom@tromey.com>
421
422 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
423 (CONFIG_SRC_SUBDIR): Add python.
424 (%.o): Remove python rule.
425 (python/%.o): New rule.
426 * configure: Rebuild.
427 * configure.ac (CONFIG_OBS): Refer to python/python.o
428
bd810fff
TT
4292017-11-27 Tom Tromey <tom@tromey.com>
430
431 * configure: Rebuild.
432 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
433 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
434 (CONFIG_SRC_SUBDIR): Add guile.
435 (%.o): Remove guile rule.
436
75787ac1
TT
4372017-11-27 Tom Tromey <tom@tromey.com>
438
439 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
440 (%.o): Remove unittests rule.
441 (CONFIG_SRC_SUBDIR): Add unittests.
442
5c8a9431
TT
4432017-11-27 Tom Tromey <tom@tromey.com>
444
445 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
446 (CONFIG_SRC_SUBDIR): Add tui.
447 (%.o): Remove tui rule.
448
a26aa30c
TT
4492017-11-27 Tom Tromey <tom@tromey.com>
450
451 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
452 (%.o): Remove compile rule.
453 (CONFIG_SRC_SUBDIR): Add compile.
454
6f3cdf9a
TT
4552017-11-27 Tom Tromey <tom@tromey.com>
456
457 * Makefile.in (SUBDIR_MI_OBS): Redefine.
458 (%.o): Remove mi rule.
459 (CONFIG_SRC_SUBDIR): Add mi.
460 (COMMON_OBS): Use mi/mi-common.o
461
f06afa53
TT
4622017-11-27 Tom Tromey <tom@tromey.com>
463
464 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
465 (%.o): Remove cli rule.
466 (CONFIG_SRC_SUBDIR): Add cli.
467
b22c88c2
TT
4682017-11-27 Tom Tromey <tom@tromey.com>
469
470 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
471 * configure: Rebuild.
472 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
473 (CONFIG_DEP_SUBDIR): New variable.
474 (%.o): Add order-only dependency.
475 ($(CONFIG_DEP_SUBDIR)): New target.
476
ee9a09e9
DC
4772017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
478
479 PR gdb/21945
480 * findcmd.c (_initialize_mem_search): Update find command help
481 text.
482
e8e7d10c
SM
4832017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
484
485 * python/python.c (do_start_initialization): Change progname
486 type to gdb::unique_xmalloc_ptr. Release the pointer when using
487 Python 2.
488
6a997029
TT
4892017-11-26 Tom Tromey <tom@tromey.com>
490
491 * common/format.h: Add include guards.
492
41272101
TT
4932017-11-26 Tom Tromey <tom@tromey.com>
494
495 * nat/linux-personality.h (class
496 maybe_disable_address_space_randomization): New class.
497 (maybe_disable_address_space_randomization): Don't declare
498 function.
499 * nat/linux-personality.c (restore_personality)
500 (make_disable_asr_cleanup): Remove.
501 (maybe_disable_address_space_randomization): Now a constructor.
502 (~maybe_disable_address_space_randomization): New destructor.
503 * linux-nat.c (linux_nat_create_inferior): Update.
504
44287fd8
TT
5052017-11-26 Tom Tromey <tom@tromey.com>
506
507 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
508
5ffd2cb7
UW
5092017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
510
511 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
512 "cooked" register. Access only first four bytes of branch target
513 registers.
514
0e5457dc
SDJ
5152017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
516
517 PR gdb/22491
518 * stap-probe.c (relocate_address): New function.
519 (stap_probe::get_relocated_address): Use 'relocate_address'.
520 (stap_probe::set_semaphore): Use 'relocate_address' and pass
521 'm_sem_addr'.
522 (stap_probe::clear_semaphore): Likewise.
523
deeeba55
PA
5242017-11-25 Pedro Alves <palves@redhat.com>
525
526 * dictionary.c: Include "safe-ctype.h".
527 * minsyms.c: Include "safe-ctype.h".
528 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
529
a81aaca0
PA
5302017-11-25 Pedro Alves <palves@redhat.com>
531
532 * completer.c (complete_line_internal_1): Skip spaces until the
533 start of the command.
534
0662b6a7
PA
5352017-11-24 Pedro Alves <palves@redhat.com>
536
537 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
538 cp_fq_symbol_name_matches. Pass language_cplus to
539 strncmp_with_mode.
540 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
541 (selftests::test_cp_symbol_name_cmp): New.
542 (_initialize_cp_support): Register "cp_symbol_name_matches"
543 selftests.
544 * language.c (default_symbol_name_matcher): Pass language_minimal
545 to strncmp_iw_with_mode.
546 * utils.c: Include "cp-support.h" and <algorithm>.
547 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
548 (cp_is_operator): New functions.
549 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
550 skip whitespace in the symbol name when the lookup name doesn't
551 have spaces, and vice versa.
552 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
553 * utils.h (strncmp_iw_with_mode): Add language parameter.
554
e547c119
JB
5552017-11-24 Joel Brobecker <brobecker@adacore.com>
556
557 * ada-lang.c (ada_exception_message_1, ada_exception_message):
558 New functions.
559 (print_it_exception): If available, display the exception
560 message as well.
561 * NEWS: Document new feature.
562
d7fcdff9
UW
5632017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
564
565 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
566
30649c14
PR
5672017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
568
569 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
570 (dtrace_probe::is_enabled, dtrace_probe::enable)
571 (dtrace_probe::disable): Remove keyword 'struct' at for-range
572 variable
573 * probe.c (gen_ui_out_table_header_info)
574 (print_ui_out_not_applicables): Remove keyword 'struct' at
575 for-range variable
576
7696f5c9
AH
5772017-11-24 Alan Hayward <alan.hayward@arm.com>
578
579 * configure.tgt: Add arch/aarch64.o
580
8172f16b
SM
5812017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * common/common-utils.h: Include poison.h.
584 (xfree): Remove declaration, add definition with static_assert.
585 * common/common-utils.c (xfree): Remove.
586 * common/poison.h (IsMallocatable): Define.
587 (IsFreeable): Define.
588 (free): Delete for non-freeable types.
589 (xnew): New.
590 (XNEW): Undef and redefine.
591 (xcnew): New.
592 (XCNEW): Undef and redefine.
593 (xdelete): New.
594 (XDELETE): Undef and redefine.
595 (xnewvec): New.
596 (XNEWVEC): Undef and redefine.
597 (xcnewvec): New.
598 (XCNEWVEC): Undef and redefine.
599 (xresizevec): New.
600 (XRESIZEVEC): Undef and redefine.
601 (xdeletevec): New.
602 (XDELETEVEC): Undef and redefine.
603 (xnewvar): New.
604 (XNEWVAR): Undef and redefine.
605 (xcnewvar): New.
606 (XCNEWVAR): Undef and redefine.
607 (xresizevar): New.
608 (XRESIZEVAR): Undef and redefine.
609
7aabaf9d
SM
6102017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
611
612 * gdbthread.h (private_thread_info): Define structure type, add
613 virtual pure destructor.
614 (thread_info) <priv>: Change type to unique_ptr.
615 <private_dtor>: Remove.
616 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
617 (private_thread_info::~private_thread_info): Provide default
618 implementation.
619 (thread_info::~thread_info): Don't call private_dtor nor
620 manually free priv.
621 * aix-thread.c (private_thread_info): Rename to ...
622 (aix_thread_info): ... this.
623 (get_aix_thread_info): New.
624 (sync_threadlists): Adjust.
625 (iter_tid): Adjust.
626 (aix_thread_resume): Adjust.
627 (aix_thread_fetch_registers): Adjust.
628 (aix_thread_store_registers): Adjust.
629 (aix_thread_extra_thread_info): Adjust.
630 * darwin-nat.h (private_thread_info): Rename to ...
631 (darwin_thread_info): ... this.
632 (get_darwin_thread_info): New.
633 * darwin-nat.c (darwin_init_thread_list): Adjust.
634 (darwin_check_new_threads): Adjust.
635 (thread_info_from_private_thread_info): Adjust.
636 * linux-thread-db.c (private_thread_info): Rename to ...
637 (thread_db_thread_info): ... this, initialize fields.
638 (get_thread_db_thread_info): New.
639 <dying>: Change type to bool.
640 (update_thread_state): Adjust to type rename.
641 (record_thread): Adjust to type rename an use of unique_ptr.
642 (thread_db_pid_to_str): Likewise.
643 (thread_db_extra_thread_info): Likewise.
644 (thread_db_thread_handle_to_thread_info): Likewise.
645 (thread_db_get_thread_local_address): Likewise.
646 * nto-tdep.h (private_thread_info): Rename to ...
647 (nto_thread_info): ... this, initialize fields.
648 (get_nto_thread_info): New.
649 <name>: Change type to std::string.
650 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
651 use of unique_ptr.
652 * nto-procfs.c (update_thread_private_data_name): Adjust to
653 std::string change, allocate nto_private_thread_info with new.
654 (update_thread_private_data): Adjust to unique_ptr.
655 * remote.c (private_thread_info): Rename to ...
656 (remote_thread_info): ... this, initialize data members with
657 default values.
658 <extra, name>: Change type to std::string.
659 <thread_handle>: Change type to non-pointer.
660 (free_private_thread_info): Remove.
661 (get_private_info_thread): Rename to...
662 (get_remote_thread_info): ... this, change return type, adjust to
663 use of unique_ptr, use remote_thread_info constructor.
664 (remote_add_thread): Adjust.
665 (get_private_info_ptid): Rename to...
666 (get_remote_thread_info): ...this, change return type.
667 (remote_thread_name): Use get_remote_thread_info, adjust to
668 change to std::string.
669 (struct thread_item) <~thread_item>: Remove.
670 <thread_handle>: Make non pointer.
671 (start_thread): Adjust to thread_item::thread_handle type
672 change.
673 (remote_update_thread_list): Adjust to type name change, move
674 strings from temporary to long-lived object instead of
675 duplicating.
676 (remote_threads_extra_info): Use get_remote_thread_info.
677 (process_initial_stop_replies): Likewise.
678 (resume_clear_thread_private_info): Likewise.
679 (remote_resume): Adjust to type name change.
680 (remote_commit_resume): Use get_remote_thread_info.
681 (process_stop_reply): Adjust to type name change.
682 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
683 (remote_stopped_by_hw_breakpoint): Likewise.
684 (remote_stopped_by_watchpoint): Likewise.
685 (remote_stopped_data_address): Likewise.
686 (remote_core_of_thread): Likewise.
687 (remote_thread_handle_to_thread_info): Use
688 get_private_info_thread, adjust to thread_handle field type
689 change.
690
21fe1c75
SM
6912017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
692
693 * remote.c (struct thread_item): Add constructor, disable copy
694 construction and copy assignment, define default move
695 construction and move assignment.
696 <extra, name>: Change type to std::string.
697 <core>: Initialize.
698 <thread_handle>: Make non-pointer.
699 (thread_item_t): Remove typedef.
700 (DEF_VEC_O(thread_item_t)): Remove.
701 (threads_listing_context) <contains_thread>: New method.
702 <remove_thread>: New method.
703 <items>: Change type to std::vector.
704 (clear_threads_listing_context): Remove.
705 (threads_listing_context_remove): Remove.
706 (remote_newthread_step): Use thread_item constructor, adjust to
707 change to std::vector.
708 (start_thread): Use thread_item constructor, adjust to change to
709 std::vector.
710 (end_thread): Adjust to change to std::vector and std::string.
711 (remote_get_threads_with_qthreadinfo): Use thread_item
712 constructor, adjust to std::vector.
713 (remote_update_thread_list): Adjust to change to std::vector and
714 std::string, use threads_listing_context methods.
715 (remove_child_of_pending_fork): Adjust.
716 (remove_new_fork_children): Adjust.
717 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
718 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
719 * unittests/rsp-low-selftests.c: New file.
720 * common/rsp-low.h: Include common/byte-vector.h.
721 (hex2bin): New overload.
722 * common/rsp-low.c (hex2bin): New overload.
723
089354bb
SM
7242017-11-24 Simon Marchi <simon.marchi@ericsson.com>
725
726 * inferior.h (private_inferior): Define structure type, add
727 virtual pure destructor.
728 (inferior) <priv>: Change type to unique_ptr.
729 * inferior.c (private_inferior::~private_inferior): Provide
730 default implementation.
731 (inferior::~inferior): Don't free priv field.
732 (exit_inferior_1): Likewise.
733 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
734 (darwin_exception_info): Remove typedef.
735 (DEF_VEC_O (darwin_thread_t)); Remove.
736 (private_inferior): Rename to ...
737 (darwin_private_inferior): ... this, extend private_inferior.
738 (get_darwin_inferior): New.
739 <threads>: Change type to std::vector of darwin_thread_t pointers.
740 * darwin-nat.c (darwin_check_new_threads): Adjust.
741 (find_inferior_task_it): Adjust.
742 (darwin_find_thread); Adjust.
743 (darwin_suspend_inferior): Adjust.
744 (darwin_resume_inferior): Adjust.
745 (darwin_find_new_inferior): Adjust.
746 (darwin_decode_notify_message): Adjust.
747 (darwin_send_reply): Adjust.
748 (darwin_resume_inferior_threads): Adjust.
749 (darwin_suspend_inferior_threads): Adjust.
750 (darwin_decode_message): Adjust.
751 (darwin_wait): Adjust.
752 (darwin_interrupt): Adjust.
753 (darwin_deallocate_threads): Adjust.
754 (darwin_mourn_inferior): Adjust, don't free private data.
755 (darwin_reply_to_all_pending_messages): Adjust.
756 (darwin_stop_inferior): Adjust.
757 (darwin_setup_exceptions): Adjust.
758 (darwin_kill_inferior): Adjust.
759 (darwin_setup_request_notification): Adjust.
760 (darwin_attach_pid): Adjust.
761 (darwin_init_thread_list): Adjust.
762 (darwin_setup_fake_stop_event): Adjust.
763 (darwin_attach): Adjust.
764 (darwin_detach): Adjust.
765 (darwin_xfer_partial): Adjust.
766 (set_enable_mach_exceptions): Adjust.
767 (darwin_pid_to_exec_file): Adjust.
768 (darwin_get_ada_task_ptid): Adjust.
769 * darwin-nat-info.c (get_task_from_args): Adjust.
770 (info_mach_ports_command): Adjust.
771 (info_mach_region_command): Adjust.
772 (info_mach_exceptions_command): Adjust.
773 * remote.c (private_inferior): Rename to ...
774 (remote_private_inferior): ... this, initialize fields.
775 (get_remote_inferior); New.
776 (remote_commit_resume): Use get_remote_inferior.
777 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
778
d044bac8
PA
7792017-11-24 Pedro Alves <palves@redhat.com>
780
781 * NEWS: Mention linespecs and explicit locations, and completion
782 improvements.
783
e8d58cba
YQ
7842017-11-24 Yao Qi <yao.qi@linaro.org>
785
786 * regcache.c (regcache::dump): Remove footnote_register_size.
787
a63f2d2f
YQ
7882017-11-24 Yao Qi <yao.qi@linaro.org>
789
790 * regcache.c (cooked_read_test): Add more test for readonly
791 regcache.
792
1b30aaa5
YQ
7932017-11-24 Yao Qi <yao.qi@linaro.org>
794
795 * gdbarch-selftests.c (test_target_has_registers): Move it to
796 target.c.
797 (test_target_has_stack): Likewise.
798 (test_target_has_memory): Likewise.
799 (test_target_prepare_to_store): Likewise.
800 (test_target_store_registers): Likewise.
801 (test_target_ops): Likewise.
802 * regcache.c: Include selftest-arch.h and gdbthread.h.
803 (target_ops_no_register): New class.
804 (test_target_fetch_registers): New.
805 (test_target_store_registers): New.
806 (test_target_xfer_partial): New.
807 (readwrite_regcache): New.
808 (cooked_read_test): New.
809 (_initialize_regcache): Register the test.
810 * target.c: (test_target_has_registers): Moved from
811 gdbarch-selftests.c.
812 (test_target_has_stack): Likewise.
813 (test_target_has_memory): Likewise.
814 (test_target_prepare_to_store): Likewise.
815 (test_target_store_registers): Likewise.
816 * target.h (test_target_ops): New class.
817
6654d750
AH
8182017-11-24 Alan Hayward <alan.hayward@arm.com>
819
820 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
821 selftest.
822
49bdb7ee
AH
8232017-11-24 Alan Hayward <alan.hayward@arm.com>
824
825 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
826 * arch/aarch64.c (aarch64_create_target_description): Create
827 new target description.
828 * features/Makefile: Add new files.
829 * features/aarch64.c: Remove file.
830 * features/aarch64-core.c: New autogenerated file.
831 * features/aarch64-fpu.c: New autogenerated file.
832 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
833
8342017-11-24 Alan Hayward <alan.hayward@arm.com>
835
836 * Makefile.in: Add new files.
837 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
838 aarch64_read_description.
839 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
840 Call aarch64_read_description.
841 * aarch64-tdep.c (aarch64_read_description): New function.
842 (aarch64_gdbarch_init): Call aarch64_read_description.
843 * aarch64-tdep.h (aarch64_read_description): New function.
844 * arch/aarch64.c: New file.
845 * configure.tgt: Add new files.
846
98ead37e
YQ
8472017-11-24 Yao Qi <yao.qi@linaro.org>
848
849 * mi/mi-main.c (register_changed_p): Update.
850 * value.c (value_contents_bits_eq): Change return type.
851 (value_contents_eq): Likewise.
852 * value.h: Update comments.
853
62ad7ce7
YQ
8542017-11-24 Yao Qi <yao.qi@linaro.org>
855
856 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
857 local 'changed'. Remove error.
858 (register_changed_p): Change return type to bool.
859
506fe5f4
YQ
8602017-11-24 Yao Qi <yao.qi@linaro.org>
861
862 * arch/tic6x.c: New file.
863 * arch/tic6x.h: New file.
864 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
865 tic6x-core.xml and tic6x-gp.xml.
866 * features/tic6x-c6xp.c: Generated.
867 * features/tic6x-core.c: Generated.
868 * features/tic6x-gp.c: Generated.
869 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
870 "tic6x-".
871
00ea2e2a
SM
8722017-11-23 Simon Marchi <simon.marchi@ericsson.com>
873
874 * mi/mi-main.c (list_available_thread_groups): Change map value
875 type to std::vector.
876
f45e2a77
SM
8772017-11-23 Simon Marchi <simon.marchi@ericsson.com>
878
879 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
880
bd046f64
SM
8812017-11-23 Simon Marchi <simon.marchi@ericsson.com>
882
883 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
884 back to...
885 <children_requested>: ... this.
886 (varobj_get_num_children, varobj_update): Adjust.
887
4c37490d
SM
8882017-11-23 Simon Marchi <simon.marchi@ericsson.com>
889
890 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
891 (ada_value_has_mutated): Likewise.
892 * c-varobj.c (varobj_is_anonymous_child): Likewise.
893 (c_is_path_expr_parent): Likewise.
894 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
895 (mi_cmd_var_set_frozen): Likewise.
896 (mi_cmd_var_update_iter): Likewise.
897 (mi_cmd_var_update): Likewise.
898 * varobj.c (pretty_printing): Likewise.
899 (varobj_enable_pretty_printing): Likewise.
900 (struct varobj_root) <floating, is_valid>: Likewise.
901 (struct varobj_dynamic) <children_requested>: Likewise.
902 (delete_variable): Likewise.
903 (delete_variable_1): Likewise.
904 (install_variable): Likewise.
905 (update_type_if_necessary): Likewise.
906 (install_new_value): Likewise.
907 (value_of_root): Likewise.
908 (is_root_p): Likewise.
909 (varobj_create): Likewise.
910 (varobj_delete): Likewise.
911 (varobj_has_more): Likewise.
912 (varobj_set_frozen): Likewise.
913 (varobj_get_frozen): Likewise.
914 (install_dynamic_child): Likewise.
915 (dynamic_varobj_has_child_method): Likewise.
916 (update_dynamic_varobj_children): Likewise.
917 (varobj_get_num_children): Likewise.
918 (varobj_list_children): Likewise.
919 (is_path_expr_parent): Likewise.
920 (varobj_default_is_path_expr_parent): Likewise.
921 (varobj_is_dynamic_p): Likewise.
922 (varobj_set_value): Likewise.
923 (varobj_value_has_mutated): Likewise.
924 (varobj_update): Likewise.
925 (check_scope): Likewise.
926 (value_of_root_1): Likewise.
927 (varobj_value_get_print_value): Likewise.
928 (varobj_editable_p): Likewise.
929 (varobj_value_is_changeable_p): Likewise.
930 (varobj_floating_p): Likewise.
931 (varobj_default_value_is_changeable_p): Likewise.
932 (varobj_invalidate_iter): Likewise.
933 * varobj.h (struct varobj_update_result) <type_changed,
934 children_changed, changed, value_installed>: Likewise.
935 (struct varobj) <updated, frozen, not_fetched>: Likewise.
936 (struct lang_varobj_ops) <value_is_changeable_p,
937 value_has_mutated, is_path_expr_parent>: Likewise.
938 (varobj_delete): Likewise.
939 (varobj_set_frozen): Likewise.
940 (varobj_get_frozen): Likewise.
941 (varobj_set_value): Likewise.
942 (varobj_update): Likewise.
943 (varobj_editable_p): Likewise.
944 (varobj_floating_p): Likewise.
945 (varobj_has_more): Likewise.
946 (varobj_is_dynamic_p): Likewise.
947 (varobj_default_value_is_changeable_p): Likewise.
948 (varobj_value_is_changeable_p): Likewise.
949 (varobj_is_anonymous_child): Likewise.
950 (varobj_default_is_path_expr_parent): Likewise.
951
9c23b42f
SDJ
9522017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
953
954 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
955 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
956 <type_str>: Convert to 'std::string'.
957 <expr>: Convert to 'expression_up'.
958 (dtrace_probe_arg_s): Delete type and VEC.
959 (dtrace_probe_enabler_s): Likewise.
960 (struct dtrace_probe): Replace by...
961 (class dtrace_static_probe_ops): ...this and...
962 (class dtrace_probe): ...this.
963 (dtrace_probe_is_linespec): Rename to...
964 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
965 to reflect change.
966 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
967 Adjust code. Create new instance of 'dtrace_probe'.
968 (dtrace_build_arg_exprs): Rename to...
969 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
970 reflect change.
971 (dtrace_get_probes): Rename to...
972 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
973 to reflect change.
974 (dtrace_get_arg): Rename to...
975 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
976 reflect change.
977 (dtrace_probe_is_enabled): Rename to...
978 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
979 change.
980 (dtrace_get_probe_address): Rename to...
981 (dtrace_probe::get_relocated_address): ...this. Adjust code
982 to reflect change.
983 (dtrace_get_probe_argument_count): Rename to...
984 (dtrace_probe::get_argument_count): ...this. Adjust code to
985 reflect change.
986 (dtrace_can_evaluate_probe_arguments): Rename to...
987 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
988 to reflect change.
989 (dtrace_evaluate_probe_argument): Rename to...
990 (dtrace_probe::evaluate_argument): ...this. Adjust code to
991 reflect change.
992 (dtrace_compile_to_ax): Rename to...
993 (dtrace_probe::compile_to_ax): ...this. Adjust code to
994 reflect change.
995 (dtrace_probe_destroy): Delete.
996 (dtrace_type_name): Rename to...
997 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
998 reflect change.
999 (dtrace_probe::get_static_ops): New method.
1000 (dtrace_gen_info_probes_table_header): Rename to...
1001 (dtrace_static_probe_ops::gen_info_probes_table_header):
1002 ...this. Adjust code to reflect change.
1003 (dtrace_gen_info_probes_table_values): Rename to...
1004 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1005 code to reflect change.
1006 (dtrace_enable_probe): Rename to...
1007 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1008 change.
1009 (dtrace_disable_probe): Rename to...
1010 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1011 change.
1012 (struct probe_ops dtrace_probe_ops): Delete.
1013 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1014 instead of 'info_probes_for_ops'.
1015 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1016 of 'all_probe_ops'.
1017
0e9ae10f
SDJ
10182017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1019 Simon Marchi <simark@simark.ca>
1020
1021 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1022 variable.
1023 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1024 <aexpr>: Change type to 'expression_up'.
1025 (stap_probe_arg_s): Delete type and VEC.
1026 (struct stap_probe): Delete. Replace by...
1027 (class stap_static_probe_ops): ...this and...
1028 (class stap_probe): ...this. Rename variables to add 'm_'
1029 prefix. Do not use 'union' for arguments anymore.
1030 (stap_get_expected_argument_type): Receive probe name instead
1031 of 'struct stap_probe'. Adjust code.
1032 (stap_parse_probe_arguments): Rename to...
1033 (stap_probe::parse_arguments): ...this. Adjust code to
1034 reflect change.
1035 (stap_get_probe_address): Rename to...
1036 (stap_probe::get_relocated_address): ...this. Adjust code
1037 to reflect change.
1038 (stap_get_probe_argument_count): Rename to...
1039 (stap_probe::get_argument_count): ...this. Adjust code
1040 to reflect change.
1041 (stap_get_arg): Rename to...
1042 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1043 reflect change.
1044 (can_evaluate_probe_arguments): Rename to...
1045 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1046 to reflect change.
1047 (stap_evaluate_probe_argument): Rename to...
1048 (stap_probe::evaluate_argument): ...this. Adjust code
1049 to reflect change.
1050 (stap_compile_to_ax): Rename to...
1051 (stap_probe::compile_to_ax): ...this. Adjust code to
1052 reflect change.
1053 (stap_probe_destroy): Delete.
1054 (stap_modify_semaphore): Adjust comment.
1055 (stap_set_semaphore): Rename to...
1056 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1057 change.
1058 (stap_clear_semaphore): Rename to...
1059 (stap_probe::clear_semaphore): ...this. Adjust code to
1060 reflect change.
1061 (stap_probe::get_static_ops): New method.
1062 (handle_stap_probe): Adjust code to create instance of
1063 'stap_probe'.
1064 (stap_get_probes): Rename to...
1065 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1066 reflect change.
1067 (stap_probe_is_linespec): Rename to...
1068 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1069 reflect change.
1070 (stap_type_name): Rename to...
1071 (stap_static_probe_ops::type_name): ...this. Adjust code to
1072 reflect change.
1073 (stap_gen_info_probes_table_header): Rename to...
1074 (stap_static_probe_ops::gen_info_probes_table_header):
1075 ...this. Adjust code to reflect change.
1076 (stap_gen_info_probes_table_values): Rename to...
1077 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1078 code to reflect change.
1079 (struct probe_ops stap_probe_ops): Delete.
1080 (info_probes_stap_command): Use 'info_probes_for_spops'
1081 instead of 'info_probes_for_ops'.
1082 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1083 of 'all_probe_ops'.
1084
935676c9
SDJ
10852017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1086
1087 * break-catch-throw.c (fetch_probe_arguments): Use
1088 'probe.prob' instead of 'probe.probe'.
1089 * breakpoint.c (create_longjmp_master_breakpoint): Call
1090 'can_evaluate_arguments' and 'get_relocated_address' methods
1091 from probe.
1092 (create_exception_master_breakpoint): Likewise.
1093 (add_location_to_breakpoint): Use 'sal->prob' instead of
1094 'sal->probe'.
1095 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1096 probe.
1097 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1098 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1099 of 'probe_ops'.
1100 (probe_key_free): Call 'delete' on probe.
1101 (check_exception_resume): Use 'probe.prob' instead of
1102 'probe.probe'.
1103 * location.c (string_to_event_location_basic): Call
1104 'probe_linespec_to_static_ops'.
1105 * probe.c (class any_static_probe_ops): New class.
1106 (any_static_probe_ops any_static_probe_ops): New variable.
1107 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1108 argument. Adjust code to reflect change.
1109 (parse_probes): Use 'static_probe_ops' instead of
1110 'probe_ops'. Adjust code to reflect change.
1111 (find_probes_in_objfile): Call methods to get name and
1112 provider from probe.
1113 (find_probe_by_pc): Use 'result.prob' instead of
1114 'result.probe'. Call 'get_relocated_address' method from
1115 probe.
1116 (collect_probes): Adjust comment and argument list to receive
1117 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1118 reflect change. Call necessary methods from probe.
1119 (compare_probes): Call methods to get name and provider from
1120 probes.
1121 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1122 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1123 adjust code accordingly.
1124 (print_ui_out_not_applicables): Likewise.
1125 (info_probes_for_ops): Rename to...
1126 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1127 as argument instead of 'probe_ops'. Adjust code. Call
1128 necessary methods from probe.
1129 (info_probes_command): Use 'info_probes_for_spops'.
1130 (enable_probes_command): Pass correct argument to
1131 'collect_probes'. Call methods from probe.
1132 (disable_probes_command): Likewise.
1133 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1134 (get_probe_argument_count): Move to
1135 'any_static_probe_ops::get_argument_count'.
1136 (can_evaluate_probe_arguments): Move to
1137 'any_static_probe_ops::can_evaluate_arguments'.
1138 (evaluate_probe_argument): Move to
1139 'any_static_probe_ops::evaluate_argument'.
1140 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1141 'probe.probe'.
1142 (probe_linespec_to_ops): Rename to...
1143 (probe_linespec_to_static_ops): ...this. Adjust code.
1144 (probe_any_is_linespec): Rename to...
1145 (any_static_probe_ops::is_linespec): ...this.
1146 (probe_any_get_probes): Rename to...
1147 (any_static_probe_ops::get_probes): ...this.
1148 (any_static_probe_ops::type_name): New method.
1149 (any_static_probe_ops::gen_info_probes_table_header): New
1150 method.
1151 (compute_probe_arg): Use 'pc_probe.prob' instead of
1152 'pc_probe.probe'. Call methods from probe.
1153 (compile_probe_arg): Likewise.
1154 (std::vector<const probe_ops *> all_probe_ops): Delete.
1155 (std::vector<const static_probe_ops *> all_static_probe_ops):
1156 New variable.
1157 (_initialize_probe): Use 'all_static_probe_ops' instead of
1158 'all_probe_ops'.
1159 * probe.h (struct info_probe_column) <field_name>: Delete
1160 extraneous newline
1161 (info_probe_column_s): Delete type and VEC.
1162 (struct probe_ops): Delete. Replace with...
1163 (class static_probe_ops): ...this and...
1164 (clas probe): ...this.
1165 (struct bound_probe) <bound_probe>: Delete extraneous
1166 newline. Adjust constructor to receive 'probe' instead of
1167 'struct probe'.
1168 <probe>: Rename to...
1169 <prob>: ...this. Delete extraneous newline.
1170 <objfile>: Delete extraneous newline.
1171 (register_probe_ops): Delete unused prototype.
1172 (info_probes_for_ops): Rename to...
1173 (info_probes_for_spops): ...this. Adjust comment.
1174 (get_probe_address): Move to 'probe::get_address'.
1175 (get_probe_argument_count): Move to
1176 'probe::get_argument_count'.
1177 (can_evaluate_probe_arguments): Move to
1178 'probe::can_evaluate_arguments'.
1179 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1180 * solib-svr4.c (struct svr4_info): Adjust comment.
1181 (struct probe_and_action) <probe>: Rename to...
1182 <prob>: ...this.
1183 (register_solib_event_probe): Receive 'probe' instead of
1184 'struct probe' as argument. Use 'prob' instead of 'probe'
1185 when applicable.
1186 (solib_event_probe_action): Call 'get_argument_count' method
1187 from probe. Adjust comment.
1188 (svr4_handle_solib_event): Adjust comment. Call
1189 'evaluate_argument' method from probe.
1190 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1191 from probe.
1192 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1193 'struct probe'. Call 'can_evaluate_arguments' from probe.
1194 * symfile.h: Forward declare 'class probe' instead of 'struct
1195 probe'.
1196 * symtab.h: Likewise.
1197 (struct symtab_and_line) <probe>: Rename to...
1198 <prob>: ...this.
1199 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1200 Call probe methods.
1201 (stop_tracing): Likewise.
1202
8f6cb6c3
JB
12032017-11-22 Joel Brobecker <brobecker@adacore.com>
1204
1205 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1206 trailing newline at end of string in call to warning.
1207
479f8de1
SM
12082017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1209
1210 * osdata.h: Include vector isntead of vec.h.
1211 (osdata_column_s): Remove typedef.
1212 (struct osdata_column): Add constructor.
1213 <name, value>: Change type to std::string.
1214 (DEF_VEC_O (osdata_column_s)): Remove.
1215 (osdata_item_s): Remove typedef.
1216 (struct osdata_item) <columns>: Change type to std::vector.
1217 (DEF_VEC_O (osdata_item_s)): Remove.
1218 (struct osdata): Add constructor.
1219 <type>: Change type to std::string.
1220 <items>: Change type to std::vector.
1221 (osdata_p): Remove typedef.
1222 (DEF_VEC_P (osdata_p)): Remove.
1223 (osdata_parse): Return a unique_ptr.
1224 (osdata_free): Remove.
1225 (make_cleanup_osdata_free): Remove.
1226 (get_osdata): Return a unique_ptr.
1227 (get_osdata_column): Return pointer to std::string, take a
1228 reference to osdata_item as parameter.
1229 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1230 unique_ptr.
1231 <property_name>: Change type to std::string.
1232 (osdata_start_osdata): Allocate osdata with new and adjust.
1233 (osdata_start_item): Adjust.
1234 (osdata_start_column): Adjust.
1235 (osdata_end_column): Adjust.
1236 (clear_parsing_data): Remove.
1237 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1238 (osdata_item_clear): Remove.
1239 (get_osdata): return a unique_ptr and adjust.
1240 (get_osdata_column): Return a pointer to std::string and adjust.
1241 (info_osdata): Adjust.
1242 * mi/mi-main.c: Include <map>.
1243 (free_vector_of_osdata_items): Remove.
1244 (list_available_thread_groups): Adjust, use std::map instead of
1245 splay tree.
1246
41bd68f5
SM
12472017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1248
1249 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1250 case in switch.
1251
7e2fd2f4
SM
12522017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1253
1254 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1255
0604393c
SM
12562017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1257
1258 * varobj.h (struct varobj_update_result): Add constructor, add
1259 move constructor, disable copy and assign, initialize fields.
1260 <newobj>: Change type to std::vector.
1261 (varobj_update): Return std::vector.
1262 * varobj.c (install_dynamic_child): Change VEC parameters to
1263 std::vector and adjust.
1264 (update_dynamic_varobj_children): Likewise.
1265 (varobj_update): Return std::vector and adjust.
1266 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1267
ddf0ea08
SM
12682017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1269
1270 * varobj.h (struct varobj) <parent>: Remove const.
1271 <children>: Change type to std::vector.
1272 (varobj_list_children): Return std::vector const reference.
1273 (varobj_restrict_range): Change parameter type to std::vector
1274 const reference.
1275 * varobj.c (varobj_has_more): Adjust.
1276 (varobj_restrict_range): Change parameter type to std::vector
1277 const reference and adjust.
1278 (install_dynamic_child): Adjust.
1279 (update_dynamic_varobj_children): Adjust.
1280 (varobj_list_children): Return std::vector const reference and
1281 adjust.
1282 (varobj_add_child): Adjust.
1283 (update_type_if_necessary): Adjust.
1284 (varobj_update): Adjust.
1285 (delete_variable_1): Adjust.
1286 * ada-varobj.c (ada_value_has_mutated): Adjust.
1287 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1288
9e5b9d2b
SM
12892017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1290
1291 * varobj.h (struct varobj): Add constructor and destructor,
1292 initialize fields.
1293 * varobj.c (struct varobj_root): Initialize fields.
1294 (struct varobj_dynamic): Initialize fields.
1295 (varobj_create): Use unique_ptr instead of cleanup. Create
1296 varobj with new instead of new_root_variable.
1297 (delete_variable_1): Free variable with delete instead of
1298 free_variable.
1299 (create_child_with_value): Create variable with new instead of
1300 new_variable.
1301 (varobj::varobj): New.
1302 (varobj::~varobj): New (body mostly coming from free_variable).
1303 (new_variable): Remove.
1304 (free_variable): Remove.
1305 (do_free_variable_cleanup): Remove.
1306 (make_cleanup_free_variable): Remove.
1307
fc35dab1
UW
13082017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1309
1310 * core-regset.c: Remove file.
1311 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1312
2400729e
UW
13132017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1314
1315 * NEWS: Document use of GNU MPFR.
1316 * README: Likewise.
1317
1318 * Makefile.in (LIBMPFR): Add define.
1319 (CLIBS): Add $(LIBMPFR).
1320 * configure.ac: Add --with-mpfr configure option.
1321 * configure: Regenerate.
1322 * config.in: Regenerate.
1323
1324 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1325 (class mpfr_float_ops): New type.
1326 (mpfr_float_ops::from_target): Two new overloaded functions.
1327 (mpfr_float_ops::to_target): Likewise.
1328 (mpfr_float_ops::to_string): New function.
1329 (mpfr_float_ops::from_string): Likewise.
1330 (mpfr_float_ops::to_longest): Likewise.
1331 (mpfr_float_ops::from_longest): Likewise.
1332 (mpfr_float_ops::from_ulongest): Likewise.
1333 (mpfr_float_ops::to_host_double): Likewise.
1334 (mpfr_float_ops::from_host_double): Likewise.
1335 (mpfr_float_ops::convert): Likewise.
1336 (mpfr_float_ops::binop): Likewise.
1337 (mpfr_float_ops::compare): Likewise.
1338 (get_target_float_ops): Use mpfr_float_ops if available.
1339
7a26362d
UW
13402017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1341
1342 * target-float.c: Do not include <math.h>.
1343 Include <cmath> and <limits>.
1344 (DOUBLEST): Do not define.
1345 (class target_float_ops): New type.
1346 (class host_float_ops): New templated type.
1347 (class decimal_float_ops): New type.
1348
1349 (floatformat_to_doublest): Rename to ...
1350 (host_float_ops<T>::from_target): ... this. Use template type T
1351 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1352 (host_float_ops<T>::from_target): New overload using a type argument.
1353 (floatformat_from_doublest): Rename to ...
1354 (host_float_ops<T>::to_target): ... this. Use template type T
1355 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1356 (host_float_ops<T>::to_target): New overload using a type argument.
1357 (floatformat_printf_format): New function.
1358 (struct printf_length_modifier): New templated type.
1359 (floatformat_to_string): Rename to ...
1360 (host_float_ops<T>::to_string): ... this. Use type instead of
1361 floatformat argument. Use floatformat_printf_format and
1362 printf_length_modifier. Remove special handling of invalid numbers,
1363 infinities and NaN (moved to target_float_to_string).
1364 (struct scanf_length_modifier): New templated type.
1365 (floatformat_from_string): Rename to ...
1366 (host_float_ops<T>::from_string): ... this. Use type instead of
1367 floatformat argument. Use scanf_length_modifier.
1368 (floatformat_to_longest): Rename to ...
1369 (host_float_ops<T>::to_longest): ... this. Use type instead of
1370 floatformat argument. Handle out-of-range values deterministically.
1371 (floatformat_from_longest): Rename to ...
1372 (host_float_ops<T>::from_longest): ... this. Use type instead of
1373 floatformat argument.
1374 (floatformat_from_ulongest): Rename to ...
1375 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1376 floatformat argument.
1377 (floatformat_to_host_double): Rename to ...
1378 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1379 floatformat argument.
1380 (floatformat_from_host_double): Rename to ...
1381 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1382 floatformat argument.
1383 (floatformat_convert): Rename to ...
1384 (host_float_ops<T>::convert): ... this. Use type instead of
1385 floatformat arguments. Remove handling of no-op conversions.
1386 (floatformat_binop): Rename to ...
1387 (host_float_ops<T>::binop): ... this. Use type instead of
1388 floatformat arguments.
1389 (floatformat_compare): Rename to ...
1390 (host_float_ops<T>::compare): ... this. Use type instead of
1391 floatformat arguments.
1392
1393 (match_endianness): Use type instead of length/byte_order arguments.
1394 (set_decnumber_context): Likewise.
1395 (decimal_from_number): Likewise. Update calls.
1396 (decimal_to_number): Likewise.
1397 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1398 (decimal_float_ops::to_host_double): New dummy function.
1399 (decimal_float_ops::from_host_double): Likewise.
1400 (decimal_to_string): Rename to ...
1401 (decimal_float_ops::to_string): ... this. Use type instead of
1402 length/byte_order arguments. Update calls.
1403 (decimal_from_string): Rename to ...
1404 (decimal_float_ops::from_string): ... this. Use type instead of
1405 length/byte_order arguments. Update calls.
1406 (decimal_from_longest): Rename to ...
1407 (decimal_float_ops::from_longest): ... this. Use type instead of
1408 length/byte_order arguments. Update calls.
1409 (decimal_from_ulongest): Rename to ...
1410 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1411 length/byte_order arguments. Update calls.
1412 (decimal_to_longest): Rename to ...
1413 (decimal_float_ops::to_longest): ... this. Use type instead of
1414 length/byte_order arguments. Update calls.
1415 (decimal_binop): Rename to ...
1416 (decimal_float_ops::binop): ... this. Use type instead of
1417 length/byte_order arguments. Update calls.
1418 (decimal_compare): Rename to ...
1419 (decimal_float_ops::compare): ... this. Use type instead of
1420 length/byte_order arguments. Update calls.
1421 (decimal_convert): Rename to ...
1422 (decimal_float_ops::convert): ... this. Use type instead of
1423 length/byte_order arguments. Update calls.
1424
1425 (target_float_same_category_p): New function.
1426 (target_float_same_format_p): Likewise.
1427 (target_float_format_length): Likewise.
1428 (enum target_float_ops_kind): New type.
1429 (get_target_float_ops_kind): New function.
1430 (get_target_float_ops): Three new overloaded functions.
1431
1432 (target_float_is_zero): Update call.
1433 (target_float_to_string): Add special handling of invalid numbers,
1434 infinities and NaN (moved from floatformat_to_string). Use
1435 target_float_ops callback.
1436 (target_float_from_string): Use target_float_ops callback.
1437 (target_float_to_longest): Likewise.
1438 (target_float_from_longest): Likewise.
1439 (target_float_from_ulongest): Likewise.
1440 (target_float_to_host_double): Likewise.
1441 (target_float_from_host_double): Likewise.
1442 (target_float_convert): Add special case for no-op conversions.
1443 Use target_float_ops callback.
1444 (target_float_binop): Use target_float_ops callback.
1445 (target_float_compare): Likewise.
1446
a9f26f60
YQ
14472017-11-22 Yao Qi <yao.qi@linaro.org>
1448
1449 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1450
29f9a567
YQ
14512017-11-22 Yao Qi <yao.qi@linaro.org>
1452
1453 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1454 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1455
3b1b69bf
JG
14562017-11-21 Jerome Guitton <guitton@adacore.com>
1457
1458 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1459 with event ptid from the lower layer before doing the
1460 ravenscar-specific update.
1461
54aa6c67
JB
14622017-11-21 Joel Brobecker <brobecker@adacore.com>
1463
1464 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1465 the ptid's TID is nonzero.
1466
cf3fbed4
JB
14672017-11-21 Joel Brobecker <brobecker@adacore.com>
1468
1469 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1470 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1471 Make non-static. Change return type to char *. Adjust code
1472 accordingly. Rewrite the function's documentation.
1473 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1474 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1475 we have enough debugging information in the runtime to support
1476 Ada task debugging before we enable the ravenscar-thread layer.
1477
9edcc12f
JB
14782017-11-21 Joel Brobecker <brobecker@adacore.com>
1479
1480 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1481 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1482 * ravenscar-thread.c: Add into comment.
1483 (base_magic_null_ptid): Delete.
1484 (base_ptid): Change documentation.
1485 (ravenscar_active_task): Renames ravenscar_running_thread.
1486 All callers updated throughout.
1487 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1488 (ravenscar_task_is_currently_active): Likewise.
1489 (get_base_thread_from_ravenscar_task): Ditto.
1490 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1491 (ravenscar_runtime_initialized): Likewise.
1492 (get_running_thread_id): Add new parameter "cpu". Adjust
1493 implementation to handle this new parameter.
1494 (ravenscar_fetch_registers): Small adjustment to use
1495 is_ravenscar_task and ravenscar_task_is_currently_active in
1496 order to decide whether to use the target beneath or this
1497 module's arch_ops.
1498 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1499 (ravenscar_stopped_by_sw_breakpoint): Use
1500 get_base_thread_from_ravenscar_task to get the underlying
1501 thread, rather than using base_ptid.
1502 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1503 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1504 Likewise.
1505 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1506
65d40437
JB
15072017-11-21 Joel Brobecker <brobecker@adacore.com>
1508
1509 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1510 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1511 (get_tcb_types_info): Set fieldnos.base_cpu.
1512 (read_atcb): Set task_info->base_cpu.
1513 (info_task): Print "Base CPU" info if set by runtime.
1514
e02544b2
JB
15152017-11-21 Joel Brobecker <brobecker@adacore.com>
1516
1517 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1518 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1519 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1520 New functions.
1521 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1522 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1523 to_stopped_data_address and to_core_of_thread fields of
1524 ravenscar_ops.
1525
ed0f4273
UW
15262017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1527
1528 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1529 (struct gdbarch_tdep): New member long_double_abi.
1530 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1531 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1532 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1533 format depending on long_double_abi tdep member.
1534 (ppc_floatformat_for_type): Handle __ibm128 type.
1535
0fc76421
SM
15362017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1537
1538 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1539
e6b2f5ef
PA
15402017-11-21 Pedro Alves <palves@redhat.com>
1541
1542 * dwarf2read.c (mapped_index::find_name_components_bounds)
1543 <completion mode, upper bound>: Use std::lower_bound instead of
1544 std::upper_bound.
1545 (test_mapped_index_find_name_component_bounds): Remove incorrect
1546 "t1_fund" from expected symbols.
1547
5c58de74
PA
15482017-11-21 Pedro Alves <palves@redhat.com>
1549
1550 * dwarf2read.c (mapped_index::name_components_casing): New field.
1551 (mapped_index) <build_name_components,
1552 find_name_components_bounds): Declare new methods.
1553 (mapped_index::find_name_components_bounds)
1554 (mapped_index::build_name_components): New methods, factored out
1555 from dw2_expand_symtabs_matching_symbol.
1556 (check_find_bounds_finds)
1557 (test_mapped_index_find_name_component_bounds): New.
1558 (run_test): Rename to ...
1559 (test_dw2_expand_symtabs_matching_symbol): ... this.
1560 (run_test): Reimplement.
1561
e1ef7d7a
PA
15622017-11-21 Pedro Alves <palves@redhat.com>
1563
1564 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1565 (symbol_end): Use cp_ident_is_alnum.
1566 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1567 * dwarf2read.c (make_sort_after_prefix_name): New function.
1568 (dw2_expand_symtabs_matching_symbol): Use it.
1569 (test_symbols): Add more symbols.
1570 (run_test): Add tests.
1571
cf724bc9
TT
15722017-11-17 Tom Tromey <tom@tromey.com>
1573
1574 * symtab.h (enum symbol_subclass_kind): New.
1575 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1576 Remove.
1577 <subclass>: New member.
1578 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1579 * rust-lang.c (rust_get_trait_object_pointer): Update.
1580 * dwarf2read.c (read_func_scope): Update.
1581 (read_variable): Update.
1582
68e745e3
TT
15832017-11-17 Tom Tromey <tom@tromey.com>
1584
1585 * dwarf2read.c (read_func_scope): Update.
1586 * symtab.h (struct template_symbol): Derive from symbol.
1587 <base>: Remove.
1588
71a3c369
TT
15892017-11-17 Tom Tromey <tom@tromey.com>
1590
1591 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1592 (struct rust_vtable_symbol): New.
1593 (find_symbol_at_address): Declare.
1594 * symtab.c (find_symbol_at_address): New function.
1595 * symfile.h (struct quick_symbol_functions)
1596 <find_compunit_symtab_by_address>: New member.
1597 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1598 function.
1599 (debug_sym_quick_functions): Link to
1600 debug_qf_find_compunit_symtab_by_address.
1601 * rust-lang.c (rust_get_trait_object_pointer): New function.
1602 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1603 rust_get_trait_object_pointer.
1604 * psymtab.c (psym_relocate): Clear psymbol_map.
1605 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1606 functions.
1607 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1608 * objfiles.h (struct objfile) <psymbol_map>: New member.
1609 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1610 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1611 (rust_containing_type, read_variable): New functions.
1612
7468702d
SM
16132017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1614
1615 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1616
37269bc9
SM
16172017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1618
1619 * common/filestuff.c: Include <algorithm>.
1620 (open_fds): Change type to std::vector<int>.
1621 (do_mark_open_fd): Adjust.
1622 (unmark_fd_no_cloexec): Adjust.
1623 (do_close): Adjust.
1624
5c632425
SM
16252017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1626
1627 * breakpoint.c (output_thread_groups): Take an std::vector.
1628 (print_one_breakpoint_location): Adjust.
1629
ced9779b
JB
16302017-11-17 Joel Brobecker <brobecker@adacore.com>
1631
1632 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1633 (ada_evaluate_subexp_for_cast): New function.
1634 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1635 ada_evaluate_subexp_for_cast.
1636 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1637 eval_skip_value.
1638 * eval.c (evaluate_var_value): Make non-static.
1639 (evaluate_var_msym_value, eval_skip_value): Likewise.
1640 * value.h (evaluate_var_value, evaluate_var_msym_value)
1641 (eval_skip_value): Declare.
1642
b7e22850
JB
16432017-11-16 Joel Brobecker <brobecker@adacore.com>
1644
1645 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1646 Update all callers.
1647
9ccabccd
PA
16482017-11-16 Pedro Alves <palves@redhat.com>
1649
1650 * python/py-unwind.c (pyuw_sniffer): Translate
1651 PyExc_KeyboardInterrupt to a GDB Quit exception.
1652
d930703d
PA
16532017-11-16 Pedro Alves <palves@redhat.com>
1654
1655 * infrun.c (resume_cleanups): Delete.
1656 (resume): No longer install a resume_cleanups cleanup nor call
1657 QUIT.
1658 (proceed): Pass the terminal to the inferior.
1659 (keep_going_pass_signal): No longer install a resume_cleanups
1660 cleanup.
1661
38dc2859
PA
16622017-11-16 Pedro Alves <palves@redhat.com>
1663
1664 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1665 if the prompt is blocked.
1666
688fca4f
PA
16672017-11-16 Pedro Alves <palves@redhat.com>
1668
1669 * breakpoint.c (insert_bp_location): Replace bp_err and
1670 bp_err_message locals by a gdb_exception local.
1671
e2c33ac7
PA
16722017-11-16 Pedro Alves <palves@redhat.com>
1673
1674 * inflow.c (scoped_ignore_sigttou): New class.
1675 (child_terminal_ours_1, new_tty): Use it.
1676
d7236961
UW
16772017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1678
1679 * target-float.c (decimal_from_number): Add byte_order argument and
1680 call match_endianness. Error if unknown floating-point type.
1681 (decimal_to_number): Add byte_order argument and call match_endianness.
1682 (decimal_from_longest): Update call. Do not call match_endianness.
1683 (decimal_from_ulongest): Likewise.
1684 (decimal_binop): Likewise.
1685 (decimal_is_zero): Likewise.
1686 (decimal_compare): Likewise.
1687 (decimal_convert): Likewise.
1688
d8ae99a7
PM
16892017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1690
1691 * python/python.c (gdbpy_rbreak): New function.
1692 * NEWS: Document Python rbreak feature.
1693
c632b645
YQ
16942017-11-16 Yao Qi <yao.qi@linaro.org>
1695
1696 * features/tic6x-c62x.xml: Remove.
1697 * features/tic6x-c64x.xml: Remove.
1698 * features/tic6x-c64xp.xml: Remove.
1699
a014b87a
JB
17002017-11-15 John Baldwin <jhb@FreeBSD.org>
1701
1702 * symtab.h: Include <array>.
1703
94765011
JB
17042017-11-15 John Baldwin <jhb@FreeBSD.org>
1705
1706 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1707 (bsd_kvm_proc_cmd): Likewise.
1708
625ad440
SM
17092017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1710
1711 * tui/tui-win.c (window_name_completer): Replace VEC with
1712 std::vector.
1713
c0c11fa9
AC
17142017-11-15 Andrew Cagney <cagney@gnu.org>
1715
1716 * MAINTAINERS: Remove no-longer applicable entries.
1717
34a7ebaf
AC
17182017-11-15 Andrew Cagney <cagney@gnu.org>
1719
1720 * MAINTAINERS: Move self to Past Maintainers.
1721
5334ef39
YQ
17222017-11-15 Yao Qi <yao.qi@linaro.org>
1723
1724 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1725 * features/nios2-linux.c: Remove.
1726 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1727 initialize_tdesc_nios2_linux.
1728
a714b0d6
YQ
17292017-11-15 Yao Qi <yao.qi@linaro.org>
1730
1731 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1732 M68HC11_LAST_HARD_REG + 1.
1733
92ffd475
PC
17342017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1735
1736 PR gdb/22388
1737 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1738 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1739 Return TARGET_XFER_EOF if size of returned data is 0.
1740
07431908
SM
17412017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1742
1743 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1744 memory-map-selftests.c.
1745 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1746 * memory-map.c (memory_map_start_memory): Fix computation of hi
1747 address.
1748 * unittests/memory-map-selftests.c: New file.
1749
31432a67
JB
17502017-11-09 Joel Brobecker <brobecker@adacore.com>
1751
1752 * ada-lang.c: Fix some typos in the general command documenting
1753 how Ada expressions are being evaluated and how their result
1754 is printed.
1755
e793c052
TT
17562017-11-09 Tom Tromey <tom@tromey.com>
1757
1758 * psymtab.c (psymbol_hash): Do not hash string contents.
1759 (psymbol_compare): Add comment.
1760
7e8835c5
TT
17612017-11-09 Tom Tromey <tom@tromey.com>
1762
1763 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1764
286acbb5
JB
17652017-11-08 Joel Brobecker <brobecker@adacore.com>
1766
1767 * ada-exp.y (write_var_from_sym): Remove parameter
1768 "orig_left_context". Update all callers.
1769
b44ec619
SM
17702017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1771
1772 * tracepoint.h (class collection_list) <stringify>: Return
1773 std::vector<std::string>.
1774 (encode_actions_rsp): Change parameters to
1775 std::vector<std::string> *.
1776 * tracepoint.c (collection_list::stringify): Return
1777 std::vector<std::string> and adjust accordingly.
1778 (encode_actions_rsp): Changee parameters to
1779 std::vector<std::string> and adjust accordingly.
1780 * remote.c (free_actions_list),
1781 free_actions_list_cleanup_wrapper): Remove.
1782 (remote_download_tracepoint): Adjust to std::vector.
1783
2f4732b0
TT
17842017-11-08 Tom Tromey <tom@tromey.com>
1785
1786 * dwarf2read.c (symbolp): Remove typedef.
1787 (read_func_scope): Use std::vector.
1788 (process_structure_scope): Use std::vector.
1789
f9d67a22
PA
17902017-11-08 Pedro Alves <palves@redhat.com>
1791
1792 * ada-lang.c (ada_make_symbol_completion_list): Use
1793 completion_skip_symbol.
1794 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1795 (symbol_is_function_or_method(symbol*)): New.
1796 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1797 completion_skip_symbol.
1798 (default_collect_symbol_completion_matches_break_on): Use
1799 completion_skip_symbol. Pass down mode.
1800 (collect_file_symbol_completion_matches): Pass down mode.
1801 * symtab.h (symbol_is_function_or_method): New declarations.
1802 (completion_skip_symbol): New template function.
1803
56d87ef7
PA
18042017-11-08 Pedro Alves <palves@redhat.com>
1805
1806 * linespec.c (iterate_over_all_matching_symtabs): Add
1807 search_domain parameter. Pass it down to expand_symtabs_matching.
1808 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1809 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1810 search_domain.
1811 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1812 Pass it down.
1813 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1814 symbols.
1815 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1816 it down.
1817
1b026119
PA
18182017-11-08 Pedro Alves <palves@redhat.com>
1819
1820 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1821 text_len locals and don't pass them down.
1822 * symtab.c (completion_list_add_name): Remove
1823 sym_text/sym_text_len parameters and adjust.
1824 (completion_list_add_symbol, completion_list_add_msymbol)
1825 (completion_list_objc_symbol, completion_list_add_fields)
1826 (add_symtab_completions): Likewise.
1827 (default_collect_symbol_completion_matches_break_on)
1828 (collect_file_symbol_completion_matches): Remove sym_text_len
1829 local and don't pass it down.
1830 * symtab.h (completion_list_add_name): Remove
1831 sym_text/sym_text_len parameters.
1832
c62446b1
PA
18332017-11-08 Pedro Alves <palves@redhat.com>
1834
1835 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1836 unittests/lookup_name_info-selftests.c.
1837 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1838 * cp-support.c: Include "selftest.h".
1839 (cp_remove_params_1): Rename from cp_remove_params. Add
1840 'require_param' parameter, and handle it.
1841 (cp_remove_params): Reimplement.
1842 (cp_remove_params_if_any): New.
1843 (selftests::quote): New.
1844 (selftests::check_remove_params): New.
1845 (selftests::test_cp_remove_params): New.
1846 (_initialize_cp_support): Install
1847 selftests::test_cp_remove_params.
1848 * cp-support.h (cp_remove_params_if_any): Declare.
1849 * dwarf2read.c :Include "selftest.h".
1850 (dw2_expand_symtabs_matching_symbol): Use
1851 lookup_name_info::make_ignore_params.
1852 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1853 (selftests::dw2_expand_symtabs_matching::string_or_null)
1854 (selftests::dw2_expand_symtabs_matching::check_match)
1855 (selftests::dw2_expand_symtabs_matching::test_symbols)
1856 (selftests::dw2_expand_symtabs_matching::run_test): New.
1857 (_initialize_dwarf2_read): Register
1858 selftests::dw2_expand_symtabs_matching::run_test.
1859 * psymtab.c (psym_expand_symtabs_matching): Use
1860 lookup_name_info::make_ignore_params.
1861 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1862 If the lookup name wants to ignore parameters, strip them.
1863 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1864 code handling '('.
1865 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1866 (default_collect_symbol_completion_matches_break_on): Don't try to
1867 strip parameters.
1868 * symtab.h (lookup_name_info::lookup_name_info): Add
1869 'ignore_parameters' parameter.
1870 (lookup_name_info::ignore_parameters)
1871 (lookup_name_info::make_ignore_params): New methods.
1872 (lookup_name_info::m_ignore_parameters): New field.
1873 * unittests/lookup_name_info-selftests.c: New file.
1874
61920122
PA
18752017-11-08 Pedro Alves <palves@redhat.com>
1876
1877 * dwarf2read.c (dw2_expand_marked_cus)
1878 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1879 (dw2_expand_symtabs_matching): Move further below.
1880 (dw2_expand_marked_cus): Reindent.
1881
3f563c84
PA
18822017-11-08 Pedro Alves <palves@redhat.com>
1883
1884 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1885 (struct name_component): New.
1886 (mapped_index::name_components): New field.
1887 (mapped_index::symbol_name_at): New method.
1888 (dwarf2_read_index): Call mapped_index ctor.
1889 (dw2_map_matching_symbols): Add comment about name_components
1890 table.
1891 (dw2_expand_symtabs_matching): Factor part to...
1892 (dw2_expand_symtabs_matching_symbol): ... this new function.
1893 Build name components table, and lookup symbols in it before
1894 calling the name matcher.
1895 (dw2_expand_marked_cus): New, factored out from
1896 dw2_expand_symtabs_matching.
1897 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1898
b5ec771e
PA
18992017-11-08 Pedro Alves <palves@redhat.com>
1900
1901 * ada-lang.c (ada_encode): Rename to ..
1902 (ada_encode_1): ... this. Add throw_errors parameter and handle
1903 it.
1904 (ada_encode): Reimplement.
1905 (match_name): Delete, folded into full_name.
1906 (resolve_subexp): No longer pass the encoded name to
1907 ada_lookup_symbol_list.
1908 (should_use_wild_match): Delete.
1909 (name_match_type_from_name): New.
1910 (ada_lookup_simple_minsym): Use lookup_name_info and the
1911 language's symbol_name_matcher_ftype.
1912 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1913 (ada_add_block_renamings): Adjust to use lookup_name_info.
1914 (ada_lookup_name): New.
1915 (add_nonlocal_symbols, ada_add_all_symbols)
1916 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1917 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1918 (ada_name_for_lookup): Delete.
1919 (ada_lookup_encoded_symbol): Construct a verbatim name.
1920 (wild_match): Reverse sense of return type. Use bool.
1921 (full_match): Reverse sense of return type. Inline bits of old
1922 match_name here.
1923 (ada_add_block_symbols): Adjust to use lookup_name_info.
1924 (symbol_completion_match): Delete, folded into...
1925 (ada_lookup_name_info::matches): ... .this new method.
1926 (symbol_completion_add): Delete.
1927 (ada_collect_symbol_completion_matches): Add name_match_type
1928 parameter. Adjust to use lookup_name_info and
1929 completion_list_add_name.
1930 (get_var_value, ada_add_global_exceptions): Adjust to use
1931 lookup_name_info.
1932 (ada_get_symbol_name_cmp): Delete.
1933 (do_wild_match, do_full_match): New functions.
1934 (ada_lookup_name_info::ada_lookup_name_info): New method.
1935 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1936 functions.
1937 (ada_language_defn): Install ada_get_symbol_name_matcher.
1938 * ada-lex.l (processId): If name starts with '<', copy it
1939 verbatim.
1940 * block.c (block_iter_match_step, block_iter_match_first)
1941 (block_iter_match_next, block_lookup_symbol)
1942 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1943 lookup_name_info.
1944 * block.h (block_iter_match_first, block_iter_match_next)
1945 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1946 * c-lang.c (c_language_defn, cplus_language_defn)
1947 (asm_language_defn, minimal_language_defn): Adjust comments to
1948 refer to la_get_symbol_name_matcher.
1949 * completer.c (complete_files_symbols)
1950 (collect_explicit_location_matches, symbol_completer): Pass a
1951 symbol_name_match_type down.
1952 * completer.h (class completion_match, completion_match_result):
1953 New classes.
1954 (completion_tracker::reset_completion_match_result): New method.
1955 (completion_tracker::m_completion_match_result): New field.
1956 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1957 lookup_name_info.
1958 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1959 functions.
1960 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1961 * d-lang.c: Adjust comments to refer to
1962 la_get_symbol_name_matcher.
1963 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1964 Adjust to use lookup_name_info.
1965 (dict_iter_match_first, dict_iter_match_next)
1966 (iter_match_first_hashed, iter_match_next_hashed)
1967 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1968 with a lookup_name_info.
1969 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1970 Likewise.
1971 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1972 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1973 (gdb_index_symbol_name_matcher): New class.
1974 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1975 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1976 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1977 with a symbol_name_match_type.
1978 (f_language_defn): Adjust comments to refer to
1979 la_get_symbol_name_matcher.
1980 * go-lang.c (go_language_defn): Adjust comments to refer to
1981 la_get_symbol_name_matcher.
1982 * language.c (default_symbol_name_matcher)
1983 (language_get_symbol_name_matcher): New functions.
1984 (unknown_language_defn, auto_language_defn): Adjust comments to
1985 refer to la_get_symbol_name_matcher.
1986 * language.h (symbol_name_cmp_ftype): Delete.
1987 (language_defn) <la_collect_symbol_completion_matches>: Add match
1988 type parameter.
1989 <la_get_symbol_name_cmp>: Delete field.
1990 <la_get_symbol_name_matcher>: New field.
1991 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1992 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1993 Declare.
1994 * linespec.c (iterate_over_all_matching_symtabs)
1995 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1996 (find_methods): Add language parameter, and use lookup_name_info
1997 and the language's symbol_name_matcher_ftype.
1998 (linespec_complete_function): Adjust.
1999 (lookup_prefix_sym): Use lookup_name_info.
2000 (add_all_symbol_names_from_pspace): Adjust.
2001 (find_superclass_methods): Add language parameter and pass it
2002 down.
2003 (find_method): Pass symbol language down.
2004 (find_linespec_symbols): Don't demangle or Ada encode here.
2005 (search_minsyms_for_name): Add lookup_name_info parameter.
2006 (add_matching_symbols_to_info): Add name_match_type parameter.
2007 Use lookup_name_info.
2008 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2009 la_get_symbol_name_matcher.
2010 * minsyms.c: Include <algorithm>.
2011 (add_minsym_to_demangled_hash_table): Remove table parameter and
2012 add objfile parameter. Use search_name_hash, and add language to
2013 demangled languages vector.
2014 (struct found_minimal_symbols): New struct.
2015 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2016 New functions.
2017 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2018 input names here. Use lookup_name_info instead. Lookup up
2019 demangled names once for each language in the demangled names
2020 vector.
2021 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2022 demangled names once for each language in the demangled names
2023 vector.
2024 (build_minimal_symbol_hash_tables): Adjust.
2025 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2026 lookup_name_info.
2027 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2028 la_get_symbol_name_matcher.
2029 * objfiles.h: Include <vector>.
2030 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2031 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2032 la_get_symbol_name_matcher.
2033 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2034 la_get_symbol_name_matcher.
2035 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2036 (match_partial_symbol): Use symbol_name_match_type,
2037 lookup_name_info and psymbol_name_matches.
2038 (lookup_partial_symbol): Use lookup_name_info.
2039 (map_block): Use symbol_name_match_type and lookup_name_info.
2040 (psym_map_matching_symbols): Use symbol_name_match_type.
2041 (psymbol_name_matches): New.
2042 (recursively_search_psymtabs): Use lookup_name_info and
2043 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2044 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2045 'kind' parameter to 'domain'.
2046 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2047 la_get_symbol_name_matcher.
2048 * symfile-debug.c (debug_qf_map_matching_symbols)
2049 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2050 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2051 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2052 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2053 Adjust to use symbol_name_match_type.
2054 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2055 (expand_symtabs_matching): Adjust to use lookup_name_info.
2056 * symmisc.c (maintenance_expand_symtabs): Use
2057 lookup_name_info::match_any ().
2058 * symtab.c (symbol_matches_search_name): New.
2059 (eq_symbol_entry): Adjust to use lookup_name_info and the
2060 language's matcher.
2061 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2062 (lookup_name_info::match_any): New.
2063 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2064 (compare_symbol_name): Add language, lookup_name_info and
2065 completion_match_result parameters, and use them.
2066 (completion_list_add_name): Make extern. Add language and
2067 lookup_name_info parameters. Use them.
2068 (completion_list_add_symbol, completion_list_add_msymbol)
2069 (completion_list_objc_symbol): Add lookup_name_info parameters and
2070 adjust. Pass down language.
2071 (completion_list_add_fields): Add lookup_name_info parameters and
2072 adjust. Pass down language.
2073 (add_symtab_completions): Add lookup_name_info parameters and
2074 adjust.
2075 (default_collect_symbol_completion_matches_break_on): Add
2076 name_match_type parameter, and use it. Use lookup_name_info.
2077 (default_collect_symbol_completion_matches)
2078 (collect_symbol_completion_matches): Add name_match_type
2079 parameter, and pass it down.
2080 (collect_symbol_completion_matches_type): Adjust.
2081 (collect_file_symbol_completion_matches): Add name_match_type
2082 parameter, and use lookup_name_info.
2083 * symtab.h: Include <string> and "common/gdb_optional.h".
2084 (enum class symbol_name_match_type): New.
2085 (class ada_lookup_name_info): New.
2086 (struct demangle_for_lookup_info): New.
2087 (class lookup_name_info): New.
2088 (symbol_name_matcher_ftype): New.
2089 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2090 (symbol_matches_search_name): Declare.
2091 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2092 (default_collect_symbol_completion_matches)
2093 (collect_symbol_completion_matches)
2094 (collect_file_symbol_completion_matches): Add name_match_type
2095 parameter.
2096 (iterate_over_symbols): Use lookup_name_info.
2097 (completion_list_add_name): Declare.
2098 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2099 (strncmp_iw_with_mode): Now extern.
2100 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2101 (strncmp_iw_with_mode): Declare.
2102
5ffa0793
PA
21032017-11-08 Keith Seitz <keiths@redhat.com>
2104 Pedro Alves <palves@redhat.com>
2105
2106 * ada-lang.c (ada_language_defn): Install
2107 default_search_name_hash.
2108 * buildsym.c (struct buildsym_compunit): <language>: New field.
2109 (finish_block_internal): Pass language when creating dictionaries.
2110 (start_buildsym_compunit, start_symtab): New language parameters.
2111 Use them.
2112 (restart_symtab): Pass down compilation unit's language.
2113 * buildsym.h (enum language): Forward declare.
2114 (start_symtab): New 'language' parameter.
2115 * c-lang.c (c_language_defn, cplus_language_defn)
2116 (asm_language_defn, minimal_language_defn): Install
2117 default_search_name_hash.
2118 * coffread.c (coff_start_symtab): Adjust.
2119 * d-lang.c (d_language_defn): Install default_search_name_hash.
2120 * dbxread.c (struct symloc): Add 'pst_language' field.
2121 (PST_LANGUAGE): Define.
2122 (start_psymtab, read_ofile_symtab): Use it.
2123 (process_one_symbol): New 'language' parameter. Pass it down.
2124 * dictionary.c (struct dictionary) <language>: New field.
2125 (DICT_LANGUAGE): Define.
2126 (dict_create_hashed, dict_create_hashed_expandable)
2127 (dict_create_linear, dict_create_linear_expandable): New parameter
2128 'language'. Set the dictionary's language.
2129 (iter_match_first_hashed): Adjust to rename.
2130 (insert_symbol_hashed): Assert we don't see mismatching
2131 languages. Adjust to rename.
2132 (dict_hash): Rename to ...
2133 (default_search_name_hash): ... this and make extern.
2134 * dictionary.h (struct language_defn): Forward declare.
2135 (dict_create_hashed): New parameter 'language'.
2136 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2137 * f-lang.c (f_language_defn): Install default_search_name_hash.
2138 * go-lang.c (go_language_defn): Install default_search_name_hash.
2139 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2140 creation.
2141 * language.c (unknown_language_defn, auto_language_defn):
2142 * language.h (language_defn::la_search_name_hash): New field.
2143 (default_search_name_hash): Declare.
2144 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2145 * mdebugread.c (new_block): New parameter 'language'.
2146 * mdebugread.c (parse_symbol): Pass symbol language to block
2147 allocation.
2148 (psymtab_to_symtab_1): Pass down language.
2149 (new_symtab): Pass compunit's language to block allocation.
2150 * objc-lang.c (objc_language_defn): Install
2151 default_search_name_hash.
2152 * opencl-lang.c (opencl_language_defn):
2153 * p-lang.c (pascal_language_defn): Install
2154 default_search_name_hash.
2155 * rust-lang.c (rust_language_defn): Install
2156 default_search_name_hash.
2157 * stabsread.h (enum language): Forward declare.
2158 (process_one_symbol): Add 'language' parameter.
2159 * symtab.c (search_name_hash): New function.
2160 * symtab.h (search_name_hash): Declare.
2161 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2162
2a1dde5d
PA
21632017-11-08 Pedro Alves <palves@redhat.com>
2164
2165 * cp-name-parser.y (main): Don't initialize extra_chars.
2166
95a6b0a1
TT
21672017-11-07 Tom Tromey <tom@tromey.com>
2168
2169 * event-top.h (command_handler): Constify.
2170 * record-full.c (cmd_record_full_start): Update.
2171 * thread.c (thread_apply_all_command): Update.
2172 * printcmd.c (eval_command): Update.
2173 * mi/mi-main.c (mi_execute_cli_command): Update.
2174 (mi_execute_async_cli_command): Update.
2175 * tui/tui-stack.c (tui_update_command): Update.
2176 * cli/cli-interp.c (safe_execute_command): Constify.
2177 * record.c (record_start): Update.
2178 (record_start, record_stop, cmd_record_start): Update.
2179 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2180 (cmd_record_btrace_pt_start): Update.
2181 (cmd_record_btrace_start): Update.
2182 (cmd_record_btrace_start): Update.
2183 * reverse.c (exec_reverse_once): Update.
2184 * python/python.c (execute_gdb_command): Don't copy the command.
2185 * event-top.c (command_line_handler): Update.
2186 (command_handler): Constify.
2187 * defs.h (deprecated_call_command_hook): Constify.
2188 * cli/cli-script.h (execute_user_command): Constify.
2189 * cli/cli-script.c (execute_user_command): Constify.
2190 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2191 (enum command_control_type): Update.
2192 * main.c (catch_command_errors): Remove non-const overload.
2193 (catch_command_errors_ftype): Remove.
2194 * python/py-cmd.c (cmdpy_function): Constify.
2195 * guile/scm-cmd.c (cmdscm_function): Constify.
2196 * cli/cli-dump.c (call_dump_func): Constify.
2197 * cli/cli-decode.c (do_const_cfunc): Constify.
2198 (do_sfunc): Constify.
2199 (cmd_func): Constify.
2200 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2201 * top.h (execute_command): Constify.
2202 * top.c (execute_command): Constify.
2203 (execute_command_to_string): Constify.
2204 (deprecated_call_command_hook): Constify.
2205 * command.h (cmd_func): Constify.
2206 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2207
eb4c3f4a
TT
22082017-11-07 Tom Tromey <tom@tromey.com>
2209
2210 * ada-lang.c (catch_ada_exception_command): Constify.
2211 (catch_assert_command): Constify.
2212 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2213 (catch_rethrow_command): Constify.
2214 (catch_exception_command_1): Constify.
2215 * breakpoint.h (add_catch_command): Constify.
2216 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2217 (catch_syscall_split_args): Constify.
2218 * break-catch-sig.c (catch_signal_command): Constify.
2219 (catch_signal_split_args): Constify.
2220 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2221 cmd_const_sfunc_ftype.
2222 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2223 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2224 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2225 (add_setshow_string_cmd, struct cmd_list_element)
2226 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2227 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2228 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2229 Constify.
2230 (set_cmd_sfunc): Constify.
2231 (empty_sfunc): Constify.
2232 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2233 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2234 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2235 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2236 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2237 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2238 Constify.
2239 (set_cmd_sfunc): Constify.
2240 (cmd_sfunc_ftype): Remove.
2241 * compile/compile.c (set_compile_args): Constify.
2242 * infrun.c (set_disable_randomization): Constify.
2243 * infcmd.c (set_args_command, set_cwd_command): Constify.
2244 * breakpoint.c (set_condition_evaluation_mode): Constify.
2245 (add_catch_command): Constify.
2246 (catch_fork_command_1, catch_exec_command_1)
2247 (catch_load_command_1, catch_unload_command_1): Constify.
2248 (catch_load_or_unload): Constify.
2249 * guile/scm-param.c (pascm_set_func): Constify.
2250 (add_setshow_generic): Constify.
2251 * python/py-param.c (get_set_value): Constify.
2252 * top.h (set_verbose): Constify.
2253 * tui/tui-win.c (tui_set_var_cmd): Constify.
2254 * mi/mi-main.c (set_mi_async_command): Constify.
2255 * cli/cli-logging.c (set_logging_overwrite)
2256 (set_logging_redirect): Constify.
2257 * value.c (set_max_value_size): Constify.
2258 * valprint.c (set_input_radix, set_output_radix): Constify.
2259 * utils.c (set_width_command, set_height_command): Constify.
2260 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2261 * tracepoint.c (set_disconnected_tracing)
2262 (set_circular_trace_buffer, set_trace_buffer_size)
2263 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2264 * top.c (set_history_size_command, set_verbose, set_editing)
2265 (set_gdb_datadir, set_history_filename): Constify.
2266 * target.c (set_targetdebug, maint_set_target_async_command)
2267 (maint_set_target_non_stop_command, set_target_permissions)
2268 (set_write_memory_permission): Constify.
2269 (open_target): Constify.
2270 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2271 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2272 * symtab.c (set_symbol_cache_size_handler): Constify.
2273 * symfile.c (set_ext_lang_command): Constify.
2274 * symfile-debug.c (set_debug_symfile): Constify.
2275 * source.c (set_directories_command): Constify.
2276 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2277 * serial.c (set_parity): Constify.
2278 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2279 * remote.c (set_remote_exec_file, set_remotebreak)
2280 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2281 * record.c (set_record_insn_history_size)
2282 (set_record_call_history_size): Constify.
2283 * record-full.c (set_record_full_insn_max_num): Constify.
2284 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2285 * osabi.c (set_osabi): Constify.
2286 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2287 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2288 * maint.c (maintenance_set_profile_cmd): Constify.
2289 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2290 * language.c (set_language_command, set_range_command)
2291 (set_case_command): Constify.
2292 * infrun.c (set_non_stop, set_observer_mode)
2293 (set_stop_on_solib_events, set_schedlock_func)
2294 (set_exec_direction_func): Constify.
2295 * infcmd.c (set_inferior_tty_command): Constify.
2296 * disasm.c (set_disassembler_options_sfunc): Constify.
2297 * demangle.c (set_demangling_command): Constify.
2298 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2299 * cris-tdep.c (set_cris_version, set_cris_mode)
2300 (set_cris_dwarf2_cfi): Constify.
2301 * corefile.c (set_gnutarget_command): Constify.
2302 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2303 (set_target_wide_charset_sfunc): Constify.
2304 * breakpoint.c (update_dprintf_commands): Constify.
2305 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2306 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2307 (set_disassembly_style_sfunc): Constify.
2308 * arch-utils.c (set_endian, set_architecture): Constify.
2309 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2310 * agent.c (set_can_use_agent): Constify.
2311
5fed81ff
TT
23122017-11-07 Tom Tromey <tom@tromey.com>
2313
2314 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2315 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2316 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2317 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2318 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2319 (parse_int_arg, show_thread_default_detach_sc_cmd)
2320 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2321 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2322 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2323 (show_task_pause_cmd, set_task_detach_sc_cmd)
2324 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2325 (set_noninvasive_cmd, set_thread_pause_cmd)
2326 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2327 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2328 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2329 * windows-nat.c (display_selectors): Constify.
2330 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2331 non-const "cfunc".
2332 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2333 (cmd_cfunc_eq): Likewise.
2334 (struct cmd_list_element): Likewise.
2335 (do_cfunc): Remove.
2336 (cli_user_command_p): Update.
2337 * command.h (add_cmd): Remove non-const overload.
2338 (cmd_cfunc_ftype): Remove typedef.
2339 (cmd_cfunc_eq): Remove non-const overload.
2340 * value.c (show_values): Constify.
2341 * thread.c (thread_apply_all_command): Constify.
2342 * symfile.c (load_command): Constify.
2343 * source.c (directory_command): Constify.
2344 * maint.c (maintenance_internal_error)
2345 (maintenance_demangler_warning, maintenance_space_display)
2346 (maintenance_print_architecture, maintenance_translate_address)
2347 (maintenance_info_selftests, maintenance_internal_warning):
2348 Constify.
2349 * breakpoint.c (disable_trace_command, enable_trace_command):
2350 Constify.
2351 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2352 Constify.
2353 (add_auto_load_safe_path): Constify.
2354 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2355 * top.h (show_commands): Constify.
2356 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2357 * sparc64-tdep.c (adi_examine_command): Constify.
2358 (adi_assign_command): Constify.
2359
1d12d88f
TT
23602017-11-07 Tom Tromey <tom@tromey.com>
2361
2362 * frame.h (info_locals_command, info_args_command): Constify.
2363 * auto-load.h (auto_load_info_scripts): Constify.
2364 * inferior.h (registers_info): Constify.
2365 * copying.c: Rebuild.
2366 * copying.awk: Constify generated commands.
2367 * auto-load.c (auto_load_info_scripts)
2368 (info_auto_load_gdb_scripts): Constify.
2369 * cli/cli-decode.c (struct cmd_list_element): Take a
2370 cmd_const_cfunc_ftype.
2371 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2372 * tui/tui-win.c (tui_all_windows_info): Constify.
2373 * python/py-auto-load.c (info_auto_load_python_scripts):
2374 Constify.
2375 * cli/cli-cmds.c (show_command): Remove non-const overload.
2376 * tracepoint.c (info_tvariables_command, info_scope_command):
2377 Constify.
2378 (info_static_tracepoint_markers_command): Constify.
2379 * thread.c (info_threads_command): Constify.
2380 (print_thread_info_1): Constify.
2381 * target.c (info_target_command): Constify.
2382 * symtab.c (info_sources_command, info_functions_command)
2383 (info_types_command): Constify.
2384 (info_variables_command): Remove non-const overload.
2385 * symfile.c (info_ext_lang_command): Constify.
2386 * stack.c (info_frame_command, info_locals_command)
2387 (info_args_command): Constify.
2388 (backtrace_command): Remove non-const overload.
2389 * source.c (info_source_command, info_line_command): Constify.
2390 * solib.c (info_sharedlibrary_command): Constify.
2391 * skip.c (info_skip_command): Constify.
2392 * ser-go32.c (info_serial_command): Constify.
2393 * reverse.c (info_bookmarks_command): Constify.
2394 * printcmd.c (info_symbol_command, info_address_command)
2395 (info_display_command): Constify.
2396 * osdata.c (info_osdata_command): Constify.
2397 * objc-lang.c (info_selectors_command, info_classes_command):
2398 Constify.
2399 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2400 * memattr.c (info_mem_command): Constify.
2401 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2402 * linux-fork.c (info_checkpoints_command): Constify.
2403 * infrun.c (info_signals_command): Constify.
2404 * inflow.c (info_terminal_command): Constify.
2405 * inferior.c (info_inferiors_command): Constify.
2406 (print_inferior): Constify.
2407 * infcmd.c (info_program_command, info_all_registers_command)
2408 (info_registers_command, info_vector_command)
2409 (info_float_command): Constify.
2410 (registers_info): Constify.
2411 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2412 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2413 Constify.
2414 * f-valprint.c (info_common_command): Constify.
2415 * dcache.c (info_dcache_command): Constify.
2416 (dcache_info_1): Constify.
2417 * darwin-nat-info.c (info_mach_tasks_command)
2418 (info_mach_task_command, info_mach_ports_command)
2419 (info_mach_port_command, info_mach_threads_command)
2420 (info_mach_thread_command, info_mach_regions_command)
2421 (info_mach_regions_recurse_command, info_mach_region_command)
2422 (info_mach_exceptions_command): Constify.
2423 (get_task_from_args): Constify.
2424 * cp-support.c (info_vtbl_command): Constify.
2425 * breakpoint.c (info_watchpoints_command)
2426 (info_tracepoints_command): Constify.
2427 (info_breakpoints_command): Remove non-const overload.
2428 * avr-tdep.c (avr_io_reg_read_command): Constify.
2429 * auxv.c (info_auxv_command): Constify.
2430 * ada-tasks.c (info_tasks_command): Constify.
2431 (info_task): Constify.
2432 * ada-lang.c (info_exceptions_command): Constify.
2433
0b39b52e
TT
24342017-11-07 Tom Tromey <tom@tromey.com>
2435
2436 * solib.h (no_shared_libraries): Constify.
2437 * frame.h (return_command): Constify.
2438 * cli/cli-cmds.h (quit_command): Constify.
2439 * top.h (quit_command, execute_command): Constify.
2440 * target.h (flash_erase_command): Constify.
2441 * inferior.h (set_inferior_args, attach_command): Constify.
2442 * tracepoint.h (start_tracing, stop_tracing): Constify.
2443 * breakpoint.h (break_command, tbreak_command)
2444 (hbreak_command_wrapper, thbreak_command_wrapper)
2445 (rbreak_command_wrapper, watch_command_wrapper)
2446 (awatch_command_wrapper, rwatch_command_wrapper)
2447 (get_tracepoint_by_number): Constify.
2448 * symtab.c (info_variables_command, rbreak_command)
2449 (symtab_symbol_info): Constify.
2450 (info_variables_command): Add non-const overload.
2451 * top.c (dont_repeat_command): Constify.
2452 * breakpoint.c (ignore_command, commands_command)
2453 (condition_command, tbreak_command, hbreak_command)
2454 (thbreak_command, clear_command, break_command)
2455 (info_breakpoints_command, watch_command, rwatch_command)
2456 (awatch_command, trace_command, ftrace_command, strace_command)
2457 (trace_pass_command, break_range_command, dprintf_command)
2458 (agent_printf_command, get_tracepoint_by_number)
2459 (watch_maybe_just_location, trace_pass_command): Constify.
2460 (info_breakpoints_command): Add non-const overload.
2461 * tracefile.c (tsave_command): Constify.
2462 * infcmd.c (attach_command, disconnect_command, signal_command)
2463 (queue_signal_command, stepi_command, nexti_command)
2464 (finish_command, next_command, step_command, until_command)
2465 (advance_command, jump_command, continue_command, run_command)
2466 (start_command, starti_command, interrupt_command)
2467 (run_command_1, set_inferior_args, step_1): Constify.
2468 * inferior.c (add_inferior_command, remove_inferior_command)
2469 (clone_inferior_command): Constify.
2470 * linux-fork.c (checkpoint_command, restart_command): Constify.
2471 * windows-nat.c (signal_event_command): Constify.
2472 * guile/guile.c (guile_repl_command, guile_command): Constify.
2473 * printcmd.c (x_command, display_command, printf_command)
2474 (output_command, set_command, call_command, print_command)
2475 (eval_command): Constify.
2476 (non_const_set_command): Remove.
2477 (_initialize_printcmd): Update.
2478 * source.c (forward_search_command, reverse_search_command):
2479 Constify.
2480 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2481 Constify.
2482 * infrun.c (handle_command): Constify.
2483 * memattr.c (mem_command): Constify.
2484 * stack.c (return_command, up_command, up_silently_command)
2485 (down_command, down_silently_command, frame_command)
2486 (backtrace_command, func_command, backtrace_command_1): Constify.
2487 (backtrace_command): Add non-const overload.
2488 * remote-sim.c (simulator_command): Constify.
2489 * exec.c (set_section_command): Constify.
2490 * tracepoint.c (tdump_command, trace_variable_command)
2491 (tstatus_command, tstop_command, tstart_command)
2492 (end_actions_pseudocommand, while_stepping_pseudocommand)
2493 (collect_pseudocommand, teval_pseudocommand, actions_command)
2494 (start_tracing, stop_tracing): Constify.
2495 * value.c (init_if_undefined_command): Constify.
2496 * tui/tui-stack.c (tui_update_command): Constify.
2497 * tui/tui-win.c (tui_refresh_all_command)
2498 (tui_set_tab_width_command, tui_set_win_height_command)
2499 (tui_set_focus_command, tui_scroll_forward_command)
2500 (tui_scroll_backward_command, tui_scroll_left_command)
2501 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2502 (tui_set_win_height): Constify.
2503 * tui/tui-layout.c (tui_layout_command): Constify.
2504 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2505 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2506 (proc_untrace_sysexit_cmd): Constify.
2507 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2508 (threadset_test_cmd, threadlist_update_test_cmd)
2509 (threadalive_test): Constify.
2510 * objc-lang.c (print_object_command): Constify.
2511 * command.h (add_com): Constify.
2512 * cli/cli-dump.c (restore_command): Constify.
2513 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2514 (help_command, complete_command, shell_command, edit_command)
2515 (list_command, disassemble_command, make_command)
2516 (apropos_command, alias_command): Constify.
2517 * cli/cli-script.c (document_command, define_command)
2518 (while_command, if_command, validate_comname): Constify.
2519 * cli/cli-decode.c (struct cmd_list_element): Change type of
2520 "fun".
2521 * target.c (do_monitor_command, flash_erase_command): Constify.
2522 * regcache.c (reg_flush_command): Constify.
2523 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2524 (reverse_nexti, reverse_continue, reverse_finish)
2525 (save_bookmark_command, goto_bookmark_command)
2526 (exec_reverse_once): Constify.
2527 * python/python.c (python_interactive_command, python_command):
2528 Constify.
2529 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2530 Constify.
2531 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2532 * gcore.c (gcore_command): Constify.
2533
85c4be7c
TT
25342017-11-07 Tom Tromey <tom@tromey.com>
2535
2536 * printcmd.c (x_command): Call set_repeat_arguments.
2537 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2538 * top.c (repeat_arguments): New global.
2539 (set_repeat_arguments): New function.
2540 (execute_command): Handle repeat_arguments.
2541 (show_commands): Calls set_repeat_arguments.
2542 * command.h (set_repeat_arguments): Declare.
2543
022643b4
TT
25442017-11-07 Tom Tromey <tom@tromey.com>
2545
2546 * stack.c (backtrace_command): Use std::string.
2547 (backtrace_command_1): Make "count_exp" const.
2548
5614fb77
TT
25492017-11-07 Tom Tromey <tom@tromey.com>
2550
2551 * source.c (directory_switch, mod_path, add_path): Constify.
2552 * defs.h (add_path, mod_path, directory_switch): Constify.
2553 * mi/mi-cmd-env.c (env_mod_path): Constify.
2554
6be9a197
TT
25552017-11-07 Tom Tromey <tom@tromey.com>
2556
2557 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2558 (run_command_1, continue_command, step_1, jump_command)
2559 (signal_command, until_command, advance_command, finish_command)
2560 (attach_command): Update.
2561
c2252c0d
TT
25622017-11-07 Tom Tromey <tom@tromey.com>
2563
2564 * command.h (set_cmd_cfunc): Don't declare.
2565 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2566
1ee870c5
TT
25672017-11-07 Tom Tromey <tom@tromey.com>
2568
2569 * stack.c (select_frame_command): Constify.
2570 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2571 * command.h (add_com_suppress_notification): Constify.
2572
ee7ddd71
TT
25732017-11-07 Tom Tromey <tom@tromey.com>
2574
2575 * breakpoint.c (stop_command): Constify.
2576 * cli/cli-decode.c (struct cmd_list_element): Constify.
2577 * command.h (add_abbrev_prefix_cmd): Constify.
2578
95e95a6d
PA
25792017-11-07 Pedro Alves <palves@redhat.com>
2580
2581 * breakpoint.c (extract_bp_kind): New enum.
2582 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2583 factored out from ...
2584 (extract_bp_number_and_location): ... here.
2585 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2586
cc638e86
PA
25872017-11-07 Pedro Alves <palves@redhat.com>
2588
2589 * breakpoint.c (extract_bp_number_and_location): Change return
2590 type to void. Throw error instead of warning.
2591 (enable_disable_command): Adjust.
2592
d0fe4701
XR
25932017-11-07 Xavier Roirand <roirand@adacore.com>
2594 Pedro Alves <palves@redhat.com>
2595
2596 * breakpoint.c (map_breakpoint_number_range): New, factored out
2597 from ...
2598 (map_breakpoint_numbers): ... here.
2599 (find_location_by_number): Change parameters from string to
2600 breakpoint number and location.
2601 (extract_bp_number_and_location): New function.
2602 (enable_disable_bp_num_loc)
2603 (enable_disable_breakpoint_location_range)
2604 (enable_disable_command): New functions, factored out ...
2605 (enable_command, disable_command): ... these functions, and
2606 adjusted to support ranges.
2607 * NEWS: Document enable/disable breakpoint location range feature.
2608
635dc5b2
LM
26092017-11-06 Luis Machado <luis.machado@linaro.org>
2610
2611 * MAINTAINERS (Write After Approval): Update my e-mail address.
2612
556e5da5
PA
26132017-11-06 Pedro Alves <palves@redhat.com>
2614
2615 * gnu-nat.c (gnu_terminal_init): Delete.
2616 (gnu_target): Don't install gnu_terminal_init.
2617 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2618 (child_terminal_init): ... this function.
2619
d1928160
PA
26202017-11-06 Pedro Alves <palves@redhat.com>
2621
2622 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2623 sgtty.h.
2624 * config.in, configure: Regenerate.
2625
6aa899ce
PA
26262017-11-06 Pedro Alves <palves@redhat.com>
2627
2628 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2629 (async_init_signals): Adjust.
2630 (handle_stop_sig): Rename to ...
2631 (handle_sigtstp): ... this.
2632 (async_stop_sig): Rename to ...
2633 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2634 SIGTSTP path.
2635 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2636 instead of STOP_SIGNAL thoughout.
2637 (handle_stop_sig): Rename to ...
2638 (handle_sigtstp): ... this.
2639 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2640
a94799ac
PA
26412017-11-06 Pedro Alves <palves@redhat.com>
2642
2643 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2644 longer set flags twice in row.
2645
726e1356
PA
26462017-11-06 Pedro Alves <palves@redhat.com>
2647
2648 * Makefile.in (SER_HARDWIRE): Update comment.
2649 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2650 * common/gdb_termios.h: Delete file.
2651 * common/job-control.c: Include termios.h and unistd.h instead of
2652 gdb_termios.h.
2653 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2654 check.
2655 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2656 Remove sgtty code.
2657 * configure.ac: No longer check for termio.h and sgtty.h.
2658 * configure: Regenerate.
2659 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2660 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2661 Replace PROCESS_GROUP_TYPE references with pid_t references
2662 throughout.
2663 (gdb_getpgrp): Delete.
2664 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2665 (child_terminal_inferior): Remove comment. Remove sgtty code.
2666 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2667 gdb_getpgrp. Use serial_set_tty_state instead aof
2668 serial_noflush_set_tty_state. Remove sgtty code.
2669 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2670 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2671 (inferior_process_group): Now returns pid_t.
2672 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2673 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2674 * ser-event.c (serial_event_ops): Update.
2675 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2676 (dos_ops): Update.
2677 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2678 * ser-pipe.c (pipe_ops): Update.
2679 * ser-tcp.c (tcp_ops): Update.
2680 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2681 HAVE_TERMIOS checks.
2682 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2683 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2684 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2685 assume termios.
2686 (hardwire_noflush_set_tty_state): Delete.
2687 (hardwire_print_tty_state, hardwire_drain_output)
2688 (hardwire_flush_output, hardwire_flush_input)
2689 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2690 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2691 code, and assume termios.
2692 (hardwire_ops): Update.
2693 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2694 * serial.c (serial_noflush_set_tty_state): Delete.
2695 * serial.h (serial_noflush_set_tty_state): Delete.
2696 (serial_ops::noflush_set_tty_state): Delete.
2697
1cfb73db
UW
26982017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2699
2700 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2701 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2702 (COMMON_OBS): Remove doublest.o and dfp.o.
2703 Do not build target-float.c (instead of doublest.c)
2704 with -Wformat-nonliteral.
2705
2706 * doublest.c: Remove file.
2707 * doublest.h: Remove file.
2708 * dfp.c: Remove file.
2709 * dfp.h: Remove file.
2710
2711 * target-float.c: Do not include "doublest.h" and "dfp.h".
2712 (DOUBLEST): Move here from doublest.h.
2713 (enum float_kind): Likewise.
2714 (FLOATFORMAT_CHAR_BIT): Likewise.
2715 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2716 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2717 (floatformat_precision): Likewise.
2718 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2719 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2720 Likewise.
2721 (host_float_format, host_double_format, host_long_double_format):
2722 Likewise.
2723 (floatformat_to_string, floatformat_from_string): Likewise.
2724 (floatformat_to_doublest): Likewise. Also, inline the original
2725 convert_floatformat_to_doublest.
2726 (floatformat_from_doublest): Likewise. Also, inline the original
2727 convert_floatformat_from_doublest.
2728
2729 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2730 (MAX_DECIMAL_STRING): Move here from dfp.c.
2731 (match_endianness): Likewise.
2732 (set_decnumber_context, decimal_check_errors): Likewise.
2733 (decimal_from_number, decimal_to_number): Likewise.
2734 (decimal_to_string, decimal_from_string): Likewise. Make static.
2735 (decimal_from_longest, decimal_from_ulongest): Likewise.
2736 (decimal_to_longest): Likewise.
2737 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2738 (decimal_convert): Likewise.
2739
b07e9c46
UW
27402017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2741
2742 * doublest.c: Do not include "gdbtypes.h".
2743 (extract_typed_floating): Remove.
2744 (store_typed_floating): Remove.
2745 (convert_typed_floating): Remove.
2746 * doublest.h (struct type): Remove.
2747 (DOUBLEST_PRINT_FORMAT): Remove.
2748 (DOUBLEST_SCAN_FORMAT): Remove.
2749 (extract_typed_floating): Remove.
2750 (store_typed_floating): Remove.
2751 (convert_typed_floating): Remove.
2752
2753 * dfp.c (decimal_from_doublest): Remove.
2754 (decimal_to_doublest): Remove.
2755 * dfp.h: Do not include "doublest.h".
2756 (decimal_from_doublest): Remove.
2757 (decimal_to_doublest): Remove.
2758
2759 * value.c: Do not include "doublest.h" and "dfp.h".
2760 (value_as_double): Remove.
2761 (unpack_double): Remove.
2762 (value_from_double): Remove.
2763 (value_from_decfloat): Remove.
2764 * value.h: Do not include "doublest.h".
2765 (value_as_double): Remove.
2766 (unpack_double): Remove.
2767 (value_from_double): Remove.
2768 (value_from_decfloat): Remove.
2769
3b2ca824
UW
27702017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2771
2772 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2773 (i386_extract_return_value): Use target_float_convert.
2774 (i386_store_return_value): Likewise.
2775 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2776 (i387_value_to_register): Likewise.
2777 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2778 (ia64_register_to_value): Use target_float_convert.
2779 (ia64_value_to_register): Likewise.
2780 (ia64_extract_return_value): Likewise.
2781 (ia64_store_return_value): Likewise.
2782 (ia64_push_dummy_call): Likewise.
2783 * m68k-tdep.c: Include "target-float.h".
2784 (m68k_register_to_value): Use target_float_convert.
2785 (m68k_value_to_register): Likewise.
2786 (m68k_svr4_extract_return_value): Likewise.
2787 (m68k_svr4_store_return_value): Likewise.
2788 * ppc-sysv-tdep.c: Include "target-float.h".
2789 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2790 (do_ppc_sysv_return_value): Likewise.
2791 (ppc64_sysv_abi_push_freg): Likewise.
2792 (ppc64_sysv_abi_return_value_base): Likewise.
2793 * rs6000-aix-tdep.c: Include "target-float.h".
2794 (rs6000_push_dummy_call): Use target_float_convert.
2795 (rs6000_return_value): Likewise.
2796 * rs6000-lynx178-tdep.c: Include "target-float.h".
2797 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2798 (rs6000_lynx178_return_value): Likewise.
2799 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2800 (rs6000_register_to_value): Use target_float_convert.
2801 (rs6000_value_to_register): Likewise.
2802 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2803 (arm_extract_return_value): Use target_float_convert.
2804 (arm_store_return_value): Likewise.
2805 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2806 (sh_register_convert_to_virtual): Use target_float_convert.
2807 (sh_register_convert_to_raw): Likewise.
2808 * sh64-tdep.c: Include "target-float.h".
2809 (sh64_extract_return_value): Use target_float_convert.
2810 (sh64_register_convert_to_virtual): Likewise.
2811 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2812
14ad9311
UW
28132017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2814
2815 * target-float.c (floatformat_to_host_double): New function.
2816 (floatformat_from_host_double): Likewise.
2817 (target_float_to_host_double): Likewise.
2818 (target_float_from_host_double): Likewise.
2819 * target-float.h (target_float_to_host_double): Add prototype.
2820 (target_float_from_host_double): Likewise.
2821
2822 * guile/scm-value.c: Include "target-float.h".
2823 (gdbscm_value_to_real): Use target_float_to_host_double.
2824 Handle integer source values via value_as_long.
2825 * guile/scm-math.c: Include "target-float.h". Do not include
2826 "doublest.h", "dfp.h", and "expression.h".
2827 (vlscm_convert_typed_number): Use target_float_from_host_double.
2828 (vlscm_convert_number): Likewise.
2829
2830 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2831 (convert_value_from_python): Use target_float_from_host_double.
2832
50eff16b
UW
28332017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2834
2835 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2836 (cast_from_fixed): Likewise.
2837 (ada_scaling_type): New function.
2838 (ada_delta): Return value instead of DOUBLEST. Perform target
2839 arithmetic instead of host arithmetic.
2840 (scaling_factor): Rename to ...
2841 (ada_scaling_factor) ... this. Make non-static. Return value instead
2842 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2843 (ada_fixed_to_float): Remove.
2844 (ada_float_to_fixed): Remove.
2845 * ada-lang.h (ada_fixed_to_float): Remove.
2846 (ada_float_to_fixed): Remove.
2847 (ada_delta): Return value instead of DOUBLEST.
2848 (ada_scaling_factor): Add prototype.
2849
2850 * ada-typeprint.c: Include "target-float.h".
2851 (print_fixed_point_type): Perform target arithmetic instead of
2852 host arithmetic.
2853 * ada-valprint.c: Include "target-float.h".
2854 (ada_val_print_num): Perform target arithmetic instead of
2855 host arithmetic for fixed-point types.
2856
66c02b9e
UW
28572017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2858
2859 * target-float.c: Include <math.h>.
2860 (floatformat_binop): New function.
2861 (floatformat_compare): Likewise.
2862 (target_float_binop): Likewise.
2863 (target_float_compare): Likewise.
2864 * target-float.h: Include "expression.h".
2865 (target_float_binop): Add prototype.
2866 (target_float_compare): Likewise.
2867
2868 * valarith.c: Do not include "doublest.h" and "dfp.h".
2869 Include "common/byte-vector.h".
2870 (value_args_as_decimal): Remove, replace by ...
2871 (value_args_as_target_float): ... this function. Handle both
2872 binary and decimal target floating-point formats.
2873 (scalar_binop): Handle both binary and decimal FP using
2874 value_args_as_target_float and target_float_binop.
2875 (value_equal): Handle both binary and decimal FP using
2876 value_args_as_target_float and target_float_compare.
2877 (value_less): Likewise.
2878 (value_pos): Handle all scalar types as simple copy.
2879 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2880 * dfp.c (decimal_binop): Throw error instead of internal_error
2881 when called with an unsupported operation code.
2882
f69fdf9b
UW
28832017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2884
2885 * target-float.c (target_float_to_string): New function.
2886 (target_float_from_string): New function.
2887 * target-float.h (target_float_to_string): Add prototype.
2888 (target_float_from_string): Add prototype.
2889
2890 * valprint.c: Include "target-float.h". Do not include
2891 "doublest.h" and "dfp.h".
2892 (print_floating): Use target_float_to_string.
2893 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2894 (printf_floating): Use target_float_to_string.
2895 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2896 (print_i387_value): Use target_float_to_string.
2897 * mips-tdep.c: Include "target-float.h".
2898 (mips_print_fp_register): Use target_float_to_string.
2899 * sh64-tdep.c: Include "target-float.h".
2900 (sh64_do_fp_register): Use target_float_to_string.
2901
2902 * parse.c: Include "target-float.h". Do not include
2903 "doublest.h" and "dfp.h".
2904 (parse_float): Use target_float_from_string.
2905 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2906 (define_symbol): Use target_float_from_string.
2907 * gdbarch-selftests.c: Include "target-float.h".
2908 (register_to_value_test): Use target_float_from_string.
2909
70100014
UW
29102017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2911
2912 * Makefile.c (SFILES): Add target-float.c.
2913 (HFILES_NO_SRCDIR): Add target-float.h.
2914 (COMMON_OBS): Add target-float.o.
2915 * target-float.h: New file.
2916 * target-float.c: New file.
2917
2918 * doublest.c (floatformat_classify): Fix detection of float_zero.
2919
2920 * gdbtypes.c (is_floating_type): New function.
2921 * gdbtypes.h (is_floating_type): Add prototype.
2922
2923 * value.c: Do not include "floatformat.h".
2924 (unpack_double): Use target_float_is_valid.
2925 (is_floating_value): New function.
2926 * value.h (is_floating_value): Add prototype-
2927
2928 * valarith.c: Include "target-float.h".
2929 (value_logical_not): Use target_float_is_zero.
2930
2931 * python/py-value.c: Include "target-float.h".
2932 (valpy_nonzero): Use target_float_is_zero.
2933
ab4b1c46
TT
29342017-11-04 Tom Tromey <tom@tromey.com>
2935
2936 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2937
454dafbd
TT
29382017-11-04 Tom Tromey <tom@tromey.com>
2939
2940 * breakpoint.c (set_momentary_breakpoint): Return
2941 breakpoint_up.
2942 (until_break_command): Update.
2943 (new_until_break_fsm): Change argument types to
2944 breakpoint_up.
2945 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2946 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2947 Remove.
2948 * infcmd.c (finish_forward): Update.
2949 * breakpoint.h (set_momentary_breakpoint)
2950 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2951 (make_cleanup_delete_breakpoint): Remove.
2952 (struct breakpoint_deleter): New.
2953 (breakpoint_up): New typedef.
2954 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2955 (insert_exception_resume_breakpoint): Update.
2956 (insert_exception_resume_from_probe): Update.
2957 (insert_longjmp_resume_breakpoint): Update.
2958 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2959 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2960 * infcall.c (call_function_by_hand_dummy): Update
2961
331b71e5
TT
29622017-11-04 Tom Tromey <tom@tromey.com>
2963
2964 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2965
9f584b37
TT
29662017-11-04 Tom Tromey <tom@tromey.com>
2967
2968 * linux-tdep.c (linux_core_info_proc_mappings): Use
2969 gdb::def_vector.
2970 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2971 "size" argument.
2972 (linux_corefile_thread): Update.
2973 (linux_make_corefile_notes): Remove unused variable.
2974
779bc38e
TT
29752017-11-04 Tom Tromey <tom@tromey.com>
2976
2977 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2978 gdb::byte_vector.
2979
ed2b3126
TT
29802017-11-04 Tom Tromey <tom@tromey.com>
2981
2982 * objfiles.c (do_free_objfile_cleanup): Remove.
2983 * compile/compile-object-load.c (compile_object_load): Update.
2984 * objfiles.h (make_cleanup_free_objfile): Remove.
2985
7f6743fd
TT
29862017-11-04 Tom Tromey <tom@tromey.com>
2987
2988 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2989 (adi_read_versions): Change "tags" to "gdb_byte *".
2990 (adi_print_versions): Likewise.
2991
c80049d3
TT
29922017-11-04 Tom Tromey <tom@tromey.com>
2993
2994 * breakpoint.c
2995 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2996 from start_rbreak_breakpoints.
2997 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2998 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2999 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3000 * symtab.c (do_end_rbreak_breakpoints): Remove.
3001 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3002
167b0be1
TT
30032017-11-04 Tom Tromey <tom@tromey.com>
3004
3005 * cp-namespace.c (reset_directive_searched): Remove.
3006 (cp_lookup_symbol_via_imports): Use scoped_restore.
3007 * cp-support.c (reset_directive_searched): Remove.
3008 (make_symbol_overload_list_using): Use scoped_restore.
3009 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3010 (reset_directive_searched): Remove.
3011
5eae7aea
TT
30122017-11-04 Tom Tromey <tom@tromey.com>
3013
3014 * symfile.c (find_separate_debug_file_by_debuglink): Use
3015 unique_xmalloc_ptr.
3016
c6bcad5f
TT
30172017-11-04 Tom Tromey <tom@tromey.com>
3018
3019 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3020 type of "info".
3021 (compute_stack_depth): Likewise.
3022 (do_compile_dwarf_expr_to_c): Use std::vector.
3023
20dcd8ca
TT
30242017-11-04 Tom Tromey <tom@tromey.com>
3025
3026 * compile/compile-object-load.c (link_callbacks_einfo): Use
3027 std::string.
3028
33c7c59d
TT
30292017-11-04 Tom Tromey <tom@tromey.com>
3030
3031 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3032 Use scoped_free_pendings.
3033 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3034 scoped_free_pendings.
3035 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3036 (xcoff_initial_scan): Likewise.
3037 * buildsym.c (reset_symtab_globals): Update comment.
3038 (scoped_free_pendings): Rename from really_free_pendings.
3039 (prepare_for_building): Update comment.
3040 (buildsym_init): Likewise.
3041 * buildsym.h (class scoped_free_pendings): New class.
3042 (really_free_pendings): Don't declare.
3043
67fa57cf
UW
30442017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3045
3046 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3047 output when converting a zero value to a special byteorder format.
3048
f26ae15b
YQ
30492017-11-02 Yao Qi <yao.qi@linaro.org>
3050
3051 * frame.c (do_frame_register_read): Remove aspace.
3052 * jit.c (jit_frame_sniffer): Likwise.
3053 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3054 * regcache.c (regcache::regcache): Pass nullptr.
3055 (regcache_print): Caller updated.
3056 * regcache.h (regcache::regcache): Remove one constructor
3057 parameter aspace.
3058
6c6e9412
YQ
30592017-11-02 Yao Qi <yao.qi@linaro.org>
3060
3061 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3062
8b86c959
YQ
30632017-11-02 Yao Qi <yao.qi@linaro.org>
3064
3065 * breakpoint.c (insert_single_step_breakpoints): Update.
3066 * frame.c (struct frame_info) <aspace>: Add const.
3067 (frame_save_as_regcache): Add const.
3068 (get_frame_address_space): Return const address_space *.
3069 * frame.h (get_frame_address_space): Update declaration.
3070 * infrun.c (struct step_over_info) <aspace>: Add const.
3071 (set_step_over_info): Make aspace const.
3072 (displaced_step_prepare_throw): Change variable const.
3073 (resume): Likewise.
3074 (proceed): Likewise.
3075 (adjust_pc_after_break): Likewise.
3076 (save_waitstatus): Likewise.
3077 (handle_signal_stop): Likewise.
3078 (keep_going_pass_signal): Likewise.
3079 * jit.c (jit_frame_sniffer): Add const.
3080 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3081 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3082 * record-full.c (record_full_wait_1): Likewise.
3083 * regcache.c (regcache::regcache): Change parameter to const.
3084 * regcache.h (regcache::regcache): Likewise.
3085 (regcache::aspace): Return const address_space *.
3086 (regcache) <m_aspace>: Add const.
3087
a01bda52
YQ
30882017-11-02 Yao Qi <yao.qi@linaro.org>
3089
3090 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3091 * frame.c (create_sentinel_frame): Likewise.
3092 * infrun.c (displaced_step_prepare_throw): Likewise.
3093 (resume): Likewise.
3094 (thread_still_needs_step_over_bp): Likewise.
3095 (proceed): Likewise.
3096 (do_target_wait): Likewise.
3097 (adjust_pc_after_break): Likewise.
3098 (handle_syscall_event): Likewise.
3099 (save_waitstatus): Likewise.
3100 (handle_inferior_event_1): Likewise.
3101 (handle_signal_stop): Likewise.
3102 (keep_going_pass_signal): Likewise.
3103 * linux-nat.c (status_callback): Likewise.
3104 (save_stop_reason): Likewise.
3105 (resume_stopped_resumed_lwps): Likewise.
3106 * record-full.c (record_full_exec_insn): Likewise.
3107 (record_full_wait_1): Likewise.
3108 * regcache.c (get_regcache_aspace): Remove.
3109 * regcache.h (get_regcache_aspace): Remove.
3110
d999647b
YQ
31112017-11-02 Yao Qi <yao.qi@linaro.org>
3112
3113 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3114 (init_regcache_descr): Use gdbarch_num_regs.
3115 (regcache::regcache): Likewise.
3116 (regcache::get_register_status): Likewise.
3117 (regcache::assert_raw_regnum): Likewise.
3118 (regcache::cooked_read): Likewise.
3119 (regcache::cooked_read_value): Likewise.
3120 (regcache::cooked_write): Likewise.
3121 (regcache::dump): Likewise.
3122 (regcache::num_raw_registers): New method.
3123 * regcache.h (class regcache) <num_raw_registers>: New.
3124
4e888c28
YQ
31252017-11-02 Yao Qi <yao.qi@linaro.org>
3126
3127 * regcache.c (regcache::assert_regnum): New method.
3128 (regcache::invalidate): Call assert_regnum.
3129 (regcache::raw_update): Likewise.
3130 (regcache::raw_write): Likewise.
3131 (regcache::raw_read_part): Likewise.
3132 (regcache::raw_write_part): Likewise.
3133 (regcache::raw_supply): Likewise.
3134 (regcache::raw_supply_integer): Likewise.
3135 (regcache::raw_supply_zeroed): Likewise.
3136 (regcache::raw_collect): Likewise.
3137 (regcache::raw_collect_integer): Likewise.
3138 * regcache.h (regcache::assert_regnum): Declare.
3139
2e1b49b3
YQ
31402017-11-02 Yao Qi <yao.qi@linaro.org>
3141
3142 * regcache.c (regcache::dump): Remove code.
3143
6c5218df
YQ
31442017-11-02 Yao Qi <yao.qi@linaro.org>
3145
3146 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3147 Remove.
3148 <sizeof_cooked_register_status>: Remove.
3149 (init_regcache_descr): Update.
3150 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3151 (regcache::save): Likewise.
3152 (regcache::dump): Likewise.
3153
dcc31d28
JB
31542017-11-01 James Bowman <james.bowman@ftdichip.com>
3155
3156 * ft32-tdep.c (ft32_fetch_instruction): New function.
3157 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3158
3a87ae65
SM
31592017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3160
3161 * cli/cli-script.c (execute_control_command): Rename to ...
3162 (execute_control_command_1): ... this.
3163 (execute_control_command): New function.
3164
09b847f3
SM
31652017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3166
3167 * tracepoint.c (tfind_command): Remove const_cast.
3168
f871c485
MG
31692017-10-30 Mike Gulick <mgulick@mathworks.com>
3170
3171 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3172
b020ff80
SM
31732017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3174
3175 * common/common-utils.h (in_inclusive_range): New function.
3176 * arm-tdep.c (arm_record_extension_space): Use
3177 in_inclusive_range.
3178 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3179 * cris-tdep.c (cris_spec_reg_applicable): Use
3180 in_inclusive_range.
3181
1b81856f
PA
31822017-10-30 Pedro Alves <palves@redhat.com>
3183 Simon Marchi <simon.marchi@ericsson.com>
3184
3185 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3186 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3187
31b833b3
PA
31882017-10-30 Pedro Alves <palves@redhat.com>
3189
3190 * common/common-utils.c (string_appendf, string_vappendf): New
3191 functions.
3192 * common/common-utils.h (string_appendf, string_vappendf): New
3193 declarations.
3194 * unittests/common-utils-selftests.c (string_appendf_func)
3195 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3196 (string_vappendf_tests): New functions.
3197 (_initialize_common_utils_selftests): Register "string_appendf" and
3198 "string_vappendf tests".
3199
4a250334
PA
32002017-10-30 Pedro Alves <palves@redhat.com>
3201
3202 * unittests/common-utils-selftests.c (format_func): New typedef.
3203 (string_printf_tests, string_vprintf_tests): Tests factored out
3204 and merged to ...
3205 (test_format_func): ... this new function.
3206 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3207 test_format_func.
3208
16c5c17e
SM
32092017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3210
3211 * darwin-nat.c: Remove include of gdb.h.
3212
7ca51576
SM
32132017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3214
3215 * xtensa-xtregs.c: Fix formatting issues.
3216
c1342859
SM
32172017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3218
3219 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3220
484d8d36
MD
32212017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3222
3223 PR python/21213
3224 * python/py-infthread.c (thpy_get_inferior): Increment reference
3225 of inferior before returning it.
3226
b5540b5f
SM
32272017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3228
3229 * unittests/common-utils-selftests.c (format): Add
3230 ATTRIBUTE_PRINTF.
3231
5a9dcda1
SM
32322017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3233
3234 * xml-syscall.c (struct syscall_desc): Add constructor.
3235 <name>: Change type to std::string.
3236 (syscall_desc_up): New typedef.
3237 (syscall_desc_p): Remove typeder.
3238 (DEF_VEC_P(syscall_desc_p)): Remove.
3239 (struct syscall_group_desc): Add constructor.
3240 <name>: Change type to std::string.
3241 <syscalls>: Change type to std::vector.
3242 (syscall_group_desc_up): New typedef.
3243 (syscall_group_desc_p): Remove typedef.
3244 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3245 (struct syscalls_info) <syscalls>: Change type to std::vector of
3246 unique_ptr.
3247 <groups>: Likewise.
3248 <my_gdb_datadir>: Change type to std::string.
3249 (syscalls_info_up): New typedef.
3250 (allocate_syscalls_info): Remove.
3251 (syscalls_info_free_syscalls_desc): Remove.
3252 (syscalls_info_free_syscall_group_desc): Remove.
3253 (free_syscalls_info): Remove.
3254 (make_cleanup_free_syscalls_info): Remove.
3255 (syscall_group_create_syscall_group_desc): Adjust.
3256 (syscall_group_add_syscall): Adjust.
3257 (syscall_create_syscall_desc): Adjust.
3258 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3259 (init_syscalls_info): Adjust.
3260 (syscall_group_get_group_by_name): Adjust.
3261 (xml_get_syscall_number): Adjust.
3262 (xml_get_syscall_name): Adjust.
3263 (xml_list_of_syscalls): Adjust.
3264 (xml_list_syscalls_by_group): Adjust.
3265 (xml_list_of_groups): Adjust.
3266
45461e0d
SM
32672017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * probe.h: Don't include gdb_vecs.h.
3270 (DEF_VEC_P (probe_p)): Remove.
3271 (find_probes_in_objfile): Return an std::vector.
3272 * probe.c (find_probes_in_objfile): Likewise.
3273 * breakpoint.c (breakpoint_objfile_data)
3274 <longjmp_probes>: Change type to std::vector.
3275 <exception_probes>: Likewise.
3276 (free_breakpoint_probes): Don't manually free vectors.
3277 (create_longjmp_master_breakpoint): Adjust.
3278 (create_exception_master_breakpoint): Adjust.
3279 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3280 parameter type, adjust.
3281 (svr4_create_solib_event_breakpoints): Adjust.
3282
43dce439
SM
32832017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3284
3285 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3286 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3287 with new.
3288 (free_breakpoint_probes): Rename to ...
3289 (free_breakpoint_objfile_data): ... this, and call delete on
3290 bp_objfile_data..
3291
6a1b9516
SM
32922017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3293
3294 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3295 (loaded_script_ptr): Remove typedef.
3296 (DEF_VEC_P (loaded_script_ptr)): Remove.
3297 (struct collect_matching_scripts_data): Add constructor.
3298 <scripts_p>: Change type to (pointer to) std::vector.
3299 (collect_matching_scripts_data): Adjust.
3300 (sort_scripts_by_name): Make suitable for std::sort.
3301 (print_scripts): Don't sort vector, adjust to std::vector.
3302 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3303
593e3209
SM
33042017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3305
3306 * symfile.c (filename_language): Make struct, not typedef. Add
3307 constructor.
3308 <ext>: Change type to std::string.
3309 (DEF_VEC_O (filename_language)): Remove.
3310 (filename_language_table): Change type to std::vector.
3311 (add_filename_language): Adjust.
3312 (set_ext_lang_command): Adjust.
3313 (info_ext_lang_command): Adjust.
3314 (deduce_language_from_filename): Adjust.
3315 (class scoped_restore_filename_language_table): Remove.
3316 (test_filename_language): Use scoped_restore.
3317 (test_set_ext_lang_command): Use scoped_restore, adjust to
3318 std::vector change.
3319
32fa66eb
SM
33202017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3321
3322 * symfile.c: Include selftest.h.
3323 (class scoped_restore_filename_language_table): New.
3324 (test_filename_language): New test.
3325 (test_set_ext_lang_command): New test.
3326 (_initialize_symfile): Register tests.
3327
4a27f119
KS
33282017-10-27 Keith Seitz <keiths@redhat.com>
3329
3330 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3331 in the bp_location, falling back to find_pc_sect_function when
3332 needed.
3333 (add_location_to_breakpoint): Save sal->symbol.
3334 * breakpoint.h (struct bp_location) <symbol>: New field.
3335 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3336 * symtab.h (struct symtab_and_line) <symbol>: New field.
3337
a43f3893
PF
33382017-10-26 Patrick Frants <osscontribute@gmail.com>
3339
7453e6b2 3340 PR gdb/13669
a43f3893
PF
3341 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3342 to rewind obstack.
3343
23cc4e1b
PA
33442017-10-26 Pedro Alves <palves@redhat.com>
3345
3346 * remote.c (remote_async_terminal_ours_p): Delete.
3347 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3348 Remove references to 'remote_async_terminal_ours_p'.
3349
6abc18bb
YQ
33502017-10-26 Yao Qi <yao.qi@linaro.org>
3351
3352 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3353
bd522513
YQ
33542017-10-26 Yao Qi <yao.qi@linaro.org>
3355
3356 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3357 aspace const.
3358 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3359 Likewise.
3360 * breakpoint.c (bpstat_check_location): Remove cast.
3361 (breakpoint_hit_catch_fork): Make aspce const.
3362 (breakpoint_hit_catch_solib): Likewise.
3363 (breakpoint_hit_catch_exec): Likewise.
3364 (breakpoint_hit_ranged_breakpoint): Likewise.
3365 (breakpoint_hit_watchpoint): Likewise.
3366 (base_breakpoint_breakpoint_hit): Likewise.
3367 (bkpt_breakpoint_hit): Likewise.
3368 (dprintf_breakpoint_hit): Likewise.
3369 (tracepoint_breakpoint_hit): Likewise.
3370 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3371
accd0bcd
YQ
33722017-10-26 Yao Qi <yao.qi@linaro.org>
3373
3374 * breakpoint.c (breakpoint_location_address_match): Change
3375 "struct address_space *" to "const address_space".
3376 (breakpoint_location_address_range_overlap): Likewise.
3377 (breakpoint_here_p): Likewise.
3378 (breakpoint_in_range_p): Likewise.
3379 (moribund_breakpoint_here_p): Likewise.
3380 (bp_location_inserted_here_p): Likewise.
3381 (software_breakpoint_inserted_here_p): Likewise.
3382 (hardware_breakpoint_inserted_here_p): Likewise.
3383 (hardware_watchpoint_inserted_in_range): Likewise.
3384 (bpstat_check_location): Likewise.
3385 (bpstat_stop_status): Likewise.
3386 (breakpoint_address_match): Likewise.
3387 (breakpoint_address_match_range): Likewise.
3388 (breakpoint_location_address_match): Likewise.
3389 (breakpoint_location_address_range_overlap): Likewise.
3390 (insert_single_step_breakpoint): Likewise.
3391 (breakpoint_has_location_inserted_here): Likewise.
3392 (single_step_breakpoint_inserted_here_p): Likewise.
3393 (pc_at_non_inline_function): Likewise.
3394 * breakpoint.h (bpstat_stop_status): Update declaration.
3395 (breakpoint_here_p): Likewise.
3396 (breakpoint_in_range_p): Likewise.
3397 (moribund_breakpoint_here_p): Likewise.
3398 (breakpoint_inserted_here_p): Likewise.
3399 (software_breakpoint_inserted_here_p): Likewise.
3400 (hardware_breakpoint_inserted_here_p): Likewise.
3401 (breakpoint_has_location_inserted_here): Likewise.
3402 (single_step_breakpoint_inserted_here_p): Likewise.
3403 (hardware_watchpoint_inserted_in_range): Likewise.
3404 (breakpoint_address_match): Likewise.
3405 (insert_single_step_breakpoint): Likewise.
3406 (pc_at_non_inline_function): Likewise.
3407 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3408 * record.c (record_check_stopped_by_breakpoint): Likewise.
3409 * record.h (record_check_stopped_by_breakpoint): Likewise.
3410 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3411
ac7936df
YQ
34122017-10-25 Yao Qi <yao.qi@linaro.org>
3413
3414 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3415 regcache->arch () instead get_regcache_arch.
3416 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3417 Likewise.
3418 (aarch64_fbsd_store_inferior_registers): Likewise.
3419 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3420 (store_gregs_to_thread): Likewise.
3421 (fetch_fpregs_from_thread): Likewise.
3422 (store_fpregs_to_thread): Likewise.
3423 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3424 (aarch64_store_return_value): Likewise.
3425 (aarch64_software_single_step): Likewise.
3426 * aix-thread.c (aix_thread_wait): Likewise.
3427 (supply_reg32): Likewise.
3428 (supply_sprs64): Likewise.
3429 (supply_sprs32): Likewise.
3430 (fill_gprs64): Likewise.
3431 (fill_gprs32): Likewise.
3432 (fill_sprs64): Likewise.
3433 (fill_sprs32): Likewise.
3434 (store_regs_user_thread): Likewise.
3435 (store_regs_kernel_thread): Likewise.
3436 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3437 (alphabsd_store_inferior_registers): Likewise.
3438 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3439 (alpha_store_return_value): Likewise.
3440 (alpha_deal_with_atomic_sequence): Likewise.
3441 (alpha_next_pc): Likewise.
3442 (alpha_software_single_step): Likewise.
3443 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3444 (amd64bsd_store_inferior_registers): Likewise.
3445 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3446 Likewise.
3447 (amd64_linux_store_inferior_registers): Likewise.
3448 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3449 (amd64_collect_native_gregset): Likewise.
3450 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3451 (amd64obsd_collect_uthread): Likewise.
3452 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3453 (amd64_collect_fpregset): Likewise.
3454 (amd64_supply_fxsave): Likewise.
3455 (amd64_supply_xsave): Likewise.
3456 (amd64_collect_fxsave): Likewise.
3457 (amd64_collect_xsave): Likewise.
3458 * arc-tdep.c (arc_write_pc): Likewise.
3459 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3460 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3461 (arm_fbsd_store_inferior_registers): Likewise.
3462 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3463 (store_vfp_regs): Likewise.
3464 (arm_linux_fetch_inferior_registers): Likewise.
3465 (arm_linux_store_inferior_registers): Likewise.
3466 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3467 (arm_linux_sigreturn_next_pc): Likewise.
3468 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3469 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3470 (fetch_register): Likewise.
3471 (store_register): Likewise.
3472 * arm-tdep.c (arm_is_thumb): Likewise.
3473 (displaced_in_arm_mode): Likewise.
3474 (bx_write_pc): Likewise.
3475 (arm_get_next_pcs_addr_bits_remove): Likewise.
3476 (arm_software_single_step): Likewise.
3477 (arm_extract_return_value): Likewise.
3478 (arm_store_return_value): Likewise.
3479 (arm_write_pc): Likewise.
3480 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3481 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3482 (bsd_uthread_store_registers): Likewise.
3483 * core-regset.c (fetch_core_registers): Likewise.
3484 * corelow.c (get_core_registers): Likewise.
3485 * cris-tdep.c (cris_store_return_value): Likewise.
3486 (cris_extract_return_value): Likewise.
3487 (find_step_target): Likewise.
3488 (find_step_target): Likewise.
3489 (cris_software_single_step): Likewise.
3490 * ctf.c (ctf_fetch_registers): Likewise.
3491 * darwin-nat.c (cancel_breakpoint): Likewise.
3492 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3493 * frv-tdep.c (frv_extract_return_value): Likewise.
3494 * ft32-tdep.c (ft32_store_return_value): Likewise.
3495 (ft32_extract_return_value): Likewise.
3496 * go32-nat.c (fetch_register): Likewise.
3497 (go32_fetch_registers): Likewise.
3498 (go32_store_registers): Likewise.
3499 (store_register): Likewise.
3500 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3501 (h8300_store_return_value): Likewise.
3502 * hppa-linux-nat.c (fetch_register): Likewise.
3503 (store_register): Likewise.
3504 (hppa_linux_fetch_inferior_registers): Likewise.
3505 (hppa_linux_store_inferior_registers): Likewise.
3506 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3507 (i386_darwin_store_inferior_registers): Likewise.
3508 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3509 (gnu_store_registers): Likewise.
3510 * i386-linux-nat.c (fetch_register): Likewise.
3511 (store_register): Likewise.
3512 (supply_gregset): Likewise.
3513 (fill_gregset): Likewise.
3514 (i386_linux_fetch_inferior_registers): Likewise.
3515 (i386_linux_store_inferior_registers): Likewise.
3516 (i386_linux_resume): Likewise.
3517 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3518 Likewise.
3519 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3520 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3521 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3522 (i386obsd_collect_uthread): Likewise.
3523 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3524 (i386_supply_gregset): Likewise.
3525 (i386_collect_gregset): Likewise.
3526 (i386_supply_fpregset): Likewise.
3527 (i386_collect_fpregset): Likewise.
3528 (i386_mpx_bd_base): Likewise.
3529 * i386-v4-nat.c (supply_fpregset): Likewise.
3530 (fill_fpregset): Likewise.
3531 * i387-tdep.c (i387_supply_fsave): Likewise.
3532 (i387_collect_fsave): Likewise.
3533 (i387_supply_fxsave): Likewise.
3534 (i387_collect_fxsave): Likewise.
3535 (i387_supply_xsave): Likewise.
3536 (i387_collect_xsave): Likewise.
3537 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3538 (ia64_linux_store_registers): Likewise.
3539 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3540 (ia64_extract_return_value): Likewise.
3541 (ia64_store_return_value): Likewise.
3542 (find_func_descr): Likewise.
3543 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3544 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3545 (inf_ptrace_store_registers): Likewise.
3546 * infrun.c (use_displaced_stepping): Likewise.
3547 (displaced_step_prepare_throw): Likewise.
3548 (resume): Likewise.
3549 (proceed): Likewise.
3550 (do_target_wait): Likewise.
3551 (adjust_pc_after_break): Likewise.
3552 (handle_inferior_event_1): Likewise.
3553 (handle_signal_stop): Likewise.
3554 (save_infcall_suspend_state): Likewise.
3555 (restore_infcall_suspend_state): Likewise.
3556 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3557 * jit.c (jit_frame_prev_register): Likewise.
3558 * linux-nat.c (save_stop_reason): Likewise.
3559 (linux_nat_wait_1): Likewise.
3560 (resume_stopped_resumed_lwps): Likewise.
3561 * linux-record.c (record_linux_sockaddr): Likewise.
3562 (record_linux_msghdr): Likewise.
3563 (record_linux_system_call): Likewise.
3564 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3565 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3566 (lm32_store_return_value): Likewise.
3567 * m32c-tdep.c (m32c_read_flg): Likewise.
3568 (m32c_pseudo_register_read): Likewise.
3569 (m32c_pseudo_register_write): Likewise.
3570 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3571 (m32r_linux_collect_gregset): Likewise.
3572 * m32r-tdep.c (m32r_store_return_value): Likewise.
3573 (m32r_extract_return_value): Likewise.
3574 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3575 (m68kbsd_collect_fpregset): Likewise.
3576 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3577 * m68k-linux-nat.c (fetch_register): Likewise.
3578 (old_fetch_inferior_registers): Likewise.
3579 (old_store_inferior_registers): Likewise.
3580 (store_regs): Likewise.
3581 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3582 (m68k_svr4_store_return_value): Likewise.
3583 * m88k-tdep.c (m88k_store_arguments): Likewise.
3584 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3585 (mi_cmd_data_write_register_values): Likewise.
3586 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3587 (mips_fbsd_store_inferior_registers): Likewise.
3588 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3589 (mips_fbsd_supply_gregs): Likewise.
3590 (mips_fbsd_collect_fpregs): Likewise.
3591 (mips_fbsd_collect_gregs): Likewise.
3592 (mips_fbsd_supply_fpregset): Likewise.
3593 (mips_fbsd_collect_fpregset): Likewise.
3594 (mips_fbsd_supply_gregset): Likewise.
3595 (mips_fbsd_collect_gregset): Likewise.
3596 * mips-linux-nat.c (supply_gregset): Likewise.
3597 (fill_gregset): Likewise.
3598 (supply_fpregset): Likewise.
3599 (fill_fpregset): Likewise.
3600 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3601 (mips_fill_gregset): Likewise.
3602 (mips_supply_fpregset): Likewise.
3603 (mips_fill_fpregset): Likewise.
3604 (mips64_supply_gregset): Likewise.
3605 (micromips_linux_sigframe_validate): Likewise.
3606 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3607 (mipsnbsd_fetch_inferior_registers): Likewise.
3608 (mipsnbsd_store_inferior_registers): Likewise.
3609 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3610 (mipsnbsd_supply_gregset): Likewise.
3611 (mipsnbsd_iterate_over_regset_sections): Likewise.
3612 (mipsnbsd_supply_reg): Likewise.
3613 (mipsnbsd_supply_fpreg): Likewise.
3614 * mips-tdep.c (mips_in_frame_stub): Likewise.
3615 (mips_dummy_id): Likewise.
3616 (is_octeon_bbit_op): Likewise.
3617 (micromips_bc1_pc): Likewise.
3618 (extended_mips16_next_pc): Likewise.
3619 (mips16_next_pc): Likewise.
3620 (deal_with_atomic_sequence): Likewise.
3621 * moxie-tdep.c (moxie_process_readu): Likewise.
3622 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3623 * nto-procfs.c (procfs_store_registers): Likewise.
3624 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3625 (ppcfbsd_store_inferior_registers): Likewise.
3626 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3627 (fetch_altivec_register): Likewise.
3628 (get_spe_registers): Likewise.
3629 (fetch_spe_register): Likewise.
3630 (fetch_altivec_registers): Likewise.
3631 (fetch_all_gp_regs): Likewise.
3632 (fetch_all_fp_regs): Likewise.
3633 (store_vsx_register): Likewise.
3634 (store_altivec_register): Likewise.
3635 (set_spe_registers): Likewise.
3636 (store_spe_register): Likewise.
3637 (store_altivec_registers): Likewise.
3638 (store_all_gp_regs): Likewise.
3639 (store_all_fp_regs): Likewise.
3640 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3641 (ppc_linux_collect_gregset): Likewise.
3642 (ppc_canonicalize_syscall): Likewise.
3643 (ppc_linux_record_signal): Likewise.
3644 (ppu2spu_prev_register): Likewise.
3645 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3646 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3647 (ppcobsd_store_registers): Likewise.
3648 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3649 Likewise.
3650 (ppc_ravenscar_generic_store_registers): Likewise.
3651 * procfs.c (procfs_fetch_registers): Likewise.
3652 (procfs_store_registers): Likewise.
3653 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3654 (ravenscar_store_registers): Likewise.
3655 (ravenscar_prepare_to_store): Likewise.
3656 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3657 * record-full.c (record_full_wait_1): Likewise.
3658 (record_full_registers_change): Likewise.
3659 (record_full_store_registers): Likewise.
3660 (record_full_core_fetch_registers): Likewise.
3661 (record_full_save): Likewise.
3662 (record_full_goto_insn): Likewise.
3663 * regcache.c (regcache_register_size): Likewise.
3664 (get_regcache_arch): Remove.
3665 (regcache_read_pc): Likewise.
3666 * regcache.h (get_regcache_arch): Remove.
3667 * remote-sim.c (gdbsim_fetch_register): Likewise.
3668 (gdbsim_store_register): Likewise.
3669 * remote.c (fetch_register_using_p): Likewise.
3670 (send_g_packet): Likewise.
3671 (remote_prepare_to_store): Likewise.
3672 (store_registers_using_G): Likewise.
3673 * reverse.c (save_bookmark_command): Likewise.
3674 (goto_bookmark_command): Likewise.
3675 * rs6000-aix-tdep.c (branch_dest): Likewise.
3676 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3677 (fetch_register): Likewise.
3678 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3679 (ppc_collect_reg): Likewise.
3680 (ppc_collect_gregset): Likewise.
3681 (ppc_collect_fpregset): Likewise.
3682 (ppc_collect_vsxregset): Likewise.
3683 (ppc_collect_vrregset): Likewise.
3684 (ppc_displaced_step_hw_singlestep): Likewise.
3685 (rs6000_pseudo_register_read): Likewise.
3686 (rs6000_pseudo_register_write): Likewise.
3687 * s390-linux-nat.c (supply_gregset): Likewise.
3688 (fill_gregset): Likewise.
3689 (s390_linux_fetch_inferior_registers): Likewise.
3690 * s390-linux-tdep.c (s390_write_pc): Likewise.
3691 (s390_software_single_step): Likewise.
3692 (s390_all_but_pc_registers_record): Likewise.
3693 (s390_linux_syscall_record): Likewise.
3694 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3695 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3696 (shnbsd_store_inferior_registers): Likewise.
3697 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3698 (sh_extract_return_value_fpu): Likewise.
3699 (sh_store_return_value_nofpu): Likewise.
3700 (sh_corefile_supply_regset): Likewise.
3701 (sh_corefile_collect_regset): Likewise.
3702 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3703 (sh64_store_return_value): Likewise.
3704 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3705 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3706 (sparc_store_inferior_registers): Likewise.
3707 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3708 (sparc_ravenscar_prepare_to_store): Likewise.
3709 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3710 (sparc_analyze_control_transfer): Likewise.
3711 (sparc_step_trap): Likewise.
3712 (sparc_software_single_step): Likewise.
3713 (sparc32_gdbarch_init): Likewise.
3714 (sparc_supply_rwindow): Likewise.
3715 (sparc_collect_rwindow): Likewise.
3716 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3717 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3718 (sparc64nbsd_collect_gregset): Likewise.
3719 (sparc64nbsd_supply_fpregset): Likewise.
3720 (sparc64nbsd_collect_fpregset): Likewise.
3721 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3722 (sparc64_supply_gregset): Likewise.
3723 (sparc64_collect_gregset): Likewise.
3724 (sparc64_supply_fpregset): Likewise.
3725 (sparc64_collect_fpregset): Likewise.
3726 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3727 * spu-tdep.c (spu_unwind_sp): Likewise.
3728 (spu2ppu_prev_register): Likewise.
3729 (spu_memory_remove_breakpoint): Likewise.
3730 * stack.c (return_command): Likewise.
3731 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3732 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3733 * tracefile.c (trace_save_ctf): Likewise.
3734 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3735 (do_windows_store_inferior_registers): Likewise.
3736 (windows_resume): Likewise.
3737 * xtensa-linux-nat.c (fill_gregset): Likewise.
3738 (supply_gregset_reg): Likewise.
3739 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3740 (xtensa_register_read_masked): Likewise.
3741 (xtensa_supply_gregset): Likewise.
3742 (xtensa_extract_return_value): Likewise.
3743 (xtensa_store_return_value): Likewise.
3744
edd079d9
UW
37452017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3746
3747 * doublest.c (floatformat_from_string): New function.
3748 * doublest.h (floatformat_from_string): Add prototype.
3749
3750 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3751 (OP_FLOAT): ... this.
3752 * expression.h: Do not include "doublest.h".
3753 (union exp_element): Replace doubleconst and decfloatconst by
3754 new element floatconst.
3755 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3756 (ada_evaluate_subexp): Likewise.
3757 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3758 OP_DOUBLE and OP_DECFLOAT.
3759 * expprint.c (print_subexp_standard): Likewise.
3760 (dump_subexp_body_standard): Likewise.
3761 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3762
3763 * parse.c: Include "dfp.h".
3764 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3765 (write_exp_elt_floatcst): New function.
3766 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3767 and OP_DECFLOAT.
3768 (operator_check_standard): Likewise.
3769 (parse_float): Do not accept suffix. Take type as input. Return bool.
3770 Return target format buffer instead of host DOUBLEST.
3771 Use floatformat_from_string and decimal_from_string to parse
3772 either binary or decimal floating-point types.
3773 (parse_c_float): Remove.
3774 * parser-defs.h: Do not include "doublest.h".
3775 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3776 (write_exp_elt_floatcst): Add prototype.
3777 (parse_float): Update prototype.
3778 (parse_c_float): Remove.
3779
3780 * c-exp.y: Do not include "dfp.h".
3781 (typed_val_float): Use byte buffer instead of DOUBLEST.
3782 (typed_val_decfloat): Remove.
3783 (DECFLOAT): Remove.
3784 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3785 (parse_number): Update to new parse_float interface.
3786 Parse suffixes and determine type before calling parse_float.
3787 Handle decimal and binary FP types the same way.
3788
3789 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3790 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3791 (parse_number): Update to new parse_float interface.
3792 Parse suffixes and determine type before calling parse_float.
3793
3794 * f-exp.y: Replace dval by typed_val_float.
3795 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3796 (parse_number): Use parse_float instead of atof.
3797
3798 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3799 (parse_go_float): Remove.
3800 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3801 (parse_number): Call parse_float instead of parse_go_float.
3802 Parse suffixes and determine type before calling parse_float.
3803
3804 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3805 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3806 (parse_number): Update to new parse_float interface.
3807 Parse suffixes and determine type before calling parse_float.
3808
3809 * m2-exp.y: Replace dval by byte buffer val.
3810 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3811 (parse_number): Call parse_float instead of atof.
3812
3813 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3814 (lex_number): Call parse_float instead of strtod.
3815 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3816 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3817 Use write_exp_elt_floatcst.
3818 (unit_testing): Remove static variable.
3819 (rust_type): Do not check unit_testing.
3820 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3821
3822 * ada-exp.y (type_float, type_double): Remove.
3823 (typed_val_float): Use byte buffer instead of DOUBLEST.
3824 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3825 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3826
cc628f3d
AH
38272017-10-25 Alan Hayward <alan.hayward@arm.com>
3828
3829 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3830 * arch/aarch64.h: New file.
3831
09a7c6aa
UW
38322017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3833
3834 * dfp.h (decimal_from_string): Use const reference for argument.
3835 * dfp.c (decimal_from_string): Likewise.
3836
8ba0dd51
UW
38372017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3838
3839 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3840 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3841 * mips-tdep.c (mips_print_fp_register): Likewise.
3842
16e812b2
UW
38432017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3844
3845 * common/format.h (enum argclass): Replace decfloat_arg by
3846 dec32float_arg, dec64float_arg, and dec128float_arg.
3847 * common/format.c (parse_format_string): Update to return
3848 new decimal float argument classes.
3849
3850 * printcmd.c (printf_decfloat): Rename to ...
3851 (printf_floating): ... this. Add argclass argument, and use it
3852 instead of parsing the format string again. Add support for
3853 binary floating-point values, using floatformat_to_string.
3854 Convert value to the target format if it doesn't already match.
3855 (ui_printf): Call printf_floating instead of printf_decfloat,
3856 also for double_arg / long_double_arg. Pass argclass.
3857
3858 * dfp.c (decimal_to_string): Add format string argument.
3859 * dfp.h (decimal_to_string): Likewise.
3860
3861 * doublest.c (floatformat_to_string): Add format string argument.
3862 * doublest.h (floatformat_to_string): Likewise.
3863
fdf0cbc2
UW
38642017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3865
3866 * doublest.c (floatformat_precision): New routine.
3867 (floatformat_to_string): Likewise.
3868 * doublest.c (floatformat_to_string): Add prototype.
3869
3870 * printcmd.c (print_scalar_formatted): Only call print_floating
3871 on floating-point types.
3872 * valprint.c: Do not include "floatformat.h".
3873 (generic_val_print_decfloat): Remove.
3874 (generic_val_print): Call generic_val_print_float for both
3875 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3876 (print_floating): Use floatformat_to_string. Handle decimal float.
3877 (print_decimal_floating): Remove, merge into floatformat_to_string.
3878 * value.h (print_decimal_floating): Remove.
3879
3880 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3881
5033013f
UW
38822017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3883
3884 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3885
a664f67e
SM
38862017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3887
3888 * memattr.h: Don't include vec.h.
3889 (struct mem_attrib): Initialize fields.
3890 <unknown>: New static method.
3891 (struct mem_region): Add constructors, operator<, initialize
3892 fields.
3893 * memattr.c: Include algorithm.
3894 (default_mem_attrib, unknown_mem_attrib): Remove.
3895 (user_mem_region_list): New global.
3896 (target_mem_region_list, mem_region_list): Change type to
3897 std::vector<mem_region>.
3898 (mem_use_target): Now a function.
3899 (target_mem_regions_valid): Change type to bool.
3900 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3901 (require_user_regions): Adjust.
3902 (require_target_regions): Adjust.
3903 (create_mem_region): Adjust.
3904 (lookup_mem_region): Adjust.
3905 (invalidate_target_mem_regions): Adjust.
3906 (mem_clear): Rename to...
3907 (user_mem_clear): ... this, and adjust.
3908 (mem_command): Adjust.
3909 (info_mem_command): Adjust.
3910 (mem_enable, enable_mem_command, mem_disable,
3911 disable_mem_command): Adjust.
3912 (mem_delete): Adjust.
3913 (delete_mem_command): Adjust.
3914 * memory-map.h (parse_memory_map): Return an std::vector.
3915 * memory-map.c (parse_memory_map): Likewise.
3916 (struct memory_map_parsing_data): Add constructor.
3917 <memory_map>: Point to std::vector.
3918 (memory_map_start_memory): Adjust.
3919 (memory_map_end_memory): Adjust.
3920 (memory_map_end_property): Adjust.
3921 (clear_result): Remove.
3922 * remote.c (remote_memory_map): Return an std::vector.
3923 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3924 Remove.
3925 (target_debug_print_mem_region_vector): New.
3926 * target-delegates.c: Regenerate.
3927 * target.h (mem_region_vector): New typedef.
3928 (to_memory_map): Return mem_region_vector.
3929 (target_memory_map): Return an std::vector.
3930 * target.c (target_memory_map): Return an std::vector.
3931 (flash_erase_command): Adjust.
3932
6e17c565
SM
39332017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3934
3935 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3936 Change type to std::string.
3937 (memory_map_start_property): Adjust.
3938 (memory_map_end_property): Adjust.
3939
cfba9872
SM
39402017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3941
3942 * infrun.h: Include common/byte-vector.h.
3943 (struct displaced_step_closure): New struct.
3944 (struct buf_displaced_step_closure): New struct.
3945 * infrun.c (displaced_step_closure::~displaced_step_closure):
3946 Provide default implementation.
3947 (displaced_step_clear): Deallocate step closure with delete.
3948 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3949 (aarch64_displaced_step_closure): ... this, extend
3950 displaced_step_closure.
3951 (aarch64_displaced_step_data) <dsc>: Change type to
3952 aarch64_displaced_step_closure.
3953 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3954 unique_ptr.
3955 (aarch64_displaced_step_fixup): Add cast for displaced step
3956 closure.
3957 * amd64-tdep.c (displaced_step_closure): Rename to ...
3958 (amd64_displaced_step_closure): ... this, extend
3959 displaced_step_closure.
3960 <insn_buf>: Change type to std::vector<gdb_byte>.
3961 <max_len>: Remove.
3962 (fixup_riprel): Change type of DSC parameter, adjust to type
3963 change of insn_buf.
3964 (fixup_displaced_copy): Change type of DSC parameter.
3965 (amd64_displaced_step_copy_insn): Instantiate
3966 amd64_displaced_step_closure.
3967 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3968 to type change of insn_buf.
3969 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3970 parameter DSC.
3971 (arm_linux_copy_svc): Likewise.
3972 (cleanup_kernel_helper_return): Likewise.
3973 (arm_catch_kernel_helper_return): Likewise.
3974 (arm_linux_displaced_step_copy_insn): Instantiate
3975 arm_displaced_step_closure.
3976 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3977 (displaced_read_reg): Change type of parameter DSC.
3978 (branch_write_pc): Likewise.
3979 (load_write_pc): Likewise.
3980 (alu_write_pc): Likewise.
3981 (displaced_write_reg): Likewise.
3982 (arm_copy_unmodified): Likewise.
3983 (thumb_copy_unmodified_32bit): Likewise.
3984 (thumb_copy_unmodified_16bit): Likewise.
3985 (cleanup_preload): Likewise.
3986 (install_preload): Likewise.
3987 (arm_copy_preload): Likewise.
3988 (thumb2_copy_preload): Likewise.
3989 (install_preload_reg): Likewise.
3990 (arm_copy_preload_reg): Likewise.
3991 (cleanup_copro_load_store): Likewise.
3992 (install_copro_load_store): Likewise.
3993 (arm_copy_copro_load_store) Likewise.
3994 (thumb2_copy_copro_load_store): Likewise.
3995 (cleanup_branch): Likewise.
3996 (install_b_bl_blx): Likewise.
3997 (arm_copy_b_bl_blx): Likewise.
3998 (thumb2_copy_b_bl_blx): Likewise.
3999 (thumb_copy_b): Likewise.
4000 (install_bx_blx_reg): Likewise.
4001 (arm_copy_bx_blx_reg): Likewise.
4002 (thumb_copy_bx_blx_reg): Likewise.
4003 (cleanup_alu_imm): Likewise.
4004 (arm_copy_alu_imm): Likewise.
4005 (thumb2_copy_alu_imm): Likewise.
4006 (cleanup_alu_reg): Likewise.
4007 (install_alu_reg): Likewise.
4008 (arm_copy_alu_reg): Likewise.
4009 (thumb_copy_alu_reg): Likewise.
4010 (cleanup_alu_shifted_reg): Likewise.
4011 (install_alu_shifted_reg): Likewise.
4012 (arm_copy_alu_shifted_reg): Likewise.
4013 (cleanup_load): Likewise.
4014 (cleanup_store): Likewise.
4015 (arm_copy_extra_ld_st): Likewise.
4016 (install_load_store): Likewise.
4017 (thumb2_copy_load_literal): Likewise.
4018 (thumb2_copy_load_reg_imm): Likewise.
4019 (arm_copy_ldr_str_ldrb_strb): Likewise.
4020 (cleanup_block_load_all): Likewise.
4021 (cleanup_block_store_pc): Likewise.
4022 (cleanup_block_load_pc): Likewise.
4023 (arm_copy_block_xfer): Likewise.
4024 (thumb2_copy_block_xfer): Likewise.
4025 (cleanup_svc): Likewise.
4026 (install_svc): Likewise.
4027 (arm_copy_svc): Likewise.
4028 (thumb_copy_svc): Likewise.
4029 (arm_copy_undef): Likewise.
4030 (thumb_32bit_copy_undef): Likewise.
4031 (arm_copy_unpred): Likewise.
4032 (arm_decode_misc_memhint_neon): Likewise.
4033 (arm_decode_unconditional): Likewise.
4034 (arm_decode_miscellaneous): Likewise.
4035 (arm_decode_dp_misc): Likewise.
4036 (arm_decode_ld_st_word_ubyte): Likewise.
4037 (arm_decode_media): Likewise.
4038 (arm_decode_b_bl_ldmstm): Likewise.
4039 (arm_decode_ext_reg_ld_st): Likewise.
4040 (thumb2_decode_dp_shift_reg): Likewise.
4041 (thumb2_decode_ext_reg_ld_st): Likewise.
4042 (arm_decode_svc_copro): Likewise.
4043 (thumb2_decode_svc_copro): Likewise.
4044 (install_pc_relative): Likewise.
4045 (thumb_copy_pc_relative_16bit): Likewise.
4046 (thumb_decode_pc_relative_16bit): Likewise.
4047 (thumb_copy_pc_relative_32bit): Likewise.
4048 (thumb_copy_16bit_ldr_literal): Likewise.
4049 (thumb_copy_cbnz_cbz): Likewise.
4050 (thumb2_copy_table_branch): Likewise.
4051 (cleanup_pop_pc_16bit_all): Likewise.
4052 (thumb_copy_pop_pc_16bit): Likewise.
4053 (thumb_process_displaced_16bit_insn): Likewise.
4054 (decode_thumb_32bit_ld_mem_hints): Likewise.
4055 (thumb_process_displaced_32bit_insn): Likewise.
4056 (thumb_process_displaced_insn): Likewise.
4057 (arm_process_displaced_insn): Likewise.
4058 (arm_displaced_init_closure): Likewise.
4059 (arm_displaced_step_fixup): Add cast for closure.
4060 * arm-tdep.h: Include infrun.h.
4061 (displaced_step_closure): Rename to ...
4062 (arm_displaced_step_closure): ... this, extend
4063 displaced_step_closure.
4064 <u::svc::copy_svc_os>: Change type of parameter DSC.
4065 <cleanup>: Likewise.
4066 (arm_process_displaced_insn): Likewise.
4067 (arm_displaced_init_closure): Likewise.
4068 (displaced_read_reg): Likewise.
4069 (displaced_write_reg): Likewise.
4070 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4071 Adjust.
4072 * i386-tdep.h: Include infrun.h.
4073 (i386_displaced_step_closure): New typedef.
4074 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4075 i386_displaced_step_closure.
4076 (i386_displaced_step_fixup): Adjust.
4077 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4078 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4079 and unique_ptr.
4080 (ppc_displaced_step_fixup): Adjust.
4081 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4082 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4083 and unique_ptr.
4084 (s390_displaced_step_fixup): Adjust.
4085
b392b304
SM
40862017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4087
4088 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4089 Remove declarations.
4090
d5833c62
TT
40912017-10-20 Tom Tromey <tom@tromey.com>
4092
4093 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4094 std::vector.
4095 (gdb_bfd_record_inclusion): Update.
4096 (bfdp): Remove typedef.
4097
06d5bbc8
TT
40982017-10-20 Tom Tromey <tom@tromey.com>
4099
4100 * gdb_bfd.c (gdb_bfd_ref): Use new.
4101 (struct gdb_bfd_data): Add constructor, destructor, and member
4102 initializers.
4103 (gdb_bfd_unref): Use delete.
4104
2712ce2e
TT
41052017-10-20 Tom Tromey <tom@tromey.com>
4106
4107 * exec.c (exec_file_attach): Use new_bfd_ref.
4108 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4109 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4110 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4111 new_bfd_ref.
4112 * gdb_bfd.h (new_bfd_ref): New function.
4113
fcc8fb2f
PA
41142017-10-20 Pedro Alves <palves@redhat.com>
4115
4116 * main.c (captured_command_loop): Add attribute noinline.
4117
4c2287b0
SM
41182017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4119
4120 * interps.c (struct interp_factory): Add constructor.
4121 (interp_factory_p): Remove typedef.
4122 (DEF_VEC_P(interp_factory_p)): Remove.
4123 (interpreter_factories): Change type to std::vector.
4124 (interp_factory_register): Adjust.
4125 (interp_lookup): Adjust.
4126 (interpreter_completer): Adjust.
4127
3d415c26
TT
41282017-10-19 Tom Tromey <tom@tromey.com>
4129
4130 * break-catch-syscall.c (catch_syscall_completer): Use
4131 std::string, gdb::unique_xmalloc_ptr.
4132
395423c4
TT
41332017-10-19 Tom Tromey <tom@tromey.com>
4134
4135 * infcall.c (call_function_by_hand_dummy): Use std::string.
4136
54f70bc1
TT
41372017-10-19 Tom Tromey <tom@tromey.com>
4138
4139 * mi/mi-main.c (mi_cmd_execute): Update.
4140 * top.h (prepare_execute_command): Return scoped_value_mark.
4141 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4142 Add move constructor.
4143 * top.c (prepare_execute_command): Return scoped_value_mark.
4144 (execute_command): Update.
4145
63929e84
PA
41462017-10-19 Pedro Alves <palves@redhat.com>
4147
4148 * xml-support.c (xml_fetch_content_from_file): Check fread's
4149 return.
4150
a75868f5
PA
41512017-10-19 Pedro Alves <palves@redhat.com>
4152
4153 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4154 async.
4155 (handle_error_fd): New function.
4156 (ser_base_async): Add/delete an event loop file handler for
4157 error_fd.
4158
2edf834e
PA
41592017-10-19 Pedro Alves <palves@redhat.com>
4160
4161 * xml-support.c (xml_fetch_content_from_file): Don't read in
4162 chunks. Instead use fseek to determine the file's size, and read
4163 it in one go.
4164
c8ba13ad
KS
41652017-11-18 Keith Seitz <keiths@redhat.com>
4166
4167 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4168 types.
4169 Add whitespace to front of type name.
4170
37534686
KS
41712017-10-18 Keith Seitz <keiths@redhat.com>
4172
4173 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4174 DW_AT_accessibility.
4175
28c7c158
YQ
41762017-10-18 Yao Qi <yao.qi@linaro.org>
4177
4178 * features/tic6x-c62x-linux.c: Remove.
4179
30f0b101
TT
41802017-10-17 Tom Tromey <tom@tromey.com>
4181
4182 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4183 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4184 (do_mixed_source_and_assembly): Likewise.
4185
57e12da9
TT
41862017-10-17 Tom Tromey <tom@tromey.com>
4187
4188 * regcache.c (regcache::xfer_part): Remove assertion.
4189
7b700999
PA
41902017-10-17 Pedro Alves <palves@redhat.com>
4191
4192 * xml-support.c (xml_fetch_content_from_file): Call
4193 unique_ptr::release() instead unique_ptr::get() when passing
4194 through xrealloc.
4195
d3037ba6
YQ
41962017-10-17 Yao Qi <yao.qi@linaro.org>
4197
4198 * regcache.c (regcache::xfer_part): Remove parameters read and
4199 write, add parameter is_raw. All callers are updated.
4200
83d5a34d
KS
42012017-10-16 Keith Seitz <keiths@redhat.com>
4202
4203 * c-typeprint.c (enum access_specifier): Moved here from
4204 c_type_print_base.
4205 (output_access_specifier): New function.
4206 (c_type_print_base): Consider typedefs when assessing
4207 whether access labels are needed.
4208 Use output_access_specifier as needed.
4209 Output access specifier for typedefs, if needed.
4210 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4211 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4212 fields.
4213 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4214 accessor macros.
4215
87028b87
TT
42162017-10-16 Tom Tromey <tom@tromey.com>
4217
4218 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4219 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4220 * target.c (target_fileio_read_stralloc): Update.
4221 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4222 * target.h (target_fileio_read_stralloc): Return
4223 unique_xmalloc_ptr.
4224
b7b030ad
TT
42252017-10-16 Tom Tromey <tom@tromey.com>
4226
4227 * xml-syscall.c (xml_init_syscalls_info): Update.
4228 * xml-support.c (xinclude_start_include): Update.
4229 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4230 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4231 (xml_fetch_content_from_file): Likewise.
4232 * osdata.c (get_osdata): Update.
4233 * target.h (target_read_stralloc, target_get_osdata): Return
4234 unique_xmalloc_ptr.
4235 * solib-aix.c (solib_aix_get_library_list): Update.
4236 * solib-target.c (solib_target_current_sos): Update.
4237 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4238 * xml-tdesc.c (fetch_available_features_from_target): Update.
4239 (target_fetch_description_xml): Update.
4240 (file_read_description_xml): Update.
4241 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4242 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4243 (remote_pid_to_exec_file): Update.
4244 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4245 (target_get_osdata): Likewise.
4246
b80406ac
TT
42472017-10-16 Tom Tromey <tom@tromey.com>
4248
4249 * remote.c (remote_register_number_and_offset): Use std::vector.
4250 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4251 (putpkt_binary): Use gdb::def_vector.
4252 (compare_sections_command): Use gdb::byte_vector.
4253
a90ecff8
TT
42542017-10-16 Tom Tromey <tom@tromey.com>
4255
4256 * ppc-linux-nat.c (hwdebug_insert_point): Use
4257 gdb::unique_xmalloc_ptr, XDUP.
4258
2dc0e219
TT
42592017-10-16 Tom Tromey <tom@tromey.com>
4260
4261 * probe.c (parse_probes): Use std::string.
4262 (info_probes_for_ops, enable_probes_command)
4263 (disable_probes_command): Remove cleanups.
4264
b05628f0
TT
42652017-10-16 Tom Tromey <tom@tromey.com>
4266
4267 * buildsym.c (block_compar): Remove.
4268 (end_symtab_get_static_block): Use std::vector.
4269
a79b1bc6
SM
42702017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4271
4272 * memrange.h (struct mem_range): Define operator< and operator==.
4273 (mem_range_s): Remove.
4274 (DEF_VEC_O (mem_range_s)): Remove.
4275 (normalize_mem_ranges): Change parameter type to std::vector.
4276 * memrange.c (compare_mem_ranges): Remove.
4277 (normalize_mem_ranges): Change parameter type to std::vector,
4278 adjust to vector change.
4279 * exec.c (section_table_available_memory): Return vector, remove
4280 parameter.
4281 (section_table_read_available_memory): Adjust to std::vector
4282 change.
4283 * remote.c (remote_read_bytes): Adjust to std::vector
4284 change.
4285 * tracepoint.h (traceframe_available_memory): Change parameter
4286 type to std::vector.
4287 * tracepoint.c (traceframe_available_memory): Change parameter
4288 type to std::vector, adjust.
4289 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4290 std::vector change.
4291 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4292 unittests/memrange-selftests.c.
4293 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4294 * gdb/unittests/memrange-selftests.c: New file.
4295
63f0e930
PA
42962017-10-16 Pedro Alves <palves@redhat.com>
4297
4298 * elfread.c (probe_key_free): Rename range-for variable.
4299 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4300 (find_probe_by_pc, collect_probes): Rename range-for variable.
4301
c40c7bfc
YQ
43022017-10-16 Yao Qi <yao.qi@linaro.org>
4303
4304 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4305 * features/tic6x-c62x.c: Remove.
4306 * features/tic6x-c64x-linux.c: Remove.
4307 * features/tic6x-c64x.c: Remove.
4308 * features/tic6x-c64xp-linux.c: Remove.
4309 * features/tic6x-c64xp.c: Remove.
4310 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4311 initialize_tdesc_tic6x_*_linux functions.
4312 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4313 initialize_tdesc_tic6x_* functions.
4314
df27ae6a
YQ
43152017-10-16 Yao Qi <yao.qi@linaro.org>
4316
4317 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4318 tic6x-c62x.
4319 * regformats/tic6x-c62x.dat: Remove.
4320 * regformats/tic6x-c64x.dat: Remove.
4321 * regformats/tic6x-c64xp.dat: Remove.
4322
86766165
SM
43232017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4324
4325 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4326 (the !HAVE_LIBEXPAT version).
4327
824dfcc3
SM
43282017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4329
4330 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4331 const.
4332
2098b393
SM
43332017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4334
4335 * target.h: Include tracepoint.h.
4336 (enum trace_find_type): Move to tracepoint.h.
4337 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4338 * tracepoint.h: Don't include target.h
4339 (enum trace_find_type): Move from target.h.
4340 (parse_traceframe_info): Return a unique ptr.
4341 * tracepoint.c (current_traceframe_info): Change type to unique
4342 ptr.
4343 (free_traceframe_info): Remove.
4344 (clear_traceframe_info): Don't manually free
4345 current_traceframe_info.
4346 (free_result): Remove.
4347 (parse_traceframe_info): Return a unique ptr.
4348 (get_traceframe_info): Adjust to unique ptr.
4349 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4350 * remote.c (remote_traceframe_info): Return a unique ptr.
4351 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4352 ptr.
4353 * target-debug.h (target_debug_print_traceframe_info_up): New
4354 macro.
4355 * target-delegates.c: Regenerate.
4356
4cdd21a8
SM
43572017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4358
4359 * memrange.h (struct mem_range): Add constructors.
4360 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4361 std::vector<mem_range>.
4362 * tracepoint.c (free_traceframe_info): Don't manually free
4363 vector.
4364 (traceframe_info_start_memory): Adjust to vector change.
4365 (traceframe_available_memory): Likewise.
4366 * tracefile-tfile.c (build_traceframe_info): Likewise.
4367 * ctf.c (ctf_traceframe_info): Likewise.
4368
d0d292a2
SM
43692017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4370
4371 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4372 std::vector<int>.
4373 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4374 (traceframe_info_start_tvar): Adjust to vector change.
4375 (parse_traceframe_info): Allocate with new.
4376 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4377 vector change.
4378 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4379 change.
4380 tfile_traceframe_info): Allocate with new.
4381 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4382 change.
4383
8d3c73ef
SM
43842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4385
4386 * tracepoint.c (traceframe_info): Rename to...
4387 (current_traceframe_info): ...this.
4388 (clear_traceframe_info): Adjust.
4389 (get_traceframe_info): Adjust.
4390
b129dcac
SM
43912017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4392
4393 * nat/linux-osdata.c: Include algorithm.
4394 (compare_processes): Remove.
4395 (struct pid_pgid_entry): New struct.
4396 (linux_xfer_osdata_processgroups): Use std::vector instead of
4397 XNEWVEC.
4398
af5bf4ad
SM
43992017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 * objfiles.h: Don't include symfile.h.
4402 (struct partial_symbol): Remove forward-declaration.
4403 (struct objfile) <global_psymbols, static_psymbols>: Change type
4404 to std::vector<partial_symbol *>.
4405 * objfiles.c (objfile::objfile): Don't memset those fields.
4406 (objfile::~objfile): Don't free those fields.
4407 * psympriv.h (struct psymbol_allocation_list): Remove
4408 forward-declaration.
4409 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4410 to std::vector.
4411 (start_psymtab_common): Change parameters to std::vector.
4412 * psymtab.c: Include algorithm.
4413 (require_partial_symbols): Call shrink_to_fit.
4414 (find_pc_sect_psymbol): Adjust to vector change.
4415 (match_partial_symbol): Likewise.
4416 (lookup_partial_symbol): Likewise.
4417 (psym_relocate): Likewise.
4418 (dump_psymtab): Likewise.
4419 (recursively_search_psymtabs): Likewise.
4420 (compare_psymbols): Remove.
4421 (sort_pst_symbols): Adjust to vector change.
4422 (start_psymtab_common): Likewise.
4423 (end_psymtab_common): Likewise.
4424 (psymbol_bcache_full): De-constify return value.
4425 (add_psymbol_to_bcache): Likewise.
4426 (extend_psymbol_list): Remove.
4427 (append_psymbol_to_list): Adjust to vector change.
4428 (add_psymbol_to_list): Likewise.
4429 (init_psymbol_list): Likewise.
4430 (maintenance_info_psymtabs): Likewise.
4431 (maintenance_check_psymtabs): Likewise.
4432 * symfile.h (struct psymbol_allocation_list): Remove.
4433 * symfile.c (reread_symbols): Adjust to vector change.
4434 * dbxread.c (start_psymtab): Change type of parameters.
4435 (dbx_symfile_read): Adjust to vector change.
4436 (read_dbx_symtab): Likewise.
4437 (start_psymtab): Change type of parameters.
4438 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4439 (create_partial_symtab): Likewise.
4440 (add_partial_symbol): Likewise.
4441 (write_one_signatured_type): Likewise.
4442 (recursively_write_psymbols): Likewise.
4443 * mdebugread.c (parse_partial_symbols): Likewise.
4444 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4445 (scan_xcoff_symtab): Adjust to vector change.
4446 (xcoff_initial_scan): Likewise.
4447
3ec5942f
SM
44482017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4449
4450 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4451
2399fe6a
YQ
44522017-10-13 Yao Qi <yao.qi@linaro.org>
4453
4454 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4455 Remove s390x-*-expedite, add s390x-expedite.
4456
4bf3f4a8
YQ
44572017-10-13 Yao Qi <yao.qi@linaro.org>
4458
4459 * features/s390-gs-linux64.c: Regenerated.
4460 * features/s390x-gs-linux64.c: Regenerated.
4461
9e86da07
TT
44622017-10-13 Tom Tromey <tom@tromey.com>
4463
4464 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4465 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4466 delete.
4467 * symfile.c (symbol_file_add_with_addrs): Use new.
4468 (symbol_file_add_separate): Update comment.
4469 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4470 * jit.c (jit_object_close_impl): Use new.
4471 (jit_unregister_code): Use delete.
4472 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4473 (~objfile): Rename from free_objfile.
4474 (free_objfile_separate_debug, do_free_objfile_cleanup)
4475 (free_all_objfiles, objfile_purge_solibs): Use delete.
4476 * objfiles.h (struct objfile): Add constructor and destructor.
4477 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4478 (allocate_objfile, free_objfile): Don't declare.
4479 (struct objstats): Add initializers.
4480
c2508e90
SM
44812017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4482
4483 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4484 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4485 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4486 * gdbarch.h: Regenerate.
4487 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4488 Adjust comment.
4489 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4490 (i386_displaced_step_fixup): Adjust comment.
4491 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4492
a900ff72
TT
44932017-10-12 Tom Tromey <tom@tromey.com>
4494
4495 * prologue-value.h (pv_area::store_would_trash): Return bool.
4496 (pv_area::find_reg): Likewise.
4497 * prologue-value.c (pv_area::store_would_trash): Return bool.
4498 (pv_area::find_reg): Likewise.
4499
f7b7ed97
TT
45002017-10-12 Tom Tromey <tom@tromey.com>
4501
4502 * s390-linux-tdep.c (s390_store, s390_load)
4503 (s390_check_for_saved, s390_analyze_prologue): Update.
4504 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4505 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4506 * prologue-value.h (class pv_area): Move from prologue-value.c.
4507 Change names of members. Add constructor, destructor, member
4508 functions.
4509 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4510 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4511 (pv_area_fetch, pv_area_scan): Don't declare.
4512 * prologue-value.c (struct pv_area::area_entry): Now member of
4513 pv_area.
4514 (struct pv_area): Move to prologue-value.h.
4515 (pv_area::pv_area): Rename from make_pv_area.
4516 (pv_area::~pv_area): Rename from free_pv_area.
4517 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4518 (clear_entries, find_entry, overlaps, store_would_trash, store)
4519 (fetch, find_reg, scan): Now member of pv_area.
4520 Remove "area" argument. Update.
4521 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4522 Update.
4523 * mn10300-tdep.c (push_reg, check_for_saved)
4524 (mn10300_analyze_prologue): Update.
4525 * mep-tdep.c (is_arg_spill, check_for_saved)
4526 (mep_analyze_prologue): Update.
4527 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4528 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4529 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4530 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4531 Update.
4532 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4533 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4534
466eecee
SM
45352017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4536
4537 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4538 * linux-nat.c (linux_nat_delete_thread): New variable.
4539 (lwp_free): Invoke linux_nat_delete_thread if set.
4540 (linux_nat_set_delete_thread): New function.
4541 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4542 thread delete callback.
4543 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4544 (_initialize_arm_linux_nat): Assign thread delete callback.
4545 * s390-linux-nat.c (s390_delete_thread): New function.
4546 (_initialize_s390_nat): Assign thread delete callback.
4547 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4548 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4549 function.
4550 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4551 declaration.
4552 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4553 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4554
f71c8822
TT
45552017-10-09 Tom Tromey <tom@tromey.com>
4556
4557 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4558 std::string.
4559 * tui/tui-layout.c (enum tui_status): Use std::string.
4560
981a3fb3
TT
45612017-10-11 Tom Tromey <tom@tromey.com>
4562
4563 * gdbthread.h (thread_command): Constify.
4564 * inferior.h (detach_command): Constify.
4565 * top.h (set_history, show_history): Constify.
4566 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4567 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4568 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4569 * printcmd.c (set_command): Constify.
4570 (non_const_set_command): New function.
4571 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4572 * breakpoint.c (enable_command, disable_command, delete_command)
4573 (catch_command, tcatch_command, set_breakpoint_cmd)
4574 (show_breakpoint_cmd): Constify.
4575 * macrocmd.c (macro_command): Constify.
4576 * infcmd.c (unset_command, kill_command, detach_command)
4577 (info_proc_cmd): Constify.
4578 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4579 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4580 (info_auto_load_cmd): Constify.
4581 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4582 (unset_tdesc_cmd): Constify.
4583 * ada-lang.c (set_ada_command, show_ada_command)
4584 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4585 * guile/guile.c (set_guile_command, show_guile_command)
4586 (info_guile_command): Constify.
4587 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4588 Constify.
4589 * skip.c (skip_command): Constify.
4590 * compile/compile.c (_initialize_compile): Constify.
4591 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4592 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4593 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4594 (maint_btrace_pt_show_cmd): Constify.
4595 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4596 Constify.
4597 * python/python.c (user_show_python, user_set_python): Constify.
4598 * mips-tdep.c (set_mips_command, show_mips_command)
4599 (set_mipsfpu_command): Constify.
4600 * record-btrace.c (cmd_record_btrace_start)
4601 (cmd_set_record_btrace, cmd_show_record_btrace)
4602 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4603 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4604 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4605 Constify.
4606 * symfile.c (overlay_command): Constify.
4607 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4608 * cli/cli-logging.c (set_logging_command, show_logging_command):
4609 Constify.
4610 * cli/cli-dump.c (dump_command, append_command)
4611 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4612 (tekhex_dump_command, binary_dump_command)
4613 (binary_append_command): Constify.
4614 * cli/cli-decode.c (struct cmd_list_element): Change type of
4615 "fun".
4616 * cli/cli-cmds.c (info_command, show_command, set_debug)
4617 (show_debug): Constify.
4618 (show_command): Add non-const overload.
4619 * top.c (set_history, show_history): Constify.
4620 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4621 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4622 * target.c (target_command): Constify.
4623 * sparc64-tdep.c (info_adi_command): Constify.
4624 * record-full.c (cmd_record_full_start): Constify.
4625 (set_record_full_command): Constify. Fix typo.
4626 (show_record_full_command): Constify.
4627 * thread.c (thread_command, thread_apply_command): Constify.
4628 * memattr.c (dummy_cmd): Constify.
4629 * value.c (function_command): Constify.
4630 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4631 * probe.c (info_probes_command): Constify.
4632 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4633 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4634 (show_thread_cmd, set_thread_default_cmd)
4635 (show_thread_default_cmd): Constify.
4636 (check_empty): Constify.
4637 * tracepoint.c (tfind_command): Constify.
4638 * cp-support.c (maint_cplus_command): Constify.
4639 * windows-tdep.c (info_w32_command): Constify.
4640 * record.c (cmd_record_start, set_record_command)
4641 (show_record_command, info_record_command, cmd_record_goto):
4642 Constify.
4643 * ravenscar-thread.c (set_ravenscar_command)
4644 (show_ravenscar_command): Constify.
4645 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4646 Constify.
4647 (add_internal_problem_command): Remove casts.
4648 * arc-tdep.c (maintenance_print_arc_command): Constify.
4649 * valprint.c (set_print, show_print, set_print_raw)
4650 (show_print_raw): Constify.
4651 * maint.c (maintenance_command, maintenance_info_command)
4652 (maintenance_print_command, maintenance_set_cmd)
4653 (maintenance_show_cmd, set_per_command_cmd)
4654 (show_per_command_cmd, maintenance_check_command): Constify.
4655 * language.c (set_check, show_check): Constify.
4656 * typeprint.c (show_print_type, set_print_type): Constify.
4657 * go32-nat.c (go32_info_dos_command): Constify.
4658
fdf44873
TT
46592017-10-11 Tom Tromey <tom@tromey.com>
4660
4661 * breakpoint.c (prepare_re_set_context): Remove.
4662 (breakpoint_re_set_one): Update. Don't use cleanups.
4663 (breakpoint_re_set): Use scoped_restore, std::string, and
4664 scoped_restore_current_language.
4665
81b1e71c
TT
46662017-10-11 Tom Tromey <tom@tromey.com>
4667
4668 * breakpoint.c (commands_command_1): Use std::string.
4669 (cleanup_executing_breakpoints): Remove.
4670 (bpstat_do_actions_1): Use scoped_restore.
4671 (bpstat_check_watchpoint): Use std::string.
4672 (decode_static_tracepoint_spec): Likewise.
4673 (break_range_command): Likewise.
4674 (watch_command_1): Likewise.
4675 (compare_breakpoints): Change argument types.
4676 (clear_command): Use std::vector.
4677 (cleanup_executing_breakpoints): Remove.
4678 (update_global_location_list): Use unique_xmalloc_ptr.
4679 (strace_command): Remove unused declaration.
4680
4f9d9906
JB
46812017-10-11 John Baldwin <jhb@FreeBSD.org>
4682
4683 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4684 * NEWS: Mention new FreeBSD/arm native configuration.
4685 * configure.host: Add arm*-*-freebsd*.
4686 * configure.nat: Likewise.
4687 * arm-fbsd-nat.c: New file.
4688
7176dfd2
JB
46892017-10-11 John Baldwin <jhb@FreeBSD.org>
4690
4691 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4692 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4693 * NEWS: Mention new FreeBSD/arm target.
4694 * configure.tgt: Add arm*-*-freebsd*.
4695 * arm-fbsd-tdep.c: New file.
4696 * arm-fbsd-tdep.h: New file.
4697
fe220226
MR
46982017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4699
4700 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4701 `gdbarch_elfcore_write_linux_prpsinfo'.
4702 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4703 method.
4704 (elf_internal_linux_prpsinfo): Remove declaration.
4705 * gdbarch.h: Regenerate.
4706 * gdbarch.c: Regenerate.
4707
a2f63b2e
MR
47082017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4709
4710 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4711 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4712
458ca1d0
PA
47132017-10-11 Pedro Alves <palves@redhat.com>
4714
4715 * breakpoint.c (reattach_breakpoints): Delete.
4716 * breakpoint.h (reattach_breakpoints): Delete.
4717
905014d7
SM
47182017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4719
4720 * symfile.c (registered_sym_fns): Make struct, not typedef.
4721 (DEF_VEC_O (registered_sym_fns)): Remove.
4722 (symtab_fns): Change type to std::vector.
4723 (add_symtab_fns): Adjust.
4724 (find_sym_fns): Adjust.
4725
56d704da
AK
47262017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4727
4728 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4729 * arc-tdep.h (arc_arch_is_em): New function.
4730 (arc_arch_is_hs): Likewise.
4731
7fa29be9
EB
47322017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4733
4734 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4735 parentheses in the declaration.
4736 (macro_lookup_inclusion): Likewise.
4737 (macro_lookup_definition): Likewise.
4738 * p-lang.h (pascal_builtin_types): Likewise.
4739 * tui/tui-data.c (tui_win_list): Likewise.
4740 * tui/tui-data.h (tui_win_list): Likewise.
4741 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4742
d9b477e3
KB
47432017-10-11 Mark Rages <markrages@gmail.com>
4744
4745 * target-memory.c (block_boundaries): Fix for block address not
4746 aligned on block size.
4747
65630365
PA
47482017-10-10 Pedro Alves <palves@redhat.com>
4749 Tom Tromey <tom@tromey.com>
4750
4751 * breakpoint.c (struct captured_breakpoint_query_args)
4752 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4753 (print_breakpoint): New.
4754 * breakpoint.h (print_breakpoint): Declare.
4755 * common/common-exceptions.h (enum return_reason): Remove
4756 references to catch_exceptions.
4757 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4758 Delete.
4759 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4760 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4761 * gdb.h: Delete.
4762 * gdbthread.h (thread_select): Declare.
4763 * mi/mi-cmd-break.c: Don't include gdb.h.
4764 (breakpoint_notify): Use print_breakpoint.
4765 * mi/mi-cmd-catch.c: Don't include gdb.h.
4766 * mi/mi-interp.c: Don't include gdb.h.
4767 (mi_print_breakpoint_for_event): New.
4768 (mi_breakpoint_created, mi_breakpoint_modified): Use
4769 mi_print_breakpoint_for_event.
4770 * mi/mi-main.c: Don't include gdb.h.
4771 (mi_cmd_thread_select): Parse the global thread ID here. Use
4772 thread_select instead of gdb_thread_select.
4773 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4774 of using gdb_list_thread_ids.
4775 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4776 FILEIO_ENOSYS here.
4777 (remote_fileio_request): Use TRY/CATCH instead of
4778 catch_exceptions.
4779 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4780 (symbol_file_add_from_memory_wrapper): Delete.
4781 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4782 * thread.c: Don't include gdb.h.
4783 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4784 (thread_alive): Use thread_select.
4785 (do_captured_thread_select): Delete, parts salvaged as ...
4786 (thread_select): ... this new function.
4787 (gdb_thread_select): Delete.
4788
bf469271
PA
47892017-10-10 Pedro Alves <palves@redhat.com>
4790 Tom Tromey <tom@tromey.com>
4791
4792 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4793 and reverse logic.
4794 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4795 No longer macros. Instead ...
4796 (enum wp_check_result): They're now values of this new
4797 enumeration.
4798 (watchpoint_check): Change return type to wp_check_result and
4799 parameter type to bpstat.
4800 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4801 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4802 catch_errors. Reverse logic of watchpoint_check call.
4803 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4804 pointer as parameter.
4805 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4806 * common/common-exceptions.c (throw_exception_sjlj): Update
4807 comments to avoid mentioning catch_errors.
4808 * exceptions.c (catch_errors): Delete.
4809 * exceptions.h: Update comments to avoid mentioning catch_errors.
4810 (catch_errors_ftype, catch_errors): Delete.
4811 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4812 (hook_stop_stub): Delete.
4813 (restore_selected_frame): Change return type to void, and
4814 parameter type to const frame_id &.
4815 (restore_infcall_control_state): Use TRY/CATCH instead of
4816 catch_errors.
4817 * main.c (captured_command_loop): Return void and remove
4818 parameter. Remove references to catch_errors.
4819 (captured_main): Use TRY/CATCH instead of catch_errors.
4820 * objc-lang.c (objc_submethod_helper_data)
4821 (find_objc_msgcall_submethod_helper): Delete.
4822 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4823 catch_errors.
4824 * record-full.c (record_full_message): Return void.
4825 (record_full_message_args, record_full_message_wrapper): Delete.
4826 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4827 instead of catch_errors.
4828 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4829 parameter type to int.
4830 * solib-darwin.c (open_symbol_file_object): Ditto.
4831 * solib-dsbt.c (open_symbol_file_object): Ditto.
4832 * solib-frv.c (open_symbol_file_object): Ditto.
4833 * solib-svr4.c (open_symbol_file_object): Ditto.
4834 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4835 * solib.c (update_solib_list): Use TRY/CATCH instead of
4836 catch_errors.
4837 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4838 Change type.
4839 * symmisc.c (struct print_symbol_args): Remove.
4840 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4841 (print_symbol): Change type.
4842 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4843 and remove parameters.
4844 (catch_errors): New.
4845 (get_windows_debug_event): Adjust.
4846
1a56bfa5
TT
48472017-10-09 Tom Tromey <tom@tromey.com>
4848
4849 * mi/mi-main.c (free_splay_tree): Remove.
4850 (list_available_thread_groups): Use splay_tree_up.
4851 * common/gdb_splay_tree.h: New file.
4852
0c478e2d
TT
48532017-10-09 Tom Tromey <tom@tromey.com>
4854
4855 * mi/mi-main.c (do_nothing): Remove.
4856 (list_available_thread_groups): Update.
4857
cbd2b4e3
PA
48582017-10-09 Pedro Alves <palves@redhat.com>
4859
4860 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4861 reading registers when switching context.
4862
a181c0bf
JB
48632017-10-09 John Baldwin <jhb@FreeBSD.org>
4864
4865 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4866 (fbsd_convert_siginfo): Likewise.
4867 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4868
6e66f753
SM
48692017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4870
4871 * configure.ac (try_guile_versions): Remove guile-2.2.
4872 * configure: Regenerate.
4873
890e9790
TT
48742017-10-09 Tom Tromey <tom@tromey.com>
4875
4876 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4877 (COMPILE.pre): Use $(CXX).
4878
109483d9
PA
48792017-10-09 Pedro Alves <palves@redhat.com>
4880
4881 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4882 Use bool.
4883 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4884 * cp-support.h (cp_remove_params): Now returns a
4885 gdb::unique_xmalloc_ptr.
4886 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4887 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4888 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4889 returning a gdb::unique_xmalloc_ptr.
4890 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4891 * stack.c (find_frame_funname): Adjust to cp_remove_params
4892 returning a gdb::unique_xmalloc_ptr.
4893
791afaa2
TT
48942017-10-08 Tom Tromey <tom@tromey.com>
4895
4896 * dwarf2read.c (dwarf2_get_dwz_file): Use
4897 gdb::unique_xmalloc_ptr.
4898 (find_slot_in_mapped_hash): Likewise.
4899 (dwarf2_physname): Likewise.
4900 (create_dwo_unit_in_dwp_v1): Use std::string.
4901 (create_dwo_unit_in_dwp_v2): Likewise.
4902 (lookup_dwo_cutu): Likewise.
4903 (inherit_abstract_dies): Use std::vector.
4904 (read_array_type): Likewise.
4905 (dwarf_decode_macros): Remove unused declaration.
4906 (unsigned_int_compar): Remove.
4907 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4908 (psymtabs_addrmap_cleanup): Remove.
4909
30a9c02f
TT
49102017-10-08 Tom Tromey <tom@tromey.com>
4911
4912 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4913 * frame.h (frame_cleanup_after_sniffer): Declare.
4914 (frame_prepare_for_sniffer): Return void.
4915 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4916 type of argument.
4917 (frame_prepare_for_sniffer): Return void.
4918
757325a3
TT
49192017-10-08 Tom Tromey <tom@tromey.com>
4920
4921 * utils.h (make_cleanup_value_free): Remove.
4922 * utils.c (do_value_free, struct cleanup): Remove.
4923 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4924 Use gdb_value_up.
4925 * value.h (struct value_deleter): New.
4926 (gdb_value_up): New typedef.
4927
b9c04fb2
TT
49282017-10-08 Tom Tromey <tom@tromey.com>
4929
4930 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4931 (make_cleanup_free_search_symbols): Remove.
4932 (search_symbols): Return std::vector.
4933 (symbol_search::compare_search_syms): Now member of
4934 symbol_search. Change arguments.
4935 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4936 (symtab_symbol_info, rbreak_command): Update.
4937 * symtab.h (struct symbol_search) <next>: Remove.
4938 Add constructors.
4939 (symbol_search::operator<): New function.
4940 (symbol_search::operator==): New function.
4941 (search_symbols): Remove std::vector.
4942 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4943 (symbol_search::compare_search_syms): Declare.
4944
0d28b0a5
YQ
49452017-10-06 Yao Qi <yao.qi@linaro.org>
4946
4947 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4948 arch/aarch64-insn.o.
4949 Remove one rule.
4950 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4951
71917808
YQ
49522017-10-06 Yao Qi <yao.qi@linaro.org>
4953
4954 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4955 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4956 arch/arm-linux.o respectively.
4957 * configure.tgt: Likewise.
4958
2081b2b2
YQ
49592017-10-06 Yao Qi <yao.qi@linaro.org>
4960
4961 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4962 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4963
a1b85d28
PA
49642017-10-06 Pedro Alves <palves@redhat.com>
4965
4966 * windows-nat.c: Include <algorithm>.
4967
d97987e2
YQ
49682017-10-06 Yao Qi <yao.qi@linaro.org>
4969
4970 * configure.tgt (i386_tobjs): New variable.
4971 (amd64_tobjs): New variable.
4972 Set $cpu_obs and $os_obs.
4973
f38307f5
YQ
49742017-10-06 Yao Qi <yao.qi@linaro.org>
4975
4976 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4977 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4978 (clean): Remove object files and dependency files.
4979 (distclean): Remove the directory.
4980 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4981 * configure: Re-generated.
4982 * configure.tgt: Replace amd64.o with arch/amd64.o.
4983
2f924de6
JM
49842017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4985
4986 PR build/22188
4987 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4988 and SETEND.
4989
2fd9d7ca
PA
49902017-10-05 Pedro Alves <palves@redhat.com>
4991
4992 * linux-nat.c (linux_child_follow_fork): When following the parent
4993 and detaching the child, consult the parent thread's architecture
4994 instead of the child's.
4995
d13b8493
UW
49962017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4997
4998 * ax.h: Do not include "doublest.h".
4999 (union agent_val): Remove.
5000
3b4b2f16
UW
50012017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5002
5003 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5004 (decimal_to_string): Return std::string object.
5005 (decimal_from_string): Accept std::string object. Return bool.
5006 (decimal_from_integral, decimal_from_doublest): Remove.
5007 (decimal_from_longest): Add prototype.
5008 (decimal_from_ulongest): Likewise.
5009 (decimal_to_longest): Likewise.
5010 (decimal_from_doublest): Likewise.
5011 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5012 (MAX_DECIMAL_STRING): Move here.
5013 (decimal_to_string): Return std::string object.
5014 (decimal_from_string): Accept std::string object. Return bool.
5015 (decimal_from_integral): Remove, replace by ...
5016 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5017 (decimal_to_longest): New function.
5018 (decimal_from_floating): Remove, replace by ...
5019 (decimal_from_doublest): ... this new function.
5020 (decimal_to_doublest): Update to new decimal_to_string interface.
5021
5022 * value.c (unpack_long): Use decimal_to_longest.
5023 * valops.c (value_cast): Use decimal_from_doublest instead of
5024 decimal_from_floating. Use decimal_from_[u]longest isntead of
5025 decimal_from_integral.
5026 * valarith.c (value_args_as_decimal): Likewise.
5027 * valprint.c (print_decimal_floating): Update to new
5028 decimal_to_string interface.
5029 * printcmd.c (printf_decfloat): Likewise.
5030 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5031
1841ee5d
UW
50322017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5033
5034 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5035 * gdbtypes.c: Include "floatformat.h".
5036 * value.c: Likewise.
5037 * m68k-tdep.c: Likewise.
5038
5039 * findvar.c: Do not include "floatformat.h".
5040 * amd64-darwin-tdep.c: Likewise.
5041 * arm-linux-tdep.c: Likewise.
5042 * i386-darwin-tdep.c: Likewise.
5043 * i387-tdep.c: Likewise.
5044 * m68k-linux-tdep.c: Likewise.
5045 * mep-tdep.c: Likewise.
5046 * mips-tdep.c: Likewise.
5047 * nios2-tdep.c: Likewise.
5048 * s390-linux-tdep.c: Likewise.
5049 * sparc-obsd-tdep.c: Likewise.
5050 * sparc-tdep.c: Likewise.
5051 * sparc64-tdep.c: Likewise.
5052 * spu-tdep.c: Likewise.
5053 * tic6x-tdep.c: Likewise.
5054 * tilegx-tdep.c: Likewise.
5055 * vax-tdep.c: Likewise.
5056 * xstormy16-tdep.c: Likewise.
5057 * xtensa-tdep.c: Likewise.
5058
5059 * top.c: Do not include "doublest.h".
5060 * aarch64-tdep.c: Likewise.
5061 * alpha-tdep.c: Likewise.
5062 * arm-linux-tdep.c: Likewise.
5063 * m68k-linux-tdep.c: Likewise.
5064 * tilegx-tdep.c: Likewise.
5065 * xstormy16-tdep.c: Likewise.
5066
a80a6471
JB
50672017-10-05 John Baldwin <jhb@FreeBSD.org>
5068
5069 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5070 (mipsn32_fbsd_sigframe): Define.
5071 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5072 for FreeBSD/mipsn32.
5073
12c4bd7f
JB
50742017-10-05 John Baldwin <jhb@FreeBSD.org>
5075
5076 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5077 AT_HWCAP.
5078
c91933e9
TG
50792017-10-05 Tristan Gingold <tgingold@free.fr>
5080
5081 * MAINTAINERS (Misc): Update my email address.
5082
5cd63fda
PA
50832017-10-04 Pedro Alves <palves@redhat.com>
5084
5085 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5086 it instead of target_gdbarch.
5087 (get_remote_state, get_remote_packet_size): Adjust
5088 get_remote_arch_state calls, passing down target_gdbarch
5089 explicitly.
5090 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5091 'gdbarch' and use it instead of target_gdbarch.
5092 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5093 passing down target_gdbarch explicitly.
5094 (struct stop_reply) <arch>: New field.
5095 (remote_parse_stop_reply): Use the stopped thread's architecture,
5096 not the current inferior's. Save the architecture in the
5097 stop_reply.
5098 (process_stop_reply): Use the stop reply's architecture.
5099 (process_g_packet, remote_fetch_registers)
5100 (remote_prepare_to_store, store_registers_using_G)
5101 (remote_store_registers): Adjust get_remote_arch_state calls,
5102 using the regcache's architecture.
5103 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5104 passing down target_gdbarch explicitly.
5105 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5106 beneath instead of calling target_gdbarch.
5107 * target.c (default_thread_architecture): Use the specified
5108 inferior's architecture, instead of the current inferior's
5109 architecture (via target_gdbarch).
5110
ed4227b7
PA
51112017-10-04 Pedro Alves <palves@redhat.com>
5112
5113 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5114 case.
5115 (regcache_print): Handle !target_has_registers here instead.
5116
55b11ddf
PA
51172017-10-04 Pedro Alves <palves@redhat.com>
5118
5119 * frame.c (create_test_frame): Delete.
5120 * frame.h (create_test_frame): Delete.
5121 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5122 (class regcache_test): Delete.
5123 (test_target_has_registers, test_target_has_stack)
5124 (test_target_has_memory, test_target_prepare_to_store)
5125 (test_target_store_registers): New functions.
5126 (test_target_ops): New class.
5127 (register_to_value_test): Error out if there's already a
5128 process_stratum (or higher) target pushed. Create a fuller mock
5129 environment, with mock target_ops, inferior, address space, thread
5130 and inferior_ptid.
5131 * progspace.c (struct address_space): Move to ...
5132 * progspace.h (struct address_space): ... here.
5133 * regcache.h (regcache::~regcache, regcache::raw_write)
5134 [GDB_SELF_TEST]: No longer virtual.
5135
4c71c105
SM
51362017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5137
5138 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5139
73dcd72d
PA
51402017-10-04 Pedro Alves <palves@redhat.com>
5141
5142 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5143 out of 'between TRY and CATCH'.
5144
44704526
PA
51452017-10-04 Pedro Alves <palves@redhat.com>
5146
5147 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5148 * common/common-exceptions.h (TRY): Open an outermost scope.
5149 Expand intro comment.
5150 (CATCH): Reindent.
5151 (END_CATCH): Close the outermost scope.
5152 * completer.c (complete_line_internal): Add missing END_CATCH.
5153
bc3b087d
SDJ
51542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5155
5156 * NEWS (Changes since GDB 8.0): Add entry about new
5157 'set-cwd-on-gdbserver' feature.
5158 (New remote packets): Add entry for QSetWorkingDir.
5159 * common/common-inferior.h (set_inferior_cwd): New prototype.
5160 * infcmd.c (set_inferior_cwd): Remove "static".
5161 (show_cwd_command): Expand text to include remote debugging.
5162 * remote.c: Add PACKET_QSetWorkingDir.
5163 (remote_protocol_features) <QSetWorkingDir>: New entry for
5164 PACKET_QSetWorkingDir.
5165 (extended_remote_set_inferior_cwd): New function.
5166 (extended_remote_create_inferior): Call
5167 "extended_remote_set_inferior_cwd".
5168 (_initialize_remote): Call "add_packet_config_cmd" for
5169 QSetWorkingDir.
5170
d092c5a2
SDJ
51712017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5172
5173 * NEWS (New commands): Mention "set/show cwd".
5174 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5175 "cd" command's help text.
5176 * common/common-inferior.h (get_inferior_cwd): New prototype.
5177 * infcmd.c (inferior_cwd_scratch): New global variable.
5178 (set_inferior_cwd): New function.
5179 (get_inferior_cwd): Likewise.
5180 (set_cwd_command): Likewise.
5181 (show_cwd_command): Likewise.
5182 (_initialize_infcmd): Add "set/show cwd" commands.
5183 * inferior.h (class inferior) <cwd>: New field.
5184 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5185 (fork_inferior): Change inferior's cwd before its execution.
5186 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5187 to CreateProcess.
5188
7da0a886
SDJ
51892017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5190
5191 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5192 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5193 (COMMON_OBS): Add gdb_tilde_expand.o.
5194 * common/gdb_tilde_expand.c: New file.
5195 * common/gdb_tilde_expand.h: Likewise.
5196
db8dd160
MR
51972017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5198
5199 * gdbarch.sh (objfile): Remove duplicate declaration.
5200 * gdbarch.h: Regenerate.
5201
f8bfbf22
TT
52022017-10-03 Tom Tromey <tom@tromey.com>
5203
5204 * utils.c (internal_vproblem): Use string_vprintf.
5205
5178ed48
TT
52062017-10-03 Tom Tromey <tom@tromey.com>
5207
5208 * printcmd.c (info_symbol_command): Use std::string.
5209
8cff8730
TT
52102017-10-03 Tom Tromey <tom@tromey.com>
5211
5212 * top.c (gdb_safe_append_history): Use std::string.
5213
895b8f30
TT
52142017-10-03 Tom Tromey <tom@tromey.com>
5215
5216 * event-top.c (stdin_event_handler): Update.
5217 * main.c (captured_main_1): Update.
5218 * top.h (make_delete_ui_cleanup): Remove.
5219 (struct ui): Add constructor and destructor.
5220 (new_ui, delete_ui): Remove.
5221 * top.c (make_delete_ui_cleanup): Remove.
5222 (new_ui_command): Use std::unique_ptr.
5223 (delete_ui_cleanup): Remove.
5224 (ui::ui): Rename from new_ui. Update.
5225 (free_ui): Remove.
5226 (ui::~ui): Rename from delete_ui. Update.
5227
0efef640
TT
52282017-10-03 Tom Tromey <tom@tromey.com>
5229
5230 * symfile.c (load_progress): Use gdb::byte_vector.
5231
245ad7d3
TT
52322017-10-03 Tom Tromey <tom@tromey.com>
5233
5234 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5235 declaration.
5236 * printcmd.c (x_command): Remove unused declaration.
5237 * symfile.c (symbol_file_command): Remove unused declaration.
5238
e05550d7
TT
52392017-10-03 Tom Tromey <tom@tromey.com>
5240
5241 * utils.c (internal_vproblem): Use std::string.
5242 (defaulted_query): Likewise.
5243
b95de2b7
TT
52442017-10-03 Tom Tromey <tom@tromey.com>
5245
5246 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5247 * top.c (execute_command_to_string): Update.
5248 * utils.c (make_cleanup_restore_page_info): Remove.
5249 (do_restore_page_info_cleanup): Remove.
5250 (set_batch_flag_and_restore_page_info):
5251 New.
5252 (make_cleanup_restore_page_info): Remove.
5253 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5254 (~set_batch_flag_and_restore_page_info): New
5255 (make_cleanup_restore_uinteger): Remove.
5256 (make_cleanup_restore_integer): Remove.
5257 (struct restore_integer_closure): Remove.
5258 (restore_integer): Remove.
5259 * utils.h (struct set_batch_flag_and_restore_page_info): New
5260 class.
5261 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5262 (make_cleanup_restore_page_info): Remove.
5263 (make_cleanup_restore_uinteger) Remove.
5264 (make_cleanup_restore_integer) Remove.
5265
07036511
TT
52662017-10-03 Tom Tromey <tom@tromey.com>
5267
5268 * record-full.h (record_full_gdb_operation_disable_set): Return
5269 scoped_restore_tmpl<int>.
5270 * infrun.c (adjust_pc_after_break): Update.
5271 (handle_signal_stop): Update.
5272 * record-full.c (record_full_gdb_operation_disable_set): Return
5273 scoped_restore_tmpl<int>.
5274 (record_full_wait_1, record_full_insert_breakpoint)
5275 (record_full_remove_breakpoint, record_full_save)
5276 (record_full_goto_insn): Update.
5277
45320ffa
TT
52782017-10-02 Tom Tromey <tom@tromey.com>
5279
5280 PR rust/22236:
5281 * rust-lang.c (rust_val_print_str): New function.
5282 (val_print_struct): Call it.
5283 (rust_subscript): Preserve name of slice type.
5284
b3e3859b
TT
52852017-10-02 Tom Tromey <tom@tromey.com>
5286
5287 * rust-lang.c (rust_subscript): Handle slices in
5288 EVAL_AVOID_SIDE_EFFECTS case.
5289
01af5e0d
TT
52902017-10-02 Tom Tromey <tom@tromey.com>
5291
5292 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5293
888e3ddb
TT
52942017-10-02 Tom Tromey <tom@tromey.com>
5295
5296 * rust-lang.h (rust_slice_type): Add "extern".
5297
cc536b21
PA
52982017-10-02 Tom Tromey <tom@tromey.com>
5299 Pedro Alves <palves@redhat.com>
5300
5301 * ada-lang.h (ada_exc_info::operator<): Make const.
5302 (ada_exc_info::operator==): Make const.
5303 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5304 Make const.
5305
386c8614
TT
53062017-09-29 Tom Tromey <tom@tromey.com>
5307
5308 * target.c (read_whatever_is_readable): Change type of "result".
5309 Update.
5310 (free_memory_read_result_vector): Remove.
5311 (read_memory_robust): Change return type. Update.
5312 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5313 bin2hex, std::string.
5314 * target.h (memory_read_result_s): Remove typedef.
5315 (free_memory_read_result_vector): Remove.
5316 (read_memory_robust): Return std::vector.
5317
789c4b5e
TT
53182017-09-29 Tom Tromey <tom@tromey.com>
5319
5320 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5321
ab816a27
TT
53222017-09-29 Tom Tromey <tom@tromey.com>
5323
5324 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5325 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5326 operator< and operator==.
5327 (ada_exceptions_list): Return a std::vector.
5328 * ada-lang.c (ada_exc_info::operator<): Rename from
5329 compare_ada_exception_info.
5330 (ada_exc_info::operator==): New.
5331 (sort_remove_dups_ada_exceptions_list): Change type of
5332 "exceptions".
5333 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5334 (ada_add_global_exceptions): Likewise.
5335 (ada_exceptions_list_1): Return a std::vector.
5336 (ada_exceptions_list): Likewise.
5337
52f9abe4
TT
53382017-09-29 Tom Tromey <tom@tromey.com>
5339
5340 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5341 'std::set *'.
5342 (print_one_inferior): Update.
5343 (free_vector_of_ints): Remove.
5344 (list_available_thread_groups): Change "ids" to std::set.
5345 (mi_cmd_list_thread_groups): Update.
5346 (struct collect_cores_data) <core>: Now a std::set.
5347 (collect_cores): Update.
5348 (unique): Remove.
5349 (print_one_inferior): Update.
5350
dcd5ddcc
TT
53512017-09-29 Tom Tromey <tom@tromey.com>
5352
5353 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5354 (mi_execute_async_cli_command): Likewise.
5355 (mi_cmd_trace_frame_collected): Use field_fmt.
5356
45d288cc
TT
53572017-09-29 Tom Tromey <tom@tromey.com>
5358
5359 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5360 gdb::byte_vector.
5361
6afe2f4a
TT
53622017-09-29 Tom Tromey <tom@tromey.com>
5363
5364 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5365
9813429a
TT
53662017-09-29 Tom Tromey <tom@tromey.com>
5367
5368 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5369
2d6960b4
TT
53702017-09-29 Tom Tromey <tom@tromey.com>
5371
5372 * varobj.h (varobj_gen_name): Return std::string.
5373 * varobj.c (varobj_gen_name): Return std::string.
5374 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5375 (mi_cmd_var_delete): Don't copy "name".
5376
784c453a
TT
53772017-09-29 Tom Tromey <tom@tromey.com>
5378
5379 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5380 (mi_cmd_break_insert_1): Update.
5381
a9bc57b9
TT
53822017-09-29 Tom Tromey <tom@tromey.com>
5383
5384 * target.h (make_scoped_defer_target_commit_resume): Update.
5385 * target.c (make_scoped_defer_target_commit_resume): Rename from
5386 make_cleanup_defer_target_commit_resume. Return a
5387 scoped_restore.
5388 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5389
9754d8c4
TT
53902017-09-29 Tom Tromey <tom@tromey.com>
5391
5392 * main.c (captured_main_1): Remove unused declaration.
5393 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5394
99ef965c
TT
53952017-09-29 Tom Tromey <tom@tromey.com>
5396
5397 * symtab.c (search_symbols): Remove unused outer cleanup.
5398 (make_source_files_completion_list): Remove unused declaration.
5399
42518ba7
TT
54002017-09-29 Tom Tromey <tom@tromey.com>
5401
5402 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5403
726b2169
TT
54042017-09-29 Tom Tromey <tom@tromey.com>
5405
5406 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5407 gdb::byte_vector.
5408
55b06432
TT
54092017-09-29 Tom Tromey <tom@tromey.com>
5410
5411 * complaints.c (vcomplaint): Use std::string.
5412
8abcee91
TT
54132017-09-29 Tom Tromey <tom@tromey.com>
5414
5415 * tracepoint.c (trace_variable_command): Use std::string.
5416 (encode_actions_1): Remove unused declarations.
5417 (create_tsv_from_upload): Use std::string.
5418
6ad94bc7
TT
54192017-09-29 Tom Tromey <tom@tromey.com>
5420
5421 * cp-support.c (gdb_demangle): Use std::string.
5422
2003f3d8
TT
54232017-09-29 Tom Tromey <tom@tromey.com>
5424
5425 * stack.c (parse_frame_specification): Use std::string
5426 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5427
8f8accb5
TT
54282017-09-29 Tom Tromey <tom@tromey.com>
5429
5430 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5431
200aa7b1
TT
54322017-09-29 Tom Tromey <tom@tromey.com>
5433
5434 * utils.c (vfprintf_maybe_filtered): Use std::string.
5435 (vfprintf_unfiltered): Likewise.
5436
606aae8a
TT
54372017-09-29 Tom Tromey <tom@tromey.com>
5438
5439 * event-top.c (top_level_prompt): Return std::string.
5440 (display_gdb_prompt): Update.
5441
bd413795
TT
54422017-09-29 Tom Tromey <tom@tromey.com>
5443
5444 * unittests/common-utils-selftests.c (format): New function.
5445 (string_vprintf_tests): New function.
5446 (_initialize_common_utils_selftests): Register new tests.
5447 * common/common-utils.c (string_vprintf): New function.
5448 * common/common-utils.h (string_vprintf): Declare.
5449
256642e8
PA
54502017-09-29 Pedro Alves <palves@redhat.com>
5451
5452 * common/rsp-low.c (unpack_varlen_hex): Constify.
5453 * common/rsp-low.h (unpack_varlen_hex): Constify.
5454 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5455 Constify.
5456 * remote.c (remote_set_permissions, read_ptid)
5457 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5458 (remote_static_tracepoint_marker_at)
5459 (remote_static_tracepoint_markers_by_strid)
5460 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5461 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5462 (parse_tracepoint_definition, parse_tsv_definition)
5463 (parse_static_tracepoint_marker_definition): Constify.
5464 * tracepoint.h (parse_static_tracepoint_marker_definition)
5465 (parse_trace_status, parse_tracepoint_status)
5466 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5467
b6bb3468
PA
54682017-09-29 Pedro Alves <palves@redhat.com>
5469
5470 * remote.c (target_buf, target_buf_size): Delete.
5471 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5472 Use the connection's packet buffer instead.
5473 All callers adjusted.
5474 (_initialize_remote): Remove references to target_buf and
5475 target_buf_size.
5476
b2f8eb7a
PA
54772017-09-28 Pedro Alves <palves@redhat.com>
5478
5479 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5480 unittests/common-utils-selftests.c.
5481 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5482 (COMMON_OBS): Remove utils-selftests.o.
5483 * utils-selftests.c: Move to ...
5484 * unittests/common-utils-selftests.c: ... here and rename self
5485 test to "string_printf".
5486
08302ed2
DE
54872017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5488
5489 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5490 having NULL cus or tus.
5491
96a5a1d3
UW
54922017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5493
5494 * arm-tdep.c: (convert_from_extended): Remove.
5495 (convert_to_extended): Likewise.
5496 (arm_extract_return_value): Use convert_typed_floating.
5497 (arm_store_return_value): Likewise.
5498
5499 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5500 * sh-tdep.c: Do not include "floatformat.h".
5501 (sh_littlebyte_bigword_type): New function.
5502 (sh_register_convert_to_virtual): Use convert_typed_floating.
5503 (sh_register_convert_to_raw): Likewise.
5504 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5505 (sh64_littlebyte_bigword_type): New function.
5506 (sh64_extract_return_value): Use convert_typed_floating.
5507 (sh64_register_convert_to_virtual): Likewise.
5508 (sh64_register_convert_to_raw): Likewise.
5509
0db7851f
UW
55102017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5511
5512 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5513 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5514
5515 * gdbtypes.h (union type_specific): Make field floatformat hold
5516 just a single struct floatformat, not an array.
5517 (floatformat_from_type): Move here.
5518 * gdbtypes.c (floatformat_from_type): Move here. Update to
5519 changed TYPE_FLOATFORMAT definition.
5520 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5521 (recursive_dump_type): Likewise.
5522 (init_float_type): Install correct floatformat for byte order.
5523 (arch_float_type): Likewise.
5524
77b7c781
UW
55252017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5526
5527 * gdbtypes.c (init_type): Change incoming argument from
5528 length-in-bytes to length-in-bits. Assert length is a
5529 multiple of TARGET_CHAR_BITS.
5530 (arch_type, arch_flags_type): Likewise.
5531 (init_integer_type): Update call to init_type.
5532 (init_character_type): Likewise.
5533 (init_boolean_type): Likewise.
5534 (init_float_type): Likewise.
5535 (init_decfloat_type): Likewise.
5536 (init_complex_type): Likewise.
5537 (init_pointer_type): Likewise.
5538 (objfile_type): Likewise.
5539 (arch_integer_type): Update call to arch_type.
5540 (arch_character_type): Likewise.
5541 (arch_boolean_type): Likewise.
5542 (arch_float_type): Likewise.
5543 (arch_decfloat_type): Likewise.
5544 (arch_complex_type): Likewise.
5545 (arch_pointer_type): Likewise.
5546 (gdbtypes_post_init): Likewise.
5547
5548 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5549 (read_base_type): Likewise.
5550 * mdebugread.c (basic_type): Likewise.
5551 * stabsread.c (dbx_init_float_type): Likewise.
5552 (rs6000_builtin_type): Likewise.
5553 (read_range_type): Likewise. Also, fix call to init_integer_type
5554 with erroneous length argument.
5555
5556 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5557 * d-lang.c (build_d_types): Likewise.
5558 * f-lang.c (build_fortran_types): Likewise.
5559 * go-lang.c (build_go_types): Likewise.
5560 * opencl-lang.c (build_opencl_types): Likewise.
5561 * jit.c (finalize_symtab): Likewise.
5562 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5563 (build_std_type_info_type): Likewise.
5564 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5565 update call to arch_flags_type.
5566
5567 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5568 arch_type.
5569 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5570 * windows-tdep.c (windows_get_tlb_type): Likewise.
5571
5572 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5573 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5574 * m32c-tdep.c (make_types): Likewise.
5575 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5576 (rl78_psw_type): Update call to arch_flags_type.
5577 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5578 * rx-tdep.c (rx_psw_type): Likewise.
5579 (rx_fpsw_type): Likewise.
5580 * sparc-tdep.c (sparc_psr_type): Likewise.
5581 (sparc_fsr_type): Likewise.
5582 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5583 (sparc64_ccr_type): Likewise.
5584 (sparc64_fsr_type): Likewise.
5585 (sparc64_fprs_type): Likewise.
5586
f21b4d5c
TT
55872017-09-27 Tom Tromey <tom@tromey.com>
5588
5589 * findcmd.c (find_command): Constify.
5590
643c2ffa
TT
55912017-09-27 Tom Tromey <tom@tromey.com>
5592
5593 * ada-tasks.c (task_command_1, task_command): Constify.
5594
510e5e56
TT
55952017-09-27 Tom Tromey <tom@tromey.com>
5596
5597 * symtab.c (maintenance_print_symbol_cache)
5598 (maintenance_flush_symbol_cache)
5599 (maintenance_print_symbol_cache_statistics): Constify.
5600
e503b191
TT
56012017-09-27 Tom Tromey <tom@tromey.com>
5602
5603 * inferior.c (detach_inferior_command, kill_inferior_command)
5604 (inferior_command): Constify.
5605
4e001312
TT
56062017-09-27 Tom Tromey <tom@tromey.com>
5607
5608 * regcache.c (regcache_print, maintenance_print_registers)
5609 (maintenance_print_raw_registers)
5610 (maintenance_print_cooked_registers)
5611 (maintenance_print_register_groups)
5612 (maintenance_print_remote_registers): Constify.
5613
77763700
TT
56142017-09-27 Tom Tromey <tom@tromey.com>
5615
5616 * printcmd.c (map_display_numbers, undisplay_command)
5617 (enable_disable_display_command, enable_display_command)
5618 (disable_display_command): Constify.
5619
4495129a
TT
56202017-09-27 Tom Tromey <tom@tromey.com>
5621
5622 * breakpoint.h (delete_command): Don't declare.
5623 * breakpoint.c (delete_command, enable_once_command)
5624 (enable_count_command, enable_delete_command, breakpoint_1)
5625 (maintenance_info_breakpoints, stopin_command, stopat_command)
5626 (delete_command, delete_trace_command, save_breakpoints)
5627 (save_breakpoints_command, save_tracepoints_command): Constify.
5628
3088cf40
TT
56292017-09-27 Tom Tromey <tom@tromey.com>
5630
5631 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5632 (skip_ws, extract_identifier, macro_define_command)
5633 (macro_undef_command, macro_list_command): Constify.
5634
69f476a3
TT
56352017-09-27 Tom Tromey <tom@tromey.com>
5636
5637 * infcmd.c (environment_info, set_environment_command)
5638 (unset_environment_command, path_info, info_proc_cmd_1)
5639 (info_proc_cmd_mappings, info_proc_cmd_stat)
5640 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5641 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5642
c4a3e68e
TT
56432017-09-27 Tom Tromey <tom@tromey.com>
5644
5645 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5646 Constify.
5647
c9d31bd6
TT
56482017-09-27 Tom Tromey <tom@tromey.com>
5649
5650 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5651
1f3f85eb
TT
56522017-09-27 Tom Tromey <tom@tromey.com>
5653
5654 * demangle.c (demangle_command): Constify.
5655
9c504b5d
TT
56562017-09-27 Tom Tromey <tom@tromey.com>
5657
5658 * progspace.c (maintenance_info_program_spaces_command):
5659 Constify.
5660
6663cf91
TT
56612017-09-27 Tom Tromey <tom@tromey.com>
5662
5663 * compile/compile.c (check_raw_argument, compile_file_command)
5664 (compile_code_command, compile_print_command): Constify.
5665
34e5fa26
TT
56662017-09-27 Tom Tromey <tom@tromey.com>
5667
5668 * reggroups.c (maintenance_print_reggroups): Constify.
5669
8384c356
TT
56702017-09-27 Tom Tromey <tom@tromey.com>
5671
5672 * dwarf2read.c (save_gdb_index_command): Constify.
5673
884beb0c
TT
56742017-09-27 Tom Tromey <tom@tromey.com>
5675
5676 * stap-probe.c (info_probes_stap_command): Constify.
5677
e0b2930c
TT
56782017-09-27 Tom Tromey <tom@tromey.com>
5679
5680 * fork-child.c (unset_exec_wrapper_command): Constify.
5681
f938677d
TT
56822017-09-27 Tom Tromey <tom@tromey.com>
5683
5684 * btrace.c (get_uint, get_context_size, no_chunk)
5685 (maint_btrace_packet_history_cmd)
5686 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5687 (maint_info_btrace_cmd): Constify.
5688
8949cb87
TT
56892017-09-27 Tom Tromey <tom@tromey.com>
5690
5691 * reverse.c (delete_bookmark_command): Constify.
5692
ac88e2de
TT
56932017-09-27 Tom Tromey <tom@tromey.com>
5694
5695 * remote.c (set_memory_packet_size)
5696 (set_memory_write_packet_size, show_memory_write_packet_size)
5697 (set_memory_read_packet_size, show_memory_read_packet_size)
5698 (compare_sections_command, packet_command, remote_put_command)
5699 (remote_get_command, remote_delete_command): Constify.
5700
bd4c9dfe
TT
57012017-09-27 Tom Tromey <tom@tromey.com>
5702
5703 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5704 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5705 (set_mipsfpu_auto_command): Constify.
5706
5e93d4c6
TT
57072017-09-27 Tom Tromey <tom@tromey.com>
5708
5709 * cli/cli-cmds.h (cd_command): Constify.
5710 * cli/cli-cmds.c (cd_command): Constify.
5711
fc41a75b
TT
57122017-09-27 Tom Tromey <tom@tromey.com>
5713
5714 * thread.c (thread_name_command, thread_find_command): Constify.
5715
67810076
TT
57162017-09-27 Tom Tromey <tom@tromey.com>
5717
5718 * probe.c (enable_probes_command, disable_probes_command):
5719 Constify.
5720
1d8b34a7
TT
57212017-09-27 Tom Tromey <tom@tromey.com>
5722
5723 * symfile.c (symbol_file_command): Constify.
5724 * gdbcore.h (deprecated_file_changed_hook): Constify.
5725 * exec.c (deprecated_file_changed_hook, exec_file_command)
5726 (file_command): Constify.
5727 * defs.h (symbol_file_command): Constify.
5728
442019e1
TT
57292017-09-27 Tom Tromey <tom@tromey.com>
5730
5731 * remote-fileio.c (set_system_call_allowed)
5732 (show_system_call_allowed): Constify.
5733
2983f7cb
TT
57342017-09-27 Tom Tromey <tom@tromey.com>
5735
5736 * tracepoint.c (delete_trace_variable_command)
5737 (tfind_end_command, tfind_start_command, tfind_pc_command)
5738 (tfind_tracepoint_command, tfind_line_command)
5739 (tfind_range_command, tfind_outside_command): Constify.
5740
4fd41b24
TT
57412017-09-27 Tom Tromey <tom@tromey.com>
5742
5743 * ax-gdb.c (maint_agent_printf_command, agent_command)
5744 (agent_eval_command): Constify.
5745
f2fc3015
TT
57462017-09-27 Tom Tromey <tom@tromey.com>
5747
5748 * tracepoint.c (info_scope_command): Constify.
5749 * python/python.c (gdbpy_decode_line): Constify.
5750 * python/py-breakpoint.c (bppy_init): Constify.
5751 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5752 * location.h: (new_linespec_location)
5753 (string_to_event_location_basic, string_to_event_location):
5754 Constify.
5755 * location.c (new_linespec_location)
5756 (string_to_event_location_basic, string_to_event_location):
5757 Constify.
5758 * linespec.h (decode_line_with_current_source)
5759 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5760 * linespec.c (linespec_lex_to_end)
5761 (decode_line_with_current_source)
5762 (decode_line_with_last_displayed): Constify.
5763 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5764 Constify.
5765 * cli/cli-cmds.c (edit_command, list_command): Constify.
5766 * breakpoint.h (until_break_command, watch_command_wrapper)
5767 (awatch_command_wrapper, rwatch_command_wrapper)
5768 (init_ada_exception_breakpoint): Constify.
5769 * breakpoint.c (break_command_1, dprintf_command)
5770 (break_range_command, watch_command_wrapper)
5771 (rwatch_command_wrapper, awatch_command_wrapper)
5772 (until_break_command, init_ada_exception_breakpoint)
5773 (strace_marker_create_sals_from_location, trace_command)
5774 (ftrace_command, strace_command, struct tracepoint): Constify.
5775 * ax-gdb.c (agent_command_1): Constify.
5776 * ada-lang.c (ada_exception_sal): Constify.
5777
8c2f95f4
TT
57782017-09-27 Tom Tromey <tom@tromey.com>
5779
5780 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5781 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5782 (get_context_size, no_chunk, get_insn_history_modifiers)
5783 (cmd_record_insn_history, get_call_history_modifiers)
5784 (cmd_record_call_history): Constify.
5785
a0d65762
TT
57862017-09-27 Tom Tromey <tom@tromey.com>
5787
5788 * source.c (show_substitute_path_command)
5789 (unset_substitute_path_command, set_substitute_path_command):
5790 Constify.
5791
58971144
TT
57922017-09-27 Tom Tromey <tom@tromey.com>
5793
5794 * typeprint.c (maintenance_print_type): Constify.
5795 * maint.c (maintenance_dump_me, maintenance_demangle)
5796 (maintenance_time_display, maintenance_info_sections)
5797 (maintenance_print_statistics, maintenance_deprecate)
5798 (maintenance_undeprecate): Constify.
5799 (maintenance_do_deprecate): Constify. Use std::string.
5800 (maintenance_selftest): Constify.
5801 * gdbtypes.h (maintenance_print_type): Constify.
5802
c482f52c
TT
58032017-09-27 Tom Tromey <tom@tromey.com>
5804
5805 * hppa-tdep.c (unwind_command): Constify.
5806
e100df1a
TT
58072017-09-27 Tom Tromey <tom@tromey.com>
5808
5809 * target-descriptions.c (unset_tdesc_filename_cmd)
5810 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5811 Constify.
5812
31d56ade
TT
58132017-09-27 Tom Tromey <tom@tromey.com>
5814
5815 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5816
b961da0b
TT
58172017-09-27 Tom Tromey <tom@tromey.com>
5818
5819 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5820
e2d8ae16
TT
58212017-09-27 Tom Tromey <tom@tromey.com>
5822
5823 * tui/tui-regs.c (tui_reg_command): Constify.
5824
863779b0
TT
58252017-09-27 Tom Tromey <tom@tromey.com>
5826
5827 * skip.c (skip_file_command, skip_function_command)
5828 (skip_enable_command, skip_disable_command, skip_delete_command):
5829 Constify.
5830
cdb34d4a
TT
58312017-09-27 Tom Tromey <tom@tromey.com>
5832
5833 * record-btrace.c (cmd_record_btrace_bts_start)
5834 (cmd_record_btrace_pt_start): Constify.
5835
e99c83e7
TT
58362017-09-27 Tom Tromey <tom@tromey.com>
5837
5838 * symmisc.c (maintenance_print_symbols)
5839 (maintenance_print_msymbols, maintenance_print_objfiles)
5840 (maintenance_info_symtabs, maintenance_check_symtabs)
5841 (maintenance_expand_symtabs, maintenance_info_line_tables):
5842 Constify.
5843
32faf971
TT
58442017-09-27 Tom Tromey <tom@tromey.com>
5845
5846 * top.c (new_ui_command): Constify.
5847
2cf311eb
TT
58482017-09-27 Tom Tromey <tom@tromey.com>
5849
5850 * symfile.c (add_symbol_file_command)
5851 (remove_symbol_file_command, list_overlays_command)
5852 (map_overlay_command, unmap_overlay_command)
5853 (overlay_auto_command, overlay_manual_command)
5854 (overlay_off_command, overlay_load_command): Constify.
5855
e6738699
TT
58562017-09-27 Tom Tromey <tom@tromey.com>
5857
5858 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5859 (info_spu_mailbox_command, info_spu_dma_command)
5860 (info_spu_proxydma_command): Constify.
5861
aa360cd5
TT
58622017-09-27 Tom Tromey <tom@tromey.com>
5863
5864 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5865
898241a5
TT
58662017-09-27 Tom Tromey <tom@tromey.com>
5867
5868 * cli/cli-script.c (user_defined_command): Constify.
5869
2d0ac106
TT
58702017-09-27 Tom Tromey <tom@tromey.com>
5871
5872 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5873 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5874 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5875 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5876 (dump_binary_value, append_binary_memory, append_binary_value):
5877 Constify.
5878 (struct dump_context) <func>: Constify.
5879 (add_dump_command): Update.
5880
dede02ce
TT
58812017-09-27 Tom Tromey <tom@tromey.com>
5882
5883 * cli/cli-cmds.c (show_version, show_configuration)
5884 (source_command, show_user): Constify.
5885
d3cb6b99
TT
58862017-09-27 Tom Tromey <tom@tromey.com>
5887
5888 * target.c (maintenance_print_target_stack): Constify.
5889
1970a12f
TT
58902017-09-27 Tom Tromey <tom@tromey.com>
5891
5892 * interps.c (interpreter_exec_cmd): Constify.
5893
41243651
TT
58942017-09-27 Tom Tromey <tom@tromey.com>
5895
5896 * record-full.c (cmd_record_full_restore): Constify.
5897
4465d9db
TT
58982017-09-27 Tom Tromey <tom@tromey.com>
5899
5900 * memattr.c (enable_mem_command, disable_mem_command)
5901 (delete_mem_command): Constify.
5902
ad25e423
TT
59032017-09-27 Tom Tromey <tom@tromey.com>
5904
5905 * value.c (show_convenience): Constify.
5906
d64097b1
TT
59072017-09-27 Tom Tromey <tom@tromey.com>
5908
5909 * gdbcore.h (core_file_command): Update.
5910 * corefile.c (core_file_command): Constify.
5911
4d4589ef
TT
59122017-09-27 Tom Tromey <tom@tromey.com>
5913
5914 * user-regs.c (maintenance_print_user_registers): Constify.
5915
32a7bf17
TT
59162017-09-27 Tom Tromey <tom@tromey.com>
5917
5918 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5919
4a475551
TT
59202017-09-27 Tom Tromey <tom@tromey.com>
5921
5922 * cp-support.c (first_component_command): Constify.
5923
990b9f9f
TT
59242017-09-27 Tom Tromey <tom@tromey.com>
5925
5926 * psymtab.c (maintenance_print_psymbols)
5927 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5928 Constify.
5929
c281872e
TT
59302017-09-27 Tom Tromey <tom@tromey.com>
5931
5932 * windows-tdep.c (display_tib): Constify.
5933
5b64bf74
TT
59342017-09-27 Tom Tromey <tom@tromey.com>
5935
5936 * linux-fork.c (delete_checkpoint_command)
5937 (detach_checkpoint_command): Constify.
5938
4ada038f
TT
59392017-09-27 Tom Tromey <tom@tromey.com>
5940
5941 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5942
57f5a81b
TT
59432017-09-27 Tom Tromey <tom@tromey.com>
5944
5945 * arc-tdep.c (dump_arc_instruction_command): Constify.
5946
b0a8e6c4
TT
59472017-09-27 Tom Tromey <tom@tromey.com>
5948
5949 * valprint.c (set_radix, show_radix): Constify.
5950
8d97dc1c
TT
59512017-09-27 Tom Tromey <tom@tromey.com>
5952
5953 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5954
eb7c454d
TT
59552017-09-27 Tom Tromey <tom@tromey.com>
5956
5957 * command.h (not_just_help_class_command): Update.
5958 * cli/cli-decode.h (not_just_help_class_command): Update.
5959 * cli/cli-decode.c (not_just_help_class_command): Constify.
5960
e4e33335
TT
59612017-09-27 Tom Tromey <tom@tromey.com>
5962
5963 * gdb_bfd.c (maintenance_info_bfds): Constify.
5964
0450cc4c
TT
59652017-09-27 Tom Tromey <tom@tromey.com>
5966
5967 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5968 overloads.
5969 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5970 (do_const_cfunc): New function.
5971 (cmd_cfunc_eq): New overload.
5972 (cli_user_command_p): Check do_const_cfunc.
5973 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5974 const_cfunc.
5975 * command.h (add_cmd): Add const overload and no-function
5976 overload.
5977 (set_cmd_cfunc): Add const overload.
5978 (cmd_const_cfunc_ftype): Declare.
5979 (cmd_cfunc_eq): Add const overload.
5980 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5981 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5982 overload.
5983
a9bbfbd8
TT
59842017-09-27 Tom Tromey <tom@tromey.com>
5985
5986 * macroexp.c (get_next_token_for_substitution): New function.
5987 (substitute_args): Call it. Check for __VA_OPT__.
5988
5230b05a
WT
59892017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5990 Pedro Alves <palves@redhat.com>
5991
5992 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5993 producer_is_icc_lt_14.
5994 (producer_is_icc_lt_14): New function.
5995 (check_producer): Add code for checking version of ICC.
5996 (producer_is_icc): Move to producer.c.
5997 (read_structure_type): Restrict ICC workaround to ICC<14.
5998 * producer.c: Include selftest.h.
5999 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6000 New functions.
6001 * producer.h (producer_is_icc): New declaration.
6002
b32b108a
WT
60032017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6004
6005 * Makefile.in (SFILES): Add producer.c.
6006 (COMMON_OBS): Add producer.o
6007 * amd64-tdep.c (producer.h): Add new include.
6008 * dwarf2read.c (producer.h): Add new include.
6009 * producer.c: New file.
6010 * producer.h: New file.
6011 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6012 producer.c.
6013 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6014 producer.h.
6015
5007d765
MK
60162017-09-26 Matthias Klose <doko@ubuntu.com>
6017
6018 * configure.ac: Search ncursesw before ncurses.
6019 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6020 * gdb_curses.h: Include <ncursesw/ncurses.h>
6021 * config.in, configure: Regenerate.
6022
281c4447
RO
60232017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6024
6025 PR gdb/22185
6026 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6027 obsolete.
6028 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6029 Remove i386sol2 support.
6030 * configure.nat <i386sol2>: Remove.
6031 <sol2-64>: Fold into ...
6032 <sol2>: ... this.
6033 Move common settings to default section.
6034 Add sol-thread.o.
6035 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6036 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6037 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6038 <i[34567]86-*-solaris*>: Remove.
6039 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6040
6041 * configure.ac: Remove wctype in libw check.
6042 (_MSE_INT_H): Don't define on Solaris 7-9.
6043 <solaris*>: Remove libthread_db.so.1 check.
6044 * configure: Regenerate.
6045 * config.in: Regenerate.
6046
6047 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6048 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6049 (gdb_ps_size_t): Remove.
6050 Use base types in users.
6051 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6052
6053 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6054
39b06c20
RO
60552017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6056
6057 PR build/22206
6058 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6059 (adi_is_addr_mapped): Likewise.
6060 (PSR_ICC): Don't redefine.
6061 (PSR_IMPL): Likewise.
6062
6c3e20f1
TT
60632017-09-25 Tom Tromey <tom@tromey.com>
6064
6065 * regcache.c (regcache::dump): Use string_printf.
6066
b292235f
TT
60672017-09-25 Tom Tromey <tom@tromey.com>
6068
6069 * regcache.c (class regcache_invalidator): New.
6070 (struct register_to_invalidate): Remove.
6071 (make_cleanup_regcache_invalidate): Remove.
6072 (regcache::raw_write): Use regcache_invalidator.
6073
9ac86b52
TT
60742017-09-25 Tom Tromey <tom@tromey.com>
6075
6076 * spu-tdep.c (spu2ppu_sniffer): Update.
6077 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6078 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6079 Remove.
6080 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6081 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6082 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6083 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6084 (frame_pop): Update.
6085
c0e383c6
TT
60862017-09-25 Tom Tromey <tom@tromey.com>
6087
6088 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6089 * regcache.h (regcache_xfree): Don't declare.
6090 * regcache.c (regcache_xfree): Remove.
6091 (do_regcache_xfree): Use delete.
6092 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6093 * linux-fork.c (free_fork): Use delete.
6094 (fork_save_infrun_state): Likewise.
6095 * jit.c (jit_dealloc_cache): Use delete.
6096 * infrun.c (discard_infcall_suspend_state): Use delete.
6097
791199cc
TT
60982017-09-25 Tom Tromey <tom@tromey.com>
6099
6100 * regcache.h (regcache_xmalloc): Don't declare.
6101 (regcache_raw_set_cached_value): Update comment.
6102 * regcache.c (regcache_xmalloc): Remove.
6103 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6104 * jit.c (jit_frame_sniffer): Use new.
6105 * frame.c (frame_save_as_regcache): Use new.
6106
289e23aa
AA
61072017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6108
6109 * NEWS: Advertise support for guarded-storage registers on IBM z.
6110
1b63490c
AA
61112017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6112
6113 * s390-linux-nat.c (have_regset_gs): New static variable.
6114 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6115 control block and guarded-storage broadcast control regsets.
6116 (s390_read_description): Detect whether the target has
6117 guarded-storage support, return appropriate tdesc.
6118 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6119 (features/s390x-gs-linux64.c): Likewise.
6120 (struct gdbarch_tdep) <have_gs>: New field.
6121 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6122 (s390_gsbc_regset): New variables.
6123 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6124 and s390_gsbc_regset, if applicable.
6125 (s390_core_read_description): Check whether core file was from a
6126 target with guarded-storage support; include appropriate regsets.
6127 (s390_gdbarch_init): Add registers for guarded-storage support.
6128 (_initialize_s390_tdep): Initialize new target descriptions that
6129 include registers for guarded-storage support.
6130 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6131 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6132 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6133 (S390_NUM_REGS): Adjust macro definition.
6134 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6135 (tdesc_s390x_gs_linux64): New declarations.
6136
96235dc1
AA
61372017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6138
6139 * features/s390-gs-linux64.xml: New file.
6140 * features/s390-gs.xml: New file.
6141 * features/s390-gsbc.xml: New file.
6142 * features/s390x-gs-linux64.xml: New file.
6143 * features/Makefile (WHICH): Add s390-gs-linux64 and
6144 s390x-gs-linux64.
6145 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6146 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6147 * features/s390-gs-linux64.c: New generated file.
6148 * features/s390x-gs-linux64.c: New file.
6149 * regformats/s390-gs-linux64.dat: New file.
6150 * regformats/s390x-gs-linux64.dat: New file.
6151
b4a7c699
TT
61522017-09-23 Tom Tromey <tom@tromey.com>
6153
6154 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6155
c2f97536
TT
61562017-09-22 Tom Tromey <tom@tromey.com>
6157
6158 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6159 type to scoped_restore_tmpl.
6160 <scoped_input_handler>: Initialize m_quit_handler directly.
6161
43573013
SDJ
61622017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6163
6164 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6165 (cd_command): Likewise. Free "current_directory" before
6166 assigning to it.
6167 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6168 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6169 * top.c (gdb_dirbuf): Remove global declaration.
6170 * top.h (gdb_dirbuf): Likewise.
6171
6ec2e0f5
SDJ
61722017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6173
6174 * gnulib/aclocal.m4: Regenerate.
6175 * gnulib/config.in: Regenerate.
6176 * gnulib/configure: Regenerate.
6177 * gnulib/import/Makefile.am: Regenerate.
6178 * gnulib/import/Makefile.in: Regenerate.
6179 * gnulib/import/assure.h: New file.
6180 * gnulib/import/at-func.c: Likewise
6181 * gnulib/import/chdir-long.c: New file.
6182 * gnulib/import/chdir-long.h: New file.
6183 * gnulib/import/cloexec.c: New file.
6184 * gnulib/import/cloexec.h: New file.
6185 * gnulib/import/close.c: New file.
6186 * gnulib/import/closedir.c: New file.
6187 * gnulib/import/dirent-private.h: New file.
6188 * gnulib/import/dup-safer.c: New file.
6189 * gnulib/import/dup.c: New file.
6190 * gnulib/import/dup2.c: New file.
6191 * gnulib/import/error.c: New file.
6192 * gnulib/import/error.h: New file.
6193 * gnulib/import/exitfail.c: New file.
6194 * gnulib/import/exitfail.h: New file.
6195 * gnulib/import/fchdir.c: New file.
6196 * gnulib/import/fcntl.c: New file.
6197 * gnulib/import/fcntl.in.h: New file.
6198 * gnulib/import/fd-hook.c: New file.
6199 * gnulib/import/fd-hook.h: New file.
6200 * gnulib/import/fd-safer.c: New file.
6201 * gnulib/import/fdopendir.c: New file.
6202 * gnulib/import/filename.h: New file.
6203 * gnulib/import/filenamecat-lgpl.c: New file.
6204 * gnulib/import/filenamecat.h: New file.
6205 * gnulib/import/fstat.c: New file.
6206 * gnulib/import/fstatat.c: New file.
6207 * gnulib/import/getcwd-lgpl.c: New file.
6208 * gnulib/import/getcwd.c: New file.
6209 * gnulib/import/getdtablesize.c: New file.
6210 * gnulib/import/getlogin_r.c: New file.
6211 * gnulib/import/getprogname.c: New file.
6212 * gnulib/import/getprogname.h: New file.
6213 * gnulib/import/gettext.h: New file.
6214 * gnulib/import/glob-libc.h: New file.
6215 * gnulib/import/glob.c: New file.
6216 * gnulib/import/glob.in.h: New file.
6217 * gnulib/import/intprops.h: New file.
6218 * gnulib/import/m4/chdir-long.m4: New file.
6219 * gnulib/import/m4/close.m4: New file.
6220 * gnulib/import/m4/closedir.m4: New file.
6221 * gnulib/import/m4/d-ino.m4: New file.
6222 * gnulib/import/m4/d-type.m4: New file.
6223 * gnulib/import/m4/dup.m4: New file.
6224 * gnulib/import/m4/dup2.m4: New file.
6225 * gnulib/import/m4/error.m4: New file.
6226 * gnulib/import/m4/fchdir.m4: New file.
6227 * gnulib/import/m4/fcntl.m4: New file.
6228 * gnulib/import/m4/fcntl_h.m4: New file.
6229 * gnulib/import/m4/fdopendir.m4: New file.
6230 * gnulib/import/m4/filenamecat.m4: New file.
6231 * gnulib/import/m4/fstat.m4: New file.
6232 * gnulib/import/m4/fstatat.m4: New file.
6233 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6234 * gnulib/import/m4/getcwd-path-max.m4: New file.
6235 * gnulib/import/m4/getcwd.m4: New file.
6236 * gnulib/import/m4/getdtablesize.m4: New file.
6237 * gnulib/import/m4/getlogin_r.m4: New file.
6238 * gnulib/import/m4/getprogname.m4: New file.
6239 * gnulib/import/m4/glob.m4: New file.
6240 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6241 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6242 * gnulib/import/m4/mempcpy.m4: New file.
6243 * gnulib/import/m4/memrchr.m4: New file.
6244 * gnulib/import/m4/mode_t.m4: New file.
6245 * gnulib/import/m4/msvc-inval.m4: New file.
6246 * gnulib/import/m4/msvc-nothrow.m4: New file.
6247 * gnulib/import/m4/open.m4: New file.
6248 * gnulib/import/m4/openat.m4: New file.
6249 * gnulib/import/m4/opendir.m4: New file.
6250 * gnulib/import/m4/readdir.m4: New file.
6251 * gnulib/import/m4/realloc.m4: New file.
6252 * gnulib/import/m4/rewinddir.m4: New file.
6253 * gnulib/import/m4/save-cwd.m4: New file.
6254 * gnulib/import/m4/strdup.m4: New file.
6255 * gnulib/import/m4/strerror.m4: New file.
6256 * gnulib/import/m4/unistd-safer.m4: New file.
6257 * gnulib/import/mempcpy.c: New file.
6258 * gnulib/import/memrchr.c: New file.
6259 * gnulib/import/msvc-inval.c: New file.
6260 * gnulib/import/msvc-inval.h: New file.
6261 * gnulib/import/msvc-nothrow.c: New file.
6262 * gnulib/import/msvc-nothrow.h: New file.
6263 * gnulib/import/open.c: New file.
6264 * gnulib/import/openat-die.c: New file.
6265 * gnulib/import/openat-priv.h: New file.
6266 * gnulib/import/openat-proc.c: New file.
6267 * gnulib/import/openat.c: New file.
6268 * gnulib/import/openat.h: New file.
6269 * gnulib/import/opendir.c: New file.
6270 * gnulib/import/pipe-safer.c: New file.
6271 * gnulib/import/readdir.c: New file.
6272 * gnulib/import/realloc.c: New file.
6273 * gnulib/import/rewinddir.c: New file.
6274 * gnulib/import/save-cwd.c: New file.
6275 * gnulib/import/save-cwd.h: New file.
6276 * gnulib/import/strdup.c: New file.
6277 * gnulib/import/strerror-override.c: New file.
6278 * gnulib/import/strerror-override.h: New file.
6279 * gnulib/import/strerror.c: New file.
6280 * gnulib/import/unistd--.h: New file.
6281 * gnulib/import/unistd-safer.h: New file.
6282 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6283 "getcwd" and "glob".
6284 * ser-tcp.c: Undefine "close" before redefining it.
6285
432ae719
SM
62862017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6287
6288 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6289 get rid of res_val.
6290
4fa7574e
RO
62912017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6292
6293 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6294 <sol2,sparc>: Likewise.
6295 <sol2-64,i386>: Likewise.
6296
6297 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6298 -Wdeprecated-declarations on *-*-solaris*.
6299 * configure: Regenerate.
6300
6301 * procfs.c: Include "nat/inferior.h".
6302 (procfs_info_proc): Fix typo.
6303
f6327dcb
KB
63042017-09-21 Kevin Buettner <kevinb@redhat.com>
6305
6306 * remote.c (vector): Include.
6307 (struct private_thread_info): Add field, thread_handle.
6308 (free_private_thread_info): Deallocate storage associated with
6309 thread handle.
6310 (get_private_info_thread): Initialize `thread_handle' field.
6311 (struct thread_item): Add field, thread_handle.
6312 (clear_threads_listing_context): Deallocate storage associated
6313 with thread handle.
6314 (start_thread): Add support for "handle" attribute.
6315 (thread_attributes): Add "handle".
6316 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6317 field.
6318 (remote_update_thread_list): Update thread_handle.
6319 (remote_thread_handle_to_thread_info): New function.
6320 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6321
fbbe5337
KB
63222017-09-21 Kevin Buettner <kevinb@redhat.com>
6323
6324 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6325 function.
6326 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6327 * python/python-internal.h (thread_object_type): Declare.
6328
e04ee09e
KB
63292017-09-21 Kevin Buettner <kevinb@redhat.com>
6330
6331 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6332 (target_thread_handle_to_thread_info): Declare.
6333 * target.c (target_thread_handle_to_thread_info): New function.
6334 * target-delegates.c: Regenerate.
6335 * gdbthread.h (find_thread_by_handle): Declare.
6336 * thread.c (find_thread_by_handle): New function.
6337 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6338 function.
6339 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6340
1e5b66ed
SM
63412017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6342
6343 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6344
ebe48ba0
SM
63452017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6346
6347 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6348
0a0bf5dc
YQ
63492017-09-21 Yao Qi <yao.qi@linaro.org>
6350
6351 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6352 to gdb_target_obs.
6353
d1b0a7bf
TT
63542017-09-20 Tom Tromey <tom@tromey.com>
6355
6356 * breakpoint.c (struct counted_command_line): Remove.
6357 (breakpoint_commands): Update.
6358 (alloc_counted_command_line, incref_counted_command_line)
6359 (decref_counted_command_line, do_cleanup_counted_command_line)
6360 (make_cleanup_decref_counted_command_line): Remove.
6361 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6362 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6363 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6364 (save_breakpoints): Update.
6365 * breakpoint.h (counted_command_line): Now a typedef to
6366 shared_ptr.
6367 (struct breakpoint) <commands>: Now a counted_command_line.
6368 (struct bpstats) <command>: Likewise.
6369
48649e1b
TT
63702017-09-20 Tom Tromey <tom@tromey.com>
6371
6372 * breakpoint.c (struct commands_info, do_map_commands_command):
6373 Remove.
6374 (commands_command_1): Update.
6375 (iterate_over_related_breakpoints): Take a function_view.
6376 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6377 (delete_command): Update.
6378 (map_breakpoint_numbers): Take a function_view.
6379 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6380 (disable_command): Update.
6381 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6382 (enable_command): Update.
6383 (struct disp_data, do_enable_breakpoint_disp)
6384 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6385 (do_map_enable_delete_breakpoint): Remove.
6386 (enable_once_command, enable_count_command, enable_delete_command)
6387 (delete_trace_variable_command): Update.
6388
04afa70c
TT
63892017-09-20 Tom Tromey <tom@tromey.com>
6390
6391 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6392 (bpstat_clear): Use delete.
6393 (bpstats): New constructors.
6394 (bpstat_copy, bpstat_stop_status): Use new.
6395 (dprintf_after_condition_true): Update.
6396 * breakpoint.h (bpstats::bpstats): Add constructors.
6397 (bpstats::~bpstats): Add destructor.
6398
c83833f4
PA
63992017-09-20 Pedro Alves <palves@redhat.com>
6400
6401 * eval.c (make_params): Delete, refactored as ...
6402 (class fake_method): ... this new type's ctor.
6403 (fake_method::~fake_method): New.
6404 (evaluate_subexp_standard): Use 'fake_method'.
6405
223ffa71
TT
64062017-09-20 Tom Tromey <tom@tromey.com>
6407
6408 * windows-nat.c (get_windows_debug_event, windows_wait)
6409 (do_initial_windows_stuff, windows_attach): Update.
6410 * utils.c (vwarning, internal_vproblem): Update.
6411 (ui_unregister_input_event_handler_cleanup)
6412 (prepare_to_handle_input): Remove.
6413 (class scoped_input_handler): New.
6414 (defaulted_query, prompt_for_continue): Update.
6415 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6416 Update.
6417 * top.c (undo_terminal_modifications_before_exit): Update.
6418 * target/target.h (target_terminal_init, target_terminal_inferior)
6419 (target_terminal_ours): Don't declare.
6420 (class target_terminal): New.
6421 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6422 (target_terminal_ours_for_output)
6423 (make_cleanup_restore_target_terminal): Don't declare.
6424 (target_terminal_info): Remove.
6425 * target.c (enum terminal_state, terminal_state): Remove.
6426 (target_terminal::terminal_state): Define.
6427 (target_terminal::init): Rename from target_terminal_init.
6428 (target_terminal::inferior): Rename from
6429 target_terminal_inferior.
6430 (target_terminal::ours): Rename from target_terminal_ours.
6431 (target_terminal::ours_for_output): Rename from
6432 target_terminal_ours_for_output.
6433 (target_terminal::info): New method.
6434 (cleanup_restore_target_terminal)
6435 (make_cleanup_restore_target_terminal): Remove.
6436 * solib.c (handle_solib_event): Update.
6437 * remote.c (remote_serial_quit_handler): Update.
6438 (remote_terminal_inferior, remote_wait_as): Update.
6439 * record-full.c (record_full_wait_1): Update.
6440 * nto-procfs.c (procfs_create_inferior): Update.
6441 * nat/fork-inferior.c (startup_inferior): Update.
6442 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6443 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6444 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6445 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6446 (mi_breakpoint_created, mi_breakpoint_deleted)
6447 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6448 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6449 (mi_user_selected_context_changed, report_initial_inferior):
6450 Update.
6451 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6452 (linux_nat_terminal_inferior): Update.
6453 * infrun.c (follow_fork_inferior)
6454 (handle_vfork_child_exec_or_exit, do_target_resume)
6455 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6456 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6457 Update.
6458 * inflow.c (child_terminal_init, info_terminal_command): Update.
6459 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6460 (attach_command): Update.
6461 * infcall.c (call_thread_fsm_should_stop): Update.
6462 * gnu-nat.c (gnu_attach): Update.
6463 * extension.c (struct active_ext_lang_state)
6464 (restore_active_ext_lang): Update.
6465 * exceptions.c (print_flush): Update.
6466 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6467 (struct quit_handler_cleanup_data, restore_quit_handler)
6468 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6469 Remove.
6470 * cp-support.c (gdb_demangle): Update.
6471 * breakpoint.c (update_inserted_breakpoint_locations)
6472 (insert_breakpoint_locations, handle_jit_event)
6473 (disable_breakpoints_in_unloaded_shlib): Update.
6474 * annotate.c (annotate_breakpoints_invalid)
6475 (annotate_frames_invalid): Update.
6476
013af3fc
TT
64772017-09-20 Tom Tromey <tom@tromey.com>
6478
6479 * main.c (catch_command_errors): Rename from
6480 catch_command_errors_const.
6481 (captured_main_1): Update.
6482
06871ae8
PA
64832017-09-20 Pedro Alves <palves@redhat.com>
6484
6485 * cli/cli-cmds.c (list_command): Use print_sal_location.
6486 (print_sal_location): New function.
6487 (ambiguous_line_spec): Use print_sal_location.
6488 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6489 * symtab.c (find_function_start_sal): Likewise.
6490 * symtab.h (symtab_and_line::symbol): New field.
6491
e5f25bc5
PA
64922017-09-20 Pedro Alves <palves@redhat.com>
6493
6494 * linespec.c (minsym_found): Handle non-text minsyms.
6495 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6496
1b7fa39e
WT
64972017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6498
6499 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6500 backslash.
6501
37dd0825
WT
65022017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6503
6504 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6505 vmovups instead vmovaps.
6506 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6507
4e5a4f58
JB
65082017-09-19 John Baldwin <jhb@FreeBSD.org>
6509
6510 * NEWS (Changes since GDB 8.0): Add starti.
6511 * infcmd.c (enum run_break): New.
6512 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6513 case.
6514 (run_command): Use enum run_how.
6515 (start_command): Likewise.
6516 (starti_command): New function.
6517 (RUN_ARGS_HELP): New macro.
6518 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6519 commands. Add starti command.
6520
aa70c9f1
YQ
65212017-09-19 Yao Qi <yao.qi@linaro.org>
6522
6523 * Makefile.in (monitor.o): Remove the rule.
6524
d6541620
YQ
65252017-09-19 Yao Qi <yao.qi@linaro.org>
6526
6527 * annotate.h (struct annotate_arg_emitter): Use
6528 DISABLE_COPY_AND_ASSIGN.
6529 * common/refcounted-object.h (refcounted_object): Likewise.
6530 * completer.h (struct completion_result): Likewise.
6531 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6532 * filename-seen-cache.h (filename_seen_cache): Likewise.
6533 * gdbcore.h (thread_section_name): Likewise.
6534 * gdb_regex.h (compiled_regex): Likewise.
6535 * gdbthread.h (scoped_restore_current_thread): Likewise.
6536 * inferior.h (scoped_restore_current_inferior): Likewise.
6537 * jit.c (jit_reader): Likewise.
6538 * linespec.h (struct linespec_result): Likewise.
6539 * mi/mi-parse.h (struct mi_parse): Likewise.
6540 * nat/fork-inferior.c (execv_argv): Likewise.
6541 * progspace.h (scoped_restore_current_program_space): Likewise.
6542 * python/python-internal.h (class gdbpy_enter): Likewise.
6543 * regcache.h (regcache): Likewise.
6544 * target-descriptions.c (struct tdesc_reg): Likewise.
6545 (struct tdesc_type): Likewise.
6546 (struct tdesc_feature): Likewise.
6547 * ui-out.h (ui_out_emit_type): Likewise.
6548
0615127c
SM
65492017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6550
6551 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6552 label abort_expression.
6553
5e187554
SM
65542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6555
6556 * common/buffer.c (buffer_xml_printf): Adjust.
6557 * common/xml-utils.c (xml_escape_text): Change return type to
6558 std::string, update code accordingly.
6559 * common/xml-utils.h (xml_escape_text): Change return type to
6560 std::string.
6561 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6562 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6563 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6564 Adjust.
6565
c3d7b541
SM
65662017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6567
6568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6569 (SUBDIR_UNITTESTS_OBS): Add new object file.
6570 * unittests/xml-utils-selftests.c: New file.
6571
1526853e
SM
65722017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6573
6574 * common/selftest.h (selftest): New struct/interface.
6575 (register_test): Add name parameter, add new overload.
6576 (run_tests): Add filter parameter.
6577 (for_each_selftest_ftype): New typedef.
6578 (for_each_selftest): New declaration.
6579 * common/selftest.c (tests): Change type to
6580 map<string, unique_ptr<selftest>>.
6581 (simple_selftest): New struct.
6582 (register_test): New function.
6583 (register_test): Add name parameter and use it.
6584 (run_tests): Add filter parameter and use it. Add prints.
6585 Adjust to vector -> map change.
6586 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6587 registering selftests.
6588 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6589 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6590 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6591 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6592 * findvar.c (_initialize_findvar): Likewise.
6593 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6594 * maint.c (maintenance_selftest): Update call to run_tests.
6595 (maintenance_info_selftests): New function.
6596 (_initialize_maint_cmds): Register "maintenance info selftests"
6597 command. Update "maintenance selftest" doc.
6598 * regcache.c (_initialize_regcache): Add names when registering
6599 selftests.
6600 * rust-exp.y (_initialize_rust_exp): Likewise.
6601 * selftest-arch.c (gdbarch_selftest): New struct.
6602 (gdbarch_tests): Remove.
6603 (register_test_foreach_arch): Add name parameter. Call
6604 register_test.
6605 (tests_with_arch): Remove, move most content to
6606 gdbarch_selftest::operator().
6607 (_initialize_selftests_foreach_arch): Remove.
6608 * selftest-arch.h (register_test_foreach_arch): Add name
6609 parameter.
6610 (run_tests_with_arch): New declaration.
6611 * utils-selftests.c (_initialize_utils_selftests): Add names
6612 when registering selftests.
6613 * utils.c (_initialize_utils): Likewise.
6614 * unittests/array-view-selftests.c
6615 (_initialize_array_view_selftests): Likewise.
6616 * unittests/environ-selftests.c (_initialize_environ_selftests):
6617 Likewise.
6618 * unittests/function-view-selftests.c
6619 (_initialize_function_view_selftests): Likewise.
6620 * unittests/offset-type-selftests.c
6621 (_initialize_offset_type_selftests): Likewise.
6622 * unittests/optional-selftests.c
6623 (_initialize_optional_selftests): Likewise.
6624 * unittests/scoped_restore-selftests.c
6625 (_initialize_scoped_restore_selftests): Likewise.
6626 * NEWS: Document "maintenance selftest" and "maint info
6627 selftests".
6628
5846367a
SM
66292017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6630
6631 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6632 scoped_restore.
6633
bd77e8ff
SM
66342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6635
6636 * mi/mi-main.c (mi_load_progress): Make uiout variable
6637 a unique_ptr.
6638
26a67918
PA
66392017-09-15 Pedro Alves <palves@redhat.com>
6640
6641 * compile/compile-c-types.c (convert_enum, convert_int)
6642 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6643
3f8a7804
SM
66442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6645
6646 * dwarf2read.c (copy_string): Remove.
6647 (parse_macro_definition): Replace copy_string with savestring.
6648
8d200706
YQ
66492017-09-15 Yao Qi <yao.qi@linaro.org>
6650
6651 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6652 gdb_target_obs.
6653 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6654 Likewise.
6655 (i[34567]86-*-linux*): Likewise.
6656
d185219d
SM
66572017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6658
6659 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6660 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6661 <stack>: Change type to std::vector.
6662 <stack_len, stack_allocated>: Remove.
6663 <grow_stack>: Remove.
6664 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6665 (dwarf_expr_context::~dwarf_expr_context): Remove.
6666 (dwarf_expr_context::grow_stack): Remove.
6667 (dwarf_expr_context::push): Adjust.
6668 (dwarf_expr_context::pop): Adjust.
6669 (dwarf_expr_context::fetch): Adjust.
6670 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6671 (dwarf_expr_context::stack_empty_p): Adjust.
6672 (dwarf_expr_context::execute_stack_op): Adjust.
6673
eccd80d6
SM
66742017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6675
6676 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6677 return type to bool.
6678 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6679
69009882
SM
66802017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6681
6682 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6683 Change type to bool.
6684 (dwarf_stack_value) <in_stack_memory>: Likewise.
6685 (dwarf_expr_context) <push_address>: Change parameter type to
6686 bool.
6687 <fetch_in_stack_memory>: Change return type to bool.
6688 <push>: Change parameter type to bool.
6689 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6690 to bool.
6691 (dwarf_expr_context::push_address): Likewise.
6692 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6693 to bool.
6694 (dwarf_expr_context::execute_stack_op): Adjust.
6695 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6696
1e467161
SM
66972017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6698
6699 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6700 (struct dwarf_expr_context) <n_pieces>: Remove.
6701 <pieces>: Change type to std::vector.
6702 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6703 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6704 pieces.
6705 (dwarf_expr_context::add_piece): Adjust.
6706 * dwarf2loc.c (struct piece_closure): Initialize fields.
6707 <n_pieces>: Remove.
6708 <pieces>: Change type to std::vector.
6709 (allocate_piece_closure): Adjust, change parameter to
6710 std::vector rvalue and std::move it to piece_closure.
6711 (rw_pieced_value): Adjust.
6712 (check_pieced_synthetic_pointer): Adjust.
6713 (indirect_synthetic_pointer): Adjust.
6714 (coerce_pieced_ref): Adjust.
6715 (free_pieced_value_closure): Adjust. Use delete to free
6716 piece_closure.
6717 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6718 to allocate_piece_closure.
6719 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6720
0782db84
SM
67212017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6722
6723 * probe.h (probe_ops_cp): Remove typedef.
6724 (DEF_VEC_P (probe_ops_cp)): Remove.
6725 (all_probe_ops): Change type to std::vector.
6726 * probe.c (info_probes_for_ops): Adjust to vector change.
6727 (probe_linespec_to_ops): Likewise.
6728 (all_probe_ops): Change type to std::vector.
6729 (_initialize_probe): Adjust to vector change.
6730 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6731 * elfread.c (elf_get_probes): Likewise.
6732 * stap-probe.c (_initialize_stap_probe): Likewise.
6733
1eac6bea
SM
67342017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6735
6736 * probe.h (struct bound_probe): Define constructors.
6737 * probe.c (bound_probe_s): Remove typedef.
6738 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6739 (collect_probes): Change return type to std::vector, remove
6740 cleanup.
6741 (compare_probes): Return bool, change parameter type. Change
6742 semantic to "less than".
6743 (gen_ui_out_table_header_info): Change parameter to std::vector
6744 and update.
6745 (exists_probe_with_pops): Likewise.
6746 (info_probes_for_ops): Update to std::vector change.
6747 (enable_probes_command): Likewise.
6748 (disable_probes_command): Likewise.
6749
aaa63a31
SM
67502017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6751
6752 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6753 vec to std::vector.
6754 * probe.c (parse_probes_in_pspace): Update.
6755 (find_probes_in_objfile): Update.
6756 (find_probe_by_pc): Update.
6757 (collect_probes): Update.
6758 (probe_any_get_probes): Update.
6759 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6760 return type to reference to std::vector.
6761 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6762 std::vector and update.
6763 (dtrace_process_dof): Likewise.
6764 (dtrace_get_probes): Likewise.
6765 * elfread.c (elf_get_probes): Change return type to std::vector,
6766 store an std::vector in bfd_data.
6767 (probe_key_free): Update to std::vector.
6768 * stap-probe.c (handle_stap_probe): Change parameter to
6769 std::vector and update.
6770 (stap_get_probes): Likewise.
6771 * symfile-debug.c (debug_sym_get_probes): Change return type to
6772 std::vector and update.
6773
cb85b21b
TT
67742017-09-11 Tom Tromey <tom@tromey.com>
6775
6776 * breakpoint.c (program_breakpoint_here_p): Update.
6777 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6778 from make_show_memory_breakpoints_cleanup. Return a
6779 scoped_restore_tmpl<int>.
6780 (restore_show_memory_breakpoints): Remove.
6781 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6782 * mem-break.c (memory_validate_breakpoint): Update.
6783 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6784 (ia64_memory_remove_breakpoint): Update.
6785 (ia64_breakpoint_from_pc): Update.
6786 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6787 from make_show_memory_breakpoints_cleanup.
6788
8fbc99ef
TT
67892017-09-11 Tom Tromey <tom@tromey.com>
6790
6791 * d-namespace.c (d_lookup_symbol): Use std::string.
6792 (find_symbol_in_baseclass): Likewise.
6793
50feb4bd
TT
67942017-09-11 Tom Tromey <tom@tromey.com>
6795
6796 * ctf.c (ctf_start): Use std::string.
6797
c6dc63a1
TT
67982017-09-11 Tom Tromey <tom@tromey.com>
6799
6800 * ada-lang.c (is_known_support_routine): Update.
6801 (ada_unhandled_exception_name_addr_from_raise): Update.
6802 * guile/scm-frame.c (gdbscm_frame_name): Update.
6803 * python/py-frame.c (frapy_name): Update.
6804 (frapy_function): Update.
6805 * stack.h (find_frame_funname): Update.
6806 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6807 (print_frame): Update.
6808
d6b9b80f
TT
68092017-09-11 Tom Tromey <tom@tromey.com>
6810
6811 * findcmd.c (put_bits): Take a gdb::byte_vector.
6812 (parse_find_args): Return gdb::byte_vector. "args" now const.
6813 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6814 cleanups.
6815 (find_command): Update.
6816
a9921622
TT
68172017-09-11 Tom Tromey <tom@tromey.com>
6818
6819 * cli/cli-script.c (class scoped_restore_hook_in): New.
6820 (clear_hook_in_cleanup): Remove.
6821 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6822 scoped_restore_hook_in.
6823
be0d7abb
TT
68242017-09-11 Tom Tromey <tom@tromey.com>
6825
6826 * cli/cli-script.c (restore_interp): Remove.
6827 (read_command_lines): Use scoped_restore_interp.
6828 * interps.c (scoped_restore_interp::set_temp): Rename from
6829 interp_set_temp.
6830 * interps.h (class scoped_restore_interp): New.
6831 (interp_set_temp): Remove.
6832
00f675ff
TT
68332017-09-11 Tom Tromey <tom@tromey.com>
6834
6835 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6836 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6837 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6838 scoped_restore.
6839 (mi_cmd_break_insert_1): Update.
6840 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6841 scoped_restore.
6842
cb791d59
TT
68432017-09-11 Tom Tromey <tom@tromey.com>
6844
6845 * demangle.c (demangle_command): Update.
6846 * breakpoint.c (disable_command): Update.
6847 (enable_command): Update.
6848 (find_location_by_number): Make "number" const. Use
6849 get_number_trailer.
6850 * cli/cli-utils.c (extract_arg): Return std::string.
6851 * probe.c (parse_probe_linespec): Update. Change types.
6852 (collect_probes): Take string arguments.
6853 (parse_probe_linespec): Likewise.
6854 (info_probes_for_ops): Update.
6855 (enable_probes_command): Update.
6856 (disable_probes_command): Update.
6857 * break-catch-sig.c (catch_signal_split_args): Update.
6858 * mi/mi-parse.c (mi_parse): Update.
6859
2039bd9f
TT
68602017-09-11 Tom Tromey <tom@tromey.com>
6861
6862 * language.h (language_enum): Make argument const.
6863 * language.c (language_enum): Make argument const.
6864
f1735a53
TT
68652017-09-11 Tom Tromey <tom@tromey.com>
6866
6867 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6868 as function.
6869 (skip_to_space): Rename from skip_to_space_const.
6870 * common/common-utils.c (skip_to_space): New function.
6871 (skip_to_space): Rename from skip_to_space_const.
6872 * cli/cli-utils.h (get_number): Rename from get_number_const.
6873 (extract_arg): Rename from extract_arg_const.
6874 * cli/cli-utils.c (get_number): Rename from get_number_const.
6875 (extract_arg): Rename from extract_arg_const.
6876 (number_or_range_parser::get_number): Use ::get_number.
6877 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6878 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6879 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6880 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6881 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6882 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6883 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6884 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6885
7d221d74
TT
68862017-09-11 Tom Tromey <tom@tromey.com>
6887
6888 * python/python.c (do_start_initialization): Use
6889 py-event-types.def to initialize types.
6890 Define all object type structures.
6891 * python/python-internal.h: Don't declare event initialization
6892 functions.
6893 * python/py-threadevent.c (thread_event_object_type): Don't
6894 define.
6895 * python/py-stopevent.c (stop_event_object_type): Don't define.
6896 * python/py-signalevent.c (signal_event_object_type): Don't
6897 declare or define.
6898 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6899 (clear_objfiles_event_object_type): Don't declare or define.
6900 * python/py-infevents.c (inferior_call_pre_event_object_type)
6901 (inferior_call_post_event_object_type)
6902 (register_changed_event_object_type)
6903 (memory_changed_event_object_type): Don't declare or define.
6904 * python/py-inferior.c (new_thread_event_object_type)
6905 (new_inferior_event_object_type)
6906 (inferior_deleted_event_object_type): Don't declare or define.
6907 * python/py-exitedevent.c (exited_event_object_type): Don't
6908 declare or define.
6909 * python/py-evts.c (gdbpy_initialize_py_events): Use
6910 py-all-events.def.
6911 * python/py-events.h (thread_event_object_type): Don't declare.
6912 (events_object): Use py-all-events.def.
6913 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6914 py-event-types.def.
6915 * python/py-event-types.def: New file.
6916 * python/py-continueevent.c (create_continue_event_object): Don't
6917 declare or define.
6918 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6919 declare or define.
6920 * python/py-all-events.def: New file.
6921
35c61a1d
TT
69222017-09-11 Tom Tromey <tom@tromey.com>
6923
6924 * python/py-threadevent.c (create_thread_event_object): Return
6925 gdbpy_ref.
6926 * python/py-stopevent.h (create_stop_event_object)
6927 (create_breakpoint_event_object, create_signal_event_object):
6928 Update.
6929 * python/py-stopevent.c (create_stop_event_object): Return
6930 gdbpy_ref.
6931 (emit_stop_event): Update.
6932 * python/py-signalevent.c (create_signal_event_object): Return
6933 gdbpy_ref.
6934 * python/py-infevents.c (create_inferior_call_event_object):
6935 Update.
6936 * python/py-event.h (create_event_object)
6937 (create_thread_event_object): Update.
6938 * python/py-event.c (create_event_object): Return gdbpy_ref.
6939 * python/py-continueevent.c: Return gdbpy_ref.
6940 * python/py-bpevent.c (create_breakpoint_event_object): Return
6941 gdbpy_ref.
6942
7c96f8c1
TT
69432017-09-11 Tom Tromey <tom@tromey.com>
6944
6945 PR python/15622:
6946 * NEWS: Add entry.
6947 * python/python.c (do_start_initialization): Initialize new event
6948 types.
6949 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6950 (gdbpy_initialize_inferior_deleted_event)
6951 (gdbpy_initialize_new_thread_event): Declare.
6952 * python/py-threadevent.c (create_thread_event_object): Add option
6953 "thread" parameter.
6954 * python/py-inferior.c (new_thread_event_object_type)
6955 (new_inferior_event_object_type)
6956 (inferior_deleted_event_object_type): Declare.
6957 (python_new_inferior, python_inferior_deleted): New functions.
6958 (add_thread_object): Emit new_thread event.
6959 (gdbpy_initialize_inferior): Attach new functions to corresponding
6960 observers.
6961 (new_thread, new_inferior, inferior_deleted): Define new event
6962 types.
6963 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6964 registries.
6965 * python/py-events.h (events_object) <new_inferior,
6966 inferior_deleted, new_thread>: New fields.
6967 * python/py-event.h (create_thread_event_breakpoint): Add optional
6968 "thread" parameter.
6969
72542b8e
AB
69702017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6971
6972 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6973 check current_ui instead.
6974 (internal_vproblem): Likewise.
6975
0d64823e
SM
69762017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6977
6978 * thread.c (print_thread_info_1): Remove unnecessary calls to
6979 uiout->is_mi_like_p.
6980
eb1e02fd
TT
69812017-09-09 Tom Tromey <tom@tromey.com>
6982
6983 * namespace.h (add_using_directive): Update.
6984 * namespace.c (add_using_directive): Change type of excludes to
6985 std::vector.
6986 * dwarf2read.c (read_import_statement): Use std::vector.
6987 (read_namespace): Update.
6988 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6989
0fc21fd8
TT
69902017-09-09 Tom Tromey <tom@tromey.com>
6991
6992 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6993
49663d05
TT
69942017-09-09 Tom Tromey <tom@tromey.com>
6995
6996 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6997
0b868b60
TT
69982017-09-09 Tom Tromey <tom@tromey.com>
6999
7000 * stack.c (func_command): Use gdb::def_vector.
7001
c0470d48
TT
70022017-09-09 Tom Tromey <tom@tromey.com>
7003
7004 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7005 ui_out_emit_list, ui_out_emit_tuple.
7006 (mi_cmd_var_update): Likewise.
7007
ca5909c7
TT
70082017-09-09 Tom Tromey <tom@tromey.com>
7009
7010 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7011 ui_out_redirect_pop.
7012 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7013 ui_out_redirect_pop.
7014 * utils.c (do_ui_out_redirect_pop)
7015 (make_cleanup_ui_out_redirect_pop): Remove.
7016 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7017 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7018 * ui-out.h (ui_out_redirect_pop): New class.
7019
e6a2252a
TT
70202017-09-09 Tom Tromey <tom@tromey.com>
7021
7022 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7023 (list_available_thread_groups, mi_cmd_list_thread_groups)
7024 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7025 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7026 Likewise.
7027
393702cd
TT
70282017-09-09 Tom Tromey <tom@tromey.com>
7029
7030 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7031 ui_out_emit_tuple.
7032
76f9c9cf
TT
70332017-09-09 Tom Tromey <tom@tromey.com>
7034
7035 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7036 * stack.c (print_frame): Use ui_out_emit_tuple.
7037 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7038 (info_spu_mailbox_command, info_spu_dma_command)
7039 (info_spu_proxydma_command): Likewise.
7040 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7041 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7042 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7043 ui_out_emit_tuple.
7044 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7045
dc9fe180
TT
70462017-09-09 Tom Tromey <tom@tromey.com>
7047
7048 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7049 (class ui_out_emit_table): Update comment.
7050 * ui-out.c (do_cleanup_table_end)
7051 (make_cleanup_ui_out_table_begin_end): Remove.
7052 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7053 (info_spu_dma_cmdlist): Likewise.
7054 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7055 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7056 ui_out_emit_table.
7057
f8cc3da6
TT
70582017-09-09 Tom Tromey <tom@tromey.com>
7059
7060 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7061 ui_out_emit_list, gdb::optional.
7062
481695ed
JB
70632017-09-09 John Baldwin <jhb@FreeBSD.org>
7064
7065 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7066 prototype.
7067 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7068 prototype.
7069 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7070 prototype.
7071 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7072 * ada-exp.y: Remove _initialize_ada_exp prototype.
7073 * ada-lang.c: Remove _initialize_ada_language prototype.
7074 * ada-tasks.c: Remove _initialize_tasks prototype.
7075 * addrmap.c: Remove _initialize_addrmap prototype.
7076 * agent.c: Remove _initialize_agent prototype.
7077 * aix-thread.c: Remove _initialize_aix_thread prototype.
7078 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7079 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7080 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7081 prototype.
7082 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7083 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7084 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7085 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7086 prototype.
7087 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7088 prototype.
7089 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7090 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7091 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7092 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7093 prototype.
7094 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7095 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7096 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7097 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7098 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7099 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7100 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7101 prototype.
7102 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7103 prototype.
7104 * annotate.c: Remove _initialize_annotate prototype.
7105 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7106 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7107 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7108 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7109 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7110 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7111 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7112 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7113 prototype.
7114 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7115 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7116 * auto-load.c: Remove _initialize_auto_load prototype.
7117 * auxv.c: Remove _initialize_auxv prototype.
7118 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7119 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7120 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7121 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7122 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7123 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7124 prototype.
7125 * break-catch-throw.c: Remove _initialize_break_catch_throw
7126 prototype.
7127 * breakpoint.c: Remove _initialize_breakpoint prototype.
7128 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7129 * btrace.c: Remove _initialize_btrace prototype.
7130 * charset.c: Remove _initialize_charset prototype.
7131 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7132 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7133 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7134 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7135 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7136 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7137 * coffread.c: Remove _initialize_coffread prototype.
7138 * compile/compile.c: Remove _initialize_compile prototype.
7139 * complaints.c: Remove _initialize_complaints prototype.
7140 * completer.c: Remove _initialize_completer prototype.
7141 * copying.awk: Remove _initialize_copying prototype.
7142 * copying.c: Regenerate.
7143 * core-regset.c: Remove _initialize_core_regset prototype.
7144 * corefile.c: Remove _initialize_core prototype.
7145 * corelow.c: Remove _initialize_corelow prototype.
7146 * cp-abi.c: Remove _initialize_cp_abi prototype.
7147 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7148 * cp-support.c: Remove _initialize_cp_support prototype.
7149 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7150 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7151 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7152 * ctf.c: Remove _initialize_ctf prototype.
7153 * d-lang.c: Remove _initialize_d_language prototype.
7154 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7155 prototype.
7156 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7157 * dbxread.c: Remove _initialize_dbxread prototype.
7158 * dcache.c: Remove _initialize_dcache prototype.
7159 * demangle.c: Remove _initialize_demangler prototype.
7160 * disasm-selftests.c: Remove _initialize_disasm_selftests
7161 prototype.
7162 * disasm.c: Remove _initialize_disasm prototype.
7163 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7164 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7165 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7166 prototype.
7167 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7168 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7169 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7170 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7171 * elfread.c: Remove _initialize_elfread prototype.
7172 * exec.c: Remove _initialize_exec prototype.
7173 * extension.c: Remove _initialize_extension prototype.
7174 * f-lang.c: Remove _initialize_f_language prototype.
7175 * f-valprint.c: Remove _initialize_f_valprint prototype.
7176 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7177 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7178 * filesystem.c: Remove _initialize_filesystem prototype.
7179 * findcmd.c: Remove _initialize_mem_search prototype.
7180 * fork-child.c: Remove _initialize_fork_child prototype.
7181 * frame-base.c: Remove _initialize_frame_base prototype.
7182 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7183 * frame.c: Remove _initialize_frame prototype.
7184 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7185 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7186 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7187 * gcore.c: Remove _initialize_gcore prototype.
7188 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7189 * gdbarch.c: Regenerate.
7190 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7191 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7192 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7193 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7194 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7195 * go-lang.c: Remove _initialize_go_language prototype.
7196 * go32-nat.c: Remove _initialize_go32_nat prototype.
7197 * guile/guile.c: Remove _initialize_guile prototype.
7198 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7199 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7200 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7201 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7202 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7203 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7204 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7205 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7206 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7207 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7208 prototype.
7209 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7210 prototype.
7211 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7212 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7213 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7214 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7215 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7216 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7217 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7218 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7219 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7220 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7221 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7222 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7223 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7224 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7225 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7226 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7227 prototype.
7228 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7229 prototype.
7230 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7231 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7232 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7233 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7234 * infcall.c: Remove _initialize_infcall prototype.
7235 * infcmd.c: Remove _initialize_infcmd prototype.
7236 * inferior.c: Remove _initialize_inferiors prototype.
7237 * inflow.c: Remove _initialize_inflow prototype.
7238 * infrun.c: Remove _initialize_infrun prototype.
7239 * interps.c: Remove _initialize_interpreter prototype.
7240 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7241 * jit.c: Remove _initialize_jit prototype.
7242 * language.c: Remove _initialize_language prototype.
7243 * linux-fork.c: Remove _initialize_linux_fork prototype.
7244 * linux-nat.c: Remove _initialize_linux_nat prototype.
7245 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7246 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7247 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7248 * m2-lang.c: Remove _initialize_m2_language prototype.
7249 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7250 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7251 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7252 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7253 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7254 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7255 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7256 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7257 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7258 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7259 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7260 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7261 * machoread.c: Remove _initialize_machoread prototype.
7262 * macrocmd.c: Remove _initialize_macrocmd prototype.
7263 * macroscope.c: Remove _initialize_macroscope prototype.
7264 * maint.c: Remove _initialize_maint_cmds prototype.
7265 * mdebugread.c: Remove _initialize_mdebugread prototype.
7266 * memattr.c: Remove _initialize_mem prototype.
7267 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7268 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7269 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7270 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7271 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7272 * microblaze-linux-tdep.c: Remove
7273 _initialize_microblaze_linux_tdep prototype.
7274 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7275 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7276 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7277 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7278 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7279 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7280 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7281 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7282 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7283 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7284 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7285 prototype.
7286 * mipsread.c: Remove _initialize_mipsread prototype.
7287 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7288 prototype.
7289 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7290 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7291 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7292 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7293 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7294 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7295 prototype.
7296 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7297 * nto-procfs.c: Remove _initialize_procfs prototype.
7298 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7299 * objc-lang.c: Remove _initialize_objc_language prototype.
7300 * objfiles.c: Remove _initialize_objfiles prototype.
7301 * observer.c: Remove observer_test_first_notification_function,
7302 observer_test_second_notification_function,
7303 observer_test_third_notification_function, and
7304 _initialize_observer prototypes.
7305 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7306 * osabi.c: Remove _initialize_gdb_osabi prototype.
7307 * osdata.c: Remove _initialize_osdata prototype.
7308 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7309 * parse.c: Remove _initialize_parse prototype.
7310 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7311 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7312 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7313 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7314 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7315 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7316 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7317 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7318 * printcmd.c: Remove _initialize_printcmd prototype.
7319 * probe.c: Remove _initialize_probe prototype.
7320 * proc-api.c: Remove _initialize_proc_api prototype.
7321 * proc-events.c: Remove _initialize_proc_events prototype.
7322 * proc-service.c: Remove _initialize_proc_service prototype.
7323 * procfs.c: Remove _initialize_procfs prototype.
7324 * psymtab.c: Remove _initialize_psymtab prototype.
7325 * python/python.c: Remove _initialize_python prototype.
7326 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7327 * record-btrace.c: Remove _initialize_record_btrace prototype.
7328 * record-full.c: Remove _initialize_record_full prototype.
7329 * record.c: Remove _initialize_record prototype.
7330 * regcache.c: Remove _initialize_regcache prototype.
7331 * reggroups.c: Remove _initialize_reggroup prototype.
7332 * remote-notif.c: Remove _initialize_notif prototype.
7333 * remote-sim.c: Remove _initialize_remote_sim prototype.
7334 * remote.c: Remove _initialize_remote prototype.
7335 * reverse.c: Remove _initialize_reverse prototype.
7336 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7337 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7338 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7339 prototype.
7340 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7341 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7342 * rust-exp.y: Remove _initialize_rust_exp prototype.
7343 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7344 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7345 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7346 * score-tdep.c: Remove _initialize_score_tdep prototype.
7347 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7348 prototype.
7349 * ser-go32.c: Remove _initialize_ser_dos prototype.
7350 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7351 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7352 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7353 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7354 * serial.c: Remove _initialize_serial prototype.
7355 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7356 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7357 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7358 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7359 * skip.c: Remove _initialize_step_skip prototype.
7360 * sol-thread.c: Remove _initialize_sol_thread prototype.
7361 * solib-aix.c: Remove _initialize_solib_aix prototype.
7362 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7363 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7364 * solib-frv.c: Remove _initialize_frv_solib prototype.
7365 * solib-spu.c: Remove _initialize_spu_solib prototype.
7366 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7367 * solib-target.c: Remove _initialize_solib_target prototype.
7368 * solib.c: Remove _initialize_solib prototype.
7369 * source.c: Remove _initialize_source prototype.
7370 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7371 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7372 prototype.
7373 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7374 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7375 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7376 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7377 prototype.
7378 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7379 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7380 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7381 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7382 prototype.
7383 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7384 prototype.
7385 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7386 prototype.
7387 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7388 prototype.
7389 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7390 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7391 prototype.
7392 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7393 prototype.
7394 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7395 prototype.
7396 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7397 prototype.
7398 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7399 prototype.
7400 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7401 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7402 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7403 * stabsread.c: Remove _initialize_stabsread prototype.
7404 * stack.c: Remove _initialize_stack prototype.
7405 * stap-probe.c: Remove _initialize_stap_probe prototype.
7406 * std-regs.c: Remove _initialize_frame_reg prototype.
7407 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7408 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7409 * symfile.c: Remove _initialize_symfile prototype.
7410 * symmisc.c: Remove _initialize_symmisc prototype.
7411 * symtab.c: Remove _initialize_symtab prototype.
7412 * target-dcache.c: Remove _initialize_target_dcache prototype.
7413 * target-descriptions.c: Remove _initialize_target_descriptions
7414 prototype.
7415 * thread.c: Remove _initialize_thread prototype.
7416 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7417 prototype.
7418 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7419 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7420 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7421 prototype.
7422 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7423 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7424 * tracefile.c: Remove _initialize_tracefile prototype.
7425 * tracepoint.c: Remove _initialize_tracepoint prototype.
7426 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7427 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7428 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7429 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7430 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7431 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7432 * tui/tui.c: Remove _initialize_tui prototype.
7433 * typeprint.c: Remove _initialize_typeprint prototype.
7434 * user-regs.c: Remove _initialize_user_regs prototype.
7435 * utils.c: Remove _initialize_utils prototype.
7436 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7437 * valarith.c: Remove _initialize_valarith prototype.
7438 * valops.c: Remove _initialize_valops prototype.
7439 * valprint.c: Remove _initialize_valprint prototype.
7440 * value.c: Remove _initialize_values prototype.
7441 * varobj.c: Remove _initialize_varobj prototype.
7442 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7443 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7444 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7445 * windows-nat.c: Remove _initialize_windows_nat,
7446 _initialize_check_for_gdb_ini, and _initialize_loadable
7447 prototypes.
7448 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7449 * xcoffread.c: Remove _initialize_xcoffread prototype.
7450 * xml-support.c: Remove _initialize_xml_support prototype.
7451 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7452 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7453 prototype.
7454 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7455 prototype.
7456 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7457
a611b5cb
KS
74582017-09-08 Keith Seitz <keiths@redhat.com>
7459
7460 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7461 field.
7462
469412dd
CW
74632017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7464
7465 * f-valprint.c (f_val_print): Remove check for one byte
7466 sized integers. Remove printing of character type.
7467
a5ad232b
FP
74682017-09-08 Frank Penczek <frank.penczek@intel.com>
7469 Christoph Weinmann <christoph.t.weinmann@intel.com>
7470 Bernhard Heckel <bernhard.heckel@intel.com>
7471
7472 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7473 to maintain proper indentation when printing pointers/refs.
7474
e5014227
JB
74752017-09-07 Joel Brobecker <brobecker@adacore.com>
7476
7477 GDB 8.0.1 released.
7478
63c99141
JB
74792017-09-07 Joel Brobecker <brobecker@adacore.com>
7480
7481 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7482
69c1e056
TT
74832017-09-05 Tom Tromey <tom@tromey.com>
7484
7485 * parse.c (funcall_chain): Now a std::vector.
7486 (start_arglist, end_arglist): Simplify.
7487 (free_funcalls): Remove.
7488 (parse_exp_in_context_1): Remove cleanup.
7489
fef704bf
TT
74902017-09-05 Tom Tromey <tom@tromey.com>
7491
7492 * go-exp.y (go_parse): Don't create a cleanup.
7493
5613c585
TT
74942017-09-05 Tom Tromey <tom@tromey.com>
7495
7496 * d-exp.y (PrimaryExpression): Use std::string.
7497 (d_parse): Don't create a cleanup.
7498
eae49211
TT
74992017-09-05 Tom Tromey <tom@tromey.com>
7500
7501 * utils.c (do_clear_parser_state): Remove.
7502 (make_cleanup_clear_parser_state): Remove.
7503 * p-exp.y (pascal_parse): Use scoped_restore.
7504 * m2-exp.y (m2_parse): Use scoped_restore.
7505 * f-exp.y (f_parse): Use scoped_restore.
7506 * d-exp.y (d_parse): Use scoped_restore.
7507 * c-exp.y (c_parse): Use scoped_restore.
7508 * ada-exp.y (ada_parse): Use scoped_restore.
7509 * utils.h (make_cleanup_clear_parser_state): Remove.
7510
73b9be8b
KS
75112017-09-06 Keith Seitz <keiths@redhat.com>
7512
7513 * dwarf2read.c (dw2_linkage_name_attr): New function.
7514 (dw2_linkage_name): New function.
7515 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7516 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7517 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7518
a102602b
KR
75192017-09-06 Kamil Rytarowski <n54@gmx.com>
7520
7521 * config/djgpp/djconfig.sh: Correct shell portability issue.
7522
28ad437d
KR
75232017-09-06 Kamil Rytarowski <n54@gmx.com>
7524
7525 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7526
351787dd
JB
75272017-09-06 John Baldwin <jhb@FreeBSD.org>
7528
7529 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7530 * NEWS: Mention new FreeBSD/mips native configuration.
7531 * configure.host: Add aarch64*-*-freebsd*.
7532 * configure.nat: Likewise.
7533 * aarch64-fbsd-nat.c: New file.
7534
c0f84956
JB
75352017-09-06 John Baldwin <jhb@FreeBSD.org>
7536
7537 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7538 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7539 * NEWS: Mention new FreeBSD/aarch64 target.
7540 * configure.tgt: Add aarch64*-*-freebsd*.
7541 * aarch64-fbsd-tdep.c: New file.
7542 * aarch64-fbsd-tdep.h: New file.
7543
7610297a
KR
75442017-09-06 Kamil Rytarowski <n54@gmx.com>
7545
7546 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7547
fbd1b771
JK
75482017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7549
7550 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7551 of TLS symbols.
7552
5ca79eae
PW
75532017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7554
7555 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7556 call.
7557
bf93d7ba
SM
75582017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7559
7560 * infrun.c (follow_exec): Call add_thread after
7561 target_find_description.
7562
1bb7c059
SM
75632017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7564
7565 * infrun.c (handle_inferior_event_1): When exec'ing, read
7566 stop_pc after follow_exec.
7567
fc809827
SM
75682017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7569
7570 * remote.c (process_g_packet): Update error message.
7571
d2fcdd85
YQ
75722017-09-05 Yao Qi <yao.qi@linaro.org>
7573
7574 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7575 targets.
7576
e69570ee
PA
75772017-09-05 Pedro Alves <palves@redhat.com>
7578
7579 * eval.c (eval_call, evaluate_funcall): New functions, factored
7580 out from ...
7581 (evaluate_subexp_standard): ... this.
7582
22916b07
YQ
75832017-09-05 Yao Qi <yao.qi@linaro.org>
7584
7585 * amd64-tdep.c (amd64_target_description): Create target
7586 descriptions.
7587 (_initialize_amd64_tdep): Don't call functions
7588 initialize_tdesc_amd64_*. Add self tests.
7589 * arch/amd64.c (amd64_create_target_description): Add parameter
7590 is_linux. Call set_tdesc_osabi if is_linux is true.
7591 * arch/amd64.h (amd64_create_target_description): Update the
7592 declaration.
7593 * arch/i386.c (i386_create_target_description): Add parameter
7594 is_linux. Call set_tdesc_osabi if is_linux is true.
7595 * arch/i386.h (i386_create_target_description): Update
7596 declaration.
7597 * configure.tgt: Add i386.o to gdb_target_obs.
7598 * features/Makefile (XMLTOC): Remove i386/*.xml.
7599 * features/i386/amd64-avx-avx512.c: Remove.
7600 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7601 * features/i386/amd64-avx-mpx.c: Remove.
7602 * features/i386/amd64-avx.c: Remove.
7603 * features/i386/amd64-mpx.c: Remove.
7604 * features/i386/amd64.c: Remove.
7605 * features/i386/i386-avx-avx512.c: Remove.
7606 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7607 * features/i386/i386-avx-mpx.c: Remove.
7608 * features/i386/i386-avx.c: Remove.
7609 * features/i386/i386-mmx.c: Remove.
7610 * features/i386/i386-mpx.c: Remove.
7611 * features/i386/i386.c: Remove.
7612 * i386-tdep.c: Don't include features/i386/i386*.c., include
7613 target-descriptions.h and arch/i386.h.
7614 (i386_target_description): Create target descriptions.
7615 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7616 functions. Do self tests.
7617
0854b7b1
YQ
76182017-09-05 Yao Qi <yao.qi@linaro.org>
7619
7620 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7621 * features/i386/amd64-avx-avx512-linux.c: Removed.
7622 * features/i386/amd64-avx-linux.c: Removed.
7623 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7624 * features/i386/amd64-avx-mpx-linux.c: Removed.
7625 * features/i386/amd64-linux.c: Removed.
7626 * features/i386/amd64-mpx-linux.c: Removed.
7627 * features/i386/x32-avx-avx512-linux.c: Removed.
7628 * features/i386/x32-avx-linux.c: Removed.
7629 * features/i386/x32-linux.c: Removed.
7630
b4570e4b
YQ
76312017-09-05 Yao Qi <yao.qi@linaro.org>
7632
7633 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7634 features/i386/*.c.
7635 (amd64_linux_read_description): Call
7636 amd64_create_target_description.
7637 * arch/amd64.c: New file.
7638 * arch/amd64.h: New file.
7639 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7640 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7641
6c73f67f
YQ
76422017-09-05 Yao Qi <yao.qi@linaro.org>
7643
7644 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7645 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7646 (amd64_linux_read_description): Create target descriptions.
7647 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7648 functions. Add unit tests.
7649 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7650 x32-core.xml.
7651 * features/i386/64bit-avx.c: Generated.
7652 * features/i386/64bit-avx512.c: Generated.
7653 * features/i386/64bit-core.c: Generated.
7654 * features/i386/64bit-linux.c: Generated.
7655 * features/i386/64bit-mpx.c: Generated.
7656 * features/i386/64bit-pkeys.c: Generated.
7657 * features/i386/64bit-segments.c: Generated.
7658 * features/i386/64bit-sse.c: Generated.
7659 * features/i386/x32-core.c: Generated.
7660 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7661 c files for amd64-linux and x32-linux.
7662
9d3d478b
YQ
76632017-09-05 Yao Qi <yao.qi@linaro.org>
7664
7665 * amd64-linux-tdep.c (amd64_linux_read_description): New
7666 function.
7667 (amd64_linux_core_read_description): Call
7668 amd64_linux_read_description.
7669 (amd64_linux_init_abi): Likewise.
7670 (amd64_x32_linux_init_abi): Likewise.
7671 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7672 * x86-linux-nat.c (x86_linux_read_description): Call
7673 amd64_linux_read_description.
7674
b9f1d50f
YQ
76752017-09-05 Yao Qi <yao.qi@linaro.org>
7676
7677 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7678 comments.
7679
188c9e6d
YQ
76802017-09-05 Yao Qi <yao.qi@linaro.org>
7681
7682 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7683 * features/i386/i386-avx-avx512-linux.c: Remove.
7684 * features/i386/i386-avx-linux.c: Remove.
7685 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7686 * features/i386/i386-avx-mpx-linux.c: Remove.
7687 * features/i386/i386-linux.c: Remove.
7688 * features/i386/i386-mmx-linux.c: Remove.
7689 * features/i386/i386-mpx-linux.c: Remove.
7690
5f035c07
YQ
76912017-09-05 Yao Qi <yao.qi@linaro.org>
7692
7693 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7694 (SFILES): Add arch/i386.c.
7695 (HFILES_NO_SRCDIR): Add arch/i386.h.
7696 * arch/i386.c: New file.
7697 * arch/i386.h: New file.
7698 * arch/tdesc.h (allocate_target_description): Declare.
7699 (set_tdesc_architecture): Declare.
7700 (set_tdesc_osabi): Declare.
7701 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7702 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7703 include arch/i386.h.
7704 (i386_linux_read_description): Remove code and call
7705 i386_create_target_description.
7706 (set_tdesc_architecture): New function.
7707 (set_tdesc_osabi): New function.
7708 * target-descriptions.h (allocate_target_description): Remove.
7709
0abe8a89
YQ
77102017-09-05 Yao Qi <yao.qi@linaro.org>
7711
7712 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7713 * target-descriptions.c (tdesc_create_feature): Likewise, and
7714 adjust code.
7715 * features/i386/32bit-avx.c: Re-generated.
7716 * features/i386/32bit-avx512.c: Re-generated.
7717 * features/i386/32bit-core.c: Re-generated.
7718 * features/i386/32bit-linux.c: Re-generated.
7719 * features/i386/32bit-mpx.c: Re-generated.
7720 * features/i386/32bit-pkeys.c: Re-generated.
7721 * features/i386/32bit-sse.c: Re-generated.
7722
0a188386
YQ
77232017-09-05 Yao Qi <yao.qi@linaro.org>
7724
7725 * regformats/regdef.h (struct reg): Override operator == and !=.
7726
f49ff000
YQ
77272017-09-05 Yao Qi <yao.qi@linaro.org>
7728
7729 * arch/tdesc.h: New file.
7730 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7731 * target-descriptions.c: Update comments.
7732 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7733 declarations.
7734 * features/i386/32bit-avx.c: Re-generated.
7735 * features/i386/32bit-avx512.c: Re-generated.
7736 * features/i386/32bit-core.c: Re-generated.
7737 * features/i386/32bit-linux.c: Re-generated.
7738 * features/i386/32bit-mpx.c: Re-generated.
7739 * features/i386/32bit-pkeys.c: Re-generated.
7740 * features/i386/32bit-sse.c: Re-generated.
7741
f7000548
YQ
77422017-09-05 Yao Qi <yao.qi@linaro.org>
7743
7744 * regformats/regdat.sh: Update generated code.
7745
c9a5e2a5
YQ
77462017-09-05 Yao Qi <yao.qi@linaro.org>
7747
7748 * regformats/regdat.sh: Adjust code order.
7749
d6b687ac
SM
77502017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7751
7752 * expprint.c (dump_subexp_body_standard): Use constant format
7753 string in fprintf_filtered call.
7754
a379bfd0
JB
77552017-09-04 John Baldwin <jhb@FreeBSD.org>
7756
7757 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7758 NetBSD/i386.
7759 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7760
f7efc967
JB
77612017-09-04 John Baldwin <jhb@FreeBSD.org>
7762
7763 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7764
c49fbc6c
JB
77652017-09-04 John Baldwin <jhb@FreeBSD.org>
7766
7767 * bsd-kvm.o: Define _KMEMUSER.
7768 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7769 * configure: Regenerate.
7770
26562e73
JB
77712017-09-04 John Baldwin <jhb@FreeBSD.org>
7772
7773 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7774 * i386-fbsd-nat.c: Likewise.
7775
31cf1487
JB
77762017-09-04 John Baldwin <jhb@FreeBSD.org>
7777
7778 * unittests/array-view-selftests.c: Add include of <array>.
7779
5b9f8a7c
JB
77802017-09-04 John Baldwin <jhb@FreeBSD.org>
7781
7782 * spu-tdep.c (flush_ea_cache): Add missing argument to
7783 call_function_by_hand.
7784
d69cf9b2
PA
77852017-09-04 Pedro Alves <palves@redhat.com>
7786
7787 * NEWS (Safer support for debugging with no debug info): New.
7788
3693fdb3
PA
77892017-09-04 Pedro Alves <palves@redhat.com>
7790
7791 * c-exp.y (function_method, function_method_void): Add current
7792 instance flags to TYPE_INSTANCE.
7793 * dwarf2read.c (check_modifier): New.
7794 (compute_delayed_physnames): Assert that only C++ adds delayed
7795 physnames. Mark fn_fields as const/volatile depending on
7796 physname.
7797 * eval.c (make_params): New type_instance_flags parameter. Use
7798 it as the new type's instance flags.
7799 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7800 flags element and pass it to make_params.
7801 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7802 instance flags element.
7803 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7804 * gdbtypes.h: Include "enum-flags.h".
7805 (type_instance_flags): New enum-flags type.
7806 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7807 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7808 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7809 (follow_type_instance_flags): New function.
7810 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7811 * parser-defs.h (follow_type_instance_flags): Declare.
7812 * valops.c (value_struct_elt_for_reference): const/volatile must
7813 match too.
7814
e68cb8e0
PA
78152017-09-04 Pedro Alves <palves@redhat.com>
7816
7817 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7818 function/method scopes; lookup the nested name as a function local
7819 static variable.
7820
858be34c
PA
78212017-09-04 Pedro Alves <palves@redhat.com>
7822
7823 (%type <voidval>): Add function_method.
7824 * c-exp.y (exp): New production for calls with no arguments.
7825 (function_method, function_method_void_or_typelist): New
7826 productions.
7827 (exp): New production for "method()::static_var".
7828 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7829 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7830 Handle OP_FUNC_STATIC_VAR.
7831 * parse.c (operator_length_standard):
7832 Handle OP_FUNC_STATIC_VAR.
7833
dd5901a6
PA
78342017-09-04 Pedro Alves <palves@redhat.com>
7835
7836 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7837 handling.
7838 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7839 Ditto.
7840 * parse.c (operator_length_standard, operator_check_standard):
7841 Ditto.
7842 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7843
46a4882b
PA
78442017-09-04 Pedro Alves <palves@redhat.com>
7845
7846 * ax-gdb.c: Include "typeprint.h".
7847 (gen_expr_for_cast): New function.
7848 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7849 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7850 type is unknown.
7851 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7852 nodebug_data_symbol.
7853 * eval.c: Include "typeprint.h".
7854 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7855 Error out if symbol has unknown type.
7856 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7857 evaluate_subexp_for_cast.
7858 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7859 OP_VAR_MSYM_VALUE.
7860 (evaluate_subexp_for_cast): New function.
7861 * gdbtypes.c (init_nodebug_var_type): New function.
7862 (objfile_type): Use it to initialize types of variables with no
7863 debug info.
7864 * typeprint.c (error_unknown_type): New.
7865 * typeprint.h (error_unknown_type): New declaration.
7866 * compile/compile-c-types.c (convert_type_basic): Handle
7867 TYPE_CODE_ERROR; warn and fallback to int for variables with
7868 unknown type.
7869
fe13dfec
PA
78702017-09-04 Pedro Alves <palves@redhat.com>
7871
7872 * eval.c (evaluate_var_value): New function, factored out from ...
7873 (evaluate_subexp_standard): ... here.
7874
d008ee21
PA
78752017-09-04 Pedro Alves <palves@redhat.com>
7876
7877 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7878 Remove useless assignments to 'op'.
7879
827d0c51
PA
78802017-09-04 Pedro Alves <palves@redhat.com>
7881
7882 * eval.c (eval_skip_value): New function.
7883 (evaluate_subexp_standard): Use it.
7884
2c5a2be1
PA
78852017-09-04 Pedro Alves <palves@redhat.com>
7886
7887 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7888 function name from symbol/minsym and pass it to
7889 error_call_unknown_return_type.
7890
74ea4be4
PA
78912017-09-04 Pedro Alves <palves@redhat.com>
7892
7893 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7894 * ax-gdb.c (gen_msym_var_ref): New function.
7895 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7896 * eval.c (evaluate_var_msym_value): New function.
7897 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7898 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7899 to call_function_by_hand.
7900 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7901 Handle OP_VAR_MSYM_VALUE.
7902 (union exp_element) <msymbol>: New field.
7903 * minsyms.h (struct type): Forward declare.
7904 (find_minsym_type_and_address): Declare.
7905 * parse.c (write_exp_elt_msym): New function.
7906 (write_exp_msymbol): Delete, refactored as ...
7907 (find_minsym_type_and_address): ... this new function.
7908 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7909 (operator_length_standard, operator_check_standard): Handle
7910 OP_VAR_MSYM_VALUE.
7911 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7912
7022349d
PA
79132017-09-04 Pedro Alves <palves@redhat.com>
7914
7915 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7916 TYPE_GNU_IFUNC specially here. Throw error if return type is
7917 unknown.
7918 * ada-typeprint.c (print_func_type): Handle functions with unknown
7919 return type.
7920 * c-typeprint.c (c_type_print_base): Handle functions and methods
7921 with unknown return type.
7922 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7923 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7924 * compile/compile-c-types.c: Include "objfiles.h".
7925 (convert_func): For functions with unknown return type, warn and
7926 default to int.
7927 * compile/compile-object-run.c (compile_object_run): Adjust call
7928 to call_function_by_hand_dummy.
7929 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7930 call_function_by_hand.
7931 * eval.c (evaluate_subexp_standard): Adjust calls to
7932 call_function_by_hand. Handle functions and methods with unknown
7933 return type. Pass expect_type to call_function_by_hand.
7934 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7935 return type.
7936 * gcore.c (call_target_sbrk): Adjust call to
7937 call_function_by_hand.
7938 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7939 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7940 an integer address type instead of nodebug.
7941 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7942 call_function_by_hand.
7943 * infcall.c (error_call_unknown_return_type): New function.
7944 (call_function_by_hand): New "default_return_type" parameter.
7945 Pass it down.
7946 (call_function_by_hand_dummy): New "default_return_type"
7947 parameter. Use it instead of defaulting to int. If there's no
7948 default and the return type is unknown, throw an error. If
7949 there's a default return type, and the called function has no
7950 debug info, then assume the function is prototyped.
7951 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7952 New "default_return_type" parameter.
7953 (error_call_unknown_return_type): New declaration.
7954 * linux-fork.c (call_lseek): Cast return type of lseek.
7955 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7956 call_function_by_hand.
7957 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7958 calls to call_function_by_hand.
7959 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7960 return type.
7961 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7962 (value_nsstring, print_object_command): Adjust calls to
7963 call_function_by_hand.
7964 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7965 functions with unknown return type.
7966 (pascal_type_print_func_varspec_suffix): New function.
7967 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7968 TYPE_CODE_METHOD>: Use it.
7969 * python/py-value.c (valpy_call): Adjust call to
7970 call_function_by_hand.
7971 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7972 call_function_by_hand.
7973 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7974 call_function_by_hand.
7975 * valops.c (value_allocate_space_in_inferior): Adjust call to
7976 call_function_by_hand.
7977 * typeprint.c (type_print_unknown_return_type): New function.
7978 * typeprint.h (type_print_unknown_return_type): New declaration.
7979
54990598
PA
79802017-09-04 Pedro Alves <palves@redhat.com>
7981
7982 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7983 types with more than one parameter as prototyped.
7984
9a24775b
PA
79852017-09-04 Pedro Alves <palves@redhat.com>
7986
7987 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7988 (disassemble_command): Use gdb_disassembly_flags instead of bare
7989 int.
7990 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7991 (dump_insns, do_mixed_source_and_assembly_deprecated)
7992 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7993 Use gdb_disassembly_flags instead of bare int.
7994 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7995 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7996 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7997 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7998 (enum gdb_disassembly_flag): ... values of this new enumeration.
7999 (gdb_disassembly_flags): Define.
8000 (gdb_disassembly)
8001 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8002 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8003 gdb_disassembly_flags instead of bare int.
8004 * record-btrace.c (btrace_insn_history)
8005 (record_btrace_insn_history, record_btrace_insn_history_range)
8006 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8007 instead of bare int.
8008 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8009 Use gdb_disassembly_flags instead of bare int.
8010 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8011 Define.
8012 * target-delegates.c: Regenerate.
8013 * target.c (target_insn_history, target_insn_history_from)
8014 (target_insn_history_range): Use gdb_disassembly_flags instead of
8015 bare int.
8016 * target.h: Include "disasm.h".
8017 (struct target_ops) <to_insn_history, to_insn_history_from,
8018 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8019 int.
8020 (target_insn_history, target_insn_history_from)
8021 (target_insn_history_range): Use gdb_disassembly_flags instead of
8022 bare int.
8023
80a65e9b
SM
80242017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8025
8026 * cli/cli-script.c (build_command_line): For if/while commands,
8027 check whether args is empty.
8028
6b66338c
SM
80292017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8030
8031 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8032 (enum command_control_type): Likewise.
8033 (struct command_line): Likewise.
8034 (free_command_lines): Likewise.
8035 (struct command_lines_deleter): Likewise.
8036 (command_line_up): Likewise.
8037 (read_command_lines): Likewise.
8038 (read_command_lines_1): Likewise.
8039 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8040 (enum command_control_type): Likewise.
8041 (struct command_line): Likewise.
8042 (free_command_lines): Likewise.
8043 (struct command_lines_deleter): Likewise.
8044 (command_line_up): Likewise.
8045 (read_command_lines): Likewise.
8046 (read_command_lines_1): Likewise.
8047 * breakpoint.h: Include cli/cli-script.h.
8048 * extension-priv.h: Likewise.
8049 * gdbcmd.h: Likewise.
8050
51abb421
PA
80512017-09-04 Pedro Alves <palves@redhat.com>
8052
8053 * ada-lang.c (is_known_support_routine): Move sal declaration to
8054 where it is initialized.
8055 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8056 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8057 (clear_command, update_static_tracepoint): Remove init_sal
8058 references. Move declarations closer to initializations.
8059 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8060 initializations.
8061 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8062 references. Move sal declarations closer to initializations.
8063 * frame.c (find_frame_sal): Return a symtab_and_line via function
8064 return instead of output parameter. Remove init_sal references.
8065 * frame.h (find_frame_sal): Return a symtab_and_line via function
8066 return instead of output parameter.
8067 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8068 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8069 instead of memset.
8070 (gdbscm_find_pc_line): Remove init_sal reference.
8071 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8072 references. Move declarations closer to initializations.
8073 * infcmd.c (set_step_frame): Update. Move declarations closer to
8074 initializations.
8075 (finish_backward): Remove init_sal references. Move declarations
8076 closer to initializations.
8077 * infrun.c (process_event_stop_test, handle_step_into_function)
8078 (insert_hp_step_resume_breakpoint_at_frame)
8079 (insert_step_resume_breakpoint_at_caller): Likewise.
8080 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8081 (symbol_to_sal): Likewise.
8082 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8083 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8084 to its initialization.
8085 * reverse.c (save_bookmark_command): Use new/delete. Remove
8086 init_sal references. Move declarations closer to initializations.
8087 * source.c (get_current_source_symtab_and_line): Remove brace
8088 initialization.
8089 (set_current_source_symtab_and_line): Now takes the sal by const
8090 reference. Remove brace initialization.
8091 (line_info): Remove init_sal reference.
8092 * source.h (set_current_source_symtab_and_line): Now takes a
8093 symtab_and_line via const reference.
8094 * stack.c (set_current_sal_from_frame): Adjust.
8095 (print_frame_info): Adjust.
8096 (get_last_displayed_sal): Return the sal via function return
8097 instead of via output parameter. Simplify.
8098 (frame_info): Adjust.
8099 * stack.h (get_last_displayed_sal): Return the sal via function
8100 return instead of via output parameter.
8101 * symtab.c (init_sal): Delete.
8102 (find_pc_sect_line): Remove init_sal references. Move
8103 declarations closer to initializations.
8104 (find_function_start_sal): Remove init_sal references. Move
8105 declarations closer to initializations.
8106 * symtab.h (struct symtab_and_line): In-class initialize all
8107 fields.
8108 * tracepoint.c (set_traceframe_context)
8109 (print_one_static_tracepoint_marker): Remove init_sal references.
8110 Move declarations closer to initializations.
8111 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8112 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8113 declarations closer to initializations.
8114 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8115 init_sal references. Adjust.
8116
6c5b2ebe
PA
81172017-09-04 Pedro Alves <palves@redhat.com>
8118
8119 * ax-gdb.c (agent_command_1): Use range-for.
8120 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8121 * breakpoint.c: Include "common/array-view.h".
8122 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8123 parameter from struct symtabs_and_lines to
8124 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8125 (breakpoint_sals_to_pc): Change sals parameter from struct
8126 symtabs_and_lines to std::vector reference.
8127 (check_fast_tracepoint_sals): Change sals parameter from struct
8128 symtabs_and_lines to std::array_view. Use range-for.
8129 (decode_static_tracepoint_spec): Return a std::vector instead of
8130 symtabs_and_lines. Update.
8131 (create_breakpoint): Update.
8132 (break_range_command, until_break_command, clear_command): Update.
8133 (base_breakpoint_decode_location, bkpt_decode_location)
8134 (bkpt_probe_create_sals_from_location)
8135 (bkpt_probe_decode_location, tracepoint_decode_location)
8136 (tracepoint_probe_decode_location)
8137 (strace_marker_create_sals_from_location): Return a std::vector
8138 instead of symtabs_and_lines.
8139 (strace_marker_create_breakpoints_sal): Update.
8140 (strace_marker_decode_location): Return a std::vector instead of
8141 symtabs_and_lines. Update.
8142 (update_breakpoint_locations): Change struct symtabs_and_lines
8143 parameters to gdb::array_view. Adjust.
8144 (location_to_sals): Return a std::vector instead of
8145 symtabs_and_lines. Update.
8146 (breakpoint_re_set_default): Use std::vector instead of struct
8147 symtabs_and_lines.
8148 (decode_location_default): Return a std::vector instead of
8149 symtabs_and_lines. Update.
8150 * breakpoint.h: Include "common/array-view.h".
8151 (struct breakpoint_ops) <decode_location>: Now returns a
8152 std::vector instead of returning a symtabs_and_lines via output
8153 parameter.
8154 (update_breakpoint_locations): Change sals parameters to use
8155 gdb::array_view.
8156 * cli/cli-cmds.c (edit_command, list_command): Update to use
8157 std::vector and gdb::array_view.
8158 (ambiguous_line_spec): Adjust to use gdb::array_view and
8159 range-for.
8160 (compare_symtabs): Rename to ...
8161 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8162 const reference and adjust.
8163 (filter_sals): Rewrite using std::vector and standard algorithms.
8164 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8165 (jump_command): Update to use std::vector.
8166 * linespec.c (struct linespec_state) <canonical_names>: Update
8167 comment.
8168 (add_sal_to_sals_basic): Delete.
8169 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8170 (decode_line_2, create_sals_line_offset)
8171 (convert_address_location_to_sals, convert_linespec_to_sals)
8172 (convert_explicit_location_to_sals, parse_linespec)
8173 (event_location_to_sals, decode_line_full, decode_line_1)
8174 (decode_line_with_current_source)
8175 (decode_line_with_last_displayed, decode_objc)
8176 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8177 (linespec_result::~linespec_result): Adjust to use std::vector
8178 instead of symtabs_and_lines.
8179 * linespec.h (linespec_sals::sals): Now a std::vector.
8180 (struct linespec_result): Use std::vector, bool, and in-class
8181 initialization.
8182 (decode_line_1, decode_line_with_current_source)
8183 (decode_line_with_last_displayed): Return std::vector.
8184 * macrocmd.c (info_macros_command): Use std::vector.
8185 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8186 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8187 std::vector.
8188 * probe.h (parse_probes): Return a std::vector.
8189 * python/python.c (gdbpy_decode_line): Use std::vector and
8190 gdb::array_view.
8191 * source.c (select_source_symtab, line_info): Use std::vector.
8192 * stack.c (func_command): Use std::vector.
8193 * symtab.h (struct symtabs_and_lines): Delete.
8194 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8195
7c44b49c
PA
81962017-09-04 Pedro Alves <palves@redhat.com>
8197
8198 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8199 unittests/array-view-selftests.c.
8200 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8201 * common/array-view.h: New file.
8202 * unittests/array-view-selftests.c: New file.
8203
e439fa14
PA
82042017-09-04 Pedro Alves <palves@redhat.com>
8205
8206 * cli/cli-cmds.c (edit_command): Pass message to
8207 ambiguous_line_spec.
8208 (list_command): Pass message to ambiguous_line_spec. Say
8209 "first"/"last" instead of "start" and "end" to be consistent with
8210 the manual.
8211 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8212 them to print formatted message.
8213
7525b645
PA
82142017-09-04 Pedro Alves <palves@redhat.com>
8215
8216 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8217 ftrace_update_insns by reference instead of pointer.
8218
badc0020
YQ
82192017-09-04 Yao Qi <yao.qi@linaro.org>
8220
8221 * i386-go32-tdep.c: Include x86-xstate.h.
8222 (i386_go32_init_abi): Call i386_target_description.
8223 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8224 if xcr0 is X86_XSTATE_X87_MASK.
8225 * i386-tdep.h (tdesc_i386): Remove the declaration.
8226 (tdesc_i386_mmx): Likewise.
8227
d78bdb54
YQ
82282017-09-04 Yao Qi <yao.qi@linaro.org>
8229
8230 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8231 X86_XSTATE_SSE_MASK instead of 0.
8232
ca1fa5ee
YQ
82332017-09-04 Yao Qi <yao.qi@linaro.org>
8234
8235 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8236 i386_target_description.
8237 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8238 i386_target_description.
8239 * i386-tdep.c (i386_gdbarch_init): Likewise.
8240
2434b019
YQ
82412017-09-04 Yao Qi <yao.qi@linaro.org>
8242
8243 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8244 (x86_darwin_init_abi_64): Call amd64_target_description.
8245 * amd64-dicos-tdep.c: Likewise.
8246 * amd64-fbsd-nat.c: Likewise.
8247 * amd64-fbsd-tdep.c: Likewise.
8248 * amd64-nbsd-tdep.c: Likewise.
8249 * amd64-obsd-tdep.c: Likewise.
8250 * amd64-sol2-tdep.c: Likewise.
8251 * amd64-windows-tdep.c: Likewise.
8252 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8253
0860c437
SM
82542017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8255
8256 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8257 (btrace_function) <insn>: Change type to use std::vector.
8258 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8259 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8260 ftrace_update_insns, ftrace_compute_global_level_offset,
8261 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8262 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8263 change to std::vector.
8264 (ftrace_update_insns): Adjust to change to std::vector, change
8265 type of INSN parameter.
8266 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8267 * record-btrace.c (btrace_call_history_insn_range,
8268 btrace_compute_src_line_range,
8269 record_btrace_frame_prev_register): Adjust to change to
8270 std::vector.
8271 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8272 to change to std::vector.
8273
0638b7f9
TT
82742017-09-03 Tom Tromey <tom@tromey.com>
8275
8276 * corefile.c (reopen_exec_file): Use std::string.
8277
8f84fb0e
TT
82782017-09-03 Tom Tromey <tom@tromey.com>
8279
8280 * compile/compile.c (compile_register_name_mangled): Return
8281 std::string.
8282 * compile/compile-loc2c.c (pushf_register_address): Update.
8283 (pushf_register): Update.
8284 * compile/compile-c-types.c (convert_array): Update.
8285 * compile/compile-c-symbols.c (generate_vla_size): Update.
8286 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8287 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8288 (convert_one_symbol): Update.
8289 (generate_c_for_for_one_variable): Update.
8290 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8291 std::string.
8292 (generate_register_struct): Update.
8293 * compile/compile-internal.h (c_get_range_decl_name): Return a
8294 std::string.
8295 (compile_register_name_mangled): Return std::string.
8296
18e9961f
TT
82972017-09-03 Tom Tromey <tom@tromey.com>
8298
8299 * utils.c (perror_string): Return a std::string.
8300 (throw_perror_with_name, perror_warning_with_name): Update.
8301
45343786
TT
83022017-09-03 Tom Tromey <tom@tromey.com>
8303
8304 * demangle.c (demangle_command): Use std::string,
8305 unique_xmalloc_ptr.
8306
b57af503
TT
83072017-09-03 Tom Tromey <tom@tromey.com>
8308
8309 * cli/cli-setshow.c (do_set_command): Use std::string.
8310
6eecf35f
TT
83112017-09-03 Tom Tromey <tom@tromey.com>
8312
8313 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8314
56496dd4
TT
83152017-09-03 Tom Tromey <tom@tromey.com>
8316
8317 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8318
e91a1fa7
TT
83192017-09-03 Tom Tromey <tom@tromey.com>
8320
8321 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8322 gdb::unique_xmalloc_ptr.
8323
7ffd83d7
TT
83242017-09-03 Tom Tromey <tom@tromey.com>
8325
8326 * thread.c (print_thread_info_1): Use string_printf.
8327 (thread_apply_command, thread_apply_all_command): Use
8328 std::string.
8329
1ccbe998
TT
83302017-09-03 Tom Tromey <tom@tromey.com>
8331
8332 * valprint.c (val_print_string): Update.
8333 * gdbcore.h (memory_error_message): Return std::string.
8334 * corefile.c (memory_error_message): Return std::string.
8335 (memory_error): Update.
8336 * breakpoint.c (insert_bp_location): Update.
8337
23fdd69e
SM
83382017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8339
8340 * target/waitstatus.h (target_waitstatus_to_string): Change
8341 return type to std::string.
8342 * target/waitstatus.c (target_waitstatus_to_string): Return
8343 std::string.
8344 * target.h (target_waitstatus_to_string): Remove declaration.
8345 * infrun.c (resume, clear_proceed_status_thread,
8346 print_target_wait_results, do_target_wait, save_waitstatus,
8347 stop_all_threads): Adjust.
8348 * record-btrace.c (record_btrace_wait): Adjust.
8349 * target-debug.h
8350 (target_debug_print_struct_target_waitstatus_p): Adjust.
8351
5c811d30
JK
83522017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8353
8354 PR gdb/22046
8355 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8356 detection.
8357
0a2dde4a
SDJ
83582017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8359
8360 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8361 for setting/unsetting environment variables on the remote target.
8362 (New remote packets): Add entries for QEnvironmentHexEncoded,
8363 QEnvironmentUnset and QEnvironmentReset.
8364 * common/environ.c (gdb_environ::operator=): Extend method to
8365 handle m_user_set_env_list and m_user_unset_env_list.
8366 (gdb_environ::clear): Likewise.
8367 (match_var_in_string): Change type of first parameter from 'char
8368 *' to 'const char *'.
8369 (gdb_environ::set): Extend method to handle
8370 m_user_set_env_list and m_user_unset_env_list.
8371 (gdb_environ::unset): Likewise.
8372 (gdb_environ::clear_user_set_env): New method.
8373 (gdb_environ::user_set_envp): Likewise.
8374 (gdb_environ::user_unset_envp): Likewise.
8375 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8376 m_user_unset_env_list on move constructor/assignment.
8377 (unset): Add new default parameter 'update_unset_list = true'.
8378 (clear_user_set_env): New method.
8379 (user_set_envp): Likewise.
8380 (user_unset_envp): Likewise.
8381 (m_user_set_env_list): New std::set.
8382 (m_user_unset_env_list): Likewise.
8383 * common/rsp-low.c (hex2str): New function.
8384 (bin2hex): New overload for bin2hex function.
8385 * common/rsp-low.c (hex2str): New prototype.
8386 (str2hex): New overload prototype.
8387 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8388 QEnvironmentUnset and QEnvironmentReset.
8389 (remote_protocol_features): Add QEnvironmentHexEncoded,
8390 QEnvironmentUnset and QEnvironmentReset packets.
8391 (send_environment_packet): New function.
8392 (extended_remote_environment_support): Likewise.
8393 (extended_remote_create_inferior): Call
8394 extended_remote_environment_support.
8395 (_initialize_remote): Add QEnvironmentHexEncoded,
8396 QEnvironmentUnset and QEnvironmentReset packet configs.
8397 * unittests/environ-selftests.c (gdb_selftest_env_var):
8398 New variable.
8399 (test_vector_initialization): New function.
8400 (test_init_from_host_environ): Likewise.
8401 (test_reinit_from_host_environ): Likewise.
8402 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8403 Likewise.
8404 (test_unset_set_empty_vector): Likewise.
8405 (test_vector_clear): Likewise.
8406 (test_std_move): Likewise.
8407 (test_move_constructor):
8408 (test_self_move): Likewise.
8409 (test_set_unset_reset): Likewise.
8410 (run_tests): Rewrite in terms of the functions above.
8411
654670a4
WP
84122017-08-31 Weimin Pan <weimin.pan@oracle.com>
8413
8414 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8415 (adi_available): Use a temp variable of type CORE_ADDR as argument
8416 3 when calling target_auxv_search.
8417 (adi_normalize_address): Use masks and xor operators to calculate
8418 normalized address.
8419 (adi_read_versions, adi_write_versions, adi_print_versions)
8420 (do_examine, do_assign): Use paddress.
8421
7755ddb7
JB
84222017-08-29 John Baldwin <jhb@FreeBSD.org>
8423
8424 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8425 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8426 out of loop and add supply of FIR.
8427 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8428 add collect of FIR.
8429
fd437cbc
SM
84302017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8431
3804a343 8432 PR gdb/21827
fd437cbc
SM
8433 * cli/cli-script.c (define_command): Don't convert command name
8434 to lower case.
8435
988f6b3d
JB
84362017-08-25 Joel Brobecker <brobecker@adacore.com>
8437
8438 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8439 Update all callers accordingly. Remove all code blocks handling
8440 the case where DISPP is not NULL.
8441
663c44ac
JK
84422017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8443
8444 PR symtab/22003
8445 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8446 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8447 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8448
f1902523
JK
84492017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8450
8451 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8452 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8453 (read_comp_units_from_section): New parameter abbrev_section, use
8454 read_and_check_comp_unit_head, allocate signatured_type if needed.
8455 (create_all_comp_units): Update read_comp_units_from_section caller.
8456
87215ad1
SDJ
84572017-08-23 Pedro Alves <palves@redhat.com>
8458
8459 PR remote/21852
8460 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8461 to null_ptid and switch to thread without reading the registers
8462 after adding the inferior.
8463
6e41ddec
JK
84642017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8465
8466 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8467 compile-gcc.
8468 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8469 (compile_to_object): Implement compile_gcc.
8470 (_initialize_compile): Install "set compile-gcc". Initialize
8471 compile_gcc.
8472
e68c32d5
JK
84732017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8474
8475 * compile/compile.c (compile_to_object): Conditionally call
8476 set_verbose. Conditionally call compile or compile_v0.
8477
58afddc6
WP
84782017-08-07 Weimin Pan <weimin.pan@oracle.com>
8479
8480 * sparc64-tdep.h: (adi_normalize_address): New export.
8481 * sparc-nat.h: (open_adi_tag_fd): New export.
8482 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8483 * sparc64-linux-tdep.c:
8484 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8485 (sparc64_linux_handle_segmentation_fault): New function.
8486 (sparc64_linux_init_abi): Register
8487 sparc64_linux_handle_segmentation_fault
8488 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8489 (sparc64_addr_bits_remove): New function.
8490 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8491 (MAX_PROC_NAME_SIZE): New macro.
8492 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8493 (sparc64adilist): New variable.
8494 (adi_proc_list): New variable.
8495 (find_adi_info): New function.
8496 (add_adi_info): New function.
8497 (get_adi_info_proc): New function.
8498 (get_adi_info): New function.
8499 (info_adi_command): New function.
8500 (read_maps_entry): New function.
8501 (adi_available): New function.
8502 (adi_normalize_address): New function.
8503 (adi_align_address): New function.
8504 (adi_convert_byte_count): New function.
8505 (adi_tag_fd): New function.
8506 (adi_is_addr_mapped): New function.
8507 (adi_read_versions): New function.
8508 (adi_write_versions): New function.
8509 (adi_print_versions): New function.
8510 (do_examine): New function.
8511 (do_assign): New function.
8512 (adi_examine_command): New function.
8513 (adi_assign_command): New function.
8514 (_initialize_sparc64_adi_tdep): New function.
8515
11db9430
SM
85162017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8517
8518 * breakpoint.c (breakpoints_info): Rename to ...
8519 (info_breakpoints_command): ... this.
8520 (watchpoints_info): Rename to ...
8521 (info_watchpoints_command): ... this.
8522 (tracepoints_info): Rename to ...
8523 (info_tracepoints_command): ... this.
8524 (_initialize_breakpoint): Adjust.
8525 * dcache.c (dcache_info): Rename to ...
8526 (info_display_command): ... this.
8527 (_initialize_dcache): Adjust.
8528 * frame.h (args_info): Rename to ...
8529 (info_args_command): ... this.
8530 (locals_info): Rename to ...
8531 (info_locals_command): ... this.
8532 * infcmd.c (nofp_registers_info): Rename to ...
8533 (info_registers_command): ... this.
8534 (float_info): Rename to ...
8535 (info_float_command): ... this.
8536 (program_info): Rename to ...
8537 (info_program_command): ... this.
8538 (all_registers_info): Rename to ...
8539 (info_all_registers_command): ... this.
8540 (vector_info): Rename to ...
8541 (info_vector_command): ... this.
8542 (float_info): Rename to ...
8543 (info_float_command): ... this.
8544 (_initialize_infcmd): Adjust.
8545 * inferior.h (term_info): Rename to ...
8546 (info_terminal_command): ... this.
8547 * inflow.c (term_info): Rename to ...
8548 (info_terminal_command): ... this.
8549 (_initialize_inflow): Adjust.
8550 * infrun.c (signals_info): Rename to ...
8551 (info_signals_command): ... this.
8552 (_initialize_infrun): Adjust.
8553 * objc-lang.c (classes_info): Rename to ...
8554 (info_classes_command): ... this.
8555 (selectors_info): Rename to ...
8556 (info_selectors_command): ... this.
8557 (_initialize_objc_language): Adjust.
8558 * printcmd.c (sym_info): Rename to ...
8559 (info_symbol_command): ... this.
8560 (address_info): Rename to ...
8561 (info_address_command): ... this.
8562 (display_info): Rename to ...
8563 (info_display_command): ... this.
8564 (_initialize_printcmd): Adjust.
8565 * reverse.c (bookmarks_info): Rename to ...
8566 (info_breakpoints_command): ... this.
8567 (_initialize_reverse): Adjust.
8568 * ser-go32.c (dos_info): Rename to ...
8569 (info_serial_command): ... this.
8570 (_initialize_ser_dos): Adjust.
8571 * skip.c (skip_info): Rename to ...
8572 (info_skip_command): ... this.
8573 (_initialize_step_skip): Adjust.
8574 * source.c (line_info): Rename to ...
8575 (info_line_command): ... this.
8576 (source_info): Rename to ...
8577 (info_source_command)
8578 * stack.c (frame_info): Rename to ...
8579 (info_frame_command): ... this.
8580 (locals_info): Rename to ...
8581 (info_locals_command): ... this.
8582 (args_info): Rename to ...
8583 (info_args_command): ... this.
8584 (_initialize_stack): Adjust.
8585 * symtab.c (sources_info): Rename to ...
8586 (info_sources_command): ... this.
8587 (variables_info): Rename to ...
8588 (info_variables_command): ... this.
8589 (functions_info): Rename to ...
8590 (info_functions_command): ... this.
8591 (types_info): Rename to ...
8592 (info_types_command): ... this.
8593 (_initialize_symtab): Adjust.
8594 * target.c (target_info): Rename to ...
8595 (info_target_command): ... this.
8596 (initialize_targets): Adjust.
8597 * tracepoint.c (tvariables_info): Rename to ...
8598 (info_tvariables_command): ... this.
8599 (scope_info): Rename to ...
8600 (info_scope_command): ... this.
8601 (trace_dump_actions): Adjust.
8602 (_initialize_tracepoint): Adjust.
8603
b270e6f9
TT
86042017-08-22 Tom Tromey <tom@tromey.com>
8605
8606 * breakpoint.h (install_breakpoint): Update.
8607 * breakpoint.c (add_solib_catchpoint): Update.
8608 (install_breakpoint): Change argument to a std::unique_ptr.
8609 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8610 (create_breakpoint_sal, create_breakpoint): Update.
8611 (watch_command_1, catch_exec_command_1)
8612 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8613 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8614 Return the breakpoint.
8615 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8616 (new_single_step_breakpoint): Update.
8617 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8618 std::unique_ptr.
8619 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8620 std::unique_ptr.
8621 * break-catch-sig.c (create_signal_catchpoint): Use
8622 std::unique_ptr.
8623 * ada-lang.c (create_ada_exception_catchpoint): Use
8624 std::unique_ptr.
8625
36bd8eaa
TT
86262017-08-22 Tom Tromey <tom@tromey.com>
8627
8628 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8629
56f37645
TT
86302017-08-22 Tom Tromey <tom@tromey.com>
8631
8632 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8633 (lookup_partial_symbol): Update.
8634
0b581c69
TT
86352017-08-22 Tom Tromey <tom@tromey.com>
8636
8637 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8638 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8639 (find_and_open_source, symtab_to_fullname): Update.
8640 * psymtab.c (psymtab_to_fullname): Update.
8641
14278e1f
TT
86422017-08-22 Tom Tromey <tom@tromey.com>
8643
8644 * exec.c (exec_file_attach): Update.
8645 * linux-thread-db.c (try_thread_db_load): Update.
8646 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8647 * utils.c (gdb_realpath): Change return type.
8648 (gdb_realpath_keepfile): Update.
8649 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8650 (_initialize_utils): Register the new self test.
8651 * source.c (openp): Update.
8652 (find_and_open_source): Update.
8653 * nto-tdep.c (nto_find_and_open_solib): Update.
8654 * main.c (set_gdb_data_directory): Update.
8655 (captured_main_1): Update.
8656 * dwarf2read.c (dwarf2_get_dwz_file): Update
8657 (dw2_map_symbol_filenames): Update.
8658 * auto-load.c (auto_load_safe_path_vec_update): Update.
8659 (filename_is_in_auto_load_safe_path_vec): Change type of
8660 "filename_realp".
8661 (auto_load_objfile_script): Update.
8662 (file_is_auto_load_safe): Update. Use std::string.
8663 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8664
4971c9a7
TT
86652017-08-22 Tom Tromey <tom@tromey.com>
8666
8667 * utils.c (gdb_realpath_keepfile): Return a
8668 gdb::unique_xmalloc_ptr.
8669 * exec.c (exec_file_attach): Update.
8670 * utils.h (gdb_realpath_keepfile): Return a
8671 gdb::unique_xmalloc_ptr.
8672
e3e41d58
TT
86732017-08-22 Tom Tromey <tom@tromey.com>
8674
8675 * compile/compile.c (compile_file_command): Use
8676 gdb::unique_xmalloc_ptr, std::string.
8677 * utils.c (gdb_abspath): Change return type.
8678 * source.c (openp): Update.
8679 * objfiles.c (allocate_objfile): Update.
8680 * main.c (set_gdb_data_directory): Update.
8681 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8682
0d999a6e
ZZ
86832017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8684
8685 * cli-cmds.c (list_commands): List actual code around more than
8686 one location.
8687
329d5e7e
JB
86882017-08-21 John Baldwin <jhb@FreeBSD.org>
8689
8690 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8691
bf223d3e
PA
86922017-08-21 Pedro Alves <palves@redhat.com>
8693
8694 PR gdb/19487
8695 * c-exp.y (variable production): Handle function aliases.
8696 * minsyms.c (msymbol_is_text): New function.
8697 * minsyms.h (msymbol_is_text): Declare.
8698 * symtab.c (find_function_alias_target): New function.
8699 * symtab.h (find_function_alias_target): Declare.
8700
c973d0aa
PA
87012017-08-21 Pedro Alves <palves@redhat.com>
8702
8703 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8704 typedefs.
8705 * typeprint.c (whatis_exp): If handling "whatis", and expression
8706 is OP_TYPE, strip one typedef level. Otherwise don't strip
8707 typedefs here.
8708 * valops.c (value_cast): Save "to" type before resolving
8709 stubs/typedefs. Use that type as resulting value's type.
8710
2989a365
TT
87112017-08-18 Tom Tromey <tom@tromey.com>
8712 Pedro Alves <palves@redhat.com>
8713
8714 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8715 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8716 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8717 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8718 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8719 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8720 (linux_get_siginfo_data): Add "thread" argument. Use
8721 scoped_restore.
8722 * linux-nat.c (linux_child_follow_fork)
8723 (check_stopped_by_watchpoint): Use scoped_restore.
8724 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8725 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8726 (restore_inferior_ptid, save_inferior_ptid): Remove.
8727 * btrace.c (btrace_fetch): Use scoped_restore.
8728 * bsd-uthread.c (bsd_uthread_fetch_registers)
8729 (bsd_uthread_store_registers): Use scoped_restore.
8730 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8731 scoped_restore.
8732 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8733 (aix_thread_xfer_partial): Use scoped_restore.
8734 * inferior.h (save_inferior_ptid): Remove.
8735
e60eb288
YQ
87362017-08-18 Yao Qi <yao.qi@linaro.org>
8737
8738 PR tdep/21818
8739 * arm-tdep.c (gdb_print_insn_arm): Mark
8740 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8741
6d580b63
YQ
87422017-08-18 Yao Qi <yao.qi@linaro.org>
8743
8744 * NEWS: Mention GDBserver's new option "--selftest".
8745 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8746 * selftest.c: Move it to common/selftest.c.
8747 * selftest.h: Move it to common/selftest.h.
8748 * selftest-arch.c (reset): New function.
8749 (tests_with_arch): Call reset.
8750
86dcbf50
YQ
87512017-08-18 Yao Qi <yao.qi@linaro.org>
8752
8753 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8754 instead of exception_fprintf and printf_filtered.
8755
7649770c
YQ
87562017-08-18 Yao Qi <yao.qi@linaro.org>
8757
8758 * selftest.c (register_self_test): Rename it to
8759 selftests::register_test.
8760 (run_self_tests): selftest::run_tests.
8761 * selftest.h: Update declarations.
8762 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8763 selftests::register_test_foreach_arch.
8764 * selftest-arch.h: Update declaration.
8765 * aarch64-tdep.c: Update.
8766 * arm-tdep.c: Likewise.
8767 * disasm-selftests.c: Likewise.
8768 * dwarf2loc.c: Likewise.
8769 * dwarf2-frame.c: Likewise.
8770 * findvar.c: Likewise.
8771 * gdbarch-selftests.c: Likewise.
8772 * maint.c (maintenance_selftest): Likewise.
8773 * regcache.c: Likewise.
8774 * rust-exp.y: Likewise.
8775 * selftest-arch.c: Likewise.
8776 * unittests/environ-selftests.c: Likewise.
8777 * unittests/function-view-selftests.c: Likewise.
8778 * unittests/offset-type-selftests.c: Likewise.
8779 * unittests/optional-selftests.c: Likewise.
8780 * unittests/scoped_restore-selftests.c: Likewise.
8781 * utils-selftests.c: Likewise.
8782
b0cba12e
PA
87832017-08-17 Pedro Alves <palves@redhat.com>
8784
8785 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8786 local.
8787
4c8aa72d
PA
87882017-08-17 Pedro Alves <palves@redhat.com>
8789
8790 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8791 field.
8792 (reset_die_in_process): Delete, replaced by ...
8793 (process_die_scope): ... this new class. Make it responsible for
8794 freeing cu->line_header too.
8795 (process_die): Use process_die_scope.
8796 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8797 cu->line_header_die_owner. Don't release the line header if it's
8798 owned by the CU.
8799 (setup_type_unit_groups): Make the CU/DIE own the line header.
8800 Don't release the line header here.
8801
ba713918
AL
88022017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8803
8804 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8805
44d0fb3a
RK
88062017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8807
8808 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8809 Single-Key mode
8810
a5afdb16
RK
88112017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8812
8813 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8814 mode command list.
8815
47613aeb
SH
88162017-08-15 Stafford Horne <shorne@gmail.com>
8817
8818 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8819
9c3cc999
SH
88202017-08-15 Stafford Horne <shorne@gmail.com>
8821
8822 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8823
206726fb
SDJ
88242017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8825
8826 PR gdb/21954
8827 * infcmd.c (unset_environment_command): Use the 'clear' method on
8828 the environment instead of resetting it.
8829
0335ac6d
JB
88302017-08-15 John Baldwin <jhb@FreeBSD.org>
8831
8832 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8833 platforms.
8834
d3abe1c8
TT
88352017-08-14 Tom Tromey <tom@tromey.com>
8836
8837 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8838 (print_binary_chars): Likewise.
8839 (BITS_IN_BYTES): Remove.
8840
d6382fff
TT
88412017-08-14 Tom Tromey <tom@tromey.com>
8842
8843 PR gdb/21675
8844 * valprint.c (LOW_ZERO): Change value to 034.
8845 (print_octal_chars): Add static_asserts for octal constants.
8846 * printcmd.c (print_scalar_formatted): Add 'd' case.
8847
f978cb06
TT
88482017-08-11 Tom Tromey <tom@tromey.com>
8849
8850 * symfile.c (add_symbol_file_command): Use std::vector.
8851
2f5404b3
TT
88522017-08-14 Tom Tromey <tom@tromey.com>
8853
8854 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8855 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8856 std::move.
8857 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8858
de7985c3
PA
88592017-08-11 Pedro Alves <palves@redhat.com>
8860
8861 * infrun.c (process_event_stop_test): Adjust
8862 function_name_is_marked_for_skip call.
8863 * skip.c: Include <list>.
8864 (skiplist_entry): Make it a class with private fields, and
8865 getters/setters.
8866 (skiplist_entry_chain): Delete.
8867 (skiplist_entries): New.
8868 (skiplist_entry_count): Delete.
8869 (highest_skiplist_entry_num): New.
8870 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8871 (add_skiplist_entry): Delete.
8872 (skiplist_entry::skiplist_entry): New.
8873 (skiplist_entry::add_entry): New.
8874 (skip_file_command, skip_function): Adjust.
8875 (compile_skip_regexp): Delete.
8876 (skip_command): Don't compile regexp here. Adjust to use
8877 skiplist_entry::add_entry.
8878 (skip_info): Adjust to use range-for and getters.
8879 (skip_enable_command, skip_disable_command): Adjust to use
8880 range-for and setters.
8881 (skip_delete_command): Adjust to use std::list.
8882 (add_skiplist_entry): Delete.
8883 (skip_file_p): Delete, refactored as ...
8884 (skiplist_entry::do_skip_file_p): ... this new method.
8885 (skip_gfile_p): Delete, refactored as ...
8886 (skiplist_entry::do_gskip_file_p): ... this new method.
8887 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8888 (skiplist_entry::skip_function_p): ... this new method.
8889 (function_name_is_marked_for_skip): Now returns bool, and takes
8890 the function sal by const reference. Adjust to use range-for and
8891 skiplist_entry methods.
8892 (_initialize_step_skip): Remove references to
8893 skiplist_entry_chain, skiplist_entry_count.
8894 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8895 takes the function sal by const reference.
8896
be7d3cd5
YQ
88972017-08-11 Yao Qi <yao.qi@linaro.org>
8898
8899 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8900 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8901 (dwarf2_frame_cache):
8902 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8903 RETURN_MASK_ALL and set *this_case to NULL.
8904 * frame-unwind.h: Update comments.
8905
1c90d9f0
YQ
89062017-08-11 Yao Qi <yao.qi@linaro.org>
8907
8908 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8909 (dwarf2_frame_state_copy_regs): Remove.
8910 (dwarf2_frame_state_free_regs): Remove.
8911 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8912 (dwarf2_restore_rule): Call method .alloc_regs instead of
8913 dwarf2_frame_state_alloc_regs.
8914 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8915 constructor. Call std::move.
8916 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8917 (dwarf2_frame_cache): Likewise.
8918
8919 [GDB_SELF_TEST]: Include selftest.h and
8920 selftest-arch.h.
8921 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8922 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8923 execute_cfa_program_test.
8924
8925 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8926 copy ctor, assignment operator, move assignment.
8927 <alloc_regs>: New method.
8928 <swap>: New method.
8929 (struct dwarf2_frame_state): Delete dtor.
8930 (dwarf2_frame_state_alloc_regs): Remove declaration.
8931 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8932 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8933
afe37d6b
YQ
89342017-08-11 Yao Qi <yao.qi@linaro.org>
8935
8936 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8937 (dwarf2_frame_state::dwarf2_frame_state): New.
8938 (dwarf2_frame_state::~dwarf2_frame_state): New.
8939 (dwarf2_fetch_cfa_info): Update.
8940 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8941 rather than a pointer. Update code.
8942 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8943 dtor.
8944 <data_align, code_align, retaddr_column>: Change them to const.
8945 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8946 to bool.
8947
b348037f
YQ
89482017-08-11 Yao Qi <yao.qi@linaro.org>
8949
8950 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8951 <loc.exp>: New field.
8952 * dwarf2-frame.c (execute_cfa_program): Update.
8953 (dwarf2_frame_prev_register): Update.
8954
e7c9de26
PA
89552017-08-10 Pedro Alves <palves@redhat.com>
8956
8957 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8958
e8c6b620
JB
89592017-08-09 John Baldwin <jhb@FreeBSD.org>
8960
8961 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8962 (fbsd_pending_children): Use std::list.
8963 (fbsd_remember_child): Likewise.
8964 (fbsd_is_child_pending): Likewise.
8965 (fbsd_pending_vfork_done): Use std::forward_list.
8966 (fbsd_add_vfork_done): Likewise.
8967 (fbsd_is_vfork_done_pending): Likewise.
8968 (fbsd_next_vfork_done): Likewise.
8969
e4a26669
JB
89702017-08-09 John Baldwin <jhb@FreeBSD.org>
8971
8972 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8973 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8974 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8975 for `mapfilename'.
8976 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8977 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8978
142311d3
JB
89792017-08-09 John Baldwin <jhb@FreeBSD.org>
8980
8981 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8982 "filestuff.h".
8983 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8984
42fa2e0e
TT
89852017-08-09 Tom Tromey <tom@tromey.com>
8986
8987 * skip.c (skiplist_entry): New constructor.
8988 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8989 (skiplist_entry::file_is_glob): Now bool.
8990 (skiplist_entry::file, skiplist_entry::function): Now
8991 std::string.
8992 (make_skip_entry): Return a unique_ptr. Use new.
8993 (free_skiplist_entry, free_skiplist_entry_cleanup)
8994 (make_free_skiplist_entry_cleanup): Remove.
8995 (skip_command, skip_disable_command, add_skiplist_entry)
8996 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8997 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8998 (function_name_is_marked_for_skip): Update.
8999 (skip_delete_command): Update. Use delete.
9000
cd3af38d
JW
90012017-08-09 Jiong Wang <jiong.wang@arm.com>
9002
9003 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9004 (aarch64_linux_core_read_description): New function.
9005 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9006
29592bde
PA
90072017-08-09 Pedro Alves <palves@redhat.com>
9008
9009 * cp-name-parser.y (cp_comp_to_string): Return a
9010 gdb::unique_xmalloc_ptr<char>.
9011 * cp-support.c (replace_typedefs_qualified_name)
9012 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9013 (cp_canonicalize_string_full): Use op= instead of explicit
9014 convertion.
9015 (cp_class_name_from_physname, method_name_from_physname)
9016 (cp_func_name, cp_remove_params): Adjust to use
9017 gdb::unique_xmalloc_ptr<char>.
9018 * cp-support.h (cp_comp_to_string): Return a
9019 gdb::unique_xmalloc_ptr<char>.
9020 * python/py-type.c (typy_lookup_type): Adjust to use
9021 gdb::unique_xmalloc_ptr<char>.
9022
b3340438
L
90232017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9024
9025 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9026
e88e8651
YQ
90272017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9028 Yao Qi <yao.qi@linaro.org>
9029
9030 * cp-support.c (cp_canonicalize_string_full): Use
9031 gdb::unique_xmalloc_ptr<char>.
9032 (cp_canonicalize_string): Likewise.
9033
f5a29eb0
YQ
90342017-08-09 Yao Qi <yao.qi@linaro.org>
9035
9036 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9037 * regformats/i386/amd64-avx-avx512.dat: Remove.
9038 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9039 * regformats/i386/amd64-avx-mpx.dat:Remove.
9040 * regformats/i386/amd64-avx.dat: Remove.
9041 * regformats/i386/amd64-mpx.dat: Remove.
9042 * regformats/i386/i386-avx-avx512.dat: Remove.
9043 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9044 * regformats/i386/i386-avx-mpx.dat: Remove.
9045 * regformats/i386/i386-mmx.dat: Remove.
9046 * regformats/i386/i386-mpx.dat: Remove.
9047
57757c2f
YQ
90482017-08-09 Yao Qi <yao.qi@linaro.org>
9049
9050 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9051 * amd64-tdep.c: Don't include features/i386/x32*.c.
9052 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9053 functions.
9054 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9055 and i386/x32-avx-avx512.
9056 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9057 and i386/x32.xml.
9058 * features/i386/x32-avx-avx512.c: Removed.
9059 * features/i386/x32-avx-avx512.xml: Removed.
9060 * features/i386/x32-avx.c: Removed.
9061 * features/i386/x32-avx.xml: Removed.
9062 * features/i386/x32.c: Removed.
9063 * features/i386/x32.xml: Removed.
9064 * regformats/i386/x32-avx-avx512.dat: Removed.
9065 * regformats/i386/x32-avx.dat: Removed.
9066 * regformats/i386/x32.dat: Removed.
9067
ba7b109b
MR
90682017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9069
9070 PR breakpoints/21886
9071 * mem-break.c (default_memory_insert_breakpoint): Use
9072 `->placed_address' rather than `->reqstd_address' for the
9073 breakpoint location.
9074
e347efc3
MR
90752017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9076
9077 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9078 assertions.
9079
0dba2a6c
MR
90802017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9081
9082 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9083 a union of `tdep_info', `tdesc_data' and `id'.
9084 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9085 rather than `info.tdep_info'.
9086 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9087 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9088 * i386-tdep.c (i386_gdbarch_init): Likewise.
9089 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9090 * mips-tdep.c (mips_gdbarch_init): Likewise.
9091 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9092 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9093 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9094 `info.tdep_info'.
9095 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9096 `info.tdep_info'.
9097 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9098 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9099 `info.tdep_info'.
9100 * spu-tdep.c (spu_gdbarch_init): Likewise.
9101 * gdbarch.h: Regenerate.
9102
16eb6b2d
LS
91032017-08-07 Leszek Swirski <leszeks@google.com>
9104
7b005726 9105 PR symtab/20899
16eb6b2d
LS
9106 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9107
74cbb09e
SM
91082017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9109
9110 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9111 (gdbsim_open): Rename gdb_argv args object to argv.
9112
ee0c3293
TT
91132017-08-05 Tom Tromey <tom@tromey.com>
9114
9115 * compile/compile-object-load.c (compile_object_load): Use
9116 gdb::unique_xmalloc_ptr.
9117 * cli/cli-dump.c (scan_filename): Rename from
9118 scan_filename_with_cleanup. Change return type.
9119 (scan_expression): Rename from scan_expression_with_cleanup.
9120 Change return type.
9121 (dump_memory_to_file, dump_value_to_file, restore_command):
9122 Use gdb::unique_xmalloc_ptr. Update.
9123 * cli/cli-cmds.c (find_and_open_script): Use
9124 gdb::unique_xmalloc_ptr.
9125 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9126 * symmisc.c (maintenance_print_symbols)
9127 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9128 * symfile.c (symfile_bfd_open, generic_load)
9129 (add_symbol_file_command, remove_symbol_file_command): Use
9130 gdb::unique_xmalloc_ptr.
9131 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9132 * psymtab.c (maintenance_print_psymbols): Use
9133 gdb::unique_xmalloc_ptr.
9134 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9135 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9136 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9137 (reload_shared_libraries_1): Likewise.
9138
3232fabd
TT
91392017-08-05 Tom Tromey <tom@tromey.com>
9140
9141 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9142 (rust_op_vector, rust_set_vector): New typedefs.
9143 (current_parser): New global.
9144 (work_obstack): Change to pointer type. Update all users.
9145 (rust_ast, pstate): Remove globals.
9146 (struct rust_parser): New.
9147 (%union) <params, field_inits>: Change type.
9148 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9149 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9150 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9151 (convert_params_to_types, convert_params_to_expression): Change
9152 type of "params".
9153 (ast_string): Change type of "fields".
9154 (rust_parse): Make a rust_parser. Remove cleanups.
9155 (rust_lex_tests): Make and install an auto_obstack.
9156
f02fd774
YQ
91572017-08-04 Yao Qi <yao.qi@linaro.org>
9158
9159 * configure.srv (ipa_x32_linux_regobj): New.
9160 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9161 instead of X86_TDESC_AVX512.
9162 (initialize_low_tracepoint): Call
9163 init_registers_x32_avx_avx512_linux.
9164
91975afd
YQ
91652017-08-04 Yao Qi <yao.qi@linaro.org>
9166
9167 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9168
2331fa3a
RK
91692017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9170
9171 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9172
744e4fe1
TT
91732017-08-03 Tom Tromey <tom@tromey.com>
9174
9175 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9176 Remove.
9177 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9178
1c034b67
TT
91792017-08-03 Tom Tromey <tom@tromey.com>
9180
9181 * python/py-param.c (compute_enum_values): Use gdb_argv.
9182
773a1edc
TT
91832017-08-03 Tom Tromey <tom@tromey.com>
9184
9185 * utils.h (struct gdb_argv_deleter): New.
9186 (gdb_argv): New class.
9187 * utils.c (gdb_argv::reset): New method.
9188 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9189 * tracefile.c (tsave_command): Use gdb_argv.
9190 * top.c (new_ui_command): Use gdb_argv.
9191 * symmisc.c (maintenance_print_symbols)
9192 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9193 * symfile.c (symbol_file_command, generic_load)
9194 (remove_symbol_file_command): Use gdb_argv.
9195 * stack.c (backtrace_command): Use gdb_argv.
9196 * source.c (add_path, show_substitute_path_command)
9197 (unset_substitute_path_command, set_substitute_path_command):
9198 Use gdb_argv.
9199 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9200 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9201 * remote.c (extended_remote_run, remote_put_command)
9202 (remote_get_command, remote_delete_command): Use gdb_argv.
9203 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9204 (gdbsim_open): Use gdb_argv.
9205 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9206 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9207 * procfs.c (procfs_info_proc): Use gdb_argv.
9208 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9209 * infrun.c (handle_command): Use gdb_argv.
9210 * inferior.c (add_inferior_command, clone_inferior_command):
9211 Use gdb_argv.
9212 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9213 * exec.c (exec_file_command): Use gdb_argv.
9214 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9215 * compile/compile.c (build_argc_argv): Use gdb_argv.
9216
0d50bde3
TT
92172017-08-03 Tom Tromey <tom@tromey.com>
9218
9219 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9220
7f968c89
TT
92212017-08-03 Tom Tromey <tom@tromey.com>
9222
9223 * python/python.c (compute_python_string): Return std::string.
9224 (gdbpy_eval_from_control_command): Update.
9225 (do_start_initialization): Use std::string.
9226 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9227 xstrprintf.
9228 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9229 xstrprintf.
9230
3c9ebddd
TT
92312017-08-03 Tom Tromey <tom@tromey.com>
9232
9233 * top.h (do_restore_instream_cleanup): Remove.
9234 * top.c (do_restore_instream_cleanup): Remove.
9235 (read_command_file): Use scoped_restore.
9236 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9237
b51b225e
TT
92382017-08-03 Tom Tromey <tom@tromey.com>
9239
9240 * cli/cli-script.c (execute_user_command)
9241 (execute_control_command): Use scoped_restore.
9242
ac991630
TT
92432017-08-03 Tom Tromey <tom@tromey.com>
9244
9245 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9246 (execute_user_command): Remove user_call_depth; use
9247 user_args_stack's size instead.
9248
898e0c8e
TT
92492017-08-03 Tom Tromey <tom@tromey.com>
9250
9251 * top.h (in_user_command): Remove.
9252 * top.c (in_user_command): Remove.
9253 * cli/cli-script.c (do_restore_user_call_depth)
9254 (execute_user_command): Update.
9255
26fcd5d7
TT
92562017-08-03 Tom Tromey <tom@tromey.com>
9257
9258 * valops.c (search_struct_method): Use gdb::byte_vector.
9259 * valarith.c (value_concat): Use std::vector.
9260 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9261 (simple_search_memory): Likewise.
9262 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9263 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9264 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9265 * elfread.c (elf_rel_plt_read): Use std::string.
9266 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9267 * cli/cli-dump.c (restore_section_callback): Use
9268 gdb::byte_vector.
9269
7c218e6c
TT
92702017-08-03 Tom Tromey <tom@tromey.com>
9271
9272 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9273
31b68d4a
TT
92742017-08-03 Tom Tromey <tom@tromey.com>
9275
9276 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9277 (tui_register_format): Use scoped_restore.
9278
2ec845e7
TT
92792017-08-03 Tom Tromey <tom@tromey.com>
9280
9281 * reverse.c (exec_direction_default): Remove.
9282 (exec_reverse_once): Use scoped_restore.
9283 * remote.c (restore_remote_timeout): Remove.
9284 (remote_flash_erase, remote_flash_write, remote_flash_done)
9285 (readchar, remote_serial_write): Use scoped_restore.
9286 * cli/cli-script.c (struct source_cleanup_lines_args)
9287 (source_cleanup_lines): Remove.
9288 (script_from_file): Use scoped_restore.
9289 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9290 (source_command): Use scoped_restore.
9291
b3bc8453
TT
92922017-08-03 Tom Tromey <tom@tromey.com>
9293
9294 * utils.h (make_cleanup_free_so): Remove.
9295 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9296 * solist.h (struct so_deleter): New.
9297 (so_list_up): New typedef.
9298 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9299
e3ad2841
TT
93002017-08-03 Tom Tromey <tom@tromey.com>
9301
9302 * utils.h (make_cleanup_restore_current_language): Remove.
9303 * utils.c (do_restore_current_language)
9304 (make_cleanup_restore_current_language): Remove.
9305 * parse.c (parse_exp_in_context_1)
9306 (parse_expression_with_language): Use
9307 scoped_restore_current_language.
9308 * mi/mi-main.c (mi_cmd_execute): Use
9309 scoped_restore_current_language.
9310 * language.h (scoped_restore_current_language): New class.
9311
b80cf838
TT
93122017-08-03 Tom Tromey <tom@tromey.com>
9313
9314 * compile/compile.c (cleanup_unlink_file): Remove.
9315 (compile_to_object): Use gdb::unlinker.
9316 (eval_compile_command): Likewise.
9317
fad0444a
TT
93182017-08-03 Tom Tromey <tom@tromey.com>
9319
9320 * utils.h (make_cleanup_fclose): Remove.
9321 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9322
6e7bc05c
TT
93232017-08-03 Tom Tromey <tom@tromey.com>
9324
9325 * top.c (open_terminal_stream): Return gdb_file_up.
9326 (new_ui_command): Update.
9327
4a45905b
TT
93282017-08-03 Tom Tromey <tom@tromey.com>
9329
9330 * source.c (print_source_lines_base, forward_search_command)
9331 (reverse_search_command): Use gdb_file_up.
9332
7cd06d6e
TT
93332017-08-03 Tom Tromey <tom@tromey.com>
9334
9335 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9336
ed166945
TT
93372017-08-03 Tom Tromey <tom@tromey.com>
9338
9339 * cli/cli-cmds.c (find_and_open_script): Change return type.
9340 Remove "streamp" and "full_path" parameters.
9341 (source_script_with_search): Update.
9342 * auto-load.c (source_script_file): Update.
9343 * cli/cli-cmds.h (find_and_open_script): Change type.
9344 (open_script): New struct.
9345
d419f42d
TT
93462017-08-03 Tom Tromey <tom@tromey.com>
9347
9348 * xml-support.c (xml_fetch_content_from_file): Update.
9349 * ui-file.c (stdio_file::open): Update.
9350 * tracefile-tfile.c (tfile_start): Update.
9351 * remote.c (remote_file_put, remote_file_get): Update.
9352 * nat/linux-procfs.c (linux_proc_get_int)
9353 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9354 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9355 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9356 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9357 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9358 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9359 * linux-nat.c (linux_proc_pending_signals): Update.
9360 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9361 (file_closer): Remove.
9362 * compile/compile.c (compile_to_object): Update.
9363 * common/filestuff.h (struct gdb_file_deleter): New.
9364 (gdb_file_up): New typedef.
9365 (gdb_fopen_cloexec): Change return type.
9366 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9367 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9368 (dump_binary_file, restore_binary_file): Update.
9369 * auto-load.c (auto_load_objfile_script_1): Update.
9370
4a2b031d
TT
93712017-08-03 Tom Tromey <tom@tromey.com>
9372
9373 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9374 (info_static_tracepoint_markers_command): Likewise.
9375 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9376 * skip.c (skip_info): Use ui_out_emit_table.
9377 * progspace.c (print_program_space): Use ui_out_emit_table.
9378 * osdata.c (info_osdata): Use ui_out_emit_table.
9379 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9380 ui_out_emit_table.
9381 * linux-thread-db.c (info_auto_load_libthread_db): Use
9382 ui_out_emit_table.
9383 * inferior.c (print_inferior): Use ui_out_emit_table.
9384 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9385 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9386 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9387 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9388 * ui-out.h (class ui_out_emit_table): New.
9389
a4f320fd
MR
93902017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9391
9392 * mips-tdep.c (mips_fpu_type_str): New function.
9393 (mips_dump_tdep): Call it.
9394
a2f1f308
MR
93952017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9396
9397 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9398 `->mips_fpu_type'.
9399
7e5ed83b
XR
94002017-07-31 Xavier Roirand <roirand@adacore.com>
9401
9402 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9403
4c9dc811
XR
94042017-07-27 Xavier Roirand <roirand@adacore.com>
9405
9406 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9407
27d41eac
YQ
94082017-07-26 Yao Qi <yao.qi@linaro.org>
9409
9410 * cli/cli-cmds.c (maintenancechecklist): New variable.
9411 * gdbcmd.h (maintenancechecklist): Declare it.
9412 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9413 Call i386_linux_read_description with different masks.
9414 * maint.c (maintenance_check_command): New function.
9415 (_initialize_maint_cmds): Call add_prefix_cmd.
9416 * target-descriptions.c (tdesc_reg): override operator != and ==.
9417 (tdesc_type): Likewise.
9418 (tdesc_feature): Likewise.
9419 (target_desc): Likewise.
9420 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9421 (maintenance_check_xml_descriptions): New function.
9422 (_initialize_target_descriptions) Add command "xml-descriptions".
9423 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9424
ea03d0d3
YQ
94252017-07-26 Yao Qi <yao.qi@linaro.org>
9426
9427 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9428 Include features/i386/32bit-*.c.
9429 (i386_linux_read_description): Generate target description if it
9430 doesn't exist.
9431 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9432 functions.
9433 * features/i386/32bit-linux.c: Re-generated.
9434 * features/i386/32bit-sse.c: Likewise.
9435 * target-descriptions.c (print_c_feature::visit): Print code to
9436 set register number if needed.
9437 (print_c_feature) <m_next_regnum>: New field.
9438
25aa13e5
YQ
94392017-07-26 Yao Qi <yao.qi@linaro.org>
9440
9441 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9442 (FEATURE_XMLFILES): New.
9443 (FEATURE_CFILES): New.
9444 New rules.
9445 (clean-cfiles): Remove generated c files.
9446 * features/i386/32bit-avx.c: Generated.
9447 * features/i386/32bit-avx512.c: Generated.
9448 * features/i386/32bit-core.c: Generated.
9449 * features/i386/32bit-linux.c: Generated.
9450 * features/i386/32bit-mpx.c: Generated.
9451 * features/i386/32bit-pkeys.c: Generated.
9452 * features/i386/32bit-sse.c: Generated.
9453 * target-descriptions.c: Include algorithm.
9454 (tdesc_element_visitor): Add method visit_end.
9455 (print_c_tdesc): Implement visit_end.
9456 (print_c_tdesc:: m_filename_after_features): Move it to
9457 protected.
9458 (print_c_feature): New class.
9459 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9460 name starts with "i386/32bit-".
9461
6eb1e6a8
YQ
94622017-07-26 Yao Qi <yao.qi@linaro.org>
9463
9464 * target-descriptions.c (tdesc_element_visitor): New class.
9465 (tdesc_element): New class.
9466 (tdesc_reg): Inherit from tdesc_element.
9467 (tdesc_reg::accept): New function.
9468 (tdesc_type): Inherit from tdesc_element.
9469 (tdesc_type::accept): New function.
9470 (tdesc_feature): Inherit from tdesc_element.
9471 (tdesc_feature::accept): New function.
9472 (target_desc): Inherit from tdesc_element.
9473 (target_desc::target_desc): New.
9474 (target_desc::~target_desc): New.
9475 (target_desc::accept): New.
9476 (allocate_target_description): Use new.
9477 (free_target_description): Use delete.
9478 (print_c_tdesc): New class.
9479 (maint_print_c_tdesc_cmd): Adjust.
9480
9481 * features/aarch64.c: Re-generated.
9482 * features/arc-arcompact.c: Re-generated.
9483 * features/arc-v2.c: Re-generated.
9484 * features/arm/arm-with-iwmmxt.c: Re-generated.
9485 * features/arm/arm-with-m.c: Re-generated.
9486 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9487 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9488 * features/arm/arm-with-neon.c: Re-generated.
9489 * features/arm/arm-with-vfpv2.c: Re-generated.
9490 * features/arm/arm-with-vfpv3.c: Re-generated.
9491 * features/i386/amd64-avx-avx512.c: Re-generated.
9492 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9493 * features/i386/amd64-avx.c: Re-generated.
9494 * features/i386/amd64-avx-linux.c: Re-generated.
9495 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9496 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9497 * features/i386/amd64-avx-mpx.c: Re-generated.
9498 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9499 * features/i386/amd64.c: Re-generated.
9500 * features/i386/amd64-linux.c: Re-generated.
9501 * features/i386/amd64-mpx.c: Re-generated.
9502 * features/i386/amd64-mpx-linux.c: Re-generated.
9503 * features/i386/i386-avx-avx512.c: Re-generated.
9504 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9505 * features/i386/i386-avx.c: Re-generated.
9506 * features/i386/i386-avx-linux.c: Re-generated.
9507 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9508 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9509 * features/i386/i386-avx-mpx.c: Re-generated.
9510 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9511 * features/i386/i386.c: Re-generated.
9512 * features/i386/i386-linux.c: Re-generated.
9513 * features/i386/i386-mmx.c: Re-generated.
9514 * features/i386/i386-mmx-linux.c: Re-generated.
9515 * features/i386/i386-mpx.c: Re-generated.
9516 * features/i386/i386-mpx-linux.c: Re-generated.
9517 * features/i386/x32-avx-avx512.c: Re-generated.
9518 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9519 * features/i386/x32-avx.c: Re-generated.
9520 * features/i386/x32-avx-linux.c: Re-generated.
9521 * features/i386/x32.c: Re-generated.
9522 * features/i386/x32-linux.c: Re-generated.
9523 * features/microblaze.c: Re-generated.
9524 * features/microblaze-with-stack-protect.c: Re-generated.
9525 * features/mips64-dsp-linux.c: Re-generated.
9526 * features/mips64-linux.c: Re-generated.
9527 * features/mips-dsp-linux.c: Re-generated.
9528 * features/mips-linux.c: Re-generated.
9529 * features/nds32.c: Re-generated.
9530 * features/nios2.c: Re-generated.
9531 * features/nios2-linux.c: Re-generated.
9532 * features/rs6000/powerpc-32.c: Re-generated.
9533 * features/rs6000/powerpc-32l.c: Re-generated.
9534 * features/rs6000/powerpc-403.c: Re-generated.
9535 * features/rs6000/powerpc-403gc.c : Re-generated.
9536 * features/rs6000/powerpc-405.c: Re-generated.
9537 * features/rs6000/powerpc-505.c: Re-generated.
9538 * features/rs6000/powerpc-601.c: Re-generated.
9539 * features/rs6000/powerpc-602.c: Re-generated.
9540 * features/rs6000/powerpc-603.c: Re-generated.
9541 * features/rs6000/powerpc-604.c: Re-generated.
9542 * features/rs6000/powerpc-64.c: Re-generated.
9543 * features/rs6000/powerpc-64l.c: Re-generated.
9544 * features/rs6000/powerpc-7400.c: Re-generated.
9545 * features/rs6000/powerpc-750.c: Re-generated.
9546 * features/rs6000/powerpc-860.c: Re-generated.
9547 * features/rs6000/powerpc-altivec32.c: Re-generated.
9548 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9549 * features/rs6000/powerpc-altivec64.c: Re-generated.
9550 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9551 * features/rs6000/powerpc-cell32l.c: Re-generated.
9552 * features/rs6000/powerpc-cell64l.c: Re-generated.
9553 * features/rs6000/powerpc-e500.c: Re-generated.
9554 * features/rs6000/powerpc-e500l.c: Re-generated.
9555 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9556 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9557 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9558 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9559 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9560 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9561 * features/rs6000/powerpc-vsx32.c: Re-generated.
9562 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9563 * features/rs6000/powerpc-vsx64.c: Re-generated.
9564 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9565 * features/rs6000/rs6000.c: Re-generated.
9566 * features/s390-linux32.c: Re-generated.
9567 * features/s390-linux32v1.c: Re-generated.
9568 * features/s390-linux32v2.c: Re-generated.
9569 * features/s390-linux64.c: Re-generated.
9570 * features/s390-linux64v1.c: Re-generated.
9571 * features/s390-linux64v2.c: Re-generated.
9572 * features/s390-te-linux64.c: Re-generated.
9573 * features/s390-tevx-linux64.c: Re-generated.
9574 * features/s390-vx-linux64.c: Re-generated.
9575 * features/s390x-linux64.c: Re-generated.
9576 * features/s390x-linux64v1.c: Re-generated.
9577 * features/s390x-linux64v2.c: Re-generated.
9578 * features/s390x-te-linux64.c: Re-generated.
9579 * features/s390x-tevx-linux64.c: Re-generated.
9580 * features/s390x-vx-linux64.c: Re-generated.
9581 * features/sparc/sparc32-solaris.c: Re-generated.
9582 * features/sparc/sparc64-solaris.c: Re-generated.
9583 * features/tic6x-c62x.c: Re-generated.
9584 * features/tic6x-c62x-linux.c: Re-generated.
9585 * features/tic6x-c64x.c: Re-generated.
9586 * features/tic6x-c64x-linux.c: Re-generated.
9587 * features/tic6x-c64xp.c: Re-generated.
9588 * features/tic6x-c64xp-linux.c: Re-generated.
9589
35b4818d
YQ
95902017-07-26 Yao Qi <yao.qi@linaro.org>
9591
9592 * i386-linux-tdep.c (i386_linux_read_description): New function.
9593 (i386_linux_core_read_description): Call
9594 i386_linux_read_description.
9595 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9596 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9597 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9598 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9599 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9600 * x86-linux-nat.c (x86_linux_read_description): Call
9601 i386_linux_read_description.
9602
8e2141c6
YQ
96032017-07-26 Yao Qi <yao.qi@linaro.org>
9604
9605 * NEWS: Mention it.
9606 * features/Makefile (%.c: %.xml): Pass the xml file name to
9607 command "maint print c-tdesc".
9608 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9609 name from 'arg'.
9610
b468ff4c
YQ
96112017-07-26 Yao Qi <yao.qi@linaro.org>
9612
9613 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9614 in-class initialization.
9615 (tdesc_create_feature): Call new instead of XCNEW.
9616 (free_target_description): Ue delete.
9617
b9c0e1b4
JB
96182017-07-25 John Baldwin <jhb@FreeBSD.org>
9619
9620 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9621
a04b5337
YQ
96222017-07-25 Yao Qi <yao.qi@linaro.org>
9623
9624 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9625 constant.
9626 (amd64_x32_init_abi): Likewise.
9627 * amd64-tdep.h (amd64_init_abi): Update declaration.
9628 (amd64_x32_init_abi): Likewise.
9629
02ad7fc2
YQ
96302017-07-25 Yao Qi <yao.qi@linaro.org>
9631
9632 PR tdep/21717
9633 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9634 condition for FPSCR.
9635 (arm_linux_store_inferior_registers): Likewise.
9636
b6f48cb0
TT
96372017-07-22 Tom Tromey <tom@tromey.com>
9638
9639 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9640 <syscalls_counts>: Now a std::vector.
9641 (get_catch_syscall_inferior_data): Use "new".
9642 (catch_syscall_inferior_data_cleanup): Use "delete".
9643 (insert_catch_syscall, remove_catch_syscall)
9644 (clear_syscall_counts): Update.
9645
e12c9b7a
TT
96462017-07-22 Tom Tromey <tom@tromey.com>
9647
9648 * break-catch-syscall.c (syscall_catchpoint)
9649 <syscalls_to_be_caught>: Now a std::vector<int>
9650 (~syscall_catchpoint): Remove.
9651 (insert_catch_syscall, remove_catch_syscall)
9652 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9653 (print_mention_catch_syscall, print_recreate_catch_syscall):
9654 Update.
9655 (create_syscall_event_catchpoint): Change type of "filter"
9656 parameter.
9657 (catch_syscall_split_args): Return a std::vector.
9658 (catch_syscall_command_1, catching_syscall_number_1): Update.
9659
4fa8aeac
TT
96602017-07-22 Tom Tromey <tom@tromey.com>
9661
9662 * break-catch-throw.c (struct exception_catchpoint)
9663 <exception_rx>: Now a std::string.
9664 (~exception_catchpoint): Remove.
9665 (print_one_detail_exception_catchpoint): Update.
9666 (handle_gnu_v3_exceptions): Change type of except_rx.
9667 (extract_exception_regexp): Return a std::string.
9668 (catch_exception_command_1): Update.
9669
f746a154
TT
96702017-07-22 Tom Tromey <tom@tromey.com>
9671
9672 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9673 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9674 std::vector.
9675 <catch_all>: Now a bool.
9676 (~signal_catchpoint): Remove.
9677 (signal_catchpoint_insert_location)
9678 (signal_catchpoint_remove_location)
9679 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9680 (signal_catchpoint_print_mention)
9681 (signal_catchpoint_print_recreate)
9682 (signal_catchpoint_explains_signal): Update.
9683 (create_signal_catchpoint): Change type of "filter" and
9684 "catch_all".
9685 (catch_signal_split_args): Return a std::vector. Change type of
9686 "catch_all".
9687 (catch_signal_command): Update.
9688
47e77640
PA
96892017-07-20 Pedro Alves <palves@redhat.com>
9690
9691 * ada-lang.c (ada_language_defn): Make extern.
9692 (_initialize_ada_language): Remove add_language call.
9693 * c-lang.c (c_language_defn, cplus_language_defn)
9694 (asm_language_defn, minimal_language_defn): Make extern.
9695 (_initialize_c_language): Delete.
9696 * completer.c (compare_cstrings): Delete, moved to utils.h.
9697 * d-lang.c (d_language_defn): Make extern.
9698 (_initialize_d_language): Remove add_language calls.
9699 * defs.h (enum language): Add comment.
9700 * f-lang.c (f_language_defn): Make extern.
9701 (_initialize_f_language): Remove add_language call.
9702 * go-lang.c (go_language_defn): Make extern.
9703 (_initialize_go_language): Remove add_language call.
9704 * language.c: Include <algorithm>.
9705 (languages): Redefine as const array.
9706 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9707 (set_language_command): Handle "local". Use for-range loop.
9708 (set_language): Remove loop.
9709 (language_enum): Rewrite.
9710 (language_def, language_str): Remove loops.
9711 (add_language): Delete.
9712 (add_set_language_command): New, based on add_languages.
9713 (skip_language_trampoline): Adjust.
9714 (local_language_defn): Delete.
9715 (language_gdbarch_post_init): Adjust.
9716 (_initialize_language): Remove add_language calls. Call
9717 add_set_language_command.
9718 * language.h (add_language): Delete.
9719 (auto_language_defn)
9720 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9721 (asm_language_defn, c_language_defn, cplus_language_defn)
9722 (d_language_defn, f_language_defn, go_language_defn)
9723 (m2_language_defn, objc_language_defn, opencl_language_defn)
9724 (pascal_language_defn, rust_language_defn): Declare.
9725 * m2-lang.c (m2_language_defn): Make extern.
9726 (_initialize_m2_language): Remove add_language call.
9727 * objc-lang.c (objc_language_defn): Make extern.
9728 (_initialize_objc_language): Remove add_language call.
9729 * opencl-lang.c (opencl_language_defn): Make extern.
9730 (_initialize_opencl_language): Remove add_language call.
9731 * p-lang.c (pascal_language_defn): Make extern.
9732 (_initialize_pascal_language): Delete.
9733 * rust-lang.c (rust_language_defn): Make extern.
9734 (_initialize_rust_language): Delete.
9735 * utils.h (compare_cstrings): New static inline function.
9736
edb0c9cb
PA
97372017-07-20 Pedro Alves <palves@redhat.com>
9738
9739 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9740 (get_var_value): Constify parameters.
9741 (get_int_var_value): Change prototype.
9742 (to_fixed_range_type): Adjust.
9743 * ada-lang.h (get_int_var_value): Change prototype.
9744
a778f165
PA
97452017-07-20 Pedro Alves <palves@redhat.com>
9746
9747 * dwarf2read.c (dw2_lookup_symbol): Use
9748 SYMBOL_MATCHES_SEARCH_NAME.
9749 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9750
42edd901
PA
97512017-07-20 Pedro Alves <palves@redhat.com>
9752
9753 * block.c (block_iter_name_step, block_iter_name_first)
9754 (block_iter_name_next): Delete.
9755 (block_lookup_symbol_primary): Adjust to use
9756 dict_iter_match_first/dict_iter_match_next.
9757 * block.h (block_iter_name_first, block_iter_name_next): Delete
9758 declarations.
9759 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9760 dict_iter_match_first/dict_iter_match_next.
9761
cf325299
PA
97622017-07-20 Pedro Alves <palves@redhat.com>
9763
9764 * cp-support.c (cp_find_first_component_aux): Add missing case for
9765 end of string.
9766
c5ed0576
DB
97672017-07-18 David Blaikie <dblaikie@gmail.com>
9768
9769 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9770 of dwo_cu's dwo_file.
9771
27841e76
YQ
97722017-07-18 Yao Qi <yao.qi@linaro.org>
9773
9774 * remote.c (store_registers_using_G): Remove one line comment.
9775
cfb7e58b
YQ
97762017-07-18 Yao Qi <yao.qi@linaro.org>
9777
9778 * regcache.c (regcache_cpy): Simplify it.
9779 (regcache::cpy_no_passthrough): Remove it.
9780 * regcache.h (cpy_no_passthrough): Remove it.
9781 (regcache_dup, regcache_cpy): Update comments.
9782
386535dd
PA
97832017-07-18 Pedro Alves <palves@redhat.com>
9784
9785 * remote-sim.c (sim_command_completer): Adjust to work with a
9786 completion_tracker instead of a VEC.
9787
c45ec17c
PA
97882017-07-17 Pedro Alves <palves@redhat.com>
9789
9790 * completer.c (complete_source_filenames): New function.
9791 (complete_address_and_linespec_locations): New function.
9792 (location_completer): Use complete_address_and_linespec_locations.
9793 (completion_tracker::build_completion_result): Honor the tracker's
9794 request to suppress append.
9795 * completer.h (completion_tracker::suppress_append_ws)
9796 (completion_tracker::set_suppress_append_ws): New methods.
9797 (completion_tracker::m_suppress_append_ws): New field.
9798 (complete_source_filenames): New declaration.
9799 * linespec.c (linespec_complete_what): New.
9800 (struct ls_parser) <complete_what, completion_word,
9801 completion_quote_char, completion_quote_end, completion_tracker>:
9802 New fields.
9803 (string_find_incomplete_keyword_at_end): New.
9804 (linespec_lexer_lex_string): Record quote char. If in completion
9805 mode, don't throw.
9806 (linespec_lexer_consume_token): Advance the completion word point.
9807 (linespec_lexer_peek_token): Save/restore completion info.
9808 (save_stream_and_consume_token): New.
9809 (set_completion_after_number): New.
9810 (linespec_parse_basic): Set what to complete next depending on
9811 token. Handle function and label completions specially.
9812 (parse_linespec): Disable objc shortcut in completion mode. Set
9813 what to complete next depending on token type. Skip keyword if in
9814 completion mode.
9815 (complete_linespec_component, linespec_complete): New.
9816 * linespec.h (linespec_complete): Declare.
9817
be966d42
PA
98182017-07-17 Pedro Alves <palves@redhat.com>
9819
9820 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9821 Handle 'operator<' / 'operator<<'.
9822
a2459270
PA
98232017-07-17 Pedro Alves <palves@redhat.com>
9824
9825 * completer.c (collect_explicit_location_matches): Handle
9826 MATCH_LABEL.
9827 (convert_explicit_location_to_linespec): New, factored out from
9828 ...
9829 (convert_explicit_location_to_sals): ... this.
9830 (complete_label): New.
9831 (linespec_complete_label, find_label_symbols_in_block): New.
9832 (find_label_symbols): Add completion_mode parameter and adjust to
9833 call find_label_symbols_in_block.
9834 * linespec.h (linespec_complete_label): Declare.
9835
c6756f62
PA
98362017-07-17 Pedro Alves <palves@redhat.com>
9837
9838 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9839 complete_symbol_mode parameter.
9840 * cli/cli-cmds.c (complete_command): Get the completion result out
9841 of the handle_brkchars tracker if used a custom word point.
9842 * completer.c: Include "linespec.h".
9843 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9844 (advance_to_expression_complete_word_point): New.
9845 (completion_tracker::completes_to_completion_word): New.
9846 (complete_files_symbols): Pass down
9847 complete_symbol_mode::EXPRESSION.
9848 (explicit_options, probe_options): New.
9849 (collect_explicit_location_matches): Complete on the
9850 explictit_loc->foo instead of word. Use
9851 linespec_complete_function. Handle MATCH_LINE. Handle offering
9852 keyword and options completions.
9853 (backup_text_ptr): Delete.
9854 (skip_keyword): New.
9855 (complete_explicit_location): Remove 'word' parameter. Add
9856 language, quoted_arg_start and quoted_arg_end parameters.
9857 Rewrite, parsing left to right.
9858 (location_completer): Rewrite.
9859 (location_completer_handle_brkchars): New function.
9860 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9861 (enum complete_line_internal_reason): Adjust comments.
9862 (completion_tracker::discard_completions): New.
9863 (completer_handle_brkchars_func_for_completer): Handle
9864 location_completer.
9865 (gdb_custom_word_point_brkchars)
9866 (gdb_org_rl_basic_quote_characters): New.
9867 (gdb_completion_word_break_characters_throw)
9868 (completion_find_completion_word): Handle trackers that use a
9869 custom word point.
9870 (completion_tracker::advance_custom_word_point_by): New.
9871 (completion_tracker::build_completion_result): Don't rely on
9872 readline appending the quote char.
9873 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9874 use a custom word point.
9875 (gdb_rl_attempted_completion_function): Restore
9876 rl_basic_quote_characters.
9877 * completer.h (class completion_tracker): Extend intro comment.
9878 (completion_tracker::set_quote_char)
9879 (completion_tracker::quote_char)
9880 (completion_tracker::set_use_custom_word_point)
9881 (completion_tracker::use_custom_word_point)
9882 (completion_tracker::custom_word_point)
9883 (completion_tracker::set_custom_word_point)
9884 (completion_tracker::advance_custom_word_point_by)
9885 (completion_tracker::completes_to_completion_word)
9886 (completion_tracker::discard_completions): New methods.
9887 (completion_tracker::m_quote_char)
9888 (completion_tracker::m_use_custom_word_point)
9889 (completion_tracker::m_custom_word_point): New fields.
9890 (advance_to_expression_complete_word_point): Declare.
9891 * f-lang.c (f_collect_symbol_completion_matches): Add
9892 complete_symbol_mode parameter.
9893 * language.h (struct language_defn)
9894 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9895 parameter.
9896 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9897 (linespec_complete_function): New function.
9898 (linespec_lexer_lex_keyword): Adjust.
9899 * linespec.h (linespec_keywords, linespec_complete_function): New
9900 declarations.
9901 * location.c (find_end_quote): New function.
9902 (explicit_location_lex_one): Add explicit_completion_info
9903 parameter. Save quoting info. Don't throw if being called for
9904 completion. Don't handle Ada operators here.
9905 (is_cp_operator, skip_op_false_positives, first_of)
9906 (explicit_location_lex_one_function): New function.
9907 (string_to_explicit_location): Replace 'dont_throw' parameter with
9908 an explicit_completion_info pointer parameter. Handle it. Don't
9909 use explicit_location_lex_one to lex function names. Use
9910 explicit_location_lex_one_function instead.
9911 * location.h (struct explicit_completion_info): New.
9912 (string_to_explicit_location): Replace 'dont_throw' parameter with
9913 an explicit_completion_info pointer parameter.
9914 * symtab.c (default_collect_symbol_completion_matches_break_on):
9915 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9916 (default_collect_symbol_completion_matches)
9917 (collect_symbol_completion_matches): Add complete_symbol_mode
9918 parameter.
9919 (collect_symbol_completion_matches_type): Pass down
9920 complete_symbol_mode::EXPRESSION.
9921 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9922 parameter. Handle LINESPEC mode.
9923 * symtab.h (complete_symbol_mode): New.
9924 (default_collect_symbol_completion_matches_break_on)
9925 (default_collect_symbol_completion_matches)
9926 (collect_symbol_completion_matches)
9927 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9928 parameter.
9929
1d550c82
PA
99302017-07-17 Pedro Alves <palves@redhat.com>
9931
9932 * utils.c (enum class strncmp_iw_mode): New.
9933 (strcmp_iw): Rename to ...
9934 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9935 parameters. Handle them.
9936 (strncmp_iw): New.
9937 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9938 * utils.h (strncmp_iw): Declare.
9939 (strcmp_iw): Move describing comments here.
9940
8090b426
PA
99412017-07-17 Pedro Alves <palves@redhat.com>
9942
9943 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9944 CP_OPERATOR_STR.
9945 * c-typeprint.c (is_type_conversion_operator): Use
9946 CP_OPERATOR_STR.
9947 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9948 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9949 CP_OPERATOR_LEN.
9950 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9951 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9952 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9953 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9954 CP_OPERATOR_STR.
9955 * location.c: Include "cp-support.h".
9956 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9957 CP_OPERATOR_STR.
9958 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9959 CP_OPERATOR_LEN.
9960
6a2c1b87
PA
99612017-07-17 Pedro Alves <palves@redhat.com>
9962
9963 * cli/cli-cmds.c (complete_command): Use a completion tracker
9964 along with completion_find_completion_word for handle_brkchars
9965 phase.
9966 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9967 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9968 (struct gdb_rl_completion_word_info): New.
9969 (gdb_rl_find_completion_word): New.
9970 (completion_find_completion_word): New.
9971 * completer.h (completion_find_completion_word): Declare.
9972
eb3ff9a5
PA
99732017-07-17 Pedro Alves <palves@redhat.com>
9974
9975 * ada-lang.c (symbol_completion_match): Adjust comments.
9976 (symbol_completion_add): Replace vector parameter with
9977 completion_tracker parameter. Use it.
9978 (ada_make_symbol_completion_list): Rename to...
9979 (ada_collect_symbol_completion_matches): ... this. Add
9980 completion_tracker parameter and use it.
9981 (ada_language_defn): Adjust.
9982 * break-catch-syscall.c (catch_syscall_completer): Adjust
9983 prototype and work with completion_tracker instead of VEC.
9984 * breakpoint.c (condition_completer): Adjust prototype and work
9985 with completion_tracker instead of VEC.
9986 * c-lang.c (c_language_defn, cplus_language_defn)
9987 (asm_language_defn, minimal_language_defn): Adjust to renames.
9988 * cli/cli-cmds.c (complete_command): Rework using
9989 completion_tracker. Catch exceptions when completing.
9990 * cli/cli-decode.c (integer_unlimited_completer)
9991 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9992 with completion_tracker instead of VEC.
9993 * command.h (struct completion_tracker): Forward declare.
9994 (completer_ftype, completer_handle_brkchars_ftype): Change
9995 types.
9996 (complete_on_cmdlist, complete_on_enum): Adjust.
9997 * completer.c: Include <algorithm>.
9998 (struct gdb_completer_state): New.
9999 (current_completion): New global.
10000 (readline_line_completion_function): Delete.
10001 (noop_completer, filename_completer)
10002 (filename_completer_handle_brkchars, complete_files_symbols)
10003 (linespec_location_completer): Adjust to work with a
10004 completion_tracker instead of a VEC.
10005 (string_or_empty): New.
10006 (collect_explicit_location_matches): Adjust to work with a
10007 completion_tracker instead of a VEC.
10008 (explicit_location_completer): Rename to ...
10009 (complete_explicit_location): ... this and adjust to work with a
10010 completion_tracker instead of a VEC.
10011 (location_completer): Adjust to work with a completion_tracker
10012 instead of a VEC.
10013 (add_struct_fields): Adjust to work with a completion_list instead
10014 of VEC.
10015 (expression_completer): Rename to ...
10016 (complete_expression): ... this and adjust to work with a
10017 completion_tracker instead of a VEC. Use complete_files_symbols.
10018 (expression_completer): Reimplement on top of complete_expression.
10019 (symbol_completer): Adjust to work with a completion_tracker
10020 instead of a VEC.
10021 (enum complete_line_internal_reason): Add describing comments.
10022 (complete_line_internal_normal_command): Adjust to work with a
10023 completion_tracker instead of a VEC.
10024 (complete_line_internal): Rename to ...
10025 (complete_line_internal_1): ... this and adjust to work with a
10026 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10027 handle_brkchars phase.
10028 (new_completion_tracker): Delete.
10029 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10030 complete_line_internal_1.
10031 (free_completion_tracker): Delete.
10032 (INITIAL_COMPLETION_HTAB_SIZE): New.
10033 (completion_tracker::completion_tracker)
10034 (completion_tracker::~completion_tracker): New.
10035 (maybe_add_completion): Delete.
10036 (completion_tracker::maybe_add_completion)
10037 (completion_tracker::add_completion)
10038 (completion_tracker::add_completions): New.
10039 (throw_max_completions_reached_error): Delete.
10040 (complete_line): Adjust to work with a completion_tracker instead
10041 of a VEC. Don't create a completion_tracker_t or check for max
10042 completions here.
10043 (command_completer, command_completer_handle_brkchars)
10044 (signal_completer, reg_or_group_completer_1)
10045 (reg_or_group_completer, default_completer_handle_brkchars):
10046 Adjust to work with a completion_tracker.
10047 (gdb_completion_word_break_characters_throw): New.
10048 (gdb_completion_word_break_characters): Reimplement.
10049 (line_completion_function): Delete.
10050 (completion_tracker::recompute_lowest_common_denominator)
10051 (expand_preserving_ws)
10052 (completion_tracker::build_completion_result)
10053 (completion_result::completion_result)
10054 (completion_result::completion_result)
10055 (completion_result::~completion_result)
10056 (completion_result::completion_result)
10057 (completion_result::release_match_list, compare_cstrings)
10058 (completion_result::sort_match_list)
10059 (completion_result::reset_match_list)
10060 (gdb_rl_attempted_completion_function_throw)
10061 (gdb_rl_attempted_completion_function): New.
10062 * completer.h (completion_list, struct completion_result)
10063 (class completion_tracker): New.
10064 (complete_line): Add completion_tracker parameter.
10065 (readline_line_completion_function): Delete.
10066 (gdb_rl_attempted_completion_function): New.
10067 (noop_completer, filename_completer, expression_completer)
10068 (location_completer, symbol_completer, command_completer)
10069 (signal_completer, reg_or_group_completer): Update prototypes.
10070 (completion_tracker_t, new_completion_tracker)
10071 (make_cleanup_free_completion_tracker): Delete.
10072 (enum maybe_add_completion_enum): Delete.
10073 (maybe_add_completion): Delete.
10074 (throw_max_completions_reached_error): Delete.
10075 * corefile.c (complete_set_gnutarget): Adjust to work with a
10076 completion_tracker instead of a VEC.
10077 * cp-abi.c (cp_abi_completer): Adjust to work with a
10078 completion_tracker instead of a VEC.
10079 * d-lang.c (d_language_defn): Adjust.
10080 * disasm.c (disassembler_options_completer): Adjust to work with a
10081 completion_tracker instead of a VEC.
10082 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10083 (f_collect_symbol_completion_matches): ... this. Adjust to work
10084 with a completion_tracker instead of a VEC.
10085 (f_language_defn): Adjust.
10086 * go-lang.c (go_language_defn): Adjust.
10087 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10088 Adjust to work with a completion_tracker instead of a VEC.
10089 * infrun.c (handle_completer): Likewise.
10090 * interps.c (interpreter_completer): Likewise.
10091 * interps.h (interpreter_completer): Likewise.
10092 * language.c (unknown_language_defn, auto_language_defn)
10093 (local_language_defn): Adjust.
10094 * language.h (language_defn::la_make_symbol_completion_list):
10095 Rename to ...
10096 (language_defn::la_collect_symbol_completion_matches): ... this
10097 and adjust to work with a completion_tracker instead of a VEC.
10098 * m2-lang.c (m2_language_defn): Adjust.
10099 * objc-lang.c (objc_language_defn): Adjust.
10100 * opencl-lang.c (opencl_language_defn): Adjust.
10101 * p-lang.c (pascal_language_defn): Adjust.
10102 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10103 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10104 with a completion_tracker.
10105 * rust-lang.c (rust_language_defn): Adjust.
10106 * symtab.c (free_completion_list, do_free_completion_list)
10107 (return_val, completion_tracker): Delete.
10108 (completion_list_add_name, completion_list_add_symbol)
10109 (completion_list_add_msymbol, completion_list_objc_symbol)
10110 (completion_list_add_fields, add_symtab_completions): Add
10111 completion_tracker parameter and use it.
10112 (default_make_symbol_completion_list_break_on_1): Rename to...
10113 (default_collect_symbol_completion_matches_break_on): ... this.
10114 Add completion_tracker parameter and use it instead of allocating
10115 a completion tracker here.
10116 (default_make_symbol_completion_list_break_on): Delete old
10117 implementation.
10118 (default_make_symbol_completion_list): Delete.
10119 (default_collect_symbol_completion_matches): New.
10120 (make_symbol_completion_list): Delete.
10121 (collect_symbol_completion_matches): New.
10122 (make_symbol_completion_type): Rename to ...
10123 (collect_symbol_completion_matches_type): ... this. Add
10124 completion_tracker parameter and use it instead of VEC.
10125 (make_file_symbol_completion_list_1): Rename to...
10126 (collect_file_symbol_completion_matches): ... this. Add
10127 completion_tracker parameter and use it instead of VEC.
10128 (make_file_symbol_completion_list): Delete.
10129 (add_filename_to_list): Use completion_list instead of a VEC.
10130 (add_partial_filename_data::list): Now a completion_list.
10131 (make_source_files_completion_list): Work with a completion_list
10132 instead of a VEC.
10133 * symtab.h: Include "completer.h".
10134 (default_make_symbol_completion_list_break_on)
10135 (default_make_symbol_completion_list, make_symbol_completion_list)
10136 (make_symbol_completion_type, make_file_symbol_completion_list)
10137 (make_source_files_completion_list): Delete.
10138 (default_collect_symbol_completion_matches_break_on)
10139 (default_collect_symbol_completion_matches)
10140 (collect_symbol_completion_matches)
10141 (collect_symbol_completion_matches_type)
10142 (collect_file_symbol_completion_matches)
10143 (make_source_files_completion_list): New.
10144 * top.c (init_main): Don't install a rl_completion_entry_function
10145 hook. Install a rl_attempted_completion_function hook instead.
10146 * tui/tui-layout.c (layout_completer): Adjust to work with a
10147 completion_tracker.
10148 * tui/tui-regs.c (tui_reggroup_completer):
10149 * tui/tui-win.c (window_name_completer, focus_completer)
10150 (winheight_completer): Adjust to work with a completion_tracker.
10151 * value.c: Include "completer.h".
10152 (complete_internalvar): Adjust to work with a completion_tracker.
10153 * value.h (complete_internalvar): Likewise.
10154
6e1dbf8c
PA
101552017-07-17 Pedro Alves <palves@redhat.com>
10156
10157 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10158 renames.
10159 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10160 comments to completer_ftype's declaration.
10161 <completer_handle_brkchars>: Change type to
10162 completer_handle_brkchars_ftype.
10163 * command.h (completer_ftype): Add describing comment and give
10164 names to parameters.
10165 (completer_ftype_void): Rename to ...
10166 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10167 (set_cmd_completer_handle_brkchars): Adjust.
10168 * completer.c (filename_completer_handle_brkchars): New function.
10169 (complete_line_internal_normal_command): New function, factored
10170 out from ...
10171 (complete_line_internal): ... here.
10172 (command_completer_handle_brkchars)
10173 (default_completer_handle_brkchars)
10174 (completer_handle_brkchars_func_for_completer): New functions.
10175 * completer.h (set_gdb_completion_word_break_characters): Delete
10176 declaration.
10177 (completer_handle_brkchars_func_for_completer): New declaration.
10178 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10179 completer_handle_brkchars_func_for_completer.
10180
78b13106
PA
101812017-07-17 Pedro Alves <palves@redhat.com>
10182
10183 * completer.c (symbol_completer): New function, based on
10184 make_symbol_completion_list_fn.
10185 * completer.h (symbol_completer): New declaration.
10186 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10187 * python/py-cmd.c (completers): Adjust.
10188 * symtab.c (make_symbol_completion_list_fn): Delete.
10189 * symtab.h (make_symbol_completion_list_fn): Delete.
10190 * cli/cli-decode.c (add_cmd): Adjust.
10191
bbf2f4df
PA
101922017-07-17 Pedro Alves <palves@redhat.com>
10193
10194 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10195 * dwarf2read.c: Include "filename-seen-cache.h".
10196 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10197 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10198 * filename-seen-cache.c: New file.
10199 * filename-seen-cache.h: New file.
10200 * symtab.c: Include "filename-seen-cache.h".
10201 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10202 (create_filename_seen_cache, clear_filename_seen_cache)
10203 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10204 to filename-seen-cache.h/filename-seen-cache.c.
10205 (output_source_filename, sources_info)
10206 (maybe_add_partial_symtab_filename)
10207 (make_source_files_completion_list): Adjust to use
10208 filename_seen_cache.
10209
330cdd98
PA
102102017-07-17 Pedro Alves <palves@redhat.com>
10211
10212 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10213 fields.
10214 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10215 dwarf2_debug_sections*)): New.
10216 (dwarf2_per_objfile::dwarf2_per_objfile(const
10217 dwarf2_per_objfile&)): Declare as deleted.
10218 (dwarf2_per_objfile::operator=): Declare as deleted.
10219 (dwarf2_per_objfile::dwarf2_per_objfile)
10220 (dwarf2_per_objfile::~dwarf2_per_objfile)
10221 (dwarf2_per_objfile::free_cached_comp_units): New.
10222 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10223 ctor. Call dwarf2_per_objfile's ctor manually.
10224 (dwarf2_locate_sections): Deleted/refactored as ...
10225 (dwarf2_per_objfile::locate_sections): ... this new method.
10226 (free_cached_comp_units): Defer to
10227 dwarf2_per_objfile::free_cached_comp_units.
10228 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10229
8880f2a9
TT
102302017-07-14 Tom Tromey <tom@tromey.com>
10231
10232 PR rust/21764:
10233 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10234 parameter.
10235 <UNOP_SIZEOF>: Split into separate case.
10236 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10237
65547233
TT
102382017-07-14 Tom Tromey <tom@tromey.com>
10239
10240 PR rust/21763:
10241 * symtab.c (symbol_matches_domain): Add language_rust to special
10242 case.
10243 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10244 treat LOC_TYPEDEF symbols as variables.
10245
8f14146e
PA
102462017-07-14 Pedro Alves <palves@redhat.com>
10247
10248 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10249 symtabs matching all symtabs with SRCFILE as file name instead of
10250 only considering the first hit, with lookup_symtab.
10251
2347965c
SM
102522017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10253
10254 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10255 operator_name parameters.
10256 (gen_expr): Update function call.
10257
40f4af28
SM
102582017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10259
10260 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10261 parameter.
10262 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10263 Likewise.
10264 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10265 parameter, use agent_expr::gdbarch instead, update function
10266 calls.
10267 (locexpr_tracepoint_var_ref): Likewise.
10268 (loclist_tracepoint_var_ref): Likewise.
10269 * ax-gdb.c (gen_trace_static_fields): Likewise.
10270 (gen_traced_pop): Likewise.
10271 (gen_frame_args_address): Likewise.
10272 (gen_frame_locals_address): Likewise.
10273 (gen_var_ref): Likewise.
10274 (gen_struct_ref_recursive): Likewise.
10275 (gen_static_field): Likewise.
10276 (gen_maybe_namespace_elt): Likewise.
10277 (gen_expr): Likewise.
10278 (gen_trace_for_var): Likewise.
10279 (gen_trace_for_expr): Likewise.
10280 (gen_trace_for_return_address): Likewise.
10281
053f8057
SM
102822017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10283
10284 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10285 parameter.
10286 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10287
6661ad48
SM
102882017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10289
10290 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10291 from ax, update calls.
10292 (gen_usual_arithmetic): Likewise.
10293 (gen_integral_promotions): Likewise.
10294 (gen_bitfield_ref): Likewise.
10295 (gen_primitive_field): Likewise.
10296 (gen_struct_ref_recursive): Likewise.
10297 (gen_struct_ref): Likewise.
10298 (gen_maybe_namespace_elt): Likewise.
10299 (gen_struct_elt_for_reference): Likewise.
10300 (gen_namespace_elt): Likewise.
10301 (gen_aggregate_elt_ref): Likewise.
10302 (gen_expr): Get gdbarch from ax, update calls.
10303 (gen_expr_binop_rest): Likewise.
10304
c55a47e7
PA
103052017-07-13 Pedro Alves <palves@redhat.com>
10306
10307 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10308 as default tdesc.
10309 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10310 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10311 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10312 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10313 tdep.
10314 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10315 Get final tdesc from the tdep.
10316 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10317 default tdesc.
10318 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10319 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10320 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10321 Use it as default tdesc.
10322 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10323 down to amd_init_abi. No longer handle fallback tdesc here.
10324 * amd64-tdep.h (tdesc_x32): Declare.
10325 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10326 parameter.
10327 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10328 as default tdesc.
10329
55efceab
AA
103302017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10331
10332 * s390-linux-tdep.c (s390_process_record): Add support for
10333 instructions new in arch12.
10334
0aa37b65
JB
103352017-07-11 John Baldwin <jhb@FreeBSD.org>
10336
10337 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10338 PT_GETFSBASE and PT_GETGSBASE.
10339 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10340 PT_SETGSBASE.
10341
48aeef91
JB
103422017-07-11 John Baldwin <jhb@FreeBSD.org>
10343
10344 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10345 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10346 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10347 those rules.
10348 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10349 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10350 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10351 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10352 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10353 * features/i386/amd64.xml: Add 64bit-segments.xml.
10354 * features/i386/amd64-avx-avx512.c: Regenerated.
10355 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10356 * features/i386/amd64-avx-mpx.c: Regenerated.
10357 * features/i386/amd64-avx.c: Regenerated.
10358 * features/i386/amd64-mpx.c: Regenerated.
10359 * features/i386/amd64.c: Regenerated.
10360 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10361 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10362 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10363 * regformats/i386/amd64-avx.dat: Regenerated.
10364 * regformats/i386/amd64-mpx.dat: Regenerated.
10365 * regformats/i386/amd64.dat: Regenerated.
10366
77c501bc
YQ
103672017-07-10 Yao Qi <yao.qi@linaro.org>
10368
10369 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10370 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10371
6dc8d757
AK
103722017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10373
10374 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10375 unsetenv.
10376 * gnulib/aclocal.m4: Regenerate.
10377 * gnulib/config.in: Regenerate.
10378 * gnulib/configure: Regenerate.
10379 * gnulib/import/Makefile.am: Regenerate.
10380 * gnulib/import/Makefile.in: Regenerate.
10381 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10382 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10383 * gnulib/import/m4/environ.m4: New file.
10384 * gnulib/import/m4/setenv.m4: New file.
10385 * gnulib/import/setenv.c: New file.
10386 * gnulib/import/unsetenv.c: New file.
10387
266934d1
SM
103882017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10389
10390 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10391 address when op is DW_OP_addr.
10392
03278692
TT
103932017-07-09 Tom Tromey <tom@tromey.com>
10394
10395 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10396 check and apply to outer type.
10397
4b654465
JB
103982017-07-07 John Baldwin <jhb@FreeBSD.org>
10399
10400 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10401 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10402 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10403 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10404
2af9fc44
JB
104052017-07-07 John Baldwin <jhb@FreeBSD.org>
10406
10407 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10408
382b69bb
JB
104092017-07-07 John Baldwin <jhb@FreeBSD.org>
10410
10411 * corelow.c (get_core_siginfo): Remove.
10412 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10413 instead of get_core_siginfo.
10414 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10415 * gdbarch.h: Re-generate.
10416 * gdbarch.c: Re-generate.
10417 * linux-tdep.c (linux_core_xfer_siginfo): New.
10418 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10419
6e5eab33
JB
104202017-07-07 John Baldwin <jhb@FreeBSD.org>
10421
10422 * corelow.c (thread_section_name): Move to ...
10423 * gdbcore.h (thread_section_name): ... here.
10424
929edea9
JB
104252017-07-07 John Baldwin <jhb@FreeBSD.org>
10426
10427 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10428 (struct siginfo32): New.
10429 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10430 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10431 via ptrace(PT_LWPINFO).
10432
762c974a
JB
104332017-07-07 John Baldwin <jhb@FreeBSD.org>
10434
10435 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10436 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10437 (fbsd_get_siginfo_type): New.
10438 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10439 (_initialize_fbsd_tdep): New.
10440
33c5cd75
DB
104412017-07-06 David Blaikie <dblaikie@gmail.com>
10442
10443 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10444 a singular dwo_unit*) to support multiple CUs in the same way that
10445 multiple TUs are supported.
10446 (create_cus_hash_table): Replace create_dwo_cu with a function for
10447 parsing multiple CUs from a DWO file.
10448 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10449 create_dwo_cu.
10450 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10451 htab_find, rather than comparing the signature to a singleton CU in
10452 the dwo_file.
10453
8455d262
PA
104542017-07-06 Pedro Alves <palves@redhat.com>
10455
10456 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10457
4da3eb35
PA
104582017-07-04 Pedro Alves <palves@redhat.com>
10459
10460 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10461 * gdbtypes.h (TYPE_STATIC): Delete.
10462 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10463 is_synchronized, is_native>: Delete.
10464 <dummy>: Bump.
10465 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10466 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10467 (TYPE_FN_FIELD_ABSTRACT): Delete.
10468
5bfd255c
SM
104692017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10470
10471 * buffer.h (buffer_finish): Fix spelling mistakes.
10472
25c54127
EZ
104732017-07-01 Eli Zaretskii <eliz@gnu.org>
10474
10475 * .dir-locals.el: Automatically switch to C-style comments in
10476 versions of Emacs that support the feature.
10477
dc4bde35
SDJ
104782017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10479 Pedro Alves <palves@redhat.com>
10480
10481 PR cli/21688
10482 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10483 (process_next_line): New variable 'inline_cmd'.
10484 Adjust 'if' clauses for "python", "compile" and "guile" to use
10485 'command_name_equals' and check for '!inline_cmd'.
10486
51ed89aa
SDJ
104872017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10488
10489 PR cli/21688
10490 * cli/cli-script.c (command_name_equals_not_inline): New function.
10491 (process_next_line): Adjust 'if' clauses for "python", "compile"
10492 and "guile" to use command_name_equals_not_inline.
10493
eb17d413
PA
104942017-06-29 Pedro Alves <palves@redhat.com>
10495
10496 * completer.c (expression_completer): Call
10497 linespec_location_completer instead of location_completer.
10498
195bcdd5
PA
104992017-06-29 Pedro Alves <palves@redhat.com>
10500
10501 * completer.c (expression_completer): Remove code that recomputes
10502 'text' from 'word'.
10503
adc764e7
YQ
105042017-06-29 Yao Qi <yao.qi@linaro.org>
10505
10506 * regformats/regdat.sh: Generate code with
10507 "ifndef IN_PROCESS_AGENT".
10508
6e75794e
PA
105092017-06-28 Pedro Alves <palves@redhat.com>
10510
10511 * command.h: Include "common/scoped_restore.h".
10512
bc491f2e
YQ
105132017-06-28 Yao Qi <yao.qi@linaro.org>
10514
10515 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10516 instead of obstack_grow.
10517
41664b45
DG
105182017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10519
10520 PR gdb/21337
10521 * symfile.c (reread_symbols): Call objfiles_changed just before
10522 read_symbols.
10523
6da67eb1
PA
105242017-06-27 Pedro Alves <palves@redhat.com>
10525
10526 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10527 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10528 (completion_list_add_symbol, completion_list_add_msymbol):
10529 ... these new functions.
10530 (add_symtab_completions)
10531 (default_make_symbol_completion_list_break_on_1): Adjust.
10532
23732b1e
PA
105332017-06-27 Pedro Alves <palves@redhat.com>
10534
10535 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10536 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10537 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10538 dtor.
10539 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10540 'storage_obstack' field an auto_obstack. In-class initialize all
10541 non-bitfield fields. Make minsyms_read bool.
10542 * symfile.c (read_symbols): Adjust.
10543
a4d1e79a
AH
105442017-06-27 Alan Hayward <alan.hayward@arm.com>
10545
10546 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10547 (gdbsim_store_register): Likewise.
10548
8268c778
PA
105492017-06-27 Pedro Alves <palves@redhat.com>
10550
10551 * c-exp.y (name_obstack): Now an auto_obstack.
10552 (yylex): Use auto_obstack::clear.
10553 (c_parse): Use auto_obstack::clear instead of reinitializing and
10554 freeing the obstack.
10555 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10556 * d-exp.y (name_obstack): Now an auto_obstack.
10557 (yylex): Use auto_obstack::clear.
10558 (d_parse): Use auto_obstack::clear instead of reinitializing and
10559 freeing the obstack.
10560 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10561 auto_obstack.
10562 * dwarf2read.c (create_addrmap_from_index)
10563 (dwarf2_build_psymtabs_hard)
10564 (update_enumeration_type_from_children): Likewise.
10565 * gdb_obstack.h (auto_obstack): New type.
10566 * go-exp.y (name_obstack): Now an auto_obstack.
10567 (build_packaged_name): Use auto_obstack::clear.
10568 (go_parse): Use auto_obstack::clear instead of reinitializing and
10569 freeing the obstack.
10570 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10571 auto_obstack.
10572 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10573 * rust-exp.y (work_obstack): Now an auto_obstack.
10574 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10575 reinitializing and freeing the obstack.
10576 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10577 (host_char_to_target): Use auto_obstack.
10578 * utils.h (make_cleanup_obstack_free): Delete declaration.
10579 * valprint.c (generic_emit_char, generic_printstr): Use
10580 auto_obstack.
10581
db665f42
SM
105822017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10583
10584 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10585 thread.
10586 (darwin_init_thread_list): Don't update dummy thread.
10587 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10588
873c0814
SM
105892017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10590
10591 * record-full.c (netorder16): Remove.
10592
8b5a7a6e
SM
105932017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10594
10595 * common/diagnostics.h: Define macros for GCC.
10596 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10597 * common/vec.h: Include diagnostics.h.
10598 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10599 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10600 warning.
10601
d1435379
SM
106022017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10603
10604 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10605 New macro.
10606 * ada-lex.l: Ignore deprecated register warnings.
10607
cc75e0fd
SM
106082017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10609
10610 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10611 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10612
07809eaf
SM
106132017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10614
10615 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10616 its own line.
10617
f076f034
SM
106182017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10619
10620 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10621
0dd5cbc5
AH
106222017-06-23 Alan Hayward <alan.hayward@arm.com>
10623
10624 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10625 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10626 (xtensa_register_read_masked): Likewise.
10627
d4c6ce5b
SDJ
106282017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10629
10630 * common/environ.c (gdb_environ::unset): Update comment.
10631
16892a03
AH
106322017-06-22 Alan Hayward <alan.hayward@arm.com>
10633
10634 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10635 registers.
10636
d7dcbefc
AH
106372017-06-22 Alan Hayward <alan.hayward@arm.com>
10638
10639 * record-full.c (record_full_exec_insn): Use byte_vector.
10640
b30ff123
YQ
106412017-06-22 Yao Qi <yao.qi@linaro.org>
10642
10643 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10644 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10645
4fa847d7
AH
106462017-06-22 Alan Hayward <alan.hayward@arm.com>
10647
10648 * remote.c (cached_reg): Move from here...
10649 * regcache.h (cached_reg): ...to here.
10650 * python/py-unwind.c (struct reg_info): Remove.
10651 (cached_frame_info): Use cached_reg_t.
10652 (pyuw_prev_register): Likewise.
10653 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10654 (pyuw_dealloc_cache): Free all registers.
10655
f4906a9a
PA
106562017-06-22 Pedro Alves <palves@redhat.com>
10657 Simon Marchi <simon.marchi@ericsson.com>
10658
10659 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10660 warning.
10661 * common/diagnostics.h: New file.
10662
b45a1208
PA
106632017-06-22 Pedro Alves <palves@redhat.com>
10664
10665 * common/agent.h: Add include guards.
10666
e4da2c61
SM
106672017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10668
10669 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10670 talk about addressable units instead of bytes.
10671
96160d60
SDJ
106722017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10673
10674 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10675 of '::const_iterator'.
10676
9a6c7d9c
SDJ
106772017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10678
10679 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10680 'unittests/environ-selftests.c'.
10681 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10682 * charset.c (find_charset_names): Declare object 'iconv_env'.
10683 Update code to use 'iconv_env' object. Remove call to
10684 'free_environ'.
10685 * common/environ.c: Include <utility>.
10686 (make_environ): Delete function.
10687 (free_environ): Delete function.
10688 (gdb_environ::clear): New function.
10689 (gdb_environ::operator=): New function.
10690 (gdb_environ::get): Likewise.
10691 (environ_vector): Delete function.
10692 (set_in_environ): Delete function.
10693 (gdb_environ::set): New function.
10694 (unset_in_environ): Delete function.
10695 (gdb_environ::unset): New function.
10696 (gdb_environ::envp): Likewise.
10697 * common/environ.h: Include <vector>.
10698 (struct gdb_environ): Delete; transform into...
10699 (class gdb_environ): ... this class.
10700 (free_environ): Delete prototype.
10701 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10702 environ_vector): Likewise.
10703 * infcmd.c (run_command_1): Update code to call
10704 'envp' from 'gdb_environ' class.
10705 (environment_info): Update code to call methods from 'gdb_environ'
10706 class.
10707 (unset_environment_command): Likewise.
10708 (path_info): Likewise.
10709 (path_command): Likewise.
10710 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10711 (inferior::inferior): Initialize 'environment' using the host's
10712 information.
10713 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10714 Include "environ.h".
10715 (class inferior) <environment>: Change type from 'struct
10716 gdb_environ' to 'gdb_environ'.
10717 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10718 methods from 'gdb_environ' class.
10719 * solib.c (solib_find_1): Likewise
10720 * unittests/environ-selftests.c: New file.
10721
75c554cf
YQ
107222017-06-20 Yao Qi <yao.qi@linaro.org>
10723
10724 * features/i386/i386-linux.xml: Exchange the order of including
10725 32bit-linux.xml and 32bit-sse.xml.
10726 * features/i386/i386-linux.c: Regenerated.
10727
72ddacb7
YQ
107282017-06-20 Yao Qi <yao.qi@linaro.org>
10729
10730 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10731 Delete copy ctor and assignment operator.
10732 (tdesc_type): Likewise.
10733 (tdesc_feature): Likewise.
10734 (tdesc_free_reg): Remove.
10735 (tdesc_create_reg): Use new.
10736 (tdesc_free_type): Remove.
10737 (tdesc_create_vector): Use new.
10738 (tdesc_create_union): Likewise.
10739 (tdesc_create_flags): Likewise.
10740 (tdesc_create_enum): Likewise.
10741 (tdesc_free_feature): Delete.
10742 (free_target_description): Use delete.
10743
325c9fd4
JB
107442017-06-19 John Baldwin <jhb@FreeBSD.org>
10745
10746 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10747 registers.
10748
16b7a719
PA
107492017-06-19 Pedro Alves <palves@redhat.com>
10750
10751 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10752 after gdb::unlinker.
10753
1c8e01c9
SDJ
107542017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10755
10756 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10757 gdb_environ to access an environment variable.
10758
ffce45d2
TP
107592017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10760
10761 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10762 gdb_byte*.
10763
1d4fbac9
SM
107642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10765
10766 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10767
8465943a
SM
107682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10769
10770 * configure: Re-generate.
10771 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10772
3e019bdc
SM
107732017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10774
10775 * configure: Re-generate.
10776 * warning.m4: Pass -Werror to compiler when checking for
10777 supported warning flags.
10778
cf0dd6f0
SM
107792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10780
10781 * Makefile.in (COMPILE.pre): Add "-x c++".
10782
6f98355c
YQ
107832017-06-16 Alan Hayward <alan.hayward@arm.com>
10784 Pedro Alves <palves@redhat.com>
10785 Yao Qi <yao.qi@linaro.org>
10786
10787 * defs.h (RequireLongest): New.
10788 (extract_integer): Declare function template.
10789 (extract_signed_integer): Remove the declaration, but define it
10790 static inline.
10791 (extract_unsigned_integer): Likewise.
10792 (store_integer): Declare function template.
10793 (store_signed_integer): Remove the declaration, but define it
10794 static inline.
10795 (store_unsigned_integer): Likewise.
10796 * findvar.c (extract_integer): New function template.
10797 (extract_signed_integer): Remove.
10798 (extract_unsigned_integer): Remove.
10799 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10800 instantiations.
10801 (store_integer): New function template.
10802 (store_signed_integer): Remove.
10803 (store_unsigned_integer): Remove.
10804 (store_integer): Explicit instantiations.
10805 * regcache.c (regcache_raw_read_signed): Update.
10806 (regcache::raw_read): New function.
10807 (regcache::raw_read_signed): Remove.
10808 (regcache::raw_read_unsigned): Remove.
10809 (regcache_raw_read_unsigned): Update.
10810 (regcache_raw_write_unsigned): Update.
10811 (regcache::raw_write_signed): Remove.
10812 (regcache::raw_write): New function.
10813 (regcache_cooked_read_signed): Update.
10814 (regcache::raw_write_unsigned): Remove.
10815 (regcache::cooked_read_signed): Remove.
10816 (regcache_cooked_read_unsigned): Update.
10817 (regcache::cooked_read_unsigned): Remove.
10818 (regcache_cooked_write_signed): Update.
10819 (regcache_cooked_write_unsigned): Update.
10820 * regcache.h (regcache) <raw_read_signed>: Remove.
10821 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10822 <raw_read, raw_write>: New.
10823 <cooked_read_signed, cooked_write_signed>: Remove.
10824 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10825 <cooked_read, cooked_write>: New.
10826 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10827 (sh64_pseudo_register_write): Update.
10828
a87dc45a
AK
108292017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10830
10831 * arc-tdep.c (arc_disassembler_options): New variable.
10832 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10833 of default_print_insn.
10834 (arc_delayed_print_insn): Set info->section when needed,
10835 use default_print_insn to retrieve a disassembler.
10836
45159d6a
SDJ
108372017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10838
10839 PR gdb/21574
10840 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10841 to mention $SHELL and startup-with-shell.
10842
b46c4cf0
MF
108432017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10844
10845 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10846
6394c606
YQ
108472017-06-14 Yao Qi <yao.qi@linaro.org>
10848
10849 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10850 default_print_insn instead of print_insn_aarch64.
10851 * arm-tdep.c (gdb_print_insn_arm): Call
10852 default_print_insn instead of print_insn_big_arm
10853 and print_insn_little_arm.
10854 * i386-tdep.c (i386_print_insn): Call default_print_insn
10855 instead of print_insn_i386.
10856 * ia64-tdep.c (ia64_print_insn): Call
10857 default_print_insn instead of print_insn_ia64.
10858 * mips-tdep.c (gdb_print_insn_mips): Call
10859 default_print_insn instead of print_insn_big_mips
10860 and print_insn_little_mips.
10861 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10862 instead of print_insn_spu.
10863
d5722aa2
PA
108642017-06-14 Pedro Alves <palves@redhat.com>
10865
10866 * ada-lang.c: Include "common/byte-vector.h".
10867 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10868 * charset.c (wchar_iterator::iterate): Resize the vector instead
10869 of reserving it.
10870 * common/byte-vector.h: Include "common/def-vector.h".
10871 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10872 * cli/cli-dump.c: Include "common/byte-vector.h".
10873 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10874 * common/byte-vector.h: New file.
10875 * common/def-vector.h: New file.
10876 * common/default-init-alloc.h: New file.
10877 * dwarf2loc.c: Include "common/byte-vector.h".
10878 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10879 instead of reserving it.
10880 * dwarf2read.c: Include "common/byte-vector.h".
10881 (data_buf::m_vec): Now a gdb::byte_vector.
10882 * gdb_regex.c: Include "common/def-vector.h".
10883 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10884 * mi/mi-main.c: Include "common/byte-vector.h".
10885 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10886 * printcmd.c: Include "common/byte-vector.h".
10887 (print_scalar_formatted): Use gdb::byte_vector.
10888 * valprint.c: Include "common/byte-vector.h".
10889 (maybe_negate_by_bytes, print_decimal_chars): Use
10890 gdb::byte_vector.
10891
01ec7a27
SM
108922017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10893
10894 * darwin-nat.c: Include "nat/fork-inferior.h".
10895
848d9074
SM
108962017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10897
10898 * configure.nat: Factor out Darwin bits that are not
10899 architecture-specific. Add fork-inferior.o.
10900
3b912944
SM
109012017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10902
10903 * configure.nat: Factor out AIX bits that are not
10904 architecture-specific. Add fork-inferior.o.
10905
55acdf22
AA
109062017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10907
10908 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10909 (read_pieced_value, write_pieced_value): ...here. Reduce to
10910 wrappers that just call rw_pieced_value.
10911
f65e2044
AA
109122017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10913
10914 * dwarf2loc.c (write_pieced_value): When writing the data for a
10915 memory piece, use write_memory_with_notification instead of
10916 write_memory.
10917
23f945bf
AA
109182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10919
10920 * valops.c (read_value_memory): Change embedded_offset to
10921 represent a bit offset instead of a byte offset.
10922 * value.h (read_value_memory): Adjust comment.
10923
f236533e
AA
109242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10925
10926 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10927 dest_offset_bits and source_offset_bits.
10928 (write_pieced_value): Likewise.
10929
65d84b76
AA
109302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10931
10932 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10933 given by DW_OP_bit_piece.
10934 (write_pieced_value): Likewise.
10935
242d31ab
AA
109362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10937
10938 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10939 some other preparations to the places where sufficient information
10940 is available.
10941 (write_pieced_value): Likewise.
10942
03c8af18
AA
109432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10944
10945 * dwarf2loc.c (bits_to_bytes): New function.
10946 (read_pieced_value): Fix offset calculations for register pieces
10947 on big-endian targets.
10948 (write_pieced_value): Likewise.
10949
840989c1
AA
109502017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10951
10952 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10953 (write_pieced_value): Likewise.
10954
359b19bb
AA
109552017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10956
10957 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10958 transfer the source value's least significant bits, instead of its
10959 lowest-addressed ones. Rename type_len to max_offset.
10960 (read_pieced_value): Mirror above changes to write_pieced_value as
10961 applicable.
10962
07c9ca3b
AA
109632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10964
10965 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10966 truncate full bytes from dest_offset_bits before using it as an
10967 offset into the buffer.
10968
f1cc9874
AA
109692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10970
10971 * dwarf2loc.c (write_pieced_value): Include transfer size in
10972 byte-wise check.
10973
cdaac320
AA
109742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10975
10976 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10977 calculation of this_size.
10978
af547a96
AA
109792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10980
10981 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10982 when targeting a bit-field.
10983 (write_pieced_value): Likewise.
10984
ddd7882a
AA
109852017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10986
10987 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10988 (allocate_piece_closure): Drop addr_size parameter.
10989 (dwarf2_evaluate_loc_desc_full): Adjust call to
10990 allocate_piece_closure.
10991
e9352324
AA
109922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10993
10994 PR gdb/21226
10995 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10996 the LSB end, independent of endianness.
10997
d5d1163e
AA
109982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10999
11000 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11001 size capping.
11002
032bb6ea
YQ
110032017-06-13 Yao Qi <yao.qi@linaro.org>
11004
11005 * mips-linux-nat.c: Move include features/mips*-linux.c to
11006 mips-linux-tdep.c.
11007 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11008 to mips-linux-tdep.c.
11009 * mips-linux-tdep.c: Include features/mips*-linux.c
11010 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11011 functions.
11012 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11013 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11014 (tdesc_mips64_dsp_linux): Declare.
11015
f12f6bad
TT
110162017-06-12 Tom Tromey <tom@tromey.com>
11017
11018 * valprint.h (val_print_type_code_int): Remove.
11019 * valprint.c (generic_val_print_int): Always call
11020 val_print_scalar_formatted.
11021 (val_print_type_code_int): Remove.
11022 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11023 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11024 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11025 * ada-valprint.c (ada_val_print_num): Use
11026 val_print_scalar_formatted.
11027
d9109c80
TT
110282017-06-12 Tom Tromey <tom@tromey.com>
11029
11030 * printcmd.c (print_scalar_formatted): Unify the two switches.
11031 Don't convert scalars to LONGEST.
11032
4ac0cb1c
TT
110332017-06-12 Tom Tromey <tom@tromey.com>
11034
11035 PR exp/16225:
11036 * valprint.h (print_decimal_chars): Update.
11037 * valprint.c (maybe_negate_by_bytes): New function.
11038 (print_decimal_chars): Add "is_signed" argument.
11039 * printcmd.c (print_scalar_formatted): Update.
11040
30a25466
TT
110412017-06-12 Tom Tromey <tom@tromey.com>
11042
11043 PR exp/16225:
11044 * valprint.h (print_binary_chars, print_hex_chars): Update.
11045 * valprint.c (val_print_type_code_int): Update.
11046 (print_binary_chars): Add "zero_pad" argument.
11047 (emit_octal_digit): New function.
11048 (print_octal_chars): Don't zero-pad.
11049 (print_decimal_chars): Likewise.
11050 (print_hex_chars): Add "zero_pad" argument.
11051 * sh64-tdep.c (sh64_do_fp_register): Update.
11052 * regcache.c (regcache::dump): Update.
11053 * printcmd.c (print_scalar_formatted): Update.
11054 * infcmd.c (default_print_one_register_info): Update.
11055
b3464d03
PA
110562017-06-12 Pedro Alves <palves@redhat.com>
11057 Alan Hayward <alan.hayward@arm.com>
11058
11059 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11060 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11061 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11062 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11063 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11064
4b76cda9
PA
110652017-06-12 Pedro Alves <palves@redhat.com>
11066
11067 * dwarf2read.c (mapped_symtab::data): Now a vector of
11068 symtab_index_entry instead of vector of
11069 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11070 whether an element's name is NULL instead of checking whether the
11071 element itself is NULL.
11072 (find_slot): Change return type. Adjust.
11073 (hash_expand, , add_index_entry, uniquify_cu_indices)
11074 (write_hash_table): Adjust.
11075
e8f8bcb3
PA
110762017-06-12 Pedro Alves <palves@redhat.com>
11077
11078 * dwarf2read.c (recursively_count_psymbols): New function.
11079 (write_psymtabs_to_index): Call it to compute number of psyms and
11080 pass estimate size of psyms_seen to unordered_set's ctor.
11081
70a1152b
PA
110822017-06-12 Pedro Alves <palves@redhat.com>
11083
11084 * dwarf2read.c (write_hash_table): Check if key already exists
11085 before emplacing.
11086
c2f134ac
PA
110872017-06-12 Pedro Alves <palves@redhat.com>
11088
11089 * dwarf2read.c (data_buf::append_space): Rename to...
11090 (data_buf::grow): ... this, and make private. Adjust all callers.
11091 (data_buf::append_uint): New method.
11092 (add_address_entry, write_one_signatured_type)
11093 (write_psymtabs_to_index): Use it.
11094
a81e6d4d
PA
110952017-06-12 Pedro Alves <palves@redhat.com>
11096
11097 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11098 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11099 (data_buf::file_write): Call ::fwrite directly.
11100
6fd931f2
PA
111012017-06-12 Pedro Alves <palves@redhat.com>
11102
11103 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11104 std::vector::erase.
11105
bc8f2430
JK
111062017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11107
11108 Code cleanup: C++ify .gdb_index producer.
11109 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11110 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11111 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11112 (create_strtab, add_string): Remove.
11113 (file_write, data_buf): New.
11114 (struct symtab_index_entry): Use std::vector for cu_indices.
11115 (struct mapped_symtab): Use std::vector for data.
11116 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11117 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11118 Remove.
11119 (find_slot): Change return type. Update it to the new data structures.
11120 (hash_expand, add_index_entry): Update it to the new data structures.
11121 (offset_type_compare): Remove.
11122 (uniquify_cu_indices): Update it to the new data structures.
11123 (c_str_view, c_str_view_hasher, vector_hasher): New.
11124 (add_indices_to_cpool): Remove.
11125 (write_hash_table): Update it to the new data structures.
11126 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11127 (eq_psymtab_cu_index): Remove.
11128 (psym_index_map): New typedef.
11129 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11130 reference and std::unordered_map for cu_index_htab.
11131 (add_address_entry, add_address_entry_worker, write_address_map)
11132 (write_psymbols): Update it to the new data structures.
11133 (write_obstack): Remove.
11134 (struct signatured_type_index_data): Change types_list to a data_buf
11135 reference and psyms_seen to a std::unordered_set reference.
11136 (write_one_signatured_type, recursively_write_psymbols)
11137 (write_psymtabs_to_index): Update it to the new data structures.
11138
c4dcb155
SM
111392017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11140
11141 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11142 separate-debug-file commands.
11143 * symfile.h (separate_debug_file_debug): New global.
11144 * symfile.c (separate_debug_file_debug): New global.
11145 (separate_debug_file_exists, find_separate_debug_file): Add
11146 debug output.
11147 (_initialize_symfile): Add "set debug separate-debug-file"
11148 command.
11149 * build-id.c (build_id_to_debug_bfd,
11150 find_separate_debug_file_by_buildid): Add debug output.
11151
6d45d4b4
SM
111522017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11153
11154 * gdbarch.sh (displaced_step_free_closure): Remove.
11155 * gdbarch.h, gdbarch.c: Re-generate.
11156 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11157 displaced_step_free_closure.
11158 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11159 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11160 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11161 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11162 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11163 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11164 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11165 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11166 * infrun.c (displaced_step_clear): Call xfree instead of
11167 gdbarch_displaced_step_free_closure.
11168
2f91880f
SDJ
111692017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11170
11171 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11172 NULL".
11173
b8b6e72f
AH
111742017-06-08 Alan Hayward <alan.hayward@arm.com>
11175
11176 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11177 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11178 (mn10300_push_dummy_call): Likewise.
11179
5369082e
AH
111802017-06-08 Alan Hayward <alan.hayward@arm.com>
11181
11182 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11183
ff4ca5ac
AH
111842017-06-08 Alan Hayward <alan.hayward@arm.com>
11185
11186 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11187
aefd8b33
SDJ
111882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11189
11190 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11191 able to start inferiors using a shell.
11192 (New remote packets): Announce new packet "QStartupWithShell".
11193 * remote.c: Add PACKET_QStartupWithShell.
11194 (extended_remote_create_inferior): Handle new
11195 PACKET_QStartupWithShell.
11196 (remote_protocol_features) <QStartupWithShell>: New entry for
11197 PACKET_QStartupWithShell.
11198 (_initialize_remote): Call "add_packet_config_cmd" for
11199 QStartupShell.
11200
2090129c
SDJ
112012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11202 Pedro Alves <palves@redhat.com>
11203
11204 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11205 and "nat/fork-inferior.h".
11206 * common/common-inferior.h: New file, with contents from
11207 "gdb/inferior.h".
11208 * commom/common-utils.c: Include "common-utils.h".
11209 (stringify_argv): New function.
11210 * common/common-utils.h (stringify_argv): New prototype.
11211 * configure.nat: Add "fork-inferior.o" as a dependency for
11212 "*linux*", "fbsd*" and "nbsd*" hosts.
11213 * corefile.c (get_exec_file): Update comment.
11214 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11215 instead of "startup_inferior".
11216 (darwin_create_inferior): Call "add_thread_silent" after
11217 "fork_inferior".
11218 * fork-child.c: Cleanup unnecessary includes.
11219 (SHELL_FILE): Move to "common/common-fork-child.c".
11220 (environ): Likewise.
11221 (exec_wrapper): Initialize.
11222 (get_exec_wrapper): New function.
11223 (breakup_args): Move to "common/common-fork-child.c"; rename to
11224 "breakup_args_for_exec".
11225 (escape_bang_in_quoted_argument): Move to
11226 "common/common-fork-child.c".
11227 (saved_ui): New variable.
11228 (prefork_hook): New function.
11229 (postfork_hook): Likewise.
11230 (postfork_child_hook): Likewise.
11231 (gdb_startup_inferior): Likewise.
11232 (fork_inferior): Move to "common/common-fork-child.c". Update
11233 function to support gdbserver.
11234 (startup_inferior): Likewise.
11235 * gdbcore.h (get_exec_file): Remove declaration.
11236 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11237 instead of "startup_inferior". Call "add_thread_silent" after
11238 "fork_inferior".
11239 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11240 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11241 instead of "startup_inferior". Call "add_thread_silent" after
11242 "fork_inferior".
11243 * inferior.h: Include "common-inferior.h".
11244 (trace_start_error): Move to "common/common-utils.h".
11245 (trace_start_error_with_name): Likewise.
11246 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11247 (startup_inferior): Likewise.
11248 (gdb_startup_inferior): New prototype.
11249 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11250 * nat/fork-inferior.h: New file.
11251 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11252 instead of "startup_inferior". Call "add_thread_silent" after
11253 "fork_inferior".
11254 * target.h (target_terminal_init): Move prototype to
11255 "target/target.h".
11256 (target_terminal_inferior): Likewise.
11257 (target_terminal_ours): Likewise.
11258 * target/target.h (target_terminal_init): New prototype, moved
11259 from "target.h".
11260 (target_terminal_inferior): Likewise.
11261 (target_terminal_ours): Likewise.
11262 * utils.c (gdb_flush_out_err): New function.
11263
043a4934
SDJ
112642017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11265
11266 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11267 * common/common-gdbthread.h: New file, with parts from
11268 "gdb/gdbthread.h".
11269 * gdbthread.h: Include "common-gdbthread.h".
11270 (switch_to_thread): Moved to "common/common-gdbthread.h".
11271
15652511
SDJ
112722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11273
11274 * Makefile.in (SFILES): Add "common/job-control.c".
11275 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11276 (COMMON_OBS): Add "job-control.o".
11277 * common/job-control.c: New file, with contents from
11278 "gdb/inflow.c".
11279 * common/job-control.h: New file, with contents from "terminal.h".
11280 * fork-child.c: Include "job-control.h".
11281 * inflow.c: Include "job-control.h".
11282 (gdb_setpgid): Move to "common/common-inflow.c".
11283 (_initialize_inflow): Move setting of "job_control" to
11284 "handle_job_control".
11285 * terminal.h (job_control): Moved to "common/common-terminal.h".
11286 (gdb_setpgid): Likewise.
11287 * top.c: Include "job_control.h".
11288 * utils.c: Likewise.
11289 (job_control): Moved to "job-control.c".
11290
2d7cc5c7
PA
112912017-06-07 Pedro Alves <palves@redhat.com>
11292
11293 * Makefile.in (SFILES): Add gdb_regex.c.
11294 (COMMON_OBS): Add gdb_regex.o.
11295 * ada-lang.c (ada_add_standard_exceptions)
11296 (ada_add_exceptions_from_frame, name_matches_regex)
11297 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11298 parameter type to compiled_regex. Adjust.
11299 (ada_exceptions_list): Use compiled_regex.
11300 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11301 std::unique_ptr<compiled_regex>.
11302 (exception_catchpoint::~exception_catchpoint): Remove regfree
11303 call.
11304 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11305 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11306 * breakpoint.c (solib_catchpoint::compiled): Now a
11307 std::unique_ptr<compiled_regex>.
11308 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11309 (check_status_catch_solib): Adjust to use compiled_regex.
11310 (add_solib_catchpoint): Adjust to use compiled_regex.
11311 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11312 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11313 compiled_regex reference. Adjust to use it.
11314 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11315 declaration. Include "gdb_regex.h".
11316 (apropos_cmd): Change regex parameter to compiled_regex reference.
11317 * gdb_regex.c: New file.
11318 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11319 declarations.
11320 (class compiled_regex): New.
11321 * linux-tdep.c: Include "common/gdb_optional.h".
11322 (struct mapping_regexes): New, factored out from
11323 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11324 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11325 gdb::optional and remove cleanups. Adjust to compiled_regex.
11326 * probe.c: Include "common/gdb_optional.h".
11327 (collect_probes): Use compiled_regex and gdb::optional and remove
11328 cleanups.
11329 * skip.c: Include "common/gdb_optional.h".
11330 (skiplist_entry::compiled_function_regexp): Now a
11331 gdb::optional<compiled_regex>.
11332 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11333 (free_skiplist_entry): Remove regfree call.
11334 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11335 compiled_regex and gdb::optional.
11336 * symtab.c: Include "common/gdb_optional.h".
11337 (search_symbols): Use compiled_regex and gdb::optional.
11338 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11339 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11340 to gdb_regex.c.
11341
50d6adef
AH
113422017-06-07 Alan Hayward <alan.hayward@arm.com>
11343
11344 * regcache.c (regcache::save): Avoid buffer use.
11345 (regcache::dump): Likewise.
11346
4a8a33c8
AH
113472017-06-07 Alan Hayward <alan.hayward@arm.com>
11348
11349 * sh-tdep.c (sh_pseudo_register_read): Remove
11350 MAX_REGISTER_SIZE.
11351 (sh_pseudo_register_write): Likewise.
11352 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11353 (sh64_pseudo_register_write): Likewise
11354
d1be909e
AH
113552017-06-07 Alan Hayward <alan.hayward@arm.com>
11356
11357 * aarch64-tdep.c (aarch64_store_return_value): Use
11358 V_REGISTER_SIZE.
11359 (aarch64_pseudo_read_value): Likewise.
11360 (aarch64_pseudo_write): Likewise.
11361
f4a65042
YQ
113622017-06-06 Yao Qi <yao.qi@linaro.org>
11363
11364 * regformats/regdef.h (set_register_cache): Remove the
11365 declaration.
11366
9f7fb0aa
AH
113672017-06-06 Alan Hayward <alan.hayward@arm.com>
11368
11369 * frame.c (frame_unwind_register_signed): Use
11370 frame_unwind_register_value.
11371
e1e01040
PA
113722017-06-06 Pedro Alves <palves@redhat.com>
11373
11374 PR breakpoints/21553
11375 * breakpoint.c (create_breakpoints_sal_default)
11376 (init_breakpoint_sal, create_breakpoint_sal): Use
11377 gdb::unique_xmalloc_ptr for string parameters.
11378 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11379 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11380 (base_breakpoint_create_breakpoints_sal)
11381 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11382 (strace_marker_create_breakpoints_sal)
11383 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11384 string parameters.
11385 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11386 gdb::unique_xmalloc_ptr for string parameters.
11387 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11388 parameters.
11389
fbe654c8
AH
113902017-06-06 Alan Hayward <alan.hayward@arm.com>
11391
11392 * alpha-tdep.c (alpha_register_to_value): Use
11393 get_frame_register_value.
11394 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11395
ae0d01d6
AH
113962017-06-06 Alan Hayward <alan.hayward@arm.com>
11397
11398 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11399 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11400 (ia64_value_to_register): Likewise.
11401 (ia64_extract_return_value): Likewise.
11402 (ia64_store_return_value): Likewise.
11403 (ia64_push_dummy_call): Likewise.
11404
49cf576c
JB
114052017-06-04 Joel Brobecker <brobecker@adacore.com>
11406
11407 GDB 8.0 released.
11408
26b6a6ab
SM
114092017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11410
11411 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11412
22827c51
SM
114132017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11414
11415 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11416 parameter.
11417 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11418
0e05cf3a
SM
114192017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11420
11421 * event-loop.c (poll_timers): Unallocate timer using delete
11422 instead of xfree.
11423
c1fc2657
SM
114242017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11425
11426 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11427 (struct breakpoint) <~breakpoint>: New.
11428 (struct watchpoint): Inherit from breakpoint.
11429 <~watchpoint>: New.
11430 <base>: Remove.
11431 (struct tracepoint): Inherit from breakpoint.
11432 <base>: Remove.
11433 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11434 (struct longjmp_breakpoint): Inherit from breakpoint.
11435 <~longjmp_breakpoint>: New.
11436 <base>: Remove.
11437 (new_breakpoint_from_type): Remove casts.
11438 (watchpoint_in_thread_scope): Remove reference to base field.
11439 (watchpoint_del_at_next_stop): Likewise.
11440 (update_watchpoint): Likewise.
11441 (watchpoint_check): Likewise.
11442 (bpstat_check_watchpoint): Likewise.
11443 (set_longjmp_breakpoint): Likewise.
11444 (struct fork_catchpoint): Inherit from breakpoint.
11445 <base>: Remove.
11446 (struct solib_catchpoint): Inherit from breakpoint.
11447 <~solib_catchpoint>: New.
11448 <base>: Remove.
11449 (dtor_catch_solib): Change to ...
11450 (solib_catchpoint::~solib_catchpoint): ... this.
11451 (breakpoint_hit_catch_solib): Remove reference to base field.
11452 (add_solib_catchpoint): Likewise.
11453 (create_fork_vfork_event_catchpoint): Likewise.
11454 (struct exec_catchpoint): Inherit from breakpoint.
11455 <~exec_catchpoint>: New.
11456 <base>: Remove.
11457 (dtor_catch_exec): Change to ...
11458 (exec_catchpoint::~exec_catchpoint): ... this.
11459 (dtor_watchpoint): Change to ...
11460 (watchpoint::~watchpoint): ... this.
11461 (watch_command_1): Remove reference to base field.
11462 (catch_exec_command_1): Likewise.
11463 (base_breakpoint_dtor): Change to ...
11464 (breakpoint::~breakpoint): ... this.
11465 (base_breakpoint_ops): Remove dtor field value.
11466 (longjmp_bkpt_dtor): Change to ...
11467 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11468 (strace_marker_create_breakpoints_sal): Remove reference to base
11469 field.
11470 (delete_breakpoint): Don't manually call breakpoint destructor.
11471 (create_tracepoint_from_upload): Remove reference to base field.
11472 (trace_pass_set_count): Likewise.
11473 (initialize_breakpoint_ops): Don't initialize
11474 momentary_breakpoint_ops, don't set dtors.
11475 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11476 <~ada_catchpoint>: New.
11477 <base>: Remove.
11478 (create_excep_cond_exprs): Remove reference to base field.
11479 (dtor_exception): Change to ...
11480 (ada_catchpoint::~ada_catchpoint): ... this.
11481 (dtor_catch_exception): Remove.
11482 (dtor_catch_exception_unhandled): Remove.
11483 (dtor_catch_assert): Remove.
11484 (create_ada_exception_catchpoint): Remove reference to base
11485 field.
11486 (initialize_ada_catchpoint_ops): Don't set dtors.
11487 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11488 breakpoint.
11489 <~signal_catchpoint>: New.
11490 <base>: Remove.
11491 (signal_catchpoint_dtor): Change to ...
11492 (signal_catchpoint::~signal_catchpoint): ... this.
11493 (create_signal_catchpoint): Remove reference to base field.
11494 (initialize_signal_catchpoint_ops): Don't set dtor.
11495 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11496 from breakpoint.
11497 <~syscall_catchpoint>: New.
11498 <base>: Remove.
11499 (dtor_catch_syscall): Change to ...
11500 (syscall_catchpoint::~syscall_catchpoint): ... this.
11501 (create_syscall_event_catchpoint): Remove reference to base
11502 field.
11503 (initialize_syscall_catchpoint_ops): Don't set dtor.
11504 * break-catch-throw.c (struct exception_catchpoint): Inherit
11505 from breakpoint.
11506 <~exception_catchpoint>: New.
11507 <base>: Remove.
11508 (dtor_exception_catchpoint): Change to ...
11509 (exception_catchpoint::~exception_catchpoint): ... this.
11510 (handle_gnu_v3_exceptions): Remove reference to base field.
11511 (initialize_throw_catchpoint_ops): Don't set dtor.
11512 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11513 field.
11514 * remote.c (remote_get_tracepoint_status): Likewise.
11515 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11516 * tracefile.c (tracefile_fetch_registers): Likewise.
11517 * tracepoint.c (actions_command): Likewise.
11518 (validate_actionline): Likewise.
11519 (tfind_1): Likewise.
11520 (get_traceframe_location): Likewise.
11521 (find_matching_tracepoint_location): Likewise.
11522 (parse_tracepoint_status): Likewise.
11523 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11524
3b0871f4
SM
115252017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11526
11527 * breakpoint.c (struct longjmp_breakpoint): New struct.
11528 (is_tracepoint_type): Change return type to bool.
11529 (is_longjmp_type): New function.
11530 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11531 (set_raw_breakpoint_without_location): Use
11532 new_breakpoint_from_type.
11533 (set_raw_breakpoint): Likewise.
11534
a5e364af
SM
115352017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11536
11537 * breakpoint.c (new_breakpoint_from_type): New function.
11538 (create_breakpoint_sal): Use new_breakpoint_from_type and
11539 unique_ptr.
11540 (create_breakpoint): Likewise.
11541
ae3b3f34
SM
115422017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11543
11544 * memattr.c (mem_info_command): Rename to ...
11545 (info_mem_command): ... this.
11546 (mem_enable_command): Rename to ...
11547 (enable_mem_command): ... this.
11548 (mem_disable_command): Rename to ...
11549 (disable_mem_command): ... this.
11550 (mem_delete_command): Rename to ...
11551 (delete_mem_command): ... this.
11552 (_initialize_mem): Adjust function names.
11553
13ace077
MM
115542017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11555
11556 * btrace.c (handle_pt_insn_events): New.
11557 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11558 STATUS. Split into this and ...
11559 (handle_pt_insn_event_flags): ... this.
11560
c56ccc05
MM
115612017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11562
11563 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11564 and struct pt_insn.resynced.
11565 * configure: Regenerated.
11566 * config.in: Regenerated.
11567
08c3f6d2
TW
115682017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11569
11570 * btrace.c (ftrace_find_call_by_number): New function.
11571 (ftrace_new_function): Store objects, not pointers.
11572 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11573 ftrace_new_gap, ftrace_update_function,
11574 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11575 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11576 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11577 btrace_ends_with_single_insn, btrace_call_get): Account for
11578 btrace_thread_info::functions now storing objects.
11579 * btrace.h (struct btrace_thread_info): Add constructor.
11580 (struct btrace_thread_info) <functions>: Make std::vector.
11581 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11582 Initialize with default values.
11583 * record-btrace.c (record_btrace_frame_sniffer): Account for
11584 btrace_thread_info::functions now storing objects.
11585
8ffd39f2
TW
115862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11587
11588 * btrace.c: Remove typedef bfun_s.
11589 (ftrace_new_gap): Directly add gaps to the list of gaps.
11590 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11591 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11592 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11593 instead of gdb VEC.
11594
4aeb0dfc
TW
115952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11596
11597 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11598 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11599 with btrace_thread_info::next_segment and
11600 btrace_thread_info::prev_segment.
11601 * btrace.h: Remove struct btrace_func_link.
11602 (struct btrace_function): Replace pair of function segment pointers
11603 with pair of indices.
11604 * python/py-record-btrace.c (btpy_call_prev_sibling,
11605 btpy_call_next_sibling): Replace references to
11606 btrace_thread_info::segment with btrace_thread_info::next_segment and
11607 btrace_thread_info::prev_segment.
11608 * record-btrace.c (record_btrace_frame_this_id): Use
11609 btrace_find_call_by_number.
11610
eb8f2b9c
TW
116112017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11612
11613 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11614 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11615 btrace_insn_next, btrace_insn_prev): Remove references to
11616 btrace_thread_info::flow.
11617 * btrace.h (struct btrace_function): Remove FLOW.
11618
42bfe59e
TW
116192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11620
11621 * btrace.c (ftrace_find_call_by_number): New function.
11622 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11623 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11624 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11625 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11626 index.
11627 * btrace.h (struct btrace_function): Turn UP into an index.
11628 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11629 as an index.
11630 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11631 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11632 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11633
b54b03bd
TW
116342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11635
11636 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11637 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11638 ftrace_update_function, ftrace_compute_global_level_offset,
11639 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11640 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11641 btrace_insn_end, btrace_is_empty): Remove references to
11642 btrace_thread_info::begin and btrace_thread_info::end.
11643 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11644 (struct btrace_thread_info) <functions>: Adjust comment.
11645 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11646 btrace_thread_info::begin.
11647
8286623c
TW
116482017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11649
11650 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11651 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11652 ftrace_update_function): Remove arguments that implicitly were always
11653 BTINFO->END.
11654 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11655 Don't pass BTINFO->END.
11656
a0f1b963
TW
116572017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11658
11659 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11660 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11661 btrace_find_insn_by_number): Replace function segment pointer with
11662 index.
11663 (btrace_insn_cmp): Simplify.
11664 * btrace.h: (struct btrace_insn_iterator) Rename index to
11665 insn_index. Replace function segment pointer with index into function
11666 segment vector.
11667 * record-btrace.c (record_btrace_call_history): Replace function
11668 segment pointer use with index.
11669 (record_btrace_frame_sniffer): Retrieve function call segment through
11670 vector.
11671 (record_btrace_set_replay): Remove defunc't safety check.
11672
f158f208
TW
116732017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11674
11675 * btrace.c (btrace_ends_with_single_insn): New function.
11676 (btrace_call_get, btrace_call_number, btrace_call_begin,
11677 btrace_call_end, btrace_call_next, btrace_call_prev,
11678 btrace_find_call_by_number): Use index into call segment vector
11679 instead of pointer.
11680 (btrace_call_cmp): Simplify.
11681 * btrace.h (struct btrace_call_iterator): Replace function call segment
11682 pointer with index into vector.
11683 * record-btrace.c (record_btrace_call_history): Use index instead of
11684 pointer.
11685
521103fd
TW
116862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11687
11688 * btrace.c (btrace_insn_begin, btrace_insn_end,
11689 btrace_find_insn_by_number): Add btinfo to iterator.
11690 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11691
17b89b34
TW
116922017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11693
11694 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11695 and save pointers directly.
11696 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11697 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11698 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11699 changed signature of functions.
11700 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11701 (btrace_fetch): Remove code that adds btrace_function pointers to
11702 vector of btrace_functions.
11703 (btrace_clear): Simplify freeing vector of btrace_functions.
11704
2b51eddc
TW
117052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11706
11707 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11708 Replace VEC_* with std::vector functions.
11709 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11710 (struct btrace_thread_info)<functions>: Change type to std::vector.
11711
db6be0d5
SM
117122017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11713
11714 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11715 "Removed targets and native configurations" up. Merge duplicate
11716 "New commands" sub-sections. Add "New options" sub-sections.
11717
b057297a
AH
117182017-05-26 Alan Hayward <alan.hayward@arm.com>
11719
11720 * defs.h (copy_integer_to_size): New declaration.
11721 * findvar.c (copy_integer_to_size): New function.
11722 (do_cint_test): New selftest function.
11723 (copy_integer_to_size_test): Likewise.
11724 (_initialize_findvar): Likewise.
11725 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11726 (mips_fbsd_collect_reg): Use raw_collect_integer.
11727 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11728 (mips64_fill_gregset): Use raw_collect_integer
11729 (mips64_fill_fpregset): Use raw_supply_integer.
11730 * regcache.c (regcache::raw_supply_integer): New function.
11731 (regcache::raw_collect_integer): Likewise.
11732 * regcache.h: (regcache::raw_supply_integer): New declaration.
11733 (regcache::raw_collect_integer): Likewise.
11734
b77b02a5
YQ
117352017-05-24 Yao Qi <yao.qi@linaro.org>
11736
11737 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11738 (COMMON_OBS): Add gdbarch-selftests.o.
11739 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11740 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11741 * gdbarch-selftests.c: New file.
11742 * regcache.h (regcache) <~regcache>: Mark it virtual if
11743 GDB_SELF_TEST.
11744 <raw_write>: Likewise.
11745
e521e87e
YQ
117462017-05-24 Yao Qi <yao.qi@linaro.org>
11747
11748 * regcache.c (current_regcache): Change it to
11749 regcache::current_regcache.
11750 (regcache_observer_target_changed): Update.
11751 (regcache_thread_ptid_changed): Make it a regcache static
11752 method.
11753 (regcache_thread_ptid_changed): Update.
11754 (class regcache_access): New.
11755 (current_regcache_test): Update.
11756 (_initialize_regcache): Update.
11757 * regcache.h: Include forward_list.
11758 (regcache): Declare regcache_thread_ptid_changed and declare
11759 registers_changed_ptid as friend.
11760
d8e07dda
YQ
117612017-05-24 Yao Qi <yao.qi@linaro.org>
11762
11763 * i387-tdep.c (i387_register_to_value): Use register_size
11764 instead of TYPE_LENGTH.
11765 * m68k-tdep.c (m68k_register_to_value): Likewise.
11766
8c8f9122
YQ
117672017-05-24 Yao Qi <yao.qi@linaro.org>
11768
11769 * i387-tdep.c (i387_convert_register_p): Return false if type
11770 code isn't TYPE_CODE_FLT.
11771
68fce50f
YQ
117722017-05-24 Yao Qi <yao.qi@linaro.org>
11773
11774 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11775 length is 4.
11776 (alpha_register_to_value): Remove type length check.
11777 (alpha_value_to_register): Likewise.
11778
88954b49
YQ
117792017-05-24 Yao Qi <yao.qi@linaro.org>
11780
11781 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11782 TYPE_CODE_FLT.
11783
e3ec9b69
YQ
117842017-05-24 Yao Qi <yao.qi@linaro.org>
11785
11786 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11787 TYPE_CODE_FLT or not.
11788
cdd238da
YQ
117892017-05-24 Yao Qi <yao.qi@linaro.org>
11790
11791 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11792 * avr-tdep.c (avr_gdbarch_init): Likewise.
11793 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11794 * cris-tdep.c (cris_gdbarch_init): Likewise.
11795 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11796 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11797 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11798 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11799 * mep-tdep.c (mep_gdbarch_init): Likewise.
11800 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11801 * mips-tdep.c (mips_gdbarch_init): Likewise.
11802 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11803 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11804 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11805 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11806 * v850-tdep.c (v850_gdbarch_init): Likewise.
11807
7a3929c4
YQ
118082017-05-24 Yao Qi <yao.qi@linaro.org>
11809
11810 * selftest-arch.c (tests_with_arch): Call registers_changed
11811 and reinit_frame_cache.
11812 * selftest.c (run_self_tests): Likewise.
11813
f4985dba
YQ
118142017-05-24 Yao Qi <yao.qi@linaro.org>
11815
11816 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11817 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11818
ab20fa4a
YQ
118192017-05-24 Yao Qi <yao.qi@linaro.org>
11820
11821 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11822 set_gdbarch_print_insn.
11823
f532ab94
YQ
118242017-05-24 Yao Qi <yao.qi@linaro.org>
11825
11826 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11827 set_gdbarch_print_insn.
11828
39503f82
YQ
118292017-05-24 Yao Qi <yao.qi@linaro.org>
11830
11831 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11832 set_gdbarch_print_insn.
11833 * arc-tdep.c (arc_gdbarch_init): Likewise.
11834 * arch-utils.c: include dis-asm.h.
11835 (default_print_insn): New function.
11836 * arch-utils.h (default_print_insn): Declare.
11837 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11838 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11839 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11840 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11841 * frv-tdep.c (frv_gdbarch_init): Likewise.
11842 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11843 * gdbarch.sh (print_insn): Use default_print_insn.
11844 * gdbarch.c: Regenerated.
11845 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11846 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11847 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11848 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11849 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11850 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11851 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11852 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11853 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11854 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11855 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11856 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11857 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11858 * mt-tdep.c (mt_gdbarch_init): Likewise.
11859 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11860 * nios2-tdep.c (nios2_print_insn): Remove.
11861 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11862 * rx-tdep.c (rx_gdbarch_init): Likewise.
11863 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11864 * score-tdep.c (score_print_insn): Remove.
11865 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11866 * sh-tdep.c (sh_gdbarch_init): Likewise.
11867 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11868 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11869 * tic6x-tdep.c (tic6x_print_insn): Remove.
11870 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11871 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11872 * v850-tdep.c (v850_gdbarch_init): Likewise.
11873 * vax-tdep.c (vax_gdbarch_init): Likewise.
11874 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11875 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11876
f7241d4f
JB
118772017-05-23 John Baldwin <jhb@FreeBSD.org>
11878
11879 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11880 (MIPS_FP0_REGNUM): Remove.
11881 (MIPS_FSR_REGNUM): Remove.
11882 (mips_fbsd_supply_fpregs): Use mips_regnum.
11883 (mips_fbsd_supply_gregs): Likewise.
11884 (mips_fbsd_collect_fpregs): Likewise.
11885 (mips_fbsd_collect_gregs): Likewise.
11886
d489d81d
JB
118872017-05-23 John Baldwin <jhb@FreeBSD.org>
11888
11889 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11890 (getpfpregs_supplies): New function.
11891 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11892 getfpregs_supplies.
11893 (mips_fbsd_store_inferior_registers): Likewise.
11894
e11b3cdc
PA
118952017-05-22 Pedro Alves <palves@redhat.com>
11896
11897 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11898 maintainer.
11899
0f068fb5
AH
119002017-05-22 Alan Hayward <alan.hayward@arm.com>
11901
11902 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11903 (store_register): Likewise.
11904 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11905 (get_decimal_float_return_value): Likewise.
11906 (do_ppc_sysv_return_value): Likewise.
11907 (ppc64_sysv_abi_push_integer): Likewise.
11908 (ppc64_sysv_abi_push_freg): Likewise.
11909 (ppc64_sysv_abi_return_value_base): Likewise.
11910 (ppc64_sysv_abi_return_value): Likewise.
11911 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11912 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11913 * rs6000-nat.c: Likewise.
11914 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11915 (rs6000_value_to_register): Likewise.
11916 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11917
e6cf65f2
TT
119182017-05-21 Tom Tromey <tom@tromey.com>
11919
11920 PR rust/21466:
11921 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11922 arrays as "[T]", not "[T; ]".
11923
43cc5389
TT
119242017-05-19 Tom Tromey <tom@tromey.com>
11925
11926 PR rust/21484:
11927 * rust-lang.c (exp_descriptor_rust): New function.
11928 (rust_language_defn): Use it.
11929 * p-lang.c (pascal_language_defn): Update.
11930 * opencl-lang.c (opencl_language_defn): Update.
11931 * objc-lang.c (objc_language_defn): Update.
11932 * m2-lang.c (m2_language_defn): Update.
11933 * language.h (struct language_defn)
11934 <la_watch_location_expression>: New member.
11935 * language.c (unknown_language_defn, auto_language_defn)
11936 (local_language_defn): Update.
11937 * go-lang.c (go_language_defn): Update.
11938 * f-lang.c (f_language_defn): Update.
11939 * d-lang.c (d_language_defn): Update.
11940 * c-lang.h (c_watch_location_expression): Declare.
11941 * c-lang.c (c_watch_location_expression): New function.
11942 (c_language_defn, cplus_language_defn, asm_language_defn)
11943 (minimal_language_defn): Use it.
11944 * breakpoint.c (watch_command_1): Call
11945 la_watch_location_expression.
11946 * ada-lang.c (ada_language_defn): Update.
11947
7a6e7fcc
RO
119482017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11949
6e7e1744
RO
11950 PR tui/21482
11951 * gdb_curses.h (NOMACROS): Define.
11952 (NCURSES_NOMACROS): Define.
11953
119542017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11955
11956 PR tui/21482
7a6e7fcc
RO
11957 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11958 arg to char *.
11959 * tui/tui-wingeneral.c (box_win): Likewise.
11960 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11961 (tui_show_source_line): Likewise.
11962 (tui_show_exec_info_content): Likewise.
11963
1933fd8e
VM
119642017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11965
11966 * sparc-tdep.c (sparc_structure_return_p)
11967 (sparc_arg_on_registers_p): New functions.
11968 (sparc32_store_arguments): Use them.
11969 * sparc64-tdep.c (sparc64_16_byte_align_p)
11970 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11971 Handle TYPE_CODE_ARRAY.
11972
21873064
YQ
119732017-05-17 Yao Qi <yao.qi@linaro.org>
11974
11975 * cli/cli-decode.c (add_alias_cmd): New function.
11976 * command.h (add_alias_cmd): Declare.
11977 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11978 instead call add_alias_cmd.
11979
2b351b19
PA
119802017-05-17 Pedro Alves <palves@redhat.com>
11981
11982 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11983 (nat_makefile_frag): ... this. All references updated.
11984 * configure.ac: Likewise.
11985 * configure.nat: Likewise. Enhance comments.
11986 * configure: Regenerate.
11987
5f2ad7a3
RO
119882017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11989
11990 * procfs.c (procfs_create_inferior): Change prototype to match
11991 definition.
11992
adf3dde5
EZ
119932017-05-13 Eli Zaretskii <eliz@gnu.org>
11994
11995 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11996 C++ compiler warning.
11997
6830f270
TT
119982017-05-12 Tom Tromey <tom@tromey.com>
11999
12000 PR rust/21483:
12001 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12002 recurse, just call value_struct_elt directly.
12003
68f2f2e3
TT
120042017-05-12 Tom Tromey <tom@tromey.com>
12005
12006 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12007 OP_RUST_ARRAY>: Fix.
12008
256afbc2
TT
120092017-05-12 Tom Tromey <tom@tromey.com>
12010
12011 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12012
94bb8dfe
YQ
120132017-05-09 Yao Qi <yao.qi@linaro.org>
12014
12015 * regcache.c: Include <forward_list>.
12016 (struct regcache_list): Remove.
12017 (current_regcache): Update.
12018 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12019 (regcache_thread_ptid_changed): Likewise.
12020 (registers_changed_ptid): Likewise.
12021 (current_regcache_size): Likewise.
12022
8248946c
YQ
120232017-05-09 Yao Qi <yao.qi@linaro.org>
12024
12025 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12026 (current_regcache_size): New function.
12027 (current_regcache_test): New function.
12028 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12029
313c5961
AH
120302017-05-08 Alan Hayward <alan.hayward@arm.com>
12031
12032 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12033 (print_gp_register_row): Use get_frame_register_value.
12034
27bfc1d1
AH
120352017-05-08 Alan Hayward <alan.hayward@arm.com>
12036
12037 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12038 (mips_supply_fpregset): Likewise.
12039 (mips64_supply_gregset): Likewise.
12040
146e6c5c
AH
120412017-05-08 Alan Hayward <alan.hayward@arm.com>
12042
12043 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12044 regcache->raw_supply_zeroed.
12045
e50f25ec
SDJ
120462017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12047
12048 * configure.nat: Rearrange 'case' statements to match
12049 host before cpu.
12050
21ea5acd
SDJ
120512017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12052
12053 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12054 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12055 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12056 "@nat_extra_makefile_frag@".
12057 (Makefile): Remove dependency on "@frags@".
12058 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12059 (data-directory/Makefile): Likewise.
12060 * config/aarch64/linux.mh: Deleted; moved contents to
12061 "gdb/configure.nat".
12062 * config/alpha/alpha-linux.mh: Likewise.
12063 * config/alpha/nbsd.mh: Likewise.
12064 * config/arm/linux.mh: Likewise.
12065 * config/arm/nbsdelf.mh: Likewise.
12066 * config/i386/cygwin.mh: Likewise.
12067 * config/i386/cygwin64.mh: Likewise.
12068 * config/i386/darwin.mh: Likewise.
12069 * config/i386/fbsd.mh: Likewise.
12070 * config/i386/fbsd64.mh: Likewise.
12071 * config/i386/go32.mh: Likewise.
12072 * config/i386/i386gnu.mh: Likewise.
12073 * config/i386/i386sol2.mh: Likewise.
12074 * config/i386/linux.mh: Likewise.
12075 * config/i386/linux64.mh: Likewise.
12076 * config/i386/mingw.mh: Likewise.
12077 * config/i386/mingw64.mh: Likewise.
12078 * config/i386/nbsd64.mh: Likewise.
12079 * config/i386/nbsdelf.mh: Likewise.
12080 * config/i386/nto.mh: Likewise.
12081 * config/i386/obsd.mh: Likewise.
12082 * config/i386/obsd64.mh: Likewise.
12083 * config/i386/sol2-64.mh: Likewise.
12084 * config/ia64/linux.mh: Likewise.
12085 * config/m32r/linux.mh: Likewise.
12086 * config/m68k/linux.mh: Likewise.
12087 * config/m68k/nbsdelf.mh: Likewise.
12088 * config/m68k/obsd.mh: Likewise.
12089 * config/m88k/obsd.mh: Likewise.
12090 * config/mips/fbsd.mh: Likewise.
12091 * config/mips/linux.mh: Likewise.
12092 * config/mips/nbsd.mh: Likewise.
12093 * config/mips/obsd64.mh: Likewise.
12094 * config/pa/linux.mh: Likewise.
12095 * config/pa/nbsd.mh: Likewise.
12096 * config/pa/obsd.mh: Likewise.
12097 * config/powerpc/aix.mh: Likewise.
12098 * config/powerpc/fbsd.mh: Likewise.
12099 * config/powerpc/linux.mh: Likewise.
12100 * config/powerpc/nbsd.mh: Likewise.
12101 * config/powerpc/obsd.mh: Likewise.
12102 * config/powerpc/ppc64-linux.mh: Likewise.
12103 * config/powerpc/spu-linux.mh: Likewise.
12104 * config/s390/linux.mh: Likewise.
12105 * config/sh/nbsd.mh: Likewise.
12106 * config/sparc/fbsd.mh: Likewise.
12107 * config/sparc/linux.mh: Likewise.
12108 * config/sparc/linux64.mh: Likewise.
12109 * config/sparc/nbsd64.mh: Likewise.
12110 * config/sparc/nbsdelf.mh: Likewise.
12111 * config/sparc/obsd64.mh: Likewise.
12112 * config/sparc/sol2.mh: Likewise.
12113 * config/tilegx/linux.mh: Likewise.
12114 * config/vax/nbsdelf.mh: Likewise.
12115 * config/vax/obsd.mh: Likewise.
12116 * config/xtensa/linux.mh: Likewise.
12117 * config/i386/i386gnu.mn: New file, with excerpts from
12118 "config/i386/i386gnu.mh".
12119 * configure: Regenerate.
12120 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12121 *.mh files under "gdb/config".
12122 * configure.nat: New file, with contents from the
12123 "gdb/config/*/*.mh" files.
12124
7ed1acaf
TW
121252017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12126
12127 * btrace.c (btrace_clear): Free insn vector.
12128
e13cb306
PA
121292017-05-05 Pedro Alves <palves@redhat.com>
12130
12131 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12132 * configure: Regenerate.
12133
5ed8105e
PA
121342017-05-04 Pedro Alves <palves@redhat.com>
12135
12136 * Makefile.in (SFILES): Add progspace-and-thread.c.
12137 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12138 (COMMON_OBS): Add progspace-and-thread.o.
12139 * breakpoint.c: Include "progspace-and-thread.h".
12140 (update_inserted_breakpoint_locations)
12141 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12142 Use scoped_restore_current_pspace_and_thread.
12143 (create_std_terminate_master_breakpoint): Use
12144 scoped_restore_current_program_space.
12145 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12146 (print_breakpoint_location): Use
12147 scoped_restore_current_program_space.
12148 (bp_loc_is_permanent): Use
12149 scoped_restore_current_pspace_and_thread.
12150 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12151 (download_tracepoint_locations): Use
12152 scoped_restore_current_pspace_and_thread.
12153 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12154 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12155 (enum step_over_calls_kind): Moved from inferior.h.
12156 (class scoped_restore_current_thread): New class.
12157 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12158 declaration.
12159 (scoped_restore_current_thread): New class.
12160 * infcmd.c: Include "common/gdb_optional.h".
12161 (continue_1, proceed_after_attach): Use
12162 scoped_restore_current_thread.
12163 (notice_new_inferior): Use scoped_restore_current_thread.
12164 * inferior.c: Include "progspace-and-thread.h".
12165 (restore_inferior, save_current_inferior): Delete.
12166 (add_inferior_command, clone_inferior_command): Use
12167 scoped_restore_current_pspace_and_thread.
12168 * inferior.h (scoped_restore_current_inferior): New class.
12169 * infrun.c: Include "progspace-and-thread.h" and
12170 "common/gdb_optional.h".
12171 (follow_fork_inferior): Use
12172 scoped_restore_current_pspace_and_thread.
12173 (scoped_restore_exited_inferior): New class.
12174 (handle_vfork_child_exec_or_exit): Use
12175 scoped_restore_exited_inferior,
12176 scoped_restore_current_pspace_and_thread,
12177 scoped_restore_current_thread and scoped_restore.
12178 (fetch_inferior_event): Use scoped_restore_current_thread.
12179 * linespec.c (decode_line_full, decode_line_1): Use
12180 scoped_restore_current_program_space.
12181 * mi/mi-main.c: Include "progspace-and-thread.h".
12182 (exec_continue): Use scoped_restore_current_thread.
12183 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12184 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12185 * proc-service.c (ps_pglobal_lookup): Use
12186 scoped_restore_current_program_space.
12187 * progspace-and-thread.c: New file.
12188 * progspace-and-thread.h: New file.
12189 * progspace.c (release_program_space, clone_program_space): Use
12190 scoped_restore_current_program_space.
12191 (restore_program_space, save_current_program_space)
12192 (save_current_space_and_thread): Delete.
12193 (switch_to_program_space_and_thread): Moved to
12194 progspace-and-thread.c.
12195 * progspace.h (save_current_program_space)
12196 (save_current_space_and_thread): Delete declarations.
12197 (scoped_restore_current_program_space): New class.
12198 * remote.c (remote_btrace_maybe_reopen): Use
12199 scoped_restore_current_thread.
12200 * symtab.c: Include "progspace-and-thread.h".
12201 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12202 * thread.c (print_thread_info_1): Use
12203 scoped_restore_current_thread.
12204 (struct current_thread_cleanup): Delete.
12205 (do_restore_current_thread_cleanup)
12206 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12207 (scoped_restore_current_thread::~scoped_restore_current_thread):
12208 ... this new dtor.
12209 (make_cleanup_restore_current_thread): Rename/convert to ...
12210 (scoped_restore_current_thread::scoped_restore_current_thread):
12211 ... this new ctor.
12212 (thread_apply_all_command): Use scoped_restore_current_thread.
12213 (thread_apply_command): Use scoped_restore_current_thread.
12214 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12215 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12216
f6223dbb
PA
122172017-05-04 Pedro Alves <palves@redhat.com>
12218
12219 * thread.c (make_cleanup_restore_current_thread): Move
12220 find_thread_ptid call before the is_stopped call. Assert that the
12221 thread is found. Replace is_stopped call by checking the thread's
12222 state directly. Remove unnecessary NULL-thread check.
12223
3c3ae77e
PA
122242017-05-04 Pedro Alves <palves@redhat.com>
12225
12226 * corelow.c (thread_section_name): New class.
12227 (get_core_register_section, get_core_siginfo): Use it.
12228
45eba0ab
AA
122292017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12230
12231 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12232 (get_core_register_section): Remove xfree of NULL pointer.
12233
f81fdd35
AH
122342017-05-03 Alan Hayward <alan.hayward@arm.com>
12235
12236 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12237 * regcache.c (regcache::raw_supply_zeroed): New function.
12238 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12239
35837774
SM
122402017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12241
12242 * gdbarch.sh: Remove commented out definition of
12243 TARGET_CHAR_BIT.
12244 * gdbarch.h: Re-generate.
12245
c94fee56
SDJ
122462017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12247
12248 * configure: Regenerate.
12249
d17f7b36
SM
122502017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12251
12252 * solib-target.c (solib_target_relocate_section_addresses):
12253 Remove num_section_bases, num_bases, segment_bases variables.
12254
b560ebd6
SM
122552017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12256
12257 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12258
f2f46dfc
SM
122592017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12260
12261 * solib-target.c: Include <vector>
12262 (struct lm_info_target) <~lm_info_target>: Remove.
12263 <segment_bases, section_bases>: Change type to
12264 std::vector<CORE_ADDR>.
12265 (library_list_start_segment, library_list_start_section,
12266 library_list_end_library,
12267 solib_target_relocate_section_addresses): Adjust.
12268
a0ff9e1a
SM
122692017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12270
12271 * gdbarch.sh (software_single_step): Change return type to
12272 std::vector<CORE_ADDR>.
12273 * gdbarch.c, gdbarch.h: Re-generate.
12274 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12275 Adjust.
12276 (arm_deal_with_atomic_sequence_raw): Adjust.
12277 (thumb_get_next_pcs_raw): Adjust.
12278 (arm_get_next_pcs_raw): Adjust.
12279 (arm_get_next_pcs): Adjust.
12280 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12281 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12282 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12283 (alpha_software_single_step): Adjust.
12284 * alpha-tdep.h (alpha_software_single_step): Adjust.
12285 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12286 * arm-tdep.c (arm_software_single_step): Adjust.
12287 (arm_breakpoint_kind_from_current_state): Adjust.
12288 * arm-tdep.h (arm_software_single_step): Adjust.
12289 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12290 * cris-tdep.c (cris_software_single_step): Adjust.
12291 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12292 (micromips_deal_with_atomic_sequence): Adjust.
12293 (deal_with_atomic_sequence): Adjust.
12294 (mips_software_single_step): Adjust.
12295 * mips-tdep.h (mips_software_single_step): Adjust.
12296 * moxie-tdep.c (moxie_software_single_step): Adjust.
12297 * nios2-tdep.c (nios2_software_single_step): Adjust.
12298 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12299 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12300 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12301 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12302 * sparc-tdep.c (sparc_software_single_step): Adjust.
12303 * spu-tdep.c (spu_software_single_step): Adjust.
12304 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12305
ea480a30
SM
123062017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12307
12308 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12309 * gdbarch.h: Re-generate.
12310
d050f7d7
TW
123112017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12312
12313 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12314 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12315 * python/py-instruction.c, python/py-instruction.h: New file.
12316 * python/py-record.c: Add py-instruction.h include.
12317 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12318 gdb.RecordInstruction.
12319 * python/python-internal.h: Add gdbpy_initialize_instruction
12320 declaration.
12321 * python/python.c (do_start_initialization): Add
12322 gdbpy_initialize_instruction.
12323
14f819c8
TW
123242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12325
12326 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12327 Remove.
12328 (btrace_func_from_recpy_func): New function.
12329 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12330 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12331 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12332 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12333 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12334 Also, use new helper functions.
12335 (btpy_list_item): Use new helper functions.
12336 (recpy_bt_function_call_history): Use new type name.
12337 (btpy_call_getset): Remove.
12338 (gdbpy_initialize_btrace): Remove code to initialize
12339 gdb.BtraceFunctionCall.
12340 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12341 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12342 recpy_bt_func_prev, recpy_bt_func_next): New export.
12343 * python/py-record.c (recpy_func_type): New static object.
12344 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12345 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12346 recpy_func_next): New function.
12347 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12348 (recpy_func_getset): New static object.
12349 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12350 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12351
0ed5da75
TW
123522017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12353
12354 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12355 (btpy_object, btpy_insn_type, btpy_new): Remove.
12356 (btpy_list_object): Use gdb.RecordInstruction type instead of
12357 gdb.BtraceInstruction type.
12358 (btrace_insn_from_recpy_insn): New function.
12359 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12360 btpy_new.
12361 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12362 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12363 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12364 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12365 instead of btpy_object.
12366 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12367 btpy_insn_data, btpy_insn_decode): Rename to ...
12368 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12369 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12370 recpy_bt_insn_decode): This. Also, use new helper functions.
12371 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12372 recpy_insn_type.
12373 (btpy_insn_getset): Remove.
12374 (gdbpy_initialize_btrace): Remove code to initialize
12375 gdb.BtraceInstruction. Use recpy_element_object.
12376 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12377 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12378 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12379 * python/py-record.c (recpy_insn_type): New static object.
12380 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12381 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12382 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12383 New function.
12384 (recpy_insn_getset): New static object.
12385 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12386 * python/py-record.h (recpy_element_object): New typedef.
12387 (recpy_insn_type, recpy_insn_new): New export.
12388
913aeadd
TW
123892017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12390
12391 * py-record-btrace.c (btpy_insn_new): Removed.
12392 (btpy_insn_or_gap_new): New function.
12393 (btpy_insn_error): Removed.
12394 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12395 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12396 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12397 btpy_insn_or_gap_new instead of btpy_insn_new.
12398 (btpy_insn_getset): Remove btpy_insn_error.
12399 * py-record.c (recpy_gap_type): New static object.
12400 (recpy_gap_object): New typedef.
12401 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12402 recpy_gap_reason_string): New function.
12403 (recpy_gap_getset): New static object.
12404 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12405 * py-record.h (recpy_gap_new): New export.
12406
a3be24ad
TW
124072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12408
12409 * python/py-record.c (recpy_ptid): Remove.
12410 (recpy_record_getset): Remove recpy_ptid.
12411
ae20e79a
TW
124122017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12413
12414 * btrace.c (btrace_fetch): Set inferior_ptid.
12415 * python/py-record-btrace.c: Add "py-record.h" include.
12416 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12417 recpy_bt_end, recpy_bt_instruction_history,
12418 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12419 in gdb.Record object instead of current ptid.
12420 * python/py-record.c: Include new "py-record.h" file.
12421 (recpy_record_object): Moved to py-record.h.
12422 * python/py-record.h: New file.
12423
8d0050ea
TW
124242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12425
12426 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12427 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12428 indentation.
12429
3f380b50
JB
124302017-05-01 Joel Brobecker <brobecker@adacore.com>
12431
12432 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12433 the past maintainers section.
12434
07495424
YQ
124352017-04-28 Yao Qi <yao.qi@linaro.org>
12436
12437 * infcmd.c (get_return_value): Use regcache ctor, and remove
12438 cleanup.
12439
deb1fa3e
YQ
124402017-04-28 Yao Qi <yao.qi@linaro.org>
12441 Pedro Alves <palves@redhat.com>
12442
12443 * regcache.c (regcache::regcache): New tag dispatch ctor.
12444 (do_cooked_read): Moved above.
12445 (regcache_dup): Use the tag dispatch ctor..
12446 * regcache.h (regcache): Declare ctor, delete copy ctor and
12447 assignment operator, remove friend regcache_dup.
12448
b421c83c
YQ
124492017-04-28 Yao Qi <yao.qi@linaro.org>
12450
12451 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12452 call method save instead of regcache_cpy.
12453 * regcache.h (struct regcache): Make regcache_dup a friend.
12454
ef79d9a3
YQ
124552017-04-28 Yao Qi <yao.qi@linaro.org>
12456
12457 * regcache.c (struct regcache): Move to regcache.h
12458 (regcache::arch): New method.
12459 (regcache_get_ptid): Update.
12460 (get_regcache_arch): Call arch method.
12461 (get_regcache_aspace): Call method aspace.
12462 (register_buffer): Change it to method.
12463 (regcache_save): Change it to regcache::save.
12464 (regcache_restore): Likewise.
12465 (regcache_cpy_no_passthrough): Remove the declaration.
12466 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12467 (regcache_cpy_no_passthrough): Change it to method
12468 cpy_no_passthrough.
12469 (regcache_register_status): Change it to method
12470 get_register_status.
12471 (regcache_invalidate): Change it to method invalidate.
12472 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12473 (regcache_raw_update): Change it to method raw_update.
12474 (regcache_raw_read): Likewise.
12475 (regcache_raw_read_signed): Likewise.
12476 (regcache_raw_read_unsigned): Likewise.
12477 (regcache_raw_write_signed): Likewise.
12478 (regcache_raw_write_unsigned): Likewise.
12479 (regcache_cooked_read): Likewise.
12480 (regcache_cooked_read_value): Likewise.
12481 (regcache_cooked_read_signed): Likewise.
12482 (regcache_cooked_read_unsigned): Likewise.
12483 (regcache_cooked_write_signed): Likewise.
12484 (regcache_cooked_write_unsigned): Likewise.
12485 (regcache_raw_set_cached_value): Likewise.
12486 (regcache_raw_write): Likewise.
12487 (regcache_cooked_write): Likewise.
12488 (regcache_xfer_part): Likewise.
12489 (regcache_raw_read_part): Likewise.
12490 (regcache_raw_write_part): Likewise.
12491 (regcache_cooked_read_part): Likewise.
12492 (regcache_cooked_write_part): Likewise.
12493 (regcache_raw_supply): Likewise.
12494 (regcache_raw_collect): Likewise.
12495 (regcache_transfer_regset): Likewise.
12496 (regcache_supply_regset): Likewise.
12497 (regcache_collect_regset): Likewise.
12498 (regcache_debug_print_register): Likewise.
12499 (enum regcache_dump_what): Move it to regcache.h.
12500 (regcache_dump): Change it to method dump.
12501 * regcache.h (enum regcache_dump_what): New.
12502 (class regcache): New.
12503 * target.c (target_fetch_registers): Call method
12504 debug_print_register.
12505 (target_store_registers): Likewise.
12506
f8fdb78e
SM
125072017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12508
12509 * windows-nat.c (struct lm_info_windows): Initialize field.
12510 (windows_make_so): Allocate lm_info_windows with new.
12511 (windows_free_so): Free lm_info_windows with delete.
12512
9ccbfd7b
SM
125132017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12514
12515 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12516 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12517 cleanup.
12518 (darwin_free_so): Free lm_info_darwin with delete.
12519
76e75227
SM
125202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12521
12522 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12523 <l_addr_p>: Change type to bool.
12524 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12525 (svr4_free_so): Free lm_info_svr4 with delete.
12526 (svr4_copy_library_list): Replace memcpy with call to copy
12527 constructor.
12528 (library_list_start_library, svr4_default_sos): Allocate
12529 lm_info_svr4 with new.
12530
51046d9e
SM
125312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12532
12533 * solib-target.c (struct lm_info_target): Add destructor,
12534 initialize fields.
12535 <name>: Change type to std::string.
12536 (library_list_start_library): Allocate lm_info_target with new.
12537 (solib_target_free_library_list): Free lm_info_target with
12538 delete.
12539 (solib_target_current_sos): Adapt to std::string.
12540 (solib_target_free_so): Free lm_info_target with delete.
12541
4023ae76
SM
125422017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12543
12544 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12545 fields.
12546 (frv_current_sos): Allocate lm_info_frv with new.
12547 (frv_relocate_main_executable): Free lm_info_frv with delete,
12548 allocate with new.
12549 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12550
af43057b
SM
125512017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12552
12553 * solib-frv.c (struct lm_info_frv): Fix indentation.
12554
b0911207
SM
125552017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12556
12557 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12558 map field.
12559 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12560 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12561 and allocate with new.
12562 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12563
6c401f72
SM
125642017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12565
12566 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12567 <filename, member_name>: Change type to std::string.
12568 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12569 (library_list_start_library): Allocate lm_info_aix with new.
12570 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12571 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12572 with copy constructor.
12573
d0e449a1
SM
125742017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12575
12576 * solist.h (struct lm_info): Remove.
12577 (struct lm_info_base): New class.
12578 (struct so_list) <lm_info>: Change type to lm_info_base *.
12579 * nto-tdep.c (struct lm_info): Remove.
12580 (lm_addr): Adjust.
12581 * solib-aix.c (struct lm_info): Rename to ...
12582 (struct lm_info_aix): ... this. Extend lm_info_base.
12583 (lm_info_p): Rename to ...
12584 (lm_info_aix_p): ... this, and adjust.
12585 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12586 solib_aix_parse_libraries, library_list_start_library,
12587 solib_aix_free_library_list, solib_aix_parse_libraries,
12588 solib_aix_get_library_list,
12589 solib_aix_relocate_section_addresses, solib_aix_free_so,
12590 solib_aix_get_section_offsets,
12591 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12592 Adjust.
12593 (struct solib_aix_inferior_data) <library_list>: Adjust.
12594 * solib-darwin.c (struct lm_info): Rename to ...
12595 (struct lm_info_darwin): ... this. Extend lm_info_base.
12596 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12597 * solib-dsbt.c (struct lm_info): Rename to ...
12598 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12599 (struct dsbt_info) <main_executable_lm_info): Adjust.
12600 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12601 dsbt_relocate_section_addresses): Adjust.
12602 * solib-frv.c (struct lm_info): Rename to ...
12603 (struct lm_info_frv): ... this. Extend lm_info_base.
12604 (main_executable_lm_info): Adjust.
12605 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12606 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12607 find_canonical_descriptor_in_load_object,
12608 frv_fdpic_find_canonical_descriptor): Adjust.
12609 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12610 to lm_info_svr4.
12611 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12612 svr4_clear_so, svr4_copy_library_list,
12613 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12614 svr4_current_sos, svr4_fetch_objfile_link_map,
12615 solist_update_incremental): Adjust.
12616 * solib-svr4.h (struct lm_info_svr4): Move here from
12617 solib-svr4.c.
12618 * solib-target.c (struct lm_info): Rename to ...
12619 (struct lm_info_target): ... this. Extend lm_info_base.
12620 (lm_info_p): Rename to ...
12621 (lm_info_target_p): ... this.
12622 (solib_target_parse_libraries, library_list_start_segment,
12623 library_list_start_section, library_list_start_library,
12624 library_list_end_library, solib_target_free_library_list,
12625 solib_target_current_sos, solib_target_free_so,
12626 solib_target_relocate_section_addresses): Adjust.
12627 * windows-nat.c (struct lm_info): Rename to ...
12628 (struct lm_info_windows): ... this. Extend lm_info_base.
12629 (windows_make_so, handle_load_dll, handle_unload_dll,
12630 windows_xfer_shared_libraries): Adjust.
12631
434a4023
SM
126322017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12633
12634 * solib-darwin.c (struct darwin_so_list): Remove.
12635 (darwin_current_sos): Allocate an so_list object instead of a
12636 darwin_so_list, separately allocate an lm_info object.
12637 (darwin_free_so): Free lm_info.
12638
428544e8
JB
126392017-04-28 John Baldwin <jhb@FreeBSD.org>
12640
12641 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12642 with fprintf_filtered.
12643
4621115f
YQ
126442017-04-28 Yao Qi <yao.qi@linaro.org>
12645
12646 * regcache.c (regcache::regcache): New function.
12647 (regcache::~regcache): New function.
12648 (regcache_xmalloc_1): Remove.
12649 (regcache_xmalloc): Call new regcache.
12650 (regcache_xfree): Call delete regcache.
12651 (get_thread_arch_aspace_regcache): Call new regcache.
12652
339053c2
YQ
126532017-04-28 Yao Qi <yao.qi@linaro.org>
12654
12655 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12656 lwp instead of ptid_get_lwp.
12657
7974a605
YQ
126582017-04-28 Yao Qi <yao.qi@linaro.org>
12659
12660 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12661 lwp_info instead of getting from inferior_ptid.
12662
e15c3eb4
KS
126632017-04-27 Keith Seitz <keiths@redhat.com>
12664
12665 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12666 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12667 (CV_CONVERSION_BADNESS): Define.
12668 (rank_one_type): Remove overly restrictive rvalue reference
12669 rank checks.
12670 Add cv-qualifier checks and subranks for type equality.
12671 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12672 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12673 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12674
72bc1d24
SM
126752017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12676
12677 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12678 count when creating the object.
12679
55bcecda
UW
126802017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12681 Ulrich Weigand <uweigand@de.ibm.com>
12682
12683 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12684 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12685 is used in AIX.
12686 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12687 (process_xcoff_symbol): Likewise.
12688 (scan_xcoff_symtab): Likewise.
12689
5c99fcf8
AH
126902017-04-26 Alan Hayward <alan.hayward@arm.com>
12691
12692 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12693 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12694 (ia64_access_reg): Use get_frame_register_unsigned.
12695 (ia64_access_rse_reg): Likewise.
12696 (ia64_libunwind_frame_prev_register): Likewise.
12697
b41c5a85
JW
126982017-04-26 Jiong Wang <jiong.wang@arm.com>
12699
12700 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12701 * gdbarch.c: Regenerated.
12702 * gdbarch.h: Regenerated.
12703 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12704 visibility external.
12705 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12706 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12707 (enum cfa_how_kind): Move to ...
12708 (struct dwarf2_frame_state_reg_info): Likewise.
12709 (struct dwarf2_frame_state): Likewise.
12710 * dwarf2-frame.h: ... here.
12711 (dwarf2_frame_state_alloc_regs): New declaration.
12712 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12713 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12714
c185f580
AH
127152017-04-26 Alan Hayward <alan.hayward@arm.com>
12716
12717 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12718 regcache_raw_read_unsigned.
12719 (xtensa_pseudo_register_write): Likewise.
12720
19c45594
AH
127212017-04-26 Alan Hayward <alan.hayward@arm.com>
12722
12723 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12724 (nds32_pseudo_register_write): Likewise.
12725
4658f12e
YQ
127262017-04-25 Yao Qi <yao.qi@linaro.org>
12727
12728 * regcache.c (struct regcache) <readonly_p>: Change its type
12729 to bool.
12730 (regcache_xmalloc_1): Update parameter type and callers update.
12731
d581dda8
YQ
127322017-04-25 Yao Qi <yao.qi@linaro.org>
12733
12734 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12735 set_gdbarch_wchar_bit.
12736 * arm-tdep.c (arm_gdbarch_init): Likewise.
12737
debed3db
PA
127382017-04-25 Pedro Alves <palves@redhat.com>
12739
12740 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12741 (BothAreRelocatable, memcopy, memmove): Don't define.
12742 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12743 macros.
12744
b0b92aeb
PA
127452017-04-25 Pedro Alves <palves@redhat.com>
12746
12747 * common/common-defs.h: Include "common/poison.h".
12748 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12749 and adjust.
12750 * common/poison.h: New file.
12751 * common/traits.h: Include <type_traits>.
12752 (Not, Or, Requires): New, moved from common/function-view.h.
12753
16c4d54a
PA
127542017-04-25 Pedro Alves <palves@redhat.com>
12755
12756 * breakpoint.h (struct breakpoint): In-class initialize all
12757 fields. Make boolean fields "bool".
12758 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12759 memset call and initializations no longer necessary.
12760
b5c36682
PA
127612017-04-25 Pedro Alves <palves@redhat.com>
12762
12763 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12764 reference.
12765 (pt_btrace_insn): New function.
12766 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12767
5625a286
PA
127682017-04-25 Pedro Alves <palves@redhat.com>
12769
12770 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12771 "base" field and inherit from "bp_location" instead. Add
12772 non-default ctor.
12773 (allocate_location_exception): Use new non-default ctor.
12774 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12775 (init_bp_location): Convert to ...
12776 (bp_location::bp_location): ... this new ctor, and remove memset
12777 call.
12778 (base_breakpoint_allocate_location): Use the new non-default ctor.
12779 * breakpoint.h (bp_location): Now a class. Declare default and
12780 non-default ctors. In-class initialize all members.
12781 (init_bp_location): Remove declaration.
12782
23bcc18f
PA
127832017-04-25 Pedro Alves <palves@redhat.com>
12784
12785 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12786 assignment operator.
12787
e1ba3053
YQ
127882017-04-24 Yao Qi <yao.qi@linaro.org>
12789
12790 * doublest.c (convert_doublest_to_floatformat): Call
12791 floatformat_totalsize_bytes.
12792
10f489e5
TT
127932017-04-22 Tom Tromey <tom@tromey.com>
12794
12795 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12796 ui_out_emit_list.
12797 * stack.c (print_frame): Use ui_out_emit_list.
12798 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12799 ui_out_emit_list.
12800 * mi/mi-main.c (print_one_inferior)
12801 (mi_cmd_data_list_register_names)
12802 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12803 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12804 ui_out_emit_list.
12805 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12806 (mi_output_solib_attribs): Use ui_out_emit_list,
12807 ui_out_emit_tuple.
12808 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12809 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12810 (mi_cmd_stack_list_args, list_args_or_locals): Use
12811 ui_out_emit_list.
12812 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12813 * breakpoint.c (print_solib_event, output_thread_groups): Use
12814 ui_out_emit_list.
12815
0092b74d
TT
128162017-04-22 Tom Tromey <tom@tromey.com>
12817
12818 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12819 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12820 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12821
a14a62dd
TT
128222017-04-22 Tom Tromey <tom@tromey.com>
12823
12824 * tracepoint.c (tvariables_info_1)
12825 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12826
46b9c129
TT
128272017-04-22 Tom Tromey <tom@tromey.com>
12828
12829 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12830 annotate_arg_emitter.
12831 * breakpoint.c (print_mention_watchpoint)
12832 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12833 * annotate.h (struct annotate_arg_emitter): New.
12834
2e783024
TT
128352017-04-22 Tom Tromey <tom@tromey.com>
12836
12837 * record-btrace.c (record_btrace_insn_history)
12838 (record_btrace_insn_history_range, record_btrace_call_history)
12839 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12840 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12841 ui_out_emit_tuple.
12842 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12843 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12844 * skip.c (skip_info): Use ui_out_emit_tuple.
12845 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12846 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12847 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12848 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12849 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12850 ui_out_emit_tuple.
12851 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12852 (output_register, mi_cmd_data_read_memory)
12853 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12854 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12855 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12856 Use ui_out_emit_tuple.
12857 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12858 ui_out_emit_tuple.
12859 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12860 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12861 * linux-thread-db.c (info_auto_load_libthread_db): Use
12862 ui_out_emit_tuple.
12863 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12864 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12865 * disasm.c (do_mixed_source_and_assembly_deprecated)
12866 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12867 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12868 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12869 * breakpoint.c (print_one_breakpoint_location)
12870 (print_one_breakpoint): Use ui_out_emit_tuple.
12871 * auto-load.c (print_script, info_auto_load_cmd): Use
12872 ui_out_emit_tuple.
12873 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12874
9be21bb4
SM
128752017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12876
12877 * thread.c (print_thread_info_1): Remove dead code.
12878
0d4c07af
JK
128792017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12880
12881 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12882 GDB_SELF_TEST.
12883 * arm-tdep.c (selftests::arm_record_test): Likewise.
12884
4daf993d
YQ
128852017-04-21 Yao Qi <yao.qi@linaro.org>
12886
12887 * regcache.c (regcache_restore): Remove argument 2. Replace
12888 argument 3 with regcache. Get register status from
12889 src->register_status and get register contents from
12890 register_buffer (src, regnum).
12891 (regcache_cpy): Update.
12892
a6c21d4a
PA
128932017-04-19 Pedro Alves <palves@redhat.com>
12894
12895 * gdbthread.h (thread): Add missing closing parenthesis in
12896 comment.
12897
3a3fd0fd
PA
128982017-04-19 Pedro Alves <palves@redhat.com>
12899
12900 * common/refcounted-object.h: New file.
12901 * gdbthread.h: Include "common/refcounted-object.h".
12902 (thread_info): Inherit from refcounted_object and add comments.
12903 (thread_info::incref, thread_info::decref)
12904 (thread_info::m_refcount): Delete.
12905 (thread_info::deletable): Use the refcounted_object::refcount()
12906 method.
12907 * inferior.c (current_inferior_): Add comment.
12908 (set_current_inferior): Increment/decrement refcounts.
12909 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12910 not-deletable instead of comparing with the current inferior.
12911 (initialize_inferiors): Increment the initial inferior's refcount.
12912 * inferior.h (struct inferior): Forward declare.
12913 Include "common/refcounted-object.h".
12914 (current_inferior, set_current_inferior): Move declaration to
12915 before struct inferior's definition, and fix comment.
12916 (inferior): Inherit from refcounted_object. Add comments.
12917 * thread.c (switch_to_thread_no_regs): Reference the thread's
12918 inferior pointer directly instead of doing a ptid lookup.
12919 (switch_to_no_thread): New function.
12920 (switch_to_thread(thread_info *)): New function, factored out
12921 from ...
12922 (switch_to_thread(ptid_t)): ... this.
12923 (restore_current_thread): Delete.
12924 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12925 fields, and add 'inf' field.
12926 (do_restore_current_thread_cleanup): Check whether old->inf is
12927 alive instead of looking up an inferior by ptid. Use
12928 switch_to_thread and switch_to_no_thread.
12929 (restore_current_thread_cleanup_dtor): Use old->inf directly
12930 instead of lookup up an inferior by id. Decref the inferior.
12931 Don't restore 'removable'.
12932 (make_cleanup_restore_current_thread): Same the inferior pointer
12933 in old, instead of the inferior number. Incref the inferior.
12934 Don't save/clear 'removable'.
12935
9bcb1f16
PA
129362017-04-19 Pedro Alves <palves@redhat.com>
12937
12938 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12939 unittests/scoped_restore-selftests.c.
12940 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12941 * common/scoped_restore.h (scoped_restore_base): Make "class".
12942 (scoped_restore_base::release): New public method.
12943 (scoped_restore_base::scoped_restore_base): New protected ctor.
12944 (scoped_restore_base::m_saved_var): New protected field.
12945 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12946 scoped_restore_base base class instead of m_saved_var directly.
12947 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12948 (scoped_restore_tmpl::scoped_restore_tmpl(const
12949 scoped_restore_tmpl<T>&)): Likewise.
12950 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12951 method.
12952 (scoped_restore_tmpl::saved_var): New method.
12953 (scoped_restore_tmpl::m_saved_var): Delete.
12954 * inferior.h (inferior::detaching): Now a bool.
12955 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12956 cleanup.
12957 * unittests/scoped_restore-selftests.c: New file.
12958
26fcd539
PA
129592017-04-19 Pedro Alves <palves@redhat.com>
12960
12961 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12962 Re-sort in alphabetic order.
12963
fdd243b0
PA
129642017-04-18 Pedro Alves <palves@redhat.com>
12965
12966 * xml-support.c (obstack_xml_printf): Delete.
12967 * xml-support.h (obstack_xml_printf): Delete.
12968
4895cde2
PA
129692017-04-18 Pedro Alves <palves@redhat.com>
12970
12971 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12972 vdebug, verror, body_text, start_element, end_element, name,
12973 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12974 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12975 is_xinclude>: Make private and add m_ prefix.
12976 (gdb_xml_parser::body_text): New method, based on ...
12977 (gdb_xml_body_text): ... this. Adjust.
12978 (gdb_xml_parser::vdebug): New method, based on ...
12979 (gdb_xml_debug): ... this. Adjust.
12980 (gdb_xml_parser::verror): New method, based on ...
12981 (gdb_xml_error): ... this. Adjust.
12982 (gdb_xml_parser::start_element): New method, based on ...
12983 (gdb_xml_start_element): ... this. Adjust.
12984 (gdb_xml_start_element_wrapper): Defer to
12985 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12986 (gdb_xml_parser::end_element): New method, based on ...
12987 (gdb_xml_end_element_wrapper): ... this. Adjust.
12988 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12989 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12990 (gdb_xml_parser::use_dtd): New method, based on ...
12991 (gdb_xml_use_dtd): ... this. Adjust.
12992 (gdb_xml_parser::parse): New method, based on ...
12993 (gdb_xml_parse): ... this. Adjust.
12994 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12995 (xinclude_start_include): Adjust to call the parser's name method.
12996 (xml_xinclude_default, xml_xinclude_start_doctype)
12997 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12998 method.
12999 (xml_process_xincludes): Adjust to call parser methods.
13000 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13001 declarations.
13002
bd8a901f
PA
130032017-04-18 Pedro Alves <palves@redhat.com>
13004
13005 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13006 gdb::optional<std::string>.
13007 * xml-support.c: Include <string>.
13008 (scope_level::scope_level(scope_level &&))
13009 (scope_level::~scope_level): Delete.
13010 (scope_level::body): Now a std::string.
13011 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13012 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13013 parameter.
13014 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13015 (xinclude_parsing_data::output): Now a std::string reference.
13016 (xinclude_start_include): Adjust.
13017 (xml_xinclude_default): Adjust.
13018 (xml_process_xincludes): Add 'output' parameter, and return bool.
13019 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13020 and return bool.
13021 * xml-tdesc.c: Include <unordered_map> and <string>.
13022 (tdesc_xml_cache): Delete.
13023 (tdesc_xml_cache_s): Delete.
13024 (xml_cache): Now an std::unordered_map.
13025 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13026 (target_fetch_description_xml): Change return type to
13027 gdb::optional<std::string>, and adjust.
13028 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13029 (target_fetch_description_xml): Change return type to
13030 gdb::optional<std::string>.
13031
d35d1958
PA
130322017-04-18 Pedro Alves <palves@redhat.com>
13033
13034 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13035 unittests/optional-selftests.c.
13036 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13037 * unittests/optional-selftests.c: New file.
13038 * unittests/optional/assignment/1.cc: New file.
13039 * unittests/optional/assignment/2.cc: New file.
13040 * unittests/optional/assignment/3.cc: New file.
13041 * unittests/optional/assignment/4.cc: New file.
13042 * unittests/optional/assignment/5.cc: New file.
13043 * unittests/optional/assignment/6.cc: New file.
13044 * unittests/optional/assignment/7.cc: New file.
13045 * unittests/optional/cons/copy.cc: New file.
13046 * unittests/optional/cons/default.cc: New file.
13047 * unittests/optional/cons/move.cc: New file.
13048 * unittests/optional/cons/value.cc: New file.
13049 * unittests/optional/in_place.cc: New file.
13050 * unittests/optional/observers/1.cc: New file.
13051 * unittests/optional/observers/2.cc: New file.
13052
22796e97
PA
130532017-04-18 Pedro Alves <palves@redhat.com>
13054
13055 * common/gdb_optional.h: Include common/traits.h.
13056 (in_place_t): New type.
13057 (in_place): New constexpr variable.
13058 (optional::optional): Remove member initialization of
13059 m_instantiated.
13060 (optional::optional(in_place_t...)): New constructor.
13061 (optional::~optional): Use reset.
13062 (optional::optional(const optional&)): New.
13063 (optional::optional(const optional&&)): New.
13064 (optional::optional(T &)): New.
13065 (optional::optional(T &&)): New.
13066 (operator::operator=(const optional &)): New.
13067 (operator::operator=(optional &&)): New.
13068 (operator::operator= (const T &))
13069 (operator::operator= (T &&))
13070 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13071 (operator::reset): New.
13072 (operator::m_instantiated):: Add in-class initializer.
13073 * common/traits.h: Include <type_traits>.
13074 (struct And): New types.
13075
a7fc9b61
PA
130762017-04-18 Pedro Alves <palves@redhat.com>
13077
13078 * xml-support.c: Include <vector>.
13079 (scope_level::scope_level(const gdb_xml_element *))
13080 (scope_level::scope_level(scope_level&&)): New.
13081 (scope_level::~scope_level): New.
13082 (scope_level_s): Delete.
13083 (gdb_xml_parser::scopes): Now a std::vector.
13084 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13085 Use std::vector.
13086 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13087 scope cleanup code.
13088 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13089 of the scopes member. Use std::vector::emplace_back.
13090
010151c9
PA
130912017-04-18 Pedro Alves <palves@redhat.com>
13092
13093 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13094 a bool.
13095 (gdb_xml_end_element): Change type of first parameter.
13096 (gdb_xml_cleanup): Rename to ...
13097 (gdb_xml_parser::~gdb_xml_parser): ... this.
13098 (gdb_xml_create_parser_and_cleanup): Delete with ...
13099 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13100 to this new ctor.
13101 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13102 using gdb_xml_create_parser_and_cleanup.
13103 (xinclude_parsing_data): Add ctor/dtor.
13104 (xml_xinclude_cleanup): Delete.
13105 (xml_process_xincludes): Create a local xinclude_parsing_data
13106 instead of heap-allocating one. Create a local gdb_xml_parser
13107 instead of heap-allocating one with
13108 gdb_xml_create_parser_and_cleanup.
13109
d56060f0
JB
131102017-04-18 John Baldwin <jhb@FreeBSD.org>
13111
13112 PR threads/20743
13113 * fbsd-nat.c (resume_one_thread_cb): Remove.
13114 (resume_all_threads_cb): Remove.
13115 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13116 iterate_over_threads.
13117
305d16a9
JB
131182017-04-17 Joel Brobecker <brobecker@adacore.com>
13119
13120 * NEWS: Create a new section for the next release branch.
13121 Rename the section of the current branch, now that it has
13122 been cut.
13123
8bb57231
JB
131242017-04-17 Joel Brobecker <brobecker@adacore.com>
13125
13126 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13127 * version.in: Bump version to 8.0.50.DATE-git.
13128
096c92dd
SDJ
131292017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13130
13131 PR gdb/21385
13132 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13133 independently of the host, and fix build breakage on Cygwin.
13134
0550c955
PA
131352017-04-13 Pedro Alves <palves@redhat.com>
13136
13137 * inferior.c (free_inferior): Convert to ...
13138 (inferior::~inferior): ... this dtor.
13139 (inferior::inferior): New ctor, factored out from ...
13140 (add_inferior_silent): ... here. Allocate the inferior with a new
13141 expression.
13142 (delete_inferior): Call delete instead of free_inferior.
13143 * inferior.h (gdb_environ, continuation): Forward declare.
13144 (inferior): Now a class. Add in-class initialization to all
13145 members. Make boolean fields bool, except 'detaching'.
13146 (inferior::inferior): New explicit ctor.
13147 (inferior::~inferior): New.
13148
e3d60dfc
PA
131492017-04-13 Pedro Alves <palves@redhat.com>
13150
13151 * inferior.c (init_inferior_list): Delete.
13152 * inferior.h (init_inferior_list): Delete.
13153
5fd69d0a
PA
131542017-04-13 Pedro Alves <palves@redhat.com>
13155
13156 PR threads/13217
13157 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13158 (top level): Call it twice, with different thread sets.
13159
c6609450
PA
131602017-04-13 Pedro Alves <palves@redhat.com>
13161
13162 * thread.c: Include <algorithm>.
13163 (thread_array_cleanup): Delete.
13164 (scoped_inc_dec_ref): New class.
13165 (live_threads_count): New function.
13166 (set_thread_refcount): Delete.
13167 (tp_array_compar_ascending): Now a bool.
13168 (tp_array_compar): Convert to a std::sort comparison function.
13169 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13170 and live_threads_count.
13171
2a00d7ce
PA
131722017-04-13 Pedro Alves <palves@redhat.com>
13173
13174 * infrun.c (follow_fork_inferior): Also switch the current
13175 inferior.
13176
441d7c93
PA
131772017-04-13 Pedro Alves <palves@redhat.com>
13178
13179 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13180 before calling create_internal_breakpoint.
13181
808480f6
PA
131822017-04-13 Pedro Alves <palves@redhat.com>
13183
13184 * fork-child.c (execv_argv): New class.
13185 (breakup_args): Refactored as ...
13186 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13187 Copy arguments to storage and replace separators with NULL
13188 terminators in place.
13189 (escape_bang_in_quoted_argument): Adjust to return bool.
13190 (execv_argv::execv_argv): New ctor.
13191 (execv_argv::init_for_shell): New method, factored out from
13192 fork_inferior. Don't strdup strings into the vector.
13193 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13194 Remove free_vector_argv call.
13195
ad3d022a
YQ
131962017-04-13 Yao Qi <yao.qi@linaro.org>
13197
13198 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13199 tdep->rx_psw_type.
13200
e6ddc3bf
YQ
132012017-04-13 Yao Qi <yao.qi@linaro.org>
13202
13203 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13204 * rx-tdep.c (rx_gdbarch_init): Likewise.
13205
bfb8cf90
PA
132062017-04-13 Pedro Alves <palves@redhat.com>
13207
13208 * breakpoint.h (struct breakpoint): Reindent.
13209
f5336ca5
PA
132102017-04-13 Pedro Alves <palves@redhat.com>
13211
13212 * breakpoint.c (bp_location): Rename to ...
13213 (bp_locations): ... this. All references updated.
13214 (bp_location_count): Rename to ...
13215 (bp_locations_count): ... this. All references updated.
13216 (bp_location_placed_address_before_address_max): Rename to ...
13217 (bp_locations_placed_address_before_address_max): ... this. All
13218 references updated.
13219 (bp_location_shadow_len_after_address_max): Rename to ...
13220 (bp_locations_shadow_len_after_address_max): ... this. All
13221 references updated.
13222 (bp_location_compare_addrs): Rename to ...
13223 (bp_locations_compare_addrs): ... this. All references updated.
13224 (bp_location_compare):Rename to ...
13225 (bp_locations_compare): ... this. All references updated.
13226 (bp_location_target_extensions_update): Rename to ...
13227 (bp_locations_target_extensions_update): ... this. All references
13228 updated.
13229
be628ab8
SDJ
132302017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13231
13232 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13233 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13234 'sgtty.h'.
13235 * common/gdb_termios.h: New file, with parts of "terminal.h".
13236 * inflow.c: Include "gdb_termios.h".
13237 * ser-unix.c: Include "gdb_termios.h".
13238 * terminal.h: Move terminal-related defines to
13239 "common/gdb_termios.h".
13240
8e9e35b1
TT
132412017-04-12 Tom Tromey <tom@tromey.com>
13242
13243 * probe.c (parse_probes): Update.
13244 * location.h (delete_event_location): Don't declare.
13245 (event_location_deleter::operator()): Update.
13246 * location.c (event_location_deleter::operator()): Rename from
13247 delete_event_location.
13248 * linespec.h (linespec_result) <location>: Change type to
13249 event_location_up.
13250 * linespec.c (canonicalize_linespec, event_location_to_sals)
13251 (decode_objc): Update.
13252 (linespec_result): Don't call delete_event_location.
13253 * breakpoint.c (create_breakpoints_sal)
13254 (bkpt_probe_create_sals_from_location)
13255 (strace_marker_create_sals_from_location): Update.
13256
16e802b9
TT
132572017-04-12 Tom Tromey <tom@tromey.com>
13258
13259 * linespec.h (struct linespec_result): Add constructor and
13260 destructor.
13261 (init_linespec_result, destroy_linespec_result)
13262 (make_cleanup_destroy_linespec_result): Don't declare.
13263 * linespec.c (init_linespec_result): Remove.
13264 (linespec_result::~linespec_result): Rename from
13265 destroy_linespec_result. Update.
13266 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13267 Remove.
13268 * breakpoint.c (create_breakpoint, break_range_command)
13269 (decode_location_default): Update.
13270 * ax-gdb.c (agent_command_1): Update.
13271
d28cd78a
TT
132722017-04-12 Tom Tromey <tom@tromey.com>
13273
13274 * remote.c (remote_download_tracepoint): Update.
13275 * python/py-breakpoint.c (bppy_get_location): Update.
13276 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13277 (gdbscm_breakpoint_location): Update.
13278 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13279 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13280 Change type to event_location_up.
13281 * breakpoint.c (create_overlay_event_breakpoint)
13282 (create_longjmp_master_breakpoint)
13283 (create_std_terminate_master_breakpoint)
13284 (create_exception_master_breakpoint)
13285 (breakpoint_event_location_empty_p, print_breakpoint_location)
13286 (print_one_breakpoint_location, create_thread_event_breakpoint)
13287 (init_breakpoint_sal, create_breakpoint)
13288 (print_recreate_ranged_breakpoint, break_range_command)
13289 (init_ada_exception_breakpoint, say_where): Update.
13290 (base_breakpoint_dtor): Don't call delete_event_location.
13291 (bkpt_print_recreate, tracepoint_print_recreate)
13292 (dprintf_print_recreate, update_static_tracepoint)
13293 (breakpoint_re_set_default): Update.
13294
711799d5
TT
132952017-04-12 Tom Tromey <tom@tromey.com>
13296
13297 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13298 type of "to_do". Update.
13299 (compute_stack_depth): Use std::vector.
13300
52d214d3
TT
133012017-04-12 Tom Tromey <tom@tromey.com>
13302
13303 * printcmd.c (find_instruction_backward): Use std::vector.
13304
4c404b8b
TT
133052017-04-12 Tom Tromey <tom@tromey.com>
13306
13307 * symfile.c (objfilep): Remove typedef.
13308 (reread_symbols): Use a std::vector.
13309
156d9eab
TT
133102017-04-12 Tom Tromey <tom@tromey.com>
13311
13312 * mi/mi-main.c (exec_direction_forward): Remove.
13313 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13314 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13315 scoped_restore.
13316 * guile/guile.c (guile_repl_command, guile_command)
13317 (gdbscm_execute_gdb_command): Use scoped_restore.
13318 * go-exp.y (go_parse): Use scoped_restore.
13319 * d-exp.y (d_parse): Use scoped_restore.
13320 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13321 * c-exp.y (c_parse): Use scoped_restore.
13322
4d89769a
TT
133232017-04-12 Tom Tromey <tom@tromey.com>
13324
13325 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13326 (mi_parse): Update return type.
13327 (mi_parse_free): Remove.
13328 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13329 (mi_parse::~mi_parse): Rename from mi_parse_free.
13330 (mi_parse_cleanup): Remove.
13331 (mi_parse): Return a unique_ptr. Use new.
13332 * mi/mi-main.c (mi_execute_command): Update.
13333
4b217cc7
TT
133342017-04-12 Tom Tromey <tom@tromey.com>
13335
13336 * location.c (explicit_location_lex_one): Return a
13337 unique_xmalloc_ptr.
13338 (string_to_explicit_location): Update. Remove cleanups.
13339
59d3651b
TT
133402017-04-12 Tom Tromey <tom@tromey.com>
13341
13342 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13343 (compare_value_and_voffset): Change type. Update.
13344 (compute_vtable_size): Change type of "offset_vec".
13345 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13346 (gnuv3_get_typeid): Remove extraneous declaration.
13347
b24b0d6c
TT
133482017-04-12 Tom Tromey <tom@tromey.com>
13349
13350 * charset.h (wchar_iterator): Fix comment.
13351
80a3b8c5
TT
133522017-04-12 Tom Tromey <tom@tromey.com>
13353
13354 * charset.c (iconv_wrapper): New class.
13355 (cleanup_iconv): Remove.
13356 (convert_between_encodings): Use it.
13357
c83dd867
TT
133582017-04-12 Tom Tromey <tom@tromey.com>
13359
13360 * symfile.h (increment_reading_symtab): Update type.
13361 * symfile.c (decrement_reading_symtab): Remove.
13362 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13363 * psymtab.c (psymtab_to_symtab): Update.
13364 * dwarf2read.c (dw2_instantiate_symtab): Update.
13365
0e8621a0
TT
133662017-04-12 Tom Tromey <tom@tromey.com>
13367
13368 * jit.c (struct jit_reader): Declare separately. Add constructor
13369 and destructor. Change type of "handle".
13370 (loaded_jit_reader): Define separately.
13371 (jit_reader_load): Update. New "new".
13372 (jit_reader_unload_command): Use "delete".
13373 * gdb-dlfcn.h (struct dlclose_deleter): New.
13374 (gdb_dlhandle_up): New typedef.
13375 (gdb_dlopen, gdb_dlsym): Update types.
13376 (gdb_dlclose): Remove.
13377 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13378 (gdb_dlsym): Change type of "handle".
13379 (make_cleanup_dlclose): Remove.
13380 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13381 * compile/compile-c-support.c (load_libcc): Update.
13382
67d89901
TT
133832017-04-12 Tom Tromey <tom@tromey.com>
13384
13385 * symtab.h (find_pcs_for_symtab_line): Change return type.
13386 * symtab.c (find_pcs_for_symtab_line): Change return type.
13387 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13388 type of "vec". Update.
13389 (ltpy_get_pcs_for_line): Update.
13390 * linespec.c (decode_digits_ordinary): Update.
13391
93921405
TT
133922017-04-12 Tom Tromey <tom@tromey.com>
13393
13394 * tracepoint.c (actions_command): Update.
13395 * python/python.c (python_command, python_interactive_command):
13396 Update.
13397 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13398 * guile/guile.c (guile_command): Update.
13399 * defs.h (read_command_lines, read_command_lines_1): Return
13400 command_line_up.
13401 (command_lines_deleter): New struct.
13402 (command_line_up): New typedef.
13403 * compile/compile.c (compile_code_command)
13404 (compile_print_command): Update.
13405 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13406 command_line_up.
13407 (make_cleanup_free_command_lines): Remove.
13408 * cli/cli-script.c (get_command_line, read_command_lines_1)
13409 (copy_command_lines): Return command_line_up.
13410 (while_command, if_command, read_command_lines, define_command)
13411 (document_command): Update.
13412 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13413 Remove.
13414 * breakpoint.h (breakpoint_set_commands): Change type of
13415 "commands".
13416 * breakpoint.c (breakpoint_set_commands): Change type of
13417 "commands". Update.
13418 (do_map_commands_command, update_dprintf_command_list)
13419 (create_tracepoint_from_upload): Update.
13420
ffc2605c
TT
134212017-04-12 Tom Tromey <tom@tromey.com>
13422
13423 * tracepoint.c (scope_info): Update.
13424 * spu-tdep.c (spu_catch_start): Update.
13425 * python/python.c (gdbpy_decode_line): Update.
13426 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13427 * python/py-breakpoint.c (bppy_init): Update.
13428 * probe.c (parse_probes): Update.
13429 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13430 * location.h (event_location_deleter): New struct.
13431 (event_location_up): New typedef.
13432 (new_linespec_location, new_address_location, new_probe_location)
13433 (new_explicit_location, copy_event_location)
13434 (string_to_event_location, string_to_event_location_basic)
13435 (string_to_explicit_location): Update return type.
13436 (make_cleanup_delete_event_location): Remove.
13437 * location.c (new_linespec_location, new_address_location)
13438 (new_probe_location, new_explicit_location, copy_event_location):
13439 Return event_location_up.
13440 (delete_event_location_cleanup)
13441 (make_cleanup_delete_event_location): Remove.
13442 (string_to_explicit_location, string_to_event_location_basic)
13443 (string_to_event_location): Return event_location_up.
13444 * linespec.c (canonicalize_linespec, event_location_to_sals)
13445 (decode_line_with_current_source)
13446 (decode_line_with_last_displayed, decode_objc): Update.
13447 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13448 * completer.c (location_completer): Update.
13449 * cli/cli-cmds.c (edit_command, list_command): Update.
13450 * breakpoint.c (create_overlay_event_breakpoint)
13451 (create_longjmp_master_breakpoint)
13452 (create_std_terminate_master_breakpoint)
13453 (create_exception_master_breakpoint)
13454 (create_thread_event_breakpoint): Update.
13455 (init_breakpoint_sal): Update. Remove some dead code.
13456 (create_breakpoint_sal): Change type of "location". Update.
13457 (create_breakpoints_sal, create_breakpoint, break_command_1)
13458 (dprintf_command, break_range_command, until_break_command)
13459 (init_ada_exception_breakpoint)
13460 (strace_marker_create_sals_from_location)
13461 (update_static_tracepoint, trace_command, ftrace_command)
13462 (strace_command, create_tracepoint_from_upload): Update.
13463 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13464 * ax-gdb.c (agent_command_1): Update.
13465
8f10c932
PA
134662017-04-12 Pedro Alves <palves@redhat.com>
13467
13468 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13469 * configure.tgt: Handle i[34567]86-*-go32* and
13470 i[34567]86-*-msdosdjgpp*.
13471 * i386-tdep.c (i386_svr4_reg_to_regnum):
13472 Make extern.
13473 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13474 i386-go32-tdep.c.
13475 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13476 * i386-go32-tdep.c: New file.
13477 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13478 declarations.
13479
0a31ccfb
SM
134802017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13481
13482 * aix-thread.c (pd_status2str): Change return type to const char *.
13483
e9bb3fbb
PA
134842017-04-12 Pedro Alves <palves@redhat.com>
13485
13486 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13487 calls to set_gdbarch_gnu_triplet_regexp.
13488
53375380
PA
134892017-04-12 Pedro Alves <palves@redhat.com>
13490
13491 PR gdb/21323
13492 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13493 New enum value.
13494 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13495 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13496 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13497 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13498 * gdbarch.h, gdbarch.c: Regenerate.
13499 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13500 gdbarch_wchar_bit and gdbarch_wchar_signed.
13501 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13502 * arm-tdep.c (arm_gdbarch_init): Likewise.
13503 * avr-tdep.c (avr_gdbarch_init): Likewise.
13504 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13505 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13506 * i386-tdep.c (i386_go32_init_abi): Likewise.
13507 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13508 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13509 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13510 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13511 * sh-tdep.c (sh_gdbarch_init): Likewise.
13512 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13513 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13514 * windows-tdep.c (windows_init_abi): Likewise.
13515 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13516
53e710ac
PA
135172017-04-12 Pedro Alves <palves@redhat.com>
13518
13519 PR c++/21323
13520 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13521 cplus_primitive_type_char32_t>: New enum values.
13522 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13523 and cplus_primitive_type_char32_t.
13524 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13525 32, use the archtecture's built-in type for char16_t and char32_t,
13526 respectively. Otherwise, fallback to init_integer_type as before,
13527 but make the type unsigned, and issue a complaint.
13528 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13529
ab0538b8
AH
135302017-04-12 Alan Hayward <alan.hayward@arm.com>
13531
5e0e0422 13532 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13533 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13534
5430098f
SDJ
135352017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13536
13537 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13538 'const char *'.
13539
7c5ded6a
SDJ
135402017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13541
13542 * common/common-utils.c (free_vector_argv): New function.
13543 * common/common-utils.h: Include <vector>.
13544 (free_vector_argv): New prototype.
13545 * darwin-nat.c (darwin_create_inferior): Rewrite function
13546 prototype in order to constify "exec_file" and accept a
13547 "std::string" for "allargs".
13548 * fork-child.c: Include <vector>.
13549 (breakup_args): Rewrite function, using C++.
13550 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13551 and accept "std::string" for "allargs". Update the code to
13552 calculate "argv" based on "allargs". Update calls to "exec_fun"
13553 and "execvp".
13554 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13555 order to constify "exec_file" and accept a "std::string" for
13556 "allargs".
13557 * go32-nat.c (go32_create_inferior): Likewise.
13558 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13559 * infcmd.c (run_command_1): Constify "exec_file". Use
13560 "std::string" for inferior arguments.
13561 * inferior.h (fork_inferior): Update prototype.
13562 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13563 prototype in order to constify "exec_file" and accept a
13564 "std::string" for "allargs".
13565 * nto-procfs.c (procfs_create_inferior): Likewise.
13566 * procfs.c (procfs_create_inferior): Likewise.
13567 * remote-sim.c (gdbsim_create_inferior): Likewise.
13568 * remote.c (extended_remote_run): Update code to accept
13569 "std::string" as argument.
13570 (extended_remote_create_inferior): Rewrite function prototype in
13571 order to constify "exec_file" and accept a "std::string" for
13572 "allargs".
13573 * rs6000-nat.c (super_create_inferior): Likewise.
13574 (rs6000_create_inferior): Likewise.
13575 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13576 * windows-nat.c (windows_create_inferior): Likewise.
13577
ae0eee42
PA
135782017-04-11 Pedro Alves <palves@redhat.com>
13579
13580 * thread.c: Fix whitespace throughout.
13581
a6acac06
PR
135822017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13583
13584 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13585
64403bd1
AH
135862017-04-11 Alan Hayward <alan.hayward@arm.com>
13587
13588 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13589
a5bef50f
SDJ
135902017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13591
13592 PR gdb/21364
13593 * osdata.c (info_osdata): Check if 'type' is an empty string
13594 instead of NULL.
13595
9295a5a9
PA
135962017-04-10 Pedro Alves <palves@redhat.com>
13597
13598 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13599 (ptid_to_global_thread_id, in_thread_list)
13600 (do_captured_list_thread_ids, set_resumed, set_running)
13601 (set_executing, set_stop_requested, finish_thread_state)
13602 (validate_registers_access, can_access_registers_ptid)
13603 (print_thread_info_1, switch_to_thread)
13604 (do_restore_current_thread_cleanup)
13605 (make_cleanup_restore_current_thread, thread_command)
13606 (thread_name_command): Use operator== instead of ptid_equal.
13607
996812e3
PA
136082017-04-10 Pedro Alves <palves@redhat.com>
13609
13610 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13611 (current_thread_cleanup_chain): Delete.
13612 (restore_current_thread_cleanup_dtor)
13613 (make_cleanup_restore_current_thread): Remove references to
13614 current_thread_cleanup_chain.
13615
845b344f
AH
136162017-04-10 Alan Hayward <alan.hayward@arm.com>
13617
13618 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13619 REG_UNKNOWN.
13620
803bdfe4
YQ
136212017-04-10 Yao Qi <yao.qi@linaro.org>
13622
13623 PR gdb/19942
13624 * gdbthread.h (thread_info::deletable): New method.
13625 (thread_info::incref): New method.
13626 (thread_info::decref): New method.
13627 (thread_info::refcount): Move it to private.
13628 * infrun.c (save_stop_context): Call inc_refcount.
13629 (release_stop_context_cleanup): Likewise.
13630 * thread.c (set_thread_exited): New function.
13631 (init_thread_list): Delete "tp" only it is deletable, otherwise
13632 call set_thread_exited.
13633 (delete_thread_1): Call set_thread_exited.
13634 (current_thread_cleanup) <inferior_pid>: Remove.
13635 <thread>: New field.
13636 (restore_current_thread_ptid_changed): Removed.
13637 (do_restore_current_thread_cleanup): Adjust.
13638 (restore_current_thread_cleanup_dtor): Don't call
13639 find_thread_ptid.
13640 (set_thread_refcount): Use dec_refcount.
13641 (make_cleanup_restore_current_thread): Adjust.
13642 (thread_apply_all_command): Call inc_refcount.
13643 (_initialize_thread): Don't call
13644 observer_attach_thread_ptid_changed.
13645
8c25b497
YQ
136462017-04-10 Yao Qi <yao.qi@linaro.org>
13647
13648 * thread.c (delete_thread_1): Hoist code on marking thread as
13649 exited.
13650
8473b447
SM
136512017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13652
13653 * windows-nat.c (windows_detach): Initialize ptid with
13654 minus_one_ptid.
13655
6670ec13
SM
136562017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13657
13658 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13659
ba2f91bb
AH
136602017-04-07 Alan Hayward <alan.hayward@arm.com>
13661
13662 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13663 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13664 (bfin_pseudo_register_write): Likewise
13665
436252de
SM
136662017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13667
13668 * common/ptid.h (struct ptid): Change to...
13669 (class ptid_t): ... this.
13670 <ptid_t>: New constructors.
13671 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13672 matches>: New methods.
13673 <make_null, make_minus_one>: New static methods.
13674 <pid>: Rename to...
13675 <m_pid>: ...this.
13676 <lwp>: Rename to...
13677 <m_lwp>: ...this.
13678 <tid>: Rename to...
13679 <m_tid>: ...this.
13680 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13681 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13682 as references, move comment to class ptid_t.
13683 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13684 ptid_t static methods.
13685 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13686 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13687 Take ptid arguments as references, implement using ptid_t methods.
13688 * unittests/ptid-selftests.c: New file.
13689 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13690 unittests/ptid-selftests.c.
13691 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13692
0dedf377
TP
136932017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13694
13695 * python/python.c (python_run_simple_file): Cast mode literal to
13696 non-const char pointer as expected by PyFile_FromString.
13697
4e9868d4
SM
136982017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13699
13700 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13701 minus_one_ptid and null_ptid.
13702
9bf2a700
PA
137032017-04-05 Pedro Alves <palves@redhat.com>
13704
13705 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13706 * configure: Regenerate.
13707
a121b7c1
PA
137082017-04-05 Pedro Alves <palves@redhat.com>
13709
13710 * ada-exp.y (yyerror): Constify.
13711 * ada-lang.c (bound_name, get_selections)
13712 (ada_variant_discrim_type)
13713 (ada_variant_discrim_name, ada_value_struct_elt)
13714 (ada_lookup_struct_elt_type, is_unchecked_variant)
13715 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13716 (catch_ada_exception_command_split)
13717 (catch_ada_assert_command_split, catch_assert_command)
13718 (ada_op_name): Constify.
13719 * ada-lang.h (ada_yyerror, get_selections)
13720 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13721 * arc-tdep.c (arc_print_frame_cache): Constify.
13722 * arm-tdep.c (arm_skip_stub): Constify.
13723 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13724 (gen_aggregate_elt_ref): Constify.
13725 * bcache.c (print_bcache_statistics): Constify.
13726 * bcache.h (print_bcache_statistics): Constify.
13727 * break-catch-throw.c (catch_exception_command_1):
13728 * breakpoint.c (struct ep_type_description::description):
13729 Constify.
13730 (add_solib_catchpoint): Constify.
13731 (catch_fork_command_1): Add cast.
13732 (add_catch_command): Constify.
13733 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13734 Constify.
13735 * bsd-uthread.c (bsd_uthread_state): Constify.
13736 * buildsym.c (patch_subfile_names): Constify.
13737 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13738 Constify.
13739 * c-exp.y (yyerror): Constify.
13740 (token::oper): Constify.
13741 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13742 * c-varobj.c (cplus_describe_child): Constify.
13743 * charset.c (find_charset_names): Add cast.
13744 (find_charset_names): Constify array and add const_cast.
13745 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13746 (edit_command): Constify.
13747 * cli/cli-decode.c (lookup_cmd): Constify.
13748 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13749 Constify.
13750 (struct dump_context): Constify.
13751 (add_dump_command, restore_command): Constify.
13752 * cli/cli-script.c (get_command_line): Constify.
13753 * cli/cli-script.h (get_command_line): Constify.
13754 * cli/cli-utils.c (check_for_argument): Constify.
13755 * cli/cli-utils.h (check_for_argument): Constify.
13756 * coff-pe-read.c (struct read_pe_section_data): Constify.
13757 * command.h (lookup_cmd): Constify.
13758 * common/print-utils.c (decimal2str): Constify.
13759 * completer.c (gdb_print_filename): Constify.
13760 * corefile.c (set_gnutarget): Constify.
13761 * cp-name-parser.y (yyerror): Constify.
13762 * cp-valprint.c (cp_print_class_member): Constify.
13763 * cris-tdep.c (cris_register_name, crisv32_register_name):
13764 Constify.
13765 * d-exp.y (yyerror): Constify.
13766 (struct token::oper): Constify.
13767 * d-lang.h (d_yyerror): Constify.
13768 * dbxread.c (struct header_file_location::name): Constify.
13769 (add_old_header_file, add_new_header_file, last_function_name)
13770 (dbx_next_symbol_text, add_bincl_to_list)
13771 (find_corresponding_bincl_psymtab, set_namestring)
13772 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13773 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13774 * defs.h (command_line_input, print_address_symbolic)
13775 (deprecated_readline_begin_hook): Constify.
13776 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13777 Constify.
13778 * event-top.c (handle_line_of_input): Constify and add cast.
13779 * exceptions.c (catch_errors): Constify.
13780 * exceptions.h (catch_errors): Constify.
13781 * expprint.c (print_subexp_standard, op_string, op_name)
13782 (op_name_standard, dump_raw_expression, dump_raw_expression):
13783 * expression.h (op_name, op_string, dump_raw_expression):
13784 Constify.
13785 * f-exp.y (yyerror): Constify.
13786 (struct token::oper): Constify.
13787 (struct f77_boolean_val::name): Constify.
13788 * f-lang.c (f_word_break_characters): Constify.
13789 * f-lang.h (f_yyerror): Constify.
13790 * fork-child.c (fork_inferior): Add cast.
13791 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13792 (new_variant): Constify.
13793 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13794 * gdbarch.c: Regenerate.
13795 * gdbcore.h (set_gnutarget): Constify.
13796 * go-exp.y (yyerror): Constify.
13797 (token::oper): Constify.
13798 * go-lang.h (go_yyerror): Constify.
13799 * go32-nat.c (go32_sysinfo): Constify.
13800 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13801 * guile/scm-cmd.c (cmdscm_function): Constify.
13802 * guile/scm-param.c (pascm_param_value): Constify.
13803 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13804 (h8300sx_register_name): Constify.
13805 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13806 Constify.
13807 * ia64-tdep.c (ia64_register_names): Constify.
13808 * infcmd.c (construct_inferior_arguments): Constify.
13809 (path_command, attach_post_wait): Constify.
13810 * language.c (show_range_command, show_case_command)
13811 (unk_lang_error): Constify.
13812 * language.h (language_defn::la_error)
13813 (language_defn::la_name_of_this): Constify.
13814 * linespec.c (decode_line_2): Constify.
13815 * linux-thread-db.c (thread_db_err_str): Constify.
13816 * lm32-tdep.c (lm32_register_name): Constify.
13817 * m2-exp.y (yyerror): Constify.
13818 * m2-lang.h (m2_yyerror): Constify.
13819 * m32r-tdep.c (m32r_register_names): Constify and make static.
13820 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13821 * m88k-tdep.c (m88k_register_name): Constify.
13822 * macroexp.c (appendmem): Constify.
13823 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13824 (upgrade_type, parse_external, parse_partial_symbols)
13825 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13826 (new_symbol): Constify.
13827 * memattr.c (mem_info_command): Constify.
13828 * mep-tdep.c (register_name_from_keyword): Constify.
13829 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13830 Constify.
13831 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13832 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13833 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13834 cast.
13835 (mi_execute_async_cli_command): Constify.
13836 * mips-tdep.c (mips_register_name): Constify.
13837 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13838 (am33_register_name, am33_2_register_name)
13839 * moxie-tdep.c (moxie_register_names): Constify.
13840 * nat/linux-osdata.c (osdata_type): Constify fields.
13841 * nto-tdep.c (nto_parse_redirection): Constify.
13842 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13843 (lookup_child_selector): Constify.
13844 (objc_methcall::name): Constify.
13845 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13846 (lookup_struct_typedef): Constify.
13847 * objfiles.c (pc_in_section): Constify.
13848 * objfiles.h (pc_in_section): Constify.
13849 * p-exp.y (struct token::oper): Constify.
13850 (yyerror): Constify.
13851 * p-lang.h (pascal_yyerror): Constify.
13852 * parser-defs.h (op_name_standard): Constify.
13853 (op_print::string): Constify.
13854 (exp_descriptor::op_name): Constify.
13855 * printcmd.c (print_address_symbolic): Constify.
13856 * psymtab.c (print_partial_symbols): Constify.
13857 * python/py-breakpoint.c (stop_func): Constify.
13858 (bppy_get_expression): Constify.
13859 * python/py-cmd.c (cmdpy_completer::name): Constify.
13860 (cmdpy_function): Constify.
13861 * python/py-event.c (evpy_add_attribute)
13862 (gdbpy_initialize_event_generic): Constify.
13863 * python/py-event.h (evpy_add_attribute)
13864 (gdbpy_initialize_event_generic): Constify.
13865 * python/py-evts.c (add_new_registry): Constify.
13866 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13867 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13868 * python/py-inferior.c (get_buffer): Add cast.
13869 * python/py-param.c (parm_constant::name): Constify.
13870 * python/py-unwind.c (fprint_frame_id): Constify.
13871 * python/python.c (gdbpy_parameter_value): Constify.
13872 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13873 * remote.c (memory_packet_config::name): Constify.
13874 (show_packet_config_cmd, remote_write_bytes)
13875 (remote_buffer_add_string):
13876 * reverse.c (exec_reverse_once): Constify.
13877 * rs6000-tdep.c (variant::name, variant::description): Constify.
13878 * rust-exp.y (rustyyerror): Constify.
13879 * rust-lang.c (rust_op_name): Constify.
13880 * rust-lang.h (rustyyerror): Constify.
13881 * serial.h (serial_ops::name): Constify.
13882 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13883 (sh_sh3e_register_name, sh_sh2e_register_name)
13884 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13885 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13886 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13887 (sh_sh4al_dsp_register_name): Constify.
13888 * sh64-tdep.c (sh64_register_name): Constify.
13889 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13890 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13891 * stabsread.c (patch_block_stabs, read_type_number)
13892 (ref_map::stabs, ref_add, process_reference)
13893 (symbol_reference_defined, define_symbol, define_symbol)
13894 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13895 (read_one_struct_field, read_struct_fields, read_baseclasses)
13896 (read_tilde_fields, read_struct_type, read_array_type)
13897 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13898 (read_huge_number, read_range_type, read_args, common_block_start)
13899 (find_name_end): Constify.
13900 * stabsread.h (common_block_start, define_symbol)
13901 (process_one_symbol, symbol_reference_defined, ref_add):
13902 * symfile.c (get_section_index, add_symbol_file_command):
13903 * symfile.h (get_section_index): Constify.
13904 * target-descriptions.c (tdesc_type::name): Constify.
13905 (tdesc_free_type): Add cast.
13906 * target.c (find_default_run_target):
13907 (add_deprecated_target_alias, find_default_run_target)
13908 (target_announce_detach): Constify.
13909 (do_option): Constify.
13910 * target.h (add_deprecated_target_alias): Constify.
13911 * thread.c (print_thread_info_1): Constify.
13912 * top.c (deprecated_readline_begin_hook, command_line_input):
13913 Constify.
13914 (init_main): Add casts.
13915 * top.h (handle_line_of_input): Constify.
13916 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13917 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13918 (tfind_command): Rename to ...
13919 (tfind_command_1): ... this and constify.
13920 (tfind_command): New function.
13921 (tfind_end_command, tfind_start_command): Adjust.
13922 (encode_source_string): Constify.
13923 * tracepoint.h (encode_source_string): Constify.
13924 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13925 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13926 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13927 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13928 * tui/tui-win.c (parse_scrolling_args): Constify.
13929 * tui/tui-windata.c (tui_erase_data_content): Constify.
13930 * tui/tui-windata.h (tui_erase_data_content): Constify.
13931 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13932 * tui/tui.c (tui_enable): Add cast.
13933 * utils.c (defaulted_query): Constify.
13934 (init_page_info): Add cast.
13935 (puts_debug, subset_compare): Constify.
13936 * utils.h (subset_compare): Constify.
13937 * varobj.c (varobj_format_string): Constify.
13938 * varobj.h (varobj_format_string): Constify.
13939 * vax-tdep.c (vax_register_name): Constify.
13940 * windows-nat.c (windows_detach): Constify.
13941 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13942 * xml-support.c (gdb_xml_end_element): Constify.
13943 * xml-tdesc.c (tdesc_start_reg): Constify.
13944 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13945 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13946 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13947
995816ba
PA
139482017-04-05 Pedro Alves <palves@redhat.com>
13949
13950 * proc-api.c (struct trans): Constify.
13951 (procfs_note): Constify.
13952 * proc-events.c (struct trans, syscall_table):
13953 * proc-flags.c (struct trans): Constify.
13954 * proc-utils.h (procfs_note): Constify.
13955 * proc-why.c (struct trans): Constify.
13956 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13957 (procfs_detach): Constify.
13958 * sol-thread.c (struct string_map): Constify.
13959 (td_err_string, td_state_string): Constify.
13960
3e83a920
PA
139612017-04-05 Pedro Alves <palves@redhat.com>
13962
13963 * proc-api.c (procfs_filename): Don't initialize
13964 procfs_filename.
13965 (prepare_to_trace): Assume procfs_filename is non-NULL.
13966 (_initialize_proc_api): Give procfs_filename a default value here.
13967
63160a43
PA
139682017-04-05 Pedro Alves <palves@redhat.com>
13969
13970 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13971 'cond_string' parameter.
13972 (extract_exception_regexp): Constify 'string' parameter.
13973 (catch_exception_command_1): Constify.
13974 * breakpoint.c (init_catchpoint)
13975 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13976 parameter.
13977 (ep_parse_optional_if_clause, catch_fork_command_1)
13978 (catch_exec_command_1): Constify.
13979 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13980 parameter.
13981 (ep_parse_optional_if_clause): Constify.
13982 * cli/cli-utils.c (remove_trailing_whitespace)
13983 (check_for_argument): Constify.
13984 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13985 non-const overload.
13986 (check_for_argument): Likewise.
13987
9b2eba3d
PA
139882017-04-05 Pedro Alves <palves@redhat.com>
13989
13990 * event-top.c (command_line_handler): Add cast to execute_command
13991 call.
13992 * record-btrace.c (cmd_record_btrace_bts_start)
13993 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13994 (cmd_record_btrace_start): Add cast to execute_command call.
13995 * record-full.c (record_full_goto_insn):
13996 * record.c (record_start, record_stop): Add cast to
13997 execute_command_to_string calls.
13998 (cmd_record_start): Add cast to execute_command calls.
13999
2adadf51
PA
140002017-04-05 Pedro Alves <palves@redhat.com>
14001
14002 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14003 static inline function.
14004 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14005 array and use gdb_PyArg_ParseTupleAndKeywords.
14006 * python/py-cmd.c (cmdpy_init): Likewise.
14007 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14008 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14009 (infpy_search_memory): Likewise.
14010 * python/py-objfile.c (objfpy_add_separate_debug_file)
14011 (gdbpy_lookup_objfile): Likewise.
14012 * python/py-symbol.c (gdbpy_lookup_symbol)
14013 (gdbpy_lookup_global_symbol): Likewise.
14014 * python/py-type.c (gdbpy_lookup_type): Likewise.
14015 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14016 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14017 Likewise.
14018
0d1f4ceb
PA
140192017-04-05 Pedro Alves <palves@redhat.com>
14020
14021 * python/python-internal.h (gdb_PyGetSetDef): New type.
14022 * python/py-block.c (block_object_getset)
14023 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14024 * python/py-event.c (event_object_getset)
14025 (finish_breakpoint_object_getset): Likewise.
14026 * python/py-inferior.c (inferior_object_getset): Likewise.
14027 * python/py-infthread.c (thread_object_getset): Likewise.
14028 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14029 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14030 * python/py-objfile.c (objfile_getset): Likewise.
14031 * python/py-progspace.c (pspace_getset): Likewise.
14032 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14033 Likewise.
14034 * python/py-record.c (recpy_record_getset): Likewise.
14035 * python/py-symbol.c (symbol_object_getset): Likewise.
14036 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14037 Likewise.
14038 * python/py-type.c (type_object_getset, field_object_getset):
14039 Likewise.
14040 * python/py-value.c (value_object_getset): Likewise.
14041
4d759979
PA
140422017-04-05 Pedro Alves <palves@redhat.com>
14043
14044 * python/python-internal.h (gdb_PyObject_CallMethod)
14045 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14046 New functions.
14047 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14048 (PySys_GetObject, PySys_SetPath): New macros.
14049
fdf9e36f
PA
140502017-04-05 Pedro Alves <palves@redhat.com>
14051
14052 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14053 info_osdata_command.
14054 * osdata.c (info_osdata_command): Rename to ...
14055 (info_osdata): ... this. Constify 'type' parameter, and remove
14056 the 'from_tty' parameter. Accept NULL TYPE.
14057 (info_osdata_command): New function.
14058 * osdata.h (info_osdata_command): Remove declaration.
14059 (info_osdata): New declaration.
14060
9f33b8b7
PA
140612017-04-05 Pedro Alves <palves@redhat.com>
14062
14063 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14064 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14065 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14066 parameter.
14067 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14068 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14069 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14070 parameter.
14071 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14072 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14073 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14074 (mi_cmd_file_list_exec_source_files)
14075 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14076 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14077 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14078 parameter.
14079 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14080 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14081 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14082 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14083 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14084 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14085 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14086 'command' parameter.
14087 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14088 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14089 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14090 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14091 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14092 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14093 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14094 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14095 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14096 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14097 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14098 parameter.
14099 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14100 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14101 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14102 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14103 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14104 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14105 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14106 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14107 (mi_cmd_data_list_changed_registers)
14108 (mi_cmd_data_write_register_values)
14109 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14110 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14111 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14112 (mi_cmd_list_features, mi_cmd_list_target_features)
14113 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14114 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14115 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14116 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14117 (mi_cmd_trace_frame_collected): Constify 'command'
14118 parameter.
14119 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14120 'command' parameter.
14121
67cb5b2d
PA
141222017-04-05 Pedro Alves <palves@redhat.com>
14123
14124 * ada-lang.c (ada_completer_word_break_characters): Now a const
14125 array.
14126 (ada_get_gdb_completer_word_break_characters): Constify.
14127 * completer.c (gdb_completer_command_word_break_characters)
14128 (gdb_completer_file_name_break_characters)
14129 (gdb_completer_quote_characters): Now const arrays.
14130 (get_gdb_completer_quote_characters): Constify.
14131 (set_rl_completer_word_break_characters): New function.
14132 (set_gdb_completion_word_break_characters)
14133 (complete_line_internal): Use it.
14134 * completer.h (get_gdb_completer_quote_characters): Constify.
14135 (set_rl_completer_word_break_characters): Declare.
14136 * f-lang.c (f_word_break_characters): Constify.
14137 * language.c (default_word_break_characters): Constify.
14138 * language.h (language_defn::la_word_break_characters): Constify.
14139 (default_word_break_characters): Constify.
14140 * top.c (init_main): Use set_rl_completer_word_break_characters.
14141
7a114964
PA
141422017-04-05 Pedro Alves <palves@redhat.com>
14143
14144 * aix-thread.c (aix_thread_pid_to_str)
14145 (aix_thread_extra_thread_info): Constify.
14146 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14147 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14148 (bsd_uthread_pid_to_str): Constify.
14149 * corelow.c (core_pid_to_str): Constify.
14150 * darwin-nat.c (darwin_pid_to_str): Constify.
14151 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14152 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14153 Constify.
14154 * gnu-nat.c (gnu_pid_to_str): Constify.
14155 * go32-nat.c (go32_pid_to_str): Constify.
14156 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14157 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14158 * inferior.c (inferior_pid_to_str): Constify.
14159 * linux-nat.c (linux_nat_pid_to_str): Constify.
14160 * linux-tdep.c (linux_core_pid_to_str): Constify.
14161 * linux-thread-db.c (thread_db_pid_to_str)
14162 (thread_db_extra_thread_info): Constify.
14163 * nto-tdep.c (nto_extra_thread_info): Constify.
14164 * nto-tdep.h (nto_extra_thread_info): Constify.
14165 * obsd-nat.c (obsd_pid_to_str): Constify.
14166 * procfs.c (procfs_pid_to_str): Constify.
14167 * ravenscar-thread.c (ravenscar_extra_thread_info)
14168 (ravenscar_pid_to_str): Constify.
14169 * remote-sim.c (gdbsim_pid_to_str): Constify.
14170 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14171 Constify.
14172 * sol-thread.c (solaris_pid_to_str): Constify.
14173 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14174 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14175 * target.c (default_pid_to_str, target_pid_to_str)
14176 (normal_pid_to_str, default_pid_to_str): Constify.
14177 * target.h (target_ops::to_pid_to_str)
14178 (target_ops::to_extra_thread_info): Constify.
14179 (target_pid_to_str, normal_pid_to_str): Constify.
14180 * windows-nat.c (windows_pid_to_str): Constify.
14181 * gdbarch.sh (core_pid_to_str): Constify.
14182 * target-delegates.c: Regenerate.
14183 * gdbarch.h, gdbarch.c: Regenerate.
14184
69bbf465
PA
141852017-04-05 Pedro Alves <palves@redhat.com>
14186
14187 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14188 the memory of the temporary warning_pre_print override.
14189 * utils.c (warning_pre_print): Constify.
14190 * utils.h (warning_pre_print): Constify.
14191
be47f9e8
PA
141922017-04-05 Pedro Alves <palves@redhat.com>
14193
14194 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14195 (shell_command): New function.
14196 (make_command): Use std::string.
14197 (init_cli_cmds): Register shell_command instead of shell_escape.
14198
bde6261a
PA
141992017-04-05 Pedro Alves <palves@redhat.com>
14200
14201 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14202 * tracepoint.c (default_collect): Don't initialize.
14203
b38ef47f
PA
142042017-04-05 Pedro Alves <palves@redhat.com>
14205
14206 * macroexp.c (macro_buffer::shared): Now a bool.
14207 (init_buffer): Update.
14208 (init_shared_buffer): Constify 'addr' parameter.
14209 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14210 casts.
14211
f995bbe8
PA
142122017-04-05 Pedro Alves <palves@redhat.com>
14213
14214 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14215 * disasm.c (set_disassembler_options): Constify local.
14216 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14217
4a596fe2
SDJ
142182017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14219
14220 PR gdb/21352
14221 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14222 option.
14223
2cad08ea
YQ
142242017-04-05 Yao Qi <yao.qi@linaro.org>
14225
14226 * frame.c (frame_unwind_register_unsigned): Call
14227 frame_unwind_register_value.
14228
55a98976
YQ
142292017-04-05 Yao Qi <yao.qi@linaro.org>
14230
14231 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14232 Use gdb_test_multiple, and don't match anchor.
14233
4ac40124
PA
142342017-04-05 Pedro Alves <palves@redhat.com>
14235
14236 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14237 (Write After Approval): Remove Simon Marchi.
14238
c053b654
PA
142392017-04-05 Pedro Alves <palves@redhat.com>
14240
14241 * common/gdb_optional.h (optional::optional): Make constexpr and
14242 initialize m_dummy.
14243
4c7bf4f9
JB
142442017-04-04 John Baldwin <jhb@FreeBSD.org>
14245
14246 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14247 (amd64fbsd_jmp_buf_reg_offset): Remove.
14248 (amd64fbsd_supply_uthread): Remove function.
14249 (amd64fbsd_collect_uthread): Remove function.
14250 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14251 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14252 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14253 (fbsd-nat.c): Update comment.
14254 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14255 (i386fbsd_jmp_buf_reg_offset): Remove.
14256 (i386fbsd_supply_uthread): Remove function.
14257 (i386fbsd_collect_uthread): Remove function.
14258 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14259
1e1a8bef
JB
142602017-04-04 John Baldwin <jhb@FreeBSD.org>
14261
14262 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14263 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14264 * NEWS: Mention that support for FreeBSD/alpha was removed.
14265 * alpha-fbsd-tdep.c: Delete file.
14266 * config/alpha/fbsd.mh: Delete file.
14267 * configure.host: Delete alpha*-*-freebsd* and
14268 alpha*-*-kfreebsd*-gnu.
14269 * configure.tgt: Delete alpha*-*-freebsd* and
14270 alpha*-*-kfreebsd*-gnu.
14271
49907934
JB
142722017-04-04 John Baldwin <jhb@FreeBSD.org>
14273
14274 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14275 amd64bsd_store_inferior_registers): Use ptid from regcache.
14276
6f77053d
PA
142772017-04-04 Pedro Alves <palves@redhat.com>
14278
14279 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14280 data fields, make them private and add "m_" prefixes.
14281 (lnp_state_machine::lnp_state_machine): New ctor.
14282 (record_line, check_line_address, handle_set_discriminator)
14283 (handle_set_address, handle_advance_pc, handle_special_opcode)
14284 (handle_advance_line, handle_set_file, handle_negate_stmt)
14285 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14286 (end_sequence, advance_line): New methods.
14287 (m_gdbarch, m_record_lines_p): New fields.
14288 (lnp_reader_state): Delete.
14289 (dwarf_record_line): Rename to ...
14290 (lnp_state_machine::record_line): ... adjust.
14291 (init_lnp_state_machine): Delete.
14292 (lnp_state_machine::lnp_state_machine): New.
14293 (check_line_address): Rename to ...
14294 (lnp_state_machine::check_line_address): This.
14295 (dwarf_decode_lines_1): Remove reference to "reader_state".
14296 Adjust lnp_state_machine having a non-default ctor. Use bool.
14297 State machine internal state manipulation moved to
14298 lnp_state_machine methods.
14299
9c541725
PA
143002017-04-04 Pedro Alves <palves@redhat.com>
14301
14302 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14303 unittests/offset-type-selftests.c.
14304 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14305 * common/offset-type.h: New file.
14306 * common/preprocessor.h: New file.
14307 * common/traits.h: New file.
14308 * common/valid-expr.h: New file.
14309 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14310 sect_offset and cu_offset strong typedefs throughout.
14311 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14312 typedefs throughout.
14313 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14314 sect_offset and cu_offset strong typedefs throughout.
14315 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14316 typedefs throughout.
14317 * gdbtypes.h: Include "common/offset-type.h".
14318 (cu_offset): Now an offset type (strong typedef) instead of a
14319 struct.
14320 (sect_offset): Likewise.
14321 (union call_site_parameter_u): Rename "param_offset" field to
14322 "param_cu_off".
14323 * unittests/offset-type-selftests.c: New file.
14324
ecfb656c
PA
143252017-04-04 Pedro Alves <palves@redhat.com>
14326
14327 * common/underlying.h: New file.
14328 * dwarf2read.c: Include "common/gdb_optional.h" and
14329 "common/underlying.h".
14330 (dir_index, file_name_index): New types.
14331 (file_entry): Use them.
14332 (file_entry::include): Use to_underlying.
14333 (line_header::add_file_name): Use dir_index.
14334 (read_formatted_entries): Use gdb::optional. Read form before
14335 writting to file_entry.
14336 (dwarf_decode_line_header): Use dir_index.
14337 (lnp_state_machine::current_file): Use to_underlying.
14338 (lnp_state_machine::file): Change type to file_name_index.
14339 (dwarf_record_line): Use to_underlying.
14340 (init_lnp_state_machine): Use file_name_index.
14341 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14342
d194f1fe
PA
143432017-04-04 Pedro Alves <palves@redhat.com>
14344
14345 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14346 operator bool, has_value and get methods.
14347
fff8551c
PA
143482017-04-04 Pedro Alves <palves@redhat.com>
14349
14350 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14351 fields.
14352 (line_header): Initialize all data fields. Change type of
14353 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14354 Change type of include_dirs to std::vector<const char *>. Remove
14355 num_include_dirs, include_dirs_size. Change type of file_names to
14356 std::vector<file_entry>. Remove num_file_names, file_names_size.
14357 (line_header::line_header): New.
14358 (line_header::add_include_dir, line_header::add_file_name): New
14359 methods.
14360 (line_header::include_dir_at): Remove NULL check.
14361 (line_header::file_name_at): Add const overload.
14362 (line_header_up): New unique_ptr typedef.
14363 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14364 std::vector. Remove free_line_header call.
14365 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14366 free_line_header call.
14367 (free_cu_line_header): Delete.
14368 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14369 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14370 Adjust to use std::vector.
14371 (free_line_header): Delete.
14372 (free_line_header_voidp): Use delete.
14373 (add_include_dir): Replace with ...
14374 (line_header::add_include_dir): ... this method. Use std::vector.
14375 (add_file_name): Replace with ...
14376 (line_header::add_file_name): ... this method. Use std::vector.
14377 (add_include_dir_stub): Delete.
14378 (read_formatted_entries): Remove memset.
14379 (dwarf_decode_line_header): Return a line_header_up instead of a
14380 raw pointer. Remove cleanup handling. Pass lambdas to
14381 read_formatted_entries. Adjust to use line_header methods.
14382 (dwarf_decode_lines_1): Adjust to use line_header methods.
14383 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14384 use std::vector.
14385
d62a8ae2
SM
143862017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14387
14388 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14389 instead of struct ptid.
14390
db3a1dc7
AH
143912017-05-04 Alan Hayward <alan.hayward@arm.com>
14392
14393 * frame.c (get_frame_register_bytes): Unwind using value.
14394 (put_frame_register_bytes): Likewise.
14395
b1b45502
IB
143962017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14397
14398 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14399 aggregate-like.
14400
ec13808e
JK
144012017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14402
14403 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14404
12316564
YQ
144052017-03-29 Yao Qi <yao.qi@linaro.org>
14406
14407 * gdbthread.h (struct thread_info): Declare constructor and
14408 destructor. Add some in-class member initializers.
14409 * thread.c (free_thread): Remove.
14410 (init_thread_list): Call delete instead of free_thread.
14411 (new_thread): Call thread_info constructor.
14412 (thread_info::thread_info): New function.
14413 (thread_info::~thread_info): New function.
14414 (delete_thread_1): Call delete instead of free_thread.
14415 (make_cleanup_restore_current_thread): Move tp and frame to
14416 inner block.
14417
fe5f7374
AK
144182017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14419
14420 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14421 (arc_skip_prologue): Likewise.
14422 (arc_make_frame_cache): Likewise.
14423 (arc_pv_get_operand): New function.
14424 (arc_is_in_prologue): Likewise.
14425 (arc_analyze_prologue): Likewise.
14426 (arc_print_frame_cache): Likewise.
14427 (MAX_PROLOGUE_LENGTH): New constant.
14428
eea78757
AK
144292017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14430
14431 * configure.tgt: Add arc-insn.o.
14432 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14433 (dump_arc_instruction_command): New function.
14434 (arc_fprintf_disasm): Likewise.
14435 (arc_disassemble_info): Likewise.
14436 (arc_insn_get_operand_value): Likewise.
14437 (arc_insn_get_operand_value_signed): Likewise.
14438 (arc_insn_get_memory_base_reg): Likewise.
14439 (arc_insn_get_memory_offset): Likewise.
14440 (arc_insn_get_branch_target): Likewise.
14441 (arc_insn_dump): Likewise.
14442 (arc_insn_get_linear_next_pc): Likewise.
14443 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14444 (arc_disassemble_info): Likewise.
14445 (arc_insn_get_branch_target): Likewise.
14446 (arc_insn_get_linear_next_pc): Likewise.
14447 * NEWS: Mention new "maint print arc arc-instruction".
14448
3be78afd
AK
144492017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14450
14451 * arc-tdep (maintenance_print_arc_list): New variable.
14452 (maintenance_print_arc_command): New function.
14453
296ec4fa
AK
144542017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14455
14456 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14457 Add "limm" and "reserved".
14458 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14459 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14460 * arc-tdep.h (arc_regnum): Likewise.
14461
f74f865e
MF
144622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14463
14464 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14465 for THREADPTR register.
14466 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14467 register.
14468 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14469 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14470 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14471
0d0bf81a
MF
144722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14473
14474 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14475 registers above gdbarch_num_regs (gdbarch) as privileged in
14476 call0 ABI.
14477
0ce4291e
MF
144782017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14479
14480 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14481 for a single specified register or for all registers in
14482 a0_base..a0_base + C0_NREGS range.
14483 (supply_gregset_reg): Call regcache_raw_supply for a single
14484 specified register or for all registers in a0_base..a0_base +
14485 C0_NREGS range.
14486
c56054f9
MF
144872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14488
14489 * arch/xtensa.h (C0_NREGS): Add definition.
14490 * xtensa-tdep.c (C0_NREGS): Remove definition.
14491
a4398628
MF
144922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14493
14494 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14495 Drop xtensa_default_isa initialization.
14496 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14497
8c43009f
PA
144982017-03-27 Pedro Alves <palves@redhat.com>
14499
14500 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14501 (file_entry::include_dir): New method.
14502 (line_header::include_dir_at, line_header::file_name_at): New
14503 methods.
14504 (setup_type_unit_groups, setup_type_unit_groups)
14505 (psymtab_include_file_name): Simplify using the new methods.
14506 (lnp_state_machine) <the_line_header>: New field.
14507 <file>: Add comment.
14508 (lnp_state_machine::current_file): New method.
14509 (dwarf_record_line): Simplify using the new methods.
14510 (init_lnp_state_machine): Initialize the "the_line_header" field.
14511 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14512 Simplify using the new methods.
14513
a7e80b9e
PA
145142017-03-27 Pedro Alves <palves@redhat.com>
14515
14516 * cp-name-parser.y (make_empty): Delete.
14517 (demangler_special, nested_name, ptr_operator, array_indicator)
14518 (direct_declarator, declarator_1): Use fill_comp instead of
14519 make_empty.
14520
21047726
PA
145212017-03-27 Pedro Alves <palves@redhat.com>
14522
14523 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14524 to ATTRIBUTE_PRINTF.
14525 * solib-target.c (library_list_start_list): Print "string" not
14526 "version".
14527 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14528 gdb_xml_error call.
14529
d721ba37
PA
145302017-03-27 Pedro Alves <palves@redhat.com>
14531
14532 * dwarf2read.c (struct file_and_directory): New.
14533 (dwarf2_get_dwz_file): Adjust to use std::string.
14534 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14535 (find_file_and_directory): Adjust to return a file_and_directory
14536 object.
14537 (read_file_scope): Adjust to use file_and_directory. Remove
14538 make_cleanup/do_cleanups calls.
14539 (open_and_init_dwp_file): Adjust to use std::string. Remove
14540 make_cleanup/do_cleanups calls.
14541 * python/python.c (do_start_initialization): Adjust to ldirname
14542 returning a std::string.
14543 * utils.c (ldirname): Now returns a std::string.
14544 * utils.h (ldirname): Change return type to std::string.
14545 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14546 returning a std::string.
14547 * xml-tdesc.c (file_read_description_xml): Likewise.
14548
ed771251
AH
145492017-03-24 Alan Hayward <alan.hayward@arm.com>
14550
14551 * regcache.c (regcache_debug_print_register): New function.
14552 * regcache.h (regcache_debug_print_register): New declaration.
14553 * target.c (debug_print_register): Remove.
14554 (target_fetch_registers): Call regcache_debug_print_register.
14555 (target_store_registers): Likewise.
14556
568c1b9f
PB
145572017-03-24 Pádraig Brady <pbrady@fb.com>
14558
14559 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14560 reference beyond the 'lh->include_dirs' array before accessing to
14561 it.
14562 (psymtab_include_file_name): Likewise.
14563 (dwarf_decode_lines_1): Likewise.
14564 (dwarf_decode_lines): Likewise.
14565 (file_file_name): Likewise.
14566
3e00d44f
SM
145672017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14568
14569 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14570 inferior_ptid.
14571 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14572 ps_lsetfpregs): Likewise.
14573 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14574 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14575 ps_lsetfpregs): Likewise.
14576 * target.c (target_fetch_registers, target_store_registers):
14577 Remove asserts.
14578
077ae656
AH
145792017-03-23 Alan Hayward <alan.hayward@arm.com>
14580
14581 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14582
1e2b521d
YQ
145832017-03-23 Yao Qi <yao.qi@linaro.org>
14584
14585 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14586 (_initialize_aarch64_tdep): Register it.
14587 (aarch64_record_load_store): Handle PRFM instruction.
14588 (aarch64_process_record_test): New function.
14589
33877125
YQ
145902017-03-23 Yao Qi <yao.qi@linaro.org>
14591
14592 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14593 indentation.
14594
a0eef940
YQ
145952017-03-23 Yao Qi <yao.qi@linaro.org>
14596
14597 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14598
3f2a3564
PR
145992017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14600
14601 python/python.c (do_start_initialization): Fix memory leak.
14602
b67aeab0
SM
146032017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14604
14605 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14606 using get_ptrace_pid.
14607 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14608 inferior_ptid.
14609 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14610 inferior_ptid instead of pid.
14611
ffdbe864
YQ
146122017-03-22 Yao Qi <yao.qi@linaro.org>
14613
14614 * aarch64-tdep.c: Wrap locally used classes in anonymous
14615 namespace.
14616 * arm-tdep.c: Likewise.
14617 * linespec.c: Likewise.
14618 * ui-out.c: Likewise.
14619
9d736fbf
JG
146202017-03-22 Jonah Graham <jonah@kichwacoders.com>
14621
14622 PR gdb/19637
14623 * python/lib/gdb/printer/bound_registers.py: Import sys.
14624
3de88e9a
SM
146252017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14626
14627 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14628 windows_thread_info parameter and use it instead of
14629 current_thread.
14630 (windows_fetch_inferior_registers): Don't set current_thread,
14631 pass the thread to do_windows_fetch_inferior_registers. Use
14632 ptid from regcache instead of inferior_ptid.
14633 (do_windows_store_inferior_registers): Add windows_thread_info
14634 parameter and use it instead of current_thread.
14635 (windows_store_inferior_registers): Don't set current_thread,
14636 pass the thread to do_windows_store_inferior_registers. Use
14637 ptid from regcache instead of inferior_ptid.
14638
0e7b8f61
SM
146392017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14640
14641 * ser-mingw.c (ser_windows_raw): Remove reference to
14642 struct serial::current_timeout.
14643
5badf10a
IR
146442017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14645
14646 PR tdep/20928
14647 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14648 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14649 (sparc64_fsr_type): Fix %fsr decoding.
14650
cee59b3f
TW
146512017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14652
14653 * python/py-record-btrace.c (btpy_insn_data): Change return type
14654 for Python 2.
14655
639a9038
SM
146562017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14657
14658 * spu-linux-nat.c (spu_fetch_inferior_registers,
14659 spu_store_inferior_registers): Use ptid from regcache, set and
14660 restore inferior_ptid.
14661 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14662 Likewise.
14663
bcc0c096
SM
146642017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14665
14666 * i386-linux-nat.c (fetch_register, store_register,
14667 i386_linux_fetch_inferior_registers,
14668 i386_linux_store_inferior_registers): Use ptid from regcache.
14669 * ia64-linux-nat.c (ia64_linux_fetch_register,
14670 ia64_linux_store_register): Likewise.
14671 * inf-ptrace.c (inf_ptrace_fetch_register,
14672 inf_ptrace_store_register): Likewise.
14673 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14674 m32r_linux_store_inferior_registers): Likewise.
14675 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14676 m68kbsd_store_inferior_registers): Likewise.
14677 * m68k-linux-nat.c (fetch_register, store_register,
14678 m68k_linux_fetch_inferior_registers,
14679 m68k_linux_store_inferior_registers): Likewise.
14680 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14681 m88kbsd_store_inferior_registers): Likewise.
14682 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14683 mips_fbsd_store_inferior_registers): Likewise.
14684 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14685 mips64_linux_regsets_store_registers): Likewise.
14686 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14687 mipsnbsd_store_inferior_registers): Likewise.
14688 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14689 mips64obsd_store_inferior_registers): Likewise.
14690 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14691 Likewise.
14692 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14693 ppcfbsd_store_inferior_registers): Likewise.
14694 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14695 ppc_linux_store_inferior_registers): Likewise.
14696 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14697 ppcnbsd_store_inferior_registers): Likewise.
14698 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14699 ppcobsd_store_registers): Likewise.
14700 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14701 Likewise.
14702 * ravenscar-thread.c (ravenscar_fetch_registers,
14703 ravenscar_store_registers, ravenscar_prepare_to_store):
14704 Likewise.
14705 * record-btrace.c (record_btrace_fetch_registers,
14706 record_btrace_store_registers, record_btrace_prepare_to_store):
14707 Likewise.
14708 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14709 Lookup inferior using ptid from regcache, instead of
14710 current_inferior.
14711 * remote.c (remote_fetch_registers, remote_store_registers): Use
14712 ptid from regcache.
14713 * rs6000-nat.c (fetch_register, store_register): Likewise.
14714 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14715 s390_linux_store_inferior_registers): Likewise.
14716 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14717 shnbsd_store_inferior_registers): Likewise.
14718 * sol-thread.c (sol_thread_fetch_registers,
14719 sol_thread_store_registers): Likewise.
14720 * sparc-nat.c (sparc_fetch_inferior_registers,
14721 sparc_store_inferior_registers): Likewise.
14722 * tilegx-linux-nat.c (fetch_inferior_registers,
14723 store_inferior_registers): Likewise.
14724 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14725 vaxbsd_store_inferior_registers): Likewise.
14726 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14727 store_xtregs): Likewise.
14728
c0f55cc6
AV
147292017-03-20 Artemiy Volkov <artemiyv@acm.org>
14730
14731 PR gdb/14441
14732 * NEWS: Mention support for rvalue references in GDB and python.
14733 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14734 supports both lvalue and rvalue references.
14735
15c0a2a9
AV
147362017-03-20 Artemiy Volkov <artemiyv@acm.org>
14737
14738 PR gdb/14441
14739 * gdbtypes.c (rank_one_type): Implement overloading
14740 resolution rules regarding rvalue references.
14741
aa006118
AV
147422017-03-20 Artemiy Volkov <artemiyv@acm.org>
14743
14744 PR gdb/14441
14745 * aarch64-tdep.c (aarch64_type_align)
14746 (aarch64_extract_return_value, aarch64_store_return_value): Change
14747 lvalue reference type checks to general reference type checks.
14748 * amd64-tdep.c (amd64_classify): Likewise.
14749 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14750 Likewise.
14751 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14752 (arm_store_return_value): Likewise.
14753 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14754 * c-typeprint.c (c_print_type): Likewise.
14755 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14756 (cplus_number_of_children, cplus_describe_child): Likewise.
14757 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14758 * completer.c (expression_completer): Likewise.
14759 * cp-support.c (make_symbol_overload_list_adl_namespace):
14760 Likewise.
14761 * darwin-nat-info.c (info_mach_region_command): Likewise.
14762 * dwarf2loc.c (entry_data_value_coerce_ref)
14763 (value_of_dwarf_reg_entry): Likewise.
14764 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14765 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14766 Likewise.
14767 * findvar.c (extract_typed_address, store_typed_address):
14768 Likewise.
14769 * gdbtypes.c (rank_one_type): Likewise.
14770 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14771 * infcall.c (value_arg_coerce): Likewise.
14772 * language.c (pointer_type): Likewise.
14773 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14774 Likewise.
14775 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14776 * mn10300-tdep.c (mn10300_type_align): Likewise.
14777 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14778 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14779 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14780 Likewise.
14781 * printcmd.c (print_formatted, x_command): Likewise.
14782 * python/py-type.c (typy_get_composite, typy_template_argument):
14783 Likewise.
14784 * python/py-value.c (valpy_referenced_value)
14785 (valpy_get_dynamic_type, value_has_field): Likewise.
14786 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14787 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14788 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14789 * spu-tdep.c (spu_scalar_value_p): Likewise.
14790 * symtab.c (lookup_symbol_aux): Likewise.
14791 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14792 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14793 Likewise.
14794 * valops.c (value_cast_pointers, value_cast)
14795 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14796 (value_struct_elt, value_struct_elt_bitpos)
14797 (value_find_oload_method_list, find_overload_match)
14798 (value_rtti_indirect_type): Likewise.
14799 * valprint.c (val_print_scalar_type_p, generic_val_print):
14800 Likewise.
14801 * value.c (value_actual_type, value_as_address, unpack_long)
14802 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14803 (coerce_ref): Likewise.
14804 * varobj.c (varobj_get_value_type): Likewise.
14805
3fcf899d
AV
148062017-03-20 Artemiy Volkov <artemiyv@acm.org>
14807
14808 PR gdb/14441
14809 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14810 table of constants.
14811 * python/lib/gdb/command/explore.py: Support exploring values
14812 of rvalue reference types.
14813 * python/lib/gdb/types.py: Implement get_basic_type() for
14814 rvalue reference types.
14815 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14816 constant.
14817 * python/py-value.c (valpy_getitem): Add an rvalue reference
14818 check.
14819 (valpy_reference_value): Add new parameter "refcode".
14820 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14821 New wrappers for valpy_reference_value().
14822 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14823 (gdbpy_invoke_xmethod): Likewise.
14824
4297a3f0
AV
148252017-03-20 Artemiy Volkov <artemiyv@acm.org>
14826
14827 PR gdb/14441
14828 * dwarf2read.c (process_die, read_type_die_1): Handle the
14829 DW_TAG_rvalue_reference_type DIE.
14830 (read_tag_reference_type): Add new parameter "refcode".
14831
e1cb3213
AV
148322017-03-20 Artemiy Volkov <artemiyv@acm.org>
14833
14834 PR gdb/14441
14835 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14836 (c_type_print_modifier, c_type_print_varspec_suffix)
14837 (c_type_print_base): Support printing rvalue reference types.
14838 * c-valprint.c (c_val_print, c_value_print): Support printing
14839 rvalue reference values.
14840
e4347c89
AV
148412017-03-20 Artemiy Volkov <artemiyv@acm.org>
14842
14843 PR gdb/14441
14844 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14845 typename.
14846 * cp-support.c (replace_typedefs): Handle
14847 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14848 * python/py-type.c (typy_lookup_type): Likewise.
14849
53cc15f5
AV
148502017-03-20 Artemiy Volkov <artemiyv@acm.org>
14851
14852 PR gdb/14441
14853 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14854 * parse.c (insert_type): Change assert statement.
14855 (follow_types): Handle rvalue reference types.
14856 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14857 constant.
14858
a65cfae5
AV
148592017-03-20 Artemiy Volkov <artemiyv@acm.org>
14860
14861 PR gdb/14441
14862 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14863 value_ref() interface.
14864 * c-valprint.c (c_value_print): Likewise.
14865 * infcall.c (value_arg_coerce): Likewise.
14866 * python/py-value.c (valpy_reference_value): Likewise.
14867 * valops.c (value_cast, value_reinterpret_cast)
14868 (value_dynamic_cast, typecmp): Likewise.
14869 (value_ref): Parameterize by kind of return value reference type.
14870 * value.h (value_ref): Add new parameter "refcode".
14871
3b224330
AV
148722017-03-20 Artemiy Volkov <artemiyv@acm.org>
14873
14874 PR gdb/14441
14875 * dwarf2read.c (read_tag_reference_type): Use
14876 lookup_lvalue_reference_type() instead of lookup_reference_type().
14877 * eval.c (evaluate_subexp_standard): Likewise.
14878 * f-exp.y: Likewise.
14879 * gdbtypes.c (make_reference_type, lookup_reference_type):
14880 Generalize with rvalue reference types.
14881 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14882 convenience wrappers for lookup_reference_type().
14883 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14884 reference kind parameter.
14885 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14886 wrappers for lookup_reference_type().
14887 * guile/scm-type.c (gdbscm_type_reference): Use
14888 lookup_lvalue_reference_type() instead of lookup_reference_type().
14889 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14890 * parse.c (follow_types): Likewise.
14891 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14892 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14893 Likewise.
14894 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14895 (gdbpy_invoke_xmethod): Likewise.
14896 * stabsread.c: Provide extra argument to make_reference_type()
14897 call.
14898 * valops.c (value_ref, value_rtti_indirect_type): Use
14899 lookup_lvalue_reference_type() instead of lookup_reference_type().
14900
f9aeb8d4
AV
149012017-03-20 Artemiy Volkov <artemiyv@acm.org>
14902
14903 PR gdb/14441
14904 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14905 (TYPE_IS_REFERENCE): New macro.
14906 (struct type): Add rvalue_reference_type field.
14907 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14908
51457a05
MAL
149092017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14910
14911 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14912 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14913 New function definition.
14914 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14915 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14916 New function declaration.
14917 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14918 * mi/mi-interp.h: New file.
14919 * solib.c (info_sharedlibrary_command): Replace for loop with
14920 ALL_SO_LIBS macro
14921 * solib.h (update_solib_list): New function declaration.
14922 (so_list_head): Move macro.
14923 * solist.h (ALL_SO_LIBS): New macro.
14924
e696b3ad
MAL
149252017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14926
14927 * infcmd.c (post_create_inferior): Remove unused argument in
14928 call to solib_add.
14929 * remote.c (remote_start_remote): Likewise.
14930 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14931 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14932 (enable_break): Likewise.
14933 * solib.c (update_solib_list): Remove unused target argument
14934 and its documentation.
14935 (solib_add): Remove unused target argument. Remove unused
14936 argument in call to update_solib_list.
14937 (info_sharedlibrary_command): Remove unused argument in call
14938 to update_solib_list.
14939 (sharedlibrary_command): Remove unused argument in call to
14940 solib_add.
14941 (handle_solib_event): Likewise.
14942 (reload_shared_libraries): Likewise.
14943 * solib.h (solib_add): Remove unused target argument.
14944
dcb84eda
AA
149452017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14946
14947 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14948 (s390_displaced_step_fixup): Cover relative branches with the
14949 default fixup handling. This fixes lack of support for some
14950 relative branch instructions.
14951
d9cb6cdc
SM
149522017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14953
14954 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14955 ptid from regcache.
14956
1afaf9f4
SM
149572017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14958
14959 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14960 i386_darwin_store_inferior_registers): Use ptid from regcache.
14961
aac12e24
SM
149622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14963
14964 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14965 i386bsd_store_inferior_registers): Use ptid from regcache.
14966
bbe1eef1
SM
149672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14968
14969 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14970 hppaobsd_store_registers): Use ptid from regcache.
14971
10799020
SM
149722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14973
14974 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14975 hppanbsd_store_registers): Use ptid from regcache.
14976
00204cf7
SM
149772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14978
14979 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14980 from regcache. Use get_ptrace_pid.
14981
11a33714
SM
149822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14983
14984 * corelow.c (get_core_register_section): Use ptid from regcache,
14985 update doc.
14986
317cd492
SM
149872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14988
14989 * bsd-uthread.c (bsd_uthread_fetch_registers,
14990 bsd_uthread_store_registers): Use ptid from regcache, set and
14991 restore inferior_ptid.
14992
9ac8a7c2
SM
149932017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14994
14995 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14996 fetch_fp_regs, store_register, store_regs, store_fp_register,
14997 store_fp_regs): Use ptid from regcache.
14998
4ac4bb6a
SM
149992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15000
15001 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15002 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15003 store_vfp_regs): Use ptid from regcache.
15004
9bcbdca8
PA
150052017-03-17 Pedro Alves <palves@redhat.com>
15006
15007 PR remote/21188
15008 * ser-base.c (ser_base_wait_for): Add comment.
15009 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15010 version.
15011 * ser-unix.c (hardwire_raw): Remove reference to
15012 scb->current_timeout.
15013 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15014 (hardwire_ops): Install ser_base_readchar instead of
15015 hardwire_readchar.
15016 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15017 Remove fields.
15018
7503099f
JG
150192017-03-17 Jonah Graham <jonah@kichwacoders.com>
15020
15021 PR gdb/19637
15022 * python/lib/gdb/printer/bound_registers.py: Add support for
15023 Python 3.
15024
7942e96e
AA
150252017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15026
15027 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15028 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15029 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15030 byte_offset to subobj_byte_offset. Fix the handling of
15031 DWARF_VALUE_STACK on big-endian targets when coming via an
15032 implicit pointer.
15033 (dwarf2_evaluate_loc_desc): Adjust call to
15034 dwarf2_evaluate_loc_desc_full.
15035 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15036 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15037
ba14f379
YQ
150382017-03-16 Yao Qi <yao.qi@linaro.org>
15039
15040 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15041 and REVSH instructions.
15042
b121eeb9
YQ
150432017-03-16 Yao Qi <yao.qi@linaro.org>
15044
15045 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15046 (arm_record_test): Declare.
15047 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15048 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15049 align with the manual.
15050 (thumb_record_misc): Adjust the code order to align with the
15051 manual.
15052 (thumb2_record_decode_insn_handler): Fix instruction matching.
15053 (instruction_reader_thumb): New class.
15054 (arm_record_test): New function.
15055
728a7913
YQ
150562017-03-16 Yao Qi <yao.qi@linaro.org>
15057
15058 * arm-tdep.c (abstract_memory_reader): New class.
15059 (instruction_reader): New class.
15060 (extract_arm_insn): Add argument 'reader'. Callers updated.
15061 (decode_insn): Likewise.
15062
34b43320
DE
150632017-03-16 Doug Evans <dje@google.com>
15064
a7c0469f
DE
15065 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15066 member. Change type of TYPE member to SCM. All uses updated.
15067 (lsscm_make_lazy_string_smob): Add assert.
15068 (lsscm_make_lazy_string): Flag bad length values.
15069 (lsscm_elt_type): New function.
15070 (gdbscm_lazy_string_to_value): Rewrite to use
15071 lsscm_safe_lazy_string_to_value.
15072 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15073 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15074 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15075 in incoming type.
15076 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15077 * guile/scm-type.c (tyscm_scm_to_type): New function.
15078
150792017-03-15 Doug Evans <dje@google.com>
15080
34b43320
DE
15081 PR python/17728, python/18439, python/18779
15082 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15083 member. Change type of TYPE member to PyObject *. All uses updated.
15084 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15085 (gdbpy_create_lazy_string_object): Flag bad length values.
15086 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15087 Handle typedefs in incoming type.
15088 (stpy_lazy_string_elt_type): New function.
15089 (gdbpy_extract_lazy_string): Call it.
15090 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15091 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15092 typedefs in incoming type.
15093
a3a5fecc
DE
150942017-03-16 Doug Evans <dje@google.com>
15095
15096 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15097 * guile/scm-type.c (tyscm_scm_to_type): New function.
15098
28f1c605
JW
150992017-03-16 Jiong Wang <jiong.wang@arm.com>
15100
15101 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15102 "ULONGEST" for "skip".
15103
87c336f6
AA
151042017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15105
15106 PR gdb/21220
15107 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15108 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15109 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15110 over ptrace peek/poke until end of buffer or error.
15111
cf81cf60
SM
151122017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15113
15114 * parse.c (length_of_subexp): Make static.
15115 * parser-defs.h (length_of_subexp): Remove.
15116
a379284a
AA
151172017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15118
15119 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15120 as well.
15121
8a6200ba
PA
151222017-03-14 Pedro Alves <palves@redhat.com>
15123
15124 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15125 (main): Use std::unique_ptr. Remove calls to
15126 cp_demangled_name_parse_free.
15127
f79ec206
SM
151282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15129
15130 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15131 alphabsd_store_inferior_registers): Use regcache->ptid instead
15132 of inferior_ptid.
15133
edb5fb00
SM
151342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15135
15136 * aix-thread.c (aix_thread_fetch_registers,
15137 aix_thread_store_registers): Use regcache->ptid instead of
15138 inferior_ptid.
15139
55119686
SM
151402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15141
15142 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15143 store_gregs_to_thread, fetch_fpregs_from_thread,
15144 store_fpregs_to_thread): Use regcache->ptid instead of
15145 inferior_ptid.
15146
6a06fbb7
SM
151472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15148
15149 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15150 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15151 instead of inferior_ptid.
15152
c6386875
SM
151532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15154
15155 * target.c (target_fetch_registers, target_store_registers): Add
15156 assert.
15157
ddaaf0fb
SM
151582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15159
15160 * regcache.h (regcache_get_ptid): New function.
15161 * regcache.c (regcache_get_ptid): New function.
15162
b9da89d1 151632017-03-13 Mark Wielaard <mark@klomp.org>
15164
15165 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15166
5f4d1085
KS
151672017-03-10 Keith Seitz <keiths@redhat.com>
15168
15169 PR c++/8218
15170 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15171
c65d6b55
PA
151722017-03-08 Pedro Alves <palves@redhat.com>
15173
15174 PR gdb/18360
15175 * infrun.c (start_step_over, do_target_resume, resume)
15176 (restart_threads): Assert we're not resuming a thread that is
15177 meant to be stopped.
15178 (infrun_thread_stop_requested_callback): Delete.
15179 (infrun_thread_stop_requested): If the thread is internally
15180 stopped, queue a pending stop event and clear the thread's
15181 inline-frame state.
15182 (handle_stop_requested): New function.
15183 (handle_syscall_event, handle_inferior_event_1): Use
15184 handle_stop_requested.
15185 (handle_stop_requested): New function.
15186 (handle_signal_stop): Set the thread's stop_signal here instead of
15187 at caller.
15188 (finish_step_over): Clear step over info unconditionally.
15189 (handle_signal_stop): If the user had interrupted the event
15190 thread, consider the stop a random signal.
15191 (handle_signal_stop) <signal arrived while stepping over
15192 breakpoint>: Don't restart threads here.
15193 (stop_waiting): Don't clear step-over info here.
15194
15c22686
PA
151952017-03-08 Pedro Alves <palves@redhat.com>
15196
15197 PR 21206
15198 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15199 goes to argument 2, not 1.
15200
6e5d74e7
PA
152012017-03-08 Pedro Alves <palves@redhat.com>
15202
15203 PR cli/21218
15204 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15205 display_gdb_prompt.
15206 (command_line_input): Add comment.
15207
9753a2f6
PA
152082017-03-08 Pedro Alves <palves@redhat.com>
15209
15210 PR tui/21216
15211 * tui/tui-file.c (tui_file::write): New.
15212 * tui/tui-file.h (tui_file): Override "write".
15213 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15214 factored out from ...
15215 (tui_puts): ... here.
15216 (tui_putc): Use them.
15217 (tui_write): New function.
15218 * tui/tui-io.h (tui_write): Declare.
15219
1672e0d9
SDJ
152202017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15221
15222 * Makefile.in (SFILES): Replace "environ.c" with
15223 "common/environ.c".
15224 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15225 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15226 to...
15227 * common/environ.c: ... here.
15228 * environ.h: Moved to...
15229 * common/environ.h: ... here.
15230
f7bb4e3a
PB
152312017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15232
15233 * gdbarch.sh (pstring_ptr): New static function.
15234 (gdbarch_disassembler_options): Use it.
15235 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15236 not valid_disassembler_option->name.
15237 * gdbarch.c: Regenerate.
15238
e45ced6c
PB
152392017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15240
15241 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15242
5f6fd321
PA
152432017-03-07 Pedro Alves <palves@redhat.com>
15244
15245 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15246
6dbb839a 152472017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15248
15249 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15250 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15251 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15252 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15253
d274ecf4
SM
152542017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15255
15256 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15257
df97be55
SM
152582017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15259
15260 * remote.c (remote_add_target_side_commands): Use range-based
15261 for loop.
15262
7d45f3df
YQ
152632017-03-03 Yao Qi <yao.qi@linaro.org>
15264
15265 PR gdb/21165
15266 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15267 value is lazy.
15268 * valprint.c (common_val_print): Likewise.
15269
65b48a81
PB
152702017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15271
15272 * NEWS: Mention new set/show disassembler-options commands.
15273 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15274 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15275 (prospective_options): New static variable.
15276 (gdb_disassembler::gdb_disassembler): Initialize
15277 m_di.disassembler_options.
15278 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15279 (get_disassembler_options): New function.
15280 (set_disassembler_options): Likewise.
15281 (set_disassembler_options_sfunc): Likewise.
15282 (show_disassembler_options_sfunc): Likewise.
15283 (disassembler_options_completer): Likewise.
15284 (_initialize_disasm): Likewise.
15285 * disasm.h (get_disassembler_options): New prototype.
15286 (set_disassembler_options): Likewise.
15287 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15288 (gdbarch_verify_disassembler_options): Likewise.
15289 * gdbarch.c: Regenerate.
15290 * gdbarch.h: Likewise.
15291 * arm-tdep.c (num_disassembly_options): Delete.
15292 (set_disassembly_style): Likewise.
15293 (arm_disassembler_options): New static variable.
15294 (set_disassembly_style_sfunc): Convert short style name into long
15295 option name. Call set_disassembler_options.
15296 (show_disassembly_style_sfunc): New function.
15297 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15298 set_gdbarch_verify_disassembler_options.
15299 (_initialize_arm_tdep): Delete regnames variable and update callers.
15300 (arm_disassembler_options): Initialize.
15301 (disasm_options): New variable.
15302 (num_disassembly_options): Rename from this...
15303 (num_disassembly_styles): ...to this. Compute by scanning through
15304 disasm_options.
15305 (valid_disassembly_styles): Initialize using disasm_options.
15306 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15307 set_arm_regname_option.
15308 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15309 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15310 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15311 set_gdbarch_verify_disassembler_options.
15312 * s390-tdep.c (s390_disassembler_options): New static variable.
15313 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15314 set_gdbarch_verify_disassembler_options.
15315
d538e36d
SM
153162017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15317
15318 * remote.c (remote_add_target_side_condition): Remove "struct"
15319 keyword from range-based for loop.
15320
83621223
SM
153212017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15322
15323 * remote.c (remote_add_target_side_condition): Use range-based
15324 for loop. Update comment.
15325
2123df0e
YQ
153262017-02-27 Yao Qi <yao.qi@linaro.org>
15327
15328 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15329
8e368124
AH
153302017-02-26 Alan Hayward <alan.hayward@arm.com>
15331
15332 * regcache.c (regcache_raw_update): New function.
15333 (regcache_raw_read): Move code to regcache_raw_update.
15334 * regcache.h (regcache_raw_update): New declaration.
15335 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15336
a49dd8dd
JK
153372017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15338
15339 * dwarf2read.c (create_debug_type_hash_table): Initialize
15340 header.signature and header.type_offset_in_tu.
15341
34e4bae9
PA
153422017-02-24 Pedro Alves <palves@redhat.com>
15343
15344 * symtab.c (make_file_symbol_completion_list_1): Use
15345 add_symtab_completions.
15346
b0e4b369
AH
153472017-02-24 Alan Hayward <alan.hayward@arm.com>
15348
15349 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15350
975c21ab
AH
153512017-02-24 Alan Hayward <alan.hayward@arm.com>
15352
15353 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15354 I386_MAX_REGISTER_SIZE.
15355 (i386_pseudo_register_write): Likewise.
15356 (i386_process_record): Likewise.
15357 * i387-tdep.c (i387_supply_xsave): Likewise.
15358 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15359 (store_register): Likewise.
15360
14bc53a8
PA
153612017-02-23 Pedro Alves <palves@redhat.com>
15362
15363 * ada-lang.c: Include "common/function-view.h".
15364 (ada_iterate_over_symbols): Adjust to use function_view as
15365 callback type.
15366 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15367 (ada_make_symbol_completion_list): Use a lambda.
15368 (ada_exc_search_name_matches): Delete.
15369 (name_matches_regex): New.
15370 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15371 * compile/compile-c-support.c: Include "common/function-view.h".
15372 (print_one_macro): Change prototype to accept a ui_file pointer.
15373 (write_macro_definitions): Use a lambda.
15374 * dwarf2read.c: Include "common/function-view.h".
15375 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15376 (dw2_expand_symtabs_matching): Adjust to use function_view as
15377 callback type.
15378 * language.h: Include "common/function-view.h".
15379 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15380 function_view as callback type.
15381 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15382 * linespec.c: Include "common/function-view.h".
15383 (collect_info::add_symbol): New method.
15384 (struct symbol_and_data_callback, iterate_inline_only, struct
15385 symbol_matcher_data, iterate_name_matcher): Delete.
15386 (iterate_over_all_matching_symtabs): Adjust to use function_view
15387 as callback type and lambdas.
15388 (iterate_over_file_blocks): Adjust to use function_view as
15389 callback type.
15390 (decode_compound_collector): Now a class with private fields.
15391 (decode_compound_collector::release_symbols): New method.
15392 (collect_one_symbol): Rename to...
15393 (decode_compound_collector::operator()): ... this and adjust.
15394 (lookup_prefix_sym): decode_compound_collector construction bits
15395 move to decode_compound_collector ctor. Pass the
15396 decode_compound_collector object directly as callback. Remove
15397 cleanups and use decode_compound_collector::release_symbols
15398 instead.
15399 (symtab_collector): Now a class with private fields.
15400 (symtab_collector::release_symtabs): New method.
15401 (add_symtabs_to_list): Rename to...
15402 (symtab_collector::operator()): ... this and adjust.
15403 (collect_symtabs_from_filename): symtab_collector construction
15404 bits move to symtab_collector ctor. Pass the symtab_collector
15405 object directly as callback. Remove cleanups and use
15406 symtab_collector::release_symtabs instead.
15407 (collect_symbols): Delete.
15408 (add_matching_symbols_to_info): Use lambdas.
15409 * macrocmd.c (print_macro_callback): Delete.
15410 (info_macro_command): Use a lambda.
15411 (info_macros_command): Pass print_macro_definition as callable
15412 directly.
15413 (print_one_macro): Remove 'ignore' parameter.
15414 (macro_list_command): Adjust.
15415 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15416 (macro_for_each_data::user_data): Delete field.
15417 (foreach_macro): Adjust to call the function_view.
15418 (macro_for_each): Adjust to use function_view as callback type.
15419 (foreach_macro_in_scope): Adjust to call the function_view.
15420 (macro_for_each_in_scope): Adjust to use function_view as callback
15421 type.
15422 * macrotab.h: Include "common/function-view.h".
15423 (macro_callback_fn): Declare a prototype instead of a pointer.
15424 Remove "user_data" parameter.
15425 (macro_for_each, macro_for_each_in_scope): Adjust to use
15426 function_view as callback type.
15427 * psymtab.c (partial_map_expand_apply)
15428 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15429 Adjust to use function_view as callback type and to return bool.
15430 (psym_expand_symtabs_matching): Adjust to use function_view as
15431 callback types.
15432 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15433 to use function_view as callback type and to return bool.
15434 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15435 callback types.
15436 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15437 as callback types.
15438 * symfile.h: Include "common/function-view.h".
15439 (expand_symtabs_file_matcher_ftype)
15440 (expand_symtabs_symbol_matcher_ftype)
15441 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15442 return bool.
15443 (quick_symbol_functions::map_symtabs_matching_filename)
15444 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15445 function_view as callback type and return bool.
15446 (expand_symtabs_matching): Adjust to use function_view as callback
15447 type.
15448 (maintenance_expand_name_matcher)
15449 (maintenance_expand_file_matcher): Delete.
15450 (maintenance_expand_symtabs): Use lambdas.
15451 * symtab.c (iterate_over_some_symtabs): Adjust to use
15452 function_view as callback types and return bool.
15453 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15454 of a cleanup.
15455 (lookup_symtab_callback): Delete.
15456 (lookup_symtab): Use a lambda.
15457 (iterate_over_symbols): Adjust to use function_view as callback
15458 type.
15459 (struct search_symbols_data, search_symbols_file_matches)
15460 (search_symbols_name_matches): Delete.
15461 (search_symbols): Use a pair of lambdas.
15462 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15463 (symtab_expansion_callback): Delete.
15464 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15465 * symtab.h: Include "common/function-view.h".
15466 (iterate_over_some_symtabs): Adjust to use function_view as
15467 callback type and return bool.
15468 (iterate_over_symtabs): Adjust to use function_view as callback
15469 type.
15470 (symbol_found_callback_ftype): Remove 'data' parameter and return
15471 bool.
15472 (iterate_over_symbols): Adjust to use function_view as callback
15473 type.
15474
07e253aa
PA
154752017-02-23 Pedro Alves <palves@redhat.com>
15476
15477 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15478 (%.o) <unittests/%.c>: New pattern.
15479 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15480 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15481 * common/function-view.h: New file.
15482 * unittests/function-view-selftests.c: New file.
15483 * configure: Regenerate.
15484
8eaf5320
SM
154852017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15486
15487 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15488 inferior_ptid.
15489 * go32-nat.c (go32_thread_alive): Likewise.
15490
38768751
YQ
154912017-02-23 Yao Qi <yao.qi@linaro.org>
15492
15493 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15494 delete.
15495
0a8beaba
YQ
154962017-02-23 Yao Qi <yao.qi@linaro.org>
15497
15498 * varobj.c (varobj_clear_saved_item): Use delete instead of
15499 xfree.
15500 (update_dynamic_varobj_children): Likewise.
15501
58fdfd2c
JK
155022017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15503
15504 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15505
1b90b139
SM
155062017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15507
15508 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15509 m_enum_value to 0 in default constructor.
15510
2039d74e
EBM
155112017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15512
15513 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15514 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15515 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15516 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15517 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15518 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15519 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15520 IS_STORE_CONDITIONAL_INSN.
15521
7814882a
JK
155222017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15523
15524 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15525
0ae60b63
JK
155262017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15527
15528 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15529
0224619f
JK
155302017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15531
15532 * dwarf2read.c (skip_one_die, read_attribute_value)
15533 (dwarf2_const_value_attr, dump_die_shallow)
15534 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15535 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15536
0af92d60
JK
155372017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15538
15539 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15540 (dwarf_parse_macro_header): Accept DWARF version 5.
15541 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15542
216f72a1
JK
155432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15544
15545 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15546 DW_AT_GNU_*.
15547 * common/common-exceptions.h (enum errors): Likewise.
15548 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15549 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15550 (dwarf_expr_context::execute_stack_op): Likewise.
15551 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15552 Likewise.
15553 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15554 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15555 (show_entry_values_debug, call_site_to_target_addr)
15556 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15557 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15558 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15559 (value_of_dwarf_block_entry, indirect_pieced_value)
15560 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15561 (disassemble_dwarf_expression): Likewise.
15562 * dwarf2read.c (process_die, inherit_abstract_dies)
15563 (read_call_site_scope): Likewise.
15564 * gdbtypes.h (struct func_type, struct call_site_parameter)
15565 (struct call_site): Likewise.
15566 * stack.c (read_frame_arg): Likewise.
15567 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15568
43988095
JK
155692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15570
15571 * defs.h (read_unsigned_leb128): New declaration.
15572 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15573 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15574 (dwarf2_find_location_expression): Call also
15575 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15576 * dwarf2loc.h (dwarf2_version): New declaration.
15577 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15578 rnglists.
15579 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15580 .debug_rnglists.
15581 (struct dwop_section_names): Add loclists_dwo.
15582 (dwop_section_names): Add .debug_loclists.dwo.
15583 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15584 (struct dwarf2_per_cu_data): Add dwarf_version.
15585 (struct dwo_sections): Add loclists.
15586 (struct attr_abbrev): Add implicit_const.
15587 (read_indirect_line_string): New declaration.
15588 (read_unsigned_leb128): Delete declaration.
15589 (rcuh_kind): New definition.
15590 (read_and_check_comp_unit_head): Change parameter
15591 is_debug_types_section to section_kind.
15592 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15593 (read_comp_unit_head): Change parameter abfd to section, add parameter
15594 section_kind. Handle DWARF-5.
15595 (error_check_comp_unit_head): Accept also DWARF version 5.
15596 (read_and_check_comp_unit_head): Change parameter
15597 is_debug_types_section to section_kind.
15598 (read_and_check_type_unit_head): Delete function.
15599 (read_abbrev_offset): Handle DWARF-5.
15600 (create_debug_type_hash_table): Add parameter section_kind. Process
15601 only DW_UT_type. Use signature and type_offset_in_tu from struct
15602 comp_unit_head.
15603 (create_debug_types_hash_table): Update create_debug_type_hash_table
15604 caller.
15605 (create_all_type_units): Call create_debug_type_hash_table.
15606 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15607 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15608 caller.
15609 (skip_one_die): Handle DW_FORM_implicit_const.
15610 (dwarf2_rnglists_process): New function.
15611 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15612 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15613 (read_attribute_value): Handle DW_FORM_implicit_const,
15614 DW_FORM_line_strp.
15615 (read_attribute): Handle DW_FORM_implicit_const.
15616 (read_indirect_string_at_offset_from): New function from
15617 read_indirect_string_at_offset.
15618 (read_indirect_string_at_offset): Call
15619 read_indirect_string_at_offset_from.
15620 (read_indirect_line_string_at_offset): New function.
15621 (read_indirect_string): New function comment.
15622 (read_indirect_line_string): New function.
15623 (read_unsigned_leb128): Make it global.
15624 (dwarf2_string_attr): Handle DWARF-5.
15625 (add_include_dir_stub, read_formatted_entries): New functions.
15626 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15627 Handle DWARF-5.
15628 (per_cu_header_read_in): Update read_comp_unit_head caller.
15629 (dwarf2_version): New function.
15630 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15631 rnglists.
15632 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15633 fields.
15634
22d2f3ab
JK
156352017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15636
15637 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15638
5f46c5a5
JK
156392017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15640
15641 * dwarf2read.c (dwarf2_ranges_process): New function from
15642 dwarf2_ranges_read.
15643 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15644 dwarf2_ranges_process.
15645
78d4d2c5
JK
156462017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15647
15648 * dwarf2read.c (create_debug_type_hash_table): New function from
15649 create_debug_types_hash_table.
15650 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15651 (create_all_type_units, open_and_init_dwo_file): Update
15652 create_debug_types_hash_table callers.
15653
1b076f25
SDJ
156542017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15655
15656 PR gdb/16188
15657 * fork-child.c (trace_start_error): Fix thinko. va_end should
15658 refer to 'ap', not 'args'.
15659
0db8980c
SDJ
156602017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15661 Pedro Alves <palves@redhat.com>
15662
15663 PR gdb/16188
15664 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15665 calls succeeded.
15666 * fork-child.c (trace_start_error): New function.
15667 (trace_start_error_with_name): Likewise.
15668 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15669 * inf-ptrace.c (inf_ptrace_me): Likewise.
15670 * inferior.h (trace_start_error): New prototype.
15671 (trace_start_error_with_name): Likewise.
15672
99e8a4f9
SDJ
156732017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15674
15675 PR gdb/21164
15676 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15677 NULL before using it.
15678 * symmisc.c (maintenance_print_symbols): Likewise.
15679 (maintenance_print_msymbols): Likewise.
15680
4e746bb6
TW
156812017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15682
15683 * NEWS: Add record Python bindings entry.
15684
156852017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15686
15687 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15688 py-record-full.o.
15689 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15690 * python/py-record-btrace.c, python/py-record-btrace.h,
15691 python/py-record-full.c, python/py-record-full.h: New file.
15692 * python/py-record.c: Add include for py-record-btrace.h and
15693 py-record-full.h.
15694 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15695 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15696 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15697 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15698 New definition.
15699 (gdbpy_initialize_btrace): New export.
15700 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15701
157022017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15703
15704 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15705 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15706 * python/py-record.c: New file.
15707 * python/python-internal.h (gdbpy_start_recording,
15708 gdbpy_current_recording, gdpy_stop_recording,
15709 gdbpy_initialize_record): New export.
15710 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15711 (python_GdbMethods): Add gdbpy_start_recording,
15712 gdbpy_current_recording and gdbpy_stop_recording.
15713
157142017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15715
15716 * record-btrace.c (record_btrace_record_method): New function.
15717 (init_record_btrace_ops): Initialize to_record_method.
15718 * record-full.c (record_full_record_method): New function.
15719 (init_record_full_ops, init_record_full_core_ops): Add
15720 record_full_record_method.
15721 * record.h (enum record_method): New enum.
15722 * target-debug.h (target_debug_print_enum_record_method: New define.
15723 * target-delegates.c: Regenerate.
15724 * target.c (target_record_method): New function.
15725 * target.h: Include record.h.
15726 (struct target_ops) <to_record_method>: New field.
15727 (target_record_method): New export.
15728
157292017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15730
15731 * record.h (record_start, record_stop): New export.
15732 * record.c (record_start, record_stop): New function.
15733
157342017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15735
15736 * btrace.c (btrace_fetch): Copy function call segments pointer
15737 into a vector.
15738 (btrace_clear): Clear the vector.
15739 (btrace_find_insn_by_number): Use binary search to find the correct
15740 function call segment.
15741 * btrace.h (brace_fun_p): New typedef.
15742 (struct btrace_thread_info) <functions>: New field.
15743
157442017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15745
15746 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15747 * btrace.c (btrace_decode_error): ... here. New function.
15748 * btrace.h (btrace_decode_error): New export.
15749
157502017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15751
15752 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15753 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15754 btrace_find_insn_by_number): Remove special case for gaps.
15755 * btrace.h (btrace_insn_get_error): New export.
15756 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15757 * record-btrace.c (btrace_insn_history): Print number for gaps.
15758 (record_btrace_info, record_btrace_goto): Handle gaps.
15759
3f77c769
TT
157602017-02-14 Tom Tromey <tom@tromey.com>
15761
15762 PR python/13598:
15763 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15764 event.
15765 * python/py-evts.c (gdbpy_initialize_py_events): Add
15766 before_prompt registry.
15767 * python/py-events.h (events_object) <before_prompt>: New field.
15768
4c2c7ac6
MM
157692017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15770
15771 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15772
5cf30ebf
LM
157732017-02-13 Luis Machado <lgustavo@codesourcery.com>
15774
15775 * symfile (_initialize_symfile): Add usage text to the load command's
15776 help text.
15777
26a06916
SM
157782017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15779
15780 * utils.c (defaulted_query): Don't query on secondary UIs.
15781
0b145e37
TT
157822017-02-10 Tom Tromey <tom@tromey.com>
15783
15784 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15785
2d8365c4
TT
157862017-02-10 Tom Tromey <tom@tromey.com>
15787
15788 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15789 "cleanup" local.
15790 * python/py-type.c (typy_legacy_template_argument): Remove
15791 unnecessary "cleanup" local.
15792
2bb8f231
TT
157932017-02-10 Tom Tromey <tom@tromey.com>
15794
15795 * python/python.c (do_start_initialization): New function, from
15796 _initialize_python.
15797 (_initialize_python): Call do_start_initialization.
15798 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15799 goto.
15800
1bdfaf42
TT
158012017-02-10 Tom Tromey <tom@tromey.com>
15802
15803 * python/py-prettyprint.c (pretty_print_one_value): Use
15804 gdbpy_ref.
15805
88b6faea
TT
158062017-02-10 Tom Tromey <tom@tromey.com>
15807
15808 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15809 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15810 gdbpy_ref.
15811 * python/py-type.c (field_new): Use gdbpy_ref.
15812 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15813 gdbpy_ref.
15814 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15815 (py_free_pspace): Likewise.
15816 (pspace_to_pspace_object): Likewise.
15817 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15818 (py_free_objfile): Likewise.
15819 (objfile_to_objfile_object): Likewise.
15820 * python/py-inferior.c (delete_thread_object): Use
15821 gdbpy_ref.
15822 (infpy_read_memory): Likewise.
15823 (py_free_inferior): Likewise.
15824 * python/py-evtregistry.c (create_eventregistry_object): Use
15825 gdbpy_ref.
15826 * python/py-event.c (create_event_object): Use gdbpy_ref.
15827
7780f186
TT
158282017-02-10 Tom Tromey <tom@tromey.com>
15829
15830 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15831 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15832 used.
15833 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15834 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15835 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15836 python/py-framefilter.c, python/py-function.c,
15837 python/py-inferior.c, python/py-infevents.c,
15838 python/py-linetable.c, python/py-newobjfileevent.c,
15839 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15840 python/py-signalevent.c, python/py-stopevent.c,
15841 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15842 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15843 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15844 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15845
d4b0bb18
TT
158462017-02-10 Tom Tromey <tom@tromey.com>
15847
15848 * ui-out.h (ui_out_emit_type): New class.
15849 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15850 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15851 and ui_out_emit_tuple.
15852 (enumerate_locals): Likewise.
15853 (py_mi_print_variables, py_print_locals, py_print_args): Use
15854 ui_out_emit_list.
15855 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15856 ui_out_emit_list.
15857 * common/gdb_optional.h: New file.
15858
f67f945c
MG
158592017-02-10 Martin Galvan <martingalvan@sourceware.org>
15860
15861 * MAINTAINERS (Write After Approval): Update my e-mail address.
15862
18da0c51
MG
158632017-02-10 Martin Galvan <martingalvan@sourceware.org>
15864
15865 PR gdb/21122
15866 * breakpoint.c (_initialize_breakpoint): Update the help description
15867 of the 'commands' command to indicate that it takes a list argument.
15868
62c14536
SM
158692017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15870
15871 * interps.c (current_interp_set_logging): Remove "return".
15872
ff6fa247
GB
158732017-02-09 Gary Benson <gbenson@redhat.com>
15874
15875 * symtab.c (add_symtab_completions): Prevent NULL pointer
15876 dereference.
15877
a474bd8e
PA
158782017-02-08 Pedro Alves <palves@redhat.com>
15879
15880 * interps.c (interp::interp): Remove reference to quiet_p.
15881 (interp_set): Make static. Remove dead "Switching to" output
15882 code.
15883 (interp_quiet_p, interp_set_quiet): Delete.
15884 (interpreter_exec_cmd): Don't set the interpreter quiet.
15885 * interps.h (interp_quiet_p): Make static.
15886 (class interp) <quiet_p>: Remove field
15887
3d7b173c
JG
158882017-02-08 Jerome Guitton <guitton@adacore.com>
15889
604c4576
JG
15890 * cli/cli-decode.c (find_command_name_length): Make it extern.
15891 * cli/cli-decode.h (find_command_name_length): Declare.
15892 * cli/cli-script.c (command_name_equals, line_first_arg):
15893 New functions.
15894 (process_next_line): Use cli-decode to parse command names.
15895 (build_command_line): Make args a constant pointer.
15896
158972017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15898
3d7b173c
JG
15899 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15900 Remove case-insensitive search.
15901
1291063d
JM
159022017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15903
15904 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15905 at the end of the line. Avoids an ARI warning.
15906
20b477a7
LM
159072017-02-06 Luis Machado <lgustavo@codesourcery.com>
15908
15909 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15910 rdseed instructions.
15911 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15912
3f7b46f2
IR
159132017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15914
15915 PR tdep/20936
15916 Provide and use sparc32 and sparc64 target description XML files.
15917 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15918 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15919 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15920 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15921 * features/sparc/sparc32-solaris.xml: New file.
15922 * features/sparc/sparc64-solaris.xml: New file.
15923 * features/sparc/sparc32-solaris.c: Generated.
15924 * features/sparc/sparc64-solaris.c: Generated.
15925 * sparc-tdep.h: Account for differences in target descriptions.
15926 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15927 (sparc32_register_type): Use target provided registers.
15928 (validate_tdesc_registers): New function.
15929 (sparc32_gdbarch_init): Use tdesc_has_registers.
15930 Set pseudoregister functions.
15931 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15932 (sparc64_register_type): Use target provided registers.
15933 (sparc64_init_abi): Set pseudoregister functions.
15934
f0fd41c1
TT
159352017-02-03 Tom Tromey <tom@tromey.com>
15936
15937 PR rust/21097:
15938 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15939 with a single member.
15940
d6f9b0fb
PA
159412017-02-03 Pedro Alves <palves@redhat.com>
15942
15943 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15944 (cli_interp_base::~cli_interp_base): New.
15945 (cli_interp): New struct.
15946 (as_cli_interp): Cast the interp itself to cli_interp.
15947 (cli_interpreter_pre_command_loop): Rename to ...
15948 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15949 parameter.
15950 (cli_interpreter_init): Rename to ...
15951 (cli_interp::init): ... this. Remove 'self' parameter. Use
15952 boolean. Make extern.
15953 (cli_interpreter_resume): Rename to ...
15954 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15955 extern.
15956 (cli_interpreter_suspend): Rename to ...
15957 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15958 extern.
15959 (cli_interpreter_exec): Rename to ...
15960 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15961 extern.
15962 (cli_interpreter_supports_command_editing): Rename to ...
15963 (cli_interp_base::supports_command_editing): ... this. Remove
15964 'interp' parameter. Make extern.
15965 (cli_ui_out): Rename to ...
15966 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15967 Make extern.
15968 (cli_set_logging): Rename to ...
15969 (cli_interp_base::set_logging): ... this. Remove 'interp'
15970 parameter. Make extern.
15971 (cli_interp_procs): Delete.
15972 (cli_interp_factory): Adjust to use "new".
15973 * cli/cli-interp.h: Include "interps.h".
15974 (struct cli_interp_base): New struct.
15975 * interps.c (struct interp): Delete. Fields moved to interps.h.
15976 (interp_new): Delete.
15977 (interp::interp, interp::~interp): New.
15978 (interp_set): Use bool, and return void. Assume the interpreter
15979 has suspend, init and resume methods, and that the all return
15980 void.
15981 (set_top_level_interpreter): interp_set returns void.
15982 (interp_ui_out): Adapt.
15983 (current_interp_set_logging): Adapt.
15984 (interp_data): Delete.
15985 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15986 (interp_exec): Adapt.
15987 (top_level_interpreter_data): Delete.
15988 * interps.h (interp_init_ftype, interp_resume_ftype)
15989 (interp_suspend_ftype, interp_exec_ftype)
15990 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15991 (class interp): New.
15992 (interp_new): Delete.
15993 (interp_set): Now returns void. Use bool.
15994 (interp_data, top_level_interpreter_data): Delete.
15995 * mi/mi-common.h: Include interps.h.
15996 (class mi_interp): Inherit from interp. Define a ctor. Declare
15997 init, resume, suspect, exec, interp_ui_out, set_logging and
15998 pre_command_loop methods.
15999 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16000 (mi_interpreter_init): Rename to ...
16001 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16002 bool, return void and make extern. Adjust.
16003 (mi_interpreter_resume): ... Rename to ...
16004 (mi_interp::resume): ... this. Remove the 'data' parameter,
16005 return void and make extern. Adjust.
16006 (mi_interpreter_suspend): ... Rename to ...
16007 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16008 return void and make extern. Adjust.
16009 (mi_interpreter_exec): ... Rename to ...
16010 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16011 extern. Adjust.
16012 (mi_interpreter_pre_command_loop): ... Rename to ...
16013 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16014 parameter and make extern.
16015 (mi_on_normal_stop_1): Adjust.
16016 (mi_ui_out): Rename to ...
16017 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16018 parameter and make extern. Adjust.
16019 (mi_set_logging): Rename to ...
16020 (mi_interp::set_logging): ... this. Remove the 'interp'
16021 parameter and make extern. Adjust.
16022 (mi_interp_procs): Delete.
16023 (mi_interp_factory): Adjust to use 'new'.
16024 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16025 (mi_print_exception, mi_execute_command, mi_load_progress):
16026 Adjust.
16027 * tui/tui-interp.c (tui_interp): New class.
16028 (as_tui_interp): Return a tui_interp pointer.
16029 (tui_on_normal_stop, tui_on_signal_received)
16030 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16031 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16032 to use interp::interp_ui_out.
16033 (tui_init): Rename to ...
16034 (tui_interp::init): ... this. Remove the 'self' parameter, use
16035 bool, return void and make extern. Adjust.
16036 (tui_resume): Rename to ...
16037 (tui_interp::resume): ... this. Remove the 'data' parameter,
16038 return void and make extern. Adjust.
16039 (tui_suspend): Rename to ...
16040 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16041 return void and make extern. Adjust.
16042 (tui_ui_out): Rename to ...
16043 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16044 parameter, and make extern. Adjust.
16045 (tui_exec): Rename to ...
16046 (tui_interp::exec): ... this. Remove the 'data' parameter and
16047 make extern.
16048 (tui_interp_procs): Delete.
16049 (tui_interp_factory): Use "new".
16050
65c40c95
TT
160512017-02-02 Tom Tromey <tom@tromey.com>
16052
16053 * rust-exp.y (ends_raw_string, space_then_number)
16054 (rust_identifier_start_p): Return bool.
16055 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16056 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16057 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16058 (rust_chartype_p): Return bool.
16059 (val_print_struct, rust_print_struct_def, rust_print_type):
16060 Update.
16061 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16062 Return bool.
16063
b50f188d
TT
160642017-02-02 Tom Tromey <tom@tromey.com>
16065
16066 * rust-lang.c: Reindent.
16067
03c85b11
TT
160682017-02-02 Tom Tromey <tom@tromey.com>
16069
16070 * rust-lang.h (rust_crate_for_block): Update.
16071 * rust-lang.c (rust_crate_for_block): Return std::string.
16072 (rust_get_disr_info): Use std:;string, not
16073 gdb::unique_xmalloc_ptr.
16074 * rust-exp.y (crate_name): Update.
16075
9b6da501
PA
160762017-02-02 Pedro Alves <palves@redhat.com>
16077
16078 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16079 field out of gdb_disassembler_test and make it static.
16080
ec4cb20b
PA
160812017-02-02 Pedro Alves <palves@redhat.com>
16082
16083 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16084 mi1_interp and mi_interp fields.
16085
5be5dbf0
PA
160862017-02-02 Pedro Alves <palves@redhat.com>
16087
616268b6
PA
16088 * cli/cli-interp.c (struct saved_output_files, saved_output):
16089 Moved from cli/cli-logging.c.
16090 (cli_set_logging): New function.
16091 (cli_interp_procs): Install cli_set_logging.
16092 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16093 Declare.
16094 * cli/cli-logging.c (struct saved_output_files, saved_output):
16095 Moved to cli/cli-interp.c.
16096 (pop_output_files): Don't save outputs here.
16097 (make_logging_output): New function.
16098 (handle_redirections): Don't build tee nor save previous outputs
16099 here.
16100 * interps.c (current_interp_set_logging): Change prototype.
16101 Assume there's always a set_logging_proc method installed.
16102 * interps.h (interp_set_logging_ftype): Change prototype.
16103 (current_interp_set_logging): Change prototype and adjust comment.
16104 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16105 use make_logging_output.
16106 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
161072017-02-02 Pedro Alves <palves@redhat.com>
16108
5be5dbf0
PA
16109 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16110 from ...
16111 (set_logging_overwrite): ... here.
16112 (logging_no_redirect_file): Delete.
16113 (set_logging_redirect): Don't handle redirection on the fly.
16114 Instead warn that "logging off" / "logging on" is necessary.
16115 (pop_output_files): Delete references to logging_no_redirect_file.
16116 (show_logging_command): Always speak in terms of what will happen
16117 once logging is reenabled.
16118
c99cc448
PA
161192017-02-02 Pedro Alves <palves@redhat.com>
16120
16121 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16122
8b172ce7
PA
161232017-02-02 Pedro Alves <palves@redhat.com>
16124
16125 * disasm.c (gdb_pretty_print_insn): Rename to ...
16126 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16127 Remove gdbarch parameter. Adapt to clear the object's buffers
16128 instead of allocating new buffers, and to print using the object's
16129 gdb_disassembler instead of calling gdb_print_insn.
16130 (dump_insns): Use gdb_pretty_print_disassembler.
16131 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16132 (gdb_pretty_print_disassembler): New class.
16133 * record-btrace.c (btrace_insn_history): Use
16134 gdb_pretty_print_disassembler.
16135
d7e74731
PA
161362017-02-02 Pedro Alves <palves@redhat.com>
16137
16138 * ada-lang.c (type_as_string): Use string_file.
16139 * ada-valprint.c (ada_print_floating): Use string_file.
16140 * ada-varobj.c (ada_varobj_scalar_image)
16141 (ada_varobj_get_value_image): Use string_file.
16142 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16143 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16144 * breakpoint.c (update_inserted_breakpoint_locations)
16145 (insert_breakpoint_locations, reattach_breakpoints)
16146 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16147 (print_it_watchpoint): Use string_file.
16148 (save_breakpoints): Use stdio_file.
16149 * c-exp.y (oper): Use string_file.
16150 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16151 tee_file.
16152 (pop_output_files): Use delete.
16153 (handle_redirections): Use stdio_file and tee_file.
16154 * cli/cli-setshow.c (do_show_command): Use string_file.
16155 * compile/compile-c-support.c (c_compute_program): Use
16156 string_file.
16157 * compile/compile-c-symbols.c (generate_vla_size): Take a
16158 'string_file &' instead of a 'ui_file *'.
16159 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16160 of a 'ui_file *'. Use string_file.
16161 (generate_c_for_variable_locations): Take a 'string_file &'
16162 instead of a 'ui_file *'.
16163 * compile/compile-internal.h (generate_c_for_for_one_variable):
16164 Take a 'string_file &' instead of a 'ui_file *'.
16165 * compile/compile-loc2c.c (push, pushf, unary, binary)
16166 (print_label, pushf_register_address, pushf_register)
16167 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16168 'ui_file *'. Adjust.
16169 * compile/compile.c (compile_to_object): Use string_file.
16170 * compile/compile.h (compile_dwarf_expr_to_c)
16171 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16172 'ui_file *'.
16173 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16174 (replace_typedefs_qualified_name): Use string_file and
16175 obstack_copy0.
16176 * disasm.c (gdb_pretty_print_insn): Use string_file.
16177 (gdb_disassembly): Adjust reference the null_stream global.
16178 (do_ui_file_delete): Delete.
16179 (gdb_insn_length): Use null_stream.
16180 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16181 * dwarf2loc.c (dwarf2_compile_property_to_c)
16182 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16183 'string_file &' instead of a 'ui_file *'.
16184 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16185 * dwarf2read.c (do_ui_file_peek_last): Delete.
16186 (dwarf2_compute_name): Use string_file.
16187 * event-top.c (gdb_setup_readline): Use stdio_file.
16188 * gdbarch.sh (verify_gdbarch): Use string_file.
16189 * gdbtypes.c (safe_parse_type): Use null_stream.
16190 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16191 string_file.
16192 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16193 'string_file *' instead of a 'ui_file *'.
16194 (gdbscm_arch_disassemble): Use string_file.
16195 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16196 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16197 inherits from ui_file.
16198 (ioscm_file_port_delete, ioscm_file_port_rewind)
16199 (ioscm_file_port_put): Delete.
16200 (ioscm_file_port_write): Rename to ...
16201 (ioscm_file_port::write): ... this. Remove file_port_magic
16202 checks.
16203 (ioscm_file_port_new): Delete.
16204 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16205 ui_file_up.
16206 * guile/scm-type.c (tyscm_type_name): Use string_file.
16207 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16208 Use string_file.
16209 * infcmd.c (print_return_value_1): Use string_file.
16210 * infrun.c (print_target_wait_results): Use string_file.
16211 * language.c (add_language): Use string_file.
16212 * location.c (explicit_to_string_internal): Use string_file.
16213 * main.c (captured_main_1): Use null_file.
16214 * maint.c (maintenance_print_architecture): Use stdio_file.
16215 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16216 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16217 event_channel>: Change type to mi_console_file pointer.
16218 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16219 (mi_console_file_delete): Delete.
16220 (struct mi_console_file): Delete.
16221 (mi_console_file_magic): Delete.
16222 (mi_console_file_new): Delete.
16223 (mi_console_file::mi_console_file): New.
16224 (mi_console_file_delete): Delete.
16225 (mi_console_file_fputs): Delete.
16226 (mi_console_file::write): New.
16227 (mi_console_raw_packet): Delete.
16228 (mi_console_file::flush): New.
16229 (mi_console_file_flush): Delete.
16230 (mi_console_set_raw): Rename to ...
16231 (mi_console_file::set_raw): ... this.
16232 * mi/mi-console.h (class mi_console_file): New class.
16233 (mi_console_file_new, mi_console_set_raw): Delete.
16234 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16235 (mi_set_logging): Use delete and tee_file. Adjust.
16236 * mi/mi-main.c (output_register): Use string_file.
16237 (mi_cmd_data_evaluate_expression): Use string_file.
16238 (mi_cmd_data_read_memory): Use string_file.
16239 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16240 * mi/mi-out.c (mi_ui_out::main_stream): New.
16241 (mi_ui_out::rewind): Use main_stream and
16242 string_file.
16243 (mi_ui_out::put): Use main_stream and string_file.
16244 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16245 Allocate a 'string_file' instead.
16246 (mi_out_new): Don't allocate a mem_fileopen stream here.
16247 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16248 (mi_ui_out::main_stream): Declare method.
16249 * printcmd.c (eval_command): Use string_file.
16250 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16251 * python/py-arch.c (archpy_disassemble): Use string_file.
16252 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16253 * python/py-frame.c (frapy_str): Use string_file.
16254 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16255 Use string_file.
16256 * python/py-type.c (typy_str): Use string_file.
16257 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16258 * python/py-value.c (valpy_str): Use string_file.
16259 * record-btrace.c (btrace_insn_history): Use string_file.
16260 * regcache.c (regcache_print): Use stdio_file.
16261 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16262 * remote.c (escape_buffer): Use string_file.
16263 * rust-lang.c (rust_get_disr_info): Use string_file.
16264 * serial.c (serial_open_ops_1): Use stdio_file.
16265 (do_serial_close): Use delete.
16266 * stack.c (print_frame_arg): Use string_file.
16267 (print_frame_args): Remove local mem_fileopen stream, not used.
16268 (print_frame): Use string_file.
16269 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16270 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16271 Take a 'string_file *' instead of a 'ui_file *'.
16272 * top.c (new_ui): Use stdio_file and stderr_file.
16273 (free_ui): Use delete.
16274 (execute_command_to_string): Use string_file.
16275 (quit_confirm): Use string_file.
16276 * tracepoint.c (collection_list::append_exp): Use string_file.
16277 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16278 * tui/tui-file.c: Don't include "ui-file.h".
16279 (enum streamtype, struct tui_stream): Delete.
16280 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16281 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16282 (tui_file::tui_file): New method.
16283 (tui_file_fputs): Delete.
16284 (tui_file_get_strbuf): Delete.
16285 (tui_file::puts): New method.
16286 (tui_file_adjust_strbuf): Delete.
16287 (tui_file_flush): Delete.
16288 (tui_file::flush): New method.
16289 * tui/tui-file.h: Tweak intro comment.
16290 Include ui-file.h.
16291 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16292 (tui_file_adjust_strbuf): Delete declarations.
16293 (class tui_file): New class.
16294 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16295 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16296 (tui_register_format): Use string_stream.
16297 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16298 (tui_get_function_from_frame): Use string_file.
16299 * typeprint.c (type_to_string): Use string_file.
16300 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16301 (null_stream): New global.
16302 (ui_file_delete): Delete.
16303 (ui_file::ui_file): New.
16304 (null_file_isatty): Delete.
16305 (ui_file::~ui_file): New.
16306 (null_file_rewind): Delete.
16307 (ui_file::printf): New.
16308 (null_file_put): Delete.
16309 (null_file_flush): Delete.
16310 (ui_file::putstr): New.
16311 (null_file_write): Delete.
16312 (ui_file::putstrn): New.
16313 (null_file_read): Delete.
16314 (ui_file::putc): New.
16315 (null_file_fputs): Delete.
16316 (null_file_write_async_safe): Delete.
16317 (ui_file::vprintf): New.
16318 (null_file_delete): Delete.
16319 (null_file::write): New.
16320 (null_file_fseek): Delete.
16321 (null_file::puts): New.
16322 (ui_file_data): Delete.
16323 (null_file::write_async_safe): New.
16324 (gdb_flush, ui_file_isatty): Adjust.
16325 (ui_file_put, ui_file_rewind): Delete.
16326 (ui_file_write): Adjust.
16327 (ui_file_write_for_put): Delete.
16328 (ui_file_write_async_safe, ui_file_read): Adjust.
16329 (ui_file_fseek): Delete.
16330 (fputs_unfiltered): Adjust.
16331 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16332 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16333 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16334 (set_ui_file_data): Delete.
16335 (string_file::~string_file, string_file::write)
16336 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16337 (do_ui_file_as_string, ui_file_as_string): Delete.
16338 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16339 (struct mem_file): Delete.
16340 (mem_file_new): Delete.
16341 (stdio_file::stdio_file): New.
16342 (mem_file_delete): Delete.
16343 (stdio_file::stdio_file): New.
16344 (mem_fileopen): Delete.
16345 (stdio_file::~stdio_file): New.
16346 (mem_file_rewind): Delete.
16347 (stdio_file::set_stream): New.
16348 (mem_file_put): Delete.
16349 (stdio_file::open): New.
16350 (mem_file_write): Delete.
16351 (stdio_file_magic, struct stdio_file): Delete.
16352 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16353 (stdio_file::flush): New.
16354 (stdio_file_read): Rename to ...
16355 (stdio_file::read): ... this. Adjust.
16356 (stdio_file_write): Rename to ...
16357 (stdio_file::write): ... this. Adjust.
16358 (stdio_file_write_async_safe): Rename to ...
16359 (stdio_file::write_async_safe) ... this. Adjust.
16360 (stdio_file_fputs): Rename to ...
16361 (stdio_file::puts) ... this. Adjust.
16362 (stdio_file_isatty): Delete.
16363 (stdio_file_fseek): Delete.
16364 (stdio_file::isatty): New.
16365 (stderr_file_write): Rename to ...
16366 (stderr_file::write) ... this. Adjust.
16367 (stderr_file_fputs): Rename to ...
16368 (stderr_file::puts) ... this. Adjust.
16369 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16370 (stderr_file::stderr_file): New.
16371 (tee_file_magic): Delete.
16372 (struct tee_file): Delete.
16373 (tee_file::tee_file): New.
16374 (tee_file_new): Delete.
16375 (tee_file::~tee_file): New.
16376 (tee_file_delete): Delete.
16377 (tee_file_flush): Rename to ...
16378 (tee_file::flush): ... this. Adjust.
16379 (tee_file_write): Rename to ...
16380 (tee_file::write): ... this. Adjust.
16381 (tee_file::write_async_safe): New.
16382 (tee_file_fputs): Rename to ...
16383 (tee_file::puts): ... this. Adjust.
16384 (tee_file_isatty): Rename to ...
16385 (tee_file::isatty): ... this. Adjust.
16386 * ui-file.h (struct obstack, struct ui_file): Don't
16387 forward-declare.
16388 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16389 (ui_file_write_ftype)
16390 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16391 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16392 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16393 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16394 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16395 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16396 (set_ui_file_fseek): Delete.
16397 (ui_file_data, ui_file_delete, ui_file_rewind)
16398 (struct ui_file): New.
16399 (ui_file_up): New.
16400 (class null_file): New.
16401 (null_stream): Declare.
16402 (ui_file_write_for_put, ui_file_put): Delete.
16403 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16404 Delete.
16405 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16406 (gdb_fopen, tee_file_new): Delete.
16407 (struct string_file): New.
16408 (struct stdio_file): New.
16409 (stdio_file_up): New.
16410 (struct stderr_file): New.
16411 (class tee_file): New.
16412 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16413 of a 'ui_file *'. Adjust.
16414 * ui-out.h (class ui_out) <field_stream>: Likewise.
16415 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16416 (null_stream): Delete.
16417 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16418 Adjust.
16419 * utils.h (struct ui_file): Delete forward declaration..
16420 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16421 (error_stream): Take a 'string_file &' instead of a
16422 'ui_file *'.
16423 * varobj.c (varobj_value_get_print_value): Use string_file.
16424 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16425 * gdbarch.c: Regenerate.
16426
187808b0
PA
164272017-02-02 Pedro Alves <palves@redhat.com>
16428
16429 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16430 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16431 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16432 Adjust to call gdb_print_insn instead of
16433 gdb_disassembler::print_insn.
16434 (dump_insns, do_mixed_source_and_assembly_deprecated)
16435 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16436 'gdbarch' parameter. Remove gdb_disassembler parameter.
16437 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16438 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16439 declaration.
16440 (gdb_pretty_print_insn): Re-add declaration.
16441 * record-btrace.c (btrace_insn_history): Don't allocate a
16442 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16443
7a8eb317
SM
164442017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16445
16446 * disasm.h (gdb_disassembly): Remove file_string parameter.
16447 * disasm.c (gdb_disassembly): Likewise.
16448 * cli/cli-cmds.c (print_disassembly): Adapt.
16449 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16450 * stack.c (do_gdb_disassembly): Likewise.
16451
7346ef59
AA
164522017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16453
16454 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16455 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16456 targets. And if the implicit value is longer than needed, extract
16457 the first bytes instead of the "least significant" ones.
16458
cd4007e4
MM
164592017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16460
16461 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16462 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16463 (btrace_fetch): Assert can_access_registers_ptid.
16464 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16465 validate_registers_access.
16466
cf77c34e
MM
164672017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16468
16469 * gdbthread.h (can_access_registers_ptid): New.
16470 * thread.c (can_access_registers_ptid): New.
16471
be85ce7d
PA
164722017-02-01 Pedro Alves <palves@redhat.com>
16473
16474 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16475
29b0b251
PA
164762017-01-31 Pedro Alves <palves@redhat.com>
16477
16478 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16479 Fix typos.
16480
289b5b24
PA
164812017-01-31 Pedro Alves <palves@redhat.com>
16482
16483 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16484 not used.
16485
b47413b4
PA
164862017-01-31 Pedro Alves <palves@redhat.com>
16487
16488 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16489
60adb36c
PA
164902017-01-31 Pedro Alves <palves@redhat.com>
16491
16492 * common/scoped_restore.h
16493 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16494 change the value's parameter type to T2.
16495 (make_scoped_restore): Likewise.
16496
2735833d
WT
164972017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16498 Richard Henderson <rth@redhat.com>
16499
16500 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16501 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16502 GS_BASE for older kernels.
16503 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16504 GS_BASE for older kernels.
16505 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16506 and GS_BASE to the offset table.
16507 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16508 system register group.
16509 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16510 for older kernels.
16511 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16512 amd64 ABI.
16513 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16514 AMD64_GSBASE_REGNUM.
16515 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16516 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16517 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16518 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16519 i386/64bit-segments.xml in those rules.
16520 * features/i386/64bit-segments.xml: New file.
16521 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16522 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16523 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16524 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16525 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16526 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16527 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16528 * features/i386/amd64-avx-linux.c: Regenerated.
16529 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16530 * features/i386/amd64-avx-mpx.c: Regenerated.
16531 * features/i386/amd64-avx512-linux.c: Regenerated.
16532 * features/i386/amd64-linux.c: Regenerated.
16533 * features/i386/amd64-mpx-linux.c: Regenerated.
16534 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16535 * features/i386/i386-avx-mpx.c: Regenerated.
16536 * features/i386/x32-avx-linux.c: Regenerated.
16537 * features/i386/x32-avx512-linux.c: Regenerated.
16538 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16539 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16540 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16541 * regformats/i386/amd64-linux.dat: Regenerated.
16542 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16543 * regformats/i386/x32-avx-linux.dat: Regenerated.
16544 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16545 * regformats/i386/x32-linux.dat: Regenerated.
16546
8884e97e
WT
165472017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16548
16549 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16550 Set to AMD64_NUM_REGS.
16551
7005d26a
WT
165522017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16553
16554 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16555 that checks validity of a register number.
16556
4bd2e1b2
KC
165572017-01-27 Kees Cook <keescook@google.com>
16558
16559 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16560 fetch_fpregs if target has fpa registers.
16561 (arm_linux_store_inferior_registers): Call store_fpregs if target
16562 has fpa registers.
16563
7cf1de6c
AA
165642017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16565
16566 * cris-tdep.c (cris_gdbarch_init): Remove check for
16567 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16568
874a1c8c
AT
165692017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16570
16571 * corelow.c (get_core_register_section): Check for regset
16572 existence before checking for REGSET_VARIABLE_SIZE.
16573
d8b49cf0
YQ
165742017-01-26 Yao Qi <yao.qi@linaro.org>
16575 Pedro Alves <palves@redhat.com>
16576
16577 PR gdb/20939
16578 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16579 call memory_error, save memaddr instead.
16580 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16581 negative, cal memory_error.
16582 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16583
658ca58c
YQ
165842017-01-26 Yao Qi <yao.qi@linaro.org>
16585
16586 * disasm-selftests.c (memory_error_test): New function.
16587 (_initialize_disasm_selftests): Register memory_error_test.
16588
79843d45
YQ
165892017-01-26 Yao Qi <yao.qi@linaro.org>
16590
16591 * Makefile.in (SFILES): Add disasm-selftests.c and
16592 selftest-arch.c.
16593 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16594 * disasm-selftests.c: New file.
16595 * selftest-arch.c: New file.
16596 * selftest-arch.h: New file.
16597
8cafda32
YQ
165982017-01-26 Yao Qi <yao.qi@linaro.org>
16599
16600 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16601 to bfd_arch_mep. Don't return 0 if section is not
16602 found. Call print_insn_mep.
16603
e47ad6c0
YQ
166042017-01-26 Pedro Alves <palves@redhat.com>
16605 Yao Qi <yao.qi@linaro.org>
16606
16607 * arm-tdep.c: Include "disasm.h".
16608 (gdb_print_insn_arm): Update code to get gdbarch.
16609 * disasm.c (dis_asm_read_memory): Change it to
16610 gdb_disassembler::dis_asm_read_memory.
16611 (dis_asm_memory_error): Likewise.
16612 (dis_asm_print_address): Likewise.
16613 (gdb_pretty_print_insn): Change it to
16614 gdb_disassembler::pretty_print_insn.
16615 (dump_insns): Add one argument gdb_disassemlber. All
16616 callers updated.
16617 (do_mixed_source_and_assembly_deprecated): Likewise.
16618 (do_mixed_source_and_assembly): Likewise.
16619 (do_assembly_only): Likewise.
16620 (gdb_disassembler::gdb_disassembler): New.
16621 (gdb_disassembler::print_insn): New.
16622 * disasm.h (class gdb_disassembler): New.
16623 (gdb_pretty_print_insn): Remove declaration.
16624 (gdb_disassemble_info): Likewise.
16625 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16626 (gdbscm_disasm_read_memory_worker): Update.
16627 (gdbscm_disasm_read_memory): Update.
16628 (gdbscm_disasm_memory_error): Remove.
16629 (gdbscm_disasm_print_address): Remove.
16630 (gdbscm_disassembler::gdbscm_disassembler): New.
16631 (gdbscm_print_insn_from_port): Update.
16632 * mips-tdep.c: Include disasm.h.
16633 (gdb_print_insn_mips): Update code to get gdbarch.
16634 * record-btrace.c (btrace_insn_history): Update.
16635 * spu-tdep.c: Include disasm.h.
16636 (struct spu_dis_asm_data): Remove.
16637 (struct spu_dis_asm_info): New.
16638 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16639 SPU id.
16640 (gdb_print_insn_spu): Cast disassemble_info to
16641 spu_dis_asm_info.
16642
80d75874
YQ
166432017-01-26 Yao Qi <yao.qi@linaro.org>
16644
16645 * disasm.c (do_ui_file_delete): Delete.
16646 (gdb_insn_length): Move code creating stream to ...
16647 * utils.c (null_stream): ... here. New function.
16648 * utils.h (null_stream): Declare.
16649
60685cd0
SM
166502017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16651
16652 * python/py-inferior.c (find_thread_object): Return directly
16653 from the loop. Remove "found" variable.
16654
eb1cdb62
JB
166552017-01-21 Joel Brobecker <brobecker@adacore.com>
16656
16657 GDB 7.12.1 released.
16658
b1ce6568
SM
166592017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16660
16661 * python/py-function.c (fnpy_call): Reorder declarations to have
16662 the gdbpy_enter object declared first.
16663 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16664
6f8b0407
SM
166652017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16666
fec93fb1 16667 PR python/21068
6f8b0407
SM
16668 * python/python-internal.h (PyMem_RawMalloc): Define for
16669 Python < 3.4.
16670 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16671 PyMem_RawMalloc instead of PyMem_Malloc.
16672
78cbbba8
LM
166732017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16674 Luis Machado <lgustavo@codesourcery.com>
16675
16676 * NEWS (New commands): Mention flash-erase.
16677 (New MI commands): Mention target-flash-erase.
16678 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16679 command.
16680 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16681 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16682 * target.c (flash_erase_command): New function.
16683 (initialize_targets): Add new flash-erase command.
16684 * target.h (flash_erase_command): New declaration.
16685
2132fe85
JB
166862017-01-20 Joel Brobecker <brobecker@adacore.com>
16687
16688 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16689 HAVE_SYS_PROCFS_H is defined.
16690
d1dff226
AH
166912017-01-18 Alan Hayward <alan.hayward@arm.com>
16692
16693 * remote.c (struct cached_reg): Change data into a pointer.
16694 * (stop_reply_dtr): Free data pointers before deleting vector.
16695 (process_stop_reply): Likewise.
16696 (remote_parse_stop_reply): Allocate space for data
16697
9890e433
AH
166982017-01-18 Alan Hayward <alan.hayward@arm.com>
16699
16700 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16701 MAX_REGISTER_SIZE.
16702 (amd64_pseudo_register_read_value): Likewise.
16703 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16704 (store_register_using_P): Likewise.
16705 * regcache.c (regcache_xfer_part): Likewise.
16706
7a36499a
IR
167072017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16708
16709 Split real and pseudo registers.
16710 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16711 (sparc32_pseudo_regnum): New enum.
16712 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16713 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16714 (SPARC32_CP0_REGISTERS): New macro.
16715 (sparc32_pseudo_register_name): New function.
16716 (sparc32_register_name): Use sparc32_pseudo_register_name.
16717 (sparc32_pseudo_register_type): New function.
16718 (sparc32_register_type): Use sparc32_pseudo_register_type.
16719 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16720 pseudo register numbers.
16721 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16722 (SPARC64_CP0_REGISTERS): New macro.
16723 (sparc64_pseudo_register_name): New function.
16724 (sparc64_register_name): Use sparc64_pseudo_register_name.
16725 (sparc64_pseudo_register_type): New function.
16726 (sparc64_register_type): Use sparc64_pseudo_register_type.
16727 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16728 pseudo register numbers.
16729 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16730 sparc64_store_arguments): Handle pseudo register numbers.
16731
6f8976bf
YQ
167322017-01-13 Yao Qi <yao.qi@linaro.org>
16733
16734 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16735 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16736 output.
16737 (getpkt_or_notif_sane_1): Likewise.
16738
e4241ace
YQ
167392017-01-13 Yao Qi <yao.qi@linaro.org>
16740
16741 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16742 of CC. Pass "-x c++-header" instead of "-x c".
16743
3015c064
SM
167442017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16745
16746 * remote.c (remote_can_async_p): Update comment.
16747
fde1b17d
SM
167482017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16749
16750 * linux-nat.c (linux_nat_can_async_p): Update comment.
16751
ca1ca08b
SM
167522017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16753
16754 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16755
4ad2da73
SM
167562017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16757
16758 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16759
c8b23b3f
TT
167602017-01-10 Tom Tromey <tom@tromey.com>
16761
16762 * python/py-type.c (typy_legacy_template_argument): Update.
16763 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16764 ~demangle_parse_info): Declare new members.
16765 (cp_demangled_name_to_comp): Return unique_ptr.
16766 (cp_demangled_name_parse_free)
16767 (make_cleanup_cp_demangled_name_parse_free)
16768 (cp_new_demangle_parse_info): Remove.
16769 * cp-support.c (do_demangled_name_parse_free_cleanup)
16770 (make_cleanup_cp_demangled_name_parse_free): Remove.
16771 (inspect_type, cp_canonicalize_string_full)
16772 (cp_canonicalize_string): Update.
16773 (mangled_name_to_comp): Change return type.
16774 (cp_class_name_from_physname, method_name_from_physname)
16775 (cp_func_name, cp_remove_params): Update.
16776 * cp-name-parser.y (demangle_parse_info): New constructor, from
16777 cp_new_demangle_parse_info.
16778 (~demangle_parse_info): New destructor, from
16779 cp_demangled_name_parse_free.
16780 (cp_merge_demangle_parse_infos): Update.
16781 (cp_demangled_name_to_comp): Change return type.
16782
1ac32117
TT
167832017-01-10 Tom Tromey <tom@tromey.com>
16784
16785 * top.c (prevent_dont_repeat): Change return type.
16786 * python/python.c (execute_gdb_command): Use std::string.
16787 Update.
16788 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16789 * command.h (prevent_dont_repeat): Change return type.
16790 * breakpoint.c (bpstat_do_actions_1): Update.
16791
0cf08227
TT
167922017-01-10 Tom Tromey <tom@tromey.com>
16793
16794 * value.h (scoped_value_mark::~scoped_value_mark): Call
16795 free_to_mark.
16796 (scoped_value_mark::free_to_mark): New method.
16797 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16798 scoped_value_mark.
16799
eb115069
TT
168002017-01-10 Tom Tromey <tom@tromey.com>
16801
16802 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16803 (valpy_reference_value, valpy_const_value, valpy_get_address)
16804 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16805 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16806 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16807 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16808 scoped_value_mark.
16809 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16810 * value.h (scoped_value_mark): New class.
16811
906768f9
TT
168122017-01-10 Tom Tromey <tom@tromey.com>
16813
16814 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16815 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16816 * psymtab.c (discard_psymtabs_upto): Remove.
16817 (make_cleanup_discard_psymtabs): Remove.
16818 (struct psymtab_state): Remove.
16819
bef155c3
TT
168202017-01-10 Tom Tromey <tom@tromey.com>
16821
16822 * record-full.c (record_full_save_cleanups): Remove.
16823 (record_full_save): Use gdb::unlinker.
16824 * gcore.c (do_bfd_delete_cleanup): Remove.
16825 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16826 cleanups.
16827 * dwarf2read.c (unlink_if_set): Remove.
16828 (write_psymtabs_to_index): Use gdb::unlinker.
16829 * common/gdb_unlinker.h: New file.
16830
192b62ce
TT
168312017-01-10 Tom Tromey <tom@tromey.com>
16832
16833 * windows-tdep.c (windows_xfer_shared_library): Update.
16834 * windows-nat.c (windows_make_so): Update.
16835 * utils.h (make_cleanup_bfd_unref): Remove.
16836 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16837 * symfile.h (symfile_bfd_open)
16838 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16839 * symfile.c (read_symbols, symbol_file_add)
16840 (separate_debug_file_exists): Update.
16841 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16842 (generic_load, reread_symbols): Update.
16843 * symfile-mem.c (symbol_file_add_from_memory): Update.
16844 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16845 (spu_symbol_file_add_from_memory): Update.
16846 * solist.h (struct target_so_ops) <bfd_open>: Return
16847 gdb_bfd_ref_ptr.
16848 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16849 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16850 gdb_bfd_ref_ptr.
16851 (solib_map_sections, reload_shared_libraries_1): Update.
16852 * solib-svr4.c (enable_break): Update.
16853 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16854 * solib-frv.c (enable_break2): Update.
16855 * solib-dsbt.c (enable_break): Update.
16856 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16857 gdb_bfd_ref_ptr.
16858 (darwin_solib_get_all_image_info_addr_at_init): Update.
16859 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16860 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16861 * record-full.c (record_full_save): Update.
16862 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16863 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16864 * minidebug.c (find_separate_debug_file_in_section): Return
16865 gdb_bfd_ref_ptr.
16866 * machoread.c (macho_add_oso_symfile): Change abfd to
16867 gdb_bfd_ref_ptr.
16868 (macho_symfile_read_all_oso): Update.
16869 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16870 (macho_symfile_read): Update.
16871 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16872 (jit_bfd_try_read_symtab): Update.
16873 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16874 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16875 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16876 gdb_bfd_ref_ptr.
16877 (gdb_bfd_ref_policy): New struct.
16878 (gdb_bfd_ref_ptr): New typedef.
16879 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16880 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16881 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16882 gdb_bfd_ref_ptr.
16883 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16884 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16885 (gcore_command): Update.
16886 * exec.c (exec_file_attach): Update.
16887 * elfread.c (elf_symfile_read): Update.
16888 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16889 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16890 (open_and_init_dwo_file): Update.
16891 (open_dwp_file): Return gdb_bfd_ref_ptr.
16892 (open_and_init_dwp_file): Update.
16893 * corelow.c (core_open): Update.
16894 * compile/compile-object-load.c (compile_object_load): Update.
16895 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16896 * coffread.c (coff_symfile_read): Update.
16897 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16898 gdb_bfd_ref_ptr. Rename.
16899 (dump_bfd_file, restore_command): Update.
16900 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16901 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16902 (find_separate_debug_file_by_buildid): Update.
16903
50315b21
TT
169042017-01-10 Tom Tromey <tom@tromey.com>
16905
16906 * common/gdb_ref_ptr.h: New file.
16907 * python/py-ref.h (struct gdbpy_ref_policy): New.
16908 (gdbpy_ref): Now a typedef.
16909
fc4007c9
TT
169102017-01-10 Tom Tromey <tom@tromey.com>
16911
16912 * utils.h (make_cleanup_htab_delete): Don't declare.
16913 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16914 Remove.
16915 * linespec.c (decode_compound_collector): Add constructor,
16916 destructor.
16917 (lookup_prefix_sym): Remove cleanup.
16918 (symtab_collector): Add constructor, destructor.
16919 (collect_symtabs_from_filename): Remove cleanup.
16920 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16921 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16922 Use htab_up.
16923 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16924 * dwarf2read.c (dw2_expand_symtabs_matching)
16925 (dw2_map_symbol_filenames, dwarf_decode_macros)
16926 (write_psymtabs_to_index): Use htab_up.
16927 * dwarf2loc.c (func_verify_no_selftailcall)
16928 (call_site_find_chain_1, func_verify_no_selftailcall)
16929 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16930 std::vector, gdb::unique_xmalloc_ptr.
16931 (call_sitep): Remove typedef.
16932 (dwarf2_locexpr_baton_eval): Remove unused variable.
16933
8dbcee67
TT
169342017-01-10 Tom Tromey <tom@tromey.com>
16935
16936 * python/python-internal.h (make_cleanup_py_decref)
16937 (make_cleanup_py_xdecref): Don't declare.
16938 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16939 (py_xdecref, make_cleanup_py_xdecref): Remove.
16940
13df46cc
TT
169412017-01-10 Tom Tromey <tom@tromey.com>
16942
16943 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16944 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16945
06fc9bf7
TT
169462017-01-10 Tom Tromey <tom@tromey.com>
16947
16948 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16949
830a4934
TT
169502017-01-10 Tom Tromey <tom@tromey.com>
16951
16952 * python/py-utils.c (unicode_to_encoded_string)
16953 (python_string_to_target_string)
16954 (python_string_to_target_python_string)
16955 (python_string_to_host_string, gdbpy_obj_to_string)
16956 (get_addr_from_python): Use gdbpy_ref.
16957
4586d543
TT
169582017-01-10 Tom Tromey <tom@tromey.com>
16959
16960 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16961 gdbpy_ref.
16962
59876f8f
TT
169632017-01-10 Tom Tromey <tom@tromey.com>
16964
16965 * python/python.c (eval_python_command, gdbpy_decode_line)
16966 (gdbpy_run_events, gdbpy_start_type_printers)
16967 (gdbpy_apply_type_printers): Use gdbpy_ref.
16968
97d83487
TT
169692017-01-10 Tom Tromey <tom@tromey.com>
16970
16971 * python/py-param.c (get_doc_string, compute_enum_values): Use
16972 gdbpy_ref.
16973
9205649a
TT
169742017-01-10 Tom Tromey <tom@tromey.com>
16975
16976 * python/py-inferior.c (find_thread_object, build_inferior_list):
16977 Use gdbpy_ref.
16978
74c49d45
TT
169792017-01-10 Tom Tromey <tom@tromey.com>
16980
16981 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16982
16361ffb
TT
169832017-01-10 Tom Tromey <tom@tromey.com>
16984
16985 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16986 gdbpy_ref.
16987
905f2cca
TT
169882017-01-10 Tom Tromey <tom@tromey.com>
16989
16990 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16991 extra incref.
16992 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16993 Use gdbpy_ref.
16994
64081434
TT
169952017-01-10 Tom Tromey <tom@tromey.com>
16996
16997 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16998 gdbpy_ref.
16999
59e9e831
TT
170002017-01-10 Tom Tromey <tom@tromey.com>
17001
17002 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17003 decref results of PyArg_ParseTupleAndKeywords.
17004
9de10f6d
TT
170052017-01-10 Tom Tromey <tom@tromey.com>
17006
17007 * python/python.c (python_run_simple_file): Use
17008 unique_xmalloc_ptr, gdbpy_ref.
17009
2bd5759d
TT
170102017-01-10 Tom Tromey <tom@tromey.com>
17011
17012 * python/py-prettyprint.c (print_stack_unless_memory_error)
17013 (print_string_repr, print_children): Use gdbpy_ref.
17014 (dummy_python_frame): New class.
17015 (dummy_python_frame::dummy_python_frame): Rename from
17016 push_dummy_python_frame.
17017 (py_restore_tstate): Remove.
17018
3b4e0e01
TT
170192017-01-10 Tom Tromey <tom@tromey.com>
17020
17021 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17022
17a22718
TT
170232017-01-10 Tom Tromey <tom@tromey.com>
17024
17025 * python/python.c (ensure_python_env, restore_python_env):
17026 Remove.
17027 * python/python-internal.h (ensure_python_env): Don't declare.
17028 * varobj.h (varobj_ensure_python_env): Don't declare.
17029 * varobj.c (varobj_ensure_python_env): Remove.
17030
68cdc557
TT
170312017-01-10 Tom Tromey <tom@tromey.com>
17032
17033 * varobj.c (varobj_value_get_print_value): Use
17034 gdbpy_enter_varobj.
17035
1eba6383
TT
170362017-01-10 Tom Tromey <tom@tromey.com>
17037
17038 * python/py-prettyprint.c (print_string_repr, print_children):
17039 Update.
17040 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17041 of "encoding".
17042 * varobj.c (varobj_value_get_print_value): Update.
17043 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17044
bde7b3e3
TT
170452017-01-10 Tom Tromey <tom@tromey.com>
17046
17047 * varobj.c (varobj_get_display_hint)
17048 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17049 (varobj_set_visualizer, free_variable): Use
17050 gdbpy_enter_varobj.
17051
a7785f8c
TT
170522017-01-10 Tom Tromey <tom@tromey.com>
17053
17054 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17055 (do_finish_initialization): New function. Use gdbpy_ref.
17056 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17057 do_finish_initialization.
17058
2865bfce
TT
170592017-01-10 Tom Tromey <tom@tromey.com>
17060
17061 * python/py-param.c (get_set_value, get_show_value): Use
17062 gdbpy_enter, gdbpy_ref.
17063
0e9dcc75
TT
170642017-01-10 Tom Tromey <tom@tromey.com>
17065
17066 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17067
12a5cedd
TT
170682017-01-10 Tom Tromey <tom@tromey.com>
17069
17070 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17071
788f2586
TT
170722017-01-10 Tom Tromey <tom@tromey.com>
17073
17074 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17075 Use gdbpy_enter_varobj.
17076
6cd67bea
TT
170772017-01-10 Tom Tromey <tom@tromey.com>
17078
17079 * varobj.c (gdbpy_enter_varobj): New constructor.
17080 * python/python-internal.h (gdbpy_enter_varobj): New class.
17081 * python/py-varobj.c (py_varobj_get_iterator): Use
17082 gdbpy_enter_varobj.
17083
14b122bf
TT
170842017-01-10 Tom Tromey <tom@tromey.com>
17085
17086 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17087 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17088 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17089 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17090 unique_xmalloc_ptr.
17091 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17092
bf1ca3b9
TT
170932017-01-10 Tom Tromey <tom@tromey.com>
17094
17095 * python/py-xmethods.c (invoke_match_method): Use
17096 gdbpy_ref.
17097
572a5524
TT
170982017-01-10 Tom Tromey <tom@tromey.com>
17099
17100 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17101 gdbpy_enter, gdbpy_ref.
17102
396a78b6
TT
171032017-01-10 Tom Tromey <tom@tromey.com>
17104
17105 * python/python.c (python_interactive_command): Use gdbpy_enter.
17106
a88b13c7
TT
171072017-01-10 Tom Tromey <tom@tromey.com>
17108
17109 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17110 gdbpy_ref.
17111
e9f0c363
TT
171122017-01-10 Tom Tromey <tom@tromey.com>
17113
17114 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17115 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17116
6349f452
TT
171172017-01-10 Tom Tromey <tom@tromey.com>
17118
17119 * utils.h (htab_deleter): New struct.
17120 (htab_up): New typedef.
17121 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17122 gdbpy_enter, gdbpy_ref, htab_up.
17123
c0171de6
TT
171242017-01-10 Tom Tromey <tom@tromey.com>
17125
17126 * python/py-unwind.c (pending_frame_invalidate): Remove.
17127 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17128
f18e226f
TT
171292017-01-10 Tom Tromey <tom@tromey.com>
17130
17131 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17132 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17133
c57af3f1
TT
171342017-01-10 Tom Tromey <tom@tromey.com>
17135
17136 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17137
60e600ec
TT
171382017-01-10 Tom Tromey <tom@tromey.com>
17139
17140 * python/python.c (gdbpy_eval_from_control_command)
17141 (gdbpy_source_script, gdbpy_run_events)
17142 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17143 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17144 gdbpy_enter.
17145
bf7da5b0
TT
171462017-01-10 Tom Tromey <tom@tromey.com>
17147
17148 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17149
2d38bced
TT
171502017-01-10 Tom Tromey <tom@tromey.com>
17151
17152 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17153
07bc7329
TT
171542017-01-10 Tom Tromey <tom@tromey.com>
17155
17156 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17157 (python_on_inferior_call_pre, python_on_inferior_call_post)
17158 (python_on_memory_change, python_on_register_change)
17159 (python_inferior_exit, python_new_objfile, add_thread_object)
17160 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17161
6e7c365e
TT
171622017-01-10 Tom Tromey <tom@tromey.com>
17163
17164 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17165 (bpfinishpy_handle_exit): Use gdbpy_enter.
17166
6ba0cd40
TT
171672017-01-10 Tom Tromey <tom@tromey.com>
17168
17169 * python/py-cmd.c (cmdpy_destroyer)
17170 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17171 gdbpy_enter.
17172
de2dc875
TT
171732017-01-10 Tom Tromey <tom@tromey.com>
17174
17175 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17176 gdbpy_enter.
17177 (gdbpy_breakpoint_has_cond): Likewise.
17178
4ecee2c4
TT
171792017-01-10 Tom Tromey <tom@tromey.com>
17180
17181 * python/python.c (gdbpy_enter): New constructor.
17182 (~gdbpy_enter): New destructor.
17183 (restore_python_env, ensure_python_env): Rewrite.
17184 * python/python-internal.h (gdbpy_enter): New class.
17185
37fce74f
TT
171862017-01-10 Tom Tromey <tom@tromey.com>
17187
17188 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17189
53a0cca3
TT
171902017-01-10 Tom Tromey <tom@tromey.com>
17191
17192 * python/py-value.c (value_has_field, get_field_flag)
17193 (get_field_type, valpy_getitem, convert_value_from_python): Use
17194 gdbpy_ref.
17195
ff3724f5
TT
171962017-01-10 Tom Tromey <tom@tromey.com>
17197
17198 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17199 gdbpy_ref.
17200
0700aea5
TT
172012017-01-10 Tom Tromey <tom@tromey.com>
17202
17203 * python/py-prettyprint.c (search_pp_list)
17204 (find_pretty_printer_from_objfiles)
17205 (find_pretty_printer_from_progspace)
17206 (find_pretty_printer_from_gdb, find_pretty_printer)
17207 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17208 gdbpy_ref.
17209
1bb44c9f
TT
172102017-01-10 Tom Tromey <tom@tromey.com>
17211
17212 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17213
87ce03fd
TT
172142017-01-10 Tom Tromey <tom@tromey.com>
17215
17216 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17217 (ltpy_get_all_source_lines): Use gdbpy_ref.
17218
ee0a3fb8
TT
172192017-01-10 Tom Tromey <tom@tromey.com>
17220
17221 * python/py-framefilter.c (extract_sym, extract_value)
17222 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17223 gdbpy_ref.
17224
bf2a52fa
TT
172252017-01-10 Tom Tromey <tom@tromey.com>
17226
17227 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17228
f59fe7f8
TT
172292017-01-10 Tom Tromey <tom@tromey.com>
17230
17231 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17232
80bd970a
TT
172332017-01-10 Tom Tromey <tom@tromey.com>
17234
17235 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17236 gdbpy_ref.
17237
d1b3de2e
TT
172382017-01-10 Tom Tromey <tom@tromey.com>
17239
17240 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17241
3bb43384
TT
172422017-01-10 Tom Tromey <tom@tromey.com>
17243
17244 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17245 (typy_range): Use gdbpy_ref.
17246
abf5651e
TT
172472017-01-10 Tom Tromey <tom@tromey.com>
17248
17249 * python/py-threadevent.c (create_thread_event_object): Use
17250 gdbpy_ref.
17251 * python/py-stopevent.c (create_stop_event_object): Simplify.
17252 (emit_stop_event): Use gdbpy_ref.
17253 * python/py-signalevent.c (create_signal_event_object): Use
17254 gdbpy_ref.
17255 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17256 (emit_new_objfile_event, create_clear_objfiles_event_object)
17257 (emit_clear_objfiles_event): Use gdbpy_ref.
17258 * python/py-infevents.c (create_inferior_call_event_object)
17259 (create_register_changed_event_object)
17260 (create_memory_changed_event_object, emit_inferior_call_event)
17261 (emit_memory_changed_event, emit_register_changed_event): Use
17262 gdbpy_ref.
17263 * python/py-exitedevent.c (create_exited_event_object)
17264 (emit_exited_event): Use gdbpy_ref.
17265 * python/py-event.h (evpy_emit_event): Remove
17266 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17267 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17268 * python/py-continueevent.c (emit_continue_event): Use
17269 gdbpy_ref.
17270 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17271 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17272 gdbpy_ref.
17273 * python/py-bpevent.c (create_breakpoint_event_object): Use
17274 gdbpy_ref.
17275
a68ff33e
TT
172762017-01-10 Tom Tromey <tom@tromey.com>
17277
17278 * python/py-ref.h: New file.
17279
7becfd03
SM
172802017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17281
17282 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17283 void.
17284 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17285 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17286 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17287 * ui-out.c (ui_out::redirect): Likewise.
17288 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17289 * cli/cli-logging.c (set_logging_redirect): Update call site of
17290 ui_out::redirect.
17291 (handle_redirections): Likewise.
17292 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17293 * top.c (execute_command_to_string): Likewise.
17294 * utils.c (do_ui_out_redirect_pop): Likewise.
17295
df294654
SM
172962017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17297
17298 * stack.c (_initialize_stack): Update "frame" command help message.
17299
f5e6296e
IB
173002017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17301
17302 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17303
0e2d6fa6
YQ
173042017-01-06 Yao Qi <yao.qi@linaro.org>
17305
17306 * x86-linux-nat.h: Include gdb_proc_service.h.
17307
44d6d3f9
YQ
173082017-01-06 Yao Qi <yao.qi@linaro.org>
17309
17310 * ser-base.h: Include serial.h.
17311
656731fe
YQ
173122017-01-06 Yao Qi <yao.qi@linaro.org>
17313
17314 * ppc-linux-tdep.h: Include ppc-tdep.h.
17315
1ca8f924
YQ
173162017-01-06 Yao Qi <yao.qi@linaro.org>
17317
17318 * nat/amd64-linux-siginfo.h: Include signal.h.
17319
bc3008c4
YQ
173202017-01-06 Yao Qi <yao.qi@linaro.org>
17321
17322 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17323
66c80d03
YQ
173242017-01-06 Yao Qi <yao.qi@linaro.org>
17325
17326 * mi/mi-parse.h: Include mi-cmds.h.
17327
051d2dda
YQ
173282017-01-06 Yao Qi <yao.qi@linaro.org>
17329
17330 * inf-loop.c: Don't include "target.h".
17331 * inf-loop.h: Include it here.
17332
8018d34f
YQ
173332017-01-06 Yao Qi <yao.qi@linaro.org>
17334
17335 * dfp.h: Include "dboulest.h" and "expression.h".
17336
c0b8369c
YQ
173372017-01-06 Yao Qi <yao.qi@linaro.org>
17338
17339 * ax-gdb.h: Include "ax.h".
17340
ad5cba2a
YQ
173412017-01-06 Yao Qi <yao.qi@linaro.org>
17342
17343 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17344 with nat/gdb_ptrace.h.
17345
1c33cd7f
YQ
173462017-01-05 Yao Qi <yao.qi@linaro.org>
17347
17348 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17349 new line.
17350 (mips64_fbsd_sigframe_init): Likewise.
17351
c988ac1d
JB
173522017-01-04 John Baldwin <jhb@FreeBSD.org>
17353
17354 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17355 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17356
b268007c
JB
173572017-01-04 John Baldwin <jhb@FreeBSD.org>
17358
17359 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17360 * NEWS: Mention new FreeBSD/mips native configuration.
17361 * config/mips/fbsd.mh: New file.
17362 * configure.host: Add mips*-*-freebsd*.
17363 * mips-fbsd-nat.c: New file.
17364
387360da
JB
173652017-01-04 John Baldwin <jhb@FreeBSD.org>
17366
17367 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17368 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17369 * NEWS: Mention new FreeBSD/mips target.
17370 * configure.tgt: Add mips*-*-freebsd*.
17371 * mips-fbsd-tdep.c: New file.
17372 * mips-fbsd-tdep.h: New file.
17373
2aaaf250
YQ
173742017-01-04 Yao Qi <yao.qi@linaro.org>
17375
17376 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17377 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17378
61baf725
JB
173792017-01-01 Joel Brobecker <brobecker@adacore.com>
17380
6dbb839a 17381 Update copyright year range in all GDB files.
61baf725 17382
c113e7ff 173832017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17384
c113e7ff 17385 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17386
c113e7ff 17387For older changes see ChangeLog-2016.
c906108c
SS
17388\f
17389Local Variables:
17390mode: change-log
17391left-margin: 8
17392fill-column: 74
17393version-control: never
57da7796 17394coding: utf-8
c906108c 17395End:
This page took 2.880532 seconds and 4 git commands to generate.