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