Fix gdb.base/completion.exp with --target_board=dwarf4-gdb-index
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
8f14146e
PA
12017-07-14 Pedro Alves <palves@redhat.com>
2
3 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4 symtabs matching all symtabs with SRCFILE as file name instead of
5 only considering the first hit, with lookup_symtab.
6
2347965c
SM
72017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8
9 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10 operator_name parameters.
11 (gen_expr): Update function call.
12
40f4af28
SM
132017-07-14 Simon Marchi <simon.marchi@ericsson.com>
14
15 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
16 parameter.
17 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
18 Likewise.
19 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
20 parameter, use agent_expr::gdbarch instead, update function
21 calls.
22 (locexpr_tracepoint_var_ref): Likewise.
23 (loclist_tracepoint_var_ref): Likewise.
24 * ax-gdb.c (gen_trace_static_fields): Likewise.
25 (gen_traced_pop): Likewise.
26 (gen_frame_args_address): Likewise.
27 (gen_frame_locals_address): Likewise.
28 (gen_var_ref): Likewise.
29 (gen_struct_ref_recursive): Likewise.
30 (gen_static_field): Likewise.
31 (gen_maybe_namespace_elt): Likewise.
32 (gen_expr): Likewise.
33 (gen_trace_for_var): Likewise.
34 (gen_trace_for_expr): Likewise.
35 (gen_trace_for_return_address): Likewise.
36
053f8057
SM
372017-07-14 Simon Marchi <simon.marchi@ericsson.com>
38
39 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
40 parameter.
41 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
42
6661ad48
SM
432017-07-14 Simon Marchi <simon.marchi@ericsson.com>
44
45 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
46 from ax, update calls.
47 (gen_usual_arithmetic): Likewise.
48 (gen_integral_promotions): Likewise.
49 (gen_bitfield_ref): Likewise.
50 (gen_primitive_field): Likewise.
51 (gen_struct_ref_recursive): Likewise.
52 (gen_struct_ref): Likewise.
53 (gen_maybe_namespace_elt): Likewise.
54 (gen_struct_elt_for_reference): Likewise.
55 (gen_namespace_elt): Likewise.
56 (gen_aggregate_elt_ref): Likewise.
57 (gen_expr): Get gdbarch from ax, update calls.
58 (gen_expr_binop_rest): Likewise.
59
c55a47e7
PA
602017-07-13 Pedro Alves <palves@redhat.com>
61
62 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
63 as default tdesc.
64 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
65 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
66 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
67 tdesc_amd64_linux as default tdesc. Get final tdesc from the
68 tdep.
69 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
70 Get final tdesc from the tdep.
71 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
72 default tdesc.
73 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
74 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
75 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
76 Use it as default tdesc.
77 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
78 down to amd_init_abi. No longer handle fallback tdesc here.
79 * amd64-tdep.h (tdesc_x32): Declare.
80 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
81 parameter.
82 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
83 as default tdesc.
84
55efceab
AA
852017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
86
87 * s390-linux-tdep.c (s390_process_record): Add support for
88 instructions new in arch12.
89
0aa37b65
JB
902017-07-11 John Baldwin <jhb@FreeBSD.org>
91
92 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
93 PT_GETFSBASE and PT_GETGSBASE.
94 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
95 PT_SETGSBASE.
96
48aeef91
JB
972017-07-11 John Baldwin <jhb@FreeBSD.org>
98
99 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
100 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
101 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
102 those rules.
103 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
104 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
105 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
106 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
107 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
108 * features/i386/amd64.xml: Add 64bit-segments.xml.
109 * features/i386/amd64-avx-avx512.c: Regenerated.
110 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
111 * features/i386/amd64-avx-mpx.c: Regenerated.
112 * features/i386/amd64-avx.c: Regenerated.
113 * features/i386/amd64-mpx.c: Regenerated.
114 * features/i386/amd64.c: Regenerated.
115 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
116 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
117 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
118 * regformats/i386/amd64-avx.dat: Regenerated.
119 * regformats/i386/amd64-mpx.dat: Regenerated.
120 * regformats/i386/amd64.dat: Regenerated.
121
77c501bc
YQ
1222017-07-10 Yao Qi <yao.qi@linaro.org>
123
124 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
125 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
126
6dc8d757
AK
1272017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
128
129 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
130 unsetenv.
131 * gnulib/aclocal.m4: Regenerate.
132 * gnulib/config.in: Regenerate.
133 * gnulib/configure: Regenerate.
134 * gnulib/import/Makefile.am: Regenerate.
135 * gnulib/import/Makefile.in: Regenerate.
136 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
137 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
138 * gnulib/import/m4/environ.m4: New file.
139 * gnulib/import/m4/setenv.m4: New file.
140 * gnulib/import/setenv.c: New file.
141 * gnulib/import/unsetenv.c: New file.
142
266934d1
SM
1432017-07-09 Simon Marchi <simon.marchi@ericsson.com>
144
145 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
146 address when op is DW_OP_addr.
147
03278692
TT
1482017-07-09 Tom Tromey <tom@tromey.com>
149
150 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
151 check and apply to outer type.
152
4b654465
JB
1532017-07-07 John Baldwin <jhb@FreeBSD.org>
154
155 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
156 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
157 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
158 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
159
2af9fc44
JB
1602017-07-07 John Baldwin <jhb@FreeBSD.org>
161
162 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
163
382b69bb
JB
1642017-07-07 John Baldwin <jhb@FreeBSD.org>
165
166 * corelow.c (get_core_siginfo): Remove.
167 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
168 instead of get_core_siginfo.
169 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
170 * gdbarch.h: Re-generate.
171 * gdbarch.c: Re-generate.
172 * linux-tdep.c (linux_core_xfer_siginfo): New.
173 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
174
6e5eab33
JB
1752017-07-07 John Baldwin <jhb@FreeBSD.org>
176
177 * corelow.c (thread_section_name): Move to ...
178 * gdbcore.h (thread_section_name): ... here.
179
929edea9
JB
1802017-07-07 John Baldwin <jhb@FreeBSD.org>
181
182 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
183 (struct siginfo32): New.
184 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
185 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
186 via ptrace(PT_LWPINFO).
187
762c974a
JB
1882017-07-07 John Baldwin <jhb@FreeBSD.org>
189
190 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
191 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
192 (fbsd_get_siginfo_type): New.
193 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
194 (_initialize_fbsd_tdep): New.
195
33c5cd75
DB
1962017-07-06 David Blaikie <dblaikie@gmail.com>
197
198 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
199 a singular dwo_unit*) to support multiple CUs in the same way that
200 multiple TUs are supported.
201 (create_cus_hash_table): Replace create_dwo_cu with a function for
202 parsing multiple CUs from a DWO file.
203 (open_and_init_dwo_file): Use create_cus_hash_table rather than
204 create_dwo_cu.
205 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
206 htab_find, rather than comparing the signature to a singleton CU in
207 the dwo_file.
208
8455d262
PA
2092017-07-06 Pedro Alves <palves@redhat.com>
210
211 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
212
4da3eb35
PA
2132017-07-04 Pedro Alves <palves@redhat.com>
214
215 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
216 * gdbtypes.h (TYPE_STATIC): Delete.
217 (struct fn_field) <is_public, is_abstract, is_static, is_final,
218 is_synchronized, is_native>: Delete.
219 <dummy>: Bump.
220 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
221 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
222 (TYPE_FN_FIELD_ABSTRACT): Delete.
223
5bfd255c
SM
2242017-07-03 Simon Marchi <simon.marchi@ericsson.com>
225
226 * buffer.h (buffer_finish): Fix spelling mistakes.
227
25c54127
EZ
2282017-07-01 Eli Zaretskii <eliz@gnu.org>
229
230 * .dir-locals.el: Automatically switch to C-style comments in
231 versions of Emacs that support the feature.
232
dc4bde35
SDJ
2332017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
234 Pedro Alves <palves@redhat.com>
235
236 PR cli/21688
237 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
238 (process_next_line): New variable 'inline_cmd'.
239 Adjust 'if' clauses for "python", "compile" and "guile" to use
240 'command_name_equals' and check for '!inline_cmd'.
241
51ed89aa
SDJ
2422017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
243
244 PR cli/21688
245 * cli/cli-script.c (command_name_equals_not_inline): New function.
246 (process_next_line): Adjust 'if' clauses for "python", "compile"
247 and "guile" to use command_name_equals_not_inline.
248
eb17d413
PA
2492017-06-29 Pedro Alves <palves@redhat.com>
250
251 * completer.c (expression_completer): Call
252 linespec_location_completer instead of location_completer.
253
195bcdd5
PA
2542017-06-29 Pedro Alves <palves@redhat.com>
255
256 * completer.c (expression_completer): Remove code that recomputes
257 'text' from 'word'.
258
adc764e7
YQ
2592017-06-29 Yao Qi <yao.qi@linaro.org>
260
261 * regformats/regdat.sh: Generate code with
262 "ifndef IN_PROCESS_AGENT".
263
6e75794e
PA
2642017-06-28 Pedro Alves <palves@redhat.com>
265
266 * command.h: Include "common/scoped_restore.h".
267
bc491f2e
YQ
2682017-06-28 Yao Qi <yao.qi@linaro.org>
269
270 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
271 instead of obstack_grow.
272
41664b45
DG
2732017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
274
275 PR gdb/21337
276 * symfile.c (reread_symbols): Call objfiles_changed just before
277 read_symbols.
278
6da67eb1
PA
2792017-06-27 Pedro Alves <palves@redhat.com>
280
281 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
282 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
283 (completion_list_add_symbol, completion_list_add_msymbol):
284 ... these new functions.
285 (add_symtab_completions)
286 (default_make_symbol_completion_list_break_on_1): Adjust.
287
23732b1e
PA
2882017-06-27 Pedro Alves <palves@redhat.com>
289
290 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
291 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
292 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
293 dtor.
294 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
295 'storage_obstack' field an auto_obstack. In-class initialize all
296 non-bitfield fields. Make minsyms_read bool.
297 * symfile.c (read_symbols): Adjust.
298
a4d1e79a
AH
2992017-06-27 Alan Hayward <alan.hayward@arm.com>
300
301 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
302 (gdbsim_store_register): Likewise.
303
8268c778
PA
3042017-06-27 Pedro Alves <palves@redhat.com>
305
306 * c-exp.y (name_obstack): Now an auto_obstack.
307 (yylex): Use auto_obstack::clear.
308 (c_parse): Use auto_obstack::clear instead of reinitializing and
309 freeing the obstack.
310 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
311 * d-exp.y (name_obstack): Now an auto_obstack.
312 (yylex): Use auto_obstack::clear.
313 (d_parse): Use auto_obstack::clear instead of reinitializing and
314 freeing the obstack.
315 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
316 auto_obstack.
317 * dwarf2read.c (create_addrmap_from_index)
318 (dwarf2_build_psymtabs_hard)
319 (update_enumeration_type_from_children): Likewise.
320 * gdb_obstack.h (auto_obstack): New type.
321 * go-exp.y (name_obstack): Now an auto_obstack.
322 (build_packaged_name): Use auto_obstack::clear.
323 (go_parse): Use auto_obstack::clear instead of reinitializing and
324 freeing the obstack.
325 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
326 auto_obstack.
327 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
328 * rust-exp.y (work_obstack): Now an auto_obstack.
329 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
330 reinitializing and freeing the obstack.
331 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
332 (host_char_to_target): Use auto_obstack.
333 * utils.h (make_cleanup_obstack_free): Delete declaration.
334 * valprint.c (generic_emit_char, generic_printstr): Use
335 auto_obstack.
336
db665f42
SM
3372017-06-27 Simon Marchi <simon.marchi@ericsson.com>
338
339 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
340 thread.
341 (darwin_init_thread_list): Don't update dummy thread.
342 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
343
873c0814
SM
3442017-06-26 Simon Marchi <simon.marchi@ericsson.com>
345
346 * record-full.c (netorder16): Remove.
347
8b5a7a6e
SM
3482017-06-26 Simon Marchi <simon.marchi@ericsson.com>
349
350 * common/diagnostics.h: Define macros for GCC.
351 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
352 * common/vec.h: Include diagnostics.h.
353 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
354 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
355 warning.
356
d1435379
SM
3572017-06-26 Simon Marchi <simon.marchi@ericsson.com>
358
359 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
360 New macro.
361 * ada-lex.l: Ignore deprecated register warnings.
362
cc75e0fd
SM
3632017-06-25 Simon Marchi <simon.marchi@ericsson.com>
364
365 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
366 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
367
07809eaf
SM
3682017-06-25 Simon Marchi <simon.marchi@ericsson.com>
369
370 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
371 its own line.
372
f076f034
SM
3732017-06-25 Simon Marchi <simon.marchi@ericsson.com>
374
375 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
376
0dd5cbc5
AH
3772017-06-23 Alan Hayward <alan.hayward@arm.com>
378
379 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
380 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
381 (xtensa_register_read_masked): Likewise.
382
d4c6ce5b
SDJ
3832017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
384
385 * common/environ.c (gdb_environ::unset): Update comment.
386
16892a03
AH
3872017-06-22 Alan Hayward <alan.hayward@arm.com>
388
389 * python/py-unwind.c (pyuw_sniffer): Allocate space for
390 registers.
391
d7dcbefc
AH
3922017-06-22 Alan Hayward <alan.hayward@arm.com>
393
394 * record-full.c (record_full_exec_insn): Use byte_vector.
395
b30ff123
YQ
3962017-06-22 Yao Qi <yao.qi@linaro.org>
397
398 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
399 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
400
4fa847d7
AH
4012017-06-22 Alan Hayward <alan.hayward@arm.com>
402
403 * remote.c (cached_reg): Move from here...
404 * regcache.h (cached_reg): ...to here.
405 * python/py-unwind.c (struct reg_info): Remove.
406 (cached_frame_info): Use cached_reg_t.
407 (pyuw_prev_register): Likewise.
408 (pyuw_sniffer): Use cached_reg_t and allocate registers.
409 (pyuw_dealloc_cache): Free all registers.
410
f4906a9a
PA
4112017-06-22 Pedro Alves <palves@redhat.com>
412 Simon Marchi <simon.marchi@ericsson.com>
413
414 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
415 warning.
416 * common/diagnostics.h: New file.
417
b45a1208
PA
4182017-06-22 Pedro Alves <palves@redhat.com>
419
420 * common/agent.h: Add include guards.
421
e4da2c61
SM
4222017-06-21 Simon Marchi <simon.marchi@ericsson.com>
423
424 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
425 talk about addressable units instead of bytes.
426
96160d60
SDJ
4272017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
428
429 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
430 of '::const_iterator'.
431
9a6c7d9c
SDJ
4322017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
433
434 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
435 'unittests/environ-selftests.c'.
436 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
437 * charset.c (find_charset_names): Declare object 'iconv_env'.
438 Update code to use 'iconv_env' object. Remove call to
439 'free_environ'.
440 * common/environ.c: Include <utility>.
441 (make_environ): Delete function.
442 (free_environ): Delete function.
443 (gdb_environ::clear): New function.
444 (gdb_environ::operator=): New function.
445 (gdb_environ::get): Likewise.
446 (environ_vector): Delete function.
447 (set_in_environ): Delete function.
448 (gdb_environ::set): New function.
449 (unset_in_environ): Delete function.
450 (gdb_environ::unset): New function.
451 (gdb_environ::envp): Likewise.
452 * common/environ.h: Include <vector>.
453 (struct gdb_environ): Delete; transform into...
454 (class gdb_environ): ... this class.
455 (free_environ): Delete prototype.
456 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
457 environ_vector): Likewise.
458 * infcmd.c (run_command_1): Update code to call
459 'envp' from 'gdb_environ' class.
460 (environment_info): Update code to call methods from 'gdb_environ'
461 class.
462 (unset_environment_command): Likewise.
463 (path_info): Likewise.
464 (path_command): Likewise.
465 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
466 (inferior::inferior): Initialize 'environment' using the host's
467 information.
468 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
469 Include "environ.h".
470 (class inferior) <environment>: Change type from 'struct
471 gdb_environ' to 'gdb_environ'.
472 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
473 methods from 'gdb_environ' class.
474 * solib.c (solib_find_1): Likewise
475 * unittests/environ-selftests.c: New file.
476
75c554cf
YQ
4772017-06-20 Yao Qi <yao.qi@linaro.org>
478
479 * features/i386/i386-linux.xml: Exchange the order of including
480 32bit-linux.xml and 32bit-sse.xml.
481 * features/i386/i386-linux.c: Regenerated.
482
72ddacb7
YQ
4832017-06-20 Yao Qi <yao.qi@linaro.org>
484
485 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
486 Delete copy ctor and assignment operator.
487 (tdesc_type): Likewise.
488 (tdesc_feature): Likewise.
489 (tdesc_free_reg): Remove.
490 (tdesc_create_reg): Use new.
491 (tdesc_free_type): Remove.
492 (tdesc_create_vector): Use new.
493 (tdesc_create_union): Likewise.
494 (tdesc_create_flags): Likewise.
495 (tdesc_create_enum): Likewise.
496 (tdesc_free_feature): Delete.
497 (free_target_description): Use delete.
498
325c9fd4
JB
4992017-06-19 John Baldwin <jhb@FreeBSD.org>
500
501 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
502 registers.
503
16b7a719
PA
5042017-06-19 Pedro Alves <palves@redhat.com>
505
506 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
507 after gdb::unlinker.
508
1c8e01c9
SDJ
5092017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
510
511 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
512 gdb_environ to access an environment variable.
513
ffce45d2
TP
5142017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
515
516 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
517 gdb_byte*.
518
1d4fbac9
SM
5192017-06-17 Simon Marchi <simon.marchi@ericsson.com>
520
521 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
522
8465943a
SM
5232017-06-17 Simon Marchi <simon.marchi@ericsson.com>
524
525 * configure: Re-generate.
526 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
527
3e019bdc
SM
5282017-06-17 Simon Marchi <simon.marchi@ericsson.com>
529
530 * configure: Re-generate.
531 * warning.m4: Pass -Werror to compiler when checking for
532 supported warning flags.
533
cf0dd6f0
SM
5342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
535
536 * Makefile.in (COMPILE.pre): Add "-x c++".
537
6f98355c
YQ
5382017-06-16 Alan Hayward <alan.hayward@arm.com>
539 Pedro Alves <palves@redhat.com>
540 Yao Qi <yao.qi@linaro.org>
541
542 * defs.h (RequireLongest): New.
543 (extract_integer): Declare function template.
544 (extract_signed_integer): Remove the declaration, but define it
545 static inline.
546 (extract_unsigned_integer): Likewise.
547 (store_integer): Declare function template.
548 (store_signed_integer): Remove the declaration, but define it
549 static inline.
550 (store_unsigned_integer): Likewise.
551 * findvar.c (extract_integer): New function template.
552 (extract_signed_integer): Remove.
553 (extract_unsigned_integer): Remove.
554 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
555 instantiations.
556 (store_integer): New function template.
557 (store_signed_integer): Remove.
558 (store_unsigned_integer): Remove.
559 (store_integer): Explicit instantiations.
560 * regcache.c (regcache_raw_read_signed): Update.
561 (regcache::raw_read): New function.
562 (regcache::raw_read_signed): Remove.
563 (regcache::raw_read_unsigned): Remove.
564 (regcache_raw_read_unsigned): Update.
565 (regcache_raw_write_unsigned): Update.
566 (regcache::raw_write_signed): Remove.
567 (regcache::raw_write): New function.
568 (regcache_cooked_read_signed): Update.
569 (regcache::raw_write_unsigned): Remove.
570 (regcache::cooked_read_signed): Remove.
571 (regcache_cooked_read_unsigned): Update.
572 (regcache::cooked_read_unsigned): Remove.
573 (regcache_cooked_write_signed): Update.
574 (regcache_cooked_write_unsigned): Update.
575 * regcache.h (regcache) <raw_read_signed>: Remove.
576 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
577 <raw_read, raw_write>: New.
578 <cooked_read_signed, cooked_write_signed>: Remove.
579 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
580 <cooked_read, cooked_write>: New.
581 * sh64-tdep.c (sh64_pseudo_register_read): Update.
582 (sh64_pseudo_register_write): Update.
583
a87dc45a
AK
5842017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
585
586 * arc-tdep.c (arc_disassembler_options): New variable.
587 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
588 of default_print_insn.
589 (arc_delayed_print_insn): Set info->section when needed,
590 use default_print_insn to retrieve a disassembler.
591
45159d6a
SDJ
5922017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
593
594 PR gdb/21574
595 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
596 to mention $SHELL and startup-with-shell.
597
b46c4cf0
MF
5982017-06-14 Max Filippov <jcmvbkbc@gmail.com>
599
600 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
601
6394c606
YQ
6022017-06-14 Yao Qi <yao.qi@linaro.org>
603
604 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
605 default_print_insn instead of print_insn_aarch64.
606 * arm-tdep.c (gdb_print_insn_arm): Call
607 default_print_insn instead of print_insn_big_arm
608 and print_insn_little_arm.
609 * i386-tdep.c (i386_print_insn): Call default_print_insn
610 instead of print_insn_i386.
611 * ia64-tdep.c (ia64_print_insn): Call
612 default_print_insn instead of print_insn_ia64.
613 * mips-tdep.c (gdb_print_insn_mips): Call
614 default_print_insn instead of print_insn_big_mips
615 and print_insn_little_mips.
616 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
617 instead of print_insn_spu.
618
d5722aa2
PA
6192017-06-14 Pedro Alves <palves@redhat.com>
620
621 * ada-lang.c: Include "common/byte-vector.h".
622 (ada_value_primitive_packed_val): Use gdb::byte_vector.
623 * charset.c (wchar_iterator::iterate): Resize the vector instead
624 of reserving it.
625 * common/byte-vector.h: Include "common/def-vector.h".
626 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
627 * cli/cli-dump.c: Include "common/byte-vector.h".
628 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
629 * common/byte-vector.h: New file.
630 * common/def-vector.h: New file.
631 * common/default-init-alloc.h: New file.
632 * dwarf2loc.c: Include "common/byte-vector.h".
633 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
634 instead of reserving it.
635 * dwarf2read.c: Include "common/byte-vector.h".
636 (data_buf::m_vec): Now a gdb::byte_vector.
637 * gdb_regex.c: Include "common/def-vector.h".
638 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
639 * mi/mi-main.c: Include "common/byte-vector.h".
640 (mi_cmd_data_read_memory): Use gdb::byte_vector.
641 * printcmd.c: Include "common/byte-vector.h".
642 (print_scalar_formatted): Use gdb::byte_vector.
643 * valprint.c: Include "common/byte-vector.h".
644 (maybe_negate_by_bytes, print_decimal_chars): Use
645 gdb::byte_vector.
646
01ec7a27
SM
6472017-06-13 Simon Marchi <simon.marchi@ericsson.com>
648
649 * darwin-nat.c: Include "nat/fork-inferior.h".
650
848d9074
SM
6512017-06-13 Simon Marchi <simon.marchi@ericsson.com>
652
653 * configure.nat: Factor out Darwin bits that are not
654 architecture-specific. Add fork-inferior.o.
655
3b912944
SM
6562017-06-13 Simon Marchi <simon.marchi@ericsson.com>
657
658 * configure.nat: Factor out AIX bits that are not
659 architecture-specific. Add fork-inferior.o.
660
55acdf22
AA
6612017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
662
663 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
664 (read_pieced_value, write_pieced_value): ...here. Reduce to
665 wrappers that just call rw_pieced_value.
666
f65e2044
AA
6672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
668
669 * dwarf2loc.c (write_pieced_value): When writing the data for a
670 memory piece, use write_memory_with_notification instead of
671 write_memory.
672
23f945bf
AA
6732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
674
675 * valops.c (read_value_memory): Change embedded_offset to
676 represent a bit offset instead of a byte offset.
677 * value.h (read_value_memory): Adjust comment.
678
f236533e
AA
6792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
680
681 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
682 dest_offset_bits and source_offset_bits.
683 (write_pieced_value): Likewise.
684
65d84b76
AA
6852017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
686
687 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
688 given by DW_OP_bit_piece.
689 (write_pieced_value): Likewise.
690
242d31ab
AA
6912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
692
693 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
694 some other preparations to the places where sufficient information
695 is available.
696 (write_pieced_value): Likewise.
697
03c8af18
AA
6982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
699
700 * dwarf2loc.c (bits_to_bytes): New function.
701 (read_pieced_value): Fix offset calculations for register pieces
702 on big-endian targets.
703 (write_pieced_value): Likewise.
704
840989c1
AA
7052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
706
707 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
708 (write_pieced_value): Likewise.
709
359b19bb
AA
7102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
711
712 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
713 transfer the source value's least significant bits, instead of its
714 lowest-addressed ones. Rename type_len to max_offset.
715 (read_pieced_value): Mirror above changes to write_pieced_value as
716 applicable.
717
07c9ca3b
AA
7182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
719
720 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
721 truncate full bytes from dest_offset_bits before using it as an
722 offset into the buffer.
723
f1cc9874
AA
7242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
725
726 * dwarf2loc.c (write_pieced_value): Include transfer size in
727 byte-wise check.
728
cdaac320
AA
7292017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
730
731 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
732 calculation of this_size.
733
af547a96
AA
7342017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
735
736 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
737 when targeting a bit-field.
738 (write_pieced_value): Likewise.
739
ddd7882a
AA
7402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
741
742 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
743 (allocate_piece_closure): Drop addr_size parameter.
744 (dwarf2_evaluate_loc_desc_full): Adjust call to
745 allocate_piece_closure.
746
e9352324
AA
7472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
748
749 PR gdb/21226
750 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
751 the LSB end, independent of endianness.
752
d5d1163e
AA
7532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
754
755 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
756 size capping.
757
032bb6ea
YQ
7582017-06-13 Yao Qi <yao.qi@linaro.org>
759
760 * mips-linux-nat.c: Move include features/mips*-linux.c to
761 mips-linux-tdep.c.
762 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
763 to mips-linux-tdep.c.
764 * mips-linux-tdep.c: Include features/mips*-linux.c
765 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
766 functions.
767 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
768 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
769 (tdesc_mips64_dsp_linux): Declare.
770
f12f6bad
TT
7712017-06-12 Tom Tromey <tom@tromey.com>
772
773 * valprint.h (val_print_type_code_int): Remove.
774 * valprint.c (generic_val_print_int): Always call
775 val_print_scalar_formatted.
776 (val_print_type_code_int): Remove.
777 * printcmd.c (print_scalar_formatted): Handle options->format==0.
778 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
779 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
780 * ada-valprint.c (ada_val_print_num): Use
781 val_print_scalar_formatted.
782
d9109c80
TT
7832017-06-12 Tom Tromey <tom@tromey.com>
784
785 * printcmd.c (print_scalar_formatted): Unify the two switches.
786 Don't convert scalars to LONGEST.
787
4ac0cb1c
TT
7882017-06-12 Tom Tromey <tom@tromey.com>
789
790 PR exp/16225:
791 * valprint.h (print_decimal_chars): Update.
792 * valprint.c (maybe_negate_by_bytes): New function.
793 (print_decimal_chars): Add "is_signed" argument.
794 * printcmd.c (print_scalar_formatted): Update.
795
30a25466
TT
7962017-06-12 Tom Tromey <tom@tromey.com>
797
798 PR exp/16225:
799 * valprint.h (print_binary_chars, print_hex_chars): Update.
800 * valprint.c (val_print_type_code_int): Update.
801 (print_binary_chars): Add "zero_pad" argument.
802 (emit_octal_digit): New function.
803 (print_octal_chars): Don't zero-pad.
804 (print_decimal_chars): Likewise.
805 (print_hex_chars): Add "zero_pad" argument.
806 * sh64-tdep.c (sh64_do_fp_register): Update.
807 * regcache.c (regcache::dump): Update.
808 * printcmd.c (print_scalar_formatted): Update.
809 * infcmd.c (default_print_one_register_info): Update.
810
b3464d03
PA
8112017-06-12 Pedro Alves <palves@redhat.com>
812 Alan Hayward <alan.hayward@arm.com>
813
814 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
815 (mips_eabi_push_dummy_call): Rename local 'regsize' to
816 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
817 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
818 Assert that abi_regsize bytes fit in 'ref_valbuf'.
819
4b76cda9
PA
8202017-06-12 Pedro Alves <palves@redhat.com>
821
822 * dwarf2read.c (mapped_symtab::data): Now a vector of
823 symtab_index_entry instead of vector of
824 std::unique_ptr<symtab_index_entry>. All users adjusted to check
825 whether an element's name is NULL instead of checking whether the
826 element itself is NULL.
827 (find_slot): Change return type. Adjust.
828 (hash_expand, , add_index_entry, uniquify_cu_indices)
829 (write_hash_table): Adjust.
830
e8f8bcb3
PA
8312017-06-12 Pedro Alves <palves@redhat.com>
832
833 * dwarf2read.c (recursively_count_psymbols): New function.
834 (write_psymtabs_to_index): Call it to compute number of psyms and
835 pass estimate size of psyms_seen to unordered_set's ctor.
836
70a1152b
PA
8372017-06-12 Pedro Alves <palves@redhat.com>
838
839 * dwarf2read.c (write_hash_table): Check if key already exists
840 before emplacing.
841
c2f134ac
PA
8422017-06-12 Pedro Alves <palves@redhat.com>
843
844 * dwarf2read.c (data_buf::append_space): Rename to...
845 (data_buf::grow): ... this, and make private. Adjust all callers.
846 (data_buf::append_uint): New method.
847 (add_address_entry, write_one_signatured_type)
848 (write_psymtabs_to_index): Use it.
849
a81e6d4d
PA
8502017-06-12 Pedro Alves <palves@redhat.com>
851
852 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
853 (file_write (FILE *, const std::vector<Elem>&)): Delete.
854 (data_buf::file_write): Call ::fwrite directly.
855
6fd931f2
PA
8562017-06-12 Pedro Alves <palves@redhat.com>
857
858 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
859 std::vector::erase.
860
bc8f2430
JK
8612017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
862
863 Code cleanup: C++ify .gdb_index producer.
864 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
865 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
866 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
867 (create_strtab, add_string): Remove.
868 (file_write, data_buf): New.
869 (struct symtab_index_entry): Use std::vector for cu_indices.
870 (struct mapped_symtab): Use std::vector for data.
871 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
872 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
873 Remove.
874 (find_slot): Change return type. Update it to the new data structures.
875 (hash_expand, add_index_entry): Update it to the new data structures.
876 (offset_type_compare): Remove.
877 (uniquify_cu_indices): Update it to the new data structures.
878 (c_str_view, c_str_view_hasher, vector_hasher): New.
879 (add_indices_to_cpool): Remove.
880 (write_hash_table): Update it to the new data structures.
881 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
882 (eq_psymtab_cu_index): Remove.
883 (psym_index_map): New typedef.
884 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
885 reference and std::unordered_map for cu_index_htab.
886 (add_address_entry, add_address_entry_worker, write_address_map)
887 (write_psymbols): Update it to the new data structures.
888 (write_obstack): Remove.
889 (struct signatured_type_index_data): Change types_list to a data_buf
890 reference and psyms_seen to a std::unordered_set reference.
891 (write_one_signatured_type, recursively_write_psymbols)
892 (write_psymtabs_to_index): Update it to the new data structures.
893
c4dcb155
SM
8942017-06-11 Simon Marchi <simon.marchi@ericsson.com>
895
896 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
897 separate-debug-file commands.
898 * symfile.h (separate_debug_file_debug): New global.
899 * symfile.c (separate_debug_file_debug): New global.
900 (separate_debug_file_exists, find_separate_debug_file): Add
901 debug output.
902 (_initialize_symfile): Add "set debug separate-debug-file"
903 command.
904 * build-id.c (build_id_to_debug_bfd,
905 find_separate_debug_file_by_buildid): Add debug output.
906
6d45d4b4
SM
9072017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
908
909 * gdbarch.sh (displaced_step_free_closure): Remove.
910 * gdbarch.h, gdbarch.c: Re-generate.
911 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
912 displaced_step_free_closure.
913 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
914 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
915 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
916 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
917 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
918 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
919 * arch-utils.h (simple_displaced_step_free_closure): Remove.
920 * arch-utils.c (simple_displaced_step_free_closure): Remove.
921 * infrun.c (displaced_step_clear): Call xfree instead of
922 gdbarch_displaced_step_free_closure.
923
2f91880f
SDJ
9242017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
925
926 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
927 NULL".
928
b8b6e72f
AH
9292017-06-08 Alan Hayward <alan.hayward@arm.com>
930
931 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
932 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
933 (mn10300_push_dummy_call): Likewise.
934
5369082e
AH
9352017-06-08 Alan Hayward <alan.hayward@arm.com>
936
937 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
938
ff4ca5ac
AH
9392017-06-08 Alan Hayward <alan.hayward@arm.com>
940
941 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
942
aefd8b33
SDJ
9432017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
944
945 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
946 able to start inferiors using a shell.
947 (New remote packets): Announce new packet "QStartupWithShell".
948 * remote.c: Add PACKET_QStartupWithShell.
949 (extended_remote_create_inferior): Handle new
950 PACKET_QStartupWithShell.
951 (remote_protocol_features) <QStartupWithShell>: New entry for
952 PACKET_QStartupWithShell.
953 (_initialize_remote): Call "add_packet_config_cmd" for
954 QStartupShell.
955
2090129c
SDJ
9562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
957 Pedro Alves <palves@redhat.com>
958
959 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
960 and "nat/fork-inferior.h".
961 * common/common-inferior.h: New file, with contents from
962 "gdb/inferior.h".
963 * commom/common-utils.c: Include "common-utils.h".
964 (stringify_argv): New function.
965 * common/common-utils.h (stringify_argv): New prototype.
966 * configure.nat: Add "fork-inferior.o" as a dependency for
967 "*linux*", "fbsd*" and "nbsd*" hosts.
968 * corefile.c (get_exec_file): Update comment.
969 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
970 instead of "startup_inferior".
971 (darwin_create_inferior): Call "add_thread_silent" after
972 "fork_inferior".
973 * fork-child.c: Cleanup unnecessary includes.
974 (SHELL_FILE): Move to "common/common-fork-child.c".
975 (environ): Likewise.
976 (exec_wrapper): Initialize.
977 (get_exec_wrapper): New function.
978 (breakup_args): Move to "common/common-fork-child.c"; rename to
979 "breakup_args_for_exec".
980 (escape_bang_in_quoted_argument): Move to
981 "common/common-fork-child.c".
982 (saved_ui): New variable.
983 (prefork_hook): New function.
984 (postfork_hook): Likewise.
985 (postfork_child_hook): Likewise.
986 (gdb_startup_inferior): Likewise.
987 (fork_inferior): Move to "common/common-fork-child.c". Update
988 function to support gdbserver.
989 (startup_inferior): Likewise.
990 * gdbcore.h (get_exec_file): Remove declaration.
991 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
992 instead of "startup_inferior". Call "add_thread_silent" after
993 "fork_inferior".
994 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
995 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
996 instead of "startup_inferior". Call "add_thread_silent" after
997 "fork_inferior".
998 * inferior.h: Include "common-inferior.h".
999 (trace_start_error): Move to "common/common-utils.h".
1000 (trace_start_error_with_name): Likewise.
1001 (fork_inferior): Move prototype to "nat/fork-inferior.h".
1002 (startup_inferior): Likewise.
1003 (gdb_startup_inferior): New prototype.
1004 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
1005 * nat/fork-inferior.h: New file.
1006 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
1007 instead of "startup_inferior". Call "add_thread_silent" after
1008 "fork_inferior".
1009 * target.h (target_terminal_init): Move prototype to
1010 "target/target.h".
1011 (target_terminal_inferior): Likewise.
1012 (target_terminal_ours): Likewise.
1013 * target/target.h (target_terminal_init): New prototype, moved
1014 from "target.h".
1015 (target_terminal_inferior): Likewise.
1016 (target_terminal_ours): Likewise.
1017 * utils.c (gdb_flush_out_err): New function.
1018
043a4934
SDJ
10192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1020
1021 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
1022 * common/common-gdbthread.h: New file, with parts from
1023 "gdb/gdbthread.h".
1024 * gdbthread.h: Include "common-gdbthread.h".
1025 (switch_to_thread): Moved to "common/common-gdbthread.h".
1026
15652511
SDJ
10272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1028
1029 * Makefile.in (SFILES): Add "common/job-control.c".
1030 (HFILES_NO_SRCDIR): Add "common/job-control.h".
1031 (COMMON_OBS): Add "job-control.o".
1032 * common/job-control.c: New file, with contents from
1033 "gdb/inflow.c".
1034 * common/job-control.h: New file, with contents from "terminal.h".
1035 * fork-child.c: Include "job-control.h".
1036 * inflow.c: Include "job-control.h".
1037 (gdb_setpgid): Move to "common/common-inflow.c".
1038 (_initialize_inflow): Move setting of "job_control" to
1039 "handle_job_control".
1040 * terminal.h (job_control): Moved to "common/common-terminal.h".
1041 (gdb_setpgid): Likewise.
1042 * top.c: Include "job_control.h".
1043 * utils.c: Likewise.
1044 (job_control): Moved to "job-control.c".
1045
2d7cc5c7
PA
10462017-06-07 Pedro Alves <palves@redhat.com>
1047
1048 * Makefile.in (SFILES): Add gdb_regex.c.
1049 (COMMON_OBS): Add gdb_regex.o.
1050 * ada-lang.c (ada_add_standard_exceptions)
1051 (ada_add_exceptions_from_frame, name_matches_regex)
1052 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
1053 parameter type to compiled_regex. Adjust.
1054 (ada_exceptions_list): Use compiled_regex.
1055 * break-catch-throw.c (exception_catchpoint::pattern): Now a
1056 std::unique_ptr<compiled_regex>.
1057 (exception_catchpoint::~exception_catchpoint): Remove regfree
1058 call.
1059 (check_status_exception_catchpoint): Adjust to use compiled_regex.
1060 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
1061 * breakpoint.c (solib_catchpoint::compiled): Now a
1062 std::unique_ptr<compiled_regex>.
1063 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
1064 (check_status_catch_solib): Adjust to use compiled_regex.
1065 (add_solib_catchpoint): Adjust to use compiled_regex.
1066 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
1067 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
1068 compiled_regex reference. Adjust to use it.
1069 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
1070 declaration. Include "gdb_regex.h".
1071 (apropos_cmd): Change regex parameter to compiled_regex reference.
1072 * gdb_regex.c: New file.
1073 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
1074 declarations.
1075 (class compiled_regex): New.
1076 * linux-tdep.c: Include "common/gdb_optional.h".
1077 (struct mapping_regexes): New, factored out from
1078 mapping_is_anonymous_p, and adjusted to use compiled_regex.
1079 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
1080 gdb::optional and remove cleanups. Adjust to compiled_regex.
1081 * probe.c: Include "common/gdb_optional.h".
1082 (collect_probes): Use compiled_regex and gdb::optional and remove
1083 cleanups.
1084 * skip.c: Include "common/gdb_optional.h".
1085 (skiplist_entry::compiled_function_regexp): Now a
1086 gdb::optional<compiled_regex>.
1087 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
1088 (free_skiplist_entry): Remove regfree call.
1089 (compile_skip_regexp, skip_rfunction_p): Adjust to use
1090 compiled_regex and gdb::optional.
1091 * symtab.c: Include "common/gdb_optional.h".
1092 (search_symbols): Use compiled_regex and gdb::optional.
1093 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
1094 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
1095 to gdb_regex.c.
1096
50d6adef
AH
10972017-06-07 Alan Hayward <alan.hayward@arm.com>
1098
1099 * regcache.c (regcache::save): Avoid buffer use.
1100 (regcache::dump): Likewise.
1101
4a8a33c8
AH
11022017-06-07 Alan Hayward <alan.hayward@arm.com>
1103
1104 * sh-tdep.c (sh_pseudo_register_read): Remove
1105 MAX_REGISTER_SIZE.
1106 (sh_pseudo_register_write): Likewise.
1107 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
1108 (sh64_pseudo_register_write): Likewise
1109
d1be909e
AH
11102017-06-07 Alan Hayward <alan.hayward@arm.com>
1111
1112 * aarch64-tdep.c (aarch64_store_return_value): Use
1113 V_REGISTER_SIZE.
1114 (aarch64_pseudo_read_value): Likewise.
1115 (aarch64_pseudo_write): Likewise.
1116
f4a65042
YQ
11172017-06-06 Yao Qi <yao.qi@linaro.org>
1118
1119 * regformats/regdef.h (set_register_cache): Remove the
1120 declaration.
1121
9f7fb0aa
AH
11222017-06-06 Alan Hayward <alan.hayward@arm.com>
1123
1124 * frame.c (frame_unwind_register_signed): Use
1125 frame_unwind_register_value.
1126
e1e01040
PA
11272017-06-06 Pedro Alves <palves@redhat.com>
1128
1129 PR breakpoints/21553
1130 * breakpoint.c (create_breakpoints_sal_default)
1131 (init_breakpoint_sal, create_breakpoint_sal): Use
1132 gdb::unique_xmalloc_ptr for string parameters.
1133 (create_breakpoint): Constify 'extra_string' and 'cond_string'
1134 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
1135 (base_breakpoint_create_breakpoints_sal)
1136 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
1137 (strace_marker_create_breakpoints_sal)
1138 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
1139 string parameters.
1140 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
1141 gdb::unique_xmalloc_ptr for string parameters.
1142 (create_breakpoint): Constify 'extra_string' and 'cond_string'
1143 parameters.
1144
fbe654c8
AH
11452017-06-06 Alan Hayward <alan.hayward@arm.com>
1146
1147 * alpha-tdep.c (alpha_register_to_value): Use
1148 get_frame_register_value.
1149 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
1150
ae0d01d6
AH
11512017-06-06 Alan Hayward <alan.hayward@arm.com>
1152
1153 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
1154 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
1155 (ia64_value_to_register): Likewise.
1156 (ia64_extract_return_value): Likewise.
1157 (ia64_store_return_value): Likewise.
1158 (ia64_push_dummy_call): Likewise.
1159
49cf576c
JB
11602017-06-04 Joel Brobecker <brobecker@adacore.com>
1161
1162 GDB 8.0 released.
1163
26b6a6ab
SM
11642017-06-03 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * x86-linux-nat.c (struct arch_lwp_info): Remove.
1167
22827c51
SM
11682017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
1169
1170 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
1171 parameter.
1172 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
1173
0e05cf3a
SM
11742017-06-02 Simon Marchi <simon.marchi@ericsson.com>
1175
1176 * event-loop.c (poll_timers): Unallocate timer using delete
1177 instead of xfree.
1178
c1fc2657
SM
11792017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
1180
1181 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
1182 (struct breakpoint) <~breakpoint>: New.
1183 (struct watchpoint): Inherit from breakpoint.
1184 <~watchpoint>: New.
1185 <base>: Remove.
1186 (struct tracepoint): Inherit from breakpoint.
1187 <base>: Remove.
1188 * breakpoint.c (longjmp_breakpoint_ops): Remove.
1189 (struct longjmp_breakpoint): Inherit from breakpoint.
1190 <~longjmp_breakpoint>: New.
1191 <base>: Remove.
1192 (new_breakpoint_from_type): Remove casts.
1193 (watchpoint_in_thread_scope): Remove reference to base field.
1194 (watchpoint_del_at_next_stop): Likewise.
1195 (update_watchpoint): Likewise.
1196 (watchpoint_check): Likewise.
1197 (bpstat_check_watchpoint): Likewise.
1198 (set_longjmp_breakpoint): Likewise.
1199 (struct fork_catchpoint): Inherit from breakpoint.
1200 <base>: Remove.
1201 (struct solib_catchpoint): Inherit from breakpoint.
1202 <~solib_catchpoint>: New.
1203 <base>: Remove.
1204 (dtor_catch_solib): Change to ...
1205 (solib_catchpoint::~solib_catchpoint): ... this.
1206 (breakpoint_hit_catch_solib): Remove reference to base field.
1207 (add_solib_catchpoint): Likewise.
1208 (create_fork_vfork_event_catchpoint): Likewise.
1209 (struct exec_catchpoint): Inherit from breakpoint.
1210 <~exec_catchpoint>: New.
1211 <base>: Remove.
1212 (dtor_catch_exec): Change to ...
1213 (exec_catchpoint::~exec_catchpoint): ... this.
1214 (dtor_watchpoint): Change to ...
1215 (watchpoint::~watchpoint): ... this.
1216 (watch_command_1): Remove reference to base field.
1217 (catch_exec_command_1): Likewise.
1218 (base_breakpoint_dtor): Change to ...
1219 (breakpoint::~breakpoint): ... this.
1220 (base_breakpoint_ops): Remove dtor field value.
1221 (longjmp_bkpt_dtor): Change to ...
1222 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
1223 (strace_marker_create_breakpoints_sal): Remove reference to base
1224 field.
1225 (delete_breakpoint): Don't manually call breakpoint destructor.
1226 (create_tracepoint_from_upload): Remove reference to base field.
1227 (trace_pass_set_count): Likewise.
1228 (initialize_breakpoint_ops): Don't initialize
1229 momentary_breakpoint_ops, don't set dtors.
1230 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
1231 <~ada_catchpoint>: New.
1232 <base>: Remove.
1233 (create_excep_cond_exprs): Remove reference to base field.
1234 (dtor_exception): Change to ...
1235 (ada_catchpoint::~ada_catchpoint): ... this.
1236 (dtor_catch_exception): Remove.
1237 (dtor_catch_exception_unhandled): Remove.
1238 (dtor_catch_assert): Remove.
1239 (create_ada_exception_catchpoint): Remove reference to base
1240 field.
1241 (initialize_ada_catchpoint_ops): Don't set dtors.
1242 * break-catch-sig.c (struct signal_catchpoint): Inherit from
1243 breakpoint.
1244 <~signal_catchpoint>: New.
1245 <base>: Remove.
1246 (signal_catchpoint_dtor): Change to ...
1247 (signal_catchpoint::~signal_catchpoint): ... this.
1248 (create_signal_catchpoint): Remove reference to base field.
1249 (initialize_signal_catchpoint_ops): Don't set dtor.
1250 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
1251 from breakpoint.
1252 <~syscall_catchpoint>: New.
1253 <base>: Remove.
1254 (dtor_catch_syscall): Change to ...
1255 (syscall_catchpoint::~syscall_catchpoint): ... this.
1256 (create_syscall_event_catchpoint): Remove reference to base
1257 field.
1258 (initialize_syscall_catchpoint_ops): Don't set dtor.
1259 * break-catch-throw.c (struct exception_catchpoint): Inherit
1260 from breakpoint.
1261 <~exception_catchpoint>: New.
1262 <base>: Remove.
1263 (dtor_exception_catchpoint): Change to ...
1264 (exception_catchpoint::~exception_catchpoint): ... this.
1265 (handle_gnu_v3_exceptions): Remove reference to base field.
1266 (initialize_throw_catchpoint_ops): Don't set dtor.
1267 * ctf.c (ctf_get_traceframe_address): Remove reference to base
1268 field.
1269 * remote.c (remote_get_tracepoint_status): Likewise.
1270 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
1271 * tracefile.c (tracefile_fetch_registers): Likewise.
1272 * tracepoint.c (actions_command): Likewise.
1273 (validate_actionline): Likewise.
1274 (tfind_1): Likewise.
1275 (get_traceframe_location): Likewise.
1276 (find_matching_tracepoint_location): Likewise.
1277 (parse_tracepoint_status): Likewise.
1278 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
1279
3b0871f4
SM
12802017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
1281
1282 * breakpoint.c (struct longjmp_breakpoint): New struct.
1283 (is_tracepoint_type): Change return type to bool.
1284 (is_longjmp_type): New function.
1285 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
1286 (set_raw_breakpoint_without_location): Use
1287 new_breakpoint_from_type.
1288 (set_raw_breakpoint): Likewise.
1289
a5e364af
SM
12902017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
1291
1292 * breakpoint.c (new_breakpoint_from_type): New function.
1293 (create_breakpoint_sal): Use new_breakpoint_from_type and
1294 unique_ptr.
1295 (create_breakpoint): Likewise.
1296
ae3b3f34
SM
12972017-05-31 Simon Marchi <simon.marchi@ericsson.com>
1298
1299 * memattr.c (mem_info_command): Rename to ...
1300 (info_mem_command): ... this.
1301 (mem_enable_command): Rename to ...
1302 (enable_mem_command): ... this.
1303 (mem_disable_command): Rename to ...
1304 (disable_mem_command): ... this.
1305 (mem_delete_command): Rename to ...
1306 (delete_mem_command): ... this.
1307 (_initialize_mem): Adjust function names.
1308
13ace077
MM
13092017-05-31 Markus Metzger <markus.t.metzger@intel.com>
1310
1311 * btrace.c (handle_pt_insn_events): New.
1312 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
1313 STATUS. Split into this and ...
1314 (handle_pt_insn_event_flags): ... this.
1315
c56ccc05
MM
13162017-05-31 Markus Metzger <markus.t.metzger@intel.com>
1317
1318 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
1319 and struct pt_insn.resynced.
1320 * configure: Regenerated.
1321 * config.in: Regenerated.
1322
08c3f6d2
TW
13232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1324
1325 * btrace.c (ftrace_find_call_by_number): New function.
1326 (ftrace_new_function): Store objects, not pointers.
1327 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
1328 ftrace_new_gap, ftrace_update_function,
1329 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
1330 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
1331 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
1332 btrace_ends_with_single_insn, btrace_call_get): Account for
1333 btrace_thread_info::functions now storing objects.
1334 * btrace.h (struct btrace_thread_info): Add constructor.
1335 (struct btrace_thread_info) <functions>: Make std::vector.
1336 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
1337 Initialize with default values.
1338 * record-btrace.c (record_btrace_frame_sniffer): Account for
1339 btrace_thread_info::functions now storing objects.
1340
8ffd39f2
TW
13412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1342
1343 * btrace.c: Remove typedef bfun_s.
1344 (ftrace_new_gap): Directly add gaps to the list of gaps.
1345 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
1346 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
1347 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
1348 instead of gdb VEC.
1349
4aeb0dfc
TW
13502017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1351
1352 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
1353 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
1354 with btrace_thread_info::next_segment and
1355 btrace_thread_info::prev_segment.
1356 * btrace.h: Remove struct btrace_func_link.
1357 (struct btrace_function): Replace pair of function segment pointers
1358 with pair of indices.
1359 * python/py-record-btrace.c (btpy_call_prev_sibling,
1360 btpy_call_next_sibling): Replace references to
1361 btrace_thread_info::segment with btrace_thread_info::next_segment and
1362 btrace_thread_info::prev_segment.
1363 * record-btrace.c (record_btrace_frame_this_id): Use
1364 btrace_find_call_by_number.
1365
eb8f2b9c
TW
13662017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1367
1368 * btrace.c (ftrace_new_function, ftrace_fixup_level,
1369 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
1370 btrace_insn_next, btrace_insn_prev): Remove references to
1371 btrace_thread_info::flow.
1372 * btrace.h (struct btrace_function): Remove FLOW.
1373
42bfe59e
TW
13742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1375
1376 * btrace.c (ftrace_find_call_by_number): New function.
1377 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
1378 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
1379 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
1380 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
1381 index.
1382 * btrace.h (struct btrace_function): Turn UP into an index.
1383 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
1384 as an index.
1385 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
1386 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
1387 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
1388
b54b03bd
TW
13892017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1390
1391 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
1392 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
1393 ftrace_update_function, ftrace_compute_global_level_offset,
1394 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
1395 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
1396 btrace_insn_end, btrace_is_empty): Remove references to
1397 btrace_thread_info::begin and btrace_thread_info::end.
1398 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
1399 (struct btrace_thread_info) <functions>: Adjust comment.
1400 * record-btrace.c (record_btrace_start_replaying): Remove reference to
1401 btrace_thread_info::begin.
1402
8286623c
TW
14032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1404
1405 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
1406 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
1407 ftrace_update_function): Remove arguments that implicitly were always
1408 BTINFO->END.
1409 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
1410 Don't pass BTINFO->END.
1411
a0f1b963
TW
14122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1413
1414 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
1415 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
1416 btrace_find_insn_by_number): Replace function segment pointer with
1417 index.
1418 (btrace_insn_cmp): Simplify.
1419 * btrace.h: (struct btrace_insn_iterator) Rename index to
1420 insn_index. Replace function segment pointer with index into function
1421 segment vector.
1422 * record-btrace.c (record_btrace_call_history): Replace function
1423 segment pointer use with index.
1424 (record_btrace_frame_sniffer): Retrieve function call segment through
1425 vector.
1426 (record_btrace_set_replay): Remove defunc't safety check.
1427
f158f208
TW
14282017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1429
1430 * btrace.c (btrace_ends_with_single_insn): New function.
1431 (btrace_call_get, btrace_call_number, btrace_call_begin,
1432 btrace_call_end, btrace_call_next, btrace_call_prev,
1433 btrace_find_call_by_number): Use index into call segment vector
1434 instead of pointer.
1435 (btrace_call_cmp): Simplify.
1436 * btrace.h (struct btrace_call_iterator): Replace function call segment
1437 pointer with index into vector.
1438 * record-btrace.c (record_btrace_call_history): Use index instead of
1439 pointer.
1440
521103fd
TW
14412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1442
1443 * btrace.c (btrace_insn_begin, btrace_insn_end,
1444 btrace_find_insn_by_number): Add btinfo to iterator.
1445 * btrace.h (struct btrace_insn_iterator): Add btinfo.
1446
17b89b34
TW
14472017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1448
1449 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
1450 and save pointers directly.
1451 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
1452 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
1453 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
1454 changed signature of functions.
1455 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
1456 (btrace_fetch): Remove code that adds btrace_function pointers to
1457 vector of btrace_functions.
1458 (btrace_clear): Simplify freeing vector of btrace_functions.
1459
2b51eddc
TW
14602017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
1461
1462 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
1463 Replace VEC_* with std::vector functions.
1464 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
1465 (struct btrace_thread_info)<functions>: Change type to std::vector.
1466
db6be0d5
SM
14672017-05-30 Simon Marchi <simon.marchi@ericsson.com>
1468
1469 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
1470 "Removed targets and native configurations" up. Merge duplicate
1471 "New commands" sub-sections. Add "New options" sub-sections.
1472
b057297a
AH
14732017-05-26 Alan Hayward <alan.hayward@arm.com>
1474
1475 * defs.h (copy_integer_to_size): New declaration.
1476 * findvar.c (copy_integer_to_size): New function.
1477 (do_cint_test): New selftest function.
1478 (copy_integer_to_size_test): Likewise.
1479 (_initialize_findvar): Likewise.
1480 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
1481 (mips_fbsd_collect_reg): Use raw_collect_integer.
1482 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
1483 (mips64_fill_gregset): Use raw_collect_integer
1484 (mips64_fill_fpregset): Use raw_supply_integer.
1485 * regcache.c (regcache::raw_supply_integer): New function.
1486 (regcache::raw_collect_integer): Likewise.
1487 * regcache.h: (regcache::raw_supply_integer): New declaration.
1488 (regcache::raw_collect_integer): Likewise.
1489
b77b02a5
YQ
14902017-05-24 Yao Qi <yao.qi@linaro.org>
1491
1492 * Makefile.in (SFILES): Add gdbarch-selftests.c.
1493 (COMMON_OBS): Add gdbarch-selftests.o.
1494 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
1495 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
1496 * gdbarch-selftests.c: New file.
1497 * regcache.h (regcache) <~regcache>: Mark it virtual if
1498 GDB_SELF_TEST.
1499 <raw_write>: Likewise.
1500
e521e87e
YQ
15012017-05-24 Yao Qi <yao.qi@linaro.org>
1502
1503 * regcache.c (current_regcache): Change it to
1504 regcache::current_regcache.
1505 (regcache_observer_target_changed): Update.
1506 (regcache_thread_ptid_changed): Make it a regcache static
1507 method.
1508 (regcache_thread_ptid_changed): Update.
1509 (class regcache_access): New.
1510 (current_regcache_test): Update.
1511 (_initialize_regcache): Update.
1512 * regcache.h: Include forward_list.
1513 (regcache): Declare regcache_thread_ptid_changed and declare
1514 registers_changed_ptid as friend.
1515
d8e07dda
YQ
15162017-05-24 Yao Qi <yao.qi@linaro.org>
1517
1518 * i387-tdep.c (i387_register_to_value): Use register_size
1519 instead of TYPE_LENGTH.
1520 * m68k-tdep.c (m68k_register_to_value): Likewise.
1521
8c8f9122
YQ
15222017-05-24 Yao Qi <yao.qi@linaro.org>
1523
1524 * i387-tdep.c (i387_convert_register_p): Return false if type
1525 code isn't TYPE_CODE_FLT.
1526
68fce50f
YQ
15272017-05-24 Yao Qi <yao.qi@linaro.org>
1528
1529 * alpha-tdep.c (alpha_convert_register_p): Return true if type
1530 length is 4.
1531 (alpha_register_to_value): Remove type length check.
1532 (alpha_value_to_register): Likewise.
1533
88954b49
YQ
15342017-05-24 Yao Qi <yao.qi@linaro.org>
1535
1536 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
1537 TYPE_CODE_FLT.
1538
e3ec9b69
YQ
15392017-05-24 Yao Qi <yao.qi@linaro.org>
1540
1541 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
1542 TYPE_CODE_FLT or not.
1543
cdd238da
YQ
15442017-05-24 Yao Qi <yao.qi@linaro.org>
1545
1546 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
1547 * avr-tdep.c (avr_gdbarch_init): Likewise.
1548 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1549 * cris-tdep.c (cris_gdbarch_init): Likewise.
1550 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1551 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1552 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1553 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
1554 * mep-tdep.c (mep_gdbarch_init): Likewise.
1555 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1556 * mips-tdep.c (mips_gdbarch_init): Likewise.
1557 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1558 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1559 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1560 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1561 * v850-tdep.c (v850_gdbarch_init): Likewise.
1562
7a3929c4
YQ
15632017-05-24 Yao Qi <yao.qi@linaro.org>
1564
1565 * selftest-arch.c (tests_with_arch): Call registers_changed
1566 and reinit_frame_cache.
1567 * selftest.c (run_self_tests): Likewise.
1568
f4985dba
YQ
15692017-05-24 Yao Qi <yao.qi@linaro.org>
1570
1571 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
1572 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
1573
ab20fa4a
YQ
15742017-05-24 Yao Qi <yao.qi@linaro.org>
1575
1576 * rl78-tdep.c (rl78_gdbarch_init): Don't call
1577 set_gdbarch_print_insn.
1578
f532ab94
YQ
15792017-05-24 Yao Qi <yao.qi@linaro.org>
1580
1581 * h8300-tdep.c (h8300_gdbarch_init): Don't call
1582 set_gdbarch_print_insn.
1583
39503f82
YQ
15842017-05-24 Yao Qi <yao.qi@linaro.org>
1585
1586 * alpha-tdep.c (alpha_gdbarch_init): Don't call
1587 set_gdbarch_print_insn.
1588 * arc-tdep.c (arc_gdbarch_init): Likewise.
1589 * arch-utils.c: include dis-asm.h.
1590 (default_print_insn): New function.
1591 * arch-utils.h (default_print_insn): Declare.
1592 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
1593 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1594 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
1595 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
1596 * frv-tdep.c (frv_gdbarch_init): Likewise.
1597 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1598 * gdbarch.sh (print_insn): Use default_print_insn.
1599 * gdbarch.c: Regenerated.
1600 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
1601 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
1602 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1603 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
1604 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1605 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
1606 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
1607 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
1608 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
1609 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1610 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1611 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1612 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1613 * mt-tdep.c (mt_gdbarch_init): Likewise.
1614 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1615 * nios2-tdep.c (nios2_print_insn): Remove.
1616 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
1617 * rx-tdep.c (rx_gdbarch_init): Likewise.
1618 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
1619 * score-tdep.c (score_print_insn): Remove.
1620 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
1621 * sh-tdep.c (sh_gdbarch_init): Likewise.
1622 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1623 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1624 * tic6x-tdep.c (tic6x_print_insn): Remove.
1625 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
1626 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
1627 * v850-tdep.c (v850_gdbarch_init): Likewise.
1628 * vax-tdep.c (vax_gdbarch_init): Likewise.
1629 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
1630 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
1631
f7241d4f
JB
16322017-05-23 John Baldwin <jhb@FreeBSD.org>
1633
1634 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
1635 (MIPS_FP0_REGNUM): Remove.
1636 (MIPS_FSR_REGNUM): Remove.
1637 (mips_fbsd_supply_fpregs): Use mips_regnum.
1638 (mips_fbsd_supply_gregs): Likewise.
1639 (mips_fbsd_collect_fpregs): Likewise.
1640 (mips_fbsd_collect_gregs): Likewise.
1641
d489d81d
JB
16422017-05-23 John Baldwin <jhb@FreeBSD.org>
1643
1644 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
1645 (getpfpregs_supplies): New function.
1646 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
1647 getfpregs_supplies.
1648 (mips_fbsd_store_inferior_registers): Likewise.
1649
e11b3cdc
PA
16502017-05-22 Pedro Alves <palves@redhat.com>
1651
1652 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
1653 maintainer.
1654
0f068fb5
AH
16552017-05-22 Alan Hayward <alan.hayward@arm.com>
1656
1657 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
1658 (store_register): Likewise.
1659 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1660 (get_decimal_float_return_value): Likewise.
1661 (do_ppc_sysv_return_value): Likewise.
1662 (ppc64_sysv_abi_push_integer): Likewise.
1663 (ppc64_sysv_abi_push_freg): Likewise.
1664 (ppc64_sysv_abi_return_value_base): Likewise.
1665 (ppc64_sysv_abi_return_value): Likewise.
1666 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1667 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1668 * rs6000-nat.c: Likewise.
1669 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
1670 (rs6000_value_to_register): Likewise.
1671 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
1672
e6cf65f2
TT
16732017-05-21 Tom Tromey <tom@tromey.com>
1674
1675 PR rust/21466:
1676 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
1677 arrays as "[T]", not "[T; ]".
1678
43cc5389
TT
16792017-05-19 Tom Tromey <tom@tromey.com>
1680
1681 PR rust/21484:
1682 * rust-lang.c (exp_descriptor_rust): New function.
1683 (rust_language_defn): Use it.
1684 * p-lang.c (pascal_language_defn): Update.
1685 * opencl-lang.c (opencl_language_defn): Update.
1686 * objc-lang.c (objc_language_defn): Update.
1687 * m2-lang.c (m2_language_defn): Update.
1688 * language.h (struct language_defn)
1689 <la_watch_location_expression>: New member.
1690 * language.c (unknown_language_defn, auto_language_defn)
1691 (local_language_defn): Update.
1692 * go-lang.c (go_language_defn): Update.
1693 * f-lang.c (f_language_defn): Update.
1694 * d-lang.c (d_language_defn): Update.
1695 * c-lang.h (c_watch_location_expression): Declare.
1696 * c-lang.c (c_watch_location_expression): New function.
1697 (c_language_defn, cplus_language_defn, asm_language_defn)
1698 (minimal_language_defn): Use it.
1699 * breakpoint.c (watch_command_1): Call
1700 la_watch_location_expression.
1701 * ada-lang.c (ada_language_defn): Update.
1702
7a6e7fcc
RO
17032017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1704
6e7e1744
RO
1705 PR tui/21482
1706 * gdb_curses.h (NOMACROS): Define.
1707 (NCURSES_NOMACROS): Define.
1708
17092017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1710
1711 PR tui/21482
7a6e7fcc
RO
1712 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
1713 arg to char *.
1714 * tui/tui-wingeneral.c (box_win): Likewise.
1715 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
1716 (tui_show_source_line): Likewise.
1717 (tui_show_exec_info_content): Likewise.
1718
1933fd8e
VM
17192017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
1720
1721 * sparc-tdep.c (sparc_structure_return_p)
1722 (sparc_arg_on_registers_p): New functions.
1723 (sparc32_store_arguments): Use them.
1724 * sparc64-tdep.c (sparc64_16_byte_align_p)
1725 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
1726 Handle TYPE_CODE_ARRAY.
1727
21873064
YQ
17282017-05-17 Yao Qi <yao.qi@linaro.org>
1729
1730 * cli/cli-decode.c (add_alias_cmd): New function.
1731 * command.h (add_alias_cmd): Declare.
1732 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
1733 instead call add_alias_cmd.
1734
2b351b19
PA
17352017-05-17 Pedro Alves <palves@redhat.com>
1736
1737 * Makefile.in (nat_extra_makefile_frag): Rename to ...
1738 (nat_makefile_frag): ... this. All references updated.
1739 * configure.ac: Likewise.
1740 * configure.nat: Likewise. Enhance comments.
1741 * configure: Regenerate.
1742
5f2ad7a3
RO
17432017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1744
1745 * procfs.c (procfs_create_inferior): Change prototype to match
1746 definition.
1747
adf3dde5
EZ
17482017-05-13 Eli Zaretskii <eliz@gnu.org>
1749
1750 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
1751 C++ compiler warning.
1752
6830f270
TT
17532017-05-12 Tom Tromey <tom@tromey.com>
1754
1755 PR rust/21483:
1756 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
1757 recurse, just call value_struct_elt directly.
1758
68f2f2e3
TT
17592017-05-12 Tom Tromey <tom@tromey.com>
1760
1761 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
1762 OP_RUST_ARRAY>: Fix.
1763
256afbc2
TT
17642017-05-12 Tom Tromey <tom@tromey.com>
1765
1766 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
1767
94bb8dfe
YQ
17682017-05-09 Yao Qi <yao.qi@linaro.org>
1769
1770 * regcache.c: Include <forward_list>.
1771 (struct regcache_list): Remove.
1772 (current_regcache): Update.
1773 (get_thread_arch_aspace_regcache): Update for std::forward_list.
1774 (regcache_thread_ptid_changed): Likewise.
1775 (registers_changed_ptid): Likewise.
1776 (current_regcache_size): Likewise.
1777
8248946c
YQ
17782017-05-09 Yao Qi <yao.qi@linaro.org>
1779
1780 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
1781 (current_regcache_size): New function.
1782 (current_regcache_test): New function.
1783 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
1784
313c5961
AH
17852017-05-08 Alan Hayward <alan.hayward@arm.com>
1786
1787 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
1788 (print_gp_register_row): Use get_frame_register_value.
1789
27bfc1d1
AH
17902017-05-08 Alan Hayward <alan.hayward@arm.com>
1791
1792 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
1793 (mips_supply_fpregset): Likewise.
1794 (mips64_supply_gregset): Likewise.
1795
146e6c5c
AH
17962017-05-08 Alan Hayward <alan.hayward@arm.com>
1797
1798 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
1799 regcache->raw_supply_zeroed.
1800
e50f25ec
SDJ
18012017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1802
1803 * configure.nat: Rearrange 'case' statements to match
1804 host before cpu.
1805
21ea5acd
SDJ
18062017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1807
1808 * Makefile.in: Remove "@host_makefile_frag@". Add variables
1809 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
1810 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
1811 "@nat_extra_makefile_frag@".
1812 (Makefile): Remove dependency on "@frags@".
1813 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
1814 (data-directory/Makefile): Likewise.
1815 * config/aarch64/linux.mh: Deleted; moved contents to
1816 "gdb/configure.nat".
1817 * config/alpha/alpha-linux.mh: Likewise.
1818 * config/alpha/nbsd.mh: Likewise.
1819 * config/arm/linux.mh: Likewise.
1820 * config/arm/nbsdelf.mh: Likewise.
1821 * config/i386/cygwin.mh: Likewise.
1822 * config/i386/cygwin64.mh: Likewise.
1823 * config/i386/darwin.mh: Likewise.
1824 * config/i386/fbsd.mh: Likewise.
1825 * config/i386/fbsd64.mh: Likewise.
1826 * config/i386/go32.mh: Likewise.
1827 * config/i386/i386gnu.mh: Likewise.
1828 * config/i386/i386sol2.mh: Likewise.
1829 * config/i386/linux.mh: Likewise.
1830 * config/i386/linux64.mh: Likewise.
1831 * config/i386/mingw.mh: Likewise.
1832 * config/i386/mingw64.mh: Likewise.
1833 * config/i386/nbsd64.mh: Likewise.
1834 * config/i386/nbsdelf.mh: Likewise.
1835 * config/i386/nto.mh: Likewise.
1836 * config/i386/obsd.mh: Likewise.
1837 * config/i386/obsd64.mh: Likewise.
1838 * config/i386/sol2-64.mh: Likewise.
1839 * config/ia64/linux.mh: Likewise.
1840 * config/m32r/linux.mh: Likewise.
1841 * config/m68k/linux.mh: Likewise.
1842 * config/m68k/nbsdelf.mh: Likewise.
1843 * config/m68k/obsd.mh: Likewise.
1844 * config/m88k/obsd.mh: Likewise.
1845 * config/mips/fbsd.mh: Likewise.
1846 * config/mips/linux.mh: Likewise.
1847 * config/mips/nbsd.mh: Likewise.
1848 * config/mips/obsd64.mh: Likewise.
1849 * config/pa/linux.mh: Likewise.
1850 * config/pa/nbsd.mh: Likewise.
1851 * config/pa/obsd.mh: Likewise.
1852 * config/powerpc/aix.mh: Likewise.
1853 * config/powerpc/fbsd.mh: Likewise.
1854 * config/powerpc/linux.mh: Likewise.
1855 * config/powerpc/nbsd.mh: Likewise.
1856 * config/powerpc/obsd.mh: Likewise.
1857 * config/powerpc/ppc64-linux.mh: Likewise.
1858 * config/powerpc/spu-linux.mh: Likewise.
1859 * config/s390/linux.mh: Likewise.
1860 * config/sh/nbsd.mh: Likewise.
1861 * config/sparc/fbsd.mh: Likewise.
1862 * config/sparc/linux.mh: Likewise.
1863 * config/sparc/linux64.mh: Likewise.
1864 * config/sparc/nbsd64.mh: Likewise.
1865 * config/sparc/nbsdelf.mh: Likewise.
1866 * config/sparc/obsd64.mh: Likewise.
1867 * config/sparc/sol2.mh: Likewise.
1868 * config/tilegx/linux.mh: Likewise.
1869 * config/vax/nbsdelf.mh: Likewise.
1870 * config/vax/obsd.mh: Likewise.
1871 * config/xtensa/linux.mh: Likewise.
1872 * config/i386/i386gnu.mn: New file, with excerpts from
1873 "config/i386/i386gnu.mh".
1874 * configure: Regenerate.
1875 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
1876 *.mh files under "gdb/config".
1877 * configure.nat: New file, with contents from the
1878 "gdb/config/*/*.mh" files.
1879
7ed1acaf
TW
18802017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
1881
1882 * btrace.c (btrace_clear): Free insn vector.
1883
e13cb306
PA
18842017-05-05 Pedro Alves <palves@redhat.com>
1885
1886 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
1887 * configure: Regenerate.
1888
5ed8105e
PA
18892017-05-04 Pedro Alves <palves@redhat.com>
1890
1891 * Makefile.in (SFILES): Add progspace-and-thread.c.
1892 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
1893 (COMMON_OBS): Add progspace-and-thread.o.
1894 * breakpoint.c: Include "progspace-and-thread.h".
1895 (update_inserted_breakpoint_locations)
1896 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
1897 Use scoped_restore_current_pspace_and_thread.
1898 (create_std_terminate_master_breakpoint): Use
1899 scoped_restore_current_program_space.
1900 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
1901 (print_breakpoint_location): Use
1902 scoped_restore_current_program_space.
1903 (bp_loc_is_permanent): Use
1904 scoped_restore_current_pspace_and_thread.
1905 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
1906 (download_tracepoint_locations): Use
1907 scoped_restore_current_pspace_and_thread.
1908 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
1909 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
1910 (enum step_over_calls_kind): Moved from inferior.h.
1911 (class scoped_restore_current_thread): New class.
1912 * gdbthread.h (make_cleanup_restore_current_thread): Delete
1913 declaration.
1914 (scoped_restore_current_thread): New class.
1915 * infcmd.c: Include "common/gdb_optional.h".
1916 (continue_1, proceed_after_attach): Use
1917 scoped_restore_current_thread.
1918 (notice_new_inferior): Use scoped_restore_current_thread.
1919 * inferior.c: Include "progspace-and-thread.h".
1920 (restore_inferior, save_current_inferior): Delete.
1921 (add_inferior_command, clone_inferior_command): Use
1922 scoped_restore_current_pspace_and_thread.
1923 * inferior.h (scoped_restore_current_inferior): New class.
1924 * infrun.c: Include "progspace-and-thread.h" and
1925 "common/gdb_optional.h".
1926 (follow_fork_inferior): Use
1927 scoped_restore_current_pspace_and_thread.
1928 (scoped_restore_exited_inferior): New class.
1929 (handle_vfork_child_exec_or_exit): Use
1930 scoped_restore_exited_inferior,
1931 scoped_restore_current_pspace_and_thread,
1932 scoped_restore_current_thread and scoped_restore.
1933 (fetch_inferior_event): Use scoped_restore_current_thread.
1934 * linespec.c (decode_line_full, decode_line_1): Use
1935 scoped_restore_current_program_space.
1936 * mi/mi-main.c: Include "progspace-and-thread.h".
1937 (exec_continue): Use scoped_restore_current_thread.
1938 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
1939 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
1940 * proc-service.c (ps_pglobal_lookup): Use
1941 scoped_restore_current_program_space.
1942 * progspace-and-thread.c: New file.
1943 * progspace-and-thread.h: New file.
1944 * progspace.c (release_program_space, clone_program_space): Use
1945 scoped_restore_current_program_space.
1946 (restore_program_space, save_current_program_space)
1947 (save_current_space_and_thread): Delete.
1948 (switch_to_program_space_and_thread): Moved to
1949 progspace-and-thread.c.
1950 * progspace.h (save_current_program_space)
1951 (save_current_space_and_thread): Delete declarations.
1952 (scoped_restore_current_program_space): New class.
1953 * remote.c (remote_btrace_maybe_reopen): Use
1954 scoped_restore_current_thread.
1955 * symtab.c: Include "progspace-and-thread.h".
1956 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
1957 * thread.c (print_thread_info_1): Use
1958 scoped_restore_current_thread.
1959 (struct current_thread_cleanup): Delete.
1960 (do_restore_current_thread_cleanup)
1961 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
1962 (scoped_restore_current_thread::~scoped_restore_current_thread):
1963 ... this new dtor.
1964 (make_cleanup_restore_current_thread): Rename/convert to ...
1965 (scoped_restore_current_thread::scoped_restore_current_thread):
1966 ... this new ctor.
1967 (thread_apply_all_command): Use scoped_restore_current_thread.
1968 (thread_apply_command): Use scoped_restore_current_thread.
1969 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
1970 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
1971
f6223dbb
PA
19722017-05-04 Pedro Alves <palves@redhat.com>
1973
1974 * thread.c (make_cleanup_restore_current_thread): Move
1975 find_thread_ptid call before the is_stopped call. Assert that the
1976 thread is found. Replace is_stopped call by checking the thread's
1977 state directly. Remove unnecessary NULL-thread check.
1978
3c3ae77e
PA
19792017-05-04 Pedro Alves <palves@redhat.com>
1980
1981 * corelow.c (thread_section_name): New class.
1982 (get_core_register_section, get_core_siginfo): Use it.
1983
45eba0ab
AA
19842017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1985
1986 * corelow.c (sniff_core_bfd): Remove extra semicolon.
1987 (get_core_register_section): Remove xfree of NULL pointer.
1988
f81fdd35
AH
19892017-05-03 Alan Hayward <alan.hayward@arm.com>
1990
1991 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
1992 * regcache.c (regcache::raw_supply_zeroed): New function.
1993 * regcache.h (regcache::raw_supply_zeroed): New declaration.
1994
35837774
SM
19952017-05-03 Simon Marchi <simon.marchi@ericsson.com>
1996
1997 * gdbarch.sh: Remove commented out definition of
1998 TARGET_CHAR_BIT.
1999 * gdbarch.h: Re-generate.
2000
c94fee56
SDJ
20012017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2002
2003 * configure: Regenerate.
2004
d17f7b36
SM
20052017-05-02 Simon Marchi <simon.marchi@ericsson.com>
2006
2007 * solib-target.c (solib_target_relocate_section_addresses):
2008 Remove num_section_bases, num_bases, segment_bases variables.
2009
b560ebd6
SM
20102017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2011
2012 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
2013
f2f46dfc
SM
20142017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2015
2016 * solib-target.c: Include <vector>
2017 (struct lm_info_target) <~lm_info_target>: Remove.
2018 <segment_bases, section_bases>: Change type to
2019 std::vector<CORE_ADDR>.
2020 (library_list_start_segment, library_list_start_section,
2021 library_list_end_library,
2022 solib_target_relocate_section_addresses): Adjust.
2023
a0ff9e1a
SM
20242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2025
2026 * gdbarch.sh (software_single_step): Change return type to
2027 std::vector<CORE_ADDR>.
2028 * gdbarch.c, gdbarch.h: Re-generate.
2029 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
2030 Adjust.
2031 (arm_deal_with_atomic_sequence_raw): Adjust.
2032 (thumb_get_next_pcs_raw): Adjust.
2033 (arm_get_next_pcs_raw): Adjust.
2034 (arm_get_next_pcs): Adjust.
2035 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
2036 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
2037 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
2038 (alpha_software_single_step): Adjust.
2039 * alpha-tdep.h (alpha_software_single_step): Adjust.
2040 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
2041 * arm-tdep.c (arm_software_single_step): Adjust.
2042 (arm_breakpoint_kind_from_current_state): Adjust.
2043 * arm-tdep.h (arm_software_single_step): Adjust.
2044 * breakpoint.c (insert_single_step_breakpoint): Adjust.
2045 * cris-tdep.c (cris_software_single_step): Adjust.
2046 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
2047 (micromips_deal_with_atomic_sequence): Adjust.
2048 (deal_with_atomic_sequence): Adjust.
2049 (mips_software_single_step): Adjust.
2050 * mips-tdep.h (mips_software_single_step): Adjust.
2051 * moxie-tdep.c (moxie_software_single_step): Adjust.
2052 * nios2-tdep.c (nios2_software_single_step): Adjust.
2053 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
2054 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
2055 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
2056 * s390-linux-tdep.c (s390_software_single_step): Adjust.
2057 * sparc-tdep.c (sparc_software_single_step): Adjust.
2058 * spu-tdep.c (spu_software_single_step): Adjust.
2059 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
2060
ea480a30
SM
20612017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2062
2063 * gdbarch.sh: Use semi-colon as field separator instead of colon.
2064 * gdbarch.h: Re-generate.
2065
d050f7d7
TW
20662017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2067
2068 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
2069 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
2070 * python/py-instruction.c, python/py-instruction.h: New file.
2071 * python/py-record.c: Add py-instruction.h include.
2072 (gdbpy_initialize_record): Make gdb.Instruction a super class of
2073 gdb.RecordInstruction.
2074 * python/python-internal.h: Add gdbpy_initialize_instruction
2075 declaration.
2076 * python/python.c (do_start_initialization): Add
2077 gdbpy_initialize_instruction.
2078
14f819c8
TW
20792017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2080
2081 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
2082 Remove.
2083 (btrace_func_from_recpy_func): New function.
2084 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
2085 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
2086 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
2087 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
2088 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
2089 Also, use new helper functions.
2090 (btpy_list_item): Use new helper functions.
2091 (recpy_bt_function_call_history): Use new type name.
2092 (btpy_call_getset): Remove.
2093 (gdbpy_initialize_btrace): Remove code to initialize
2094 gdb.BtraceFunctionCall.
2095 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
2096 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
2097 recpy_bt_func_prev, recpy_bt_func_next): New export.
2098 * python/py-record.c (recpy_func_type): New static object.
2099 (recpy_func_new, recpy_func_level, recpy_func_symbol,
2100 recpy_func_instructions, recpy_func_up, recpy_func_prev,
2101 recpy_func_next): New function.
2102 (recpy_element_hash, recpy_element_richcompare): Updated comment.
2103 (recpy_func_getset): New static object.
2104 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
2105 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
2106
0ed5da75
TW
21072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2108
2109 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
2110 (btpy_object, btpy_insn_type, btpy_new): Remove.
2111 (btpy_list_object): Use gdb.RecordInstruction type instead of
2112 gdb.BtraceInstruction type.
2113 (btrace_insn_from_recpy_insn): New function.
2114 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
2115 btpy_new.
2116 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
2117 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
2118 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
2119 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
2120 instead of btpy_object.
2121 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2122 btpy_insn_data, btpy_insn_decode): Rename to ...
2123 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
2124 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
2125 recpy_bt_insn_decode): This. Also, use new helper functions.
2126 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
2127 recpy_insn_type.
2128 (btpy_insn_getset): Remove.
2129 (gdbpy_initialize_btrace): Remove code to initialize
2130 gdb.BtraceInstruction. Use recpy_element_object.
2131 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
2132 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
2133 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
2134 * python/py-record.c (recpy_insn_type): New static object.
2135 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
2136 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
2137 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
2138 New function.
2139 (recpy_insn_getset): New static object.
2140 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
2141 * python/py-record.h (recpy_element_object): New typedef.
2142 (recpy_insn_type, recpy_insn_new): New export.
2143
913aeadd
TW
21442017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2145
2146 * py-record-btrace.c (btpy_insn_new): Removed.
2147 (btpy_insn_or_gap_new): New function.
2148 (btpy_insn_error): Removed.
2149 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2150 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
2151 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
2152 btpy_insn_or_gap_new instead of btpy_insn_new.
2153 (btpy_insn_getset): Remove btpy_insn_error.
2154 * py-record.c (recpy_gap_type): New static object.
2155 (recpy_gap_object): New typedef.
2156 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
2157 recpy_gap_reason_string): New function.
2158 (recpy_gap_getset): New static object.
2159 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
2160 * py-record.h (recpy_gap_new): New export.
2161
a3be24ad
TW
21622017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2163
2164 * python/py-record.c (recpy_ptid): Remove.
2165 (recpy_record_getset): Remove recpy_ptid.
2166
ae20e79a
TW
21672017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2168
2169 * btrace.c (btrace_fetch): Set inferior_ptid.
2170 * python/py-record-btrace.c: Add "py-record.h" include.
2171 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
2172 recpy_bt_end, recpy_bt_instruction_history,
2173 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
2174 in gdb.Record object instead of current ptid.
2175 * python/py-record.c: Include new "py-record.h" file.
2176 (recpy_record_object): Moved to py-record.h.
2177 * python/py-record.h: New file.
2178
8d0050ea
TW
21792017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
2180
2181 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
2182 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
2183 indentation.
2184
3f380b50
JB
21852017-05-01 Joel Brobecker <brobecker@adacore.com>
2186
2187 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
2188 the past maintainers section.
2189
07495424
YQ
21902017-04-28 Yao Qi <yao.qi@linaro.org>
2191
2192 * infcmd.c (get_return_value): Use regcache ctor, and remove
2193 cleanup.
2194
deb1fa3e
YQ
21952017-04-28 Yao Qi <yao.qi@linaro.org>
2196 Pedro Alves <palves@redhat.com>
2197
2198 * regcache.c (regcache::regcache): New tag dispatch ctor.
2199 (do_cooked_read): Moved above.
2200 (regcache_dup): Use the tag dispatch ctor..
2201 * regcache.h (regcache): Declare ctor, delete copy ctor and
2202 assignment operator, remove friend regcache_dup.
2203
b421c83c
YQ
22042017-04-28 Yao Qi <yao.qi@linaro.org>
2205
2206 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
2207 call method save instead of regcache_cpy.
2208 * regcache.h (struct regcache): Make regcache_dup a friend.
2209
ef79d9a3
YQ
22102017-04-28 Yao Qi <yao.qi@linaro.org>
2211
2212 * regcache.c (struct regcache): Move to regcache.h
2213 (regcache::arch): New method.
2214 (regcache_get_ptid): Update.
2215 (get_regcache_arch): Call arch method.
2216 (get_regcache_aspace): Call method aspace.
2217 (register_buffer): Change it to method.
2218 (regcache_save): Change it to regcache::save.
2219 (regcache_restore): Likewise.
2220 (regcache_cpy_no_passthrough): Remove the declaration.
2221 (regcache_cpy): Call methods restore and cpy_no_passthrough.
2222 (regcache_cpy_no_passthrough): Change it to method
2223 cpy_no_passthrough.
2224 (regcache_register_status): Change it to method
2225 get_register_status.
2226 (regcache_invalidate): Change it to method invalidate.
2227 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
2228 (regcache_raw_update): Change it to method raw_update.
2229 (regcache_raw_read): Likewise.
2230 (regcache_raw_read_signed): Likewise.
2231 (regcache_raw_read_unsigned): Likewise.
2232 (regcache_raw_write_signed): Likewise.
2233 (regcache_raw_write_unsigned): Likewise.
2234 (regcache_cooked_read): Likewise.
2235 (regcache_cooked_read_value): Likewise.
2236 (regcache_cooked_read_signed): Likewise.
2237 (regcache_cooked_read_unsigned): Likewise.
2238 (regcache_cooked_write_signed): Likewise.
2239 (regcache_cooked_write_unsigned): Likewise.
2240 (regcache_raw_set_cached_value): Likewise.
2241 (regcache_raw_write): Likewise.
2242 (regcache_cooked_write): Likewise.
2243 (regcache_xfer_part): Likewise.
2244 (regcache_raw_read_part): Likewise.
2245 (regcache_raw_write_part): Likewise.
2246 (regcache_cooked_read_part): Likewise.
2247 (regcache_cooked_write_part): Likewise.
2248 (regcache_raw_supply): Likewise.
2249 (regcache_raw_collect): Likewise.
2250 (regcache_transfer_regset): Likewise.
2251 (regcache_supply_regset): Likewise.
2252 (regcache_collect_regset): Likewise.
2253 (regcache_debug_print_register): Likewise.
2254 (enum regcache_dump_what): Move it to regcache.h.
2255 (regcache_dump): Change it to method dump.
2256 * regcache.h (enum regcache_dump_what): New.
2257 (class regcache): New.
2258 * target.c (target_fetch_registers): Call method
2259 debug_print_register.
2260 (target_store_registers): Likewise.
2261
f8fdb78e
SM
22622017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2263
2264 * windows-nat.c (struct lm_info_windows): Initialize field.
2265 (windows_make_so): Allocate lm_info_windows with new.
2266 (windows_free_so): Free lm_info_windows with delete.
2267
9ccbfd7b
SM
22682017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2269
2270 * solib-darwin.c (struct lm_info_darwin): Initialize field.
2271 (darwin_current_sos): Allocate lm_info_darwin with new, remove
2272 cleanup.
2273 (darwin_free_so): Free lm_info_darwin with delete.
2274
76e75227
SM
22752017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2276
2277 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
2278 <l_addr_p>: Change type to bool.
2279 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
2280 (svr4_free_so): Free lm_info_svr4 with delete.
2281 (svr4_copy_library_list): Replace memcpy with call to copy
2282 constructor.
2283 (library_list_start_library, svr4_default_sos): Allocate
2284 lm_info_svr4 with new.
2285
51046d9e
SM
22862017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2287
2288 * solib-target.c (struct lm_info_target): Add destructor,
2289 initialize fields.
2290 <name>: Change type to std::string.
2291 (library_list_start_library): Allocate lm_info_target with new.
2292 (solib_target_free_library_list): Free lm_info_target with
2293 delete.
2294 (solib_target_current_sos): Adapt to std::string.
2295 (solib_target_free_so): Free lm_info_target with delete.
2296
4023ae76
SM
22972017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2298
2299 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
2300 fields.
2301 (frv_current_sos): Allocate lm_info_frv with new.
2302 (frv_relocate_main_executable): Free lm_info_frv with delete,
2303 allocate with new.
2304 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
2305
af43057b
SM
23062017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2307
2308 * solib-frv.c (struct lm_info_frv): Fix indentation.
2309
b0911207
SM
23102017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2311
2312 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
2313 map field.
2314 (dsbt_current_sos): Allocate lm_info_dsbt with new.
2315 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
2316 and allocate with new.
2317 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
2318
6c401f72
SM
23192017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2320
2321 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
2322 <filename, member_name>: Change type to std::string.
2323 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
2324 (library_list_start_library): Allocate lm_info_aix with new.
2325 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
2326 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
2327 with copy constructor.
2328
d0e449a1
SM
23292017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2330
2331 * solist.h (struct lm_info): Remove.
2332 (struct lm_info_base): New class.
2333 (struct so_list) <lm_info>: Change type to lm_info_base *.
2334 * nto-tdep.c (struct lm_info): Remove.
2335 (lm_addr): Adjust.
2336 * solib-aix.c (struct lm_info): Rename to ...
2337 (struct lm_info_aix): ... this. Extend lm_info_base.
2338 (lm_info_p): Rename to ...
2339 (lm_info_aix_p): ... this, and adjust.
2340 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
2341 solib_aix_parse_libraries, library_list_start_library,
2342 solib_aix_free_library_list, solib_aix_parse_libraries,
2343 solib_aix_get_library_list,
2344 solib_aix_relocate_section_addresses, solib_aix_free_so,
2345 solib_aix_get_section_offsets,
2346 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
2347 Adjust.
2348 (struct solib_aix_inferior_data) <library_list>: Adjust.
2349 * solib-darwin.c (struct lm_info): Rename to ...
2350 (struct lm_info_darwin): ... this. Extend lm_info_base.
2351 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
2352 * solib-dsbt.c (struct lm_info): Rename to ...
2353 (struct lm_info_dsbt): ... this. Extend lm_info_base.
2354 (struct dsbt_info) <main_executable_lm_info): Adjust.
2355 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
2356 dsbt_relocate_section_addresses): Adjust.
2357 * solib-frv.c (struct lm_info): Rename to ...
2358 (struct lm_info_frv): ... this. Extend lm_info_base.
2359 (main_executable_lm_info): Adjust.
2360 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
2361 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
2362 find_canonical_descriptor_in_load_object,
2363 frv_fdpic_find_canonical_descriptor): Adjust.
2364 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
2365 to lm_info_svr4.
2366 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
2367 svr4_clear_so, svr4_copy_library_list,
2368 library_list_start_library, svr4_default_sos, svr4_read_so_list,
2369 svr4_current_sos, svr4_fetch_objfile_link_map,
2370 solist_update_incremental): Adjust.
2371 * solib-svr4.h (struct lm_info_svr4): Move here from
2372 solib-svr4.c.
2373 * solib-target.c (struct lm_info): Rename to ...
2374 (struct lm_info_target): ... this. Extend lm_info_base.
2375 (lm_info_p): Rename to ...
2376 (lm_info_target_p): ... this.
2377 (solib_target_parse_libraries, library_list_start_segment,
2378 library_list_start_section, library_list_start_library,
2379 library_list_end_library, solib_target_free_library_list,
2380 solib_target_current_sos, solib_target_free_so,
2381 solib_target_relocate_section_addresses): Adjust.
2382 * windows-nat.c (struct lm_info): Rename to ...
2383 (struct lm_info_windows): ... this. Extend lm_info_base.
2384 (windows_make_so, handle_load_dll, handle_unload_dll,
2385 windows_xfer_shared_libraries): Adjust.
2386
434a4023
SM
23872017-04-28 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * solib-darwin.c (struct darwin_so_list): Remove.
2390 (darwin_current_sos): Allocate an so_list object instead of a
2391 darwin_so_list, separately allocate an lm_info object.
2392 (darwin_free_so): Free lm_info.
2393
428544e8
JB
23942017-04-28 John Baldwin <jhb@FreeBSD.org>
2395
2396 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
2397 with fprintf_filtered.
2398
4621115f
YQ
23992017-04-28 Yao Qi <yao.qi@linaro.org>
2400
2401 * regcache.c (regcache::regcache): New function.
2402 (regcache::~regcache): New function.
2403 (regcache_xmalloc_1): Remove.
2404 (regcache_xmalloc): Call new regcache.
2405 (regcache_xfree): Call delete regcache.
2406 (get_thread_arch_aspace_regcache): Call new regcache.
2407
339053c2
YQ
24082017-04-28 Yao Qi <yao.qi@linaro.org>
2409
2410 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
2411 lwp instead of ptid_get_lwp.
2412
7974a605
YQ
24132017-04-28 Yao Qi <yao.qi@linaro.org>
2414
2415 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
2416 lwp_info instead of getting from inferior_ptid.
2417
e15c3eb4
KS
24182017-04-27 Keith Seitz <keiths@redhat.com>
2419
2420 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
2421 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
2422 (CV_CONVERSION_BADNESS): Define.
2423 (rank_one_type): Remove overly restrictive rvalue reference
2424 rank checks.
2425 Add cv-qualifier checks and subranks for type equality.
2426 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
2427 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
2428 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
2429
72bc1d24
SM
24302017-04-27 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
2433 count when creating the object.
2434
55bcecda
UW
24352017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2436 Ulrich Weigand <uweigand@de.ibm.com>
2437
2438 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
2439 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
2440 is used in AIX.
2441 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
2442 (process_xcoff_symbol): Likewise.
2443 (scan_xcoff_symtab): Likewise.
2444
5c99fcf8
AH
24452017-04-26 Alan Hayward <alan.hayward@arm.com>
2446
2447 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
2448 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
2449 (ia64_access_reg): Use get_frame_register_unsigned.
2450 (ia64_access_rse_reg): Likewise.
2451 (ia64_libunwind_frame_prev_register): Likewise.
2452
b41c5a85
JW
24532017-04-26 Jiong Wang <jiong.wang@arm.com>
2454
2455 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
2456 * gdbarch.c: Regenerated.
2457 * gdbarch.h: Regenerated.
2458 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
2459 visibility external.
2460 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
2461 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
2462 (enum cfa_how_kind): Move to ...
2463 (struct dwarf2_frame_state_reg_info): Likewise.
2464 (struct dwarf2_frame_state): Likewise.
2465 * dwarf2-frame.h: ... here.
2466 (dwarf2_frame_state_alloc_regs): New declaration.
2467 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
2468 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
2469
c185f580
AH
24702017-04-26 Alan Hayward <alan.hayward@arm.com>
2471
2472 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
2473 regcache_raw_read_unsigned.
2474 (xtensa_pseudo_register_write): Likewise.
2475
19c45594
AH
24762017-04-26 Alan Hayward <alan.hayward@arm.com>
2477
2478 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
2479 (nds32_pseudo_register_write): Likewise.
2480
4658f12e
YQ
24812017-04-25 Yao Qi <yao.qi@linaro.org>
2482
2483 * regcache.c (struct regcache) <readonly_p>: Change its type
2484 to bool.
2485 (regcache_xmalloc_1): Update parameter type and callers update.
2486
d581dda8
YQ
24872017-04-25 Yao Qi <yao.qi@linaro.org>
2488
2489 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
2490 set_gdbarch_wchar_bit.
2491 * arm-tdep.c (arm_gdbarch_init): Likewise.
2492
debed3db
PA
24932017-04-25 Pedro Alves <palves@redhat.com>
2494
2495 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
2496 (BothAreRelocatable, memcopy, memmove): Don't define.
2497 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
2498 macros.
2499
b0b92aeb
PA
25002017-04-25 Pedro Alves <palves@redhat.com>
2501
2502 * common/common-defs.h: Include "common/poison.h".
2503 * common/function-view.h: (Not, Or, Requires): Move to traits.h
2504 and adjust.
2505 * common/poison.h: New file.
2506 * common/traits.h: Include <type_traits>.
2507 (Not, Or, Requires): New, moved from common/function-view.h.
2508
16c4d54a
PA
25092017-04-25 Pedro Alves <palves@redhat.com>
2510
2511 * breakpoint.h (struct breakpoint): In-class initialize all
2512 fields. Make boolean fields "bool".
2513 * breakpoint.c (init_raw_breakpoint_without_location): Remove
2514 memset call and initializations no longer necessary.
2515
b5c36682
PA
25162017-04-25 Pedro Alves <palves@redhat.com>
2517
2518 * btrace.c (pt_btrace_insn_flags): Change parameter type to
2519 reference.
2520 (pt_btrace_insn): New function.
2521 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
2522
5625a286
PA
25232017-04-25 Pedro Alves <palves@redhat.com>
2524
2525 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
2526 "base" field and inherit from "bp_location" instead. Add
2527 non-default ctor.
2528 (allocate_location_exception): Use new non-default ctor.
2529 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
2530 (init_bp_location): Convert to ...
2531 (bp_location::bp_location): ... this new ctor, and remove memset
2532 call.
2533 (base_breakpoint_allocate_location): Use the new non-default ctor.
2534 * breakpoint.h (bp_location): Now a class. Declare default and
2535 non-default ctors. In-class initialize all members.
2536 (init_bp_location): Remove declaration.
2537
23bcc18f
PA
25382017-04-25 Pedro Alves <palves@redhat.com>
2539
2540 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
2541 assignment operator.
2542
e1ba3053
YQ
25432017-04-24 Yao Qi <yao.qi@linaro.org>
2544
2545 * doublest.c (convert_doublest_to_floatformat): Call
2546 floatformat_totalsize_bytes.
2547
10f489e5
TT
25482017-04-22 Tom Tromey <tom@tromey.com>
2549
2550 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2551 ui_out_emit_list.
2552 * stack.c (print_frame): Use ui_out_emit_list.
2553 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2554 ui_out_emit_list.
2555 * mi/mi-main.c (print_one_inferior)
2556 (mi_cmd_data_list_register_names)
2557 (mi_cmd_data_list_register_values, mi_cmd_list_features)
2558 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
2559 ui_out_emit_list.
2560 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
2561 (mi_output_solib_attribs): Use ui_out_emit_list,
2562 ui_out_emit_tuple.
2563 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
2564 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
2565 (mi_cmd_stack_list_args, list_args_or_locals): Use
2566 ui_out_emit_list.
2567 * disasm.c (do_assembly_only): Use ui_out_emit_list.
2568 * breakpoint.c (print_solib_event, output_thread_groups): Use
2569 ui_out_emit_list.
2570
0092b74d
TT
25712017-04-22 Tom Tromey <tom@tromey.com>
2572
2573 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
2574 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
2575 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
2576
a14a62dd
TT
25772017-04-22 Tom Tromey <tom@tromey.com>
2578
2579 * tracepoint.c (tvariables_info_1)
2580 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
2581
46b9c129
TT
25822017-04-22 Tom Tromey <tom@tromey.com>
2583
2584 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
2585 annotate_arg_emitter.
2586 * breakpoint.c (print_mention_watchpoint)
2587 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
2588 * annotate.h (struct annotate_arg_emitter): New.
2589
2e783024
TT
25902017-04-22 Tom Tromey <tom@tromey.com>
2591
2592 * record-btrace.c (record_btrace_insn_history)
2593 (record_btrace_insn_history_range, record_btrace_call_history)
2594 (record_btrace_call_history_range): Use ui_out_emit_tuple.
2595 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
2596 ui_out_emit_tuple.
2597 * stack.c (print_frame_info): Use ui_out_emit_tuple.
2598 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
2599 * skip.c (skip_info): Use ui_out_emit_tuple.
2600 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
2601 * progspace.c (print_program_space): Use ui_out_emit_tuple.
2602 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
2603 * osdata.c (info_osdata): Use ui_out_emit_tuple.
2604 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2605 ui_out_emit_tuple.
2606 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
2607 (output_register, mi_cmd_data_read_memory)
2608 (mi_cmd_data_read_memory_bytes, mi_load_progress)
2609 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
2610 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
2611 Use ui_out_emit_tuple.
2612 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
2613 ui_out_emit_tuple.
2614 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2615 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
2616 * linux-thread-db.c (info_auto_load_libthread_db): Use
2617 ui_out_emit_tuple.
2618 * inferior.c (print_inferior): Use ui_out_emit_tuple.
2619 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
2620 * disasm.c (do_mixed_source_and_assembly_deprecated)
2621 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
2622 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
2623 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
2624 * breakpoint.c (print_one_breakpoint_location)
2625 (print_one_breakpoint): Use ui_out_emit_tuple.
2626 * auto-load.c (print_script, info_auto_load_cmd): Use
2627 ui_out_emit_tuple.
2628 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
2629
9be21bb4
SM
26302017-04-21 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * thread.c (print_thread_info_1): Remove dead code.
2633
0d4c07af
JK
26342017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2635
2636 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
2637 GDB_SELF_TEST.
2638 * arm-tdep.c (selftests::arm_record_test): Likewise.
2639
4daf993d
YQ
26402017-04-21 Yao Qi <yao.qi@linaro.org>
2641
2642 * regcache.c (regcache_restore): Remove argument 2. Replace
2643 argument 3 with regcache. Get register status from
2644 src->register_status and get register contents from
2645 register_buffer (src, regnum).
2646 (regcache_cpy): Update.
2647
a6c21d4a
PA
26482017-04-19 Pedro Alves <palves@redhat.com>
2649
2650 * gdbthread.h (thread): Add missing closing parenthesis in
2651 comment.
2652
3a3fd0fd
PA
26532017-04-19 Pedro Alves <palves@redhat.com>
2654
2655 * common/refcounted-object.h: New file.
2656 * gdbthread.h: Include "common/refcounted-object.h".
2657 (thread_info): Inherit from refcounted_object and add comments.
2658 (thread_info::incref, thread_info::decref)
2659 (thread_info::m_refcount): Delete.
2660 (thread_info::deletable): Use the refcounted_object::refcount()
2661 method.
2662 * inferior.c (current_inferior_): Add comment.
2663 (set_current_inferior): Increment/decrement refcounts.
2664 (prune_inferiors, remove_inferior_command): Skip inferiors marked
2665 not-deletable instead of comparing with the current inferior.
2666 (initialize_inferiors): Increment the initial inferior's refcount.
2667 * inferior.h (struct inferior): Forward declare.
2668 Include "common/refcounted-object.h".
2669 (current_inferior, set_current_inferior): Move declaration to
2670 before struct inferior's definition, and fix comment.
2671 (inferior): Inherit from refcounted_object. Add comments.
2672 * thread.c (switch_to_thread_no_regs): Reference the thread's
2673 inferior pointer directly instead of doing a ptid lookup.
2674 (switch_to_no_thread): New function.
2675 (switch_to_thread(thread_info *)): New function, factored out
2676 from ...
2677 (switch_to_thread(ptid_t)): ... this.
2678 (restore_current_thread): Delete.
2679 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
2680 fields, and add 'inf' field.
2681 (do_restore_current_thread_cleanup): Check whether old->inf is
2682 alive instead of looking up an inferior by ptid. Use
2683 switch_to_thread and switch_to_no_thread.
2684 (restore_current_thread_cleanup_dtor): Use old->inf directly
2685 instead of lookup up an inferior by id. Decref the inferior.
2686 Don't restore 'removable'.
2687 (make_cleanup_restore_current_thread): Same the inferior pointer
2688 in old, instead of the inferior number. Incref the inferior.
2689 Don't save/clear 'removable'.
2690
9bcb1f16
PA
26912017-04-19 Pedro Alves <palves@redhat.com>
2692
2693 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2694 unittests/scoped_restore-selftests.c.
2695 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
2696 * common/scoped_restore.h (scoped_restore_base): Make "class".
2697 (scoped_restore_base::release): New public method.
2698 (scoped_restore_base::scoped_restore_base): New protected ctor.
2699 (scoped_restore_base::m_saved_var): New protected field.
2700 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
2701 scoped_restore_base base class instead of m_saved_var directly.
2702 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
2703 (scoped_restore_tmpl::scoped_restore_tmpl(const
2704 scoped_restore_tmpl<T>&)): Likewise.
2705 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
2706 method.
2707 (scoped_restore_tmpl::saved_var): New method.
2708 (scoped_restore_tmpl::m_saved_var): Delete.
2709 * inferior.h (inferior::detaching): Now a bool.
2710 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
2711 cleanup.
2712 * unittests/scoped_restore-selftests.c: New file.
2713
26fcd539
PA
27142017-04-19 Pedro Alves <palves@redhat.com>
2715
2716 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
2717 Re-sort in alphabetic order.
2718
fdd243b0
PA
27192017-04-18 Pedro Alves <palves@redhat.com>
2720
2721 * xml-support.c (obstack_xml_printf): Delete.
2722 * xml-support.h (obstack_xml_printf): Delete.
2723
4895cde2
PA
27242017-04-18 Pedro Alves <palves@redhat.com>
2725
2726 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
2727 vdebug, verror, body_text, start_element, end_element, name,
2728 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
2729 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
2730 is_xinclude>: Make private and add m_ prefix.
2731 (gdb_xml_parser::body_text): New method, based on ...
2732 (gdb_xml_body_text): ... this. Adjust.
2733 (gdb_xml_parser::vdebug): New method, based on ...
2734 (gdb_xml_debug): ... this. Adjust.
2735 (gdb_xml_parser::verror): New method, based on ...
2736 (gdb_xml_error): ... this. Adjust.
2737 (gdb_xml_parser::start_element): New method, based on ...
2738 (gdb_xml_start_element): ... this. Adjust.
2739 (gdb_xml_start_element_wrapper): Defer to
2740 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
2741 (gdb_xml_parser::end_element): New method, based on ...
2742 (gdb_xml_end_element_wrapper): ... this. Adjust.
2743 (gdb_xml_parser::~gdb_xml_parser): Adjust.
2744 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
2745 (gdb_xml_parser::use_dtd): New method, based on ...
2746 (gdb_xml_use_dtd): ... this. Adjust.
2747 (gdb_xml_parser::parse): New method, based on ...
2748 (gdb_xml_parse): ... this. Adjust.
2749 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
2750 (xinclude_start_include): Adjust to call the parser's name method.
2751 (xml_xinclude_default, xml_xinclude_start_doctype)
2752 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
2753 method.
2754 (xml_process_xincludes): Adjust to call parser methods.
2755 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
2756 declarations.
2757
bd8a901f
PA
27582017-04-18 Pedro Alves <palves@redhat.com>
2759
2760 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
2761 gdb::optional<std::string>.
2762 * xml-support.c: Include <string>.
2763 (scope_level::scope_level(scope_level &&))
2764 (scope_level::~scope_level): Delete.
2765 (scope_level::body): Now a std::string.
2766 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
2767 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
2768 parameter.
2769 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
2770 (xinclude_parsing_data::output): Now a std::string reference.
2771 (xinclude_start_include): Adjust.
2772 (xml_xinclude_default): Adjust.
2773 (xml_process_xincludes): Add 'output' parameter, and return bool.
2774 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
2775 and return bool.
2776 * xml-tdesc.c: Include <unordered_map> and <string>.
2777 (tdesc_xml_cache): Delete.
2778 (tdesc_xml_cache_s): Delete.
2779 (xml_cache): Now an std::unordered_map.
2780 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
2781 (target_fetch_description_xml): Change return type to
2782 gdb::optional<std::string>, and adjust.
2783 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
2784 (target_fetch_description_xml): Change return type to
2785 gdb::optional<std::string>.
2786
d35d1958
PA
27872017-04-18 Pedro Alves <palves@redhat.com>
2788
2789 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2790 unittests/optional-selftests.c.
2791 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
2792 * unittests/optional-selftests.c: New file.
2793 * unittests/optional/assignment/1.cc: New file.
2794 * unittests/optional/assignment/2.cc: New file.
2795 * unittests/optional/assignment/3.cc: New file.
2796 * unittests/optional/assignment/4.cc: New file.
2797 * unittests/optional/assignment/5.cc: New file.
2798 * unittests/optional/assignment/6.cc: New file.
2799 * unittests/optional/assignment/7.cc: New file.
2800 * unittests/optional/cons/copy.cc: New file.
2801 * unittests/optional/cons/default.cc: New file.
2802 * unittests/optional/cons/move.cc: New file.
2803 * unittests/optional/cons/value.cc: New file.
2804 * unittests/optional/in_place.cc: New file.
2805 * unittests/optional/observers/1.cc: New file.
2806 * unittests/optional/observers/2.cc: New file.
2807
22796e97
PA
28082017-04-18 Pedro Alves <palves@redhat.com>
2809
2810 * common/gdb_optional.h: Include common/traits.h.
2811 (in_place_t): New type.
2812 (in_place): New constexpr variable.
2813 (optional::optional): Remove member initialization of
2814 m_instantiated.
2815 (optional::optional(in_place_t...)): New constructor.
2816 (optional::~optional): Use reset.
2817 (optional::optional(const optional&)): New.
2818 (optional::optional(const optional&&)): New.
2819 (optional::optional(T &)): New.
2820 (optional::optional(T &&)): New.
2821 (operator::operator=(const optional &)): New.
2822 (operator::operator=(optional &&)): New.
2823 (operator::operator= (const T &))
2824 (operator::operator= (T &&))
2825 (operator::emplace (Args &&... args)): Return a T&. Use reset.
2826 (operator::reset): New.
2827 (operator::m_instantiated):: Add in-class initializer.
2828 * common/traits.h: Include <type_traits>.
2829 (struct And): New types.
2830
a7fc9b61
PA
28312017-04-18 Pedro Alves <palves@redhat.com>
2832
2833 * xml-support.c: Include <vector>.
2834 (scope_level::scope_level(const gdb_xml_element *))
2835 (scope_level::scope_level(scope_level&&)): New.
2836 (scope_level::~scope_level): New.
2837 (scope_level_s): Delete.
2838 (gdb_xml_parser::scopes): Now a std::vector.
2839 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
2840 Use std::vector.
2841 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
2842 scope cleanup code.
2843 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
2844 of the scopes member. Use std::vector::emplace_back.
2845
010151c9
PA
28462017-04-18 Pedro Alves <palves@redhat.com>
2847
2848 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
2849 a bool.
2850 (gdb_xml_end_element): Change type of first parameter.
2851 (gdb_xml_cleanup): Rename to ...
2852 (gdb_xml_parser::~gdb_xml_parser): ... this.
2853 (gdb_xml_create_parser_and_cleanup): Delete with ...
2854 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
2855 to this new ctor.
2856 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
2857 using gdb_xml_create_parser_and_cleanup.
2858 (xinclude_parsing_data): Add ctor/dtor.
2859 (xml_xinclude_cleanup): Delete.
2860 (xml_process_xincludes): Create a local xinclude_parsing_data
2861 instead of heap-allocating one. Create a local gdb_xml_parser
2862 instead of heap-allocating one with
2863 gdb_xml_create_parser_and_cleanup.
2864
d56060f0
JB
28652017-04-18 John Baldwin <jhb@FreeBSD.org>
2866
2867 PR threads/20743
2868 * fbsd-nat.c (resume_one_thread_cb): Remove.
2869 (resume_all_threads_cb): Remove.
2870 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
2871 iterate_over_threads.
2872
305d16a9
JB
28732017-04-17 Joel Brobecker <brobecker@adacore.com>
2874
2875 * NEWS: Create a new section for the next release branch.
2876 Rename the section of the current branch, now that it has
2877 been cut.
2878
8bb57231
JB
28792017-04-17 Joel Brobecker <brobecker@adacore.com>
2880
2881 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
2882 * version.in: Bump version to 8.0.50.DATE-git.
2883
096c92dd
SDJ
28842017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
2885
2886 PR gdb/21385
2887 * windows-nat.c (windows_create_inferior): Declare 'allargs'
2888 independently of the host, and fix build breakage on Cygwin.
2889
0550c955
PA
28902017-04-13 Pedro Alves <palves@redhat.com>
2891
2892 * inferior.c (free_inferior): Convert to ...
2893 (inferior::~inferior): ... this dtor.
2894 (inferior::inferior): New ctor, factored out from ...
2895 (add_inferior_silent): ... here. Allocate the inferior with a new
2896 expression.
2897 (delete_inferior): Call delete instead of free_inferior.
2898 * inferior.h (gdb_environ, continuation): Forward declare.
2899 (inferior): Now a class. Add in-class initialization to all
2900 members. Make boolean fields bool, except 'detaching'.
2901 (inferior::inferior): New explicit ctor.
2902 (inferior::~inferior): New.
2903
e3d60dfc
PA
29042017-04-13 Pedro Alves <palves@redhat.com>
2905
2906 * inferior.c (init_inferior_list): Delete.
2907 * inferior.h (init_inferior_list): Delete.
2908
5fd69d0a
PA
29092017-04-13 Pedro Alves <palves@redhat.com>
2910
2911 PR threads/13217
2912 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
2913 (top level): Call it twice, with different thread sets.
2914
c6609450
PA
29152017-04-13 Pedro Alves <palves@redhat.com>
2916
2917 * thread.c: Include <algorithm>.
2918 (thread_array_cleanup): Delete.
2919 (scoped_inc_dec_ref): New class.
2920 (live_threads_count): New function.
2921 (set_thread_refcount): Delete.
2922 (tp_array_compar_ascending): Now a bool.
2923 (tp_array_compar): Convert to a std::sort comparison function.
2924 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
2925 and live_threads_count.
2926
2a00d7ce
PA
29272017-04-13 Pedro Alves <palves@redhat.com>
2928
2929 * infrun.c (follow_fork_inferior): Also switch the current
2930 inferior.
2931
441d7c93
PA
29322017-04-13 Pedro Alves <palves@redhat.com>
2933
2934 * breakpoint.c (watch_command_1): Save watchpoint-frame info
2935 before calling create_internal_breakpoint.
2936
808480f6
PA
29372017-04-13 Pedro Alves <palves@redhat.com>
2938
2939 * fork-child.c (execv_argv): New class.
2940 (breakup_args): Refactored as ...
2941 (execv_argv::init_for_no_shell): .. this method of execv_argv.
2942 Copy arguments to storage and replace separators with NULL
2943 terminators in place.
2944 (escape_bang_in_quoted_argument): Adjust to return bool.
2945 (execv_argv::execv_argv): New ctor.
2946 (execv_argv::init_for_shell): New method, factored out from
2947 fork_inferior. Don't strdup strings into the vector.
2948 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
2949 Remove free_vector_argv call.
2950
ad3d022a
YQ
29512017-04-13 Yao Qi <yao.qi@linaro.org>
2952
2953 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
2954 tdep->rx_psw_type.
2955
e6ddc3bf
YQ
29562017-04-13 Yao Qi <yao.qi@linaro.org>
2957
2958 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
2959 * rx-tdep.c (rx_gdbarch_init): Likewise.
2960
bfb8cf90
PA
29612017-04-13 Pedro Alves <palves@redhat.com>
2962
2963 * breakpoint.h (struct breakpoint): Reindent.
2964
f5336ca5
PA
29652017-04-13 Pedro Alves <palves@redhat.com>
2966
2967 * breakpoint.c (bp_location): Rename to ...
2968 (bp_locations): ... this. All references updated.
2969 (bp_location_count): Rename to ...
2970 (bp_locations_count): ... this. All references updated.
2971 (bp_location_placed_address_before_address_max): Rename to ...
2972 (bp_locations_placed_address_before_address_max): ... this. All
2973 references updated.
2974 (bp_location_shadow_len_after_address_max): Rename to ...
2975 (bp_locations_shadow_len_after_address_max): ... this. All
2976 references updated.
2977 (bp_location_compare_addrs): Rename to ...
2978 (bp_locations_compare_addrs): ... this. All references updated.
2979 (bp_location_compare):Rename to ...
2980 (bp_locations_compare): ... this. All references updated.
2981 (bp_location_target_extensions_update): Rename to ...
2982 (bp_locations_target_extensions_update): ... this. All references
2983 updated.
2984
be628ab8
SDJ
29852017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2986
2987 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
2988 * common/common.m4: Check headers 'termios.h', 'termio.h' and
2989 'sgtty.h'.
2990 * common/gdb_termios.h: New file, with parts of "terminal.h".
2991 * inflow.c: Include "gdb_termios.h".
2992 * ser-unix.c: Include "gdb_termios.h".
2993 * terminal.h: Move terminal-related defines to
2994 "common/gdb_termios.h".
2995
8e9e35b1
TT
29962017-04-12 Tom Tromey <tom@tromey.com>
2997
2998 * probe.c (parse_probes): Update.
2999 * location.h (delete_event_location): Don't declare.
3000 (event_location_deleter::operator()): Update.
3001 * location.c (event_location_deleter::operator()): Rename from
3002 delete_event_location.
3003 * linespec.h (linespec_result) <location>: Change type to
3004 event_location_up.
3005 * linespec.c (canonicalize_linespec, event_location_to_sals)
3006 (decode_objc): Update.
3007 (linespec_result): Don't call delete_event_location.
3008 * breakpoint.c (create_breakpoints_sal)
3009 (bkpt_probe_create_sals_from_location)
3010 (strace_marker_create_sals_from_location): Update.
3011
16e802b9
TT
30122017-04-12 Tom Tromey <tom@tromey.com>
3013
3014 * linespec.h (struct linespec_result): Add constructor and
3015 destructor.
3016 (init_linespec_result, destroy_linespec_result)
3017 (make_cleanup_destroy_linespec_result): Don't declare.
3018 * linespec.c (init_linespec_result): Remove.
3019 (linespec_result::~linespec_result): Rename from
3020 destroy_linespec_result. Update.
3021 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
3022 Remove.
3023 * breakpoint.c (create_breakpoint, break_range_command)
3024 (decode_location_default): Update.
3025 * ax-gdb.c (agent_command_1): Update.
3026
d28cd78a
TT
30272017-04-12 Tom Tromey <tom@tromey.com>
3028
3029 * remote.c (remote_download_tracepoint): Update.
3030 * python/py-breakpoint.c (bppy_get_location): Update.
3031 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
3032 (gdbscm_breakpoint_location): Update.
3033 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
3034 * breakpoint.h (struct breakpoint) <location, location_range_end>:
3035 Change type to event_location_up.
3036 * breakpoint.c (create_overlay_event_breakpoint)
3037 (create_longjmp_master_breakpoint)
3038 (create_std_terminate_master_breakpoint)
3039 (create_exception_master_breakpoint)
3040 (breakpoint_event_location_empty_p, print_breakpoint_location)
3041 (print_one_breakpoint_location, create_thread_event_breakpoint)
3042 (init_breakpoint_sal, create_breakpoint)
3043 (print_recreate_ranged_breakpoint, break_range_command)
3044 (init_ada_exception_breakpoint, say_where): Update.
3045 (base_breakpoint_dtor): Don't call delete_event_location.
3046 (bkpt_print_recreate, tracepoint_print_recreate)
3047 (dprintf_print_recreate, update_static_tracepoint)
3048 (breakpoint_re_set_default): Update.
3049
711799d5
TT
30502017-04-12 Tom Tromey <tom@tromey.com>
3051
3052 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3053 type of "to_do". Update.
3054 (compute_stack_depth): Use std::vector.
3055
52d214d3
TT
30562017-04-12 Tom Tromey <tom@tromey.com>
3057
3058 * printcmd.c (find_instruction_backward): Use std::vector.
3059
4c404b8b
TT
30602017-04-12 Tom Tromey <tom@tromey.com>
3061
3062 * symfile.c (objfilep): Remove typedef.
3063 (reread_symbols): Use a std::vector.
3064
156d9eab
TT
30652017-04-12 Tom Tromey <tom@tromey.com>
3066
3067 * mi/mi-main.c (exec_direction_forward): Remove.
3068 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
3069 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3070 scoped_restore.
3071 * guile/guile.c (guile_repl_command, guile_command)
3072 (gdbscm_execute_gdb_command): Use scoped_restore.
3073 * go-exp.y (go_parse): Use scoped_restore.
3074 * d-exp.y (d_parse): Use scoped_restore.
3075 * cli/cli-decode.c (cmd_func): Use scoped_restore.
3076 * c-exp.y (c_parse): Use scoped_restore.
3077
4d89769a
TT
30782017-04-12 Tom Tromey <tom@tromey.com>
3079
3080 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
3081 (mi_parse): Update return type.
3082 (mi_parse_free): Remove.
3083 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
3084 (mi_parse::~mi_parse): Rename from mi_parse_free.
3085 (mi_parse_cleanup): Remove.
3086 (mi_parse): Return a unique_ptr. Use new.
3087 * mi/mi-main.c (mi_execute_command): Update.
3088
4b217cc7
TT
30892017-04-12 Tom Tromey <tom@tromey.com>
3090
3091 * location.c (explicit_location_lex_one): Return a
3092 unique_xmalloc_ptr.
3093 (string_to_explicit_location): Update. Remove cleanups.
3094
59d3651b
TT
30952017-04-12 Tom Tromey <tom@tromey.com>
3096
3097 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
3098 (compare_value_and_voffset): Change type. Update.
3099 (compute_vtable_size): Change type of "offset_vec".
3100 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
3101 (gnuv3_get_typeid): Remove extraneous declaration.
3102
b24b0d6c
TT
31032017-04-12 Tom Tromey <tom@tromey.com>
3104
3105 * charset.h (wchar_iterator): Fix comment.
3106
80a3b8c5
TT
31072017-04-12 Tom Tromey <tom@tromey.com>
3108
3109 * charset.c (iconv_wrapper): New class.
3110 (cleanup_iconv): Remove.
3111 (convert_between_encodings): Use it.
3112
c83dd867
TT
31132017-04-12 Tom Tromey <tom@tromey.com>
3114
3115 * symfile.h (increment_reading_symtab): Update type.
3116 * symfile.c (decrement_reading_symtab): Remove.
3117 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
3118 * psymtab.c (psymtab_to_symtab): Update.
3119 * dwarf2read.c (dw2_instantiate_symtab): Update.
3120
0e8621a0
TT
31212017-04-12 Tom Tromey <tom@tromey.com>
3122
3123 * jit.c (struct jit_reader): Declare separately. Add constructor
3124 and destructor. Change type of "handle".
3125 (loaded_jit_reader): Define separately.
3126 (jit_reader_load): Update. New "new".
3127 (jit_reader_unload_command): Use "delete".
3128 * gdb-dlfcn.h (struct dlclose_deleter): New.
3129 (gdb_dlhandle_up): New typedef.
3130 (gdb_dlopen, gdb_dlsym): Update types.
3131 (gdb_dlclose): Remove.
3132 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
3133 (gdb_dlsym): Change type of "handle".
3134 (make_cleanup_dlclose): Remove.
3135 (dlclose_deleter::operator()): Rename from gdb_dlclose.
3136 * compile/compile-c-support.c (load_libcc): Update.
3137
67d89901
TT
31382017-04-12 Tom Tromey <tom@tromey.com>
3139
3140 * symtab.h (find_pcs_for_symtab_line): Change return type.
3141 * symtab.c (find_pcs_for_symtab_line): Change return type.
3142 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
3143 type of "vec". Update.
3144 (ltpy_get_pcs_for_line): Update.
3145 * linespec.c (decode_digits_ordinary): Update.
3146
93921405
TT
31472017-04-12 Tom Tromey <tom@tromey.com>
3148
3149 * tracepoint.c (actions_command): Update.
3150 * python/python.c (python_command, python_interactive_command):
3151 Update.
3152 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3153 * guile/guile.c (guile_command): Update.
3154 * defs.h (read_command_lines, read_command_lines_1): Return
3155 command_line_up.
3156 (command_lines_deleter): New struct.
3157 (command_line_up): New typedef.
3158 * compile/compile.c (compile_code_command)
3159 (compile_print_command): Update.
3160 * cli/cli-script.h (get_command_line, copy_command_lines): Return
3161 command_line_up.
3162 (make_cleanup_free_command_lines): Remove.
3163 * cli/cli-script.c (get_command_line, read_command_lines_1)
3164 (copy_command_lines): Return command_line_up.
3165 (while_command, if_command, read_command_lines, define_command)
3166 (document_command): Update.
3167 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
3168 Remove.
3169 * breakpoint.h (breakpoint_set_commands): Change type of
3170 "commands".
3171 * breakpoint.c (breakpoint_set_commands): Change type of
3172 "commands". Update.
3173 (do_map_commands_command, update_dprintf_command_list)
3174 (create_tracepoint_from_upload): Update.
3175
ffc2605c
TT
31762017-04-12 Tom Tromey <tom@tromey.com>
3177
3178 * tracepoint.c (scope_info): Update.
3179 * spu-tdep.c (spu_catch_start): Update.
3180 * python/python.c (gdbpy_decode_line): Update.
3181 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
3182 * python/py-breakpoint.c (bppy_init): Update.
3183 * probe.c (parse_probes): Update.
3184 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
3185 * location.h (event_location_deleter): New struct.
3186 (event_location_up): New typedef.
3187 (new_linespec_location, new_address_location, new_probe_location)
3188 (new_explicit_location, copy_event_location)
3189 (string_to_event_location, string_to_event_location_basic)
3190 (string_to_explicit_location): Update return type.
3191 (make_cleanup_delete_event_location): Remove.
3192 * location.c (new_linespec_location, new_address_location)
3193 (new_probe_location, new_explicit_location, copy_event_location):
3194 Return event_location_up.
3195 (delete_event_location_cleanup)
3196 (make_cleanup_delete_event_location): Remove.
3197 (string_to_explicit_location, string_to_event_location_basic)
3198 (string_to_event_location): Return event_location_up.
3199 * linespec.c (canonicalize_linespec, event_location_to_sals)
3200 (decode_line_with_current_source)
3201 (decode_line_with_last_displayed, decode_objc): Update.
3202 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
3203 * completer.c (location_completer): Update.
3204 * cli/cli-cmds.c (edit_command, list_command): Update.
3205 * breakpoint.c (create_overlay_event_breakpoint)
3206 (create_longjmp_master_breakpoint)
3207 (create_std_terminate_master_breakpoint)
3208 (create_exception_master_breakpoint)
3209 (create_thread_event_breakpoint): Update.
3210 (init_breakpoint_sal): Update. Remove some dead code.
3211 (create_breakpoint_sal): Change type of "location". Update.
3212 (create_breakpoints_sal, create_breakpoint, break_command_1)
3213 (dprintf_command, break_range_command, until_break_command)
3214 (init_ada_exception_breakpoint)
3215 (strace_marker_create_sals_from_location)
3216 (update_static_tracepoint, trace_command, ftrace_command)
3217 (strace_command, create_tracepoint_from_upload): Update.
3218 * break-catch-throw.c (re_set_exception_catchpoint): Update.
3219 * ax-gdb.c (agent_command_1): Update.
3220
8f10c932
PA
32212017-04-12 Pedro Alves <palves@redhat.com>
3222
3223 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
3224 * configure.tgt: Handle i[34567]86-*-go32* and
3225 i[34567]86-*-msdosdjgpp*.
3226 * i386-tdep.c (i386_svr4_reg_to_regnum):
3227 Make extern.
3228 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
3229 i386-go32-tdep.c.
3230 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
3231 * i386-go32-tdep.c: New file.
3232 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
3233 declarations.
3234
0a31ccfb
SM
32352017-04-12 Simon Marchi <simon.marchi@ericsson.com>
3236
3237 * aix-thread.c (pd_status2str): Change return type to const char *.
3238
e9bb3fbb
PA
32392017-04-12 Pedro Alves <palves@redhat.com>
3240
3241 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
3242 calls to set_gdbarch_gnu_triplet_regexp.
3243
53375380
PA
32442017-04-12 Pedro Alves <palves@redhat.com>
3245
3246 PR gdb/21323
3247 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
3248 New enum value.
3249 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
3250 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
3251 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
3252 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
3253 * gdbarch.h, gdbarch.c: Regenerate.
3254 * aarch64-tdep.c (aarch64_gdbarch_init): Override
3255 gdbarch_wchar_bit and gdbarch_wchar_signed.
3256 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
3257 * arm-tdep.c (arm_gdbarch_init): Likewise.
3258 * avr-tdep.c (avr_gdbarch_init): Likewise.
3259 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
3260 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
3261 * i386-tdep.c (i386_go32_init_abi): Likewise.
3262 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3263 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3264 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3265 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3266 * sh-tdep.c (sh_gdbarch_init): Likewise.
3267 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3268 * sparc64-tdep.c (sparc64_init_abi): Likewise.
3269 * windows-tdep.c (windows_init_abi): Likewise.
3270 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3271
53e710ac
PA
32722017-04-12 Pedro Alves <palves@redhat.com>
3273
3274 PR c++/21323
3275 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
3276 cplus_primitive_type_char32_t>: New enum values.
3277 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
3278 and cplus_primitive_type_char32_t.
3279 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
3280 32, use the archtecture's built-in type for char16_t and char32_t,
3281 respectively. Otherwise, fallback to init_integer_type as before,
3282 but make the type unsigned, and issue a complaint.
3283 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
3284
ab0538b8
AH
32852017-04-12 Alan Hayward <alan.hayward@arm.com>
3286
5e0e0422 3287 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
3288 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
3289
5430098f
SDJ
32902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3291
3292 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
3293 'const char *'.
3294
7c5ded6a
SDJ
32952017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3296
3297 * common/common-utils.c (free_vector_argv): New function.
3298 * common/common-utils.h: Include <vector>.
3299 (free_vector_argv): New prototype.
3300 * darwin-nat.c (darwin_create_inferior): Rewrite function
3301 prototype in order to constify "exec_file" and accept a
3302 "std::string" for "allargs".
3303 * fork-child.c: Include <vector>.
3304 (breakup_args): Rewrite function, using C++.
3305 (fork_inferior): Rewrite function header, constify "exec_file_arg"
3306 and accept "std::string" for "allargs". Update the code to
3307 calculate "argv" based on "allargs". Update calls to "exec_fun"
3308 and "execvp".
3309 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
3310 order to constify "exec_file" and accept a "std::string" for
3311 "allargs".
3312 * go32-nat.c (go32_create_inferior): Likewise.
3313 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
3314 * infcmd.c (run_command_1): Constify "exec_file". Use
3315 "std::string" for inferior arguments.
3316 * inferior.h (fork_inferior): Update prototype.
3317 * linux-nat.c (linux_nat_create_inferior): Rewrite function
3318 prototype in order to constify "exec_file" and accept a
3319 "std::string" for "allargs".
3320 * nto-procfs.c (procfs_create_inferior): Likewise.
3321 * procfs.c (procfs_create_inferior): Likewise.
3322 * remote-sim.c (gdbsim_create_inferior): Likewise.
3323 * remote.c (extended_remote_run): Update code to accept
3324 "std::string" as argument.
3325 (extended_remote_create_inferior): Rewrite function prototype in
3326 order to constify "exec_file" and accept a "std::string" for
3327 "allargs".
3328 * rs6000-nat.c (super_create_inferior): Likewise.
3329 (rs6000_create_inferior): Likewise.
3330 * target.h (struct target_ops) <to_create_inferior>: Likewise.
3331 * windows-nat.c (windows_create_inferior): Likewise.
3332
ae0eee42
PA
33332017-04-11 Pedro Alves <palves@redhat.com>
3334
3335 * thread.c: Fix whitespace throughout.
3336
a6acac06
PR
33372017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
3338
3339 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
3340
64403bd1
AH
33412017-04-11 Alan Hayward <alan.hayward@arm.com>
3342
3343 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
3344
a5bef50f
SDJ
33452017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
3346
3347 PR gdb/21364
3348 * osdata.c (info_osdata): Check if 'type' is an empty string
3349 instead of NULL.
3350
9295a5a9
PA
33512017-04-10 Pedro Alves <palves@redhat.com>
3352
3353 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
3354 (ptid_to_global_thread_id, in_thread_list)
3355 (do_captured_list_thread_ids, set_resumed, set_running)
3356 (set_executing, set_stop_requested, finish_thread_state)
3357 (validate_registers_access, can_access_registers_ptid)
3358 (print_thread_info_1, switch_to_thread)
3359 (do_restore_current_thread_cleanup)
3360 (make_cleanup_restore_current_thread, thread_command)
3361 (thread_name_command): Use operator== instead of ptid_equal.
3362
996812e3
PA
33632017-04-10 Pedro Alves <palves@redhat.com>
3364
3365 * thread.c (struct current_thread_cleanup) <next>: Delete field.
3366 (current_thread_cleanup_chain): Delete.
3367 (restore_current_thread_cleanup_dtor)
3368 (make_cleanup_restore_current_thread): Remove references to
3369 current_thread_cleanup_chain.
3370
845b344f
AH
33712017-04-10 Alan Hayward <alan.hayward@arm.com>
3372
3373 * msp430-tdep.c (msp430_pseudo_register_read): Never return
3374 REG_UNKNOWN.
3375
803bdfe4
YQ
33762017-04-10 Yao Qi <yao.qi@linaro.org>
3377
3378 PR gdb/19942
3379 * gdbthread.h (thread_info::deletable): New method.
3380 (thread_info::incref): New method.
3381 (thread_info::decref): New method.
3382 (thread_info::refcount): Move it to private.
3383 * infrun.c (save_stop_context): Call inc_refcount.
3384 (release_stop_context_cleanup): Likewise.
3385 * thread.c (set_thread_exited): New function.
3386 (init_thread_list): Delete "tp" only it is deletable, otherwise
3387 call set_thread_exited.
3388 (delete_thread_1): Call set_thread_exited.
3389 (current_thread_cleanup) <inferior_pid>: Remove.
3390 <thread>: New field.
3391 (restore_current_thread_ptid_changed): Removed.
3392 (do_restore_current_thread_cleanup): Adjust.
3393 (restore_current_thread_cleanup_dtor): Don't call
3394 find_thread_ptid.
3395 (set_thread_refcount): Use dec_refcount.
3396 (make_cleanup_restore_current_thread): Adjust.
3397 (thread_apply_all_command): Call inc_refcount.
3398 (_initialize_thread): Don't call
3399 observer_attach_thread_ptid_changed.
3400
8c25b497
YQ
34012017-04-10 Yao Qi <yao.qi@linaro.org>
3402
3403 * thread.c (delete_thread_1): Hoist code on marking thread as
3404 exited.
3405
8473b447
SM
34062017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * windows-nat.c (windows_detach): Initialize ptid with
3409 minus_one_ptid.
3410
6670ec13
SM
34112017-04-07 Simon Marchi <simon.marchi@ericsson.com>
3412
3413 * unittests/ptid-selftests.c: Fix erroneous assert messages.
3414
ba2f91bb
AH
34152017-04-07 Alan Hayward <alan.hayward@arm.com>
3416
3417 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
3418 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
3419 (bfin_pseudo_register_write): Likewise
3420
436252de
SM
34212017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3422
3423 * common/ptid.h (struct ptid): Change to...
3424 (class ptid_t): ... this.
3425 <ptid_t>: New constructors.
3426 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
3427 matches>: New methods.
3428 <make_null, make_minus_one>: New static methods.
3429 <pid>: Rename to...
3430 <m_pid>: ...this.
3431 <lwp>: Rename to...
3432 <m_lwp>: ...this.
3433 <tid>: Rename to...
3434 <m_tid>: ...this.
3435 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
3436 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
3437 as references, move comment to class ptid_t.
3438 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
3439 ptid_t static methods.
3440 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
3441 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
3442 Take ptid arguments as references, implement using ptid_t methods.
3443 * unittests/ptid-selftests.c: New file.
3444 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3445 unittests/ptid-selftests.c.
3446 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
3447
0dedf377
TP
34482017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
3449
3450 * python/python.c (python_run_simple_file): Cast mode literal to
3451 non-const char pointer as expected by PyFile_FromString.
3452
4e9868d4
SM
34532017-04-05 Simon Marchi <simon.marchi@ericsson.com>
3454
3455 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
3456 minus_one_ptid and null_ptid.
3457
9bf2a700
PA
34582017-04-05 Pedro Alves <palves@redhat.com>
3459
3460 * warning.m4 (build_warnings): Remove -Wno-write-strings.
3461 * configure: Regenerate.
3462
a121b7c1
PA
34632017-04-05 Pedro Alves <palves@redhat.com>
3464
3465 * ada-exp.y (yyerror): Constify.
3466 * ada-lang.c (bound_name, get_selections)
3467 (ada_variant_discrim_type)
3468 (ada_variant_discrim_name, ada_value_struct_elt)
3469 (ada_lookup_struct_elt_type, is_unchecked_variant)
3470 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
3471 (catch_ada_exception_command_split)
3472 (catch_ada_assert_command_split, catch_assert_command)
3473 (ada_op_name): Constify.
3474 * ada-lang.h (ada_yyerror, get_selections)
3475 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
3476 * arc-tdep.c (arc_print_frame_cache): Constify.
3477 * arm-tdep.c (arm_skip_stub): Constify.
3478 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
3479 (gen_aggregate_elt_ref): Constify.
3480 * bcache.c (print_bcache_statistics): Constify.
3481 * bcache.h (print_bcache_statistics): Constify.
3482 * break-catch-throw.c (catch_exception_command_1):
3483 * breakpoint.c (struct ep_type_description::description):
3484 Constify.
3485 (add_solib_catchpoint): Constify.
3486 (catch_fork_command_1): Add cast.
3487 (add_catch_command): Constify.
3488 * breakpoint.h (add_catch_command, add_solib_catchpoint):
3489 Constify.
3490 * bsd-uthread.c (bsd_uthread_state): Constify.
3491 * buildsym.c (patch_subfile_names): Constify.
3492 * buildsym.h (next_symbol_text_func, patch_subfile_names):
3493 Constify.
3494 * c-exp.y (yyerror): Constify.
3495 (token::oper): Constify.
3496 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
3497 * c-varobj.c (cplus_describe_child): Constify.
3498 * charset.c (find_charset_names): Add cast.
3499 (find_charset_names): Constify array and add const_cast.
3500 * cli/cli-cmds.c (complete_command, cd_command): Constify.
3501 (edit_command): Constify.
3502 * cli/cli-decode.c (lookup_cmd): Constify.
3503 * cli/cli-dump.c (dump_memory_command, dump_value_command):
3504 Constify.
3505 (struct dump_context): Constify.
3506 (add_dump_command, restore_command): Constify.
3507 * cli/cli-script.c (get_command_line): Constify.
3508 * cli/cli-script.h (get_command_line): Constify.
3509 * cli/cli-utils.c (check_for_argument): Constify.
3510 * cli/cli-utils.h (check_for_argument): Constify.
3511 * coff-pe-read.c (struct read_pe_section_data): Constify.
3512 * command.h (lookup_cmd): Constify.
3513 * common/print-utils.c (decimal2str): Constify.
3514 * completer.c (gdb_print_filename): Constify.
3515 * corefile.c (set_gnutarget): Constify.
3516 * cp-name-parser.y (yyerror): Constify.
3517 * cp-valprint.c (cp_print_class_member): Constify.
3518 * cris-tdep.c (cris_register_name, crisv32_register_name):
3519 Constify.
3520 * d-exp.y (yyerror): Constify.
3521 (struct token::oper): Constify.
3522 * d-lang.h (d_yyerror): Constify.
3523 * dbxread.c (struct header_file_location::name): Constify.
3524 (add_old_header_file, add_new_header_file, last_function_name)
3525 (dbx_next_symbol_text, add_bincl_to_list)
3526 (find_corresponding_bincl_psymtab, set_namestring)
3527 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
3528 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
3529 * defs.h (command_line_input, print_address_symbolic)
3530 (deprecated_readline_begin_hook): Constify.
3531 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
3532 Constify.
3533 * event-top.c (handle_line_of_input): Constify and add cast.
3534 * exceptions.c (catch_errors): Constify.
3535 * exceptions.h (catch_errors): Constify.
3536 * expprint.c (print_subexp_standard, op_string, op_name)
3537 (op_name_standard, dump_raw_expression, dump_raw_expression):
3538 * expression.h (op_name, op_string, dump_raw_expression):
3539 Constify.
3540 * f-exp.y (yyerror): Constify.
3541 (struct token::oper): Constify.
3542 (struct f77_boolean_val::name): Constify.
3543 * f-lang.c (f_word_break_characters): Constify.
3544 * f-lang.h (f_yyerror): Constify.
3545 * fork-child.c (fork_inferior): Add cast.
3546 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
3547 (new_variant): Constify.
3548 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
3549 * gdbarch.c: Regenerate.
3550 * gdbcore.h (set_gnutarget): Constify.
3551 * go-exp.y (yyerror): Constify.
3552 (token::oper): Constify.
3553 * go-lang.h (go_yyerror): Constify.
3554 * go32-nat.c (go32_sysinfo): Constify.
3555 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
3556 * guile/scm-cmd.c (cmdscm_function): Constify.
3557 * guile/scm-param.c (pascm_param_value): Constify.
3558 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
3559 (h8300sx_register_name): Constify.
3560 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
3561 Constify.
3562 * ia64-tdep.c (ia64_register_names): Constify.
3563 * infcmd.c (construct_inferior_arguments): Constify.
3564 (path_command, attach_post_wait): Constify.
3565 * language.c (show_range_command, show_case_command)
3566 (unk_lang_error): Constify.
3567 * language.h (language_defn::la_error)
3568 (language_defn::la_name_of_this): Constify.
3569 * linespec.c (decode_line_2): Constify.
3570 * linux-thread-db.c (thread_db_err_str): Constify.
3571 * lm32-tdep.c (lm32_register_name): Constify.
3572 * m2-exp.y (yyerror): Constify.
3573 * m2-lang.h (m2_yyerror): Constify.
3574 * m32r-tdep.c (m32r_register_names): Constify and make static.
3575 * m68hc11-tdep.c (m68hc11_register_names): Constify.
3576 * m88k-tdep.c (m88k_register_name): Constify.
3577 * macroexp.c (appendmem): Constify.
3578 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
3579 (upgrade_type, parse_external, parse_partial_symbols)
3580 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
3581 (new_symbol): Constify.
3582 * memattr.c (mem_info_command): Constify.
3583 * mep-tdep.c (register_name_from_keyword): Constify.
3584 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
3585 Constify.
3586 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
3587 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
3588 * mi/mi-main.c (captured_mi_execute_command): Constify and add
3589 cast.
3590 (mi_execute_async_cli_command): Constify.
3591 * mips-tdep.c (mips_register_name): Constify.
3592 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
3593 (am33_register_name, am33_2_register_name)
3594 * moxie-tdep.c (moxie_register_names): Constify.
3595 * nat/linux-osdata.c (osdata_type): Constify fields.
3596 * nto-tdep.c (nto_parse_redirection): Constify.
3597 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
3598 (lookup_child_selector): Constify.
3599 (objc_methcall::name): Constify.
3600 * objc-lang.h (lookup_objc_class, lookup_child_selector)
3601 (lookup_struct_typedef): Constify.
3602 * objfiles.c (pc_in_section): Constify.
3603 * objfiles.h (pc_in_section): Constify.
3604 * p-exp.y (struct token::oper): Constify.
3605 (yyerror): Constify.
3606 * p-lang.h (pascal_yyerror): Constify.
3607 * parser-defs.h (op_name_standard): Constify.
3608 (op_print::string): Constify.
3609 (exp_descriptor::op_name): Constify.
3610 * printcmd.c (print_address_symbolic): Constify.
3611 * psymtab.c (print_partial_symbols): Constify.
3612 * python/py-breakpoint.c (stop_func): Constify.
3613 (bppy_get_expression): Constify.
3614 * python/py-cmd.c (cmdpy_completer::name): Constify.
3615 (cmdpy_function): Constify.
3616 * python/py-event.c (evpy_add_attribute)
3617 (gdbpy_initialize_event_generic): Constify.
3618 * python/py-event.h (evpy_add_attribute)
3619 (gdbpy_initialize_event_generic): Constify.
3620 * python/py-evts.c (add_new_registry): Constify.
3621 * python/py-finishbreakpoint.c (outofscope_func): Constify.
3622 * python/py-framefilter.c (get_py_iter_from_func): Constify.
3623 * python/py-inferior.c (get_buffer): Add cast.
3624 * python/py-param.c (parm_constant::name): Constify.
3625 * python/py-unwind.c (fprint_frame_id): Constify.
3626 * python/python.c (gdbpy_parameter_value): Constify.
3627 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
3628 * remote.c (memory_packet_config::name): Constify.
3629 (show_packet_config_cmd, remote_write_bytes)
3630 (remote_buffer_add_string):
3631 * reverse.c (exec_reverse_once): Constify.
3632 * rs6000-tdep.c (variant::name, variant::description): Constify.
3633 * rust-exp.y (rustyyerror): Constify.
3634 * rust-lang.c (rust_op_name): Constify.
3635 * rust-lang.h (rustyyerror): Constify.
3636 * serial.h (serial_ops::name): Constify.
3637 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
3638 (sh_sh3e_register_name, sh_sh2e_register_name)
3639 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
3640 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
3641 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
3642 (sh_sh4al_dsp_register_name): Constify.
3643 * sh64-tdep.c (sh64_register_name): Constify.
3644 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
3645 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
3646 * stabsread.c (patch_block_stabs, read_type_number)
3647 (ref_map::stabs, ref_add, process_reference)
3648 (symbol_reference_defined, define_symbol, define_symbol)
3649 (error_type, read_type, read_member_functions, read_cpp_abbrev)
3650 (read_one_struct_field, read_struct_fields, read_baseclasses)
3651 (read_tilde_fields, read_struct_type, read_array_type)
3652 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
3653 (read_huge_number, read_range_type, read_args, common_block_start)
3654 (find_name_end): Constify.
3655 * stabsread.h (common_block_start, define_symbol)
3656 (process_one_symbol, symbol_reference_defined, ref_add):
3657 * symfile.c (get_section_index, add_symbol_file_command):
3658 * symfile.h (get_section_index): Constify.
3659 * target-descriptions.c (tdesc_type::name): Constify.
3660 (tdesc_free_type): Add cast.
3661 * target.c (find_default_run_target):
3662 (add_deprecated_target_alias, find_default_run_target)
3663 (target_announce_detach): Constify.
3664 (do_option): Constify.
3665 * target.h (add_deprecated_target_alias): Constify.
3666 * thread.c (print_thread_info_1): Constify.
3667 * top.c (deprecated_readline_begin_hook, command_line_input):
3668 Constify.
3669 (init_main): Add casts.
3670 * top.h (handle_line_of_input): Constify.
3671 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
3672 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
3673 (tfind_command): Rename to ...
3674 (tfind_command_1): ... this and constify.
3675 (tfind_command): New function.
3676 (tfind_end_command, tfind_start_command): Adjust.
3677 (encode_source_string): Constify.
3678 * tracepoint.h (encode_source_string): Constify.
3679 * tui/tui-data.c (tui_partial_win_by_name): Constify.
3680 * tui/tui-data.h (tui_partial_win_by_name): Constify.
3681 * tui/tui-source.c (tui_set_source_content_nil): Constify.
3682 * tui/tui-source.h (tui_set_source_content_nil): Constify.
3683 * tui/tui-win.c (parse_scrolling_args): Constify.
3684 * tui/tui-windata.c (tui_erase_data_content): Constify.
3685 * tui/tui-windata.h (tui_erase_data_content): Constify.
3686 * tui/tui-winsource.c (tui_erase_source_content): Constify.
3687 * tui/tui.c (tui_enable): Add cast.
3688 * utils.c (defaulted_query): Constify.
3689 (init_page_info): Add cast.
3690 (puts_debug, subset_compare): Constify.
3691 * utils.h (subset_compare): Constify.
3692 * varobj.c (varobj_format_string): Constify.
3693 * varobj.h (varobj_format_string): Constify.
3694 * vax-tdep.c (vax_register_name): Constify.
3695 * windows-nat.c (windows_detach): Constify.
3696 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
3697 * xml-support.c (gdb_xml_end_element): Constify.
3698 * xml-tdesc.c (tdesc_start_reg): Constify.
3699 * xstormy16-tdep.c (xstormy16_register_name): Constify.
3700 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
3701 * xtensa-tdep.h (xtensa_register_t::name): Constify.
3702
995816ba
PA
37032017-04-05 Pedro Alves <palves@redhat.com>
3704
3705 * proc-api.c (struct trans): Constify.
3706 (procfs_note): Constify.
3707 * proc-events.c (struct trans, syscall_table):
3708 * proc-flags.c (struct trans): Constify.
3709 * proc-utils.h (procfs_note): Constify.
3710 * proc-why.c (struct trans): Constify.
3711 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
3712 (procfs_detach): Constify.
3713 * sol-thread.c (struct string_map): Constify.
3714 (td_err_string, td_state_string): Constify.
3715
3e83a920
PA
37162017-04-05 Pedro Alves <palves@redhat.com>
3717
3718 * proc-api.c (procfs_filename): Don't initialize
3719 procfs_filename.
3720 (prepare_to_trace): Assume procfs_filename is non-NULL.
3721 (_initialize_proc_api): Give procfs_filename a default value here.
3722
63160a43
PA
37232017-04-05 Pedro Alves <palves@redhat.com>
3724
3725 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
3726 'cond_string' parameter.
3727 (extract_exception_regexp): Constify 'string' parameter.
3728 (catch_exception_command_1): Constify.
3729 * breakpoint.c (init_catchpoint)
3730 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
3731 parameter.
3732 (ep_parse_optional_if_clause, catch_fork_command_1)
3733 (catch_exec_command_1): Constify.
3734 * breakpoint.h (init_catchpoint): Constify 'cond_string'
3735 parameter.
3736 (ep_parse_optional_if_clause): Constify.
3737 * cli/cli-utils.c (remove_trailing_whitespace)
3738 (check_for_argument): Constify.
3739 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
3740 non-const overload.
3741 (check_for_argument): Likewise.
3742
9b2eba3d
PA
37432017-04-05 Pedro Alves <palves@redhat.com>
3744
3745 * event-top.c (command_line_handler): Add cast to execute_command
3746 call.
3747 * record-btrace.c (cmd_record_btrace_bts_start)
3748 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
3749 (cmd_record_btrace_start): Add cast to execute_command call.
3750 * record-full.c (record_full_goto_insn):
3751 * record.c (record_start, record_stop): Add cast to
3752 execute_command_to_string calls.
3753 (cmd_record_start): Add cast to execute_command calls.
3754
2adadf51
PA
37552017-04-05 Pedro Alves <palves@redhat.com>
3756
3757 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
3758 static inline function.
3759 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
3760 array and use gdb_PyArg_ParseTupleAndKeywords.
3761 * python/py-cmd.c (cmdpy_init): Likewise.
3762 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
3763 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
3764 (infpy_search_memory): Likewise.
3765 * python/py-objfile.c (objfpy_add_separate_debug_file)
3766 (gdbpy_lookup_objfile): Likewise.
3767 * python/py-symbol.c (gdbpy_lookup_symbol)
3768 (gdbpy_lookup_global_symbol): Likewise.
3769 * python/py-type.c (gdbpy_lookup_type): Likewise.
3770 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
3771 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
3772 Likewise.
3773
0d1f4ceb
PA
37742017-04-05 Pedro Alves <palves@redhat.com>
3775
3776 * python/python-internal.h (gdb_PyGetSetDef): New type.
3777 * python/py-block.c (block_object_getset)
3778 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
3779 * python/py-event.c (event_object_getset)
3780 (finish_breakpoint_object_getset): Likewise.
3781 * python/py-inferior.c (inferior_object_getset): Likewise.
3782 * python/py-infthread.c (thread_object_getset): Likewise.
3783 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
3784 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
3785 * python/py-objfile.c (objfile_getset): Likewise.
3786 * python/py-progspace.c (pspace_getset): Likewise.
3787 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
3788 Likewise.
3789 * python/py-record.c (recpy_record_getset): Likewise.
3790 * python/py-symbol.c (symbol_object_getset): Likewise.
3791 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
3792 Likewise.
3793 * python/py-type.c (type_object_getset, field_object_getset):
3794 Likewise.
3795 * python/py-value.c (value_object_getset): Likewise.
3796
4d759979
PA
37972017-04-05 Pedro Alves <palves@redhat.com>
3798
3799 * python/python-internal.h (gdb_PyObject_CallMethod)
3800 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
3801 New functions.
3802 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
3803 (PySys_GetObject, PySys_SetPath): New macros.
3804
fdf9e36f
PA
38052017-04-05 Pedro Alves <palves@redhat.com>
3806
3807 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
3808 info_osdata_command.
3809 * osdata.c (info_osdata_command): Rename to ...
3810 (info_osdata): ... this. Constify 'type' parameter, and remove
3811 the 'from_tty' parameter. Accept NULL TYPE.
3812 (info_osdata_command): New function.
3813 * osdata.h (info_osdata_command): Remove declaration.
3814 (info_osdata): New declaration.
3815
9f33b8b7
PA
38162017-04-05 Pedro Alves <palves@redhat.com>
3817
3818 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
3819 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
3820 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
3821 parameter.
3822 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
3823 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
3824 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
3825 parameter.
3826 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
3827 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
3828 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
3829 (mi_cmd_file_list_exec_source_files)
3830 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
3831 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3832 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
3833 parameter.
3834 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
3835 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
3836 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
3837 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
3838 (mi_cmd_stack_info_frame): Constify 'command' parameter.
3839 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
3840 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
3841 'command' parameter.
3842 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
3843 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
3844 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
3845 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
3846 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
3847 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
3848 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
3849 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
3850 (mi_cmd_var_set_update_range): Constify 'command' parameter.
3851 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
3852 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
3853 parameter.
3854 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
3855 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
3856 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
3857 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
3858 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
3859 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
3860 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
3861 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
3862 (mi_cmd_data_list_changed_registers)
3863 (mi_cmd_data_write_register_values)
3864 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
3865 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
3866 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
3867 (mi_cmd_list_features, mi_cmd_list_target_features)
3868 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
3869 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
3870 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
3871 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
3872 (mi_cmd_trace_frame_collected): Constify 'command'
3873 parameter.
3874 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
3875 'command' parameter.
3876
67cb5b2d
PA
38772017-04-05 Pedro Alves <palves@redhat.com>
3878
3879 * ada-lang.c (ada_completer_word_break_characters): Now a const
3880 array.
3881 (ada_get_gdb_completer_word_break_characters): Constify.
3882 * completer.c (gdb_completer_command_word_break_characters)
3883 (gdb_completer_file_name_break_characters)
3884 (gdb_completer_quote_characters): Now const arrays.
3885 (get_gdb_completer_quote_characters): Constify.
3886 (set_rl_completer_word_break_characters): New function.
3887 (set_gdb_completion_word_break_characters)
3888 (complete_line_internal): Use it.
3889 * completer.h (get_gdb_completer_quote_characters): Constify.
3890 (set_rl_completer_word_break_characters): Declare.
3891 * f-lang.c (f_word_break_characters): Constify.
3892 * language.c (default_word_break_characters): Constify.
3893 * language.h (language_defn::la_word_break_characters): Constify.
3894 (default_word_break_characters): Constify.
3895 * top.c (init_main): Use set_rl_completer_word_break_characters.
3896
7a114964
PA
38972017-04-05 Pedro Alves <palves@redhat.com>
3898
3899 * aix-thread.c (aix_thread_pid_to_str)
3900 (aix_thread_extra_thread_info): Constify.
3901 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
3902 * bsd-uthread.c (bsd_uthread_extra_thread_info)
3903 (bsd_uthread_pid_to_str): Constify.
3904 * corelow.c (core_pid_to_str): Constify.
3905 * darwin-nat.c (darwin_pid_to_str): Constify.
3906 * fbsd-nat.c (fbsd_pid_to_str): Constify.
3907 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
3908 Constify.
3909 * gnu-nat.c (gnu_pid_to_str): Constify.
3910 * go32-nat.c (go32_pid_to_str): Constify.
3911 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
3912 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
3913 * inferior.c (inferior_pid_to_str): Constify.
3914 * linux-nat.c (linux_nat_pid_to_str): Constify.
3915 * linux-tdep.c (linux_core_pid_to_str): Constify.
3916 * linux-thread-db.c (thread_db_pid_to_str)
3917 (thread_db_extra_thread_info): Constify.
3918 * nto-tdep.c (nto_extra_thread_info): Constify.
3919 * nto-tdep.h (nto_extra_thread_info): Constify.
3920 * obsd-nat.c (obsd_pid_to_str): Constify.
3921 * procfs.c (procfs_pid_to_str): Constify.
3922 * ravenscar-thread.c (ravenscar_extra_thread_info)
3923 (ravenscar_pid_to_str): Constify.
3924 * remote-sim.c (gdbsim_pid_to_str): Constify.
3925 * remote.c (remote_threads_extra_info, remote_pid_to_str):
3926 Constify.
3927 * sol-thread.c (solaris_pid_to_str): Constify.
3928 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
3929 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
3930 * target.c (default_pid_to_str, target_pid_to_str)
3931 (normal_pid_to_str, default_pid_to_str): Constify.
3932 * target.h (target_ops::to_pid_to_str)
3933 (target_ops::to_extra_thread_info): Constify.
3934 (target_pid_to_str, normal_pid_to_str): Constify.
3935 * windows-nat.c (windows_pid_to_str): Constify.
3936 * gdbarch.sh (core_pid_to_str): Constify.
3937 * target-delegates.c: Regenerate.
3938 * gdbarch.h, gdbarch.c: Regenerate.
3939
69bbf465
PA
39402017-04-05 Pedro Alves <palves@redhat.com>
3941
3942 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
3943 the memory of the temporary warning_pre_print override.
3944 * utils.c (warning_pre_print): Constify.
3945 * utils.h (warning_pre_print): Constify.
3946
be47f9e8
PA
39472017-04-05 Pedro Alves <palves@redhat.com>
3948
3949 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
3950 (shell_command): New function.
3951 (make_command): Use std::string.
3952 (init_cli_cmds): Register shell_command instead of shell_escape.
3953
bde6261a
PA
39542017-04-05 Pedro Alves <palves@redhat.com>
3955
3956 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
3957 * tracepoint.c (default_collect): Don't initialize.
3958
b38ef47f
PA
39592017-04-05 Pedro Alves <palves@redhat.com>
3960
3961 * macroexp.c (macro_buffer::shared): Now a bool.
3962 (init_buffer): Update.
3963 (init_shared_buffer): Constify 'addr' parameter.
3964 (substitute_args, expand, macro_expand, macro_expand_next): Remove
3965 casts.
3966
f995bbe8
PA
39672017-04-05 Pedro Alves <palves@redhat.com>
3968
3969 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
3970 * disasm.c (set_disassembler_options): Constify local.
3971 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
3972
4a596fe2
SDJ
39732017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
3974
3975 PR gdb/21352
3976 * tracefile.c (tsave_command): Fix argument parsing for '-r'
3977 option.
3978
2cad08ea
YQ
39792017-04-05 Yao Qi <yao.qi@linaro.org>
3980
3981 * frame.c (frame_unwind_register_unsigned): Call
3982 frame_unwind_register_value.
3983
55a98976
YQ
39842017-04-05 Yao Qi <yao.qi@linaro.org>
3985
3986 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
3987 Use gdb_test_multiple, and don't match anchor.
3988
4ac40124
PA
39892017-04-05 Pedro Alves <palves@redhat.com>
3990
3991 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
3992 (Write After Approval): Remove Simon Marchi.
3993
c053b654
PA
39942017-04-05 Pedro Alves <palves@redhat.com>
3995
3996 * common/gdb_optional.h (optional::optional): Make constexpr and
3997 initialize m_dummy.
3998
4c7bf4f9
JB
39992017-04-04 John Baldwin <jhb@FreeBSD.org>
4000
4001 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
4002 (amd64fbsd_jmp_buf_reg_offset): Remove.
4003 (amd64fbsd_supply_uthread): Remove function.
4004 (amd64fbsd_collect_uthread): Remove function.
4005 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
4006 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
4007 (x86_64-*-freebsd*): Remove bsd-uthread.o.
4008 (fbsd-nat.c): Update comment.
4009 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
4010 (i386fbsd_jmp_buf_reg_offset): Remove.
4011 (i386fbsd_supply_uthread): Remove function.
4012 (i386fbsd_collect_uthread): Remove function.
4013 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
4014
1e1a8bef
JB
40152017-04-04 John Baldwin <jhb@FreeBSD.org>
4016
4017 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
4018 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
4019 * NEWS: Mention that support for FreeBSD/alpha was removed.
4020 * alpha-fbsd-tdep.c: Delete file.
4021 * config/alpha/fbsd.mh: Delete file.
4022 * configure.host: Delete alpha*-*-freebsd* and
4023 alpha*-*-kfreebsd*-gnu.
4024 * configure.tgt: Delete alpha*-*-freebsd* and
4025 alpha*-*-kfreebsd*-gnu.
4026
49907934
JB
40272017-04-04 John Baldwin <jhb@FreeBSD.org>
4028
4029 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
4030 amd64bsd_store_inferior_registers): Use ptid from regcache.
4031
6f77053d
PA
40322017-04-04 Pedro Alves <palves@redhat.com>
4033
4034 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
4035 data fields, make them private and add "m_" prefixes.
4036 (lnp_state_machine::lnp_state_machine): New ctor.
4037 (record_line, check_line_address, handle_set_discriminator)
4038 (handle_set_address, handle_advance_pc, handle_special_opcode)
4039 (handle_advance_line, handle_set_file, handle_negate_stmt)
4040 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
4041 (end_sequence, advance_line): New methods.
4042 (m_gdbarch, m_record_lines_p): New fields.
4043 (lnp_reader_state): Delete.
4044 (dwarf_record_line): Rename to ...
4045 (lnp_state_machine::record_line): ... adjust.
4046 (init_lnp_state_machine): Delete.
4047 (lnp_state_machine::lnp_state_machine): New.
4048 (check_line_address): Rename to ...
4049 (lnp_state_machine::check_line_address): This.
4050 (dwarf_decode_lines_1): Remove reference to "reader_state".
4051 Adjust lnp_state_machine having a non-default ctor. Use bool.
4052 State machine internal state manipulation moved to
4053 lnp_state_machine methods.
4054
9c541725
PA
40552017-04-04 Pedro Alves <palves@redhat.com>
4056
4057 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4058 unittests/offset-type-selftests.c.
4059 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
4060 * common/offset-type.h: New file.
4061 * common/preprocessor.h: New file.
4062 * common/traits.h: New file.
4063 * common/valid-expr.h: New file.
4064 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
4065 sect_offset and cu_offset strong typedefs throughout.
4066 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
4067 typedefs throughout.
4068 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
4069 sect_offset and cu_offset strong typedefs throughout.
4070 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
4071 typedefs throughout.
4072 * gdbtypes.h: Include "common/offset-type.h".
4073 (cu_offset): Now an offset type (strong typedef) instead of a
4074 struct.
4075 (sect_offset): Likewise.
4076 (union call_site_parameter_u): Rename "param_offset" field to
4077 "param_cu_off".
4078 * unittests/offset-type-selftests.c: New file.
4079
ecfb656c
PA
40802017-04-04 Pedro Alves <palves@redhat.com>
4081
4082 * common/underlying.h: New file.
4083 * dwarf2read.c: Include "common/gdb_optional.h" and
4084 "common/underlying.h".
4085 (dir_index, file_name_index): New types.
4086 (file_entry): Use them.
4087 (file_entry::include): Use to_underlying.
4088 (line_header::add_file_name): Use dir_index.
4089 (read_formatted_entries): Use gdb::optional. Read form before
4090 writting to file_entry.
4091 (dwarf_decode_line_header): Use dir_index.
4092 (lnp_state_machine::current_file): Use to_underlying.
4093 (lnp_state_machine::file): Change type to file_name_index.
4094 (dwarf_record_line): Use to_underlying.
4095 (init_lnp_state_machine): Use file_name_index.
4096 (dwarf_decode_lines_1): Use dir_index and file_name_index.
4097
d194f1fe
PA
40982017-04-04 Pedro Alves <palves@redhat.com>
4099
4100 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
4101 operator bool, has_value and get methods.
4102
fff8551c
PA
41032017-04-04 Pedro Alves <palves@redhat.com>
4104
4105 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
4106 fields.
4107 (line_header): Initialize all data fields. Change type of
4108 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
4109 Change type of include_dirs to std::vector<const char *>. Remove
4110 num_include_dirs, include_dirs_size. Change type of file_names to
4111 std::vector<file_entry>. Remove num_file_names, file_names_size.
4112 (line_header::line_header): New.
4113 (line_header::add_include_dir, line_header::add_file_name): New
4114 methods.
4115 (line_header::include_dir_at): Remove NULL check.
4116 (line_header::file_name_at): Add const overload.
4117 (line_header_up): New unique_ptr typedef.
4118 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
4119 std::vector. Remove free_line_header call.
4120 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
4121 free_line_header call.
4122 (free_cu_line_header): Delete.
4123 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
4124 (setup_type_unit_groups): Use line_header_up instead of cleanups.
4125 Adjust to use std::vector.
4126 (free_line_header): Delete.
4127 (free_line_header_voidp): Use delete.
4128 (add_include_dir): Replace with ...
4129 (line_header::add_include_dir): ... this method. Use std::vector.
4130 (add_file_name): Replace with ...
4131 (line_header::add_file_name): ... this method. Use std::vector.
4132 (add_include_dir_stub): Delete.
4133 (read_formatted_entries): Remove memset.
4134 (dwarf_decode_line_header): Return a line_header_up instead of a
4135 raw pointer. Remove cleanup handling. Pass lambdas to
4136 read_formatted_entries. Adjust to use line_header methods.
4137 (dwarf_decode_lines_1): Adjust to use line_header methods.
4138 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
4139 use std::vector.
4140
d62a8ae2
SM
41412017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
4142
4143 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
4144 instead of struct ptid.
4145
db3a1dc7
AH
41462017-05-04 Alan Hayward <alan.hayward@arm.com>
4147
4148 * frame.c (get_frame_register_bytes): Unwind using value.
4149 (put_frame_register_bytes): Likewise.
4150
b1b45502
IB
41512017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
4152
4153 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
4154 aggregate-like.
4155
ec13808e
JK
41562017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
4157
4158 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
4159
12316564
YQ
41602017-03-29 Yao Qi <yao.qi@linaro.org>
4161
4162 * gdbthread.h (struct thread_info): Declare constructor and
4163 destructor. Add some in-class member initializers.
4164 * thread.c (free_thread): Remove.
4165 (init_thread_list): Call delete instead of free_thread.
4166 (new_thread): Call thread_info constructor.
4167 (thread_info::thread_info): New function.
4168 (thread_info::~thread_info): New function.
4169 (delete_thread_1): Call delete instead of free_thread.
4170 (make_cleanup_restore_current_thread): Move tp and frame to
4171 inner block.
4172
fe5f7374
AK
41732017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4174
4175 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
4176 (arc_skip_prologue): Likewise.
4177 (arc_make_frame_cache): Likewise.
4178 (arc_pv_get_operand): New function.
4179 (arc_is_in_prologue): Likewise.
4180 (arc_analyze_prologue): Likewise.
4181 (arc_print_frame_cache): Likewise.
4182 (MAX_PROLOGUE_LENGTH): New constant.
4183
eea78757
AK
41842017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4185
4186 * configure.tgt: Add arc-insn.o.
4187 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
4188 (dump_arc_instruction_command): New function.
4189 (arc_fprintf_disasm): Likewise.
4190 (arc_disassemble_info): Likewise.
4191 (arc_insn_get_operand_value): Likewise.
4192 (arc_insn_get_operand_value_signed): Likewise.
4193 (arc_insn_get_memory_base_reg): Likewise.
4194 (arc_insn_get_memory_offset): Likewise.
4195 (arc_insn_get_branch_target): Likewise.
4196 (arc_insn_dump): Likewise.
4197 (arc_insn_get_linear_next_pc): Likewise.
4198 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
4199 (arc_disassemble_info): Likewise.
4200 (arc_insn_get_branch_target): Likewise.
4201 (arc_insn_get_linear_next_pc): Likewise.
4202 * NEWS: Mention new "maint print arc arc-instruction".
4203
3be78afd
AK
42042017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4205
4206 * arc-tdep (maintenance_print_arc_list): New variable.
4207 (maintenance_print_arc_command): New function.
4208
296ec4fa
AK
42092017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
4210
4211 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
4212 Add "limm" and "reserved".
4213 (arc_cannot_fetch_register, arc_cannot_store_register): Add
4214 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
4215 * arc-tdep.h (arc_regnum): Likewise.
4216
f74f865e
MF
42172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4218
4219 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4220 for THREADPTR register.
4221 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
4222 register.
4223 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
4224 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
4225 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
4226
0d0bf81a
MF
42272017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4228
4229 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
4230 registers above gdbarch_num_regs (gdbarch) as privileged in
4231 call0 ABI.
4232
0ce4291e
MF
42332017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4234
4235 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4236 for a single specified register or for all registers in
4237 a0_base..a0_base + C0_NREGS range.
4238 (supply_gregset_reg): Call regcache_raw_supply for a single
4239 specified register or for all registers in a0_base..a0_base +
4240 C0_NREGS range.
4241
c56054f9
MF
42422017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4243
4244 * arch/xtensa.h (C0_NREGS): Add definition.
4245 * xtensa-tdep.c (C0_NREGS): Remove definition.
4246
a4398628
MF
42472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4248
4249 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
4250 Drop xtensa_default_isa initialization.
4251 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
4252
8c43009f
PA
42532017-03-27 Pedro Alves <palves@redhat.com>
4254
4255 * dwarf2read.c (file_entry) <dir_index>: Add comment.
4256 (file_entry::include_dir): New method.
4257 (line_header::include_dir_at, line_header::file_name_at): New
4258 methods.
4259 (setup_type_unit_groups, setup_type_unit_groups)
4260 (psymtab_include_file_name): Simplify using the new methods.
4261 (lnp_state_machine) <the_line_header>: New field.
4262 <file>: Add comment.
4263 (lnp_state_machine::current_file): New method.
4264 (dwarf_record_line): Simplify using the new methods.
4265 (init_lnp_state_machine): Initialize the "the_line_header" field.
4266 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
4267 Simplify using the new methods.
4268
a7e80b9e
PA
42692017-03-27 Pedro Alves <palves@redhat.com>
4270
4271 * cp-name-parser.y (make_empty): Delete.
4272 (demangler_special, nested_name, ptr_operator, array_indicator)
4273 (direct_declarator, declarator_1): Use fill_comp instead of
4274 make_empty.
4275
21047726
PA
42762017-03-27 Pedro Alves <palves@redhat.com>
4277
4278 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
4279 to ATTRIBUTE_PRINTF.
4280 * solib-target.c (library_list_start_list): Print "string" not
4281 "version".
4282 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
4283 gdb_xml_error call.
4284
d721ba37
PA
42852017-03-27 Pedro Alves <palves@redhat.com>
4286
4287 * dwarf2read.c (struct file_and_directory): New.
4288 (dwarf2_get_dwz_file): Adjust to use std::string.
4289 (dw2_get_file_names_reader): Adjust to use file_and_directory.
4290 (find_file_and_directory): Adjust to return a file_and_directory
4291 object.
4292 (read_file_scope): Adjust to use file_and_directory. Remove
4293 make_cleanup/do_cleanups calls.
4294 (open_and_init_dwp_file): Adjust to use std::string. Remove
4295 make_cleanup/do_cleanups calls.
4296 * python/python.c (do_start_initialization): Adjust to ldirname
4297 returning a std::string.
4298 * utils.c (ldirname): Now returns a std::string.
4299 * utils.h (ldirname): Change return type to std::string.
4300 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
4301 returning a std::string.
4302 * xml-tdesc.c (file_read_description_xml): Likewise.
4303
ed771251
AH
43042017-03-24 Alan Hayward <alan.hayward@arm.com>
4305
4306 * regcache.c (regcache_debug_print_register): New function.
4307 * regcache.h (regcache_debug_print_register): New declaration.
4308 * target.c (debug_print_register): Remove.
4309 (target_fetch_registers): Call regcache_debug_print_register.
4310 (target_store_registers): Likewise.
4311
568c1b9f
PB
43122017-03-24 Pádraig Brady <pbrady@fb.com>
4313
4314 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
4315 reference beyond the 'lh->include_dirs' array before accessing to
4316 it.
4317 (psymtab_include_file_name): Likewise.
4318 (dwarf_decode_lines_1): Likewise.
4319 (dwarf_decode_lines): Likewise.
4320 (file_file_name): Likewise.
4321
3e00d44f
SM
43222017-03-23 Simon Marchi <simon.marchi@ericsson.com>
4323
4324 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
4325 inferior_ptid.
4326 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4327 ps_lsetfpregs): Likewise.
4328 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
4329 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4330 ps_lsetfpregs): Likewise.
4331 * target.c (target_fetch_registers, target_store_registers):
4332 Remove asserts.
4333
077ae656
AH
43342017-03-23 Alan Hayward <alan.hayward@arm.com>
4335
4336 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
4337
1e2b521d
YQ
43382017-03-23 Yao Qi <yao.qi@linaro.org>
4339
4340 * aarch64-tdep.c (aarch64_process_record_test): Declare.
4341 (_initialize_aarch64_tdep): Register it.
4342 (aarch64_record_load_store): Handle PRFM instruction.
4343 (aarch64_process_record_test): New function.
4344
33877125
YQ
43452017-03-23 Yao Qi <yao.qi@linaro.org>
4346
4347 * aarch64-tdep.c (aarch64_record_load_store): Fix code
4348 indentation.
4349
a0eef940
YQ
43502017-03-23 Yao Qi <yao.qi@linaro.org>
4351
4352 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
4353
3f2a3564
PR
43542017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4355
4356 python/python.c (do_start_initialization): Fix memory leak.
4357
b67aeab0
SM
43582017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
4359
4360 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
4361 using get_ptrace_pid.
4362 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
4363 inferior_ptid.
4364 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
4365 inferior_ptid instead of pid.
4366
ffdbe864
YQ
43672017-03-22 Yao Qi <yao.qi@linaro.org>
4368
4369 * aarch64-tdep.c: Wrap locally used classes in anonymous
4370 namespace.
4371 * arm-tdep.c: Likewise.
4372 * linespec.c: Likewise.
4373 * ui-out.c: Likewise.
4374
9d736fbf
JG
43752017-03-22 Jonah Graham <jonah@kichwacoders.com>
4376
4377 PR gdb/19637
4378 * python/lib/gdb/printer/bound_registers.py: Import sys.
4379
3de88e9a
SM
43802017-03-21 Simon Marchi <simon.marchi@ericsson.com>
4381
4382 * windows-nat.c (do_windows_fetch_inferior_registers): Add
4383 windows_thread_info parameter and use it instead of
4384 current_thread.
4385 (windows_fetch_inferior_registers): Don't set current_thread,
4386 pass the thread to do_windows_fetch_inferior_registers. Use
4387 ptid from regcache instead of inferior_ptid.
4388 (do_windows_store_inferior_registers): Add windows_thread_info
4389 parameter and use it instead of current_thread.
4390 (windows_store_inferior_registers): Don't set current_thread,
4391 pass the thread to do_windows_store_inferior_registers. Use
4392 ptid from regcache instead of inferior_ptid.
4393
0e7b8f61
SM
43942017-03-21 Simon Marchi <simon.marchi@ericsson.com>
4395
4396 * ser-mingw.c (ser_windows_raw): Remove reference to
4397 struct serial::current_timeout.
4398
5badf10a
IR
43992017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
4400
4401 PR tdep/20928
4402 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
4403 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
4404 (sparc64_fsr_type): Fix %fsr decoding.
4405
cee59b3f
TW
44062017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
4407
4408 * python/py-record-btrace.c (btpy_insn_data): Change return type
4409 for Python 2.
4410
639a9038
SM
44112017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
4412
4413 * spu-linux-nat.c (spu_fetch_inferior_registers,
4414 spu_store_inferior_registers): Use ptid from regcache, set and
4415 restore inferior_ptid.
4416 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
4417 Likewise.
4418
bcc0c096
SM
44192017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
4420
4421 * i386-linux-nat.c (fetch_register, store_register,
4422 i386_linux_fetch_inferior_registers,
4423 i386_linux_store_inferior_registers): Use ptid from regcache.
4424 * ia64-linux-nat.c (ia64_linux_fetch_register,
4425 ia64_linux_store_register): Likewise.
4426 * inf-ptrace.c (inf_ptrace_fetch_register,
4427 inf_ptrace_store_register): Likewise.
4428 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
4429 m32r_linux_store_inferior_registers): Likewise.
4430 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
4431 m68kbsd_store_inferior_registers): Likewise.
4432 * m68k-linux-nat.c (fetch_register, store_register,
4433 m68k_linux_fetch_inferior_registers,
4434 m68k_linux_store_inferior_registers): Likewise.
4435 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
4436 m88kbsd_store_inferior_registers): Likewise.
4437 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
4438 mips_fbsd_store_inferior_registers): Likewise.
4439 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
4440 mips64_linux_regsets_store_registers): Likewise.
4441 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
4442 mipsnbsd_store_inferior_registers): Likewise.
4443 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
4444 mips64obsd_store_inferior_registers): Likewise.
4445 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
4446 Likewise.
4447 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
4448 ppcfbsd_store_inferior_registers): Likewise.
4449 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
4450 ppc_linux_store_inferior_registers): Likewise.
4451 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
4452 ppcnbsd_store_inferior_registers): Likewise.
4453 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
4454 ppcobsd_store_registers): Likewise.
4455 * procfs.c (procfs_fetch_registers, procfs_store_registers):
4456 Likewise.
4457 * ravenscar-thread.c (ravenscar_fetch_registers,
4458 ravenscar_store_registers, ravenscar_prepare_to_store):
4459 Likewise.
4460 * record-btrace.c (record_btrace_fetch_registers,
4461 record_btrace_store_registers, record_btrace_prepare_to_store):
4462 Likewise.
4463 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
4464 Lookup inferior using ptid from regcache, instead of
4465 current_inferior.
4466 * remote.c (remote_fetch_registers, remote_store_registers): Use
4467 ptid from regcache.
4468 * rs6000-nat.c (fetch_register, store_register): Likewise.
4469 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
4470 s390_linux_store_inferior_registers): Likewise.
4471 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
4472 shnbsd_store_inferior_registers): Likewise.
4473 * sol-thread.c (sol_thread_fetch_registers,
4474 sol_thread_store_registers): Likewise.
4475 * sparc-nat.c (sparc_fetch_inferior_registers,
4476 sparc_store_inferior_registers): Likewise.
4477 * tilegx-linux-nat.c (fetch_inferior_registers,
4478 store_inferior_registers): Likewise.
4479 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
4480 vaxbsd_store_inferior_registers): Likewise.
4481 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
4482 store_xtregs): Likewise.
4483
c0f55cc6
AV
44842017-03-20 Artemiy Volkov <artemiyv@acm.org>
4485
4486 PR gdb/14441
4487 * NEWS: Mention support for rvalue references in GDB and python.
4488 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
4489 supports both lvalue and rvalue references.
4490
15c0a2a9
AV
44912017-03-20 Artemiy Volkov <artemiyv@acm.org>
4492
4493 PR gdb/14441
4494 * gdbtypes.c (rank_one_type): Implement overloading
4495 resolution rules regarding rvalue references.
4496
aa006118
AV
44972017-03-20 Artemiy Volkov <artemiyv@acm.org>
4498
4499 PR gdb/14441
4500 * aarch64-tdep.c (aarch64_type_align)
4501 (aarch64_extract_return_value, aarch64_store_return_value): Change
4502 lvalue reference type checks to general reference type checks.
4503 * amd64-tdep.c (amd64_classify): Likewise.
4504 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
4505 Likewise.
4506 * arm-tdep.c (arm_type_align, arm_extract_return_value)
4507 (arm_store_return_value): Likewise.
4508 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
4509 * c-typeprint.c (c_print_type): Likewise.
4510 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
4511 (cplus_number_of_children, cplus_describe_child): Likewise.
4512 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4513 * completer.c (expression_completer): Likewise.
4514 * cp-support.c (make_symbol_overload_list_adl_namespace):
4515 Likewise.
4516 * darwin-nat-info.c (info_mach_region_command): Likewise.
4517 * dwarf2loc.c (entry_data_value_coerce_ref)
4518 (value_of_dwarf_reg_entry): Likewise.
4519 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
4520 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
4521 Likewise.
4522 * findvar.c (extract_typed_address, store_typed_address):
4523 Likewise.
4524 * gdbtypes.c (rank_one_type): Likewise.
4525 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
4526 * infcall.c (value_arg_coerce): Likewise.
4527 * language.c (pointer_type): Likewise.
4528 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
4529 Likewise.
4530 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
4531 * mn10300-tdep.c (mn10300_type_align): Likewise.
4532 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
4533 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
4534 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
4535 Likewise.
4536 * printcmd.c (print_formatted, x_command): Likewise.
4537 * python/py-type.c (typy_get_composite, typy_template_argument):
4538 Likewise.
4539 * python/py-value.c (valpy_referenced_value)
4540 (valpy_get_dynamic_type, value_has_field): Likewise.
4541 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
4542 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
4543 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
4544 * spu-tdep.c (spu_scalar_value_p): Likewise.
4545 * symtab.c (lookup_symbol_aux): Likewise.
4546 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
4547 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
4548 Likewise.
4549 * valops.c (value_cast_pointers, value_cast)
4550 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
4551 (value_struct_elt, value_struct_elt_bitpos)
4552 (value_find_oload_method_list, find_overload_match)
4553 (value_rtti_indirect_type): Likewise.
4554 * valprint.c (val_print_scalar_type_p, generic_val_print):
4555 Likewise.
4556 * value.c (value_actual_type, value_as_address, unpack_long)
4557 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
4558 (coerce_ref): Likewise.
4559 * varobj.c (varobj_get_value_type): Likewise.
4560
3fcf899d
AV
45612017-03-20 Artemiy Volkov <artemiyv@acm.org>
4562
4563 PR gdb/14441
4564 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
4565 table of constants.
4566 * python/lib/gdb/command/explore.py: Support exploring values
4567 of rvalue reference types.
4568 * python/lib/gdb/types.py: Implement get_basic_type() for
4569 rvalue reference types.
4570 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
4571 constant.
4572 * python/py-value.c (valpy_getitem): Add an rvalue reference
4573 check.
4574 (valpy_reference_value): Add new parameter "refcode".
4575 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
4576 New wrappers for valpy_reference_value().
4577 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
4578 (gdbpy_invoke_xmethod): Likewise.
4579
4297a3f0
AV
45802017-03-20 Artemiy Volkov <artemiyv@acm.org>
4581
4582 PR gdb/14441
4583 * dwarf2read.c (process_die, read_type_die_1): Handle the
4584 DW_TAG_rvalue_reference_type DIE.
4585 (read_tag_reference_type): Add new parameter "refcode".
4586
e1cb3213
AV
45872017-03-20 Artemiy Volkov <artemiyv@acm.org>
4588
4589 PR gdb/14441
4590 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
4591 (c_type_print_modifier, c_type_print_varspec_suffix)
4592 (c_type_print_base): Support printing rvalue reference types.
4593 * c-valprint.c (c_val_print, c_value_print): Support printing
4594 rvalue reference values.
4595
e4347c89
AV
45962017-03-20 Artemiy Volkov <artemiyv@acm.org>
4597
4598 PR gdb/14441
4599 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
4600 typename.
4601 * cp-support.c (replace_typedefs): Handle
4602 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
4603 * python/py-type.c (typy_lookup_type): Likewise.
4604
53cc15f5
AV
46052017-03-20 Artemiy Volkov <artemiyv@acm.org>
4606
4607 PR gdb/14441
4608 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
4609 * parse.c (insert_type): Change assert statement.
4610 (follow_types): Handle rvalue reference types.
4611 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
4612 constant.
4613
a65cfae5
AV
46142017-03-20 Artemiy Volkov <artemiyv@acm.org>
4615
4616 PR gdb/14441
4617 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
4618 value_ref() interface.
4619 * c-valprint.c (c_value_print): Likewise.
4620 * infcall.c (value_arg_coerce): Likewise.
4621 * python/py-value.c (valpy_reference_value): Likewise.
4622 * valops.c (value_cast, value_reinterpret_cast)
4623 (value_dynamic_cast, typecmp): Likewise.
4624 (value_ref): Parameterize by kind of return value reference type.
4625 * value.h (value_ref): Add new parameter "refcode".
4626
3b224330
AV
46272017-03-20 Artemiy Volkov <artemiyv@acm.org>
4628
4629 PR gdb/14441
4630 * dwarf2read.c (read_tag_reference_type): Use
4631 lookup_lvalue_reference_type() instead of lookup_reference_type().
4632 * eval.c (evaluate_subexp_standard): Likewise.
4633 * f-exp.y: Likewise.
4634 * gdbtypes.c (make_reference_type, lookup_reference_type):
4635 Generalize with rvalue reference types.
4636 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
4637 convenience wrappers for lookup_reference_type().
4638 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
4639 reference kind parameter.
4640 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
4641 wrappers for lookup_reference_type().
4642 * guile/scm-type.c (gdbscm_type_reference): Use
4643 lookup_lvalue_reference_type() instead of lookup_reference_type().
4644 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
4645 * parse.c (follow_types): Likewise.
4646 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
4647 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
4648 Likewise.
4649 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
4650 (gdbpy_invoke_xmethod): Likewise.
4651 * stabsread.c: Provide extra argument to make_reference_type()
4652 call.
4653 * valops.c (value_ref, value_rtti_indirect_type): Use
4654 lookup_lvalue_reference_type() instead of lookup_reference_type().
4655
f9aeb8d4
AV
46562017-03-20 Artemiy Volkov <artemiyv@acm.org>
4657
4658 PR gdb/14441
4659 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
4660 (TYPE_IS_REFERENCE): New macro.
4661 (struct type): Add rvalue_reference_type field.
4662 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
4663
51457a05
MAL
46642017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
4665
4666 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
4667 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
4668 New function definition.
4669 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
4670 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
4671 New function declaration.
4672 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
4673 * mi/mi-interp.h: New file.
4674 * solib.c (info_sharedlibrary_command): Replace for loop with
4675 ALL_SO_LIBS macro
4676 * solib.h (update_solib_list): New function declaration.
4677 (so_list_head): Move macro.
4678 * solist.h (ALL_SO_LIBS): New macro.
4679
e696b3ad
MAL
46802017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
4681
4682 * infcmd.c (post_create_inferior): Remove unused argument in
4683 call to solib_add.
4684 * remote.c (remote_start_remote): Likewise.
4685 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
4686 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
4687 (enable_break): Likewise.
4688 * solib.c (update_solib_list): Remove unused target argument
4689 and its documentation.
4690 (solib_add): Remove unused target argument. Remove unused
4691 argument in call to update_solib_list.
4692 (info_sharedlibrary_command): Remove unused argument in call
4693 to update_solib_list.
4694 (sharedlibrary_command): Remove unused argument in call to
4695 solib_add.
4696 (handle_solib_event): Likewise.
4697 (reload_shared_libraries): Likewise.
4698 * solib.h (solib_add): Remove unused target argument.
4699
dcb84eda
AA
47002017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
4701
4702 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
4703 (s390_displaced_step_fixup): Cover relative branches with the
4704 default fixup handling. This fixes lack of support for some
4705 relative branch instructions.
4706
d9cb6cdc
SM
47072017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4708
4709 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
4710 ptid from regcache.
4711
1afaf9f4
SM
47122017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4713
4714 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
4715 i386_darwin_store_inferior_registers): Use ptid from regcache.
4716
aac12e24
SM
47172017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4718
4719 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
4720 i386bsd_store_inferior_registers): Use ptid from regcache.
4721
bbe1eef1
SM
47222017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4723
4724 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
4725 hppaobsd_store_registers): Use ptid from regcache.
4726
10799020
SM
47272017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4728
4729 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
4730 hppanbsd_store_registers): Use ptid from regcache.
4731
00204cf7
SM
47322017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4733
4734 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
4735 from regcache. Use get_ptrace_pid.
4736
11a33714
SM
47372017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4738
4739 * corelow.c (get_core_register_section): Use ptid from regcache,
4740 update doc.
4741
317cd492
SM
47422017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4743
4744 * bsd-uthread.c (bsd_uthread_fetch_registers,
4745 bsd_uthread_store_registers): Use ptid from regcache, set and
4746 restore inferior_ptid.
4747
9ac8a7c2
SM
47482017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4749
4750 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
4751 fetch_fp_regs, store_register, store_regs, store_fp_register,
4752 store_fp_regs): Use ptid from regcache.
4753
4ac4bb6a
SM
47542017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4755
4756 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
4757 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
4758 store_vfp_regs): Use ptid from regcache.
4759
9bcbdca8
PA
47602017-03-17 Pedro Alves <palves@redhat.com>
4761
4762 PR remote/21188
4763 * ser-base.c (ser_base_wait_for): Add comment.
4764 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
4765 version.
4766 * ser-unix.c (hardwire_raw): Remove reference to
4767 scb->current_timeout.
4768 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
4769 (hardwire_ops): Install ser_base_readchar instead of
4770 hardwire_readchar.
4771 * serial.h (struct serial) <current_timeout, timeout_remaining>:
4772 Remove fields.
4773
7503099f
JG
47742017-03-17 Jonah Graham <jonah@kichwacoders.com>
4775
4776 PR gdb/19637
4777 * python/lib/gdb/printer/bound_registers.py: Add support for
4778 Python 3.
4779
7942e96e
AA
47802017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4781
4782 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
4783 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
4784 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
4785 byte_offset to subobj_byte_offset. Fix the handling of
4786 DWARF_VALUE_STACK on big-endian targets when coming via an
4787 implicit pointer.
4788 (dwarf2_evaluate_loc_desc): Adjust call to
4789 dwarf2_evaluate_loc_desc_full.
4790 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
4791 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
4792
ba14f379
YQ
47932017-03-16 Yao Qi <yao.qi@linaro.org>
4794
4795 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
4796 and REVSH instructions.
4797
b121eeb9
YQ
47982017-03-16 Yao Qi <yao.qi@linaro.org>
4799
4800 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
4801 (arm_record_test): Declare.
4802 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
4803 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
4804 align with the manual.
4805 (thumb_record_misc): Adjust the code order to align with the
4806 manual.
4807 (thumb2_record_decode_insn_handler): Fix instruction matching.
4808 (instruction_reader_thumb): New class.
4809 (arm_record_test): New function.
4810
728a7913
YQ
48112017-03-16 Yao Qi <yao.qi@linaro.org>
4812
4813 * arm-tdep.c (abstract_memory_reader): New class.
4814 (instruction_reader): New class.
4815 (extract_arm_insn): Add argument 'reader'. Callers updated.
4816 (decode_insn): Likewise.
4817
34b43320
DE
48182017-03-16 Doug Evans <dje@google.com>
4819
a7c0469f
DE
4820 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
4821 member. Change type of TYPE member to SCM. All uses updated.
4822 (lsscm_make_lazy_string_smob): Add assert.
4823 (lsscm_make_lazy_string): Flag bad length values.
4824 (lsscm_elt_type): New function.
4825 (gdbscm_lazy_string_to_value): Rewrite to use
4826 lsscm_safe_lazy_string_to_value.
4827 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
4828 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
4829 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
4830 in incoming type.
4831 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
4832 * guile/scm-type.c (tyscm_scm_to_type): New function.
4833
48342017-03-15 Doug Evans <dje@google.com>
4835
34b43320
DE
4836 PR python/17728, python/18439, python/18779
4837 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
4838 member. Change type of TYPE member to PyObject *. All uses updated.
4839 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
4840 (gdbpy_create_lazy_string_object): Flag bad length values.
4841 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
4842 Handle typedefs in incoming type.
4843 (stpy_lazy_string_elt_type): New function.
4844 (gdbpy_extract_lazy_string): Call it.
4845 * python/py-value.c (valpy_lazy_string): Flag bad length values.
4846 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
4847 typedefs in incoming type.
4848
a3a5fecc
DE
48492017-03-16 Doug Evans <dje@google.com>
4850
4851 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
4852 * guile/scm-type.c (tyscm_scm_to_type): New function.
4853
28f1c605
JW
48542017-03-16 Jiong Wang <jiong.wang@arm.com>
4855
4856 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
4857 "ULONGEST" for "skip".
4858
87c336f6
AA
48592017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
4860
4861 PR gdb/21220
4862 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
4863 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
4864 (inf_ptrace_peek_poke): ...here. New function. Now also loop
4865 over ptrace peek/poke until end of buffer or error.
4866
cf81cf60
SM
48672017-03-14 Simon Marchi <simon.marchi@ericsson.com>
4868
4869 * parse.c (length_of_subexp): Make static.
4870 * parser-defs.h (length_of_subexp): Remove.
4871
a379284a
AA
48722017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
4873
4874 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
4875 as well.
4876
8a6200ba
PA
48772017-03-14 Pedro Alves <palves@redhat.com>
4878
4879 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
4880 (main): Use std::unique_ptr. Remove calls to
4881 cp_demangled_name_parse_free.
4882
f79ec206
SM
48832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4884
4885 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
4886 alphabsd_store_inferior_registers): Use regcache->ptid instead
4887 of inferior_ptid.
4888
edb5fb00
SM
48892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4890
4891 * aix-thread.c (aix_thread_fetch_registers,
4892 aix_thread_store_registers): Use regcache->ptid instead of
4893 inferior_ptid.
4894
55119686
SM
48952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4896
4897 * aarch64-linux-nat.c (fetch_gregs_from_thread,
4898 store_gregs_to_thread, fetch_fpregs_from_thread,
4899 store_fpregs_to_thread): Use regcache->ptid instead of
4900 inferior_ptid.
4901
6a06fbb7
SM
49022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4903
4904 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
4905 amd64_linux_fetch_inferior_registers): Use regcache->ptid
4906 instead of inferior_ptid.
4907
c6386875
SM
49082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4909
4910 * target.c (target_fetch_registers, target_store_registers): Add
4911 assert.
4912
ddaaf0fb
SM
49132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4914
4915 * regcache.h (regcache_get_ptid): New function.
4916 * regcache.c (regcache_get_ptid): New function.
4917
b9da89d1 49182017-03-13 Mark Wielaard <mark@klomp.org>
4919
4920 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
4921
5f4d1085
KS
49222017-03-10 Keith Seitz <keiths@redhat.com>
4923
4924 PR c++/8218
4925 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
4926
c65d6b55
PA
49272017-03-08 Pedro Alves <palves@redhat.com>
4928
4929 PR gdb/18360
4930 * infrun.c (start_step_over, do_target_resume, resume)
4931 (restart_threads): Assert we're not resuming a thread that is
4932 meant to be stopped.
4933 (infrun_thread_stop_requested_callback): Delete.
4934 (infrun_thread_stop_requested): If the thread is internally
4935 stopped, queue a pending stop event and clear the thread's
4936 inline-frame state.
4937 (handle_stop_requested): New function.
4938 (handle_syscall_event, handle_inferior_event_1): Use
4939 handle_stop_requested.
4940 (handle_stop_requested): New function.
4941 (handle_signal_stop): Set the thread's stop_signal here instead of
4942 at caller.
4943 (finish_step_over): Clear step over info unconditionally.
4944 (handle_signal_stop): If the user had interrupted the event
4945 thread, consider the stop a random signal.
4946 (handle_signal_stop) <signal arrived while stepping over
4947 breakpoint>: Don't restart threads here.
4948 (stop_waiting): Don't clear step-over info here.
4949
15c22686
PA
49502017-03-08 Pedro Alves <palves@redhat.com>
4951
4952 PR 21206
4953 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
4954 goes to argument 2, not 1.
4955
6e5d74e7
PA
49562017-03-08 Pedro Alves <palves@redhat.com>
4957
4958 PR cli/21218
4959 * top.c (gdb_readline_wrapper): Avoid passing NULL to
4960 display_gdb_prompt.
4961 (command_line_input): Add comment.
4962
9753a2f6
PA
49632017-03-08 Pedro Alves <palves@redhat.com>
4964
4965 PR tui/21216
4966 * tui/tui-file.c (tui_file::write): New.
4967 * tui/tui-file.h (tui_file): Override "write".
4968 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
4969 factored out from ...
4970 (tui_puts): ... here.
4971 (tui_putc): Use them.
4972 (tui_write): New function.
4973 * tui/tui-io.h (tui_write): Declare.
4974
1672e0d9
SDJ
49752017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4976
4977 * Makefile.in (SFILES): Replace "environ.c" with
4978 "common/environ.c".
4979 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
4980 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
4981 to...
4982 * common/environ.c: ... here.
4983 * environ.h: Moved to...
4984 * common/environ.h: ... here.
4985
f7bb4e3a
PB
49862017-03-07 Peter Bergner <bergner@vnet.ibm.com>
4987
4988 * gdbarch.sh (pstring_ptr): New static function.
4989 (gdbarch_disassembler_options): Use it.
4990 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
4991 not valid_disassembler_option->name.
4992 * gdbarch.c: Regenerate.
4993
e45ced6c
PB
49942017-03-07 Peter Bergner <bergner@vnet.ibm.com>
4995
4996 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
4997
5f6fd321
PA
49982017-03-07 Pedro Alves <palves@redhat.com>
4999
5000 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
5001
6dbb839a 50022017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
5003
5004 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
5005 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
5006 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 5007 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 5008
d274ecf4
SM
50092017-03-06 Simon Marchi <simon.marchi@ericsson.com>
5010
5011 * xtensa-linux-nat.c (fetch_gregs): Remove const.
5012
df97be55
SM
50132017-03-03 Simon Marchi <simon.marchi@ericsson.com>
5014
5015 * remote.c (remote_add_target_side_commands): Use range-based
5016 for loop.
5017
7d45f3df
YQ
50182017-03-03 Yao Qi <yao.qi@linaro.org>
5019
5020 PR gdb/21165
5021 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
5022 value is lazy.
5023 * valprint.c (common_val_print): Likewise.
5024
65b48a81
PB
50252017-02-28 Peter Bergner <bergner@vnet.ibm.com>
5026
5027 * NEWS: Mention new set/show disassembler-options commands.
5028 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
5029 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
5030 (prospective_options): New static variable.
5031 (gdb_disassembler::gdb_disassembler): Initialize
5032 m_di.disassembler_options.
5033 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
5034 (get_disassembler_options): New function.
5035 (set_disassembler_options): Likewise.
5036 (set_disassembler_options_sfunc): Likewise.
5037 (show_disassembler_options_sfunc): Likewise.
5038 (disassembler_options_completer): Likewise.
5039 (_initialize_disasm): Likewise.
5040 * disasm.h (get_disassembler_options): New prototype.
5041 (set_disassembler_options): Likewise.
5042 * gdbarch.sh (gdbarch_disassembler_options): New variable.
5043 (gdbarch_verify_disassembler_options): Likewise.
5044 * gdbarch.c: Regenerate.
5045 * gdbarch.h: Likewise.
5046 * arm-tdep.c (num_disassembly_options): Delete.
5047 (set_disassembly_style): Likewise.
5048 (arm_disassembler_options): New static variable.
5049 (set_disassembly_style_sfunc): Convert short style name into long
5050 option name. Call set_disassembler_options.
5051 (show_disassembly_style_sfunc): New function.
5052 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
5053 set_gdbarch_verify_disassembler_options.
5054 (_initialize_arm_tdep): Delete regnames variable and update callers.
5055 (arm_disassembler_options): Initialize.
5056 (disasm_options): New variable.
5057 (num_disassembly_options): Rename from this...
5058 (num_disassembly_styles): ...to this. Compute by scanning through
5059 disasm_options.
5060 (valid_disassembly_styles): Initialize using disasm_options.
5061 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
5062 set_arm_regname_option.
5063 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
5064 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
5065 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
5066 set_gdbarch_verify_disassembler_options.
5067 * s390-tdep.c (s390_disassembler_options): New static variable.
5068 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
5069 set_gdbarch_verify_disassembler_options.
5070
d538e36d
SM
50712017-02-27 Simon Marchi <simon.marchi@ericsson.com>
5072
5073 * remote.c (remote_add_target_side_condition): Remove "struct"
5074 keyword from range-based for loop.
5075
83621223
SM
50762017-02-27 Simon Marchi <simon.marchi@ericsson.com>
5077
5078 * remote.c (remote_add_target_side_condition): Use range-based
5079 for loop. Update comment.
5080
2123df0e
YQ
50812017-02-27 Yao Qi <yao.qi@linaro.org>
5082
5083 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
5084
8e368124
AH
50852017-02-26 Alan Hayward <alan.hayward@arm.com>
5086
5087 * regcache.c (regcache_raw_update): New function.
5088 (regcache_raw_read): Move code to regcache_raw_update.
5089 * regcache.h (regcache_raw_update): New declaration.
5090 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
5091
a49dd8dd
JK
50922017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
5093
5094 * dwarf2read.c (create_debug_type_hash_table): Initialize
5095 header.signature and header.type_offset_in_tu.
5096
34e4bae9
PA
50972017-02-24 Pedro Alves <palves@redhat.com>
5098
5099 * symtab.c (make_file_symbol_completion_list_1): Use
5100 add_symtab_completions.
5101
b0e4b369
AH
51022017-02-24 Alan Hayward <alan.hayward@arm.com>
5103
5104 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
5105
975c21ab
AH
51062017-02-24 Alan Hayward <alan.hayward@arm.com>
5107
5108 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
5109 I386_MAX_REGISTER_SIZE.
5110 (i386_pseudo_register_write): Likewise.
5111 (i386_process_record): Likewise.
5112 * i387-tdep.c (i387_supply_xsave): Likewise.
5113 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
5114 (store_register): Likewise.
5115
14bc53a8
PA
51162017-02-23 Pedro Alves <palves@redhat.com>
5117
5118 * ada-lang.c: Include "common/function-view.h".
5119 (ada_iterate_over_symbols): Adjust to use function_view as
5120 callback type.
5121 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
5122 (ada_make_symbol_completion_list): Use a lambda.
5123 (ada_exc_search_name_matches): Delete.
5124 (name_matches_regex): New.
5125 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
5126 * compile/compile-c-support.c: Include "common/function-view.h".
5127 (print_one_macro): Change prototype to accept a ui_file pointer.
5128 (write_macro_definitions): Use a lambda.
5129 * dwarf2read.c: Include "common/function-view.h".
5130 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
5131 (dw2_expand_symtabs_matching): Adjust to use function_view as
5132 callback type.
5133 * language.h: Include "common/function-view.h".
5134 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
5135 function_view as callback type.
5136 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
5137 * linespec.c: Include "common/function-view.h".
5138 (collect_info::add_symbol): New method.
5139 (struct symbol_and_data_callback, iterate_inline_only, struct
5140 symbol_matcher_data, iterate_name_matcher): Delete.
5141 (iterate_over_all_matching_symtabs): Adjust to use function_view
5142 as callback type and lambdas.
5143 (iterate_over_file_blocks): Adjust to use function_view as
5144 callback type.
5145 (decode_compound_collector): Now a class with private fields.
5146 (decode_compound_collector::release_symbols): New method.
5147 (collect_one_symbol): Rename to...
5148 (decode_compound_collector::operator()): ... this and adjust.
5149 (lookup_prefix_sym): decode_compound_collector construction bits
5150 move to decode_compound_collector ctor. Pass the
5151 decode_compound_collector object directly as callback. Remove
5152 cleanups and use decode_compound_collector::release_symbols
5153 instead.
5154 (symtab_collector): Now a class with private fields.
5155 (symtab_collector::release_symtabs): New method.
5156 (add_symtabs_to_list): Rename to...
5157 (symtab_collector::operator()): ... this and adjust.
5158 (collect_symtabs_from_filename): symtab_collector construction
5159 bits move to symtab_collector ctor. Pass the symtab_collector
5160 object directly as callback. Remove cleanups and use
5161 symtab_collector::release_symtabs instead.
5162 (collect_symbols): Delete.
5163 (add_matching_symbols_to_info): Use lambdas.
5164 * macrocmd.c (print_macro_callback): Delete.
5165 (info_macro_command): Use a lambda.
5166 (info_macros_command): Pass print_macro_definition as callable
5167 directly.
5168 (print_one_macro): Remove 'ignore' parameter.
5169 (macro_list_command): Adjust.
5170 * macrotab.c (macro_for_each_data::fn): Now a function_view.
5171 (macro_for_each_data::user_data): Delete field.
5172 (foreach_macro): Adjust to call the function_view.
5173 (macro_for_each): Adjust to use function_view as callback type.
5174 (foreach_macro_in_scope): Adjust to call the function_view.
5175 (macro_for_each_in_scope): Adjust to use function_view as callback
5176 type.
5177 * macrotab.h: Include "common/function-view.h".
5178 (macro_callback_fn): Declare a prototype instead of a pointer.
5179 Remove "user_data" parameter.
5180 (macro_for_each, macro_for_each_in_scope): Adjust to use
5181 function_view as callback type.
5182 * psymtab.c (partial_map_expand_apply)
5183 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
5184 Adjust to use function_view as callback type and to return bool.
5185 (psym_expand_symtabs_matching): Adjust to use function_view as
5186 callback types.
5187 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
5188 to use function_view as callback type and to return bool.
5189 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
5190 callback types.
5191 * symfile.c (expand_symtabs_matching): Adjust to use function_view
5192 as callback types.
5193 * symfile.h: Include "common/function-view.h".
5194 (expand_symtabs_file_matcher_ftype)
5195 (expand_symtabs_symbol_matcher_ftype)
5196 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
5197 return bool.
5198 (quick_symbol_functions::map_symtabs_matching_filename)
5199 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
5200 function_view as callback type and return bool.
5201 (expand_symtabs_matching): Adjust to use function_view as callback
5202 type.
5203 (maintenance_expand_name_matcher)
5204 (maintenance_expand_file_matcher): Delete.
5205 (maintenance_expand_symtabs): Use lambdas.
5206 * symtab.c (iterate_over_some_symtabs): Adjust to use
5207 function_view as callback types and return bool.
5208 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
5209 of a cleanup.
5210 (lookup_symtab_callback): Delete.
5211 (lookup_symtab): Use a lambda.
5212 (iterate_over_symbols): Adjust to use function_view as callback
5213 type.
5214 (struct search_symbols_data, search_symbols_file_matches)
5215 (search_symbols_name_matches): Delete.
5216 (search_symbols): Use a pair of lambdas.
5217 (struct add_name_data, add_macro_name, symbol_completion_matcher)
5218 (symtab_expansion_callback): Delete.
5219 (default_make_symbol_completion_list_break_on_1): Use lambdas.
5220 * symtab.h: Include "common/function-view.h".
5221 (iterate_over_some_symtabs): Adjust to use function_view as
5222 callback type and return bool.
5223 (iterate_over_symtabs): Adjust to use function_view as callback
5224 type.
5225 (symbol_found_callback_ftype): Remove 'data' parameter and return
5226 bool.
5227 (iterate_over_symbols): Adjust to use function_view as callback
5228 type.
5229
07e253aa
PA
52302017-02-23 Pedro Alves <palves@redhat.com>
5231
5232 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
5233 (%.o) <unittests/%.c>: New pattern.
5234 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
5235 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
5236 * common/function-view.h: New file.
5237 * unittests/function-view-selftests.c: New file.
5238 * configure: Regenerate.
5239
8eaf5320
SM
52402017-02-23 Simon Marchi <simon.marchi@ericsson.com>
5241
5242 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
5243 inferior_ptid.
5244 * go32-nat.c (go32_thread_alive): Likewise.
5245
38768751
YQ
52462017-02-23 Yao Qi <yao.qi@linaro.org>
5247
5248 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
5249 delete.
5250
0a8beaba
YQ
52512017-02-23 Yao Qi <yao.qi@linaro.org>
5252
5253 * varobj.c (varobj_clear_saved_item): Use delete instead of
5254 xfree.
5255 (update_dynamic_varobj_children): Likewise.
5256
58fdfd2c
JK
52572017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5258
5259 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
5260
1b90b139
SM
52612017-02-21 Simon Marchi <simon.marchi@ericsson.com>
5262
5263 * common/enum-flags.h (enum_flags::enum_flags): Initialize
5264 m_enum_value to 0 in default constructor.
5265
2039d74e
EBM
52662017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5267
5268 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
5269 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
5270 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
5271 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
5272 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
5273 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
5274 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
5275 IS_STORE_CONDITIONAL_INSN.
5276
7814882a
JK
52772017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5278
5279 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
5280
0ae60b63
JK
52812017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5282
5283 * NEWS (Changes since GDB 7.12): Add DWARF-5.
5284
0224619f
JK
52852017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5286
5287 * dwarf2read.c (skip_one_die, read_attribute_value)
5288 (dwarf2_const_value_attr, dump_die_shallow)
5289 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5290 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
5291
0af92d60
JK
52922017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5293
5294 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
5295 (dwarf_parse_macro_header): Accept DWARF version 5.
5296 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
5297
216f72a1
JK
52982017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5299
5300 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
5301 DW_AT_GNU_*.
5302 * common/common-exceptions.h (enum errors): Likewise.
5303 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
5304 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
5305 (dwarf_expr_context::execute_stack_op): Likewise.
5306 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
5307 Likewise.
5308 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
5309 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
5310 (show_entry_values_debug, call_site_to_target_addr)
5311 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
5312 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
5313 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
5314 (value_of_dwarf_block_entry, indirect_pieced_value)
5315 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
5316 (disassemble_dwarf_expression): Likewise.
5317 * dwarf2read.c (process_die, inherit_abstract_dies)
5318 (read_call_site_scope): Likewise.
5319 * gdbtypes.h (struct func_type, struct call_site_parameter)
5320 (struct call_site): Likewise.
5321 * stack.c (read_frame_arg): Likewise.
5322 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
5323
43988095
JK
53242017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5325
5326 * defs.h (read_unsigned_leb128): New declaration.
5327 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
5328 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
5329 (dwarf2_find_location_expression): Call also
5330 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
5331 * dwarf2loc.h (dwarf2_version): New declaration.
5332 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
5333 rnglists.
5334 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
5335 .debug_rnglists.
5336 (struct dwop_section_names): Add loclists_dwo.
5337 (dwop_section_names): Add .debug_loclists.dwo.
5338 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
5339 (struct dwarf2_per_cu_data): Add dwarf_version.
5340 (struct dwo_sections): Add loclists.
5341 (struct attr_abbrev): Add implicit_const.
5342 (read_indirect_line_string): New declaration.
5343 (read_unsigned_leb128): Delete declaration.
5344 (rcuh_kind): New definition.
5345 (read_and_check_comp_unit_head): Change parameter
5346 is_debug_types_section to section_kind.
5347 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
5348 (read_comp_unit_head): Change parameter abfd to section, add parameter
5349 section_kind. Handle DWARF-5.
5350 (error_check_comp_unit_head): Accept also DWARF version 5.
5351 (read_and_check_comp_unit_head): Change parameter
5352 is_debug_types_section to section_kind.
5353 (read_and_check_type_unit_head): Delete function.
5354 (read_abbrev_offset): Handle DWARF-5.
5355 (create_debug_type_hash_table): Add parameter section_kind. Process
5356 only DW_UT_type. Use signature and type_offset_in_tu from struct
5357 comp_unit_head.
5358 (create_debug_types_hash_table): Update create_debug_type_hash_table
5359 caller.
5360 (create_all_type_units): Call create_debug_type_hash_table.
5361 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
5362 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
5363 caller.
5364 (skip_one_die): Handle DW_FORM_implicit_const.
5365 (dwarf2_rnglists_process): New function.
5366 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
5367 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
5368 (read_attribute_value): Handle DW_FORM_implicit_const,
5369 DW_FORM_line_strp.
5370 (read_attribute): Handle DW_FORM_implicit_const.
5371 (read_indirect_string_at_offset_from): New function from
5372 read_indirect_string_at_offset.
5373 (read_indirect_string_at_offset): Call
5374 read_indirect_string_at_offset_from.
5375 (read_indirect_line_string_at_offset): New function.
5376 (read_indirect_string): New function comment.
5377 (read_indirect_line_string): New function.
5378 (read_unsigned_leb128): Make it global.
5379 (dwarf2_string_attr): Handle DWARF-5.
5380 (add_include_dir_stub, read_formatted_entries): New functions.
5381 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
5382 Handle DWARF-5.
5383 (per_cu_header_read_in): Update read_comp_unit_head caller.
5384 (dwarf2_version): New function.
5385 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
5386 rnglists.
5387 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
5388 fields.
5389
22d2f3ab
JK
53902017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5391
5392 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
5393
5f46c5a5
JK
53942017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5395
5396 * dwarf2read.c (dwarf2_ranges_process): New function from
5397 dwarf2_ranges_read.
5398 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
5399 dwarf2_ranges_process.
5400
78d4d2c5
JK
54012017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5402
5403 * dwarf2read.c (create_debug_type_hash_table): New function from
5404 create_debug_types_hash_table.
5405 (create_debug_types_hash_table): Call create_debug_type_hash_table.
5406 (create_all_type_units, open_and_init_dwo_file): Update
5407 create_debug_types_hash_table callers.
5408
1b076f25
SDJ
54092017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
5410
5411 PR gdb/16188
5412 * fork-child.c (trace_start_error): Fix thinko. va_end should
5413 refer to 'ap', not 'args'.
5414
0db8980c
SDJ
54152017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
5416 Pedro Alves <palves@redhat.com>
5417
5418 PR gdb/16188
5419 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
5420 calls succeeded.
5421 * fork-child.c (trace_start_error): New function.
5422 (trace_start_error_with_name): Likewise.
5423 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
5424 * inf-ptrace.c (inf_ptrace_me): Likewise.
5425 * inferior.h (trace_start_error): New prototype.
5426 (trace_start_error_with_name): Likewise.
5427
99e8a4f9
SDJ
54282017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
5429
5430 PR gdb/21164
5431 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
5432 NULL before using it.
5433 * symmisc.c (maintenance_print_symbols): Likewise.
5434 (maintenance_print_msymbols): Likewise.
5435
4e746bb6
TW
54362017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5437
5438 * NEWS: Add record Python bindings entry.
5439
54402017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5441
5442 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
5443 py-record-full.o.
5444 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
5445 * python/py-record-btrace.c, python/py-record-btrace.h,
5446 python/py-record-full.c, python/py-record-full.h: New file.
5447 * python/py-record.c: Add include for py-record-btrace.h and
5448 py-record-full.h.
5449 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
5450 recpy_instruction_history, recpy_function_call_history, recpy_begin,
5451 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
5452 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
5453 New definition.
5454 (gdbpy_initialize_btrace): New export.
5455 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
5456
54572017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5458
5459 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
5460 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
5461 * python/py-record.c: New file.
5462 * python/python-internal.h (gdbpy_start_recording,
5463 gdbpy_current_recording, gdpy_stop_recording,
5464 gdbpy_initialize_record): New export.
5465 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
5466 (python_GdbMethods): Add gdbpy_start_recording,
5467 gdbpy_current_recording and gdbpy_stop_recording.
5468
54692017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5470
5471 * record-btrace.c (record_btrace_record_method): New function.
5472 (init_record_btrace_ops): Initialize to_record_method.
5473 * record-full.c (record_full_record_method): New function.
5474 (init_record_full_ops, init_record_full_core_ops): Add
5475 record_full_record_method.
5476 * record.h (enum record_method): New enum.
5477 * target-debug.h (target_debug_print_enum_record_method: New define.
5478 * target-delegates.c: Regenerate.
5479 * target.c (target_record_method): New function.
5480 * target.h: Include record.h.
5481 (struct target_ops) <to_record_method>: New field.
5482 (target_record_method): New export.
5483
54842017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5485
5486 * record.h (record_start, record_stop): New export.
5487 * record.c (record_start, record_stop): New function.
5488
54892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5490
5491 * btrace.c (btrace_fetch): Copy function call segments pointer
5492 into a vector.
5493 (btrace_clear): Clear the vector.
5494 (btrace_find_insn_by_number): Use binary search to find the correct
5495 function call segment.
5496 * btrace.h (brace_fun_p): New typedef.
5497 (struct btrace_thread_info) <functions>: New field.
5498
54992017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5500
5501 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
5502 * btrace.c (btrace_decode_error): ... here. New function.
5503 * btrace.h (btrace_decode_error): New export.
5504
55052017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5506
5507 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
5508 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
5509 btrace_find_insn_by_number): Remove special case for gaps.
5510 * btrace.h (btrace_insn_get_error): New export.
5511 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
5512 * record-btrace.c (btrace_insn_history): Print number for gaps.
5513 (record_btrace_info, record_btrace_goto): Handle gaps.
5514
3f77c769
TT
55152017-02-14 Tom Tromey <tom@tromey.com>
5516
5517 PR python/13598:
5518 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
5519 event.
5520 * python/py-evts.c (gdbpy_initialize_py_events): Add
5521 before_prompt registry.
5522 * python/py-events.h (events_object) <before_prompt>: New field.
5523
4c2c7ac6
MM
55242017-02-14 Markus Metzger <markus.t.metzger@intel.com>
5525
5526 * btrace.c (ftrace_new_switch): Preserve up link and flags.
5527
5cf30ebf
LM
55282017-02-13 Luis Machado <lgustavo@codesourcery.com>
5529
5530 * symfile (_initialize_symfile): Add usage text to the load command's
5531 help text.
5532
26a06916
SM
55332017-02-10 Simon Marchi <simon.marchi@ericsson.com>
5534
5535 * utils.c (defaulted_query): Don't query on secondary UIs.
5536
0b145e37
TT
55372017-02-10 Tom Tromey <tom@tromey.com>
5538
5539 * rust-lang.c (rust_get_disr_info): Remove unused variable.
5540
2d8365c4
TT
55412017-02-10 Tom Tromey <tom@tromey.com>
5542
5543 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
5544 "cleanup" local.
5545 * python/py-type.c (typy_legacy_template_argument): Remove
5546 unnecessary "cleanup" local.
5547
2bb8f231
TT
55482017-02-10 Tom Tromey <tom@tromey.com>
5549
5550 * python/python.c (do_start_initialization): New function, from
5551 _initialize_python.
5552 (_initialize_python): Call do_start_initialization.
5553 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
5554 goto.
5555
1bdfaf42
TT
55562017-02-10 Tom Tromey <tom@tromey.com>
5557
5558 * python/py-prettyprint.c (pretty_print_one_value): Use
5559 gdbpy_ref.
5560
88b6faea
TT
55612017-02-10 Tom Tromey <tom@tromey.com>
5562
5563 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
5564 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
5565 gdbpy_ref.
5566 * python/py-type.c (field_new): Use gdbpy_ref.
5567 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
5568 gdbpy_ref.
5569 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
5570 (py_free_pspace): Likewise.
5571 (pspace_to_pspace_object): Likewise.
5572 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
5573 (py_free_objfile): Likewise.
5574 (objfile_to_objfile_object): Likewise.
5575 * python/py-inferior.c (delete_thread_object): Use
5576 gdbpy_ref.
5577 (infpy_read_memory): Likewise.
5578 (py_free_inferior): Likewise.
5579 * python/py-evtregistry.c (create_eventregistry_object): Use
5580 gdbpy_ref.
5581 * python/py-event.c (create_event_object): Use gdbpy_ref.
5582
7780f186
TT
55832017-02-10 Tom Tromey <tom@tromey.com>
5584
5585 * python/py-ref.h (gdbpy_ref_policy): Now a template.
5586 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
5587 used.
5588 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
5589 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
5590 python/py-exitedevent.c, python/py-finishbreakpoint.c,
5591 python/py-framefilter.c, python/py-function.c,
5592 python/py-inferior.c, python/py-infevents.c,
5593 python/py-linetable.c, python/py-newobjfileevent.c,
5594 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
5595 python/py-signalevent.c, python/py-stopevent.c,
5596 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
5597 python/py-unwind.c, python/py-utils.c, python/py-value.c,
5598 python/py-varobj.c, python/py-xmethods.c, python/python.c,
5599 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
5600
d4b0bb18
TT
56012017-02-10 Tom Tromey <tom@tromey.com>
5602
5603 * ui-out.h (ui_out_emit_type): New class.
5604 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
5605 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
5606 and ui_out_emit_tuple.
5607 (enumerate_locals): Likewise.
5608 (py_mi_print_variables, py_print_locals, py_print_args): Use
5609 ui_out_emit_list.
5610 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
5611 ui_out_emit_list.
5612 * common/gdb_optional.h: New file.
5613
f67f945c
MG
56142017-02-10 Martin Galvan <martingalvan@sourceware.org>
5615
5616 * MAINTAINERS (Write After Approval): Update my e-mail address.
5617
18da0c51
MG
56182017-02-10 Martin Galvan <martingalvan@sourceware.org>
5619
5620 PR gdb/21122
5621 * breakpoint.c (_initialize_breakpoint): Update the help description
5622 of the 'commands' command to indicate that it takes a list argument.
5623
62c14536
SM
56242017-02-09 Simon Marchi <simon.marchi@ericsson.com>
5625
5626 * interps.c (current_interp_set_logging): Remove "return".
5627
ff6fa247
GB
56282017-02-09 Gary Benson <gbenson@redhat.com>
5629
5630 * symtab.c (add_symtab_completions): Prevent NULL pointer
5631 dereference.
5632
a474bd8e
PA
56332017-02-08 Pedro Alves <palves@redhat.com>
5634
5635 * interps.c (interp::interp): Remove reference to quiet_p.
5636 (interp_set): Make static. Remove dead "Switching to" output
5637 code.
5638 (interp_quiet_p, interp_set_quiet): Delete.
5639 (interpreter_exec_cmd): Don't set the interpreter quiet.
5640 * interps.h (interp_quiet_p): Make static.
5641 (class interp) <quiet_p>: Remove field
5642
3d7b173c
JG
56432017-02-08 Jerome Guitton <guitton@adacore.com>
5644
604c4576
JG
5645 * cli/cli-decode.c (find_command_name_length): Make it extern.
5646 * cli/cli-decode.h (find_command_name_length): Declare.
5647 * cli/cli-script.c (command_name_equals, line_first_arg):
5648 New functions.
5649 (process_next_line): Use cli-decode to parse command names.
5650 (build_command_line): Make args a constant pointer.
5651
56522017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 5653
3d7b173c
JG
5654 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
5655 Remove case-insensitive search.
5656
1291063d
JM
56572017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
5658
5659 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
5660 at the end of the line. Avoids an ARI warning.
5661
20b477a7
LM
56622017-02-06 Luis Machado <lgustavo@codesourcery.com>
5663
5664 * NEWS: Mention support for record/replay of Intel 64 rdrand and
5665 rdseed instructions.
5666 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
5667
3f7b46f2
IR
56682017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
5669
5670 PR tdep/20936
5671 Provide and use sparc32 and sparc64 target description XML files.
5672 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
5673 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
5674 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
5675 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
5676 * features/sparc/sparc32-solaris.xml: New file.
5677 * features/sparc/sparc64-solaris.xml: New file.
5678 * features/sparc/sparc32-solaris.c: Generated.
5679 * features/sparc/sparc64-solaris.c: Generated.
5680 * sparc-tdep.h: Account for differences in target descriptions.
5681 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
5682 (sparc32_register_type): Use target provided registers.
5683 (validate_tdesc_registers): New function.
5684 (sparc32_gdbarch_init): Use tdesc_has_registers.
5685 Set pseudoregister functions.
5686 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
5687 (sparc64_register_type): Use target provided registers.
5688 (sparc64_init_abi): Set pseudoregister functions.
5689
f0fd41c1
TT
56902017-02-03 Tom Tromey <tom@tromey.com>
5691
5692 PR rust/21097:
5693 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
5694 with a single member.
5695
d6f9b0fb
PA
56962017-02-03 Pedro Alves <palves@redhat.com>
5697
5698 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
5699 (cli_interp_base::~cli_interp_base): New.
5700 (cli_interp): New struct.
5701 (as_cli_interp): Cast the interp itself to cli_interp.
5702 (cli_interpreter_pre_command_loop): Rename to ...
5703 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
5704 parameter.
5705 (cli_interpreter_init): Rename to ...
5706 (cli_interp::init): ... this. Remove 'self' parameter. Use
5707 boolean. Make extern.
5708 (cli_interpreter_resume): Rename to ...
5709 (cli_interp::resume): ... this. Remove 'data' parameter. Make
5710 extern.
5711 (cli_interpreter_suspend): Rename to ...
5712 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
5713 extern.
5714 (cli_interpreter_exec): Rename to ...
5715 (cli_interp::exec): ... this. Remove 'data' parameter. Make
5716 extern.
5717 (cli_interpreter_supports_command_editing): Rename to ...
5718 (cli_interp_base::supports_command_editing): ... this. Remove
5719 'interp' parameter. Make extern.
5720 (cli_ui_out): Rename to ...
5721 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
5722 Make extern.
5723 (cli_set_logging): Rename to ...
5724 (cli_interp_base::set_logging): ... this. Remove 'interp'
5725 parameter. Make extern.
5726 (cli_interp_procs): Delete.
5727 (cli_interp_factory): Adjust to use "new".
5728 * cli/cli-interp.h: Include "interps.h".
5729 (struct cli_interp_base): New struct.
5730 * interps.c (struct interp): Delete. Fields moved to interps.h.
5731 (interp_new): Delete.
5732 (interp::interp, interp::~interp): New.
5733 (interp_set): Use bool, and return void. Assume the interpreter
5734 has suspend, init and resume methods, and that the all return
5735 void.
5736 (set_top_level_interpreter): interp_set returns void.
5737 (interp_ui_out): Adapt.
5738 (current_interp_set_logging): Adapt.
5739 (interp_data): Delete.
5740 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
5741 (interp_exec): Adapt.
5742 (top_level_interpreter_data): Delete.
5743 * interps.h (interp_init_ftype, interp_resume_ftype)
5744 (interp_suspend_ftype, interp_exec_ftype)
5745 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
5746 (class interp): New.
5747 (interp_new): Delete.
5748 (interp_set): Now returns void. Use bool.
5749 (interp_data, top_level_interpreter_data): Delete.
5750 * mi/mi-common.h: Include interps.h.
5751 (class mi_interp): Inherit from interp. Define a ctor. Declare
5752 init, resume, suspect, exec, interp_ui_out, set_logging and
5753 pre_command_loop methods.
5754 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
5755 (mi_interpreter_init): Rename to ...
5756 (mi_interp::init): ... this. Remove the 'interp' parameter, use
5757 bool, return void and make extern. Adjust.
5758 (mi_interpreter_resume): ... Rename to ...
5759 (mi_interp::resume): ... this. Remove the 'data' parameter,
5760 return void and make extern. Adjust.
5761 (mi_interpreter_suspend): ... Rename to ...
5762 (mi_interp::suspend): ... this. Remove the 'data' parameter,
5763 return void and make extern. Adjust.
5764 (mi_interpreter_exec): ... Rename to ...
5765 (mi_interp::exec): ... this. Remove the 'data' parameter and make
5766 extern. Adjust.
5767 (mi_interpreter_pre_command_loop): ... Rename to ...
5768 (mi_interp::pre_command_loop): ... this. Remove the 'self'
5769 parameter and make extern.
5770 (mi_on_normal_stop_1): Adjust.
5771 (mi_ui_out): Rename to ...
5772 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
5773 parameter and make extern. Adjust.
5774 (mi_set_logging): Rename to ...
5775 (mi_interp::set_logging): ... this. Remove the 'interp'
5776 parameter and make extern. Adjust.
5777 (mi_interp_procs): Delete.
5778 (mi_interp_factory): Adjust to use 'new'.
5779 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
5780 (mi_print_exception, mi_execute_command, mi_load_progress):
5781 Adjust.
5782 * tui/tui-interp.c (tui_interp): New class.
5783 (as_tui_interp): Return a tui_interp pointer.
5784 (tui_on_normal_stop, tui_on_signal_received)
5785 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
5786 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
5787 to use interp::interp_ui_out.
5788 (tui_init): Rename to ...
5789 (tui_interp::init): ... this. Remove the 'self' parameter, use
5790 bool, return void and make extern. Adjust.
5791 (tui_resume): Rename to ...
5792 (tui_interp::resume): ... this. Remove the 'data' parameter,
5793 return void and make extern. Adjust.
5794 (tui_suspend): Rename to ...
5795 (tui_interp::suspend): ... this. Remove the 'data' parameter,
5796 return void and make extern. Adjust.
5797 (tui_ui_out): Rename to ...
5798 (tui_interp::interp_ui_out): ... this. Remove the 'self'
5799 parameter, and make extern. Adjust.
5800 (tui_exec): Rename to ...
5801 (tui_interp::exec): ... this. Remove the 'data' parameter and
5802 make extern.
5803 (tui_interp_procs): Delete.
5804 (tui_interp_factory): Use "new".
5805
65c40c95
TT
58062017-02-02 Tom Tromey <tom@tromey.com>
5807
5808 * rust-exp.y (ends_raw_string, space_then_number)
5809 (rust_identifier_start_p): Return bool.
5810 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
5811 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
5812 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
5813 (rust_chartype_p): Return bool.
5814 (val_print_struct, rust_print_struct_def, rust_print_type):
5815 Update.
5816 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
5817 Return bool.
5818
b50f188d
TT
58192017-02-02 Tom Tromey <tom@tromey.com>
5820
5821 * rust-lang.c: Reindent.
5822
03c85b11
TT
58232017-02-02 Tom Tromey <tom@tromey.com>
5824
5825 * rust-lang.h (rust_crate_for_block): Update.
5826 * rust-lang.c (rust_crate_for_block): Return std::string.
5827 (rust_get_disr_info): Use std:;string, not
5828 gdb::unique_xmalloc_ptr.
5829 * rust-exp.y (crate_name): Update.
5830
9b6da501
PA
58312017-02-02 Pedro Alves <palves@redhat.com>
5832
5833 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
5834 field out of gdb_disassembler_test and make it static.
5835
ec4cb20b
PA
58362017-02-02 Pedro Alves <palves@redhat.com>
5837
5838 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
5839 mi1_interp and mi_interp fields.
5840
5be5dbf0
PA
58412017-02-02 Pedro Alves <palves@redhat.com>
5842
616268b6
PA
5843 * cli/cli-interp.c (struct saved_output_files, saved_output):
5844 Moved from cli/cli-logging.c.
5845 (cli_set_logging): New function.
5846 (cli_interp_procs): Install cli_set_logging.
5847 * cli/cli-interp.h (make_logging_output, cli_set_logging):
5848 Declare.
5849 * cli/cli-logging.c (struct saved_output_files, saved_output):
5850 Moved to cli/cli-interp.c.
5851 (pop_output_files): Don't save outputs here.
5852 (make_logging_output): New function.
5853 (handle_redirections): Don't build tee nor save previous outputs
5854 here.
5855 * interps.c (current_interp_set_logging): Change prototype.
5856 Assume there's always a set_logging_proc method installed.
5857 * interps.h (interp_set_logging_ftype): Change prototype.
5858 (current_interp_set_logging): Change prototype and adjust comment.
5859 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
5860 use make_logging_output.
5861 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
58622017-02-02 Pedro Alves <palves@redhat.com>
5863
5be5dbf0
PA
5864 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
5865 from ...
5866 (set_logging_overwrite): ... here.
5867 (logging_no_redirect_file): Delete.
5868 (set_logging_redirect): Don't handle redirection on the fly.
5869 Instead warn that "logging off" / "logging on" is necessary.
5870 (pop_output_files): Delete references to logging_no_redirect_file.
5871 (show_logging_command): Always speak in terms of what will happen
5872 once logging is reenabled.
5873
c99cc448
PA
58742017-02-02 Pedro Alves <palves@redhat.com>
5875
5876 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
5877
8b172ce7
PA
58782017-02-02 Pedro Alves <palves@redhat.com>
5879
5880 * disasm.c (gdb_pretty_print_insn): Rename to ...
5881 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
5882 Remove gdbarch parameter. Adapt to clear the object's buffers
5883 instead of allocating new buffers, and to print using the object's
5884 gdb_disassembler instead of calling gdb_print_insn.
5885 (dump_insns): Use gdb_pretty_print_disassembler.
5886 * disasm.h (gdb_pretty_print_insn): Delete declaration.
5887 (gdb_pretty_print_disassembler): New class.
5888 * record-btrace.c (btrace_insn_history): Use
5889 gdb_pretty_print_disassembler.
5890
d7e74731
PA
58912017-02-02 Pedro Alves <palves@redhat.com>
5892
5893 * ada-lang.c (type_as_string): Use string_file.
5894 * ada-valprint.c (ada_print_floating): Use string_file.
5895 * ada-varobj.c (ada_varobj_scalar_image)
5896 (ada_varobj_get_value_image): Use string_file.
5897 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
5898 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
5899 * breakpoint.c (update_inserted_breakpoint_locations)
5900 (insert_breakpoint_locations, reattach_breakpoints)
5901 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
5902 (print_it_watchpoint): Use string_file.
5903 (save_breakpoints): Use stdio_file.
5904 * c-exp.y (oper): Use string_file.
5905 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
5906 tee_file.
5907 (pop_output_files): Use delete.
5908 (handle_redirections): Use stdio_file and tee_file.
5909 * cli/cli-setshow.c (do_show_command): Use string_file.
5910 * compile/compile-c-support.c (c_compute_program): Use
5911 string_file.
5912 * compile/compile-c-symbols.c (generate_vla_size): Take a
5913 'string_file &' instead of a 'ui_file *'.
5914 (generate_c_for_for_one_variable): Take a 'string_file &' instead
5915 of a 'ui_file *'. Use string_file.
5916 (generate_c_for_variable_locations): Take a 'string_file &'
5917 instead of a 'ui_file *'.
5918 * compile/compile-internal.h (generate_c_for_for_one_variable):
5919 Take a 'string_file &' instead of a 'ui_file *'.
5920 * compile/compile-loc2c.c (push, pushf, unary, binary)
5921 (print_label, pushf_register_address, pushf_register)
5922 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
5923 'ui_file *'. Adjust.
5924 * compile/compile.c (compile_to_object): Use string_file.
5925 * compile/compile.h (compile_dwarf_expr_to_c)
5926 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
5927 'ui_file *'.
5928 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
5929 (replace_typedefs_qualified_name): Use string_file and
5930 obstack_copy0.
5931 * disasm.c (gdb_pretty_print_insn): Use string_file.
5932 (gdb_disassembly): Adjust reference the null_stream global.
5933 (do_ui_file_delete): Delete.
5934 (gdb_insn_length): Use null_stream.
5935 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
5936 * dwarf2loc.c (dwarf2_compile_property_to_c)
5937 (locexpr_generate_c_location, loclist_generate_c_location): Take a
5938 'string_file &' instead of a 'ui_file *'.
5939 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
5940 * dwarf2read.c (do_ui_file_peek_last): Delete.
5941 (dwarf2_compute_name): Use string_file.
5942 * event-top.c (gdb_setup_readline): Use stdio_file.
5943 * gdbarch.sh (verify_gdbarch): Use string_file.
5944 * gdbtypes.c (safe_parse_type): Use null_stream.
5945 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
5946 string_file.
5947 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
5948 'string_file *' instead of a 'ui_file *'.
5949 (gdbscm_arch_disassemble): Use string_file.
5950 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
5951 * guile/scm-ports.c (class ioscm_file_port): Now a class that
5952 inherits from ui_file.
5953 (ioscm_file_port_delete, ioscm_file_port_rewind)
5954 (ioscm_file_port_put): Delete.
5955 (ioscm_file_port_write): Rename to ...
5956 (ioscm_file_port::write): ... this. Remove file_port_magic
5957 checks.
5958 (ioscm_file_port_new): Delete.
5959 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
5960 ui_file_up.
5961 * guile/scm-type.c (tyscm_type_name): Use string_file.
5962 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
5963 Use string_file.
5964 * infcmd.c (print_return_value_1): Use string_file.
5965 * infrun.c (print_target_wait_results): Use string_file.
5966 * language.c (add_language): Use string_file.
5967 * location.c (explicit_to_string_internal): Use string_file.
5968 * main.c (captured_main_1): Use null_file.
5969 * maint.c (maintenance_print_architecture): Use stdio_file.
5970 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
5971 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
5972 event_channel>: Change type to mi_console_file pointer.
5973 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
5974 (mi_console_file_delete): Delete.
5975 (struct mi_console_file): Delete.
5976 (mi_console_file_magic): Delete.
5977 (mi_console_file_new): Delete.
5978 (mi_console_file::mi_console_file): New.
5979 (mi_console_file_delete): Delete.
5980 (mi_console_file_fputs): Delete.
5981 (mi_console_file::write): New.
5982 (mi_console_raw_packet): Delete.
5983 (mi_console_file::flush): New.
5984 (mi_console_file_flush): Delete.
5985 (mi_console_set_raw): Rename to ...
5986 (mi_console_file::set_raw): ... this.
5987 * mi/mi-console.h (class mi_console_file): New class.
5988 (mi_console_file_new, mi_console_set_raw): Delete.
5989 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
5990 (mi_set_logging): Use delete and tee_file. Adjust.
5991 * mi/mi-main.c (output_register): Use string_file.
5992 (mi_cmd_data_evaluate_expression): Use string_file.
5993 (mi_cmd_data_read_memory): Use string_file.
5994 (mi_cmd_execute, print_variable_or_computed): Use string_file.
5995 * mi/mi-out.c (mi_ui_out::main_stream): New.
5996 (mi_ui_out::rewind): Use main_stream and
5997 string_file.
5998 (mi_ui_out::put): Use main_stream and string_file.
5999 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
6000 Allocate a 'string_file' instead.
6001 (mi_out_new): Don't allocate a mem_fileopen stream here.
6002 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
6003 (mi_ui_out::main_stream): Declare method.
6004 * printcmd.c (eval_command): Use string_file.
6005 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
6006 * python/py-arch.c (archpy_disassemble): Use string_file.
6007 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
6008 * python/py-frame.c (frapy_str): Use string_file.
6009 * python/py-framefilter.c (py_print_type, py_print_single_arg):
6010 Use string_file.
6011 * python/py-type.c (typy_str): Use string_file.
6012 * python/py-unwind.c (unwind_infopy_str): Use string_file.
6013 * python/py-value.c (valpy_str): Use string_file.
6014 * record-btrace.c (btrace_insn_history): Use string_file.
6015 * regcache.c (regcache_print): Use stdio_file.
6016 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
6017 * remote.c (escape_buffer): Use string_file.
6018 * rust-lang.c (rust_get_disr_info): Use string_file.
6019 * serial.c (serial_open_ops_1): Use stdio_file.
6020 (do_serial_close): Use delete.
6021 * stack.c (print_frame_arg): Use string_file.
6022 (print_frame_args): Remove local mem_fileopen stream, not used.
6023 (print_frame): Use string_file.
6024 * symmisc.c (maintenance_print_symbols): Use stdio_file.
6025 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
6026 Take a 'string_file *' instead of a 'ui_file *'.
6027 * top.c (new_ui): Use stdio_file and stderr_file.
6028 (free_ui): Use delete.
6029 (execute_command_to_string): Use string_file.
6030 (quit_confirm): Use string_file.
6031 * tracepoint.c (collection_list::append_exp): Use string_file.
6032 * tui/tui-disasm.c (tui_disassemble): Use string_file.
6033 * tui/tui-file.c: Don't include "ui-file.h".
6034 (enum streamtype, struct tui_stream): Delete.
6035 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
6036 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
6037 (tui_file::tui_file): New method.
6038 (tui_file_fputs): Delete.
6039 (tui_file_get_strbuf): Delete.
6040 (tui_file::puts): New method.
6041 (tui_file_adjust_strbuf): Delete.
6042 (tui_file_flush): Delete.
6043 (tui_file::flush): New method.
6044 * tui/tui-file.h: Tweak intro comment.
6045 Include ui-file.h.
6046 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
6047 (tui_file_adjust_strbuf): Delete declarations.
6048 (class tui_file): New class.
6049 * tui/tui-io.c (tui_initialize_io): Use tui_file.
6050 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
6051 (tui_register_format): Use string_stream.
6052 * tui/tui-stack.c (tui_make_status_line): Use string_file.
6053 (tui_get_function_from_frame): Use string_file.
6054 * typeprint.c (type_to_string): Use string_file.
6055 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
6056 (null_stream): New global.
6057 (ui_file_delete): Delete.
6058 (ui_file::ui_file): New.
6059 (null_file_isatty): Delete.
6060 (ui_file::~ui_file): New.
6061 (null_file_rewind): Delete.
6062 (ui_file::printf): New.
6063 (null_file_put): Delete.
6064 (null_file_flush): Delete.
6065 (ui_file::putstr): New.
6066 (null_file_write): Delete.
6067 (ui_file::putstrn): New.
6068 (null_file_read): Delete.
6069 (ui_file::putc): New.
6070 (null_file_fputs): Delete.
6071 (null_file_write_async_safe): Delete.
6072 (ui_file::vprintf): New.
6073 (null_file_delete): Delete.
6074 (null_file::write): New.
6075 (null_file_fseek): Delete.
6076 (null_file::puts): New.
6077 (ui_file_data): Delete.
6078 (null_file::write_async_safe): New.
6079 (gdb_flush, ui_file_isatty): Adjust.
6080 (ui_file_put, ui_file_rewind): Delete.
6081 (ui_file_write): Adjust.
6082 (ui_file_write_for_put): Delete.
6083 (ui_file_write_async_safe, ui_file_read): Adjust.
6084 (ui_file_fseek): Delete.
6085 (fputs_unfiltered): Adjust.
6086 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
6087 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
6088 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
6089 (set_ui_file_data): Delete.
6090 (string_file::~string_file, string_file::write)
6091 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
6092 (do_ui_file_as_string, ui_file_as_string): Delete.
6093 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
6094 (struct mem_file): Delete.
6095 (mem_file_new): Delete.
6096 (stdio_file::stdio_file): New.
6097 (mem_file_delete): Delete.
6098 (stdio_file::stdio_file): New.
6099 (mem_fileopen): Delete.
6100 (stdio_file::~stdio_file): New.
6101 (mem_file_rewind): Delete.
6102 (stdio_file::set_stream): New.
6103 (mem_file_put): Delete.
6104 (stdio_file::open): New.
6105 (mem_file_write): Delete.
6106 (stdio_file_magic, struct stdio_file): Delete.
6107 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
6108 (stdio_file::flush): New.
6109 (stdio_file_read): Rename to ...
6110 (stdio_file::read): ... this. Adjust.
6111 (stdio_file_write): Rename to ...
6112 (stdio_file::write): ... this. Adjust.
6113 (stdio_file_write_async_safe): Rename to ...
6114 (stdio_file::write_async_safe) ... this. Adjust.
6115 (stdio_file_fputs): Rename to ...
6116 (stdio_file::puts) ... this. Adjust.
6117 (stdio_file_isatty): Delete.
6118 (stdio_file_fseek): Delete.
6119 (stdio_file::isatty): New.
6120 (stderr_file_write): Rename to ...
6121 (stderr_file::write) ... this. Adjust.
6122 (stderr_file_fputs): Rename to ...
6123 (stderr_file::puts) ... this. Adjust.
6124 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
6125 (stderr_file::stderr_file): New.
6126 (tee_file_magic): Delete.
6127 (struct tee_file): Delete.
6128 (tee_file::tee_file): New.
6129 (tee_file_new): Delete.
6130 (tee_file::~tee_file): New.
6131 (tee_file_delete): Delete.
6132 (tee_file_flush): Rename to ...
6133 (tee_file::flush): ... this. Adjust.
6134 (tee_file_write): Rename to ...
6135 (tee_file::write): ... this. Adjust.
6136 (tee_file::write_async_safe): New.
6137 (tee_file_fputs): Rename to ...
6138 (tee_file::puts): ... this. Adjust.
6139 (tee_file_isatty): Rename to ...
6140 (tee_file::isatty): ... this. Adjust.
6141 * ui-file.h (struct obstack, struct ui_file): Don't
6142 forward-declare.
6143 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
6144 (ui_file_write_ftype)
6145 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
6146 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
6147 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
6148 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
6149 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
6150 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
6151 (set_ui_file_fseek): Delete.
6152 (ui_file_data, ui_file_delete, ui_file_rewind)
6153 (struct ui_file): New.
6154 (ui_file_up): New.
6155 (class null_file): New.
6156 (null_stream): Declare.
6157 (ui_file_write_for_put, ui_file_put): Delete.
6158 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
6159 Delete.
6160 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
6161 (gdb_fopen, tee_file_new): Delete.
6162 (struct string_file): New.
6163 (struct stdio_file): New.
6164 (stdio_file_up): New.
6165 (struct stderr_file): New.
6166 (class tee_file): New.
6167 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
6168 of a 'ui_file *'. Adjust.
6169 * ui-out.h (class ui_out) <field_stream>: Likewise.
6170 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
6171 (null_stream): Delete.
6172 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
6173 Adjust.
6174 * utils.h (struct ui_file): Delete forward declaration..
6175 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
6176 (error_stream): Take a 'string_file &' instead of a
6177 'ui_file *'.
6178 * varobj.c (varobj_value_get_print_value): Use string_file.
6179 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
6180 * gdbarch.c: Regenerate.
6181
187808b0
PA
61822017-02-02 Pedro Alves <palves@redhat.com>
6183
6184 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
6185 (gdb_pretty_print_insn): ... this. Now a free function. Add back
6186 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
6187 Adjust to call gdb_print_insn instead of
6188 gdb_disassembler::print_insn.
6189 (dump_insns, do_mixed_source_and_assembly_deprecated)
6190 (do_mixed_source_and_assembly, do_assembly_only): Add back a
6191 'gdbarch' parameter. Remove gdb_disassembler parameter.
6192 (gdb_disassembly): Don't allocate a gdb_disassembler here.
6193 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
6194 declaration.
6195 (gdb_pretty_print_insn): Re-add declaration.
6196 * record-btrace.c (btrace_insn_history): Don't allocate a
6197 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
6198
7a8eb317
SM
61992017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
6200
6201 * disasm.h (gdb_disassembly): Remove file_string parameter.
6202 * disasm.c (gdb_disassembly): Likewise.
6203 * cli/cli-cmds.c (print_disassembly): Adapt.
6204 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
6205 * stack.c (do_gdb_disassembly): Likewise.
6206
7346ef59
AA
62072017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
6208
6209 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
6210 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
6211 targets. And if the implicit value is longer than needed, extract
6212 the first bytes instead of the "least significant" ones.
6213
cd4007e4
MM
62142017-02-01 Markus Metzger <markus.t.metzger@intel.com>
6215
6216 * btrace.c (btrace_enable): Do not call btrace_add_pc for
6217 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
6218 (btrace_fetch): Assert can_access_registers_ptid.
6219 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
6220 validate_registers_access.
6221
cf77c34e
MM
62222017-02-01 Markus Metzger <markus.t.metzger@intel.com>
6223
6224 * gdbthread.h (can_access_registers_ptid): New.
6225 * thread.c (can_access_registers_ptid): New.
6226
be85ce7d
PA
62272017-02-01 Pedro Alves <palves@redhat.com>
6228
6229 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
6230
29b0b251
PA
62312017-01-31 Pedro Alves <palves@redhat.com>
6232
6233 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
6234 Fix typos.
6235
289b5b24
PA
62362017-01-31 Pedro Alves <palves@redhat.com>
6237
6238 * stack.c (print_frame_args): Remove local mem_fileopen stream,
6239 not used.
6240
b47413b4
PA
62412017-01-31 Pedro Alves <palves@redhat.com>
6242
6243 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
6244
60adb36c
PA
62452017-01-31 Pedro Alves <palves@redhat.com>
6246
6247 * common/scoped_restore.h
6248 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
6249 change the value's parameter type to T2.
6250 (make_scoped_restore): Likewise.
6251
2735833d
WT
62522017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6253 Richard Henderson <rth@redhat.com>
6254
6255 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
6256 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
6257 GS_BASE for older kernels.
6258 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
6259 GS_BASE for older kernels.
6260 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
6261 and GS_BASE to the offset table.
6262 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
6263 system register group.
6264 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
6265 for older kernels.
6266 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
6267 amd64 ABI.
6268 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
6269 AMD64_GSBASE_REGNUM.
6270 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
6271 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
6272 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
6273 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
6274 i386/64bit-segments.xml in those rules.
6275 * features/i386/64bit-segments.xml: New file.
6276 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
6277 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
6278 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
6279 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
6280 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
6281 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
6282 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
6283 * features/i386/amd64-avx-linux.c: Regenerated.
6284 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
6285 * features/i386/amd64-avx-mpx.c: Regenerated.
6286 * features/i386/amd64-avx512-linux.c: Regenerated.
6287 * features/i386/amd64-linux.c: Regenerated.
6288 * features/i386/amd64-mpx-linux.c: Regenerated.
6289 * features/i386/i386-avx-mpx-linux.c: Regenerated.
6290 * features/i386/i386-avx-mpx.c: Regenerated.
6291 * features/i386/x32-avx-linux.c: Regenerated.
6292 * features/i386/x32-avx512-linux.c: Regenerated.
6293 * regformats/i386/amd64-avx-linux.dat: Regenerated.
6294 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
6295 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
6296 * regformats/i386/amd64-linux.dat: Regenerated.
6297 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
6298 * regformats/i386/x32-avx-linux.dat: Regenerated.
6299 * regformats/i386/x32-avx512-linux.dat: Regenerated.
6300 * regformats/i386/x32-linux.dat: Regenerated.
6301
8884e97e
WT
63022017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6303
6304 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
6305 Set to AMD64_NUM_REGS.
6306
7005d26a
WT
63072017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6308
6309 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
6310 that checks validity of a register number.
6311
4bd2e1b2
KC
63122017-01-27 Kees Cook <keescook@google.com>
6313
6314 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
6315 fetch_fpregs if target has fpa registers.
6316 (arm_linux_store_inferior_registers): Call store_fpregs if target
6317 has fpa registers.
6318
7cf1de6c
AA
63192017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
6320
6321 * cris-tdep.c (cris_gdbarch_init): Remove check for
6322 info.byte_order and force it to BFD_ENDIAN_LITTLE.
6323
874a1c8c
AT
63242017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
6325
6326 * corelow.c (get_core_register_section): Check for regset
6327 existence before checking for REGSET_VARIABLE_SIZE.
6328
d8b49cf0
YQ
63292017-01-26 Yao Qi <yao.qi@linaro.org>
6330 Pedro Alves <palves@redhat.com>
6331
6332 PR gdb/20939
6333 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
6334 call memory_error, save memaddr instead.
6335 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
6336 negative, cal memory_error.
6337 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
6338
658ca58c
YQ
63392017-01-26 Yao Qi <yao.qi@linaro.org>
6340
6341 * disasm-selftests.c (memory_error_test): New function.
6342 (_initialize_disasm_selftests): Register memory_error_test.
6343
79843d45
YQ
63442017-01-26 Yao Qi <yao.qi@linaro.org>
6345
6346 * Makefile.in (SFILES): Add disasm-selftests.c and
6347 selftest-arch.c.
6348 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
6349 * disasm-selftests.c: New file.
6350 * selftest-arch.c: New file.
6351 * selftest-arch.h: New file.
6352
8cafda32
YQ
63532017-01-26 Yao Qi <yao.qi@linaro.org>
6354
6355 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
6356 to bfd_arch_mep. Don't return 0 if section is not
6357 found. Call print_insn_mep.
6358
e47ad6c0
YQ
63592017-01-26 Pedro Alves <palves@redhat.com>
6360 Yao Qi <yao.qi@linaro.org>
6361
6362 * arm-tdep.c: Include "disasm.h".
6363 (gdb_print_insn_arm): Update code to get gdbarch.
6364 * disasm.c (dis_asm_read_memory): Change it to
6365 gdb_disassembler::dis_asm_read_memory.
6366 (dis_asm_memory_error): Likewise.
6367 (dis_asm_print_address): Likewise.
6368 (gdb_pretty_print_insn): Change it to
6369 gdb_disassembler::pretty_print_insn.
6370 (dump_insns): Add one argument gdb_disassemlber. All
6371 callers updated.
6372 (do_mixed_source_and_assembly_deprecated): Likewise.
6373 (do_mixed_source_and_assembly): Likewise.
6374 (do_assembly_only): Likewise.
6375 (gdb_disassembler::gdb_disassembler): New.
6376 (gdb_disassembler::print_insn): New.
6377 * disasm.h (class gdb_disassembler): New.
6378 (gdb_pretty_print_insn): Remove declaration.
6379 (gdb_disassemble_info): Likewise.
6380 * guile/scm-disasm.c (class gdbscm_disassembler): New.
6381 (gdbscm_disasm_read_memory_worker): Update.
6382 (gdbscm_disasm_read_memory): Update.
6383 (gdbscm_disasm_memory_error): Remove.
6384 (gdbscm_disasm_print_address): Remove.
6385 (gdbscm_disassembler::gdbscm_disassembler): New.
6386 (gdbscm_print_insn_from_port): Update.
6387 * mips-tdep.c: Include disasm.h.
6388 (gdb_print_insn_mips): Update code to get gdbarch.
6389 * record-btrace.c (btrace_insn_history): Update.
6390 * spu-tdep.c: Include disasm.h.
6391 (struct spu_dis_asm_data): Remove.
6392 (struct spu_dis_asm_info): New.
6393 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
6394 SPU id.
6395 (gdb_print_insn_spu): Cast disassemble_info to
6396 spu_dis_asm_info.
6397
80d75874
YQ
63982017-01-26 Yao Qi <yao.qi@linaro.org>
6399
6400 * disasm.c (do_ui_file_delete): Delete.
6401 (gdb_insn_length): Move code creating stream to ...
6402 * utils.c (null_stream): ... here. New function.
6403 * utils.h (null_stream): Declare.
6404
60685cd0
SM
64052017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
6406
6407 * python/py-inferior.c (find_thread_object): Return directly
6408 from the loop. Remove "found" variable.
6409
eb1cdb62
JB
64102017-01-21 Joel Brobecker <brobecker@adacore.com>
6411
6412 GDB 7.12.1 released.
6413
b1ce6568
SM
64142017-01-20 Simon Marchi <simon.marchi@ericsson.com>
6415
6416 * python/py-function.c (fnpy_call): Reorder declarations to have
6417 the gdbpy_enter object declared first.
6418 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
6419
6f8b0407
SM
64202017-01-20 Simon Marchi <simon.marchi@ericsson.com>
6421
fec93fb1 6422 PR python/21068
6f8b0407
SM
6423 * python/python-internal.h (PyMem_RawMalloc): Define for
6424 Python < 3.4.
6425 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
6426 PyMem_RawMalloc instead of PyMem_Malloc.
6427
78cbbba8
LM
64282017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
6429 Luis Machado <lgustavo@codesourcery.com>
6430
6431 * NEWS (New commands): Mention flash-erase.
6432 (New MI commands): Mention target-flash-erase.
6433 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
6434 command.
6435 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
6436 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
6437 * target.c (flash_erase_command): New function.
6438 (initialize_targets): Add new flash-erase command.
6439 * target.h (flash_erase_command): New declaration.
6440
2132fe85
JB
64412017-01-20 Joel Brobecker <brobecker@adacore.com>
6442
6443 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
6444 HAVE_SYS_PROCFS_H is defined.
6445
d1dff226
AH
64462017-01-18 Alan Hayward <alan.hayward@arm.com>
6447
6448 * remote.c (struct cached_reg): Change data into a pointer.
6449 * (stop_reply_dtr): Free data pointers before deleting vector.
6450 (process_stop_reply): Likewise.
6451 (remote_parse_stop_reply): Allocate space for data
6452
9890e433
AH
64532017-01-18 Alan Hayward <alan.hayward@arm.com>
6454
6455 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
6456 MAX_REGISTER_SIZE.
6457 (amd64_pseudo_register_read_value): Likewise.
6458 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
6459 (store_register_using_P): Likewise.
6460 * regcache.c (regcache_xfer_part): Likewise.
6461
7a36499a
IR
64622017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
6463
6464 Split real and pseudo registers.
6465 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
6466 (sparc32_pseudo_regnum): New enum.
6467 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
6468 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
6469 (SPARC32_CP0_REGISTERS): New macro.
6470 (sparc32_pseudo_register_name): New function.
6471 (sparc32_register_name): Use sparc32_pseudo_register_name.
6472 (sparc32_pseudo_register_type): New function.
6473 (sparc32_register_type): Use sparc32_pseudo_register_type.
6474 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
6475 pseudo register numbers.
6476 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
6477 (SPARC64_CP0_REGISTERS): New macro.
6478 (sparc64_pseudo_register_name): New function.
6479 (sparc64_register_name): Use sparc64_pseudo_register_name.
6480 (sparc64_pseudo_register_type): New function.
6481 (sparc64_register_type): Use sparc64_pseudo_register_type.
6482 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
6483 pseudo register numbers.
6484 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
6485 sparc64_store_arguments): Handle pseudo register numbers.
6486
6f8976bf
YQ
64872017-01-13 Yao Qi <yao.qi@linaro.org>
6488
6489 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
6490 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
6491 output.
6492 (getpkt_or_notif_sane_1): Likewise.
6493
e4241ace
YQ
64942017-01-13 Yao Qi <yao.qi@linaro.org>
6495
6496 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
6497 of CC. Pass "-x c++-header" instead of "-x c".
6498
3015c064
SM
64992017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6500
6501 * remote.c (remote_can_async_p): Update comment.
6502
fde1b17d
SM
65032017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6504
6505 * linux-nat.c (linux_nat_can_async_p): Update comment.
6506
ca1ca08b
SM
65072017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6508
6509 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
6510
4ad2da73
SM
65112017-01-11 Simon Marchi <simon.marchi@ericsson.com>
6512
6513 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
6514
c8b23b3f
TT
65152017-01-10 Tom Tromey <tom@tromey.com>
6516
6517 * python/py-type.c (typy_legacy_template_argument): Update.
6518 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
6519 ~demangle_parse_info): Declare new members.
6520 (cp_demangled_name_to_comp): Return unique_ptr.
6521 (cp_demangled_name_parse_free)
6522 (make_cleanup_cp_demangled_name_parse_free)
6523 (cp_new_demangle_parse_info): Remove.
6524 * cp-support.c (do_demangled_name_parse_free_cleanup)
6525 (make_cleanup_cp_demangled_name_parse_free): Remove.
6526 (inspect_type, cp_canonicalize_string_full)
6527 (cp_canonicalize_string): Update.
6528 (mangled_name_to_comp): Change return type.
6529 (cp_class_name_from_physname, method_name_from_physname)
6530 (cp_func_name, cp_remove_params): Update.
6531 * cp-name-parser.y (demangle_parse_info): New constructor, from
6532 cp_new_demangle_parse_info.
6533 (~demangle_parse_info): New destructor, from
6534 cp_demangled_name_parse_free.
6535 (cp_merge_demangle_parse_infos): Update.
6536 (cp_demangled_name_to_comp): Change return type.
6537
1ac32117
TT
65382017-01-10 Tom Tromey <tom@tromey.com>
6539
6540 * top.c (prevent_dont_repeat): Change return type.
6541 * python/python.c (execute_gdb_command): Use std::string.
6542 Update.
6543 * guile/guile.c (gdbscm_execute_gdb_command): Update.
6544 * command.h (prevent_dont_repeat): Change return type.
6545 * breakpoint.c (bpstat_do_actions_1): Update.
6546
0cf08227
TT
65472017-01-10 Tom Tromey <tom@tromey.com>
6548
6549 * value.h (scoped_value_mark::~scoped_value_mark): Call
6550 free_to_mark.
6551 (scoped_value_mark::free_to_mark): New method.
6552 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
6553 scoped_value_mark.
6554
eb115069
TT
65552017-01-10 Tom Tromey <tom@tromey.com>
6556
6557 * python/py-value.c (valpy_dereference, valpy_referenced_value)
6558 (valpy_reference_value, valpy_const_value, valpy_get_address)
6559 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
6560 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
6561 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
6562 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
6563 scoped_value_mark.
6564 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
6565 * value.h (scoped_value_mark): New class.
6566
906768f9
TT
65672017-01-10 Tom Tromey <tom@tromey.com>
6568
6569 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
6570 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
6571 * psymtab.c (discard_psymtabs_upto): Remove.
6572 (make_cleanup_discard_psymtabs): Remove.
6573 (struct psymtab_state): Remove.
6574
bef155c3
TT
65752017-01-10 Tom Tromey <tom@tromey.com>
6576
6577 * record-full.c (record_full_save_cleanups): Remove.
6578 (record_full_save): Use gdb::unlinker.
6579 * gcore.c (do_bfd_delete_cleanup): Remove.
6580 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
6581 cleanups.
6582 * dwarf2read.c (unlink_if_set): Remove.
6583 (write_psymtabs_to_index): Use gdb::unlinker.
6584 * common/gdb_unlinker.h: New file.
6585
192b62ce
TT
65862017-01-10 Tom Tromey <tom@tromey.com>
6587
6588 * windows-tdep.c (windows_xfer_shared_library): Update.
6589 * windows-nat.c (windows_make_so): Update.
6590 * utils.h (make_cleanup_bfd_unref): Remove.
6591 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
6592 * symfile.h (symfile_bfd_open)
6593 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
6594 * symfile.c (read_symbols, symbol_file_add)
6595 (separate_debug_file_exists): Update.
6596 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
6597 (generic_load, reread_symbols): Update.
6598 * symfile-mem.c (symbol_file_add_from_memory): Update.
6599 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
6600 (spu_symbol_file_add_from_memory): Update.
6601 * solist.h (struct target_so_ops) <bfd_open>: Return
6602 gdb_bfd_ref_ptr.
6603 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
6604 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
6605 gdb_bfd_ref_ptr.
6606 (solib_map_sections, reload_shared_libraries_1): Update.
6607 * solib-svr4.c (enable_break): Update.
6608 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
6609 * solib-frv.c (enable_break2): Update.
6610 * solib-dsbt.c (enable_break): Update.
6611 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
6612 gdb_bfd_ref_ptr.
6613 (darwin_solib_get_all_image_info_addr_at_init): Update.
6614 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
6615 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
6616 * record-full.c (record_full_save): Update.
6617 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
6618 * procfs.c (insert_dbx_link_bpt_in_file): Update.
6619 * minidebug.c (find_separate_debug_file_in_section): Return
6620 gdb_bfd_ref_ptr.
6621 * machoread.c (macho_add_oso_symfile): Change abfd to
6622 gdb_bfd_ref_ptr.
6623 (macho_symfile_read_all_oso): Update.
6624 (macho_check_dsym): Return gdb_bfd_ref_ptr.
6625 (macho_symfile_read): Update.
6626 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
6627 (jit_bfd_try_read_symtab): Update.
6628 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6629 (gdb_bfd_openw, gdb_bfd_openr_iovec)
6630 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
6631 gdb_bfd_ref_ptr.
6632 (gdb_bfd_ref_policy): New struct.
6633 (gdb_bfd_ref_ptr): New typedef.
6634 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6635 (gdb_bfd_openw, gdb_bfd_openr_iovec)
6636 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
6637 gdb_bfd_ref_ptr.
6638 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
6639 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
6640 (gcore_command): Update.
6641 * exec.c (exec_file_attach): Update.
6642 * elfread.c (elf_symfile_read): Update.
6643 * dwarf2read.c (dwarf2_get_dwz_file): Update.
6644 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
6645 (open_and_init_dwo_file): Update.
6646 (open_dwp_file): Return gdb_bfd_ref_ptr.
6647 (open_and_init_dwp_file): Update.
6648 * corelow.c (core_open): Update.
6649 * compile/compile-object-load.c (compile_object_load): Update.
6650 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
6651 * coffread.c (coff_symfile_read): Update.
6652 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
6653 gdb_bfd_ref_ptr. Rename.
6654 (dump_bfd_file, restore_command): Update.
6655 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
6656 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
6657 (find_separate_debug_file_by_buildid): Update.
6658
50315b21
TT
66592017-01-10 Tom Tromey <tom@tromey.com>
6660
6661 * common/gdb_ref_ptr.h: New file.
6662 * python/py-ref.h (struct gdbpy_ref_policy): New.
6663 (gdbpy_ref): Now a typedef.
6664
fc4007c9
TT
66652017-01-10 Tom Tromey <tom@tromey.com>
6666
6667 * utils.h (make_cleanup_htab_delete): Don't declare.
6668 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
6669 Remove.
6670 * linespec.c (decode_compound_collector): Add constructor,
6671 destructor.
6672 (lookup_prefix_sym): Remove cleanup.
6673 (symtab_collector): Add constructor, destructor.
6674 (collect_symtabs_from_filename): Remove cleanup.
6675 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
6676 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
6677 Use htab_up.
6678 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
6679 * dwarf2read.c (dw2_expand_symtabs_matching)
6680 (dw2_map_symbol_filenames, dwarf_decode_macros)
6681 (write_psymtabs_to_index): Use htab_up.
6682 * dwarf2loc.c (func_verify_no_selftailcall)
6683 (call_site_find_chain_1, func_verify_no_selftailcall)
6684 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
6685 std::vector, gdb::unique_xmalloc_ptr.
6686 (call_sitep): Remove typedef.
6687 (dwarf2_locexpr_baton_eval): Remove unused variable.
6688
8dbcee67
TT
66892017-01-10 Tom Tromey <tom@tromey.com>
6690
6691 * python/python-internal.h (make_cleanup_py_decref)
6692 (make_cleanup_py_xdecref): Don't declare.
6693 * python/py-utils.c (py_decref, make_cleanup_py_decref)
6694 (py_xdecref, make_cleanup_py_xdecref): Remove.
6695
13df46cc
TT
66962017-01-10 Tom Tromey <tom@tromey.com>
6697
6698 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
6699 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
6700
06fc9bf7
TT
67012017-01-10 Tom Tromey <tom@tromey.com>
6702
6703 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
6704
830a4934
TT
67052017-01-10 Tom Tromey <tom@tromey.com>
6706
6707 * python/py-utils.c (unicode_to_encoded_string)
6708 (python_string_to_target_string)
6709 (python_string_to_target_python_string)
6710 (python_string_to_host_string, gdbpy_obj_to_string)
6711 (get_addr_from_python): Use gdbpy_ref.
6712
4586d543
TT
67132017-01-10 Tom Tromey <tom@tromey.com>
6714
6715 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
6716 gdbpy_ref.
6717
59876f8f
TT
67182017-01-10 Tom Tromey <tom@tromey.com>
6719
6720 * python/python.c (eval_python_command, gdbpy_decode_line)
6721 (gdbpy_run_events, gdbpy_start_type_printers)
6722 (gdbpy_apply_type_printers): Use gdbpy_ref.
6723
97d83487
TT
67242017-01-10 Tom Tromey <tom@tromey.com>
6725
6726 * python/py-param.c (get_doc_string, compute_enum_values): Use
6727 gdbpy_ref.
6728
9205649a
TT
67292017-01-10 Tom Tromey <tom@tromey.com>
6730
6731 * python/py-inferior.c (find_thread_object, build_inferior_list):
6732 Use gdbpy_ref.
6733
74c49d45
TT
67342017-01-10 Tom Tromey <tom@tromey.com>
6735
6736 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
6737
16361ffb
TT
67382017-01-10 Tom Tromey <tom@tromey.com>
6739
6740 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
6741 gdbpy_ref.
6742
905f2cca
TT
67432017-01-10 Tom Tromey <tom@tromey.com>
6744
6745 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
6746 extra incref.
6747 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
6748 Use gdbpy_ref.
6749
64081434
TT
67502017-01-10 Tom Tromey <tom@tromey.com>
6751
6752 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
6753 gdbpy_ref.
6754
59e9e831
TT
67552017-01-10 Tom Tromey <tom@tromey.com>
6756
6757 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
6758 decref results of PyArg_ParseTupleAndKeywords.
6759
9de10f6d
TT
67602017-01-10 Tom Tromey <tom@tromey.com>
6761
6762 * python/python.c (python_run_simple_file): Use
6763 unique_xmalloc_ptr, gdbpy_ref.
6764
2bd5759d
TT
67652017-01-10 Tom Tromey <tom@tromey.com>
6766
6767 * python/py-prettyprint.c (print_stack_unless_memory_error)
6768 (print_string_repr, print_children): Use gdbpy_ref.
6769 (dummy_python_frame): New class.
6770 (dummy_python_frame::dummy_python_frame): Rename from
6771 push_dummy_python_frame.
6772 (py_restore_tstate): Remove.
6773
3b4e0e01
TT
67742017-01-10 Tom Tromey <tom@tromey.com>
6775
6776 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
6777
17a22718
TT
67782017-01-10 Tom Tromey <tom@tromey.com>
6779
6780 * python/python.c (ensure_python_env, restore_python_env):
6781 Remove.
6782 * python/python-internal.h (ensure_python_env): Don't declare.
6783 * varobj.h (varobj_ensure_python_env): Don't declare.
6784 * varobj.c (varobj_ensure_python_env): Remove.
6785
68cdc557
TT
67862017-01-10 Tom Tromey <tom@tromey.com>
6787
6788 * varobj.c (varobj_value_get_print_value): Use
6789 gdbpy_enter_varobj.
6790
1eba6383
TT
67912017-01-10 Tom Tromey <tom@tromey.com>
6792
6793 * python/py-prettyprint.c (print_string_repr, print_children):
6794 Update.
6795 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
6796 of "encoding".
6797 * varobj.c (varobj_value_get_print_value): Update.
6798 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
6799
bde7b3e3
TT
68002017-01-10 Tom Tromey <tom@tromey.com>
6801
6802 * varobj.c (varobj_get_display_hint)
6803 (dynamic_varobj_has_child_method, install_new_value_visualizer)
6804 (varobj_set_visualizer, free_variable): Use
6805 gdbpy_enter_varobj.
6806
a7785f8c
TT
68072017-01-10 Tom Tromey <tom@tromey.com>
6808
6809 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
6810 (do_finish_initialization): New function. Use gdbpy_ref.
6811 (gdbpy_finish_initialization): Use gdbpy_enter. Call
6812 do_finish_initialization.
6813
2865bfce
TT
68142017-01-10 Tom Tromey <tom@tromey.com>
6815
6816 * python/py-param.c (get_set_value, get_show_value): Use
6817 gdbpy_enter, gdbpy_ref.
6818
0e9dcc75
TT
68192017-01-10 Tom Tromey <tom@tromey.com>
6820
6821 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
6822
12a5cedd
TT
68232017-01-10 Tom Tromey <tom@tromey.com>
6824
6825 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
6826
788f2586
TT
68272017-01-10 Tom Tromey <tom@tromey.com>
6828
6829 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
6830 Use gdbpy_enter_varobj.
6831
6cd67bea
TT
68322017-01-10 Tom Tromey <tom@tromey.com>
6833
6834 * varobj.c (gdbpy_enter_varobj): New constructor.
6835 * python/python-internal.h (gdbpy_enter_varobj): New class.
6836 * python/py-varobj.c (py_varobj_get_iterator): Use
6837 gdbpy_enter_varobj.
6838
14b122bf
TT
68392017-01-10 Tom Tromey <tom@tromey.com>
6840
6841 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
6842 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
6843 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
6844 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
6845 unique_xmalloc_ptr.
6846 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
6847
bf1ca3b9
TT
68482017-01-10 Tom Tromey <tom@tromey.com>
6849
6850 * python/py-xmethods.c (invoke_match_method): Use
6851 gdbpy_ref.
6852
572a5524
TT
68532017-01-10 Tom Tromey <tom@tromey.com>
6854
6855 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
6856 gdbpy_enter, gdbpy_ref.
6857
396a78b6
TT
68582017-01-10 Tom Tromey <tom@tromey.com>
6859
6860 * python/python.c (python_interactive_command): Use gdbpy_enter.
6861
a88b13c7
TT
68622017-01-10 Tom Tromey <tom@tromey.com>
6863
6864 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
6865 gdbpy_ref.
6866
e9f0c363
TT
68672017-01-10 Tom Tromey <tom@tromey.com>
6868
6869 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
6870 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
6871
6349f452
TT
68722017-01-10 Tom Tromey <tom@tromey.com>
6873
6874 * utils.h (htab_deleter): New struct.
6875 (htab_up): New typedef.
6876 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
6877 gdbpy_enter, gdbpy_ref, htab_up.
6878
c0171de6
TT
68792017-01-10 Tom Tromey <tom@tromey.com>
6880
6881 * python/py-unwind.c (pending_frame_invalidate): Remove.
6882 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
6883
f18e226f
TT
68842017-01-10 Tom Tromey <tom@tromey.com>
6885
6886 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
6887 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
6888
c57af3f1
TT
68892017-01-10 Tom Tromey <tom@tromey.com>
6890
6891 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
6892
60e600ec
TT
68932017-01-10 Tom Tromey <tom@tromey.com>
6894
6895 * python/python.c (gdbpy_eval_from_control_command)
6896 (gdbpy_source_script, gdbpy_run_events)
6897 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
6898 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
6899 gdbpy_enter.
6900
bf7da5b0
TT
69012017-01-10 Tom Tromey <tom@tromey.com>
6902
6903 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
6904
2d38bced
TT
69052017-01-10 Tom Tromey <tom@tromey.com>
6906
6907 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
6908
07bc7329
TT
69092017-01-10 Tom Tromey <tom@tromey.com>
6910
6911 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
6912 (python_on_inferior_call_pre, python_on_inferior_call_post)
6913 (python_on_memory_change, python_on_register_change)
6914 (python_inferior_exit, python_new_objfile, add_thread_object)
6915 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
6916
6e7c365e
TT
69172017-01-10 Tom Tromey <tom@tromey.com>
6918
6919 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
6920 (bpfinishpy_handle_exit): Use gdbpy_enter.
6921
6ba0cd40
TT
69222017-01-10 Tom Tromey <tom@tromey.com>
6923
6924 * python/py-cmd.c (cmdpy_destroyer)
6925 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
6926 gdbpy_enter.
6927
de2dc875
TT
69282017-01-10 Tom Tromey <tom@tromey.com>
6929
6930 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
6931 gdbpy_enter.
6932 (gdbpy_breakpoint_has_cond): Likewise.
6933
4ecee2c4
TT
69342017-01-10 Tom Tromey <tom@tromey.com>
6935
6936 * python/python.c (gdbpy_enter): New constructor.
6937 (~gdbpy_enter): New destructor.
6938 (restore_python_env, ensure_python_env): Rewrite.
6939 * python/python-internal.h (gdbpy_enter): New class.
6940
37fce74f
TT
69412017-01-10 Tom Tromey <tom@tromey.com>
6942
6943 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
6944
53a0cca3
TT
69452017-01-10 Tom Tromey <tom@tromey.com>
6946
6947 * python/py-value.c (value_has_field, get_field_flag)
6948 (get_field_type, valpy_getitem, convert_value_from_python): Use
6949 gdbpy_ref.
6950
ff3724f5
TT
69512017-01-10 Tom Tromey <tom@tromey.com>
6952
6953 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
6954 gdbpy_ref.
6955
0700aea5
TT
69562017-01-10 Tom Tromey <tom@tromey.com>
6957
6958 * python/py-prettyprint.c (search_pp_list)
6959 (find_pretty_printer_from_objfiles)
6960 (find_pretty_printer_from_progspace)
6961 (find_pretty_printer_from_gdb, find_pretty_printer)
6962 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
6963 gdbpy_ref.
6964
1bb44c9f
TT
69652017-01-10 Tom Tromey <tom@tromey.com>
6966
6967 * python/py-param.c (call_doc_function): Use gdbpy_ref.
6968
87ce03fd
TT
69692017-01-10 Tom Tromey <tom@tromey.com>
6970
6971 * python/py-linetable.c (build_line_table_tuple_from_pcs)
6972 (ltpy_get_all_source_lines): Use gdbpy_ref.
6973
ee0a3fb8
TT
69742017-01-10 Tom Tromey <tom@tromey.com>
6975
6976 * python/py-framefilter.c (extract_sym, extract_value)
6977 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
6978 gdbpy_ref.
6979
bf2a52fa
TT
69802017-01-10 Tom Tromey <tom@tromey.com>
6981
6982 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
6983
f59fe7f8
TT
69842017-01-10 Tom Tromey <tom@tromey.com>
6985
6986 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
6987
80bd970a
TT
69882017-01-10 Tom Tromey <tom@tromey.com>
6989
6990 * python/py-function.c (convert_values_to_python, fnpy_init): Use
6991 gdbpy_ref.
6992
d1b3de2e
TT
69932017-01-10 Tom Tromey <tom@tromey.com>
6994
6995 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
6996
3bb43384
TT
69972017-01-10 Tom Tromey <tom@tromey.com>
6998
6999 * python/py-type.c (convert_field, make_fielditem, typy_fields)
7000 (typy_range): Use gdbpy_ref.
7001
abf5651e
TT
70022017-01-10 Tom Tromey <tom@tromey.com>
7003
7004 * python/py-threadevent.c (create_thread_event_object): Use
7005 gdbpy_ref.
7006 * python/py-stopevent.c (create_stop_event_object): Simplify.
7007 (emit_stop_event): Use gdbpy_ref.
7008 * python/py-signalevent.c (create_signal_event_object): Use
7009 gdbpy_ref.
7010 * python/py-newobjfileevent.c (create_new_objfile_event_object)
7011 (emit_new_objfile_event, create_clear_objfiles_event_object)
7012 (emit_clear_objfiles_event): Use gdbpy_ref.
7013 * python/py-infevents.c (create_inferior_call_event_object)
7014 (create_register_changed_event_object)
7015 (create_memory_changed_event_object, emit_inferior_call_event)
7016 (emit_memory_changed_event, emit_register_changed_event): Use
7017 gdbpy_ref.
7018 * python/py-exitedevent.c (create_exited_event_object)
7019 (emit_exited_event): Use gdbpy_ref.
7020 * python/py-event.h (evpy_emit_event): Remove
7021 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
7022 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
7023 * python/py-continueevent.c (emit_continue_event): Use
7024 gdbpy_ref.
7025 * python/py-breakpoint.c (gdbpy_breakpoint_created)
7026 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
7027 gdbpy_ref.
7028 * python/py-bpevent.c (create_breakpoint_event_object): Use
7029 gdbpy_ref.
7030
a68ff33e
TT
70312017-01-10 Tom Tromey <tom@tromey.com>
7032
7033 * python/py-ref.h: New file.
7034
7becfd03
SM
70352017-01-10 Simon Marchi <simon.marchi@ericsson.com>
7036
7037 * cli-out.c (cli_ui_out::do_redirect): Change return type to
7038 void.
7039 * cli-out.h (cli_ui_out::do_redirect): Likewise.
7040 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
7041 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
7042 * ui-out.c (ui_out::redirect): Likewise.
7043 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
7044 * cli/cli-logging.c (set_logging_redirect): Update call site of
7045 ui_out::redirect.
7046 (handle_redirections): Likewise.
7047 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
7048 * top.c (execute_command_to_string): Likewise.
7049 * utils.c (do_ui_out_redirect_pop): Likewise.
7050
df294654
SM
70512017-01-10 Simon Marchi <simon.marchi@ericsson.com>
7052
7053 * stack.c (_initialize_stack): Update "frame" command help message.
7054
f5e6296e
IB
70552017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
7056
7057 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
7058
0e2d6fa6
YQ
70592017-01-06 Yao Qi <yao.qi@linaro.org>
7060
7061 * x86-linux-nat.h: Include gdb_proc_service.h.
7062
44d6d3f9
YQ
70632017-01-06 Yao Qi <yao.qi@linaro.org>
7064
7065 * ser-base.h: Include serial.h.
7066
656731fe
YQ
70672017-01-06 Yao Qi <yao.qi@linaro.org>
7068
7069 * ppc-linux-tdep.h: Include ppc-tdep.h.
7070
1ca8f924
YQ
70712017-01-06 Yao Qi <yao.qi@linaro.org>
7072
7073 * nat/amd64-linux-siginfo.h: Include signal.h.
7074
bc3008c4
YQ
70752017-01-06 Yao Qi <yao.qi@linaro.org>
7076
7077 * nat/aarch64-linux-hw-point.h: Include break-common.h.
7078
66c80d03
YQ
70792017-01-06 Yao Qi <yao.qi@linaro.org>
7080
7081 * mi/mi-parse.h: Include mi-cmds.h.
7082
051d2dda
YQ
70832017-01-06 Yao Qi <yao.qi@linaro.org>
7084
7085 * inf-loop.c: Don't include "target.h".
7086 * inf-loop.h: Include it here.
7087
8018d34f
YQ
70882017-01-06 Yao Qi <yao.qi@linaro.org>
7089
7090 * dfp.h: Include "dboulest.h" and "expression.h".
7091
c0b8369c
YQ
70922017-01-06 Yao Qi <yao.qi@linaro.org>
7093
7094 * ax-gdb.h: Include "ax.h".
7095
ad5cba2a
YQ
70962017-01-06 Yao Qi <yao.qi@linaro.org>
7097
7098 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
7099 with nat/gdb_ptrace.h.
7100
1c33cd7f
YQ
71012017-01-05 Yao Qi <yao.qi@linaro.org>
7102
7103 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
7104 new line.
7105 (mips64_fbsd_sigframe_init): Likewise.
7106
c988ac1d
JB
71072017-01-04 John Baldwin <jhb@FreeBSD.org>
7108
7109 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
7110 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
7111
b268007c
JB
71122017-01-04 John Baldwin <jhb@FreeBSD.org>
7113
7114 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7115 * NEWS: Mention new FreeBSD/mips native configuration.
7116 * config/mips/fbsd.mh: New file.
7117 * configure.host: Add mips*-*-freebsd*.
7118 * mips-fbsd-nat.c: New file.
7119
387360da
JB
71202017-01-04 John Baldwin <jhb@FreeBSD.org>
7121
7122 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
7123 (ALLDEPFILES): Add mips-fbsd-tdep.c.
7124 * NEWS: Mention new FreeBSD/mips target.
7125 * configure.tgt: Add mips*-*-freebsd*.
7126 * mips-fbsd-tdep.c: New file.
7127 * mips-fbsd-tdep.h: New file.
7128
2aaaf250
YQ
71292017-01-04 Yao Qi <yao.qi@linaro.org>
7130
7131 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
7132 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
7133
61baf725
JB
71342017-01-01 Joel Brobecker <brobecker@adacore.com>
7135
6dbb839a 7136 Update copyright year range in all GDB files.
61baf725 7137
c113e7ff 71382017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 7139
c113e7ff 7140 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 7141
c113e7ff 7142For older changes see ChangeLog-2016.
c906108c
SS
7143\f
7144Local Variables:
7145mode: change-log
7146left-margin: 8
7147fill-column: 74
7148version-control: never
57da7796 7149coding: utf-8
c906108c 7150End:
This page took 2.622151 seconds and 4 git commands to generate.