Fix gdb.threads/process-dies-while-detaching.exp
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
6d83e819
SM
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * common/poison.h (XDELETE): Fix typo.
4
97cbe998
SDJ
52017-12-01 Andrew Cagney <cagney@redhat.com>
6 Joel Brobecker <brobecker@adacore.com>
7 Sergio Durigan Junior <sergiodj@redhat.com>
8
9 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
10 feature.
11 * coffread.c (coff_symfile_read): Do not map over sections with
12 'coff_locate_sections' if readnever is on.
13 * dwarf2read.c (dwarf2_has_info): Return 0 if
14 readnever is on.
15 * elfread.c (elf_symfile_read): Do not map over sections with
16 'elf_locate_sections' if readnever is on.
17 * main.c (validate_readnow_readnever): New function.
18 (captured_main_1): Add support for --readnever.
19 (print_gdb_help): Document --readnever.
20 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
21 flag.
22 * symfile.c (readnever_symbol_files): New global.
23 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
24 'READNEVER_SYMBOL_FILES' is set.
25 (validate_readnow_readnever): New function.
26 (symbol_file_command): Handle '-readnever' option.
27 Call 'validate_readnow_readnever'.
28 (add_symbol_file_command): Handle '-readnever' option.
29 Call 'validate_readnow_readnever'.
30 (_initialize_symfile): Document new '-readnever' option for
31 both 'symbol-file' and 'add-symbol-file' commands.
32 * top.h (readnever_symbol_files): New extern global.
33 * xcoffread.c (xcoff_initial_scan): Do not read debug
34 information if readnever is on.
35
40fc416f
SDJ
362017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * symfile.c (symbol_file_command): Call
39 'symbol_file_add_main_1' only after processing all command
40 line options.
41 (add_symbol_file_command): Modify logic to make arguments
42 position-independent.
43
ec6a20c2
JB
442017-12-01 Joel Brobecker <brobecker@adacore.com>
45
46 * ada-lang.c (symbol_list_obstack): Delete.
47 (resolve_subexp): Make sure "candidates" gets xfree'ed.
48 (ada_lookup_symbol_list_worker): Remove the limitation that
49 the result is only good until the next call, now making it
50 the responsibility of the caller to free the result when no
51 longer needed. Adjust the function's intro comment accordingly.
52 (ada_lookup_symbol_list): Adjust the function's intro comment.
53 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
54 (ada_lookup_encoded_symbol, get_var_value): Likewise.
55 (_initialize_ada_language): Remove symbol_list_obstack
56 initialization.
57 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
58 (write_var_or_type, write_name_assoc): Likewise.
59
d0df06af
TT
602017-12-01 Tom Tromey <tom@tromey.com>
61
62 * Makefile.in (all_deps_files): New variable.
63 Include .Po files using all_deps_files.
64
2ee0c9b3
JB
652017-12-01 Joel Brobecker <brobecker@adacore.com>
66
67 * MAINTAINERS: Update list of maintainers, moving those who
68 stepped down or became inactive to the "Past Maintainers"
69 section.
70
44122162
RO
712017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
72
73 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
74 sys/proc.h.
75 (NEW_PROC_API): Remove.
76 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
77 Likewise.
78 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
79 * configure: Regenerate.
80 * config.in: Regenerate.
81 * gdbserver/configure: Regenerate.
82 * gdbserver/config.in: Regenerate.
83
84 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
85 NEW_PROC_API test.
86 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
87
88 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
89
90 * proc-api.c: Remove !NEW_PROC_API support.
91 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
92 Remove tests for macros always defined on Solaris.
93 * proc-events.c: Remove !NEW_PROC_API support.
94 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
95 HAVE_SYS_USER_H tests.
96 (init_syscall_table): Remove non-Solaris syscalls.
97 Remove tests for syscalls present on all Solaris versions.
98 Add missing Solaris 10+ syscalls.
99 (signal_table): Remove non-Solaris signals.
100 Remove tests for signals present on all Solaris versions.
101 (fault_table): Remove non-Solaris faults.
102 Remove tests for faults present on all Solaris versions.
103 * proc-flags.c: Remove !NEW_PROC_API support.
104 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
105 Remove non-Solaris flags.
106 * proc-why.c: Remove !NEW_PROC_API support.
107 (pr_why_table): Remove meaningless comments.
108 Remove tests for reasons present on all Solaris versions.
109 Remove OSF/1 cases.
110 (proc_prettyfprint_why): Likewise.
111
112 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
113 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
114 Remove WA_READ test, IRIX watchpoint support.
115 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
116 types. Change users.
117 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
118 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
119 Change callers.
120 Remove CTL_PROC_NAME_FMT tests.
121 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
122 users.
123 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
124 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
125 (proc_modify_flag): Replace GDBRESET by PCUNSET.
126 Remove PR_ASYNC, PR_KLC tests.
127 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
128 (proc_parent_pid): Remove PCWATCH etc. tests.
129 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
130 Remove PCAGENT test.
131 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
132 Remove SYS_lwpcreate || SYS_lwp_create test.
133 (proc_get_current_thread): Likewise.
134 [PIOCNTHR && PIOCTLIST]: Remove.
135 [PIOCLSTATUS]: Remove.
136 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
137 [PRFS_STOPEXEC]: Remove.
138 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
139 (syscall_is_exit): Likewise.
140 (syscall_is_exec): Likewise.
141 (syscall_is_lwp_create): Likewise.
142 Remove SYS_syssgi support.
143 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
144 [SYS_syssgi]: Remove.
145 Remove non-Solaris cases, conditionals.
146 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
147 Remove.
148 (procfs_init_inferior) [SYS_syssgi]: Remove.
149 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
150 (procfs_inferior_created) [SYS_syssgi]: Remove.
151 (procfs_set_watchpoint): Remove !AIX5 test.
152 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
153 case.
154 (mappingflags) [MA_PHYS]: Remove.
155 (info_mappings_callback): Remove PCAGENT test.
156 Remove PIOCOPENLWP || PCAGENT test.
157
e8020e54
RO
1582017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
159
160 * sol-thread.c (info_solthreads): Constify args.
161 Cast args to void *.
162
75059544
JB
1632017-11-29 John Baldwin <jhb@FreeBSD.org>
164
165 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
166
f5a91472
JB
1672017-11-29 Joel Brobecker <brobecker@adacore.com>
168
169 * ada-lang.c (to_fixed_range_type): Make sure that the size
170 of the range type being returned is the same as the size
171 of the range type being fixed.
172
bd69330d
PA
1732017-11-29 Pedro Alves <palves@redhat.com>
174
175 PR c++/19436
176 * NEWS: Mention setting breakpoints on functions with C++ ABI
177 tags.
178 * completer.h (completion_match_for_lcd) <match,
179 mark_ignored_range>: New methods.
180 <finish>: Consider ignored ranges.
181 <clear>: Clear ignored ranges.
182 <m_ignored_ranges, m_finished_storage>: New fields.
183 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
184 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
185 completion_match_for_lcd pointer to strncmp_iw_with_mode.
186 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
187 * language.c (default_symbol_name_matcher): Pass the
188 completion_match_for_lcd pointer to strncmp_iw_with_mode.
189 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
190 * utils.c (skip_abi_tag): New function.
191 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
192 Handle ABI tags.
193 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
194 parameter.
195
1962017-11-29 Pedro Alves <palves@redhat.com>
197
198 PR c++/19436
199 * NEWS: Mention setting breakpoints on functions with C++ ABI
200 tags.
201 * completer.h (completion_match_for_lcd) <match,
202 mark_ignored_range>: New methods.
203 <finish>: Consider ignored ranges.
204 <clear>: Clear ignored ranges.
205 <m_ignored_ranges, m_finished_storage>: New fields.
206 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
207 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
208 completion_match_for_lcd pointer to strncmp_iw_with_mode.
209 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
210 * language.c (default_symbol_name_matcher): Pass the
211 completion_match_for_lcd pointer to strncmp_iw_with_mode.
212 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
213 * utils.c (skip_abi_tag): New function.
214 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
215 Handle ABI tags.
216 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
217 parameter.
218
a20714ff
PA
2192017-11-29 Pedro Alves <palves@redhat.com>
220
221 * NEWS: Mention that breakpoints on C++ functions are now set on
222 on all namespaces/classes by default, and mention "break
223 -qualified".
224 * ax-gdb.c (agent_command_1): Adjust to pass a
225 symbol_name_match_type to new_linespec_location.
226 * breakpoint.c (parse_breakpoint_sals): Adjust to
227 get_linespec_location's return type change.
228 (strace_marker_create_sals_from_location): Adjust to pass a
229 symbol_name_match_type to new_linespec_location.
230 (strace_marker_decode_location): Adjust to get_linespec_location's
231 return type change.
232 (strace_command): Adjust to pass a symbol_name_match_type to
233 new_linespec_location.
234 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
235 mention "-qualified".
236 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
237 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
238 enumerator.
239 (complete_address_and_linespec_locations): New parameter
240 'match_type'. Pass it down.
241 (explicit_options): Add "-qualified".
242 (collect_explicit_location_matches): Pass the requested match type
243 to the linespec completers. Handle MATCH_QUALIFIED.
244 (location_completer): Handle "-qualified" combined with linespecs.
245 * cp-support.c (cp_search_name_hash): New.
246 (cp_symbol_name_matches_1): Implement wild matching for C++.
247 (cp_fq_symbol_name_matches): Reimplement.
248 (cp_get_symbol_name_matcher): Return different matchers depending
249 on the lookup name's match type.
250 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
251 * cp-support.h (cp_search_name_hash): New declaration.
252 * dwarf2read.c
253 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
254 symbols.
255 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
256 tests.
257 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
258 pass a symbol_name_match_type to new_linespec_location.
259 * linespec.c (linespec_parse_basic): Lookup function symbols using
260 the parser's symbol name match type.
261 (convert_explicit_location_to_linespec): New
262 symbol_name_match_type parameter. Pass it down to
263 find_linespec_symbols.
264 (convert_explicit_location_to_sals): Pass the location's name
265 match type to convert_explicit_location_to_linespec.
266 (parse_linespec): New match_type parameter. Save it in the
267 parser.
268 (linespec_parser_new): Default to symbol_name_match_type::WILD.
269 (linespec_complete_function): New symbol_name_match_type
270 parameter. Use it.
271 (complete_linespec_component): Pass down the parser's recorded
272 name match type.
273 (linespec_complete_label): New symbol_name_match_type parameter.
274 Use it.
275 (linespec_complete): New symbol_name_match_type parameter. Save
276 it in the parser and pass it down. Adjust to
277 get_linespec_location's prototype change.
278 (find_function_symbols, find_linespec_symbols): New
279 symbol_name_match_type parameter. Pass it down instead of
280 assuming symbol_name_match_type::WILD.
281 * linespec.h (linespec_complete, linespec_complete_function)
282 (linespec_complete_label): New symbol_name_match_type parameter.
283 * location.c (event_location::linespec_location): Now a struct
284 linespec_location.
285 (EL_LINESPEC): Adjust.
286 (initialize_explicit_location): Default to
287 symbol_name_match_type::WILD.
288 (new_linespec_location): New symbol_name_match_type parameter.
289 Record it in the location.
290 (get_linespec_location): Now returns a struct linespec_location.
291 (new_explicit_location): Also copy func_name_match_type.
292 (explicit_to_string_internal)
293 (string_to_explicit_location): Handle "-qualified".
294 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
295 Copy symbol_name_match_type fields.
296 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
297 type change.
298 (event_location_to_string): Adjust to LINESPEC_LOCATION type
299 change. Handle "-qualfied".
300 (string_to_explicit_location): Handle "-qualified".
301 (string_to_event_location_basic): New symbol_name_match_type
302 parameter. Pass it down.
303 (string_to_event_location): Handle "-qualified".
304 * location.h (struct linespec_location): New.
305 (explicit_location::func_name_match_type): New field.
306 (new_linespec_location): Now returns a const linespec_location *.
307 (string_to_event_location_basic): New symbol_name_match_type
308 parameter.
309 (explicit_completion_info::saw_explicit_location_option): New
310 field.
311 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
312 symbol_name_match_type to new_linespec_location.
313 * python/py-breakpoint.c (bppy_init): Likewise.
314 * python/python.c (gdbpy_decode_line): Likewise.
315
a207cff2
PA
3162017-11-29 Pedro Alves <palves@redhat.com>
317
318 * ada-lang.c (ada_lookup_name_info::matches): Change type of
319 parameter from completion_match to completion_match_result.
320 Adjust.
321 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
322 * completer.c (completion_tracker::maybe_add_completion): Add
323 match_for_lcd parameter and use it.
324 (completion_tracker::add_completion): Likewise.
325 * completer.h (class completion_match_for_lcd): New class.
326 (completion_match_result::match_for_lcd): New field.
327 (completion_match_result::set_match): New method.
328 (completion_tracker): Add comments.
329 (completion_tracker::add_completion): Add match_for_lcd parameter.
330 (completion_tracker::reset_completion_match_result): Reset
331 match_for_lcd too.
332 (completion_tracker::maybe_add_completion): Add match_for_lcd
333 parameter.
334 (completion_tracker::m_lowest_common_denominator_unique): Extend
335 comments.
336 * cp-support.c (cp_symbol_name_matches_1)
337 (cp_fq_symbol_name_matches): Change type of parameter from
338 completion_match to completion_match_result. Adjust.
339 * language.c (default_symbol_name_matcher): Change type of
340 parameter from completion_match to completion_match_result.
341 Adjust.
342 * language.h (completion_match_for_lcd): Forward declare.
343 (default_symbol_name_matcher): Change type of parameter from
344 completion_match to completion_match_result.
345 * symtab.c (compare_symbol_name): Adjust.
346 (completion_list_add_name): Pass the match_for_lcd to the tracker.
347 * symtab.h (ada_lookup_name_info::matches): Change type of
348 parameter from completion_match to completion_match_result.
349 (symbol_name_matcher_ftype): Likewise, and update comments.
350
4024cf2b
PA
3512017-11-29 Pedro Alves <palves@redhat.com>
352
353 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
354 * minsyms.c (msymbol_is_text): Delete.
355 (msymbol_is_function): New function.
356 * minsyms.h (msymbol_is_text): Delete.
357 (msymbol_is_function): New declaration.
358 * symtab.c (find_function_alias_target): Use msymbol_is_function.
359
5dcf52c1
TT
3602017-11-29 Tom Tromey <tom@tromey.com>
361
362 * Makefile.in (distclean): Handle the case where rmdir fails.
363
8ca2f0b9
TT
3642017-11-29 Tom Tromey <tom@tromey.com>
365
366 * symfile.c (_initialize_symfile): Update usage text for
367 add-symbol-file, symbol-file, load.
368
02ca603a
TT
3692017-11-29 Tom Tromey <tom@tromey.com>
370
371 * symfile.c (add_symbol_file_command): Error if some arguments to
372 -s are missing. Change unrecognized-argument error message.
373 (_initialize_symfile): Fix usage text for add-symbol-file.
374
18ca7347
TT
3752017-11-27 Tom Tromey <tom@tromey.com>
376
377 * Makefile.in (REMOTE_OBS): Remove.
378 (SFILES): Remove remote sources.
379 (COMMON_SFILES): Add remote sources.
380 (ALLDEPFILES): Remove dcache.c.
381
66599a7d
TT
3822017-11-27 Tom Tromey <tom@tromey.com>
383
384 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
385 variables.
386 (SFILES): Use SUBDIR_TARGET_SRCS.
387 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
388 (CONFIG_SRC_SUBDIR): Add target.
389 (%.o): Remove target rule.
390
4f04fba8
TT
3912017-11-27 Tom Tromey <tom@tromey.com>
392
393 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
394 registry.o, thread-fsm.o, debug.o.
395 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
396 thread-fsm.c, debug.c.
397
b5adff3b
TT
3982017-11-27 Tom Tromey <tom@tromey.com>
399
400 * Makefile.in (COMMON_SFILES): New.
401 (SFILES): Move some entries to COMMON_SFILES.
402 (COMMON_OBS): Use COMMON_SFILES.
403
afa0a411
TT
4042017-11-27 Tom Tromey <tom@tromey.com>
405
406 * Makefile.in (YYFILES): Update comment.
407 (YYOBJ): Redefine.
408
8fd8d003
TT
4092017-11-27 Tom Tromey <tom@tromey.com>
410
411 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
412 (CONFIG_SRC_SUBDIR): Add python.
413 (%.o): Remove python rule.
414 (python/%.o): New rule.
415 * configure: Rebuild.
416 * configure.ac (CONFIG_OBS): Refer to python/python.o
417
bd810fff
TT
4182017-11-27 Tom Tromey <tom@tromey.com>
419
420 * configure: Rebuild.
421 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
422 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
423 (CONFIG_SRC_SUBDIR): Add guile.
424 (%.o): Remove guile rule.
425
75787ac1
TT
4262017-11-27 Tom Tromey <tom@tromey.com>
427
428 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
429 (%.o): Remove unittests rule.
430 (CONFIG_SRC_SUBDIR): Add unittests.
431
5c8a9431
TT
4322017-11-27 Tom Tromey <tom@tromey.com>
433
434 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
435 (CONFIG_SRC_SUBDIR): Add tui.
436 (%.o): Remove tui rule.
437
a26aa30c
TT
4382017-11-27 Tom Tromey <tom@tromey.com>
439
440 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
441 (%.o): Remove compile rule.
442 (CONFIG_SRC_SUBDIR): Add compile.
443
6f3cdf9a
TT
4442017-11-27 Tom Tromey <tom@tromey.com>
445
446 * Makefile.in (SUBDIR_MI_OBS): Redefine.
447 (%.o): Remove mi rule.
448 (CONFIG_SRC_SUBDIR): Add mi.
449 (COMMON_OBS): Use mi/mi-common.o
450
f06afa53
TT
4512017-11-27 Tom Tromey <tom@tromey.com>
452
453 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
454 (%.o): Remove cli rule.
455 (CONFIG_SRC_SUBDIR): Add cli.
456
b22c88c2
TT
4572017-11-27 Tom Tromey <tom@tromey.com>
458
459 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
460 * configure: Rebuild.
461 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
462 (CONFIG_DEP_SUBDIR): New variable.
463 (%.o): Add order-only dependency.
464 ($(CONFIG_DEP_SUBDIR)): New target.
465
ee9a09e9
DC
4662017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
467
468 PR gdb/21945
469 * findcmd.c (_initialize_mem_search): Update find command help
470 text.
471
e8e7d10c
SM
4722017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * python/python.c (do_start_initialization): Change progname
475 type to gdb::unique_xmalloc_ptr. Release the pointer when using
476 Python 2.
477
6a997029
TT
4782017-11-26 Tom Tromey <tom@tromey.com>
479
480 * common/format.h: Add include guards.
481
41272101
TT
4822017-11-26 Tom Tromey <tom@tromey.com>
483
484 * nat/linux-personality.h (class
485 maybe_disable_address_space_randomization): New class.
486 (maybe_disable_address_space_randomization): Don't declare
487 function.
488 * nat/linux-personality.c (restore_personality)
489 (make_disable_asr_cleanup): Remove.
490 (maybe_disable_address_space_randomization): Now a constructor.
491 (~maybe_disable_address_space_randomization): New destructor.
492 * linux-nat.c (linux_nat_create_inferior): Update.
493
44287fd8
TT
4942017-11-26 Tom Tromey <tom@tromey.com>
495
496 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
497
5ffd2cb7
UW
4982017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
499
500 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
501 "cooked" register. Access only first four bytes of branch target
502 registers.
503
0e5457dc
SDJ
5042017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
505
506 PR gdb/22491
507 * stap-probe.c (relocate_address): New function.
508 (stap_probe::get_relocated_address): Use 'relocate_address'.
509 (stap_probe::set_semaphore): Use 'relocate_address' and pass
510 'm_sem_addr'.
511 (stap_probe::clear_semaphore): Likewise.
512
deeeba55
PA
5132017-11-25 Pedro Alves <palves@redhat.com>
514
515 * dictionary.c: Include "safe-ctype.h".
516 * minsyms.c: Include "safe-ctype.h".
517 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
518
a81aaca0
PA
5192017-11-25 Pedro Alves <palves@redhat.com>
520
521 * completer.c (complete_line_internal_1): Skip spaces until the
522 start of the command.
523
0662b6a7
PA
5242017-11-24 Pedro Alves <palves@redhat.com>
525
526 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
527 cp_fq_symbol_name_matches. Pass language_cplus to
528 strncmp_with_mode.
529 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
530 (selftests::test_cp_symbol_name_cmp): New.
531 (_initialize_cp_support): Register "cp_symbol_name_matches"
532 selftests.
533 * language.c (default_symbol_name_matcher): Pass language_minimal
534 to strncmp_iw_with_mode.
535 * utils.c: Include "cp-support.h" and <algorithm>.
536 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
537 (cp_is_operator): New functions.
538 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
539 skip whitespace in the symbol name when the lookup name doesn't
540 have spaces, and vice versa.
541 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
542 * utils.h (strncmp_iw_with_mode): Add language parameter.
543
e547c119
JB
5442017-11-24 Joel Brobecker <brobecker@adacore.com>
545
546 * ada-lang.c (ada_exception_message_1, ada_exception_message):
547 New functions.
548 (print_it_exception): If available, display the exception
549 message as well.
550 * NEWS: Document new feature.
551
d7fcdff9
UW
5522017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
553
554 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
555
30649c14
PR
5562017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
557
558 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
559 (dtrace_probe::is_enabled, dtrace_probe::enable)
560 (dtrace_probe::disable): Remove keyword 'struct' at for-range
561 variable
562 * probe.c (gen_ui_out_table_header_info)
563 (print_ui_out_not_applicables): Remove keyword 'struct' at
564 for-range variable
565
7696f5c9
AH
5662017-11-24 Alan Hayward <alan.hayward@arm.com>
567
568 * configure.tgt: Add arch/aarch64.o
569
8172f16b
SM
5702017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
571
572 * common/common-utils.h: Include poison.h.
573 (xfree): Remove declaration, add definition with static_assert.
574 * common/common-utils.c (xfree): Remove.
575 * common/poison.h (IsMallocatable): Define.
576 (IsFreeable): Define.
577 (free): Delete for non-freeable types.
578 (xnew): New.
579 (XNEW): Undef and redefine.
580 (xcnew): New.
581 (XCNEW): Undef and redefine.
582 (xdelete): New.
583 (XDELETE): Undef and redefine.
584 (xnewvec): New.
585 (XNEWVEC): Undef and redefine.
586 (xcnewvec): New.
587 (XCNEWVEC): Undef and redefine.
588 (xresizevec): New.
589 (XRESIZEVEC): Undef and redefine.
590 (xdeletevec): New.
591 (XDELETEVEC): Undef and redefine.
592 (xnewvar): New.
593 (XNEWVAR): Undef and redefine.
594 (xcnewvar): New.
595 (XCNEWVAR): Undef and redefine.
596 (xresizevar): New.
597 (XRESIZEVAR): Undef and redefine.
598
7aabaf9d
SM
5992017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
600
601 * gdbthread.h (private_thread_info): Define structure type, add
602 virtual pure destructor.
603 (thread_info) <priv>: Change type to unique_ptr.
604 <private_dtor>: Remove.
605 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
606 (private_thread_info::~private_thread_info): Provide default
607 implementation.
608 (thread_info::~thread_info): Don't call private_dtor nor
609 manually free priv.
610 * aix-thread.c (private_thread_info): Rename to ...
611 (aix_thread_info): ... this.
612 (get_aix_thread_info): New.
613 (sync_threadlists): Adjust.
614 (iter_tid): Adjust.
615 (aix_thread_resume): Adjust.
616 (aix_thread_fetch_registers): Adjust.
617 (aix_thread_store_registers): Adjust.
618 (aix_thread_extra_thread_info): Adjust.
619 * darwin-nat.h (private_thread_info): Rename to ...
620 (darwin_thread_info): ... this.
621 (get_darwin_thread_info): New.
622 * darwin-nat.c (darwin_init_thread_list): Adjust.
623 (darwin_check_new_threads): Adjust.
624 (thread_info_from_private_thread_info): Adjust.
625 * linux-thread-db.c (private_thread_info): Rename to ...
626 (thread_db_thread_info): ... this, initialize fields.
627 (get_thread_db_thread_info): New.
628 <dying>: Change type to bool.
629 (update_thread_state): Adjust to type rename.
630 (record_thread): Adjust to type rename an use of unique_ptr.
631 (thread_db_pid_to_str): Likewise.
632 (thread_db_extra_thread_info): Likewise.
633 (thread_db_thread_handle_to_thread_info): Likewise.
634 (thread_db_get_thread_local_address): Likewise.
635 * nto-tdep.h (private_thread_info): Rename to ...
636 (nto_thread_info): ... this, initialize fields.
637 (get_nto_thread_info): New.
638 <name>: Change type to std::string.
639 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
640 use of unique_ptr.
641 * nto-procfs.c (update_thread_private_data_name): Adjust to
642 std::string change, allocate nto_private_thread_info with new.
643 (update_thread_private_data): Adjust to unique_ptr.
644 * remote.c (private_thread_info): Rename to ...
645 (remote_thread_info): ... this, initialize data members with
646 default values.
647 <extra, name>: Change type to std::string.
648 <thread_handle>: Change type to non-pointer.
649 (free_private_thread_info): Remove.
650 (get_private_info_thread): Rename to...
651 (get_remote_thread_info): ... this, change return type, adjust to
652 use of unique_ptr, use remote_thread_info constructor.
653 (remote_add_thread): Adjust.
654 (get_private_info_ptid): Rename to...
655 (get_remote_thread_info): ...this, change return type.
656 (remote_thread_name): Use get_remote_thread_info, adjust to
657 change to std::string.
658 (struct thread_item) <~thread_item>: Remove.
659 <thread_handle>: Make non pointer.
660 (start_thread): Adjust to thread_item::thread_handle type
661 change.
662 (remote_update_thread_list): Adjust to type name change, move
663 strings from temporary to long-lived object instead of
664 duplicating.
665 (remote_threads_extra_info): Use get_remote_thread_info.
666 (process_initial_stop_replies): Likewise.
667 (resume_clear_thread_private_info): Likewise.
668 (remote_resume): Adjust to type name change.
669 (remote_commit_resume): Use get_remote_thread_info.
670 (process_stop_reply): Adjust to type name change.
671 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
672 (remote_stopped_by_hw_breakpoint): Likewise.
673 (remote_stopped_by_watchpoint): Likewise.
674 (remote_stopped_data_address): Likewise.
675 (remote_core_of_thread): Likewise.
676 (remote_thread_handle_to_thread_info): Use
677 get_private_info_thread, adjust to thread_handle field type
678 change.
679
21fe1c75
SM
6802017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
681
682 * remote.c (struct thread_item): Add constructor, disable copy
683 construction and copy assignment, define default move
684 construction and move assignment.
685 <extra, name>: Change type to std::string.
686 <core>: Initialize.
687 <thread_handle>: Make non-pointer.
688 (thread_item_t): Remove typedef.
689 (DEF_VEC_O(thread_item_t)): Remove.
690 (threads_listing_context) <contains_thread>: New method.
691 <remove_thread>: New method.
692 <items>: Change type to std::vector.
693 (clear_threads_listing_context): Remove.
694 (threads_listing_context_remove): Remove.
695 (remote_newthread_step): Use thread_item constructor, adjust to
696 change to std::vector.
697 (start_thread): Use thread_item constructor, adjust to change to
698 std::vector.
699 (end_thread): Adjust to change to std::vector and std::string.
700 (remote_get_threads_with_qthreadinfo): Use thread_item
701 constructor, adjust to std::vector.
702 (remote_update_thread_list): Adjust to change to std::vector and
703 std::string, use threads_listing_context methods.
704 (remove_child_of_pending_fork): Adjust.
705 (remove_new_fork_children): Adjust.
706 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
707 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
708 * unittests/rsp-low-selftests.c: New file.
709 * common/rsp-low.h: Include common/byte-vector.h.
710 (hex2bin): New overload.
711 * common/rsp-low.c (hex2bin): New overload.
712
089354bb
SM
7132017-11-24 Simon Marchi <simon.marchi@ericsson.com>
714
715 * inferior.h (private_inferior): Define structure type, add
716 virtual pure destructor.
717 (inferior) <priv>: Change type to unique_ptr.
718 * inferior.c (private_inferior::~private_inferior): Provide
719 default implementation.
720 (inferior::~inferior): Don't free priv field.
721 (exit_inferior_1): Likewise.
722 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
723 (darwin_exception_info): Remove typedef.
724 (DEF_VEC_O (darwin_thread_t)); Remove.
725 (private_inferior): Rename to ...
726 (darwin_private_inferior): ... this, extend private_inferior.
727 (get_darwin_inferior): New.
728 <threads>: Change type to std::vector of darwin_thread_t pointers.
729 * darwin-nat.c (darwin_check_new_threads): Adjust.
730 (find_inferior_task_it): Adjust.
731 (darwin_find_thread); Adjust.
732 (darwin_suspend_inferior): Adjust.
733 (darwin_resume_inferior): Adjust.
734 (darwin_find_new_inferior): Adjust.
735 (darwin_decode_notify_message): Adjust.
736 (darwin_send_reply): Adjust.
737 (darwin_resume_inferior_threads): Adjust.
738 (darwin_suspend_inferior_threads): Adjust.
739 (darwin_decode_message): Adjust.
740 (darwin_wait): Adjust.
741 (darwin_interrupt): Adjust.
742 (darwin_deallocate_threads): Adjust.
743 (darwin_mourn_inferior): Adjust, don't free private data.
744 (darwin_reply_to_all_pending_messages): Adjust.
745 (darwin_stop_inferior): Adjust.
746 (darwin_setup_exceptions): Adjust.
747 (darwin_kill_inferior): Adjust.
748 (darwin_setup_request_notification): Adjust.
749 (darwin_attach_pid): Adjust.
750 (darwin_init_thread_list): Adjust.
751 (darwin_setup_fake_stop_event): Adjust.
752 (darwin_attach): Adjust.
753 (darwin_detach): Adjust.
754 (darwin_xfer_partial): Adjust.
755 (set_enable_mach_exceptions): Adjust.
756 (darwin_pid_to_exec_file): Adjust.
757 (darwin_get_ada_task_ptid): Adjust.
758 * darwin-nat-info.c (get_task_from_args): Adjust.
759 (info_mach_ports_command): Adjust.
760 (info_mach_region_command): Adjust.
761 (info_mach_exceptions_command): Adjust.
762 * remote.c (private_inferior): Rename to ...
763 (remote_private_inferior): ... this, initialize fields.
764 (get_remote_inferior); New.
765 (remote_commit_resume): Use get_remote_inferior.
766 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
767
d044bac8
PA
7682017-11-24 Pedro Alves <palves@redhat.com>
769
770 * NEWS: Mention linespecs and explicit locations, and completion
771 improvements.
772
e8d58cba
YQ
7732017-11-24 Yao Qi <yao.qi@linaro.org>
774
775 * regcache.c (regcache::dump): Remove footnote_register_size.
776
a63f2d2f
YQ
7772017-11-24 Yao Qi <yao.qi@linaro.org>
778
779 * regcache.c (cooked_read_test): Add more test for readonly
780 regcache.
781
1b30aaa5
YQ
7822017-11-24 Yao Qi <yao.qi@linaro.org>
783
784 * gdbarch-selftests.c (test_target_has_registers): Move it to
785 target.c.
786 (test_target_has_stack): Likewise.
787 (test_target_has_memory): Likewise.
788 (test_target_prepare_to_store): Likewise.
789 (test_target_store_registers): Likewise.
790 (test_target_ops): Likewise.
791 * regcache.c: Include selftest-arch.h and gdbthread.h.
792 (target_ops_no_register): New class.
793 (test_target_fetch_registers): New.
794 (test_target_store_registers): New.
795 (test_target_xfer_partial): New.
796 (readwrite_regcache): New.
797 (cooked_read_test): New.
798 (_initialize_regcache): Register the test.
799 * target.c: (test_target_has_registers): Moved from
800 gdbarch-selftests.c.
801 (test_target_has_stack): Likewise.
802 (test_target_has_memory): Likewise.
803 (test_target_prepare_to_store): Likewise.
804 (test_target_store_registers): Likewise.
805 * target.h (test_target_ops): New class.
806
6654d750
AH
8072017-11-24 Alan Hayward <alan.hayward@arm.com>
808
809 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
810 selftest.
811
49bdb7ee
AH
8122017-11-24 Alan Hayward <alan.hayward@arm.com>
813
814 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
815 * arch/aarch64.c (aarch64_create_target_description): Create
816 new target description.
817 * features/Makefile: Add new files.
818 * features/aarch64.c: Remove file.
819 * features/aarch64-core.c: New autogenerated file.
820 * features/aarch64-fpu.c: New autogenerated file.
821 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
822
8232017-11-24 Alan Hayward <alan.hayward@arm.com>
824
825 * Makefile.in: Add new files.
826 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
827 aarch64_read_description.
828 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
829 Call aarch64_read_description.
830 * aarch64-tdep.c (aarch64_read_description): New function.
831 (aarch64_gdbarch_init): Call aarch64_read_description.
832 * aarch64-tdep.h (aarch64_read_description): New function.
833 * arch/aarch64.c: New file.
834 * configure.tgt: Add new files.
835
98ead37e
YQ
8362017-11-24 Yao Qi <yao.qi@linaro.org>
837
838 * mi/mi-main.c (register_changed_p): Update.
839 * value.c (value_contents_bits_eq): Change return type.
840 (value_contents_eq): Likewise.
841 * value.h: Update comments.
842
62ad7ce7
YQ
8432017-11-24 Yao Qi <yao.qi@linaro.org>
844
845 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
846 local 'changed'. Remove error.
847 (register_changed_p): Change return type to bool.
848
506fe5f4
YQ
8492017-11-24 Yao Qi <yao.qi@linaro.org>
850
851 * arch/tic6x.c: New file.
852 * arch/tic6x.h: New file.
853 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
854 tic6x-core.xml and tic6x-gp.xml.
855 * features/tic6x-c6xp.c: Generated.
856 * features/tic6x-core.c: Generated.
857 * features/tic6x-gp.c: Generated.
858 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
859 "tic6x-".
860
00ea2e2a
SM
8612017-11-23 Simon Marchi <simon.marchi@ericsson.com>
862
863 * mi/mi-main.c (list_available_thread_groups): Change map value
864 type to std::vector.
865
f45e2a77
SM
8662017-11-23 Simon Marchi <simon.marchi@ericsson.com>
867
868 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
869
bd046f64
SM
8702017-11-23 Simon Marchi <simon.marchi@ericsson.com>
871
872 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
873 back to...
874 <children_requested>: ... this.
875 (varobj_get_num_children, varobj_update): Adjust.
876
4c37490d
SM
8772017-11-23 Simon Marchi <simon.marchi@ericsson.com>
878
879 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
880 (ada_value_has_mutated): Likewise.
881 * c-varobj.c (varobj_is_anonymous_child): Likewise.
882 (c_is_path_expr_parent): Likewise.
883 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
884 (mi_cmd_var_set_frozen): Likewise.
885 (mi_cmd_var_update_iter): Likewise.
886 (mi_cmd_var_update): Likewise.
887 * varobj.c (pretty_printing): Likewise.
888 (varobj_enable_pretty_printing): Likewise.
889 (struct varobj_root) <floating, is_valid>: Likewise.
890 (struct varobj_dynamic) <children_requested>: Likewise.
891 (delete_variable): Likewise.
892 (delete_variable_1): Likewise.
893 (install_variable): Likewise.
894 (update_type_if_necessary): Likewise.
895 (install_new_value): Likewise.
896 (value_of_root): Likewise.
897 (is_root_p): Likewise.
898 (varobj_create): Likewise.
899 (varobj_delete): Likewise.
900 (varobj_has_more): Likewise.
901 (varobj_set_frozen): Likewise.
902 (varobj_get_frozen): Likewise.
903 (install_dynamic_child): Likewise.
904 (dynamic_varobj_has_child_method): Likewise.
905 (update_dynamic_varobj_children): Likewise.
906 (varobj_get_num_children): Likewise.
907 (varobj_list_children): Likewise.
908 (is_path_expr_parent): Likewise.
909 (varobj_default_is_path_expr_parent): Likewise.
910 (varobj_is_dynamic_p): Likewise.
911 (varobj_set_value): Likewise.
912 (varobj_value_has_mutated): Likewise.
913 (varobj_update): Likewise.
914 (check_scope): Likewise.
915 (value_of_root_1): Likewise.
916 (varobj_value_get_print_value): Likewise.
917 (varobj_editable_p): Likewise.
918 (varobj_value_is_changeable_p): Likewise.
919 (varobj_floating_p): Likewise.
920 (varobj_default_value_is_changeable_p): Likewise.
921 (varobj_invalidate_iter): Likewise.
922 * varobj.h (struct varobj_update_result) <type_changed,
923 children_changed, changed, value_installed>: Likewise.
924 (struct varobj) <updated, frozen, not_fetched>: Likewise.
925 (struct lang_varobj_ops) <value_is_changeable_p,
926 value_has_mutated, is_path_expr_parent>: Likewise.
927 (varobj_delete): Likewise.
928 (varobj_set_frozen): Likewise.
929 (varobj_get_frozen): Likewise.
930 (varobj_set_value): Likewise.
931 (varobj_update): Likewise.
932 (varobj_editable_p): Likewise.
933 (varobj_floating_p): Likewise.
934 (varobj_has_more): Likewise.
935 (varobj_is_dynamic_p): Likewise.
936 (varobj_default_value_is_changeable_p): Likewise.
937 (varobj_value_is_changeable_p): Likewise.
938 (varobj_is_anonymous_child): Likewise.
939 (varobj_default_is_path_expr_parent): Likewise.
940
9c23b42f
SDJ
9412017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
942
943 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
944 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
945 <type_str>: Convert to 'std::string'.
946 <expr>: Convert to 'expression_up'.
947 (dtrace_probe_arg_s): Delete type and VEC.
948 (dtrace_probe_enabler_s): Likewise.
949 (struct dtrace_probe): Replace by...
950 (class dtrace_static_probe_ops): ...this and...
951 (class dtrace_probe): ...this.
952 (dtrace_probe_is_linespec): Rename to...
953 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
954 to reflect change.
955 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
956 Adjust code. Create new instance of 'dtrace_probe'.
957 (dtrace_build_arg_exprs): Rename to...
958 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
959 reflect change.
960 (dtrace_get_probes): Rename to...
961 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
962 to reflect change.
963 (dtrace_get_arg): Rename to...
964 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
965 reflect change.
966 (dtrace_probe_is_enabled): Rename to...
967 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
968 change.
969 (dtrace_get_probe_address): Rename to...
970 (dtrace_probe::get_relocated_address): ...this. Adjust code
971 to reflect change.
972 (dtrace_get_probe_argument_count): Rename to...
973 (dtrace_probe::get_argument_count): ...this. Adjust code to
974 reflect change.
975 (dtrace_can_evaluate_probe_arguments): Rename to...
976 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
977 to reflect change.
978 (dtrace_evaluate_probe_argument): Rename to...
979 (dtrace_probe::evaluate_argument): ...this. Adjust code to
980 reflect change.
981 (dtrace_compile_to_ax): Rename to...
982 (dtrace_probe::compile_to_ax): ...this. Adjust code to
983 reflect change.
984 (dtrace_probe_destroy): Delete.
985 (dtrace_type_name): Rename to...
986 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
987 reflect change.
988 (dtrace_probe::get_static_ops): New method.
989 (dtrace_gen_info_probes_table_header): Rename to...
990 (dtrace_static_probe_ops::gen_info_probes_table_header):
991 ...this. Adjust code to reflect change.
992 (dtrace_gen_info_probes_table_values): Rename to...
993 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
994 code to reflect change.
995 (dtrace_enable_probe): Rename to...
996 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
997 change.
998 (dtrace_disable_probe): Rename to...
999 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1000 change.
1001 (struct probe_ops dtrace_probe_ops): Delete.
1002 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1003 instead of 'info_probes_for_ops'.
1004 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1005 of 'all_probe_ops'.
1006
0e9ae10f
SDJ
10072017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1008 Simon Marchi <simark@simark.ca>
1009
1010 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1011 variable.
1012 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1013 <aexpr>: Change type to 'expression_up'.
1014 (stap_probe_arg_s): Delete type and VEC.
1015 (struct stap_probe): Delete. Replace by...
1016 (class stap_static_probe_ops): ...this and...
1017 (class stap_probe): ...this. Rename variables to add 'm_'
1018 prefix. Do not use 'union' for arguments anymore.
1019 (stap_get_expected_argument_type): Receive probe name instead
1020 of 'struct stap_probe'. Adjust code.
1021 (stap_parse_probe_arguments): Rename to...
1022 (stap_probe::parse_arguments): ...this. Adjust code to
1023 reflect change.
1024 (stap_get_probe_address): Rename to...
1025 (stap_probe::get_relocated_address): ...this. Adjust code
1026 to reflect change.
1027 (stap_get_probe_argument_count): Rename to...
1028 (stap_probe::get_argument_count): ...this. Adjust code
1029 to reflect change.
1030 (stap_get_arg): Rename to...
1031 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1032 reflect change.
1033 (can_evaluate_probe_arguments): Rename to...
1034 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1035 to reflect change.
1036 (stap_evaluate_probe_argument): Rename to...
1037 (stap_probe::evaluate_argument): ...this. Adjust code
1038 to reflect change.
1039 (stap_compile_to_ax): Rename to...
1040 (stap_probe::compile_to_ax): ...this. Adjust code to
1041 reflect change.
1042 (stap_probe_destroy): Delete.
1043 (stap_modify_semaphore): Adjust comment.
1044 (stap_set_semaphore): Rename to...
1045 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1046 change.
1047 (stap_clear_semaphore): Rename to...
1048 (stap_probe::clear_semaphore): ...this. Adjust code to
1049 reflect change.
1050 (stap_probe::get_static_ops): New method.
1051 (handle_stap_probe): Adjust code to create instance of
1052 'stap_probe'.
1053 (stap_get_probes): Rename to...
1054 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1055 reflect change.
1056 (stap_probe_is_linespec): Rename to...
1057 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1058 reflect change.
1059 (stap_type_name): Rename to...
1060 (stap_static_probe_ops::type_name): ...this. Adjust code to
1061 reflect change.
1062 (stap_gen_info_probes_table_header): Rename to...
1063 (stap_static_probe_ops::gen_info_probes_table_header):
1064 ...this. Adjust code to reflect change.
1065 (stap_gen_info_probes_table_values): Rename to...
1066 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1067 code to reflect change.
1068 (struct probe_ops stap_probe_ops): Delete.
1069 (info_probes_stap_command): Use 'info_probes_for_spops'
1070 instead of 'info_probes_for_ops'.
1071 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1072 of 'all_probe_ops'.
1073
935676c9
SDJ
10742017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1075
1076 * break-catch-throw.c (fetch_probe_arguments): Use
1077 'probe.prob' instead of 'probe.probe'.
1078 * breakpoint.c (create_longjmp_master_breakpoint): Call
1079 'can_evaluate_arguments' and 'get_relocated_address' methods
1080 from probe.
1081 (create_exception_master_breakpoint): Likewise.
1082 (add_location_to_breakpoint): Use 'sal->prob' instead of
1083 'sal->probe'.
1084 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1085 probe.
1086 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1087 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1088 of 'probe_ops'.
1089 (probe_key_free): Call 'delete' on probe.
1090 (check_exception_resume): Use 'probe.prob' instead of
1091 'probe.probe'.
1092 * location.c (string_to_event_location_basic): Call
1093 'probe_linespec_to_static_ops'.
1094 * probe.c (class any_static_probe_ops): New class.
1095 (any_static_probe_ops any_static_probe_ops): New variable.
1096 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1097 argument. Adjust code to reflect change.
1098 (parse_probes): Use 'static_probe_ops' instead of
1099 'probe_ops'. Adjust code to reflect change.
1100 (find_probes_in_objfile): Call methods to get name and
1101 provider from probe.
1102 (find_probe_by_pc): Use 'result.prob' instead of
1103 'result.probe'. Call 'get_relocated_address' method from
1104 probe.
1105 (collect_probes): Adjust comment and argument list to receive
1106 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1107 reflect change. Call necessary methods from probe.
1108 (compare_probes): Call methods to get name and provider from
1109 probes.
1110 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1111 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1112 adjust code accordingly.
1113 (print_ui_out_not_applicables): Likewise.
1114 (info_probes_for_ops): Rename to...
1115 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1116 as argument instead of 'probe_ops'. Adjust code. Call
1117 necessary methods from probe.
1118 (info_probes_command): Use 'info_probes_for_spops'.
1119 (enable_probes_command): Pass correct argument to
1120 'collect_probes'. Call methods from probe.
1121 (disable_probes_command): Likewise.
1122 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1123 (get_probe_argument_count): Move to
1124 'any_static_probe_ops::get_argument_count'.
1125 (can_evaluate_probe_arguments): Move to
1126 'any_static_probe_ops::can_evaluate_arguments'.
1127 (evaluate_probe_argument): Move to
1128 'any_static_probe_ops::evaluate_argument'.
1129 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1130 'probe.probe'.
1131 (probe_linespec_to_ops): Rename to...
1132 (probe_linespec_to_static_ops): ...this. Adjust code.
1133 (probe_any_is_linespec): Rename to...
1134 (any_static_probe_ops::is_linespec): ...this.
1135 (probe_any_get_probes): Rename to...
1136 (any_static_probe_ops::get_probes): ...this.
1137 (any_static_probe_ops::type_name): New method.
1138 (any_static_probe_ops::gen_info_probes_table_header): New
1139 method.
1140 (compute_probe_arg): Use 'pc_probe.prob' instead of
1141 'pc_probe.probe'. Call methods from probe.
1142 (compile_probe_arg): Likewise.
1143 (std::vector<const probe_ops *> all_probe_ops): Delete.
1144 (std::vector<const static_probe_ops *> all_static_probe_ops):
1145 New variable.
1146 (_initialize_probe): Use 'all_static_probe_ops' instead of
1147 'all_probe_ops'.
1148 * probe.h (struct info_probe_column) <field_name>: Delete
1149 extraneous newline
1150 (info_probe_column_s): Delete type and VEC.
1151 (struct probe_ops): Delete. Replace with...
1152 (class static_probe_ops): ...this and...
1153 (clas probe): ...this.
1154 (struct bound_probe) <bound_probe>: Delete extraneous
1155 newline. Adjust constructor to receive 'probe' instead of
1156 'struct probe'.
1157 <probe>: Rename to...
1158 <prob>: ...this. Delete extraneous newline.
1159 <objfile>: Delete extraneous newline.
1160 (register_probe_ops): Delete unused prototype.
1161 (info_probes_for_ops): Rename to...
1162 (info_probes_for_spops): ...this. Adjust comment.
1163 (get_probe_address): Move to 'probe::get_address'.
1164 (get_probe_argument_count): Move to
1165 'probe::get_argument_count'.
1166 (can_evaluate_probe_arguments): Move to
1167 'probe::can_evaluate_arguments'.
1168 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1169 * solib-svr4.c (struct svr4_info): Adjust comment.
1170 (struct probe_and_action) <probe>: Rename to...
1171 <prob>: ...this.
1172 (register_solib_event_probe): Receive 'probe' instead of
1173 'struct probe' as argument. Use 'prob' instead of 'probe'
1174 when applicable.
1175 (solib_event_probe_action): Call 'get_argument_count' method
1176 from probe. Adjust comment.
1177 (svr4_handle_solib_event): Adjust comment. Call
1178 'evaluate_argument' method from probe.
1179 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1180 from probe.
1181 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1182 'struct probe'. Call 'can_evaluate_arguments' from probe.
1183 * symfile.h: Forward declare 'class probe' instead of 'struct
1184 probe'.
1185 * symtab.h: Likewise.
1186 (struct symtab_and_line) <probe>: Rename to...
1187 <prob>: ...this.
1188 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1189 Call probe methods.
1190 (stop_tracing): Likewise.
1191
8f6cb6c3
JB
11922017-11-22 Joel Brobecker <brobecker@adacore.com>
1193
1194 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1195 trailing newline at end of string in call to warning.
1196
479f8de1
SM
11972017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1198
1199 * osdata.h: Include vector isntead of vec.h.
1200 (osdata_column_s): Remove typedef.
1201 (struct osdata_column): Add constructor.
1202 <name, value>: Change type to std::string.
1203 (DEF_VEC_O (osdata_column_s)): Remove.
1204 (osdata_item_s): Remove typedef.
1205 (struct osdata_item) <columns>: Change type to std::vector.
1206 (DEF_VEC_O (osdata_item_s)): Remove.
1207 (struct osdata): Add constructor.
1208 <type>: Change type to std::string.
1209 <items>: Change type to std::vector.
1210 (osdata_p): Remove typedef.
1211 (DEF_VEC_P (osdata_p)): Remove.
1212 (osdata_parse): Return a unique_ptr.
1213 (osdata_free): Remove.
1214 (make_cleanup_osdata_free): Remove.
1215 (get_osdata): Return a unique_ptr.
1216 (get_osdata_column): Return pointer to std::string, take a
1217 reference to osdata_item as parameter.
1218 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1219 unique_ptr.
1220 <property_name>: Change type to std::string.
1221 (osdata_start_osdata): Allocate osdata with new and adjust.
1222 (osdata_start_item): Adjust.
1223 (osdata_start_column): Adjust.
1224 (osdata_end_column): Adjust.
1225 (clear_parsing_data): Remove.
1226 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1227 (osdata_item_clear): Remove.
1228 (get_osdata): return a unique_ptr and adjust.
1229 (get_osdata_column): Return a pointer to std::string and adjust.
1230 (info_osdata): Adjust.
1231 * mi/mi-main.c: Include <map>.
1232 (free_vector_of_osdata_items): Remove.
1233 (list_available_thread_groups): Adjust, use std::map instead of
1234 splay tree.
1235
41bd68f5
SM
12362017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1239 case in switch.
1240
7e2fd2f4
SM
12412017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1242
1243 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1244
0604393c
SM
12452017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 * varobj.h (struct varobj_update_result): Add constructor, add
1248 move constructor, disable copy and assign, initialize fields.
1249 <newobj>: Change type to std::vector.
1250 (varobj_update): Return std::vector.
1251 * varobj.c (install_dynamic_child): Change VEC parameters to
1252 std::vector and adjust.
1253 (update_dynamic_varobj_children): Likewise.
1254 (varobj_update): Return std::vector and adjust.
1255 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1256
ddf0ea08
SM
12572017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1258
1259 * varobj.h (struct varobj) <parent>: Remove const.
1260 <children>: Change type to std::vector.
1261 (varobj_list_children): Return std::vector const reference.
1262 (varobj_restrict_range): Change parameter type to std::vector
1263 const reference.
1264 * varobj.c (varobj_has_more): Adjust.
1265 (varobj_restrict_range): Change parameter type to std::vector
1266 const reference and adjust.
1267 (install_dynamic_child): Adjust.
1268 (update_dynamic_varobj_children): Adjust.
1269 (varobj_list_children): Return std::vector const reference and
1270 adjust.
1271 (varobj_add_child): Adjust.
1272 (update_type_if_necessary): Adjust.
1273 (varobj_update): Adjust.
1274 (delete_variable_1): Adjust.
1275 * ada-varobj.c (ada_value_has_mutated): Adjust.
1276 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1277
9e5b9d2b
SM
12782017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1279
1280 * varobj.h (struct varobj): Add constructor and destructor,
1281 initialize fields.
1282 * varobj.c (struct varobj_root): Initialize fields.
1283 (struct varobj_dynamic): Initialize fields.
1284 (varobj_create): Use unique_ptr instead of cleanup. Create
1285 varobj with new instead of new_root_variable.
1286 (delete_variable_1): Free variable with delete instead of
1287 free_variable.
1288 (create_child_with_value): Create variable with new instead of
1289 new_variable.
1290 (varobj::varobj): New.
1291 (varobj::~varobj): New (body mostly coming from free_variable).
1292 (new_variable): Remove.
1293 (free_variable): Remove.
1294 (do_free_variable_cleanup): Remove.
1295 (make_cleanup_free_variable): Remove.
1296
fc35dab1
UW
12972017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1298
1299 * core-regset.c: Remove file.
1300 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1301
2400729e
UW
13022017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1303
1304 * NEWS: Document use of GNU MPFR.
1305 * README: Likewise.
1306
1307 * Makefile.in (LIBMPFR): Add define.
1308 (CLIBS): Add $(LIBMPFR).
1309 * configure.ac: Add --with-mpfr configure option.
1310 * configure: Regenerate.
1311 * config.in: Regenerate.
1312
1313 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1314 (class mpfr_float_ops): New type.
1315 (mpfr_float_ops::from_target): Two new overloaded functions.
1316 (mpfr_float_ops::to_target): Likewise.
1317 (mpfr_float_ops::to_string): New function.
1318 (mpfr_float_ops::from_string): Likewise.
1319 (mpfr_float_ops::to_longest): Likewise.
1320 (mpfr_float_ops::from_longest): Likewise.
1321 (mpfr_float_ops::from_ulongest): Likewise.
1322 (mpfr_float_ops::to_host_double): Likewise.
1323 (mpfr_float_ops::from_host_double): Likewise.
1324 (mpfr_float_ops::convert): Likewise.
1325 (mpfr_float_ops::binop): Likewise.
1326 (mpfr_float_ops::compare): Likewise.
1327 (get_target_float_ops): Use mpfr_float_ops if available.
1328
7a26362d
UW
13292017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1330
1331 * target-float.c: Do not include <math.h>.
1332 Include <cmath> and <limits>.
1333 (DOUBLEST): Do not define.
1334 (class target_float_ops): New type.
1335 (class host_float_ops): New templated type.
1336 (class decimal_float_ops): New type.
1337
1338 (floatformat_to_doublest): Rename to ...
1339 (host_float_ops<T>::from_target): ... this. Use template type T
1340 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1341 (host_float_ops<T>::from_target): New overload using a type argument.
1342 (floatformat_from_doublest): Rename to ...
1343 (host_float_ops<T>::to_target): ... this. Use template type T
1344 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1345 (host_float_ops<T>::to_target): New overload using a type argument.
1346 (floatformat_printf_format): New function.
1347 (struct printf_length_modifier): New templated type.
1348 (floatformat_to_string): Rename to ...
1349 (host_float_ops<T>::to_string): ... this. Use type instead of
1350 floatformat argument. Use floatformat_printf_format and
1351 printf_length_modifier. Remove special handling of invalid numbers,
1352 infinities and NaN (moved to target_float_to_string).
1353 (struct scanf_length_modifier): New templated type.
1354 (floatformat_from_string): Rename to ...
1355 (host_float_ops<T>::from_string): ... this. Use type instead of
1356 floatformat argument. Use scanf_length_modifier.
1357 (floatformat_to_longest): Rename to ...
1358 (host_float_ops<T>::to_longest): ... this. Use type instead of
1359 floatformat argument. Handle out-of-range values deterministically.
1360 (floatformat_from_longest): Rename to ...
1361 (host_float_ops<T>::from_longest): ... this. Use type instead of
1362 floatformat argument.
1363 (floatformat_from_ulongest): Rename to ...
1364 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1365 floatformat argument.
1366 (floatformat_to_host_double): Rename to ...
1367 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1368 floatformat argument.
1369 (floatformat_from_host_double): Rename to ...
1370 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1371 floatformat argument.
1372 (floatformat_convert): Rename to ...
1373 (host_float_ops<T>::convert): ... this. Use type instead of
1374 floatformat arguments. Remove handling of no-op conversions.
1375 (floatformat_binop): Rename to ...
1376 (host_float_ops<T>::binop): ... this. Use type instead of
1377 floatformat arguments.
1378 (floatformat_compare): Rename to ...
1379 (host_float_ops<T>::compare): ... this. Use type instead of
1380 floatformat arguments.
1381
1382 (match_endianness): Use type instead of length/byte_order arguments.
1383 (set_decnumber_context): Likewise.
1384 (decimal_from_number): Likewise. Update calls.
1385 (decimal_to_number): Likewise.
1386 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1387 (decimal_float_ops::to_host_double): New dummy function.
1388 (decimal_float_ops::from_host_double): Likewise.
1389 (decimal_to_string): Rename to ...
1390 (decimal_float_ops::to_string): ... this. Use type instead of
1391 length/byte_order arguments. Update calls.
1392 (decimal_from_string): Rename to ...
1393 (decimal_float_ops::from_string): ... this. Use type instead of
1394 length/byte_order arguments. Update calls.
1395 (decimal_from_longest): Rename to ...
1396 (decimal_float_ops::from_longest): ... this. Use type instead of
1397 length/byte_order arguments. Update calls.
1398 (decimal_from_ulongest): Rename to ...
1399 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1400 length/byte_order arguments. Update calls.
1401 (decimal_to_longest): Rename to ...
1402 (decimal_float_ops::to_longest): ... this. Use type instead of
1403 length/byte_order arguments. Update calls.
1404 (decimal_binop): Rename to ...
1405 (decimal_float_ops::binop): ... this. Use type instead of
1406 length/byte_order arguments. Update calls.
1407 (decimal_compare): Rename to ...
1408 (decimal_float_ops::compare): ... this. Use type instead of
1409 length/byte_order arguments. Update calls.
1410 (decimal_convert): Rename to ...
1411 (decimal_float_ops::convert): ... this. Use type instead of
1412 length/byte_order arguments. Update calls.
1413
1414 (target_float_same_category_p): New function.
1415 (target_float_same_format_p): Likewise.
1416 (target_float_format_length): Likewise.
1417 (enum target_float_ops_kind): New type.
1418 (get_target_float_ops_kind): New function.
1419 (get_target_float_ops): Three new overloaded functions.
1420
1421 (target_float_is_zero): Update call.
1422 (target_float_to_string): Add special handling of invalid numbers,
1423 infinities and NaN (moved from floatformat_to_string). Use
1424 target_float_ops callback.
1425 (target_float_from_string): Use target_float_ops callback.
1426 (target_float_to_longest): Likewise.
1427 (target_float_from_longest): Likewise.
1428 (target_float_from_ulongest): Likewise.
1429 (target_float_to_host_double): Likewise.
1430 (target_float_from_host_double): Likewise.
1431 (target_float_convert): Add special case for no-op conversions.
1432 Use target_float_ops callback.
1433 (target_float_binop): Use target_float_ops callback.
1434 (target_float_compare): Likewise.
1435
a9f26f60
YQ
14362017-11-22 Yao Qi <yao.qi@linaro.org>
1437
1438 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1439
29f9a567
YQ
14402017-11-22 Yao Qi <yao.qi@linaro.org>
1441
1442 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1443 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1444
3b1b69bf
JG
14452017-11-21 Jerome Guitton <guitton@adacore.com>
1446
1447 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1448 with event ptid from the lower layer before doing the
1449 ravenscar-specific update.
1450
54aa6c67
JB
14512017-11-21 Joel Brobecker <brobecker@adacore.com>
1452
1453 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1454 the ptid's TID is nonzero.
1455
cf3fbed4
JB
14562017-11-21 Joel Brobecker <brobecker@adacore.com>
1457
1458 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1459 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1460 Make non-static. Change return type to char *. Adjust code
1461 accordingly. Rewrite the function's documentation.
1462 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1463 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1464 we have enough debugging information in the runtime to support
1465 Ada task debugging before we enable the ravenscar-thread layer.
1466
9edcc12f
JB
14672017-11-21 Joel Brobecker <brobecker@adacore.com>
1468
1469 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1470 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1471 * ravenscar-thread.c: Add into comment.
1472 (base_magic_null_ptid): Delete.
1473 (base_ptid): Change documentation.
1474 (ravenscar_active_task): Renames ravenscar_running_thread.
1475 All callers updated throughout.
1476 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1477 (ravenscar_task_is_currently_active): Likewise.
1478 (get_base_thread_from_ravenscar_task): Ditto.
1479 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1480 (ravenscar_runtime_initialized): Likewise.
1481 (get_running_thread_id): Add new parameter "cpu". Adjust
1482 implementation to handle this new parameter.
1483 (ravenscar_fetch_registers): Small adjustment to use
1484 is_ravenscar_task and ravenscar_task_is_currently_active in
1485 order to decide whether to use the target beneath or this
1486 module's arch_ops.
1487 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1488 (ravenscar_stopped_by_sw_breakpoint): Use
1489 get_base_thread_from_ravenscar_task to get the underlying
1490 thread, rather than using base_ptid.
1491 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1492 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1493 Likewise.
1494 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1495
65d40437
JB
14962017-11-21 Joel Brobecker <brobecker@adacore.com>
1497
1498 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1499 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1500 (get_tcb_types_info): Set fieldnos.base_cpu.
1501 (read_atcb): Set task_info->base_cpu.
1502 (info_task): Print "Base CPU" info if set by runtime.
1503
e02544b2
JB
15042017-11-21 Joel Brobecker <brobecker@adacore.com>
1505
1506 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1507 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1508 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1509 New functions.
1510 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1511 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1512 to_stopped_data_address and to_core_of_thread fields of
1513 ravenscar_ops.
1514
ed0f4273
UW
15152017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1516
1517 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1518 (struct gdbarch_tdep): New member long_double_abi.
1519 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1520 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1521 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1522 format depending on long_double_abi tdep member.
1523 (ppc_floatformat_for_type): Handle __ibm128 type.
1524
0fc76421
SM
15252017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1526
1527 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1528
e6b2f5ef
PA
15292017-11-21 Pedro Alves <palves@redhat.com>
1530
1531 * dwarf2read.c (mapped_index::find_name_components_bounds)
1532 <completion mode, upper bound>: Use std::lower_bound instead of
1533 std::upper_bound.
1534 (test_mapped_index_find_name_component_bounds): Remove incorrect
1535 "t1_fund" from expected symbols.
1536
5c58de74
PA
15372017-11-21 Pedro Alves <palves@redhat.com>
1538
1539 * dwarf2read.c (mapped_index::name_components_casing): New field.
1540 (mapped_index) <build_name_components,
1541 find_name_components_bounds): Declare new methods.
1542 (mapped_index::find_name_components_bounds)
1543 (mapped_index::build_name_components): New methods, factored out
1544 from dw2_expand_symtabs_matching_symbol.
1545 (check_find_bounds_finds)
1546 (test_mapped_index_find_name_component_bounds): New.
1547 (run_test): Rename to ...
1548 (test_dw2_expand_symtabs_matching_symbol): ... this.
1549 (run_test): Reimplement.
1550
e1ef7d7a
PA
15512017-11-21 Pedro Alves <palves@redhat.com>
1552
1553 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1554 (symbol_end): Use cp_ident_is_alnum.
1555 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1556 * dwarf2read.c (make_sort_after_prefix_name): New function.
1557 (dw2_expand_symtabs_matching_symbol): Use it.
1558 (test_symbols): Add more symbols.
1559 (run_test): Add tests.
1560
cf724bc9
TT
15612017-11-17 Tom Tromey <tom@tromey.com>
1562
1563 * symtab.h (enum symbol_subclass_kind): New.
1564 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1565 Remove.
1566 <subclass>: New member.
1567 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1568 * rust-lang.c (rust_get_trait_object_pointer): Update.
1569 * dwarf2read.c (read_func_scope): Update.
1570 (read_variable): Update.
1571
68e745e3
TT
15722017-11-17 Tom Tromey <tom@tromey.com>
1573
1574 * dwarf2read.c (read_func_scope): Update.
1575 * symtab.h (struct template_symbol): Derive from symbol.
1576 <base>: Remove.
1577
71a3c369
TT
15782017-11-17 Tom Tromey <tom@tromey.com>
1579
1580 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1581 (struct rust_vtable_symbol): New.
1582 (find_symbol_at_address): Declare.
1583 * symtab.c (find_symbol_at_address): New function.
1584 * symfile.h (struct quick_symbol_functions)
1585 <find_compunit_symtab_by_address>: New member.
1586 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1587 function.
1588 (debug_sym_quick_functions): Link to
1589 debug_qf_find_compunit_symtab_by_address.
1590 * rust-lang.c (rust_get_trait_object_pointer): New function.
1591 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1592 rust_get_trait_object_pointer.
1593 * psymtab.c (psym_relocate): Clear psymbol_map.
1594 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1595 functions.
1596 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1597 * objfiles.h (struct objfile) <psymbol_map>: New member.
1598 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1599 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1600 (rust_containing_type, read_variable): New functions.
1601
7468702d
SM
16022017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1603
1604 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1605
37269bc9
SM
16062017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1607
1608 * common/filestuff.c: Include <algorithm>.
1609 (open_fds): Change type to std::vector<int>.
1610 (do_mark_open_fd): Adjust.
1611 (unmark_fd_no_cloexec): Adjust.
1612 (do_close): Adjust.
1613
5c632425
SM
16142017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1615
1616 * breakpoint.c (output_thread_groups): Take an std::vector.
1617 (print_one_breakpoint_location): Adjust.
1618
ced9779b
JB
16192017-11-17 Joel Brobecker <brobecker@adacore.com>
1620
1621 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1622 (ada_evaluate_subexp_for_cast): New function.
1623 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1624 ada_evaluate_subexp_for_cast.
1625 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1626 eval_skip_value.
1627 * eval.c (evaluate_var_value): Make non-static.
1628 (evaluate_var_msym_value, eval_skip_value): Likewise.
1629 * value.h (evaluate_var_value, evaluate_var_msym_value)
1630 (eval_skip_value): Declare.
1631
b7e22850
JB
16322017-11-16 Joel Brobecker <brobecker@adacore.com>
1633
1634 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1635 Update all callers.
1636
9ccabccd
PA
16372017-11-16 Pedro Alves <palves@redhat.com>
1638
1639 * python/py-unwind.c (pyuw_sniffer): Translate
1640 PyExc_KeyboardInterrupt to a GDB Quit exception.
1641
d930703d
PA
16422017-11-16 Pedro Alves <palves@redhat.com>
1643
1644 * infrun.c (resume_cleanups): Delete.
1645 (resume): No longer install a resume_cleanups cleanup nor call
1646 QUIT.
1647 (proceed): Pass the terminal to the inferior.
1648 (keep_going_pass_signal): No longer install a resume_cleanups
1649 cleanup.
1650
38dc2859
PA
16512017-11-16 Pedro Alves <palves@redhat.com>
1652
1653 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1654 if the prompt is blocked.
1655
688fca4f
PA
16562017-11-16 Pedro Alves <palves@redhat.com>
1657
1658 * breakpoint.c (insert_bp_location): Replace bp_err and
1659 bp_err_message locals by a gdb_exception local.
1660
e2c33ac7
PA
16612017-11-16 Pedro Alves <palves@redhat.com>
1662
1663 * inflow.c (scoped_ignore_sigttou): New class.
1664 (child_terminal_ours_1, new_tty): Use it.
1665
d7236961
UW
16662017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1667
1668 * target-float.c (decimal_from_number): Add byte_order argument and
1669 call match_endianness. Error if unknown floating-point type.
1670 (decimal_to_number): Add byte_order argument and call match_endianness.
1671 (decimal_from_longest): Update call. Do not call match_endianness.
1672 (decimal_from_ulongest): Likewise.
1673 (decimal_binop): Likewise.
1674 (decimal_is_zero): Likewise.
1675 (decimal_compare): Likewise.
1676 (decimal_convert): Likewise.
1677
d8ae99a7
PM
16782017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1679
1680 * python/python.c (gdbpy_rbreak): New function.
1681 * NEWS: Document Python rbreak feature.
1682
c632b645
YQ
16832017-11-16 Yao Qi <yao.qi@linaro.org>
1684
1685 * features/tic6x-c62x.xml: Remove.
1686 * features/tic6x-c64x.xml: Remove.
1687 * features/tic6x-c64xp.xml: Remove.
1688
a014b87a
JB
16892017-11-15 John Baldwin <jhb@FreeBSD.org>
1690
1691 * symtab.h: Include <array>.
1692
94765011
JB
16932017-11-15 John Baldwin <jhb@FreeBSD.org>
1694
1695 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1696 (bsd_kvm_proc_cmd): Likewise.
1697
625ad440
SM
16982017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1699
1700 * tui/tui-win.c (window_name_completer): Replace VEC with
1701 std::vector.
1702
c0c11fa9
AC
17032017-11-15 Andrew Cagney <cagney@gnu.org>
1704
1705 * MAINTAINERS: Remove no-longer applicable entries.
1706
34a7ebaf
AC
17072017-11-15 Andrew Cagney <cagney@gnu.org>
1708
1709 * MAINTAINERS: Move self to Past Maintainers.
1710
5334ef39
YQ
17112017-11-15 Yao Qi <yao.qi@linaro.org>
1712
1713 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1714 * features/nios2-linux.c: Remove.
1715 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1716 initialize_tdesc_nios2_linux.
1717
a714b0d6
YQ
17182017-11-15 Yao Qi <yao.qi@linaro.org>
1719
1720 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1721 M68HC11_LAST_HARD_REG + 1.
1722
92ffd475
PC
17232017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1724
1725 PR gdb/22388
1726 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1727 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1728 Return TARGET_XFER_EOF if size of returned data is 0.
1729
07431908
SM
17302017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1733 memory-map-selftests.c.
1734 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1735 * memory-map.c (memory_map_start_memory): Fix computation of hi
1736 address.
1737 * unittests/memory-map-selftests.c: New file.
1738
31432a67
JB
17392017-11-09 Joel Brobecker <brobecker@adacore.com>
1740
1741 * ada-lang.c: Fix some typos in the general command documenting
1742 how Ada expressions are being evaluated and how their result
1743 is printed.
1744
e793c052
TT
17452017-11-09 Tom Tromey <tom@tromey.com>
1746
1747 * psymtab.c (psymbol_hash): Do not hash string contents.
1748 (psymbol_compare): Add comment.
1749
7e8835c5
TT
17502017-11-09 Tom Tromey <tom@tromey.com>
1751
1752 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1753
286acbb5
JB
17542017-11-08 Joel Brobecker <brobecker@adacore.com>
1755
1756 * ada-exp.y (write_var_from_sym): Remove parameter
1757 "orig_left_context". Update all callers.
1758
b44ec619
SM
17592017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1760
1761 * tracepoint.h (class collection_list) <stringify>: Return
1762 std::vector<std::string>.
1763 (encode_actions_rsp): Change parameters to
1764 std::vector<std::string> *.
1765 * tracepoint.c (collection_list::stringify): Return
1766 std::vector<std::string> and adjust accordingly.
1767 (encode_actions_rsp): Changee parameters to
1768 std::vector<std::string> and adjust accordingly.
1769 * remote.c (free_actions_list),
1770 free_actions_list_cleanup_wrapper): Remove.
1771 (remote_download_tracepoint): Adjust to std::vector.
1772
2f4732b0
TT
17732017-11-08 Tom Tromey <tom@tromey.com>
1774
1775 * dwarf2read.c (symbolp): Remove typedef.
1776 (read_func_scope): Use std::vector.
1777 (process_structure_scope): Use std::vector.
1778
f9d67a22
PA
17792017-11-08 Pedro Alves <palves@redhat.com>
1780
1781 * ada-lang.c (ada_make_symbol_completion_list): Use
1782 completion_skip_symbol.
1783 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1784 (symbol_is_function_or_method(symbol*)): New.
1785 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1786 completion_skip_symbol.
1787 (default_collect_symbol_completion_matches_break_on): Use
1788 completion_skip_symbol. Pass down mode.
1789 (collect_file_symbol_completion_matches): Pass down mode.
1790 * symtab.h (symbol_is_function_or_method): New declarations.
1791 (completion_skip_symbol): New template function.
1792
56d87ef7
PA
17932017-11-08 Pedro Alves <palves@redhat.com>
1794
1795 * linespec.c (iterate_over_all_matching_symtabs): Add
1796 search_domain parameter. Pass it down to expand_symtabs_matching.
1797 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1798 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1799 search_domain.
1800 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1801 Pass it down.
1802 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1803 symbols.
1804 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1805 it down.
1806
1b026119
PA
18072017-11-08 Pedro Alves <palves@redhat.com>
1808
1809 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1810 text_len locals and don't pass them down.
1811 * symtab.c (completion_list_add_name): Remove
1812 sym_text/sym_text_len parameters and adjust.
1813 (completion_list_add_symbol, completion_list_add_msymbol)
1814 (completion_list_objc_symbol, completion_list_add_fields)
1815 (add_symtab_completions): Likewise.
1816 (default_collect_symbol_completion_matches_break_on)
1817 (collect_file_symbol_completion_matches): Remove sym_text_len
1818 local and don't pass it down.
1819 * symtab.h (completion_list_add_name): Remove
1820 sym_text/sym_text_len parameters.
1821
c62446b1
PA
18222017-11-08 Pedro Alves <palves@redhat.com>
1823
1824 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1825 unittests/lookup_name_info-selftests.c.
1826 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1827 * cp-support.c: Include "selftest.h".
1828 (cp_remove_params_1): Rename from cp_remove_params. Add
1829 'require_param' parameter, and handle it.
1830 (cp_remove_params): Reimplement.
1831 (cp_remove_params_if_any): New.
1832 (selftests::quote): New.
1833 (selftests::check_remove_params): New.
1834 (selftests::test_cp_remove_params): New.
1835 (_initialize_cp_support): Install
1836 selftests::test_cp_remove_params.
1837 * cp-support.h (cp_remove_params_if_any): Declare.
1838 * dwarf2read.c :Include "selftest.h".
1839 (dw2_expand_symtabs_matching_symbol): Use
1840 lookup_name_info::make_ignore_params.
1841 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1842 (selftests::dw2_expand_symtabs_matching::string_or_null)
1843 (selftests::dw2_expand_symtabs_matching::check_match)
1844 (selftests::dw2_expand_symtabs_matching::test_symbols)
1845 (selftests::dw2_expand_symtabs_matching::run_test): New.
1846 (_initialize_dwarf2_read): Register
1847 selftests::dw2_expand_symtabs_matching::run_test.
1848 * psymtab.c (psym_expand_symtabs_matching): Use
1849 lookup_name_info::make_ignore_params.
1850 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1851 If the lookup name wants to ignore parameters, strip them.
1852 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1853 code handling '('.
1854 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1855 (default_collect_symbol_completion_matches_break_on): Don't try to
1856 strip parameters.
1857 * symtab.h (lookup_name_info::lookup_name_info): Add
1858 'ignore_parameters' parameter.
1859 (lookup_name_info::ignore_parameters)
1860 (lookup_name_info::make_ignore_params): New methods.
1861 (lookup_name_info::m_ignore_parameters): New field.
1862 * unittests/lookup_name_info-selftests.c: New file.
1863
61920122
PA
18642017-11-08 Pedro Alves <palves@redhat.com>
1865
1866 * dwarf2read.c (dw2_expand_marked_cus)
1867 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1868 (dw2_expand_symtabs_matching): Move further below.
1869 (dw2_expand_marked_cus): Reindent.
1870
3f563c84
PA
18712017-11-08 Pedro Alves <palves@redhat.com>
1872
1873 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1874 (struct name_component): New.
1875 (mapped_index::name_components): New field.
1876 (mapped_index::symbol_name_at): New method.
1877 (dwarf2_read_index): Call mapped_index ctor.
1878 (dw2_map_matching_symbols): Add comment about name_components
1879 table.
1880 (dw2_expand_symtabs_matching): Factor part to...
1881 (dw2_expand_symtabs_matching_symbol): ... this new function.
1882 Build name components table, and lookup symbols in it before
1883 calling the name matcher.
1884 (dw2_expand_marked_cus): New, factored out from
1885 dw2_expand_symtabs_matching.
1886 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1887
b5ec771e
PA
18882017-11-08 Pedro Alves <palves@redhat.com>
1889
1890 * ada-lang.c (ada_encode): Rename to ..
1891 (ada_encode_1): ... this. Add throw_errors parameter and handle
1892 it.
1893 (ada_encode): Reimplement.
1894 (match_name): Delete, folded into full_name.
1895 (resolve_subexp): No longer pass the encoded name to
1896 ada_lookup_symbol_list.
1897 (should_use_wild_match): Delete.
1898 (name_match_type_from_name): New.
1899 (ada_lookup_simple_minsym): Use lookup_name_info and the
1900 language's symbol_name_matcher_ftype.
1901 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1902 (ada_add_block_renamings): Adjust to use lookup_name_info.
1903 (ada_lookup_name): New.
1904 (add_nonlocal_symbols, ada_add_all_symbols)
1905 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1906 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1907 (ada_name_for_lookup): Delete.
1908 (ada_lookup_encoded_symbol): Construct a verbatim name.
1909 (wild_match): Reverse sense of return type. Use bool.
1910 (full_match): Reverse sense of return type. Inline bits of old
1911 match_name here.
1912 (ada_add_block_symbols): Adjust to use lookup_name_info.
1913 (symbol_completion_match): Delete, folded into...
1914 (ada_lookup_name_info::matches): ... .this new method.
1915 (symbol_completion_add): Delete.
1916 (ada_collect_symbol_completion_matches): Add name_match_type
1917 parameter. Adjust to use lookup_name_info and
1918 completion_list_add_name.
1919 (get_var_value, ada_add_global_exceptions): Adjust to use
1920 lookup_name_info.
1921 (ada_get_symbol_name_cmp): Delete.
1922 (do_wild_match, do_full_match): New functions.
1923 (ada_lookup_name_info::ada_lookup_name_info): New method.
1924 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1925 functions.
1926 (ada_language_defn): Install ada_get_symbol_name_matcher.
1927 * ada-lex.l (processId): If name starts with '<', copy it
1928 verbatim.
1929 * block.c (block_iter_match_step, block_iter_match_first)
1930 (block_iter_match_next, block_lookup_symbol)
1931 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1932 lookup_name_info.
1933 * block.h (block_iter_match_first, block_iter_match_next)
1934 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1935 * c-lang.c (c_language_defn, cplus_language_defn)
1936 (asm_language_defn, minimal_language_defn): Adjust comments to
1937 refer to la_get_symbol_name_matcher.
1938 * completer.c (complete_files_symbols)
1939 (collect_explicit_location_matches, symbol_completer): Pass a
1940 symbol_name_match_type down.
1941 * completer.h (class completion_match, completion_match_result):
1942 New classes.
1943 (completion_tracker::reset_completion_match_result): New method.
1944 (completion_tracker::m_completion_match_result): New field.
1945 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1946 lookup_name_info.
1947 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1948 functions.
1949 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1950 * d-lang.c: Adjust comments to refer to
1951 la_get_symbol_name_matcher.
1952 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1953 Adjust to use lookup_name_info.
1954 (dict_iter_match_first, dict_iter_match_next)
1955 (iter_match_first_hashed, iter_match_next_hashed)
1956 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1957 with a lookup_name_info.
1958 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1959 Likewise.
1960 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1961 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1962 (gdb_index_symbol_name_matcher): New class.
1963 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1964 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1965 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1966 with a symbol_name_match_type.
1967 (f_language_defn): Adjust comments to refer to
1968 la_get_symbol_name_matcher.
1969 * go-lang.c (go_language_defn): Adjust comments to refer to
1970 la_get_symbol_name_matcher.
1971 * language.c (default_symbol_name_matcher)
1972 (language_get_symbol_name_matcher): New functions.
1973 (unknown_language_defn, auto_language_defn): Adjust comments to
1974 refer to la_get_symbol_name_matcher.
1975 * language.h (symbol_name_cmp_ftype): Delete.
1976 (language_defn) <la_collect_symbol_completion_matches>: Add match
1977 type parameter.
1978 <la_get_symbol_name_cmp>: Delete field.
1979 <la_get_symbol_name_matcher>: New field.
1980 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1981 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1982 Declare.
1983 * linespec.c (iterate_over_all_matching_symtabs)
1984 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1985 (find_methods): Add language parameter, and use lookup_name_info
1986 and the language's symbol_name_matcher_ftype.
1987 (linespec_complete_function): Adjust.
1988 (lookup_prefix_sym): Use lookup_name_info.
1989 (add_all_symbol_names_from_pspace): Adjust.
1990 (find_superclass_methods): Add language parameter and pass it
1991 down.
1992 (find_method): Pass symbol language down.
1993 (find_linespec_symbols): Don't demangle or Ada encode here.
1994 (search_minsyms_for_name): Add lookup_name_info parameter.
1995 (add_matching_symbols_to_info): Add name_match_type parameter.
1996 Use lookup_name_info.
1997 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1998 la_get_symbol_name_matcher.
1999 * minsyms.c: Include <algorithm>.
2000 (add_minsym_to_demangled_hash_table): Remove table parameter and
2001 add objfile parameter. Use search_name_hash, and add language to
2002 demangled languages vector.
2003 (struct found_minimal_symbols): New struct.
2004 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2005 New functions.
2006 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2007 input names here. Use lookup_name_info instead. Lookup up
2008 demangled names once for each language in the demangled names
2009 vector.
2010 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2011 demangled names once for each language in the demangled names
2012 vector.
2013 (build_minimal_symbol_hash_tables): Adjust.
2014 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2015 lookup_name_info.
2016 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2017 la_get_symbol_name_matcher.
2018 * objfiles.h: Include <vector>.
2019 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2020 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2021 la_get_symbol_name_matcher.
2022 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2023 la_get_symbol_name_matcher.
2024 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2025 (match_partial_symbol): Use symbol_name_match_type,
2026 lookup_name_info and psymbol_name_matches.
2027 (lookup_partial_symbol): Use lookup_name_info.
2028 (map_block): Use symbol_name_match_type and lookup_name_info.
2029 (psym_map_matching_symbols): Use symbol_name_match_type.
2030 (psymbol_name_matches): New.
2031 (recursively_search_psymtabs): Use lookup_name_info and
2032 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2033 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2034 'kind' parameter to 'domain'.
2035 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2036 la_get_symbol_name_matcher.
2037 * symfile-debug.c (debug_qf_map_matching_symbols)
2038 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2039 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2040 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2041 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2042 Adjust to use symbol_name_match_type.
2043 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2044 (expand_symtabs_matching): Adjust to use lookup_name_info.
2045 * symmisc.c (maintenance_expand_symtabs): Use
2046 lookup_name_info::match_any ().
2047 * symtab.c (symbol_matches_search_name): New.
2048 (eq_symbol_entry): Adjust to use lookup_name_info and the
2049 language's matcher.
2050 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2051 (lookup_name_info::match_any): New.
2052 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2053 (compare_symbol_name): Add language, lookup_name_info and
2054 completion_match_result parameters, and use them.
2055 (completion_list_add_name): Make extern. Add language and
2056 lookup_name_info parameters. Use them.
2057 (completion_list_add_symbol, completion_list_add_msymbol)
2058 (completion_list_objc_symbol): Add lookup_name_info parameters and
2059 adjust. Pass down language.
2060 (completion_list_add_fields): Add lookup_name_info parameters and
2061 adjust. Pass down language.
2062 (add_symtab_completions): Add lookup_name_info parameters and
2063 adjust.
2064 (default_collect_symbol_completion_matches_break_on): Add
2065 name_match_type parameter, and use it. Use lookup_name_info.
2066 (default_collect_symbol_completion_matches)
2067 (collect_symbol_completion_matches): Add name_match_type
2068 parameter, and pass it down.
2069 (collect_symbol_completion_matches_type): Adjust.
2070 (collect_file_symbol_completion_matches): Add name_match_type
2071 parameter, and use lookup_name_info.
2072 * symtab.h: Include <string> and "common/gdb_optional.h".
2073 (enum class symbol_name_match_type): New.
2074 (class ada_lookup_name_info): New.
2075 (struct demangle_for_lookup_info): New.
2076 (class lookup_name_info): New.
2077 (symbol_name_matcher_ftype): New.
2078 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2079 (symbol_matches_search_name): Declare.
2080 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2081 (default_collect_symbol_completion_matches)
2082 (collect_symbol_completion_matches)
2083 (collect_file_symbol_completion_matches): Add name_match_type
2084 parameter.
2085 (iterate_over_symbols): Use lookup_name_info.
2086 (completion_list_add_name): Declare.
2087 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2088 (strncmp_iw_with_mode): Now extern.
2089 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2090 (strncmp_iw_with_mode): Declare.
2091
5ffa0793
PA
20922017-11-08 Keith Seitz <keiths@redhat.com>
2093 Pedro Alves <palves@redhat.com>
2094
2095 * ada-lang.c (ada_language_defn): Install
2096 default_search_name_hash.
2097 * buildsym.c (struct buildsym_compunit): <language>: New field.
2098 (finish_block_internal): Pass language when creating dictionaries.
2099 (start_buildsym_compunit, start_symtab): New language parameters.
2100 Use them.
2101 (restart_symtab): Pass down compilation unit's language.
2102 * buildsym.h (enum language): Forward declare.
2103 (start_symtab): New 'language' parameter.
2104 * c-lang.c (c_language_defn, cplus_language_defn)
2105 (asm_language_defn, minimal_language_defn): Install
2106 default_search_name_hash.
2107 * coffread.c (coff_start_symtab): Adjust.
2108 * d-lang.c (d_language_defn): Install default_search_name_hash.
2109 * dbxread.c (struct symloc): Add 'pst_language' field.
2110 (PST_LANGUAGE): Define.
2111 (start_psymtab, read_ofile_symtab): Use it.
2112 (process_one_symbol): New 'language' parameter. Pass it down.
2113 * dictionary.c (struct dictionary) <language>: New field.
2114 (DICT_LANGUAGE): Define.
2115 (dict_create_hashed, dict_create_hashed_expandable)
2116 (dict_create_linear, dict_create_linear_expandable): New parameter
2117 'language'. Set the dictionary's language.
2118 (iter_match_first_hashed): Adjust to rename.
2119 (insert_symbol_hashed): Assert we don't see mismatching
2120 languages. Adjust to rename.
2121 (dict_hash): Rename to ...
2122 (default_search_name_hash): ... this and make extern.
2123 * dictionary.h (struct language_defn): Forward declare.
2124 (dict_create_hashed): New parameter 'language'.
2125 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2126 * f-lang.c (f_language_defn): Install default_search_name_hash.
2127 * go-lang.c (go_language_defn): Install default_search_name_hash.
2128 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2129 creation.
2130 * language.c (unknown_language_defn, auto_language_defn):
2131 * language.h (language_defn::la_search_name_hash): New field.
2132 (default_search_name_hash): Declare.
2133 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2134 * mdebugread.c (new_block): New parameter 'language'.
2135 * mdebugread.c (parse_symbol): Pass symbol language to block
2136 allocation.
2137 (psymtab_to_symtab_1): Pass down language.
2138 (new_symtab): Pass compunit's language to block allocation.
2139 * objc-lang.c (objc_language_defn): Install
2140 default_search_name_hash.
2141 * opencl-lang.c (opencl_language_defn):
2142 * p-lang.c (pascal_language_defn): Install
2143 default_search_name_hash.
2144 * rust-lang.c (rust_language_defn): Install
2145 default_search_name_hash.
2146 * stabsread.h (enum language): Forward declare.
2147 (process_one_symbol): Add 'language' parameter.
2148 * symtab.c (search_name_hash): New function.
2149 * symtab.h (search_name_hash): Declare.
2150 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2151
2a1dde5d
PA
21522017-11-08 Pedro Alves <palves@redhat.com>
2153
2154 * cp-name-parser.y (main): Don't initialize extra_chars.
2155
95a6b0a1
TT
21562017-11-07 Tom Tromey <tom@tromey.com>
2157
2158 * event-top.h (command_handler): Constify.
2159 * record-full.c (cmd_record_full_start): Update.
2160 * thread.c (thread_apply_all_command): Update.
2161 * printcmd.c (eval_command): Update.
2162 * mi/mi-main.c (mi_execute_cli_command): Update.
2163 (mi_execute_async_cli_command): Update.
2164 * tui/tui-stack.c (tui_update_command): Update.
2165 * cli/cli-interp.c (safe_execute_command): Constify.
2166 * record.c (record_start): Update.
2167 (record_start, record_stop, cmd_record_start): Update.
2168 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2169 (cmd_record_btrace_pt_start): Update.
2170 (cmd_record_btrace_start): Update.
2171 (cmd_record_btrace_start): Update.
2172 * reverse.c (exec_reverse_once): Update.
2173 * python/python.c (execute_gdb_command): Don't copy the command.
2174 * event-top.c (command_line_handler): Update.
2175 (command_handler): Constify.
2176 * defs.h (deprecated_call_command_hook): Constify.
2177 * cli/cli-script.h (execute_user_command): Constify.
2178 * cli/cli-script.c (execute_user_command): Constify.
2179 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2180 (enum command_control_type): Update.
2181 * main.c (catch_command_errors): Remove non-const overload.
2182 (catch_command_errors_ftype): Remove.
2183 * python/py-cmd.c (cmdpy_function): Constify.
2184 * guile/scm-cmd.c (cmdscm_function): Constify.
2185 * cli/cli-dump.c (call_dump_func): Constify.
2186 * cli/cli-decode.c (do_const_cfunc): Constify.
2187 (do_sfunc): Constify.
2188 (cmd_func): Constify.
2189 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2190 * top.h (execute_command): Constify.
2191 * top.c (execute_command): Constify.
2192 (execute_command_to_string): Constify.
2193 (deprecated_call_command_hook): Constify.
2194 * command.h (cmd_func): Constify.
2195 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2196
eb4c3f4a
TT
21972017-11-07 Tom Tromey <tom@tromey.com>
2198
2199 * ada-lang.c (catch_ada_exception_command): Constify.
2200 (catch_assert_command): Constify.
2201 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2202 (catch_rethrow_command): Constify.
2203 (catch_exception_command_1): Constify.
2204 * breakpoint.h (add_catch_command): Constify.
2205 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2206 (catch_syscall_split_args): Constify.
2207 * break-catch-sig.c (catch_signal_command): Constify.
2208 (catch_signal_split_args): Constify.
2209 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2210 cmd_const_sfunc_ftype.
2211 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2212 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2213 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2214 (add_setshow_string_cmd, struct cmd_list_element)
2215 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2216 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2217 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2218 Constify.
2219 (set_cmd_sfunc): Constify.
2220 (empty_sfunc): Constify.
2221 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2222 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2223 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2224 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2225 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2226 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2227 Constify.
2228 (set_cmd_sfunc): Constify.
2229 (cmd_sfunc_ftype): Remove.
2230 * compile/compile.c (set_compile_args): Constify.
2231 * infrun.c (set_disable_randomization): Constify.
2232 * infcmd.c (set_args_command, set_cwd_command): Constify.
2233 * breakpoint.c (set_condition_evaluation_mode): Constify.
2234 (add_catch_command): Constify.
2235 (catch_fork_command_1, catch_exec_command_1)
2236 (catch_load_command_1, catch_unload_command_1): Constify.
2237 (catch_load_or_unload): Constify.
2238 * guile/scm-param.c (pascm_set_func): Constify.
2239 (add_setshow_generic): Constify.
2240 * python/py-param.c (get_set_value): Constify.
2241 * top.h (set_verbose): Constify.
2242 * tui/tui-win.c (tui_set_var_cmd): Constify.
2243 * mi/mi-main.c (set_mi_async_command): Constify.
2244 * cli/cli-logging.c (set_logging_overwrite)
2245 (set_logging_redirect): Constify.
2246 * value.c (set_max_value_size): Constify.
2247 * valprint.c (set_input_radix, set_output_radix): Constify.
2248 * utils.c (set_width_command, set_height_command): Constify.
2249 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2250 * tracepoint.c (set_disconnected_tracing)
2251 (set_circular_trace_buffer, set_trace_buffer_size)
2252 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2253 * top.c (set_history_size_command, set_verbose, set_editing)
2254 (set_gdb_datadir, set_history_filename): Constify.
2255 * target.c (set_targetdebug, maint_set_target_async_command)
2256 (maint_set_target_non_stop_command, set_target_permissions)
2257 (set_write_memory_permission): Constify.
2258 (open_target): Constify.
2259 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2260 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2261 * symtab.c (set_symbol_cache_size_handler): Constify.
2262 * symfile.c (set_ext_lang_command): Constify.
2263 * symfile-debug.c (set_debug_symfile): Constify.
2264 * source.c (set_directories_command): Constify.
2265 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2266 * serial.c (set_parity): Constify.
2267 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2268 * remote.c (set_remote_exec_file, set_remotebreak)
2269 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2270 * record.c (set_record_insn_history_size)
2271 (set_record_call_history_size): Constify.
2272 * record-full.c (set_record_full_insn_max_num): Constify.
2273 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2274 * osabi.c (set_osabi): Constify.
2275 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2276 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2277 * maint.c (maintenance_set_profile_cmd): Constify.
2278 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2279 * language.c (set_language_command, set_range_command)
2280 (set_case_command): Constify.
2281 * infrun.c (set_non_stop, set_observer_mode)
2282 (set_stop_on_solib_events, set_schedlock_func)
2283 (set_exec_direction_func): Constify.
2284 * infcmd.c (set_inferior_tty_command): Constify.
2285 * disasm.c (set_disassembler_options_sfunc): Constify.
2286 * demangle.c (set_demangling_command): Constify.
2287 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2288 * cris-tdep.c (set_cris_version, set_cris_mode)
2289 (set_cris_dwarf2_cfi): Constify.
2290 * corefile.c (set_gnutarget_command): Constify.
2291 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2292 (set_target_wide_charset_sfunc): Constify.
2293 * breakpoint.c (update_dprintf_commands): Constify.
2294 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2295 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2296 (set_disassembly_style_sfunc): Constify.
2297 * arch-utils.c (set_endian, set_architecture): Constify.
2298 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2299 * agent.c (set_can_use_agent): Constify.
2300
5fed81ff
TT
23012017-11-07 Tom Tromey <tom@tromey.com>
2302
2303 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2304 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2305 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2306 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2307 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2308 (parse_int_arg, show_thread_default_detach_sc_cmd)
2309 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2310 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2311 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2312 (show_task_pause_cmd, set_task_detach_sc_cmd)
2313 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2314 (set_noninvasive_cmd, set_thread_pause_cmd)
2315 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2316 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2317 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2318 * windows-nat.c (display_selectors): Constify.
2319 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2320 non-const "cfunc".
2321 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2322 (cmd_cfunc_eq): Likewise.
2323 (struct cmd_list_element): Likewise.
2324 (do_cfunc): Remove.
2325 (cli_user_command_p): Update.
2326 * command.h (add_cmd): Remove non-const overload.
2327 (cmd_cfunc_ftype): Remove typedef.
2328 (cmd_cfunc_eq): Remove non-const overload.
2329 * value.c (show_values): Constify.
2330 * thread.c (thread_apply_all_command): Constify.
2331 * symfile.c (load_command): Constify.
2332 * source.c (directory_command): Constify.
2333 * maint.c (maintenance_internal_error)
2334 (maintenance_demangler_warning, maintenance_space_display)
2335 (maintenance_print_architecture, maintenance_translate_address)
2336 (maintenance_info_selftests, maintenance_internal_warning):
2337 Constify.
2338 * breakpoint.c (disable_trace_command, enable_trace_command):
2339 Constify.
2340 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2341 Constify.
2342 (add_auto_load_safe_path): Constify.
2343 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2344 * top.h (show_commands): Constify.
2345 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2346 * sparc64-tdep.c (adi_examine_command): Constify.
2347 (adi_assign_command): Constify.
2348
1d12d88f
TT
23492017-11-07 Tom Tromey <tom@tromey.com>
2350
2351 * frame.h (info_locals_command, info_args_command): Constify.
2352 * auto-load.h (auto_load_info_scripts): Constify.
2353 * inferior.h (registers_info): Constify.
2354 * copying.c: Rebuild.
2355 * copying.awk: Constify generated commands.
2356 * auto-load.c (auto_load_info_scripts)
2357 (info_auto_load_gdb_scripts): Constify.
2358 * cli/cli-decode.c (struct cmd_list_element): Take a
2359 cmd_const_cfunc_ftype.
2360 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2361 * tui/tui-win.c (tui_all_windows_info): Constify.
2362 * python/py-auto-load.c (info_auto_load_python_scripts):
2363 Constify.
2364 * cli/cli-cmds.c (show_command): Remove non-const overload.
2365 * tracepoint.c (info_tvariables_command, info_scope_command):
2366 Constify.
2367 (info_static_tracepoint_markers_command): Constify.
2368 * thread.c (info_threads_command): Constify.
2369 (print_thread_info_1): Constify.
2370 * target.c (info_target_command): Constify.
2371 * symtab.c (info_sources_command, info_functions_command)
2372 (info_types_command): Constify.
2373 (info_variables_command): Remove non-const overload.
2374 * symfile.c (info_ext_lang_command): Constify.
2375 * stack.c (info_frame_command, info_locals_command)
2376 (info_args_command): Constify.
2377 (backtrace_command): Remove non-const overload.
2378 * source.c (info_source_command, info_line_command): Constify.
2379 * solib.c (info_sharedlibrary_command): Constify.
2380 * skip.c (info_skip_command): Constify.
2381 * ser-go32.c (info_serial_command): Constify.
2382 * reverse.c (info_bookmarks_command): Constify.
2383 * printcmd.c (info_symbol_command, info_address_command)
2384 (info_display_command): Constify.
2385 * osdata.c (info_osdata_command): Constify.
2386 * objc-lang.c (info_selectors_command, info_classes_command):
2387 Constify.
2388 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2389 * memattr.c (info_mem_command): Constify.
2390 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2391 * linux-fork.c (info_checkpoints_command): Constify.
2392 * infrun.c (info_signals_command): Constify.
2393 * inflow.c (info_terminal_command): Constify.
2394 * inferior.c (info_inferiors_command): Constify.
2395 (print_inferior): Constify.
2396 * infcmd.c (info_program_command, info_all_registers_command)
2397 (info_registers_command, info_vector_command)
2398 (info_float_command): Constify.
2399 (registers_info): Constify.
2400 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2401 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2402 Constify.
2403 * f-valprint.c (info_common_command): Constify.
2404 * dcache.c (info_dcache_command): Constify.
2405 (dcache_info_1): Constify.
2406 * darwin-nat-info.c (info_mach_tasks_command)
2407 (info_mach_task_command, info_mach_ports_command)
2408 (info_mach_port_command, info_mach_threads_command)
2409 (info_mach_thread_command, info_mach_regions_command)
2410 (info_mach_regions_recurse_command, info_mach_region_command)
2411 (info_mach_exceptions_command): Constify.
2412 (get_task_from_args): Constify.
2413 * cp-support.c (info_vtbl_command): Constify.
2414 * breakpoint.c (info_watchpoints_command)
2415 (info_tracepoints_command): Constify.
2416 (info_breakpoints_command): Remove non-const overload.
2417 * avr-tdep.c (avr_io_reg_read_command): Constify.
2418 * auxv.c (info_auxv_command): Constify.
2419 * ada-tasks.c (info_tasks_command): Constify.
2420 (info_task): Constify.
2421 * ada-lang.c (info_exceptions_command): Constify.
2422
0b39b52e
TT
24232017-11-07 Tom Tromey <tom@tromey.com>
2424
2425 * solib.h (no_shared_libraries): Constify.
2426 * frame.h (return_command): Constify.
2427 * cli/cli-cmds.h (quit_command): Constify.
2428 * top.h (quit_command, execute_command): Constify.
2429 * target.h (flash_erase_command): Constify.
2430 * inferior.h (set_inferior_args, attach_command): Constify.
2431 * tracepoint.h (start_tracing, stop_tracing): Constify.
2432 * breakpoint.h (break_command, tbreak_command)
2433 (hbreak_command_wrapper, thbreak_command_wrapper)
2434 (rbreak_command_wrapper, watch_command_wrapper)
2435 (awatch_command_wrapper, rwatch_command_wrapper)
2436 (get_tracepoint_by_number): Constify.
2437 * symtab.c (info_variables_command, rbreak_command)
2438 (symtab_symbol_info): Constify.
2439 (info_variables_command): Add non-const overload.
2440 * top.c (dont_repeat_command): Constify.
2441 * breakpoint.c (ignore_command, commands_command)
2442 (condition_command, tbreak_command, hbreak_command)
2443 (thbreak_command, clear_command, break_command)
2444 (info_breakpoints_command, watch_command, rwatch_command)
2445 (awatch_command, trace_command, ftrace_command, strace_command)
2446 (trace_pass_command, break_range_command, dprintf_command)
2447 (agent_printf_command, get_tracepoint_by_number)
2448 (watch_maybe_just_location, trace_pass_command): Constify.
2449 (info_breakpoints_command): Add non-const overload.
2450 * tracefile.c (tsave_command): Constify.
2451 * infcmd.c (attach_command, disconnect_command, signal_command)
2452 (queue_signal_command, stepi_command, nexti_command)
2453 (finish_command, next_command, step_command, until_command)
2454 (advance_command, jump_command, continue_command, run_command)
2455 (start_command, starti_command, interrupt_command)
2456 (run_command_1, set_inferior_args, step_1): Constify.
2457 * inferior.c (add_inferior_command, remove_inferior_command)
2458 (clone_inferior_command): Constify.
2459 * linux-fork.c (checkpoint_command, restart_command): Constify.
2460 * windows-nat.c (signal_event_command): Constify.
2461 * guile/guile.c (guile_repl_command, guile_command): Constify.
2462 * printcmd.c (x_command, display_command, printf_command)
2463 (output_command, set_command, call_command, print_command)
2464 (eval_command): Constify.
2465 (non_const_set_command): Remove.
2466 (_initialize_printcmd): Update.
2467 * source.c (forward_search_command, reverse_search_command):
2468 Constify.
2469 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2470 Constify.
2471 * infrun.c (handle_command): Constify.
2472 * memattr.c (mem_command): Constify.
2473 * stack.c (return_command, up_command, up_silently_command)
2474 (down_command, down_silently_command, frame_command)
2475 (backtrace_command, func_command, backtrace_command_1): Constify.
2476 (backtrace_command): Add non-const overload.
2477 * remote-sim.c (simulator_command): Constify.
2478 * exec.c (set_section_command): Constify.
2479 * tracepoint.c (tdump_command, trace_variable_command)
2480 (tstatus_command, tstop_command, tstart_command)
2481 (end_actions_pseudocommand, while_stepping_pseudocommand)
2482 (collect_pseudocommand, teval_pseudocommand, actions_command)
2483 (start_tracing, stop_tracing): Constify.
2484 * value.c (init_if_undefined_command): Constify.
2485 * tui/tui-stack.c (tui_update_command): Constify.
2486 * tui/tui-win.c (tui_refresh_all_command)
2487 (tui_set_tab_width_command, tui_set_win_height_command)
2488 (tui_set_focus_command, tui_scroll_forward_command)
2489 (tui_scroll_backward_command, tui_scroll_left_command)
2490 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2491 (tui_set_win_height): Constify.
2492 * tui/tui-layout.c (tui_layout_command): Constify.
2493 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2494 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2495 (proc_untrace_sysexit_cmd): Constify.
2496 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2497 (threadset_test_cmd, threadlist_update_test_cmd)
2498 (threadalive_test): Constify.
2499 * objc-lang.c (print_object_command): Constify.
2500 * command.h (add_com): Constify.
2501 * cli/cli-dump.c (restore_command): Constify.
2502 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2503 (help_command, complete_command, shell_command, edit_command)
2504 (list_command, disassemble_command, make_command)
2505 (apropos_command, alias_command): Constify.
2506 * cli/cli-script.c (document_command, define_command)
2507 (while_command, if_command, validate_comname): Constify.
2508 * cli/cli-decode.c (struct cmd_list_element): Change type of
2509 "fun".
2510 * target.c (do_monitor_command, flash_erase_command): Constify.
2511 * regcache.c (reg_flush_command): Constify.
2512 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2513 (reverse_nexti, reverse_continue, reverse_finish)
2514 (save_bookmark_command, goto_bookmark_command)
2515 (exec_reverse_once): Constify.
2516 * python/python.c (python_interactive_command, python_command):
2517 Constify.
2518 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2519 Constify.
2520 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2521 * gcore.c (gcore_command): Constify.
2522
85c4be7c
TT
25232017-11-07 Tom Tromey <tom@tromey.com>
2524
2525 * printcmd.c (x_command): Call set_repeat_arguments.
2526 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2527 * top.c (repeat_arguments): New global.
2528 (set_repeat_arguments): New function.
2529 (execute_command): Handle repeat_arguments.
2530 (show_commands): Calls set_repeat_arguments.
2531 * command.h (set_repeat_arguments): Declare.
2532
022643b4
TT
25332017-11-07 Tom Tromey <tom@tromey.com>
2534
2535 * stack.c (backtrace_command): Use std::string.
2536 (backtrace_command_1): Make "count_exp" const.
2537
5614fb77
TT
25382017-11-07 Tom Tromey <tom@tromey.com>
2539
2540 * source.c (directory_switch, mod_path, add_path): Constify.
2541 * defs.h (add_path, mod_path, directory_switch): Constify.
2542 * mi/mi-cmd-env.c (env_mod_path): Constify.
2543
6be9a197
TT
25442017-11-07 Tom Tromey <tom@tromey.com>
2545
2546 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2547 (run_command_1, continue_command, step_1, jump_command)
2548 (signal_command, until_command, advance_command, finish_command)
2549 (attach_command): Update.
2550
c2252c0d
TT
25512017-11-07 Tom Tromey <tom@tromey.com>
2552
2553 * command.h (set_cmd_cfunc): Don't declare.
2554 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2555
1ee870c5
TT
25562017-11-07 Tom Tromey <tom@tromey.com>
2557
2558 * stack.c (select_frame_command): Constify.
2559 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2560 * command.h (add_com_suppress_notification): Constify.
2561
ee7ddd71
TT
25622017-11-07 Tom Tromey <tom@tromey.com>
2563
2564 * breakpoint.c (stop_command): Constify.
2565 * cli/cli-decode.c (struct cmd_list_element): Constify.
2566 * command.h (add_abbrev_prefix_cmd): Constify.
2567
95e95a6d
PA
25682017-11-07 Pedro Alves <palves@redhat.com>
2569
2570 * breakpoint.c (extract_bp_kind): New enum.
2571 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2572 factored out from ...
2573 (extract_bp_number_and_location): ... here.
2574 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2575
cc638e86
PA
25762017-11-07 Pedro Alves <palves@redhat.com>
2577
2578 * breakpoint.c (extract_bp_number_and_location): Change return
2579 type to void. Throw error instead of warning.
2580 (enable_disable_command): Adjust.
2581
d0fe4701
XR
25822017-11-07 Xavier Roirand <roirand@adacore.com>
2583 Pedro Alves <palves@redhat.com>
2584
2585 * breakpoint.c (map_breakpoint_number_range): New, factored out
2586 from ...
2587 (map_breakpoint_numbers): ... here.
2588 (find_location_by_number): Change parameters from string to
2589 breakpoint number and location.
2590 (extract_bp_number_and_location): New function.
2591 (enable_disable_bp_num_loc)
2592 (enable_disable_breakpoint_location_range)
2593 (enable_disable_command): New functions, factored out ...
2594 (enable_command, disable_command): ... these functions, and
2595 adjusted to support ranges.
2596 * NEWS: Document enable/disable breakpoint location range feature.
2597
635dc5b2
LM
25982017-11-06 Luis Machado <luis.machado@linaro.org>
2599
2600 * MAINTAINERS (Write After Approval): Update my e-mail address.
2601
556e5da5
PA
26022017-11-06 Pedro Alves <palves@redhat.com>
2603
2604 * gnu-nat.c (gnu_terminal_init): Delete.
2605 (gnu_target): Don't install gnu_terminal_init.
2606 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2607 (child_terminal_init): ... this function.
2608
d1928160
PA
26092017-11-06 Pedro Alves <palves@redhat.com>
2610
2611 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2612 sgtty.h.
2613 * config.in, configure: Regenerate.
2614
6aa899ce
PA
26152017-11-06 Pedro Alves <palves@redhat.com>
2616
2617 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2618 (async_init_signals): Adjust.
2619 (handle_stop_sig): Rename to ...
2620 (handle_sigtstp): ... this.
2621 (async_stop_sig): Rename to ...
2622 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2623 SIGTSTP path.
2624 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2625 instead of STOP_SIGNAL thoughout.
2626 (handle_stop_sig): Rename to ...
2627 (handle_sigtstp): ... this.
2628 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2629
a94799ac
PA
26302017-11-06 Pedro Alves <palves@redhat.com>
2631
2632 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2633 longer set flags twice in row.
2634
726e1356
PA
26352017-11-06 Pedro Alves <palves@redhat.com>
2636
2637 * Makefile.in (SER_HARDWIRE): Update comment.
2638 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2639 * common/gdb_termios.h: Delete file.
2640 * common/job-control.c: Include termios.h and unistd.h instead of
2641 gdb_termios.h.
2642 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2643 check.
2644 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2645 Remove sgtty code.
2646 * configure.ac: No longer check for termio.h and sgtty.h.
2647 * configure: Regenerate.
2648 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2649 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2650 Replace PROCESS_GROUP_TYPE references with pid_t references
2651 throughout.
2652 (gdb_getpgrp): Delete.
2653 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2654 (child_terminal_inferior): Remove comment. Remove sgtty code.
2655 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2656 gdb_getpgrp. Use serial_set_tty_state instead aof
2657 serial_noflush_set_tty_state. Remove sgtty code.
2658 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2659 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2660 (inferior_process_group): Now returns pid_t.
2661 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2662 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2663 * ser-event.c (serial_event_ops): Update.
2664 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2665 (dos_ops): Update.
2666 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2667 * ser-pipe.c (pipe_ops): Update.
2668 * ser-tcp.c (tcp_ops): Update.
2669 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2670 HAVE_TERMIOS checks.
2671 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2672 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2673 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2674 assume termios.
2675 (hardwire_noflush_set_tty_state): Delete.
2676 (hardwire_print_tty_state, hardwire_drain_output)
2677 (hardwire_flush_output, hardwire_flush_input)
2678 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2679 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2680 code, and assume termios.
2681 (hardwire_ops): Update.
2682 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2683 * serial.c (serial_noflush_set_tty_state): Delete.
2684 * serial.h (serial_noflush_set_tty_state): Delete.
2685 (serial_ops::noflush_set_tty_state): Delete.
2686
1cfb73db
UW
26872017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2688
2689 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2690 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2691 (COMMON_OBS): Remove doublest.o and dfp.o.
2692 Do not build target-float.c (instead of doublest.c)
2693 with -Wformat-nonliteral.
2694
2695 * doublest.c: Remove file.
2696 * doublest.h: Remove file.
2697 * dfp.c: Remove file.
2698 * dfp.h: Remove file.
2699
2700 * target-float.c: Do not include "doublest.h" and "dfp.h".
2701 (DOUBLEST): Move here from doublest.h.
2702 (enum float_kind): Likewise.
2703 (FLOATFORMAT_CHAR_BIT): Likewise.
2704 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2705 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2706 (floatformat_precision): Likewise.
2707 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2708 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2709 Likewise.
2710 (host_float_format, host_double_format, host_long_double_format):
2711 Likewise.
2712 (floatformat_to_string, floatformat_from_string): Likewise.
2713 (floatformat_to_doublest): Likewise. Also, inline the original
2714 convert_floatformat_to_doublest.
2715 (floatformat_from_doublest): Likewise. Also, inline the original
2716 convert_floatformat_from_doublest.
2717
2718 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2719 (MAX_DECIMAL_STRING): Move here from dfp.c.
2720 (match_endianness): Likewise.
2721 (set_decnumber_context, decimal_check_errors): Likewise.
2722 (decimal_from_number, decimal_to_number): Likewise.
2723 (decimal_to_string, decimal_from_string): Likewise. Make static.
2724 (decimal_from_longest, decimal_from_ulongest): Likewise.
2725 (decimal_to_longest): Likewise.
2726 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2727 (decimal_convert): Likewise.
2728
b07e9c46
UW
27292017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2730
2731 * doublest.c: Do not include "gdbtypes.h".
2732 (extract_typed_floating): Remove.
2733 (store_typed_floating): Remove.
2734 (convert_typed_floating): Remove.
2735 * doublest.h (struct type): Remove.
2736 (DOUBLEST_PRINT_FORMAT): Remove.
2737 (DOUBLEST_SCAN_FORMAT): Remove.
2738 (extract_typed_floating): Remove.
2739 (store_typed_floating): Remove.
2740 (convert_typed_floating): Remove.
2741
2742 * dfp.c (decimal_from_doublest): Remove.
2743 (decimal_to_doublest): Remove.
2744 * dfp.h: Do not include "doublest.h".
2745 (decimal_from_doublest): Remove.
2746 (decimal_to_doublest): Remove.
2747
2748 * value.c: Do not include "doublest.h" and "dfp.h".
2749 (value_as_double): Remove.
2750 (unpack_double): Remove.
2751 (value_from_double): Remove.
2752 (value_from_decfloat): Remove.
2753 * value.h: Do not include "doublest.h".
2754 (value_as_double): Remove.
2755 (unpack_double): Remove.
2756 (value_from_double): Remove.
2757 (value_from_decfloat): Remove.
2758
3b2ca824
UW
27592017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2760
2761 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2762 (i386_extract_return_value): Use target_float_convert.
2763 (i386_store_return_value): Likewise.
2764 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2765 (i387_value_to_register): Likewise.
2766 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2767 (ia64_register_to_value): Use target_float_convert.
2768 (ia64_value_to_register): Likewise.
2769 (ia64_extract_return_value): Likewise.
2770 (ia64_store_return_value): Likewise.
2771 (ia64_push_dummy_call): Likewise.
2772 * m68k-tdep.c: Include "target-float.h".
2773 (m68k_register_to_value): Use target_float_convert.
2774 (m68k_value_to_register): Likewise.
2775 (m68k_svr4_extract_return_value): Likewise.
2776 (m68k_svr4_store_return_value): Likewise.
2777 * ppc-sysv-tdep.c: Include "target-float.h".
2778 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2779 (do_ppc_sysv_return_value): Likewise.
2780 (ppc64_sysv_abi_push_freg): Likewise.
2781 (ppc64_sysv_abi_return_value_base): Likewise.
2782 * rs6000-aix-tdep.c: Include "target-float.h".
2783 (rs6000_push_dummy_call): Use target_float_convert.
2784 (rs6000_return_value): Likewise.
2785 * rs6000-lynx178-tdep.c: Include "target-float.h".
2786 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2787 (rs6000_lynx178_return_value): Likewise.
2788 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2789 (rs6000_register_to_value): Use target_float_convert.
2790 (rs6000_value_to_register): Likewise.
2791 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2792 (arm_extract_return_value): Use target_float_convert.
2793 (arm_store_return_value): Likewise.
2794 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2795 (sh_register_convert_to_virtual): Use target_float_convert.
2796 (sh_register_convert_to_raw): Likewise.
2797 * sh64-tdep.c: Include "target-float.h".
2798 (sh64_extract_return_value): Use target_float_convert.
2799 (sh64_register_convert_to_virtual): Likewise.
2800 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2801
14ad9311
UW
28022017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2803
2804 * target-float.c (floatformat_to_host_double): New function.
2805 (floatformat_from_host_double): Likewise.
2806 (target_float_to_host_double): Likewise.
2807 (target_float_from_host_double): Likewise.
2808 * target-float.h (target_float_to_host_double): Add prototype.
2809 (target_float_from_host_double): Likewise.
2810
2811 * guile/scm-value.c: Include "target-float.h".
2812 (gdbscm_value_to_real): Use target_float_to_host_double.
2813 Handle integer source values via value_as_long.
2814 * guile/scm-math.c: Include "target-float.h". Do not include
2815 "doublest.h", "dfp.h", and "expression.h".
2816 (vlscm_convert_typed_number): Use target_float_from_host_double.
2817 (vlscm_convert_number): Likewise.
2818
2819 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2820 (convert_value_from_python): Use target_float_from_host_double.
2821
50eff16b
UW
28222017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2823
2824 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2825 (cast_from_fixed): Likewise.
2826 (ada_scaling_type): New function.
2827 (ada_delta): Return value instead of DOUBLEST. Perform target
2828 arithmetic instead of host arithmetic.
2829 (scaling_factor): Rename to ...
2830 (ada_scaling_factor) ... this. Make non-static. Return value instead
2831 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2832 (ada_fixed_to_float): Remove.
2833 (ada_float_to_fixed): Remove.
2834 * ada-lang.h (ada_fixed_to_float): Remove.
2835 (ada_float_to_fixed): Remove.
2836 (ada_delta): Return value instead of DOUBLEST.
2837 (ada_scaling_factor): Add prototype.
2838
2839 * ada-typeprint.c: Include "target-float.h".
2840 (print_fixed_point_type): Perform target arithmetic instead of
2841 host arithmetic.
2842 * ada-valprint.c: Include "target-float.h".
2843 (ada_val_print_num): Perform target arithmetic instead of
2844 host arithmetic for fixed-point types.
2845
66c02b9e
UW
28462017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2847
2848 * target-float.c: Include <math.h>.
2849 (floatformat_binop): New function.
2850 (floatformat_compare): Likewise.
2851 (target_float_binop): Likewise.
2852 (target_float_compare): Likewise.
2853 * target-float.h: Include "expression.h".
2854 (target_float_binop): Add prototype.
2855 (target_float_compare): Likewise.
2856
2857 * valarith.c: Do not include "doublest.h" and "dfp.h".
2858 Include "common/byte-vector.h".
2859 (value_args_as_decimal): Remove, replace by ...
2860 (value_args_as_target_float): ... this function. Handle both
2861 binary and decimal target floating-point formats.
2862 (scalar_binop): Handle both binary and decimal FP using
2863 value_args_as_target_float and target_float_binop.
2864 (value_equal): Handle both binary and decimal FP using
2865 value_args_as_target_float and target_float_compare.
2866 (value_less): Likewise.
2867 (value_pos): Handle all scalar types as simple copy.
2868 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2869 * dfp.c (decimal_binop): Throw error instead of internal_error
2870 when called with an unsupported operation code.
2871
f69fdf9b
UW
28722017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2873
2874 * target-float.c (target_float_to_string): New function.
2875 (target_float_from_string): New function.
2876 * target-float.h (target_float_to_string): Add prototype.
2877 (target_float_from_string): Add prototype.
2878
2879 * valprint.c: Include "target-float.h". Do not include
2880 "doublest.h" and "dfp.h".
2881 (print_floating): Use target_float_to_string.
2882 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2883 (printf_floating): Use target_float_to_string.
2884 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2885 (print_i387_value): Use target_float_to_string.
2886 * mips-tdep.c: Include "target-float.h".
2887 (mips_print_fp_register): Use target_float_to_string.
2888 * sh64-tdep.c: Include "target-float.h".
2889 (sh64_do_fp_register): Use target_float_to_string.
2890
2891 * parse.c: Include "target-float.h". Do not include
2892 "doublest.h" and "dfp.h".
2893 (parse_float): Use target_float_from_string.
2894 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2895 (define_symbol): Use target_float_from_string.
2896 * gdbarch-selftests.c: Include "target-float.h".
2897 (register_to_value_test): Use target_float_from_string.
2898
70100014
UW
28992017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2900
2901 * Makefile.c (SFILES): Add target-float.c.
2902 (HFILES_NO_SRCDIR): Add target-float.h.
2903 (COMMON_OBS): Add target-float.o.
2904 * target-float.h: New file.
2905 * target-float.c: New file.
2906
2907 * doublest.c (floatformat_classify): Fix detection of float_zero.
2908
2909 * gdbtypes.c (is_floating_type): New function.
2910 * gdbtypes.h (is_floating_type): Add prototype.
2911
2912 * value.c: Do not include "floatformat.h".
2913 (unpack_double): Use target_float_is_valid.
2914 (is_floating_value): New function.
2915 * value.h (is_floating_value): Add prototype-
2916
2917 * valarith.c: Include "target-float.h".
2918 (value_logical_not): Use target_float_is_zero.
2919
2920 * python/py-value.c: Include "target-float.h".
2921 (valpy_nonzero): Use target_float_is_zero.
2922
ab4b1c46
TT
29232017-11-04 Tom Tromey <tom@tromey.com>
2924
2925 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2926
454dafbd
TT
29272017-11-04 Tom Tromey <tom@tromey.com>
2928
2929 * breakpoint.c (set_momentary_breakpoint): Return
2930 breakpoint_up.
2931 (until_break_command): Update.
2932 (new_until_break_fsm): Change argument types to
2933 breakpoint_up.
2934 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2935 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2936 Remove.
2937 * infcmd.c (finish_forward): Update.
2938 * breakpoint.h (set_momentary_breakpoint)
2939 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2940 (make_cleanup_delete_breakpoint): Remove.
2941 (struct breakpoint_deleter): New.
2942 (breakpoint_up): New typedef.
2943 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2944 (insert_exception_resume_breakpoint): Update.
2945 (insert_exception_resume_from_probe): Update.
2946 (insert_longjmp_resume_breakpoint): Update.
2947 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2948 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2949 * infcall.c (call_function_by_hand_dummy): Update
2950
331b71e5
TT
29512017-11-04 Tom Tromey <tom@tromey.com>
2952
2953 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2954
9f584b37
TT
29552017-11-04 Tom Tromey <tom@tromey.com>
2956
2957 * linux-tdep.c (linux_core_info_proc_mappings): Use
2958 gdb::def_vector.
2959 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2960 "size" argument.
2961 (linux_corefile_thread): Update.
2962 (linux_make_corefile_notes): Remove unused variable.
2963
779bc38e
TT
29642017-11-04 Tom Tromey <tom@tromey.com>
2965
2966 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2967 gdb::byte_vector.
2968
ed2b3126
TT
29692017-11-04 Tom Tromey <tom@tromey.com>
2970
2971 * objfiles.c (do_free_objfile_cleanup): Remove.
2972 * compile/compile-object-load.c (compile_object_load): Update.
2973 * objfiles.h (make_cleanup_free_objfile): Remove.
2974
7f6743fd
TT
29752017-11-04 Tom Tromey <tom@tromey.com>
2976
2977 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2978 (adi_read_versions): Change "tags" to "gdb_byte *".
2979 (adi_print_versions): Likewise.
2980
c80049d3
TT
29812017-11-04 Tom Tromey <tom@tromey.com>
2982
2983 * breakpoint.c
2984 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2985 from start_rbreak_breakpoints.
2986 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2987 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2988 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2989 * symtab.c (do_end_rbreak_breakpoints): Remove.
2990 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2991
167b0be1
TT
29922017-11-04 Tom Tromey <tom@tromey.com>
2993
2994 * cp-namespace.c (reset_directive_searched): Remove.
2995 (cp_lookup_symbol_via_imports): Use scoped_restore.
2996 * cp-support.c (reset_directive_searched): Remove.
2997 (make_symbol_overload_list_using): Use scoped_restore.
2998 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2999 (reset_directive_searched): Remove.
3000
5eae7aea
TT
30012017-11-04 Tom Tromey <tom@tromey.com>
3002
3003 * symfile.c (find_separate_debug_file_by_debuglink): Use
3004 unique_xmalloc_ptr.
3005
c6bcad5f
TT
30062017-11-04 Tom Tromey <tom@tromey.com>
3007
3008 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3009 type of "info".
3010 (compute_stack_depth): Likewise.
3011 (do_compile_dwarf_expr_to_c): Use std::vector.
3012
20dcd8ca
TT
30132017-11-04 Tom Tromey <tom@tromey.com>
3014
3015 * compile/compile-object-load.c (link_callbacks_einfo): Use
3016 std::string.
3017
33c7c59d
TT
30182017-11-04 Tom Tromey <tom@tromey.com>
3019
3020 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3021 Use scoped_free_pendings.
3022 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3023 scoped_free_pendings.
3024 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3025 (xcoff_initial_scan): Likewise.
3026 * buildsym.c (reset_symtab_globals): Update comment.
3027 (scoped_free_pendings): Rename from really_free_pendings.
3028 (prepare_for_building): Update comment.
3029 (buildsym_init): Likewise.
3030 * buildsym.h (class scoped_free_pendings): New class.
3031 (really_free_pendings): Don't declare.
3032
67fa57cf
UW
30332017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3034
3035 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3036 output when converting a zero value to a special byteorder format.
3037
f26ae15b
YQ
30382017-11-02 Yao Qi <yao.qi@linaro.org>
3039
3040 * frame.c (do_frame_register_read): Remove aspace.
3041 * jit.c (jit_frame_sniffer): Likwise.
3042 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3043 * regcache.c (regcache::regcache): Pass nullptr.
3044 (regcache_print): Caller updated.
3045 * regcache.h (regcache::regcache): Remove one constructor
3046 parameter aspace.
3047
6c6e9412
YQ
30482017-11-02 Yao Qi <yao.qi@linaro.org>
3049
3050 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3051
8b86c959
YQ
30522017-11-02 Yao Qi <yao.qi@linaro.org>
3053
3054 * breakpoint.c (insert_single_step_breakpoints): Update.
3055 * frame.c (struct frame_info) <aspace>: Add const.
3056 (frame_save_as_regcache): Add const.
3057 (get_frame_address_space): Return const address_space *.
3058 * frame.h (get_frame_address_space): Update declaration.
3059 * infrun.c (struct step_over_info) <aspace>: Add const.
3060 (set_step_over_info): Make aspace const.
3061 (displaced_step_prepare_throw): Change variable const.
3062 (resume): Likewise.
3063 (proceed): Likewise.
3064 (adjust_pc_after_break): Likewise.
3065 (save_waitstatus): Likewise.
3066 (handle_signal_stop): Likewise.
3067 (keep_going_pass_signal): Likewise.
3068 * jit.c (jit_frame_sniffer): Add const.
3069 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3070 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3071 * record-full.c (record_full_wait_1): Likewise.
3072 * regcache.c (regcache::regcache): Change parameter to const.
3073 * regcache.h (regcache::regcache): Likewise.
3074 (regcache::aspace): Return const address_space *.
3075 (regcache) <m_aspace>: Add const.
3076
a01bda52
YQ
30772017-11-02 Yao Qi <yao.qi@linaro.org>
3078
3079 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3080 * frame.c (create_sentinel_frame): Likewise.
3081 * infrun.c (displaced_step_prepare_throw): Likewise.
3082 (resume): Likewise.
3083 (thread_still_needs_step_over_bp): Likewise.
3084 (proceed): Likewise.
3085 (do_target_wait): Likewise.
3086 (adjust_pc_after_break): Likewise.
3087 (handle_syscall_event): Likewise.
3088 (save_waitstatus): Likewise.
3089 (handle_inferior_event_1): Likewise.
3090 (handle_signal_stop): Likewise.
3091 (keep_going_pass_signal): Likewise.
3092 * linux-nat.c (status_callback): Likewise.
3093 (save_stop_reason): Likewise.
3094 (resume_stopped_resumed_lwps): Likewise.
3095 * record-full.c (record_full_exec_insn): Likewise.
3096 (record_full_wait_1): Likewise.
3097 * regcache.c (get_regcache_aspace): Remove.
3098 * regcache.h (get_regcache_aspace): Remove.
3099
d999647b
YQ
31002017-11-02 Yao Qi <yao.qi@linaro.org>
3101
3102 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3103 (init_regcache_descr): Use gdbarch_num_regs.
3104 (regcache::regcache): Likewise.
3105 (regcache::get_register_status): Likewise.
3106 (regcache::assert_raw_regnum): Likewise.
3107 (regcache::cooked_read): Likewise.
3108 (regcache::cooked_read_value): Likewise.
3109 (regcache::cooked_write): Likewise.
3110 (regcache::dump): Likewise.
3111 (regcache::num_raw_registers): New method.
3112 * regcache.h (class regcache) <num_raw_registers>: New.
3113
4e888c28
YQ
31142017-11-02 Yao Qi <yao.qi@linaro.org>
3115
3116 * regcache.c (regcache::assert_regnum): New method.
3117 (regcache::invalidate): Call assert_regnum.
3118 (regcache::raw_update): Likewise.
3119 (regcache::raw_write): Likewise.
3120 (regcache::raw_read_part): Likewise.
3121 (regcache::raw_write_part): Likewise.
3122 (regcache::raw_supply): Likewise.
3123 (regcache::raw_supply_integer): Likewise.
3124 (regcache::raw_supply_zeroed): Likewise.
3125 (regcache::raw_collect): Likewise.
3126 (regcache::raw_collect_integer): Likewise.
3127 * regcache.h (regcache::assert_regnum): Declare.
3128
2e1b49b3
YQ
31292017-11-02 Yao Qi <yao.qi@linaro.org>
3130
3131 * regcache.c (regcache::dump): Remove code.
3132
6c5218df
YQ
31332017-11-02 Yao Qi <yao.qi@linaro.org>
3134
3135 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3136 Remove.
3137 <sizeof_cooked_register_status>: Remove.
3138 (init_regcache_descr): Update.
3139 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3140 (regcache::save): Likewise.
3141 (regcache::dump): Likewise.
3142
dcc31d28
JB
31432017-11-01 James Bowman <james.bowman@ftdichip.com>
3144
3145 * ft32-tdep.c (ft32_fetch_instruction): New function.
3146 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3147
3a87ae65
SM
31482017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3149
3150 * cli/cli-script.c (execute_control_command): Rename to ...
3151 (execute_control_command_1): ... this.
3152 (execute_control_command): New function.
3153
09b847f3
SM
31542017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3155
3156 * tracepoint.c (tfind_command): Remove const_cast.
3157
f871c485
MG
31582017-10-30 Mike Gulick <mgulick@mathworks.com>
3159
3160 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3161
b020ff80
SM
31622017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3163
3164 * common/common-utils.h (in_inclusive_range): New function.
3165 * arm-tdep.c (arm_record_extension_space): Use
3166 in_inclusive_range.
3167 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3168 * cris-tdep.c (cris_spec_reg_applicable): Use
3169 in_inclusive_range.
3170
1b81856f
PA
31712017-10-30 Pedro Alves <palves@redhat.com>
3172 Simon Marchi <simon.marchi@ericsson.com>
3173
3174 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3175 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3176
31b833b3
PA
31772017-10-30 Pedro Alves <palves@redhat.com>
3178
3179 * common/common-utils.c (string_appendf, string_vappendf): New
3180 functions.
3181 * common/common-utils.h (string_appendf, string_vappendf): New
3182 declarations.
3183 * unittests/common-utils-selftests.c (string_appendf_func)
3184 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3185 (string_vappendf_tests): New functions.
3186 (_initialize_common_utils_selftests): Register "string_appendf" and
3187 "string_vappendf tests".
3188
4a250334
PA
31892017-10-30 Pedro Alves <palves@redhat.com>
3190
3191 * unittests/common-utils-selftests.c (format_func): New typedef.
3192 (string_printf_tests, string_vprintf_tests): Tests factored out
3193 and merged to ...
3194 (test_format_func): ... this new function.
3195 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3196 test_format_func.
3197
16c5c17e
SM
31982017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3199
3200 * darwin-nat.c: Remove include of gdb.h.
3201
7ca51576
SM
32022017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * xtensa-xtregs.c: Fix formatting issues.
3205
c1342859
SM
32062017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3207
3208 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3209
484d8d36
MD
32102017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3211
3212 PR python/21213
3213 * python/py-infthread.c (thpy_get_inferior): Increment reference
3214 of inferior before returning it.
3215
b5540b5f
SM
32162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3217
3218 * unittests/common-utils-selftests.c (format): Add
3219 ATTRIBUTE_PRINTF.
3220
5a9dcda1
SM
32212017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3222
3223 * xml-syscall.c (struct syscall_desc): Add constructor.
3224 <name>: Change type to std::string.
3225 (syscall_desc_up): New typedef.
3226 (syscall_desc_p): Remove typeder.
3227 (DEF_VEC_P(syscall_desc_p)): Remove.
3228 (struct syscall_group_desc): Add constructor.
3229 <name>: Change type to std::string.
3230 <syscalls>: Change type to std::vector.
3231 (syscall_group_desc_up): New typedef.
3232 (syscall_group_desc_p): Remove typedef.
3233 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3234 (struct syscalls_info) <syscalls>: Change type to std::vector of
3235 unique_ptr.
3236 <groups>: Likewise.
3237 <my_gdb_datadir>: Change type to std::string.
3238 (syscalls_info_up): New typedef.
3239 (allocate_syscalls_info): Remove.
3240 (syscalls_info_free_syscalls_desc): Remove.
3241 (syscalls_info_free_syscall_group_desc): Remove.
3242 (free_syscalls_info): Remove.
3243 (make_cleanup_free_syscalls_info): Remove.
3244 (syscall_group_create_syscall_group_desc): Adjust.
3245 (syscall_group_add_syscall): Adjust.
3246 (syscall_create_syscall_desc): Adjust.
3247 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3248 (init_syscalls_info): Adjust.
3249 (syscall_group_get_group_by_name): Adjust.
3250 (xml_get_syscall_number): Adjust.
3251 (xml_get_syscall_name): Adjust.
3252 (xml_list_of_syscalls): Adjust.
3253 (xml_list_syscalls_by_group): Adjust.
3254 (xml_list_of_groups): Adjust.
3255
45461e0d
SM
32562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3257
3258 * probe.h: Don't include gdb_vecs.h.
3259 (DEF_VEC_P (probe_p)): Remove.
3260 (find_probes_in_objfile): Return an std::vector.
3261 * probe.c (find_probes_in_objfile): Likewise.
3262 * breakpoint.c (breakpoint_objfile_data)
3263 <longjmp_probes>: Change type to std::vector.
3264 <exception_probes>: Likewise.
3265 (free_breakpoint_probes): Don't manually free vectors.
3266 (create_longjmp_master_breakpoint): Adjust.
3267 (create_exception_master_breakpoint): Adjust.
3268 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3269 parameter type, adjust.
3270 (svr4_create_solib_event_breakpoints): Adjust.
3271
43dce439
SM
32722017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3275 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3276 with new.
3277 (free_breakpoint_probes): Rename to ...
3278 (free_breakpoint_objfile_data): ... this, and call delete on
3279 bp_objfile_data..
3280
6a1b9516
SM
32812017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3282
3283 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3284 (loaded_script_ptr): Remove typedef.
3285 (DEF_VEC_P (loaded_script_ptr)): Remove.
3286 (struct collect_matching_scripts_data): Add constructor.
3287 <scripts_p>: Change type to (pointer to) std::vector.
3288 (collect_matching_scripts_data): Adjust.
3289 (sort_scripts_by_name): Make suitable for std::sort.
3290 (print_scripts): Don't sort vector, adjust to std::vector.
3291 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3292
593e3209
SM
32932017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3294
3295 * symfile.c (filename_language): Make struct, not typedef. Add
3296 constructor.
3297 <ext>: Change type to std::string.
3298 (DEF_VEC_O (filename_language)): Remove.
3299 (filename_language_table): Change type to std::vector.
3300 (add_filename_language): Adjust.
3301 (set_ext_lang_command): Adjust.
3302 (info_ext_lang_command): Adjust.
3303 (deduce_language_from_filename): Adjust.
3304 (class scoped_restore_filename_language_table): Remove.
3305 (test_filename_language): Use scoped_restore.
3306 (test_set_ext_lang_command): Use scoped_restore, adjust to
3307 std::vector change.
3308
32fa66eb
SM
33092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3310
3311 * symfile.c: Include selftest.h.
3312 (class scoped_restore_filename_language_table): New.
3313 (test_filename_language): New test.
3314 (test_set_ext_lang_command): New test.
3315 (_initialize_symfile): Register tests.
3316
4a27f119
KS
33172017-10-27 Keith Seitz <keiths@redhat.com>
3318
3319 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3320 in the bp_location, falling back to find_pc_sect_function when
3321 needed.
3322 (add_location_to_breakpoint): Save sal->symbol.
3323 * breakpoint.h (struct bp_location) <symbol>: New field.
3324 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3325 * symtab.h (struct symtab_and_line) <symbol>: New field.
3326
a43f3893
PF
33272017-10-26 Patrick Frants <osscontribute@gmail.com>
3328
7453e6b2 3329 PR gdb/13669
a43f3893
PF
3330 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3331 to rewind obstack.
3332
23cc4e1b
PA
33332017-10-26 Pedro Alves <palves@redhat.com>
3334
3335 * remote.c (remote_async_terminal_ours_p): Delete.
3336 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3337 Remove references to 'remote_async_terminal_ours_p'.
3338
6abc18bb
YQ
33392017-10-26 Yao Qi <yao.qi@linaro.org>
3340
3341 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3342
bd522513
YQ
33432017-10-26 Yao Qi <yao.qi@linaro.org>
3344
3345 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3346 aspace const.
3347 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3348 Likewise.
3349 * breakpoint.c (bpstat_check_location): Remove cast.
3350 (breakpoint_hit_catch_fork): Make aspce const.
3351 (breakpoint_hit_catch_solib): Likewise.
3352 (breakpoint_hit_catch_exec): Likewise.
3353 (breakpoint_hit_ranged_breakpoint): Likewise.
3354 (breakpoint_hit_watchpoint): Likewise.
3355 (base_breakpoint_breakpoint_hit): Likewise.
3356 (bkpt_breakpoint_hit): Likewise.
3357 (dprintf_breakpoint_hit): Likewise.
3358 (tracepoint_breakpoint_hit): Likewise.
3359 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3360
accd0bcd
YQ
33612017-10-26 Yao Qi <yao.qi@linaro.org>
3362
3363 * breakpoint.c (breakpoint_location_address_match): Change
3364 "struct address_space *" to "const address_space".
3365 (breakpoint_location_address_range_overlap): Likewise.
3366 (breakpoint_here_p): Likewise.
3367 (breakpoint_in_range_p): Likewise.
3368 (moribund_breakpoint_here_p): Likewise.
3369 (bp_location_inserted_here_p): Likewise.
3370 (software_breakpoint_inserted_here_p): Likewise.
3371 (hardware_breakpoint_inserted_here_p): Likewise.
3372 (hardware_watchpoint_inserted_in_range): Likewise.
3373 (bpstat_check_location): Likewise.
3374 (bpstat_stop_status): Likewise.
3375 (breakpoint_address_match): Likewise.
3376 (breakpoint_address_match_range): Likewise.
3377 (breakpoint_location_address_match): Likewise.
3378 (breakpoint_location_address_range_overlap): Likewise.
3379 (insert_single_step_breakpoint): Likewise.
3380 (breakpoint_has_location_inserted_here): Likewise.
3381 (single_step_breakpoint_inserted_here_p): Likewise.
3382 (pc_at_non_inline_function): Likewise.
3383 * breakpoint.h (bpstat_stop_status): Update declaration.
3384 (breakpoint_here_p): Likewise.
3385 (breakpoint_in_range_p): Likewise.
3386 (moribund_breakpoint_here_p): Likewise.
3387 (breakpoint_inserted_here_p): Likewise.
3388 (software_breakpoint_inserted_here_p): Likewise.
3389 (hardware_breakpoint_inserted_here_p): Likewise.
3390 (breakpoint_has_location_inserted_here): Likewise.
3391 (single_step_breakpoint_inserted_here_p): Likewise.
3392 (hardware_watchpoint_inserted_in_range): Likewise.
3393 (breakpoint_address_match): Likewise.
3394 (insert_single_step_breakpoint): Likewise.
3395 (pc_at_non_inline_function): Likewise.
3396 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3397 * record.c (record_check_stopped_by_breakpoint): Likewise.
3398 * record.h (record_check_stopped_by_breakpoint): Likewise.
3399 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3400
ac7936df
YQ
34012017-10-25 Yao Qi <yao.qi@linaro.org>
3402
3403 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3404 regcache->arch () instead get_regcache_arch.
3405 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3406 Likewise.
3407 (aarch64_fbsd_store_inferior_registers): Likewise.
3408 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3409 (store_gregs_to_thread): Likewise.
3410 (fetch_fpregs_from_thread): Likewise.
3411 (store_fpregs_to_thread): Likewise.
3412 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3413 (aarch64_store_return_value): Likewise.
3414 (aarch64_software_single_step): Likewise.
3415 * aix-thread.c (aix_thread_wait): Likewise.
3416 (supply_reg32): Likewise.
3417 (supply_sprs64): Likewise.
3418 (supply_sprs32): Likewise.
3419 (fill_gprs64): Likewise.
3420 (fill_gprs32): Likewise.
3421 (fill_sprs64): Likewise.
3422 (fill_sprs32): Likewise.
3423 (store_regs_user_thread): Likewise.
3424 (store_regs_kernel_thread): Likewise.
3425 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3426 (alphabsd_store_inferior_registers): Likewise.
3427 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3428 (alpha_store_return_value): Likewise.
3429 (alpha_deal_with_atomic_sequence): Likewise.
3430 (alpha_next_pc): Likewise.
3431 (alpha_software_single_step): Likewise.
3432 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3433 (amd64bsd_store_inferior_registers): Likewise.
3434 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3435 Likewise.
3436 (amd64_linux_store_inferior_registers): Likewise.
3437 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3438 (amd64_collect_native_gregset): Likewise.
3439 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3440 (amd64obsd_collect_uthread): Likewise.
3441 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3442 (amd64_collect_fpregset): Likewise.
3443 (amd64_supply_fxsave): Likewise.
3444 (amd64_supply_xsave): Likewise.
3445 (amd64_collect_fxsave): Likewise.
3446 (amd64_collect_xsave): Likewise.
3447 * arc-tdep.c (arc_write_pc): Likewise.
3448 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3449 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3450 (arm_fbsd_store_inferior_registers): Likewise.
3451 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3452 (store_vfp_regs): Likewise.
3453 (arm_linux_fetch_inferior_registers): Likewise.
3454 (arm_linux_store_inferior_registers): Likewise.
3455 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3456 (arm_linux_sigreturn_next_pc): Likewise.
3457 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3458 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3459 (fetch_register): Likewise.
3460 (store_register): Likewise.
3461 * arm-tdep.c (arm_is_thumb): Likewise.
3462 (displaced_in_arm_mode): Likewise.
3463 (bx_write_pc): Likewise.
3464 (arm_get_next_pcs_addr_bits_remove): Likewise.
3465 (arm_software_single_step): Likewise.
3466 (arm_extract_return_value): Likewise.
3467 (arm_store_return_value): Likewise.
3468 (arm_write_pc): Likewise.
3469 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3470 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3471 (bsd_uthread_store_registers): Likewise.
3472 * core-regset.c (fetch_core_registers): Likewise.
3473 * corelow.c (get_core_registers): Likewise.
3474 * cris-tdep.c (cris_store_return_value): Likewise.
3475 (cris_extract_return_value): Likewise.
3476 (find_step_target): Likewise.
3477 (find_step_target): Likewise.
3478 (cris_software_single_step): Likewise.
3479 * ctf.c (ctf_fetch_registers): Likewise.
3480 * darwin-nat.c (cancel_breakpoint): Likewise.
3481 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3482 * frv-tdep.c (frv_extract_return_value): Likewise.
3483 * ft32-tdep.c (ft32_store_return_value): Likewise.
3484 (ft32_extract_return_value): Likewise.
3485 * go32-nat.c (fetch_register): Likewise.
3486 (go32_fetch_registers): Likewise.
3487 (go32_store_registers): Likewise.
3488 (store_register): Likewise.
3489 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3490 (h8300_store_return_value): Likewise.
3491 * hppa-linux-nat.c (fetch_register): Likewise.
3492 (store_register): Likewise.
3493 (hppa_linux_fetch_inferior_registers): Likewise.
3494 (hppa_linux_store_inferior_registers): Likewise.
3495 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3496 (i386_darwin_store_inferior_registers): Likewise.
3497 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3498 (gnu_store_registers): Likewise.
3499 * i386-linux-nat.c (fetch_register): Likewise.
3500 (store_register): Likewise.
3501 (supply_gregset): Likewise.
3502 (fill_gregset): Likewise.
3503 (i386_linux_fetch_inferior_registers): Likewise.
3504 (i386_linux_store_inferior_registers): Likewise.
3505 (i386_linux_resume): Likewise.
3506 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3507 Likewise.
3508 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3509 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3510 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3511 (i386obsd_collect_uthread): Likewise.
3512 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3513 (i386_supply_gregset): Likewise.
3514 (i386_collect_gregset): Likewise.
3515 (i386_supply_fpregset): Likewise.
3516 (i386_collect_fpregset): Likewise.
3517 (i386_mpx_bd_base): Likewise.
3518 * i386-v4-nat.c (supply_fpregset): Likewise.
3519 (fill_fpregset): Likewise.
3520 * i387-tdep.c (i387_supply_fsave): Likewise.
3521 (i387_collect_fsave): Likewise.
3522 (i387_supply_fxsave): Likewise.
3523 (i387_collect_fxsave): Likewise.
3524 (i387_supply_xsave): Likewise.
3525 (i387_collect_xsave): Likewise.
3526 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3527 (ia64_linux_store_registers): Likewise.
3528 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3529 (ia64_extract_return_value): Likewise.
3530 (ia64_store_return_value): Likewise.
3531 (find_func_descr): Likewise.
3532 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3533 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3534 (inf_ptrace_store_registers): Likewise.
3535 * infrun.c (use_displaced_stepping): Likewise.
3536 (displaced_step_prepare_throw): Likewise.
3537 (resume): Likewise.
3538 (proceed): Likewise.
3539 (do_target_wait): Likewise.
3540 (adjust_pc_after_break): Likewise.
3541 (handle_inferior_event_1): Likewise.
3542 (handle_signal_stop): Likewise.
3543 (save_infcall_suspend_state): Likewise.
3544 (restore_infcall_suspend_state): Likewise.
3545 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3546 * jit.c (jit_frame_prev_register): Likewise.
3547 * linux-nat.c (save_stop_reason): Likewise.
3548 (linux_nat_wait_1): Likewise.
3549 (resume_stopped_resumed_lwps): Likewise.
3550 * linux-record.c (record_linux_sockaddr): Likewise.
3551 (record_linux_msghdr): Likewise.
3552 (record_linux_system_call): Likewise.
3553 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3554 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3555 (lm32_store_return_value): Likewise.
3556 * m32c-tdep.c (m32c_read_flg): Likewise.
3557 (m32c_pseudo_register_read): Likewise.
3558 (m32c_pseudo_register_write): Likewise.
3559 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3560 (m32r_linux_collect_gregset): Likewise.
3561 * m32r-tdep.c (m32r_store_return_value): Likewise.
3562 (m32r_extract_return_value): Likewise.
3563 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3564 (m68kbsd_collect_fpregset): Likewise.
3565 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3566 * m68k-linux-nat.c (fetch_register): Likewise.
3567 (old_fetch_inferior_registers): Likewise.
3568 (old_store_inferior_registers): Likewise.
3569 (store_regs): Likewise.
3570 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3571 (m68k_svr4_store_return_value): Likewise.
3572 * m88k-tdep.c (m88k_store_arguments): Likewise.
3573 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3574 (mi_cmd_data_write_register_values): Likewise.
3575 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3576 (mips_fbsd_store_inferior_registers): Likewise.
3577 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3578 (mips_fbsd_supply_gregs): Likewise.
3579 (mips_fbsd_collect_fpregs): Likewise.
3580 (mips_fbsd_collect_gregs): Likewise.
3581 (mips_fbsd_supply_fpregset): Likewise.
3582 (mips_fbsd_collect_fpregset): Likewise.
3583 (mips_fbsd_supply_gregset): Likewise.
3584 (mips_fbsd_collect_gregset): Likewise.
3585 * mips-linux-nat.c (supply_gregset): Likewise.
3586 (fill_gregset): Likewise.
3587 (supply_fpregset): Likewise.
3588 (fill_fpregset): Likewise.
3589 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3590 (mips_fill_gregset): Likewise.
3591 (mips_supply_fpregset): Likewise.
3592 (mips_fill_fpregset): Likewise.
3593 (mips64_supply_gregset): Likewise.
3594 (micromips_linux_sigframe_validate): Likewise.
3595 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3596 (mipsnbsd_fetch_inferior_registers): Likewise.
3597 (mipsnbsd_store_inferior_registers): Likewise.
3598 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3599 (mipsnbsd_supply_gregset): Likewise.
3600 (mipsnbsd_iterate_over_regset_sections): Likewise.
3601 (mipsnbsd_supply_reg): Likewise.
3602 (mipsnbsd_supply_fpreg): Likewise.
3603 * mips-tdep.c (mips_in_frame_stub): Likewise.
3604 (mips_dummy_id): Likewise.
3605 (is_octeon_bbit_op): Likewise.
3606 (micromips_bc1_pc): Likewise.
3607 (extended_mips16_next_pc): Likewise.
3608 (mips16_next_pc): Likewise.
3609 (deal_with_atomic_sequence): Likewise.
3610 * moxie-tdep.c (moxie_process_readu): Likewise.
3611 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3612 * nto-procfs.c (procfs_store_registers): Likewise.
3613 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3614 (ppcfbsd_store_inferior_registers): Likewise.
3615 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3616 (fetch_altivec_register): Likewise.
3617 (get_spe_registers): Likewise.
3618 (fetch_spe_register): Likewise.
3619 (fetch_altivec_registers): Likewise.
3620 (fetch_all_gp_regs): Likewise.
3621 (fetch_all_fp_regs): Likewise.
3622 (store_vsx_register): Likewise.
3623 (store_altivec_register): Likewise.
3624 (set_spe_registers): Likewise.
3625 (store_spe_register): Likewise.
3626 (store_altivec_registers): Likewise.
3627 (store_all_gp_regs): Likewise.
3628 (store_all_fp_regs): Likewise.
3629 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3630 (ppc_linux_collect_gregset): Likewise.
3631 (ppc_canonicalize_syscall): Likewise.
3632 (ppc_linux_record_signal): Likewise.
3633 (ppu2spu_prev_register): Likewise.
3634 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3635 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3636 (ppcobsd_store_registers): Likewise.
3637 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3638 Likewise.
3639 (ppc_ravenscar_generic_store_registers): Likewise.
3640 * procfs.c (procfs_fetch_registers): Likewise.
3641 (procfs_store_registers): Likewise.
3642 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3643 (ravenscar_store_registers): Likewise.
3644 (ravenscar_prepare_to_store): Likewise.
3645 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3646 * record-full.c (record_full_wait_1): Likewise.
3647 (record_full_registers_change): Likewise.
3648 (record_full_store_registers): Likewise.
3649 (record_full_core_fetch_registers): Likewise.
3650 (record_full_save): Likewise.
3651 (record_full_goto_insn): Likewise.
3652 * regcache.c (regcache_register_size): Likewise.
3653 (get_regcache_arch): Remove.
3654 (regcache_read_pc): Likewise.
3655 * regcache.h (get_regcache_arch): Remove.
3656 * remote-sim.c (gdbsim_fetch_register): Likewise.
3657 (gdbsim_store_register): Likewise.
3658 * remote.c (fetch_register_using_p): Likewise.
3659 (send_g_packet): Likewise.
3660 (remote_prepare_to_store): Likewise.
3661 (store_registers_using_G): Likewise.
3662 * reverse.c (save_bookmark_command): Likewise.
3663 (goto_bookmark_command): Likewise.
3664 * rs6000-aix-tdep.c (branch_dest): Likewise.
3665 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3666 (fetch_register): Likewise.
3667 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3668 (ppc_collect_reg): Likewise.
3669 (ppc_collect_gregset): Likewise.
3670 (ppc_collect_fpregset): Likewise.
3671 (ppc_collect_vsxregset): Likewise.
3672 (ppc_collect_vrregset): Likewise.
3673 (ppc_displaced_step_hw_singlestep): Likewise.
3674 (rs6000_pseudo_register_read): Likewise.
3675 (rs6000_pseudo_register_write): Likewise.
3676 * s390-linux-nat.c (supply_gregset): Likewise.
3677 (fill_gregset): Likewise.
3678 (s390_linux_fetch_inferior_registers): Likewise.
3679 * s390-linux-tdep.c (s390_write_pc): Likewise.
3680 (s390_software_single_step): Likewise.
3681 (s390_all_but_pc_registers_record): Likewise.
3682 (s390_linux_syscall_record): Likewise.
3683 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3684 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3685 (shnbsd_store_inferior_registers): Likewise.
3686 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3687 (sh_extract_return_value_fpu): Likewise.
3688 (sh_store_return_value_nofpu): Likewise.
3689 (sh_corefile_supply_regset): Likewise.
3690 (sh_corefile_collect_regset): Likewise.
3691 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3692 (sh64_store_return_value): Likewise.
3693 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3694 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3695 (sparc_store_inferior_registers): Likewise.
3696 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3697 (sparc_ravenscar_prepare_to_store): Likewise.
3698 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3699 (sparc_analyze_control_transfer): Likewise.
3700 (sparc_step_trap): Likewise.
3701 (sparc_software_single_step): Likewise.
3702 (sparc32_gdbarch_init): Likewise.
3703 (sparc_supply_rwindow): Likewise.
3704 (sparc_collect_rwindow): Likewise.
3705 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3706 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3707 (sparc64nbsd_collect_gregset): Likewise.
3708 (sparc64nbsd_supply_fpregset): Likewise.
3709 (sparc64nbsd_collect_fpregset): Likewise.
3710 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3711 (sparc64_supply_gregset): Likewise.
3712 (sparc64_collect_gregset): Likewise.
3713 (sparc64_supply_fpregset): Likewise.
3714 (sparc64_collect_fpregset): Likewise.
3715 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3716 * spu-tdep.c (spu_unwind_sp): Likewise.
3717 (spu2ppu_prev_register): Likewise.
3718 (spu_memory_remove_breakpoint): Likewise.
3719 * stack.c (return_command): Likewise.
3720 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3721 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3722 * tracefile.c (trace_save_ctf): Likewise.
3723 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3724 (do_windows_store_inferior_registers): Likewise.
3725 (windows_resume): Likewise.
3726 * xtensa-linux-nat.c (fill_gregset): Likewise.
3727 (supply_gregset_reg): Likewise.
3728 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3729 (xtensa_register_read_masked): Likewise.
3730 (xtensa_supply_gregset): Likewise.
3731 (xtensa_extract_return_value): Likewise.
3732 (xtensa_store_return_value): Likewise.
3733
edd079d9
UW
37342017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3735
3736 * doublest.c (floatformat_from_string): New function.
3737 * doublest.h (floatformat_from_string): Add prototype.
3738
3739 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3740 (OP_FLOAT): ... this.
3741 * expression.h: Do not include "doublest.h".
3742 (union exp_element): Replace doubleconst and decfloatconst by
3743 new element floatconst.
3744 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3745 (ada_evaluate_subexp): Likewise.
3746 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3747 OP_DOUBLE and OP_DECFLOAT.
3748 * expprint.c (print_subexp_standard): Likewise.
3749 (dump_subexp_body_standard): Likewise.
3750 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3751
3752 * parse.c: Include "dfp.h".
3753 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3754 (write_exp_elt_floatcst): New function.
3755 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3756 and OP_DECFLOAT.
3757 (operator_check_standard): Likewise.
3758 (parse_float): Do not accept suffix. Take type as input. Return bool.
3759 Return target format buffer instead of host DOUBLEST.
3760 Use floatformat_from_string and decimal_from_string to parse
3761 either binary or decimal floating-point types.
3762 (parse_c_float): Remove.
3763 * parser-defs.h: Do not include "doublest.h".
3764 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3765 (write_exp_elt_floatcst): Add prototype.
3766 (parse_float): Update prototype.
3767 (parse_c_float): Remove.
3768
3769 * c-exp.y: Do not include "dfp.h".
3770 (typed_val_float): Use byte buffer instead of DOUBLEST.
3771 (typed_val_decfloat): Remove.
3772 (DECFLOAT): Remove.
3773 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3774 (parse_number): Update to new parse_float interface.
3775 Parse suffixes and determine type before calling parse_float.
3776 Handle decimal and binary FP types the same way.
3777
3778 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3779 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3780 (parse_number): Update to new parse_float interface.
3781 Parse suffixes and determine type before calling parse_float.
3782
3783 * f-exp.y: Replace dval by typed_val_float.
3784 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3785 (parse_number): Use parse_float instead of atof.
3786
3787 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3788 (parse_go_float): Remove.
3789 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3790 (parse_number): Call parse_float instead of parse_go_float.
3791 Parse suffixes and determine type before calling parse_float.
3792
3793 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3794 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3795 (parse_number): Update to new parse_float interface.
3796 Parse suffixes and determine type before calling parse_float.
3797
3798 * m2-exp.y: Replace dval by byte buffer val.
3799 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3800 (parse_number): Call parse_float instead of atof.
3801
3802 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3803 (lex_number): Call parse_float instead of strtod.
3804 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3805 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3806 Use write_exp_elt_floatcst.
3807 (unit_testing): Remove static variable.
3808 (rust_type): Do not check unit_testing.
3809 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3810
3811 * ada-exp.y (type_float, type_double): Remove.
3812 (typed_val_float): Use byte buffer instead of DOUBLEST.
3813 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3814 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3815
cc628f3d
AH
38162017-10-25 Alan Hayward <alan.hayward@arm.com>
3817
3818 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3819 * arch/aarch64.h: New file.
3820
09a7c6aa
UW
38212017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3822
3823 * dfp.h (decimal_from_string): Use const reference for argument.
3824 * dfp.c (decimal_from_string): Likewise.
3825
8ba0dd51
UW
38262017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3827
3828 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3829 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3830 * mips-tdep.c (mips_print_fp_register): Likewise.
3831
16e812b2
UW
38322017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3833
3834 * common/format.h (enum argclass): Replace decfloat_arg by
3835 dec32float_arg, dec64float_arg, and dec128float_arg.
3836 * common/format.c (parse_format_string): Update to return
3837 new decimal float argument classes.
3838
3839 * printcmd.c (printf_decfloat): Rename to ...
3840 (printf_floating): ... this. Add argclass argument, and use it
3841 instead of parsing the format string again. Add support for
3842 binary floating-point values, using floatformat_to_string.
3843 Convert value to the target format if it doesn't already match.
3844 (ui_printf): Call printf_floating instead of printf_decfloat,
3845 also for double_arg / long_double_arg. Pass argclass.
3846
3847 * dfp.c (decimal_to_string): Add format string argument.
3848 * dfp.h (decimal_to_string): Likewise.
3849
3850 * doublest.c (floatformat_to_string): Add format string argument.
3851 * doublest.h (floatformat_to_string): Likewise.
3852
fdf0cbc2
UW
38532017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3854
3855 * doublest.c (floatformat_precision): New routine.
3856 (floatformat_to_string): Likewise.
3857 * doublest.c (floatformat_to_string): Add prototype.
3858
3859 * printcmd.c (print_scalar_formatted): Only call print_floating
3860 on floating-point types.
3861 * valprint.c: Do not include "floatformat.h".
3862 (generic_val_print_decfloat): Remove.
3863 (generic_val_print): Call generic_val_print_float for both
3864 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3865 (print_floating): Use floatformat_to_string. Handle decimal float.
3866 (print_decimal_floating): Remove, merge into floatformat_to_string.
3867 * value.h (print_decimal_floating): Remove.
3868
3869 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3870
5033013f
UW
38712017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3872
3873 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3874
a664f67e
SM
38752017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * memattr.h: Don't include vec.h.
3878 (struct mem_attrib): Initialize fields.
3879 <unknown>: New static method.
3880 (struct mem_region): Add constructors, operator<, initialize
3881 fields.
3882 * memattr.c: Include algorithm.
3883 (default_mem_attrib, unknown_mem_attrib): Remove.
3884 (user_mem_region_list): New global.
3885 (target_mem_region_list, mem_region_list): Change type to
3886 std::vector<mem_region>.
3887 (mem_use_target): Now a function.
3888 (target_mem_regions_valid): Change type to bool.
3889 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3890 (require_user_regions): Adjust.
3891 (require_target_regions): Adjust.
3892 (create_mem_region): Adjust.
3893 (lookup_mem_region): Adjust.
3894 (invalidate_target_mem_regions): Adjust.
3895 (mem_clear): Rename to...
3896 (user_mem_clear): ... this, and adjust.
3897 (mem_command): Adjust.
3898 (info_mem_command): Adjust.
3899 (mem_enable, enable_mem_command, mem_disable,
3900 disable_mem_command): Adjust.
3901 (mem_delete): Adjust.
3902 (delete_mem_command): Adjust.
3903 * memory-map.h (parse_memory_map): Return an std::vector.
3904 * memory-map.c (parse_memory_map): Likewise.
3905 (struct memory_map_parsing_data): Add constructor.
3906 <memory_map>: Point to std::vector.
3907 (memory_map_start_memory): Adjust.
3908 (memory_map_end_memory): Adjust.
3909 (memory_map_end_property): Adjust.
3910 (clear_result): Remove.
3911 * remote.c (remote_memory_map): Return an std::vector.
3912 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3913 Remove.
3914 (target_debug_print_mem_region_vector): New.
3915 * target-delegates.c: Regenerate.
3916 * target.h (mem_region_vector): New typedef.
3917 (to_memory_map): Return mem_region_vector.
3918 (target_memory_map): Return an std::vector.
3919 * target.c (target_memory_map): Return an std::vector.
3920 (flash_erase_command): Adjust.
3921
6e17c565
SM
39222017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3923
3924 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3925 Change type to std::string.
3926 (memory_map_start_property): Adjust.
3927 (memory_map_end_property): Adjust.
3928
cfba9872
SM
39292017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3930
3931 * infrun.h: Include common/byte-vector.h.
3932 (struct displaced_step_closure): New struct.
3933 (struct buf_displaced_step_closure): New struct.
3934 * infrun.c (displaced_step_closure::~displaced_step_closure):
3935 Provide default implementation.
3936 (displaced_step_clear): Deallocate step closure with delete.
3937 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3938 (aarch64_displaced_step_closure): ... this, extend
3939 displaced_step_closure.
3940 (aarch64_displaced_step_data) <dsc>: Change type to
3941 aarch64_displaced_step_closure.
3942 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3943 unique_ptr.
3944 (aarch64_displaced_step_fixup): Add cast for displaced step
3945 closure.
3946 * amd64-tdep.c (displaced_step_closure): Rename to ...
3947 (amd64_displaced_step_closure): ... this, extend
3948 displaced_step_closure.
3949 <insn_buf>: Change type to std::vector<gdb_byte>.
3950 <max_len>: Remove.
3951 (fixup_riprel): Change type of DSC parameter, adjust to type
3952 change of insn_buf.
3953 (fixup_displaced_copy): Change type of DSC parameter.
3954 (amd64_displaced_step_copy_insn): Instantiate
3955 amd64_displaced_step_closure.
3956 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3957 to type change of insn_buf.
3958 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3959 parameter DSC.
3960 (arm_linux_copy_svc): Likewise.
3961 (cleanup_kernel_helper_return): Likewise.
3962 (arm_catch_kernel_helper_return): Likewise.
3963 (arm_linux_displaced_step_copy_insn): Instantiate
3964 arm_displaced_step_closure.
3965 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3966 (displaced_read_reg): Change type of parameter DSC.
3967 (branch_write_pc): Likewise.
3968 (load_write_pc): Likewise.
3969 (alu_write_pc): Likewise.
3970 (displaced_write_reg): Likewise.
3971 (arm_copy_unmodified): Likewise.
3972 (thumb_copy_unmodified_32bit): Likewise.
3973 (thumb_copy_unmodified_16bit): Likewise.
3974 (cleanup_preload): Likewise.
3975 (install_preload): Likewise.
3976 (arm_copy_preload): Likewise.
3977 (thumb2_copy_preload): Likewise.
3978 (install_preload_reg): Likewise.
3979 (arm_copy_preload_reg): Likewise.
3980 (cleanup_copro_load_store): Likewise.
3981 (install_copro_load_store): Likewise.
3982 (arm_copy_copro_load_store) Likewise.
3983 (thumb2_copy_copro_load_store): Likewise.
3984 (cleanup_branch): Likewise.
3985 (install_b_bl_blx): Likewise.
3986 (arm_copy_b_bl_blx): Likewise.
3987 (thumb2_copy_b_bl_blx): Likewise.
3988 (thumb_copy_b): Likewise.
3989 (install_bx_blx_reg): Likewise.
3990 (arm_copy_bx_blx_reg): Likewise.
3991 (thumb_copy_bx_blx_reg): Likewise.
3992 (cleanup_alu_imm): Likewise.
3993 (arm_copy_alu_imm): Likewise.
3994 (thumb2_copy_alu_imm): Likewise.
3995 (cleanup_alu_reg): Likewise.
3996 (install_alu_reg): Likewise.
3997 (arm_copy_alu_reg): Likewise.
3998 (thumb_copy_alu_reg): Likewise.
3999 (cleanup_alu_shifted_reg): Likewise.
4000 (install_alu_shifted_reg): Likewise.
4001 (arm_copy_alu_shifted_reg): Likewise.
4002 (cleanup_load): Likewise.
4003 (cleanup_store): Likewise.
4004 (arm_copy_extra_ld_st): Likewise.
4005 (install_load_store): Likewise.
4006 (thumb2_copy_load_literal): Likewise.
4007 (thumb2_copy_load_reg_imm): Likewise.
4008 (arm_copy_ldr_str_ldrb_strb): Likewise.
4009 (cleanup_block_load_all): Likewise.
4010 (cleanup_block_store_pc): Likewise.
4011 (cleanup_block_load_pc): Likewise.
4012 (arm_copy_block_xfer): Likewise.
4013 (thumb2_copy_block_xfer): Likewise.
4014 (cleanup_svc): Likewise.
4015 (install_svc): Likewise.
4016 (arm_copy_svc): Likewise.
4017 (thumb_copy_svc): Likewise.
4018 (arm_copy_undef): Likewise.
4019 (thumb_32bit_copy_undef): Likewise.
4020 (arm_copy_unpred): Likewise.
4021 (arm_decode_misc_memhint_neon): Likewise.
4022 (arm_decode_unconditional): Likewise.
4023 (arm_decode_miscellaneous): Likewise.
4024 (arm_decode_dp_misc): Likewise.
4025 (arm_decode_ld_st_word_ubyte): Likewise.
4026 (arm_decode_media): Likewise.
4027 (arm_decode_b_bl_ldmstm): Likewise.
4028 (arm_decode_ext_reg_ld_st): Likewise.
4029 (thumb2_decode_dp_shift_reg): Likewise.
4030 (thumb2_decode_ext_reg_ld_st): Likewise.
4031 (arm_decode_svc_copro): Likewise.
4032 (thumb2_decode_svc_copro): Likewise.
4033 (install_pc_relative): Likewise.
4034 (thumb_copy_pc_relative_16bit): Likewise.
4035 (thumb_decode_pc_relative_16bit): Likewise.
4036 (thumb_copy_pc_relative_32bit): Likewise.
4037 (thumb_copy_16bit_ldr_literal): Likewise.
4038 (thumb_copy_cbnz_cbz): Likewise.
4039 (thumb2_copy_table_branch): Likewise.
4040 (cleanup_pop_pc_16bit_all): Likewise.
4041 (thumb_copy_pop_pc_16bit): Likewise.
4042 (thumb_process_displaced_16bit_insn): Likewise.
4043 (decode_thumb_32bit_ld_mem_hints): Likewise.
4044 (thumb_process_displaced_32bit_insn): Likewise.
4045 (thumb_process_displaced_insn): Likewise.
4046 (arm_process_displaced_insn): Likewise.
4047 (arm_displaced_init_closure): Likewise.
4048 (arm_displaced_step_fixup): Add cast for closure.
4049 * arm-tdep.h: Include infrun.h.
4050 (displaced_step_closure): Rename to ...
4051 (arm_displaced_step_closure): ... this, extend
4052 displaced_step_closure.
4053 <u::svc::copy_svc_os>: Change type of parameter DSC.
4054 <cleanup>: Likewise.
4055 (arm_process_displaced_insn): Likewise.
4056 (arm_displaced_init_closure): Likewise.
4057 (displaced_read_reg): Likewise.
4058 (displaced_write_reg): Likewise.
4059 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4060 Adjust.
4061 * i386-tdep.h: Include infrun.h.
4062 (i386_displaced_step_closure): New typedef.
4063 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4064 i386_displaced_step_closure.
4065 (i386_displaced_step_fixup): Adjust.
4066 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4067 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4068 and unique_ptr.
4069 (ppc_displaced_step_fixup): Adjust.
4070 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4071 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4072 and unique_ptr.
4073 (s390_displaced_step_fixup): Adjust.
4074
b392b304
SM
40752017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4076
4077 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4078 Remove declarations.
4079
d5833c62
TT
40802017-10-20 Tom Tromey <tom@tromey.com>
4081
4082 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4083 std::vector.
4084 (gdb_bfd_record_inclusion): Update.
4085 (bfdp): Remove typedef.
4086
06d5bbc8
TT
40872017-10-20 Tom Tromey <tom@tromey.com>
4088
4089 * gdb_bfd.c (gdb_bfd_ref): Use new.
4090 (struct gdb_bfd_data): Add constructor, destructor, and member
4091 initializers.
4092 (gdb_bfd_unref): Use delete.
4093
2712ce2e
TT
40942017-10-20 Tom Tromey <tom@tromey.com>
4095
4096 * exec.c (exec_file_attach): Use new_bfd_ref.
4097 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4098 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4099 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4100 new_bfd_ref.
4101 * gdb_bfd.h (new_bfd_ref): New function.
4102
fcc8fb2f
PA
41032017-10-20 Pedro Alves <palves@redhat.com>
4104
4105 * main.c (captured_command_loop): Add attribute noinline.
4106
4c2287b0
SM
41072017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4108
4109 * interps.c (struct interp_factory): Add constructor.
4110 (interp_factory_p): Remove typedef.
4111 (DEF_VEC_P(interp_factory_p)): Remove.
4112 (interpreter_factories): Change type to std::vector.
4113 (interp_factory_register): Adjust.
4114 (interp_lookup): Adjust.
4115 (interpreter_completer): Adjust.
4116
3d415c26
TT
41172017-10-19 Tom Tromey <tom@tromey.com>
4118
4119 * break-catch-syscall.c (catch_syscall_completer): Use
4120 std::string, gdb::unique_xmalloc_ptr.
4121
395423c4
TT
41222017-10-19 Tom Tromey <tom@tromey.com>
4123
4124 * infcall.c (call_function_by_hand_dummy): Use std::string.
4125
54f70bc1
TT
41262017-10-19 Tom Tromey <tom@tromey.com>
4127
4128 * mi/mi-main.c (mi_cmd_execute): Update.
4129 * top.h (prepare_execute_command): Return scoped_value_mark.
4130 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4131 Add move constructor.
4132 * top.c (prepare_execute_command): Return scoped_value_mark.
4133 (execute_command): Update.
4134
63929e84
PA
41352017-10-19 Pedro Alves <palves@redhat.com>
4136
4137 * xml-support.c (xml_fetch_content_from_file): Check fread's
4138 return.
4139
a75868f5
PA
41402017-10-19 Pedro Alves <palves@redhat.com>
4141
4142 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4143 async.
4144 (handle_error_fd): New function.
4145 (ser_base_async): Add/delete an event loop file handler for
4146 error_fd.
4147
2edf834e
PA
41482017-10-19 Pedro Alves <palves@redhat.com>
4149
4150 * xml-support.c (xml_fetch_content_from_file): Don't read in
4151 chunks. Instead use fseek to determine the file's size, and read
4152 it in one go.
4153
c8ba13ad
KS
41542017-11-18 Keith Seitz <keiths@redhat.com>
4155
4156 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4157 types.
4158 Add whitespace to front of type name.
4159
37534686
KS
41602017-10-18 Keith Seitz <keiths@redhat.com>
4161
4162 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4163 DW_AT_accessibility.
4164
28c7c158
YQ
41652017-10-18 Yao Qi <yao.qi@linaro.org>
4166
4167 * features/tic6x-c62x-linux.c: Remove.
4168
30f0b101
TT
41692017-10-17 Tom Tromey <tom@tromey.com>
4170
4171 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4172 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4173 (do_mixed_source_and_assembly): Likewise.
4174
57e12da9
TT
41752017-10-17 Tom Tromey <tom@tromey.com>
4176
4177 * regcache.c (regcache::xfer_part): Remove assertion.
4178
7b700999
PA
41792017-10-17 Pedro Alves <palves@redhat.com>
4180
4181 * xml-support.c (xml_fetch_content_from_file): Call
4182 unique_ptr::release() instead unique_ptr::get() when passing
4183 through xrealloc.
4184
d3037ba6
YQ
41852017-10-17 Yao Qi <yao.qi@linaro.org>
4186
4187 * regcache.c (regcache::xfer_part): Remove parameters read and
4188 write, add parameter is_raw. All callers are updated.
4189
83d5a34d
KS
41902017-10-16 Keith Seitz <keiths@redhat.com>
4191
4192 * c-typeprint.c (enum access_specifier): Moved here from
4193 c_type_print_base.
4194 (output_access_specifier): New function.
4195 (c_type_print_base): Consider typedefs when assessing
4196 whether access labels are needed.
4197 Use output_access_specifier as needed.
4198 Output access specifier for typedefs, if needed.
4199 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4200 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4201 fields.
4202 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4203 accessor macros.
4204
87028b87
TT
42052017-10-16 Tom Tromey <tom@tromey.com>
4206
4207 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4208 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4209 * target.c (target_fileio_read_stralloc): Update.
4210 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4211 * target.h (target_fileio_read_stralloc): Return
4212 unique_xmalloc_ptr.
4213
b7b030ad
TT
42142017-10-16 Tom Tromey <tom@tromey.com>
4215
4216 * xml-syscall.c (xml_init_syscalls_info): Update.
4217 * xml-support.c (xinclude_start_include): Update.
4218 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4219 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4220 (xml_fetch_content_from_file): Likewise.
4221 * osdata.c (get_osdata): Update.
4222 * target.h (target_read_stralloc, target_get_osdata): Return
4223 unique_xmalloc_ptr.
4224 * solib-aix.c (solib_aix_get_library_list): Update.
4225 * solib-target.c (solib_target_current_sos): Update.
4226 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4227 * xml-tdesc.c (fetch_available_features_from_target): Update.
4228 (target_fetch_description_xml): Update.
4229 (file_read_description_xml): Update.
4230 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4231 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4232 (remote_pid_to_exec_file): Update.
4233 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4234 (target_get_osdata): Likewise.
4235
b80406ac
TT
42362017-10-16 Tom Tromey <tom@tromey.com>
4237
4238 * remote.c (remote_register_number_and_offset): Use std::vector.
4239 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4240 (putpkt_binary): Use gdb::def_vector.
4241 (compare_sections_command): Use gdb::byte_vector.
4242
a90ecff8
TT
42432017-10-16 Tom Tromey <tom@tromey.com>
4244
4245 * ppc-linux-nat.c (hwdebug_insert_point): Use
4246 gdb::unique_xmalloc_ptr, XDUP.
4247
2dc0e219
TT
42482017-10-16 Tom Tromey <tom@tromey.com>
4249
4250 * probe.c (parse_probes): Use std::string.
4251 (info_probes_for_ops, enable_probes_command)
4252 (disable_probes_command): Remove cleanups.
4253
b05628f0
TT
42542017-10-16 Tom Tromey <tom@tromey.com>
4255
4256 * buildsym.c (block_compar): Remove.
4257 (end_symtab_get_static_block): Use std::vector.
4258
a79b1bc6
SM
42592017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4260
4261 * memrange.h (struct mem_range): Define operator< and operator==.
4262 (mem_range_s): Remove.
4263 (DEF_VEC_O (mem_range_s)): Remove.
4264 (normalize_mem_ranges): Change parameter type to std::vector.
4265 * memrange.c (compare_mem_ranges): Remove.
4266 (normalize_mem_ranges): Change parameter type to std::vector,
4267 adjust to vector change.
4268 * exec.c (section_table_available_memory): Return vector, remove
4269 parameter.
4270 (section_table_read_available_memory): Adjust to std::vector
4271 change.
4272 * remote.c (remote_read_bytes): Adjust to std::vector
4273 change.
4274 * tracepoint.h (traceframe_available_memory): Change parameter
4275 type to std::vector.
4276 * tracepoint.c (traceframe_available_memory): Change parameter
4277 type to std::vector, adjust.
4278 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4279 std::vector change.
4280 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4281 unittests/memrange-selftests.c.
4282 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4283 * gdb/unittests/memrange-selftests.c: New file.
4284
63f0e930
PA
42852017-10-16 Pedro Alves <palves@redhat.com>
4286
4287 * elfread.c (probe_key_free): Rename range-for variable.
4288 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4289 (find_probe_by_pc, collect_probes): Rename range-for variable.
4290
c40c7bfc
YQ
42912017-10-16 Yao Qi <yao.qi@linaro.org>
4292
4293 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4294 * features/tic6x-c62x.c: Remove.
4295 * features/tic6x-c64x-linux.c: Remove.
4296 * features/tic6x-c64x.c: Remove.
4297 * features/tic6x-c64xp-linux.c: Remove.
4298 * features/tic6x-c64xp.c: Remove.
4299 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4300 initialize_tdesc_tic6x_*_linux functions.
4301 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4302 initialize_tdesc_tic6x_* functions.
4303
df27ae6a
YQ
43042017-10-16 Yao Qi <yao.qi@linaro.org>
4305
4306 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4307 tic6x-c62x.
4308 * regformats/tic6x-c62x.dat: Remove.
4309 * regformats/tic6x-c64x.dat: Remove.
4310 * regformats/tic6x-c64xp.dat: Remove.
4311
86766165
SM
43122017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4313
4314 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4315 (the !HAVE_LIBEXPAT version).
4316
824dfcc3
SM
43172017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4318
4319 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4320 const.
4321
2098b393
SM
43222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4323
4324 * target.h: Include tracepoint.h.
4325 (enum trace_find_type): Move to tracepoint.h.
4326 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4327 * tracepoint.h: Don't include target.h
4328 (enum trace_find_type): Move from target.h.
4329 (parse_traceframe_info): Return a unique ptr.
4330 * tracepoint.c (current_traceframe_info): Change type to unique
4331 ptr.
4332 (free_traceframe_info): Remove.
4333 (clear_traceframe_info): Don't manually free
4334 current_traceframe_info.
4335 (free_result): Remove.
4336 (parse_traceframe_info): Return a unique ptr.
4337 (get_traceframe_info): Adjust to unique ptr.
4338 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4339 * remote.c (remote_traceframe_info): Return a unique ptr.
4340 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4341 ptr.
4342 * target-debug.h (target_debug_print_traceframe_info_up): New
4343 macro.
4344 * target-delegates.c: Regenerate.
4345
4cdd21a8
SM
43462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4347
4348 * memrange.h (struct mem_range): Add constructors.
4349 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4350 std::vector<mem_range>.
4351 * tracepoint.c (free_traceframe_info): Don't manually free
4352 vector.
4353 (traceframe_info_start_memory): Adjust to vector change.
4354 (traceframe_available_memory): Likewise.
4355 * tracefile-tfile.c (build_traceframe_info): Likewise.
4356 * ctf.c (ctf_traceframe_info): Likewise.
4357
d0d292a2
SM
43582017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4359
4360 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4361 std::vector<int>.
4362 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4363 (traceframe_info_start_tvar): Adjust to vector change.
4364 (parse_traceframe_info): Allocate with new.
4365 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4366 vector change.
4367 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4368 change.
4369 tfile_traceframe_info): Allocate with new.
4370 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4371 change.
4372
8d3c73ef
SM
43732017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4374
4375 * tracepoint.c (traceframe_info): Rename to...
4376 (current_traceframe_info): ...this.
4377 (clear_traceframe_info): Adjust.
4378 (get_traceframe_info): Adjust.
4379
b129dcac
SM
43802017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4381
4382 * nat/linux-osdata.c: Include algorithm.
4383 (compare_processes): Remove.
4384 (struct pid_pgid_entry): New struct.
4385 (linux_xfer_osdata_processgroups): Use std::vector instead of
4386 XNEWVEC.
4387
af5bf4ad
SM
43882017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4389
4390 * objfiles.h: Don't include symfile.h.
4391 (struct partial_symbol): Remove forward-declaration.
4392 (struct objfile) <global_psymbols, static_psymbols>: Change type
4393 to std::vector<partial_symbol *>.
4394 * objfiles.c (objfile::objfile): Don't memset those fields.
4395 (objfile::~objfile): Don't free those fields.
4396 * psympriv.h (struct psymbol_allocation_list): Remove
4397 forward-declaration.
4398 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4399 to std::vector.
4400 (start_psymtab_common): Change parameters to std::vector.
4401 * psymtab.c: Include algorithm.
4402 (require_partial_symbols): Call shrink_to_fit.
4403 (find_pc_sect_psymbol): Adjust to vector change.
4404 (match_partial_symbol): Likewise.
4405 (lookup_partial_symbol): Likewise.
4406 (psym_relocate): Likewise.
4407 (dump_psymtab): Likewise.
4408 (recursively_search_psymtabs): Likewise.
4409 (compare_psymbols): Remove.
4410 (sort_pst_symbols): Adjust to vector change.
4411 (start_psymtab_common): Likewise.
4412 (end_psymtab_common): Likewise.
4413 (psymbol_bcache_full): De-constify return value.
4414 (add_psymbol_to_bcache): Likewise.
4415 (extend_psymbol_list): Remove.
4416 (append_psymbol_to_list): Adjust to vector change.
4417 (add_psymbol_to_list): Likewise.
4418 (init_psymbol_list): Likewise.
4419 (maintenance_info_psymtabs): Likewise.
4420 (maintenance_check_psymtabs): Likewise.
4421 * symfile.h (struct psymbol_allocation_list): Remove.
4422 * symfile.c (reread_symbols): Adjust to vector change.
4423 * dbxread.c (start_psymtab): Change type of parameters.
4424 (dbx_symfile_read): Adjust to vector change.
4425 (read_dbx_symtab): Likewise.
4426 (start_psymtab): Change type of parameters.
4427 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4428 (create_partial_symtab): Likewise.
4429 (add_partial_symbol): Likewise.
4430 (write_one_signatured_type): Likewise.
4431 (recursively_write_psymbols): Likewise.
4432 * mdebugread.c (parse_partial_symbols): Likewise.
4433 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4434 (scan_xcoff_symtab): Adjust to vector change.
4435 (xcoff_initial_scan): Likewise.
4436
3ec5942f
SM
44372017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4440
2399fe6a
YQ
44412017-10-13 Yao Qi <yao.qi@linaro.org>
4442
4443 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4444 Remove s390x-*-expedite, add s390x-expedite.
4445
4bf3f4a8
YQ
44462017-10-13 Yao Qi <yao.qi@linaro.org>
4447
4448 * features/s390-gs-linux64.c: Regenerated.
4449 * features/s390x-gs-linux64.c: Regenerated.
4450
9e86da07
TT
44512017-10-13 Tom Tromey <tom@tromey.com>
4452
4453 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4454 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4455 delete.
4456 * symfile.c (symbol_file_add_with_addrs): Use new.
4457 (symbol_file_add_separate): Update comment.
4458 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4459 * jit.c (jit_object_close_impl): Use new.
4460 (jit_unregister_code): Use delete.
4461 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4462 (~objfile): Rename from free_objfile.
4463 (free_objfile_separate_debug, do_free_objfile_cleanup)
4464 (free_all_objfiles, objfile_purge_solibs): Use delete.
4465 * objfiles.h (struct objfile): Add constructor and destructor.
4466 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4467 (allocate_objfile, free_objfile): Don't declare.
4468 (struct objstats): Add initializers.
4469
c2508e90
SM
44702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4471
4472 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4473 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4474 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4475 * gdbarch.h: Regenerate.
4476 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4477 Adjust comment.
4478 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4479 (i386_displaced_step_fixup): Adjust comment.
4480 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4481
a900ff72
TT
44822017-10-12 Tom Tromey <tom@tromey.com>
4483
4484 * prologue-value.h (pv_area::store_would_trash): Return bool.
4485 (pv_area::find_reg): Likewise.
4486 * prologue-value.c (pv_area::store_would_trash): Return bool.
4487 (pv_area::find_reg): Likewise.
4488
f7b7ed97
TT
44892017-10-12 Tom Tromey <tom@tromey.com>
4490
4491 * s390-linux-tdep.c (s390_store, s390_load)
4492 (s390_check_for_saved, s390_analyze_prologue): Update.
4493 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4494 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4495 * prologue-value.h (class pv_area): Move from prologue-value.c.
4496 Change names of members. Add constructor, destructor, member
4497 functions.
4498 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4499 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4500 (pv_area_fetch, pv_area_scan): Don't declare.
4501 * prologue-value.c (struct pv_area::area_entry): Now member of
4502 pv_area.
4503 (struct pv_area): Move to prologue-value.h.
4504 (pv_area::pv_area): Rename from make_pv_area.
4505 (pv_area::~pv_area): Rename from free_pv_area.
4506 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4507 (clear_entries, find_entry, overlaps, store_would_trash, store)
4508 (fetch, find_reg, scan): Now member of pv_area.
4509 Remove "area" argument. Update.
4510 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4511 Update.
4512 * mn10300-tdep.c (push_reg, check_for_saved)
4513 (mn10300_analyze_prologue): Update.
4514 * mep-tdep.c (is_arg_spill, check_for_saved)
4515 (mep_analyze_prologue): Update.
4516 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4517 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4518 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4519 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4520 Update.
4521 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4522 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4523
466eecee
SM
45242017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4525
4526 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4527 * linux-nat.c (linux_nat_delete_thread): New variable.
4528 (lwp_free): Invoke linux_nat_delete_thread if set.
4529 (linux_nat_set_delete_thread): New function.
4530 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4531 thread delete callback.
4532 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4533 (_initialize_arm_linux_nat): Assign thread delete callback.
4534 * s390-linux-nat.c (s390_delete_thread): New function.
4535 (_initialize_s390_nat): Assign thread delete callback.
4536 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4537 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4538 function.
4539 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4540 declaration.
4541 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4542 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4543
f71c8822
TT
45442017-10-09 Tom Tromey <tom@tromey.com>
4545
4546 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4547 std::string.
4548 * tui/tui-layout.c (enum tui_status): Use std::string.
4549
981a3fb3
TT
45502017-10-11 Tom Tromey <tom@tromey.com>
4551
4552 * gdbthread.h (thread_command): Constify.
4553 * inferior.h (detach_command): Constify.
4554 * top.h (set_history, show_history): Constify.
4555 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4556 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4557 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4558 * printcmd.c (set_command): Constify.
4559 (non_const_set_command): New function.
4560 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4561 * breakpoint.c (enable_command, disable_command, delete_command)
4562 (catch_command, tcatch_command, set_breakpoint_cmd)
4563 (show_breakpoint_cmd): Constify.
4564 * macrocmd.c (macro_command): Constify.
4565 * infcmd.c (unset_command, kill_command, detach_command)
4566 (info_proc_cmd): Constify.
4567 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4568 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4569 (info_auto_load_cmd): Constify.
4570 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4571 (unset_tdesc_cmd): Constify.
4572 * ada-lang.c (set_ada_command, show_ada_command)
4573 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4574 * guile/guile.c (set_guile_command, show_guile_command)
4575 (info_guile_command): Constify.
4576 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4577 Constify.
4578 * skip.c (skip_command): Constify.
4579 * compile/compile.c (_initialize_compile): Constify.
4580 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4581 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4582 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4583 (maint_btrace_pt_show_cmd): Constify.
4584 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4585 Constify.
4586 * python/python.c (user_show_python, user_set_python): Constify.
4587 * mips-tdep.c (set_mips_command, show_mips_command)
4588 (set_mipsfpu_command): Constify.
4589 * record-btrace.c (cmd_record_btrace_start)
4590 (cmd_set_record_btrace, cmd_show_record_btrace)
4591 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4592 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4593 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4594 Constify.
4595 * symfile.c (overlay_command): Constify.
4596 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4597 * cli/cli-logging.c (set_logging_command, show_logging_command):
4598 Constify.
4599 * cli/cli-dump.c (dump_command, append_command)
4600 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4601 (tekhex_dump_command, binary_dump_command)
4602 (binary_append_command): Constify.
4603 * cli/cli-decode.c (struct cmd_list_element): Change type of
4604 "fun".
4605 * cli/cli-cmds.c (info_command, show_command, set_debug)
4606 (show_debug): Constify.
4607 (show_command): Add non-const overload.
4608 * top.c (set_history, show_history): Constify.
4609 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4610 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4611 * target.c (target_command): Constify.
4612 * sparc64-tdep.c (info_adi_command): Constify.
4613 * record-full.c (cmd_record_full_start): Constify.
4614 (set_record_full_command): Constify. Fix typo.
4615 (show_record_full_command): Constify.
4616 * thread.c (thread_command, thread_apply_command): Constify.
4617 * memattr.c (dummy_cmd): Constify.
4618 * value.c (function_command): Constify.
4619 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4620 * probe.c (info_probes_command): Constify.
4621 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4622 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4623 (show_thread_cmd, set_thread_default_cmd)
4624 (show_thread_default_cmd): Constify.
4625 (check_empty): Constify.
4626 * tracepoint.c (tfind_command): Constify.
4627 * cp-support.c (maint_cplus_command): Constify.
4628 * windows-tdep.c (info_w32_command): Constify.
4629 * record.c (cmd_record_start, set_record_command)
4630 (show_record_command, info_record_command, cmd_record_goto):
4631 Constify.
4632 * ravenscar-thread.c (set_ravenscar_command)
4633 (show_ravenscar_command): Constify.
4634 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4635 Constify.
4636 (add_internal_problem_command): Remove casts.
4637 * arc-tdep.c (maintenance_print_arc_command): Constify.
4638 * valprint.c (set_print, show_print, set_print_raw)
4639 (show_print_raw): Constify.
4640 * maint.c (maintenance_command, maintenance_info_command)
4641 (maintenance_print_command, maintenance_set_cmd)
4642 (maintenance_show_cmd, set_per_command_cmd)
4643 (show_per_command_cmd, maintenance_check_command): Constify.
4644 * language.c (set_check, show_check): Constify.
4645 * typeprint.c (show_print_type, set_print_type): Constify.
4646 * go32-nat.c (go32_info_dos_command): Constify.
4647
fdf44873
TT
46482017-10-11 Tom Tromey <tom@tromey.com>
4649
4650 * breakpoint.c (prepare_re_set_context): Remove.
4651 (breakpoint_re_set_one): Update. Don't use cleanups.
4652 (breakpoint_re_set): Use scoped_restore, std::string, and
4653 scoped_restore_current_language.
4654
81b1e71c
TT
46552017-10-11 Tom Tromey <tom@tromey.com>
4656
4657 * breakpoint.c (commands_command_1): Use std::string.
4658 (cleanup_executing_breakpoints): Remove.
4659 (bpstat_do_actions_1): Use scoped_restore.
4660 (bpstat_check_watchpoint): Use std::string.
4661 (decode_static_tracepoint_spec): Likewise.
4662 (break_range_command): Likewise.
4663 (watch_command_1): Likewise.
4664 (compare_breakpoints): Change argument types.
4665 (clear_command): Use std::vector.
4666 (cleanup_executing_breakpoints): Remove.
4667 (update_global_location_list): Use unique_xmalloc_ptr.
4668 (strace_command): Remove unused declaration.
4669
4f9d9906
JB
46702017-10-11 John Baldwin <jhb@FreeBSD.org>
4671
4672 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4673 * NEWS: Mention new FreeBSD/arm native configuration.
4674 * configure.host: Add arm*-*-freebsd*.
4675 * configure.nat: Likewise.
4676 * arm-fbsd-nat.c: New file.
4677
7176dfd2
JB
46782017-10-11 John Baldwin <jhb@FreeBSD.org>
4679
4680 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4681 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4682 * NEWS: Mention new FreeBSD/arm target.
4683 * configure.tgt: Add arm*-*-freebsd*.
4684 * arm-fbsd-tdep.c: New file.
4685 * arm-fbsd-tdep.h: New file.
4686
fe220226
MR
46872017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4688
4689 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4690 `gdbarch_elfcore_write_linux_prpsinfo'.
4691 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4692 method.
4693 (elf_internal_linux_prpsinfo): Remove declaration.
4694 * gdbarch.h: Regenerate.
4695 * gdbarch.c: Regenerate.
4696
a2f63b2e
MR
46972017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4698
4699 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4700 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4701
458ca1d0
PA
47022017-10-11 Pedro Alves <palves@redhat.com>
4703
4704 * breakpoint.c (reattach_breakpoints): Delete.
4705 * breakpoint.h (reattach_breakpoints): Delete.
4706
905014d7
SM
47072017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4708
4709 * symfile.c (registered_sym_fns): Make struct, not typedef.
4710 (DEF_VEC_O (registered_sym_fns)): Remove.
4711 (symtab_fns): Change type to std::vector.
4712 (add_symtab_fns): Adjust.
4713 (find_sym_fns): Adjust.
4714
56d704da
AK
47152017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4716
4717 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4718 * arc-tdep.h (arc_arch_is_em): New function.
4719 (arc_arch_is_hs): Likewise.
4720
7fa29be9
EB
47212017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4722
4723 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4724 parentheses in the declaration.
4725 (macro_lookup_inclusion): Likewise.
4726 (macro_lookup_definition): Likewise.
4727 * p-lang.h (pascal_builtin_types): Likewise.
4728 * tui/tui-data.c (tui_win_list): Likewise.
4729 * tui/tui-data.h (tui_win_list): Likewise.
4730 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4731
d9b477e3
KB
47322017-10-11 Mark Rages <markrages@gmail.com>
4733
4734 * target-memory.c (block_boundaries): Fix for block address not
4735 aligned on block size.
4736
65630365
PA
47372017-10-10 Pedro Alves <palves@redhat.com>
4738 Tom Tromey <tom@tromey.com>
4739
4740 * breakpoint.c (struct captured_breakpoint_query_args)
4741 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4742 (print_breakpoint): New.
4743 * breakpoint.h (print_breakpoint): Declare.
4744 * common/common-exceptions.h (enum return_reason): Remove
4745 references to catch_exceptions.
4746 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4747 Delete.
4748 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4749 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4750 * gdb.h: Delete.
4751 * gdbthread.h (thread_select): Declare.
4752 * mi/mi-cmd-break.c: Don't include gdb.h.
4753 (breakpoint_notify): Use print_breakpoint.
4754 * mi/mi-cmd-catch.c: Don't include gdb.h.
4755 * mi/mi-interp.c: Don't include gdb.h.
4756 (mi_print_breakpoint_for_event): New.
4757 (mi_breakpoint_created, mi_breakpoint_modified): Use
4758 mi_print_breakpoint_for_event.
4759 * mi/mi-main.c: Don't include gdb.h.
4760 (mi_cmd_thread_select): Parse the global thread ID here. Use
4761 thread_select instead of gdb_thread_select.
4762 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4763 of using gdb_list_thread_ids.
4764 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4765 FILEIO_ENOSYS here.
4766 (remote_fileio_request): Use TRY/CATCH instead of
4767 catch_exceptions.
4768 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4769 (symbol_file_add_from_memory_wrapper): Delete.
4770 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4771 * thread.c: Don't include gdb.h.
4772 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4773 (thread_alive): Use thread_select.
4774 (do_captured_thread_select): Delete, parts salvaged as ...
4775 (thread_select): ... this new function.
4776 (gdb_thread_select): Delete.
4777
bf469271
PA
47782017-10-10 Pedro Alves <palves@redhat.com>
4779 Tom Tromey <tom@tromey.com>
4780
4781 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4782 and reverse logic.
4783 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4784 No longer macros. Instead ...
4785 (enum wp_check_result): They're now values of this new
4786 enumeration.
4787 (watchpoint_check): Change return type to wp_check_result and
4788 parameter type to bpstat.
4789 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4790 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4791 catch_errors. Reverse logic of watchpoint_check call.
4792 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4793 pointer as parameter.
4794 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4795 * common/common-exceptions.c (throw_exception_sjlj): Update
4796 comments to avoid mentioning catch_errors.
4797 * exceptions.c (catch_errors): Delete.
4798 * exceptions.h: Update comments to avoid mentioning catch_errors.
4799 (catch_errors_ftype, catch_errors): Delete.
4800 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4801 (hook_stop_stub): Delete.
4802 (restore_selected_frame): Change return type to void, and
4803 parameter type to const frame_id &.
4804 (restore_infcall_control_state): Use TRY/CATCH instead of
4805 catch_errors.
4806 * main.c (captured_command_loop): Return void and remove
4807 parameter. Remove references to catch_errors.
4808 (captured_main): Use TRY/CATCH instead of catch_errors.
4809 * objc-lang.c (objc_submethod_helper_data)
4810 (find_objc_msgcall_submethod_helper): Delete.
4811 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4812 catch_errors.
4813 * record-full.c (record_full_message): Return void.
4814 (record_full_message_args, record_full_message_wrapper): Delete.
4815 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4816 instead of catch_errors.
4817 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4818 parameter type to int.
4819 * solib-darwin.c (open_symbol_file_object): Ditto.
4820 * solib-dsbt.c (open_symbol_file_object): Ditto.
4821 * solib-frv.c (open_symbol_file_object): Ditto.
4822 * solib-svr4.c (open_symbol_file_object): Ditto.
4823 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4824 * solib.c (update_solib_list): Use TRY/CATCH instead of
4825 catch_errors.
4826 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4827 Change type.
4828 * symmisc.c (struct print_symbol_args): Remove.
4829 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4830 (print_symbol): Change type.
4831 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4832 and remove parameters.
4833 (catch_errors): New.
4834 (get_windows_debug_event): Adjust.
4835
1a56bfa5
TT
48362017-10-09 Tom Tromey <tom@tromey.com>
4837
4838 * mi/mi-main.c (free_splay_tree): Remove.
4839 (list_available_thread_groups): Use splay_tree_up.
4840 * common/gdb_splay_tree.h: New file.
4841
0c478e2d
TT
48422017-10-09 Tom Tromey <tom@tromey.com>
4843
4844 * mi/mi-main.c (do_nothing): Remove.
4845 (list_available_thread_groups): Update.
4846
cbd2b4e3
PA
48472017-10-09 Pedro Alves <palves@redhat.com>
4848
4849 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4850 reading registers when switching context.
4851
a181c0bf
JB
48522017-10-09 John Baldwin <jhb@FreeBSD.org>
4853
4854 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4855 (fbsd_convert_siginfo): Likewise.
4856 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4857
6e66f753
SM
48582017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4859
4860 * configure.ac (try_guile_versions): Remove guile-2.2.
4861 * configure: Regenerate.
4862
890e9790
TT
48632017-10-09 Tom Tromey <tom@tromey.com>
4864
4865 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4866 (COMPILE.pre): Use $(CXX).
4867
109483d9
PA
48682017-10-09 Pedro Alves <palves@redhat.com>
4869
4870 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4871 Use bool.
4872 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4873 * cp-support.h (cp_remove_params): Now returns a
4874 gdb::unique_xmalloc_ptr.
4875 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4876 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4877 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4878 returning a gdb::unique_xmalloc_ptr.
4879 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4880 * stack.c (find_frame_funname): Adjust to cp_remove_params
4881 returning a gdb::unique_xmalloc_ptr.
4882
791afaa2
TT
48832017-10-08 Tom Tromey <tom@tromey.com>
4884
4885 * dwarf2read.c (dwarf2_get_dwz_file): Use
4886 gdb::unique_xmalloc_ptr.
4887 (find_slot_in_mapped_hash): Likewise.
4888 (dwarf2_physname): Likewise.
4889 (create_dwo_unit_in_dwp_v1): Use std::string.
4890 (create_dwo_unit_in_dwp_v2): Likewise.
4891 (lookup_dwo_cutu): Likewise.
4892 (inherit_abstract_dies): Use std::vector.
4893 (read_array_type): Likewise.
4894 (dwarf_decode_macros): Remove unused declaration.
4895 (unsigned_int_compar): Remove.
4896 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4897 (psymtabs_addrmap_cleanup): Remove.
4898
30a9c02f
TT
48992017-10-08 Tom Tromey <tom@tromey.com>
4900
4901 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4902 * frame.h (frame_cleanup_after_sniffer): Declare.
4903 (frame_prepare_for_sniffer): Return void.
4904 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4905 type of argument.
4906 (frame_prepare_for_sniffer): Return void.
4907
757325a3
TT
49082017-10-08 Tom Tromey <tom@tromey.com>
4909
4910 * utils.h (make_cleanup_value_free): Remove.
4911 * utils.c (do_value_free, struct cleanup): Remove.
4912 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4913 Use gdb_value_up.
4914 * value.h (struct value_deleter): New.
4915 (gdb_value_up): New typedef.
4916
b9c04fb2
TT
49172017-10-08 Tom Tromey <tom@tromey.com>
4918
4919 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4920 (make_cleanup_free_search_symbols): Remove.
4921 (search_symbols): Return std::vector.
4922 (symbol_search::compare_search_syms): Now member of
4923 symbol_search. Change arguments.
4924 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4925 (symtab_symbol_info, rbreak_command): Update.
4926 * symtab.h (struct symbol_search) <next>: Remove.
4927 Add constructors.
4928 (symbol_search::operator<): New function.
4929 (symbol_search::operator==): New function.
4930 (search_symbols): Remove std::vector.
4931 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4932 (symbol_search::compare_search_syms): Declare.
4933
0d28b0a5
YQ
49342017-10-06 Yao Qi <yao.qi@linaro.org>
4935
4936 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4937 arch/aarch64-insn.o.
4938 Remove one rule.
4939 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4940
71917808
YQ
49412017-10-06 Yao Qi <yao.qi@linaro.org>
4942
4943 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4944 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4945 arch/arm-linux.o respectively.
4946 * configure.tgt: Likewise.
4947
2081b2b2
YQ
49482017-10-06 Yao Qi <yao.qi@linaro.org>
4949
4950 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4951 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4952
a1b85d28
PA
49532017-10-06 Pedro Alves <palves@redhat.com>
4954
4955 * windows-nat.c: Include <algorithm>.
4956
d97987e2
YQ
49572017-10-06 Yao Qi <yao.qi@linaro.org>
4958
4959 * configure.tgt (i386_tobjs): New variable.
4960 (amd64_tobjs): New variable.
4961 Set $cpu_obs and $os_obs.
4962
f38307f5
YQ
49632017-10-06 Yao Qi <yao.qi@linaro.org>
4964
4965 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4966 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4967 (clean): Remove object files and dependency files.
4968 (distclean): Remove the directory.
4969 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4970 * configure: Re-generated.
4971 * configure.tgt: Replace amd64.o with arch/amd64.o.
4972
2f924de6
JM
49732017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4974
4975 PR build/22188
4976 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4977 and SETEND.
4978
2fd9d7ca
PA
49792017-10-05 Pedro Alves <palves@redhat.com>
4980
4981 * linux-nat.c (linux_child_follow_fork): When following the parent
4982 and detaching the child, consult the parent thread's architecture
4983 instead of the child's.
4984
d13b8493
UW
49852017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4986
4987 * ax.h: Do not include "doublest.h".
4988 (union agent_val): Remove.
4989
3b4b2f16
UW
49902017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4991
4992 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4993 (decimal_to_string): Return std::string object.
4994 (decimal_from_string): Accept std::string object. Return bool.
4995 (decimal_from_integral, decimal_from_doublest): Remove.
4996 (decimal_from_longest): Add prototype.
4997 (decimal_from_ulongest): Likewise.
4998 (decimal_to_longest): Likewise.
4999 (decimal_from_doublest): Likewise.
5000 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5001 (MAX_DECIMAL_STRING): Move here.
5002 (decimal_to_string): Return std::string object.
5003 (decimal_from_string): Accept std::string object. Return bool.
5004 (decimal_from_integral): Remove, replace by ...
5005 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5006 (decimal_to_longest): New function.
5007 (decimal_from_floating): Remove, replace by ...
5008 (decimal_from_doublest): ... this new function.
5009 (decimal_to_doublest): Update to new decimal_to_string interface.
5010
5011 * value.c (unpack_long): Use decimal_to_longest.
5012 * valops.c (value_cast): Use decimal_from_doublest instead of
5013 decimal_from_floating. Use decimal_from_[u]longest isntead of
5014 decimal_from_integral.
5015 * valarith.c (value_args_as_decimal): Likewise.
5016 * valprint.c (print_decimal_floating): Update to new
5017 decimal_to_string interface.
5018 * printcmd.c (printf_decfloat): Likewise.
5019 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5020
1841ee5d
UW
50212017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5022
5023 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5024 * gdbtypes.c: Include "floatformat.h".
5025 * value.c: Likewise.
5026 * m68k-tdep.c: Likewise.
5027
5028 * findvar.c: Do not include "floatformat.h".
5029 * amd64-darwin-tdep.c: Likewise.
5030 * arm-linux-tdep.c: Likewise.
5031 * i386-darwin-tdep.c: Likewise.
5032 * i387-tdep.c: Likewise.
5033 * m68k-linux-tdep.c: Likewise.
5034 * mep-tdep.c: Likewise.
5035 * mips-tdep.c: Likewise.
5036 * nios2-tdep.c: Likewise.
5037 * s390-linux-tdep.c: Likewise.
5038 * sparc-obsd-tdep.c: Likewise.
5039 * sparc-tdep.c: Likewise.
5040 * sparc64-tdep.c: Likewise.
5041 * spu-tdep.c: Likewise.
5042 * tic6x-tdep.c: Likewise.
5043 * tilegx-tdep.c: Likewise.
5044 * vax-tdep.c: Likewise.
5045 * xstormy16-tdep.c: Likewise.
5046 * xtensa-tdep.c: Likewise.
5047
5048 * top.c: Do not include "doublest.h".
5049 * aarch64-tdep.c: Likewise.
5050 * alpha-tdep.c: Likewise.
5051 * arm-linux-tdep.c: Likewise.
5052 * m68k-linux-tdep.c: Likewise.
5053 * tilegx-tdep.c: Likewise.
5054 * xstormy16-tdep.c: Likewise.
5055
a80a6471
JB
50562017-10-05 John Baldwin <jhb@FreeBSD.org>
5057
5058 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5059 (mipsn32_fbsd_sigframe): Define.
5060 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5061 for FreeBSD/mipsn32.
5062
12c4bd7f
JB
50632017-10-05 John Baldwin <jhb@FreeBSD.org>
5064
5065 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5066 AT_HWCAP.
5067
c91933e9
TG
50682017-10-05 Tristan Gingold <tgingold@free.fr>
5069
5070 * MAINTAINERS (Misc): Update my email address.
5071
5cd63fda
PA
50722017-10-04 Pedro Alves <palves@redhat.com>
5073
5074 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5075 it instead of target_gdbarch.
5076 (get_remote_state, get_remote_packet_size): Adjust
5077 get_remote_arch_state calls, passing down target_gdbarch
5078 explicitly.
5079 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5080 'gdbarch' and use it instead of target_gdbarch.
5081 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5082 passing down target_gdbarch explicitly.
5083 (struct stop_reply) <arch>: New field.
5084 (remote_parse_stop_reply): Use the stopped thread's architecture,
5085 not the current inferior's. Save the architecture in the
5086 stop_reply.
5087 (process_stop_reply): Use the stop reply's architecture.
5088 (process_g_packet, remote_fetch_registers)
5089 (remote_prepare_to_store, store_registers_using_G)
5090 (remote_store_registers): Adjust get_remote_arch_state calls,
5091 using the regcache's architecture.
5092 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5093 passing down target_gdbarch explicitly.
5094 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5095 beneath instead of calling target_gdbarch.
5096 * target.c (default_thread_architecture): Use the specified
5097 inferior's architecture, instead of the current inferior's
5098 architecture (via target_gdbarch).
5099
ed4227b7
PA
51002017-10-04 Pedro Alves <palves@redhat.com>
5101
5102 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5103 case.
5104 (regcache_print): Handle !target_has_registers here instead.
5105
55b11ddf
PA
51062017-10-04 Pedro Alves <palves@redhat.com>
5107
5108 * frame.c (create_test_frame): Delete.
5109 * frame.h (create_test_frame): Delete.
5110 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5111 (class regcache_test): Delete.
5112 (test_target_has_registers, test_target_has_stack)
5113 (test_target_has_memory, test_target_prepare_to_store)
5114 (test_target_store_registers): New functions.
5115 (test_target_ops): New class.
5116 (register_to_value_test): Error out if there's already a
5117 process_stratum (or higher) target pushed. Create a fuller mock
5118 environment, with mock target_ops, inferior, address space, thread
5119 and inferior_ptid.
5120 * progspace.c (struct address_space): Move to ...
5121 * progspace.h (struct address_space): ... here.
5122 * regcache.h (regcache::~regcache, regcache::raw_write)
5123 [GDB_SELF_TEST]: No longer virtual.
5124
4c71c105
SM
51252017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5126
5127 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5128
73dcd72d
PA
51292017-10-04 Pedro Alves <palves@redhat.com>
5130
5131 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5132 out of 'between TRY and CATCH'.
5133
44704526
PA
51342017-10-04 Pedro Alves <palves@redhat.com>
5135
5136 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5137 * common/common-exceptions.h (TRY): Open an outermost scope.
5138 Expand intro comment.
5139 (CATCH): Reindent.
5140 (END_CATCH): Close the outermost scope.
5141 * completer.c (complete_line_internal): Add missing END_CATCH.
5142
bc3b087d
SDJ
51432017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5144
5145 * NEWS (Changes since GDB 8.0): Add entry about new
5146 'set-cwd-on-gdbserver' feature.
5147 (New remote packets): Add entry for QSetWorkingDir.
5148 * common/common-inferior.h (set_inferior_cwd): New prototype.
5149 * infcmd.c (set_inferior_cwd): Remove "static".
5150 (show_cwd_command): Expand text to include remote debugging.
5151 * remote.c: Add PACKET_QSetWorkingDir.
5152 (remote_protocol_features) <QSetWorkingDir>: New entry for
5153 PACKET_QSetWorkingDir.
5154 (extended_remote_set_inferior_cwd): New function.
5155 (extended_remote_create_inferior): Call
5156 "extended_remote_set_inferior_cwd".
5157 (_initialize_remote): Call "add_packet_config_cmd" for
5158 QSetWorkingDir.
5159
d092c5a2
SDJ
51602017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5161
5162 * NEWS (New commands): Mention "set/show cwd".
5163 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5164 "cd" command's help text.
5165 * common/common-inferior.h (get_inferior_cwd): New prototype.
5166 * infcmd.c (inferior_cwd_scratch): New global variable.
5167 (set_inferior_cwd): New function.
5168 (get_inferior_cwd): Likewise.
5169 (set_cwd_command): Likewise.
5170 (show_cwd_command): Likewise.
5171 (_initialize_infcmd): Add "set/show cwd" commands.
5172 * inferior.h (class inferior) <cwd>: New field.
5173 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5174 (fork_inferior): Change inferior's cwd before its execution.
5175 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5176 to CreateProcess.
5177
7da0a886
SDJ
51782017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5179
5180 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5181 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5182 (COMMON_OBS): Add gdb_tilde_expand.o.
5183 * common/gdb_tilde_expand.c: New file.
5184 * common/gdb_tilde_expand.h: Likewise.
5185
db8dd160
MR
51862017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5187
5188 * gdbarch.sh (objfile): Remove duplicate declaration.
5189 * gdbarch.h: Regenerate.
5190
f8bfbf22
TT
51912017-10-03 Tom Tromey <tom@tromey.com>
5192
5193 * utils.c (internal_vproblem): Use string_vprintf.
5194
5178ed48
TT
51952017-10-03 Tom Tromey <tom@tromey.com>
5196
5197 * printcmd.c (info_symbol_command): Use std::string.
5198
8cff8730
TT
51992017-10-03 Tom Tromey <tom@tromey.com>
5200
5201 * top.c (gdb_safe_append_history): Use std::string.
5202
895b8f30
TT
52032017-10-03 Tom Tromey <tom@tromey.com>
5204
5205 * event-top.c (stdin_event_handler): Update.
5206 * main.c (captured_main_1): Update.
5207 * top.h (make_delete_ui_cleanup): Remove.
5208 (struct ui): Add constructor and destructor.
5209 (new_ui, delete_ui): Remove.
5210 * top.c (make_delete_ui_cleanup): Remove.
5211 (new_ui_command): Use std::unique_ptr.
5212 (delete_ui_cleanup): Remove.
5213 (ui::ui): Rename from new_ui. Update.
5214 (free_ui): Remove.
5215 (ui::~ui): Rename from delete_ui. Update.
5216
0efef640
TT
52172017-10-03 Tom Tromey <tom@tromey.com>
5218
5219 * symfile.c (load_progress): Use gdb::byte_vector.
5220
245ad7d3
TT
52212017-10-03 Tom Tromey <tom@tromey.com>
5222
5223 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5224 declaration.
5225 * printcmd.c (x_command): Remove unused declaration.
5226 * symfile.c (symbol_file_command): Remove unused declaration.
5227
e05550d7
TT
52282017-10-03 Tom Tromey <tom@tromey.com>
5229
5230 * utils.c (internal_vproblem): Use std::string.
5231 (defaulted_query): Likewise.
5232
b95de2b7
TT
52332017-10-03 Tom Tromey <tom@tromey.com>
5234
5235 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5236 * top.c (execute_command_to_string): Update.
5237 * utils.c (make_cleanup_restore_page_info): Remove.
5238 (do_restore_page_info_cleanup): Remove.
5239 (set_batch_flag_and_restore_page_info):
5240 New.
5241 (make_cleanup_restore_page_info): Remove.
5242 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5243 (~set_batch_flag_and_restore_page_info): New
5244 (make_cleanup_restore_uinteger): Remove.
5245 (make_cleanup_restore_integer): Remove.
5246 (struct restore_integer_closure): Remove.
5247 (restore_integer): Remove.
5248 * utils.h (struct set_batch_flag_and_restore_page_info): New
5249 class.
5250 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5251 (make_cleanup_restore_page_info): Remove.
5252 (make_cleanup_restore_uinteger) Remove.
5253 (make_cleanup_restore_integer) Remove.
5254
07036511
TT
52552017-10-03 Tom Tromey <tom@tromey.com>
5256
5257 * record-full.h (record_full_gdb_operation_disable_set): Return
5258 scoped_restore_tmpl<int>.
5259 * infrun.c (adjust_pc_after_break): Update.
5260 (handle_signal_stop): Update.
5261 * record-full.c (record_full_gdb_operation_disable_set): Return
5262 scoped_restore_tmpl<int>.
5263 (record_full_wait_1, record_full_insert_breakpoint)
5264 (record_full_remove_breakpoint, record_full_save)
5265 (record_full_goto_insn): Update.
5266
45320ffa
TT
52672017-10-02 Tom Tromey <tom@tromey.com>
5268
5269 PR rust/22236:
5270 * rust-lang.c (rust_val_print_str): New function.
5271 (val_print_struct): Call it.
5272 (rust_subscript): Preserve name of slice type.
5273
b3e3859b
TT
52742017-10-02 Tom Tromey <tom@tromey.com>
5275
5276 * rust-lang.c (rust_subscript): Handle slices in
5277 EVAL_AVOID_SIDE_EFFECTS case.
5278
01af5e0d
TT
52792017-10-02 Tom Tromey <tom@tromey.com>
5280
5281 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5282
888e3ddb
TT
52832017-10-02 Tom Tromey <tom@tromey.com>
5284
5285 * rust-lang.h (rust_slice_type): Add "extern".
5286
cc536b21
PA
52872017-10-02 Tom Tromey <tom@tromey.com>
5288 Pedro Alves <palves@redhat.com>
5289
5290 * ada-lang.h (ada_exc_info::operator<): Make const.
5291 (ada_exc_info::operator==): Make const.
5292 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5293 Make const.
5294
386c8614
TT
52952017-09-29 Tom Tromey <tom@tromey.com>
5296
5297 * target.c (read_whatever_is_readable): Change type of "result".
5298 Update.
5299 (free_memory_read_result_vector): Remove.
5300 (read_memory_robust): Change return type. Update.
5301 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5302 bin2hex, std::string.
5303 * target.h (memory_read_result_s): Remove typedef.
5304 (free_memory_read_result_vector): Remove.
5305 (read_memory_robust): Return std::vector.
5306
789c4b5e
TT
53072017-09-29 Tom Tromey <tom@tromey.com>
5308
5309 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5310
ab816a27
TT
53112017-09-29 Tom Tromey <tom@tromey.com>
5312
5313 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5314 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5315 operator< and operator==.
5316 (ada_exceptions_list): Return a std::vector.
5317 * ada-lang.c (ada_exc_info::operator<): Rename from
5318 compare_ada_exception_info.
5319 (ada_exc_info::operator==): New.
5320 (sort_remove_dups_ada_exceptions_list): Change type of
5321 "exceptions".
5322 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5323 (ada_add_global_exceptions): Likewise.
5324 (ada_exceptions_list_1): Return a std::vector.
5325 (ada_exceptions_list): Likewise.
5326
52f9abe4
TT
53272017-09-29 Tom Tromey <tom@tromey.com>
5328
5329 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5330 'std::set *'.
5331 (print_one_inferior): Update.
5332 (free_vector_of_ints): Remove.
5333 (list_available_thread_groups): Change "ids" to std::set.
5334 (mi_cmd_list_thread_groups): Update.
5335 (struct collect_cores_data) <core>: Now a std::set.
5336 (collect_cores): Update.
5337 (unique): Remove.
5338 (print_one_inferior): Update.
5339
dcd5ddcc
TT
53402017-09-29 Tom Tromey <tom@tromey.com>
5341
5342 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5343 (mi_execute_async_cli_command): Likewise.
5344 (mi_cmd_trace_frame_collected): Use field_fmt.
5345
45d288cc
TT
53462017-09-29 Tom Tromey <tom@tromey.com>
5347
5348 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5349 gdb::byte_vector.
5350
6afe2f4a
TT
53512017-09-29 Tom Tromey <tom@tromey.com>
5352
5353 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5354
9813429a
TT
53552017-09-29 Tom Tromey <tom@tromey.com>
5356
5357 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5358
2d6960b4
TT
53592017-09-29 Tom Tromey <tom@tromey.com>
5360
5361 * varobj.h (varobj_gen_name): Return std::string.
5362 * varobj.c (varobj_gen_name): Return std::string.
5363 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5364 (mi_cmd_var_delete): Don't copy "name".
5365
784c453a
TT
53662017-09-29 Tom Tromey <tom@tromey.com>
5367
5368 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5369 (mi_cmd_break_insert_1): Update.
5370
a9bc57b9
TT
53712017-09-29 Tom Tromey <tom@tromey.com>
5372
5373 * target.h (make_scoped_defer_target_commit_resume): Update.
5374 * target.c (make_scoped_defer_target_commit_resume): Rename from
5375 make_cleanup_defer_target_commit_resume. Return a
5376 scoped_restore.
5377 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5378
9754d8c4
TT
53792017-09-29 Tom Tromey <tom@tromey.com>
5380
5381 * main.c (captured_main_1): Remove unused declaration.
5382 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5383
99ef965c
TT
53842017-09-29 Tom Tromey <tom@tromey.com>
5385
5386 * symtab.c (search_symbols): Remove unused outer cleanup.
5387 (make_source_files_completion_list): Remove unused declaration.
5388
42518ba7
TT
53892017-09-29 Tom Tromey <tom@tromey.com>
5390
5391 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5392
726b2169
TT
53932017-09-29 Tom Tromey <tom@tromey.com>
5394
5395 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5396 gdb::byte_vector.
5397
55b06432
TT
53982017-09-29 Tom Tromey <tom@tromey.com>
5399
5400 * complaints.c (vcomplaint): Use std::string.
5401
8abcee91
TT
54022017-09-29 Tom Tromey <tom@tromey.com>
5403
5404 * tracepoint.c (trace_variable_command): Use std::string.
5405 (encode_actions_1): Remove unused declarations.
5406 (create_tsv_from_upload): Use std::string.
5407
6ad94bc7
TT
54082017-09-29 Tom Tromey <tom@tromey.com>
5409
5410 * cp-support.c (gdb_demangle): Use std::string.
5411
2003f3d8
TT
54122017-09-29 Tom Tromey <tom@tromey.com>
5413
5414 * stack.c (parse_frame_specification): Use std::string
5415 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5416
8f8accb5
TT
54172017-09-29 Tom Tromey <tom@tromey.com>
5418
5419 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5420
200aa7b1
TT
54212017-09-29 Tom Tromey <tom@tromey.com>
5422
5423 * utils.c (vfprintf_maybe_filtered): Use std::string.
5424 (vfprintf_unfiltered): Likewise.
5425
606aae8a
TT
54262017-09-29 Tom Tromey <tom@tromey.com>
5427
5428 * event-top.c (top_level_prompt): Return std::string.
5429 (display_gdb_prompt): Update.
5430
bd413795
TT
54312017-09-29 Tom Tromey <tom@tromey.com>
5432
5433 * unittests/common-utils-selftests.c (format): New function.
5434 (string_vprintf_tests): New function.
5435 (_initialize_common_utils_selftests): Register new tests.
5436 * common/common-utils.c (string_vprintf): New function.
5437 * common/common-utils.h (string_vprintf): Declare.
5438
256642e8
PA
54392017-09-29 Pedro Alves <palves@redhat.com>
5440
5441 * common/rsp-low.c (unpack_varlen_hex): Constify.
5442 * common/rsp-low.h (unpack_varlen_hex): Constify.
5443 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5444 Constify.
5445 * remote.c (remote_set_permissions, read_ptid)
5446 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5447 (remote_static_tracepoint_marker_at)
5448 (remote_static_tracepoint_markers_by_strid)
5449 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5450 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5451 (parse_tracepoint_definition, parse_tsv_definition)
5452 (parse_static_tracepoint_marker_definition): Constify.
5453 * tracepoint.h (parse_static_tracepoint_marker_definition)
5454 (parse_trace_status, parse_tracepoint_status)
5455 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5456
b6bb3468
PA
54572017-09-29 Pedro Alves <palves@redhat.com>
5458
5459 * remote.c (target_buf, target_buf_size): Delete.
5460 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5461 Use the connection's packet buffer instead.
5462 All callers adjusted.
5463 (_initialize_remote): Remove references to target_buf and
5464 target_buf_size.
5465
b2f8eb7a
PA
54662017-09-28 Pedro Alves <palves@redhat.com>
5467
5468 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5469 unittests/common-utils-selftests.c.
5470 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5471 (COMMON_OBS): Remove utils-selftests.o.
5472 * utils-selftests.c: Move to ...
5473 * unittests/common-utils-selftests.c: ... here and rename self
5474 test to "string_printf".
5475
08302ed2
DE
54762017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5477
5478 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5479 having NULL cus or tus.
5480
96a5a1d3
UW
54812017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5482
5483 * arm-tdep.c: (convert_from_extended): Remove.
5484 (convert_to_extended): Likewise.
5485 (arm_extract_return_value): Use convert_typed_floating.
5486 (arm_store_return_value): Likewise.
5487
5488 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5489 * sh-tdep.c: Do not include "floatformat.h".
5490 (sh_littlebyte_bigword_type): New function.
5491 (sh_register_convert_to_virtual): Use convert_typed_floating.
5492 (sh_register_convert_to_raw): Likewise.
5493 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5494 (sh64_littlebyte_bigword_type): New function.
5495 (sh64_extract_return_value): Use convert_typed_floating.
5496 (sh64_register_convert_to_virtual): Likewise.
5497 (sh64_register_convert_to_raw): Likewise.
5498
0db7851f
UW
54992017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5500
5501 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5502 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5503
5504 * gdbtypes.h (union type_specific): Make field floatformat hold
5505 just a single struct floatformat, not an array.
5506 (floatformat_from_type): Move here.
5507 * gdbtypes.c (floatformat_from_type): Move here. Update to
5508 changed TYPE_FLOATFORMAT definition.
5509 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5510 (recursive_dump_type): Likewise.
5511 (init_float_type): Install correct floatformat for byte order.
5512 (arch_float_type): Likewise.
5513
77b7c781
UW
55142017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5515
5516 * gdbtypes.c (init_type): Change incoming argument from
5517 length-in-bytes to length-in-bits. Assert length is a
5518 multiple of TARGET_CHAR_BITS.
5519 (arch_type, arch_flags_type): Likewise.
5520 (init_integer_type): Update call to init_type.
5521 (init_character_type): Likewise.
5522 (init_boolean_type): Likewise.
5523 (init_float_type): Likewise.
5524 (init_decfloat_type): Likewise.
5525 (init_complex_type): Likewise.
5526 (init_pointer_type): Likewise.
5527 (objfile_type): Likewise.
5528 (arch_integer_type): Update call to arch_type.
5529 (arch_character_type): Likewise.
5530 (arch_boolean_type): Likewise.
5531 (arch_float_type): Likewise.
5532 (arch_decfloat_type): Likewise.
5533 (arch_complex_type): Likewise.
5534 (arch_pointer_type): Likewise.
5535 (gdbtypes_post_init): Likewise.
5536
5537 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5538 (read_base_type): Likewise.
5539 * mdebugread.c (basic_type): Likewise.
5540 * stabsread.c (dbx_init_float_type): Likewise.
5541 (rs6000_builtin_type): Likewise.
5542 (read_range_type): Likewise. Also, fix call to init_integer_type
5543 with erroneous length argument.
5544
5545 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5546 * d-lang.c (build_d_types): Likewise.
5547 * f-lang.c (build_fortran_types): Likewise.
5548 * go-lang.c (build_go_types): Likewise.
5549 * opencl-lang.c (build_opencl_types): Likewise.
5550 * jit.c (finalize_symtab): Likewise.
5551 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5552 (build_std_type_info_type): Likewise.
5553 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5554 update call to arch_flags_type.
5555
5556 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5557 arch_type.
5558 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5559 * windows-tdep.c (windows_get_tlb_type): Likewise.
5560
5561 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5562 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5563 * m32c-tdep.c (make_types): Likewise.
5564 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5565 (rl78_psw_type): Update call to arch_flags_type.
5566 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5567 * rx-tdep.c (rx_psw_type): Likewise.
5568 (rx_fpsw_type): Likewise.
5569 * sparc-tdep.c (sparc_psr_type): Likewise.
5570 (sparc_fsr_type): Likewise.
5571 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5572 (sparc64_ccr_type): Likewise.
5573 (sparc64_fsr_type): Likewise.
5574 (sparc64_fprs_type): Likewise.
5575
f21b4d5c
TT
55762017-09-27 Tom Tromey <tom@tromey.com>
5577
5578 * findcmd.c (find_command): Constify.
5579
643c2ffa
TT
55802017-09-27 Tom Tromey <tom@tromey.com>
5581
5582 * ada-tasks.c (task_command_1, task_command): Constify.
5583
510e5e56
TT
55842017-09-27 Tom Tromey <tom@tromey.com>
5585
5586 * symtab.c (maintenance_print_symbol_cache)
5587 (maintenance_flush_symbol_cache)
5588 (maintenance_print_symbol_cache_statistics): Constify.
5589
e503b191
TT
55902017-09-27 Tom Tromey <tom@tromey.com>
5591
5592 * inferior.c (detach_inferior_command, kill_inferior_command)
5593 (inferior_command): Constify.
5594
4e001312
TT
55952017-09-27 Tom Tromey <tom@tromey.com>
5596
5597 * regcache.c (regcache_print, maintenance_print_registers)
5598 (maintenance_print_raw_registers)
5599 (maintenance_print_cooked_registers)
5600 (maintenance_print_register_groups)
5601 (maintenance_print_remote_registers): Constify.
5602
77763700
TT
56032017-09-27 Tom Tromey <tom@tromey.com>
5604
5605 * printcmd.c (map_display_numbers, undisplay_command)
5606 (enable_disable_display_command, enable_display_command)
5607 (disable_display_command): Constify.
5608
4495129a
TT
56092017-09-27 Tom Tromey <tom@tromey.com>
5610
5611 * breakpoint.h (delete_command): Don't declare.
5612 * breakpoint.c (delete_command, enable_once_command)
5613 (enable_count_command, enable_delete_command, breakpoint_1)
5614 (maintenance_info_breakpoints, stopin_command, stopat_command)
5615 (delete_command, delete_trace_command, save_breakpoints)
5616 (save_breakpoints_command, save_tracepoints_command): Constify.
5617
3088cf40
TT
56182017-09-27 Tom Tromey <tom@tromey.com>
5619
5620 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5621 (skip_ws, extract_identifier, macro_define_command)
5622 (macro_undef_command, macro_list_command): Constify.
5623
69f476a3
TT
56242017-09-27 Tom Tromey <tom@tromey.com>
5625
5626 * infcmd.c (environment_info, set_environment_command)
5627 (unset_environment_command, path_info, info_proc_cmd_1)
5628 (info_proc_cmd_mappings, info_proc_cmd_stat)
5629 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5630 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5631
c4a3e68e
TT
56322017-09-27 Tom Tromey <tom@tromey.com>
5633
5634 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5635 Constify.
5636
c9d31bd6
TT
56372017-09-27 Tom Tromey <tom@tromey.com>
5638
5639 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5640
1f3f85eb
TT
56412017-09-27 Tom Tromey <tom@tromey.com>
5642
5643 * demangle.c (demangle_command): Constify.
5644
9c504b5d
TT
56452017-09-27 Tom Tromey <tom@tromey.com>
5646
5647 * progspace.c (maintenance_info_program_spaces_command):
5648 Constify.
5649
6663cf91
TT
56502017-09-27 Tom Tromey <tom@tromey.com>
5651
5652 * compile/compile.c (check_raw_argument, compile_file_command)
5653 (compile_code_command, compile_print_command): Constify.
5654
34e5fa26
TT
56552017-09-27 Tom Tromey <tom@tromey.com>
5656
5657 * reggroups.c (maintenance_print_reggroups): Constify.
5658
8384c356
TT
56592017-09-27 Tom Tromey <tom@tromey.com>
5660
5661 * dwarf2read.c (save_gdb_index_command): Constify.
5662
884beb0c
TT
56632017-09-27 Tom Tromey <tom@tromey.com>
5664
5665 * stap-probe.c (info_probes_stap_command): Constify.
5666
e0b2930c
TT
56672017-09-27 Tom Tromey <tom@tromey.com>
5668
5669 * fork-child.c (unset_exec_wrapper_command): Constify.
5670
f938677d
TT
56712017-09-27 Tom Tromey <tom@tromey.com>
5672
5673 * btrace.c (get_uint, get_context_size, no_chunk)
5674 (maint_btrace_packet_history_cmd)
5675 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5676 (maint_info_btrace_cmd): Constify.
5677
8949cb87
TT
56782017-09-27 Tom Tromey <tom@tromey.com>
5679
5680 * reverse.c (delete_bookmark_command): Constify.
5681
ac88e2de
TT
56822017-09-27 Tom Tromey <tom@tromey.com>
5683
5684 * remote.c (set_memory_packet_size)
5685 (set_memory_write_packet_size, show_memory_write_packet_size)
5686 (set_memory_read_packet_size, show_memory_read_packet_size)
5687 (compare_sections_command, packet_command, remote_put_command)
5688 (remote_get_command, remote_delete_command): Constify.
5689
bd4c9dfe
TT
56902017-09-27 Tom Tromey <tom@tromey.com>
5691
5692 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5693 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5694 (set_mipsfpu_auto_command): Constify.
5695
5e93d4c6
TT
56962017-09-27 Tom Tromey <tom@tromey.com>
5697
5698 * cli/cli-cmds.h (cd_command): Constify.
5699 * cli/cli-cmds.c (cd_command): Constify.
5700
fc41a75b
TT
57012017-09-27 Tom Tromey <tom@tromey.com>
5702
5703 * thread.c (thread_name_command, thread_find_command): Constify.
5704
67810076
TT
57052017-09-27 Tom Tromey <tom@tromey.com>
5706
5707 * probe.c (enable_probes_command, disable_probes_command):
5708 Constify.
5709
1d8b34a7
TT
57102017-09-27 Tom Tromey <tom@tromey.com>
5711
5712 * symfile.c (symbol_file_command): Constify.
5713 * gdbcore.h (deprecated_file_changed_hook): Constify.
5714 * exec.c (deprecated_file_changed_hook, exec_file_command)
5715 (file_command): Constify.
5716 * defs.h (symbol_file_command): Constify.
5717
442019e1
TT
57182017-09-27 Tom Tromey <tom@tromey.com>
5719
5720 * remote-fileio.c (set_system_call_allowed)
5721 (show_system_call_allowed): Constify.
5722
2983f7cb
TT
57232017-09-27 Tom Tromey <tom@tromey.com>
5724
5725 * tracepoint.c (delete_trace_variable_command)
5726 (tfind_end_command, tfind_start_command, tfind_pc_command)
5727 (tfind_tracepoint_command, tfind_line_command)
5728 (tfind_range_command, tfind_outside_command): Constify.
5729
4fd41b24
TT
57302017-09-27 Tom Tromey <tom@tromey.com>
5731
5732 * ax-gdb.c (maint_agent_printf_command, agent_command)
5733 (agent_eval_command): Constify.
5734
f2fc3015
TT
57352017-09-27 Tom Tromey <tom@tromey.com>
5736
5737 * tracepoint.c (info_scope_command): Constify.
5738 * python/python.c (gdbpy_decode_line): Constify.
5739 * python/py-breakpoint.c (bppy_init): Constify.
5740 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5741 * location.h: (new_linespec_location)
5742 (string_to_event_location_basic, string_to_event_location):
5743 Constify.
5744 * location.c (new_linespec_location)
5745 (string_to_event_location_basic, string_to_event_location):
5746 Constify.
5747 * linespec.h (decode_line_with_current_source)
5748 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5749 * linespec.c (linespec_lex_to_end)
5750 (decode_line_with_current_source)
5751 (decode_line_with_last_displayed): Constify.
5752 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5753 Constify.
5754 * cli/cli-cmds.c (edit_command, list_command): Constify.
5755 * breakpoint.h (until_break_command, watch_command_wrapper)
5756 (awatch_command_wrapper, rwatch_command_wrapper)
5757 (init_ada_exception_breakpoint): Constify.
5758 * breakpoint.c (break_command_1, dprintf_command)
5759 (break_range_command, watch_command_wrapper)
5760 (rwatch_command_wrapper, awatch_command_wrapper)
5761 (until_break_command, init_ada_exception_breakpoint)
5762 (strace_marker_create_sals_from_location, trace_command)
5763 (ftrace_command, strace_command, struct tracepoint): Constify.
5764 * ax-gdb.c (agent_command_1): Constify.
5765 * ada-lang.c (ada_exception_sal): Constify.
5766
8c2f95f4
TT
57672017-09-27 Tom Tromey <tom@tromey.com>
5768
5769 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5770 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5771 (get_context_size, no_chunk, get_insn_history_modifiers)
5772 (cmd_record_insn_history, get_call_history_modifiers)
5773 (cmd_record_call_history): Constify.
5774
a0d65762
TT
57752017-09-27 Tom Tromey <tom@tromey.com>
5776
5777 * source.c (show_substitute_path_command)
5778 (unset_substitute_path_command, set_substitute_path_command):
5779 Constify.
5780
58971144
TT
57812017-09-27 Tom Tromey <tom@tromey.com>
5782
5783 * typeprint.c (maintenance_print_type): Constify.
5784 * maint.c (maintenance_dump_me, maintenance_demangle)
5785 (maintenance_time_display, maintenance_info_sections)
5786 (maintenance_print_statistics, maintenance_deprecate)
5787 (maintenance_undeprecate): Constify.
5788 (maintenance_do_deprecate): Constify. Use std::string.
5789 (maintenance_selftest): Constify.
5790 * gdbtypes.h (maintenance_print_type): Constify.
5791
c482f52c
TT
57922017-09-27 Tom Tromey <tom@tromey.com>
5793
5794 * hppa-tdep.c (unwind_command): Constify.
5795
e100df1a
TT
57962017-09-27 Tom Tromey <tom@tromey.com>
5797
5798 * target-descriptions.c (unset_tdesc_filename_cmd)
5799 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5800 Constify.
5801
31d56ade
TT
58022017-09-27 Tom Tromey <tom@tromey.com>
5803
5804 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5805
b961da0b
TT
58062017-09-27 Tom Tromey <tom@tromey.com>
5807
5808 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5809
e2d8ae16
TT
58102017-09-27 Tom Tromey <tom@tromey.com>
5811
5812 * tui/tui-regs.c (tui_reg_command): Constify.
5813
863779b0
TT
58142017-09-27 Tom Tromey <tom@tromey.com>
5815
5816 * skip.c (skip_file_command, skip_function_command)
5817 (skip_enable_command, skip_disable_command, skip_delete_command):
5818 Constify.
5819
cdb34d4a
TT
58202017-09-27 Tom Tromey <tom@tromey.com>
5821
5822 * record-btrace.c (cmd_record_btrace_bts_start)
5823 (cmd_record_btrace_pt_start): Constify.
5824
e99c83e7
TT
58252017-09-27 Tom Tromey <tom@tromey.com>
5826
5827 * symmisc.c (maintenance_print_symbols)
5828 (maintenance_print_msymbols, maintenance_print_objfiles)
5829 (maintenance_info_symtabs, maintenance_check_symtabs)
5830 (maintenance_expand_symtabs, maintenance_info_line_tables):
5831 Constify.
5832
32faf971
TT
58332017-09-27 Tom Tromey <tom@tromey.com>
5834
5835 * top.c (new_ui_command): Constify.
5836
2cf311eb
TT
58372017-09-27 Tom Tromey <tom@tromey.com>
5838
5839 * symfile.c (add_symbol_file_command)
5840 (remove_symbol_file_command, list_overlays_command)
5841 (map_overlay_command, unmap_overlay_command)
5842 (overlay_auto_command, overlay_manual_command)
5843 (overlay_off_command, overlay_load_command): Constify.
5844
e6738699
TT
58452017-09-27 Tom Tromey <tom@tromey.com>
5846
5847 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5848 (info_spu_mailbox_command, info_spu_dma_command)
5849 (info_spu_proxydma_command): Constify.
5850
aa360cd5
TT
58512017-09-27 Tom Tromey <tom@tromey.com>
5852
5853 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5854
898241a5
TT
58552017-09-27 Tom Tromey <tom@tromey.com>
5856
5857 * cli/cli-script.c (user_defined_command): Constify.
5858
2d0ac106
TT
58592017-09-27 Tom Tromey <tom@tromey.com>
5860
5861 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5862 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5863 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5864 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5865 (dump_binary_value, append_binary_memory, append_binary_value):
5866 Constify.
5867 (struct dump_context) <func>: Constify.
5868 (add_dump_command): Update.
5869
dede02ce
TT
58702017-09-27 Tom Tromey <tom@tromey.com>
5871
5872 * cli/cli-cmds.c (show_version, show_configuration)
5873 (source_command, show_user): Constify.
5874
d3cb6b99
TT
58752017-09-27 Tom Tromey <tom@tromey.com>
5876
5877 * target.c (maintenance_print_target_stack): Constify.
5878
1970a12f
TT
58792017-09-27 Tom Tromey <tom@tromey.com>
5880
5881 * interps.c (interpreter_exec_cmd): Constify.
5882
41243651
TT
58832017-09-27 Tom Tromey <tom@tromey.com>
5884
5885 * record-full.c (cmd_record_full_restore): Constify.
5886
4465d9db
TT
58872017-09-27 Tom Tromey <tom@tromey.com>
5888
5889 * memattr.c (enable_mem_command, disable_mem_command)
5890 (delete_mem_command): Constify.
5891
ad25e423
TT
58922017-09-27 Tom Tromey <tom@tromey.com>
5893
5894 * value.c (show_convenience): Constify.
5895
d64097b1
TT
58962017-09-27 Tom Tromey <tom@tromey.com>
5897
5898 * gdbcore.h (core_file_command): Update.
5899 * corefile.c (core_file_command): Constify.
5900
4d4589ef
TT
59012017-09-27 Tom Tromey <tom@tromey.com>
5902
5903 * user-regs.c (maintenance_print_user_registers): Constify.
5904
32a7bf17
TT
59052017-09-27 Tom Tromey <tom@tromey.com>
5906
5907 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5908
4a475551
TT
59092017-09-27 Tom Tromey <tom@tromey.com>
5910
5911 * cp-support.c (first_component_command): Constify.
5912
990b9f9f
TT
59132017-09-27 Tom Tromey <tom@tromey.com>
5914
5915 * psymtab.c (maintenance_print_psymbols)
5916 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5917 Constify.
5918
c281872e
TT
59192017-09-27 Tom Tromey <tom@tromey.com>
5920
5921 * windows-tdep.c (display_tib): Constify.
5922
5b64bf74
TT
59232017-09-27 Tom Tromey <tom@tromey.com>
5924
5925 * linux-fork.c (delete_checkpoint_command)
5926 (detach_checkpoint_command): Constify.
5927
4ada038f
TT
59282017-09-27 Tom Tromey <tom@tromey.com>
5929
5930 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5931
57f5a81b
TT
59322017-09-27 Tom Tromey <tom@tromey.com>
5933
5934 * arc-tdep.c (dump_arc_instruction_command): Constify.
5935
b0a8e6c4
TT
59362017-09-27 Tom Tromey <tom@tromey.com>
5937
5938 * valprint.c (set_radix, show_radix): Constify.
5939
8d97dc1c
TT
59402017-09-27 Tom Tromey <tom@tromey.com>
5941
5942 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5943
eb7c454d
TT
59442017-09-27 Tom Tromey <tom@tromey.com>
5945
5946 * command.h (not_just_help_class_command): Update.
5947 * cli/cli-decode.h (not_just_help_class_command): Update.
5948 * cli/cli-decode.c (not_just_help_class_command): Constify.
5949
e4e33335
TT
59502017-09-27 Tom Tromey <tom@tromey.com>
5951
5952 * gdb_bfd.c (maintenance_info_bfds): Constify.
5953
0450cc4c
TT
59542017-09-27 Tom Tromey <tom@tromey.com>
5955
5956 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5957 overloads.
5958 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5959 (do_const_cfunc): New function.
5960 (cmd_cfunc_eq): New overload.
5961 (cli_user_command_p): Check do_const_cfunc.
5962 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5963 const_cfunc.
5964 * command.h (add_cmd): Add const overload and no-function
5965 overload.
5966 (set_cmd_cfunc): Add const overload.
5967 (cmd_const_cfunc_ftype): Declare.
5968 (cmd_cfunc_eq): Add const overload.
5969 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5970 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5971 overload.
5972
a9bbfbd8
TT
59732017-09-27 Tom Tromey <tom@tromey.com>
5974
5975 * macroexp.c (get_next_token_for_substitution): New function.
5976 (substitute_args): Call it. Check for __VA_OPT__.
5977
5230b05a
WT
59782017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5979 Pedro Alves <palves@redhat.com>
5980
5981 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5982 producer_is_icc_lt_14.
5983 (producer_is_icc_lt_14): New function.
5984 (check_producer): Add code for checking version of ICC.
5985 (producer_is_icc): Move to producer.c.
5986 (read_structure_type): Restrict ICC workaround to ICC<14.
5987 * producer.c: Include selftest.h.
5988 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5989 New functions.
5990 * producer.h (producer_is_icc): New declaration.
5991
b32b108a
WT
59922017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5993
5994 * Makefile.in (SFILES): Add producer.c.
5995 (COMMON_OBS): Add producer.o
5996 * amd64-tdep.c (producer.h): Add new include.
5997 * dwarf2read.c (producer.h): Add new include.
5998 * producer.c: New file.
5999 * producer.h: New file.
6000 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6001 producer.c.
6002 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6003 producer.h.
6004
5007d765
MK
60052017-09-26 Matthias Klose <doko@ubuntu.com>
6006
6007 * configure.ac: Search ncursesw before ncurses.
6008 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6009 * gdb_curses.h: Include <ncursesw/ncurses.h>
6010 * config.in, configure: Regenerate.
6011
281c4447
RO
60122017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6013
6014 PR gdb/22185
6015 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6016 obsolete.
6017 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6018 Remove i386sol2 support.
6019 * configure.nat <i386sol2>: Remove.
6020 <sol2-64>: Fold into ...
6021 <sol2>: ... this.
6022 Move common settings to default section.
6023 Add sol-thread.o.
6024 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6025 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6026 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6027 <i[34567]86-*-solaris*>: Remove.
6028 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6029
6030 * configure.ac: Remove wctype in libw check.
6031 (_MSE_INT_H): Don't define on Solaris 7-9.
6032 <solaris*>: Remove libthread_db.so.1 check.
6033 * configure: Regenerate.
6034 * config.in: Regenerate.
6035
6036 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6037 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6038 (gdb_ps_size_t): Remove.
6039 Use base types in users.
6040 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6041
6042 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6043
39b06c20
RO
60442017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6045
6046 PR build/22206
6047 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6048 (adi_is_addr_mapped): Likewise.
6049 (PSR_ICC): Don't redefine.
6050 (PSR_IMPL): Likewise.
6051
6c3e20f1
TT
60522017-09-25 Tom Tromey <tom@tromey.com>
6053
6054 * regcache.c (regcache::dump): Use string_printf.
6055
b292235f
TT
60562017-09-25 Tom Tromey <tom@tromey.com>
6057
6058 * regcache.c (class regcache_invalidator): New.
6059 (struct register_to_invalidate): Remove.
6060 (make_cleanup_regcache_invalidate): Remove.
6061 (regcache::raw_write): Use regcache_invalidator.
6062
9ac86b52
TT
60632017-09-25 Tom Tromey <tom@tromey.com>
6064
6065 * spu-tdep.c (spu2ppu_sniffer): Update.
6066 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6067 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6068 Remove.
6069 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6070 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6071 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6072 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6073 (frame_pop): Update.
6074
c0e383c6
TT
60752017-09-25 Tom Tromey <tom@tromey.com>
6076
6077 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6078 * regcache.h (regcache_xfree): Don't declare.
6079 * regcache.c (regcache_xfree): Remove.
6080 (do_regcache_xfree): Use delete.
6081 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6082 * linux-fork.c (free_fork): Use delete.
6083 (fork_save_infrun_state): Likewise.
6084 * jit.c (jit_dealloc_cache): Use delete.
6085 * infrun.c (discard_infcall_suspend_state): Use delete.
6086
791199cc
TT
60872017-09-25 Tom Tromey <tom@tromey.com>
6088
6089 * regcache.h (regcache_xmalloc): Don't declare.
6090 (regcache_raw_set_cached_value): Update comment.
6091 * regcache.c (regcache_xmalloc): Remove.
6092 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6093 * jit.c (jit_frame_sniffer): Use new.
6094 * frame.c (frame_save_as_regcache): Use new.
6095
289e23aa
AA
60962017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6097
6098 * NEWS: Advertise support for guarded-storage registers on IBM z.
6099
1b63490c
AA
61002017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6101
6102 * s390-linux-nat.c (have_regset_gs): New static variable.
6103 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6104 control block and guarded-storage broadcast control regsets.
6105 (s390_read_description): Detect whether the target has
6106 guarded-storage support, return appropriate tdesc.
6107 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6108 (features/s390x-gs-linux64.c): Likewise.
6109 (struct gdbarch_tdep) <have_gs>: New field.
6110 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6111 (s390_gsbc_regset): New variables.
6112 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6113 and s390_gsbc_regset, if applicable.
6114 (s390_core_read_description): Check whether core file was from a
6115 target with guarded-storage support; include appropriate regsets.
6116 (s390_gdbarch_init): Add registers for guarded-storage support.
6117 (_initialize_s390_tdep): Initialize new target descriptions that
6118 include registers for guarded-storage support.
6119 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6120 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6121 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6122 (S390_NUM_REGS): Adjust macro definition.
6123 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6124 (tdesc_s390x_gs_linux64): New declarations.
6125
96235dc1
AA
61262017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6127
6128 * features/s390-gs-linux64.xml: New file.
6129 * features/s390-gs.xml: New file.
6130 * features/s390-gsbc.xml: New file.
6131 * features/s390x-gs-linux64.xml: New file.
6132 * features/Makefile (WHICH): Add s390-gs-linux64 and
6133 s390x-gs-linux64.
6134 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6135 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6136 * features/s390-gs-linux64.c: New generated file.
6137 * features/s390x-gs-linux64.c: New file.
6138 * regformats/s390-gs-linux64.dat: New file.
6139 * regformats/s390x-gs-linux64.dat: New file.
6140
b4a7c699
TT
61412017-09-23 Tom Tromey <tom@tromey.com>
6142
6143 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6144
c2f97536
TT
61452017-09-22 Tom Tromey <tom@tromey.com>
6146
6147 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6148 type to scoped_restore_tmpl.
6149 <scoped_input_handler>: Initialize m_quit_handler directly.
6150
43573013
SDJ
61512017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6152
6153 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6154 (cd_command): Likewise. Free "current_directory" before
6155 assigning to it.
6156 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6157 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6158 * top.c (gdb_dirbuf): Remove global declaration.
6159 * top.h (gdb_dirbuf): Likewise.
6160
6ec2e0f5
SDJ
61612017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6162
6163 * gnulib/aclocal.m4: Regenerate.
6164 * gnulib/config.in: Regenerate.
6165 * gnulib/configure: Regenerate.
6166 * gnulib/import/Makefile.am: Regenerate.
6167 * gnulib/import/Makefile.in: Regenerate.
6168 * gnulib/import/assure.h: New file.
6169 * gnulib/import/at-func.c: Likewise
6170 * gnulib/import/chdir-long.c: New file.
6171 * gnulib/import/chdir-long.h: New file.
6172 * gnulib/import/cloexec.c: New file.
6173 * gnulib/import/cloexec.h: New file.
6174 * gnulib/import/close.c: New file.
6175 * gnulib/import/closedir.c: New file.
6176 * gnulib/import/dirent-private.h: New file.
6177 * gnulib/import/dup-safer.c: New file.
6178 * gnulib/import/dup.c: New file.
6179 * gnulib/import/dup2.c: New file.
6180 * gnulib/import/error.c: New file.
6181 * gnulib/import/error.h: New file.
6182 * gnulib/import/exitfail.c: New file.
6183 * gnulib/import/exitfail.h: New file.
6184 * gnulib/import/fchdir.c: New file.
6185 * gnulib/import/fcntl.c: New file.
6186 * gnulib/import/fcntl.in.h: New file.
6187 * gnulib/import/fd-hook.c: New file.
6188 * gnulib/import/fd-hook.h: New file.
6189 * gnulib/import/fd-safer.c: New file.
6190 * gnulib/import/fdopendir.c: New file.
6191 * gnulib/import/filename.h: New file.
6192 * gnulib/import/filenamecat-lgpl.c: New file.
6193 * gnulib/import/filenamecat.h: New file.
6194 * gnulib/import/fstat.c: New file.
6195 * gnulib/import/fstatat.c: New file.
6196 * gnulib/import/getcwd-lgpl.c: New file.
6197 * gnulib/import/getcwd.c: New file.
6198 * gnulib/import/getdtablesize.c: New file.
6199 * gnulib/import/getlogin_r.c: New file.
6200 * gnulib/import/getprogname.c: New file.
6201 * gnulib/import/getprogname.h: New file.
6202 * gnulib/import/gettext.h: New file.
6203 * gnulib/import/glob-libc.h: New file.
6204 * gnulib/import/glob.c: New file.
6205 * gnulib/import/glob.in.h: New file.
6206 * gnulib/import/intprops.h: New file.
6207 * gnulib/import/m4/chdir-long.m4: New file.
6208 * gnulib/import/m4/close.m4: New file.
6209 * gnulib/import/m4/closedir.m4: New file.
6210 * gnulib/import/m4/d-ino.m4: New file.
6211 * gnulib/import/m4/d-type.m4: New file.
6212 * gnulib/import/m4/dup.m4: New file.
6213 * gnulib/import/m4/dup2.m4: New file.
6214 * gnulib/import/m4/error.m4: New file.
6215 * gnulib/import/m4/fchdir.m4: New file.
6216 * gnulib/import/m4/fcntl.m4: New file.
6217 * gnulib/import/m4/fcntl_h.m4: New file.
6218 * gnulib/import/m4/fdopendir.m4: New file.
6219 * gnulib/import/m4/filenamecat.m4: New file.
6220 * gnulib/import/m4/fstat.m4: New file.
6221 * gnulib/import/m4/fstatat.m4: New file.
6222 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6223 * gnulib/import/m4/getcwd-path-max.m4: New file.
6224 * gnulib/import/m4/getcwd.m4: New file.
6225 * gnulib/import/m4/getdtablesize.m4: New file.
6226 * gnulib/import/m4/getlogin_r.m4: New file.
6227 * gnulib/import/m4/getprogname.m4: New file.
6228 * gnulib/import/m4/glob.m4: New file.
6229 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6230 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6231 * gnulib/import/m4/mempcpy.m4: New file.
6232 * gnulib/import/m4/memrchr.m4: New file.
6233 * gnulib/import/m4/mode_t.m4: New file.
6234 * gnulib/import/m4/msvc-inval.m4: New file.
6235 * gnulib/import/m4/msvc-nothrow.m4: New file.
6236 * gnulib/import/m4/open.m4: New file.
6237 * gnulib/import/m4/openat.m4: New file.
6238 * gnulib/import/m4/opendir.m4: New file.
6239 * gnulib/import/m4/readdir.m4: New file.
6240 * gnulib/import/m4/realloc.m4: New file.
6241 * gnulib/import/m4/rewinddir.m4: New file.
6242 * gnulib/import/m4/save-cwd.m4: New file.
6243 * gnulib/import/m4/strdup.m4: New file.
6244 * gnulib/import/m4/strerror.m4: New file.
6245 * gnulib/import/m4/unistd-safer.m4: New file.
6246 * gnulib/import/mempcpy.c: New file.
6247 * gnulib/import/memrchr.c: New file.
6248 * gnulib/import/msvc-inval.c: New file.
6249 * gnulib/import/msvc-inval.h: New file.
6250 * gnulib/import/msvc-nothrow.c: New file.
6251 * gnulib/import/msvc-nothrow.h: New file.
6252 * gnulib/import/open.c: New file.
6253 * gnulib/import/openat-die.c: New file.
6254 * gnulib/import/openat-priv.h: New file.
6255 * gnulib/import/openat-proc.c: New file.
6256 * gnulib/import/openat.c: New file.
6257 * gnulib/import/openat.h: New file.
6258 * gnulib/import/opendir.c: New file.
6259 * gnulib/import/pipe-safer.c: New file.
6260 * gnulib/import/readdir.c: New file.
6261 * gnulib/import/realloc.c: New file.
6262 * gnulib/import/rewinddir.c: New file.
6263 * gnulib/import/save-cwd.c: New file.
6264 * gnulib/import/save-cwd.h: New file.
6265 * gnulib/import/strdup.c: New file.
6266 * gnulib/import/strerror-override.c: New file.
6267 * gnulib/import/strerror-override.h: New file.
6268 * gnulib/import/strerror.c: New file.
6269 * gnulib/import/unistd--.h: New file.
6270 * gnulib/import/unistd-safer.h: New file.
6271 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6272 "getcwd" and "glob".
6273 * ser-tcp.c: Undefine "close" before redefining it.
6274
432ae719
SM
62752017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6276
6277 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6278 get rid of res_val.
6279
4fa7574e
RO
62802017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6281
6282 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6283 <sol2,sparc>: Likewise.
6284 <sol2-64,i386>: Likewise.
6285
6286 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6287 -Wdeprecated-declarations on *-*-solaris*.
6288 * configure: Regenerate.
6289
6290 * procfs.c: Include "nat/inferior.h".
6291 (procfs_info_proc): Fix typo.
6292
f6327dcb
KB
62932017-09-21 Kevin Buettner <kevinb@redhat.com>
6294
6295 * remote.c (vector): Include.
6296 (struct private_thread_info): Add field, thread_handle.
6297 (free_private_thread_info): Deallocate storage associated with
6298 thread handle.
6299 (get_private_info_thread): Initialize `thread_handle' field.
6300 (struct thread_item): Add field, thread_handle.
6301 (clear_threads_listing_context): Deallocate storage associated
6302 with thread handle.
6303 (start_thread): Add support for "handle" attribute.
6304 (thread_attributes): Add "handle".
6305 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6306 field.
6307 (remote_update_thread_list): Update thread_handle.
6308 (remote_thread_handle_to_thread_info): New function.
6309 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6310
fbbe5337
KB
63112017-09-21 Kevin Buettner <kevinb@redhat.com>
6312
6313 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6314 function.
6315 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6316 * python/python-internal.h (thread_object_type): Declare.
6317
e04ee09e
KB
63182017-09-21 Kevin Buettner <kevinb@redhat.com>
6319
6320 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6321 (target_thread_handle_to_thread_info): Declare.
6322 * target.c (target_thread_handle_to_thread_info): New function.
6323 * target-delegates.c: Regenerate.
6324 * gdbthread.h (find_thread_by_handle): Declare.
6325 * thread.c (find_thread_by_handle): New function.
6326 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6327 function.
6328 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6329
1e5b66ed
SM
63302017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6331
6332 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6333
ebe48ba0
SM
63342017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6335
6336 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6337
0a0bf5dc
YQ
63382017-09-21 Yao Qi <yao.qi@linaro.org>
6339
6340 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6341 to gdb_target_obs.
6342
d1b0a7bf
TT
63432017-09-20 Tom Tromey <tom@tromey.com>
6344
6345 * breakpoint.c (struct counted_command_line): Remove.
6346 (breakpoint_commands): Update.
6347 (alloc_counted_command_line, incref_counted_command_line)
6348 (decref_counted_command_line, do_cleanup_counted_command_line)
6349 (make_cleanup_decref_counted_command_line): Remove.
6350 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6351 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6352 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6353 (save_breakpoints): Update.
6354 * breakpoint.h (counted_command_line): Now a typedef to
6355 shared_ptr.
6356 (struct breakpoint) <commands>: Now a counted_command_line.
6357 (struct bpstats) <command>: Likewise.
6358
48649e1b
TT
63592017-09-20 Tom Tromey <tom@tromey.com>
6360
6361 * breakpoint.c (struct commands_info, do_map_commands_command):
6362 Remove.
6363 (commands_command_1): Update.
6364 (iterate_over_related_breakpoints): Take a function_view.
6365 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6366 (delete_command): Update.
6367 (map_breakpoint_numbers): Take a function_view.
6368 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6369 (disable_command): Update.
6370 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6371 (enable_command): Update.
6372 (struct disp_data, do_enable_breakpoint_disp)
6373 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6374 (do_map_enable_delete_breakpoint): Remove.
6375 (enable_once_command, enable_count_command, enable_delete_command)
6376 (delete_trace_variable_command): Update.
6377
04afa70c
TT
63782017-09-20 Tom Tromey <tom@tromey.com>
6379
6380 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6381 (bpstat_clear): Use delete.
6382 (bpstats): New constructors.
6383 (bpstat_copy, bpstat_stop_status): Use new.
6384 (dprintf_after_condition_true): Update.
6385 * breakpoint.h (bpstats::bpstats): Add constructors.
6386 (bpstats::~bpstats): Add destructor.
6387
c83833f4
PA
63882017-09-20 Pedro Alves <palves@redhat.com>
6389
6390 * eval.c (make_params): Delete, refactored as ...
6391 (class fake_method): ... this new type's ctor.
6392 (fake_method::~fake_method): New.
6393 (evaluate_subexp_standard): Use 'fake_method'.
6394
223ffa71
TT
63952017-09-20 Tom Tromey <tom@tromey.com>
6396
6397 * windows-nat.c (get_windows_debug_event, windows_wait)
6398 (do_initial_windows_stuff, windows_attach): Update.
6399 * utils.c (vwarning, internal_vproblem): Update.
6400 (ui_unregister_input_event_handler_cleanup)
6401 (prepare_to_handle_input): Remove.
6402 (class scoped_input_handler): New.
6403 (defaulted_query, prompt_for_continue): Update.
6404 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6405 Update.
6406 * top.c (undo_terminal_modifications_before_exit): Update.
6407 * target/target.h (target_terminal_init, target_terminal_inferior)
6408 (target_terminal_ours): Don't declare.
6409 (class target_terminal): New.
6410 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6411 (target_terminal_ours_for_output)
6412 (make_cleanup_restore_target_terminal): Don't declare.
6413 (target_terminal_info): Remove.
6414 * target.c (enum terminal_state, terminal_state): Remove.
6415 (target_terminal::terminal_state): Define.
6416 (target_terminal::init): Rename from target_terminal_init.
6417 (target_terminal::inferior): Rename from
6418 target_terminal_inferior.
6419 (target_terminal::ours): Rename from target_terminal_ours.
6420 (target_terminal::ours_for_output): Rename from
6421 target_terminal_ours_for_output.
6422 (target_terminal::info): New method.
6423 (cleanup_restore_target_terminal)
6424 (make_cleanup_restore_target_terminal): Remove.
6425 * solib.c (handle_solib_event): Update.
6426 * remote.c (remote_serial_quit_handler): Update.
6427 (remote_terminal_inferior, remote_wait_as): Update.
6428 * record-full.c (record_full_wait_1): Update.
6429 * nto-procfs.c (procfs_create_inferior): Update.
6430 * nat/fork-inferior.c (startup_inferior): Update.
6431 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6432 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6433 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6434 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6435 (mi_breakpoint_created, mi_breakpoint_deleted)
6436 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6437 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6438 (mi_user_selected_context_changed, report_initial_inferior):
6439 Update.
6440 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6441 (linux_nat_terminal_inferior): Update.
6442 * infrun.c (follow_fork_inferior)
6443 (handle_vfork_child_exec_or_exit, do_target_resume)
6444 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6445 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6446 Update.
6447 * inflow.c (child_terminal_init, info_terminal_command): Update.
6448 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6449 (attach_command): Update.
6450 * infcall.c (call_thread_fsm_should_stop): Update.
6451 * gnu-nat.c (gnu_attach): Update.
6452 * extension.c (struct active_ext_lang_state)
6453 (restore_active_ext_lang): Update.
6454 * exceptions.c (print_flush): Update.
6455 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6456 (struct quit_handler_cleanup_data, restore_quit_handler)
6457 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6458 Remove.
6459 * cp-support.c (gdb_demangle): Update.
6460 * breakpoint.c (update_inserted_breakpoint_locations)
6461 (insert_breakpoint_locations, handle_jit_event)
6462 (disable_breakpoints_in_unloaded_shlib): Update.
6463 * annotate.c (annotate_breakpoints_invalid)
6464 (annotate_frames_invalid): Update.
6465
013af3fc
TT
64662017-09-20 Tom Tromey <tom@tromey.com>
6467
6468 * main.c (catch_command_errors): Rename from
6469 catch_command_errors_const.
6470 (captured_main_1): Update.
6471
06871ae8
PA
64722017-09-20 Pedro Alves <palves@redhat.com>
6473
6474 * cli/cli-cmds.c (list_command): Use print_sal_location.
6475 (print_sal_location): New function.
6476 (ambiguous_line_spec): Use print_sal_location.
6477 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6478 * symtab.c (find_function_start_sal): Likewise.
6479 * symtab.h (symtab_and_line::symbol): New field.
6480
e5f25bc5
PA
64812017-09-20 Pedro Alves <palves@redhat.com>
6482
6483 * linespec.c (minsym_found): Handle non-text minsyms.
6484 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6485
1b7fa39e
WT
64862017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6487
6488 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6489 backslash.
6490
37dd0825
WT
64912017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6492
6493 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6494 vmovups instead vmovaps.
6495 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6496
4e5a4f58
JB
64972017-09-19 John Baldwin <jhb@FreeBSD.org>
6498
6499 * NEWS (Changes since GDB 8.0): Add starti.
6500 * infcmd.c (enum run_break): New.
6501 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6502 case.
6503 (run_command): Use enum run_how.
6504 (start_command): Likewise.
6505 (starti_command): New function.
6506 (RUN_ARGS_HELP): New macro.
6507 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6508 commands. Add starti command.
6509
aa70c9f1
YQ
65102017-09-19 Yao Qi <yao.qi@linaro.org>
6511
6512 * Makefile.in (monitor.o): Remove the rule.
6513
d6541620
YQ
65142017-09-19 Yao Qi <yao.qi@linaro.org>
6515
6516 * annotate.h (struct annotate_arg_emitter): Use
6517 DISABLE_COPY_AND_ASSIGN.
6518 * common/refcounted-object.h (refcounted_object): Likewise.
6519 * completer.h (struct completion_result): Likewise.
6520 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6521 * filename-seen-cache.h (filename_seen_cache): Likewise.
6522 * gdbcore.h (thread_section_name): Likewise.
6523 * gdb_regex.h (compiled_regex): Likewise.
6524 * gdbthread.h (scoped_restore_current_thread): Likewise.
6525 * inferior.h (scoped_restore_current_inferior): Likewise.
6526 * jit.c (jit_reader): Likewise.
6527 * linespec.h (struct linespec_result): Likewise.
6528 * mi/mi-parse.h (struct mi_parse): Likewise.
6529 * nat/fork-inferior.c (execv_argv): Likewise.
6530 * progspace.h (scoped_restore_current_program_space): Likewise.
6531 * python/python-internal.h (class gdbpy_enter): Likewise.
6532 * regcache.h (regcache): Likewise.
6533 * target-descriptions.c (struct tdesc_reg): Likewise.
6534 (struct tdesc_type): Likewise.
6535 (struct tdesc_feature): Likewise.
6536 * ui-out.h (ui_out_emit_type): Likewise.
6537
0615127c
SM
65382017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6539
6540 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6541 label abort_expression.
6542
5e187554
SM
65432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6544
6545 * common/buffer.c (buffer_xml_printf): Adjust.
6546 * common/xml-utils.c (xml_escape_text): Change return type to
6547 std::string, update code accordingly.
6548 * common/xml-utils.h (xml_escape_text): Change return type to
6549 std::string.
6550 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6551 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6552 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6553 Adjust.
6554
c3d7b541
SM
65552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6556
6557 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6558 (SUBDIR_UNITTESTS_OBS): Add new object file.
6559 * unittests/xml-utils-selftests.c: New file.
6560
1526853e
SM
65612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6562
6563 * common/selftest.h (selftest): New struct/interface.
6564 (register_test): Add name parameter, add new overload.
6565 (run_tests): Add filter parameter.
6566 (for_each_selftest_ftype): New typedef.
6567 (for_each_selftest): New declaration.
6568 * common/selftest.c (tests): Change type to
6569 map<string, unique_ptr<selftest>>.
6570 (simple_selftest): New struct.
6571 (register_test): New function.
6572 (register_test): Add name parameter and use it.
6573 (run_tests): Add filter parameter and use it. Add prints.
6574 Adjust to vector -> map change.
6575 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6576 registering selftests.
6577 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6578 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6579 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6580 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6581 * findvar.c (_initialize_findvar): Likewise.
6582 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6583 * maint.c (maintenance_selftest): Update call to run_tests.
6584 (maintenance_info_selftests): New function.
6585 (_initialize_maint_cmds): Register "maintenance info selftests"
6586 command. Update "maintenance selftest" doc.
6587 * regcache.c (_initialize_regcache): Add names when registering
6588 selftests.
6589 * rust-exp.y (_initialize_rust_exp): Likewise.
6590 * selftest-arch.c (gdbarch_selftest): New struct.
6591 (gdbarch_tests): Remove.
6592 (register_test_foreach_arch): Add name parameter. Call
6593 register_test.
6594 (tests_with_arch): Remove, move most content to
6595 gdbarch_selftest::operator().
6596 (_initialize_selftests_foreach_arch): Remove.
6597 * selftest-arch.h (register_test_foreach_arch): Add name
6598 parameter.
6599 (run_tests_with_arch): New declaration.
6600 * utils-selftests.c (_initialize_utils_selftests): Add names
6601 when registering selftests.
6602 * utils.c (_initialize_utils): Likewise.
6603 * unittests/array-view-selftests.c
6604 (_initialize_array_view_selftests): Likewise.
6605 * unittests/environ-selftests.c (_initialize_environ_selftests):
6606 Likewise.
6607 * unittests/function-view-selftests.c
6608 (_initialize_function_view_selftests): Likewise.
6609 * unittests/offset-type-selftests.c
6610 (_initialize_offset_type_selftests): Likewise.
6611 * unittests/optional-selftests.c
6612 (_initialize_optional_selftests): Likewise.
6613 * unittests/scoped_restore-selftests.c
6614 (_initialize_scoped_restore_selftests): Likewise.
6615 * NEWS: Document "maintenance selftest" and "maint info
6616 selftests".
6617
5846367a
SM
66182017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6619
6620 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6621 scoped_restore.
6622
bd77e8ff
SM
66232017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6624
6625 * mi/mi-main.c (mi_load_progress): Make uiout variable
6626 a unique_ptr.
6627
26a67918
PA
66282017-09-15 Pedro Alves <palves@redhat.com>
6629
6630 * compile/compile-c-types.c (convert_enum, convert_int)
6631 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6632
3f8a7804
SM
66332017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6634
6635 * dwarf2read.c (copy_string): Remove.
6636 (parse_macro_definition): Replace copy_string with savestring.
6637
8d200706
YQ
66382017-09-15 Yao Qi <yao.qi@linaro.org>
6639
6640 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6641 gdb_target_obs.
6642 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6643 Likewise.
6644 (i[34567]86-*-linux*): Likewise.
6645
d185219d
SM
66462017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6647
6648 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6649 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6650 <stack>: Change type to std::vector.
6651 <stack_len, stack_allocated>: Remove.
6652 <grow_stack>: Remove.
6653 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6654 (dwarf_expr_context::~dwarf_expr_context): Remove.
6655 (dwarf_expr_context::grow_stack): Remove.
6656 (dwarf_expr_context::push): Adjust.
6657 (dwarf_expr_context::pop): Adjust.
6658 (dwarf_expr_context::fetch): Adjust.
6659 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6660 (dwarf_expr_context::stack_empty_p): Adjust.
6661 (dwarf_expr_context::execute_stack_op): Adjust.
6662
eccd80d6
SM
66632017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6664
6665 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6666 return type to bool.
6667 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6668
69009882
SM
66692017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6670
6671 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6672 Change type to bool.
6673 (dwarf_stack_value) <in_stack_memory>: Likewise.
6674 (dwarf_expr_context) <push_address>: Change parameter type to
6675 bool.
6676 <fetch_in_stack_memory>: Change return type to bool.
6677 <push>: Change parameter type to bool.
6678 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6679 to bool.
6680 (dwarf_expr_context::push_address): Likewise.
6681 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6682 to bool.
6683 (dwarf_expr_context::execute_stack_op): Adjust.
6684 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6685
1e467161
SM
66862017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6687
6688 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6689 (struct dwarf_expr_context) <n_pieces>: Remove.
6690 <pieces>: Change type to std::vector.
6691 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6692 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6693 pieces.
6694 (dwarf_expr_context::add_piece): Adjust.
6695 * dwarf2loc.c (struct piece_closure): Initialize fields.
6696 <n_pieces>: Remove.
6697 <pieces>: Change type to std::vector.
6698 (allocate_piece_closure): Adjust, change parameter to
6699 std::vector rvalue and std::move it to piece_closure.
6700 (rw_pieced_value): Adjust.
6701 (check_pieced_synthetic_pointer): Adjust.
6702 (indirect_synthetic_pointer): Adjust.
6703 (coerce_pieced_ref): Adjust.
6704 (free_pieced_value_closure): Adjust. Use delete to free
6705 piece_closure.
6706 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6707 to allocate_piece_closure.
6708 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6709
0782db84
SM
67102017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6711
6712 * probe.h (probe_ops_cp): Remove typedef.
6713 (DEF_VEC_P (probe_ops_cp)): Remove.
6714 (all_probe_ops): Change type to std::vector.
6715 * probe.c (info_probes_for_ops): Adjust to vector change.
6716 (probe_linespec_to_ops): Likewise.
6717 (all_probe_ops): Change type to std::vector.
6718 (_initialize_probe): Adjust to vector change.
6719 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6720 * elfread.c (elf_get_probes): Likewise.
6721 * stap-probe.c (_initialize_stap_probe): Likewise.
6722
1eac6bea
SM
67232017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6724
6725 * probe.h (struct bound_probe): Define constructors.
6726 * probe.c (bound_probe_s): Remove typedef.
6727 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6728 (collect_probes): Change return type to std::vector, remove
6729 cleanup.
6730 (compare_probes): Return bool, change parameter type. Change
6731 semantic to "less than".
6732 (gen_ui_out_table_header_info): Change parameter to std::vector
6733 and update.
6734 (exists_probe_with_pops): Likewise.
6735 (info_probes_for_ops): Update to std::vector change.
6736 (enable_probes_command): Likewise.
6737 (disable_probes_command): Likewise.
6738
aaa63a31
SM
67392017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6740
6741 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6742 vec to std::vector.
6743 * probe.c (parse_probes_in_pspace): Update.
6744 (find_probes_in_objfile): Update.
6745 (find_probe_by_pc): Update.
6746 (collect_probes): Update.
6747 (probe_any_get_probes): Update.
6748 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6749 return type to reference to std::vector.
6750 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6751 std::vector and update.
6752 (dtrace_process_dof): Likewise.
6753 (dtrace_get_probes): Likewise.
6754 * elfread.c (elf_get_probes): Change return type to std::vector,
6755 store an std::vector in bfd_data.
6756 (probe_key_free): Update to std::vector.
6757 * stap-probe.c (handle_stap_probe): Change parameter to
6758 std::vector and update.
6759 (stap_get_probes): Likewise.
6760 * symfile-debug.c (debug_sym_get_probes): Change return type to
6761 std::vector and update.
6762
cb85b21b
TT
67632017-09-11 Tom Tromey <tom@tromey.com>
6764
6765 * breakpoint.c (program_breakpoint_here_p): Update.
6766 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6767 from make_show_memory_breakpoints_cleanup. Return a
6768 scoped_restore_tmpl<int>.
6769 (restore_show_memory_breakpoints): Remove.
6770 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6771 * mem-break.c (memory_validate_breakpoint): Update.
6772 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6773 (ia64_memory_remove_breakpoint): Update.
6774 (ia64_breakpoint_from_pc): Update.
6775 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6776 from make_show_memory_breakpoints_cleanup.
6777
8fbc99ef
TT
67782017-09-11 Tom Tromey <tom@tromey.com>
6779
6780 * d-namespace.c (d_lookup_symbol): Use std::string.
6781 (find_symbol_in_baseclass): Likewise.
6782
50feb4bd
TT
67832017-09-11 Tom Tromey <tom@tromey.com>
6784
6785 * ctf.c (ctf_start): Use std::string.
6786
c6dc63a1
TT
67872017-09-11 Tom Tromey <tom@tromey.com>
6788
6789 * ada-lang.c (is_known_support_routine): Update.
6790 (ada_unhandled_exception_name_addr_from_raise): Update.
6791 * guile/scm-frame.c (gdbscm_frame_name): Update.
6792 * python/py-frame.c (frapy_name): Update.
6793 (frapy_function): Update.
6794 * stack.h (find_frame_funname): Update.
6795 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6796 (print_frame): Update.
6797
d6b9b80f
TT
67982017-09-11 Tom Tromey <tom@tromey.com>
6799
6800 * findcmd.c (put_bits): Take a gdb::byte_vector.
6801 (parse_find_args): Return gdb::byte_vector. "args" now const.
6802 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6803 cleanups.
6804 (find_command): Update.
6805
a9921622
TT
68062017-09-11 Tom Tromey <tom@tromey.com>
6807
6808 * cli/cli-script.c (class scoped_restore_hook_in): New.
6809 (clear_hook_in_cleanup): Remove.
6810 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6811 scoped_restore_hook_in.
6812
be0d7abb
TT
68132017-09-11 Tom Tromey <tom@tromey.com>
6814
6815 * cli/cli-script.c (restore_interp): Remove.
6816 (read_command_lines): Use scoped_restore_interp.
6817 * interps.c (scoped_restore_interp::set_temp): Rename from
6818 interp_set_temp.
6819 * interps.h (class scoped_restore_interp): New.
6820 (interp_set_temp): Remove.
6821
00f675ff
TT
68222017-09-11 Tom Tromey <tom@tromey.com>
6823
6824 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6825 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6826 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6827 scoped_restore.
6828 (mi_cmd_break_insert_1): Update.
6829 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6830 scoped_restore.
6831
cb791d59
TT
68322017-09-11 Tom Tromey <tom@tromey.com>
6833
6834 * demangle.c (demangle_command): Update.
6835 * breakpoint.c (disable_command): Update.
6836 (enable_command): Update.
6837 (find_location_by_number): Make "number" const. Use
6838 get_number_trailer.
6839 * cli/cli-utils.c (extract_arg): Return std::string.
6840 * probe.c (parse_probe_linespec): Update. Change types.
6841 (collect_probes): Take string arguments.
6842 (parse_probe_linespec): Likewise.
6843 (info_probes_for_ops): Update.
6844 (enable_probes_command): Update.
6845 (disable_probes_command): Update.
6846 * break-catch-sig.c (catch_signal_split_args): Update.
6847 * mi/mi-parse.c (mi_parse): Update.
6848
2039bd9f
TT
68492017-09-11 Tom Tromey <tom@tromey.com>
6850
6851 * language.h (language_enum): Make argument const.
6852 * language.c (language_enum): Make argument const.
6853
f1735a53
TT
68542017-09-11 Tom Tromey <tom@tromey.com>
6855
6856 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6857 as function.
6858 (skip_to_space): Rename from skip_to_space_const.
6859 * common/common-utils.c (skip_to_space): New function.
6860 (skip_to_space): Rename from skip_to_space_const.
6861 * cli/cli-utils.h (get_number): Rename from get_number_const.
6862 (extract_arg): Rename from extract_arg_const.
6863 * cli/cli-utils.c (get_number): Rename from get_number_const.
6864 (extract_arg): Rename from extract_arg_const.
6865 (number_or_range_parser::get_number): Use ::get_number.
6866 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6867 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6868 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6869 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6870 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6871 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6872 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6873 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6874
7d221d74
TT
68752017-09-11 Tom Tromey <tom@tromey.com>
6876
6877 * python/python.c (do_start_initialization): Use
6878 py-event-types.def to initialize types.
6879 Define all object type structures.
6880 * python/python-internal.h: Don't declare event initialization
6881 functions.
6882 * python/py-threadevent.c (thread_event_object_type): Don't
6883 define.
6884 * python/py-stopevent.c (stop_event_object_type): Don't define.
6885 * python/py-signalevent.c (signal_event_object_type): Don't
6886 declare or define.
6887 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6888 (clear_objfiles_event_object_type): Don't declare or define.
6889 * python/py-infevents.c (inferior_call_pre_event_object_type)
6890 (inferior_call_post_event_object_type)
6891 (register_changed_event_object_type)
6892 (memory_changed_event_object_type): Don't declare or define.
6893 * python/py-inferior.c (new_thread_event_object_type)
6894 (new_inferior_event_object_type)
6895 (inferior_deleted_event_object_type): Don't declare or define.
6896 * python/py-exitedevent.c (exited_event_object_type): Don't
6897 declare or define.
6898 * python/py-evts.c (gdbpy_initialize_py_events): Use
6899 py-all-events.def.
6900 * python/py-events.h (thread_event_object_type): Don't declare.
6901 (events_object): Use py-all-events.def.
6902 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6903 py-event-types.def.
6904 * python/py-event-types.def: New file.
6905 * python/py-continueevent.c (create_continue_event_object): Don't
6906 declare or define.
6907 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6908 declare or define.
6909 * python/py-all-events.def: New file.
6910
35c61a1d
TT
69112017-09-11 Tom Tromey <tom@tromey.com>
6912
6913 * python/py-threadevent.c (create_thread_event_object): Return
6914 gdbpy_ref.
6915 * python/py-stopevent.h (create_stop_event_object)
6916 (create_breakpoint_event_object, create_signal_event_object):
6917 Update.
6918 * python/py-stopevent.c (create_stop_event_object): Return
6919 gdbpy_ref.
6920 (emit_stop_event): Update.
6921 * python/py-signalevent.c (create_signal_event_object): Return
6922 gdbpy_ref.
6923 * python/py-infevents.c (create_inferior_call_event_object):
6924 Update.
6925 * python/py-event.h (create_event_object)
6926 (create_thread_event_object): Update.
6927 * python/py-event.c (create_event_object): Return gdbpy_ref.
6928 * python/py-continueevent.c: Return gdbpy_ref.
6929 * python/py-bpevent.c (create_breakpoint_event_object): Return
6930 gdbpy_ref.
6931
7c96f8c1
TT
69322017-09-11 Tom Tromey <tom@tromey.com>
6933
6934 PR python/15622:
6935 * NEWS: Add entry.
6936 * python/python.c (do_start_initialization): Initialize new event
6937 types.
6938 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6939 (gdbpy_initialize_inferior_deleted_event)
6940 (gdbpy_initialize_new_thread_event): Declare.
6941 * python/py-threadevent.c (create_thread_event_object): Add option
6942 "thread" parameter.
6943 * python/py-inferior.c (new_thread_event_object_type)
6944 (new_inferior_event_object_type)
6945 (inferior_deleted_event_object_type): Declare.
6946 (python_new_inferior, python_inferior_deleted): New functions.
6947 (add_thread_object): Emit new_thread event.
6948 (gdbpy_initialize_inferior): Attach new functions to corresponding
6949 observers.
6950 (new_thread, new_inferior, inferior_deleted): Define new event
6951 types.
6952 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6953 registries.
6954 * python/py-events.h (events_object) <new_inferior,
6955 inferior_deleted, new_thread>: New fields.
6956 * python/py-event.h (create_thread_event_breakpoint): Add optional
6957 "thread" parameter.
6958
72542b8e
AB
69592017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6960
6961 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6962 check current_ui instead.
6963 (internal_vproblem): Likewise.
6964
0d64823e
SM
69652017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * thread.c (print_thread_info_1): Remove unnecessary calls to
6968 uiout->is_mi_like_p.
6969
eb1e02fd
TT
69702017-09-09 Tom Tromey <tom@tromey.com>
6971
6972 * namespace.h (add_using_directive): Update.
6973 * namespace.c (add_using_directive): Change type of excludes to
6974 std::vector.
6975 * dwarf2read.c (read_import_statement): Use std::vector.
6976 (read_namespace): Update.
6977 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6978
0fc21fd8
TT
69792017-09-09 Tom Tromey <tom@tromey.com>
6980
6981 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6982
49663d05
TT
69832017-09-09 Tom Tromey <tom@tromey.com>
6984
6985 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6986
0b868b60
TT
69872017-09-09 Tom Tromey <tom@tromey.com>
6988
6989 * stack.c (func_command): Use gdb::def_vector.
6990
c0470d48
TT
69912017-09-09 Tom Tromey <tom@tromey.com>
6992
6993 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6994 ui_out_emit_list, ui_out_emit_tuple.
6995 (mi_cmd_var_update): Likewise.
6996
ca5909c7
TT
69972017-09-09 Tom Tromey <tom@tromey.com>
6998
6999 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7000 ui_out_redirect_pop.
7001 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7002 ui_out_redirect_pop.
7003 * utils.c (do_ui_out_redirect_pop)
7004 (make_cleanup_ui_out_redirect_pop): Remove.
7005 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7006 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7007 * ui-out.h (ui_out_redirect_pop): New class.
7008
e6a2252a
TT
70092017-09-09 Tom Tromey <tom@tromey.com>
7010
7011 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7012 (list_available_thread_groups, mi_cmd_list_thread_groups)
7013 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7014 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7015 Likewise.
7016
393702cd
TT
70172017-09-09 Tom Tromey <tom@tromey.com>
7018
7019 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7020 ui_out_emit_tuple.
7021
76f9c9cf
TT
70222017-09-09 Tom Tromey <tom@tromey.com>
7023
7024 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7025 * stack.c (print_frame): Use ui_out_emit_tuple.
7026 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7027 (info_spu_mailbox_command, info_spu_dma_command)
7028 (info_spu_proxydma_command): Likewise.
7029 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7030 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7031 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7032 ui_out_emit_tuple.
7033 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7034
dc9fe180
TT
70352017-09-09 Tom Tromey <tom@tromey.com>
7036
7037 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7038 (class ui_out_emit_table): Update comment.
7039 * ui-out.c (do_cleanup_table_end)
7040 (make_cleanup_ui_out_table_begin_end): Remove.
7041 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7042 (info_spu_dma_cmdlist): Likewise.
7043 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7044 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7045 ui_out_emit_table.
7046
f8cc3da6
TT
70472017-09-09 Tom Tromey <tom@tromey.com>
7048
7049 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7050 ui_out_emit_list, gdb::optional.
7051
481695ed
JB
70522017-09-09 John Baldwin <jhb@FreeBSD.org>
7053
7054 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7055 prototype.
7056 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7057 prototype.
7058 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7059 prototype.
7060 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7061 * ada-exp.y: Remove _initialize_ada_exp prototype.
7062 * ada-lang.c: Remove _initialize_ada_language prototype.
7063 * ada-tasks.c: Remove _initialize_tasks prototype.
7064 * addrmap.c: Remove _initialize_addrmap prototype.
7065 * agent.c: Remove _initialize_agent prototype.
7066 * aix-thread.c: Remove _initialize_aix_thread prototype.
7067 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7068 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7069 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7070 prototype.
7071 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7072 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7073 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7074 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7075 prototype.
7076 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7077 prototype.
7078 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7079 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7080 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7081 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7082 prototype.
7083 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7084 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7085 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7086 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7087 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7088 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7089 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7090 prototype.
7091 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7092 prototype.
7093 * annotate.c: Remove _initialize_annotate prototype.
7094 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7095 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7096 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7097 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7098 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7099 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7100 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7101 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7102 prototype.
7103 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7104 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7105 * auto-load.c: Remove _initialize_auto_load prototype.
7106 * auxv.c: Remove _initialize_auxv prototype.
7107 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7108 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7109 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7110 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7111 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7112 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7113 prototype.
7114 * break-catch-throw.c: Remove _initialize_break_catch_throw
7115 prototype.
7116 * breakpoint.c: Remove _initialize_breakpoint prototype.
7117 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7118 * btrace.c: Remove _initialize_btrace prototype.
7119 * charset.c: Remove _initialize_charset prototype.
7120 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7121 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7122 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7123 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7124 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7125 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7126 * coffread.c: Remove _initialize_coffread prototype.
7127 * compile/compile.c: Remove _initialize_compile prototype.
7128 * complaints.c: Remove _initialize_complaints prototype.
7129 * completer.c: Remove _initialize_completer prototype.
7130 * copying.awk: Remove _initialize_copying prototype.
7131 * copying.c: Regenerate.
7132 * core-regset.c: Remove _initialize_core_regset prototype.
7133 * corefile.c: Remove _initialize_core prototype.
7134 * corelow.c: Remove _initialize_corelow prototype.
7135 * cp-abi.c: Remove _initialize_cp_abi prototype.
7136 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7137 * cp-support.c: Remove _initialize_cp_support prototype.
7138 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7139 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7140 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7141 * ctf.c: Remove _initialize_ctf prototype.
7142 * d-lang.c: Remove _initialize_d_language prototype.
7143 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7144 prototype.
7145 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7146 * dbxread.c: Remove _initialize_dbxread prototype.
7147 * dcache.c: Remove _initialize_dcache prototype.
7148 * demangle.c: Remove _initialize_demangler prototype.
7149 * disasm-selftests.c: Remove _initialize_disasm_selftests
7150 prototype.
7151 * disasm.c: Remove _initialize_disasm prototype.
7152 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7153 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7154 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7155 prototype.
7156 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7157 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7158 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7159 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7160 * elfread.c: Remove _initialize_elfread prototype.
7161 * exec.c: Remove _initialize_exec prototype.
7162 * extension.c: Remove _initialize_extension prototype.
7163 * f-lang.c: Remove _initialize_f_language prototype.
7164 * f-valprint.c: Remove _initialize_f_valprint prototype.
7165 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7166 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7167 * filesystem.c: Remove _initialize_filesystem prototype.
7168 * findcmd.c: Remove _initialize_mem_search prototype.
7169 * fork-child.c: Remove _initialize_fork_child prototype.
7170 * frame-base.c: Remove _initialize_frame_base prototype.
7171 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7172 * frame.c: Remove _initialize_frame prototype.
7173 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7174 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7175 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7176 * gcore.c: Remove _initialize_gcore prototype.
7177 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7178 * gdbarch.c: Regenerate.
7179 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7180 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7181 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7182 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7183 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7184 * go-lang.c: Remove _initialize_go_language prototype.
7185 * go32-nat.c: Remove _initialize_go32_nat prototype.
7186 * guile/guile.c: Remove _initialize_guile prototype.
7187 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7188 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7189 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7190 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7191 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7192 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7193 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7194 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7195 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7196 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7197 prototype.
7198 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7199 prototype.
7200 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7201 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7202 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7203 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7204 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7205 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7206 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7207 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7208 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7209 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7210 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7211 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7212 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7213 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7214 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7215 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7216 prototype.
7217 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7218 prototype.
7219 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7220 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7221 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7222 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7223 * infcall.c: Remove _initialize_infcall prototype.
7224 * infcmd.c: Remove _initialize_infcmd prototype.
7225 * inferior.c: Remove _initialize_inferiors prototype.
7226 * inflow.c: Remove _initialize_inflow prototype.
7227 * infrun.c: Remove _initialize_infrun prototype.
7228 * interps.c: Remove _initialize_interpreter prototype.
7229 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7230 * jit.c: Remove _initialize_jit prototype.
7231 * language.c: Remove _initialize_language prototype.
7232 * linux-fork.c: Remove _initialize_linux_fork prototype.
7233 * linux-nat.c: Remove _initialize_linux_nat prototype.
7234 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7235 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7236 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7237 * m2-lang.c: Remove _initialize_m2_language prototype.
7238 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7239 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7240 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7241 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7242 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7243 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7244 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7245 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7246 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7247 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7248 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7249 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7250 * machoread.c: Remove _initialize_machoread prototype.
7251 * macrocmd.c: Remove _initialize_macrocmd prototype.
7252 * macroscope.c: Remove _initialize_macroscope prototype.
7253 * maint.c: Remove _initialize_maint_cmds prototype.
7254 * mdebugread.c: Remove _initialize_mdebugread prototype.
7255 * memattr.c: Remove _initialize_mem prototype.
7256 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7257 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7258 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7259 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7260 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7261 * microblaze-linux-tdep.c: Remove
7262 _initialize_microblaze_linux_tdep prototype.
7263 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7264 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7265 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7266 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7267 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7268 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7269 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7270 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7271 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7272 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7273 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7274 prototype.
7275 * mipsread.c: Remove _initialize_mipsread prototype.
7276 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7277 prototype.
7278 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7279 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7280 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7281 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7282 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7283 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7284 prototype.
7285 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7286 * nto-procfs.c: Remove _initialize_procfs prototype.
7287 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7288 * objc-lang.c: Remove _initialize_objc_language prototype.
7289 * objfiles.c: Remove _initialize_objfiles prototype.
7290 * observer.c: Remove observer_test_first_notification_function,
7291 observer_test_second_notification_function,
7292 observer_test_third_notification_function, and
7293 _initialize_observer prototypes.
7294 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7295 * osabi.c: Remove _initialize_gdb_osabi prototype.
7296 * osdata.c: Remove _initialize_osdata prototype.
7297 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7298 * parse.c: Remove _initialize_parse prototype.
7299 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7300 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7301 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7302 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7303 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7304 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7305 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7306 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7307 * printcmd.c: Remove _initialize_printcmd prototype.
7308 * probe.c: Remove _initialize_probe prototype.
7309 * proc-api.c: Remove _initialize_proc_api prototype.
7310 * proc-events.c: Remove _initialize_proc_events prototype.
7311 * proc-service.c: Remove _initialize_proc_service prototype.
7312 * procfs.c: Remove _initialize_procfs prototype.
7313 * psymtab.c: Remove _initialize_psymtab prototype.
7314 * python/python.c: Remove _initialize_python prototype.
7315 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7316 * record-btrace.c: Remove _initialize_record_btrace prototype.
7317 * record-full.c: Remove _initialize_record_full prototype.
7318 * record.c: Remove _initialize_record prototype.
7319 * regcache.c: Remove _initialize_regcache prototype.
7320 * reggroups.c: Remove _initialize_reggroup prototype.
7321 * remote-notif.c: Remove _initialize_notif prototype.
7322 * remote-sim.c: Remove _initialize_remote_sim prototype.
7323 * remote.c: Remove _initialize_remote prototype.
7324 * reverse.c: Remove _initialize_reverse prototype.
7325 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7326 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7327 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7328 prototype.
7329 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7330 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7331 * rust-exp.y: Remove _initialize_rust_exp prototype.
7332 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7333 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7334 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7335 * score-tdep.c: Remove _initialize_score_tdep prototype.
7336 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7337 prototype.
7338 * ser-go32.c: Remove _initialize_ser_dos prototype.
7339 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7340 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7341 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7342 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7343 * serial.c: Remove _initialize_serial prototype.
7344 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7345 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7346 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7347 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7348 * skip.c: Remove _initialize_step_skip prototype.
7349 * sol-thread.c: Remove _initialize_sol_thread prototype.
7350 * solib-aix.c: Remove _initialize_solib_aix prototype.
7351 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7352 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7353 * solib-frv.c: Remove _initialize_frv_solib prototype.
7354 * solib-spu.c: Remove _initialize_spu_solib prototype.
7355 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7356 * solib-target.c: Remove _initialize_solib_target prototype.
7357 * solib.c: Remove _initialize_solib prototype.
7358 * source.c: Remove _initialize_source prototype.
7359 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7360 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7361 prototype.
7362 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7363 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7364 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7365 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7366 prototype.
7367 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7368 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7369 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7370 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7371 prototype.
7372 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7373 prototype.
7374 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7375 prototype.
7376 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7377 prototype.
7378 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7379 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7380 prototype.
7381 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7382 prototype.
7383 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7384 prototype.
7385 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7386 prototype.
7387 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7388 prototype.
7389 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7390 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7391 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7392 * stabsread.c: Remove _initialize_stabsread prototype.
7393 * stack.c: Remove _initialize_stack prototype.
7394 * stap-probe.c: Remove _initialize_stap_probe prototype.
7395 * std-regs.c: Remove _initialize_frame_reg prototype.
7396 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7397 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7398 * symfile.c: Remove _initialize_symfile prototype.
7399 * symmisc.c: Remove _initialize_symmisc prototype.
7400 * symtab.c: Remove _initialize_symtab prototype.
7401 * target-dcache.c: Remove _initialize_target_dcache prototype.
7402 * target-descriptions.c: Remove _initialize_target_descriptions
7403 prototype.
7404 * thread.c: Remove _initialize_thread prototype.
7405 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7406 prototype.
7407 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7408 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7409 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7410 prototype.
7411 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7412 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7413 * tracefile.c: Remove _initialize_tracefile prototype.
7414 * tracepoint.c: Remove _initialize_tracepoint prototype.
7415 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7416 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7417 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7418 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7419 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7420 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7421 * tui/tui.c: Remove _initialize_tui prototype.
7422 * typeprint.c: Remove _initialize_typeprint prototype.
7423 * user-regs.c: Remove _initialize_user_regs prototype.
7424 * utils.c: Remove _initialize_utils prototype.
7425 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7426 * valarith.c: Remove _initialize_valarith prototype.
7427 * valops.c: Remove _initialize_valops prototype.
7428 * valprint.c: Remove _initialize_valprint prototype.
7429 * value.c: Remove _initialize_values prototype.
7430 * varobj.c: Remove _initialize_varobj prototype.
7431 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7432 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7433 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7434 * windows-nat.c: Remove _initialize_windows_nat,
7435 _initialize_check_for_gdb_ini, and _initialize_loadable
7436 prototypes.
7437 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7438 * xcoffread.c: Remove _initialize_xcoffread prototype.
7439 * xml-support.c: Remove _initialize_xml_support prototype.
7440 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7441 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7442 prototype.
7443 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7444 prototype.
7445 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7446
a611b5cb
KS
74472017-09-08 Keith Seitz <keiths@redhat.com>
7448
7449 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7450 field.
7451
469412dd
CW
74522017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7453
7454 * f-valprint.c (f_val_print): Remove check for one byte
7455 sized integers. Remove printing of character type.
7456
a5ad232b
FP
74572017-09-08 Frank Penczek <frank.penczek@intel.com>
7458 Christoph Weinmann <christoph.t.weinmann@intel.com>
7459 Bernhard Heckel <bernhard.heckel@intel.com>
7460
7461 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7462 to maintain proper indentation when printing pointers/refs.
7463
e5014227
JB
74642017-09-07 Joel Brobecker <brobecker@adacore.com>
7465
7466 GDB 8.0.1 released.
7467
63c99141
JB
74682017-09-07 Joel Brobecker <brobecker@adacore.com>
7469
7470 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7471
69c1e056
TT
74722017-09-05 Tom Tromey <tom@tromey.com>
7473
7474 * parse.c (funcall_chain): Now a std::vector.
7475 (start_arglist, end_arglist): Simplify.
7476 (free_funcalls): Remove.
7477 (parse_exp_in_context_1): Remove cleanup.
7478
fef704bf
TT
74792017-09-05 Tom Tromey <tom@tromey.com>
7480
7481 * go-exp.y (go_parse): Don't create a cleanup.
7482
5613c585
TT
74832017-09-05 Tom Tromey <tom@tromey.com>
7484
7485 * d-exp.y (PrimaryExpression): Use std::string.
7486 (d_parse): Don't create a cleanup.
7487
eae49211
TT
74882017-09-05 Tom Tromey <tom@tromey.com>
7489
7490 * utils.c (do_clear_parser_state): Remove.
7491 (make_cleanup_clear_parser_state): Remove.
7492 * p-exp.y (pascal_parse): Use scoped_restore.
7493 * m2-exp.y (m2_parse): Use scoped_restore.
7494 * f-exp.y (f_parse): Use scoped_restore.
7495 * d-exp.y (d_parse): Use scoped_restore.
7496 * c-exp.y (c_parse): Use scoped_restore.
7497 * ada-exp.y (ada_parse): Use scoped_restore.
7498 * utils.h (make_cleanup_clear_parser_state): Remove.
7499
73b9be8b
KS
75002017-09-06 Keith Seitz <keiths@redhat.com>
7501
7502 * dwarf2read.c (dw2_linkage_name_attr): New function.
7503 (dw2_linkage_name): New function.
7504 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7505 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7506 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7507
a102602b
KR
75082017-09-06 Kamil Rytarowski <n54@gmx.com>
7509
7510 * config/djgpp/djconfig.sh: Correct shell portability issue.
7511
28ad437d
KR
75122017-09-06 Kamil Rytarowski <n54@gmx.com>
7513
7514 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7515
351787dd
JB
75162017-09-06 John Baldwin <jhb@FreeBSD.org>
7517
7518 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7519 * NEWS: Mention new FreeBSD/mips native configuration.
7520 * configure.host: Add aarch64*-*-freebsd*.
7521 * configure.nat: Likewise.
7522 * aarch64-fbsd-nat.c: New file.
7523
c0f84956
JB
75242017-09-06 John Baldwin <jhb@FreeBSD.org>
7525
7526 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7527 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7528 * NEWS: Mention new FreeBSD/aarch64 target.
7529 * configure.tgt: Add aarch64*-*-freebsd*.
7530 * aarch64-fbsd-tdep.c: New file.
7531 * aarch64-fbsd-tdep.h: New file.
7532
7610297a
KR
75332017-09-06 Kamil Rytarowski <n54@gmx.com>
7534
7535 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7536
fbd1b771
JK
75372017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7538
7539 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7540 of TLS symbols.
7541
5ca79eae
PW
75422017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7543
7544 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7545 call.
7546
bf93d7ba
SM
75472017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7548
7549 * infrun.c (follow_exec): Call add_thread after
7550 target_find_description.
7551
1bb7c059
SM
75522017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7553
7554 * infrun.c (handle_inferior_event_1): When exec'ing, read
7555 stop_pc after follow_exec.
7556
fc809827
SM
75572017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7558
7559 * remote.c (process_g_packet): Update error message.
7560
d2fcdd85
YQ
75612017-09-05 Yao Qi <yao.qi@linaro.org>
7562
7563 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7564 targets.
7565
e69570ee
PA
75662017-09-05 Pedro Alves <palves@redhat.com>
7567
7568 * eval.c (eval_call, evaluate_funcall): New functions, factored
7569 out from ...
7570 (evaluate_subexp_standard): ... this.
7571
22916b07
YQ
75722017-09-05 Yao Qi <yao.qi@linaro.org>
7573
7574 * amd64-tdep.c (amd64_target_description): Create target
7575 descriptions.
7576 (_initialize_amd64_tdep): Don't call functions
7577 initialize_tdesc_amd64_*. Add self tests.
7578 * arch/amd64.c (amd64_create_target_description): Add parameter
7579 is_linux. Call set_tdesc_osabi if is_linux is true.
7580 * arch/amd64.h (amd64_create_target_description): Update the
7581 declaration.
7582 * arch/i386.c (i386_create_target_description): Add parameter
7583 is_linux. Call set_tdesc_osabi if is_linux is true.
7584 * arch/i386.h (i386_create_target_description): Update
7585 declaration.
7586 * configure.tgt: Add i386.o to gdb_target_obs.
7587 * features/Makefile (XMLTOC): Remove i386/*.xml.
7588 * features/i386/amd64-avx-avx512.c: Remove.
7589 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7590 * features/i386/amd64-avx-mpx.c: Remove.
7591 * features/i386/amd64-avx.c: Remove.
7592 * features/i386/amd64-mpx.c: Remove.
7593 * features/i386/amd64.c: Remove.
7594 * features/i386/i386-avx-avx512.c: Remove.
7595 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7596 * features/i386/i386-avx-mpx.c: Remove.
7597 * features/i386/i386-avx.c: Remove.
7598 * features/i386/i386-mmx.c: Remove.
7599 * features/i386/i386-mpx.c: Remove.
7600 * features/i386/i386.c: Remove.
7601 * i386-tdep.c: Don't include features/i386/i386*.c., include
7602 target-descriptions.h and arch/i386.h.
7603 (i386_target_description): Create target descriptions.
7604 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7605 functions. Do self tests.
7606
0854b7b1
YQ
76072017-09-05 Yao Qi <yao.qi@linaro.org>
7608
7609 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7610 * features/i386/amd64-avx-avx512-linux.c: Removed.
7611 * features/i386/amd64-avx-linux.c: Removed.
7612 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7613 * features/i386/amd64-avx-mpx-linux.c: Removed.
7614 * features/i386/amd64-linux.c: Removed.
7615 * features/i386/amd64-mpx-linux.c: Removed.
7616 * features/i386/x32-avx-avx512-linux.c: Removed.
7617 * features/i386/x32-avx-linux.c: Removed.
7618 * features/i386/x32-linux.c: Removed.
7619
b4570e4b
YQ
76202017-09-05 Yao Qi <yao.qi@linaro.org>
7621
7622 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7623 features/i386/*.c.
7624 (amd64_linux_read_description): Call
7625 amd64_create_target_description.
7626 * arch/amd64.c: New file.
7627 * arch/amd64.h: New file.
7628 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7629 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7630
6c73f67f
YQ
76312017-09-05 Yao Qi <yao.qi@linaro.org>
7632
7633 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7634 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7635 (amd64_linux_read_description): Create target descriptions.
7636 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7637 functions. Add unit tests.
7638 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7639 x32-core.xml.
7640 * features/i386/64bit-avx.c: Generated.
7641 * features/i386/64bit-avx512.c: Generated.
7642 * features/i386/64bit-core.c: Generated.
7643 * features/i386/64bit-linux.c: Generated.
7644 * features/i386/64bit-mpx.c: Generated.
7645 * features/i386/64bit-pkeys.c: Generated.
7646 * features/i386/64bit-segments.c: Generated.
7647 * features/i386/64bit-sse.c: Generated.
7648 * features/i386/x32-core.c: Generated.
7649 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7650 c files for amd64-linux and x32-linux.
7651
9d3d478b
YQ
76522017-09-05 Yao Qi <yao.qi@linaro.org>
7653
7654 * amd64-linux-tdep.c (amd64_linux_read_description): New
7655 function.
7656 (amd64_linux_core_read_description): Call
7657 amd64_linux_read_description.
7658 (amd64_linux_init_abi): Likewise.
7659 (amd64_x32_linux_init_abi): Likewise.
7660 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7661 * x86-linux-nat.c (x86_linux_read_description): Call
7662 amd64_linux_read_description.
7663
b9f1d50f
YQ
76642017-09-05 Yao Qi <yao.qi@linaro.org>
7665
7666 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7667 comments.
7668
188c9e6d
YQ
76692017-09-05 Yao Qi <yao.qi@linaro.org>
7670
7671 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7672 * features/i386/i386-avx-avx512-linux.c: Remove.
7673 * features/i386/i386-avx-linux.c: Remove.
7674 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7675 * features/i386/i386-avx-mpx-linux.c: Remove.
7676 * features/i386/i386-linux.c: Remove.
7677 * features/i386/i386-mmx-linux.c: Remove.
7678 * features/i386/i386-mpx-linux.c: Remove.
7679
5f035c07
YQ
76802017-09-05 Yao Qi <yao.qi@linaro.org>
7681
7682 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7683 (SFILES): Add arch/i386.c.
7684 (HFILES_NO_SRCDIR): Add arch/i386.h.
7685 * arch/i386.c: New file.
7686 * arch/i386.h: New file.
7687 * arch/tdesc.h (allocate_target_description): Declare.
7688 (set_tdesc_architecture): Declare.
7689 (set_tdesc_osabi): Declare.
7690 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7691 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7692 include arch/i386.h.
7693 (i386_linux_read_description): Remove code and call
7694 i386_create_target_description.
7695 (set_tdesc_architecture): New function.
7696 (set_tdesc_osabi): New function.
7697 * target-descriptions.h (allocate_target_description): Remove.
7698
0abe8a89
YQ
76992017-09-05 Yao Qi <yao.qi@linaro.org>
7700
7701 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7702 * target-descriptions.c (tdesc_create_feature): Likewise, and
7703 adjust code.
7704 * features/i386/32bit-avx.c: Re-generated.
7705 * features/i386/32bit-avx512.c: Re-generated.
7706 * features/i386/32bit-core.c: Re-generated.
7707 * features/i386/32bit-linux.c: Re-generated.
7708 * features/i386/32bit-mpx.c: Re-generated.
7709 * features/i386/32bit-pkeys.c: Re-generated.
7710 * features/i386/32bit-sse.c: Re-generated.
7711
0a188386
YQ
77122017-09-05 Yao Qi <yao.qi@linaro.org>
7713
7714 * regformats/regdef.h (struct reg): Override operator == and !=.
7715
f49ff000
YQ
77162017-09-05 Yao Qi <yao.qi@linaro.org>
7717
7718 * arch/tdesc.h: New file.
7719 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7720 * target-descriptions.c: Update comments.
7721 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7722 declarations.
7723 * features/i386/32bit-avx.c: Re-generated.
7724 * features/i386/32bit-avx512.c: Re-generated.
7725 * features/i386/32bit-core.c: Re-generated.
7726 * features/i386/32bit-linux.c: Re-generated.
7727 * features/i386/32bit-mpx.c: Re-generated.
7728 * features/i386/32bit-pkeys.c: Re-generated.
7729 * features/i386/32bit-sse.c: Re-generated.
7730
f7000548
YQ
77312017-09-05 Yao Qi <yao.qi@linaro.org>
7732
7733 * regformats/regdat.sh: Update generated code.
7734
c9a5e2a5
YQ
77352017-09-05 Yao Qi <yao.qi@linaro.org>
7736
7737 * regformats/regdat.sh: Adjust code order.
7738
d6b687ac
SM
77392017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7740
7741 * expprint.c (dump_subexp_body_standard): Use constant format
7742 string in fprintf_filtered call.
7743
a379bfd0
JB
77442017-09-04 John Baldwin <jhb@FreeBSD.org>
7745
7746 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7747 NetBSD/i386.
7748 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7749
f7efc967
JB
77502017-09-04 John Baldwin <jhb@FreeBSD.org>
7751
7752 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7753
c49fbc6c
JB
77542017-09-04 John Baldwin <jhb@FreeBSD.org>
7755
7756 * bsd-kvm.o: Define _KMEMUSER.
7757 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7758 * configure: Regenerate.
7759
26562e73
JB
77602017-09-04 John Baldwin <jhb@FreeBSD.org>
7761
7762 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7763 * i386-fbsd-nat.c: Likewise.
7764
31cf1487
JB
77652017-09-04 John Baldwin <jhb@FreeBSD.org>
7766
7767 * unittests/array-view-selftests.c: Add include of <array>.
7768
5b9f8a7c
JB
77692017-09-04 John Baldwin <jhb@FreeBSD.org>
7770
7771 * spu-tdep.c (flush_ea_cache): Add missing argument to
7772 call_function_by_hand.
7773
d69cf9b2
PA
77742017-09-04 Pedro Alves <palves@redhat.com>
7775
7776 * NEWS (Safer support for debugging with no debug info): New.
7777
3693fdb3
PA
77782017-09-04 Pedro Alves <palves@redhat.com>
7779
7780 * c-exp.y (function_method, function_method_void): Add current
7781 instance flags to TYPE_INSTANCE.
7782 * dwarf2read.c (check_modifier): New.
7783 (compute_delayed_physnames): Assert that only C++ adds delayed
7784 physnames. Mark fn_fields as const/volatile depending on
7785 physname.
7786 * eval.c (make_params): New type_instance_flags parameter. Use
7787 it as the new type's instance flags.
7788 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7789 flags element and pass it to make_params.
7790 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7791 instance flags element.
7792 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7793 * gdbtypes.h: Include "enum-flags.h".
7794 (type_instance_flags): New enum-flags type.
7795 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7796 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7797 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7798 (follow_type_instance_flags): New function.
7799 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7800 * parser-defs.h (follow_type_instance_flags): Declare.
7801 * valops.c (value_struct_elt_for_reference): const/volatile must
7802 match too.
7803
e68cb8e0
PA
78042017-09-04 Pedro Alves <palves@redhat.com>
7805
7806 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7807 function/method scopes; lookup the nested name as a function local
7808 static variable.
7809
858be34c
PA
78102017-09-04 Pedro Alves <palves@redhat.com>
7811
7812 (%type <voidval>): Add function_method.
7813 * c-exp.y (exp): New production for calls with no arguments.
7814 (function_method, function_method_void_or_typelist): New
7815 productions.
7816 (exp): New production for "method()::static_var".
7817 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7818 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7819 Handle OP_FUNC_STATIC_VAR.
7820 * parse.c (operator_length_standard):
7821 Handle OP_FUNC_STATIC_VAR.
7822
dd5901a6
PA
78232017-09-04 Pedro Alves <palves@redhat.com>
7824
7825 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7826 handling.
7827 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7828 Ditto.
7829 * parse.c (operator_length_standard, operator_check_standard):
7830 Ditto.
7831 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7832
46a4882b
PA
78332017-09-04 Pedro Alves <palves@redhat.com>
7834
7835 * ax-gdb.c: Include "typeprint.h".
7836 (gen_expr_for_cast): New function.
7837 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7838 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7839 type is unknown.
7840 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7841 nodebug_data_symbol.
7842 * eval.c: Include "typeprint.h".
7843 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7844 Error out if symbol has unknown type.
7845 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7846 evaluate_subexp_for_cast.
7847 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7848 OP_VAR_MSYM_VALUE.
7849 (evaluate_subexp_for_cast): New function.
7850 * gdbtypes.c (init_nodebug_var_type): New function.
7851 (objfile_type): Use it to initialize types of variables with no
7852 debug info.
7853 * typeprint.c (error_unknown_type): New.
7854 * typeprint.h (error_unknown_type): New declaration.
7855 * compile/compile-c-types.c (convert_type_basic): Handle
7856 TYPE_CODE_ERROR; warn and fallback to int for variables with
7857 unknown type.
7858
fe13dfec
PA
78592017-09-04 Pedro Alves <palves@redhat.com>
7860
7861 * eval.c (evaluate_var_value): New function, factored out from ...
7862 (evaluate_subexp_standard): ... here.
7863
d008ee21
PA
78642017-09-04 Pedro Alves <palves@redhat.com>
7865
7866 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7867 Remove useless assignments to 'op'.
7868
827d0c51
PA
78692017-09-04 Pedro Alves <palves@redhat.com>
7870
7871 * eval.c (eval_skip_value): New function.
7872 (evaluate_subexp_standard): Use it.
7873
2c5a2be1
PA
78742017-09-04 Pedro Alves <palves@redhat.com>
7875
7876 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7877 function name from symbol/minsym and pass it to
7878 error_call_unknown_return_type.
7879
74ea4be4
PA
78802017-09-04 Pedro Alves <palves@redhat.com>
7881
7882 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7883 * ax-gdb.c (gen_msym_var_ref): New function.
7884 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7885 * eval.c (evaluate_var_msym_value): New function.
7886 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7887 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7888 to call_function_by_hand.
7889 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7890 Handle OP_VAR_MSYM_VALUE.
7891 (union exp_element) <msymbol>: New field.
7892 * minsyms.h (struct type): Forward declare.
7893 (find_minsym_type_and_address): Declare.
7894 * parse.c (write_exp_elt_msym): New function.
7895 (write_exp_msymbol): Delete, refactored as ...
7896 (find_minsym_type_and_address): ... this new function.
7897 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7898 (operator_length_standard, operator_check_standard): Handle
7899 OP_VAR_MSYM_VALUE.
7900 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7901
7022349d
PA
79022017-09-04 Pedro Alves <palves@redhat.com>
7903
7904 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7905 TYPE_GNU_IFUNC specially here. Throw error if return type is
7906 unknown.
7907 * ada-typeprint.c (print_func_type): Handle functions with unknown
7908 return type.
7909 * c-typeprint.c (c_type_print_base): Handle functions and methods
7910 with unknown return type.
7911 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7912 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7913 * compile/compile-c-types.c: Include "objfiles.h".
7914 (convert_func): For functions with unknown return type, warn and
7915 default to int.
7916 * compile/compile-object-run.c (compile_object_run): Adjust call
7917 to call_function_by_hand_dummy.
7918 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7919 call_function_by_hand.
7920 * eval.c (evaluate_subexp_standard): Adjust calls to
7921 call_function_by_hand. Handle functions and methods with unknown
7922 return type. Pass expect_type to call_function_by_hand.
7923 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7924 return type.
7925 * gcore.c (call_target_sbrk): Adjust call to
7926 call_function_by_hand.
7927 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7928 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7929 an integer address type instead of nodebug.
7930 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7931 call_function_by_hand.
7932 * infcall.c (error_call_unknown_return_type): New function.
7933 (call_function_by_hand): New "default_return_type" parameter.
7934 Pass it down.
7935 (call_function_by_hand_dummy): New "default_return_type"
7936 parameter. Use it instead of defaulting to int. If there's no
7937 default and the return type is unknown, throw an error. If
7938 there's a default return type, and the called function has no
7939 debug info, then assume the function is prototyped.
7940 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7941 New "default_return_type" parameter.
7942 (error_call_unknown_return_type): New declaration.
7943 * linux-fork.c (call_lseek): Cast return type of lseek.
7944 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7945 call_function_by_hand.
7946 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7947 calls to call_function_by_hand.
7948 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7949 return type.
7950 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7951 (value_nsstring, print_object_command): Adjust calls to
7952 call_function_by_hand.
7953 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7954 functions with unknown return type.
7955 (pascal_type_print_func_varspec_suffix): New function.
7956 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7957 TYPE_CODE_METHOD>: Use it.
7958 * python/py-value.c (valpy_call): Adjust call to
7959 call_function_by_hand.
7960 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7961 call_function_by_hand.
7962 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7963 call_function_by_hand.
7964 * valops.c (value_allocate_space_in_inferior): Adjust call to
7965 call_function_by_hand.
7966 * typeprint.c (type_print_unknown_return_type): New function.
7967 * typeprint.h (type_print_unknown_return_type): New declaration.
7968
54990598
PA
79692017-09-04 Pedro Alves <palves@redhat.com>
7970
7971 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7972 types with more than one parameter as prototyped.
7973
9a24775b
PA
79742017-09-04 Pedro Alves <palves@redhat.com>
7975
7976 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7977 (disassemble_command): Use gdb_disassembly_flags instead of bare
7978 int.
7979 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7980 (dump_insns, do_mixed_source_and_assembly_deprecated)
7981 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7982 Use gdb_disassembly_flags instead of bare int.
7983 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7984 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7985 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7986 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7987 (enum gdb_disassembly_flag): ... values of this new enumeration.
7988 (gdb_disassembly_flags): Define.
7989 (gdb_disassembly)
7990 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7991 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7992 gdb_disassembly_flags instead of bare int.
7993 * record-btrace.c (btrace_insn_history)
7994 (record_btrace_insn_history, record_btrace_insn_history_range)
7995 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7996 instead of bare int.
7997 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7998 Use gdb_disassembly_flags instead of bare int.
7999 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8000 Define.
8001 * target-delegates.c: Regenerate.
8002 * target.c (target_insn_history, target_insn_history_from)
8003 (target_insn_history_range): Use gdb_disassembly_flags instead of
8004 bare int.
8005 * target.h: Include "disasm.h".
8006 (struct target_ops) <to_insn_history, to_insn_history_from,
8007 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8008 int.
8009 (target_insn_history, target_insn_history_from)
8010 (target_insn_history_range): Use gdb_disassembly_flags instead of
8011 bare int.
8012
80a65e9b
SM
80132017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8014
8015 * cli/cli-script.c (build_command_line): For if/while commands,
8016 check whether args is empty.
8017
6b66338c
SM
80182017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8019
8020 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8021 (enum command_control_type): Likewise.
8022 (struct command_line): Likewise.
8023 (free_command_lines): Likewise.
8024 (struct command_lines_deleter): Likewise.
8025 (command_line_up): Likewise.
8026 (read_command_lines): Likewise.
8027 (read_command_lines_1): Likewise.
8028 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8029 (enum command_control_type): Likewise.
8030 (struct command_line): Likewise.
8031 (free_command_lines): Likewise.
8032 (struct command_lines_deleter): Likewise.
8033 (command_line_up): Likewise.
8034 (read_command_lines): Likewise.
8035 (read_command_lines_1): Likewise.
8036 * breakpoint.h: Include cli/cli-script.h.
8037 * extension-priv.h: Likewise.
8038 * gdbcmd.h: Likewise.
8039
51abb421
PA
80402017-09-04 Pedro Alves <palves@redhat.com>
8041
8042 * ada-lang.c (is_known_support_routine): Move sal declaration to
8043 where it is initialized.
8044 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8045 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8046 (clear_command, update_static_tracepoint): Remove init_sal
8047 references. Move declarations closer to initializations.
8048 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8049 initializations.
8050 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8051 references. Move sal declarations closer to initializations.
8052 * frame.c (find_frame_sal): Return a symtab_and_line via function
8053 return instead of output parameter. Remove init_sal references.
8054 * frame.h (find_frame_sal): Return a symtab_and_line via function
8055 return instead of output parameter.
8056 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8057 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8058 instead of memset.
8059 (gdbscm_find_pc_line): Remove init_sal reference.
8060 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8061 references. Move declarations closer to initializations.
8062 * infcmd.c (set_step_frame): Update. Move declarations closer to
8063 initializations.
8064 (finish_backward): Remove init_sal references. Move declarations
8065 closer to initializations.
8066 * infrun.c (process_event_stop_test, handle_step_into_function)
8067 (insert_hp_step_resume_breakpoint_at_frame)
8068 (insert_step_resume_breakpoint_at_caller): Likewise.
8069 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8070 (symbol_to_sal): Likewise.
8071 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8072 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8073 to its initialization.
8074 * reverse.c (save_bookmark_command): Use new/delete. Remove
8075 init_sal references. Move declarations closer to initializations.
8076 * source.c (get_current_source_symtab_and_line): Remove brace
8077 initialization.
8078 (set_current_source_symtab_and_line): Now takes the sal by const
8079 reference. Remove brace initialization.
8080 (line_info): Remove init_sal reference.
8081 * source.h (set_current_source_symtab_and_line): Now takes a
8082 symtab_and_line via const reference.
8083 * stack.c (set_current_sal_from_frame): Adjust.
8084 (print_frame_info): Adjust.
8085 (get_last_displayed_sal): Return the sal via function return
8086 instead of via output parameter. Simplify.
8087 (frame_info): Adjust.
8088 * stack.h (get_last_displayed_sal): Return the sal via function
8089 return instead of via output parameter.
8090 * symtab.c (init_sal): Delete.
8091 (find_pc_sect_line): Remove init_sal references. Move
8092 declarations closer to initializations.
8093 (find_function_start_sal): Remove init_sal references. Move
8094 declarations closer to initializations.
8095 * symtab.h (struct symtab_and_line): In-class initialize all
8096 fields.
8097 * tracepoint.c (set_traceframe_context)
8098 (print_one_static_tracepoint_marker): Remove init_sal references.
8099 Move declarations closer to initializations.
8100 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8101 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8102 declarations closer to initializations.
8103 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8104 init_sal references. Adjust.
8105
6c5b2ebe
PA
81062017-09-04 Pedro Alves <palves@redhat.com>
8107
8108 * ax-gdb.c (agent_command_1): Use range-for.
8109 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8110 * breakpoint.c: Include "common/array-view.h".
8111 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8112 parameter from struct symtabs_and_lines to
8113 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8114 (breakpoint_sals_to_pc): Change sals parameter from struct
8115 symtabs_and_lines to std::vector reference.
8116 (check_fast_tracepoint_sals): Change sals parameter from struct
8117 symtabs_and_lines to std::array_view. Use range-for.
8118 (decode_static_tracepoint_spec): Return a std::vector instead of
8119 symtabs_and_lines. Update.
8120 (create_breakpoint): Update.
8121 (break_range_command, until_break_command, clear_command): Update.
8122 (base_breakpoint_decode_location, bkpt_decode_location)
8123 (bkpt_probe_create_sals_from_location)
8124 (bkpt_probe_decode_location, tracepoint_decode_location)
8125 (tracepoint_probe_decode_location)
8126 (strace_marker_create_sals_from_location): Return a std::vector
8127 instead of symtabs_and_lines.
8128 (strace_marker_create_breakpoints_sal): Update.
8129 (strace_marker_decode_location): Return a std::vector instead of
8130 symtabs_and_lines. Update.
8131 (update_breakpoint_locations): Change struct symtabs_and_lines
8132 parameters to gdb::array_view. Adjust.
8133 (location_to_sals): Return a std::vector instead of
8134 symtabs_and_lines. Update.
8135 (breakpoint_re_set_default): Use std::vector instead of struct
8136 symtabs_and_lines.
8137 (decode_location_default): Return a std::vector instead of
8138 symtabs_and_lines. Update.
8139 * breakpoint.h: Include "common/array-view.h".
8140 (struct breakpoint_ops) <decode_location>: Now returns a
8141 std::vector instead of returning a symtabs_and_lines via output
8142 parameter.
8143 (update_breakpoint_locations): Change sals parameters to use
8144 gdb::array_view.
8145 * cli/cli-cmds.c (edit_command, list_command): Update to use
8146 std::vector and gdb::array_view.
8147 (ambiguous_line_spec): Adjust to use gdb::array_view and
8148 range-for.
8149 (compare_symtabs): Rename to ...
8150 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8151 const reference and adjust.
8152 (filter_sals): Rewrite using std::vector and standard algorithms.
8153 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8154 (jump_command): Update to use std::vector.
8155 * linespec.c (struct linespec_state) <canonical_names>: Update
8156 comment.
8157 (add_sal_to_sals_basic): Delete.
8158 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8159 (decode_line_2, create_sals_line_offset)
8160 (convert_address_location_to_sals, convert_linespec_to_sals)
8161 (convert_explicit_location_to_sals, parse_linespec)
8162 (event_location_to_sals, decode_line_full, decode_line_1)
8163 (decode_line_with_current_source)
8164 (decode_line_with_last_displayed, decode_objc)
8165 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8166 (linespec_result::~linespec_result): Adjust to use std::vector
8167 instead of symtabs_and_lines.
8168 * linespec.h (linespec_sals::sals): Now a std::vector.
8169 (struct linespec_result): Use std::vector, bool, and in-class
8170 initialization.
8171 (decode_line_1, decode_line_with_current_source)
8172 (decode_line_with_last_displayed): Return std::vector.
8173 * macrocmd.c (info_macros_command): Use std::vector.
8174 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8175 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8176 std::vector.
8177 * probe.h (parse_probes): Return a std::vector.
8178 * python/python.c (gdbpy_decode_line): Use std::vector and
8179 gdb::array_view.
8180 * source.c (select_source_symtab, line_info): Use std::vector.
8181 * stack.c (func_command): Use std::vector.
8182 * symtab.h (struct symtabs_and_lines): Delete.
8183 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8184
7c44b49c
PA
81852017-09-04 Pedro Alves <palves@redhat.com>
8186
8187 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8188 unittests/array-view-selftests.c.
8189 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8190 * common/array-view.h: New file.
8191 * unittests/array-view-selftests.c: New file.
8192
e439fa14
PA
81932017-09-04 Pedro Alves <palves@redhat.com>
8194
8195 * cli/cli-cmds.c (edit_command): Pass message to
8196 ambiguous_line_spec.
8197 (list_command): Pass message to ambiguous_line_spec. Say
8198 "first"/"last" instead of "start" and "end" to be consistent with
8199 the manual.
8200 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8201 them to print formatted message.
8202
7525b645
PA
82032017-09-04 Pedro Alves <palves@redhat.com>
8204
8205 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8206 ftrace_update_insns by reference instead of pointer.
8207
badc0020
YQ
82082017-09-04 Yao Qi <yao.qi@linaro.org>
8209
8210 * i386-go32-tdep.c: Include x86-xstate.h.
8211 (i386_go32_init_abi): Call i386_target_description.
8212 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8213 if xcr0 is X86_XSTATE_X87_MASK.
8214 * i386-tdep.h (tdesc_i386): Remove the declaration.
8215 (tdesc_i386_mmx): Likewise.
8216
d78bdb54
YQ
82172017-09-04 Yao Qi <yao.qi@linaro.org>
8218
8219 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8220 X86_XSTATE_SSE_MASK instead of 0.
8221
ca1fa5ee
YQ
82222017-09-04 Yao Qi <yao.qi@linaro.org>
8223
8224 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8225 i386_target_description.
8226 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8227 i386_target_description.
8228 * i386-tdep.c (i386_gdbarch_init): Likewise.
8229
2434b019
YQ
82302017-09-04 Yao Qi <yao.qi@linaro.org>
8231
8232 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8233 (x86_darwin_init_abi_64): Call amd64_target_description.
8234 * amd64-dicos-tdep.c: Likewise.
8235 * amd64-fbsd-nat.c: Likewise.
8236 * amd64-fbsd-tdep.c: Likewise.
8237 * amd64-nbsd-tdep.c: Likewise.
8238 * amd64-obsd-tdep.c: Likewise.
8239 * amd64-sol2-tdep.c: Likewise.
8240 * amd64-windows-tdep.c: Likewise.
8241 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8242
0860c437
SM
82432017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8244
8245 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8246 (btrace_function) <insn>: Change type to use std::vector.
8247 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8248 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8249 ftrace_update_insns, ftrace_compute_global_level_offset,
8250 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8251 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8252 change to std::vector.
8253 (ftrace_update_insns): Adjust to change to std::vector, change
8254 type of INSN parameter.
8255 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8256 * record-btrace.c (btrace_call_history_insn_range,
8257 btrace_compute_src_line_range,
8258 record_btrace_frame_prev_register): Adjust to change to
8259 std::vector.
8260 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8261 to change to std::vector.
8262
0638b7f9
TT
82632017-09-03 Tom Tromey <tom@tromey.com>
8264
8265 * corefile.c (reopen_exec_file): Use std::string.
8266
8f84fb0e
TT
82672017-09-03 Tom Tromey <tom@tromey.com>
8268
8269 * compile/compile.c (compile_register_name_mangled): Return
8270 std::string.
8271 * compile/compile-loc2c.c (pushf_register_address): Update.
8272 (pushf_register): Update.
8273 * compile/compile-c-types.c (convert_array): Update.
8274 * compile/compile-c-symbols.c (generate_vla_size): Update.
8275 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8276 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8277 (convert_one_symbol): Update.
8278 (generate_c_for_for_one_variable): Update.
8279 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8280 std::string.
8281 (generate_register_struct): Update.
8282 * compile/compile-internal.h (c_get_range_decl_name): Return a
8283 std::string.
8284 (compile_register_name_mangled): Return std::string.
8285
18e9961f
TT
82862017-09-03 Tom Tromey <tom@tromey.com>
8287
8288 * utils.c (perror_string): Return a std::string.
8289 (throw_perror_with_name, perror_warning_with_name): Update.
8290
45343786
TT
82912017-09-03 Tom Tromey <tom@tromey.com>
8292
8293 * demangle.c (demangle_command): Use std::string,
8294 unique_xmalloc_ptr.
8295
b57af503
TT
82962017-09-03 Tom Tromey <tom@tromey.com>
8297
8298 * cli/cli-setshow.c (do_set_command): Use std::string.
8299
6eecf35f
TT
83002017-09-03 Tom Tromey <tom@tromey.com>
8301
8302 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8303
56496dd4
TT
83042017-09-03 Tom Tromey <tom@tromey.com>
8305
8306 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8307
e91a1fa7
TT
83082017-09-03 Tom Tromey <tom@tromey.com>
8309
8310 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8311 gdb::unique_xmalloc_ptr.
8312
7ffd83d7
TT
83132017-09-03 Tom Tromey <tom@tromey.com>
8314
8315 * thread.c (print_thread_info_1): Use string_printf.
8316 (thread_apply_command, thread_apply_all_command): Use
8317 std::string.
8318
1ccbe998
TT
83192017-09-03 Tom Tromey <tom@tromey.com>
8320
8321 * valprint.c (val_print_string): Update.
8322 * gdbcore.h (memory_error_message): Return std::string.
8323 * corefile.c (memory_error_message): Return std::string.
8324 (memory_error): Update.
8325 * breakpoint.c (insert_bp_location): Update.
8326
23fdd69e
SM
83272017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8328
8329 * target/waitstatus.h (target_waitstatus_to_string): Change
8330 return type to std::string.
8331 * target/waitstatus.c (target_waitstatus_to_string): Return
8332 std::string.
8333 * target.h (target_waitstatus_to_string): Remove declaration.
8334 * infrun.c (resume, clear_proceed_status_thread,
8335 print_target_wait_results, do_target_wait, save_waitstatus,
8336 stop_all_threads): Adjust.
8337 * record-btrace.c (record_btrace_wait): Adjust.
8338 * target-debug.h
8339 (target_debug_print_struct_target_waitstatus_p): Adjust.
8340
5c811d30
JK
83412017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8342
8343 PR gdb/22046
8344 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8345 detection.
8346
0a2dde4a
SDJ
83472017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8348
8349 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8350 for setting/unsetting environment variables on the remote target.
8351 (New remote packets): Add entries for QEnvironmentHexEncoded,
8352 QEnvironmentUnset and QEnvironmentReset.
8353 * common/environ.c (gdb_environ::operator=): Extend method to
8354 handle m_user_set_env_list and m_user_unset_env_list.
8355 (gdb_environ::clear): Likewise.
8356 (match_var_in_string): Change type of first parameter from 'char
8357 *' to 'const char *'.
8358 (gdb_environ::set): Extend method to handle
8359 m_user_set_env_list and m_user_unset_env_list.
8360 (gdb_environ::unset): Likewise.
8361 (gdb_environ::clear_user_set_env): New method.
8362 (gdb_environ::user_set_envp): Likewise.
8363 (gdb_environ::user_unset_envp): Likewise.
8364 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8365 m_user_unset_env_list on move constructor/assignment.
8366 (unset): Add new default parameter 'update_unset_list = true'.
8367 (clear_user_set_env): New method.
8368 (user_set_envp): Likewise.
8369 (user_unset_envp): Likewise.
8370 (m_user_set_env_list): New std::set.
8371 (m_user_unset_env_list): Likewise.
8372 * common/rsp-low.c (hex2str): New function.
8373 (bin2hex): New overload for bin2hex function.
8374 * common/rsp-low.c (hex2str): New prototype.
8375 (str2hex): New overload prototype.
8376 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8377 QEnvironmentUnset and QEnvironmentReset.
8378 (remote_protocol_features): Add QEnvironmentHexEncoded,
8379 QEnvironmentUnset and QEnvironmentReset packets.
8380 (send_environment_packet): New function.
8381 (extended_remote_environment_support): Likewise.
8382 (extended_remote_create_inferior): Call
8383 extended_remote_environment_support.
8384 (_initialize_remote): Add QEnvironmentHexEncoded,
8385 QEnvironmentUnset and QEnvironmentReset packet configs.
8386 * unittests/environ-selftests.c (gdb_selftest_env_var):
8387 New variable.
8388 (test_vector_initialization): New function.
8389 (test_init_from_host_environ): Likewise.
8390 (test_reinit_from_host_environ): Likewise.
8391 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8392 Likewise.
8393 (test_unset_set_empty_vector): Likewise.
8394 (test_vector_clear): Likewise.
8395 (test_std_move): Likewise.
8396 (test_move_constructor):
8397 (test_self_move): Likewise.
8398 (test_set_unset_reset): Likewise.
8399 (run_tests): Rewrite in terms of the functions above.
8400
654670a4
WP
84012017-08-31 Weimin Pan <weimin.pan@oracle.com>
8402
8403 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8404 (adi_available): Use a temp variable of type CORE_ADDR as argument
8405 3 when calling target_auxv_search.
8406 (adi_normalize_address): Use masks and xor operators to calculate
8407 normalized address.
8408 (adi_read_versions, adi_write_versions, adi_print_versions)
8409 (do_examine, do_assign): Use paddress.
8410
7755ddb7
JB
84112017-08-29 John Baldwin <jhb@FreeBSD.org>
8412
8413 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8414 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8415 out of loop and add supply of FIR.
8416 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8417 add collect of FIR.
8418
fd437cbc
SM
84192017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8420
3804a343 8421 PR gdb/21827
fd437cbc
SM
8422 * cli/cli-script.c (define_command): Don't convert command name
8423 to lower case.
8424
988f6b3d
JB
84252017-08-25 Joel Brobecker <brobecker@adacore.com>
8426
8427 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8428 Update all callers accordingly. Remove all code blocks handling
8429 the case where DISPP is not NULL.
8430
663c44ac
JK
84312017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8432
8433 PR symtab/22003
8434 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8435 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8436 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8437
f1902523
JK
84382017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8439
8440 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8441 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8442 (read_comp_units_from_section): New parameter abbrev_section, use
8443 read_and_check_comp_unit_head, allocate signatured_type if needed.
8444 (create_all_comp_units): Update read_comp_units_from_section caller.
8445
87215ad1
SDJ
84462017-08-23 Pedro Alves <palves@redhat.com>
8447
8448 PR remote/21852
8449 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8450 to null_ptid and switch to thread without reading the registers
8451 after adding the inferior.
8452
6e41ddec
JK
84532017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8454
8455 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8456 compile-gcc.
8457 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8458 (compile_to_object): Implement compile_gcc.
8459 (_initialize_compile): Install "set compile-gcc". Initialize
8460 compile_gcc.
8461
e68c32d5
JK
84622017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8463
8464 * compile/compile.c (compile_to_object): Conditionally call
8465 set_verbose. Conditionally call compile or compile_v0.
8466
58afddc6
WP
84672017-08-07 Weimin Pan <weimin.pan@oracle.com>
8468
8469 * sparc64-tdep.h: (adi_normalize_address): New export.
8470 * sparc-nat.h: (open_adi_tag_fd): New export.
8471 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8472 * sparc64-linux-tdep.c:
8473 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8474 (sparc64_linux_handle_segmentation_fault): New function.
8475 (sparc64_linux_init_abi): Register
8476 sparc64_linux_handle_segmentation_fault
8477 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8478 (sparc64_addr_bits_remove): New function.
8479 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8480 (MAX_PROC_NAME_SIZE): New macro.
8481 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8482 (sparc64adilist): New variable.
8483 (adi_proc_list): New variable.
8484 (find_adi_info): New function.
8485 (add_adi_info): New function.
8486 (get_adi_info_proc): New function.
8487 (get_adi_info): New function.
8488 (info_adi_command): New function.
8489 (read_maps_entry): New function.
8490 (adi_available): New function.
8491 (adi_normalize_address): New function.
8492 (adi_align_address): New function.
8493 (adi_convert_byte_count): New function.
8494 (adi_tag_fd): New function.
8495 (adi_is_addr_mapped): New function.
8496 (adi_read_versions): New function.
8497 (adi_write_versions): New function.
8498 (adi_print_versions): New function.
8499 (do_examine): New function.
8500 (do_assign): New function.
8501 (adi_examine_command): New function.
8502 (adi_assign_command): New function.
8503 (_initialize_sparc64_adi_tdep): New function.
8504
11db9430
SM
85052017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8506
8507 * breakpoint.c (breakpoints_info): Rename to ...
8508 (info_breakpoints_command): ... this.
8509 (watchpoints_info): Rename to ...
8510 (info_watchpoints_command): ... this.
8511 (tracepoints_info): Rename to ...
8512 (info_tracepoints_command): ... this.
8513 (_initialize_breakpoint): Adjust.
8514 * dcache.c (dcache_info): Rename to ...
8515 (info_display_command): ... this.
8516 (_initialize_dcache): Adjust.
8517 * frame.h (args_info): Rename to ...
8518 (info_args_command): ... this.
8519 (locals_info): Rename to ...
8520 (info_locals_command): ... this.
8521 * infcmd.c (nofp_registers_info): Rename to ...
8522 (info_registers_command): ... this.
8523 (float_info): Rename to ...
8524 (info_float_command): ... this.
8525 (program_info): Rename to ...
8526 (info_program_command): ... this.
8527 (all_registers_info): Rename to ...
8528 (info_all_registers_command): ... this.
8529 (vector_info): Rename to ...
8530 (info_vector_command): ... this.
8531 (float_info): Rename to ...
8532 (info_float_command): ... this.
8533 (_initialize_infcmd): Adjust.
8534 * inferior.h (term_info): Rename to ...
8535 (info_terminal_command): ... this.
8536 * inflow.c (term_info): Rename to ...
8537 (info_terminal_command): ... this.
8538 (_initialize_inflow): Adjust.
8539 * infrun.c (signals_info): Rename to ...
8540 (info_signals_command): ... this.
8541 (_initialize_infrun): Adjust.
8542 * objc-lang.c (classes_info): Rename to ...
8543 (info_classes_command): ... this.
8544 (selectors_info): Rename to ...
8545 (info_selectors_command): ... this.
8546 (_initialize_objc_language): Adjust.
8547 * printcmd.c (sym_info): Rename to ...
8548 (info_symbol_command): ... this.
8549 (address_info): Rename to ...
8550 (info_address_command): ... this.
8551 (display_info): Rename to ...
8552 (info_display_command): ... this.
8553 (_initialize_printcmd): Adjust.
8554 * reverse.c (bookmarks_info): Rename to ...
8555 (info_breakpoints_command): ... this.
8556 (_initialize_reverse): Adjust.
8557 * ser-go32.c (dos_info): Rename to ...
8558 (info_serial_command): ... this.
8559 (_initialize_ser_dos): Adjust.
8560 * skip.c (skip_info): Rename to ...
8561 (info_skip_command): ... this.
8562 (_initialize_step_skip): Adjust.
8563 * source.c (line_info): Rename to ...
8564 (info_line_command): ... this.
8565 (source_info): Rename to ...
8566 (info_source_command)
8567 * stack.c (frame_info): Rename to ...
8568 (info_frame_command): ... this.
8569 (locals_info): Rename to ...
8570 (info_locals_command): ... this.
8571 (args_info): Rename to ...
8572 (info_args_command): ... this.
8573 (_initialize_stack): Adjust.
8574 * symtab.c (sources_info): Rename to ...
8575 (info_sources_command): ... this.
8576 (variables_info): Rename to ...
8577 (info_variables_command): ... this.
8578 (functions_info): Rename to ...
8579 (info_functions_command): ... this.
8580 (types_info): Rename to ...
8581 (info_types_command): ... this.
8582 (_initialize_symtab): Adjust.
8583 * target.c (target_info): Rename to ...
8584 (info_target_command): ... this.
8585 (initialize_targets): Adjust.
8586 * tracepoint.c (tvariables_info): Rename to ...
8587 (info_tvariables_command): ... this.
8588 (scope_info): Rename to ...
8589 (info_scope_command): ... this.
8590 (trace_dump_actions): Adjust.
8591 (_initialize_tracepoint): Adjust.
8592
b270e6f9
TT
85932017-08-22 Tom Tromey <tom@tromey.com>
8594
8595 * breakpoint.h (install_breakpoint): Update.
8596 * breakpoint.c (add_solib_catchpoint): Update.
8597 (install_breakpoint): Change argument to a std::unique_ptr.
8598 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8599 (create_breakpoint_sal, create_breakpoint): Update.
8600 (watch_command_1, catch_exec_command_1)
8601 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8602 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8603 Return the breakpoint.
8604 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8605 (new_single_step_breakpoint): Update.
8606 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8607 std::unique_ptr.
8608 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8609 std::unique_ptr.
8610 * break-catch-sig.c (create_signal_catchpoint): Use
8611 std::unique_ptr.
8612 * ada-lang.c (create_ada_exception_catchpoint): Use
8613 std::unique_ptr.
8614
36bd8eaa
TT
86152017-08-22 Tom Tromey <tom@tromey.com>
8616
8617 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8618
56f37645
TT
86192017-08-22 Tom Tromey <tom@tromey.com>
8620
8621 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8622 (lookup_partial_symbol): Update.
8623
0b581c69
TT
86242017-08-22 Tom Tromey <tom@tromey.com>
8625
8626 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8627 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8628 (find_and_open_source, symtab_to_fullname): Update.
8629 * psymtab.c (psymtab_to_fullname): Update.
8630
14278e1f
TT
86312017-08-22 Tom Tromey <tom@tromey.com>
8632
8633 * exec.c (exec_file_attach): Update.
8634 * linux-thread-db.c (try_thread_db_load): Update.
8635 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8636 * utils.c (gdb_realpath): Change return type.
8637 (gdb_realpath_keepfile): Update.
8638 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8639 (_initialize_utils): Register the new self test.
8640 * source.c (openp): Update.
8641 (find_and_open_source): Update.
8642 * nto-tdep.c (nto_find_and_open_solib): Update.
8643 * main.c (set_gdb_data_directory): Update.
8644 (captured_main_1): Update.
8645 * dwarf2read.c (dwarf2_get_dwz_file): Update
8646 (dw2_map_symbol_filenames): Update.
8647 * auto-load.c (auto_load_safe_path_vec_update): Update.
8648 (filename_is_in_auto_load_safe_path_vec): Change type of
8649 "filename_realp".
8650 (auto_load_objfile_script): Update.
8651 (file_is_auto_load_safe): Update. Use std::string.
8652 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8653
4971c9a7
TT
86542017-08-22 Tom Tromey <tom@tromey.com>
8655
8656 * utils.c (gdb_realpath_keepfile): Return a
8657 gdb::unique_xmalloc_ptr.
8658 * exec.c (exec_file_attach): Update.
8659 * utils.h (gdb_realpath_keepfile): Return a
8660 gdb::unique_xmalloc_ptr.
8661
e3e41d58
TT
86622017-08-22 Tom Tromey <tom@tromey.com>
8663
8664 * compile/compile.c (compile_file_command): Use
8665 gdb::unique_xmalloc_ptr, std::string.
8666 * utils.c (gdb_abspath): Change return type.
8667 * source.c (openp): Update.
8668 * objfiles.c (allocate_objfile): Update.
8669 * main.c (set_gdb_data_directory): Update.
8670 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8671
0d999a6e
ZZ
86722017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8673
8674 * cli-cmds.c (list_commands): List actual code around more than
8675 one location.
8676
329d5e7e
JB
86772017-08-21 John Baldwin <jhb@FreeBSD.org>
8678
8679 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8680
bf223d3e
PA
86812017-08-21 Pedro Alves <palves@redhat.com>
8682
8683 PR gdb/19487
8684 * c-exp.y (variable production): Handle function aliases.
8685 * minsyms.c (msymbol_is_text): New function.
8686 * minsyms.h (msymbol_is_text): Declare.
8687 * symtab.c (find_function_alias_target): New function.
8688 * symtab.h (find_function_alias_target): Declare.
8689
c973d0aa
PA
86902017-08-21 Pedro Alves <palves@redhat.com>
8691
8692 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8693 typedefs.
8694 * typeprint.c (whatis_exp): If handling "whatis", and expression
8695 is OP_TYPE, strip one typedef level. Otherwise don't strip
8696 typedefs here.
8697 * valops.c (value_cast): Save "to" type before resolving
8698 stubs/typedefs. Use that type as resulting value's type.
8699
2989a365
TT
87002017-08-18 Tom Tromey <tom@tromey.com>
8701 Pedro Alves <palves@redhat.com>
8702
8703 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8704 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8705 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8706 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8707 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8708 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8709 (linux_get_siginfo_data): Add "thread" argument. Use
8710 scoped_restore.
8711 * linux-nat.c (linux_child_follow_fork)
8712 (check_stopped_by_watchpoint): Use scoped_restore.
8713 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8714 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8715 (restore_inferior_ptid, save_inferior_ptid): Remove.
8716 * btrace.c (btrace_fetch): Use scoped_restore.
8717 * bsd-uthread.c (bsd_uthread_fetch_registers)
8718 (bsd_uthread_store_registers): Use scoped_restore.
8719 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8720 scoped_restore.
8721 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8722 (aix_thread_xfer_partial): Use scoped_restore.
8723 * inferior.h (save_inferior_ptid): Remove.
8724
e60eb288
YQ
87252017-08-18 Yao Qi <yao.qi@linaro.org>
8726
8727 PR tdep/21818
8728 * arm-tdep.c (gdb_print_insn_arm): Mark
8729 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8730
6d580b63
YQ
87312017-08-18 Yao Qi <yao.qi@linaro.org>
8732
8733 * NEWS: Mention GDBserver's new option "--selftest".
8734 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8735 * selftest.c: Move it to common/selftest.c.
8736 * selftest.h: Move it to common/selftest.h.
8737 * selftest-arch.c (reset): New function.
8738 (tests_with_arch): Call reset.
8739
86dcbf50
YQ
87402017-08-18 Yao Qi <yao.qi@linaro.org>
8741
8742 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8743 instead of exception_fprintf and printf_filtered.
8744
7649770c
YQ
87452017-08-18 Yao Qi <yao.qi@linaro.org>
8746
8747 * selftest.c (register_self_test): Rename it to
8748 selftests::register_test.
8749 (run_self_tests): selftest::run_tests.
8750 * selftest.h: Update declarations.
8751 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8752 selftests::register_test_foreach_arch.
8753 * selftest-arch.h: Update declaration.
8754 * aarch64-tdep.c: Update.
8755 * arm-tdep.c: Likewise.
8756 * disasm-selftests.c: Likewise.
8757 * dwarf2loc.c: Likewise.
8758 * dwarf2-frame.c: Likewise.
8759 * findvar.c: Likewise.
8760 * gdbarch-selftests.c: Likewise.
8761 * maint.c (maintenance_selftest): Likewise.
8762 * regcache.c: Likewise.
8763 * rust-exp.y: Likewise.
8764 * selftest-arch.c: Likewise.
8765 * unittests/environ-selftests.c: Likewise.
8766 * unittests/function-view-selftests.c: Likewise.
8767 * unittests/offset-type-selftests.c: Likewise.
8768 * unittests/optional-selftests.c: Likewise.
8769 * unittests/scoped_restore-selftests.c: Likewise.
8770 * utils-selftests.c: Likewise.
8771
b0cba12e
PA
87722017-08-17 Pedro Alves <palves@redhat.com>
8773
8774 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8775 local.
8776
4c8aa72d
PA
87772017-08-17 Pedro Alves <palves@redhat.com>
8778
8779 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8780 field.
8781 (reset_die_in_process): Delete, replaced by ...
8782 (process_die_scope): ... this new class. Make it responsible for
8783 freeing cu->line_header too.
8784 (process_die): Use process_die_scope.
8785 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8786 cu->line_header_die_owner. Don't release the line header if it's
8787 owned by the CU.
8788 (setup_type_unit_groups): Make the CU/DIE own the line header.
8789 Don't release the line header here.
8790
ba713918
AL
87912017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8792
8793 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8794
44d0fb3a
RK
87952017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8796
8797 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8798 Single-Key mode
8799
a5afdb16
RK
88002017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8801
8802 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8803 mode command list.
8804
47613aeb
SH
88052017-08-15 Stafford Horne <shorne@gmail.com>
8806
8807 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8808
9c3cc999
SH
88092017-08-15 Stafford Horne <shorne@gmail.com>
8810
8811 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8812
206726fb
SDJ
88132017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8814
8815 PR gdb/21954
8816 * infcmd.c (unset_environment_command): Use the 'clear' method on
8817 the environment instead of resetting it.
8818
0335ac6d
JB
88192017-08-15 John Baldwin <jhb@FreeBSD.org>
8820
8821 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8822 platforms.
8823
d3abe1c8
TT
88242017-08-14 Tom Tromey <tom@tromey.com>
8825
8826 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8827 (print_binary_chars): Likewise.
8828 (BITS_IN_BYTES): Remove.
8829
d6382fff
TT
88302017-08-14 Tom Tromey <tom@tromey.com>
8831
8832 PR gdb/21675
8833 * valprint.c (LOW_ZERO): Change value to 034.
8834 (print_octal_chars): Add static_asserts for octal constants.
8835 * printcmd.c (print_scalar_formatted): Add 'd' case.
8836
f978cb06
TT
88372017-08-11 Tom Tromey <tom@tromey.com>
8838
8839 * symfile.c (add_symbol_file_command): Use std::vector.
8840
2f5404b3
TT
88412017-08-14 Tom Tromey <tom@tromey.com>
8842
8843 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8844 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8845 std::move.
8846 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8847
de7985c3
PA
88482017-08-11 Pedro Alves <palves@redhat.com>
8849
8850 * infrun.c (process_event_stop_test): Adjust
8851 function_name_is_marked_for_skip call.
8852 * skip.c: Include <list>.
8853 (skiplist_entry): Make it a class with private fields, and
8854 getters/setters.
8855 (skiplist_entry_chain): Delete.
8856 (skiplist_entries): New.
8857 (skiplist_entry_count): Delete.
8858 (highest_skiplist_entry_num): New.
8859 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8860 (add_skiplist_entry): Delete.
8861 (skiplist_entry::skiplist_entry): New.
8862 (skiplist_entry::add_entry): New.
8863 (skip_file_command, skip_function): Adjust.
8864 (compile_skip_regexp): Delete.
8865 (skip_command): Don't compile regexp here. Adjust to use
8866 skiplist_entry::add_entry.
8867 (skip_info): Adjust to use range-for and getters.
8868 (skip_enable_command, skip_disable_command): Adjust to use
8869 range-for and setters.
8870 (skip_delete_command): Adjust to use std::list.
8871 (add_skiplist_entry): Delete.
8872 (skip_file_p): Delete, refactored as ...
8873 (skiplist_entry::do_skip_file_p): ... this new method.
8874 (skip_gfile_p): Delete, refactored as ...
8875 (skiplist_entry::do_gskip_file_p): ... this new method.
8876 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8877 (skiplist_entry::skip_function_p): ... this new method.
8878 (function_name_is_marked_for_skip): Now returns bool, and takes
8879 the function sal by const reference. Adjust to use range-for and
8880 skiplist_entry methods.
8881 (_initialize_step_skip): Remove references to
8882 skiplist_entry_chain, skiplist_entry_count.
8883 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8884 takes the function sal by const reference.
8885
be7d3cd5
YQ
88862017-08-11 Yao Qi <yao.qi@linaro.org>
8887
8888 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8889 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8890 (dwarf2_frame_cache):
8891 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8892 RETURN_MASK_ALL and set *this_case to NULL.
8893 * frame-unwind.h: Update comments.
8894
1c90d9f0
YQ
88952017-08-11 Yao Qi <yao.qi@linaro.org>
8896
8897 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8898 (dwarf2_frame_state_copy_regs): Remove.
8899 (dwarf2_frame_state_free_regs): Remove.
8900 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8901 (dwarf2_restore_rule): Call method .alloc_regs instead of
8902 dwarf2_frame_state_alloc_regs.
8903 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8904 constructor. Call std::move.
8905 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8906 (dwarf2_frame_cache): Likewise.
8907
8908 [GDB_SELF_TEST]: Include selftest.h and
8909 selftest-arch.h.
8910 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8911 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8912 execute_cfa_program_test.
8913
8914 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8915 copy ctor, assignment operator, move assignment.
8916 <alloc_regs>: New method.
8917 <swap>: New method.
8918 (struct dwarf2_frame_state): Delete dtor.
8919 (dwarf2_frame_state_alloc_regs): Remove declaration.
8920 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8921 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8922
afe37d6b
YQ
89232017-08-11 Yao Qi <yao.qi@linaro.org>
8924
8925 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8926 (dwarf2_frame_state::dwarf2_frame_state): New.
8927 (dwarf2_frame_state::~dwarf2_frame_state): New.
8928 (dwarf2_fetch_cfa_info): Update.
8929 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8930 rather than a pointer. Update code.
8931 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8932 dtor.
8933 <data_align, code_align, retaddr_column>: Change them to const.
8934 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8935 to bool.
8936
b348037f
YQ
89372017-08-11 Yao Qi <yao.qi@linaro.org>
8938
8939 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8940 <loc.exp>: New field.
8941 * dwarf2-frame.c (execute_cfa_program): Update.
8942 (dwarf2_frame_prev_register): Update.
8943
e7c9de26
PA
89442017-08-10 Pedro Alves <palves@redhat.com>
8945
8946 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8947
e8c6b620
JB
89482017-08-09 John Baldwin <jhb@FreeBSD.org>
8949
8950 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8951 (fbsd_pending_children): Use std::list.
8952 (fbsd_remember_child): Likewise.
8953 (fbsd_is_child_pending): Likewise.
8954 (fbsd_pending_vfork_done): Use std::forward_list.
8955 (fbsd_add_vfork_done): Likewise.
8956 (fbsd_is_vfork_done_pending): Likewise.
8957 (fbsd_next_vfork_done): Likewise.
8958
e4a26669
JB
89592017-08-09 John Baldwin <jhb@FreeBSD.org>
8960
8961 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8962 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8963 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8964 for `mapfilename'.
8965 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8966 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8967
142311d3
JB
89682017-08-09 John Baldwin <jhb@FreeBSD.org>
8969
8970 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8971 "filestuff.h".
8972 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8973
42fa2e0e
TT
89742017-08-09 Tom Tromey <tom@tromey.com>
8975
8976 * skip.c (skiplist_entry): New constructor.
8977 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8978 (skiplist_entry::file_is_glob): Now bool.
8979 (skiplist_entry::file, skiplist_entry::function): Now
8980 std::string.
8981 (make_skip_entry): Return a unique_ptr. Use new.
8982 (free_skiplist_entry, free_skiplist_entry_cleanup)
8983 (make_free_skiplist_entry_cleanup): Remove.
8984 (skip_command, skip_disable_command, add_skiplist_entry)
8985 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8986 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8987 (function_name_is_marked_for_skip): Update.
8988 (skip_delete_command): Update. Use delete.
8989
cd3af38d
JW
89902017-08-09 Jiong Wang <jiong.wang@arm.com>
8991
8992 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8993 (aarch64_linux_core_read_description): New function.
8994 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8995
29592bde
PA
89962017-08-09 Pedro Alves <palves@redhat.com>
8997
8998 * cp-name-parser.y (cp_comp_to_string): Return a
8999 gdb::unique_xmalloc_ptr<char>.
9000 * cp-support.c (replace_typedefs_qualified_name)
9001 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9002 (cp_canonicalize_string_full): Use op= instead of explicit
9003 convertion.
9004 (cp_class_name_from_physname, method_name_from_physname)
9005 (cp_func_name, cp_remove_params): Adjust to use
9006 gdb::unique_xmalloc_ptr<char>.
9007 * cp-support.h (cp_comp_to_string): Return a
9008 gdb::unique_xmalloc_ptr<char>.
9009 * python/py-type.c (typy_lookup_type): Adjust to use
9010 gdb::unique_xmalloc_ptr<char>.
9011
b3340438
L
90122017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9013
9014 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9015
e88e8651
YQ
90162017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9017 Yao Qi <yao.qi@linaro.org>
9018
9019 * cp-support.c (cp_canonicalize_string_full): Use
9020 gdb::unique_xmalloc_ptr<char>.
9021 (cp_canonicalize_string): Likewise.
9022
f5a29eb0
YQ
90232017-08-09 Yao Qi <yao.qi@linaro.org>
9024
9025 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9026 * regformats/i386/amd64-avx-avx512.dat: Remove.
9027 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9028 * regformats/i386/amd64-avx-mpx.dat:Remove.
9029 * regformats/i386/amd64-avx.dat: Remove.
9030 * regformats/i386/amd64-mpx.dat: Remove.
9031 * regformats/i386/i386-avx-avx512.dat: Remove.
9032 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9033 * regformats/i386/i386-avx-mpx.dat: Remove.
9034 * regformats/i386/i386-mmx.dat: Remove.
9035 * regformats/i386/i386-mpx.dat: Remove.
9036
57757c2f
YQ
90372017-08-09 Yao Qi <yao.qi@linaro.org>
9038
9039 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9040 * amd64-tdep.c: Don't include features/i386/x32*.c.
9041 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9042 functions.
9043 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9044 and i386/x32-avx-avx512.
9045 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9046 and i386/x32.xml.
9047 * features/i386/x32-avx-avx512.c: Removed.
9048 * features/i386/x32-avx-avx512.xml: Removed.
9049 * features/i386/x32-avx.c: Removed.
9050 * features/i386/x32-avx.xml: Removed.
9051 * features/i386/x32.c: Removed.
9052 * features/i386/x32.xml: Removed.
9053 * regformats/i386/x32-avx-avx512.dat: Removed.
9054 * regformats/i386/x32-avx.dat: Removed.
9055 * regformats/i386/x32.dat: Removed.
9056
ba7b109b
MR
90572017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9058
9059 PR breakpoints/21886
9060 * mem-break.c (default_memory_insert_breakpoint): Use
9061 `->placed_address' rather than `->reqstd_address' for the
9062 breakpoint location.
9063
e347efc3
MR
90642017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9065
9066 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9067 assertions.
9068
0dba2a6c
MR
90692017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9070
9071 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9072 a union of `tdep_info', `tdesc_data' and `id'.
9073 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9074 rather than `info.tdep_info'.
9075 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9076 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9077 * i386-tdep.c (i386_gdbarch_init): Likewise.
9078 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9079 * mips-tdep.c (mips_gdbarch_init): Likewise.
9080 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9081 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9082 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9083 `info.tdep_info'.
9084 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9085 `info.tdep_info'.
9086 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9087 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9088 `info.tdep_info'.
9089 * spu-tdep.c (spu_gdbarch_init): Likewise.
9090 * gdbarch.h: Regenerate.
9091
16eb6b2d
LS
90922017-08-07 Leszek Swirski <leszeks@google.com>
9093
7b005726 9094 PR symtab/20899
16eb6b2d
LS
9095 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9096
74cbb09e
SM
90972017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9098
9099 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9100 (gdbsim_open): Rename gdb_argv args object to argv.
9101
ee0c3293
TT
91022017-08-05 Tom Tromey <tom@tromey.com>
9103
9104 * compile/compile-object-load.c (compile_object_load): Use
9105 gdb::unique_xmalloc_ptr.
9106 * cli/cli-dump.c (scan_filename): Rename from
9107 scan_filename_with_cleanup. Change return type.
9108 (scan_expression): Rename from scan_expression_with_cleanup.
9109 Change return type.
9110 (dump_memory_to_file, dump_value_to_file, restore_command):
9111 Use gdb::unique_xmalloc_ptr. Update.
9112 * cli/cli-cmds.c (find_and_open_script): Use
9113 gdb::unique_xmalloc_ptr.
9114 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9115 * symmisc.c (maintenance_print_symbols)
9116 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9117 * symfile.c (symfile_bfd_open, generic_load)
9118 (add_symbol_file_command, remove_symbol_file_command): Use
9119 gdb::unique_xmalloc_ptr.
9120 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9121 * psymtab.c (maintenance_print_psymbols): Use
9122 gdb::unique_xmalloc_ptr.
9123 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9124 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9125 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9126 (reload_shared_libraries_1): Likewise.
9127
3232fabd
TT
91282017-08-05 Tom Tromey <tom@tromey.com>
9129
9130 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9131 (rust_op_vector, rust_set_vector): New typedefs.
9132 (current_parser): New global.
9133 (work_obstack): Change to pointer type. Update all users.
9134 (rust_ast, pstate): Remove globals.
9135 (struct rust_parser): New.
9136 (%union) <params, field_inits>: Change type.
9137 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9138 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9139 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9140 (convert_params_to_types, convert_params_to_expression): Change
9141 type of "params".
9142 (ast_string): Change type of "fields".
9143 (rust_parse): Make a rust_parser. Remove cleanups.
9144 (rust_lex_tests): Make and install an auto_obstack.
9145
f02fd774
YQ
91462017-08-04 Yao Qi <yao.qi@linaro.org>
9147
9148 * configure.srv (ipa_x32_linux_regobj): New.
9149 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9150 instead of X86_TDESC_AVX512.
9151 (initialize_low_tracepoint): Call
9152 init_registers_x32_avx_avx512_linux.
9153
91975afd
YQ
91542017-08-04 Yao Qi <yao.qi@linaro.org>
9155
9156 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9157
2331fa3a
RK
91582017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9159
9160 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9161
744e4fe1
TT
91622017-08-03 Tom Tromey <tom@tromey.com>
9163
9164 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9165 Remove.
9166 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9167
1c034b67
TT
91682017-08-03 Tom Tromey <tom@tromey.com>
9169
9170 * python/py-param.c (compute_enum_values): Use gdb_argv.
9171
773a1edc
TT
91722017-08-03 Tom Tromey <tom@tromey.com>
9173
9174 * utils.h (struct gdb_argv_deleter): New.
9175 (gdb_argv): New class.
9176 * utils.c (gdb_argv::reset): New method.
9177 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9178 * tracefile.c (tsave_command): Use gdb_argv.
9179 * top.c (new_ui_command): Use gdb_argv.
9180 * symmisc.c (maintenance_print_symbols)
9181 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9182 * symfile.c (symbol_file_command, generic_load)
9183 (remove_symbol_file_command): Use gdb_argv.
9184 * stack.c (backtrace_command): Use gdb_argv.
9185 * source.c (add_path, show_substitute_path_command)
9186 (unset_substitute_path_command, set_substitute_path_command):
9187 Use gdb_argv.
9188 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9189 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9190 * remote.c (extended_remote_run, remote_put_command)
9191 (remote_get_command, remote_delete_command): Use gdb_argv.
9192 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9193 (gdbsim_open): Use gdb_argv.
9194 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9195 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9196 * procfs.c (procfs_info_proc): Use gdb_argv.
9197 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9198 * infrun.c (handle_command): Use gdb_argv.
9199 * inferior.c (add_inferior_command, clone_inferior_command):
9200 Use gdb_argv.
9201 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9202 * exec.c (exec_file_command): Use gdb_argv.
9203 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9204 * compile/compile.c (build_argc_argv): Use gdb_argv.
9205
0d50bde3
TT
92062017-08-03 Tom Tromey <tom@tromey.com>
9207
9208 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9209
7f968c89
TT
92102017-08-03 Tom Tromey <tom@tromey.com>
9211
9212 * python/python.c (compute_python_string): Return std::string.
9213 (gdbpy_eval_from_control_command): Update.
9214 (do_start_initialization): Use std::string.
9215 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9216 xstrprintf.
9217 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9218 xstrprintf.
9219
3c9ebddd
TT
92202017-08-03 Tom Tromey <tom@tromey.com>
9221
9222 * top.h (do_restore_instream_cleanup): Remove.
9223 * top.c (do_restore_instream_cleanup): Remove.
9224 (read_command_file): Use scoped_restore.
9225 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9226
b51b225e
TT
92272017-08-03 Tom Tromey <tom@tromey.com>
9228
9229 * cli/cli-script.c (execute_user_command)
9230 (execute_control_command): Use scoped_restore.
9231
ac991630
TT
92322017-08-03 Tom Tromey <tom@tromey.com>
9233
9234 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9235 (execute_user_command): Remove user_call_depth; use
9236 user_args_stack's size instead.
9237
898e0c8e
TT
92382017-08-03 Tom Tromey <tom@tromey.com>
9239
9240 * top.h (in_user_command): Remove.
9241 * top.c (in_user_command): Remove.
9242 * cli/cli-script.c (do_restore_user_call_depth)
9243 (execute_user_command): Update.
9244
26fcd5d7
TT
92452017-08-03 Tom Tromey <tom@tromey.com>
9246
9247 * valops.c (search_struct_method): Use gdb::byte_vector.
9248 * valarith.c (value_concat): Use std::vector.
9249 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9250 (simple_search_memory): Likewise.
9251 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9252 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9253 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9254 * elfread.c (elf_rel_plt_read): Use std::string.
9255 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9256 * cli/cli-dump.c (restore_section_callback): Use
9257 gdb::byte_vector.
9258
7c218e6c
TT
92592017-08-03 Tom Tromey <tom@tromey.com>
9260
9261 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9262
31b68d4a
TT
92632017-08-03 Tom Tromey <tom@tromey.com>
9264
9265 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9266 (tui_register_format): Use scoped_restore.
9267
2ec845e7
TT
92682017-08-03 Tom Tromey <tom@tromey.com>
9269
9270 * reverse.c (exec_direction_default): Remove.
9271 (exec_reverse_once): Use scoped_restore.
9272 * remote.c (restore_remote_timeout): Remove.
9273 (remote_flash_erase, remote_flash_write, remote_flash_done)
9274 (readchar, remote_serial_write): Use scoped_restore.
9275 * cli/cli-script.c (struct source_cleanup_lines_args)
9276 (source_cleanup_lines): Remove.
9277 (script_from_file): Use scoped_restore.
9278 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9279 (source_command): Use scoped_restore.
9280
b3bc8453
TT
92812017-08-03 Tom Tromey <tom@tromey.com>
9282
9283 * utils.h (make_cleanup_free_so): Remove.
9284 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9285 * solist.h (struct so_deleter): New.
9286 (so_list_up): New typedef.
9287 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9288
e3ad2841
TT
92892017-08-03 Tom Tromey <tom@tromey.com>
9290
9291 * utils.h (make_cleanup_restore_current_language): Remove.
9292 * utils.c (do_restore_current_language)
9293 (make_cleanup_restore_current_language): Remove.
9294 * parse.c (parse_exp_in_context_1)
9295 (parse_expression_with_language): Use
9296 scoped_restore_current_language.
9297 * mi/mi-main.c (mi_cmd_execute): Use
9298 scoped_restore_current_language.
9299 * language.h (scoped_restore_current_language): New class.
9300
b80cf838
TT
93012017-08-03 Tom Tromey <tom@tromey.com>
9302
9303 * compile/compile.c (cleanup_unlink_file): Remove.
9304 (compile_to_object): Use gdb::unlinker.
9305 (eval_compile_command): Likewise.
9306
fad0444a
TT
93072017-08-03 Tom Tromey <tom@tromey.com>
9308
9309 * utils.h (make_cleanup_fclose): Remove.
9310 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9311
6e7bc05c
TT
93122017-08-03 Tom Tromey <tom@tromey.com>
9313
9314 * top.c (open_terminal_stream): Return gdb_file_up.
9315 (new_ui_command): Update.
9316
4a45905b
TT
93172017-08-03 Tom Tromey <tom@tromey.com>
9318
9319 * source.c (print_source_lines_base, forward_search_command)
9320 (reverse_search_command): Use gdb_file_up.
9321
7cd06d6e
TT
93222017-08-03 Tom Tromey <tom@tromey.com>
9323
9324 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9325
ed166945
TT
93262017-08-03 Tom Tromey <tom@tromey.com>
9327
9328 * cli/cli-cmds.c (find_and_open_script): Change return type.
9329 Remove "streamp" and "full_path" parameters.
9330 (source_script_with_search): Update.
9331 * auto-load.c (source_script_file): Update.
9332 * cli/cli-cmds.h (find_and_open_script): Change type.
9333 (open_script): New struct.
9334
d419f42d
TT
93352017-08-03 Tom Tromey <tom@tromey.com>
9336
9337 * xml-support.c (xml_fetch_content_from_file): Update.
9338 * ui-file.c (stdio_file::open): Update.
9339 * tracefile-tfile.c (tfile_start): Update.
9340 * remote.c (remote_file_put, remote_file_get): Update.
9341 * nat/linux-procfs.c (linux_proc_get_int)
9342 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9343 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9344 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9345 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9346 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9347 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9348 * linux-nat.c (linux_proc_pending_signals): Update.
9349 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9350 (file_closer): Remove.
9351 * compile/compile.c (compile_to_object): Update.
9352 * common/filestuff.h (struct gdb_file_deleter): New.
9353 (gdb_file_up): New typedef.
9354 (gdb_fopen_cloexec): Change return type.
9355 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9356 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9357 (dump_binary_file, restore_binary_file): Update.
9358 * auto-load.c (auto_load_objfile_script_1): Update.
9359
4a2b031d
TT
93602017-08-03 Tom Tromey <tom@tromey.com>
9361
9362 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9363 (info_static_tracepoint_markers_command): Likewise.
9364 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9365 * skip.c (skip_info): Use ui_out_emit_table.
9366 * progspace.c (print_program_space): Use ui_out_emit_table.
9367 * osdata.c (info_osdata): Use ui_out_emit_table.
9368 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9369 ui_out_emit_table.
9370 * linux-thread-db.c (info_auto_load_libthread_db): Use
9371 ui_out_emit_table.
9372 * inferior.c (print_inferior): Use ui_out_emit_table.
9373 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9374 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9375 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9376 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9377 * ui-out.h (class ui_out_emit_table): New.
9378
a4f320fd
MR
93792017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9380
9381 * mips-tdep.c (mips_fpu_type_str): New function.
9382 (mips_dump_tdep): Call it.
9383
a2f1f308
MR
93842017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9385
9386 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9387 `->mips_fpu_type'.
9388
7e5ed83b
XR
93892017-07-31 Xavier Roirand <roirand@adacore.com>
9390
9391 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9392
4c9dc811
XR
93932017-07-27 Xavier Roirand <roirand@adacore.com>
9394
9395 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9396
27d41eac
YQ
93972017-07-26 Yao Qi <yao.qi@linaro.org>
9398
9399 * cli/cli-cmds.c (maintenancechecklist): New variable.
9400 * gdbcmd.h (maintenancechecklist): Declare it.
9401 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9402 Call i386_linux_read_description with different masks.
9403 * maint.c (maintenance_check_command): New function.
9404 (_initialize_maint_cmds): Call add_prefix_cmd.
9405 * target-descriptions.c (tdesc_reg): override operator != and ==.
9406 (tdesc_type): Likewise.
9407 (tdesc_feature): Likewise.
9408 (target_desc): Likewise.
9409 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9410 (maintenance_check_xml_descriptions): New function.
9411 (_initialize_target_descriptions) Add command "xml-descriptions".
9412 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9413
ea03d0d3
YQ
94142017-07-26 Yao Qi <yao.qi@linaro.org>
9415
9416 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9417 Include features/i386/32bit-*.c.
9418 (i386_linux_read_description): Generate target description if it
9419 doesn't exist.
9420 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9421 functions.
9422 * features/i386/32bit-linux.c: Re-generated.
9423 * features/i386/32bit-sse.c: Likewise.
9424 * target-descriptions.c (print_c_feature::visit): Print code to
9425 set register number if needed.
9426 (print_c_feature) <m_next_regnum>: New field.
9427
25aa13e5
YQ
94282017-07-26 Yao Qi <yao.qi@linaro.org>
9429
9430 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9431 (FEATURE_XMLFILES): New.
9432 (FEATURE_CFILES): New.
9433 New rules.
9434 (clean-cfiles): Remove generated c files.
9435 * features/i386/32bit-avx.c: Generated.
9436 * features/i386/32bit-avx512.c: Generated.
9437 * features/i386/32bit-core.c: Generated.
9438 * features/i386/32bit-linux.c: Generated.
9439 * features/i386/32bit-mpx.c: Generated.
9440 * features/i386/32bit-pkeys.c: Generated.
9441 * features/i386/32bit-sse.c: Generated.
9442 * target-descriptions.c: Include algorithm.
9443 (tdesc_element_visitor): Add method visit_end.
9444 (print_c_tdesc): Implement visit_end.
9445 (print_c_tdesc:: m_filename_after_features): Move it to
9446 protected.
9447 (print_c_feature): New class.
9448 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9449 name starts with "i386/32bit-".
9450
6eb1e6a8
YQ
94512017-07-26 Yao Qi <yao.qi@linaro.org>
9452
9453 * target-descriptions.c (tdesc_element_visitor): New class.
9454 (tdesc_element): New class.
9455 (tdesc_reg): Inherit from tdesc_element.
9456 (tdesc_reg::accept): New function.
9457 (tdesc_type): Inherit from tdesc_element.
9458 (tdesc_type::accept): New function.
9459 (tdesc_feature): Inherit from tdesc_element.
9460 (tdesc_feature::accept): New function.
9461 (target_desc): Inherit from tdesc_element.
9462 (target_desc::target_desc): New.
9463 (target_desc::~target_desc): New.
9464 (target_desc::accept): New.
9465 (allocate_target_description): Use new.
9466 (free_target_description): Use delete.
9467 (print_c_tdesc): New class.
9468 (maint_print_c_tdesc_cmd): Adjust.
9469
9470 * features/aarch64.c: Re-generated.
9471 * features/arc-arcompact.c: Re-generated.
9472 * features/arc-v2.c: Re-generated.
9473 * features/arm/arm-with-iwmmxt.c: Re-generated.
9474 * features/arm/arm-with-m.c: Re-generated.
9475 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9476 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9477 * features/arm/arm-with-neon.c: Re-generated.
9478 * features/arm/arm-with-vfpv2.c: Re-generated.
9479 * features/arm/arm-with-vfpv3.c: Re-generated.
9480 * features/i386/amd64-avx-avx512.c: Re-generated.
9481 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9482 * features/i386/amd64-avx.c: Re-generated.
9483 * features/i386/amd64-avx-linux.c: Re-generated.
9484 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9485 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9486 * features/i386/amd64-avx-mpx.c: Re-generated.
9487 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9488 * features/i386/amd64.c: Re-generated.
9489 * features/i386/amd64-linux.c: Re-generated.
9490 * features/i386/amd64-mpx.c: Re-generated.
9491 * features/i386/amd64-mpx-linux.c: Re-generated.
9492 * features/i386/i386-avx-avx512.c: Re-generated.
9493 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9494 * features/i386/i386-avx.c: Re-generated.
9495 * features/i386/i386-avx-linux.c: Re-generated.
9496 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9497 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9498 * features/i386/i386-avx-mpx.c: Re-generated.
9499 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9500 * features/i386/i386.c: Re-generated.
9501 * features/i386/i386-linux.c: Re-generated.
9502 * features/i386/i386-mmx.c: Re-generated.
9503 * features/i386/i386-mmx-linux.c: Re-generated.
9504 * features/i386/i386-mpx.c: Re-generated.
9505 * features/i386/i386-mpx-linux.c: Re-generated.
9506 * features/i386/x32-avx-avx512.c: Re-generated.
9507 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9508 * features/i386/x32-avx.c: Re-generated.
9509 * features/i386/x32-avx-linux.c: Re-generated.
9510 * features/i386/x32.c: Re-generated.
9511 * features/i386/x32-linux.c: Re-generated.
9512 * features/microblaze.c: Re-generated.
9513 * features/microblaze-with-stack-protect.c: Re-generated.
9514 * features/mips64-dsp-linux.c: Re-generated.
9515 * features/mips64-linux.c: Re-generated.
9516 * features/mips-dsp-linux.c: Re-generated.
9517 * features/mips-linux.c: Re-generated.
9518 * features/nds32.c: Re-generated.
9519 * features/nios2.c: Re-generated.
9520 * features/nios2-linux.c: Re-generated.
9521 * features/rs6000/powerpc-32.c: Re-generated.
9522 * features/rs6000/powerpc-32l.c: Re-generated.
9523 * features/rs6000/powerpc-403.c: Re-generated.
9524 * features/rs6000/powerpc-403gc.c : Re-generated.
9525 * features/rs6000/powerpc-405.c: Re-generated.
9526 * features/rs6000/powerpc-505.c: Re-generated.
9527 * features/rs6000/powerpc-601.c: Re-generated.
9528 * features/rs6000/powerpc-602.c: Re-generated.
9529 * features/rs6000/powerpc-603.c: Re-generated.
9530 * features/rs6000/powerpc-604.c: Re-generated.
9531 * features/rs6000/powerpc-64.c: Re-generated.
9532 * features/rs6000/powerpc-64l.c: Re-generated.
9533 * features/rs6000/powerpc-7400.c: Re-generated.
9534 * features/rs6000/powerpc-750.c: Re-generated.
9535 * features/rs6000/powerpc-860.c: Re-generated.
9536 * features/rs6000/powerpc-altivec32.c: Re-generated.
9537 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9538 * features/rs6000/powerpc-altivec64.c: Re-generated.
9539 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9540 * features/rs6000/powerpc-cell32l.c: Re-generated.
9541 * features/rs6000/powerpc-cell64l.c: Re-generated.
9542 * features/rs6000/powerpc-e500.c: Re-generated.
9543 * features/rs6000/powerpc-e500l.c: Re-generated.
9544 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9545 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9546 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9547 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9548 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9549 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9550 * features/rs6000/powerpc-vsx32.c: Re-generated.
9551 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9552 * features/rs6000/powerpc-vsx64.c: Re-generated.
9553 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9554 * features/rs6000/rs6000.c: Re-generated.
9555 * features/s390-linux32.c: Re-generated.
9556 * features/s390-linux32v1.c: Re-generated.
9557 * features/s390-linux32v2.c: Re-generated.
9558 * features/s390-linux64.c: Re-generated.
9559 * features/s390-linux64v1.c: Re-generated.
9560 * features/s390-linux64v2.c: Re-generated.
9561 * features/s390-te-linux64.c: Re-generated.
9562 * features/s390-tevx-linux64.c: Re-generated.
9563 * features/s390-vx-linux64.c: Re-generated.
9564 * features/s390x-linux64.c: Re-generated.
9565 * features/s390x-linux64v1.c: Re-generated.
9566 * features/s390x-linux64v2.c: Re-generated.
9567 * features/s390x-te-linux64.c: Re-generated.
9568 * features/s390x-tevx-linux64.c: Re-generated.
9569 * features/s390x-vx-linux64.c: Re-generated.
9570 * features/sparc/sparc32-solaris.c: Re-generated.
9571 * features/sparc/sparc64-solaris.c: Re-generated.
9572 * features/tic6x-c62x.c: Re-generated.
9573 * features/tic6x-c62x-linux.c: Re-generated.
9574 * features/tic6x-c64x.c: Re-generated.
9575 * features/tic6x-c64x-linux.c: Re-generated.
9576 * features/tic6x-c64xp.c: Re-generated.
9577 * features/tic6x-c64xp-linux.c: Re-generated.
9578
35b4818d
YQ
95792017-07-26 Yao Qi <yao.qi@linaro.org>
9580
9581 * i386-linux-tdep.c (i386_linux_read_description): New function.
9582 (i386_linux_core_read_description): Call
9583 i386_linux_read_description.
9584 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9585 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9586 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9587 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9588 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9589 * x86-linux-nat.c (x86_linux_read_description): Call
9590 i386_linux_read_description.
9591
8e2141c6
YQ
95922017-07-26 Yao Qi <yao.qi@linaro.org>
9593
9594 * NEWS: Mention it.
9595 * features/Makefile (%.c: %.xml): Pass the xml file name to
9596 command "maint print c-tdesc".
9597 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9598 name from 'arg'.
9599
b468ff4c
YQ
96002017-07-26 Yao Qi <yao.qi@linaro.org>
9601
9602 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9603 in-class initialization.
9604 (tdesc_create_feature): Call new instead of XCNEW.
9605 (free_target_description): Ue delete.
9606
b9c0e1b4
JB
96072017-07-25 John Baldwin <jhb@FreeBSD.org>
9608
9609 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9610
a04b5337
YQ
96112017-07-25 Yao Qi <yao.qi@linaro.org>
9612
9613 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9614 constant.
9615 (amd64_x32_init_abi): Likewise.
9616 * amd64-tdep.h (amd64_init_abi): Update declaration.
9617 (amd64_x32_init_abi): Likewise.
9618
02ad7fc2
YQ
96192017-07-25 Yao Qi <yao.qi@linaro.org>
9620
9621 PR tdep/21717
9622 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9623 condition for FPSCR.
9624 (arm_linux_store_inferior_registers): Likewise.
9625
b6f48cb0
TT
96262017-07-22 Tom Tromey <tom@tromey.com>
9627
9628 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9629 <syscalls_counts>: Now a std::vector.
9630 (get_catch_syscall_inferior_data): Use "new".
9631 (catch_syscall_inferior_data_cleanup): Use "delete".
9632 (insert_catch_syscall, remove_catch_syscall)
9633 (clear_syscall_counts): Update.
9634
e12c9b7a
TT
96352017-07-22 Tom Tromey <tom@tromey.com>
9636
9637 * break-catch-syscall.c (syscall_catchpoint)
9638 <syscalls_to_be_caught>: Now a std::vector<int>
9639 (~syscall_catchpoint): Remove.
9640 (insert_catch_syscall, remove_catch_syscall)
9641 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9642 (print_mention_catch_syscall, print_recreate_catch_syscall):
9643 Update.
9644 (create_syscall_event_catchpoint): Change type of "filter"
9645 parameter.
9646 (catch_syscall_split_args): Return a std::vector.
9647 (catch_syscall_command_1, catching_syscall_number_1): Update.
9648
4fa8aeac
TT
96492017-07-22 Tom Tromey <tom@tromey.com>
9650
9651 * break-catch-throw.c (struct exception_catchpoint)
9652 <exception_rx>: Now a std::string.
9653 (~exception_catchpoint): Remove.
9654 (print_one_detail_exception_catchpoint): Update.
9655 (handle_gnu_v3_exceptions): Change type of except_rx.
9656 (extract_exception_regexp): Return a std::string.
9657 (catch_exception_command_1): Update.
9658
f746a154
TT
96592017-07-22 Tom Tromey <tom@tromey.com>
9660
9661 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9662 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9663 std::vector.
9664 <catch_all>: Now a bool.
9665 (~signal_catchpoint): Remove.
9666 (signal_catchpoint_insert_location)
9667 (signal_catchpoint_remove_location)
9668 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9669 (signal_catchpoint_print_mention)
9670 (signal_catchpoint_print_recreate)
9671 (signal_catchpoint_explains_signal): Update.
9672 (create_signal_catchpoint): Change type of "filter" and
9673 "catch_all".
9674 (catch_signal_split_args): Return a std::vector. Change type of
9675 "catch_all".
9676 (catch_signal_command): Update.
9677
47e77640
PA
96782017-07-20 Pedro Alves <palves@redhat.com>
9679
9680 * ada-lang.c (ada_language_defn): Make extern.
9681 (_initialize_ada_language): Remove add_language call.
9682 * c-lang.c (c_language_defn, cplus_language_defn)
9683 (asm_language_defn, minimal_language_defn): Make extern.
9684 (_initialize_c_language): Delete.
9685 * completer.c (compare_cstrings): Delete, moved to utils.h.
9686 * d-lang.c (d_language_defn): Make extern.
9687 (_initialize_d_language): Remove add_language calls.
9688 * defs.h (enum language): Add comment.
9689 * f-lang.c (f_language_defn): Make extern.
9690 (_initialize_f_language): Remove add_language call.
9691 * go-lang.c (go_language_defn): Make extern.
9692 (_initialize_go_language): Remove add_language call.
9693 * language.c: Include <algorithm>.
9694 (languages): Redefine as const array.
9695 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9696 (set_language_command): Handle "local". Use for-range loop.
9697 (set_language): Remove loop.
9698 (language_enum): Rewrite.
9699 (language_def, language_str): Remove loops.
9700 (add_language): Delete.
9701 (add_set_language_command): New, based on add_languages.
9702 (skip_language_trampoline): Adjust.
9703 (local_language_defn): Delete.
9704 (language_gdbarch_post_init): Adjust.
9705 (_initialize_language): Remove add_language calls. Call
9706 add_set_language_command.
9707 * language.h (add_language): Delete.
9708 (auto_language_defn)
9709 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9710 (asm_language_defn, c_language_defn, cplus_language_defn)
9711 (d_language_defn, f_language_defn, go_language_defn)
9712 (m2_language_defn, objc_language_defn, opencl_language_defn)
9713 (pascal_language_defn, rust_language_defn): Declare.
9714 * m2-lang.c (m2_language_defn): Make extern.
9715 (_initialize_m2_language): Remove add_language call.
9716 * objc-lang.c (objc_language_defn): Make extern.
9717 (_initialize_objc_language): Remove add_language call.
9718 * opencl-lang.c (opencl_language_defn): Make extern.
9719 (_initialize_opencl_language): Remove add_language call.
9720 * p-lang.c (pascal_language_defn): Make extern.
9721 (_initialize_pascal_language): Delete.
9722 * rust-lang.c (rust_language_defn): Make extern.
9723 (_initialize_rust_language): Delete.
9724 * utils.h (compare_cstrings): New static inline function.
9725
edb0c9cb
PA
97262017-07-20 Pedro Alves <palves@redhat.com>
9727
9728 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9729 (get_var_value): Constify parameters.
9730 (get_int_var_value): Change prototype.
9731 (to_fixed_range_type): Adjust.
9732 * ada-lang.h (get_int_var_value): Change prototype.
9733
a778f165
PA
97342017-07-20 Pedro Alves <palves@redhat.com>
9735
9736 * dwarf2read.c (dw2_lookup_symbol): Use
9737 SYMBOL_MATCHES_SEARCH_NAME.
9738 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9739
42edd901
PA
97402017-07-20 Pedro Alves <palves@redhat.com>
9741
9742 * block.c (block_iter_name_step, block_iter_name_first)
9743 (block_iter_name_next): Delete.
9744 (block_lookup_symbol_primary): Adjust to use
9745 dict_iter_match_first/dict_iter_match_next.
9746 * block.h (block_iter_name_first, block_iter_name_next): Delete
9747 declarations.
9748 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9749 dict_iter_match_first/dict_iter_match_next.
9750
cf325299
PA
97512017-07-20 Pedro Alves <palves@redhat.com>
9752
9753 * cp-support.c (cp_find_first_component_aux): Add missing case for
9754 end of string.
9755
c5ed0576
DB
97562017-07-18 David Blaikie <dblaikie@gmail.com>
9757
9758 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9759 of dwo_cu's dwo_file.
9760
27841e76
YQ
97612017-07-18 Yao Qi <yao.qi@linaro.org>
9762
9763 * remote.c (store_registers_using_G): Remove one line comment.
9764
cfb7e58b
YQ
97652017-07-18 Yao Qi <yao.qi@linaro.org>
9766
9767 * regcache.c (regcache_cpy): Simplify it.
9768 (regcache::cpy_no_passthrough): Remove it.
9769 * regcache.h (cpy_no_passthrough): Remove it.
9770 (regcache_dup, regcache_cpy): Update comments.
9771
386535dd
PA
97722017-07-18 Pedro Alves <palves@redhat.com>
9773
9774 * remote-sim.c (sim_command_completer): Adjust to work with a
9775 completion_tracker instead of a VEC.
9776
c45ec17c
PA
97772017-07-17 Pedro Alves <palves@redhat.com>
9778
9779 * completer.c (complete_source_filenames): New function.
9780 (complete_address_and_linespec_locations): New function.
9781 (location_completer): Use complete_address_and_linespec_locations.
9782 (completion_tracker::build_completion_result): Honor the tracker's
9783 request to suppress append.
9784 * completer.h (completion_tracker::suppress_append_ws)
9785 (completion_tracker::set_suppress_append_ws): New methods.
9786 (completion_tracker::m_suppress_append_ws): New field.
9787 (complete_source_filenames): New declaration.
9788 * linespec.c (linespec_complete_what): New.
9789 (struct ls_parser) <complete_what, completion_word,
9790 completion_quote_char, completion_quote_end, completion_tracker>:
9791 New fields.
9792 (string_find_incomplete_keyword_at_end): New.
9793 (linespec_lexer_lex_string): Record quote char. If in completion
9794 mode, don't throw.
9795 (linespec_lexer_consume_token): Advance the completion word point.
9796 (linespec_lexer_peek_token): Save/restore completion info.
9797 (save_stream_and_consume_token): New.
9798 (set_completion_after_number): New.
9799 (linespec_parse_basic): Set what to complete next depending on
9800 token. Handle function and label completions specially.
9801 (parse_linespec): Disable objc shortcut in completion mode. Set
9802 what to complete next depending on token type. Skip keyword if in
9803 completion mode.
9804 (complete_linespec_component, linespec_complete): New.
9805 * linespec.h (linespec_complete): Declare.
9806
be966d42
PA
98072017-07-17 Pedro Alves <palves@redhat.com>
9808
9809 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9810 Handle 'operator<' / 'operator<<'.
9811
a2459270
PA
98122017-07-17 Pedro Alves <palves@redhat.com>
9813
9814 * completer.c (collect_explicit_location_matches): Handle
9815 MATCH_LABEL.
9816 (convert_explicit_location_to_linespec): New, factored out from
9817 ...
9818 (convert_explicit_location_to_sals): ... this.
9819 (complete_label): New.
9820 (linespec_complete_label, find_label_symbols_in_block): New.
9821 (find_label_symbols): Add completion_mode parameter and adjust to
9822 call find_label_symbols_in_block.
9823 * linespec.h (linespec_complete_label): Declare.
9824
c6756f62
PA
98252017-07-17 Pedro Alves <palves@redhat.com>
9826
9827 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9828 complete_symbol_mode parameter.
9829 * cli/cli-cmds.c (complete_command): Get the completion result out
9830 of the handle_brkchars tracker if used a custom word point.
9831 * completer.c: Include "linespec.h".
9832 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9833 (advance_to_expression_complete_word_point): New.
9834 (completion_tracker::completes_to_completion_word): New.
9835 (complete_files_symbols): Pass down
9836 complete_symbol_mode::EXPRESSION.
9837 (explicit_options, probe_options): New.
9838 (collect_explicit_location_matches): Complete on the
9839 explictit_loc->foo instead of word. Use
9840 linespec_complete_function. Handle MATCH_LINE. Handle offering
9841 keyword and options completions.
9842 (backup_text_ptr): Delete.
9843 (skip_keyword): New.
9844 (complete_explicit_location): Remove 'word' parameter. Add
9845 language, quoted_arg_start and quoted_arg_end parameters.
9846 Rewrite, parsing left to right.
9847 (location_completer): Rewrite.
9848 (location_completer_handle_brkchars): New function.
9849 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9850 (enum complete_line_internal_reason): Adjust comments.
9851 (completion_tracker::discard_completions): New.
9852 (completer_handle_brkchars_func_for_completer): Handle
9853 location_completer.
9854 (gdb_custom_word_point_brkchars)
9855 (gdb_org_rl_basic_quote_characters): New.
9856 (gdb_completion_word_break_characters_throw)
9857 (completion_find_completion_word): Handle trackers that use a
9858 custom word point.
9859 (completion_tracker::advance_custom_word_point_by): New.
9860 (completion_tracker::build_completion_result): Don't rely on
9861 readline appending the quote char.
9862 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9863 use a custom word point.
9864 (gdb_rl_attempted_completion_function): Restore
9865 rl_basic_quote_characters.
9866 * completer.h (class completion_tracker): Extend intro comment.
9867 (completion_tracker::set_quote_char)
9868 (completion_tracker::quote_char)
9869 (completion_tracker::set_use_custom_word_point)
9870 (completion_tracker::use_custom_word_point)
9871 (completion_tracker::custom_word_point)
9872 (completion_tracker::set_custom_word_point)
9873 (completion_tracker::advance_custom_word_point_by)
9874 (completion_tracker::completes_to_completion_word)
9875 (completion_tracker::discard_completions): New methods.
9876 (completion_tracker::m_quote_char)
9877 (completion_tracker::m_use_custom_word_point)
9878 (completion_tracker::m_custom_word_point): New fields.
9879 (advance_to_expression_complete_word_point): Declare.
9880 * f-lang.c (f_collect_symbol_completion_matches): Add
9881 complete_symbol_mode parameter.
9882 * language.h (struct language_defn)
9883 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9884 parameter.
9885 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9886 (linespec_complete_function): New function.
9887 (linespec_lexer_lex_keyword): Adjust.
9888 * linespec.h (linespec_keywords, linespec_complete_function): New
9889 declarations.
9890 * location.c (find_end_quote): New function.
9891 (explicit_location_lex_one): Add explicit_completion_info
9892 parameter. Save quoting info. Don't throw if being called for
9893 completion. Don't handle Ada operators here.
9894 (is_cp_operator, skip_op_false_positives, first_of)
9895 (explicit_location_lex_one_function): New function.
9896 (string_to_explicit_location): Replace 'dont_throw' parameter with
9897 an explicit_completion_info pointer parameter. Handle it. Don't
9898 use explicit_location_lex_one to lex function names. Use
9899 explicit_location_lex_one_function instead.
9900 * location.h (struct explicit_completion_info): New.
9901 (string_to_explicit_location): Replace 'dont_throw' parameter with
9902 an explicit_completion_info pointer parameter.
9903 * symtab.c (default_collect_symbol_completion_matches_break_on):
9904 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9905 (default_collect_symbol_completion_matches)
9906 (collect_symbol_completion_matches): Add complete_symbol_mode
9907 parameter.
9908 (collect_symbol_completion_matches_type): Pass down
9909 complete_symbol_mode::EXPRESSION.
9910 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9911 parameter. Handle LINESPEC mode.
9912 * symtab.h (complete_symbol_mode): New.
9913 (default_collect_symbol_completion_matches_break_on)
9914 (default_collect_symbol_completion_matches)
9915 (collect_symbol_completion_matches)
9916 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9917 parameter.
9918
1d550c82
PA
99192017-07-17 Pedro Alves <palves@redhat.com>
9920
9921 * utils.c (enum class strncmp_iw_mode): New.
9922 (strcmp_iw): Rename to ...
9923 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9924 parameters. Handle them.
9925 (strncmp_iw): New.
9926 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9927 * utils.h (strncmp_iw): Declare.
9928 (strcmp_iw): Move describing comments here.
9929
8090b426
PA
99302017-07-17 Pedro Alves <palves@redhat.com>
9931
9932 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9933 CP_OPERATOR_STR.
9934 * c-typeprint.c (is_type_conversion_operator): Use
9935 CP_OPERATOR_STR.
9936 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9937 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9938 CP_OPERATOR_LEN.
9939 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9940 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9941 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9942 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9943 CP_OPERATOR_STR.
9944 * location.c: Include "cp-support.h".
9945 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9946 CP_OPERATOR_STR.
9947 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9948 CP_OPERATOR_LEN.
9949
6a2c1b87
PA
99502017-07-17 Pedro Alves <palves@redhat.com>
9951
9952 * cli/cli-cmds.c (complete_command): Use a completion tracker
9953 along with completion_find_completion_word for handle_brkchars
9954 phase.
9955 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9956 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9957 (struct gdb_rl_completion_word_info): New.
9958 (gdb_rl_find_completion_word): New.
9959 (completion_find_completion_word): New.
9960 * completer.h (completion_find_completion_word): Declare.
9961
eb3ff9a5
PA
99622017-07-17 Pedro Alves <palves@redhat.com>
9963
9964 * ada-lang.c (symbol_completion_match): Adjust comments.
9965 (symbol_completion_add): Replace vector parameter with
9966 completion_tracker parameter. Use it.
9967 (ada_make_symbol_completion_list): Rename to...
9968 (ada_collect_symbol_completion_matches): ... this. Add
9969 completion_tracker parameter and use it.
9970 (ada_language_defn): Adjust.
9971 * break-catch-syscall.c (catch_syscall_completer): Adjust
9972 prototype and work with completion_tracker instead of VEC.
9973 * breakpoint.c (condition_completer): Adjust prototype and work
9974 with completion_tracker instead of VEC.
9975 * c-lang.c (c_language_defn, cplus_language_defn)
9976 (asm_language_defn, minimal_language_defn): Adjust to renames.
9977 * cli/cli-cmds.c (complete_command): Rework using
9978 completion_tracker. Catch exceptions when completing.
9979 * cli/cli-decode.c (integer_unlimited_completer)
9980 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9981 with completion_tracker instead of VEC.
9982 * command.h (struct completion_tracker): Forward declare.
9983 (completer_ftype, completer_handle_brkchars_ftype): Change
9984 types.
9985 (complete_on_cmdlist, complete_on_enum): Adjust.
9986 * completer.c: Include <algorithm>.
9987 (struct gdb_completer_state): New.
9988 (current_completion): New global.
9989 (readline_line_completion_function): Delete.
9990 (noop_completer, filename_completer)
9991 (filename_completer_handle_brkchars, complete_files_symbols)
9992 (linespec_location_completer): Adjust to work with a
9993 completion_tracker instead of a VEC.
9994 (string_or_empty): New.
9995 (collect_explicit_location_matches): Adjust to work with a
9996 completion_tracker instead of a VEC.
9997 (explicit_location_completer): Rename to ...
9998 (complete_explicit_location): ... this and adjust to work with a
9999 completion_tracker instead of a VEC.
10000 (location_completer): Adjust to work with a completion_tracker
10001 instead of a VEC.
10002 (add_struct_fields): Adjust to work with a completion_list instead
10003 of VEC.
10004 (expression_completer): Rename to ...
10005 (complete_expression): ... this and adjust to work with a
10006 completion_tracker instead of a VEC. Use complete_files_symbols.
10007 (expression_completer): Reimplement on top of complete_expression.
10008 (symbol_completer): Adjust to work with a completion_tracker
10009 instead of a VEC.
10010 (enum complete_line_internal_reason): Add describing comments.
10011 (complete_line_internal_normal_command): Adjust to work with a
10012 completion_tracker instead of a VEC.
10013 (complete_line_internal): Rename to ...
10014 (complete_line_internal_1): ... this and adjust to work with a
10015 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10016 handle_brkchars phase.
10017 (new_completion_tracker): Delete.
10018 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10019 complete_line_internal_1.
10020 (free_completion_tracker): Delete.
10021 (INITIAL_COMPLETION_HTAB_SIZE): New.
10022 (completion_tracker::completion_tracker)
10023 (completion_tracker::~completion_tracker): New.
10024 (maybe_add_completion): Delete.
10025 (completion_tracker::maybe_add_completion)
10026 (completion_tracker::add_completion)
10027 (completion_tracker::add_completions): New.
10028 (throw_max_completions_reached_error): Delete.
10029 (complete_line): Adjust to work with a completion_tracker instead
10030 of a VEC. Don't create a completion_tracker_t or check for max
10031 completions here.
10032 (command_completer, command_completer_handle_brkchars)
10033 (signal_completer, reg_or_group_completer_1)
10034 (reg_or_group_completer, default_completer_handle_brkchars):
10035 Adjust to work with a completion_tracker.
10036 (gdb_completion_word_break_characters_throw): New.
10037 (gdb_completion_word_break_characters): Reimplement.
10038 (line_completion_function): Delete.
10039 (completion_tracker::recompute_lowest_common_denominator)
10040 (expand_preserving_ws)
10041 (completion_tracker::build_completion_result)
10042 (completion_result::completion_result)
10043 (completion_result::completion_result)
10044 (completion_result::~completion_result)
10045 (completion_result::completion_result)
10046 (completion_result::release_match_list, compare_cstrings)
10047 (completion_result::sort_match_list)
10048 (completion_result::reset_match_list)
10049 (gdb_rl_attempted_completion_function_throw)
10050 (gdb_rl_attempted_completion_function): New.
10051 * completer.h (completion_list, struct completion_result)
10052 (class completion_tracker): New.
10053 (complete_line): Add completion_tracker parameter.
10054 (readline_line_completion_function): Delete.
10055 (gdb_rl_attempted_completion_function): New.
10056 (noop_completer, filename_completer, expression_completer)
10057 (location_completer, symbol_completer, command_completer)
10058 (signal_completer, reg_or_group_completer): Update prototypes.
10059 (completion_tracker_t, new_completion_tracker)
10060 (make_cleanup_free_completion_tracker): Delete.
10061 (enum maybe_add_completion_enum): Delete.
10062 (maybe_add_completion): Delete.
10063 (throw_max_completions_reached_error): Delete.
10064 * corefile.c (complete_set_gnutarget): Adjust to work with a
10065 completion_tracker instead of a VEC.
10066 * cp-abi.c (cp_abi_completer): Adjust to work with a
10067 completion_tracker instead of a VEC.
10068 * d-lang.c (d_language_defn): Adjust.
10069 * disasm.c (disassembler_options_completer): Adjust to work with a
10070 completion_tracker instead of a VEC.
10071 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10072 (f_collect_symbol_completion_matches): ... this. Adjust to work
10073 with a completion_tracker instead of a VEC.
10074 (f_language_defn): Adjust.
10075 * go-lang.c (go_language_defn): Adjust.
10076 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10077 Adjust to work with a completion_tracker instead of a VEC.
10078 * infrun.c (handle_completer): Likewise.
10079 * interps.c (interpreter_completer): Likewise.
10080 * interps.h (interpreter_completer): Likewise.
10081 * language.c (unknown_language_defn, auto_language_defn)
10082 (local_language_defn): Adjust.
10083 * language.h (language_defn::la_make_symbol_completion_list):
10084 Rename to ...
10085 (language_defn::la_collect_symbol_completion_matches): ... this
10086 and adjust to work with a completion_tracker instead of a VEC.
10087 * m2-lang.c (m2_language_defn): Adjust.
10088 * objc-lang.c (objc_language_defn): Adjust.
10089 * opencl-lang.c (opencl_language_defn): Adjust.
10090 * p-lang.c (pascal_language_defn): Adjust.
10091 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10092 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10093 with a completion_tracker.
10094 * rust-lang.c (rust_language_defn): Adjust.
10095 * symtab.c (free_completion_list, do_free_completion_list)
10096 (return_val, completion_tracker): Delete.
10097 (completion_list_add_name, completion_list_add_symbol)
10098 (completion_list_add_msymbol, completion_list_objc_symbol)
10099 (completion_list_add_fields, add_symtab_completions): Add
10100 completion_tracker parameter and use it.
10101 (default_make_symbol_completion_list_break_on_1): Rename to...
10102 (default_collect_symbol_completion_matches_break_on): ... this.
10103 Add completion_tracker parameter and use it instead of allocating
10104 a completion tracker here.
10105 (default_make_symbol_completion_list_break_on): Delete old
10106 implementation.
10107 (default_make_symbol_completion_list): Delete.
10108 (default_collect_symbol_completion_matches): New.
10109 (make_symbol_completion_list): Delete.
10110 (collect_symbol_completion_matches): New.
10111 (make_symbol_completion_type): Rename to ...
10112 (collect_symbol_completion_matches_type): ... this. Add
10113 completion_tracker parameter and use it instead of VEC.
10114 (make_file_symbol_completion_list_1): Rename to...
10115 (collect_file_symbol_completion_matches): ... this. Add
10116 completion_tracker parameter and use it instead of VEC.
10117 (make_file_symbol_completion_list): Delete.
10118 (add_filename_to_list): Use completion_list instead of a VEC.
10119 (add_partial_filename_data::list): Now a completion_list.
10120 (make_source_files_completion_list): Work with a completion_list
10121 instead of a VEC.
10122 * symtab.h: Include "completer.h".
10123 (default_make_symbol_completion_list_break_on)
10124 (default_make_symbol_completion_list, make_symbol_completion_list)
10125 (make_symbol_completion_type, make_file_symbol_completion_list)
10126 (make_source_files_completion_list): Delete.
10127 (default_collect_symbol_completion_matches_break_on)
10128 (default_collect_symbol_completion_matches)
10129 (collect_symbol_completion_matches)
10130 (collect_symbol_completion_matches_type)
10131 (collect_file_symbol_completion_matches)
10132 (make_source_files_completion_list): New.
10133 * top.c (init_main): Don't install a rl_completion_entry_function
10134 hook. Install a rl_attempted_completion_function hook instead.
10135 * tui/tui-layout.c (layout_completer): Adjust to work with a
10136 completion_tracker.
10137 * tui/tui-regs.c (tui_reggroup_completer):
10138 * tui/tui-win.c (window_name_completer, focus_completer)
10139 (winheight_completer): Adjust to work with a completion_tracker.
10140 * value.c: Include "completer.h".
10141 (complete_internalvar): Adjust to work with a completion_tracker.
10142 * value.h (complete_internalvar): Likewise.
10143
6e1dbf8c
PA
101442017-07-17 Pedro Alves <palves@redhat.com>
10145
10146 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10147 renames.
10148 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10149 comments to completer_ftype's declaration.
10150 <completer_handle_brkchars>: Change type to
10151 completer_handle_brkchars_ftype.
10152 * command.h (completer_ftype): Add describing comment and give
10153 names to parameters.
10154 (completer_ftype_void): Rename to ...
10155 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10156 (set_cmd_completer_handle_brkchars): Adjust.
10157 * completer.c (filename_completer_handle_brkchars): New function.
10158 (complete_line_internal_normal_command): New function, factored
10159 out from ...
10160 (complete_line_internal): ... here.
10161 (command_completer_handle_brkchars)
10162 (default_completer_handle_brkchars)
10163 (completer_handle_brkchars_func_for_completer): New functions.
10164 * completer.h (set_gdb_completion_word_break_characters): Delete
10165 declaration.
10166 (completer_handle_brkchars_func_for_completer): New declaration.
10167 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10168 completer_handle_brkchars_func_for_completer.
10169
78b13106
PA
101702017-07-17 Pedro Alves <palves@redhat.com>
10171
10172 * completer.c (symbol_completer): New function, based on
10173 make_symbol_completion_list_fn.
10174 * completer.h (symbol_completer): New declaration.
10175 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10176 * python/py-cmd.c (completers): Adjust.
10177 * symtab.c (make_symbol_completion_list_fn): Delete.
10178 * symtab.h (make_symbol_completion_list_fn): Delete.
10179 * cli/cli-decode.c (add_cmd): Adjust.
10180
bbf2f4df
PA
101812017-07-17 Pedro Alves <palves@redhat.com>
10182
10183 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10184 * dwarf2read.c: Include "filename-seen-cache.h".
10185 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10186 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10187 * filename-seen-cache.c: New file.
10188 * filename-seen-cache.h: New file.
10189 * symtab.c: Include "filename-seen-cache.h".
10190 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10191 (create_filename_seen_cache, clear_filename_seen_cache)
10192 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10193 to filename-seen-cache.h/filename-seen-cache.c.
10194 (output_source_filename, sources_info)
10195 (maybe_add_partial_symtab_filename)
10196 (make_source_files_completion_list): Adjust to use
10197 filename_seen_cache.
10198
330cdd98
PA
101992017-07-17 Pedro Alves <palves@redhat.com>
10200
10201 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10202 fields.
10203 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10204 dwarf2_debug_sections*)): New.
10205 (dwarf2_per_objfile::dwarf2_per_objfile(const
10206 dwarf2_per_objfile&)): Declare as deleted.
10207 (dwarf2_per_objfile::operator=): Declare as deleted.
10208 (dwarf2_per_objfile::dwarf2_per_objfile)
10209 (dwarf2_per_objfile::~dwarf2_per_objfile)
10210 (dwarf2_per_objfile::free_cached_comp_units): New.
10211 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10212 ctor. Call dwarf2_per_objfile's ctor manually.
10213 (dwarf2_locate_sections): Deleted/refactored as ...
10214 (dwarf2_per_objfile::locate_sections): ... this new method.
10215 (free_cached_comp_units): Defer to
10216 dwarf2_per_objfile::free_cached_comp_units.
10217 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10218
8880f2a9
TT
102192017-07-14 Tom Tromey <tom@tromey.com>
10220
10221 PR rust/21764:
10222 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10223 parameter.
10224 <UNOP_SIZEOF>: Split into separate case.
10225 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10226
65547233
TT
102272017-07-14 Tom Tromey <tom@tromey.com>
10228
10229 PR rust/21763:
10230 * symtab.c (symbol_matches_domain): Add language_rust to special
10231 case.
10232 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10233 treat LOC_TYPEDEF symbols as variables.
10234
8f14146e
PA
102352017-07-14 Pedro Alves <palves@redhat.com>
10236
10237 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10238 symtabs matching all symtabs with SRCFILE as file name instead of
10239 only considering the first hit, with lookup_symtab.
10240
2347965c
SM
102412017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10242
10243 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10244 operator_name parameters.
10245 (gen_expr): Update function call.
10246
40f4af28
SM
102472017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10248
10249 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10250 parameter.
10251 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10252 Likewise.
10253 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10254 parameter, use agent_expr::gdbarch instead, update function
10255 calls.
10256 (locexpr_tracepoint_var_ref): Likewise.
10257 (loclist_tracepoint_var_ref): Likewise.
10258 * ax-gdb.c (gen_trace_static_fields): Likewise.
10259 (gen_traced_pop): Likewise.
10260 (gen_frame_args_address): Likewise.
10261 (gen_frame_locals_address): Likewise.
10262 (gen_var_ref): Likewise.
10263 (gen_struct_ref_recursive): Likewise.
10264 (gen_static_field): Likewise.
10265 (gen_maybe_namespace_elt): Likewise.
10266 (gen_expr): Likewise.
10267 (gen_trace_for_var): Likewise.
10268 (gen_trace_for_expr): Likewise.
10269 (gen_trace_for_return_address): Likewise.
10270
053f8057
SM
102712017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10272
10273 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10274 parameter.
10275 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10276
6661ad48
SM
102772017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10278
10279 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10280 from ax, update calls.
10281 (gen_usual_arithmetic): Likewise.
10282 (gen_integral_promotions): Likewise.
10283 (gen_bitfield_ref): Likewise.
10284 (gen_primitive_field): Likewise.
10285 (gen_struct_ref_recursive): Likewise.
10286 (gen_struct_ref): Likewise.
10287 (gen_maybe_namespace_elt): Likewise.
10288 (gen_struct_elt_for_reference): Likewise.
10289 (gen_namespace_elt): Likewise.
10290 (gen_aggregate_elt_ref): Likewise.
10291 (gen_expr): Get gdbarch from ax, update calls.
10292 (gen_expr_binop_rest): Likewise.
10293
c55a47e7
PA
102942017-07-13 Pedro Alves <palves@redhat.com>
10295
10296 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10297 as default tdesc.
10298 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10299 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10300 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10301 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10302 tdep.
10303 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10304 Get final tdesc from the tdep.
10305 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10306 default tdesc.
10307 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10308 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10309 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10310 Use it as default tdesc.
10311 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10312 down to amd_init_abi. No longer handle fallback tdesc here.
10313 * amd64-tdep.h (tdesc_x32): Declare.
10314 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10315 parameter.
10316 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10317 as default tdesc.
10318
55efceab
AA
103192017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10320
10321 * s390-linux-tdep.c (s390_process_record): Add support for
10322 instructions new in arch12.
10323
0aa37b65
JB
103242017-07-11 John Baldwin <jhb@FreeBSD.org>
10325
10326 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10327 PT_GETFSBASE and PT_GETGSBASE.
10328 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10329 PT_SETGSBASE.
10330
48aeef91
JB
103312017-07-11 John Baldwin <jhb@FreeBSD.org>
10332
10333 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10334 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10335 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10336 those rules.
10337 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10338 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10339 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10340 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10341 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10342 * features/i386/amd64.xml: Add 64bit-segments.xml.
10343 * features/i386/amd64-avx-avx512.c: Regenerated.
10344 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10345 * features/i386/amd64-avx-mpx.c: Regenerated.
10346 * features/i386/amd64-avx.c: Regenerated.
10347 * features/i386/amd64-mpx.c: Regenerated.
10348 * features/i386/amd64.c: Regenerated.
10349 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10350 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10351 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10352 * regformats/i386/amd64-avx.dat: Regenerated.
10353 * regformats/i386/amd64-mpx.dat: Regenerated.
10354 * regformats/i386/amd64.dat: Regenerated.
10355
77c501bc
YQ
103562017-07-10 Yao Qi <yao.qi@linaro.org>
10357
10358 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10359 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10360
6dc8d757
AK
103612017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10362
10363 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10364 unsetenv.
10365 * gnulib/aclocal.m4: Regenerate.
10366 * gnulib/config.in: Regenerate.
10367 * gnulib/configure: Regenerate.
10368 * gnulib/import/Makefile.am: Regenerate.
10369 * gnulib/import/Makefile.in: Regenerate.
10370 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10371 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10372 * gnulib/import/m4/environ.m4: New file.
10373 * gnulib/import/m4/setenv.m4: New file.
10374 * gnulib/import/setenv.c: New file.
10375 * gnulib/import/unsetenv.c: New file.
10376
266934d1
SM
103772017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10378
10379 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10380 address when op is DW_OP_addr.
10381
03278692
TT
103822017-07-09 Tom Tromey <tom@tromey.com>
10383
10384 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10385 check and apply to outer type.
10386
4b654465
JB
103872017-07-07 John Baldwin <jhb@FreeBSD.org>
10388
10389 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10390 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10391 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10392 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10393
2af9fc44
JB
103942017-07-07 John Baldwin <jhb@FreeBSD.org>
10395
10396 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10397
382b69bb
JB
103982017-07-07 John Baldwin <jhb@FreeBSD.org>
10399
10400 * corelow.c (get_core_siginfo): Remove.
10401 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10402 instead of get_core_siginfo.
10403 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10404 * gdbarch.h: Re-generate.
10405 * gdbarch.c: Re-generate.
10406 * linux-tdep.c (linux_core_xfer_siginfo): New.
10407 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10408
6e5eab33
JB
104092017-07-07 John Baldwin <jhb@FreeBSD.org>
10410
10411 * corelow.c (thread_section_name): Move to ...
10412 * gdbcore.h (thread_section_name): ... here.
10413
929edea9
JB
104142017-07-07 John Baldwin <jhb@FreeBSD.org>
10415
10416 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10417 (struct siginfo32): New.
10418 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10419 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10420 via ptrace(PT_LWPINFO).
10421
762c974a
JB
104222017-07-07 John Baldwin <jhb@FreeBSD.org>
10423
10424 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10425 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10426 (fbsd_get_siginfo_type): New.
10427 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10428 (_initialize_fbsd_tdep): New.
10429
33c5cd75
DB
104302017-07-06 David Blaikie <dblaikie@gmail.com>
10431
10432 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10433 a singular dwo_unit*) to support multiple CUs in the same way that
10434 multiple TUs are supported.
10435 (create_cus_hash_table): Replace create_dwo_cu with a function for
10436 parsing multiple CUs from a DWO file.
10437 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10438 create_dwo_cu.
10439 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10440 htab_find, rather than comparing the signature to a singleton CU in
10441 the dwo_file.
10442
8455d262
PA
104432017-07-06 Pedro Alves <palves@redhat.com>
10444
10445 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10446
4da3eb35
PA
104472017-07-04 Pedro Alves <palves@redhat.com>
10448
10449 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10450 * gdbtypes.h (TYPE_STATIC): Delete.
10451 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10452 is_synchronized, is_native>: Delete.
10453 <dummy>: Bump.
10454 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10455 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10456 (TYPE_FN_FIELD_ABSTRACT): Delete.
10457
5bfd255c
SM
104582017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10459
10460 * buffer.h (buffer_finish): Fix spelling mistakes.
10461
25c54127
EZ
104622017-07-01 Eli Zaretskii <eliz@gnu.org>
10463
10464 * .dir-locals.el: Automatically switch to C-style comments in
10465 versions of Emacs that support the feature.
10466
dc4bde35
SDJ
104672017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10468 Pedro Alves <palves@redhat.com>
10469
10470 PR cli/21688
10471 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10472 (process_next_line): New variable 'inline_cmd'.
10473 Adjust 'if' clauses for "python", "compile" and "guile" to use
10474 'command_name_equals' and check for '!inline_cmd'.
10475
51ed89aa
SDJ
104762017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10477
10478 PR cli/21688
10479 * cli/cli-script.c (command_name_equals_not_inline): New function.
10480 (process_next_line): Adjust 'if' clauses for "python", "compile"
10481 and "guile" to use command_name_equals_not_inline.
10482
eb17d413
PA
104832017-06-29 Pedro Alves <palves@redhat.com>
10484
10485 * completer.c (expression_completer): Call
10486 linespec_location_completer instead of location_completer.
10487
195bcdd5
PA
104882017-06-29 Pedro Alves <palves@redhat.com>
10489
10490 * completer.c (expression_completer): Remove code that recomputes
10491 'text' from 'word'.
10492
adc764e7
YQ
104932017-06-29 Yao Qi <yao.qi@linaro.org>
10494
10495 * regformats/regdat.sh: Generate code with
10496 "ifndef IN_PROCESS_AGENT".
10497
6e75794e
PA
104982017-06-28 Pedro Alves <palves@redhat.com>
10499
10500 * command.h: Include "common/scoped_restore.h".
10501
bc491f2e
YQ
105022017-06-28 Yao Qi <yao.qi@linaro.org>
10503
10504 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10505 instead of obstack_grow.
10506
41664b45
DG
105072017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10508
10509 PR gdb/21337
10510 * symfile.c (reread_symbols): Call objfiles_changed just before
10511 read_symbols.
10512
6da67eb1
PA
105132017-06-27 Pedro Alves <palves@redhat.com>
10514
10515 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10516 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10517 (completion_list_add_symbol, completion_list_add_msymbol):
10518 ... these new functions.
10519 (add_symtab_completions)
10520 (default_make_symbol_completion_list_break_on_1): Adjust.
10521
23732b1e
PA
105222017-06-27 Pedro Alves <palves@redhat.com>
10523
10524 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10525 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10526 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10527 dtor.
10528 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10529 'storage_obstack' field an auto_obstack. In-class initialize all
10530 non-bitfield fields. Make minsyms_read bool.
10531 * symfile.c (read_symbols): Adjust.
10532
a4d1e79a
AH
105332017-06-27 Alan Hayward <alan.hayward@arm.com>
10534
10535 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10536 (gdbsim_store_register): Likewise.
10537
8268c778
PA
105382017-06-27 Pedro Alves <palves@redhat.com>
10539
10540 * c-exp.y (name_obstack): Now an auto_obstack.
10541 (yylex): Use auto_obstack::clear.
10542 (c_parse): Use auto_obstack::clear instead of reinitializing and
10543 freeing the obstack.
10544 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10545 * d-exp.y (name_obstack): Now an auto_obstack.
10546 (yylex): Use auto_obstack::clear.
10547 (d_parse): Use auto_obstack::clear instead of reinitializing and
10548 freeing the obstack.
10549 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10550 auto_obstack.
10551 * dwarf2read.c (create_addrmap_from_index)
10552 (dwarf2_build_psymtabs_hard)
10553 (update_enumeration_type_from_children): Likewise.
10554 * gdb_obstack.h (auto_obstack): New type.
10555 * go-exp.y (name_obstack): Now an auto_obstack.
10556 (build_packaged_name): Use auto_obstack::clear.
10557 (go_parse): Use auto_obstack::clear instead of reinitializing and
10558 freeing the obstack.
10559 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10560 auto_obstack.
10561 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10562 * rust-exp.y (work_obstack): Now an auto_obstack.
10563 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10564 reinitializing and freeing the obstack.
10565 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10566 (host_char_to_target): Use auto_obstack.
10567 * utils.h (make_cleanup_obstack_free): Delete declaration.
10568 * valprint.c (generic_emit_char, generic_printstr): Use
10569 auto_obstack.
10570
db665f42
SM
105712017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10572
10573 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10574 thread.
10575 (darwin_init_thread_list): Don't update dummy thread.
10576 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10577
873c0814
SM
105782017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10579
10580 * record-full.c (netorder16): Remove.
10581
8b5a7a6e
SM
105822017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10583
10584 * common/diagnostics.h: Define macros for GCC.
10585 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10586 * common/vec.h: Include diagnostics.h.
10587 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10588 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10589 warning.
10590
d1435379
SM
105912017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10592
10593 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10594 New macro.
10595 * ada-lex.l: Ignore deprecated register warnings.
10596
cc75e0fd
SM
105972017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10598
10599 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10600 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10601
07809eaf
SM
106022017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10603
10604 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10605 its own line.
10606
f076f034
SM
106072017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10608
10609 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10610
0dd5cbc5
AH
106112017-06-23 Alan Hayward <alan.hayward@arm.com>
10612
10613 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10614 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10615 (xtensa_register_read_masked): Likewise.
10616
d4c6ce5b
SDJ
106172017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10618
10619 * common/environ.c (gdb_environ::unset): Update comment.
10620
16892a03
AH
106212017-06-22 Alan Hayward <alan.hayward@arm.com>
10622
10623 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10624 registers.
10625
d7dcbefc
AH
106262017-06-22 Alan Hayward <alan.hayward@arm.com>
10627
10628 * record-full.c (record_full_exec_insn): Use byte_vector.
10629
b30ff123
YQ
106302017-06-22 Yao Qi <yao.qi@linaro.org>
10631
10632 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10633 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10634
4fa847d7
AH
106352017-06-22 Alan Hayward <alan.hayward@arm.com>
10636
10637 * remote.c (cached_reg): Move from here...
10638 * regcache.h (cached_reg): ...to here.
10639 * python/py-unwind.c (struct reg_info): Remove.
10640 (cached_frame_info): Use cached_reg_t.
10641 (pyuw_prev_register): Likewise.
10642 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10643 (pyuw_dealloc_cache): Free all registers.
10644
f4906a9a
PA
106452017-06-22 Pedro Alves <palves@redhat.com>
10646 Simon Marchi <simon.marchi@ericsson.com>
10647
10648 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10649 warning.
10650 * common/diagnostics.h: New file.
10651
b45a1208
PA
106522017-06-22 Pedro Alves <palves@redhat.com>
10653
10654 * common/agent.h: Add include guards.
10655
e4da2c61
SM
106562017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10657
10658 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10659 talk about addressable units instead of bytes.
10660
96160d60
SDJ
106612017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10662
10663 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10664 of '::const_iterator'.
10665
9a6c7d9c
SDJ
106662017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10667
10668 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10669 'unittests/environ-selftests.c'.
10670 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10671 * charset.c (find_charset_names): Declare object 'iconv_env'.
10672 Update code to use 'iconv_env' object. Remove call to
10673 'free_environ'.
10674 * common/environ.c: Include <utility>.
10675 (make_environ): Delete function.
10676 (free_environ): Delete function.
10677 (gdb_environ::clear): New function.
10678 (gdb_environ::operator=): New function.
10679 (gdb_environ::get): Likewise.
10680 (environ_vector): Delete function.
10681 (set_in_environ): Delete function.
10682 (gdb_environ::set): New function.
10683 (unset_in_environ): Delete function.
10684 (gdb_environ::unset): New function.
10685 (gdb_environ::envp): Likewise.
10686 * common/environ.h: Include <vector>.
10687 (struct gdb_environ): Delete; transform into...
10688 (class gdb_environ): ... this class.
10689 (free_environ): Delete prototype.
10690 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10691 environ_vector): Likewise.
10692 * infcmd.c (run_command_1): Update code to call
10693 'envp' from 'gdb_environ' class.
10694 (environment_info): Update code to call methods from 'gdb_environ'
10695 class.
10696 (unset_environment_command): Likewise.
10697 (path_info): Likewise.
10698 (path_command): Likewise.
10699 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10700 (inferior::inferior): Initialize 'environment' using the host's
10701 information.
10702 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10703 Include "environ.h".
10704 (class inferior) <environment>: Change type from 'struct
10705 gdb_environ' to 'gdb_environ'.
10706 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10707 methods from 'gdb_environ' class.
10708 * solib.c (solib_find_1): Likewise
10709 * unittests/environ-selftests.c: New file.
10710
75c554cf
YQ
107112017-06-20 Yao Qi <yao.qi@linaro.org>
10712
10713 * features/i386/i386-linux.xml: Exchange the order of including
10714 32bit-linux.xml and 32bit-sse.xml.
10715 * features/i386/i386-linux.c: Regenerated.
10716
72ddacb7
YQ
107172017-06-20 Yao Qi <yao.qi@linaro.org>
10718
10719 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10720 Delete copy ctor and assignment operator.
10721 (tdesc_type): Likewise.
10722 (tdesc_feature): Likewise.
10723 (tdesc_free_reg): Remove.
10724 (tdesc_create_reg): Use new.
10725 (tdesc_free_type): Remove.
10726 (tdesc_create_vector): Use new.
10727 (tdesc_create_union): Likewise.
10728 (tdesc_create_flags): Likewise.
10729 (tdesc_create_enum): Likewise.
10730 (tdesc_free_feature): Delete.
10731 (free_target_description): Use delete.
10732
325c9fd4
JB
107332017-06-19 John Baldwin <jhb@FreeBSD.org>
10734
10735 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10736 registers.
10737
16b7a719
PA
107382017-06-19 Pedro Alves <palves@redhat.com>
10739
10740 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10741 after gdb::unlinker.
10742
1c8e01c9
SDJ
107432017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10744
10745 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10746 gdb_environ to access an environment variable.
10747
ffce45d2
TP
107482017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10749
10750 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10751 gdb_byte*.
10752
1d4fbac9
SM
107532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10754
10755 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10756
8465943a
SM
107572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10758
10759 * configure: Re-generate.
10760 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10761
3e019bdc
SM
107622017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10763
10764 * configure: Re-generate.
10765 * warning.m4: Pass -Werror to compiler when checking for
10766 supported warning flags.
10767
cf0dd6f0
SM
107682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10769
10770 * Makefile.in (COMPILE.pre): Add "-x c++".
10771
6f98355c
YQ
107722017-06-16 Alan Hayward <alan.hayward@arm.com>
10773 Pedro Alves <palves@redhat.com>
10774 Yao Qi <yao.qi@linaro.org>
10775
10776 * defs.h (RequireLongest): New.
10777 (extract_integer): Declare function template.
10778 (extract_signed_integer): Remove the declaration, but define it
10779 static inline.
10780 (extract_unsigned_integer): Likewise.
10781 (store_integer): Declare function template.
10782 (store_signed_integer): Remove the declaration, but define it
10783 static inline.
10784 (store_unsigned_integer): Likewise.
10785 * findvar.c (extract_integer): New function template.
10786 (extract_signed_integer): Remove.
10787 (extract_unsigned_integer): Remove.
10788 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10789 instantiations.
10790 (store_integer): New function template.
10791 (store_signed_integer): Remove.
10792 (store_unsigned_integer): Remove.
10793 (store_integer): Explicit instantiations.
10794 * regcache.c (regcache_raw_read_signed): Update.
10795 (regcache::raw_read): New function.
10796 (regcache::raw_read_signed): Remove.
10797 (regcache::raw_read_unsigned): Remove.
10798 (regcache_raw_read_unsigned): Update.
10799 (regcache_raw_write_unsigned): Update.
10800 (regcache::raw_write_signed): Remove.
10801 (regcache::raw_write): New function.
10802 (regcache_cooked_read_signed): Update.
10803 (regcache::raw_write_unsigned): Remove.
10804 (regcache::cooked_read_signed): Remove.
10805 (regcache_cooked_read_unsigned): Update.
10806 (regcache::cooked_read_unsigned): Remove.
10807 (regcache_cooked_write_signed): Update.
10808 (regcache_cooked_write_unsigned): Update.
10809 * regcache.h (regcache) <raw_read_signed>: Remove.
10810 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10811 <raw_read, raw_write>: New.
10812 <cooked_read_signed, cooked_write_signed>: Remove.
10813 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10814 <cooked_read, cooked_write>: New.
10815 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10816 (sh64_pseudo_register_write): Update.
10817
a87dc45a
AK
108182017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10819
10820 * arc-tdep.c (arc_disassembler_options): New variable.
10821 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10822 of default_print_insn.
10823 (arc_delayed_print_insn): Set info->section when needed,
10824 use default_print_insn to retrieve a disassembler.
10825
45159d6a
SDJ
108262017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10827
10828 PR gdb/21574
10829 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10830 to mention $SHELL and startup-with-shell.
10831
b46c4cf0
MF
108322017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10833
10834 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10835
6394c606
YQ
108362017-06-14 Yao Qi <yao.qi@linaro.org>
10837
10838 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10839 default_print_insn instead of print_insn_aarch64.
10840 * arm-tdep.c (gdb_print_insn_arm): Call
10841 default_print_insn instead of print_insn_big_arm
10842 and print_insn_little_arm.
10843 * i386-tdep.c (i386_print_insn): Call default_print_insn
10844 instead of print_insn_i386.
10845 * ia64-tdep.c (ia64_print_insn): Call
10846 default_print_insn instead of print_insn_ia64.
10847 * mips-tdep.c (gdb_print_insn_mips): Call
10848 default_print_insn instead of print_insn_big_mips
10849 and print_insn_little_mips.
10850 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10851 instead of print_insn_spu.
10852
d5722aa2
PA
108532017-06-14 Pedro Alves <palves@redhat.com>
10854
10855 * ada-lang.c: Include "common/byte-vector.h".
10856 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10857 * charset.c (wchar_iterator::iterate): Resize the vector instead
10858 of reserving it.
10859 * common/byte-vector.h: Include "common/def-vector.h".
10860 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10861 * cli/cli-dump.c: Include "common/byte-vector.h".
10862 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10863 * common/byte-vector.h: New file.
10864 * common/def-vector.h: New file.
10865 * common/default-init-alloc.h: New file.
10866 * dwarf2loc.c: Include "common/byte-vector.h".
10867 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10868 instead of reserving it.
10869 * dwarf2read.c: Include "common/byte-vector.h".
10870 (data_buf::m_vec): Now a gdb::byte_vector.
10871 * gdb_regex.c: Include "common/def-vector.h".
10872 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10873 * mi/mi-main.c: Include "common/byte-vector.h".
10874 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10875 * printcmd.c: Include "common/byte-vector.h".
10876 (print_scalar_formatted): Use gdb::byte_vector.
10877 * valprint.c: Include "common/byte-vector.h".
10878 (maybe_negate_by_bytes, print_decimal_chars): Use
10879 gdb::byte_vector.
10880
01ec7a27
SM
108812017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10882
10883 * darwin-nat.c: Include "nat/fork-inferior.h".
10884
848d9074
SM
108852017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10886
10887 * configure.nat: Factor out Darwin bits that are not
10888 architecture-specific. Add fork-inferior.o.
10889
3b912944
SM
108902017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10891
10892 * configure.nat: Factor out AIX bits that are not
10893 architecture-specific. Add fork-inferior.o.
10894
55acdf22
AA
108952017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10896
10897 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10898 (read_pieced_value, write_pieced_value): ...here. Reduce to
10899 wrappers that just call rw_pieced_value.
10900
f65e2044
AA
109012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10902
10903 * dwarf2loc.c (write_pieced_value): When writing the data for a
10904 memory piece, use write_memory_with_notification instead of
10905 write_memory.
10906
23f945bf
AA
109072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10908
10909 * valops.c (read_value_memory): Change embedded_offset to
10910 represent a bit offset instead of a byte offset.
10911 * value.h (read_value_memory): Adjust comment.
10912
f236533e
AA
109132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10914
10915 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10916 dest_offset_bits and source_offset_bits.
10917 (write_pieced_value): Likewise.
10918
65d84b76
AA
109192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10920
10921 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10922 given by DW_OP_bit_piece.
10923 (write_pieced_value): Likewise.
10924
242d31ab
AA
109252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10926
10927 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10928 some other preparations to the places where sufficient information
10929 is available.
10930 (write_pieced_value): Likewise.
10931
03c8af18
AA
109322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10933
10934 * dwarf2loc.c (bits_to_bytes): New function.
10935 (read_pieced_value): Fix offset calculations for register pieces
10936 on big-endian targets.
10937 (write_pieced_value): Likewise.
10938
840989c1
AA
109392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10940
10941 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10942 (write_pieced_value): Likewise.
10943
359b19bb
AA
109442017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10945
10946 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10947 transfer the source value's least significant bits, instead of its
10948 lowest-addressed ones. Rename type_len to max_offset.
10949 (read_pieced_value): Mirror above changes to write_pieced_value as
10950 applicable.
10951
07c9ca3b
AA
109522017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10953
10954 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10955 truncate full bytes from dest_offset_bits before using it as an
10956 offset into the buffer.
10957
f1cc9874
AA
109582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10959
10960 * dwarf2loc.c (write_pieced_value): Include transfer size in
10961 byte-wise check.
10962
cdaac320
AA
109632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10964
10965 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10966 calculation of this_size.
10967
af547a96
AA
109682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10969
10970 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10971 when targeting a bit-field.
10972 (write_pieced_value): Likewise.
10973
ddd7882a
AA
109742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10975
10976 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10977 (allocate_piece_closure): Drop addr_size parameter.
10978 (dwarf2_evaluate_loc_desc_full): Adjust call to
10979 allocate_piece_closure.
10980
e9352324
AA
109812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10982
10983 PR gdb/21226
10984 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10985 the LSB end, independent of endianness.
10986
d5d1163e
AA
109872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10988
10989 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10990 size capping.
10991
032bb6ea
YQ
109922017-06-13 Yao Qi <yao.qi@linaro.org>
10993
10994 * mips-linux-nat.c: Move include features/mips*-linux.c to
10995 mips-linux-tdep.c.
10996 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10997 to mips-linux-tdep.c.
10998 * mips-linux-tdep.c: Include features/mips*-linux.c
10999 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11000 functions.
11001 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11002 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11003 (tdesc_mips64_dsp_linux): Declare.
11004
f12f6bad
TT
110052017-06-12 Tom Tromey <tom@tromey.com>
11006
11007 * valprint.h (val_print_type_code_int): Remove.
11008 * valprint.c (generic_val_print_int): Always call
11009 val_print_scalar_formatted.
11010 (val_print_type_code_int): Remove.
11011 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11012 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11013 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11014 * ada-valprint.c (ada_val_print_num): Use
11015 val_print_scalar_formatted.
11016
d9109c80
TT
110172017-06-12 Tom Tromey <tom@tromey.com>
11018
11019 * printcmd.c (print_scalar_formatted): Unify the two switches.
11020 Don't convert scalars to LONGEST.
11021
4ac0cb1c
TT
110222017-06-12 Tom Tromey <tom@tromey.com>
11023
11024 PR exp/16225:
11025 * valprint.h (print_decimal_chars): Update.
11026 * valprint.c (maybe_negate_by_bytes): New function.
11027 (print_decimal_chars): Add "is_signed" argument.
11028 * printcmd.c (print_scalar_formatted): Update.
11029
30a25466
TT
110302017-06-12 Tom Tromey <tom@tromey.com>
11031
11032 PR exp/16225:
11033 * valprint.h (print_binary_chars, print_hex_chars): Update.
11034 * valprint.c (val_print_type_code_int): Update.
11035 (print_binary_chars): Add "zero_pad" argument.
11036 (emit_octal_digit): New function.
11037 (print_octal_chars): Don't zero-pad.
11038 (print_decimal_chars): Likewise.
11039 (print_hex_chars): Add "zero_pad" argument.
11040 * sh64-tdep.c (sh64_do_fp_register): Update.
11041 * regcache.c (regcache::dump): Update.
11042 * printcmd.c (print_scalar_formatted): Update.
11043 * infcmd.c (default_print_one_register_info): Update.
11044
b3464d03
PA
110452017-06-12 Pedro Alves <palves@redhat.com>
11046 Alan Hayward <alan.hayward@arm.com>
11047
11048 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11049 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11050 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11051 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11052 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11053
4b76cda9
PA
110542017-06-12 Pedro Alves <palves@redhat.com>
11055
11056 * dwarf2read.c (mapped_symtab::data): Now a vector of
11057 symtab_index_entry instead of vector of
11058 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11059 whether an element's name is NULL instead of checking whether the
11060 element itself is NULL.
11061 (find_slot): Change return type. Adjust.
11062 (hash_expand, , add_index_entry, uniquify_cu_indices)
11063 (write_hash_table): Adjust.
11064
e8f8bcb3
PA
110652017-06-12 Pedro Alves <palves@redhat.com>
11066
11067 * dwarf2read.c (recursively_count_psymbols): New function.
11068 (write_psymtabs_to_index): Call it to compute number of psyms and
11069 pass estimate size of psyms_seen to unordered_set's ctor.
11070
70a1152b
PA
110712017-06-12 Pedro Alves <palves@redhat.com>
11072
11073 * dwarf2read.c (write_hash_table): Check if key already exists
11074 before emplacing.
11075
c2f134ac
PA
110762017-06-12 Pedro Alves <palves@redhat.com>
11077
11078 * dwarf2read.c (data_buf::append_space): Rename to...
11079 (data_buf::grow): ... this, and make private. Adjust all callers.
11080 (data_buf::append_uint): New method.
11081 (add_address_entry, write_one_signatured_type)
11082 (write_psymtabs_to_index): Use it.
11083
a81e6d4d
PA
110842017-06-12 Pedro Alves <palves@redhat.com>
11085
11086 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11087 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11088 (data_buf::file_write): Call ::fwrite directly.
11089
6fd931f2
PA
110902017-06-12 Pedro Alves <palves@redhat.com>
11091
11092 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11093 std::vector::erase.
11094
bc8f2430
JK
110952017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11096
11097 Code cleanup: C++ify .gdb_index producer.
11098 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11099 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11100 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11101 (create_strtab, add_string): Remove.
11102 (file_write, data_buf): New.
11103 (struct symtab_index_entry): Use std::vector for cu_indices.
11104 (struct mapped_symtab): Use std::vector for data.
11105 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11106 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11107 Remove.
11108 (find_slot): Change return type. Update it to the new data structures.
11109 (hash_expand, add_index_entry): Update it to the new data structures.
11110 (offset_type_compare): Remove.
11111 (uniquify_cu_indices): Update it to the new data structures.
11112 (c_str_view, c_str_view_hasher, vector_hasher): New.
11113 (add_indices_to_cpool): Remove.
11114 (write_hash_table): Update it to the new data structures.
11115 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11116 (eq_psymtab_cu_index): Remove.
11117 (psym_index_map): New typedef.
11118 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11119 reference and std::unordered_map for cu_index_htab.
11120 (add_address_entry, add_address_entry_worker, write_address_map)
11121 (write_psymbols): Update it to the new data structures.
11122 (write_obstack): Remove.
11123 (struct signatured_type_index_data): Change types_list to a data_buf
11124 reference and psyms_seen to a std::unordered_set reference.
11125 (write_one_signatured_type, recursively_write_psymbols)
11126 (write_psymtabs_to_index): Update it to the new data structures.
11127
c4dcb155
SM
111282017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11129
11130 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11131 separate-debug-file commands.
11132 * symfile.h (separate_debug_file_debug): New global.
11133 * symfile.c (separate_debug_file_debug): New global.
11134 (separate_debug_file_exists, find_separate_debug_file): Add
11135 debug output.
11136 (_initialize_symfile): Add "set debug separate-debug-file"
11137 command.
11138 * build-id.c (build_id_to_debug_bfd,
11139 find_separate_debug_file_by_buildid): Add debug output.
11140
6d45d4b4
SM
111412017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11142
11143 * gdbarch.sh (displaced_step_free_closure): Remove.
11144 * gdbarch.h, gdbarch.c: Re-generate.
11145 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11146 displaced_step_free_closure.
11147 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11148 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11149 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11150 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11151 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11152 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11153 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11154 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11155 * infrun.c (displaced_step_clear): Call xfree instead of
11156 gdbarch_displaced_step_free_closure.
11157
2f91880f
SDJ
111582017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11159
11160 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11161 NULL".
11162
b8b6e72f
AH
111632017-06-08 Alan Hayward <alan.hayward@arm.com>
11164
11165 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11166 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11167 (mn10300_push_dummy_call): Likewise.
11168
5369082e
AH
111692017-06-08 Alan Hayward <alan.hayward@arm.com>
11170
11171 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11172
ff4ca5ac
AH
111732017-06-08 Alan Hayward <alan.hayward@arm.com>
11174
11175 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11176
aefd8b33
SDJ
111772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11178
11179 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11180 able to start inferiors using a shell.
11181 (New remote packets): Announce new packet "QStartupWithShell".
11182 * remote.c: Add PACKET_QStartupWithShell.
11183 (extended_remote_create_inferior): Handle new
11184 PACKET_QStartupWithShell.
11185 (remote_protocol_features) <QStartupWithShell>: New entry for
11186 PACKET_QStartupWithShell.
11187 (_initialize_remote): Call "add_packet_config_cmd" for
11188 QStartupShell.
11189
2090129c
SDJ
111902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11191 Pedro Alves <palves@redhat.com>
11192
11193 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11194 and "nat/fork-inferior.h".
11195 * common/common-inferior.h: New file, with contents from
11196 "gdb/inferior.h".
11197 * commom/common-utils.c: Include "common-utils.h".
11198 (stringify_argv): New function.
11199 * common/common-utils.h (stringify_argv): New prototype.
11200 * configure.nat: Add "fork-inferior.o" as a dependency for
11201 "*linux*", "fbsd*" and "nbsd*" hosts.
11202 * corefile.c (get_exec_file): Update comment.
11203 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11204 instead of "startup_inferior".
11205 (darwin_create_inferior): Call "add_thread_silent" after
11206 "fork_inferior".
11207 * fork-child.c: Cleanup unnecessary includes.
11208 (SHELL_FILE): Move to "common/common-fork-child.c".
11209 (environ): Likewise.
11210 (exec_wrapper): Initialize.
11211 (get_exec_wrapper): New function.
11212 (breakup_args): Move to "common/common-fork-child.c"; rename to
11213 "breakup_args_for_exec".
11214 (escape_bang_in_quoted_argument): Move to
11215 "common/common-fork-child.c".
11216 (saved_ui): New variable.
11217 (prefork_hook): New function.
11218 (postfork_hook): Likewise.
11219 (postfork_child_hook): Likewise.
11220 (gdb_startup_inferior): Likewise.
11221 (fork_inferior): Move to "common/common-fork-child.c". Update
11222 function to support gdbserver.
11223 (startup_inferior): Likewise.
11224 * gdbcore.h (get_exec_file): Remove declaration.
11225 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11226 instead of "startup_inferior". Call "add_thread_silent" after
11227 "fork_inferior".
11228 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11229 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11230 instead of "startup_inferior". Call "add_thread_silent" after
11231 "fork_inferior".
11232 * inferior.h: Include "common-inferior.h".
11233 (trace_start_error): Move to "common/common-utils.h".
11234 (trace_start_error_with_name): Likewise.
11235 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11236 (startup_inferior): Likewise.
11237 (gdb_startup_inferior): New prototype.
11238 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11239 * nat/fork-inferior.h: New file.
11240 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11241 instead of "startup_inferior". Call "add_thread_silent" after
11242 "fork_inferior".
11243 * target.h (target_terminal_init): Move prototype to
11244 "target/target.h".
11245 (target_terminal_inferior): Likewise.
11246 (target_terminal_ours): Likewise.
11247 * target/target.h (target_terminal_init): New prototype, moved
11248 from "target.h".
11249 (target_terminal_inferior): Likewise.
11250 (target_terminal_ours): Likewise.
11251 * utils.c (gdb_flush_out_err): New function.
11252
043a4934
SDJ
112532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11254
11255 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11256 * common/common-gdbthread.h: New file, with parts from
11257 "gdb/gdbthread.h".
11258 * gdbthread.h: Include "common-gdbthread.h".
11259 (switch_to_thread): Moved to "common/common-gdbthread.h".
11260
15652511
SDJ
112612017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11262
11263 * Makefile.in (SFILES): Add "common/job-control.c".
11264 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11265 (COMMON_OBS): Add "job-control.o".
11266 * common/job-control.c: New file, with contents from
11267 "gdb/inflow.c".
11268 * common/job-control.h: New file, with contents from "terminal.h".
11269 * fork-child.c: Include "job-control.h".
11270 * inflow.c: Include "job-control.h".
11271 (gdb_setpgid): Move to "common/common-inflow.c".
11272 (_initialize_inflow): Move setting of "job_control" to
11273 "handle_job_control".
11274 * terminal.h (job_control): Moved to "common/common-terminal.h".
11275 (gdb_setpgid): Likewise.
11276 * top.c: Include "job_control.h".
11277 * utils.c: Likewise.
11278 (job_control): Moved to "job-control.c".
11279
2d7cc5c7
PA
112802017-06-07 Pedro Alves <palves@redhat.com>
11281
11282 * Makefile.in (SFILES): Add gdb_regex.c.
11283 (COMMON_OBS): Add gdb_regex.o.
11284 * ada-lang.c (ada_add_standard_exceptions)
11285 (ada_add_exceptions_from_frame, name_matches_regex)
11286 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11287 parameter type to compiled_regex. Adjust.
11288 (ada_exceptions_list): Use compiled_regex.
11289 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11290 std::unique_ptr<compiled_regex>.
11291 (exception_catchpoint::~exception_catchpoint): Remove regfree
11292 call.
11293 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11294 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11295 * breakpoint.c (solib_catchpoint::compiled): Now a
11296 std::unique_ptr<compiled_regex>.
11297 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11298 (check_status_catch_solib): Adjust to use compiled_regex.
11299 (add_solib_catchpoint): Adjust to use compiled_regex.
11300 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11301 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11302 compiled_regex reference. Adjust to use it.
11303 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11304 declaration. Include "gdb_regex.h".
11305 (apropos_cmd): Change regex parameter to compiled_regex reference.
11306 * gdb_regex.c: New file.
11307 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11308 declarations.
11309 (class compiled_regex): New.
11310 * linux-tdep.c: Include "common/gdb_optional.h".
11311 (struct mapping_regexes): New, factored out from
11312 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11313 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11314 gdb::optional and remove cleanups. Adjust to compiled_regex.
11315 * probe.c: Include "common/gdb_optional.h".
11316 (collect_probes): Use compiled_regex and gdb::optional and remove
11317 cleanups.
11318 * skip.c: Include "common/gdb_optional.h".
11319 (skiplist_entry::compiled_function_regexp): Now a
11320 gdb::optional<compiled_regex>.
11321 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11322 (free_skiplist_entry): Remove regfree call.
11323 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11324 compiled_regex and gdb::optional.
11325 * symtab.c: Include "common/gdb_optional.h".
11326 (search_symbols): Use compiled_regex and gdb::optional.
11327 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11328 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11329 to gdb_regex.c.
11330
50d6adef
AH
113312017-06-07 Alan Hayward <alan.hayward@arm.com>
11332
11333 * regcache.c (regcache::save): Avoid buffer use.
11334 (regcache::dump): Likewise.
11335
4a8a33c8
AH
113362017-06-07 Alan Hayward <alan.hayward@arm.com>
11337
11338 * sh-tdep.c (sh_pseudo_register_read): Remove
11339 MAX_REGISTER_SIZE.
11340 (sh_pseudo_register_write): Likewise.
11341 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11342 (sh64_pseudo_register_write): Likewise
11343
d1be909e
AH
113442017-06-07 Alan Hayward <alan.hayward@arm.com>
11345
11346 * aarch64-tdep.c (aarch64_store_return_value): Use
11347 V_REGISTER_SIZE.
11348 (aarch64_pseudo_read_value): Likewise.
11349 (aarch64_pseudo_write): Likewise.
11350
f4a65042
YQ
113512017-06-06 Yao Qi <yao.qi@linaro.org>
11352
11353 * regformats/regdef.h (set_register_cache): Remove the
11354 declaration.
11355
9f7fb0aa
AH
113562017-06-06 Alan Hayward <alan.hayward@arm.com>
11357
11358 * frame.c (frame_unwind_register_signed): Use
11359 frame_unwind_register_value.
11360
e1e01040
PA
113612017-06-06 Pedro Alves <palves@redhat.com>
11362
11363 PR breakpoints/21553
11364 * breakpoint.c (create_breakpoints_sal_default)
11365 (init_breakpoint_sal, create_breakpoint_sal): Use
11366 gdb::unique_xmalloc_ptr for string parameters.
11367 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11368 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11369 (base_breakpoint_create_breakpoints_sal)
11370 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11371 (strace_marker_create_breakpoints_sal)
11372 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11373 string parameters.
11374 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11375 gdb::unique_xmalloc_ptr for string parameters.
11376 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11377 parameters.
11378
fbe654c8
AH
113792017-06-06 Alan Hayward <alan.hayward@arm.com>
11380
11381 * alpha-tdep.c (alpha_register_to_value): Use
11382 get_frame_register_value.
11383 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11384
ae0d01d6
AH
113852017-06-06 Alan Hayward <alan.hayward@arm.com>
11386
11387 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11388 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11389 (ia64_value_to_register): Likewise.
11390 (ia64_extract_return_value): Likewise.
11391 (ia64_store_return_value): Likewise.
11392 (ia64_push_dummy_call): Likewise.
11393
49cf576c
JB
113942017-06-04 Joel Brobecker <brobecker@adacore.com>
11395
11396 GDB 8.0 released.
11397
26b6a6ab
SM
113982017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11399
11400 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11401
22827c51
SM
114022017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11403
11404 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11405 parameter.
11406 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11407
0e05cf3a
SM
114082017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11409
11410 * event-loop.c (poll_timers): Unallocate timer using delete
11411 instead of xfree.
11412
c1fc2657
SM
114132017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11414
11415 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11416 (struct breakpoint) <~breakpoint>: New.
11417 (struct watchpoint): Inherit from breakpoint.
11418 <~watchpoint>: New.
11419 <base>: Remove.
11420 (struct tracepoint): Inherit from breakpoint.
11421 <base>: Remove.
11422 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11423 (struct longjmp_breakpoint): Inherit from breakpoint.
11424 <~longjmp_breakpoint>: New.
11425 <base>: Remove.
11426 (new_breakpoint_from_type): Remove casts.
11427 (watchpoint_in_thread_scope): Remove reference to base field.
11428 (watchpoint_del_at_next_stop): Likewise.
11429 (update_watchpoint): Likewise.
11430 (watchpoint_check): Likewise.
11431 (bpstat_check_watchpoint): Likewise.
11432 (set_longjmp_breakpoint): Likewise.
11433 (struct fork_catchpoint): Inherit from breakpoint.
11434 <base>: Remove.
11435 (struct solib_catchpoint): Inherit from breakpoint.
11436 <~solib_catchpoint>: New.
11437 <base>: Remove.
11438 (dtor_catch_solib): Change to ...
11439 (solib_catchpoint::~solib_catchpoint): ... this.
11440 (breakpoint_hit_catch_solib): Remove reference to base field.
11441 (add_solib_catchpoint): Likewise.
11442 (create_fork_vfork_event_catchpoint): Likewise.
11443 (struct exec_catchpoint): Inherit from breakpoint.
11444 <~exec_catchpoint>: New.
11445 <base>: Remove.
11446 (dtor_catch_exec): Change to ...
11447 (exec_catchpoint::~exec_catchpoint): ... this.
11448 (dtor_watchpoint): Change to ...
11449 (watchpoint::~watchpoint): ... this.
11450 (watch_command_1): Remove reference to base field.
11451 (catch_exec_command_1): Likewise.
11452 (base_breakpoint_dtor): Change to ...
11453 (breakpoint::~breakpoint): ... this.
11454 (base_breakpoint_ops): Remove dtor field value.
11455 (longjmp_bkpt_dtor): Change to ...
11456 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11457 (strace_marker_create_breakpoints_sal): Remove reference to base
11458 field.
11459 (delete_breakpoint): Don't manually call breakpoint destructor.
11460 (create_tracepoint_from_upload): Remove reference to base field.
11461 (trace_pass_set_count): Likewise.
11462 (initialize_breakpoint_ops): Don't initialize
11463 momentary_breakpoint_ops, don't set dtors.
11464 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11465 <~ada_catchpoint>: New.
11466 <base>: Remove.
11467 (create_excep_cond_exprs): Remove reference to base field.
11468 (dtor_exception): Change to ...
11469 (ada_catchpoint::~ada_catchpoint): ... this.
11470 (dtor_catch_exception): Remove.
11471 (dtor_catch_exception_unhandled): Remove.
11472 (dtor_catch_assert): Remove.
11473 (create_ada_exception_catchpoint): Remove reference to base
11474 field.
11475 (initialize_ada_catchpoint_ops): Don't set dtors.
11476 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11477 breakpoint.
11478 <~signal_catchpoint>: New.
11479 <base>: Remove.
11480 (signal_catchpoint_dtor): Change to ...
11481 (signal_catchpoint::~signal_catchpoint): ... this.
11482 (create_signal_catchpoint): Remove reference to base field.
11483 (initialize_signal_catchpoint_ops): Don't set dtor.
11484 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11485 from breakpoint.
11486 <~syscall_catchpoint>: New.
11487 <base>: Remove.
11488 (dtor_catch_syscall): Change to ...
11489 (syscall_catchpoint::~syscall_catchpoint): ... this.
11490 (create_syscall_event_catchpoint): Remove reference to base
11491 field.
11492 (initialize_syscall_catchpoint_ops): Don't set dtor.
11493 * break-catch-throw.c (struct exception_catchpoint): Inherit
11494 from breakpoint.
11495 <~exception_catchpoint>: New.
11496 <base>: Remove.
11497 (dtor_exception_catchpoint): Change to ...
11498 (exception_catchpoint::~exception_catchpoint): ... this.
11499 (handle_gnu_v3_exceptions): Remove reference to base field.
11500 (initialize_throw_catchpoint_ops): Don't set dtor.
11501 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11502 field.
11503 * remote.c (remote_get_tracepoint_status): Likewise.
11504 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11505 * tracefile.c (tracefile_fetch_registers): Likewise.
11506 * tracepoint.c (actions_command): Likewise.
11507 (validate_actionline): Likewise.
11508 (tfind_1): Likewise.
11509 (get_traceframe_location): Likewise.
11510 (find_matching_tracepoint_location): Likewise.
11511 (parse_tracepoint_status): Likewise.
11512 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11513
3b0871f4
SM
115142017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11515
11516 * breakpoint.c (struct longjmp_breakpoint): New struct.
11517 (is_tracepoint_type): Change return type to bool.
11518 (is_longjmp_type): New function.
11519 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11520 (set_raw_breakpoint_without_location): Use
11521 new_breakpoint_from_type.
11522 (set_raw_breakpoint): Likewise.
11523
a5e364af
SM
115242017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11525
11526 * breakpoint.c (new_breakpoint_from_type): New function.
11527 (create_breakpoint_sal): Use new_breakpoint_from_type and
11528 unique_ptr.
11529 (create_breakpoint): Likewise.
11530
ae3b3f34
SM
115312017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11532
11533 * memattr.c (mem_info_command): Rename to ...
11534 (info_mem_command): ... this.
11535 (mem_enable_command): Rename to ...
11536 (enable_mem_command): ... this.
11537 (mem_disable_command): Rename to ...
11538 (disable_mem_command): ... this.
11539 (mem_delete_command): Rename to ...
11540 (delete_mem_command): ... this.
11541 (_initialize_mem): Adjust function names.
11542
13ace077
MM
115432017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11544
11545 * btrace.c (handle_pt_insn_events): New.
11546 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11547 STATUS. Split into this and ...
11548 (handle_pt_insn_event_flags): ... this.
11549
c56ccc05
MM
115502017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11551
11552 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11553 and struct pt_insn.resynced.
11554 * configure: Regenerated.
11555 * config.in: Regenerated.
11556
08c3f6d2
TW
115572017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11558
11559 * btrace.c (ftrace_find_call_by_number): New function.
11560 (ftrace_new_function): Store objects, not pointers.
11561 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11562 ftrace_new_gap, ftrace_update_function,
11563 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11564 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11565 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11566 btrace_ends_with_single_insn, btrace_call_get): Account for
11567 btrace_thread_info::functions now storing objects.
11568 * btrace.h (struct btrace_thread_info): Add constructor.
11569 (struct btrace_thread_info) <functions>: Make std::vector.
11570 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11571 Initialize with default values.
11572 * record-btrace.c (record_btrace_frame_sniffer): Account for
11573 btrace_thread_info::functions now storing objects.
11574
8ffd39f2
TW
115752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11576
11577 * btrace.c: Remove typedef bfun_s.
11578 (ftrace_new_gap): Directly add gaps to the list of gaps.
11579 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11580 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11581 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11582 instead of gdb VEC.
11583
4aeb0dfc
TW
115842017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11585
11586 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11587 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11588 with btrace_thread_info::next_segment and
11589 btrace_thread_info::prev_segment.
11590 * btrace.h: Remove struct btrace_func_link.
11591 (struct btrace_function): Replace pair of function segment pointers
11592 with pair of indices.
11593 * python/py-record-btrace.c (btpy_call_prev_sibling,
11594 btpy_call_next_sibling): Replace references to
11595 btrace_thread_info::segment with btrace_thread_info::next_segment and
11596 btrace_thread_info::prev_segment.
11597 * record-btrace.c (record_btrace_frame_this_id): Use
11598 btrace_find_call_by_number.
11599
eb8f2b9c
TW
116002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11601
11602 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11603 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11604 btrace_insn_next, btrace_insn_prev): Remove references to
11605 btrace_thread_info::flow.
11606 * btrace.h (struct btrace_function): Remove FLOW.
11607
42bfe59e
TW
116082017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11609
11610 * btrace.c (ftrace_find_call_by_number): New function.
11611 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11612 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11613 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11614 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11615 index.
11616 * btrace.h (struct btrace_function): Turn UP into an index.
11617 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11618 as an index.
11619 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11620 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11621 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11622
b54b03bd
TW
116232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11624
11625 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11626 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11627 ftrace_update_function, ftrace_compute_global_level_offset,
11628 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11629 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11630 btrace_insn_end, btrace_is_empty): Remove references to
11631 btrace_thread_info::begin and btrace_thread_info::end.
11632 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11633 (struct btrace_thread_info) <functions>: Adjust comment.
11634 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11635 btrace_thread_info::begin.
11636
8286623c
TW
116372017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11638
11639 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11640 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11641 ftrace_update_function): Remove arguments that implicitly were always
11642 BTINFO->END.
11643 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11644 Don't pass BTINFO->END.
11645
a0f1b963
TW
116462017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11647
11648 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11649 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11650 btrace_find_insn_by_number): Replace function segment pointer with
11651 index.
11652 (btrace_insn_cmp): Simplify.
11653 * btrace.h: (struct btrace_insn_iterator) Rename index to
11654 insn_index. Replace function segment pointer with index into function
11655 segment vector.
11656 * record-btrace.c (record_btrace_call_history): Replace function
11657 segment pointer use with index.
11658 (record_btrace_frame_sniffer): Retrieve function call segment through
11659 vector.
11660 (record_btrace_set_replay): Remove defunc't safety check.
11661
f158f208
TW
116622017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11663
11664 * btrace.c (btrace_ends_with_single_insn): New function.
11665 (btrace_call_get, btrace_call_number, btrace_call_begin,
11666 btrace_call_end, btrace_call_next, btrace_call_prev,
11667 btrace_find_call_by_number): Use index into call segment vector
11668 instead of pointer.
11669 (btrace_call_cmp): Simplify.
11670 * btrace.h (struct btrace_call_iterator): Replace function call segment
11671 pointer with index into vector.
11672 * record-btrace.c (record_btrace_call_history): Use index instead of
11673 pointer.
11674
521103fd
TW
116752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11676
11677 * btrace.c (btrace_insn_begin, btrace_insn_end,
11678 btrace_find_insn_by_number): Add btinfo to iterator.
11679 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11680
17b89b34
TW
116812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11682
11683 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11684 and save pointers directly.
11685 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11686 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11687 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11688 changed signature of functions.
11689 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11690 (btrace_fetch): Remove code that adds btrace_function pointers to
11691 vector of btrace_functions.
11692 (btrace_clear): Simplify freeing vector of btrace_functions.
11693
2b51eddc
TW
116942017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11695
11696 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11697 Replace VEC_* with std::vector functions.
11698 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11699 (struct btrace_thread_info)<functions>: Change type to std::vector.
11700
db6be0d5
SM
117012017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11702
11703 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11704 "Removed targets and native configurations" up. Merge duplicate
11705 "New commands" sub-sections. Add "New options" sub-sections.
11706
b057297a
AH
117072017-05-26 Alan Hayward <alan.hayward@arm.com>
11708
11709 * defs.h (copy_integer_to_size): New declaration.
11710 * findvar.c (copy_integer_to_size): New function.
11711 (do_cint_test): New selftest function.
11712 (copy_integer_to_size_test): Likewise.
11713 (_initialize_findvar): Likewise.
11714 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11715 (mips_fbsd_collect_reg): Use raw_collect_integer.
11716 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11717 (mips64_fill_gregset): Use raw_collect_integer
11718 (mips64_fill_fpregset): Use raw_supply_integer.
11719 * regcache.c (regcache::raw_supply_integer): New function.
11720 (regcache::raw_collect_integer): Likewise.
11721 * regcache.h: (regcache::raw_supply_integer): New declaration.
11722 (regcache::raw_collect_integer): Likewise.
11723
b77b02a5
YQ
117242017-05-24 Yao Qi <yao.qi@linaro.org>
11725
11726 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11727 (COMMON_OBS): Add gdbarch-selftests.o.
11728 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11729 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11730 * gdbarch-selftests.c: New file.
11731 * regcache.h (regcache) <~regcache>: Mark it virtual if
11732 GDB_SELF_TEST.
11733 <raw_write>: Likewise.
11734
e521e87e
YQ
117352017-05-24 Yao Qi <yao.qi@linaro.org>
11736
11737 * regcache.c (current_regcache): Change it to
11738 regcache::current_regcache.
11739 (regcache_observer_target_changed): Update.
11740 (regcache_thread_ptid_changed): Make it a regcache static
11741 method.
11742 (regcache_thread_ptid_changed): Update.
11743 (class regcache_access): New.
11744 (current_regcache_test): Update.
11745 (_initialize_regcache): Update.
11746 * regcache.h: Include forward_list.
11747 (regcache): Declare regcache_thread_ptid_changed and declare
11748 registers_changed_ptid as friend.
11749
d8e07dda
YQ
117502017-05-24 Yao Qi <yao.qi@linaro.org>
11751
11752 * i387-tdep.c (i387_register_to_value): Use register_size
11753 instead of TYPE_LENGTH.
11754 * m68k-tdep.c (m68k_register_to_value): Likewise.
11755
8c8f9122
YQ
117562017-05-24 Yao Qi <yao.qi@linaro.org>
11757
11758 * i387-tdep.c (i387_convert_register_p): Return false if type
11759 code isn't TYPE_CODE_FLT.
11760
68fce50f
YQ
117612017-05-24 Yao Qi <yao.qi@linaro.org>
11762
11763 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11764 length is 4.
11765 (alpha_register_to_value): Remove type length check.
11766 (alpha_value_to_register): Likewise.
11767
88954b49
YQ
117682017-05-24 Yao Qi <yao.qi@linaro.org>
11769
11770 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11771 TYPE_CODE_FLT.
11772
e3ec9b69
YQ
117732017-05-24 Yao Qi <yao.qi@linaro.org>
11774
11775 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11776 TYPE_CODE_FLT or not.
11777
cdd238da
YQ
117782017-05-24 Yao Qi <yao.qi@linaro.org>
11779
11780 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11781 * avr-tdep.c (avr_gdbarch_init): Likewise.
11782 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11783 * cris-tdep.c (cris_gdbarch_init): Likewise.
11784 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11785 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11786 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11787 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11788 * mep-tdep.c (mep_gdbarch_init): Likewise.
11789 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11790 * mips-tdep.c (mips_gdbarch_init): Likewise.
11791 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11792 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11793 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11794 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11795 * v850-tdep.c (v850_gdbarch_init): Likewise.
11796
7a3929c4
YQ
117972017-05-24 Yao Qi <yao.qi@linaro.org>
11798
11799 * selftest-arch.c (tests_with_arch): Call registers_changed
11800 and reinit_frame_cache.
11801 * selftest.c (run_self_tests): Likewise.
11802
f4985dba
YQ
118032017-05-24 Yao Qi <yao.qi@linaro.org>
11804
11805 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11806 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11807
ab20fa4a
YQ
118082017-05-24 Yao Qi <yao.qi@linaro.org>
11809
11810 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11811 set_gdbarch_print_insn.
11812
f532ab94
YQ
118132017-05-24 Yao Qi <yao.qi@linaro.org>
11814
11815 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11816 set_gdbarch_print_insn.
11817
39503f82
YQ
118182017-05-24 Yao Qi <yao.qi@linaro.org>
11819
11820 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11821 set_gdbarch_print_insn.
11822 * arc-tdep.c (arc_gdbarch_init): Likewise.
11823 * arch-utils.c: include dis-asm.h.
11824 (default_print_insn): New function.
11825 * arch-utils.h (default_print_insn): Declare.
11826 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11827 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11828 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11829 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11830 * frv-tdep.c (frv_gdbarch_init): Likewise.
11831 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11832 * gdbarch.sh (print_insn): Use default_print_insn.
11833 * gdbarch.c: Regenerated.
11834 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11835 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11836 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11837 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11838 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11839 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11840 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11841 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11842 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11843 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11844 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11845 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11846 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11847 * mt-tdep.c (mt_gdbarch_init): Likewise.
11848 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11849 * nios2-tdep.c (nios2_print_insn): Remove.
11850 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11851 * rx-tdep.c (rx_gdbarch_init): Likewise.
11852 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11853 * score-tdep.c (score_print_insn): Remove.
11854 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11855 * sh-tdep.c (sh_gdbarch_init): Likewise.
11856 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11857 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11858 * tic6x-tdep.c (tic6x_print_insn): Remove.
11859 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11860 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11861 * v850-tdep.c (v850_gdbarch_init): Likewise.
11862 * vax-tdep.c (vax_gdbarch_init): Likewise.
11863 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11864 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11865
f7241d4f
JB
118662017-05-23 John Baldwin <jhb@FreeBSD.org>
11867
11868 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11869 (MIPS_FP0_REGNUM): Remove.
11870 (MIPS_FSR_REGNUM): Remove.
11871 (mips_fbsd_supply_fpregs): Use mips_regnum.
11872 (mips_fbsd_supply_gregs): Likewise.
11873 (mips_fbsd_collect_fpregs): Likewise.
11874 (mips_fbsd_collect_gregs): Likewise.
11875
d489d81d
JB
118762017-05-23 John Baldwin <jhb@FreeBSD.org>
11877
11878 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11879 (getpfpregs_supplies): New function.
11880 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11881 getfpregs_supplies.
11882 (mips_fbsd_store_inferior_registers): Likewise.
11883
e11b3cdc
PA
118842017-05-22 Pedro Alves <palves@redhat.com>
11885
11886 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11887 maintainer.
11888
0f068fb5
AH
118892017-05-22 Alan Hayward <alan.hayward@arm.com>
11890
11891 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11892 (store_register): Likewise.
11893 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11894 (get_decimal_float_return_value): Likewise.
11895 (do_ppc_sysv_return_value): Likewise.
11896 (ppc64_sysv_abi_push_integer): Likewise.
11897 (ppc64_sysv_abi_push_freg): Likewise.
11898 (ppc64_sysv_abi_return_value_base): Likewise.
11899 (ppc64_sysv_abi_return_value): Likewise.
11900 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11901 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11902 * rs6000-nat.c: Likewise.
11903 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11904 (rs6000_value_to_register): Likewise.
11905 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11906
e6cf65f2
TT
119072017-05-21 Tom Tromey <tom@tromey.com>
11908
11909 PR rust/21466:
11910 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11911 arrays as "[T]", not "[T; ]".
11912
43cc5389
TT
119132017-05-19 Tom Tromey <tom@tromey.com>
11914
11915 PR rust/21484:
11916 * rust-lang.c (exp_descriptor_rust): New function.
11917 (rust_language_defn): Use it.
11918 * p-lang.c (pascal_language_defn): Update.
11919 * opencl-lang.c (opencl_language_defn): Update.
11920 * objc-lang.c (objc_language_defn): Update.
11921 * m2-lang.c (m2_language_defn): Update.
11922 * language.h (struct language_defn)
11923 <la_watch_location_expression>: New member.
11924 * language.c (unknown_language_defn, auto_language_defn)
11925 (local_language_defn): Update.
11926 * go-lang.c (go_language_defn): Update.
11927 * f-lang.c (f_language_defn): Update.
11928 * d-lang.c (d_language_defn): Update.
11929 * c-lang.h (c_watch_location_expression): Declare.
11930 * c-lang.c (c_watch_location_expression): New function.
11931 (c_language_defn, cplus_language_defn, asm_language_defn)
11932 (minimal_language_defn): Use it.
11933 * breakpoint.c (watch_command_1): Call
11934 la_watch_location_expression.
11935 * ada-lang.c (ada_language_defn): Update.
11936
7a6e7fcc
RO
119372017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11938
6e7e1744
RO
11939 PR tui/21482
11940 * gdb_curses.h (NOMACROS): Define.
11941 (NCURSES_NOMACROS): Define.
11942
119432017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11944
11945 PR tui/21482
7a6e7fcc
RO
11946 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11947 arg to char *.
11948 * tui/tui-wingeneral.c (box_win): Likewise.
11949 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11950 (tui_show_source_line): Likewise.
11951 (tui_show_exec_info_content): Likewise.
11952
1933fd8e
VM
119532017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11954
11955 * sparc-tdep.c (sparc_structure_return_p)
11956 (sparc_arg_on_registers_p): New functions.
11957 (sparc32_store_arguments): Use them.
11958 * sparc64-tdep.c (sparc64_16_byte_align_p)
11959 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11960 Handle TYPE_CODE_ARRAY.
11961
21873064
YQ
119622017-05-17 Yao Qi <yao.qi@linaro.org>
11963
11964 * cli/cli-decode.c (add_alias_cmd): New function.
11965 * command.h (add_alias_cmd): Declare.
11966 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11967 instead call add_alias_cmd.
11968
2b351b19
PA
119692017-05-17 Pedro Alves <palves@redhat.com>
11970
11971 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11972 (nat_makefile_frag): ... this. All references updated.
11973 * configure.ac: Likewise.
11974 * configure.nat: Likewise. Enhance comments.
11975 * configure: Regenerate.
11976
5f2ad7a3
RO
119772017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11978
11979 * procfs.c (procfs_create_inferior): Change prototype to match
11980 definition.
11981
adf3dde5
EZ
119822017-05-13 Eli Zaretskii <eliz@gnu.org>
11983
11984 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11985 C++ compiler warning.
11986
6830f270
TT
119872017-05-12 Tom Tromey <tom@tromey.com>
11988
11989 PR rust/21483:
11990 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11991 recurse, just call value_struct_elt directly.
11992
68f2f2e3
TT
119932017-05-12 Tom Tromey <tom@tromey.com>
11994
11995 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11996 OP_RUST_ARRAY>: Fix.
11997
256afbc2
TT
119982017-05-12 Tom Tromey <tom@tromey.com>
11999
12000 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12001
94bb8dfe
YQ
120022017-05-09 Yao Qi <yao.qi@linaro.org>
12003
12004 * regcache.c: Include <forward_list>.
12005 (struct regcache_list): Remove.
12006 (current_regcache): Update.
12007 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12008 (regcache_thread_ptid_changed): Likewise.
12009 (registers_changed_ptid): Likewise.
12010 (current_regcache_size): Likewise.
12011
8248946c
YQ
120122017-05-09 Yao Qi <yao.qi@linaro.org>
12013
12014 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12015 (current_regcache_size): New function.
12016 (current_regcache_test): New function.
12017 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12018
313c5961
AH
120192017-05-08 Alan Hayward <alan.hayward@arm.com>
12020
12021 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12022 (print_gp_register_row): Use get_frame_register_value.
12023
27bfc1d1
AH
120242017-05-08 Alan Hayward <alan.hayward@arm.com>
12025
12026 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12027 (mips_supply_fpregset): Likewise.
12028 (mips64_supply_gregset): Likewise.
12029
146e6c5c
AH
120302017-05-08 Alan Hayward <alan.hayward@arm.com>
12031
12032 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12033 regcache->raw_supply_zeroed.
12034
e50f25ec
SDJ
120352017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12036
12037 * configure.nat: Rearrange 'case' statements to match
12038 host before cpu.
12039
21ea5acd
SDJ
120402017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12041
12042 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12043 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12044 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12045 "@nat_extra_makefile_frag@".
12046 (Makefile): Remove dependency on "@frags@".
12047 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12048 (data-directory/Makefile): Likewise.
12049 * config/aarch64/linux.mh: Deleted; moved contents to
12050 "gdb/configure.nat".
12051 * config/alpha/alpha-linux.mh: Likewise.
12052 * config/alpha/nbsd.mh: Likewise.
12053 * config/arm/linux.mh: Likewise.
12054 * config/arm/nbsdelf.mh: Likewise.
12055 * config/i386/cygwin.mh: Likewise.
12056 * config/i386/cygwin64.mh: Likewise.
12057 * config/i386/darwin.mh: Likewise.
12058 * config/i386/fbsd.mh: Likewise.
12059 * config/i386/fbsd64.mh: Likewise.
12060 * config/i386/go32.mh: Likewise.
12061 * config/i386/i386gnu.mh: Likewise.
12062 * config/i386/i386sol2.mh: Likewise.
12063 * config/i386/linux.mh: Likewise.
12064 * config/i386/linux64.mh: Likewise.
12065 * config/i386/mingw.mh: Likewise.
12066 * config/i386/mingw64.mh: Likewise.
12067 * config/i386/nbsd64.mh: Likewise.
12068 * config/i386/nbsdelf.mh: Likewise.
12069 * config/i386/nto.mh: Likewise.
12070 * config/i386/obsd.mh: Likewise.
12071 * config/i386/obsd64.mh: Likewise.
12072 * config/i386/sol2-64.mh: Likewise.
12073 * config/ia64/linux.mh: Likewise.
12074 * config/m32r/linux.mh: Likewise.
12075 * config/m68k/linux.mh: Likewise.
12076 * config/m68k/nbsdelf.mh: Likewise.
12077 * config/m68k/obsd.mh: Likewise.
12078 * config/m88k/obsd.mh: Likewise.
12079 * config/mips/fbsd.mh: Likewise.
12080 * config/mips/linux.mh: Likewise.
12081 * config/mips/nbsd.mh: Likewise.
12082 * config/mips/obsd64.mh: Likewise.
12083 * config/pa/linux.mh: Likewise.
12084 * config/pa/nbsd.mh: Likewise.
12085 * config/pa/obsd.mh: Likewise.
12086 * config/powerpc/aix.mh: Likewise.
12087 * config/powerpc/fbsd.mh: Likewise.
12088 * config/powerpc/linux.mh: Likewise.
12089 * config/powerpc/nbsd.mh: Likewise.
12090 * config/powerpc/obsd.mh: Likewise.
12091 * config/powerpc/ppc64-linux.mh: Likewise.
12092 * config/powerpc/spu-linux.mh: Likewise.
12093 * config/s390/linux.mh: Likewise.
12094 * config/sh/nbsd.mh: Likewise.
12095 * config/sparc/fbsd.mh: Likewise.
12096 * config/sparc/linux.mh: Likewise.
12097 * config/sparc/linux64.mh: Likewise.
12098 * config/sparc/nbsd64.mh: Likewise.
12099 * config/sparc/nbsdelf.mh: Likewise.
12100 * config/sparc/obsd64.mh: Likewise.
12101 * config/sparc/sol2.mh: Likewise.
12102 * config/tilegx/linux.mh: Likewise.
12103 * config/vax/nbsdelf.mh: Likewise.
12104 * config/vax/obsd.mh: Likewise.
12105 * config/xtensa/linux.mh: Likewise.
12106 * config/i386/i386gnu.mn: New file, with excerpts from
12107 "config/i386/i386gnu.mh".
12108 * configure: Regenerate.
12109 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12110 *.mh files under "gdb/config".
12111 * configure.nat: New file, with contents from the
12112 "gdb/config/*/*.mh" files.
12113
7ed1acaf
TW
121142017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12115
12116 * btrace.c (btrace_clear): Free insn vector.
12117
e13cb306
PA
121182017-05-05 Pedro Alves <palves@redhat.com>
12119
12120 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12121 * configure: Regenerate.
12122
5ed8105e
PA
121232017-05-04 Pedro Alves <palves@redhat.com>
12124
12125 * Makefile.in (SFILES): Add progspace-and-thread.c.
12126 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12127 (COMMON_OBS): Add progspace-and-thread.o.
12128 * breakpoint.c: Include "progspace-and-thread.h".
12129 (update_inserted_breakpoint_locations)
12130 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12131 Use scoped_restore_current_pspace_and_thread.
12132 (create_std_terminate_master_breakpoint): Use
12133 scoped_restore_current_program_space.
12134 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12135 (print_breakpoint_location): Use
12136 scoped_restore_current_program_space.
12137 (bp_loc_is_permanent): Use
12138 scoped_restore_current_pspace_and_thread.
12139 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12140 (download_tracepoint_locations): Use
12141 scoped_restore_current_pspace_and_thread.
12142 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12143 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12144 (enum step_over_calls_kind): Moved from inferior.h.
12145 (class scoped_restore_current_thread): New class.
12146 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12147 declaration.
12148 (scoped_restore_current_thread): New class.
12149 * infcmd.c: Include "common/gdb_optional.h".
12150 (continue_1, proceed_after_attach): Use
12151 scoped_restore_current_thread.
12152 (notice_new_inferior): Use scoped_restore_current_thread.
12153 * inferior.c: Include "progspace-and-thread.h".
12154 (restore_inferior, save_current_inferior): Delete.
12155 (add_inferior_command, clone_inferior_command): Use
12156 scoped_restore_current_pspace_and_thread.
12157 * inferior.h (scoped_restore_current_inferior): New class.
12158 * infrun.c: Include "progspace-and-thread.h" and
12159 "common/gdb_optional.h".
12160 (follow_fork_inferior): Use
12161 scoped_restore_current_pspace_and_thread.
12162 (scoped_restore_exited_inferior): New class.
12163 (handle_vfork_child_exec_or_exit): Use
12164 scoped_restore_exited_inferior,
12165 scoped_restore_current_pspace_and_thread,
12166 scoped_restore_current_thread and scoped_restore.
12167 (fetch_inferior_event): Use scoped_restore_current_thread.
12168 * linespec.c (decode_line_full, decode_line_1): Use
12169 scoped_restore_current_program_space.
12170 * mi/mi-main.c: Include "progspace-and-thread.h".
12171 (exec_continue): Use scoped_restore_current_thread.
12172 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12173 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12174 * proc-service.c (ps_pglobal_lookup): Use
12175 scoped_restore_current_program_space.
12176 * progspace-and-thread.c: New file.
12177 * progspace-and-thread.h: New file.
12178 * progspace.c (release_program_space, clone_program_space): Use
12179 scoped_restore_current_program_space.
12180 (restore_program_space, save_current_program_space)
12181 (save_current_space_and_thread): Delete.
12182 (switch_to_program_space_and_thread): Moved to
12183 progspace-and-thread.c.
12184 * progspace.h (save_current_program_space)
12185 (save_current_space_and_thread): Delete declarations.
12186 (scoped_restore_current_program_space): New class.
12187 * remote.c (remote_btrace_maybe_reopen): Use
12188 scoped_restore_current_thread.
12189 * symtab.c: Include "progspace-and-thread.h".
12190 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12191 * thread.c (print_thread_info_1): Use
12192 scoped_restore_current_thread.
12193 (struct current_thread_cleanup): Delete.
12194 (do_restore_current_thread_cleanup)
12195 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12196 (scoped_restore_current_thread::~scoped_restore_current_thread):
12197 ... this new dtor.
12198 (make_cleanup_restore_current_thread): Rename/convert to ...
12199 (scoped_restore_current_thread::scoped_restore_current_thread):
12200 ... this new ctor.
12201 (thread_apply_all_command): Use scoped_restore_current_thread.
12202 (thread_apply_command): Use scoped_restore_current_thread.
12203 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12204 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12205
f6223dbb
PA
122062017-05-04 Pedro Alves <palves@redhat.com>
12207
12208 * thread.c (make_cleanup_restore_current_thread): Move
12209 find_thread_ptid call before the is_stopped call. Assert that the
12210 thread is found. Replace is_stopped call by checking the thread's
12211 state directly. Remove unnecessary NULL-thread check.
12212
3c3ae77e
PA
122132017-05-04 Pedro Alves <palves@redhat.com>
12214
12215 * corelow.c (thread_section_name): New class.
12216 (get_core_register_section, get_core_siginfo): Use it.
12217
45eba0ab
AA
122182017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12219
12220 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12221 (get_core_register_section): Remove xfree of NULL pointer.
12222
f81fdd35
AH
122232017-05-03 Alan Hayward <alan.hayward@arm.com>
12224
12225 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12226 * regcache.c (regcache::raw_supply_zeroed): New function.
12227 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12228
35837774
SM
122292017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12230
12231 * gdbarch.sh: Remove commented out definition of
12232 TARGET_CHAR_BIT.
12233 * gdbarch.h: Re-generate.
12234
c94fee56
SDJ
122352017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12236
12237 * configure: Regenerate.
12238
d17f7b36
SM
122392017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12240
12241 * solib-target.c (solib_target_relocate_section_addresses):
12242 Remove num_section_bases, num_bases, segment_bases variables.
12243
b560ebd6
SM
122442017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12245
12246 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12247
f2f46dfc
SM
122482017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12249
12250 * solib-target.c: Include <vector>
12251 (struct lm_info_target) <~lm_info_target>: Remove.
12252 <segment_bases, section_bases>: Change type to
12253 std::vector<CORE_ADDR>.
12254 (library_list_start_segment, library_list_start_section,
12255 library_list_end_library,
12256 solib_target_relocate_section_addresses): Adjust.
12257
a0ff9e1a
SM
122582017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12259
12260 * gdbarch.sh (software_single_step): Change return type to
12261 std::vector<CORE_ADDR>.
12262 * gdbarch.c, gdbarch.h: Re-generate.
12263 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12264 Adjust.
12265 (arm_deal_with_atomic_sequence_raw): Adjust.
12266 (thumb_get_next_pcs_raw): Adjust.
12267 (arm_get_next_pcs_raw): Adjust.
12268 (arm_get_next_pcs): Adjust.
12269 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12270 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12271 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12272 (alpha_software_single_step): Adjust.
12273 * alpha-tdep.h (alpha_software_single_step): Adjust.
12274 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12275 * arm-tdep.c (arm_software_single_step): Adjust.
12276 (arm_breakpoint_kind_from_current_state): Adjust.
12277 * arm-tdep.h (arm_software_single_step): Adjust.
12278 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12279 * cris-tdep.c (cris_software_single_step): Adjust.
12280 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12281 (micromips_deal_with_atomic_sequence): Adjust.
12282 (deal_with_atomic_sequence): Adjust.
12283 (mips_software_single_step): Adjust.
12284 * mips-tdep.h (mips_software_single_step): Adjust.
12285 * moxie-tdep.c (moxie_software_single_step): Adjust.
12286 * nios2-tdep.c (nios2_software_single_step): Adjust.
12287 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12288 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12289 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12290 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12291 * sparc-tdep.c (sparc_software_single_step): Adjust.
12292 * spu-tdep.c (spu_software_single_step): Adjust.
12293 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12294
ea480a30
SM
122952017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12296
12297 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12298 * gdbarch.h: Re-generate.
12299
d050f7d7
TW
123002017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12301
12302 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12303 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12304 * python/py-instruction.c, python/py-instruction.h: New file.
12305 * python/py-record.c: Add py-instruction.h include.
12306 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12307 gdb.RecordInstruction.
12308 * python/python-internal.h: Add gdbpy_initialize_instruction
12309 declaration.
12310 * python/python.c (do_start_initialization): Add
12311 gdbpy_initialize_instruction.
12312
14f819c8
TW
123132017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12314
12315 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12316 Remove.
12317 (btrace_func_from_recpy_func): New function.
12318 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12319 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12320 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12321 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12322 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12323 Also, use new helper functions.
12324 (btpy_list_item): Use new helper functions.
12325 (recpy_bt_function_call_history): Use new type name.
12326 (btpy_call_getset): Remove.
12327 (gdbpy_initialize_btrace): Remove code to initialize
12328 gdb.BtraceFunctionCall.
12329 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12330 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12331 recpy_bt_func_prev, recpy_bt_func_next): New export.
12332 * python/py-record.c (recpy_func_type): New static object.
12333 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12334 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12335 recpy_func_next): New function.
12336 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12337 (recpy_func_getset): New static object.
12338 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12339 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12340
0ed5da75
TW
123412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12342
12343 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12344 (btpy_object, btpy_insn_type, btpy_new): Remove.
12345 (btpy_list_object): Use gdb.RecordInstruction type instead of
12346 gdb.BtraceInstruction type.
12347 (btrace_insn_from_recpy_insn): New function.
12348 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12349 btpy_new.
12350 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12351 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12352 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12353 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12354 instead of btpy_object.
12355 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12356 btpy_insn_data, btpy_insn_decode): Rename to ...
12357 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12358 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12359 recpy_bt_insn_decode): This. Also, use new helper functions.
12360 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12361 recpy_insn_type.
12362 (btpy_insn_getset): Remove.
12363 (gdbpy_initialize_btrace): Remove code to initialize
12364 gdb.BtraceInstruction. Use recpy_element_object.
12365 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12366 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12367 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12368 * python/py-record.c (recpy_insn_type): New static object.
12369 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12370 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12371 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12372 New function.
12373 (recpy_insn_getset): New static object.
12374 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12375 * python/py-record.h (recpy_element_object): New typedef.
12376 (recpy_insn_type, recpy_insn_new): New export.
12377
913aeadd
TW
123782017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12379
12380 * py-record-btrace.c (btpy_insn_new): Removed.
12381 (btpy_insn_or_gap_new): New function.
12382 (btpy_insn_error): Removed.
12383 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12384 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12385 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12386 btpy_insn_or_gap_new instead of btpy_insn_new.
12387 (btpy_insn_getset): Remove btpy_insn_error.
12388 * py-record.c (recpy_gap_type): New static object.
12389 (recpy_gap_object): New typedef.
12390 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12391 recpy_gap_reason_string): New function.
12392 (recpy_gap_getset): New static object.
12393 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12394 * py-record.h (recpy_gap_new): New export.
12395
a3be24ad
TW
123962017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12397
12398 * python/py-record.c (recpy_ptid): Remove.
12399 (recpy_record_getset): Remove recpy_ptid.
12400
ae20e79a
TW
124012017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12402
12403 * btrace.c (btrace_fetch): Set inferior_ptid.
12404 * python/py-record-btrace.c: Add "py-record.h" include.
12405 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12406 recpy_bt_end, recpy_bt_instruction_history,
12407 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12408 in gdb.Record object instead of current ptid.
12409 * python/py-record.c: Include new "py-record.h" file.
12410 (recpy_record_object): Moved to py-record.h.
12411 * python/py-record.h: New file.
12412
8d0050ea
TW
124132017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12414
12415 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12416 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12417 indentation.
12418
3f380b50
JB
124192017-05-01 Joel Brobecker <brobecker@adacore.com>
12420
12421 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12422 the past maintainers section.
12423
07495424
YQ
124242017-04-28 Yao Qi <yao.qi@linaro.org>
12425
12426 * infcmd.c (get_return_value): Use regcache ctor, and remove
12427 cleanup.
12428
deb1fa3e
YQ
124292017-04-28 Yao Qi <yao.qi@linaro.org>
12430 Pedro Alves <palves@redhat.com>
12431
12432 * regcache.c (regcache::regcache): New tag dispatch ctor.
12433 (do_cooked_read): Moved above.
12434 (regcache_dup): Use the tag dispatch ctor..
12435 * regcache.h (regcache): Declare ctor, delete copy ctor and
12436 assignment operator, remove friend regcache_dup.
12437
b421c83c
YQ
124382017-04-28 Yao Qi <yao.qi@linaro.org>
12439
12440 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12441 call method save instead of regcache_cpy.
12442 * regcache.h (struct regcache): Make regcache_dup a friend.
12443
ef79d9a3
YQ
124442017-04-28 Yao Qi <yao.qi@linaro.org>
12445
12446 * regcache.c (struct regcache): Move to regcache.h
12447 (regcache::arch): New method.
12448 (regcache_get_ptid): Update.
12449 (get_regcache_arch): Call arch method.
12450 (get_regcache_aspace): Call method aspace.
12451 (register_buffer): Change it to method.
12452 (regcache_save): Change it to regcache::save.
12453 (regcache_restore): Likewise.
12454 (regcache_cpy_no_passthrough): Remove the declaration.
12455 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12456 (regcache_cpy_no_passthrough): Change it to method
12457 cpy_no_passthrough.
12458 (regcache_register_status): Change it to method
12459 get_register_status.
12460 (regcache_invalidate): Change it to method invalidate.
12461 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12462 (regcache_raw_update): Change it to method raw_update.
12463 (regcache_raw_read): Likewise.
12464 (regcache_raw_read_signed): Likewise.
12465 (regcache_raw_read_unsigned): Likewise.
12466 (regcache_raw_write_signed): Likewise.
12467 (regcache_raw_write_unsigned): Likewise.
12468 (regcache_cooked_read): Likewise.
12469 (regcache_cooked_read_value): Likewise.
12470 (regcache_cooked_read_signed): Likewise.
12471 (regcache_cooked_read_unsigned): Likewise.
12472 (regcache_cooked_write_signed): Likewise.
12473 (regcache_cooked_write_unsigned): Likewise.
12474 (regcache_raw_set_cached_value): Likewise.
12475 (regcache_raw_write): Likewise.
12476 (regcache_cooked_write): Likewise.
12477 (regcache_xfer_part): Likewise.
12478 (regcache_raw_read_part): Likewise.
12479 (regcache_raw_write_part): Likewise.
12480 (regcache_cooked_read_part): Likewise.
12481 (regcache_cooked_write_part): Likewise.
12482 (regcache_raw_supply): Likewise.
12483 (regcache_raw_collect): Likewise.
12484 (regcache_transfer_regset): Likewise.
12485 (regcache_supply_regset): Likewise.
12486 (regcache_collect_regset): Likewise.
12487 (regcache_debug_print_register): Likewise.
12488 (enum regcache_dump_what): Move it to regcache.h.
12489 (regcache_dump): Change it to method dump.
12490 * regcache.h (enum regcache_dump_what): New.
12491 (class regcache): New.
12492 * target.c (target_fetch_registers): Call method
12493 debug_print_register.
12494 (target_store_registers): Likewise.
12495
f8fdb78e
SM
124962017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12497
12498 * windows-nat.c (struct lm_info_windows): Initialize field.
12499 (windows_make_so): Allocate lm_info_windows with new.
12500 (windows_free_so): Free lm_info_windows with delete.
12501
9ccbfd7b
SM
125022017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12503
12504 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12505 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12506 cleanup.
12507 (darwin_free_so): Free lm_info_darwin with delete.
12508
76e75227
SM
125092017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12510
12511 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12512 <l_addr_p>: Change type to bool.
12513 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12514 (svr4_free_so): Free lm_info_svr4 with delete.
12515 (svr4_copy_library_list): Replace memcpy with call to copy
12516 constructor.
12517 (library_list_start_library, svr4_default_sos): Allocate
12518 lm_info_svr4 with new.
12519
51046d9e
SM
125202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12521
12522 * solib-target.c (struct lm_info_target): Add destructor,
12523 initialize fields.
12524 <name>: Change type to std::string.
12525 (library_list_start_library): Allocate lm_info_target with new.
12526 (solib_target_free_library_list): Free lm_info_target with
12527 delete.
12528 (solib_target_current_sos): Adapt to std::string.
12529 (solib_target_free_so): Free lm_info_target with delete.
12530
4023ae76
SM
125312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12532
12533 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12534 fields.
12535 (frv_current_sos): Allocate lm_info_frv with new.
12536 (frv_relocate_main_executable): Free lm_info_frv with delete,
12537 allocate with new.
12538 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12539
af43057b
SM
125402017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12541
12542 * solib-frv.c (struct lm_info_frv): Fix indentation.
12543
b0911207
SM
125442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12545
12546 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12547 map field.
12548 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12549 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12550 and allocate with new.
12551 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12552
6c401f72
SM
125532017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12554
12555 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12556 <filename, member_name>: Change type to std::string.
12557 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12558 (library_list_start_library): Allocate lm_info_aix with new.
12559 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12560 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12561 with copy constructor.
12562
d0e449a1
SM
125632017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12564
12565 * solist.h (struct lm_info): Remove.
12566 (struct lm_info_base): New class.
12567 (struct so_list) <lm_info>: Change type to lm_info_base *.
12568 * nto-tdep.c (struct lm_info): Remove.
12569 (lm_addr): Adjust.
12570 * solib-aix.c (struct lm_info): Rename to ...
12571 (struct lm_info_aix): ... this. Extend lm_info_base.
12572 (lm_info_p): Rename to ...
12573 (lm_info_aix_p): ... this, and adjust.
12574 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12575 solib_aix_parse_libraries, library_list_start_library,
12576 solib_aix_free_library_list, solib_aix_parse_libraries,
12577 solib_aix_get_library_list,
12578 solib_aix_relocate_section_addresses, solib_aix_free_so,
12579 solib_aix_get_section_offsets,
12580 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12581 Adjust.
12582 (struct solib_aix_inferior_data) <library_list>: Adjust.
12583 * solib-darwin.c (struct lm_info): Rename to ...
12584 (struct lm_info_darwin): ... this. Extend lm_info_base.
12585 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12586 * solib-dsbt.c (struct lm_info): Rename to ...
12587 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12588 (struct dsbt_info) <main_executable_lm_info): Adjust.
12589 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12590 dsbt_relocate_section_addresses): Adjust.
12591 * solib-frv.c (struct lm_info): Rename to ...
12592 (struct lm_info_frv): ... this. Extend lm_info_base.
12593 (main_executable_lm_info): Adjust.
12594 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12595 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12596 find_canonical_descriptor_in_load_object,
12597 frv_fdpic_find_canonical_descriptor): Adjust.
12598 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12599 to lm_info_svr4.
12600 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12601 svr4_clear_so, svr4_copy_library_list,
12602 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12603 svr4_current_sos, svr4_fetch_objfile_link_map,
12604 solist_update_incremental): Adjust.
12605 * solib-svr4.h (struct lm_info_svr4): Move here from
12606 solib-svr4.c.
12607 * solib-target.c (struct lm_info): Rename to ...
12608 (struct lm_info_target): ... this. Extend lm_info_base.
12609 (lm_info_p): Rename to ...
12610 (lm_info_target_p): ... this.
12611 (solib_target_parse_libraries, library_list_start_segment,
12612 library_list_start_section, library_list_start_library,
12613 library_list_end_library, solib_target_free_library_list,
12614 solib_target_current_sos, solib_target_free_so,
12615 solib_target_relocate_section_addresses): Adjust.
12616 * windows-nat.c (struct lm_info): Rename to ...
12617 (struct lm_info_windows): ... this. Extend lm_info_base.
12618 (windows_make_so, handle_load_dll, handle_unload_dll,
12619 windows_xfer_shared_libraries): Adjust.
12620
434a4023
SM
126212017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12622
12623 * solib-darwin.c (struct darwin_so_list): Remove.
12624 (darwin_current_sos): Allocate an so_list object instead of a
12625 darwin_so_list, separately allocate an lm_info object.
12626 (darwin_free_so): Free lm_info.
12627
428544e8
JB
126282017-04-28 John Baldwin <jhb@FreeBSD.org>
12629
12630 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12631 with fprintf_filtered.
12632
4621115f
YQ
126332017-04-28 Yao Qi <yao.qi@linaro.org>
12634
12635 * regcache.c (regcache::regcache): New function.
12636 (regcache::~regcache): New function.
12637 (regcache_xmalloc_1): Remove.
12638 (regcache_xmalloc): Call new regcache.
12639 (regcache_xfree): Call delete regcache.
12640 (get_thread_arch_aspace_regcache): Call new regcache.
12641
339053c2
YQ
126422017-04-28 Yao Qi <yao.qi@linaro.org>
12643
12644 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12645 lwp instead of ptid_get_lwp.
12646
7974a605
YQ
126472017-04-28 Yao Qi <yao.qi@linaro.org>
12648
12649 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12650 lwp_info instead of getting from inferior_ptid.
12651
e15c3eb4
KS
126522017-04-27 Keith Seitz <keiths@redhat.com>
12653
12654 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12655 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12656 (CV_CONVERSION_BADNESS): Define.
12657 (rank_one_type): Remove overly restrictive rvalue reference
12658 rank checks.
12659 Add cv-qualifier checks and subranks for type equality.
12660 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12661 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12662 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12663
72bc1d24
SM
126642017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12665
12666 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12667 count when creating the object.
12668
55bcecda
UW
126692017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12670 Ulrich Weigand <uweigand@de.ibm.com>
12671
12672 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12673 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12674 is used in AIX.
12675 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12676 (process_xcoff_symbol): Likewise.
12677 (scan_xcoff_symtab): Likewise.
12678
5c99fcf8
AH
126792017-04-26 Alan Hayward <alan.hayward@arm.com>
12680
12681 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12682 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12683 (ia64_access_reg): Use get_frame_register_unsigned.
12684 (ia64_access_rse_reg): Likewise.
12685 (ia64_libunwind_frame_prev_register): Likewise.
12686
b41c5a85
JW
126872017-04-26 Jiong Wang <jiong.wang@arm.com>
12688
12689 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12690 * gdbarch.c: Regenerated.
12691 * gdbarch.h: Regenerated.
12692 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12693 visibility external.
12694 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12695 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12696 (enum cfa_how_kind): Move to ...
12697 (struct dwarf2_frame_state_reg_info): Likewise.
12698 (struct dwarf2_frame_state): Likewise.
12699 * dwarf2-frame.h: ... here.
12700 (dwarf2_frame_state_alloc_regs): New declaration.
12701 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12702 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12703
c185f580
AH
127042017-04-26 Alan Hayward <alan.hayward@arm.com>
12705
12706 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12707 regcache_raw_read_unsigned.
12708 (xtensa_pseudo_register_write): Likewise.
12709
19c45594
AH
127102017-04-26 Alan Hayward <alan.hayward@arm.com>
12711
12712 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12713 (nds32_pseudo_register_write): Likewise.
12714
4658f12e
YQ
127152017-04-25 Yao Qi <yao.qi@linaro.org>
12716
12717 * regcache.c (struct regcache) <readonly_p>: Change its type
12718 to bool.
12719 (regcache_xmalloc_1): Update parameter type and callers update.
12720
d581dda8
YQ
127212017-04-25 Yao Qi <yao.qi@linaro.org>
12722
12723 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12724 set_gdbarch_wchar_bit.
12725 * arm-tdep.c (arm_gdbarch_init): Likewise.
12726
debed3db
PA
127272017-04-25 Pedro Alves <palves@redhat.com>
12728
12729 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12730 (BothAreRelocatable, memcopy, memmove): Don't define.
12731 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12732 macros.
12733
b0b92aeb
PA
127342017-04-25 Pedro Alves <palves@redhat.com>
12735
12736 * common/common-defs.h: Include "common/poison.h".
12737 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12738 and adjust.
12739 * common/poison.h: New file.
12740 * common/traits.h: Include <type_traits>.
12741 (Not, Or, Requires): New, moved from common/function-view.h.
12742
16c4d54a
PA
127432017-04-25 Pedro Alves <palves@redhat.com>
12744
12745 * breakpoint.h (struct breakpoint): In-class initialize all
12746 fields. Make boolean fields "bool".
12747 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12748 memset call and initializations no longer necessary.
12749
b5c36682
PA
127502017-04-25 Pedro Alves <palves@redhat.com>
12751
12752 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12753 reference.
12754 (pt_btrace_insn): New function.
12755 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12756
5625a286
PA
127572017-04-25 Pedro Alves <palves@redhat.com>
12758
12759 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12760 "base" field and inherit from "bp_location" instead. Add
12761 non-default ctor.
12762 (allocate_location_exception): Use new non-default ctor.
12763 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12764 (init_bp_location): Convert to ...
12765 (bp_location::bp_location): ... this new ctor, and remove memset
12766 call.
12767 (base_breakpoint_allocate_location): Use the new non-default ctor.
12768 * breakpoint.h (bp_location): Now a class. Declare default and
12769 non-default ctors. In-class initialize all members.
12770 (init_bp_location): Remove declaration.
12771
23bcc18f
PA
127722017-04-25 Pedro Alves <palves@redhat.com>
12773
12774 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12775 assignment operator.
12776
e1ba3053
YQ
127772017-04-24 Yao Qi <yao.qi@linaro.org>
12778
12779 * doublest.c (convert_doublest_to_floatformat): Call
12780 floatformat_totalsize_bytes.
12781
10f489e5
TT
127822017-04-22 Tom Tromey <tom@tromey.com>
12783
12784 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12785 ui_out_emit_list.
12786 * stack.c (print_frame): Use ui_out_emit_list.
12787 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12788 ui_out_emit_list.
12789 * mi/mi-main.c (print_one_inferior)
12790 (mi_cmd_data_list_register_names)
12791 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12792 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12793 ui_out_emit_list.
12794 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12795 (mi_output_solib_attribs): Use ui_out_emit_list,
12796 ui_out_emit_tuple.
12797 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12798 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12799 (mi_cmd_stack_list_args, list_args_or_locals): Use
12800 ui_out_emit_list.
12801 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12802 * breakpoint.c (print_solib_event, output_thread_groups): Use
12803 ui_out_emit_list.
12804
0092b74d
TT
128052017-04-22 Tom Tromey <tom@tromey.com>
12806
12807 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12808 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12809 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12810
a14a62dd
TT
128112017-04-22 Tom Tromey <tom@tromey.com>
12812
12813 * tracepoint.c (tvariables_info_1)
12814 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12815
46b9c129
TT
128162017-04-22 Tom Tromey <tom@tromey.com>
12817
12818 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12819 annotate_arg_emitter.
12820 * breakpoint.c (print_mention_watchpoint)
12821 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12822 * annotate.h (struct annotate_arg_emitter): New.
12823
2e783024
TT
128242017-04-22 Tom Tromey <tom@tromey.com>
12825
12826 * record-btrace.c (record_btrace_insn_history)
12827 (record_btrace_insn_history_range, record_btrace_call_history)
12828 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12829 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12830 ui_out_emit_tuple.
12831 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12832 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12833 * skip.c (skip_info): Use ui_out_emit_tuple.
12834 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12835 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12836 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12837 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12838 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12839 ui_out_emit_tuple.
12840 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12841 (output_register, mi_cmd_data_read_memory)
12842 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12843 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12844 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12845 Use ui_out_emit_tuple.
12846 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12847 ui_out_emit_tuple.
12848 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12849 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12850 * linux-thread-db.c (info_auto_load_libthread_db): Use
12851 ui_out_emit_tuple.
12852 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12853 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12854 * disasm.c (do_mixed_source_and_assembly_deprecated)
12855 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12856 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12857 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12858 * breakpoint.c (print_one_breakpoint_location)
12859 (print_one_breakpoint): Use ui_out_emit_tuple.
12860 * auto-load.c (print_script, info_auto_load_cmd): Use
12861 ui_out_emit_tuple.
12862 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12863
9be21bb4
SM
128642017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12865
12866 * thread.c (print_thread_info_1): Remove dead code.
12867
0d4c07af
JK
128682017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12869
12870 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12871 GDB_SELF_TEST.
12872 * arm-tdep.c (selftests::arm_record_test): Likewise.
12873
4daf993d
YQ
128742017-04-21 Yao Qi <yao.qi@linaro.org>
12875
12876 * regcache.c (regcache_restore): Remove argument 2. Replace
12877 argument 3 with regcache. Get register status from
12878 src->register_status and get register contents from
12879 register_buffer (src, regnum).
12880 (regcache_cpy): Update.
12881
a6c21d4a
PA
128822017-04-19 Pedro Alves <palves@redhat.com>
12883
12884 * gdbthread.h (thread): Add missing closing parenthesis in
12885 comment.
12886
3a3fd0fd
PA
128872017-04-19 Pedro Alves <palves@redhat.com>
12888
12889 * common/refcounted-object.h: New file.
12890 * gdbthread.h: Include "common/refcounted-object.h".
12891 (thread_info): Inherit from refcounted_object and add comments.
12892 (thread_info::incref, thread_info::decref)
12893 (thread_info::m_refcount): Delete.
12894 (thread_info::deletable): Use the refcounted_object::refcount()
12895 method.
12896 * inferior.c (current_inferior_): Add comment.
12897 (set_current_inferior): Increment/decrement refcounts.
12898 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12899 not-deletable instead of comparing with the current inferior.
12900 (initialize_inferiors): Increment the initial inferior's refcount.
12901 * inferior.h (struct inferior): Forward declare.
12902 Include "common/refcounted-object.h".
12903 (current_inferior, set_current_inferior): Move declaration to
12904 before struct inferior's definition, and fix comment.
12905 (inferior): Inherit from refcounted_object. Add comments.
12906 * thread.c (switch_to_thread_no_regs): Reference the thread's
12907 inferior pointer directly instead of doing a ptid lookup.
12908 (switch_to_no_thread): New function.
12909 (switch_to_thread(thread_info *)): New function, factored out
12910 from ...
12911 (switch_to_thread(ptid_t)): ... this.
12912 (restore_current_thread): Delete.
12913 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12914 fields, and add 'inf' field.
12915 (do_restore_current_thread_cleanup): Check whether old->inf is
12916 alive instead of looking up an inferior by ptid. Use
12917 switch_to_thread and switch_to_no_thread.
12918 (restore_current_thread_cleanup_dtor): Use old->inf directly
12919 instead of lookup up an inferior by id. Decref the inferior.
12920 Don't restore 'removable'.
12921 (make_cleanup_restore_current_thread): Same the inferior pointer
12922 in old, instead of the inferior number. Incref the inferior.
12923 Don't save/clear 'removable'.
12924
9bcb1f16
PA
129252017-04-19 Pedro Alves <palves@redhat.com>
12926
12927 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12928 unittests/scoped_restore-selftests.c.
12929 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12930 * common/scoped_restore.h (scoped_restore_base): Make "class".
12931 (scoped_restore_base::release): New public method.
12932 (scoped_restore_base::scoped_restore_base): New protected ctor.
12933 (scoped_restore_base::m_saved_var): New protected field.
12934 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12935 scoped_restore_base base class instead of m_saved_var directly.
12936 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12937 (scoped_restore_tmpl::scoped_restore_tmpl(const
12938 scoped_restore_tmpl<T>&)): Likewise.
12939 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12940 method.
12941 (scoped_restore_tmpl::saved_var): New method.
12942 (scoped_restore_tmpl::m_saved_var): Delete.
12943 * inferior.h (inferior::detaching): Now a bool.
12944 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12945 cleanup.
12946 * unittests/scoped_restore-selftests.c: New file.
12947
26fcd539
PA
129482017-04-19 Pedro Alves <palves@redhat.com>
12949
12950 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12951 Re-sort in alphabetic order.
12952
fdd243b0
PA
129532017-04-18 Pedro Alves <palves@redhat.com>
12954
12955 * xml-support.c (obstack_xml_printf): Delete.
12956 * xml-support.h (obstack_xml_printf): Delete.
12957
4895cde2
PA
129582017-04-18 Pedro Alves <palves@redhat.com>
12959
12960 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12961 vdebug, verror, body_text, start_element, end_element, name,
12962 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12963 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12964 is_xinclude>: Make private and add m_ prefix.
12965 (gdb_xml_parser::body_text): New method, based on ...
12966 (gdb_xml_body_text): ... this. Adjust.
12967 (gdb_xml_parser::vdebug): New method, based on ...
12968 (gdb_xml_debug): ... this. Adjust.
12969 (gdb_xml_parser::verror): New method, based on ...
12970 (gdb_xml_error): ... this. Adjust.
12971 (gdb_xml_parser::start_element): New method, based on ...
12972 (gdb_xml_start_element): ... this. Adjust.
12973 (gdb_xml_start_element_wrapper): Defer to
12974 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12975 (gdb_xml_parser::end_element): New method, based on ...
12976 (gdb_xml_end_element_wrapper): ... this. Adjust.
12977 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12978 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12979 (gdb_xml_parser::use_dtd): New method, based on ...
12980 (gdb_xml_use_dtd): ... this. Adjust.
12981 (gdb_xml_parser::parse): New method, based on ...
12982 (gdb_xml_parse): ... this. Adjust.
12983 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12984 (xinclude_start_include): Adjust to call the parser's name method.
12985 (xml_xinclude_default, xml_xinclude_start_doctype)
12986 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12987 method.
12988 (xml_process_xincludes): Adjust to call parser methods.
12989 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12990 declarations.
12991
bd8a901f
PA
129922017-04-18 Pedro Alves <palves@redhat.com>
12993
12994 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12995 gdb::optional<std::string>.
12996 * xml-support.c: Include <string>.
12997 (scope_level::scope_level(scope_level &&))
12998 (scope_level::~scope_level): Delete.
12999 (scope_level::body): Now a std::string.
13000 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13001 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13002 parameter.
13003 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13004 (xinclude_parsing_data::output): Now a std::string reference.
13005 (xinclude_start_include): Adjust.
13006 (xml_xinclude_default): Adjust.
13007 (xml_process_xincludes): Add 'output' parameter, and return bool.
13008 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13009 and return bool.
13010 * xml-tdesc.c: Include <unordered_map> and <string>.
13011 (tdesc_xml_cache): Delete.
13012 (tdesc_xml_cache_s): Delete.
13013 (xml_cache): Now an std::unordered_map.
13014 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13015 (target_fetch_description_xml): Change return type to
13016 gdb::optional<std::string>, and adjust.
13017 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13018 (target_fetch_description_xml): Change return type to
13019 gdb::optional<std::string>.
13020
d35d1958
PA
130212017-04-18 Pedro Alves <palves@redhat.com>
13022
13023 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13024 unittests/optional-selftests.c.
13025 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13026 * unittests/optional-selftests.c: New file.
13027 * unittests/optional/assignment/1.cc: New file.
13028 * unittests/optional/assignment/2.cc: New file.
13029 * unittests/optional/assignment/3.cc: New file.
13030 * unittests/optional/assignment/4.cc: New file.
13031 * unittests/optional/assignment/5.cc: New file.
13032 * unittests/optional/assignment/6.cc: New file.
13033 * unittests/optional/assignment/7.cc: New file.
13034 * unittests/optional/cons/copy.cc: New file.
13035 * unittests/optional/cons/default.cc: New file.
13036 * unittests/optional/cons/move.cc: New file.
13037 * unittests/optional/cons/value.cc: New file.
13038 * unittests/optional/in_place.cc: New file.
13039 * unittests/optional/observers/1.cc: New file.
13040 * unittests/optional/observers/2.cc: New file.
13041
22796e97
PA
130422017-04-18 Pedro Alves <palves@redhat.com>
13043
13044 * common/gdb_optional.h: Include common/traits.h.
13045 (in_place_t): New type.
13046 (in_place): New constexpr variable.
13047 (optional::optional): Remove member initialization of
13048 m_instantiated.
13049 (optional::optional(in_place_t...)): New constructor.
13050 (optional::~optional): Use reset.
13051 (optional::optional(const optional&)): New.
13052 (optional::optional(const optional&&)): New.
13053 (optional::optional(T &)): New.
13054 (optional::optional(T &&)): New.
13055 (operator::operator=(const optional &)): New.
13056 (operator::operator=(optional &&)): New.
13057 (operator::operator= (const T &))
13058 (operator::operator= (T &&))
13059 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13060 (operator::reset): New.
13061 (operator::m_instantiated):: Add in-class initializer.
13062 * common/traits.h: Include <type_traits>.
13063 (struct And): New types.
13064
a7fc9b61
PA
130652017-04-18 Pedro Alves <palves@redhat.com>
13066
13067 * xml-support.c: Include <vector>.
13068 (scope_level::scope_level(const gdb_xml_element *))
13069 (scope_level::scope_level(scope_level&&)): New.
13070 (scope_level::~scope_level): New.
13071 (scope_level_s): Delete.
13072 (gdb_xml_parser::scopes): Now a std::vector.
13073 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13074 Use std::vector.
13075 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13076 scope cleanup code.
13077 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13078 of the scopes member. Use std::vector::emplace_back.
13079
010151c9
PA
130802017-04-18 Pedro Alves <palves@redhat.com>
13081
13082 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13083 a bool.
13084 (gdb_xml_end_element): Change type of first parameter.
13085 (gdb_xml_cleanup): Rename to ...
13086 (gdb_xml_parser::~gdb_xml_parser): ... this.
13087 (gdb_xml_create_parser_and_cleanup): Delete with ...
13088 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13089 to this new ctor.
13090 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13091 using gdb_xml_create_parser_and_cleanup.
13092 (xinclude_parsing_data): Add ctor/dtor.
13093 (xml_xinclude_cleanup): Delete.
13094 (xml_process_xincludes): Create a local xinclude_parsing_data
13095 instead of heap-allocating one. Create a local gdb_xml_parser
13096 instead of heap-allocating one with
13097 gdb_xml_create_parser_and_cleanup.
13098
d56060f0
JB
130992017-04-18 John Baldwin <jhb@FreeBSD.org>
13100
13101 PR threads/20743
13102 * fbsd-nat.c (resume_one_thread_cb): Remove.
13103 (resume_all_threads_cb): Remove.
13104 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13105 iterate_over_threads.
13106
305d16a9
JB
131072017-04-17 Joel Brobecker <brobecker@adacore.com>
13108
13109 * NEWS: Create a new section for the next release branch.
13110 Rename the section of the current branch, now that it has
13111 been cut.
13112
8bb57231
JB
131132017-04-17 Joel Brobecker <brobecker@adacore.com>
13114
13115 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13116 * version.in: Bump version to 8.0.50.DATE-git.
13117
096c92dd
SDJ
131182017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13119
13120 PR gdb/21385
13121 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13122 independently of the host, and fix build breakage on Cygwin.
13123
0550c955
PA
131242017-04-13 Pedro Alves <palves@redhat.com>
13125
13126 * inferior.c (free_inferior): Convert to ...
13127 (inferior::~inferior): ... this dtor.
13128 (inferior::inferior): New ctor, factored out from ...
13129 (add_inferior_silent): ... here. Allocate the inferior with a new
13130 expression.
13131 (delete_inferior): Call delete instead of free_inferior.
13132 * inferior.h (gdb_environ, continuation): Forward declare.
13133 (inferior): Now a class. Add in-class initialization to all
13134 members. Make boolean fields bool, except 'detaching'.
13135 (inferior::inferior): New explicit ctor.
13136 (inferior::~inferior): New.
13137
e3d60dfc
PA
131382017-04-13 Pedro Alves <palves@redhat.com>
13139
13140 * inferior.c (init_inferior_list): Delete.
13141 * inferior.h (init_inferior_list): Delete.
13142
5fd69d0a
PA
131432017-04-13 Pedro Alves <palves@redhat.com>
13144
13145 PR threads/13217
13146 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13147 (top level): Call it twice, with different thread sets.
13148
c6609450
PA
131492017-04-13 Pedro Alves <palves@redhat.com>
13150
13151 * thread.c: Include <algorithm>.
13152 (thread_array_cleanup): Delete.
13153 (scoped_inc_dec_ref): New class.
13154 (live_threads_count): New function.
13155 (set_thread_refcount): Delete.
13156 (tp_array_compar_ascending): Now a bool.
13157 (tp_array_compar): Convert to a std::sort comparison function.
13158 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13159 and live_threads_count.
13160
2a00d7ce
PA
131612017-04-13 Pedro Alves <palves@redhat.com>
13162
13163 * infrun.c (follow_fork_inferior): Also switch the current
13164 inferior.
13165
441d7c93
PA
131662017-04-13 Pedro Alves <palves@redhat.com>
13167
13168 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13169 before calling create_internal_breakpoint.
13170
808480f6
PA
131712017-04-13 Pedro Alves <palves@redhat.com>
13172
13173 * fork-child.c (execv_argv): New class.
13174 (breakup_args): Refactored as ...
13175 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13176 Copy arguments to storage and replace separators with NULL
13177 terminators in place.
13178 (escape_bang_in_quoted_argument): Adjust to return bool.
13179 (execv_argv::execv_argv): New ctor.
13180 (execv_argv::init_for_shell): New method, factored out from
13181 fork_inferior. Don't strdup strings into the vector.
13182 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13183 Remove free_vector_argv call.
13184
ad3d022a
YQ
131852017-04-13 Yao Qi <yao.qi@linaro.org>
13186
13187 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13188 tdep->rx_psw_type.
13189
e6ddc3bf
YQ
131902017-04-13 Yao Qi <yao.qi@linaro.org>
13191
13192 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13193 * rx-tdep.c (rx_gdbarch_init): Likewise.
13194
bfb8cf90
PA
131952017-04-13 Pedro Alves <palves@redhat.com>
13196
13197 * breakpoint.h (struct breakpoint): Reindent.
13198
f5336ca5
PA
131992017-04-13 Pedro Alves <palves@redhat.com>
13200
13201 * breakpoint.c (bp_location): Rename to ...
13202 (bp_locations): ... this. All references updated.
13203 (bp_location_count): Rename to ...
13204 (bp_locations_count): ... this. All references updated.
13205 (bp_location_placed_address_before_address_max): Rename to ...
13206 (bp_locations_placed_address_before_address_max): ... this. All
13207 references updated.
13208 (bp_location_shadow_len_after_address_max): Rename to ...
13209 (bp_locations_shadow_len_after_address_max): ... this. All
13210 references updated.
13211 (bp_location_compare_addrs): Rename to ...
13212 (bp_locations_compare_addrs): ... this. All references updated.
13213 (bp_location_compare):Rename to ...
13214 (bp_locations_compare): ... this. All references updated.
13215 (bp_location_target_extensions_update): Rename to ...
13216 (bp_locations_target_extensions_update): ... this. All references
13217 updated.
13218
be628ab8
SDJ
132192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13220
13221 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13222 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13223 'sgtty.h'.
13224 * common/gdb_termios.h: New file, with parts of "terminal.h".
13225 * inflow.c: Include "gdb_termios.h".
13226 * ser-unix.c: Include "gdb_termios.h".
13227 * terminal.h: Move terminal-related defines to
13228 "common/gdb_termios.h".
13229
8e9e35b1
TT
132302017-04-12 Tom Tromey <tom@tromey.com>
13231
13232 * probe.c (parse_probes): Update.
13233 * location.h (delete_event_location): Don't declare.
13234 (event_location_deleter::operator()): Update.
13235 * location.c (event_location_deleter::operator()): Rename from
13236 delete_event_location.
13237 * linespec.h (linespec_result) <location>: Change type to
13238 event_location_up.
13239 * linespec.c (canonicalize_linespec, event_location_to_sals)
13240 (decode_objc): Update.
13241 (linespec_result): Don't call delete_event_location.
13242 * breakpoint.c (create_breakpoints_sal)
13243 (bkpt_probe_create_sals_from_location)
13244 (strace_marker_create_sals_from_location): Update.
13245
16e802b9
TT
132462017-04-12 Tom Tromey <tom@tromey.com>
13247
13248 * linespec.h (struct linespec_result): Add constructor and
13249 destructor.
13250 (init_linespec_result, destroy_linespec_result)
13251 (make_cleanup_destroy_linespec_result): Don't declare.
13252 * linespec.c (init_linespec_result): Remove.
13253 (linespec_result::~linespec_result): Rename from
13254 destroy_linespec_result. Update.
13255 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13256 Remove.
13257 * breakpoint.c (create_breakpoint, break_range_command)
13258 (decode_location_default): Update.
13259 * ax-gdb.c (agent_command_1): Update.
13260
d28cd78a
TT
132612017-04-12 Tom Tromey <tom@tromey.com>
13262
13263 * remote.c (remote_download_tracepoint): Update.
13264 * python/py-breakpoint.c (bppy_get_location): Update.
13265 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13266 (gdbscm_breakpoint_location): Update.
13267 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13268 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13269 Change type to event_location_up.
13270 * breakpoint.c (create_overlay_event_breakpoint)
13271 (create_longjmp_master_breakpoint)
13272 (create_std_terminate_master_breakpoint)
13273 (create_exception_master_breakpoint)
13274 (breakpoint_event_location_empty_p, print_breakpoint_location)
13275 (print_one_breakpoint_location, create_thread_event_breakpoint)
13276 (init_breakpoint_sal, create_breakpoint)
13277 (print_recreate_ranged_breakpoint, break_range_command)
13278 (init_ada_exception_breakpoint, say_where): Update.
13279 (base_breakpoint_dtor): Don't call delete_event_location.
13280 (bkpt_print_recreate, tracepoint_print_recreate)
13281 (dprintf_print_recreate, update_static_tracepoint)
13282 (breakpoint_re_set_default): Update.
13283
711799d5
TT
132842017-04-12 Tom Tromey <tom@tromey.com>
13285
13286 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13287 type of "to_do". Update.
13288 (compute_stack_depth): Use std::vector.
13289
52d214d3
TT
132902017-04-12 Tom Tromey <tom@tromey.com>
13291
13292 * printcmd.c (find_instruction_backward): Use std::vector.
13293
4c404b8b
TT
132942017-04-12 Tom Tromey <tom@tromey.com>
13295
13296 * symfile.c (objfilep): Remove typedef.
13297 (reread_symbols): Use a std::vector.
13298
156d9eab
TT
132992017-04-12 Tom Tromey <tom@tromey.com>
13300
13301 * mi/mi-main.c (exec_direction_forward): Remove.
13302 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13303 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13304 scoped_restore.
13305 * guile/guile.c (guile_repl_command, guile_command)
13306 (gdbscm_execute_gdb_command): Use scoped_restore.
13307 * go-exp.y (go_parse): Use scoped_restore.
13308 * d-exp.y (d_parse): Use scoped_restore.
13309 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13310 * c-exp.y (c_parse): Use scoped_restore.
13311
4d89769a
TT
133122017-04-12 Tom Tromey <tom@tromey.com>
13313
13314 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13315 (mi_parse): Update return type.
13316 (mi_parse_free): Remove.
13317 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13318 (mi_parse::~mi_parse): Rename from mi_parse_free.
13319 (mi_parse_cleanup): Remove.
13320 (mi_parse): Return a unique_ptr. Use new.
13321 * mi/mi-main.c (mi_execute_command): Update.
13322
4b217cc7
TT
133232017-04-12 Tom Tromey <tom@tromey.com>
13324
13325 * location.c (explicit_location_lex_one): Return a
13326 unique_xmalloc_ptr.
13327 (string_to_explicit_location): Update. Remove cleanups.
13328
59d3651b
TT
133292017-04-12 Tom Tromey <tom@tromey.com>
13330
13331 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13332 (compare_value_and_voffset): Change type. Update.
13333 (compute_vtable_size): Change type of "offset_vec".
13334 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13335 (gnuv3_get_typeid): Remove extraneous declaration.
13336
b24b0d6c
TT
133372017-04-12 Tom Tromey <tom@tromey.com>
13338
13339 * charset.h (wchar_iterator): Fix comment.
13340
80a3b8c5
TT
133412017-04-12 Tom Tromey <tom@tromey.com>
13342
13343 * charset.c (iconv_wrapper): New class.
13344 (cleanup_iconv): Remove.
13345 (convert_between_encodings): Use it.
13346
c83dd867
TT
133472017-04-12 Tom Tromey <tom@tromey.com>
13348
13349 * symfile.h (increment_reading_symtab): Update type.
13350 * symfile.c (decrement_reading_symtab): Remove.
13351 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13352 * psymtab.c (psymtab_to_symtab): Update.
13353 * dwarf2read.c (dw2_instantiate_symtab): Update.
13354
0e8621a0
TT
133552017-04-12 Tom Tromey <tom@tromey.com>
13356
13357 * jit.c (struct jit_reader): Declare separately. Add constructor
13358 and destructor. Change type of "handle".
13359 (loaded_jit_reader): Define separately.
13360 (jit_reader_load): Update. New "new".
13361 (jit_reader_unload_command): Use "delete".
13362 * gdb-dlfcn.h (struct dlclose_deleter): New.
13363 (gdb_dlhandle_up): New typedef.
13364 (gdb_dlopen, gdb_dlsym): Update types.
13365 (gdb_dlclose): Remove.
13366 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13367 (gdb_dlsym): Change type of "handle".
13368 (make_cleanup_dlclose): Remove.
13369 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13370 * compile/compile-c-support.c (load_libcc): Update.
13371
67d89901
TT
133722017-04-12 Tom Tromey <tom@tromey.com>
13373
13374 * symtab.h (find_pcs_for_symtab_line): Change return type.
13375 * symtab.c (find_pcs_for_symtab_line): Change return type.
13376 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13377 type of "vec". Update.
13378 (ltpy_get_pcs_for_line): Update.
13379 * linespec.c (decode_digits_ordinary): Update.
13380
93921405
TT
133812017-04-12 Tom Tromey <tom@tromey.com>
13382
13383 * tracepoint.c (actions_command): Update.
13384 * python/python.c (python_command, python_interactive_command):
13385 Update.
13386 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13387 * guile/guile.c (guile_command): Update.
13388 * defs.h (read_command_lines, read_command_lines_1): Return
13389 command_line_up.
13390 (command_lines_deleter): New struct.
13391 (command_line_up): New typedef.
13392 * compile/compile.c (compile_code_command)
13393 (compile_print_command): Update.
13394 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13395 command_line_up.
13396 (make_cleanup_free_command_lines): Remove.
13397 * cli/cli-script.c (get_command_line, read_command_lines_1)
13398 (copy_command_lines): Return command_line_up.
13399 (while_command, if_command, read_command_lines, define_command)
13400 (document_command): Update.
13401 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13402 Remove.
13403 * breakpoint.h (breakpoint_set_commands): Change type of
13404 "commands".
13405 * breakpoint.c (breakpoint_set_commands): Change type of
13406 "commands". Update.
13407 (do_map_commands_command, update_dprintf_command_list)
13408 (create_tracepoint_from_upload): Update.
13409
ffc2605c
TT
134102017-04-12 Tom Tromey <tom@tromey.com>
13411
13412 * tracepoint.c (scope_info): Update.
13413 * spu-tdep.c (spu_catch_start): Update.
13414 * python/python.c (gdbpy_decode_line): Update.
13415 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13416 * python/py-breakpoint.c (bppy_init): Update.
13417 * probe.c (parse_probes): Update.
13418 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13419 * location.h (event_location_deleter): New struct.
13420 (event_location_up): New typedef.
13421 (new_linespec_location, new_address_location, new_probe_location)
13422 (new_explicit_location, copy_event_location)
13423 (string_to_event_location, string_to_event_location_basic)
13424 (string_to_explicit_location): Update return type.
13425 (make_cleanup_delete_event_location): Remove.
13426 * location.c (new_linespec_location, new_address_location)
13427 (new_probe_location, new_explicit_location, copy_event_location):
13428 Return event_location_up.
13429 (delete_event_location_cleanup)
13430 (make_cleanup_delete_event_location): Remove.
13431 (string_to_explicit_location, string_to_event_location_basic)
13432 (string_to_event_location): Return event_location_up.
13433 * linespec.c (canonicalize_linespec, event_location_to_sals)
13434 (decode_line_with_current_source)
13435 (decode_line_with_last_displayed, decode_objc): Update.
13436 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13437 * completer.c (location_completer): Update.
13438 * cli/cli-cmds.c (edit_command, list_command): Update.
13439 * breakpoint.c (create_overlay_event_breakpoint)
13440 (create_longjmp_master_breakpoint)
13441 (create_std_terminate_master_breakpoint)
13442 (create_exception_master_breakpoint)
13443 (create_thread_event_breakpoint): Update.
13444 (init_breakpoint_sal): Update. Remove some dead code.
13445 (create_breakpoint_sal): Change type of "location". Update.
13446 (create_breakpoints_sal, create_breakpoint, break_command_1)
13447 (dprintf_command, break_range_command, until_break_command)
13448 (init_ada_exception_breakpoint)
13449 (strace_marker_create_sals_from_location)
13450 (update_static_tracepoint, trace_command, ftrace_command)
13451 (strace_command, create_tracepoint_from_upload): Update.
13452 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13453 * ax-gdb.c (agent_command_1): Update.
13454
8f10c932
PA
134552017-04-12 Pedro Alves <palves@redhat.com>
13456
13457 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13458 * configure.tgt: Handle i[34567]86-*-go32* and
13459 i[34567]86-*-msdosdjgpp*.
13460 * i386-tdep.c (i386_svr4_reg_to_regnum):
13461 Make extern.
13462 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13463 i386-go32-tdep.c.
13464 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13465 * i386-go32-tdep.c: New file.
13466 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13467 declarations.
13468
0a31ccfb
SM
134692017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13470
13471 * aix-thread.c (pd_status2str): Change return type to const char *.
13472
e9bb3fbb
PA
134732017-04-12 Pedro Alves <palves@redhat.com>
13474
13475 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13476 calls to set_gdbarch_gnu_triplet_regexp.
13477
53375380
PA
134782017-04-12 Pedro Alves <palves@redhat.com>
13479
13480 PR gdb/21323
13481 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13482 New enum value.
13483 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13484 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13485 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13486 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13487 * gdbarch.h, gdbarch.c: Regenerate.
13488 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13489 gdbarch_wchar_bit and gdbarch_wchar_signed.
13490 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13491 * arm-tdep.c (arm_gdbarch_init): Likewise.
13492 * avr-tdep.c (avr_gdbarch_init): Likewise.
13493 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13494 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13495 * i386-tdep.c (i386_go32_init_abi): Likewise.
13496 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13497 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13498 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13499 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13500 * sh-tdep.c (sh_gdbarch_init): Likewise.
13501 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13502 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13503 * windows-tdep.c (windows_init_abi): Likewise.
13504 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13505
53e710ac
PA
135062017-04-12 Pedro Alves <palves@redhat.com>
13507
13508 PR c++/21323
13509 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13510 cplus_primitive_type_char32_t>: New enum values.
13511 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13512 and cplus_primitive_type_char32_t.
13513 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13514 32, use the archtecture's built-in type for char16_t and char32_t,
13515 respectively. Otherwise, fallback to init_integer_type as before,
13516 but make the type unsigned, and issue a complaint.
13517 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13518
ab0538b8
AH
135192017-04-12 Alan Hayward <alan.hayward@arm.com>
13520
5e0e0422 13521 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13522 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13523
5430098f
SDJ
135242017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13525
13526 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13527 'const char *'.
13528
7c5ded6a
SDJ
135292017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13530
13531 * common/common-utils.c (free_vector_argv): New function.
13532 * common/common-utils.h: Include <vector>.
13533 (free_vector_argv): New prototype.
13534 * darwin-nat.c (darwin_create_inferior): Rewrite function
13535 prototype in order to constify "exec_file" and accept a
13536 "std::string" for "allargs".
13537 * fork-child.c: Include <vector>.
13538 (breakup_args): Rewrite function, using C++.
13539 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13540 and accept "std::string" for "allargs". Update the code to
13541 calculate "argv" based on "allargs". Update calls to "exec_fun"
13542 and "execvp".
13543 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13544 order to constify "exec_file" and accept a "std::string" for
13545 "allargs".
13546 * go32-nat.c (go32_create_inferior): Likewise.
13547 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13548 * infcmd.c (run_command_1): Constify "exec_file". Use
13549 "std::string" for inferior arguments.
13550 * inferior.h (fork_inferior): Update prototype.
13551 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13552 prototype in order to constify "exec_file" and accept a
13553 "std::string" for "allargs".
13554 * nto-procfs.c (procfs_create_inferior): Likewise.
13555 * procfs.c (procfs_create_inferior): Likewise.
13556 * remote-sim.c (gdbsim_create_inferior): Likewise.
13557 * remote.c (extended_remote_run): Update code to accept
13558 "std::string" as argument.
13559 (extended_remote_create_inferior): Rewrite function prototype in
13560 order to constify "exec_file" and accept a "std::string" for
13561 "allargs".
13562 * rs6000-nat.c (super_create_inferior): Likewise.
13563 (rs6000_create_inferior): Likewise.
13564 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13565 * windows-nat.c (windows_create_inferior): Likewise.
13566
ae0eee42
PA
135672017-04-11 Pedro Alves <palves@redhat.com>
13568
13569 * thread.c: Fix whitespace throughout.
13570
a6acac06
PR
135712017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13572
13573 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13574
64403bd1
AH
135752017-04-11 Alan Hayward <alan.hayward@arm.com>
13576
13577 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13578
a5bef50f
SDJ
135792017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13580
13581 PR gdb/21364
13582 * osdata.c (info_osdata): Check if 'type' is an empty string
13583 instead of NULL.
13584
9295a5a9
PA
135852017-04-10 Pedro Alves <palves@redhat.com>
13586
13587 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13588 (ptid_to_global_thread_id, in_thread_list)
13589 (do_captured_list_thread_ids, set_resumed, set_running)
13590 (set_executing, set_stop_requested, finish_thread_state)
13591 (validate_registers_access, can_access_registers_ptid)
13592 (print_thread_info_1, switch_to_thread)
13593 (do_restore_current_thread_cleanup)
13594 (make_cleanup_restore_current_thread, thread_command)
13595 (thread_name_command): Use operator== instead of ptid_equal.
13596
996812e3
PA
135972017-04-10 Pedro Alves <palves@redhat.com>
13598
13599 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13600 (current_thread_cleanup_chain): Delete.
13601 (restore_current_thread_cleanup_dtor)
13602 (make_cleanup_restore_current_thread): Remove references to
13603 current_thread_cleanup_chain.
13604
845b344f
AH
136052017-04-10 Alan Hayward <alan.hayward@arm.com>
13606
13607 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13608 REG_UNKNOWN.
13609
803bdfe4
YQ
136102017-04-10 Yao Qi <yao.qi@linaro.org>
13611
13612 PR gdb/19942
13613 * gdbthread.h (thread_info::deletable): New method.
13614 (thread_info::incref): New method.
13615 (thread_info::decref): New method.
13616 (thread_info::refcount): Move it to private.
13617 * infrun.c (save_stop_context): Call inc_refcount.
13618 (release_stop_context_cleanup): Likewise.
13619 * thread.c (set_thread_exited): New function.
13620 (init_thread_list): Delete "tp" only it is deletable, otherwise
13621 call set_thread_exited.
13622 (delete_thread_1): Call set_thread_exited.
13623 (current_thread_cleanup) <inferior_pid>: Remove.
13624 <thread>: New field.
13625 (restore_current_thread_ptid_changed): Removed.
13626 (do_restore_current_thread_cleanup): Adjust.
13627 (restore_current_thread_cleanup_dtor): Don't call
13628 find_thread_ptid.
13629 (set_thread_refcount): Use dec_refcount.
13630 (make_cleanup_restore_current_thread): Adjust.
13631 (thread_apply_all_command): Call inc_refcount.
13632 (_initialize_thread): Don't call
13633 observer_attach_thread_ptid_changed.
13634
8c25b497
YQ
136352017-04-10 Yao Qi <yao.qi@linaro.org>
13636
13637 * thread.c (delete_thread_1): Hoist code on marking thread as
13638 exited.
13639
8473b447
SM
136402017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13641
13642 * windows-nat.c (windows_detach): Initialize ptid with
13643 minus_one_ptid.
13644
6670ec13
SM
136452017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13646
13647 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13648
ba2f91bb
AH
136492017-04-07 Alan Hayward <alan.hayward@arm.com>
13650
13651 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13652 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13653 (bfin_pseudo_register_write): Likewise
13654
436252de
SM
136552017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13656
13657 * common/ptid.h (struct ptid): Change to...
13658 (class ptid_t): ... this.
13659 <ptid_t>: New constructors.
13660 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13661 matches>: New methods.
13662 <make_null, make_minus_one>: New static methods.
13663 <pid>: Rename to...
13664 <m_pid>: ...this.
13665 <lwp>: Rename to...
13666 <m_lwp>: ...this.
13667 <tid>: Rename to...
13668 <m_tid>: ...this.
13669 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13670 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13671 as references, move comment to class ptid_t.
13672 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13673 ptid_t static methods.
13674 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13675 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13676 Take ptid arguments as references, implement using ptid_t methods.
13677 * unittests/ptid-selftests.c: New file.
13678 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13679 unittests/ptid-selftests.c.
13680 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13681
0dedf377
TP
136822017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13683
13684 * python/python.c (python_run_simple_file): Cast mode literal to
13685 non-const char pointer as expected by PyFile_FromString.
13686
4e9868d4
SM
136872017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13688
13689 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13690 minus_one_ptid and null_ptid.
13691
9bf2a700
PA
136922017-04-05 Pedro Alves <palves@redhat.com>
13693
13694 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13695 * configure: Regenerate.
13696
a121b7c1
PA
136972017-04-05 Pedro Alves <palves@redhat.com>
13698
13699 * ada-exp.y (yyerror): Constify.
13700 * ada-lang.c (bound_name, get_selections)
13701 (ada_variant_discrim_type)
13702 (ada_variant_discrim_name, ada_value_struct_elt)
13703 (ada_lookup_struct_elt_type, is_unchecked_variant)
13704 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13705 (catch_ada_exception_command_split)
13706 (catch_ada_assert_command_split, catch_assert_command)
13707 (ada_op_name): Constify.
13708 * ada-lang.h (ada_yyerror, get_selections)
13709 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13710 * arc-tdep.c (arc_print_frame_cache): Constify.
13711 * arm-tdep.c (arm_skip_stub): Constify.
13712 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13713 (gen_aggregate_elt_ref): Constify.
13714 * bcache.c (print_bcache_statistics): Constify.
13715 * bcache.h (print_bcache_statistics): Constify.
13716 * break-catch-throw.c (catch_exception_command_1):
13717 * breakpoint.c (struct ep_type_description::description):
13718 Constify.
13719 (add_solib_catchpoint): Constify.
13720 (catch_fork_command_1): Add cast.
13721 (add_catch_command): Constify.
13722 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13723 Constify.
13724 * bsd-uthread.c (bsd_uthread_state): Constify.
13725 * buildsym.c (patch_subfile_names): Constify.
13726 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13727 Constify.
13728 * c-exp.y (yyerror): Constify.
13729 (token::oper): Constify.
13730 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13731 * c-varobj.c (cplus_describe_child): Constify.
13732 * charset.c (find_charset_names): Add cast.
13733 (find_charset_names): Constify array and add const_cast.
13734 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13735 (edit_command): Constify.
13736 * cli/cli-decode.c (lookup_cmd): Constify.
13737 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13738 Constify.
13739 (struct dump_context): Constify.
13740 (add_dump_command, restore_command): Constify.
13741 * cli/cli-script.c (get_command_line): Constify.
13742 * cli/cli-script.h (get_command_line): Constify.
13743 * cli/cli-utils.c (check_for_argument): Constify.
13744 * cli/cli-utils.h (check_for_argument): Constify.
13745 * coff-pe-read.c (struct read_pe_section_data): Constify.
13746 * command.h (lookup_cmd): Constify.
13747 * common/print-utils.c (decimal2str): Constify.
13748 * completer.c (gdb_print_filename): Constify.
13749 * corefile.c (set_gnutarget): Constify.
13750 * cp-name-parser.y (yyerror): Constify.
13751 * cp-valprint.c (cp_print_class_member): Constify.
13752 * cris-tdep.c (cris_register_name, crisv32_register_name):
13753 Constify.
13754 * d-exp.y (yyerror): Constify.
13755 (struct token::oper): Constify.
13756 * d-lang.h (d_yyerror): Constify.
13757 * dbxread.c (struct header_file_location::name): Constify.
13758 (add_old_header_file, add_new_header_file, last_function_name)
13759 (dbx_next_symbol_text, add_bincl_to_list)
13760 (find_corresponding_bincl_psymtab, set_namestring)
13761 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13762 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13763 * defs.h (command_line_input, print_address_symbolic)
13764 (deprecated_readline_begin_hook): Constify.
13765 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13766 Constify.
13767 * event-top.c (handle_line_of_input): Constify and add cast.
13768 * exceptions.c (catch_errors): Constify.
13769 * exceptions.h (catch_errors): Constify.
13770 * expprint.c (print_subexp_standard, op_string, op_name)
13771 (op_name_standard, dump_raw_expression, dump_raw_expression):
13772 * expression.h (op_name, op_string, dump_raw_expression):
13773 Constify.
13774 * f-exp.y (yyerror): Constify.
13775 (struct token::oper): Constify.
13776 (struct f77_boolean_val::name): Constify.
13777 * f-lang.c (f_word_break_characters): Constify.
13778 * f-lang.h (f_yyerror): Constify.
13779 * fork-child.c (fork_inferior): Add cast.
13780 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13781 (new_variant): Constify.
13782 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13783 * gdbarch.c: Regenerate.
13784 * gdbcore.h (set_gnutarget): Constify.
13785 * go-exp.y (yyerror): Constify.
13786 (token::oper): Constify.
13787 * go-lang.h (go_yyerror): Constify.
13788 * go32-nat.c (go32_sysinfo): Constify.
13789 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13790 * guile/scm-cmd.c (cmdscm_function): Constify.
13791 * guile/scm-param.c (pascm_param_value): Constify.
13792 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13793 (h8300sx_register_name): Constify.
13794 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13795 Constify.
13796 * ia64-tdep.c (ia64_register_names): Constify.
13797 * infcmd.c (construct_inferior_arguments): Constify.
13798 (path_command, attach_post_wait): Constify.
13799 * language.c (show_range_command, show_case_command)
13800 (unk_lang_error): Constify.
13801 * language.h (language_defn::la_error)
13802 (language_defn::la_name_of_this): Constify.
13803 * linespec.c (decode_line_2): Constify.
13804 * linux-thread-db.c (thread_db_err_str): Constify.
13805 * lm32-tdep.c (lm32_register_name): Constify.
13806 * m2-exp.y (yyerror): Constify.
13807 * m2-lang.h (m2_yyerror): Constify.
13808 * m32r-tdep.c (m32r_register_names): Constify and make static.
13809 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13810 * m88k-tdep.c (m88k_register_name): Constify.
13811 * macroexp.c (appendmem): Constify.
13812 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13813 (upgrade_type, parse_external, parse_partial_symbols)
13814 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13815 (new_symbol): Constify.
13816 * memattr.c (mem_info_command): Constify.
13817 * mep-tdep.c (register_name_from_keyword): Constify.
13818 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13819 Constify.
13820 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13821 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13822 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13823 cast.
13824 (mi_execute_async_cli_command): Constify.
13825 * mips-tdep.c (mips_register_name): Constify.
13826 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13827 (am33_register_name, am33_2_register_name)
13828 * moxie-tdep.c (moxie_register_names): Constify.
13829 * nat/linux-osdata.c (osdata_type): Constify fields.
13830 * nto-tdep.c (nto_parse_redirection): Constify.
13831 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13832 (lookup_child_selector): Constify.
13833 (objc_methcall::name): Constify.
13834 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13835 (lookup_struct_typedef): Constify.
13836 * objfiles.c (pc_in_section): Constify.
13837 * objfiles.h (pc_in_section): Constify.
13838 * p-exp.y (struct token::oper): Constify.
13839 (yyerror): Constify.
13840 * p-lang.h (pascal_yyerror): Constify.
13841 * parser-defs.h (op_name_standard): Constify.
13842 (op_print::string): Constify.
13843 (exp_descriptor::op_name): Constify.
13844 * printcmd.c (print_address_symbolic): Constify.
13845 * psymtab.c (print_partial_symbols): Constify.
13846 * python/py-breakpoint.c (stop_func): Constify.
13847 (bppy_get_expression): Constify.
13848 * python/py-cmd.c (cmdpy_completer::name): Constify.
13849 (cmdpy_function): Constify.
13850 * python/py-event.c (evpy_add_attribute)
13851 (gdbpy_initialize_event_generic): Constify.
13852 * python/py-event.h (evpy_add_attribute)
13853 (gdbpy_initialize_event_generic): Constify.
13854 * python/py-evts.c (add_new_registry): Constify.
13855 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13856 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13857 * python/py-inferior.c (get_buffer): Add cast.
13858 * python/py-param.c (parm_constant::name): Constify.
13859 * python/py-unwind.c (fprint_frame_id): Constify.
13860 * python/python.c (gdbpy_parameter_value): Constify.
13861 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13862 * remote.c (memory_packet_config::name): Constify.
13863 (show_packet_config_cmd, remote_write_bytes)
13864 (remote_buffer_add_string):
13865 * reverse.c (exec_reverse_once): Constify.
13866 * rs6000-tdep.c (variant::name, variant::description): Constify.
13867 * rust-exp.y (rustyyerror): Constify.
13868 * rust-lang.c (rust_op_name): Constify.
13869 * rust-lang.h (rustyyerror): Constify.
13870 * serial.h (serial_ops::name): Constify.
13871 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13872 (sh_sh3e_register_name, sh_sh2e_register_name)
13873 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13874 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13875 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13876 (sh_sh4al_dsp_register_name): Constify.
13877 * sh64-tdep.c (sh64_register_name): Constify.
13878 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13879 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13880 * stabsread.c (patch_block_stabs, read_type_number)
13881 (ref_map::stabs, ref_add, process_reference)
13882 (symbol_reference_defined, define_symbol, define_symbol)
13883 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13884 (read_one_struct_field, read_struct_fields, read_baseclasses)
13885 (read_tilde_fields, read_struct_type, read_array_type)
13886 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13887 (read_huge_number, read_range_type, read_args, common_block_start)
13888 (find_name_end): Constify.
13889 * stabsread.h (common_block_start, define_symbol)
13890 (process_one_symbol, symbol_reference_defined, ref_add):
13891 * symfile.c (get_section_index, add_symbol_file_command):
13892 * symfile.h (get_section_index): Constify.
13893 * target-descriptions.c (tdesc_type::name): Constify.
13894 (tdesc_free_type): Add cast.
13895 * target.c (find_default_run_target):
13896 (add_deprecated_target_alias, find_default_run_target)
13897 (target_announce_detach): Constify.
13898 (do_option): Constify.
13899 * target.h (add_deprecated_target_alias): Constify.
13900 * thread.c (print_thread_info_1): Constify.
13901 * top.c (deprecated_readline_begin_hook, command_line_input):
13902 Constify.
13903 (init_main): Add casts.
13904 * top.h (handle_line_of_input): Constify.
13905 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13906 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13907 (tfind_command): Rename to ...
13908 (tfind_command_1): ... this and constify.
13909 (tfind_command): New function.
13910 (tfind_end_command, tfind_start_command): Adjust.
13911 (encode_source_string): Constify.
13912 * tracepoint.h (encode_source_string): Constify.
13913 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13914 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13915 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13916 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13917 * tui/tui-win.c (parse_scrolling_args): Constify.
13918 * tui/tui-windata.c (tui_erase_data_content): Constify.
13919 * tui/tui-windata.h (tui_erase_data_content): Constify.
13920 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13921 * tui/tui.c (tui_enable): Add cast.
13922 * utils.c (defaulted_query): Constify.
13923 (init_page_info): Add cast.
13924 (puts_debug, subset_compare): Constify.
13925 * utils.h (subset_compare): Constify.
13926 * varobj.c (varobj_format_string): Constify.
13927 * varobj.h (varobj_format_string): Constify.
13928 * vax-tdep.c (vax_register_name): Constify.
13929 * windows-nat.c (windows_detach): Constify.
13930 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13931 * xml-support.c (gdb_xml_end_element): Constify.
13932 * xml-tdesc.c (tdesc_start_reg): Constify.
13933 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13934 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13935 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13936
995816ba
PA
139372017-04-05 Pedro Alves <palves@redhat.com>
13938
13939 * proc-api.c (struct trans): Constify.
13940 (procfs_note): Constify.
13941 * proc-events.c (struct trans, syscall_table):
13942 * proc-flags.c (struct trans): Constify.
13943 * proc-utils.h (procfs_note): Constify.
13944 * proc-why.c (struct trans): Constify.
13945 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13946 (procfs_detach): Constify.
13947 * sol-thread.c (struct string_map): Constify.
13948 (td_err_string, td_state_string): Constify.
13949
3e83a920
PA
139502017-04-05 Pedro Alves <palves@redhat.com>
13951
13952 * proc-api.c (procfs_filename): Don't initialize
13953 procfs_filename.
13954 (prepare_to_trace): Assume procfs_filename is non-NULL.
13955 (_initialize_proc_api): Give procfs_filename a default value here.
13956
63160a43
PA
139572017-04-05 Pedro Alves <palves@redhat.com>
13958
13959 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13960 'cond_string' parameter.
13961 (extract_exception_regexp): Constify 'string' parameter.
13962 (catch_exception_command_1): Constify.
13963 * breakpoint.c (init_catchpoint)
13964 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13965 parameter.
13966 (ep_parse_optional_if_clause, catch_fork_command_1)
13967 (catch_exec_command_1): Constify.
13968 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13969 parameter.
13970 (ep_parse_optional_if_clause): Constify.
13971 * cli/cli-utils.c (remove_trailing_whitespace)
13972 (check_for_argument): Constify.
13973 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13974 non-const overload.
13975 (check_for_argument): Likewise.
13976
9b2eba3d
PA
139772017-04-05 Pedro Alves <palves@redhat.com>
13978
13979 * event-top.c (command_line_handler): Add cast to execute_command
13980 call.
13981 * record-btrace.c (cmd_record_btrace_bts_start)
13982 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13983 (cmd_record_btrace_start): Add cast to execute_command call.
13984 * record-full.c (record_full_goto_insn):
13985 * record.c (record_start, record_stop): Add cast to
13986 execute_command_to_string calls.
13987 (cmd_record_start): Add cast to execute_command calls.
13988
2adadf51
PA
139892017-04-05 Pedro Alves <palves@redhat.com>
13990
13991 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13992 static inline function.
13993 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13994 array and use gdb_PyArg_ParseTupleAndKeywords.
13995 * python/py-cmd.c (cmdpy_init): Likewise.
13996 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13997 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13998 (infpy_search_memory): Likewise.
13999 * python/py-objfile.c (objfpy_add_separate_debug_file)
14000 (gdbpy_lookup_objfile): Likewise.
14001 * python/py-symbol.c (gdbpy_lookup_symbol)
14002 (gdbpy_lookup_global_symbol): Likewise.
14003 * python/py-type.c (gdbpy_lookup_type): Likewise.
14004 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14005 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14006 Likewise.
14007
0d1f4ceb
PA
140082017-04-05 Pedro Alves <palves@redhat.com>
14009
14010 * python/python-internal.h (gdb_PyGetSetDef): New type.
14011 * python/py-block.c (block_object_getset)
14012 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14013 * python/py-event.c (event_object_getset)
14014 (finish_breakpoint_object_getset): Likewise.
14015 * python/py-inferior.c (inferior_object_getset): Likewise.
14016 * python/py-infthread.c (thread_object_getset): Likewise.
14017 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14018 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14019 * python/py-objfile.c (objfile_getset): Likewise.
14020 * python/py-progspace.c (pspace_getset): Likewise.
14021 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14022 Likewise.
14023 * python/py-record.c (recpy_record_getset): Likewise.
14024 * python/py-symbol.c (symbol_object_getset): Likewise.
14025 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14026 Likewise.
14027 * python/py-type.c (type_object_getset, field_object_getset):
14028 Likewise.
14029 * python/py-value.c (value_object_getset): Likewise.
14030
4d759979
PA
140312017-04-05 Pedro Alves <palves@redhat.com>
14032
14033 * python/python-internal.h (gdb_PyObject_CallMethod)
14034 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14035 New functions.
14036 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14037 (PySys_GetObject, PySys_SetPath): New macros.
14038
fdf9e36f
PA
140392017-04-05 Pedro Alves <palves@redhat.com>
14040
14041 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14042 info_osdata_command.
14043 * osdata.c (info_osdata_command): Rename to ...
14044 (info_osdata): ... this. Constify 'type' parameter, and remove
14045 the 'from_tty' parameter. Accept NULL TYPE.
14046 (info_osdata_command): New function.
14047 * osdata.h (info_osdata_command): Remove declaration.
14048 (info_osdata): New declaration.
14049
9f33b8b7
PA
140502017-04-05 Pedro Alves <palves@redhat.com>
14051
14052 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14053 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14054 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14055 parameter.
14056 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14057 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14058 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14059 parameter.
14060 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14061 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14062 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14063 (mi_cmd_file_list_exec_source_files)
14064 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14065 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14066 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14067 parameter.
14068 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14069 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14070 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14071 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14072 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14073 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14074 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14075 'command' parameter.
14076 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14077 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14078 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14079 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14080 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14081 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14082 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14083 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14084 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14085 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14086 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14087 parameter.
14088 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14089 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14090 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14091 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14092 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14093 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14094 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14095 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14096 (mi_cmd_data_list_changed_registers)
14097 (mi_cmd_data_write_register_values)
14098 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14099 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14100 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14101 (mi_cmd_list_features, mi_cmd_list_target_features)
14102 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14103 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14104 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14105 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14106 (mi_cmd_trace_frame_collected): Constify 'command'
14107 parameter.
14108 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14109 'command' parameter.
14110
67cb5b2d
PA
141112017-04-05 Pedro Alves <palves@redhat.com>
14112
14113 * ada-lang.c (ada_completer_word_break_characters): Now a const
14114 array.
14115 (ada_get_gdb_completer_word_break_characters): Constify.
14116 * completer.c (gdb_completer_command_word_break_characters)
14117 (gdb_completer_file_name_break_characters)
14118 (gdb_completer_quote_characters): Now const arrays.
14119 (get_gdb_completer_quote_characters): Constify.
14120 (set_rl_completer_word_break_characters): New function.
14121 (set_gdb_completion_word_break_characters)
14122 (complete_line_internal): Use it.
14123 * completer.h (get_gdb_completer_quote_characters): Constify.
14124 (set_rl_completer_word_break_characters): Declare.
14125 * f-lang.c (f_word_break_characters): Constify.
14126 * language.c (default_word_break_characters): Constify.
14127 * language.h (language_defn::la_word_break_characters): Constify.
14128 (default_word_break_characters): Constify.
14129 * top.c (init_main): Use set_rl_completer_word_break_characters.
14130
7a114964
PA
141312017-04-05 Pedro Alves <palves@redhat.com>
14132
14133 * aix-thread.c (aix_thread_pid_to_str)
14134 (aix_thread_extra_thread_info): Constify.
14135 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14136 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14137 (bsd_uthread_pid_to_str): Constify.
14138 * corelow.c (core_pid_to_str): Constify.
14139 * darwin-nat.c (darwin_pid_to_str): Constify.
14140 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14141 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14142 Constify.
14143 * gnu-nat.c (gnu_pid_to_str): Constify.
14144 * go32-nat.c (go32_pid_to_str): Constify.
14145 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14146 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14147 * inferior.c (inferior_pid_to_str): Constify.
14148 * linux-nat.c (linux_nat_pid_to_str): Constify.
14149 * linux-tdep.c (linux_core_pid_to_str): Constify.
14150 * linux-thread-db.c (thread_db_pid_to_str)
14151 (thread_db_extra_thread_info): Constify.
14152 * nto-tdep.c (nto_extra_thread_info): Constify.
14153 * nto-tdep.h (nto_extra_thread_info): Constify.
14154 * obsd-nat.c (obsd_pid_to_str): Constify.
14155 * procfs.c (procfs_pid_to_str): Constify.
14156 * ravenscar-thread.c (ravenscar_extra_thread_info)
14157 (ravenscar_pid_to_str): Constify.
14158 * remote-sim.c (gdbsim_pid_to_str): Constify.
14159 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14160 Constify.
14161 * sol-thread.c (solaris_pid_to_str): Constify.
14162 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14163 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14164 * target.c (default_pid_to_str, target_pid_to_str)
14165 (normal_pid_to_str, default_pid_to_str): Constify.
14166 * target.h (target_ops::to_pid_to_str)
14167 (target_ops::to_extra_thread_info): Constify.
14168 (target_pid_to_str, normal_pid_to_str): Constify.
14169 * windows-nat.c (windows_pid_to_str): Constify.
14170 * gdbarch.sh (core_pid_to_str): Constify.
14171 * target-delegates.c: Regenerate.
14172 * gdbarch.h, gdbarch.c: Regenerate.
14173
69bbf465
PA
141742017-04-05 Pedro Alves <palves@redhat.com>
14175
14176 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14177 the memory of the temporary warning_pre_print override.
14178 * utils.c (warning_pre_print): Constify.
14179 * utils.h (warning_pre_print): Constify.
14180
be47f9e8
PA
141812017-04-05 Pedro Alves <palves@redhat.com>
14182
14183 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14184 (shell_command): New function.
14185 (make_command): Use std::string.
14186 (init_cli_cmds): Register shell_command instead of shell_escape.
14187
bde6261a
PA
141882017-04-05 Pedro Alves <palves@redhat.com>
14189
14190 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14191 * tracepoint.c (default_collect): Don't initialize.
14192
b38ef47f
PA
141932017-04-05 Pedro Alves <palves@redhat.com>
14194
14195 * macroexp.c (macro_buffer::shared): Now a bool.
14196 (init_buffer): Update.
14197 (init_shared_buffer): Constify 'addr' parameter.
14198 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14199 casts.
14200
f995bbe8
PA
142012017-04-05 Pedro Alves <palves@redhat.com>
14202
14203 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14204 * disasm.c (set_disassembler_options): Constify local.
14205 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14206
4a596fe2
SDJ
142072017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14208
14209 PR gdb/21352
14210 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14211 option.
14212
2cad08ea
YQ
142132017-04-05 Yao Qi <yao.qi@linaro.org>
14214
14215 * frame.c (frame_unwind_register_unsigned): Call
14216 frame_unwind_register_value.
14217
55a98976
YQ
142182017-04-05 Yao Qi <yao.qi@linaro.org>
14219
14220 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14221 Use gdb_test_multiple, and don't match anchor.
14222
4ac40124
PA
142232017-04-05 Pedro Alves <palves@redhat.com>
14224
14225 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14226 (Write After Approval): Remove Simon Marchi.
14227
c053b654
PA
142282017-04-05 Pedro Alves <palves@redhat.com>
14229
14230 * common/gdb_optional.h (optional::optional): Make constexpr and
14231 initialize m_dummy.
14232
4c7bf4f9
JB
142332017-04-04 John Baldwin <jhb@FreeBSD.org>
14234
14235 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14236 (amd64fbsd_jmp_buf_reg_offset): Remove.
14237 (amd64fbsd_supply_uthread): Remove function.
14238 (amd64fbsd_collect_uthread): Remove function.
14239 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14240 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14241 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14242 (fbsd-nat.c): Update comment.
14243 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14244 (i386fbsd_jmp_buf_reg_offset): Remove.
14245 (i386fbsd_supply_uthread): Remove function.
14246 (i386fbsd_collect_uthread): Remove function.
14247 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14248
1e1a8bef
JB
142492017-04-04 John Baldwin <jhb@FreeBSD.org>
14250
14251 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14252 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14253 * NEWS: Mention that support for FreeBSD/alpha was removed.
14254 * alpha-fbsd-tdep.c: Delete file.
14255 * config/alpha/fbsd.mh: Delete file.
14256 * configure.host: Delete alpha*-*-freebsd* and
14257 alpha*-*-kfreebsd*-gnu.
14258 * configure.tgt: Delete alpha*-*-freebsd* and
14259 alpha*-*-kfreebsd*-gnu.
14260
49907934
JB
142612017-04-04 John Baldwin <jhb@FreeBSD.org>
14262
14263 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14264 amd64bsd_store_inferior_registers): Use ptid from regcache.
14265
6f77053d
PA
142662017-04-04 Pedro Alves <palves@redhat.com>
14267
14268 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14269 data fields, make them private and add "m_" prefixes.
14270 (lnp_state_machine::lnp_state_machine): New ctor.
14271 (record_line, check_line_address, handle_set_discriminator)
14272 (handle_set_address, handle_advance_pc, handle_special_opcode)
14273 (handle_advance_line, handle_set_file, handle_negate_stmt)
14274 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14275 (end_sequence, advance_line): New methods.
14276 (m_gdbarch, m_record_lines_p): New fields.
14277 (lnp_reader_state): Delete.
14278 (dwarf_record_line): Rename to ...
14279 (lnp_state_machine::record_line): ... adjust.
14280 (init_lnp_state_machine): Delete.
14281 (lnp_state_machine::lnp_state_machine): New.
14282 (check_line_address): Rename to ...
14283 (lnp_state_machine::check_line_address): This.
14284 (dwarf_decode_lines_1): Remove reference to "reader_state".
14285 Adjust lnp_state_machine having a non-default ctor. Use bool.
14286 State machine internal state manipulation moved to
14287 lnp_state_machine methods.
14288
9c541725
PA
142892017-04-04 Pedro Alves <palves@redhat.com>
14290
14291 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14292 unittests/offset-type-selftests.c.
14293 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14294 * common/offset-type.h: New file.
14295 * common/preprocessor.h: New file.
14296 * common/traits.h: New file.
14297 * common/valid-expr.h: New file.
14298 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14299 sect_offset and cu_offset strong typedefs throughout.
14300 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14301 typedefs throughout.
14302 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14303 sect_offset and cu_offset strong typedefs throughout.
14304 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14305 typedefs throughout.
14306 * gdbtypes.h: Include "common/offset-type.h".
14307 (cu_offset): Now an offset type (strong typedef) instead of a
14308 struct.
14309 (sect_offset): Likewise.
14310 (union call_site_parameter_u): Rename "param_offset" field to
14311 "param_cu_off".
14312 * unittests/offset-type-selftests.c: New file.
14313
ecfb656c
PA
143142017-04-04 Pedro Alves <palves@redhat.com>
14315
14316 * common/underlying.h: New file.
14317 * dwarf2read.c: Include "common/gdb_optional.h" and
14318 "common/underlying.h".
14319 (dir_index, file_name_index): New types.
14320 (file_entry): Use them.
14321 (file_entry::include): Use to_underlying.
14322 (line_header::add_file_name): Use dir_index.
14323 (read_formatted_entries): Use gdb::optional. Read form before
14324 writting to file_entry.
14325 (dwarf_decode_line_header): Use dir_index.
14326 (lnp_state_machine::current_file): Use to_underlying.
14327 (lnp_state_machine::file): Change type to file_name_index.
14328 (dwarf_record_line): Use to_underlying.
14329 (init_lnp_state_machine): Use file_name_index.
14330 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14331
d194f1fe
PA
143322017-04-04 Pedro Alves <palves@redhat.com>
14333
14334 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14335 operator bool, has_value and get methods.
14336
fff8551c
PA
143372017-04-04 Pedro Alves <palves@redhat.com>
14338
14339 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14340 fields.
14341 (line_header): Initialize all data fields. Change type of
14342 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14343 Change type of include_dirs to std::vector<const char *>. Remove
14344 num_include_dirs, include_dirs_size. Change type of file_names to
14345 std::vector<file_entry>. Remove num_file_names, file_names_size.
14346 (line_header::line_header): New.
14347 (line_header::add_include_dir, line_header::add_file_name): New
14348 methods.
14349 (line_header::include_dir_at): Remove NULL check.
14350 (line_header::file_name_at): Add const overload.
14351 (line_header_up): New unique_ptr typedef.
14352 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14353 std::vector. Remove free_line_header call.
14354 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14355 free_line_header call.
14356 (free_cu_line_header): Delete.
14357 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14358 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14359 Adjust to use std::vector.
14360 (free_line_header): Delete.
14361 (free_line_header_voidp): Use delete.
14362 (add_include_dir): Replace with ...
14363 (line_header::add_include_dir): ... this method. Use std::vector.
14364 (add_file_name): Replace with ...
14365 (line_header::add_file_name): ... this method. Use std::vector.
14366 (add_include_dir_stub): Delete.
14367 (read_formatted_entries): Remove memset.
14368 (dwarf_decode_line_header): Return a line_header_up instead of a
14369 raw pointer. Remove cleanup handling. Pass lambdas to
14370 read_formatted_entries. Adjust to use line_header methods.
14371 (dwarf_decode_lines_1): Adjust to use line_header methods.
14372 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14373 use std::vector.
14374
d62a8ae2
SM
143752017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14376
14377 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14378 instead of struct ptid.
14379
db3a1dc7
AH
143802017-05-04 Alan Hayward <alan.hayward@arm.com>
14381
14382 * frame.c (get_frame_register_bytes): Unwind using value.
14383 (put_frame_register_bytes): Likewise.
14384
b1b45502
IB
143852017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14386
14387 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14388 aggregate-like.
14389
ec13808e
JK
143902017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14391
14392 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14393
12316564
YQ
143942017-03-29 Yao Qi <yao.qi@linaro.org>
14395
14396 * gdbthread.h (struct thread_info): Declare constructor and
14397 destructor. Add some in-class member initializers.
14398 * thread.c (free_thread): Remove.
14399 (init_thread_list): Call delete instead of free_thread.
14400 (new_thread): Call thread_info constructor.
14401 (thread_info::thread_info): New function.
14402 (thread_info::~thread_info): New function.
14403 (delete_thread_1): Call delete instead of free_thread.
14404 (make_cleanup_restore_current_thread): Move tp and frame to
14405 inner block.
14406
fe5f7374
AK
144072017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14408
14409 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14410 (arc_skip_prologue): Likewise.
14411 (arc_make_frame_cache): Likewise.
14412 (arc_pv_get_operand): New function.
14413 (arc_is_in_prologue): Likewise.
14414 (arc_analyze_prologue): Likewise.
14415 (arc_print_frame_cache): Likewise.
14416 (MAX_PROLOGUE_LENGTH): New constant.
14417
eea78757
AK
144182017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14419
14420 * configure.tgt: Add arc-insn.o.
14421 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14422 (dump_arc_instruction_command): New function.
14423 (arc_fprintf_disasm): Likewise.
14424 (arc_disassemble_info): Likewise.
14425 (arc_insn_get_operand_value): Likewise.
14426 (arc_insn_get_operand_value_signed): Likewise.
14427 (arc_insn_get_memory_base_reg): Likewise.
14428 (arc_insn_get_memory_offset): Likewise.
14429 (arc_insn_get_branch_target): Likewise.
14430 (arc_insn_dump): Likewise.
14431 (arc_insn_get_linear_next_pc): Likewise.
14432 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14433 (arc_disassemble_info): Likewise.
14434 (arc_insn_get_branch_target): Likewise.
14435 (arc_insn_get_linear_next_pc): Likewise.
14436 * NEWS: Mention new "maint print arc arc-instruction".
14437
3be78afd
AK
144382017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14439
14440 * arc-tdep (maintenance_print_arc_list): New variable.
14441 (maintenance_print_arc_command): New function.
14442
296ec4fa
AK
144432017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14444
14445 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14446 Add "limm" and "reserved".
14447 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14448 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14449 * arc-tdep.h (arc_regnum): Likewise.
14450
f74f865e
MF
144512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14452
14453 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14454 for THREADPTR register.
14455 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14456 register.
14457 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14458 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14459 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14460
0d0bf81a
MF
144612017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14462
14463 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14464 registers above gdbarch_num_regs (gdbarch) as privileged in
14465 call0 ABI.
14466
0ce4291e
MF
144672017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14468
14469 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14470 for a single specified register or for all registers in
14471 a0_base..a0_base + C0_NREGS range.
14472 (supply_gregset_reg): Call regcache_raw_supply for a single
14473 specified register or for all registers in a0_base..a0_base +
14474 C0_NREGS range.
14475
c56054f9
MF
144762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14477
14478 * arch/xtensa.h (C0_NREGS): Add definition.
14479 * xtensa-tdep.c (C0_NREGS): Remove definition.
14480
a4398628
MF
144812017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14482
14483 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14484 Drop xtensa_default_isa initialization.
14485 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14486
8c43009f
PA
144872017-03-27 Pedro Alves <palves@redhat.com>
14488
14489 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14490 (file_entry::include_dir): New method.
14491 (line_header::include_dir_at, line_header::file_name_at): New
14492 methods.
14493 (setup_type_unit_groups, setup_type_unit_groups)
14494 (psymtab_include_file_name): Simplify using the new methods.
14495 (lnp_state_machine) <the_line_header>: New field.
14496 <file>: Add comment.
14497 (lnp_state_machine::current_file): New method.
14498 (dwarf_record_line): Simplify using the new methods.
14499 (init_lnp_state_machine): Initialize the "the_line_header" field.
14500 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14501 Simplify using the new methods.
14502
a7e80b9e
PA
145032017-03-27 Pedro Alves <palves@redhat.com>
14504
14505 * cp-name-parser.y (make_empty): Delete.
14506 (demangler_special, nested_name, ptr_operator, array_indicator)
14507 (direct_declarator, declarator_1): Use fill_comp instead of
14508 make_empty.
14509
21047726
PA
145102017-03-27 Pedro Alves <palves@redhat.com>
14511
14512 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14513 to ATTRIBUTE_PRINTF.
14514 * solib-target.c (library_list_start_list): Print "string" not
14515 "version".
14516 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14517 gdb_xml_error call.
14518
d721ba37
PA
145192017-03-27 Pedro Alves <palves@redhat.com>
14520
14521 * dwarf2read.c (struct file_and_directory): New.
14522 (dwarf2_get_dwz_file): Adjust to use std::string.
14523 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14524 (find_file_and_directory): Adjust to return a file_and_directory
14525 object.
14526 (read_file_scope): Adjust to use file_and_directory. Remove
14527 make_cleanup/do_cleanups calls.
14528 (open_and_init_dwp_file): Adjust to use std::string. Remove
14529 make_cleanup/do_cleanups calls.
14530 * python/python.c (do_start_initialization): Adjust to ldirname
14531 returning a std::string.
14532 * utils.c (ldirname): Now returns a std::string.
14533 * utils.h (ldirname): Change return type to std::string.
14534 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14535 returning a std::string.
14536 * xml-tdesc.c (file_read_description_xml): Likewise.
14537
ed771251
AH
145382017-03-24 Alan Hayward <alan.hayward@arm.com>
14539
14540 * regcache.c (regcache_debug_print_register): New function.
14541 * regcache.h (regcache_debug_print_register): New declaration.
14542 * target.c (debug_print_register): Remove.
14543 (target_fetch_registers): Call regcache_debug_print_register.
14544 (target_store_registers): Likewise.
14545
568c1b9f
PB
145462017-03-24 Pádraig Brady <pbrady@fb.com>
14547
14548 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14549 reference beyond the 'lh->include_dirs' array before accessing to
14550 it.
14551 (psymtab_include_file_name): Likewise.
14552 (dwarf_decode_lines_1): Likewise.
14553 (dwarf_decode_lines): Likewise.
14554 (file_file_name): Likewise.
14555
3e00d44f
SM
145562017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14557
14558 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14559 inferior_ptid.
14560 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14561 ps_lsetfpregs): Likewise.
14562 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14563 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14564 ps_lsetfpregs): Likewise.
14565 * target.c (target_fetch_registers, target_store_registers):
14566 Remove asserts.
14567
077ae656
AH
145682017-03-23 Alan Hayward <alan.hayward@arm.com>
14569
14570 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14571
1e2b521d
YQ
145722017-03-23 Yao Qi <yao.qi@linaro.org>
14573
14574 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14575 (_initialize_aarch64_tdep): Register it.
14576 (aarch64_record_load_store): Handle PRFM instruction.
14577 (aarch64_process_record_test): New function.
14578
33877125
YQ
145792017-03-23 Yao Qi <yao.qi@linaro.org>
14580
14581 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14582 indentation.
14583
a0eef940
YQ
145842017-03-23 Yao Qi <yao.qi@linaro.org>
14585
14586 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14587
3f2a3564
PR
145882017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14589
14590 python/python.c (do_start_initialization): Fix memory leak.
14591
b67aeab0
SM
145922017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14593
14594 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14595 using get_ptrace_pid.
14596 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14597 inferior_ptid.
14598 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14599 inferior_ptid instead of pid.
14600
ffdbe864
YQ
146012017-03-22 Yao Qi <yao.qi@linaro.org>
14602
14603 * aarch64-tdep.c: Wrap locally used classes in anonymous
14604 namespace.
14605 * arm-tdep.c: Likewise.
14606 * linespec.c: Likewise.
14607 * ui-out.c: Likewise.
14608
9d736fbf
JG
146092017-03-22 Jonah Graham <jonah@kichwacoders.com>
14610
14611 PR gdb/19637
14612 * python/lib/gdb/printer/bound_registers.py: Import sys.
14613
3de88e9a
SM
146142017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14615
14616 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14617 windows_thread_info parameter and use it instead of
14618 current_thread.
14619 (windows_fetch_inferior_registers): Don't set current_thread,
14620 pass the thread to do_windows_fetch_inferior_registers. Use
14621 ptid from regcache instead of inferior_ptid.
14622 (do_windows_store_inferior_registers): Add windows_thread_info
14623 parameter and use it instead of current_thread.
14624 (windows_store_inferior_registers): Don't set current_thread,
14625 pass the thread to do_windows_store_inferior_registers. Use
14626 ptid from regcache instead of inferior_ptid.
14627
0e7b8f61
SM
146282017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14629
14630 * ser-mingw.c (ser_windows_raw): Remove reference to
14631 struct serial::current_timeout.
14632
5badf10a
IR
146332017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14634
14635 PR tdep/20928
14636 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14637 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14638 (sparc64_fsr_type): Fix %fsr decoding.
14639
cee59b3f
TW
146402017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14641
14642 * python/py-record-btrace.c (btpy_insn_data): Change return type
14643 for Python 2.
14644
639a9038
SM
146452017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14646
14647 * spu-linux-nat.c (spu_fetch_inferior_registers,
14648 spu_store_inferior_registers): Use ptid from regcache, set and
14649 restore inferior_ptid.
14650 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14651 Likewise.
14652
bcc0c096
SM
146532017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14654
14655 * i386-linux-nat.c (fetch_register, store_register,
14656 i386_linux_fetch_inferior_registers,
14657 i386_linux_store_inferior_registers): Use ptid from regcache.
14658 * ia64-linux-nat.c (ia64_linux_fetch_register,
14659 ia64_linux_store_register): Likewise.
14660 * inf-ptrace.c (inf_ptrace_fetch_register,
14661 inf_ptrace_store_register): Likewise.
14662 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14663 m32r_linux_store_inferior_registers): Likewise.
14664 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14665 m68kbsd_store_inferior_registers): Likewise.
14666 * m68k-linux-nat.c (fetch_register, store_register,
14667 m68k_linux_fetch_inferior_registers,
14668 m68k_linux_store_inferior_registers): Likewise.
14669 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14670 m88kbsd_store_inferior_registers): Likewise.
14671 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14672 mips_fbsd_store_inferior_registers): Likewise.
14673 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14674 mips64_linux_regsets_store_registers): Likewise.
14675 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14676 mipsnbsd_store_inferior_registers): Likewise.
14677 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14678 mips64obsd_store_inferior_registers): Likewise.
14679 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14680 Likewise.
14681 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14682 ppcfbsd_store_inferior_registers): Likewise.
14683 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14684 ppc_linux_store_inferior_registers): Likewise.
14685 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14686 ppcnbsd_store_inferior_registers): Likewise.
14687 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14688 ppcobsd_store_registers): Likewise.
14689 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14690 Likewise.
14691 * ravenscar-thread.c (ravenscar_fetch_registers,
14692 ravenscar_store_registers, ravenscar_prepare_to_store):
14693 Likewise.
14694 * record-btrace.c (record_btrace_fetch_registers,
14695 record_btrace_store_registers, record_btrace_prepare_to_store):
14696 Likewise.
14697 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14698 Lookup inferior using ptid from regcache, instead of
14699 current_inferior.
14700 * remote.c (remote_fetch_registers, remote_store_registers): Use
14701 ptid from regcache.
14702 * rs6000-nat.c (fetch_register, store_register): Likewise.
14703 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14704 s390_linux_store_inferior_registers): Likewise.
14705 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14706 shnbsd_store_inferior_registers): Likewise.
14707 * sol-thread.c (sol_thread_fetch_registers,
14708 sol_thread_store_registers): Likewise.
14709 * sparc-nat.c (sparc_fetch_inferior_registers,
14710 sparc_store_inferior_registers): Likewise.
14711 * tilegx-linux-nat.c (fetch_inferior_registers,
14712 store_inferior_registers): Likewise.
14713 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14714 vaxbsd_store_inferior_registers): Likewise.
14715 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14716 store_xtregs): Likewise.
14717
c0f55cc6
AV
147182017-03-20 Artemiy Volkov <artemiyv@acm.org>
14719
14720 PR gdb/14441
14721 * NEWS: Mention support for rvalue references in GDB and python.
14722 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14723 supports both lvalue and rvalue references.
14724
15c0a2a9
AV
147252017-03-20 Artemiy Volkov <artemiyv@acm.org>
14726
14727 PR gdb/14441
14728 * gdbtypes.c (rank_one_type): Implement overloading
14729 resolution rules regarding rvalue references.
14730
aa006118
AV
147312017-03-20 Artemiy Volkov <artemiyv@acm.org>
14732
14733 PR gdb/14441
14734 * aarch64-tdep.c (aarch64_type_align)
14735 (aarch64_extract_return_value, aarch64_store_return_value): Change
14736 lvalue reference type checks to general reference type checks.
14737 * amd64-tdep.c (amd64_classify): Likewise.
14738 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14739 Likewise.
14740 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14741 (arm_store_return_value): Likewise.
14742 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14743 * c-typeprint.c (c_print_type): Likewise.
14744 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14745 (cplus_number_of_children, cplus_describe_child): Likewise.
14746 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14747 * completer.c (expression_completer): Likewise.
14748 * cp-support.c (make_symbol_overload_list_adl_namespace):
14749 Likewise.
14750 * darwin-nat-info.c (info_mach_region_command): Likewise.
14751 * dwarf2loc.c (entry_data_value_coerce_ref)
14752 (value_of_dwarf_reg_entry): Likewise.
14753 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14754 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14755 Likewise.
14756 * findvar.c (extract_typed_address, store_typed_address):
14757 Likewise.
14758 * gdbtypes.c (rank_one_type): Likewise.
14759 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14760 * infcall.c (value_arg_coerce): Likewise.
14761 * language.c (pointer_type): Likewise.
14762 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14763 Likewise.
14764 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14765 * mn10300-tdep.c (mn10300_type_align): Likewise.
14766 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14767 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14768 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14769 Likewise.
14770 * printcmd.c (print_formatted, x_command): Likewise.
14771 * python/py-type.c (typy_get_composite, typy_template_argument):
14772 Likewise.
14773 * python/py-value.c (valpy_referenced_value)
14774 (valpy_get_dynamic_type, value_has_field): Likewise.
14775 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14776 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14777 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14778 * spu-tdep.c (spu_scalar_value_p): Likewise.
14779 * symtab.c (lookup_symbol_aux): Likewise.
14780 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14781 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14782 Likewise.
14783 * valops.c (value_cast_pointers, value_cast)
14784 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14785 (value_struct_elt, value_struct_elt_bitpos)
14786 (value_find_oload_method_list, find_overload_match)
14787 (value_rtti_indirect_type): Likewise.
14788 * valprint.c (val_print_scalar_type_p, generic_val_print):
14789 Likewise.
14790 * value.c (value_actual_type, value_as_address, unpack_long)
14791 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14792 (coerce_ref): Likewise.
14793 * varobj.c (varobj_get_value_type): Likewise.
14794
3fcf899d
AV
147952017-03-20 Artemiy Volkov <artemiyv@acm.org>
14796
14797 PR gdb/14441
14798 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14799 table of constants.
14800 * python/lib/gdb/command/explore.py: Support exploring values
14801 of rvalue reference types.
14802 * python/lib/gdb/types.py: Implement get_basic_type() for
14803 rvalue reference types.
14804 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14805 constant.
14806 * python/py-value.c (valpy_getitem): Add an rvalue reference
14807 check.
14808 (valpy_reference_value): Add new parameter "refcode".
14809 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14810 New wrappers for valpy_reference_value().
14811 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14812 (gdbpy_invoke_xmethod): Likewise.
14813
4297a3f0
AV
148142017-03-20 Artemiy Volkov <artemiyv@acm.org>
14815
14816 PR gdb/14441
14817 * dwarf2read.c (process_die, read_type_die_1): Handle the
14818 DW_TAG_rvalue_reference_type DIE.
14819 (read_tag_reference_type): Add new parameter "refcode".
14820
e1cb3213
AV
148212017-03-20 Artemiy Volkov <artemiyv@acm.org>
14822
14823 PR gdb/14441
14824 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14825 (c_type_print_modifier, c_type_print_varspec_suffix)
14826 (c_type_print_base): Support printing rvalue reference types.
14827 * c-valprint.c (c_val_print, c_value_print): Support printing
14828 rvalue reference values.
14829
e4347c89
AV
148302017-03-20 Artemiy Volkov <artemiyv@acm.org>
14831
14832 PR gdb/14441
14833 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14834 typename.
14835 * cp-support.c (replace_typedefs): Handle
14836 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14837 * python/py-type.c (typy_lookup_type): Likewise.
14838
53cc15f5
AV
148392017-03-20 Artemiy Volkov <artemiyv@acm.org>
14840
14841 PR gdb/14441
14842 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14843 * parse.c (insert_type): Change assert statement.
14844 (follow_types): Handle rvalue reference types.
14845 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14846 constant.
14847
a65cfae5
AV
148482017-03-20 Artemiy Volkov <artemiyv@acm.org>
14849
14850 PR gdb/14441
14851 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14852 value_ref() interface.
14853 * c-valprint.c (c_value_print): Likewise.
14854 * infcall.c (value_arg_coerce): Likewise.
14855 * python/py-value.c (valpy_reference_value): Likewise.
14856 * valops.c (value_cast, value_reinterpret_cast)
14857 (value_dynamic_cast, typecmp): Likewise.
14858 (value_ref): Parameterize by kind of return value reference type.
14859 * value.h (value_ref): Add new parameter "refcode".
14860
3b224330
AV
148612017-03-20 Artemiy Volkov <artemiyv@acm.org>
14862
14863 PR gdb/14441
14864 * dwarf2read.c (read_tag_reference_type): Use
14865 lookup_lvalue_reference_type() instead of lookup_reference_type().
14866 * eval.c (evaluate_subexp_standard): Likewise.
14867 * f-exp.y: Likewise.
14868 * gdbtypes.c (make_reference_type, lookup_reference_type):
14869 Generalize with rvalue reference types.
14870 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14871 convenience wrappers for lookup_reference_type().
14872 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14873 reference kind parameter.
14874 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14875 wrappers for lookup_reference_type().
14876 * guile/scm-type.c (gdbscm_type_reference): Use
14877 lookup_lvalue_reference_type() instead of lookup_reference_type().
14878 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14879 * parse.c (follow_types): Likewise.
14880 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14881 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14882 Likewise.
14883 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14884 (gdbpy_invoke_xmethod): Likewise.
14885 * stabsread.c: Provide extra argument to make_reference_type()
14886 call.
14887 * valops.c (value_ref, value_rtti_indirect_type): Use
14888 lookup_lvalue_reference_type() instead of lookup_reference_type().
14889
f9aeb8d4
AV
148902017-03-20 Artemiy Volkov <artemiyv@acm.org>
14891
14892 PR gdb/14441
14893 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14894 (TYPE_IS_REFERENCE): New macro.
14895 (struct type): Add rvalue_reference_type field.
14896 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14897
51457a05
MAL
148982017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14899
14900 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14901 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14902 New function definition.
14903 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14904 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14905 New function declaration.
14906 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14907 * mi/mi-interp.h: New file.
14908 * solib.c (info_sharedlibrary_command): Replace for loop with
14909 ALL_SO_LIBS macro
14910 * solib.h (update_solib_list): New function declaration.
14911 (so_list_head): Move macro.
14912 * solist.h (ALL_SO_LIBS): New macro.
14913
e696b3ad
MAL
149142017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14915
14916 * infcmd.c (post_create_inferior): Remove unused argument in
14917 call to solib_add.
14918 * remote.c (remote_start_remote): Likewise.
14919 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14920 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14921 (enable_break): Likewise.
14922 * solib.c (update_solib_list): Remove unused target argument
14923 and its documentation.
14924 (solib_add): Remove unused target argument. Remove unused
14925 argument in call to update_solib_list.
14926 (info_sharedlibrary_command): Remove unused argument in call
14927 to update_solib_list.
14928 (sharedlibrary_command): Remove unused argument in call to
14929 solib_add.
14930 (handle_solib_event): Likewise.
14931 (reload_shared_libraries): Likewise.
14932 * solib.h (solib_add): Remove unused target argument.
14933
dcb84eda
AA
149342017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14935
14936 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14937 (s390_displaced_step_fixup): Cover relative branches with the
14938 default fixup handling. This fixes lack of support for some
14939 relative branch instructions.
14940
d9cb6cdc
SM
149412017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14942
14943 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14944 ptid from regcache.
14945
1afaf9f4
SM
149462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14947
14948 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14949 i386_darwin_store_inferior_registers): Use ptid from regcache.
14950
aac12e24
SM
149512017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14952
14953 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14954 i386bsd_store_inferior_registers): Use ptid from regcache.
14955
bbe1eef1
SM
149562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14957
14958 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14959 hppaobsd_store_registers): Use ptid from regcache.
14960
10799020
SM
149612017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14962
14963 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14964 hppanbsd_store_registers): Use ptid from regcache.
14965
00204cf7
SM
149662017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14967
14968 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14969 from regcache. Use get_ptrace_pid.
14970
11a33714
SM
149712017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14972
14973 * corelow.c (get_core_register_section): Use ptid from regcache,
14974 update doc.
14975
317cd492
SM
149762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14977
14978 * bsd-uthread.c (bsd_uthread_fetch_registers,
14979 bsd_uthread_store_registers): Use ptid from regcache, set and
14980 restore inferior_ptid.
14981
9ac8a7c2
SM
149822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14983
14984 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14985 fetch_fp_regs, store_register, store_regs, store_fp_register,
14986 store_fp_regs): Use ptid from regcache.
14987
4ac4bb6a
SM
149882017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14989
14990 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14991 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14992 store_vfp_regs): Use ptid from regcache.
14993
9bcbdca8
PA
149942017-03-17 Pedro Alves <palves@redhat.com>
14995
14996 PR remote/21188
14997 * ser-base.c (ser_base_wait_for): Add comment.
14998 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14999 version.
15000 * ser-unix.c (hardwire_raw): Remove reference to
15001 scb->current_timeout.
15002 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15003 (hardwire_ops): Install ser_base_readchar instead of
15004 hardwire_readchar.
15005 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15006 Remove fields.
15007
7503099f
JG
150082017-03-17 Jonah Graham <jonah@kichwacoders.com>
15009
15010 PR gdb/19637
15011 * python/lib/gdb/printer/bound_registers.py: Add support for
15012 Python 3.
15013
7942e96e
AA
150142017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15015
15016 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15017 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15018 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15019 byte_offset to subobj_byte_offset. Fix the handling of
15020 DWARF_VALUE_STACK on big-endian targets when coming via an
15021 implicit pointer.
15022 (dwarf2_evaluate_loc_desc): Adjust call to
15023 dwarf2_evaluate_loc_desc_full.
15024 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15025 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15026
ba14f379
YQ
150272017-03-16 Yao Qi <yao.qi@linaro.org>
15028
15029 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15030 and REVSH instructions.
15031
b121eeb9
YQ
150322017-03-16 Yao Qi <yao.qi@linaro.org>
15033
15034 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15035 (arm_record_test): Declare.
15036 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15037 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15038 align with the manual.
15039 (thumb_record_misc): Adjust the code order to align with the
15040 manual.
15041 (thumb2_record_decode_insn_handler): Fix instruction matching.
15042 (instruction_reader_thumb): New class.
15043 (arm_record_test): New function.
15044
728a7913
YQ
150452017-03-16 Yao Qi <yao.qi@linaro.org>
15046
15047 * arm-tdep.c (abstract_memory_reader): New class.
15048 (instruction_reader): New class.
15049 (extract_arm_insn): Add argument 'reader'. Callers updated.
15050 (decode_insn): Likewise.
15051
34b43320
DE
150522017-03-16 Doug Evans <dje@google.com>
15053
a7c0469f
DE
15054 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15055 member. Change type of TYPE member to SCM. All uses updated.
15056 (lsscm_make_lazy_string_smob): Add assert.
15057 (lsscm_make_lazy_string): Flag bad length values.
15058 (lsscm_elt_type): New function.
15059 (gdbscm_lazy_string_to_value): Rewrite to use
15060 lsscm_safe_lazy_string_to_value.
15061 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15062 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15063 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15064 in incoming type.
15065 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15066 * guile/scm-type.c (tyscm_scm_to_type): New function.
15067
150682017-03-15 Doug Evans <dje@google.com>
15069
34b43320
DE
15070 PR python/17728, python/18439, python/18779
15071 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15072 member. Change type of TYPE member to PyObject *. All uses updated.
15073 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15074 (gdbpy_create_lazy_string_object): Flag bad length values.
15075 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15076 Handle typedefs in incoming type.
15077 (stpy_lazy_string_elt_type): New function.
15078 (gdbpy_extract_lazy_string): Call it.
15079 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15080 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15081 typedefs in incoming type.
15082
a3a5fecc
DE
150832017-03-16 Doug Evans <dje@google.com>
15084
15085 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15086 * guile/scm-type.c (tyscm_scm_to_type): New function.
15087
28f1c605
JW
150882017-03-16 Jiong Wang <jiong.wang@arm.com>
15089
15090 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15091 "ULONGEST" for "skip".
15092
87c336f6
AA
150932017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15094
15095 PR gdb/21220
15096 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15097 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15098 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15099 over ptrace peek/poke until end of buffer or error.
15100
cf81cf60
SM
151012017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15102
15103 * parse.c (length_of_subexp): Make static.
15104 * parser-defs.h (length_of_subexp): Remove.
15105
a379284a
AA
151062017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15107
15108 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15109 as well.
15110
8a6200ba
PA
151112017-03-14 Pedro Alves <palves@redhat.com>
15112
15113 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15114 (main): Use std::unique_ptr. Remove calls to
15115 cp_demangled_name_parse_free.
15116
f79ec206
SM
151172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15118
15119 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15120 alphabsd_store_inferior_registers): Use regcache->ptid instead
15121 of inferior_ptid.
15122
edb5fb00
SM
151232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15124
15125 * aix-thread.c (aix_thread_fetch_registers,
15126 aix_thread_store_registers): Use regcache->ptid instead of
15127 inferior_ptid.
15128
55119686
SM
151292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15130
15131 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15132 store_gregs_to_thread, fetch_fpregs_from_thread,
15133 store_fpregs_to_thread): Use regcache->ptid instead of
15134 inferior_ptid.
15135
6a06fbb7
SM
151362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15137
15138 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15139 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15140 instead of inferior_ptid.
15141
c6386875
SM
151422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15143
15144 * target.c (target_fetch_registers, target_store_registers): Add
15145 assert.
15146
ddaaf0fb
SM
151472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15148
15149 * regcache.h (regcache_get_ptid): New function.
15150 * regcache.c (regcache_get_ptid): New function.
15151
b9da89d1 151522017-03-13 Mark Wielaard <mark@klomp.org>
15153
15154 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15155
5f4d1085
KS
151562017-03-10 Keith Seitz <keiths@redhat.com>
15157
15158 PR c++/8218
15159 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15160
c65d6b55
PA
151612017-03-08 Pedro Alves <palves@redhat.com>
15162
15163 PR gdb/18360
15164 * infrun.c (start_step_over, do_target_resume, resume)
15165 (restart_threads): Assert we're not resuming a thread that is
15166 meant to be stopped.
15167 (infrun_thread_stop_requested_callback): Delete.
15168 (infrun_thread_stop_requested): If the thread is internally
15169 stopped, queue a pending stop event and clear the thread's
15170 inline-frame state.
15171 (handle_stop_requested): New function.
15172 (handle_syscall_event, handle_inferior_event_1): Use
15173 handle_stop_requested.
15174 (handle_stop_requested): New function.
15175 (handle_signal_stop): Set the thread's stop_signal here instead of
15176 at caller.
15177 (finish_step_over): Clear step over info unconditionally.
15178 (handle_signal_stop): If the user had interrupted the event
15179 thread, consider the stop a random signal.
15180 (handle_signal_stop) <signal arrived while stepping over
15181 breakpoint>: Don't restart threads here.
15182 (stop_waiting): Don't clear step-over info here.
15183
15c22686
PA
151842017-03-08 Pedro Alves <palves@redhat.com>
15185
15186 PR 21206
15187 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15188 goes to argument 2, not 1.
15189
6e5d74e7
PA
151902017-03-08 Pedro Alves <palves@redhat.com>
15191
15192 PR cli/21218
15193 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15194 display_gdb_prompt.
15195 (command_line_input): Add comment.
15196
9753a2f6
PA
151972017-03-08 Pedro Alves <palves@redhat.com>
15198
15199 PR tui/21216
15200 * tui/tui-file.c (tui_file::write): New.
15201 * tui/tui-file.h (tui_file): Override "write".
15202 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15203 factored out from ...
15204 (tui_puts): ... here.
15205 (tui_putc): Use them.
15206 (tui_write): New function.
15207 * tui/tui-io.h (tui_write): Declare.
15208
1672e0d9
SDJ
152092017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15210
15211 * Makefile.in (SFILES): Replace "environ.c" with
15212 "common/environ.c".
15213 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15214 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15215 to...
15216 * common/environ.c: ... here.
15217 * environ.h: Moved to...
15218 * common/environ.h: ... here.
15219
f7bb4e3a
PB
152202017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15221
15222 * gdbarch.sh (pstring_ptr): New static function.
15223 (gdbarch_disassembler_options): Use it.
15224 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15225 not valid_disassembler_option->name.
15226 * gdbarch.c: Regenerate.
15227
e45ced6c
PB
152282017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15229
15230 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15231
5f6fd321
PA
152322017-03-07 Pedro Alves <palves@redhat.com>
15233
15234 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15235
6dbb839a 152362017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15237
15238 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15239 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15240 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15241 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15242
d274ecf4
SM
152432017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15244
15245 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15246
df97be55
SM
152472017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15248
15249 * remote.c (remote_add_target_side_commands): Use range-based
15250 for loop.
15251
7d45f3df
YQ
152522017-03-03 Yao Qi <yao.qi@linaro.org>
15253
15254 PR gdb/21165
15255 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15256 value is lazy.
15257 * valprint.c (common_val_print): Likewise.
15258
65b48a81
PB
152592017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15260
15261 * NEWS: Mention new set/show disassembler-options commands.
15262 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15263 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15264 (prospective_options): New static variable.
15265 (gdb_disassembler::gdb_disassembler): Initialize
15266 m_di.disassembler_options.
15267 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15268 (get_disassembler_options): New function.
15269 (set_disassembler_options): Likewise.
15270 (set_disassembler_options_sfunc): Likewise.
15271 (show_disassembler_options_sfunc): Likewise.
15272 (disassembler_options_completer): Likewise.
15273 (_initialize_disasm): Likewise.
15274 * disasm.h (get_disassembler_options): New prototype.
15275 (set_disassembler_options): Likewise.
15276 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15277 (gdbarch_verify_disassembler_options): Likewise.
15278 * gdbarch.c: Regenerate.
15279 * gdbarch.h: Likewise.
15280 * arm-tdep.c (num_disassembly_options): Delete.
15281 (set_disassembly_style): Likewise.
15282 (arm_disassembler_options): New static variable.
15283 (set_disassembly_style_sfunc): Convert short style name into long
15284 option name. Call set_disassembler_options.
15285 (show_disassembly_style_sfunc): New function.
15286 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15287 set_gdbarch_verify_disassembler_options.
15288 (_initialize_arm_tdep): Delete regnames variable and update callers.
15289 (arm_disassembler_options): Initialize.
15290 (disasm_options): New variable.
15291 (num_disassembly_options): Rename from this...
15292 (num_disassembly_styles): ...to this. Compute by scanning through
15293 disasm_options.
15294 (valid_disassembly_styles): Initialize using disasm_options.
15295 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15296 set_arm_regname_option.
15297 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15298 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15299 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15300 set_gdbarch_verify_disassembler_options.
15301 * s390-tdep.c (s390_disassembler_options): New static variable.
15302 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15303 set_gdbarch_verify_disassembler_options.
15304
d538e36d
SM
153052017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15306
15307 * remote.c (remote_add_target_side_condition): Remove "struct"
15308 keyword from range-based for loop.
15309
83621223
SM
153102017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15311
15312 * remote.c (remote_add_target_side_condition): Use range-based
15313 for loop. Update comment.
15314
2123df0e
YQ
153152017-02-27 Yao Qi <yao.qi@linaro.org>
15316
15317 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15318
8e368124
AH
153192017-02-26 Alan Hayward <alan.hayward@arm.com>
15320
15321 * regcache.c (regcache_raw_update): New function.
15322 (regcache_raw_read): Move code to regcache_raw_update.
15323 * regcache.h (regcache_raw_update): New declaration.
15324 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15325
a49dd8dd
JK
153262017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15327
15328 * dwarf2read.c (create_debug_type_hash_table): Initialize
15329 header.signature and header.type_offset_in_tu.
15330
34e4bae9
PA
153312017-02-24 Pedro Alves <palves@redhat.com>
15332
15333 * symtab.c (make_file_symbol_completion_list_1): Use
15334 add_symtab_completions.
15335
b0e4b369
AH
153362017-02-24 Alan Hayward <alan.hayward@arm.com>
15337
15338 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15339
975c21ab
AH
153402017-02-24 Alan Hayward <alan.hayward@arm.com>
15341
15342 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15343 I386_MAX_REGISTER_SIZE.
15344 (i386_pseudo_register_write): Likewise.
15345 (i386_process_record): Likewise.
15346 * i387-tdep.c (i387_supply_xsave): Likewise.
15347 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15348 (store_register): Likewise.
15349
14bc53a8
PA
153502017-02-23 Pedro Alves <palves@redhat.com>
15351
15352 * ada-lang.c: Include "common/function-view.h".
15353 (ada_iterate_over_symbols): Adjust to use function_view as
15354 callback type.
15355 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15356 (ada_make_symbol_completion_list): Use a lambda.
15357 (ada_exc_search_name_matches): Delete.
15358 (name_matches_regex): New.
15359 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15360 * compile/compile-c-support.c: Include "common/function-view.h".
15361 (print_one_macro): Change prototype to accept a ui_file pointer.
15362 (write_macro_definitions): Use a lambda.
15363 * dwarf2read.c: Include "common/function-view.h".
15364 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15365 (dw2_expand_symtabs_matching): Adjust to use function_view as
15366 callback type.
15367 * language.h: Include "common/function-view.h".
15368 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15369 function_view as callback type.
15370 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15371 * linespec.c: Include "common/function-view.h".
15372 (collect_info::add_symbol): New method.
15373 (struct symbol_and_data_callback, iterate_inline_only, struct
15374 symbol_matcher_data, iterate_name_matcher): Delete.
15375 (iterate_over_all_matching_symtabs): Adjust to use function_view
15376 as callback type and lambdas.
15377 (iterate_over_file_blocks): Adjust to use function_view as
15378 callback type.
15379 (decode_compound_collector): Now a class with private fields.
15380 (decode_compound_collector::release_symbols): New method.
15381 (collect_one_symbol): Rename to...
15382 (decode_compound_collector::operator()): ... this and adjust.
15383 (lookup_prefix_sym): decode_compound_collector construction bits
15384 move to decode_compound_collector ctor. Pass the
15385 decode_compound_collector object directly as callback. Remove
15386 cleanups and use decode_compound_collector::release_symbols
15387 instead.
15388 (symtab_collector): Now a class with private fields.
15389 (symtab_collector::release_symtabs): New method.
15390 (add_symtabs_to_list): Rename to...
15391 (symtab_collector::operator()): ... this and adjust.
15392 (collect_symtabs_from_filename): symtab_collector construction
15393 bits move to symtab_collector ctor. Pass the symtab_collector
15394 object directly as callback. Remove cleanups and use
15395 symtab_collector::release_symtabs instead.
15396 (collect_symbols): Delete.
15397 (add_matching_symbols_to_info): Use lambdas.
15398 * macrocmd.c (print_macro_callback): Delete.
15399 (info_macro_command): Use a lambda.
15400 (info_macros_command): Pass print_macro_definition as callable
15401 directly.
15402 (print_one_macro): Remove 'ignore' parameter.
15403 (macro_list_command): Adjust.
15404 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15405 (macro_for_each_data::user_data): Delete field.
15406 (foreach_macro): Adjust to call the function_view.
15407 (macro_for_each): Adjust to use function_view as callback type.
15408 (foreach_macro_in_scope): Adjust to call the function_view.
15409 (macro_for_each_in_scope): Adjust to use function_view as callback
15410 type.
15411 * macrotab.h: Include "common/function-view.h".
15412 (macro_callback_fn): Declare a prototype instead of a pointer.
15413 Remove "user_data" parameter.
15414 (macro_for_each, macro_for_each_in_scope): Adjust to use
15415 function_view as callback type.
15416 * psymtab.c (partial_map_expand_apply)
15417 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15418 Adjust to use function_view as callback type and to return bool.
15419 (psym_expand_symtabs_matching): Adjust to use function_view as
15420 callback types.
15421 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15422 to use function_view as callback type and to return bool.
15423 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15424 callback types.
15425 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15426 as callback types.
15427 * symfile.h: Include "common/function-view.h".
15428 (expand_symtabs_file_matcher_ftype)
15429 (expand_symtabs_symbol_matcher_ftype)
15430 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15431 return bool.
15432 (quick_symbol_functions::map_symtabs_matching_filename)
15433 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15434 function_view as callback type and return bool.
15435 (expand_symtabs_matching): Adjust to use function_view as callback
15436 type.
15437 (maintenance_expand_name_matcher)
15438 (maintenance_expand_file_matcher): Delete.
15439 (maintenance_expand_symtabs): Use lambdas.
15440 * symtab.c (iterate_over_some_symtabs): Adjust to use
15441 function_view as callback types and return bool.
15442 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15443 of a cleanup.
15444 (lookup_symtab_callback): Delete.
15445 (lookup_symtab): Use a lambda.
15446 (iterate_over_symbols): Adjust to use function_view as callback
15447 type.
15448 (struct search_symbols_data, search_symbols_file_matches)
15449 (search_symbols_name_matches): Delete.
15450 (search_symbols): Use a pair of lambdas.
15451 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15452 (symtab_expansion_callback): Delete.
15453 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15454 * symtab.h: Include "common/function-view.h".
15455 (iterate_over_some_symtabs): Adjust to use function_view as
15456 callback type and return bool.
15457 (iterate_over_symtabs): Adjust to use function_view as callback
15458 type.
15459 (symbol_found_callback_ftype): Remove 'data' parameter and return
15460 bool.
15461 (iterate_over_symbols): Adjust to use function_view as callback
15462 type.
15463
07e253aa
PA
154642017-02-23 Pedro Alves <palves@redhat.com>
15465
15466 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15467 (%.o) <unittests/%.c>: New pattern.
15468 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15469 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15470 * common/function-view.h: New file.
15471 * unittests/function-view-selftests.c: New file.
15472 * configure: Regenerate.
15473
8eaf5320
SM
154742017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15475
15476 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15477 inferior_ptid.
15478 * go32-nat.c (go32_thread_alive): Likewise.
15479
38768751
YQ
154802017-02-23 Yao Qi <yao.qi@linaro.org>
15481
15482 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15483 delete.
15484
0a8beaba
YQ
154852017-02-23 Yao Qi <yao.qi@linaro.org>
15486
15487 * varobj.c (varobj_clear_saved_item): Use delete instead of
15488 xfree.
15489 (update_dynamic_varobj_children): Likewise.
15490
58fdfd2c
JK
154912017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15492
15493 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15494
1b90b139
SM
154952017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15496
15497 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15498 m_enum_value to 0 in default constructor.
15499
2039d74e
EBM
155002017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15501
15502 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15503 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15504 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15505 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15506 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15507 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15508 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15509 IS_STORE_CONDITIONAL_INSN.
15510
7814882a
JK
155112017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15512
15513 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15514
0ae60b63
JK
155152017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15516
15517 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15518
0224619f
JK
155192017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15520
15521 * dwarf2read.c (skip_one_die, read_attribute_value)
15522 (dwarf2_const_value_attr, dump_die_shallow)
15523 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15524 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15525
0af92d60
JK
155262017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15527
15528 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15529 (dwarf_parse_macro_header): Accept DWARF version 5.
15530 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15531
216f72a1
JK
155322017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15533
15534 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15535 DW_AT_GNU_*.
15536 * common/common-exceptions.h (enum errors): Likewise.
15537 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15538 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15539 (dwarf_expr_context::execute_stack_op): Likewise.
15540 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15541 Likewise.
15542 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15543 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15544 (show_entry_values_debug, call_site_to_target_addr)
15545 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15546 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15547 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15548 (value_of_dwarf_block_entry, indirect_pieced_value)
15549 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15550 (disassemble_dwarf_expression): Likewise.
15551 * dwarf2read.c (process_die, inherit_abstract_dies)
15552 (read_call_site_scope): Likewise.
15553 * gdbtypes.h (struct func_type, struct call_site_parameter)
15554 (struct call_site): Likewise.
15555 * stack.c (read_frame_arg): Likewise.
15556 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15557
43988095
JK
155582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15559
15560 * defs.h (read_unsigned_leb128): New declaration.
15561 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15562 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15563 (dwarf2_find_location_expression): Call also
15564 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15565 * dwarf2loc.h (dwarf2_version): New declaration.
15566 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15567 rnglists.
15568 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15569 .debug_rnglists.
15570 (struct dwop_section_names): Add loclists_dwo.
15571 (dwop_section_names): Add .debug_loclists.dwo.
15572 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15573 (struct dwarf2_per_cu_data): Add dwarf_version.
15574 (struct dwo_sections): Add loclists.
15575 (struct attr_abbrev): Add implicit_const.
15576 (read_indirect_line_string): New declaration.
15577 (read_unsigned_leb128): Delete declaration.
15578 (rcuh_kind): New definition.
15579 (read_and_check_comp_unit_head): Change parameter
15580 is_debug_types_section to section_kind.
15581 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15582 (read_comp_unit_head): Change parameter abfd to section, add parameter
15583 section_kind. Handle DWARF-5.
15584 (error_check_comp_unit_head): Accept also DWARF version 5.
15585 (read_and_check_comp_unit_head): Change parameter
15586 is_debug_types_section to section_kind.
15587 (read_and_check_type_unit_head): Delete function.
15588 (read_abbrev_offset): Handle DWARF-5.
15589 (create_debug_type_hash_table): Add parameter section_kind. Process
15590 only DW_UT_type. Use signature and type_offset_in_tu from struct
15591 comp_unit_head.
15592 (create_debug_types_hash_table): Update create_debug_type_hash_table
15593 caller.
15594 (create_all_type_units): Call create_debug_type_hash_table.
15595 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15596 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15597 caller.
15598 (skip_one_die): Handle DW_FORM_implicit_const.
15599 (dwarf2_rnglists_process): New function.
15600 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15601 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15602 (read_attribute_value): Handle DW_FORM_implicit_const,
15603 DW_FORM_line_strp.
15604 (read_attribute): Handle DW_FORM_implicit_const.
15605 (read_indirect_string_at_offset_from): New function from
15606 read_indirect_string_at_offset.
15607 (read_indirect_string_at_offset): Call
15608 read_indirect_string_at_offset_from.
15609 (read_indirect_line_string_at_offset): New function.
15610 (read_indirect_string): New function comment.
15611 (read_indirect_line_string): New function.
15612 (read_unsigned_leb128): Make it global.
15613 (dwarf2_string_attr): Handle DWARF-5.
15614 (add_include_dir_stub, read_formatted_entries): New functions.
15615 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15616 Handle DWARF-5.
15617 (per_cu_header_read_in): Update read_comp_unit_head caller.
15618 (dwarf2_version): New function.
15619 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15620 rnglists.
15621 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15622 fields.
15623
22d2f3ab
JK
156242017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15625
15626 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15627
5f46c5a5
JK
156282017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15629
15630 * dwarf2read.c (dwarf2_ranges_process): New function from
15631 dwarf2_ranges_read.
15632 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15633 dwarf2_ranges_process.
15634
78d4d2c5
JK
156352017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15636
15637 * dwarf2read.c (create_debug_type_hash_table): New function from
15638 create_debug_types_hash_table.
15639 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15640 (create_all_type_units, open_and_init_dwo_file): Update
15641 create_debug_types_hash_table callers.
15642
1b076f25
SDJ
156432017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15644
15645 PR gdb/16188
15646 * fork-child.c (trace_start_error): Fix thinko. va_end should
15647 refer to 'ap', not 'args'.
15648
0db8980c
SDJ
156492017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15650 Pedro Alves <palves@redhat.com>
15651
15652 PR gdb/16188
15653 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15654 calls succeeded.
15655 * fork-child.c (trace_start_error): New function.
15656 (trace_start_error_with_name): Likewise.
15657 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15658 * inf-ptrace.c (inf_ptrace_me): Likewise.
15659 * inferior.h (trace_start_error): New prototype.
15660 (trace_start_error_with_name): Likewise.
15661
99e8a4f9
SDJ
156622017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15663
15664 PR gdb/21164
15665 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15666 NULL before using it.
15667 * symmisc.c (maintenance_print_symbols): Likewise.
15668 (maintenance_print_msymbols): Likewise.
15669
4e746bb6
TW
156702017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15671
15672 * NEWS: Add record Python bindings entry.
15673
156742017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15675
15676 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15677 py-record-full.o.
15678 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15679 * python/py-record-btrace.c, python/py-record-btrace.h,
15680 python/py-record-full.c, python/py-record-full.h: New file.
15681 * python/py-record.c: Add include for py-record-btrace.h and
15682 py-record-full.h.
15683 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15684 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15685 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15686 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15687 New definition.
15688 (gdbpy_initialize_btrace): New export.
15689 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15690
156912017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15692
15693 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15694 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15695 * python/py-record.c: New file.
15696 * python/python-internal.h (gdbpy_start_recording,
15697 gdbpy_current_recording, gdpy_stop_recording,
15698 gdbpy_initialize_record): New export.
15699 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15700 (python_GdbMethods): Add gdbpy_start_recording,
15701 gdbpy_current_recording and gdbpy_stop_recording.
15702
157032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15704
15705 * record-btrace.c (record_btrace_record_method): New function.
15706 (init_record_btrace_ops): Initialize to_record_method.
15707 * record-full.c (record_full_record_method): New function.
15708 (init_record_full_ops, init_record_full_core_ops): Add
15709 record_full_record_method.
15710 * record.h (enum record_method): New enum.
15711 * target-debug.h (target_debug_print_enum_record_method: New define.
15712 * target-delegates.c: Regenerate.
15713 * target.c (target_record_method): New function.
15714 * target.h: Include record.h.
15715 (struct target_ops) <to_record_method>: New field.
15716 (target_record_method): New export.
15717
157182017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15719
15720 * record.h (record_start, record_stop): New export.
15721 * record.c (record_start, record_stop): New function.
15722
157232017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15724
15725 * btrace.c (btrace_fetch): Copy function call segments pointer
15726 into a vector.
15727 (btrace_clear): Clear the vector.
15728 (btrace_find_insn_by_number): Use binary search to find the correct
15729 function call segment.
15730 * btrace.h (brace_fun_p): New typedef.
15731 (struct btrace_thread_info) <functions>: New field.
15732
157332017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15734
15735 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15736 * btrace.c (btrace_decode_error): ... here. New function.
15737 * btrace.h (btrace_decode_error): New export.
15738
157392017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15740
15741 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15742 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15743 btrace_find_insn_by_number): Remove special case for gaps.
15744 * btrace.h (btrace_insn_get_error): New export.
15745 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15746 * record-btrace.c (btrace_insn_history): Print number for gaps.
15747 (record_btrace_info, record_btrace_goto): Handle gaps.
15748
3f77c769
TT
157492017-02-14 Tom Tromey <tom@tromey.com>
15750
15751 PR python/13598:
15752 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15753 event.
15754 * python/py-evts.c (gdbpy_initialize_py_events): Add
15755 before_prompt registry.
15756 * python/py-events.h (events_object) <before_prompt>: New field.
15757
4c2c7ac6
MM
157582017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15759
15760 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15761
5cf30ebf
LM
157622017-02-13 Luis Machado <lgustavo@codesourcery.com>
15763
15764 * symfile (_initialize_symfile): Add usage text to the load command's
15765 help text.
15766
26a06916
SM
157672017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15768
15769 * utils.c (defaulted_query): Don't query on secondary UIs.
15770
0b145e37
TT
157712017-02-10 Tom Tromey <tom@tromey.com>
15772
15773 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15774
2d8365c4
TT
157752017-02-10 Tom Tromey <tom@tromey.com>
15776
15777 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15778 "cleanup" local.
15779 * python/py-type.c (typy_legacy_template_argument): Remove
15780 unnecessary "cleanup" local.
15781
2bb8f231
TT
157822017-02-10 Tom Tromey <tom@tromey.com>
15783
15784 * python/python.c (do_start_initialization): New function, from
15785 _initialize_python.
15786 (_initialize_python): Call do_start_initialization.
15787 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15788 goto.
15789
1bdfaf42
TT
157902017-02-10 Tom Tromey <tom@tromey.com>
15791
15792 * python/py-prettyprint.c (pretty_print_one_value): Use
15793 gdbpy_ref.
15794
88b6faea
TT
157952017-02-10 Tom Tromey <tom@tromey.com>
15796
15797 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15798 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15799 gdbpy_ref.
15800 * python/py-type.c (field_new): Use gdbpy_ref.
15801 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15802 gdbpy_ref.
15803 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15804 (py_free_pspace): Likewise.
15805 (pspace_to_pspace_object): Likewise.
15806 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15807 (py_free_objfile): Likewise.
15808 (objfile_to_objfile_object): Likewise.
15809 * python/py-inferior.c (delete_thread_object): Use
15810 gdbpy_ref.
15811 (infpy_read_memory): Likewise.
15812 (py_free_inferior): Likewise.
15813 * python/py-evtregistry.c (create_eventregistry_object): Use
15814 gdbpy_ref.
15815 * python/py-event.c (create_event_object): Use gdbpy_ref.
15816
7780f186
TT
158172017-02-10 Tom Tromey <tom@tromey.com>
15818
15819 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15820 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15821 used.
15822 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15823 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15824 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15825 python/py-framefilter.c, python/py-function.c,
15826 python/py-inferior.c, python/py-infevents.c,
15827 python/py-linetable.c, python/py-newobjfileevent.c,
15828 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15829 python/py-signalevent.c, python/py-stopevent.c,
15830 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15831 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15832 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15833 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15834
d4b0bb18
TT
158352017-02-10 Tom Tromey <tom@tromey.com>
15836
15837 * ui-out.h (ui_out_emit_type): New class.
15838 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15839 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15840 and ui_out_emit_tuple.
15841 (enumerate_locals): Likewise.
15842 (py_mi_print_variables, py_print_locals, py_print_args): Use
15843 ui_out_emit_list.
15844 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15845 ui_out_emit_list.
15846 * common/gdb_optional.h: New file.
15847
f67f945c
MG
158482017-02-10 Martin Galvan <martingalvan@sourceware.org>
15849
15850 * MAINTAINERS (Write After Approval): Update my e-mail address.
15851
18da0c51
MG
158522017-02-10 Martin Galvan <martingalvan@sourceware.org>
15853
15854 PR gdb/21122
15855 * breakpoint.c (_initialize_breakpoint): Update the help description
15856 of the 'commands' command to indicate that it takes a list argument.
15857
62c14536
SM
158582017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15859
15860 * interps.c (current_interp_set_logging): Remove "return".
15861
ff6fa247
GB
158622017-02-09 Gary Benson <gbenson@redhat.com>
15863
15864 * symtab.c (add_symtab_completions): Prevent NULL pointer
15865 dereference.
15866
a474bd8e
PA
158672017-02-08 Pedro Alves <palves@redhat.com>
15868
15869 * interps.c (interp::interp): Remove reference to quiet_p.
15870 (interp_set): Make static. Remove dead "Switching to" output
15871 code.
15872 (interp_quiet_p, interp_set_quiet): Delete.
15873 (interpreter_exec_cmd): Don't set the interpreter quiet.
15874 * interps.h (interp_quiet_p): Make static.
15875 (class interp) <quiet_p>: Remove field
15876
3d7b173c
JG
158772017-02-08 Jerome Guitton <guitton@adacore.com>
15878
604c4576
JG
15879 * cli/cli-decode.c (find_command_name_length): Make it extern.
15880 * cli/cli-decode.h (find_command_name_length): Declare.
15881 * cli/cli-script.c (command_name_equals, line_first_arg):
15882 New functions.
15883 (process_next_line): Use cli-decode to parse command names.
15884 (build_command_line): Make args a constant pointer.
15885
158862017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15887
3d7b173c
JG
15888 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15889 Remove case-insensitive search.
15890
1291063d
JM
158912017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15892
15893 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15894 at the end of the line. Avoids an ARI warning.
15895
20b477a7
LM
158962017-02-06 Luis Machado <lgustavo@codesourcery.com>
15897
15898 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15899 rdseed instructions.
15900 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15901
3f7b46f2
IR
159022017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15903
15904 PR tdep/20936
15905 Provide and use sparc32 and sparc64 target description XML files.
15906 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15907 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15908 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15909 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15910 * features/sparc/sparc32-solaris.xml: New file.
15911 * features/sparc/sparc64-solaris.xml: New file.
15912 * features/sparc/sparc32-solaris.c: Generated.
15913 * features/sparc/sparc64-solaris.c: Generated.
15914 * sparc-tdep.h: Account for differences in target descriptions.
15915 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15916 (sparc32_register_type): Use target provided registers.
15917 (validate_tdesc_registers): New function.
15918 (sparc32_gdbarch_init): Use tdesc_has_registers.
15919 Set pseudoregister functions.
15920 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15921 (sparc64_register_type): Use target provided registers.
15922 (sparc64_init_abi): Set pseudoregister functions.
15923
f0fd41c1
TT
159242017-02-03 Tom Tromey <tom@tromey.com>
15925
15926 PR rust/21097:
15927 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15928 with a single member.
15929
d6f9b0fb
PA
159302017-02-03 Pedro Alves <palves@redhat.com>
15931
15932 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15933 (cli_interp_base::~cli_interp_base): New.
15934 (cli_interp): New struct.
15935 (as_cli_interp): Cast the interp itself to cli_interp.
15936 (cli_interpreter_pre_command_loop): Rename to ...
15937 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15938 parameter.
15939 (cli_interpreter_init): Rename to ...
15940 (cli_interp::init): ... this. Remove 'self' parameter. Use
15941 boolean. Make extern.
15942 (cli_interpreter_resume): Rename to ...
15943 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15944 extern.
15945 (cli_interpreter_suspend): Rename to ...
15946 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15947 extern.
15948 (cli_interpreter_exec): Rename to ...
15949 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15950 extern.
15951 (cli_interpreter_supports_command_editing): Rename to ...
15952 (cli_interp_base::supports_command_editing): ... this. Remove
15953 'interp' parameter. Make extern.
15954 (cli_ui_out): Rename to ...
15955 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15956 Make extern.
15957 (cli_set_logging): Rename to ...
15958 (cli_interp_base::set_logging): ... this. Remove 'interp'
15959 parameter. Make extern.
15960 (cli_interp_procs): Delete.
15961 (cli_interp_factory): Adjust to use "new".
15962 * cli/cli-interp.h: Include "interps.h".
15963 (struct cli_interp_base): New struct.
15964 * interps.c (struct interp): Delete. Fields moved to interps.h.
15965 (interp_new): Delete.
15966 (interp::interp, interp::~interp): New.
15967 (interp_set): Use bool, and return void. Assume the interpreter
15968 has suspend, init and resume methods, and that the all return
15969 void.
15970 (set_top_level_interpreter): interp_set returns void.
15971 (interp_ui_out): Adapt.
15972 (current_interp_set_logging): Adapt.
15973 (interp_data): Delete.
15974 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15975 (interp_exec): Adapt.
15976 (top_level_interpreter_data): Delete.
15977 * interps.h (interp_init_ftype, interp_resume_ftype)
15978 (interp_suspend_ftype, interp_exec_ftype)
15979 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15980 (class interp): New.
15981 (interp_new): Delete.
15982 (interp_set): Now returns void. Use bool.
15983 (interp_data, top_level_interpreter_data): Delete.
15984 * mi/mi-common.h: Include interps.h.
15985 (class mi_interp): Inherit from interp. Define a ctor. Declare
15986 init, resume, suspect, exec, interp_ui_out, set_logging and
15987 pre_command_loop methods.
15988 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15989 (mi_interpreter_init): Rename to ...
15990 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15991 bool, return void and make extern. Adjust.
15992 (mi_interpreter_resume): ... Rename to ...
15993 (mi_interp::resume): ... this. Remove the 'data' parameter,
15994 return void and make extern. Adjust.
15995 (mi_interpreter_suspend): ... Rename to ...
15996 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15997 return void and make extern. Adjust.
15998 (mi_interpreter_exec): ... Rename to ...
15999 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16000 extern. Adjust.
16001 (mi_interpreter_pre_command_loop): ... Rename to ...
16002 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16003 parameter and make extern.
16004 (mi_on_normal_stop_1): Adjust.
16005 (mi_ui_out): Rename to ...
16006 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16007 parameter and make extern. Adjust.
16008 (mi_set_logging): Rename to ...
16009 (mi_interp::set_logging): ... this. Remove the 'interp'
16010 parameter and make extern. Adjust.
16011 (mi_interp_procs): Delete.
16012 (mi_interp_factory): Adjust to use 'new'.
16013 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16014 (mi_print_exception, mi_execute_command, mi_load_progress):
16015 Adjust.
16016 * tui/tui-interp.c (tui_interp): New class.
16017 (as_tui_interp): Return a tui_interp pointer.
16018 (tui_on_normal_stop, tui_on_signal_received)
16019 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16020 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16021 to use interp::interp_ui_out.
16022 (tui_init): Rename to ...
16023 (tui_interp::init): ... this. Remove the 'self' parameter, use
16024 bool, return void and make extern. Adjust.
16025 (tui_resume): Rename to ...
16026 (tui_interp::resume): ... this. Remove the 'data' parameter,
16027 return void and make extern. Adjust.
16028 (tui_suspend): Rename to ...
16029 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16030 return void and make extern. Adjust.
16031 (tui_ui_out): Rename to ...
16032 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16033 parameter, and make extern. Adjust.
16034 (tui_exec): Rename to ...
16035 (tui_interp::exec): ... this. Remove the 'data' parameter and
16036 make extern.
16037 (tui_interp_procs): Delete.
16038 (tui_interp_factory): Use "new".
16039
65c40c95
TT
160402017-02-02 Tom Tromey <tom@tromey.com>
16041
16042 * rust-exp.y (ends_raw_string, space_then_number)
16043 (rust_identifier_start_p): Return bool.
16044 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16045 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16046 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16047 (rust_chartype_p): Return bool.
16048 (val_print_struct, rust_print_struct_def, rust_print_type):
16049 Update.
16050 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16051 Return bool.
16052
b50f188d
TT
160532017-02-02 Tom Tromey <tom@tromey.com>
16054
16055 * rust-lang.c: Reindent.
16056
03c85b11
TT
160572017-02-02 Tom Tromey <tom@tromey.com>
16058
16059 * rust-lang.h (rust_crate_for_block): Update.
16060 * rust-lang.c (rust_crate_for_block): Return std::string.
16061 (rust_get_disr_info): Use std:;string, not
16062 gdb::unique_xmalloc_ptr.
16063 * rust-exp.y (crate_name): Update.
16064
9b6da501
PA
160652017-02-02 Pedro Alves <palves@redhat.com>
16066
16067 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16068 field out of gdb_disassembler_test and make it static.
16069
ec4cb20b
PA
160702017-02-02 Pedro Alves <palves@redhat.com>
16071
16072 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16073 mi1_interp and mi_interp fields.
16074
5be5dbf0
PA
160752017-02-02 Pedro Alves <palves@redhat.com>
16076
616268b6
PA
16077 * cli/cli-interp.c (struct saved_output_files, saved_output):
16078 Moved from cli/cli-logging.c.
16079 (cli_set_logging): New function.
16080 (cli_interp_procs): Install cli_set_logging.
16081 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16082 Declare.
16083 * cli/cli-logging.c (struct saved_output_files, saved_output):
16084 Moved to cli/cli-interp.c.
16085 (pop_output_files): Don't save outputs here.
16086 (make_logging_output): New function.
16087 (handle_redirections): Don't build tee nor save previous outputs
16088 here.
16089 * interps.c (current_interp_set_logging): Change prototype.
16090 Assume there's always a set_logging_proc method installed.
16091 * interps.h (interp_set_logging_ftype): Change prototype.
16092 (current_interp_set_logging): Change prototype and adjust comment.
16093 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16094 use make_logging_output.
16095 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
160962017-02-02 Pedro Alves <palves@redhat.com>
16097
5be5dbf0
PA
16098 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16099 from ...
16100 (set_logging_overwrite): ... here.
16101 (logging_no_redirect_file): Delete.
16102 (set_logging_redirect): Don't handle redirection on the fly.
16103 Instead warn that "logging off" / "logging on" is necessary.
16104 (pop_output_files): Delete references to logging_no_redirect_file.
16105 (show_logging_command): Always speak in terms of what will happen
16106 once logging is reenabled.
16107
c99cc448
PA
161082017-02-02 Pedro Alves <palves@redhat.com>
16109
16110 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16111
8b172ce7
PA
161122017-02-02 Pedro Alves <palves@redhat.com>
16113
16114 * disasm.c (gdb_pretty_print_insn): Rename to ...
16115 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16116 Remove gdbarch parameter. Adapt to clear the object's buffers
16117 instead of allocating new buffers, and to print using the object's
16118 gdb_disassembler instead of calling gdb_print_insn.
16119 (dump_insns): Use gdb_pretty_print_disassembler.
16120 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16121 (gdb_pretty_print_disassembler): New class.
16122 * record-btrace.c (btrace_insn_history): Use
16123 gdb_pretty_print_disassembler.
16124
d7e74731
PA
161252017-02-02 Pedro Alves <palves@redhat.com>
16126
16127 * ada-lang.c (type_as_string): Use string_file.
16128 * ada-valprint.c (ada_print_floating): Use string_file.
16129 * ada-varobj.c (ada_varobj_scalar_image)
16130 (ada_varobj_get_value_image): Use string_file.
16131 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16132 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16133 * breakpoint.c (update_inserted_breakpoint_locations)
16134 (insert_breakpoint_locations, reattach_breakpoints)
16135 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16136 (print_it_watchpoint): Use string_file.
16137 (save_breakpoints): Use stdio_file.
16138 * c-exp.y (oper): Use string_file.
16139 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16140 tee_file.
16141 (pop_output_files): Use delete.
16142 (handle_redirections): Use stdio_file and tee_file.
16143 * cli/cli-setshow.c (do_show_command): Use string_file.
16144 * compile/compile-c-support.c (c_compute_program): Use
16145 string_file.
16146 * compile/compile-c-symbols.c (generate_vla_size): Take a
16147 'string_file &' instead of a 'ui_file *'.
16148 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16149 of a 'ui_file *'. Use string_file.
16150 (generate_c_for_variable_locations): Take a 'string_file &'
16151 instead of a 'ui_file *'.
16152 * compile/compile-internal.h (generate_c_for_for_one_variable):
16153 Take a 'string_file &' instead of a 'ui_file *'.
16154 * compile/compile-loc2c.c (push, pushf, unary, binary)
16155 (print_label, pushf_register_address, pushf_register)
16156 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16157 'ui_file *'. Adjust.
16158 * compile/compile.c (compile_to_object): Use string_file.
16159 * compile/compile.h (compile_dwarf_expr_to_c)
16160 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16161 'ui_file *'.
16162 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16163 (replace_typedefs_qualified_name): Use string_file and
16164 obstack_copy0.
16165 * disasm.c (gdb_pretty_print_insn): Use string_file.
16166 (gdb_disassembly): Adjust reference the null_stream global.
16167 (do_ui_file_delete): Delete.
16168 (gdb_insn_length): Use null_stream.
16169 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16170 * dwarf2loc.c (dwarf2_compile_property_to_c)
16171 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16172 'string_file &' instead of a 'ui_file *'.
16173 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16174 * dwarf2read.c (do_ui_file_peek_last): Delete.
16175 (dwarf2_compute_name): Use string_file.
16176 * event-top.c (gdb_setup_readline): Use stdio_file.
16177 * gdbarch.sh (verify_gdbarch): Use string_file.
16178 * gdbtypes.c (safe_parse_type): Use null_stream.
16179 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16180 string_file.
16181 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16182 'string_file *' instead of a 'ui_file *'.
16183 (gdbscm_arch_disassemble): Use string_file.
16184 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16185 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16186 inherits from ui_file.
16187 (ioscm_file_port_delete, ioscm_file_port_rewind)
16188 (ioscm_file_port_put): Delete.
16189 (ioscm_file_port_write): Rename to ...
16190 (ioscm_file_port::write): ... this. Remove file_port_magic
16191 checks.
16192 (ioscm_file_port_new): Delete.
16193 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16194 ui_file_up.
16195 * guile/scm-type.c (tyscm_type_name): Use string_file.
16196 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16197 Use string_file.
16198 * infcmd.c (print_return_value_1): Use string_file.
16199 * infrun.c (print_target_wait_results): Use string_file.
16200 * language.c (add_language): Use string_file.
16201 * location.c (explicit_to_string_internal): Use string_file.
16202 * main.c (captured_main_1): Use null_file.
16203 * maint.c (maintenance_print_architecture): Use stdio_file.
16204 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16205 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16206 event_channel>: Change type to mi_console_file pointer.
16207 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16208 (mi_console_file_delete): Delete.
16209 (struct mi_console_file): Delete.
16210 (mi_console_file_magic): Delete.
16211 (mi_console_file_new): Delete.
16212 (mi_console_file::mi_console_file): New.
16213 (mi_console_file_delete): Delete.
16214 (mi_console_file_fputs): Delete.
16215 (mi_console_file::write): New.
16216 (mi_console_raw_packet): Delete.
16217 (mi_console_file::flush): New.
16218 (mi_console_file_flush): Delete.
16219 (mi_console_set_raw): Rename to ...
16220 (mi_console_file::set_raw): ... this.
16221 * mi/mi-console.h (class mi_console_file): New class.
16222 (mi_console_file_new, mi_console_set_raw): Delete.
16223 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16224 (mi_set_logging): Use delete and tee_file. Adjust.
16225 * mi/mi-main.c (output_register): Use string_file.
16226 (mi_cmd_data_evaluate_expression): Use string_file.
16227 (mi_cmd_data_read_memory): Use string_file.
16228 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16229 * mi/mi-out.c (mi_ui_out::main_stream): New.
16230 (mi_ui_out::rewind): Use main_stream and
16231 string_file.
16232 (mi_ui_out::put): Use main_stream and string_file.
16233 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16234 Allocate a 'string_file' instead.
16235 (mi_out_new): Don't allocate a mem_fileopen stream here.
16236 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16237 (mi_ui_out::main_stream): Declare method.
16238 * printcmd.c (eval_command): Use string_file.
16239 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16240 * python/py-arch.c (archpy_disassemble): Use string_file.
16241 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16242 * python/py-frame.c (frapy_str): Use string_file.
16243 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16244 Use string_file.
16245 * python/py-type.c (typy_str): Use string_file.
16246 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16247 * python/py-value.c (valpy_str): Use string_file.
16248 * record-btrace.c (btrace_insn_history): Use string_file.
16249 * regcache.c (regcache_print): Use stdio_file.
16250 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16251 * remote.c (escape_buffer): Use string_file.
16252 * rust-lang.c (rust_get_disr_info): Use string_file.
16253 * serial.c (serial_open_ops_1): Use stdio_file.
16254 (do_serial_close): Use delete.
16255 * stack.c (print_frame_arg): Use string_file.
16256 (print_frame_args): Remove local mem_fileopen stream, not used.
16257 (print_frame): Use string_file.
16258 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16259 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16260 Take a 'string_file *' instead of a 'ui_file *'.
16261 * top.c (new_ui): Use stdio_file and stderr_file.
16262 (free_ui): Use delete.
16263 (execute_command_to_string): Use string_file.
16264 (quit_confirm): Use string_file.
16265 * tracepoint.c (collection_list::append_exp): Use string_file.
16266 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16267 * tui/tui-file.c: Don't include "ui-file.h".
16268 (enum streamtype, struct tui_stream): Delete.
16269 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16270 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16271 (tui_file::tui_file): New method.
16272 (tui_file_fputs): Delete.
16273 (tui_file_get_strbuf): Delete.
16274 (tui_file::puts): New method.
16275 (tui_file_adjust_strbuf): Delete.
16276 (tui_file_flush): Delete.
16277 (tui_file::flush): New method.
16278 * tui/tui-file.h: Tweak intro comment.
16279 Include ui-file.h.
16280 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16281 (tui_file_adjust_strbuf): Delete declarations.
16282 (class tui_file): New class.
16283 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16284 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16285 (tui_register_format): Use string_stream.
16286 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16287 (tui_get_function_from_frame): Use string_file.
16288 * typeprint.c (type_to_string): Use string_file.
16289 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16290 (null_stream): New global.
16291 (ui_file_delete): Delete.
16292 (ui_file::ui_file): New.
16293 (null_file_isatty): Delete.
16294 (ui_file::~ui_file): New.
16295 (null_file_rewind): Delete.
16296 (ui_file::printf): New.
16297 (null_file_put): Delete.
16298 (null_file_flush): Delete.
16299 (ui_file::putstr): New.
16300 (null_file_write): Delete.
16301 (ui_file::putstrn): New.
16302 (null_file_read): Delete.
16303 (ui_file::putc): New.
16304 (null_file_fputs): Delete.
16305 (null_file_write_async_safe): Delete.
16306 (ui_file::vprintf): New.
16307 (null_file_delete): Delete.
16308 (null_file::write): New.
16309 (null_file_fseek): Delete.
16310 (null_file::puts): New.
16311 (ui_file_data): Delete.
16312 (null_file::write_async_safe): New.
16313 (gdb_flush, ui_file_isatty): Adjust.
16314 (ui_file_put, ui_file_rewind): Delete.
16315 (ui_file_write): Adjust.
16316 (ui_file_write_for_put): Delete.
16317 (ui_file_write_async_safe, ui_file_read): Adjust.
16318 (ui_file_fseek): Delete.
16319 (fputs_unfiltered): Adjust.
16320 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16321 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16322 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16323 (set_ui_file_data): Delete.
16324 (string_file::~string_file, string_file::write)
16325 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16326 (do_ui_file_as_string, ui_file_as_string): Delete.
16327 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16328 (struct mem_file): Delete.
16329 (mem_file_new): Delete.
16330 (stdio_file::stdio_file): New.
16331 (mem_file_delete): Delete.
16332 (stdio_file::stdio_file): New.
16333 (mem_fileopen): Delete.
16334 (stdio_file::~stdio_file): New.
16335 (mem_file_rewind): Delete.
16336 (stdio_file::set_stream): New.
16337 (mem_file_put): Delete.
16338 (stdio_file::open): New.
16339 (mem_file_write): Delete.
16340 (stdio_file_magic, struct stdio_file): Delete.
16341 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16342 (stdio_file::flush): New.
16343 (stdio_file_read): Rename to ...
16344 (stdio_file::read): ... this. Adjust.
16345 (stdio_file_write): Rename to ...
16346 (stdio_file::write): ... this. Adjust.
16347 (stdio_file_write_async_safe): Rename to ...
16348 (stdio_file::write_async_safe) ... this. Adjust.
16349 (stdio_file_fputs): Rename to ...
16350 (stdio_file::puts) ... this. Adjust.
16351 (stdio_file_isatty): Delete.
16352 (stdio_file_fseek): Delete.
16353 (stdio_file::isatty): New.
16354 (stderr_file_write): Rename to ...
16355 (stderr_file::write) ... this. Adjust.
16356 (stderr_file_fputs): Rename to ...
16357 (stderr_file::puts) ... this. Adjust.
16358 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16359 (stderr_file::stderr_file): New.
16360 (tee_file_magic): Delete.
16361 (struct tee_file): Delete.
16362 (tee_file::tee_file): New.
16363 (tee_file_new): Delete.
16364 (tee_file::~tee_file): New.
16365 (tee_file_delete): Delete.
16366 (tee_file_flush): Rename to ...
16367 (tee_file::flush): ... this. Adjust.
16368 (tee_file_write): Rename to ...
16369 (tee_file::write): ... this. Adjust.
16370 (tee_file::write_async_safe): New.
16371 (tee_file_fputs): Rename to ...
16372 (tee_file::puts): ... this. Adjust.
16373 (tee_file_isatty): Rename to ...
16374 (tee_file::isatty): ... this. Adjust.
16375 * ui-file.h (struct obstack, struct ui_file): Don't
16376 forward-declare.
16377 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16378 (ui_file_write_ftype)
16379 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16380 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16381 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16382 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16383 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16384 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16385 (set_ui_file_fseek): Delete.
16386 (ui_file_data, ui_file_delete, ui_file_rewind)
16387 (struct ui_file): New.
16388 (ui_file_up): New.
16389 (class null_file): New.
16390 (null_stream): Declare.
16391 (ui_file_write_for_put, ui_file_put): Delete.
16392 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16393 Delete.
16394 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16395 (gdb_fopen, tee_file_new): Delete.
16396 (struct string_file): New.
16397 (struct stdio_file): New.
16398 (stdio_file_up): New.
16399 (struct stderr_file): New.
16400 (class tee_file): New.
16401 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16402 of a 'ui_file *'. Adjust.
16403 * ui-out.h (class ui_out) <field_stream>: Likewise.
16404 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16405 (null_stream): Delete.
16406 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16407 Adjust.
16408 * utils.h (struct ui_file): Delete forward declaration..
16409 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16410 (error_stream): Take a 'string_file &' instead of a
16411 'ui_file *'.
16412 * varobj.c (varobj_value_get_print_value): Use string_file.
16413 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16414 * gdbarch.c: Regenerate.
16415
187808b0
PA
164162017-02-02 Pedro Alves <palves@redhat.com>
16417
16418 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16419 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16420 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16421 Adjust to call gdb_print_insn instead of
16422 gdb_disassembler::print_insn.
16423 (dump_insns, do_mixed_source_and_assembly_deprecated)
16424 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16425 'gdbarch' parameter. Remove gdb_disassembler parameter.
16426 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16427 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16428 declaration.
16429 (gdb_pretty_print_insn): Re-add declaration.
16430 * record-btrace.c (btrace_insn_history): Don't allocate a
16431 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16432
7a8eb317
SM
164332017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16434
16435 * disasm.h (gdb_disassembly): Remove file_string parameter.
16436 * disasm.c (gdb_disassembly): Likewise.
16437 * cli/cli-cmds.c (print_disassembly): Adapt.
16438 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16439 * stack.c (do_gdb_disassembly): Likewise.
16440
7346ef59
AA
164412017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16442
16443 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16444 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16445 targets. And if the implicit value is longer than needed, extract
16446 the first bytes instead of the "least significant" ones.
16447
cd4007e4
MM
164482017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16449
16450 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16451 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16452 (btrace_fetch): Assert can_access_registers_ptid.
16453 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16454 validate_registers_access.
16455
cf77c34e
MM
164562017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16457
16458 * gdbthread.h (can_access_registers_ptid): New.
16459 * thread.c (can_access_registers_ptid): New.
16460
be85ce7d
PA
164612017-02-01 Pedro Alves <palves@redhat.com>
16462
16463 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16464
29b0b251
PA
164652017-01-31 Pedro Alves <palves@redhat.com>
16466
16467 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16468 Fix typos.
16469
289b5b24
PA
164702017-01-31 Pedro Alves <palves@redhat.com>
16471
16472 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16473 not used.
16474
b47413b4
PA
164752017-01-31 Pedro Alves <palves@redhat.com>
16476
16477 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16478
60adb36c
PA
164792017-01-31 Pedro Alves <palves@redhat.com>
16480
16481 * common/scoped_restore.h
16482 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16483 change the value's parameter type to T2.
16484 (make_scoped_restore): Likewise.
16485
2735833d
WT
164862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16487 Richard Henderson <rth@redhat.com>
16488
16489 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16490 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16491 GS_BASE for older kernels.
16492 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16493 GS_BASE for older kernels.
16494 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16495 and GS_BASE to the offset table.
16496 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16497 system register group.
16498 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16499 for older kernels.
16500 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16501 amd64 ABI.
16502 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16503 AMD64_GSBASE_REGNUM.
16504 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16505 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16506 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16507 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16508 i386/64bit-segments.xml in those rules.
16509 * features/i386/64bit-segments.xml: New file.
16510 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16511 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16512 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16513 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16514 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16515 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16516 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16517 * features/i386/amd64-avx-linux.c: Regenerated.
16518 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16519 * features/i386/amd64-avx-mpx.c: Regenerated.
16520 * features/i386/amd64-avx512-linux.c: Regenerated.
16521 * features/i386/amd64-linux.c: Regenerated.
16522 * features/i386/amd64-mpx-linux.c: Regenerated.
16523 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16524 * features/i386/i386-avx-mpx.c: Regenerated.
16525 * features/i386/x32-avx-linux.c: Regenerated.
16526 * features/i386/x32-avx512-linux.c: Regenerated.
16527 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16528 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16529 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16530 * regformats/i386/amd64-linux.dat: Regenerated.
16531 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16532 * regformats/i386/x32-avx-linux.dat: Regenerated.
16533 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16534 * regformats/i386/x32-linux.dat: Regenerated.
16535
8884e97e
WT
165362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16537
16538 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16539 Set to AMD64_NUM_REGS.
16540
7005d26a
WT
165412017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16542
16543 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16544 that checks validity of a register number.
16545
4bd2e1b2
KC
165462017-01-27 Kees Cook <keescook@google.com>
16547
16548 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16549 fetch_fpregs if target has fpa registers.
16550 (arm_linux_store_inferior_registers): Call store_fpregs if target
16551 has fpa registers.
16552
7cf1de6c
AA
165532017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16554
16555 * cris-tdep.c (cris_gdbarch_init): Remove check for
16556 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16557
874a1c8c
AT
165582017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16559
16560 * corelow.c (get_core_register_section): Check for regset
16561 existence before checking for REGSET_VARIABLE_SIZE.
16562
d8b49cf0
YQ
165632017-01-26 Yao Qi <yao.qi@linaro.org>
16564 Pedro Alves <palves@redhat.com>
16565
16566 PR gdb/20939
16567 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16568 call memory_error, save memaddr instead.
16569 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16570 negative, cal memory_error.
16571 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16572
658ca58c
YQ
165732017-01-26 Yao Qi <yao.qi@linaro.org>
16574
16575 * disasm-selftests.c (memory_error_test): New function.
16576 (_initialize_disasm_selftests): Register memory_error_test.
16577
79843d45
YQ
165782017-01-26 Yao Qi <yao.qi@linaro.org>
16579
16580 * Makefile.in (SFILES): Add disasm-selftests.c and
16581 selftest-arch.c.
16582 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16583 * disasm-selftests.c: New file.
16584 * selftest-arch.c: New file.
16585 * selftest-arch.h: New file.
16586
8cafda32
YQ
165872017-01-26 Yao Qi <yao.qi@linaro.org>
16588
16589 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16590 to bfd_arch_mep. Don't return 0 if section is not
16591 found. Call print_insn_mep.
16592
e47ad6c0
YQ
165932017-01-26 Pedro Alves <palves@redhat.com>
16594 Yao Qi <yao.qi@linaro.org>
16595
16596 * arm-tdep.c: Include "disasm.h".
16597 (gdb_print_insn_arm): Update code to get gdbarch.
16598 * disasm.c (dis_asm_read_memory): Change it to
16599 gdb_disassembler::dis_asm_read_memory.
16600 (dis_asm_memory_error): Likewise.
16601 (dis_asm_print_address): Likewise.
16602 (gdb_pretty_print_insn): Change it to
16603 gdb_disassembler::pretty_print_insn.
16604 (dump_insns): Add one argument gdb_disassemlber. All
16605 callers updated.
16606 (do_mixed_source_and_assembly_deprecated): Likewise.
16607 (do_mixed_source_and_assembly): Likewise.
16608 (do_assembly_only): Likewise.
16609 (gdb_disassembler::gdb_disassembler): New.
16610 (gdb_disassembler::print_insn): New.
16611 * disasm.h (class gdb_disassembler): New.
16612 (gdb_pretty_print_insn): Remove declaration.
16613 (gdb_disassemble_info): Likewise.
16614 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16615 (gdbscm_disasm_read_memory_worker): Update.
16616 (gdbscm_disasm_read_memory): Update.
16617 (gdbscm_disasm_memory_error): Remove.
16618 (gdbscm_disasm_print_address): Remove.
16619 (gdbscm_disassembler::gdbscm_disassembler): New.
16620 (gdbscm_print_insn_from_port): Update.
16621 * mips-tdep.c: Include disasm.h.
16622 (gdb_print_insn_mips): Update code to get gdbarch.
16623 * record-btrace.c (btrace_insn_history): Update.
16624 * spu-tdep.c: Include disasm.h.
16625 (struct spu_dis_asm_data): Remove.
16626 (struct spu_dis_asm_info): New.
16627 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16628 SPU id.
16629 (gdb_print_insn_spu): Cast disassemble_info to
16630 spu_dis_asm_info.
16631
80d75874
YQ
166322017-01-26 Yao Qi <yao.qi@linaro.org>
16633
16634 * disasm.c (do_ui_file_delete): Delete.
16635 (gdb_insn_length): Move code creating stream to ...
16636 * utils.c (null_stream): ... here. New function.
16637 * utils.h (null_stream): Declare.
16638
60685cd0
SM
166392017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16640
16641 * python/py-inferior.c (find_thread_object): Return directly
16642 from the loop. Remove "found" variable.
16643
eb1cdb62
JB
166442017-01-21 Joel Brobecker <brobecker@adacore.com>
16645
16646 GDB 7.12.1 released.
16647
b1ce6568
SM
166482017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16649
16650 * python/py-function.c (fnpy_call): Reorder declarations to have
16651 the gdbpy_enter object declared first.
16652 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16653
6f8b0407
SM
166542017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16655
fec93fb1 16656 PR python/21068
6f8b0407
SM
16657 * python/python-internal.h (PyMem_RawMalloc): Define for
16658 Python < 3.4.
16659 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16660 PyMem_RawMalloc instead of PyMem_Malloc.
16661
78cbbba8
LM
166622017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16663 Luis Machado <lgustavo@codesourcery.com>
16664
16665 * NEWS (New commands): Mention flash-erase.
16666 (New MI commands): Mention target-flash-erase.
16667 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16668 command.
16669 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16670 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16671 * target.c (flash_erase_command): New function.
16672 (initialize_targets): Add new flash-erase command.
16673 * target.h (flash_erase_command): New declaration.
16674
2132fe85
JB
166752017-01-20 Joel Brobecker <brobecker@adacore.com>
16676
16677 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16678 HAVE_SYS_PROCFS_H is defined.
16679
d1dff226
AH
166802017-01-18 Alan Hayward <alan.hayward@arm.com>
16681
16682 * remote.c (struct cached_reg): Change data into a pointer.
16683 * (stop_reply_dtr): Free data pointers before deleting vector.
16684 (process_stop_reply): Likewise.
16685 (remote_parse_stop_reply): Allocate space for data
16686
9890e433
AH
166872017-01-18 Alan Hayward <alan.hayward@arm.com>
16688
16689 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16690 MAX_REGISTER_SIZE.
16691 (amd64_pseudo_register_read_value): Likewise.
16692 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16693 (store_register_using_P): Likewise.
16694 * regcache.c (regcache_xfer_part): Likewise.
16695
7a36499a
IR
166962017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16697
16698 Split real and pseudo registers.
16699 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16700 (sparc32_pseudo_regnum): New enum.
16701 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16702 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16703 (SPARC32_CP0_REGISTERS): New macro.
16704 (sparc32_pseudo_register_name): New function.
16705 (sparc32_register_name): Use sparc32_pseudo_register_name.
16706 (sparc32_pseudo_register_type): New function.
16707 (sparc32_register_type): Use sparc32_pseudo_register_type.
16708 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16709 pseudo register numbers.
16710 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16711 (SPARC64_CP0_REGISTERS): New macro.
16712 (sparc64_pseudo_register_name): New function.
16713 (sparc64_register_name): Use sparc64_pseudo_register_name.
16714 (sparc64_pseudo_register_type): New function.
16715 (sparc64_register_type): Use sparc64_pseudo_register_type.
16716 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16717 pseudo register numbers.
16718 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16719 sparc64_store_arguments): Handle pseudo register numbers.
16720
6f8976bf
YQ
167212017-01-13 Yao Qi <yao.qi@linaro.org>
16722
16723 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16724 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16725 output.
16726 (getpkt_or_notif_sane_1): Likewise.
16727
e4241ace
YQ
167282017-01-13 Yao Qi <yao.qi@linaro.org>
16729
16730 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16731 of CC. Pass "-x c++-header" instead of "-x c".
16732
3015c064
SM
167332017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16734
16735 * remote.c (remote_can_async_p): Update comment.
16736
fde1b17d
SM
167372017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16738
16739 * linux-nat.c (linux_nat_can_async_p): Update comment.
16740
ca1ca08b
SM
167412017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16742
16743 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16744
4ad2da73
SM
167452017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16746
16747 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16748
c8b23b3f
TT
167492017-01-10 Tom Tromey <tom@tromey.com>
16750
16751 * python/py-type.c (typy_legacy_template_argument): Update.
16752 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16753 ~demangle_parse_info): Declare new members.
16754 (cp_demangled_name_to_comp): Return unique_ptr.
16755 (cp_demangled_name_parse_free)
16756 (make_cleanup_cp_demangled_name_parse_free)
16757 (cp_new_demangle_parse_info): Remove.
16758 * cp-support.c (do_demangled_name_parse_free_cleanup)
16759 (make_cleanup_cp_demangled_name_parse_free): Remove.
16760 (inspect_type, cp_canonicalize_string_full)
16761 (cp_canonicalize_string): Update.
16762 (mangled_name_to_comp): Change return type.
16763 (cp_class_name_from_physname, method_name_from_physname)
16764 (cp_func_name, cp_remove_params): Update.
16765 * cp-name-parser.y (demangle_parse_info): New constructor, from
16766 cp_new_demangle_parse_info.
16767 (~demangle_parse_info): New destructor, from
16768 cp_demangled_name_parse_free.
16769 (cp_merge_demangle_parse_infos): Update.
16770 (cp_demangled_name_to_comp): Change return type.
16771
1ac32117
TT
167722017-01-10 Tom Tromey <tom@tromey.com>
16773
16774 * top.c (prevent_dont_repeat): Change return type.
16775 * python/python.c (execute_gdb_command): Use std::string.
16776 Update.
16777 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16778 * command.h (prevent_dont_repeat): Change return type.
16779 * breakpoint.c (bpstat_do_actions_1): Update.
16780
0cf08227
TT
167812017-01-10 Tom Tromey <tom@tromey.com>
16782
16783 * value.h (scoped_value_mark::~scoped_value_mark): Call
16784 free_to_mark.
16785 (scoped_value_mark::free_to_mark): New method.
16786 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16787 scoped_value_mark.
16788
eb115069
TT
167892017-01-10 Tom Tromey <tom@tromey.com>
16790
16791 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16792 (valpy_reference_value, valpy_const_value, valpy_get_address)
16793 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16794 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16795 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16796 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16797 scoped_value_mark.
16798 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16799 * value.h (scoped_value_mark): New class.
16800
906768f9
TT
168012017-01-10 Tom Tromey <tom@tromey.com>
16802
16803 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16804 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16805 * psymtab.c (discard_psymtabs_upto): Remove.
16806 (make_cleanup_discard_psymtabs): Remove.
16807 (struct psymtab_state): Remove.
16808
bef155c3
TT
168092017-01-10 Tom Tromey <tom@tromey.com>
16810
16811 * record-full.c (record_full_save_cleanups): Remove.
16812 (record_full_save): Use gdb::unlinker.
16813 * gcore.c (do_bfd_delete_cleanup): Remove.
16814 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16815 cleanups.
16816 * dwarf2read.c (unlink_if_set): Remove.
16817 (write_psymtabs_to_index): Use gdb::unlinker.
16818 * common/gdb_unlinker.h: New file.
16819
192b62ce
TT
168202017-01-10 Tom Tromey <tom@tromey.com>
16821
16822 * windows-tdep.c (windows_xfer_shared_library): Update.
16823 * windows-nat.c (windows_make_so): Update.
16824 * utils.h (make_cleanup_bfd_unref): Remove.
16825 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16826 * symfile.h (symfile_bfd_open)
16827 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16828 * symfile.c (read_symbols, symbol_file_add)
16829 (separate_debug_file_exists): Update.
16830 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16831 (generic_load, reread_symbols): Update.
16832 * symfile-mem.c (symbol_file_add_from_memory): Update.
16833 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16834 (spu_symbol_file_add_from_memory): Update.
16835 * solist.h (struct target_so_ops) <bfd_open>: Return
16836 gdb_bfd_ref_ptr.
16837 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16838 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16839 gdb_bfd_ref_ptr.
16840 (solib_map_sections, reload_shared_libraries_1): Update.
16841 * solib-svr4.c (enable_break): Update.
16842 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16843 * solib-frv.c (enable_break2): Update.
16844 * solib-dsbt.c (enable_break): Update.
16845 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16846 gdb_bfd_ref_ptr.
16847 (darwin_solib_get_all_image_info_addr_at_init): Update.
16848 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16849 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16850 * record-full.c (record_full_save): Update.
16851 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16852 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16853 * minidebug.c (find_separate_debug_file_in_section): Return
16854 gdb_bfd_ref_ptr.
16855 * machoread.c (macho_add_oso_symfile): Change abfd to
16856 gdb_bfd_ref_ptr.
16857 (macho_symfile_read_all_oso): Update.
16858 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16859 (macho_symfile_read): Update.
16860 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16861 (jit_bfd_try_read_symtab): Update.
16862 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16863 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16864 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16865 gdb_bfd_ref_ptr.
16866 (gdb_bfd_ref_policy): New struct.
16867 (gdb_bfd_ref_ptr): New typedef.
16868 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16869 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16870 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16871 gdb_bfd_ref_ptr.
16872 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16873 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16874 (gcore_command): Update.
16875 * exec.c (exec_file_attach): Update.
16876 * elfread.c (elf_symfile_read): Update.
16877 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16878 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16879 (open_and_init_dwo_file): Update.
16880 (open_dwp_file): Return gdb_bfd_ref_ptr.
16881 (open_and_init_dwp_file): Update.
16882 * corelow.c (core_open): Update.
16883 * compile/compile-object-load.c (compile_object_load): Update.
16884 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16885 * coffread.c (coff_symfile_read): Update.
16886 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16887 gdb_bfd_ref_ptr. Rename.
16888 (dump_bfd_file, restore_command): Update.
16889 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16890 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16891 (find_separate_debug_file_by_buildid): Update.
16892
50315b21
TT
168932017-01-10 Tom Tromey <tom@tromey.com>
16894
16895 * common/gdb_ref_ptr.h: New file.
16896 * python/py-ref.h (struct gdbpy_ref_policy): New.
16897 (gdbpy_ref): Now a typedef.
16898
fc4007c9
TT
168992017-01-10 Tom Tromey <tom@tromey.com>
16900
16901 * utils.h (make_cleanup_htab_delete): Don't declare.
16902 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16903 Remove.
16904 * linespec.c (decode_compound_collector): Add constructor,
16905 destructor.
16906 (lookup_prefix_sym): Remove cleanup.
16907 (symtab_collector): Add constructor, destructor.
16908 (collect_symtabs_from_filename): Remove cleanup.
16909 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16910 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16911 Use htab_up.
16912 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16913 * dwarf2read.c (dw2_expand_symtabs_matching)
16914 (dw2_map_symbol_filenames, dwarf_decode_macros)
16915 (write_psymtabs_to_index): Use htab_up.
16916 * dwarf2loc.c (func_verify_no_selftailcall)
16917 (call_site_find_chain_1, func_verify_no_selftailcall)
16918 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16919 std::vector, gdb::unique_xmalloc_ptr.
16920 (call_sitep): Remove typedef.
16921 (dwarf2_locexpr_baton_eval): Remove unused variable.
16922
8dbcee67
TT
169232017-01-10 Tom Tromey <tom@tromey.com>
16924
16925 * python/python-internal.h (make_cleanup_py_decref)
16926 (make_cleanup_py_xdecref): Don't declare.
16927 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16928 (py_xdecref, make_cleanup_py_xdecref): Remove.
16929
13df46cc
TT
169302017-01-10 Tom Tromey <tom@tromey.com>
16931
16932 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16933 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16934
06fc9bf7
TT
169352017-01-10 Tom Tromey <tom@tromey.com>
16936
16937 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16938
830a4934
TT
169392017-01-10 Tom Tromey <tom@tromey.com>
16940
16941 * python/py-utils.c (unicode_to_encoded_string)
16942 (python_string_to_target_string)
16943 (python_string_to_target_python_string)
16944 (python_string_to_host_string, gdbpy_obj_to_string)
16945 (get_addr_from_python): Use gdbpy_ref.
16946
4586d543
TT
169472017-01-10 Tom Tromey <tom@tromey.com>
16948
16949 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16950 gdbpy_ref.
16951
59876f8f
TT
169522017-01-10 Tom Tromey <tom@tromey.com>
16953
16954 * python/python.c (eval_python_command, gdbpy_decode_line)
16955 (gdbpy_run_events, gdbpy_start_type_printers)
16956 (gdbpy_apply_type_printers): Use gdbpy_ref.
16957
97d83487
TT
169582017-01-10 Tom Tromey <tom@tromey.com>
16959
16960 * python/py-param.c (get_doc_string, compute_enum_values): Use
16961 gdbpy_ref.
16962
9205649a
TT
169632017-01-10 Tom Tromey <tom@tromey.com>
16964
16965 * python/py-inferior.c (find_thread_object, build_inferior_list):
16966 Use gdbpy_ref.
16967
74c49d45
TT
169682017-01-10 Tom Tromey <tom@tromey.com>
16969
16970 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16971
16361ffb
TT
169722017-01-10 Tom Tromey <tom@tromey.com>
16973
16974 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16975 gdbpy_ref.
16976
905f2cca
TT
169772017-01-10 Tom Tromey <tom@tromey.com>
16978
16979 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16980 extra incref.
16981 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16982 Use gdbpy_ref.
16983
64081434
TT
169842017-01-10 Tom Tromey <tom@tromey.com>
16985
16986 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16987 gdbpy_ref.
16988
59e9e831
TT
169892017-01-10 Tom Tromey <tom@tromey.com>
16990
16991 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16992 decref results of PyArg_ParseTupleAndKeywords.
16993
9de10f6d
TT
169942017-01-10 Tom Tromey <tom@tromey.com>
16995
16996 * python/python.c (python_run_simple_file): Use
16997 unique_xmalloc_ptr, gdbpy_ref.
16998
2bd5759d
TT
169992017-01-10 Tom Tromey <tom@tromey.com>
17000
17001 * python/py-prettyprint.c (print_stack_unless_memory_error)
17002 (print_string_repr, print_children): Use gdbpy_ref.
17003 (dummy_python_frame): New class.
17004 (dummy_python_frame::dummy_python_frame): Rename from
17005 push_dummy_python_frame.
17006 (py_restore_tstate): Remove.
17007
3b4e0e01
TT
170082017-01-10 Tom Tromey <tom@tromey.com>
17009
17010 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17011
17a22718
TT
170122017-01-10 Tom Tromey <tom@tromey.com>
17013
17014 * python/python.c (ensure_python_env, restore_python_env):
17015 Remove.
17016 * python/python-internal.h (ensure_python_env): Don't declare.
17017 * varobj.h (varobj_ensure_python_env): Don't declare.
17018 * varobj.c (varobj_ensure_python_env): Remove.
17019
68cdc557
TT
170202017-01-10 Tom Tromey <tom@tromey.com>
17021
17022 * varobj.c (varobj_value_get_print_value): Use
17023 gdbpy_enter_varobj.
17024
1eba6383
TT
170252017-01-10 Tom Tromey <tom@tromey.com>
17026
17027 * python/py-prettyprint.c (print_string_repr, print_children):
17028 Update.
17029 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17030 of "encoding".
17031 * varobj.c (varobj_value_get_print_value): Update.
17032 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17033
bde7b3e3
TT
170342017-01-10 Tom Tromey <tom@tromey.com>
17035
17036 * varobj.c (varobj_get_display_hint)
17037 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17038 (varobj_set_visualizer, free_variable): Use
17039 gdbpy_enter_varobj.
17040
a7785f8c
TT
170412017-01-10 Tom Tromey <tom@tromey.com>
17042
17043 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17044 (do_finish_initialization): New function. Use gdbpy_ref.
17045 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17046 do_finish_initialization.
17047
2865bfce
TT
170482017-01-10 Tom Tromey <tom@tromey.com>
17049
17050 * python/py-param.c (get_set_value, get_show_value): Use
17051 gdbpy_enter, gdbpy_ref.
17052
0e9dcc75
TT
170532017-01-10 Tom Tromey <tom@tromey.com>
17054
17055 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17056
12a5cedd
TT
170572017-01-10 Tom Tromey <tom@tromey.com>
17058
17059 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17060
788f2586
TT
170612017-01-10 Tom Tromey <tom@tromey.com>
17062
17063 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17064 Use gdbpy_enter_varobj.
17065
6cd67bea
TT
170662017-01-10 Tom Tromey <tom@tromey.com>
17067
17068 * varobj.c (gdbpy_enter_varobj): New constructor.
17069 * python/python-internal.h (gdbpy_enter_varobj): New class.
17070 * python/py-varobj.c (py_varobj_get_iterator): Use
17071 gdbpy_enter_varobj.
17072
14b122bf
TT
170732017-01-10 Tom Tromey <tom@tromey.com>
17074
17075 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17076 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17077 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17078 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17079 unique_xmalloc_ptr.
17080 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17081
bf1ca3b9
TT
170822017-01-10 Tom Tromey <tom@tromey.com>
17083
17084 * python/py-xmethods.c (invoke_match_method): Use
17085 gdbpy_ref.
17086
572a5524
TT
170872017-01-10 Tom Tromey <tom@tromey.com>
17088
17089 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17090 gdbpy_enter, gdbpy_ref.
17091
396a78b6
TT
170922017-01-10 Tom Tromey <tom@tromey.com>
17093
17094 * python/python.c (python_interactive_command): Use gdbpy_enter.
17095
a88b13c7
TT
170962017-01-10 Tom Tromey <tom@tromey.com>
17097
17098 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17099 gdbpy_ref.
17100
e9f0c363
TT
171012017-01-10 Tom Tromey <tom@tromey.com>
17102
17103 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17104 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17105
6349f452
TT
171062017-01-10 Tom Tromey <tom@tromey.com>
17107
17108 * utils.h (htab_deleter): New struct.
17109 (htab_up): New typedef.
17110 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17111 gdbpy_enter, gdbpy_ref, htab_up.
17112
c0171de6
TT
171132017-01-10 Tom Tromey <tom@tromey.com>
17114
17115 * python/py-unwind.c (pending_frame_invalidate): Remove.
17116 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17117
f18e226f
TT
171182017-01-10 Tom Tromey <tom@tromey.com>
17119
17120 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17121 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17122
c57af3f1
TT
171232017-01-10 Tom Tromey <tom@tromey.com>
17124
17125 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17126
60e600ec
TT
171272017-01-10 Tom Tromey <tom@tromey.com>
17128
17129 * python/python.c (gdbpy_eval_from_control_command)
17130 (gdbpy_source_script, gdbpy_run_events)
17131 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17132 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17133 gdbpy_enter.
17134
bf7da5b0
TT
171352017-01-10 Tom Tromey <tom@tromey.com>
17136
17137 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17138
2d38bced
TT
171392017-01-10 Tom Tromey <tom@tromey.com>
17140
17141 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17142
07bc7329
TT
171432017-01-10 Tom Tromey <tom@tromey.com>
17144
17145 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17146 (python_on_inferior_call_pre, python_on_inferior_call_post)
17147 (python_on_memory_change, python_on_register_change)
17148 (python_inferior_exit, python_new_objfile, add_thread_object)
17149 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17150
6e7c365e
TT
171512017-01-10 Tom Tromey <tom@tromey.com>
17152
17153 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17154 (bpfinishpy_handle_exit): Use gdbpy_enter.
17155
6ba0cd40
TT
171562017-01-10 Tom Tromey <tom@tromey.com>
17157
17158 * python/py-cmd.c (cmdpy_destroyer)
17159 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17160 gdbpy_enter.
17161
de2dc875
TT
171622017-01-10 Tom Tromey <tom@tromey.com>
17163
17164 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17165 gdbpy_enter.
17166 (gdbpy_breakpoint_has_cond): Likewise.
17167
4ecee2c4
TT
171682017-01-10 Tom Tromey <tom@tromey.com>
17169
17170 * python/python.c (gdbpy_enter): New constructor.
17171 (~gdbpy_enter): New destructor.
17172 (restore_python_env, ensure_python_env): Rewrite.
17173 * python/python-internal.h (gdbpy_enter): New class.
17174
37fce74f
TT
171752017-01-10 Tom Tromey <tom@tromey.com>
17176
17177 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17178
53a0cca3
TT
171792017-01-10 Tom Tromey <tom@tromey.com>
17180
17181 * python/py-value.c (value_has_field, get_field_flag)
17182 (get_field_type, valpy_getitem, convert_value_from_python): Use
17183 gdbpy_ref.
17184
ff3724f5
TT
171852017-01-10 Tom Tromey <tom@tromey.com>
17186
17187 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17188 gdbpy_ref.
17189
0700aea5
TT
171902017-01-10 Tom Tromey <tom@tromey.com>
17191
17192 * python/py-prettyprint.c (search_pp_list)
17193 (find_pretty_printer_from_objfiles)
17194 (find_pretty_printer_from_progspace)
17195 (find_pretty_printer_from_gdb, find_pretty_printer)
17196 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17197 gdbpy_ref.
17198
1bb44c9f
TT
171992017-01-10 Tom Tromey <tom@tromey.com>
17200
17201 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17202
87ce03fd
TT
172032017-01-10 Tom Tromey <tom@tromey.com>
17204
17205 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17206 (ltpy_get_all_source_lines): Use gdbpy_ref.
17207
ee0a3fb8
TT
172082017-01-10 Tom Tromey <tom@tromey.com>
17209
17210 * python/py-framefilter.c (extract_sym, extract_value)
17211 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17212 gdbpy_ref.
17213
bf2a52fa
TT
172142017-01-10 Tom Tromey <tom@tromey.com>
17215
17216 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17217
f59fe7f8
TT
172182017-01-10 Tom Tromey <tom@tromey.com>
17219
17220 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17221
80bd970a
TT
172222017-01-10 Tom Tromey <tom@tromey.com>
17223
17224 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17225 gdbpy_ref.
17226
d1b3de2e
TT
172272017-01-10 Tom Tromey <tom@tromey.com>
17228
17229 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17230
3bb43384
TT
172312017-01-10 Tom Tromey <tom@tromey.com>
17232
17233 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17234 (typy_range): Use gdbpy_ref.
17235
abf5651e
TT
172362017-01-10 Tom Tromey <tom@tromey.com>
17237
17238 * python/py-threadevent.c (create_thread_event_object): Use
17239 gdbpy_ref.
17240 * python/py-stopevent.c (create_stop_event_object): Simplify.
17241 (emit_stop_event): Use gdbpy_ref.
17242 * python/py-signalevent.c (create_signal_event_object): Use
17243 gdbpy_ref.
17244 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17245 (emit_new_objfile_event, create_clear_objfiles_event_object)
17246 (emit_clear_objfiles_event): Use gdbpy_ref.
17247 * python/py-infevents.c (create_inferior_call_event_object)
17248 (create_register_changed_event_object)
17249 (create_memory_changed_event_object, emit_inferior_call_event)
17250 (emit_memory_changed_event, emit_register_changed_event): Use
17251 gdbpy_ref.
17252 * python/py-exitedevent.c (create_exited_event_object)
17253 (emit_exited_event): Use gdbpy_ref.
17254 * python/py-event.h (evpy_emit_event): Remove
17255 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17256 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17257 * python/py-continueevent.c (emit_continue_event): Use
17258 gdbpy_ref.
17259 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17260 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17261 gdbpy_ref.
17262 * python/py-bpevent.c (create_breakpoint_event_object): Use
17263 gdbpy_ref.
17264
a68ff33e
TT
172652017-01-10 Tom Tromey <tom@tromey.com>
17266
17267 * python/py-ref.h: New file.
17268
7becfd03
SM
172692017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17270
17271 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17272 void.
17273 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17274 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17275 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17276 * ui-out.c (ui_out::redirect): Likewise.
17277 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17278 * cli/cli-logging.c (set_logging_redirect): Update call site of
17279 ui_out::redirect.
17280 (handle_redirections): Likewise.
17281 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17282 * top.c (execute_command_to_string): Likewise.
17283 * utils.c (do_ui_out_redirect_pop): Likewise.
17284
df294654
SM
172852017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17286
17287 * stack.c (_initialize_stack): Update "frame" command help message.
17288
f5e6296e
IB
172892017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17290
17291 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17292
0e2d6fa6
YQ
172932017-01-06 Yao Qi <yao.qi@linaro.org>
17294
17295 * x86-linux-nat.h: Include gdb_proc_service.h.
17296
44d6d3f9
YQ
172972017-01-06 Yao Qi <yao.qi@linaro.org>
17298
17299 * ser-base.h: Include serial.h.
17300
656731fe
YQ
173012017-01-06 Yao Qi <yao.qi@linaro.org>
17302
17303 * ppc-linux-tdep.h: Include ppc-tdep.h.
17304
1ca8f924
YQ
173052017-01-06 Yao Qi <yao.qi@linaro.org>
17306
17307 * nat/amd64-linux-siginfo.h: Include signal.h.
17308
bc3008c4
YQ
173092017-01-06 Yao Qi <yao.qi@linaro.org>
17310
17311 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17312
66c80d03
YQ
173132017-01-06 Yao Qi <yao.qi@linaro.org>
17314
17315 * mi/mi-parse.h: Include mi-cmds.h.
17316
051d2dda
YQ
173172017-01-06 Yao Qi <yao.qi@linaro.org>
17318
17319 * inf-loop.c: Don't include "target.h".
17320 * inf-loop.h: Include it here.
17321
8018d34f
YQ
173222017-01-06 Yao Qi <yao.qi@linaro.org>
17323
17324 * dfp.h: Include "dboulest.h" and "expression.h".
17325
c0b8369c
YQ
173262017-01-06 Yao Qi <yao.qi@linaro.org>
17327
17328 * ax-gdb.h: Include "ax.h".
17329
ad5cba2a
YQ
173302017-01-06 Yao Qi <yao.qi@linaro.org>
17331
17332 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17333 with nat/gdb_ptrace.h.
17334
1c33cd7f
YQ
173352017-01-05 Yao Qi <yao.qi@linaro.org>
17336
17337 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17338 new line.
17339 (mips64_fbsd_sigframe_init): Likewise.
17340
c988ac1d
JB
173412017-01-04 John Baldwin <jhb@FreeBSD.org>
17342
17343 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17344 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17345
b268007c
JB
173462017-01-04 John Baldwin <jhb@FreeBSD.org>
17347
17348 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17349 * NEWS: Mention new FreeBSD/mips native configuration.
17350 * config/mips/fbsd.mh: New file.
17351 * configure.host: Add mips*-*-freebsd*.
17352 * mips-fbsd-nat.c: New file.
17353
387360da
JB
173542017-01-04 John Baldwin <jhb@FreeBSD.org>
17355
17356 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17357 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17358 * NEWS: Mention new FreeBSD/mips target.
17359 * configure.tgt: Add mips*-*-freebsd*.
17360 * mips-fbsd-tdep.c: New file.
17361 * mips-fbsd-tdep.h: New file.
17362
2aaaf250
YQ
173632017-01-04 Yao Qi <yao.qi@linaro.org>
17364
17365 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17366 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17367
61baf725
JB
173682017-01-01 Joel Brobecker <brobecker@adacore.com>
17369
6dbb839a 17370 Update copyright year range in all GDB files.
61baf725 17371
c113e7ff 173722017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17373
c113e7ff 17374 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17375
c113e7ff 17376For older changes see ChangeLog-2016.
c906108c
SS
17377\f
17378Local Variables:
17379mode: change-log
17380left-margin: 8
17381fill-column: 74
17382version-control: never
57da7796 17383coding: utf-8
c906108c 17384End:
This page took 3.880204 seconds and 4 git commands to generate.