gdb: define builtin long type to be 64 bits on amd64 Cygwin
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
2
3 PR gdb/21500
4 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
5 to...
6 (amd64_windows_init_abi_common): ... this. Don't set size of
7 long type.
8 (amd64_windows_init_abi): New function.
9 (amd64_cygwin_init_abi): New function.
10 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
11 the Cygwin OS ABI.
12 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
13 comment.
14
15 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
16
17 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
18 * windows-tdep.c (CYGWIN_DLL_NAME): New.
19 (pe_import_directory_entry): New struct type.
20 (is_linked_with_cygwin_dll): New function.
21 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
22 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
23 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
24
25 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
26
27 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
28 i386_cygwin_core_osabi_sniffer.
29
30 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
31
32 * i386-cygwin-tdep.c: Rename to...
33 * i386-windows-tdep.c: ... this.
34 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
35 i386-windows-tdep.c.
36 * configure.tgt: Likewise.
37
38 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
39
40 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
41 * osabi.c (gdb_osabi_names): Add "Windows".
42 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
43 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
44 (i386_cygwin_core_osabi_sniffer): New function, extracted from
45 i386_cygwin_osabi_sniffer.
46 (_initialize_i386_cygwin_tdep): Register OS ABI
47 GDB_OSABI_WINDOWS for i386.
48 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
49 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
50 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
51 for x86-64.
52 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
53 when the target matches '*-*-mingw*'.
54
55 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
56
57 * defs.h (enum gdb_osabi): Move to...
58 * osabi.h (enum gdb_osabi): ... here.
59 * gdbarch.sh: Include osabi.h in gdbarch.h.
60 * gdbarch.h: Re-generate.
61
62 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
63
64 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
65 function.
66 (_initialize_amd64_windows_tdep): Register osabi sniffer.
67
68 2020-03-14 Tom Tromey <tom@tromey.com>
69
70 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
71 for C++.
72 (c_type_print_modifier): Likewise. Add "language" parameter.
73 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
74 (c_type_print_base_1): Update.
75 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
76 constants.
77 * type-stack.c (type_stack::insert): Handle tp_atomic and
78 tp_restrict.
79 (type_stack::follow_type_instance_flags): Likewise.
80 (type_stack::follow_types): Likewise. Merge type-following code.
81 * c-exp.y (RESTRICT, ATOMIC): New tokens.
82 (space_identifier, cv_with_space_id)
83 (const_or_volatile_or_space_identifier_noopt)
84 (const_or_volatile_or_space_identifier): Remove.
85 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
86 rules.
87 (ptr_operator, typebase): Update.
88 (enum token_flag) <FLAG_C>: New constant.
89 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
90 "_Atomic".
91 (lex_one_token): Handle FLAG_C.
92
93 2020-03-14 Kamil Rytarowski <n54@gmx.com>
94
95 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
96 it to the ptrace call.
97 * m68k-bsd-nat.c (store_registers): Likewise.
98
99 2020-03-14 Kamil Rytarowski <n54@gmx.com>
100
101 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
102 gdb_byte *.
103 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
104 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
105 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
106
107 2020-03-14 Kamil Rytarowski <n54@gmx.com>
108
109 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
110 nbsd_nat_target instead of inf_ptrace_target.
111 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
112 nbsd_nat_target.
113
114 2020-03-14 Kamil Rytarowski <n54@gmx.com>
115
116 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
117 register_t.
118
119 2020-03-14 Kamil Rytarowski <n54@gmx.com>
120
121 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
122 it to the ptrace call.
123 * alpha-bsd-nat.c (store_registers): Likewise.
124
125 2020-03-14 Kamil Rytarowski <n54@gmx.com>
126
127 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
128 includes.
129 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
130 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
131 fill_fpregset): Likewise.
132
133 2020-03-14 Kamil Rytarowski <n54@gmx.com>
134
135 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
136 nbsd_nat_target instead of inf_ptrace_target.
137 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
138 nbsd_nat_target.
139
140 2020-03-14 Kamil Rytarowski <n54@gmx.com>
141
142 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
143 register_t.
144
145 2020-03-14 Kamil Rytarowski <n54@gmx.com>
146
147 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
148 it to the ptrace call.
149 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
150 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
151 * arm-nbsd-nat.c (store_register): Likewise.
152 * arm-nbsd-nat.c (store_regs): Likewise.
153 * arm-nbsd-nat.c (store_fp_register): Likewise.
154 * arm-nbsd-nat.c (store_fp_regs): Likewise.
155
156 2020-03-14 Kamil Rytarowski <n54@gmx.com>
157
158 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
159 nbsd_nat_target instead of inf_ptrace_target.
160 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
161 nbsd_nat_target.
162
163 2020-03-14 Kamil Rytarowski <n54@gmx.com>
164
165 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
166 it to the ptrace call.
167 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
168
169 2020-03-14 Kamil Rytarowski <n54@gmx.com>
170
171 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
172 it to the ptrace call.
173 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
174
175 2020-03-14 Kamil Rytarowski <n54@gmx.com>
176
177 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
178 gdb_byte *.
179 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
180
181 2020-03-14 Kamil Rytarowski <n54@gmx.com>
182
183 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
184 instead of inf_ptrace_target.
185 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
186 nbsd_nat_target.
187
188 2020-03-14 Kamil Rytarowski <n54@gmx.com>
189
190 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
191 register_t.
192
193 2020-03-14 Kamil Rytarowski <n54@gmx.com>
194
195 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
196 register_t.
197
198 2020-03-14 Kamil Rytarowski <n54@gmx.com>
199
200 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
201 register_t.
202
203 2020-03-13 Tom Tromey <tom@tromey.com>
204
205 * value.h (val_print): Don't declare.
206 * valprint.h (val_print_array_elements)
207 (val_print_scalar_formatted, generic_val_print): Don't declare.
208 * valprint.c (generic_val_print_array): Take a struct value.
209 (generic_val_print_ptr, generic_val_print_memberptr)
210 (generic_val_print_bool, generic_val_print_int)
211 (generic_val_print_char, generic_val_print_complex)
212 (generic_val_print): Remove.
213 (generic_value_print): Update.
214 (do_val_print): Remove unused parameters. Don't call
215 la_val_print.
216 (val_print): Remove.
217 (common_val_print): Update. Don't call value_check_printable.
218 (val_print_scalar_formatted, val_print_array_elements): Remove.
219 * rust-lang.c (rust_val_print): Remove.
220 (rust_language_defn): Update.
221 * p-valprint.c (pascal_val_print): Remove.
222 (pascal_value_print_inner): Update.
223 (pascal_object_print_val_fields, pascal_object_print_val):
224 Remove.
225 (pascal_object_print_static_field): Update.
226 * p-lang.h (pascal_val_print): Don't declare.
227 * p-lang.c (pascal_language_defn): Update.
228 * opencl-lang.c (opencl_language_defn): Update.
229 * objc-lang.c (objc_language_defn): Update.
230 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
231 * m2-lang.h (m2_val_print): Don't declare.
232 * m2-lang.c (m2_language_defn): Update.
233 * language.h (struct language_defn) <la_val_print>: Remove.
234 * language.c (unk_lang_value_print_inner): Rename. Change
235 argument types.
236 (unknown_language_defn, auto_language_defn): Update.
237 * go-valprint.c (go_val_print): Remove.
238 * go-lang.h (go_val_print): Don't declare.
239 * go-lang.c (go_language_defn): Update.
240 * f-valprint.c (f_val_print): Remove.
241 * f-lang.h (f_value_print): Don't declare.
242 * f-lang.c (f_language_defn): Update.
243 * d-valprint.c (d_val_print): Remove.
244 * d-lang.h (d_value_print): Don't declare.
245 * d-lang.c (d_language_defn): Update.
246 * cp-valprint.c (cp_print_value_fields)
247 (cp_print_value_fields_rtti, cp_print_value): Remove.
248 (cp_print_static_field): Update.
249 * c-valprint.c (c_val_print_array, c_val_print_ptr)
250 (c_val_print_struct, c_val_print_union, c_val_print_int)
251 (c_val_print_memberptr, c_val_print): Remove.
252 * c-lang.h (c_val_print_array, cp_print_value_fields)
253 (cp_print_value_fields_rtti): Don't declare.
254 * c-lang.c (c_language_defn, cplus_language_defn)
255 (asm_language_defn, minimal_language_defn): Update.
256 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
257 (ada_val_print_enum): Take a struct value.
258 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
259 (ada_val_print): Remove.
260 (ada_value_print_1): Update.
261 (printable_val_type): Remove.
262 * ada-lang.h (ada_val_print): Don't declare.
263 * ada-lang.c (ada_language_defn): Update.
264
265 2020-03-13 Tom Tromey <tom@tromey.com>
266
267 * valprint.c (do_val_print): Update.
268 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
269 a struct value.
270 (value_to_value_object_no_release): Declare.
271 * python/py-value.c (value_to_value_object_no_release): New
272 function.
273 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
274 struct value.
275 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
276 function.
277 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
278 a struct value.
279 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
280 Declare.
281 (gdbscm_apply_val_pretty_printer): Take a struct value.
282 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
283 value.
284 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
285 value.
286 * extension-priv.h (struct extension_language_ops)
287 <apply_val_pretty_printer>: Take a struct value.
288 * cp-valprint.c (cp_print_value): Create a struct value.
289 (cp_print_value): Update.
290
291 2020-03-13 Tom Tromey <tom@tromey.com>
292
293 * ada-valprint.c (print_field_values): Call common_val_print.
294
295 2020-03-13 Tom Tromey <tom@tromey.com>
296
297 * ada-valprint.c (val_print_packed_array_elements): Remove
298 bitoffset and val parameters. Call common_val_print.
299 (ada_val_print_string): Remove offset, address, and original_value
300 parameters.
301 (ada_val_print_array): Update.
302 (ada_value_print_array): New function.
303 (ada_value_print_1): Call it.
304
305 2020-03-13 Tom Tromey <tom@tromey.com>
306
307 * ada-valprint.c (ada_value_print): Use common_val_print.
308
309 2020-03-13 Tom Tromey <tom@tromey.com>
310
311 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
312
313 2020-03-13 Tom Tromey <tom@tromey.com>
314
315 * ada-valprint.c (ada_value_print_num): New function.
316 (ada_value_print_1): Use it.
317
318 2020-03-13 Tom Tromey <tom@tromey.com>
319
320 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
321
322 2020-03-13 Tom Tromey <tom@tromey.com>
323
324 * ada-valprint.c (ada_value_print_ptr): New function.
325 (ada_value_print_1): Use it.
326
327 2020-03-13 Tom Tromey <tom@tromey.com>
328
329 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
330 call common_val_print.
331 (ada_val_print_1): Update.
332 (ada_value_print_1): New function.
333 (ada_value_print_inner): Rewrite.
334
335 2020-03-13 Tom Tromey <tom@tromey.com>
336
337 * cp-valprint.c (cp_print_value_fields): Update.
338 (cp_print_value): New function.
339
340 2020-03-13 Tom Tromey <tom@tromey.com>
341
342 * m2-valprint.c (m2_value_print_inner): Use
343 cp_print_value_fields.
344 * cp-valprint.c (cp_print_value_fields): New function.
345 * c-valprint.c (c_value_print_struct): New function.
346 (c_value_print_inner): Use c_value_print_struct.
347 * c-lang.h (cp_print_value_fields): Declare.
348
349 2020-03-13 Tom Tromey <tom@tromey.com>
350
351 * c-valprint.c (c_value_print_array): New function.
352 (c_value_print_inner): Use it.
353
354 2020-03-13 Tom Tromey <tom@tromey.com>
355
356 * c-valprint.c (c_value_print_memberptr): New function.
357 (c_value_print_inner): Use it.
358
359 2020-03-13 Tom Tromey <tom@tromey.com>
360
361 * c-valprint.c (c_value_print_int): New function.
362 (c_value_print_inner): Use it.
363
364 2020-03-13 Tom Tromey <tom@tromey.com>
365
366 * c-valprint.c (c_value_print_ptr): New function.
367 (c_value_print_inner): Use it.
368
369 2020-03-13 Tom Tromey <tom@tromey.com>
370
371 * c-valprint.c (c_value_print_inner): Rewrite.
372
373 2020-03-13 Tom Tromey <tom@tromey.com>
374
375 * valprint.c (generic_value_print_complex): New function.
376 (generic_value_print): Use it.
377
378 2020-03-13 Tom Tromey <tom@tromey.com>
379
380 * valprint.c (generic_val_print_float): Don't call
381 val_print_scalar_formatted.
382 (generic_val_print, generic_value_print): Update.
383
384 2020-03-13 Tom Tromey <tom@tromey.com>
385
386 * valprint.c (generic_value_print_char): New function
387 (generic_value_print): Use it.
388
389 2020-03-13 Tom Tromey <tom@tromey.com>
390
391 * valprint.c (generic_value_print_int): New function.
392 (generic_value_print): Use it.
393
394 2020-03-13 Tom Tromey <tom@tromey.com>
395
396 * valprint.c (generic_value_print_bool): New function.
397 (generic_value_print): Use it.
398
399 2020-03-13 Tom Tromey <tom@tromey.com>
400
401 * valprint.c (generic_val_print_func): Simplify.
402 (generic_val_print, generic_value_print): Update.
403
404 2020-03-13 Tom Tromey <tom@tromey.com>
405
406 * valprint.c (generic_val_print_flags): Remove.
407 (generic_val_print, generic_value_print): Update.
408 (val_print_type_code_flags): Add original_value parameter.
409
410 2020-03-13 Tom Tromey <tom@tromey.com>
411
412 * valprint.c (generic_val_print): Update.
413 (generic_value_print): Update.
414 * valprint.c (generic_val_print_enum): Don't call
415 val_print_scalar_formatted.
416
417 2020-03-13 Tom Tromey <tom@tromey.com>
418
419 * valprint.c (generic_value_print): Call generic_value_print_ptr.
420 * valprint.c (generic_value_print_ptr): New function.
421
422 2020-03-13 Tom Tromey <tom@tromey.com>
423
424 * valprint.c (generic_value_print): Rewrite.
425
426 2020-03-13 Tom Tromey <tom@tromey.com>
427
428 * p-valprint.c (pascal_object_print_value_fields)
429 (pascal_object_print_value): New functions.
430
431 2020-03-13 Tom Tromey <tom@tromey.com>
432
433 * p-valprint.c (pascal_value_print_inner): Rewrite.
434
435 2020-03-13 Tom Tromey <tom@tromey.com>
436
437 * f-valprint.c (f_value_print_innner): Rewrite.
438
439 2020-03-13 Tom Tromey <tom@tromey.com>
440
441 * m2-valprint.c (m2_print_unbounded_array): New overload.
442 (m2_print_unbounded_array): Update.
443 (m2_print_array_contents): Take a struct value.
444 (m2_value_print_inner): Rewrite.
445
446 2020-03-13 Tom Tromey <tom@tromey.com>
447
448 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
449 (d_value_print_inner): New function.
450 * d-lang.h (d_value_print_inner): Declare.
451 * d-lang.c (d_language_defn): Use d_value_print_inner.
452
453 2020-03-13 Tom Tromey <tom@tromey.com>
454
455 * go-valprint.c (go_value_print_inner): New function.
456 * go-lang.h (go_value_print_inner): Declare.
457 * go-lang.c (go_language_defn): Use go_value_print_inner.
458
459 2020-03-13 Tom Tromey <tom@tromey.com>
460
461 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
462 API.
463 (rust_val_print): Rewrite.
464 (rust_value_print_inner): New function, from rust_val_print.
465 (rust_language_defn): Use rust_value_print_inner.
466
467 2020-03-13 Tom Tromey <tom@tromey.com>
468
469 * ada-valprint.c (ada_value_print_inner): New function.
470 * ada-lang.h (ada_value_print_inner): Declare.
471 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
472
473 2020-03-13 Tom Tromey <tom@tromey.com>
474
475 * f-valprint.c (f_value_print_innner): New function.
476 * f-lang.h (f_value_print_innner): Declare.
477 * f-lang.c (f_language_defn): Use f_value_print_innner.
478
479 2020-03-13 Tom Tromey <tom@tromey.com>
480
481 * p-valprint.c (pascal_value_print_inner): New function.
482 * p-lang.h (pascal_value_print_inner): Declare.
483 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
484
485 2020-03-13 Tom Tromey <tom@tromey.com>
486
487 * m2-valprint.c (m2_value_print_inner): New function.
488 * m2-lang.h (m2_value_print_inner): Declare.
489 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
490
491 2020-03-13 Tom Tromey <tom@tromey.com>
492
493 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
494 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
495 * c-valprint.c (c_value_print_inner): New function.
496 * c-lang.h (c_value_print_inner): Declare.
497 * c-lang.c (c_language_defn, cplus_language_defn)
498 (asm_language_defn, minimal_language_defn): Use
499 c_value_print_inner.
500
501 2020-03-13 Tom Tromey <tom@tromey.com>
502
503 * p-valprint.c (pascal_object_print_value_fields): Now static.
504 * p-lang.h (pascal_object_print_value_fields): Don't declare.
505
506 2020-03-13 Tom Tromey <tom@tromey.com>
507
508 * c-valprint.c (c_val_print_array): Simplify.
509
510 2020-03-13 Tom Tromey <tom@tromey.com>
511
512 * valprint.c (value_print_array_elements): New function.
513 * valprint.h (value_print_array_elements): Declare.
514
515 2020-03-13 Tom Tromey <tom@tromey.com>
516
517 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
518 * mips-tdep.c (mips_print_register): Use
519 value_print_scalar_formatted.
520
521 2020-03-13 Tom Tromey <tom@tromey.com>
522
523 * valprint.h (value_print_scalar_formatted): Declare.
524 * valprint.c (value_print_scalar_formatted): New function.
525
526 2020-03-13 Tom Tromey <tom@tromey.com>
527
528 * valprint.h (generic_value_print): Declare.
529 * valprint.c (generic_value_print): New function.
530
531 2020-03-13 Tom Tromey <tom@tromey.com>
532
533 * valprint.c (do_val_print): Call la_value_print_inner, if
534 available.
535 * rust-lang.c (rust_language_defn): Update.
536 * p-lang.c (pascal_language_defn): Update.
537 * opencl-lang.c (opencl_language_defn): Update.
538 * objc-lang.c (objc_language_defn): Update.
539 * m2-lang.c (m2_language_defn): Update.
540 * language.h (struct language_defn) <la_value_print_inner>: New
541 member.
542 * language.c (unknown_language_defn, auto_language_defn): Update.
543 * go-lang.c (go_language_defn): Update.
544 * f-lang.c (f_language_defn): Update.
545 * d-lang.c (d_language_defn): Update.
546 * c-lang.c (c_language_defn, cplus_language_defn)
547 (asm_language_defn, minimal_language_defn): Update.
548 * ada-lang.c (ada_language_defn): Update.
549
550 2020-03-13 Tom Tromey <tom@tromey.com>
551
552 * c-valprint.c (c_value_print): Use common_val_print.
553
554 2020-03-13 Tom Tromey <tom@tromey.com>
555
556 * cp-valprint.c (cp_print_static_field): Use common_val_print.
557
558 2020-03-13 Tom Tromey <tom@tromey.com>
559
560 * f-valprint.c (f77_print_array_1, f_val_print): Use
561 common_val_print.
562
563 2020-03-13 Tom Tromey <tom@tromey.com>
564
565 * riscv-tdep.c (riscv_print_one_register_info): Use
566 common_val_print.
567
568 2020-03-13 Tom Tromey <tom@tromey.com>
569
570 * mi/mi-main.c (output_register): Use common_val_print.
571
572 2020-03-13 Tom Tromey <tom@tromey.com>
573
574 * infcmd.c (default_print_one_register_info): Use
575 common_val_print.
576
577 2020-03-13 Tom Tromey <tom@tromey.com>
578
579 * valprint.h (common_val_print_checked): Declare.
580 * valprint.c (common_val_print_checked): New function.
581 * stack.c (print_frame_arg): Use common_val_print_checked.
582
583 2020-03-13 Tom Tromey <tom@tromey.com>
584
585 * valprint.c (do_val_print): New function, from val_print.
586 (val_print): Use do_val_print.
587 (common_val_print): Use do_val_print.
588
589 2020-03-13 Tom Tromey <tom@tromey.com>
590
591 * valprint.c (value_print): Use scoped_value_mark.
592
593 2020-03-13 Tom de Vries <tdevries@suse.de>
594
595 PR symtab/25646
596 * psymtab.c (partial_symtab::partial_symtab): Don't set
597 globals_offset and statics_offset. Push element onto
598 current_global_psymbols and current_static_psymbols stacks.
599 (concat): New function.
600 (end_psymtab_common): Set globals_offset and statics_offset. Pop
601 element from current_global_psymbols and current_static_psymbols
602 stacks. Concat popped elements to global_psymbols and
603 static_symbols.
604 (add_psymbol_to_list): Use current_global_psymbols and
605 current_static_psymbols stacks.
606 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
607 current_static_psymbols fields.
608
609 2020-03-12 Christian Biesinger <cbiesinger@google.com>
610
611 * corelow.c (sniff_core_bfd): Remove.
612 (class core_target) <m_core_vec>: Remove.
613 (core_target::core_target): Update.
614 (core_file_fns): Remove.
615 (deprecated_add_core_fns): Remove.
616 (default_core_sniffer): Remove.
617 (sniff_core_bfd): Remove.
618 (default_check_format): Remove.
619 (gdb_check_format): Remove.
620 (core_target_open): Update.
621 (core_target::get_core_register_section): Update.
622 (get_core_registers_cb): Update.
623 (core_target::fetch_registers): Update.
624 * gdbcore.h (struct core_fns): Remove.
625 (deprecated_add_core_fns): Remove.
626 (default_core_sniffer): Remove.
627 (default_check_format): Remove.
628
629 2020-03-12 Tom Tromey <tom@tromey.com>
630
631 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
632 CORE_ADDR.
633 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
634
635 2020-03-12 Tom Tromey <tom@tromey.com>
636
637 * remote.c (remote_target::download_tracepoint)
638 (remote_target::enable_tracepoint)
639 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
640 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
641 sprintf_vma.
642
643 2020-03-12 Tom Tromey <tom@tromey.com>
644
645 * symfile-mem.c: Update CORE_ADDR size assert.
646
647 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
648
649 * selftest.m4: Move to gdbsupport/.
650 * acinclude.m4: Update path to selftest.m4.
651
652 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
653
654 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
655 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
656 gdbarch-selfselftests.c and selftest-arch.c.
657 (SUBDIR_UNITTESTS_OBS): Rename to...
658 (SELFTESTS_OBS): ... this.
659 (COMMON_SFILES): Remove disasm-selftests.c and
660 gdbarch-selftests.c.
661 * configure.ac: Don't add selftest-arch.{c,o} to
662 CONFIG_{SRCS,OBS}.
663 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
664 preprocessor conditions.
665
666 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
667
668 * configure.ac: Don't source bfd/development.sh.
669 * selftest.m4: Modify comment.
670 * configure: Re-generate.
671
672 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
673
674 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
675 not "true" or "false".
676 * configure: Re-generate.
677
678 2020-03-12 Christian Biesinger <cbiesinger@google.com>
679
680 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
681 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
682 renamed to arm_nbsd_supply_gregset.
683 (fetch_register): Update to call arm_nbsd_supply_gregset.
684 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
685 (arm_netbsd_nat_target::fetch_registers): Update.
686 (fetch_elfcore_registers): Removed.
687 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
688 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
689 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
690 not require NetBSD system headers.
691 (arm_nbsd_regset): New struct.
692 (arm_nbsd_iterate_over_regset_sections): New function.
693 (arm_netbsd_init_abi_common): Updated to call
694 set_gdbarch_iterate_over_regset_sections.
695 * arm-nbsd-tdep.h: New file.
696
697 2020-03-11 Kevin Buettner <kevinb@redhat.com>
698
699 * symtab.c (find_pc_sect_line): Add check which prevents infinite
700 recursion.
701
702 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
703
704 * configure: Re-generate.
705
706 2020-03-11 Tom Tromey <tromey@adacore.com>
707
708 * ada-typeprint.c (print_choices): Fix comment.
709
710 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
711
712 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
713 previous item in the list, when the list has no items.
714
715 2020-03-11 Tom de Vries <tdevries@suse.de>
716
717 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
718 PROP_LOCLIST handling code.
719
720 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
721
722 * buildsym-legacy.c (record_line): Pass extra parameter to
723 record_line.
724 * buildsym.c (buildsym_compunit::record_line): Take an extra
725 parameter, reduce duplication in the line table, and record the
726 is_stmt flag in the line table.
727 * buildsym.h (buildsym_compunit::record_line): Add extra
728 parameter.
729 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
730 non-statement lines.
731 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
732 this to the symtab builder.
733 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
734 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
735 through to dwarf_record_line_1.
736 * infrun.c (process_event_stop_test): When stepping, don't stop at
737 a non-statement instruction, and only refresh the step info when
738 we land in the middle of a line's range. Also add an extra
739 comment.
740 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
741 field.
742 * record-btrace.c (btrace_find_line_range): Only record lines
743 marked as is-statement.
744 * stack.c (frame_show_address): Show the frame address if we are
745 in a non-statement sal.
746 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
747 (maintenance_print_one_line_table): Print a header for the is_stmt
748 column, and include is_stmt information in the output.
749 * symtab.c (find_pc_sect_line): Find lines marked as statements in
750 preference to non-statements.
751 (find_pcs_for_symtab_line): Prefer is-statement entries.
752 (find_line_common): Likewise.
753 * symtab.h (struct linetable_entry): Add is_stmt field.
754 (struct symtab_and_line): Likewise.
755 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
756 arranging the line table.
757
758 2020-03-07 Tom de Vries <tdevries@suse.de>
759
760 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
761 DIE.
762
763 2020-03-07 Tom Tromey <tom@tromey.com>
764
765 * valops.c (value_literal_complex): Remove obsolete comment.
766 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
767 comment.
768
769 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
770
771 * infrun.h: Forward-declare thread_info.
772 (set_step_info): Add thread_info parameter, add doc.
773 * infrun.c (set_step_info): Add thread_info parameter, move doc
774 to header.
775 * infrun.c (process_event_stop_test): Pass thread to
776 set_step_info call.
777 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
778 set_step_info.
779 (prepare_one_step): Add thread_info parameter, pass it to
780 set_step_frame and prepare_one_step (recursive) call.
781 (step_1): Pass thread to prepare_one_step call.
782 (step_command_fsm::should_stop): Pass thread to
783 prepare_one_step.
784 (until_next_fsm): Pass thread to set_step_frame call.
785 (finish_command): Pass thread to set_step_info call.
786
787 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
788
789 * windows-tdep.c (windows_solib_create_inferior_hook):
790 Check if inferior is running.
791
792 2020-03-06 Tom de Vries <tdevries@suse.de>
793
794 * NEWS: Fix "the the".
795 * ctfread.c: Same.
796
797 2020-03-06 Tom de Vries <tdevries@suse.de>
798
799 * psymtab.c (psymtab_to_symtab): Don't print "done.".
800
801 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
802
803 * .dir-locals.el: Add a comment referencing the other copies of
804 this file.
805
806 2020-03-05 John Baldwin <jhb@FreeBSD.org>
807
808 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
809 psargs.
810
811 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
812
813 * .gitattributes: New file.
814
815 2020-03-04 Tom Tromey <tom@tromey.com>
816
817 * symmisc.c (print_symbol_bcache_statistics)
818 (print_objfile_statistics): Update.
819 * symfile.c (allocate_symtab): Use intern.
820 * psymtab.c (partial_symtab::partial_symtab): Use intern.
821 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
822 macro_cache>: Remove.
823 <string_cache>: New member.
824 (struct objfile) <intern>: New methods.
825 * elfread.c (elf_symtab_read): Use intern.
826 * dwarf2/read.c (fixup_go_packaging): Intern package name.
827 (dwarf2_compute_name, dwarf2_physname)
828 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
829 names.
830 (guess_partial_die_structure_name): Update.
831 (partial_die_info::fixup): Intern name.
832 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
833 name.
834 (dwarf2_name): Intern name. Update.
835 * buildsym.c (buildsym_compunit::get_macro_table): Use
836 string_cache.
837
838 2020-03-04 Tom Tromey <tom@tromey.com>
839
840 * jit.c (bfd_open_from_target_memory): Make "target" const.
841 * corefile.c (gnutarget): Now const.
842 * gdbcore.h (gnutarget): Now const.
843
844 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
845
846 * NEWS: Mention support for WOW64 processes.
847 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
848 (amd64_windows_segment_register_p): Remove static.
849 (_initialize_amd64_windows_nat): Update.
850 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
851 * i386-windows-nat.c (context_offset): Update.
852 (i386_mappings): Rename and remove static.
853 (i386_windows_segment_register_p): Remove static.
854 (_initialize_i386_windows_nat): Update.
855 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
856 (STATUS_WX86_SINGLE_STEP): New macro.
857 (EnumProcessModulesEx): New macro.
858 (Wow64SuspendThread): New macro.
859 (Wow64GetThreadContext): New macro.
860 (Wow64SetThreadContext): New macro.
861 (Wow64GetThreadSelectorEntry): New macro.
862 (windows_set_context_register_offsets): Add static.
863 (windows_set_segment_register_p): Likewise.
864 (windows_add_thread): Adapt for WOW64 processes.
865 (windows_fetch_one_register): Likewise.
866 (windows_nat_target::fetch_registers): Likewise.
867 (windows_store_one_register): Likewise.
868 (display_selector): Likewise.
869 (display_selectors): Likewise.
870 (handle_exception): Likewise.
871 (windows_continue): Likewise.
872 (windows_nat_target::resume): Likewise.
873 (windows_add_all_dlls): Likewise.
874 (do_initial_windows_stuff): Likewise.
875 (windows_nat_target::attach): Likewise.
876 (windows_get_exec_module_filename): Likewise.
877 (windows_nat_target::create_inferior): Likewise.
878 (windows_xfer_siginfo): Likewise.
879 (_initialize_loadable): Initialize Wow64SuspendThread,
880 Wow64GetThreadContext, Wow64SetThreadContext,
881 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
882 * windows-nat.h (windows_set_context_register_offsets):
883 Remove declaration.
884 (windows_set_segment_register_p): Likewise.
885 (i386_windows_segment_register_p): Add declaration.
886 (amd64_windows_segment_register_p): Likewise.
887
888 2020-03-04 Luis Machado <luis.machado@linaro.org>
889
890 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
891 in "info registers" for AArch64/ARM.
892
893 The change caused "info registers" to not print GPR's.
894
895 gdb/ChangeLog:
896
897 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
898
899 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
900 when reg->group is empty and reggroup is not.
901
902 2020-03-03 Tom Tromey <tromey@adacore.com>
903
904 * dwarf2/frame.c (struct dwarf2_frame_cache)
905 <checked_tailcall_bottom, entry_cfa_sp_offset,
906 entry_cfa_sp_offset_p>: Remove members.
907 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
908 (dwarf2_frame_prev_register): Don't call
909 dwarf2_tailcall_sniffer_first.
910 (dwarf2_append_unwinders): Don't append tailcall unwinder.
911 * frame-unwind.c (add_unwinder): New fuction.
912 (frame_unwind_init): Use it. Add tailcall unwinder.
913
914 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
915 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
916
917 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
918 value should be printed as true.
919
920 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
921
922 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
923 (windows_init_abi): Set and use windows_so_ops.
924
925 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
926
927 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
928 when verifying if dealing with a convenience variable.
929
930 2020-03-03 Luis Machado <luis.machado@linaro.org>
931
932 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
933
934 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
935
936 * infrun.c (gdbarch_supports_displaced_stepping): New.
937 (use_displaced_stepping): Break up conditions in smaller pieces.
938 Use gdbarch_supports_displaced_stepping.
939 (displaced_step_prepare_throw): Use
940 gdbarch_supports_displaced_stepping.
941
942 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
943
944 * NEWS: Mention new behaviour of the history filename.
945 * top.c (write_history_p): Add comment.
946 (show_write_history_p): Add header comment, give a different
947 message when history writing is on, but the history filename is
948 empty.
949 (history_filename): Add comment.
950 (history_filename_empty): New function.
951 (show_history_filename): Add header comment, give a different
952 message when the filename is empty.
953 (init_history): Compare history_filename against nullptr, and only
954 read history if the filename is not empty.
955 (set_history_filename): Add header comment, and only make
956 non-empty filenames absolute.
957 (init_main): Make the filename argument to 'set history filename'
958 optional.
959
960 2020-03-02 Christian Biesinger <cbiesinger@google.com>
961
962 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
963 (arm_supply_vfpregset): ...this, and update to use VFP registers.
964 (fetch_fp_register): Update.
965 (fetch_fp_regs): Update.
966 (store_fp_register): Update.
967 (store_fp_regs): Update.
968 (arm_netbsd_nat_target::read_description): New function.
969 (fetch_elfcore_registers): Update.
970
971 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
972
973 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
974 general_thread if the stop reply is missing a thread-id.
975 (remote_target::process_stop_reply): Use the first non-exited
976 thread if the target didn't pass a thread-id.
977 * infrun.c (do_target_wait): Move call to
978 switch_to_inferior_no_thread to ....
979 (do_target_wait_1): ... here.
980
981 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
982
983 * debuginfod-support.c: Include defs.h first.
984
985 2020-02-28 Tom de Vries <tdevries@suse.de>
986
987 * symfile.c (set_initial_language): Use default language for lookup.
988
989 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
990
991 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
992 reader variable, pass `this` to read_cutu_die_from_dwo.
993
994 2020-02-27 Aaron Merey <amerey@redhat.com>
995
996 * source.c (open_source_file): Check for nullptr when computing
997 srcpath.
998
999 2020-02-27 Tom Tromey <tromey@adacore.com>
1000
1001 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
1002 member.
1003 (dwarf2_add_field): Don't update nfields.
1004 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
1005
1006 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
1007
1008 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
1009 abs.
1010
1011 2020-02-26 Tom Tromey <tom@tromey.com>
1012
1013 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
1014 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
1015 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
1016 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
1017 per_cu_data.
1018
1019 2020-02-26 Tom Tromey <tom@tromey.com>
1020
1021 * dwarf2/index-write.c (psym_index_map): Change type.
1022 (add_address_entry_worker, write_one_signatured_type)
1023 (recursively_count_psymbols, recursively_write_psymbols)
1024 (class debug_names, psyms_seen_size, write_gdbindex)
1025 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
1026
1027 2020-02-26 Aaron Merey <amerey@redhat.com>
1028
1029 * Makefile.in: Handle optional debuginfod support.
1030 * NEWS: Update.
1031 * README: Add --with-debuginfod summary.
1032 * config.in: Regenerate.
1033 * configure: Regenerate.
1034 * configure.ac: Handle optional debuginfod support.
1035 * debuginfod-support.c: debuginfod helper functions.
1036 * debuginfod-support.h: Ditto.
1037 * doc/gdb.texinfo: Add --with-debuginfod to configure options
1038 summary.
1039 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
1040 when a dwz file cannot be found.
1041 * elfread.c (elf_symfile_read): Query debuginfod servers when a
1042 debuginfo file cannot be found.
1043 * source.c (open_source_file): Query debuginfod servers when a
1044 source file cannot be found.
1045 * top.c (print_gdb_configuration): Include
1046 --{with,without}-debuginfod in the output.
1047
1048 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
1049
1050 * thread.c (thr_try_catch_cmd): Print thread name.
1051
1052 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
1053
1054 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
1055 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
1056 dwarf2_fetch_die_type_sect_off): Move to...
1057 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
1058 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
1059 dwarf2_fetch_die_type_sect_off): ... here.
1060 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
1061 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
1062 dwarf2_fetch_die_type_sect_off): Move doc to header file.
1063
1064 2020-02-26 Tom de Vries <tdevries@suse.de>
1065
1066 PR gdb/25603
1067 * symfile.c (set_initial_language): Exit-early if
1068 language_mode == language_mode_manual.
1069
1070 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
1071
1072 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
1073 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
1074 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
1075
1076 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1077
1078 * gdbtypes.c (create_array_type_with_stride): Handle negative
1079 array strides.
1080 * valarith.c (value_subscripted_rvalue): Likewise.
1081
1082 2020-02-25 Luis Machado <luis.machado@linaro.org>
1083
1084 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
1085
1086 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
1087
1088 * loc.h (dwarf2_get_die_type): Move to...
1089 * read.h (dwarf2_get_die_type): ... here.
1090 * read.c (dwarf2_get_die_type): Move doc to header.
1091
1092 2020-02-25 Joel Brobecker <brobecker@adacore.com>
1093
1094 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
1095 'gnulib/Makefile.in' to the list.
1096
1097 2020-02-24 Tom Tromey <tom@tromey.com>
1098
1099 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
1100 Remove.
1101 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
1102 XOBNEWVEC.
1103
1104 2020-02-24 Tom Tromey <tom@tromey.com>
1105
1106 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
1107 New method.
1108 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
1109 (dw2_do_instantiate_symtab, dw2_get_file_names)
1110 (build_type_psymtab_dependencies, load_full_type_unit): Update.
1111
1112 2020-02-24 Tom Tromey <tom@tromey.com>
1113
1114 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
1115 make_scoped_restore.
1116 (dwarf2_psymtab::read_symtab): Don't clear
1117 reading_partial_symbols.
1118
1119 2020-02-24 Tom de Vries <tdevries@suse.de>
1120
1121 PR gdb/25592
1122 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
1123
1124 2020-02-24 Tom de Vries <tdevries@suse.de>
1125
1126 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
1127 commands layout next/prev/regs.
1128
1129 2020-02-22 Tom Tromey <tom@tromey.com>
1130
1131 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
1132 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
1133
1134 2020-02-22 Tom Tromey <tom@tromey.com>
1135
1136 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
1137
1138 2020-02-22 Tom Tromey <tom@tromey.com>
1139
1140 * tui/tui-win.c (_initialize_tui_win): Add usage text.
1141 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
1142 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
1143 * tui/tui.c (_initialize_tui): Add usage text.
1144
1145 2020-02-22 Tom Tromey <tom@tromey.com>
1146
1147 * tui/tui-win.c (tui_set_focus_command)
1148 (tui_set_win_height_command): Use error_no_arg.
1149 (_initialize_tui_win): Update help text.
1150 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
1151
1152 2020-02-22 Tom Tromey <tom@tromey.com>
1153
1154 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
1155 * tui/tui-disasm.h (struct tui_disasm_window)
1156 <display_start_addr>: Declare.
1157 * tui/tui-source.h (struct tui_source_window)
1158 <display_start_addr>: Declare.
1159 * tui/tui-winsource.h (struct tui_source_window_base)
1160 <show_source_line, display_start_addr>: New methods.
1161 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
1162 Rename and move to protected section.
1163 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
1164 (tui_source_window_base::do_erase_source_content): Update.
1165 (tui_source_window_base::show_source_line): Now a method.
1166 (tui_source_window_base::show_source_content)
1167 (tui_source_window_base::tui_source_window_base)
1168 (tui_source_window_base::rerender)
1169 (tui_source_window_base::refill)
1170 (tui_source_window_base::do_scroll_horizontal)
1171 (tui_source_window_base::set_is_exec_point_at)
1172 (tui_source_window_base::update_breakpoint_info)
1173 (tui_source_window_base::update_exec_info): Update.
1174 * tui/tui-source.c (tui_source_window::set_contents)
1175 (tui_source_window::showing_source_p)
1176 (tui_source_window::do_scroll_vertical)
1177 (tui_source_window::location_matches_p)
1178 (tui_source_window::line_is_displayed): Update.
1179 (tui_source_window::display_start_addr): New method.
1180 * tui/tui-disasm.c (tui_disasm_window::set_contents)
1181 (tui_disasm_window::do_scroll_vertical)
1182 (tui_disasm_window::location_matches_p): Update.
1183 (tui_disasm_window::display_start_addr): New method.
1184
1185 2020-02-22 Tom Tromey <tom@tromey.com>
1186
1187 * NEWS: Add entry for gdb.register_window_type.
1188 * tui/tui-layout.h (window_factory): New typedef.
1189 (tui_register_window): Declare.
1190 * tui/tui-layout.c (saved_tui_windows): New global.
1191 (tui_apply_current_layout): Use it.
1192 (tui_register_window): New function.
1193 * python/python.c (do_start_initialization): Call
1194 gdbpy_initialize_tui.
1195 (python_GdbMethods): Add "register_window_type" function.
1196 * python/python-internal.h (gdbpy_register_tui_window)
1197 (gdbpy_initialize_tui): Declare.
1198 * python/py-tui.c: New file.
1199 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
1200
1201 2020-02-22 Tom Tromey <tom@tromey.com>
1202
1203 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
1204
1205 2020-02-22 Tom Tromey <tom@tromey.com>
1206
1207 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
1208 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
1209 * tui/tui-data.c (tui_set_win_with_focus): Remove.
1210 (tui_set_win_focus_to): Move from tui-win.c.
1211
1212 2020-02-22 Tom Tromey <tom@tromey.com>
1213
1214 * tui/tui-layout.c (make_standard_window, get_locator_window): New
1215 functions.
1216 (known_window_types): New global.
1217 (tui_get_window_by_name): Reimplement.
1218 (initialize_known_windows): New function.
1219 (validate_window_name): Rewrite.
1220 (_initialize_tui_layout): Call initialize_known_windows.
1221
1222 2020-02-22 Tom Tromey <tom@tromey.com>
1223
1224 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
1225 Remove constants.
1226 * tui/tui-winsource.h (struct tui_source_window_base)
1227 <tui_source_window_base>: Remove parameter.
1228 * tui/tui-winsource.c
1229 (tui_source_window_base::tui_source_window_base): Remove
1230 parameter.
1231 (tui_source_window_base::refill): Update.
1232 * tui/tui-stack.h (struct tui_locator_window)
1233 <tui_locator_window>: Update.
1234 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
1235 Default the constructor.
1236 * tui/tui-regs.h (struct tui_data_item_window)
1237 <tui_data_item_window>: Default the constructor.
1238 (struct tui_data_window) <tui_data_window>: Likewise.
1239 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
1240 Default the constructor.
1241 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
1242 Default the constructor.
1243 <type>: Remove.
1244 (struct tui_win_info) <tui_win_info>: Default the constructor.
1245 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
1246 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
1247 Default the constructor.
1248
1249 2020-02-22 Tom Tromey <tom@tromey.com>
1250
1251 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
1252 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
1253 * tui/tui-win.c (tui_resize_all): Don't call
1254 tui_delete_invisible_windows.
1255 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
1256 done.
1257 (tui_set_layout): Update.
1258 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
1259 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
1260 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
1261
1262 2020-02-22 Tom Tromey <tom@tromey.com>
1263
1264 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
1265 correctly.
1266
1267 2020-02-22 Tom Tromey <tom@tromey.com>
1268
1269 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
1270
1271 2020-02-22 Tom Tromey <tom@tromey.com>
1272
1273 * tui/tui-winsource.h (struct tui_source_window_iterator)
1274 <inner_iterator>: New etytypedef.
1275 <tui_source_window_iterator>: Take "end" parameter.
1276 <tui_source_window_iterator>: Take iterator.
1277 <operator*, advance>: Update.
1278 <m_iter>: Change type.
1279 <m_end>: New field.
1280 (struct tui_source_windows) <begin, end>: Update.
1281 * tui/tui-layout.c (tui_windows): New global.
1282 (tui_apply_current_layout): Clear tui_windows.
1283 (tui_layout_window::apply): Update tui_windows.
1284 * tui/tui-data.h (tui_windows): Declare.
1285 (all_tui_windows): Now inline function.
1286 (class tui_window_iterator, struct all_tui_windows): Remove.
1287
1288 2020-02-22 Tom Tromey <tom@tromey.com>
1289
1290 PR tui/17850:
1291 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
1292 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
1293 "height" argument.
1294 (class tui_layout_window) <get_sizes>: Likewise.
1295 (class tui_layout_split) <tui_layout_split>: Add "vertical"
1296 argument.
1297 <get_sizes>: Add "height" argument.
1298 <m_vertical>: New field.
1299 * tui/tui-layout.c (tui_layout_split::clone): Update.
1300 (tui_layout_split::get_sizes): Add "height" argument.
1301 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
1302 (tui_new_layout_command): Parse "-horizontal".
1303 (_initialize_tui_layout): Update help string.
1304 (tui_layout_split::specification): Add "-horizontal" when needed.
1305 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
1306 argument.
1307 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
1308 New methods.
1309
1310 2020-02-22 Tom Tromey <tom@tromey.com>
1311
1312 * tui/tui-layout.h (enum tui_adjust_result): New.
1313 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
1314 (class tui_layout_window) <adjust_size>: Return
1315 tui_adjust_result. Rewrite.
1316 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
1317 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
1318
1319 2020-02-22 Tom Tromey <tom@tromey.com>
1320
1321 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
1322 parameter and return types.
1323 (class tui_layout_base) <specification>: Add "depth".
1324 (class tui_layout_window) <specification>: Add "depth".
1325 (class tui_layout_split) <specification>: Add "depth".
1326 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
1327 and return types.
1328 (tui_new_layout_command): Parse sub-layouts.
1329 (_initialize_tui_layout): Update help string.
1330 (tui_layout_window::specification): Add "depth".
1331 (add_layout_command): Update.
1332
1333 2020-02-22 Tom Tromey <tom@tromey.com>
1334
1335 * NEWS: Add "tui new-layout" item.
1336 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
1337 Add new-layout command to help text.
1338 (validate_window_name): New function.
1339 (tui_new_layout_command): New function.
1340 (_initialize_tui_layout): Register "new-layout".
1341 (tui_layout_window::specification): New method.
1342 (tui_layout_window::specification): New method.
1343 * tui/tui-layout.h (class tui_layout_base) <specification>: New
1344 method.
1345 (class tui_layout_window) <specification>: New method.
1346 (class tui_layout_split) <specification>: New method.
1347
1348 2020-02-22 Tom Tromey <tom@tromey.com>
1349
1350 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
1351 * tui/tui-win.c (window_name_completer): Update comment.
1352 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
1353 Declare method.
1354 (class tui_layout_window) <replace_window>: Likewise.
1355 (class tui_layout_split) <replace_window>: Likewise.
1356 (tui_set_layout): Don't declare.
1357 (tui_set_initial_layout): Declare function.
1358 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
1359 (asm_regs_layout): New globals.
1360 (tui_current_layout, show_layout): Remove.
1361 (tui_set_layout, tui_add_win_to_layout): Rewrite.
1362 (find_layout, tui_apply_layout): New function.
1363 (layout_completer): Remove.
1364 (tui_next_layout): Reimplement.
1365 (tui_next_layout_command): New function.
1366 (tui_set_initial_layout, tui_prev_layout_command): New functions.
1367 (tui_regs_layout): Reimplement.
1368 (tui_regs_layout_command): New function.
1369 (extract_display_start_addr): Rewrite.
1370 (next_layout, prev_layout): Remove.
1371 (tui_layout_window::replace_window): New method.
1372 (tui_layout_split::replace_window): New method.
1373 (destroy_layout): New function.
1374 (layout_list): New global.
1375 (add_layout_command): New function.
1376 (initialize_layouts): Update.
1377 (tui_layout_command): New function.
1378 (_initialize_tui_layout): Install "layout" commands.
1379 * tui/tui-data.h (enum tui_layout_type): Remove.
1380 (tui_current_layout): Don't declare.
1381
1382 2020-02-22 Tom Tromey <tom@tromey.com>
1383
1384 * tui/tui-regs.c (tui_reg_layout): Remove.
1385 (tui_reg_command): Use tui_regs_layout.
1386 * tui/tui-layout.h (tui_reg_command): Declare.
1387 * tui/tui-layout.c (tui_reg_command): New function.
1388
1389 2020-02-22 Tom Tromey <tom@tromey.com>
1390
1391 * tui/tui.c (tui_rl_delete_other_windows): Call
1392 tui_remove_some_windows.
1393 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
1394 Declare method.
1395 (class tui_layout_window) <remove_windows>: New method.
1396 (class tui_layout_split) <remove_windows>: Declare.
1397 (tui_remove_some_windows): Declare.
1398 * tui/tui-layout.c (tui_remove_some_windows): New function.
1399 (tui_layout_split::remove_windows): New method.
1400
1401 2020-02-22 Tom Tromey <tom@tromey.com>
1402
1403 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
1404 * tui/tui-layout.h (tui_next_layout): Declare.
1405 * tui/tui-layout.c (tui_next_layout): New function.
1406
1407 2020-02-22 Tom Tromey <tom@tromey.com>
1408
1409 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
1410 correct coordinates.
1411
1412 2020-02-22 Tom Tromey <tom@tromey.com>
1413
1414 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
1415 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
1416 DATA_WIN case.
1417
1418 2020-02-22 Tom Tromey <tom@tromey.com>
1419
1420 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
1421 TUI_DISASM_WIN, not tui_win_list.
1422
1423 2020-02-22 Tom Tromey <tom@tromey.com>
1424
1425 * valprint.c (generic_val_print_enum_1)
1426 (val_print_type_code_flags): Style member names.
1427 * rust-lang.c (val_print_struct, rust_print_enum)
1428 (rust_print_struct_def, rust_internal_print_type): Style member
1429 names.
1430 * p-valprint.c (pascal_object_print_value_fields): Style member
1431 names. Only call fprintf_symbol_filtered for static members.
1432 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
1433 * f-valprint.c (f_val_print): Style member names.
1434 * f-typeprint.c (f_type_print_base): Style member names.
1435 * cp-valprint.c (cp_print_value_fields): Style member names. Only
1436 call fprintf_symbol_filtered for static members.
1437 (cp_print_class_member): Style member names.
1438 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
1439 member names.
1440 * ada-valprint.c (ada_print_scalar): Style enum names.
1441 (ada_val_print_enum): Likewise.
1442 * ada-typeprint.c (print_enum_type): Style enum names.
1443
1444 2020-02-21 Tom Tromey <tom@tromey.com>
1445
1446 * psympriv.h (struct partial_symtab): Update comment.
1447
1448 2020-02-21 Tom Tromey <tromey@adacore.com>
1449
1450 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
1451 type is CORE_ADDR.
1452
1453 2020-02-21 Tom de Vries <tdevries@suse.de>
1454
1455 PR gdb/25534
1456 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
1457 if dependencies[i]->user != NULL.
1458
1459 2020-02-21 Ali Tamur <tamur@google.com>
1460
1461 * dwarf2/read.c (dwarf2_name): Add null check.
1462
1463 2020-02-20 Tom Tromey <tom@tromey.com>
1464
1465 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
1466 ">=", in binary search.
1467 (dwarf2_find_containing_comp_unit): New overload.
1468 (run_test): New self-test.
1469 (_initialize_dwarf2_read): Register new test.
1470
1471 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
1472
1473 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
1474 * riscv-tdep.h: Likewise.
1475 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
1476 rv32-only CSR.
1477 * features/riscv/64bit-csr.xml: Regenerated.
1478
1479 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
1480 Tom Tromey <tom@tromey.com>
1481
1482 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
1483 of 'fputc_unfiltered'.
1484 (putchar_unfiltered): Call 'fputc_unfiltered'.
1485 (fputc_unfiltered): Call 'fputs_unfiltered'.
1486
1487 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
1488
1489 * config.in: Regenerate.
1490 * configure: Regenerate.
1491 * configure.ac: Add --with-python-libdir option.
1492 * main.c: Use WITH_PYTHON_LIBDIR.
1493
1494 2020-02-19 Tom Tromey <tom@tromey.com>
1495
1496 * symtab.c (general_symbol_info::compute_and_set_names): Use
1497 obstack_strndup. Simplify call to symbol_set_demangled_name.
1498
1499 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
1500
1501 * dwarf2/read.c (allocate_signatured_type_table,
1502 allocate_dwo_unit_table, allocate_type_unit_groups_table,
1503 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
1504 Remove objfile parameter, update all callers.
1505
1506 2020-02-19 Doug Evans <dje@google.com>
1507
1508 PR rust/25535
1509 * rust-lang.c (rust_print_enum): Apply embedded_offset to
1510 rust_enum_variant calculation.
1511
1512 2020-02-19 Tom Tromey <tromey@adacore.com>
1513
1514 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
1515
1516 2020-02-19 Tom Tromey <tromey@adacore.com>
1517
1518 * ada-lang.c (cache_symbol): Use obstack_strdup.
1519
1520 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1521
1522 * configure: Regenerate.
1523
1524 2020-02-19 Tom Tromey <tromey@adacore.com>
1525
1526 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
1527 NULL check.
1528
1529 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1530
1531 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
1532
1533 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1534
1535 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
1536 if GDBSERVER is not defined.
1537 (riscv_tdesc_cache): Likewise, also store const target_desc.
1538 (STATIC_IN_GDB): Define.
1539 (riscv_create_target_description): Update declaration with
1540 STATIC_IN_GDB.
1541 (riscv_lookup_target_description): New function, only define if
1542 GDBSERVER is not defined.
1543 * arch/riscv.h (riscv_create_target_description): Declare only
1544 when GDBSERVER is defined.
1545 (riscv_lookup_target_description): New declaration when GDBSERVER
1546 is not defined.
1547 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
1548 (riscv_linux_read_features): ...this, and return
1549 riscv_gdbarch_features instead of target_desc.
1550 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
1551 (riscv_linux_read_description): Rename to...
1552 (riscv_linux_read_features): ...this.
1553 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
1554 Update to use riscv_gdbarch_features and
1555 riscv_lookup_target_description.
1556 * riscv-tdep.c (riscv_find_default_target_description): Use
1557 riscv_lookup_target_description instead of
1558 riscv_create_target_description.
1559
1560 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
1561
1562 * valprint.c (generic_val_print_enum_1): When printing a flag
1563 enum with value 0 and there is no enumerator with value 0, print
1564 just "0" instead of "(unknown: 0x0)".
1565
1566 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
1567
1568 * valprint.c (generic_val_print_enum_1): Print unknown part of
1569 flag enum in hex.
1570
1571 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
1572
1573 * dwarf2/read.c (update_enumeration_type_from_children): Allow
1574 flag enums to contain duplicate enumerators.
1575 * valprint.c (generic_val_print_enum_1): Update comment.
1576
1577 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
1578
1579 * dwarf2/read.c: Include "count-one-bits.h".
1580 (update_enumeration_type_from_children): If an enumerator has
1581 multiple bits set, don't treat the enumeration as a "flag enum".
1582 * valprint.c (generic_val_print_enum_1): Assert that enumerators
1583 of flag enums have 0 or 1 bit set.
1584
1585 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1586
1587 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
1588 conversion.
1589 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
1590 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
1591 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
1592 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
1593 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
1594
1595 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
1596
1597 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
1598
1599 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
1600
1601 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
1602 displaced_step_closure_up.
1603 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
1604 (struct displaced_step_closure_up):
1605 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
1606 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
1607 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
1608 Likewise.
1609 * gdbarch.sh (displaced_step_copy_insn): Likewise.
1610 * gdbarch.c, gdbarch.h: Re-generate.
1611 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
1612 displaced_step_closure_up.
1613 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
1614 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
1615 * infrun.h (displaced_step_closure_up): New type alias.
1616 (struct displaced_step_inferior_state) <step_closure>: Change
1617 type to displaced_step_closure_up.
1618 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
1619 displaced_step_closure_up.
1620 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
1621
1622 2020-02-14 Tom Tromey <tom@tromey.com>
1623
1624 * minidebug.c (gnu_debug_key): New global.
1625 (find_separate_debug_file_in_section): Use it.
1626
1627 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
1628
1629 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
1630 std::unique_ptr.
1631 * gdbarch.c: Re-generate.
1632 * gdbarch.h: Re-generate.
1633 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
1634 change.
1635 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
1636 type to std::unique_ptr.
1637 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
1638 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
1639 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
1640 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
1641 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
1642 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
1643 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
1644 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
1645 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
1646
1647 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
1648
1649 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
1650 std::unique_ptr.
1651 (displaced_step_clear): Rename to...
1652 (displaced_step_reset): ... this. Just call displaced->reset ().
1653 (displaced_step_clear_cleanup): Rename to...
1654 (displaced_step_reset_cleanup): ... this.
1655 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
1656 (displaced_step_fixup): Likewise.
1657 (resume_1): Likewise.
1658 (handle_inferior_event): Restore child's memory before calling
1659 displaced_step_fixup on the parent.
1660 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
1661 to std::unique_ptr.
1662 <step_closure>: Change type to std::unique_ptr.
1663
1664 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
1665
1666 * arm-tdep.c: Include count-one-bits.h.
1667 (cleanup_block_store_pc): Use count_one_bits.
1668 (cleanup_block_load_pc): Use count_one_bits.
1669 (arm_copy_block_xfer): Use count_one_bits.
1670 (thumb2_copy_block_xfer): Use count_one_bits.
1671 (thumb_copy_pop_pc_16bit): Use count_one_bits.
1672 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
1673 (thumb_get_next_pcs_raw): Use count_one_bits.
1674 (arm_get_next_pcs_raw): Use count_one_bits_l.
1675 * arch/arm.c (bitcount): Remove.
1676 * arch/arm.h (bitcount): Remove.
1677
1678 2020-02-14 Tom Tromey <tromey@adacore.com>
1679
1680 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
1681 Update.
1682 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
1683 * dwarf2/loc.c (call_site_find_chain_1): Return
1684 unique_xmalloc_ptr.
1685 (call_site_find_chain): Likewise.
1686
1687 2020-02-14 Richard Biener <rguenther@suse.de>
1688
1689 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
1690 on expression with division operators.
1691
1692 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1693
1694 * MAINTAINERS (Write After Approval): Adding myself.
1695
1696 2020-02-12 Tom Tromey <tom@tromey.com>
1697
1698 * event-loop.c (event_data, gdb_event, event_handler_func):
1699 Remove.
1700
1701 2020-02-12 Tom Tromey <tom@tromey.com>
1702
1703 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
1704 (dwarf2_frame_objfile_data): Add comment.
1705 (find_comp_unit, set_comp_unit): New functions.
1706 (dwarf2_frame_find_fde): Use find_comp_unit.
1707 (dwarf2_build_frame_info): Use set_comp_unit.
1708
1709 2020-02-12 Tom Tromey <tom@tromey.com>
1710
1711 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
1712 (comp_unit): Don't initialize objfile.
1713 (execute_cfa_program): Add text_offset parameter.
1714 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
1715 (dwarf2_frame_cache): Update.
1716 (dwarf2_build_frame_info): Don't set "objfile" member.
1717
1718 2020-02-12 Tom Tromey <tom@tromey.com>
1719
1720 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
1721 (decode_frame_entry): Likewise.
1722 (dwarf2_build_frame_info): Update.
1723
1724 2020-02-12 Tom Tromey <tom@tromey.com>
1725
1726 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
1727 (decode_frame_entry_1): Use the comp_unit obstack.
1728
1729 2020-02-12 Tom Tromey <tom@tromey.com>
1730
1731 * dwarf2/frame.c (struct comp_unit): Add initializers and
1732 constructor.
1733 (dwarf2_frame_objfile_data): Store a comp_unit.
1734 (dwarf2_frame_find_fde): Update.
1735 (dwarf2_build_frame_info): Use "new".
1736
1737 2020-02-12 Tom Tromey <tom@tromey.com>
1738
1739 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
1740 (dwarf2_fde_table): Typedef for std::vector.
1741 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
1742 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
1743 (decode_frame_entry): Update.
1744 (dwarf2_build_frame_info): Use "new".
1745
1746 2020-02-12 Christian Biesinger <cbiesinger@google.com>
1747
1748 * arm-tdep.c (arm_gdbarch_init): Update.
1749 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
1750 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
1751 have_neon, is_m>: Change to bool.
1752
1753 2020-02-12 Christian Biesinger <cbiesinger@google.com>
1754
1755 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
1756
1757 2020-02-12 Tom Tromey <tom@tromey.com>
1758
1759 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
1760
1761 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1762
1763 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
1764 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
1765
1766 2020-02-11 Tom Tromey <tom@tromey.com>
1767
1768 * psymtab.h: Update comment.
1769
1770 2020-02-11 Tom Tromey <tom@tromey.com>
1771
1772 * gdb_obstack.h (struct auto_obstack): Use
1773 DISABLE_COPY_AND_ASSIGN.
1774
1775 2020-02-11 Tom Tromey <tom@tromey.com>
1776
1777 * dwarf2/frame.h (struct objfile): Don't forward declare.
1778
1779 2020-02-11 Christian Biesinger <cbiesinger@google.com>
1780
1781 * cris-tdep.c (cris_supply_gregset): Change signature to match
1782 what struct regset expects.
1783 (cris_regset): New struct.
1784 (fetch_core_registers): Remove.
1785 (cris_iterate_over_regset_sections): New function.
1786 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
1787 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
1788
1789 2020-02-11 Christian Biesinger <cbiesinger@google.com>
1790
1791 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
1792 registers.
1793
1794 2020-02-11 Christian Biesinger <cbiesinger@google.com>
1795
1796 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
1797
1798 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1799
1800 * configure: Re-generate.
1801
1802 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1803
1804 * configure: Re-generate.
1805
1806 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1807
1808 * acinclude: Update warning.m4 path.
1809 * warning.m4: Move to gdbsupport.
1810
1811 2020-02-11 Tom Tromey <tromey@adacore.com>
1812
1813 * remote.c (remote_console_output): Update.
1814 * printcmd.c (printf_command): Update.
1815 * event-loop.c (gdb_wait_for_event): Update.
1816 * linux-nat.c (sigchld_handler): Update.
1817 * remote-sim.c (gdb_os_write_stdout): Update.
1818 (gdb_os_flush_stdout): Update.
1819 (gdb_os_flush_stderr): Update.
1820 (gdb_os_write_stderr): Update.
1821 * exceptions.c (print_exception): Update.
1822 * remote-fileio.c (remote_fileio_func_read): Update.
1823 (remote_fileio_func_write): Update.
1824 * tui/tui.c (tui_enable): Update.
1825 * tui/tui-interp.c (tui_interp::init): Update.
1826 * utils.c (init_page_info): Update.
1827 (putchar_unfiltered, fputc_unfiltered): Update.
1828 (gdb_flush): Update.
1829 (emit_style_escape): Update.
1830 (flush_wrap_buffer, fputs_maybe_filtered): Update.
1831 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
1832 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
1833 (stderr_file::write): Update.
1834 (stderr_file::puts): Update.
1835 * ui-file.h (ui_file_isatty, ui_file_write)
1836 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
1837 (ui_file_puts): Don't declare.
1838
1839 2020-02-10 Tom de Vries <tdevries@suse.de>
1840
1841 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
1842 sentinel to char *.
1843
1844 2020-02-09 Tom de Vries <tdevries@suse.de>
1845
1846 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
1847 filename if it matches "<artificial>".
1848
1849 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1850
1851 * windows-tdep.c (struct enum_value_name): New struct.
1852 (create_enum): New function.
1853 (windows_get_siginfo_type): Create and use enum types.
1854
1855 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1856
1857 * NEWS: Mention $_siginfo support for Windows.
1858 * windows-nat.c (handle_exception): Set siginfo_er.
1859 (windows_nat_target::mourn_inferior): Reset siginfo_er.
1860 (windows_xfer_siginfo): New function.
1861 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
1862 * windows-tdep.c (struct windows_gdbarch_data): New struct.
1863 (init_windows_gdbarch_data): New function.
1864 (get_windows_gdbarch_data): New function.
1865 (windows_get_siginfo_type): New function.
1866 (windows_init_abi): Register windows_get_siginfo_type.
1867 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
1868
1869 2020-02-08 Tom Tromey <tom@tromey.com>
1870
1871 * dwarf2/read.c (class cutu_reader) <cutu_reader,
1872 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
1873 <keep>: Declare method.
1874 <m_keep>: Remove member.
1875 <~cutu_reader>: Remove.
1876 (cutu_reader::init_tu_and_read_dwo_dies): Update.
1877 (cutu_reader::cutu_reader): Update.
1878 (cutu_reader::keep): Rename from ~cutu_reader.
1879 (process_psymtab_comp_unit, build_type_psymtabs_1)
1880 (process_skeletonless_type_unit, load_partial_comp_unit)
1881 (load_full_comp_unit, dwarf2_read_addr_index)
1882 (read_signatured_type): Update.
1883
1884 2020-02-08 Tom Tromey <tom@tromey.com>
1885
1886 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
1887 "want_partial_unit" parameter.
1888 (process_psymtab_comp_unit): Change want_partial_unit to bool.
1889 Inline check for DW_TAG_partial_unit.
1890 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
1891
1892 2020-02-08 Tom Tromey <tom@tromey.com>
1893
1894 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
1895 read.c.
1896 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
1897 read.c.
1898
1899 2020-02-08 Tom Tromey <tom@tromey.com>
1900
1901 * dwarf2/read.c (read_address): Move to comp-unit.c.
1902 (dwarf2_rnglists_process, dwarf2_ranges_process)
1903 (read_attribute_value, dwarf_decode_lines_1)
1904 (var_decode_location, decode_locdesc): Update.
1905 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
1906 read.c. Remove "cu" parameter.
1907 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
1908 method.
1909
1910 2020-02-08 Tom Tromey <tom@tromey.com>
1911
1912 * dwarf2/read.c (read_attribute_value, read_indirect_string)
1913 (read_indirect_line_string): Update.
1914 * dwarf2/comp-unit.c (read_offset): Remove.
1915 (read_comp_unit_head): Update.
1916 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
1917 method.
1918 (read_offset): Don't declare.
1919
1920 2020-02-08 Tom Tromey <tom@tromey.com>
1921
1922 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
1923 * dwarf2/read.c (struct comp_unit_head): Move to
1924 dwarf2/comp-unit.h.
1925 (enum class rcuh_kind): Move to comp-unit.h.
1926 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
1927 (read_comp_unit_head, error_check_comp_unit_head)
1928 (read_and_check_comp_unit_head): Move to comp-unit.c.
1929 (read_offset, dwarf_unit_type_name): Likewise.
1930 (create_debug_type_hash_table, read_cutu_die_from_dwo)
1931 (cutu_reader::cutu_reader, read_call_site_scope)
1932 (find_partial_die, follow_die_offset): Update.
1933 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
1934
1935 2020-02-08 Tom Tromey <tom@tromey.com>
1936
1937 * dwarf2/read.c (read_offset_1): Move to leb.c.
1938 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
1939 (dwarf_decode_macro_bytes): Update.
1940 * dwarf2/leb.c (read_offset): Rename; move from read.c.
1941 * dwarf2/leb.h (read_offset): Declare.
1942
1943 2020-02-08 Tom Tromey <tom@tromey.com>
1944
1945 * dwarf2/read.c (dwarf2_section_size): Remove.
1946 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
1947 Update.
1948 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
1949
1950 2020-02-08 Tom Tromey <tom@tromey.com>
1951
1952 * dwarf2/read.c (read_initial_length): Move to leb.c.
1953 * dwarf2/leb.h (read_initial_length): Declare.
1954 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
1955 handle_nonstd parameter.
1956 * dwarf2/frame.c (read_initial_length): Remove.
1957 (decode_frame_entry_1): Update.
1958
1959 2020-02-08 Tom Tromey <tom@tromey.com>
1960
1961 * dwarf2/loc.c (dwarf2_find_location_expression)
1962 (dwarf_evaluate_loc_desc::get_tls_address)
1963 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
1964 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
1965 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
1966 (dwarf2_compile_property_to_c)
1967 (dwarf2_loc_desc_get_symbol_read_needs)
1968 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
1969 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
1970 (loclist_describe_location, loclist_tracepoint_var_ref)
1971 (loclist_generate_c_location): Update.
1972 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
1973 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
1974 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
1975 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
1976 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
1977 (dwarf2_per_cu_data::addr_size)
1978 (dwarf2_per_cu_data::ref_addr_size)
1979 (dwarf2_per_cu_data::text_offset)
1980 (dwarf2_per_cu_data::addr_type): Now methods.
1981 (per_cu_header_read_in): Make per_cu "const".
1982 (dwarf2_version): Remove.
1983 (dwarf2_per_cu_data::int_type): Now a method.
1984 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
1985 (set_die_type, read_array_type, read_subrange_index_type)
1986 (read_tag_string_type, read_subrange_type): Update.
1987 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
1988 offset_size, ref_addr_size, text_offset, addr_type, version,
1989 objfile, int_type, addr_sized_int_type>: Declare methods.
1990
1991 2020-02-08 Tom Tromey <tom@tromey.com>
1992
1993 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
1994 Move earlier.
1995
1996 2020-02-08 Tom Tromey <tom@tromey.com>
1997
1998 * dwarf2/read.h (dwarf_line_debug): Declare.
1999 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
2000 * dwarf2/read.c: Move line_header code to new files.
2001 (dwarf_line_debug): No longer static.
2002 * dwarf2/line-header.c: New file.
2003 * dwarf2/line-header.h: New file.
2004
2005 2020-02-08 Tom Tromey <tom@tromey.com>
2006
2007 * dwarf2/read.c (struct line_header) <file_full_name,
2008 file_file_name>: Return unique_xmalloc_ptr.
2009 (line_header::file_file_name): Update.
2010 (line_header::file_full_name): Update.
2011 (dw2_get_file_names_reader): Update.
2012 (macro_start_file): Update.
2013
2014 2020-02-08 Tom Tromey <tom@tromey.com>
2015
2016 * dwarf2/read.c (struct line_header) <file_full_name,
2017 file_file_name>: Declare methods.
2018 (dw2_get_file_names_reader): Update.
2019 (file_file_name): Now a method.
2020 (file_full_name): Likewise.
2021 (macro_start_file): Update.
2022
2023 2020-02-08 Tom Tromey <tom@tromey.com>
2024
2025 * dwarf2/read.c (dwarf_always_disassemble)
2026 (show_dwarf_always_disassemble): Move to loc.c.
2027 (_initialize_dwarf2_read): Move "always-disassemble" registration
2028 to loc.c.
2029 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
2030 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
2031 static.
2032 (show_dwarf_always_disassemble): Move from read.c.
2033 (_initialize_dwarf2loc): Move always-disassemble from read.c.
2034
2035 2020-02-08 Tom Tromey <tom@tromey.com>
2036
2037 * dwarf2/read.c (~dwarf2_per_objfile): Update.
2038 (create_quick_file_names_table): Return htab_up.
2039 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
2040 Update.
2041 * dwarf2/read.h (struct dwarf2_per_objfile)
2042 <quick_file_names_table>: Now htab_up.
2043
2044 2020-02-08 Tom Tromey <tom@tromey.com>
2045
2046 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
2047
2048 2020-02-08 Tom Tromey <tom@tromey.com>
2049
2050 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
2051 Rewrite.
2052 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
2053 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
2054 (abbrev_table::abbrev_table): No longer inline.
2055 (ABBREV_HASH_SIZE): Remove.
2056 (abbrev_table::m_abbrevs): Now an htab_up.
2057
2058 2020-02-08 Tom Tromey <tom@tromey.com>
2059
2060 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
2061 (cutu_reader): Update.
2062 (build_type_psymtabs_1): Update.
2063 * dwarf2/abbrev.c (abbrev_table::read): Rename.
2064 (abbrev_table::alloc_abbrev): Update.
2065 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
2066 (abbrev_table::read): New static method, renamed from
2067 abbrev_table_read_table.
2068 (abbrev_table::alloc_abbrev)
2069 (abbrev_table::add_abbrev): Now private.
2070 (abbrev_table::abbrev_table): Now private.
2071 (abbrev_table::m_abbrev_obstack): Now private. Rename.
2072
2073 2020-02-08 Tom Tromey <tom@tromey.com>
2074
2075 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
2076 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
2077 htab_up.
2078
2079 2020-02-08 Tom Tromey <tom@tromey.com>
2080
2081 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
2082 htab_up.
2083 (lookup_dwo_unit_in_dwp): Update.
2084 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
2085 on obstack.
2086
2087 2020-02-08 Tom Tromey <tom@tromey.com>
2088
2089 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
2090 obstack.
2091
2092 2020-02-08 Tom Tromey <tom@tromey.com>
2093
2094 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
2095 line_header_hash.
2096 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
2097 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
2098 Change type to htab_up.
2099
2100 2020-02-08 Tom Tromey <tom@tromey.com>
2101
2102 * dwarf2/read.c (allocate_type_unit_groups_table): Return
2103 htab_up. Don't allocate on obstack.
2104 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
2105 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
2106 Change type to htab_up.
2107
2108 2020-02-08 Tom Tromey <tom@tromey.com>
2109
2110 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
2111 Change type to htab_up.
2112 * dwarf2/read.c (create_signatured_type_table_from_index)
2113 (create_signatured_type_table_from_debug_names)
2114 (create_all_type_units, add_type_unit)
2115 (lookup_dwo_signatured_type, lookup_signatured_type)
2116 (process_skeletonless_type_unit): Update.
2117 (create_debug_type_hash_table, create_debug_types_hash_table):
2118 Change type of types_htab.
2119 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
2120 htab_up. Don't allocate on obstack.
2121 (create_cus_hash_table): Change type of cus_htab parameter.
2122 (struct dwo_file) <cus, tus>: Now htab_up.
2123 (lookup_dwo_signatured_type, lookup_dwo_cutu)
2124 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
2125 (queue_and_load_all_dwo_tus): Update.
2126 * dwarf2/index-write.c (write_gdbindex): Update.
2127 (write_debug_names): Update.
2128
2129 2020-02-08 Tom Tromey <tom@tromey.com>
2130
2131 * dwarf2/read.h (struct dwarf2_queue_item): Move from
2132 dwarf2/read.c. Remove "next" member. Add constructor ntad
2133 destructor.
2134 (struct dwarf2_per_objfile) <queue>: New member.
2135 * dwarf2/read.c (struct dwarf2_queue_item): Move to
2136 dwarf2/read.h.
2137 (dwarf2_queue, dwarf2_queue_tail): Remove.
2138 (class dwarf2_queue_guard): Add parameter to constructor. Use
2139 DISABLE_COPY_AND_ASSIGN.
2140 <m_per_objfile>: New member.
2141 <~dwarf2_queue_guard>: Rewrite.
2142 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
2143 Update.
2144 (~dwarf2_queue_item): New.
2145
2146 2020-02-08 Tom Tromey <tom@tromey.com>
2147
2148 * dwarf2/read.c (struct die_info) <has_children>: New member.
2149 (dw2_get_file_names_reader): Remove has_children.
2150 (dw2_get_file_names): Update.
2151 (read_cutu_die_from_dwo): Remove has_children.
2152 (cutu_reader::init_tu_and_read_dwo_dies)
2153 (cutu_reader::cutu_reader): Update.
2154 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
2155 Remove has_children.
2156 (build_type_psymtabs_1, process_skeletonless_type_unit)
2157 (load_partial_comp_unit, load_full_comp_unit): Update.
2158 (create_dwo_cu_reader): Remove has_children.
2159 (create_cus_hash_table, read_die_and_children): Update.
2160 (read_full_die_1,read_full_die): Remove has_children.
2161 (read_signatured_type): Update.
2162 (class cutu_reader) <has_children>: Remove.
2163
2164 2020-02-08 Tom Tromey <tom@tromey.com>
2165
2166 * dwarf2/expr.c: Rename from dwarf2expr.c.
2167 * dwarf2/expr.h: Rename from dwarf2expr.h.
2168 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
2169 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
2170 * dwarf2/frame.c: Rename from dwarf2-frame.c.
2171 * dwarf2/frame.h: Rename from dwarf2-frame.h.
2172 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
2173 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
2174 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
2175 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
2176 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
2177 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
2178 * dwarf2/loc.c: Rename from dwarf2loc.c.
2179 * dwarf2/loc.h: Rename from dwarf2loc.h.
2180 * dwarf2/read.c: Rename from dwarf2read.c.
2181 * dwarf2/read.h: Rename from dwarf2read.h.
2182 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
2183 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
2184 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
2185 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
2186 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
2187 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
2188 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
2189 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
2190 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
2191 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
2192 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
2193 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
2194 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
2195 Update.
2196 * Makefile.in (COMMON_SFILES): Update.
2197 (HFILES_NO_SRCDIR): Update.
2198
2199 2020-02-08 Tom Tromey <tom@tromey.com>
2200
2201 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
2202 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
2203
2204 2020-02-08 Tom Tromey <tom@tromey.com>
2205
2206 * dwarf2read.h (struct die_info): Don't declare.
2207
2208 2020-02-08 Tom Tromey <tom@tromey.com>
2209
2210 * dwarf2read.h (die_info_ptr): Remove typedef.
2211
2212 2020-02-08 Tom Tromey <tom@tromey.com>
2213
2214 * dwarf2read.c (read_call_site_scope)
2215 (handle_data_member_location, dwarf2_add_member_fn)
2216 (mark_common_block_symbol_computed, read_common_block)
2217 (attr_to_dynamic_prop, partial_die_info::read)
2218 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
2219 (dwarf2_symbol_mark_computed, set_die_type): Update.
2220 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
2221 method.
2222 (attr_form_is_block): Don't declare.
2223 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
2224
2225 2020-02-08 Tom Tromey <tom@tromey.com>
2226
2227 * dwarf2read.c (dwarf2_find_base_address, )
2228 (read_call_site_scope, rust_containing_type)
2229 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
2230 (handle_data_member_location, dwarf2_add_member_fn)
2231 (get_alignment, read_structure_type, process_structure_scope)
2232 (mark_common_block_symbol_computed, read_common_block)
2233 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
2234 (partial_die_info::read, read_attribute_value, new_symbol)
2235 (lookup_die_type, dwarf2_get_ref_die_offset)
2236 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
2237 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
2238 (dwarf2_symbol_mark_computed): Update.
2239 * dwarf2/attribute.h (struct attribute) <value_as_address,
2240 form_is_section_offset, form_is_constant, form_is_ref>: Declare
2241 methods.
2242 (value_as_address, attr_form_is_section_offset)
2243 (attr_form_is_constant, attr_form_is_ref): Don't declare.
2244 * dwarf2/attribute.c (attribute::value_as_address)
2245 (attribute::form_is_section_offset, attribute::form_is_constant)
2246 (attribute::form_is_ref): Now methods.
2247
2248 2020-02-08 Tom Tromey <tom@tromey.com>
2249
2250 * dwarf2read.c (struct attribute, DW_STRING)
2251 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
2252 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
2253 (attr_form_is_block, attr_form_is_section_offset)
2254 (attr_form_is_constant, attr_form_is_ref): Move.
2255 * dwarf2/attribute.h: New file.
2256 * dwarf2/attribute.c: New file, from dwarf2read.c.
2257 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
2258
2259 2020-02-08 Tom Tromey <tom@tromey.com>
2260
2261 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
2262 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
2263 Move.
2264 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
2265 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
2266 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
2267 abbrev.c.
2268 * dwarf2/abbrev.h: New file.
2269 * dwarf2/abbrev.c: New file, from dwarf2read.c.
2270 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
2271
2272 2020-02-08 Tom Tromey <tom@tromey.com>
2273
2274 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
2275 (dwarf2_section_size, dwarf2_get_section_info)
2276 (create_signatured_type_table_from_debug_names)
2277 (create_addrmap_from_aranges, read_debug_names_from_section)
2278 (get_gdb_index_contents_from_section, read_comp_unit_head)
2279 (error_check_comp_unit_head, read_abbrev_offset)
2280 (create_debug_type_hash_table, init_cu_die_reader)
2281 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
2282 (read_comp_units_from_section, create_cus_hash_table)
2283 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
2284 (create_dwp_v2_section, dwarf2_rnglists_process)
2285 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
2286 (abbrev_table_read_table, read_indirect_string_at_offset_from)
2287 (read_indirect_string_from_dwz, read_addr_index_1)
2288 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
2289 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2290 (fill_in_loclist_baton): Update.
2291 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
2292 get_containing_section, get_bfd_owner, get_bfd_section,
2293 get_file_name, get_id, get_flags, empty, read>: Declare methods.
2294 (dwarf2_read_section, get_section_name, get_section_file_name)
2295 (get_containing_section, get_section_bfd_owner)
2296 (get_section_bfd_section, get_section_name, get_section_file_name)
2297 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
2298 declare.
2299 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
2300 (dwarf2_section_info::get_bfd_owner)
2301 (dwarf2_section_info::get_bfd_section)
2302 (dwarf2_section_info::get_name)
2303 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
2304 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
2305 (dwarf2_section_info::read): Now methods.
2306 * dwarf-index-write.c (class debug_names): Update.
2307
2308 2020-02-08 Tom Tromey <tom@tromey.com>
2309
2310 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
2311 Move to dwarf2/section.h.
2312 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
2313 (get_section_bfd_section, get_section_name)
2314 (get_section_file_name, get_section_id, get_section_flags)
2315 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
2316 dwarf2/section.c.
2317 * dwarf2/section.h: New file.
2318 * dwarf2/section.c: New file, from dwarf2read.c.
2319 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
2320
2321 2020-02-08 Tom Tromey <tom@tromey.com>
2322
2323 * dwarf2read.h (read_unsigned_leb128): Don't declare.
2324 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
2325 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
2326 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
2327 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
2328 * dwarf2/leb.h: New file, from dwarf2read.c.
2329 * dwarf2/leb.c: New file, from dwarf2read.c.
2330 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
2331 Remove.
2332 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
2333 (COMMON_SFILES): Add dwarf2/leb.c.
2334
2335 2020-02-08 Joel Brobecker <brobecker@adacore.com>
2336
2337 GDB 9.1 released.
2338
2339 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
2340
2341 PR gdb/25190:
2342 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
2343 * gdb/remote.c (remote_console_output): Update.
2344 * gdb/ui-file.c (fputs_unfiltered): Rename to...
2345 (ui_file_puts): ...this.
2346 * gdb/ui-file.h (ui_file_puts): Add declaration.
2347 * gdb/utils.c (emit_style_escape): Update.
2348 (flush_wrap_buffer): Update.
2349 (fputs_maybe_filtered): Update.
2350 (fputs_unfiltered): Add function.
2351
2352 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
2353
2354 * gdb/event-loop.c (gdb_wait_for_event): Update.
2355 * gdb/printcmd.c (printf_command): Update.
2356 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
2357 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
2358 (gdb_os_flush_stderr): Update.
2359 * gdb/remote.c (remote_console_output): Update.
2360 * gdb/ui-file.c (gdb_flush): Rename to...
2361 (ui_file_flush): ...this.
2362 (stderr_file::write): Update.
2363 (stderr_file::puts): Update.
2364 * gdb/ui-file.h (gdb_flush): Rename to...
2365 (ui_file_flush): ...this.
2366 * gdb/utils.c (gdb_flush): Add function.
2367 * gdb/utils.h (gdb_flush): Add declaration.
2368
2369 2020-02-07 Tom Tromey <tromey@adacore.com>
2370
2371 PR breakpoints/24915:
2372 * source.c (find_and_open_source): Do not check basenames_may_differ.
2373
2374 2020-02-07 Tom Tromey <tom@tromey.com>
2375
2376 * README: Update gdbserver documentation.
2377 * gdbserver: Move to top level.
2378 * configure.tgt (build_gdbserver): Remove.
2379 * configure.ac: Remove --enable-gdbserver.
2380 * configure: Rebuild.
2381 * Makefile.in (distclean): Don't mention gdbserver.
2382
2383 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
2384
2385 * source-cache.c (source_cache::ensure): Surround
2386 get_plain_source_lines with a try/catch.
2387 (source_cache::get_line_charpos): Get rid of try/catch
2388 and only check for the return value of "ensure".
2389 * tui/tui-source.c (tui_source_window::set_contents):
2390 Simplify "nlines" calculation.
2391
2392 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
2393
2394 * MAINTAINERS (Write After Approval): Add myself.
2395
2396 2020-02-05 Christian Biesinger <cbiesinger@google.com>
2397
2398 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
2399 function call.
2400
2401 2020-02-05 Christian Biesinger <cbiesinger@google.com>
2402
2403 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
2404
2405 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
2406
2407 * nat/riscv-linux-tdesc.h: New file.
2408 * nat/riscv-linux-tdesc.c: New file, taking code from...
2409 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
2410 ... here.
2411 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
2412 NATDEPFILES.
2413
2414 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
2415
2416 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
2417 we don't set the fake simulator ptid to the null_ptid.
2418
2419 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
2420
2421 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
2422 * gdbthread.h (class thread_info) <resumed>: Likewise.
2423 * infrun.c (resume_1): Likewise.
2424 (proceed): Likewise.
2425 (infrun_thread_stop_requested): Likewise.
2426 (stop_all_threads): Likewise.
2427 (handle_inferior_event): Likewise.
2428 (restart_threads): Likewise.
2429 (finish_step_over): Likewise.
2430 (keep_going_stepped_thread): Likewise.
2431 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
2432 (linux_handle_extended_wait): Likewise.
2433 * record-btrace.c (get_thread_current_frame_id): Likewise.
2434 * record-full.c (record_full_wait_1): Likewise.
2435 * remote.c (remote_target::process_initial_stop_replies): Likewise.
2436 * target.c (target_resume): Likewise.
2437 * thread.c (set_running_thread): Likewise.
2438
2439 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
2440
2441 * f-valprint.c (f77_print_array_1): Changed datatype of index
2442 variable to LONGEST from int to enable it to contain bound
2443 values correctly.
2444
2445 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
2446
2447 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
2448 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
2449 offsets according to FLEN determined.
2450 (riscv_linux_nat_target::read_description): Determine FLEN
2451 dynamically.
2452 (riscv_linux_nat_target::fetch_registers): Size regset buffer
2453 according to FLEN determined.
2454 (riscv_linux_nat_target::store_registers): Likewise.
2455
2456 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
2457
2458 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
2459 when reg->group is empty and reggroup is not.
2460
2461 2020-01-31 Tom Tromey <tromey@adacore.com>
2462
2463 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
2464 Call beneath target's mourn_inferior after unpushing.
2465
2466 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
2467
2468 PR tui/9765
2469 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
2470 have enough lines to fill the screen, still return the lowest
2471 address we found.
2472
2473 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
2474
2475 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
2476 '-', '<', and '>' commands.
2477
2478 2020-01-29 Pedro Alves <palves@redhat.com>
2479 Sergio Durigan Junior <sergiodj@redhat.com>
2480
2481 * infcmd.c (construct_inferior_arguments): Assert that
2482 'argc' is greater than 0.
2483
2484 2020-01-29 Luis Machado <luis.machado@linaro.org>
2485
2486 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
2487 (BRK_INSN_MASK): Define to 0xd4200000.
2488 (aarch64_program_breakpoint_here_p): New function.
2489 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
2490 * arch-utils.c (default_program_breakpoint_here_p): Moved from
2491 breakpoint.c.
2492 * arch-utils.h (default_program_breakpoint_here_p): Moved from
2493 breakpoint.h
2494 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
2495 call gdbarch_program_breakpoint_here_p.
2496 (program_breakpoint_here): Moved to arch-utils.c, renamed to
2497 default_program_breakpoint_here_p, changed return type to bool and
2498 simplified.
2499 * breakpoint.h (program_breakpoint_here): Moved prototype to
2500 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
2501 return type to bool.
2502 * gdbarch.c: Regenerate.
2503 * gdbarch.h: Regenerate.
2504 * gdbarch.sh (program_breakpoint_here_p): New method.
2505 * infrun.c (handle_signal_stop): Call
2506 gdbarch_program_breakpoint_here_p.
2507
2508 2020-01-26 Tom Tromey <tom@tromey.com>
2509
2510 * ctfread.c (struct ctf_fp_info): Reindent.
2511 (_initialize_ctfread): Remove.
2512
2513 2020-01-26 Tom Tromey <tom@tromey.com>
2514
2515 * psymtab.c (partial_map_expand_apply)
2516 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
2517 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
2518 (psym_print_stats, psym_expand_symtabs_for_function)
2519 (psym_map_symbol_filenames, psym_map_matching_symbols)
2520 (psym_expand_symtabs_matching)
2521 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
2522 (maintenance_check_psymtabs): Use new methods.
2523 * psympriv.h (struct partial_symtab) <readin_p,
2524 get_compunit_symtab>: New methods.
2525 <readin, compunit_symtab>: Remove members.
2526 (struct standard_psymtab): New.
2527 (struct legacy_psymtab): Derive from standard_psymtab.
2528 * dwarf2read.h (struct dwarf2_psymtab): Derive from
2529 standard_psymtab.
2530 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
2531
2532 2020-01-26 Tom Tromey <tom@tromey.com>
2533
2534 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
2535 read_dependencies. Add assert.
2536 * psymtab.c (partial_symtab::read_dependencies): New method.
2537 * psympriv.h (struct partial_symtab) <read_dependencies>: New
2538 method.
2539 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
2540 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
2541 read_dependencies.
2542 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
2543 Add assert.
2544
2545 2020-01-26 Tom Tromey <tom@tromey.com>
2546
2547 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
2548 Call expand_psymtab.
2549 (xcoff_read_symtab): Call expand_psymtab.
2550 (xcoff_start_psymtab, xcoff_end_psymtab): Set
2551 legacy_expand_psymtab.
2552 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
2553 method.
2554 (struct legacy_psymtab) <expand_psymtab>: Implement.
2555 <legacy_expand_psymtab>: New member.
2556 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
2557 (parse_partial_symbols): Set legacy_expand_psymtab.
2558 (psymtab_to_symtab_1): Change argument order. Call
2559 expand_psymtab.
2560 (new_psymtab): Set legacy_expand_psymtab.
2561 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
2562 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
2563 expand_psymtab.
2564 (dwarf2_psymtab::expand_psymtab): Rename from
2565 psymtab_to_symtab_1. Call expand_psymtab.
2566 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
2567 (dbx_end_psymtab): Likewise.
2568 (dbx_psymtab_to_symtab_1): Change argument order. Call
2569 expand_psymtab.
2570 (dbx_read_symtab): Call expand_psymtab.
2571 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
2572 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
2573 (ctf_psymtab::read_symtab): Call expand_psymtab.
2574
2575 2020-01-26 Tom Tromey <tom@tromey.com>
2576
2577 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
2578 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
2579 messages.
2580 * mdebugread.c (mdebug_read_symtab): Remove prints.
2581 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
2582 assert.
2583 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
2584
2585 2020-01-26 Tom Tromey <tom@tromey.com>
2586
2587 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
2588 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
2589 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
2590 legacy_symtab.
2591 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
2592 * psymtab.c (psymtab_to_symtab): Call method.
2593 (dump_psymtab): Update.
2594 * psympriv.h (struct partial_symtab): Add virtual destructor.
2595 <read_symtab>: New method.
2596 (struct legacy_symtab): New.
2597 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
2598 (struct pst_map) <pst>: Now a legacy_psymtab.
2599 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
2600 (new_psymtab): Use legacy_psymtab.
2601 * dwarf2read.h (struct dwarf2_psymtab): New.
2602 (struct dwarf2_per_cu_data) <psymtab>: Use it.
2603 * dwarf2read.c (dwarf2_create_include_psymtab)
2604 (dwarf2_build_include_psymtabs, create_type_unit_group)
2605 (create_partial_symtab, process_psymtab_comp_unit_reader)
2606 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
2607 (set_partial_user): Use dwarf2_psymtab.
2608 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
2609 (psymtab_to_symtab_1, process_full_comp_unit)
2610 (process_full_type_unit, dwarf2_ranges_read)
2611 (dwarf2_get_pc_bounds, psymtab_include_file_name)
2612 (dwarf_decode_lines): Use dwarf2_psymtab.
2613 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
2614 (add_address_entry_worker, write_one_signatured_type)
2615 (recursively_count_psymbols, recursively_write_psymbols)
2616 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
2617 (write_debug_names): Likewise.
2618 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
2619 <pst>: Now a legacy_psymtab.
2620 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
2621 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
2622 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
2623 * ctfread.c (struct ctf_psymtab): New.
2624 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
2625 ctf_psymtab.
2626 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
2627 (create_partial_symtab): Return a ctf_psymtab.
2628 (scan_partial_symbols): Update.
2629
2630 2020-01-26 Tom Tromey <tom@tromey.com>
2631
2632 * xcoffread.c (xcoff_start_psymtab): Use new.
2633 * psymtab.c (partial_symtab::partial_symtab): New constructor,
2634 renamed from start_psymtab_common.
2635 * psympriv.h (struct partial_symtab): Add new constructor.
2636 (start_psymtab_common): Don't declare.
2637 * mdebugread.c (parse_partial_symbols): Use new.
2638 * dwarf2read.c (create_partial_symtab): Use new.
2639 * dbxread.c (start_psymtab): Use new.
2640 * ctfread.c (create_partial_symtab): Use new.
2641
2642 2020-01-26 Tom Tromey <tom@tromey.com>
2643
2644 * xcoffread.c (xcoff_end_psymtab): Use new.
2645 * psymtab.c (start_psymtab_common): Use new.
2646 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
2647 Update.
2648 * psympriv.h (struct partial_symtab): Add parameters to
2649 constructor. Don't inline.
2650 (allocate_psymtab): Don't declare.
2651 * mdebugread.c (new_psymtab): Use new.
2652 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
2653 * dbxread.c (dbx_end_psymtab): Use new.
2654
2655 2020-01-26 Tom Tromey <tom@tromey.com>
2656
2657 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
2658 allocate_psymtab. Update documentation.
2659 * psymtab.c (psymtab_storage::install_psymtab): Rename from
2660 allocate_psymtab. Do not use new.
2661 (allocate_psymtab): Use new. Update.
2662
2663 2020-01-26 Tom Tromey <tom@tromey.com>
2664
2665 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2666 * psymtab.c (psym_print_stats): Update.
2667 * psympriv.h (struct partial_symtab) <readin,
2668 psymtabs_addrmap_supported, anonymous>: Now bool.
2669 * mdebugread.c (psymtab_to_symtab_1): Update.
2670 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
2671 (build_type_psymtabs_reader, psymtab_to_symtab_1)
2672 (process_full_comp_unit, process_full_type_unit): Update.
2673 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
2674 * ctfread.c (psymtab_to_symtab): Update.
2675
2676 2020-01-26 Tom Tromey <tom@tromey.com>
2677
2678 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
2679 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
2680 * psymtab.c (psymtab_storage): Delete psymtabs.
2681 (psymtab_storage::allocate_psymtab): Use new.
2682 (psymtab_storage::discard_psymtab): Use delete.
2683 * psympriv.h (struct partial_symtab): Add constructor and
2684 initializers.
2685
2686 2020-01-26 Tom Tromey <tom@tromey.com>
2687
2688 * machoread.c: Do not include psympriv.h.
2689
2690 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2691
2692 * NEWS: Mention the new option and the set/show commands.
2693
2694 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2695
2696 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
2697 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
2698 (validate_exec_file): New variables, enums, functions.
2699 (exec_file_locate_attach, print_section_info): Style the filenames.
2700 (_initialize_exec): Install show_exec_file_mismatch_command and
2701 set_exec_file_mismatch_command.
2702 * gdbcore.h (validate_exec_file): Declare.
2703 * infcmd.c (attach_command): Call validate_exec_file.
2704 * remote.c ( remote_target::remote_add_inferior): Likewise.
2705
2706 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2707
2708 * frame.c (find_frame_sal): Move call to get_next_frame into more
2709 inner scope.
2710 * inline-frame.c (inilne_state) <inline_state>: Update argument
2711 types.
2712 (inilne_state) <skipped_symbol>: Rename to...
2713 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
2714 (skip_inline_frames): Build vector of skipped symbols and use this
2715 to reate the inline_state.
2716 (inline_skipped_symbol): Add a comment and some assertions, fetch
2717 skipped symbol from the list.
2718
2719 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2720
2721 * buildsym.c (lte_is_less_than): Delete.
2722 (buildsym_compunit::end_symtab_with_blockvector): Create local
2723 lambda function to sort line table entries, and use
2724 std::stable_sort instead of std::sort.
2725 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
2726 markers when looking for a previous line.
2727
2728 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2729
2730 * dwarf2read.c (lnp_state_machine::record_line): Include
2731 end_sequence parameter in debug print out. Record the line if we
2732 are at an end_sequence marker even if it's not the start of a
2733 statement.
2734 * symmisc.c (maintenance_print_one_line_table): Print end of
2735 sequence markers with 'END' not '0'.
2736
2737 2020-01-24 Pedro Alves <palves@redhat.com>
2738
2739 PR gdb/25410
2740 * thread.c (scoped_restore_current_thread::restore): Use
2741 switch_to_inferior_no_thread.
2742 * exec.c: Include "progspace-and-thread.h".
2743 (add_target_sections, remove_target_sections):
2744 scoped_restore_current_pspace_and_thread instead of
2745 scoped_restore_current_thread.
2746 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
2747 and aspace to the inferior before calling clone_program_space.
2748 Remove stale comment.
2749
2750 2020-01-24 Christian Biesinger <cbiesinger@google.com>
2751
2752 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
2753 (arm_netbsd_nat_target::fetch_registers): ...this.
2754 (arm_nbsd_nat_target::store_registers): Rename to...
2755 (arm_netbsd_nat_target::store_registers): ...this.
2756
2757 2020-01-24 Christian Biesinger <cbiesinger@google.com>
2758
2759 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
2760 register_t.
2761
2762 2020-01-24 Christian Biesinger <cbiesinger@google.com>
2763
2764 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
2765 Update comment.
2766 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
2767 Likewise.
2768 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
2769 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
2770 the correct replacement (iterate_over_regset_sections).
2771 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
2772 Update comment.
2773
2774 2020-01-24 Graham Markall <graham.markall@embecosm.com>
2775
2776 PR gdb/23718
2777 * gdb/python/python.c (execute_gdb_command): Call
2778 async_enable_stdin in catch block.
2779
2780 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2781
2782 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
2783 SWITCH_THRU_ALL_UIS.
2784
2785 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
2786
2787 PR tui/9765
2788 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
2789 comment, add extra parameter, and update to store previous symbol
2790 when appropriate.
2791 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
2792 add extra parameter.
2793 * tui/tui-disasm.c (tui_disassemble): Update header comment,
2794 remove unneeded parameter, add try/catch around gdb_print_insn,
2795 rewrite to add items to asm_lines vector.
2796 (tui_find_backward_disassembly_start_address): New function.
2797 (tui_find_disassembly_address): Updated throughout.
2798 (tui_disasm_window::set_contents): Update for changes to
2799 tui_disassemble.
2800 (tui_disasm_window::do_scroll_vertical): No need to adjust the
2801 number of lines to scroll.
2802
2803 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
2804
2805 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
2806 (SECT_OFF_DATA): Likewise.
2807 (SECT_OFF_RODATA): Likewise.
2808 (SECT_OFF_TEXT): Likewise.
2809 (SECT_OFF_BSS): Likewise.
2810 (struct objfile) <text_section_offset, data_section_offset>: New
2811 methods.
2812 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
2813 objfile::text_section_offset.
2814 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
2815 * coffread.c (coff_symtab_read): Likewise.
2816 (enter_linenos): Likewise.
2817 (process_coff_symbol): Likewise.
2818 * ctfread.c (get_objfile_text_range): Likewise.
2819 * dtrace-probe.c (dtrace_probe::get_relocated_address):
2820 Use objfile::data_section_offset.
2821 * dwarf2-frame.c (execute_cfa_program): Use
2822 objfile::text_section_offset.
2823 (dwarf2_frame_find_fde): Likewise.
2824 * dwarf2read.c (create_addrmap_from_index): Likewise.
2825 (create_addrmap_from_aranges): Likewise.
2826 (dw2_find_pc_sect_compunit_symtab): Likewise.
2827 (process_psymtab_comp_unit_reader): Likewise.
2828 (add_partial_symbol): Likewise.
2829 (add_partial_subprogram): Likewise.
2830 (process_full_comp_unit): Likewise.
2831 (read_file_scope): Likewise.
2832 (read_func_scope): Likewise.
2833 (read_lexical_block_scope): Likewise.
2834 (read_call_site_scope): Likewise.
2835 (dwarf2_rnglists_process): Likewise.
2836 (dwarf2_ranges_process): Likewise.
2837 (dwarf2_ranges_read): Likewise.
2838 (dwarf_decode_lines_1): Likewise.
2839 (new_symbol): Likewise.
2840 (dwarf2_fetch_die_loc_sect_off): Likewise.
2841 (dwarf2_per_cu_text_offset): Likewise.
2842 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
2843 * hppa-tdep.c (read_unwind_info): Likewise.
2844 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
2845 * psympriv.h (struct partial_symtab): Likewise.
2846 * psymtab.c (find_pc_sect_psymtab): Likewise.
2847 * solib-svr4.c (enable_break): Likewise.
2848 * stap-probe.c (relocate_address): Use
2849 objfile::data_section_offset.
2850 * xcoffread.c (enter_line_range): Use
2851 objfile::text_section_offset.
2852 (read_xcoff_symtab): Likewise.
2853
2854 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
2855
2856 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
2857 declaration to narrower scopes.
2858
2859 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
2860
2861 * darwin-nat.h (struct darwin_exception_msg, enum
2862 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
2863 Move up.
2864 (class darwin_nat_target) <wait_1, check_new_threads,
2865 decode_exception_message, decode_message, stop_inferior,
2866 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
2867 * darwin-nat.c (darwin_check_new_threads): Rename to...
2868 (darwin_nat_target::check_new_threads): ... this.
2869 (darwin_suspend_inferior_it): Remove.
2870 (darwin_decode_exception_message): Rename to...
2871 (darwin_nat_target::decode_exception_message): ... this.
2872 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
2873 (darwin_decode_message): Rename to...
2874 (darwin_nat_target::decode_message): ... this.
2875 (cancel_breakpoint): Rename to...
2876 (darwin_nat_target::cancel_breakpoint): ... this.
2877 (darwin_wait): Rename to...
2878 (darwin_nat_target::wait_1): ... this. Use range-based for loop
2879 instead of iterate_over_inferiors.
2880 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
2881 (darwin_stop_inferior): Rename to...
2882 (darwin_nat_target::stop_inferior): ... this.
2883 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
2884 (darwin_init_thread_list): Rename to...
2885 (darwin_nat_target::init_thread_list): ... this.
2886 (darwin_ptrace_him): Rename to...
2887 (darwin_nat_target::ptrace_him): ... this.
2888 (darwin_nat_target::create_inferior): Pass lambda function to
2889 fork_inferior.
2890 (darwin_nat_target::detach): Call stop_inferior instead of
2891 darwin_stop_inferior.
2892 * fork-inferior.h (fork_inferior): Change init_trace_fun
2893 parameter to gdb::function_view.
2894 * fork-inferior.c (fork_inferior): Likewise.
2895
2896 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
2897
2898 * i386-cygwin-tdep.c (core_process_module_section): Update.
2899 * windows-nat.c (struct lm_info_windows): Add text_offset.
2900 (windows_xfer_shared_libraries): Update.
2901 * windows-tdep.c (windows_xfer_shared_library):
2902 Add text_offset_cached argument.
2903 * windows-tdep.h (windows_xfer_shared_library): Update.
2904
2905 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
2906
2907 * gdbarch.sh: Add declaration for _initialize_gdbarch.
2908
2909 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
2910
2911 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
2912 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
2913 replace with range-based for.
2914 (gdbsim_interrupt_inferior): Remove.
2915 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
2916 with a range-based for. Inline code from
2917 gdbsim_interrupt_inferior.
2918
2919 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
2920
2921 * infrun.c (proceed): Fix indentation.
2922
2923 2020-01-21 Tom Tromey <tromey@adacore.com>
2924
2925 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
2926 * python/python.c (python_extension_ops): Update.
2927 (gdbpy_colorize): New function.
2928 * python/lib/gdb/__init__.py (colorize): New function.
2929 * extension.h (ext_lang_colorize): Declare.
2930 * extension.c (ext_lang_colorize): New function.
2931 * extension-priv.h (struct extension_language_ops) <colorize>: New
2932 member.
2933 * cli/cli-style.c (_initialize_cli_style): Update help text.
2934
2935 2020-01-21 Luis Machado <luis.machado@linaro.org>
2936
2937 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
2938 <cond>: Change type to bool.
2939 (aarch64_displaced_step_b_cond): Update cond to use bool type.
2940 (aarch64_displaced_step_cb): Likewise.
2941 (aarch64_displaced_step_tb): Likewise.
2942
2943 2020-01-21 Luis Machado <luis.machado@linaro.org>
2944
2945 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
2946 output.
2947
2948 2020-01-21 Luis Machado <luis.machado@linaro.org>
2949
2950 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
2951 <pc_adjust>: Adjust the documentation.
2952 (aarch64_displaced_step_fixup): Check if PC really moved before
2953 adjusting it.
2954
2955 2020-01-19 Tom Tromey <tom@tromey.com>
2956
2957 * disasm.c (~gdb_disassembler): New destructor.
2958 (gdb_buffered_insn_length): Call disassemble_free_target.
2959 * disasm.h (class gdb_disassembler): Declare destructor. Use
2960 DISABLE_COPY_AND_ASSIGN.
2961
2962 2020-01-19 Tom Tromey <tom@tromey.com>
2963
2964 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
2965 (die_reader_func_ftype): Remove.
2966 (cutu_reader): New class.
2967 (dw2_get_file_names_reader): Remove "data" parameter.
2968 (dw2_get_file_names): Use cutu_reader.
2969 (create_debug_type_hash_table): Update.
2970 (read_cutu_die_from_dwo): Update comment.
2971 (lookup_dwo_unit): Add dwo_name parameter.
2972 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
2973 die_reader_func_ftype and data parameters.
2974 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
2975 Remove die_reader_func_ftype and data parameters.
2976 (~cutu_reader): New; from init_cutu_and_read_dies.
2977 (cutu_reader::cutu_reader): Rename from
2978 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
2979 and data parameters.
2980 (init_cutu_and_read_dies_simple): Remove.
2981 (struct process_psymtab_comp_unit_data): Remove.
2982 (process_psymtab_comp_unit_reader): Remove data parameter; add
2983 want_partial_unit and pretend_language parameters.
2984 (process_psymtab_comp_unit): Use cutu_reader.
2985 (build_type_psymtabs_reader): Remove data parameter.
2986 (build_type_psymtabs_1): Use cutu_reader.
2987 (process_skeletonless_type_unit): Likewise.
2988 (load_partial_comp_unit_reader): Remove.
2989 (load_partial_comp_unit): Use cutu_reader.
2990 (load_full_comp_unit_reader): Remove.
2991 (load_full_comp_unit): Use cutu_reader.
2992 (struct create_dwo_cu_data): Remove.
2993 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
2994 dwo_unit parameters.
2995 (create_cus_hash_table): Use cutu_reader.
2996 (struct dwarf2_read_addr_index_data): Remove.
2997 (dwarf2_read_addr_index_reader): Remove.
2998 (dwarf2_read_addr_index): Use cutu_reader.
2999 (read_signatured_type_reader): Remove.
3000 (read_signatured_type): Use cutu_reader.
3001
3002 2020-01-19 Tom Tromey <tom@tromey.com>
3003
3004 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
3005 * tui/tui-wingeneral.h (class tui_suppress_output): New.
3006 (tui_wrefresh): Declare.
3007 * tui/tui-wingeneral.c (suppress_output): New global.
3008 (tui_suppress_output, ~tui_suppress_output): New constructor and
3009 destructor.
3010 (tui_wrefresh): New function.
3011 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
3012 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
3013 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
3014 method.
3015 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
3016 tui_wrefresh.
3017 (tui_data_window::no_refresh): New method.
3018 (tui_data_item_window::refresh_window): Call tui_wrefresh.
3019 (tui_reg_command): Use tui_suppress_output
3020 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
3021 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
3022 method.
3023 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
3024
3025 2020-01-19 Tom Tromey <tom@tromey.com>
3026
3027 * tui/tui-winsource.c (tui_update_source_windows_with_line):
3028 Handle case where symtab is null.
3029
3030 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
3031
3032 * linux-fork.c (one_fork_p): Simplify.
3033
3034 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
3035
3036 * top.c (struct qt_args): Remove.
3037 (kill_or_detach): Change return type to void, replace `void *`
3038 parameter with a proper one.
3039 (print_inferior_quit_action): Likewise.
3040 (quit_confirm): Use range-based for loop to iterate over inferiors.
3041 (quit_force): Likewise.
3042
3043 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
3044
3045 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
3046 `void *` parameter with proper parameters.
3047 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
3048 (print_one_inferior): Change return type to void, replace `void *`
3049 parameter with proper parameters.
3050 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
3051 inferiors.
3052 (get_other_inferior): Remove.
3053 (mi_cmd_remove_inferior): Use range-based loop to iterate over
3054 inferiors.
3055
3056 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
3057
3058 * mi/mi-interp.c (report_initial_inferior): Remove.
3059 (mi_interp::init): Use range-based for to iterate over inferiors.
3060
3061 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
3062
3063 * python/py-inferior.c (build_inferior_list): Remove.
3064 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
3065
3066 2020-01-16 Christian Biesinger <cbiesinger@google.com>
3067
3068 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
3069 (btrace_stitch_trace): Likewise.
3070 * charset.c (intermediate_encoding): Likewise (vaild).
3071 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
3072 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
3073 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
3074
3075 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
3076
3077 * windows-tdep.c (windows_get_tlb_type):
3078 Add rtl_user_process_parameters type.
3079
3080 2020-01-16 Pedro Alves <palves@redhat.com>
3081 Norbert Lange <nolange79@gmail.com>
3082
3083 PR build/24805
3084 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
3085 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
3086 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
3087 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
3088 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
3089 (ps_plog): Redeclare exported functions with default visibility.
3090
3091 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
3092
3093 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
3094 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
3095
3096 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
3097
3098 * infcmd.c (post_create_inferior): Use get_thread_regcache
3099 instead of get_current_regcache.
3100
3101 2020-01-14 Tom Tromey <tom@tromey.com>
3102
3103 PR symtab/12535:
3104 * python/python.c (gdbpy_decode_line): Treat empty string the same
3105 as no argument.
3106
3107 2020-01-14 Tom Tromey <tom@tromey.com>
3108
3109 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
3110
3111 2020-01-14 Tom Tromey <tom@tromey.com>
3112
3113 * nat/linux-btrace.c: Don't include <config.h>.
3114 * nat/linux-ptrace.c: Don't include <config.h>.
3115 * nat/x86-linux-dregs.c: Don't include <config.h>.
3116
3117 2020-01-14 Tom Tromey <tom@tromey.com>
3118
3119 * configure: Rebuild.
3120 * configure.ac: Move many checks to ../gdbsupport/common.m4.
3121
3122 2020-01-14 Tom Tromey <tom@tromey.com>
3123
3124 * nat/x86-linux-dregs.c: Include configh.h.
3125 * nat/linux-ptrace.c: Include configh.h.
3126 * nat/linux-btrace.c: Include configh.h.
3127 * defs.h: Include config.h, bfd.h.
3128 * configure.ac: Don't source common.host.
3129 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
3130 * configure: Rebuild.
3131 * acinclude.m4: Update path.
3132 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
3133 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
3134 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
3135 (CLIBS): Add LIBSUPPORT.
3136 (CDEPS): Likewise.
3137 (COMMON_SFILES): Remove gdbsupport files.
3138 (HFILES_NO_SRCDIR): Likewise.
3139 (stamp-version): Update path to create-version.sh.
3140 (ALLDEPFILES): Remove gdbsupport files.
3141
3142 2020-01-14 Tom Tromey <tom@tromey.com>
3143
3144 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
3145 USE_WIN32API when needed.
3146 * configure.ac (USE_WIN32API): Don't define.
3147 (WIN32LIBS): Use WIN32APILIBS.
3148 * configure: Rebuild.
3149
3150 2020-01-14 Tom Tromey <tom@tromey.com>
3151
3152 * configure: Rebuild.
3153 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
3154
3155 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3156
3157 * skip.c (skip_function_command): Make skip w/o arguments use the
3158 name of the inlined function if pc is inside any inlined function.
3159
3160 2020-01-14 Luis Machado <luis.machado@linaro.org>
3161
3162 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
3163 * infrun.c (resume_1): Likewise.
3164 (handle_inferior_event): Remove stale comment.
3165 * linux-nat.c (linux_nat_target::resume): Update comments.
3166 (save_stop_reason): Likewise.
3167 (linux_nat_filter_event): Likewise.
3168 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
3169
3170 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
3171
3172 * elfread.c (record_minimal_symbol): Set section index to 0 for
3173 non-allocatable sections.
3174
3175
3176 2020-01-13 Ali Tamur <tamur@google.com>
3177
3178 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
3179 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
3180 to gdb::optional. Update comments.
3181 (dwo_file): Update comments.
3182 (read_attribute): Update API to take an additional out parameter,
3183 need_reprocess. This is used to mark attributes that need other
3184 attributes (e.g. str_offsets_base) for correct computation which may not
3185 have been read yet.
3186 (read_attribute_reprocess): New function declaration.
3187 (read_addr_index): Likewise.
3188 (read_dwo_str_index): Likewise.
3189 (read_stub_str_index): Likewise.
3190 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
3191 (lookup_addr_base): New function definition.
3192 (lookup_ranges_base): Likewise.
3193 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
3194 lookup_ranges_base.
3195 (init_cutu_and_read_dies): Update comments.
3196 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
3197 unit. This is used to inherit parent's str_offsets_base and addr_base.
3198 Update comments.
3199 (init_cutu_and_read_dies_simple): Reflect API changes.
3200 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
3201 (create_cus_hash_table): Change API to take parent compile unit.
3202 Reflect API changes.
3203 (open_and_init_dwo_file): Reflect API changes.
3204 (dwarf2_get_pc_bounds): Update comments.
3205 (dwarf2_record_block_ranges): Likewise.
3206 (read_full_die_1): Change implementation to reprocess attributes that
3207 need str_offsets_base and addr_base.
3208 (partial_die_info::read): Likewise.
3209 (read_attribute_reprocess): New function definition.
3210 (read_attribute_value): Change API to take an additional out parameter,
3211 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
3212 when a non-dwo compile unit has index based attributes.
3213 (read_attribute): Reflect API changes.
3214 (read_addr_index_1): Reflect API changes. Update comments.
3215 (dwarf2_read_addr_index_data): Reflect API changes.
3216 (dwarf2_read_addr_index): Likewise.
3217 (read_str_index): Change API and implementation. This becomes a helper
3218 to be used by the new string index related methods. Update error
3219 message and comments.
3220 (read_dwo_str_index): New function definition.
3221 (read_stub_str_index): Likewise.
3222 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
3223 * symfile.h (dwarf2_debug_sections): Likewise.
3224 * xcoffread.c (dwarf2_debug_sections): Likewise.
3225
3226 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3227
3228 * gdbcore.h (struct core_fns) <core_read_registers>: Change
3229 core_reg_sect type to gdb_byte *.
3230 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
3231 * cris-tdep.c (fetch_core_registers): Likewise.
3232 * corelow.c (core_target::get_core_register_section): Change
3233 type of `contents` to gdb::byte_vector.
3234
3235 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
3236
3237 * tui/tui-wingeneral.c (box_win): Position the title in the center
3238 of the border.
3239
3240 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
3241
3242 * corelow.c (core_target::get_core_register_section): Use
3243 std::vector instead of alloca.
3244
3245 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3246
3247 * warning.m4: Add -Wmissing-declarations to build_warnings.
3248 * configure: Re-generate.
3249
3250 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3251
3252 * python/python.c (init__gdb_module): Add declaration.
3253
3254 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3255
3256 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
3257 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
3258 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
3259 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
3260 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
3261 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
3262 * ada-exp.y (_initialize_ada_exp): Add declaration.
3263 * ada-lang.c (_initialize_ada_language): Add declaration.
3264 * ada-tasks.c (_initialize_tasks): Add declaration.
3265 * agent.c (_initialize_agent): Add declaration.
3266 * aix-thread.c (_initialize_aix_thread): Add declaration.
3267 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
3268 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
3269 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
3270 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
3271 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
3272 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
3273 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
3274 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
3275 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
3276 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
3277 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
3278 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
3279 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
3280 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
3281 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
3282 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
3283 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
3284 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
3285 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
3286 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
3287 * annotate.c (_initialize_annotate): Add declaration.
3288 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
3289 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
3290 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
3291 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
3292 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
3293 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
3294 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
3295 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
3296 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
3297 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
3298 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
3299 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
3300 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
3301 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
3302 * auto-load.c (_initialize_auto_load): Add declaration.
3303 * auxv.c (_initialize_auxv): Add declaration.
3304 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
3305 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
3306 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
3307 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
3308 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
3309 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
3310 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
3311 * breakpoint.c (_initialize_breakpoint): Add declaration.
3312 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
3313 * btrace.c (_initialize_btrace): Add declaration.
3314 * charset.c (_initialize_charset): Add declaration.
3315 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
3316 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
3317 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
3318 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
3319 * cli/cli-script.c (_initialize_cli_script): Add declaration.
3320 * cli/cli-style.c (_initialize_cli_style): Add declaration.
3321 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
3322 * coffread.c (_initialize_coffread): Add declaration.
3323 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
3324 * compile/compile.c (_initialize_compile): Add declaration.
3325 * complaints.c (_initialize_complaints): Add declaration.
3326 * completer.c (_initialize_completer): Add declaration.
3327 * copying.c (_initialize_copying): Add declaration.
3328 * corefile.c (_initialize_core): Add declaration.
3329 * corelow.c (_initialize_corelow): Add declaration.
3330 * cp-abi.c (_initialize_cp_abi): Add declaration.
3331 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
3332 * cp-support.c (_initialize_cp_support): Add declaration.
3333 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
3334 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
3335 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
3336 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
3337 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
3338 * ctfread.c (_initialize_ctfread): Add declaration.
3339 * d-lang.c (_initialize_d_language): Add declaration.
3340 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
3341 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
3342 * dbxread.c (_initialize_dbxread): Add declaration.
3343 * dcache.c (_initialize_dcache): Add declaration.
3344 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
3345 * disasm.c (_initialize_disasm): Add declaration.
3346 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
3347 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
3348 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
3349 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
3350 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
3351 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
3352 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
3353 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
3354 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
3355 * elfread.c (_initialize_elfread): Add declaration.
3356 * exec.c (_initialize_exec): Add declaration.
3357 * extension.c (_initialize_extension): Add declaration.
3358 * f-lang.c (_initialize_f_language): Add declaration.
3359 * f-valprint.c (_initialize_f_valprint): Add declaration.
3360 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
3361 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
3362 * filesystem.c (_initialize_filesystem): Add declaration.
3363 * findcmd.c (_initialize_mem_search): Add declaration.
3364 * findvar.c (_initialize_findvar): Add declaration.
3365 * fork-child.c (_initialize_fork_child): Add declaration.
3366 * frame-base.c (_initialize_frame_base): Add declaration.
3367 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
3368 * frame.c (_initialize_frame): Add declaration.
3369 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
3370 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
3371 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
3372 * gcore.c (_initialize_gcore): Add declaration.
3373 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
3374 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
3375 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
3376 * gdbarch.c (_initialize_gdbarch): Add declaration.
3377 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
3378 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
3379 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
3380 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
3381 * go-lang.c (_initialize_go_language): Add declaration.
3382 * go32-nat.c (_initialize_go32_nat): Add declaration.
3383 * guile/guile.c (_initialize_guile): Add declaration.
3384 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
3385 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
3386 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
3387 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
3388 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
3389 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
3390 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
3391 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
3392 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
3393 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
3394 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
3395 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
3396 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
3397 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
3398 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
3399 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
3400 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
3401 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
3402 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
3403 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
3404 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
3405 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
3406 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
3407 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
3408 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
3409 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
3410 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
3411 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
3412 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
3413 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
3414 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
3415 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
3416 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
3417 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
3418 * infcall.c (_initialize_infcall): Add declaration.
3419 * infcmd.c (_initialize_infcmd): Add declaration.
3420 * inflow.c (_initialize_inflow): Add declaration.
3421 * infrun.c (_initialize_infrun): Add declaration.
3422 * interps.c (_initialize_interpreter): Add declaration.
3423 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
3424 * jit.c (_initialize_jit): Add declaration.
3425 * language.c (_initialize_language): Add declaration.
3426 * linux-fork.c (_initialize_linux_fork): Add declaration.
3427 * linux-nat.c (_initialize_linux_nat): Add declaration.
3428 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
3429 * linux-thread-db.c (_initialize_thread_db): Add declaration.
3430 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
3431 * m2-lang.c (_initialize_m2_language): Add declaration.
3432 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
3433 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
3434 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
3435 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
3436 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
3437 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
3438 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
3439 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
3440 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
3441 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
3442 * machoread.c (_initialize_machoread): Add declaration.
3443 * macrocmd.c (_initialize_macrocmd): Add declaration.
3444 * macroscope.c (_initialize_macroscope): Add declaration.
3445 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
3446 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
3447 * maint.c (_initialize_maint_cmds): Add declaration.
3448 * mdebugread.c (_initialize_mdebugread): Add declaration.
3449 * memattr.c (_initialize_mem): Add declaration.
3450 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
3451 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
3452 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
3453 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
3454 * mi/mi-main.c (_initialize_mi_main): Add declaration.
3455 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
3456 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
3457 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
3458 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
3459 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
3460 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
3461 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
3462 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
3463 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
3464 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
3465 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
3466 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
3467 * mipsread.c (_initialize_mipsread): Add declaration.
3468 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
3469 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
3470 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
3471 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
3472 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
3473 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
3474 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
3475 * nto-procfs.c (_initialize_procfs): Add declaration.
3476 * objc-lang.c (_initialize_objc_language): Add declaration.
3477 * observable.c (_initialize_observer): Add declaration.
3478 * opencl-lang.c (_initialize_opencl_language): Add declaration.
3479 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
3480 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
3481 * osabi.c (_initialize_gdb_osabi): Add declaration.
3482 * osdata.c (_initialize_osdata): Add declaration.
3483 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
3484 * parse.c (_initialize_parse): Add declaration.
3485 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
3486 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
3487 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
3488 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
3489 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
3490 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
3491 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
3492 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
3493 * printcmd.c (_initialize_printcmd): Add declaration.
3494 * probe.c (_initialize_probe): Add declaration.
3495 * proc-api.c (_initialize_proc_api): Add declaration.
3496 * proc-events.c (_initialize_proc_events): Add declaration.
3497 * proc-service.c (_initialize_proc_service): Add declaration.
3498 * procfs.c (_initialize_procfs): Add declaration.
3499 * producer.c (_initialize_producer): Add declaration.
3500 * psymtab.c (_initialize_psymtab): Add declaration.
3501 * python/python.c (_initialize_python): Add declaration.
3502 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
3503 * record-btrace.c (_initialize_record_btrace): Add declaration.
3504 * record-full.c (_initialize_record_full): Add declaration.
3505 * record.c (_initialize_record): Add declaration.
3506 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
3507 * regcache.c (_initialize_regcache): Add declaration.
3508 * reggroups.c (_initialize_reggroup): Add declaration.
3509 * remote-notif.c (_initialize_notif): Add declaration.
3510 * remote-sim.c (_initialize_remote_sim): Add declaration.
3511 * remote.c (_initialize_remote): Add declaration.
3512 * reverse.c (_initialize_reverse): Add declaration.
3513 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
3514 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
3515 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
3516 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
3517 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
3518 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
3519 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
3520 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
3521 Add declaration.
3522 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
3523 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
3524 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
3525 * rust-exp.y (_initialize_rust_exp): Add declaration.
3526 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
3527 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
3528 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
3529 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
3530 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
3531 * score-tdep.c (_initialize_score_tdep): Add declaration.
3532 * ser-go32.c (_initialize_ser_dos): Add declaration.
3533 * ser-mingw.c (_initialize_ser_windows): Add declaration.
3534 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
3535 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
3536 * ser-uds.c (_initialize_ser_socket): Add declaration.
3537 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
3538 * serial.c (_initialize_serial): Add declaration.
3539 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
3540 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
3541 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
3542 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
3543 * skip.c (_initialize_step_skip): Add declaration.
3544 * sol-thread.c (_initialize_sol_thread): Add declaration.
3545 * solib-aix.c (_initialize_solib_aix): Add declaration.
3546 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
3547 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
3548 * solib-frv.c (_initialize_frv_solib): Add declaration.
3549 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
3550 * solib-target.c (_initialize_solib_target): Add declaration.
3551 * solib.c (_initialize_solib): Add declaration.
3552 * source-cache.c (_initialize_source_cache): Add declaration.
3553 * source.c (_initialize_source): Add declaration.
3554 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
3555 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
3556 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
3557 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
3558 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
3559 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
3560 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
3561 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
3562 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
3563 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
3564 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
3565 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
3566 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
3567 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
3568 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
3569 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
3570 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
3571 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
3572 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
3573 * stabsread.c (_initialize_stabsread): Add declaration.
3574 * stack.c (_initialize_stack): Add declaration.
3575 * stap-probe.c (_initialize_stap_probe): Add declaration.
3576 * std-regs.c (_initialize_frame_reg): Add declaration.
3577 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
3578 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
3579 * symfile.c (_initialize_symfile): Add declaration.
3580 * symmisc.c (_initialize_symmisc): Add declaration.
3581 * symtab.c (_initialize_symtab): Add declaration.
3582 * target.c (_initialize_target): Add declaration.
3583 * target-connection.c (_initialize_target_connection): Add
3584 declaration.
3585 * target-dcache.c (_initialize_target_dcache): Add declaration.
3586 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
3587 * thread.c (_initialize_thread): Add declaration.
3588 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
3589 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
3590 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
3591 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
3592 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
3593 * tracectf.c (_initialize_ctf): Add declaration.
3594 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
3595 * tracefile.c (_initialize_tracefile): Add declaration.
3596 * tracepoint.c (_initialize_tracepoint): Add declaration.
3597 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
3598 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
3599 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
3600 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
3601 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
3602 * tui/tui-win.c (_initialize_tui_win): Add declaration.
3603 * tui/tui.c (_initialize_tui): Add declaration.
3604 * typeprint.c (_initialize_typeprint): Add declaration.
3605 * ui-style.c (_initialize_ui_style): Add declaration.
3606 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
3607 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
3608 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
3609 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
3610 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
3611 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
3612 * unittests/filtered_iterator-selftests.c
3613 (_initialize_filtered_iterator_selftests): Add declaration.
3614 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
3615 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
3616 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
3617 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
3618 * unittests/main-thread-selftests.c
3619 (_initialize_main_thread_selftests): Add declaration.
3620 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
3621 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
3622 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
3623 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
3624 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
3625 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
3626 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
3627 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
3628 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
3629 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
3630 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
3631 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
3632 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
3633 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
3634 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
3635 declaration.
3636 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
3637 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
3638 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
3639 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
3640 * user-regs.c (_initialize_user_regs): Add declaration.
3641 * utils.c (_initialize_utils): Add declaration.
3642 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
3643 * valops.c (_initialize_valops): Add declaration.
3644 * valprint.c (_initialize_valprint): Add declaration.
3645 * value.c (_initialize_values): Add declaration.
3646 * varobj.c (_initialize_varobj): Add declaration.
3647 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
3648 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
3649 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
3650 * windows-nat.c (_initialize_windows_nat): Add declaration.
3651 (_initialize_check_for_gdb_ini): Add declaration.
3652 (_initialize_loadable): Add declaration.
3653 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
3654 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
3655 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
3656 * xcoffread.c (_initialize_xcoffread): Add declaration.
3657 * xml-support.c (_initialize_xml_support): Add declaration.
3658 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
3659 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
3660 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
3661 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
3662
3663 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
3664
3665 * regformats/regdat.sh: Generate declaration for init function.
3666
3667 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
3668
3669 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
3670 up.
3671 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
3672 close_one_inferior>: New methods.
3673 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
3674 pass down target to find_inferior_pid.
3675 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
3676 Pass down target to find_inferior_ptid.
3677 (gdbsim_target::create_inferior): Pass down target to
3678 add_thread_silent.
3679 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
3680 target down to find_inferior_ptid and switch_to_thread.
3681 (gdbsim_target::close): Update to call close_one_inferior.
3682 (struct resume_data): Remove.
3683 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
3684 directly, rather than through a void pointer.
3685 (gdbsim_target::resume): Update to call resume_one_inferior.
3686
3687 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3688
3689 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
3690
3691 2020-01-12 Pedro Alves <palves@redhat.com>
3692
3693 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
3694 directly for the current inferior instead of
3695 discard_all_inferiors.
3696 (discard_all_inferiors): Delete.
3697
3698 2020-01-11 Tom Tromey <tom@tromey.com>
3699
3700 * tui/tui-wingeneral.c (box_win): Check cli_styling.
3701 * tui/tui-winsource.c (tui_source_window_base::refill): Use
3702 deprecated_safe_get_selected_frame.
3703
3704 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3705
3706 * inferior.c (print_inferior): Switch inferior before printing it.
3707
3708 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
3709 Pedro Alves <palves@redhat.com>
3710
3711 * progspace-and-thread.c (switch_to_program_space_and_thread):
3712 Assert there's an inferior for PSPACE. Use
3713 switch_to_inferior_no_thread to switch the inferior too.
3714 * progspace.c (program_space::~program_space): Call
3715 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
3716 (program_space::free_all_objfiles): Don't call clear_symtab_users
3717 here.
3718 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
3719
3720 2020-01-10 Pedro Alves <palves@redhat.com>
3721
3722 * NEWS: Mention multi-target debugging, "info connections", and
3723 "add-inferior -no-connection".
3724
3725 2020-01-10 Pedro Alves <palves@redhat.com>
3726
3727 * infrun.c: Include "target-connection.h".
3728 (check_multi_target_resumption): New.
3729 (proceed): Call it.
3730 * target-connection.c (make_target_connection_string): Make
3731 extern.
3732 * target-connection.h (make_target_connection_string): Declare.
3733
3734 2020-01-10 Pedro Alves <palves@redhat.com>
3735
3736 * Makefile.in (COMMON_SFILES): Add target-connection.c.
3737 * inferior.c (uiout_field_connection): New function.
3738 (print_inferior): Add new "connection-id" column.
3739 (add_inferior_command): Show connection number/string of added
3740 inferior.
3741 * process-stratum-target.h
3742 (process_stratum_target::connection_string): New virtual method.
3743 (process_stratum_target::connection_number): New field.
3744 * remote.c (remote_target::connection_string): New override.
3745 * target-connection.c: New file.
3746 * target-connection.h: New file.
3747 * target.c (decref_target): Remove process_stratum targets from
3748 the connection list.
3749 (target_stack::push): Add process_stratum targets to the
3750 connection list.
3751
3752 2020-01-10 Pedro Alves <palves@redhat.com>
3753
3754 Revert:
3755 2016-04-12 Pedro Alves <palves@redhat.com>
3756 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
3757 Remove references to name.
3758 * serial.h (struct serial) <name>: Delete.
3759
3760 2020-01-10 Pedro Alves <palves@redhat.com>
3761
3762 * gdbarch-selftests.c (register_to_value_test): Remove "target
3763 already pushed" check.
3764
3765 2020-01-10 Pedro Alves <palves@redhat.com>
3766 John Baldwin <jhb@FreeBSD.org>
3767
3768 * aarch64-linux-nat.c
3769 (aarch64_linux_nat_target::thread_architecture): Adjust.
3770 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
3771 (task_command_1): Likewise.
3772 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
3773 (aix_thread_target::wait, aix_thread_target::fetch_registers)
3774 (aix_thread_target::store_registers)
3775 (aix_thread_target::thread_alive): Adjust.
3776 * amd64-fbsd-tdep.c: Include "inferior.h".
3777 (amd64fbsd_get_thread_local_address): Pass down target.
3778 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
3779 thread's gdbarch instead of target_gdbarch.
3780 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
3781 get_last_target_status.
3782 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
3783 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
3784 inferiors.
3785 (update_inserted_breakpoint_locations): Skip if inferiors with no
3786 execution.
3787 (update_global_location_list): When handling moribund locations,
3788 find representative inferior for location's pspace, and use thread
3789 count of its process_stratum target.
3790 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
3791 * bsd-uthread.c (bsd_uthread_target::wait): Use
3792 as_process_stratum_target and adjust thread_change_ptid and
3793 add_thread calls.
3794 (bsd_uthread_target::update_thread_list): Use
3795 as_process_stratum_target and adjust find_thread_ptid,
3796 thread_change_ptid and add_thread calls.
3797 * btrace.c (maint_btrace_packet_history_cmd): Adjust
3798 find_thread_ptid call.
3799 * corelow.c (add_to_thread_list): Adjust add_thread call.
3800 (core_target_open): Adjust add_thread_silent and thread_count
3801 calls.
3802 (core_target::pid_to_str): Adjust find_inferior_ptid call.
3803 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
3804 * event-top.c (async_disconnect): Pop targets from all inferiors.
3805 * exec.c (add_target_sections): Push exec target on all inferiors
3806 sharing the program space.
3807 (remove_target_sections): Remove the exec target from all
3808 inferiors sharing the program space.
3809 (exec_on_vfork): New.
3810 * exec.h (exec_on_vfork): Declare.
3811 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
3812 Pass it down.
3813 (fbsd_nat_target::update_thread_list): Adjust.
3814 (fbsd_nat_target::resume): Adjust.
3815 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
3816 down.
3817 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
3818 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
3819 get_thread_arch_regcache call.
3820 * fork-child.c (gdb_startup_inferior): Pass target down to
3821 startup_inferior and set_executing.
3822 * gdbthread.h (struct process_stratum_target): Forward declare.
3823 (add_thread, add_thread_silent, add_thread_with_info)
3824 (in_thread_list): Add process_stratum_target parameter.
3825 (find_thread_ptid(inferior*, ptid_t)): New overload.
3826 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
3827 parameter.
3828 (all_threads()): Delete overload.
3829 (all_threads, all_non_exited_threads): Add process_stratum_target
3830 parameter.
3831 (all_threads_safe): Use brace initialization.
3832 (thread_count): Add process_stratum_target parameter.
3833 (set_resumed, set_running, set_stop_requested, set_executing)
3834 (threads_are_executing, finish_thread_state): Add
3835 process_stratum_target parameter.
3836 (switch_to_thread): Use is_current_thread.
3837 * i386-fbsd-tdep.c: Include "inferior.h".
3838 (i386fbsd_get_thread_local_address): Pass down target.
3839 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
3840 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
3841 have_inferiors check.
3842 * inf-ptrace.c (inf_ptrace_target::create_inferior)
3843 (inf_ptrace_target::attach): Adjust.
3844 * infcall.c (run_inferior_call): Adjust.
3845 * infcmd.c (run_command_1): Pass target to
3846 scoped_finish_thread_state.
3847 (proceed_thread_callback): Skip inferiors with no execution.
3848 (continue_command): Rename 'all_threads' local to avoid hiding
3849 'all_threads' function. Adjust get_last_target_status call.
3850 (prepare_one_step): Adjust set_running call.
3851 (signal_command): Use user_visible_resume_target. Compare thread
3852 pointers instead of inferior_ptid.
3853 (info_program_command): Adjust to pass down target.
3854 (attach_command): Mark target's 'thread_executing' flag.
3855 (stop_current_target_threads_ns): New, factored out from ...
3856 (interrupt_target_1): ... this. Switch inferior before making
3857 target calls.
3858 * inferior-iter.h
3859 (struct all_inferiors_iterator, struct all_inferiors_range)
3860 (struct all_inferiors_safe_range)
3861 (struct all_non_exited_inferiors_range): Filter on
3862 process_stratum_target too. Remove explicit.
3863 * inferior.c (inferior::inferior): Push dummy target on target
3864 stack.
3865 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
3866 Add process_stratum_target parameter, and pass it down.
3867 (have_live_inferiors): Adjust.
3868 (switch_to_inferior_and_push_target): New.
3869 (add_inferior_command, clone_inferior_command): Handle
3870 "-no-connection" parameter. Use
3871 switch_to_inferior_and_push_target.
3872 (_initialize_inferior): Mention "-no-connection" option in
3873 the help of "add-inferior" and "clone-inferior" commands.
3874 * inferior.h: Include "process-stratum-target.h".
3875 (interrupt_target_1): Use bool.
3876 (struct inferior) <push_target, unpush_target, target_is_pushed,
3877 find_target_beneath, top_target, process_target, target_at,
3878 m_stack>: New.
3879 (discard_all_inferiors): Delete.
3880 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
3881 (all_inferiors, all_non_exited_inferiors): Add
3882 process_stratum_target parameter.
3883 * infrun.c: Include "gdb_select.h" and <unordered_map>.
3884 (target_last_proc_target): New global.
3885 (follow_fork_inferior): Push target on new inferior. Pass target
3886 to add_thread_silent. Call exec_on_vfork. Handle target's
3887 reference count.
3888 (follow_fork): Adjust get_last_target_status call. Also consider
3889 target.
3890 (follow_exec): Push target on new inferior.
3891 (struct execution_control_state) <target>: New field.
3892 (user_visible_resume_target): New.
3893 (do_target_resume): Call target_async.
3894 (resume_1): Set target's threads_executing flag. Consider resume
3895 target.
3896 (commit_resume_all_targets): New.
3897 (proceed): Also consider resume target. Skip threads of inferiors
3898 with no execution. Commit resumtion in all targets.
3899 (start_remote): Pass current inferior to wait_for_inferior.
3900 (infrun_thread_stop_requested): Consider target as well. Pass
3901 thread_info pointer to clear_inline_frame_state instead of ptid.
3902 (infrun_thread_thread_exit): Consider target as well.
3903 (random_pending_event_thread): New inferior parameter. Use it.
3904 (do_target_wait): Rename to ...
3905 (do_target_wait_1): ... this. Add inferior parameter, and pass it
3906 down.
3907 (threads_are_resumed_pending_p, do_target_wait): New.
3908 (prepare_for_detach): Adjust calls.
3909 (wait_for_inferior): New inferior parameter. Handle it. Use
3910 do_target_wait_1 instead of do_target_wait.
3911 (fetch_inferior_event): Adjust. Switch to representative
3912 inferior. Pass target down.
3913 (set_last_target_status): Add process_stratum_target parameter.
3914 Save target in global.
3915 (get_last_target_status): Add process_stratum_target parameter and
3916 handle it.
3917 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
3918 (context_switch): Check inferior_ptid == null_ptid before calling
3919 inferior_thread().
3920 (get_inferior_stop_soon): Pass down target.
3921 (wait_one): Rename to ...
3922 (poll_one_curr_target): ... this.
3923 (struct wait_one_event): New.
3924 (wait_one): New.
3925 (stop_all_threads): Adjust.
3926 (handle_no_resumed, handle_inferior_event): Adjust to consider the
3927 event's target.
3928 (switch_back_to_stepped_thread): Also consider target.
3929 (print_stop_event): Update.
3930 (normal_stop): Update. Also consider the resume target.
3931 * infrun.h (wait_for_inferior): Remove declaration.
3932 (user_visible_resume_target): New declaration.
3933 (get_last_target_status, set_last_target_status): New
3934 process_stratum_target parameter.
3935 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
3936 process_stratum_target parameter, and use it.
3937 (clear_inline_frame_state (thread_info*)): New.
3938 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
3939 process_stratum_target parameter.
3940 (clear_inline_frame_state (thread_info*)): Declare.
3941 * linux-fork.c (delete_checkpoint_command): Pass target down to
3942 find_thread_ptid.
3943 (checkpoint_command): Adjust.
3944 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
3945 instead of just tweaking inferior_ptid.
3946 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
3947 (exit_lwp): Pass target down to find_thread_ptid.
3948 (attach_proc_task_lwp_callback): Pass target down to
3949 add_thread/set_running/set_executing.
3950 (linux_nat_target::attach): Pass target down to
3951 thread_change_ptid.
3952 (get_detach_signal): Pass target down to find_thread_ptid.
3953 Consider last target status's target.
3954 (linux_resume_one_lwp_throw, resume_lwp)
3955 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
3956 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
3957 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
3958 (linux_nat_target::async_wait_fd): New.
3959 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
3960 target down.
3961 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
3962 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
3963 * linux-thread-db.c (struct thread_db_info::process_target): New
3964 field.
3965 (add_thread_db_info): Save target.
3966 (get_thread_db_info): New process_stratum_target parameter. Also
3967 match target.
3968 (delete_thread_db_info): New process_stratum_target parameter.
3969 Also match target.
3970 (thread_from_lwp): Adjust to pass down target.
3971 (thread_db_notice_clone): Pass down target.
3972 (check_thread_db_callback): Pass down target.
3973 (try_thread_db_load_1): Always push the thread_db target.
3974 (try_thread_db_load, record_thread): Pass target down.
3975 (thread_db_target::detach): Pass target down. Always unpush the
3976 thread_db target.
3977 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
3978 target down. Always unpush the thread_db target.
3979 (find_new_threads_callback, thread_db_find_new_threads_2)
3980 (thread_db_target::update_thread_list): Pass target down.
3981 (thread_db_target::pid_to_str): Pass current inferior down.
3982 (thread_db_target::get_thread_local_address): Pass target down.
3983 (thread_db_target::resume, maintenance_check_libthread_db): Pass
3984 target down.
3985 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
3986 * procfs.c (procfs_target::procfs_init_inferior): Declare.
3987 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
3988 (procfs_init_inferior): Rename to ...
3989 (procfs_target::procfs_init_inferior): ... this and adjust.
3990 (procfs_target::create_inferior, procfs_notice_thread)
3991 (procfs_do_thread_registers): Adjust.
3992 * ppc-fbsd-tdep.c: Include "inferior.h".
3993 (ppcfbsd_get_thread_local_address): Pass down target.
3994 * proc-service.c (ps_xfer_memory): Switch current inferior and
3995 program space as well.
3996 (get_ps_regcache): Pass target down.
3997 * process-stratum-target.c
3998 (process_stratum_target::thread_address_space)
3999 (process_stratum_target::thread_architecture): Pass target down.
4000 * process-stratum-target.h
4001 (process_stratum_target::threads_executing): New field.
4002 (as_process_stratum_target): New.
4003 * ravenscar-thread.c
4004 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
4005 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
4006 down.
4007 * record-btrace.c (record_btrace_target::info_record): Adjust.
4008 (record_btrace_target::record_method)
4009 (record_btrace_target::record_is_replaying)
4010 (record_btrace_target::fetch_registers)
4011 (get_thread_current_frame_id, record_btrace_target::resume)
4012 (record_btrace_target::wait, record_btrace_target::stop): Pass
4013 target down.
4014 * record-full.c (record_full_wait_1): Switch to event thread.
4015 Pass target down.
4016 * regcache.c (regcache::regcache)
4017 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
4018 process_stratum_target parameter and handle it.
4019 (current_thread_target): New global.
4020 (get_thread_regcache): Add process_stratum_target parameter and
4021 handle it. Switch inferior before calling target method.
4022 (get_thread_regcache): Pass target down.
4023 (get_thread_regcache_for_ptid): Pass target down.
4024 (registers_changed_ptid): Add process_stratum_target parameter and
4025 handle it.
4026 (registers_changed_thread, registers_changed): Pass target down.
4027 (test_get_thread_arch_aspace_regcache): New.
4028 (current_regcache_test): Define a couple local test_target_ops
4029 instances and use them for testing.
4030 (readwrite_regcache): Pass process_stratum_target parameter.
4031 (cooked_read_test, cooked_write_test): Pass mock_target down.
4032 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
4033 (get_thread_arch_aspace_regcache): Add process_stratum_target
4034 parameter.
4035 (regcache::target): New method.
4036 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
4037 (regcache::registers_changed_ptid): Add process_stratum_target
4038 parameter.
4039 (regcache::m_target): New field.
4040 (registers_changed_ptid): Add process_stratum_target parameter.
4041 * remote.c (remote_state::supports_vCont_probed): New field.
4042 (remote_target::async_wait_fd): New method.
4043 (remote_unpush_and_throw): Add remote_target parameter.
4044 (get_current_remote_target): Adjust.
4045 (remote_target::remote_add_inferior): Push target.
4046 (remote_target::remote_add_thread)
4047 (remote_target::remote_notice_new_inferior)
4048 (get_remote_thread_info): Pass target down.
4049 (remote_target::update_thread_list): Skip threads of inferiors
4050 bound to other targets. (remote_target::close): Don't discard
4051 inferiors. (remote_target::add_current_inferior_and_thread)
4052 (remote_target::process_initial_stop_replies)
4053 (remote_target::start_remote)
4054 (remote_target::remote_serial_quit_handler): Pass down target.
4055 (remote_target::remote_unpush_target): New remote_target
4056 parameter. Unpush the target from all inferiors.
4057 (remote_target::remote_unpush_and_throw): New remote_target
4058 parameter. Pass it down.
4059 (remote_target::open_1): Check whether the current inferior has
4060 execution instead of checking whether any inferior is live. Pass
4061 target down.
4062 (remote_target::remote_detach_1): Pass down target. Use
4063 remote_unpush_target.
4064 (extended_remote_target::attach): Pass down target.
4065 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
4066 (remote_target::append_resumption): Pass down target.
4067 (remote_target::append_pending_thread_resumptions)
4068 (remote_target::remote_resume_with_hc, remote_target::resume)
4069 (remote_target::commit_resume): Pass down target.
4070 (remote_target::remote_stop_ns): Check supports_vCont_probed.
4071 (remote_target::interrupt_query)
4072 (remote_target::remove_new_fork_children)
4073 (remote_target::check_pending_events_prevent_wildcard_vcont)
4074 (remote_target::remote_parse_stop_reply)
4075 (remote_target::process_stop_reply): Pass down target.
4076 (first_remote_resumed_thread): New remote_target parameter. Pass
4077 it down.
4078 (remote_target::wait_as): Pass down target.
4079 (unpush_and_perror): New remote_target parameter. Pass it down.
4080 (remote_target::readchar, remote_target::remote_serial_write)
4081 (remote_target::getpkt_or_notif_sane_1)
4082 (remote_target::kill_new_fork_children, remote_target::kill): Pass
4083 down target.
4084 (remote_target::mourn_inferior): Pass down target. Use
4085 remote_unpush_target.
4086 (remote_target::core_of_thread)
4087 (remote_target::remote_btrace_maybe_reopen): Pass down target.
4088 (remote_target::pid_to_exec_file)
4089 (remote_target::thread_handle_to_thread_info): Pass down target.
4090 (remote_target::async_wait_fd): New.
4091 * riscv-fbsd-tdep.c: Include "inferior.h".
4092 (riscv_fbsd_get_thread_local_address): Pass down target.
4093 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
4094 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
4095 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
4096 Adjust.
4097 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
4098 * solib-svr4.c (enable_break): Pass down target.
4099 * spu-multiarch.c (parse_spufs_run): Pass down target.
4100 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
4101 * target-delegates.c: Regenerate.
4102 * target.c (g_target_stack): Delete.
4103 (current_top_target): Return the current inferior's top target.
4104 (target_has_execution_1): Refer to the passed-in inferior's top
4105 target.
4106 (target_supports_terminal_ours): Check whether the initial
4107 inferior was already created.
4108 (decref_target): New.
4109 (target_stack::push): Incref/decref the target.
4110 (push_target, push_target, unpush_target): Adjust.
4111 (target_stack::unpush): Defref target.
4112 (target_is_pushed): Return bool. Adjust to refer to the current
4113 inferior's target stack.
4114 (dispose_inferior): Delete, and inline parts ...
4115 (target_preopen): ... here. Only dispose of the current inferior.
4116 (target_detach): Hold strong target reference while detaching.
4117 Pass target down.
4118 (target_thread_name): Add assertion.
4119 (target_resume): Pass down target.
4120 (target_ops::beneath, find_target_at): Adjust to refer to the
4121 current inferior's target stack.
4122 (get_dummy_target): New.
4123 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
4124 has a thread running.
4125 (initialize_targets): Rename to ...
4126 (_initialize_target): ... this.
4127 * target.h: Include "gdbsupport/refcounted-object.h".
4128 (struct target_ops): Inherit refcounted_object.
4129 (target_ops::shortname, target_ops::longname): Make const.
4130 (target_ops::async_wait_fd): New method.
4131 (decref_target): Declare.
4132 (struct target_ops_ref_policy): New.
4133 (target_ops_ref): New typedef.
4134 (get_dummy_target): Declare function.
4135 (target_is_pushed): Return bool.
4136 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
4137 (all_matching_threads_iterator::all_matching_threads_iterator):
4138 Handle filter target.
4139 * thread-iter.h (struct all_matching_threads_iterator, struct
4140 all_matching_threads_range, class all_non_exited_threads_range):
4141 Filter by target too. Remove explicit.
4142 * thread.c (threads_executing): Delete.
4143 (inferior_thread): Pass down current inferior.
4144 (clear_thread_inferior_resources): Pass down thread pointer
4145 instead of ptid_t.
4146 (add_thread_silent, add_thread_with_info, add_thread): Add
4147 process_stratum_target parameter. Use it for thread and inferior
4148 searches.
4149 (is_current_thread): New.
4150 (thread_info::deletable): Use it.
4151 (find_thread_ptid, thread_count, in_thread_list)
4152 (thread_change_ptid, set_resumed, set_running): New
4153 process_stratum_target parameter. Pass it down.
4154 (set_executing): New process_stratum_target parameter. Pass it
4155 down. Adjust reference to 'threads_executing'.
4156 (threads_are_executing): New process_stratum_target parameter.
4157 Adjust reference to 'threads_executing'.
4158 (set_stop_requested, finish_thread_state): New
4159 process_stratum_target parameter. Pass it down.
4160 (switch_to_thread): Also match inferior.
4161 (switch_to_thread): New process_stratum_target parameter. Pass it
4162 down.
4163 (update_threads_executing): Reimplement.
4164 * top.c (quit_force): Pop targets from all inferior.
4165 (gdb_init): Don't call initialize_targets.
4166 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
4167 Declare.
4168 (windows_add_thread, windows_delete_thread): Adjust.
4169 (get_windows_debug_event): Rename to ...
4170 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
4171 * tracefile-tfile.c (tfile_target_open): Pass down target.
4172 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
4173 Forward declare.
4174 (switch_to_thread): Add process_stratum_target parameter.
4175 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
4176 parameter. Use it.
4177 (mi_on_resume): Pass target down.
4178 * nat/fork-inferior.c (startup_inferior): Add
4179 process_stratum_target parameter. Pass it down.
4180 * nat/fork-inferior.h (startup_inferior): Add
4181 process_stratum_target parameter.
4182 * python/py-threadevent.c (py_get_event_thread): Pass target down.
4183
4184 2020-01-10 Pedro Alves <palves@redhat.com>
4185
4186 * remote.c (remote_target::start_remote): Don't set inferior_ptid
4187 directly. Instead find the first thread in the thread list and
4188 use switch_to_thread.
4189
4190 2020-01-10 Pedro Alves <palves@redhat.com>
4191
4192 * remote.c (remote_target::remote_add_inferior): Don't bind a
4193 process to the current inferior if the current inferior is already
4194 bound to a process.
4195
4196 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4197 Pedro Alves <palves@redhat.com>
4198
4199 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
4200 If no process is specified, return null_ptid instead of
4201 inferior_ptid.
4202 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
4203 TARGET_WAITKIND_SIGNALLED with no pid.
4204
4205 2020-01-10 Pedro Alves <palves@redhat.com>
4206
4207 * remote.c (first_remote_resumed_thread): New.
4208 (remote_target::wait_as): Use it as default event_ptid instead of
4209 inferior_ptid.
4210
4211 2020-01-10 Pedro Alves <palves@redhat.com>
4212
4213 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
4214
4215 2020-01-10 Pedro Alves <palves@redhat.com>
4216
4217 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
4218 not -1.
4219
4220 2020-01-10 Pedro Alves <palves@redhat.com>
4221
4222 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
4223 ptid to get_last_target_status.
4224 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
4225 ptid to get_last_target_status.
4226 * infcmd.c (continue_command): Don't pass a target_waitstatus to
4227 get_last_target_status.
4228 (info_program_command): Don't pass a target_waitstatus to
4229 get_last_target_status.
4230 * infrun.c (init_wait_for_inferior): Use
4231 nullify_last_target_wait_ptid.
4232 (get_last_target_status): Handle nullptr arguments.
4233 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
4234 (print_stop_event): Don't pass a ptid to get_last_target_status.
4235 (normal_stop): Don't pass a ptid to get_last_target_status.
4236 * infrun.h (get_last_target_status, set_last_target_status): Move
4237 comments here and update.
4238 (nullify_last_target_wait_ptid): Declare.
4239 * linux-fork.c (fork_load_infrun_state): Remove local extern
4240 declaration of nullify_last_target_wait_ptid.
4241 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
4242 to get_last_target_status.
4243
4244 2020-01-10 Pedro Alves <palves@redhat.com>
4245
4246 * gdbthread.h (scoped_restore_current_thread)
4247 <dont_restore, restore, m_dont_restore>: Declare.
4248 * thread.c (thread_alive): Add assertion. Return bool.
4249 (switch_to_thread_if_alive): New.
4250 (prune_threads): Switch inferior/thread.
4251 (print_thread_info_1): Switch thread before calling target methods.
4252 (scoped_restore_current_thread::restore): New, factored out from
4253 ...
4254 (scoped_restore_current_thread::~scoped_restore_current_thread):
4255 ... this.
4256 (scoped_restore_current_thread::scoped_restore_current_thread):
4257 Add assertion.
4258 (thread_apply_all_command, thread_select): Use
4259 switch_to_thread_if_alive.
4260 * infrun.c (proceed, restart_threads, handle_signal_stop)
4261 (switch_back_to_stepped_thread): Switch current thread before
4262 calling target methods.
4263
4264 2020-01-10 Pedro Alves <palves@redhat.com>
4265
4266 * inferior.c (switch_to_inferior_no_thread): New function,
4267 factored out from ...
4268 (inferior_command): ... here.
4269 * inferior.h (switch_to_inferior_no_thread): Declare.
4270 * mi/mi-main.c (run_one_inferior): Use
4271 switch_to_inferior_no_thread.
4272
4273 2020-01-10 Pedro Alves <palves@redhat.com>
4274
4275 * infcmd.c (kill_command): Remove dead code.
4276
4277 2020-01-10 Pedro Alves <palves@redhat.com>
4278
4279 * remote.c (remote_target::mourn_inferior): No longer check
4280 whether the target is running.
4281
4282 2020-01-10 Pedro Alves <palves@redhat.com>
4283
4284 * corelow.c (core_target::has_execution): Change parameter type to
4285 inferior pointer.
4286 * inferior.c (number_of_live_inferiors): Use
4287 inferior::has_execution instead of target_has_execution_1.
4288 * inferior.h (inferior::has_execution): New.
4289 * linux-thread-db.c (thread_db_target::update_thread_list): Use
4290 inferior::has_execution instead of target_has_execution_1.
4291 * process-stratum-target.c
4292 (process_stratum_target::has_execution): Change parameter type to
4293 inferior pointer. Check the inferior's PID instead of
4294 inferior_ptid.
4295 * process-stratum-target.h
4296 (process_stratum_target::has_execution): Change parameter type to
4297 inferior pointer.
4298 * record-full.c (record_full_core_target::has_execution): Change
4299 parameter type to inferior pointer.
4300 * target.c (target_has_execution_1): Change parameter type to
4301 inferior pointer.
4302 (target_has_execution_current): Adjust.
4303 * target.h (target_ops::has_execution): Change parameter type to
4304 inferior pointer.
4305 (target_has_execution_1): Change parameter type to inferior
4306 pointer. Change return type to bool.
4307 * tracefile.h (tracefile_target::has_execution): Change parameter
4308 type to inferior pointer.
4309
4310 2020-01-10 Pedro Alves <palves@redhat.com>
4311
4312 * exceptions.c (print_flush): Remove current_top_target() check.
4313
4314 2020-01-10 Pedro Alves <palves@redhat.com>
4315
4316 * remote.c (show_remote_exec_file): Show the current inferior's
4317 exec-file instead of the command variable's value.
4318
4319 2020-01-10 Pedro Alves <palves@redhat.com>
4320
4321 * record-full.c (record_full_resume_ptid): New global.
4322 (record_full_target::resume): Set it.
4323 (record_full_wait_1): Use record_full_resume_ptid instead of
4324 inferior_ptid.
4325
4326 2020-01-10 Pedro Alves <palves@redhat.com>
4327
4328 * gdbthread.h (scoped_restore_current_thread)
4329 <dont_restore, restore, m_dont_restore>: Declare.
4330 * thread.c (thread_alive): Add assertion. Return bool.
4331 (switch_to_thread_if_alive): New.
4332 (prune_threads): Switch inferior/thread.
4333 (print_thread_info_1): Switch thread before calling target methods.
4334 (scoped_restore_current_thread::restore): New, factored out from
4335 ...
4336 (scoped_restore_current_thread::~scoped_restore_current_thread):
4337 ... this.
4338 (scoped_restore_current_thread::scoped_restore_current_thread):
4339 Add assertion.
4340 (thread_apply_all_command, thread_select): Use
4341 switch_to_thread_if_alive.
4342
4343 2020-01-10 George Barrett <bob@bob131.so>
4344
4345 * stap-probe.c (stap_modify_semaphore): Don't check for null
4346 semaphores.
4347 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
4348 for null semaphores.
4349
4350 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
4351
4352 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
4353 all source windows, and maintain horizontal scroll status while
4354 doing so.
4355
4356 2020-01-09 Tom Tromey <tom@tromey.com>
4357
4358 PR tui/18932:
4359 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
4360 update_source_window, not print_source_lines.
4361
4362 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
4363
4364 * tui/tui.c (tui_enable): Register tui hooks after calling
4365 tui_display_main.
4366
4367 2020-01-09 Christian Biesinger <cbiesinger@google.com>
4368
4369 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
4370
4371 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
4372
4373 * thread.c (print_thread_info_1): Fix indentation.
4374
4375 2020-01-09 Christian Biesinger <cbiesinger@google.com>
4376
4377 * symtab.c (general_symbol_info::compute_and_set_names): Move the
4378 unique_xmalloc_ptr outside the if to always free the demangled name.
4379
4380 2020-01-08 Tom Tromey <tromey@adacore.com>
4381
4382 * xcoffread.c (enter_line_range, read_xcoff_symtab)
4383 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
4384 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
4385 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
4386 Remove.
4387 (section_offsets): New typedef.
4388 * symtab.c (fixup_section, get_msymbol_address): Update.
4389 * symmisc.c (dump_msymbols): Update.
4390 * symfile.h (relative_addr_info_to_section_offsets)
4391 (symfile_map_offsets_to_segments): Update.
4392 * symfile.c (build_section_addr_info_from_objfile)
4393 (init_objfile_sect_indices): Update.
4394 (struct place_section_arg): Change type of "offsets".
4395 (place_section): Update.
4396 (relative_addr_info_to_section_offsets): Change type of
4397 "section_offsets". Remove "num_sections" parameter.
4398 (default_symfile_offsets, syms_from_objfile_1)
4399 (set_objfile_default_section_offset): Update.
4400 (reread_symbols): No need to preserve section offsets by hand.
4401 (symfile_map_offsets_to_segments): Change type of "offsets".
4402 * stap-probe.c (relocate_address): Update.
4403 * stabsread.h (process_one_symbol): Update.
4404 * solib-target.c (struct lm_info_target) <offsets>: Change type.
4405 (solib_target_relocate_section_addresses): Update.
4406 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
4407 Update.
4408 * solib-frv.c (frv_relocate_main_executable): Update.
4409 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
4410 * solib-aix.c (solib_aix_get_section_offsets): Change return
4411 type.
4412 (solib_aix_solib_create_inferior_hook): Update.
4413 * remote.c (remote_target::get_offsets): Update.
4414 * psymtab.c (find_pc_sect_psymtab): Update.
4415 * psympriv.h (struct partial_symbol) <address, text_low,
4416 text_high>: Update.
4417 * objfiles.h (obj_section_offset): Update.
4418 (struct objfile) <section_offsets>: Change type.
4419 <num_sections>: Remove.
4420 (objfile_relocate): Update.
4421 * objfiles.c (entry_point_address_query): Update
4422 (relocate_one_symbol): Change type of "section_offsets".
4423 (objfile_relocate1, objfile_relocate1): Change type of
4424 "new_offsets".
4425 (objfile_rebase1): Update.
4426 * mipsread.c (mipscoff_symfile_read): Update.
4427 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
4428 parameter.
4429 * mdebugread.c (parse_symbol): Change type of "section_offsets".
4430 (parse_external, psymtab_to_symtab_1): Update.
4431 * machoread.c (macho_symfile_offsets): Update.
4432 * ia64-tdep.c (ia64_find_unwind_table): Update.
4433 * hppa-tdep.c (read_unwind_info): Update.
4434 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
4435 * dwarf2read.c (create_addrmap_from_index)
4436 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
4437 (process_psymtab_comp_unit_reader, add_partial_symbol)
4438 (add_partial_subprogram, process_full_comp_unit)
4439 (read_file_scope, read_func_scope, read_lexical_block_scope)
4440 (read_call_site_scope, dwarf2_rnglists_process)
4441 (dwarf2_ranges_process, dwarf2_ranges_read)
4442 (dwarf_decode_lines_1, var_decode_location, new_symbol)
4443 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
4444 Update.
4445 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
4446 Update.
4447 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
4448 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
4449 (process_one_symbol): Change type of "section_offsets".
4450 * ctfread.c (get_objfile_text_range): Update.
4451 * coffread.c (coff_symtab_read, enter_linenos)
4452 (process_coff_symbol): Update.
4453 * coff-pe-read.c (add_pe_forwarded_sym): Update.
4454 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
4455
4456 2020-01-08 Tom Tromey <tromey@adacore.com>
4457
4458 * dwarf2read.c (parse_macro_definition): Use std::string.
4459 (parse_macro_definition): Likewise.
4460
4461 2020-01-08 Tom Tromey <tromey@adacore.com>
4462
4463 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
4464 (ATTR_ALLOC_CHUNK): Remove.
4465
4466 2020-01-08 Tom Tromey <tromey@adacore.com>
4467
4468 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
4469
4470 2020-01-08 Tom Tromey <tromey@adacore.com>
4471
4472 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
4473 (dwarf2_compute_name, open_dwo_file): Likewise.
4474 (process_enumeration_scope): Use std::vector.
4475 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
4476 (partial_die_info::fixup, dwarf2_start_subfile)
4477 (guess_full_die_structure_name, dwarf2_name): Likewise.
4478 (determine_prefix): Update.
4479 (guess_full_die_structure_name): Make return type const.
4480 (partial_die_full_name): Return unique_xmalloc_ptr.
4481 (DW_FIELD_ALLOC_CHUNK): Remove.
4482
4483 2020-01-07 Tom Tromey <tromey@adacore.com>
4484
4485 PR build/24937:
4486 * stap-probe.c (class stap_static_probe_ops): Add constructor.
4487
4488 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
4489
4490 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
4491
4492 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
4493
4494 * stack.c (print_frame_info): Move disassemble_next_line code
4495 inside source_print block.
4496
4497 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4498
4499 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
4500 gdb/signals.h, as we are now using native signal symbols.
4501
4502 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
4503
4504 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
4505 overflow by an early check of content vs threshold.
4506 * tui/tui-source.c (tui_source_window::line_is_displayed):
4507 Likewise.
4508
4509 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4510
4511 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
4512
4513 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
4514
4515 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
4516 export table if no section contains it's RVA.
4517
4518 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4519
4520 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
4521
4522 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
4523
4524 * source.c (print_source_lines_base): Set last_line_listed.
4525
4526 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
4527
4528 * tui/tui-disasm.c: Remove trailing spaces.
4529
4530 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4531 Pedro Alves <palves@redhat.com>
4532
4533 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
4534 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
4535 (windows_gdb_signal_to_target): New function, uses the above
4536 enumeration to convert GDB internal signal codes to equivalent
4537 Windows codes.
4538 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
4539 * windows-nat.c: Include "gdb_wait.h".
4540 (get_windows_debug_event): Extract the fatal exception from the
4541 exit status and convert to the equivalent Posix signal number.
4542 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
4543 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
4544 * gdbsupport/gdb_wait.c: New file, implements
4545 windows_status_to_termsig.
4546 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
4547 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
4548
4549 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
4550
4551 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
4552 show_layout.
4553
4554 2020-01-05 Luis Machado <luis.machado@linaro.org>
4555
4556 * aarch64-linux-nat.c
4557 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
4558 and bfd_mach_aarch64.
4559
4560 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4561
4562 * ui-file.c (stdio_file::can_emit_style_escape)
4563 (tee_file::can_emit_style_escape): Ensure style is used also on
4564 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
4565 to gdb_stdout.
4566 * main.c (set_gdb_data_directory): Use file style to output the
4567 warning that the given pathname is not a directory.
4568 * top.c (show_history_filename, gdb_safe_append_history)
4569 (show_gdb_datadir): Use file style.
4570
4571 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
4572
4573 * solib-target.c (struct lm_info_target):
4574 Change offsets to be a unique_xmalloc_ptr.
4575 (solib_target_relocate_section_addresses): Update.
4576
4577 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
4578
4579 * windows-nat.c (windows_clear_solib): Free so_list linked list.
4580
4581 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4582
4583 * MAINTAINERS (Write After Approval): Add myself.
4584
4585 2020-01-02 Luis Machado <luis.machado@linaro.org>
4586
4587 * proc-service.c (get_ps_regcache): Remove reference to obsolete
4588 Cell BE architecture.
4589 * target.h (struct target_ops) <thread_architecture>: Likewise.
4590
4591 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4592
4593 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4594
4595 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4596
4597 * MAINTAINERS (Write After Approval): Add myself.
4598
4599 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4600
4601 * gdbarch.sh: Update copyright year range of generated files.
4602
4603 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4604
4605 Update copyright year range in all GDB files.
4606
4607 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4608
4609 * copyright.py: Convert to Python 3.
4610
4611 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4612
4613 * copyright.py: Adapt after move of gnulib directory from gdb
4614 directory to toplevel directory.
4615
4616 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4617
4618 * copyright.py (main): Exit if run from the wrong directory.
4619
4620 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4621
4622 * top.c (print_gdb_version): Change copyright year to 2020.
4623
4624 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4625
4626 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
4627
4628 For older changes see ChangeLog-2019.
4629 \f
4630 Local Variables:
4631 mode: change-log
4632 left-margin: 8
4633 fill-column: 74
4634 version-control: never
4635 coding: utf-8
4636 End:
This page took 0.161059 seconds and 4 git commands to generate.