gdbserver/linux-low: turn '{collect, supply}_ptrace_register' into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
4 linux target ops into methods of linux_process_target.
5
6 * linux-low.h (struct linux_target_ops): Remove the ops.
7 (class linux_process_target) <low_collect_ptrace_register>
8 <low_store_ptrace_register>: Declare.
9 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
10 (linux_process_target::low_supply_ptrace_register): Define.
11
12 Update the callers below.
13
14 (linux_process_target::fetch_register)
15 (linux_process_target::store_register)
16
17 * linux-x86-low.cc (the_low_target): Remove the op fields.
18 * linux-aarch64-low.cc (the_low_target): Ditto.
19 * linux-arm-low.cc (the_low_target): Ditto.
20 * linux-bfin-low.cc (the_low_target): Ditto.
21 * linux-crisv32-low.cc (the_low_target): Ditto.
22 * linux-m32r-low.cc (the_low_target): Ditto.
23 * linux-m68k-low.cc (the_low_target): Ditto.
24 * linux-sh-low.cc (the_low_target): Ditto.
25 * linux-sparc-low.cc (the_low_target): Ditto.
26 * linux-tic6x-low.cc (the_low_target): Ditto.
27 * linux-tile-low.cc (the_low_target): Ditto.
28 * linux-xtensa-low.cc (the_low_target): Ditto.
29 * linux-mips-low.cc (class mips_target)
30 <low_collect_ptrace_register>
31 <low_supply_ptrace_register>: Declare.
32 (mips_collect_ptrace_register): Turn into ...
33 (mips_target::low_collect_ptrace_register): ...this.
34 (mips_supply_ptrace_register): Turn into...
35 (mips_target::low_supply_ptrace_register): ...this.
36 (the_low_target): Remove the op fields.
37 * linux-ppc-low.cc (class ppc_target)
38 <low_collect_ptrace_register>
39 <low_supply_ptrace_register>: Declare.
40 (ppc_collect_ptrace_register): Turn into ...
41 (ppc_target::low_collect_ptrace_register): ...this.
42 (ppc_supply_ptrace_register): Turn into ...
43 (ppc_target::low_supply_ptrace_register): ...this.
44 (ppc_fill_gregset): Update for the calls to
45 low_collect_ptrace_register.
46 (the_low_target): Remove the op fields.
47 * linux-s390-low.cc (class s390_target)
48 <low_collect_ptrace_register>
49 <low_supply_ptrace_register>: Declare.
50 (s390_collect_ptrace_register): Turn into ...
51 (s390_target::low_collect_ptrace_register): ...this.
52 (s390_supply_ptrace_register): Turn into ...
53 (s390_target::low_supply_ptrace_register): ...this.
54 (s390_fill_gregset): Update for the calls to
55 low_collect_ptrace_register.
56 (the_low_target): Remove the op fields.
57
58 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
59
60 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
61 target ops into methods of linux_process_target.
62
63 * linux-low.h (struct linux_target_ops): Remove the ops.
64 (class linux_process_target) <check_stopped_by_watchpoint>
65 <low_stopped_by_watchpoint>
66 <low_stopped_data_address>: Declare.
67 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
68 (linux_process_target::check_stopped_by_watchpoint): ...this.
69 (linux_process_target::low_stopped_by_watchpoint): Define.
70 (linux_process_target::low_stopped_data_address): Define.
71 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
72 <low_stopped_data_address>: Declare.
73 (x86_stopped_by_watchpoint): Turn into...
74 (x86_target::low_stopped_by_watchpoint): ...this.
75 (x86_stopped_data_address): Turn into...
76 (x86_target::low_stopped_data_address): ...this.
77 (the_low_target): Remove the op fields.
78 * linux-aarch64-low.cc (class aarch64_target)
79 <low_stopped_by_watchpoint>
80 <low_stopped_data_address>: Declare.
81 (aarch64_stopped_by_watchpoint): Turn into...
82 (aarch64_target::low_stopped_by_watchpoint): ...this.
83 (aarch64_stopped_data_address): Turn into...
84 (aarch64_target::low_stopped_data_address): ...this.
85 (the_low_target): Remove the op fields.
86 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
87 <low_stopped_data_address>: Declare.
88 (arm_stopped_by_watchpoint): Turn into...
89 (arm_target::low_stopped_by_watchpoint): ...this.
90 (arm_stopped_data_address): Turn into...
91 (arm_target::low_stopped_data_address): ...this.
92 (the_low_target): Remove the op fields.
93 * linux-crisv32-low.cc (class crisv32_target)
94 <low_stopped_by_watchpoint>
95 <low_stopped_data_address>: Declare.
96 (cris_stopped_by_watchpoint): Turn into...
97 (crisv32_target::low_stopped_by_watchpoint): ...this.
98 (cris_stopped_data_address): Turn into...
99 (crisv32_target::low_stopped_data_address): ...this.
100 (the_low_target): Remove the op fields.
101 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
102 <low_stopped_data_address>: Declare.
103 (mips_stopped_by_watchpoint): Turn into...
104 (mips_target::low_stopped_by_watchpoint): ...this.
105 (mips_stopped_data_address): Turn into...
106 (mips_target::low_stopped_data_address): ...this.
107 (the_low_target): Remove the op fields.
108 * linux-bfin-low.cc (the_low_target): Remove the op fields.
109 * linux-m32r-low.cc (the_low_target): Ditto.
110 * linux-m68k-low.cc (the_low_target): Ditto.
111 * linux-ppc-low.cc (the_low_target): Ditto.
112 * linux-s390-low.cc (the_low_target): Ditto.
113 * linux-sh-low.cc (the_low_target): Ditto.
114 * linux-sparc-low.cc (the_low_target): Ditto.
115 * linux-tic6x-low.cc (the_low_target): Ditto.
116 * linux-tile-low.cc (the_low_target): Ditto.
117 * linux-xtensa-low.cc (the_low_target): Ditto.
118
119 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
120
121 Turn the 'insert_point' and 'remove_point' linux target ops into
122 methods of linux_process_target.
123
124 * linux-low.h (struct linux_target_ops): Remove the ops.
125 (class linux_process_target) <low_insert_point>
126 <low_remove_point>: Declare.
127 * linux-low.cc (linux_process_target::low_insert_point)
128 (linux_process_target::low_remove_point): Define.
129 (linux_process_target::insert_point)
130 (linux_process_target::remove_point): Update for calls to
131 low_insert_point and low_remove_point.
132 * linux-x86-low.cc (class x86_target) <low_insert_point>
133 <low_remove_point>: Declare.
134 (x86_insert_point): Turn into...
135 (x86_target::low_insert_point): ...this.
136 (x86_remove_point): Turn into...
137 (x86_target::low_remove_point): ...this.
138 (the_low_target): Remove the op fields.
139 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
140 <low_remove_point>: Declare.
141 (aarch64_insert_point): Turn into...
142 (aarch64_target::low_insert_point): ...this.
143 (aarch64_remove_point): Turn into...
144 (aarch64_target::low_remove_point): ...this.
145 (the_low_target): Remove the op fields.
146 * linux-arm-low.cc (class arm_target) <low_insert_point>
147 <low_remove_point>: Declare.
148 (arm_insert_point): Turn into...
149 (arm_target::low_insert_point): ...this.
150 (arm_remove_point): Turn into...
151 (arm_target::low_remove_point): ...this.
152 (the_low_target): Remove the op fields.
153 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
154 <low_remove_point>: Declare.
155 (crisv32_insert_point): Turn into...
156 (crisv32_target::low_insert_point): ...this.
157 (crisv32_remove_point): Turn into...
158 (crisv32_target::low_remove_point): ...this.
159 (the_low_target): Remove the op fields.
160 * linux-mips-low.cc (class mips_target) <low_insert_point>
161 <low_remove_point>: Declare.
162 (mips_insert_point): Turn into...
163 (mips_target::low_insert_point): ...this.
164 (mips_remove_point): Turn into...
165 (mips_target::low_remove_point): ...this.
166 (the_low_target): Remove the op fields.
167 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
168 <low_remove_point>: Declare.
169 (ppc_insert_point): Turn into...
170 (ppc_target::low_insert_point): ...this.
171 (ppc_remove_point): Turn into...
172 (ppc_target::low_remove_point): ...this.
173 (the_low_target): Remove the op fields.
174 * linux-bfin-low.cc (the_low_target): Remove the op fields.
175 * linux-m32r-low.cc (the_low_target): Ditto.
176 * linux-m68k-low.cc (the_low_target): Ditto.
177 * linux-s390-low.cc (the_low_target): Ditto.
178 * linux-sh-low.cc (the_low_target): Ditto.
179 * linux-sparc-low.cc (the_low_target): Ditto.
180 * linux-tic6x-low.cc (the_low_target): Ditto.
181 * linux-tile-low.cc (the_low_target): Ditto.
182 * linux-xtensa-low.cc (the_low_target): Ditto.
183
184 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
185
186 Remove the 'supports_z_point_type' linux target op and let the
187 concrete linux target define it by overriding the op declared in
188 process_stratum_target.
189
190 * linux-low.cc (linux_process_target::supports_z_point_type):
191 Remove.
192 * linux-low.h (struct linux_target_ops): Remove the op.
193 (class linux_process_target) <supports_z_point_type>: Remove.
194 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
195 Declare.
196 (x86_supports_z_point_type): Turn into...
197 (x86_target::supports_z_point_type): ...this.
198 (the_low_target): Remove the op field.
199 * linux-aarch64-low.cc (class aarch64_target)
200 <supports_z_point_type>: Declare.
201 (aarch64_supports_z_point_type): Turn into...
202 (aarch64_target::supports_z_point_type): ...this.
203 (the_low_target): Remove the op field.
204 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
205 Declare.
206 (arm_supports_z_point_type): Turn into...
207 (arm_target::supports_z_point_type): ...this.
208 (the_low_target): Remove the op field.
209 * linux-crisv32-low.cc (class crisv32_target)
210 <supports_z_point_type>: Declare.
211 (cris_supports_z_point_type): Turn into...
212 (crisv32_target::supports_z_point_type): ...this.
213 (the_low_target): Remove the op field.
214 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
215 Declare.
216 (mips_supports_z_point_type): Turn into...
217 (mips_target::supports_z_point_type): ...this.
218 (the_low_target): Remove the op field.
219 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
220 Declare.
221 (ppc_supports_z_point_type): Turn into...
222 (ppc_target::supports_z_point_type): ...this.
223 (the_low_target): Remove the op field.
224 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
225 Declare.
226 (s390_supports_z_point_type): Turn into...
227 (s390_target::supports_z_point_type): ...this.
228 (the_low_target): Remove the op field.
229 * linux-bfin-low.cc (the_low_target): Remove the op field.
230 * linux-m32r-low.cc (the_low_target): Ditto.
231 * linux-m68k-low.cc (the_low_target): Ditto.
232 * linux-sh-low.cc (the_low_target): Ditto.
233 * linux-sparc-low.cc (the_low_target): Ditto.
234 * linux-tic6x-low.cc (the_low_target): Ditto.
235 * linux-tile-low.cc (the_low_target): Ditto.
236 * linux-xtensa-low.cc (the_low_target): Ditto.
237
238 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
239
240 Turn the 'breakpoint_at' linux target op into a method of
241 linux_process_target.
242
243 * linux-low.h (struct linux_target_ops): Remove the op.
244 (class linux_process_target) <low_breakpoint_at>: Declare.
245
246 Update the callers below:
247
248 * linux-low.cc (linux_process_target::save_stop_reason)
249 (linux_process_target::thread_still_has_status_pending)
250 (linux_process_target::wait_1)
251
252 * linux-x86-low.cc (class x86_target)
253 <low_breakpoint_at>: Declare.
254 (x86_breakpoint_at): Turn into...
255 (x86_target::low_breakpoint_at): ...this.
256 (the_low_target): Remove the op field.
257 * linux-aarch64-low.cc (class aarch64_target)
258 <low_breakpoint_at>: Declare.
259 (aarch64_breakpoint_at): Turn into...
260 (aarch64_target::low_breakpoint_at): ...this.
261 (the_low_target): Remove the op field.
262 * linux-arm-low.cc (class arm_target)
263 <low_breakpoint_at>: Declare.
264 (arm_target::low_breakpoint_at): Define.
265 (the_low_target): Remove the op field.
266 * linux-bfin-low.cc (class bfin_target)
267 <low_breakpoint_at>: Declare.
268 (bfin_breakpoint_at): Turn into...
269 (bfin_target::low_breakpoint_at): ...this.
270 (the_low_target): Remove the op field.
271 * linux-cris-low.cc (class cris_target)
272 <low_breakpoint_at>: Declare.
273 (cris_breakpoint_at): Turn into...
274 (cris_target::low_breakpoint_at): ...this.
275 (the_low_target): Remove the op field.
276 * linux-crisv32-low.cc (class crisv32_target)
277 <low_breakpoint_at>: Declare.
278 (crisv32_breakpoint_at): Turn into...
279 (crisv32_target::low_breakpoint_at): ...this.
280 (the_low_target): Remove the op field.
281 * linux-ia64-low.cc (class ia64_target)
282 <low_breakpoint_at>: Declare.
283 (ia64_target::low_breakpoint_at): Define.
284 * linux-m32r-low.cc (class m32r_target)
285 <low_breakpoint_at>: Declare.
286 (m32r_breakpoint_at): Turn into...
287 (m32r_target::low_breakpoint_at): ...this.
288 (the_low_target): Remove the op field.
289 * linux-m68k-low.cc (class m68k_target)
290 <low_breakpoint_at>: Declare.
291 (m68k_breakpoint_at): Turn into...
292 (m68k_target::low_breakpoint_at): ...this.
293 (the_low_target): Remove the op field.
294 * linux-mips-low.cc (class mips_target)
295 <low_breakpoint_at>: Declare.
296 (mips_breakpoint_at): Turn into...
297 (mips_target::low_breakpoint_at): ...this.
298 (the_low_target): Remove the op field.
299 * linux-nios2-low.cc (class nios2_target)
300 <low_breakpoint_at>: Declare.
301 (nios2_breakpoint_at): Turn into...
302 (nios2_target::low_breakpoint_at): ...this.
303 (the_low_target): Remove the op field.
304 * linux-ppc-low.cc (class ppc_target)
305 <low_breakpoint_at>: Declare.
306 (ppc_breakpoint_at): Turn into...
307 (ppc_target::low_breakpoint_at): ...this.
308 (the_low_target): Remove the op field.
309 * linux-riscv-low.cc (class riscv_target)
310 <low_breakpoint_at>: Declare.
311 (riscv_breakpoint_at): Turn into...
312 (riscv_target::low_breakpoint_at): ...this.
313 (the_low_target): Remove the op field.
314 * linux-s390-low.cc (class s390_target)
315 <low_breakpoint_at>: Declare.
316 (s390_breakpoint_at): Turn into...
317 (s390_target::low_breakpoint_at): ...this.
318 (the_low_target): Remove the op field.
319 * linux-sh-low.cc (class sh_target)
320 <low_breakpoint_at>: Declare.
321 (sh_breakpoint_at): Turn into...
322 (sh_target::low_breakpoint_at): ...this.
323 (the_low_target): Remove the op field.
324 * linux-sparc-low.cc (class sparc_target)
325 <low_breakpoint_at>: Declare.
326 (sparc_breakpoint_at): Turn into...
327 (sparc_target::low_breakpoint_at): ...this.
328 (the_low_target): Remove the op field.
329 * linux-tic6x-low.cc (class tic6x_target)
330 <low_breakpoint_at>: Declare.
331 (tic6x_breakpoint_at): Turn into...
332 (tic6x_target::low_breakpoint_at): ...this.
333 (the_low_target): Remove the op field.
334 * linux-tile-low.cc (class tile_target)
335 <low_breakpoint_at>: Declare.
336 (tile_breakpoint_at): Turn into...
337 (tile_target::low_breakpoint_at): ...this.
338 (the_low_target): Remove the op field.
339 * linux-xtensa-low.cc (class xtensa_target)
340 <low_breakpoint_at>: Declare.
341 (xtensa_breakpoint_at): Turn into...
342 (xtensa_target::low_breakpoint_at): ...this.
343 (the_low_target): Remove the op field.
344
345 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
346
347 Turn the 'decr_pc_after_break' linux_target_ops field into
348 a method of linux_process_target.
349
350 * linux-low.h (struct linux_target_ops)
351 <decr_pc_after_break>: Remove.
352 (class linux_process_target) <low_decr_pc_after_break>: New method
353 declaration.
354 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
355 New method implementation.
356
357 Update the users below.
358
359 (linux_process_target::save_stop_reason)
360 (linux_process_target::wait_1)
361 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
362 New declaration.
363 (x86_target::low_decr_pc_after_break): New method implementation.
364 (the_low_target): Remove the field.
365 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
366 New declaration.
367 (bfin_target::low_decr_pc_after_break): New method implementation.
368 (the_low_target): Remove the field.
369 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
370 New declaration.
371 (m68k_target::low_decr_pc_after_break): New method implementation.
372 (the_low_target): Remove the field.
373 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
374 New declaration.
375 (s390_target::low_decr_pc_after_break): New method implementation.
376 (the_low_target): Remove the field.
377 * linux-aarch64-low.cc (the_low_target): Remove the field.
378 * linux-arm-low.cc (the_low_target): Remove the field.
379 * linux-cris-low.cc (the_low_target): Remove the field.
380 * linux-crisv32-low.cc (the_low_target): Remove the field.
381 * linux-m32r-low.cc (the_low_target): Remove the field.
382 * linux-mips-low.cc (the_low_target): Remove the field.
383 * linux-nios2-low.cc (the_low_target): Remove the field.
384 * linux-ppc-low.cc (the_low_target): Remove the field.
385 * linux-riscv-low.cc (the_low_target): Remove the field.
386 * linux-sh-low.cc (the_low_target): Remove the field.
387 * linux-sparc-low.cc (the_low_target): Remove the field.
388 * linux-tic6x-low.cc (the_low_target): Remove the field.
389 * linux-tile-low.cc (the_low_target): Remove the field.
390 * linux-xtensa-low.cc (the_low_target): Remove the field.
391
392 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
393
394 Remove the 'supports_software_single_step' linux target op and let
395 the concrete linux target define it by overriding the op in
396 process_stratum_target.
397 Turn the 'get_next_pcs' linux target op into a method of
398 linux_process_target.
399
400 * linux-low.h (struct linux_target_ops): Remove the ops.
401 (class linux_process_target) <supports_software_single_step>:
402 Remove.
403 <low_get_next_pcs>: Declare.
404 * linux-low.cc (can_software_single_step): Remove.
405 (linux_process_target::low_get_next_pcs): Define.
406 (linux_process_target::supports_software_single_step): Remove.
407
408 Update the callers below.
409
410 (linux_process_target::handle_extended_wait)
411 (linux_process_target::wait_1)
412 (linux_process_target::install_software_single_step_breakpoints)
413 (linux_process_target::single_step)
414 (linux_process_target::thread_needs_step_over)
415 (linux_process_target::proceed_one_lwp)
416 (linux_process_target::supports_range_stepping)
417
418 * linux-x86-low.cc (the_low_target): Remove the op field.
419 * linux-aarch64-low.cc (the_low_target): Ditto.
420 * linux-bfin-low.cc (the_low_target): Ditto.
421 * linux-cris-low.cc (the_low_target): Ditto.
422 * linux-crisv32-low.cc (the_low_target): Ditto.
423 * linux-m32r-low.cc (the_low_target): Ditto.
424 * linux-m68k-low.cc (the_low_target): Ditto.
425 * linux-mips-low.cc (the_low_target): Ditto.
426 * linux-nios2-low.cc (the_low_target): Ditto.
427 * linux-ppc-low.cc (the_low_target): Ditto.
428 * linux-riscv-low.cc (the_low_target): Ditto.
429 * linux-s390-low.cc (the_low_target): Ditto.
430 * linux-sh-low.cc (the_low_target): Ditto.
431 * linux-sparc-low.cc (the_low_target): Ditto.
432 * linux-tic6x-low.cc (the_low_target): Ditto.
433 * linux-tile-low.cc (the_low_target): Ditto.
434 * linux-xtensa-low.cc (the_low_target): Ditto.
435 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
436 <supports_software_single_step>: Declare.
437 (arm_target::supports_software_single_step): Define.
438 (arm_gdbserver_get_next_pcs): Turn into...
439 (arm_target::low_get_next_pcs): ...this.
440 (the_low_target): Remove the op field.
441
442 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
443
444 Remove the 'sw_breakpoint_from_kind' linux target op, and let
445 the concrete linux target define it by overriding the op
446 in process_stratum_target.
447
448 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
449 Remove.
450 * linux-low.h (struct linux_target_ops): Remove the op.
451 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
452 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
453 Declare.
454 (x86_sw_breakpoint_from_kind): Turn into...
455 (x86_target::sw_breakpoint_from_kind): ...this.
456 (the_low_target): Remove the op field.
457 * linux-aarch64-low.cc (class aarch64_target)
458 <sw_breakpoint_from_kind>: Declare.
459 (aarch64_sw_breakpoint_from_kind): Turn into...
460 (aarch64_target::sw_breakpoint_from_kind): ...this.
461 (the_low_target): Remove the op field.
462 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
463 Declare.
464 (arm_target::sw_breakpoint_from_kind): Define.
465 (the_low_target): Remove the op field.
466 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
467 Declare.
468 (bfin_sw_breakpoint_from_kind): Turn into...
469 (bfin_target::sw_breakpoint_from_kind): ...this.
470 (the_low_target): Remove the op field.
471 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
472 Declare.
473 (cris_sw_breakpoint_from_kind): Turn into...
474 (cris_target::sw_breakpoint_from_kind): ...this.
475 (the_low_target): Remove the op field.
476 * linux-crisv32-low.cc (class crisv32_target)
477 <sw_breakpoint_from_kind>: Declare.
478 (cris_sw_breakpoint_from_kind): Turn into...
479 (crisv32_target::sw_breakpoint_from_kind): ...this.
480 (the_low_target): Remove the op field.
481 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
482 Declare.
483 (ia64_target::sw_breakpoint_from_kind): Define.
484 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
485 Declare.
486 (m32r_sw_breakpoint_from_kind): Turn into...
487 (m32r_target::sw_breakpoint_from_kind): ...this.
488 (the_low_target): Remove the op field.
489 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
490 Declare.
491 (m68k_sw_breakpoint_from_kind): Turn into...
492 (m68k_target::sw_breakpoint_from_kind): ...this.
493 (the_low_target): Remove the op field.
494 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
495 Declare.
496 (mips_sw_breakpoint_from_kind): Turn into...
497 (mips_target::sw_breakpoint_from_kind): ...this.
498 (the_low_target): Remove the op field.
499 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
500 Declare.
501 (nios2_sw_breakpoint_from_kind): Turn into...
502 (nios2_target::sw_breakpoint_from_kind): ...this.
503 (the_low_target): Remove the op field.
504 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
505 Declare.
506 (ppc_sw_breakpoint_from_kind): Turn into...
507 (ppc_target::sw_breakpoint_from_kind): ...this.
508 (the_low_target): Remove the op field.
509 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
510 Declare.
511 (riscv_sw_breakpoint_from_kind): Turn into...
512 (riscv_target::sw_breakpoint_from_kind): ...this.
513 (the_low_target): Remove the op field.
514 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
515 Declare.
516 (s390_sw_breakpoint_from_kind): Turn into...
517 (s390_target::sw_breakpoint_from_kind): ...this.
518 (the_low_target): Remove the op field.
519 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
520 Declare.
521 (sh_sw_breakpoint_from_kind): Turn into...
522 (sh_target::sw_breakpoint_from_kind): ...this.
523 (the_low_target): Remove the op field.
524 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
525 Declare.
526 (sparc_sw_breakpoint_from_kind): Turn into...
527 (sparc_target::sw_breakpoint_from_kind): ...this.
528 (the_low_target): Remove the op field.
529 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
530 Declare.
531 (tic6x_sw_breakpoint_from_kind): Turn into...
532 (tic6x_target::sw_breakpoint_from_kind): ...this.
533 (the_low_target): Remove the op field.
534 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
535 Declare.
536 (tile_sw_breakpoint_from_kind): Turn into...
537 (tile_target::sw_breakpoint_from_kind): ...this.
538 (the_low_target): Remove the op field.
539 * linux-xtensa-low.cc (class xtensa_target)
540 <sw_breakpoint_from_kind>: Declare.
541 (xtensa_sw_breakpoint_from_kind): Turn into...
542 (xtensa_target::sw_breakpoint_from_kind): ...this.
543 (the_low_target): Remove the op field.
544
545 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
546
547 Remove the 'breakpoint_kind_from_pc' and
548 'breakpoint_kind_from_current_state' linux target ops, and let the
549 concrete linux target define them by overriding the ops of
550 process_stratum_target.
551
552 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
553 Remove.
554 (linux_process_target::breakpoint_kind_from_current_state): Remove.
555 * linux-low.h (struct linux_target_ops): Remove ops.
556 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
557 <breakpoint_kind_from_current_state>: Remove.
558 * linux-x86-low.cc (the_low_target): Remove the op fields.
559 * linux-bfin-low.cc (the_low_target): Ditto.
560 * linux-cris-low.cc (the_low_target): Ditto.
561 * linux-crisv32-low.cc (the_low_target): Ditto.
562 * linux-m32r-low.cc (the_low_target): Ditto.
563 * linux-m68k-low.cc (the_low_target): Ditto.
564 * linux-mips-low.cc (the_low_target): Ditto.
565 * linux-nios2-low.cc (the_low_target): Ditto.
566 * linux-ppc-low.cc (the_low_target): Ditto.
567 * linux-s390-low.cc (the_low_target): Ditto.
568 * linux-sh-low.cc (the_low_target): Ditto.
569 * linux-sparc-low.cc (the_low_target): Ditto.
570 * linux-tic6x-low.cc (the_low_target): Ditto.
571 * linux-tile-low.cc (the_low_target): Ditto.
572 * linux-xtensa-low.cc (the_low_target): Ditto.
573 * linux-aarch64-low.cc (class aarch64_target)
574 <breakpoint_kind_from_pc>
575 <breakpoint_kind_from_current_state>: Declare.
576 (aarch64_breakpoint_kind_from_pc): Turn into...
577 (aarch64_target::breakpoint_kind_from_pc): ...this.
578 (aarch64_breakpoint_kind_from_current_state): Turn into...
579 (aarch64_target::breakpoint_kind_from_current_state): ...this.
580 (the_low_target): Remove the op fields.
581 * linux-arm-low.cc (class arm_target):
582 <breakpoint_kind_from_pc>
583 <breakpoint_kind_from_current_state>: Declare.
584 (arm_target::breakpoint_kind_from_pc): Define.
585 (arm_target::breakpoint_kind_from_current_state): Define.
586 (the_low_target): Remove the op fields.
587 * linux-riscv-low.cc (class riscv_target):
588 <breakpoint_kind_from_pc>: Declare.
589 (riscv_breakpoint_kind_from_pc): Turn into...
590 (riscv_target::breakpoint_kind_from_pc): ...this.
591 (the_low_target): Remove the op fields.
592
593 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
594
595 Turn the 'get_pc' and 'set_pc' linux target ops into methods
596 of linux_process_target.
597
598 * linux-low.h (struct linux_target_ops): Remove the ops.
599 (class linux_process_target) <low_supports_breakpoints>
600 <low_get_pc>
601 <low_set_pc>: Declare.
602 * linux-low.cc (supports_breakpoints): Turn into...
603 (linux_process_target::low_supports_breakpoints): ...this.
604 (linux_process_target::low_get_pc): Define.
605 (linux_process_target::low_set_pc): Define.
606
607 Update the callers below.
608
609 (linux_process_target::get_pc)
610 (linux_process_target::save_stop_reason)
611 (linux_process_target::maybe_move_out_of_jump_pad)
612 (linux_process_target::wait_1)
613 (linux_process_target::resume_one_lwp_throw)
614 (linux_process_target::resume)
615 (linux_process_target::proceed_all_lwps)
616 (linux_process_target::read_pc)
617 (linux_process_target::write_pc)
618
619 * linux-x86-low.cc (class linux_process_target)
620 <low_supports_breakpoints>
621 <low_get_pc>
622 <low_set_pc>: Declare.
623 (x86_target::low_supports_breakpoints): Define.
624 (x86_get_pc): Turn into...
625 (x86_target::low_get_pc): ...this.
626 (x86_set_pc): Turn into...
627 (x86_target::low_set_pc): ...this.
628 (the_low_target): Remove the op fields.
629 * linux-arm-low.cc (class arm_target)
630 <low_supports_breakpoints>
631 <low_get_pc>
632 <low_set_pc>: Declare.
633 (arm_target::low_supports_breakpoints)
634 (arm_target::low_get_pc)
635 (arm_target::low_set_pc): Define.
636 (the_low_target): Remove the op fields.
637 * linux-bfin-low.cc (class bfin_target)
638 <low_supports_breakpoints>
639 <low_get_pc>
640 <low_set_pc>: Declare.
641 (bfin_target::low_supports_breakpoints)
642 (bfin_target::low_get_pc)
643 (bfin_target::low_set_pc): Define.
644 (the_low_target): Remove the op fields.
645 * linux-cris-low.cc (class cris_target)
646 <low_supports_breakpoints>
647 <low_get_pc>
648 <low_set_pc>: Declare.
649 (cris_target::low_supports_breakpoints)
650 (cris_target::low_get_pc)
651 (cris_target::low_set_pc): Define.
652 (the_low_target): Remove the op fields.
653 * linux-crisv32-low.cc (class crisv32_target)
654 <low_supports_breakpoints>
655 <low_get_pc>
656 <low_set_pc>: Declare.
657 (crisv32_target::low_supports_breakpoints)
658 (crisv32_target::low_get_pc)
659 (crisv32_target::low_set_pc): Define.
660 (the_low_target): Remove the op fields.
661 * linux-m32r-low.cc (class m32r_target)
662 <low_supports_breakpoints>
663 <low_get_pc>
664 <low_set_pc>: Declare.
665 (m32r_target::low_supports_breakpoints)
666 (m32r_target::low_get_pc)
667 (m32r_target::low_set_pc): Define.
668 (the_low_target): Remove the op fields.
669 * linux-m68k-low.cc (class m68k_target)
670 <low_supports_breakpoints>
671 <low_get_pc>
672 <low_set_pc>: Declare.
673 (m68k_target::low_supports_breakpoints)
674 (m68k_target::low_get_pc)
675 (m68k_target::low_set_pc): Define.
676 (the_low_target): Remove the op fields.
677 * linux-nios2-low.cc (class nios2_target)
678 <low_supports_breakpoints>
679 <low_get_pc>
680 <low_set_pc>: Declare.
681 (nios2_target::low_supports_breakpoints)
682 (nios2_target::low_get_pc)
683 (nios2_target::low_set_pc): Define.
684 (the_low_target): Remove the op fields.
685 * linux-sh-low.cc (class sh_target)
686 <low_supports_breakpoints>
687 <low_get_pc>
688 <low_set_pc>: Declare.
689 (sh_target::low_supports_breakpoints)
690 (sh_target::low_get_pc)
691 (sh_target::low_set_pc): Define.
692 (the_low_target): Remove the op fields.
693 * linux-xtensa-low.cc (class xtensa_target)
694 <low_supports_breakpoints>
695 <low_get_pc>
696 <low_set_pc>: Declare.
697 (xtensa_target::low_supports_breakpoints)
698 (xtensa_target::low_get_pc)
699 (xtensa_target::low_set_pc): Define.
700 (the_low_target): Remove the op fields.
701 * linux-sparc-low.cc (class sparc_target)
702 <low_supports_breakpoints>
703 <low_get_pc>: Declare.
704 (sparc_target::low_supports_breakpoints)
705 (sparc_target::low_get_pc): Define.
706 (the_low_target): Remove the op fields.
707 * linux-tile-low.cc (class tile_target)
708 <low_supports_breakpoints>
709 <low_get_pc>
710 <low_set_pc>: Declare.
711 (tile_target::low_supports_breakpoints)
712 (tile_target::low_get_pc)
713 (tile_target::low_set_pc): Define.
714 (the_low_target): Remove the op fields.
715 * linux-aarch64-low.cc (class aarch64_target)
716 <low_supports_breakpoints>
717 <low_get_pc>
718 <low_set_pc>: Declare.
719 (aarch64_target::low_supports_breakpoints): Define.
720 (aarch64_get_pc): Turn into...
721 (aarch64_target::low_get_pc): ...this.
722 (aarch64_set_pc): Turn into...
723 (aarch64_target::low_set_pc): ...this.
724 (the_low_target): Remove the op fields.
725 * linux-mips-low.cc (class mips_target)
726 <low_supports_breakpoints>
727 <low_get_pc>
728 <low_set_pc>: Declare.
729 (mips_target::low_supports_breakpoints): Define.
730 (mips_get_pc): Turn into...
731 (mips_target::low_get_pc): ...this.
732 (mips_set_pc): Turn into...
733 (mips_target::low_set_pc): ...this.
734 (the_low_target): Remove the op fields.
735 * linux-ppc-low.cc (class ppc_target)
736 <low_supports_breakpoints>
737 <low_get_pc>
738 <low_set_pc>: Declare.
739 (ppc_target::low_supports_breakpoints): Define.
740 (ppc_get_pc): Turn into...
741 (ppc_target::low_get_pc): ...this.
742 (ppc_set_pc): Turn into...
743 (ppc_target::low_set_pc): ...this.
744 (the_low_target): Remove the op fields.
745 * linux-riscv-low.cc (class riscv_target)
746 <low_supports_breakpoints>
747 <low_get_pc>
748 <low_set_pc>: Declare.
749 (riscv_target::low_supports_breakpoints): Define.
750 (riscv_get_pc): Turn into...
751 (riscv_target::low_get_pc): ...this.
752 (riscv_set_pc): Turn into...
753 (riscv_target::low_set_pc): ...this.
754 (the_low_target): Remove the op fields.
755 * linux-s390-low.cc (class s390_target)
756 <low_supports_breakpoints>
757 <low_get_pc>
758 <low_set_pc>: Declare.
759 (s390_target::low_supports_breakpoints): Define.
760 (s390_get_pc): Turn into...
761 (s390_target::low_get_pc): ...this.
762 (s390_set_pc): Turn into...
763 (s390_target::low_set_pc): ...this.
764 (the_low_target): Remove the op fields.
765 * linux-tic6x-low.cc (class tic6x_target)
766 <low_supports_breakpoints>
767 <low_get_pc>
768 <low_set_pc>: Declare.
769 (tic6x_target::low_supports_breakpoints): Define.
770 (tic6x_get_pc): Turn into...
771 (tic6x_target::low_get_pc): ...this.
772 (tic6x_set_pc): Turn into...
773 (tic6x_target::low_set_pc): ...this.
774 (the_low_target): Remove the op fields.
775
776 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
777
778 Turn some more static methods in linux-low into private methods
779 of linux_process_target.
780
781 * linux-low.cc (get_pc): Turn into...
782 (linux_process_target::get_pc): ...this.
783 (save_stop_reason): Turn into...
784 (linux_process_target::save_stop_reason): ...this.
785 (thread_still_has_status_pending_p): Turn into...
786 (linux_process_target::thread_still_has_status_pending): ...this.
787 (status_pending_p_callback): Turn into...
788 (linux_process_target::status_pending_p_callback): ...this.
789 (resume_stopped_resumed_lwps): Turn into...
790 (linux_process_target::resume_stopped_resumed_lwps): ...this.
791 (install_software_single_step_breakpoints): Turn into...
792 (linux_process_target::install_software_single_step_breakpoints):
793 ...this.
794 (single_step): Turn into...
795 (linux_process_target::single_step): ...this.
796 (linux_resume_one_lwp_throw): Turn into...
797 (linux_process_target::resume_one_lwp_throw): ...this.
798 (linux_resume_one_lwp): Turn into...
799 (linux_process_target::resume_one_lwp): ...this.
800 (resume_status_pending_p): Turn into...
801 (linux_process_target::resume_status_pending): ...this.
802 (need_step_over_p): Turn into...
803 (linux_process_target::thread_needs_step_over): ...this.
804 (linux_resume_one_thread): Turn into...
805 (linux_process_target::resume_one_thread): ...this.
806 (proceed_one_lwp): Turn into...
807 (linux_process_target::proceed_one_lwp): ...this.
808 (unsuspend_and_proceed_one_lwp): Turn into...
809 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
810
811 Update the calls/references to the above functions below.
812
813 (linux_process_target::handle_extended_wait)
814 (linux_process_target::filter_event)
815 (linux_process_target::wait_for_event_filtered)
816 (linux_process_target::wait_1)
817 (linux_process_target::move_out_of_jump_pad)
818 (linux_process_target::start_step_over)
819 (linux_process_target::resume)
820 (linux_process_target::proceed_all_lwps)
821 (regsets_store_inferior_registers)
822 (linux_process_target::store_register)
823
824 * linux-low.h (class linux_process_target)
825 <get_pc>
826 <save_stop_reason>
827 <thread_still_has_status_pending>
828 <status_pending_p_callback>
829 <resume_stopped_resumed_lwps>
830 <install_software_single_step_breakpoints>
831 <single_step>
832 <resume_one_lwp_throw>
833 <resume_one_lwp>
834 <resume_status_pending>
835 <thread_needs_step_over>
836 <resume_one_thread>
837 <proceed_one_lwp>
838 <unsuspend_and_proceed_one_lwp>: Declare.
839
840 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
841
842 Turn the 'fetch_register' linux target op into a method of
843 linux_process_target.
844
845 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
846 (class linux_process_target) <low_fetch_register>: Declare.
847 * linux-x86-low.cc (the_low_target)
848 * linux-aarch64-low.cc (the_low_target)
849 * linux-arm-low.cc (the_low_target)
850 * linux-bfin-low.cc (the_low_target)
851 * linux-cris-low.cc (the_low_target)
852 * linux-crisv32-low.cc (the_low_target)
853 * linux-m32r-low.cc (the_low_target)
854 * linux-m68k-low.cc (the_low_target)
855 * linux-nios2-low.cc (the_low_target)
856 * linux-ppc-low.cc (the_low_target)
857 * linux-s390-low.cc (the_low_target)
858 * linux-sh-low.cc (the_low_target)
859 * linux-sparc-low.cc (the_low_target)
860 * linux-tic6x-low.cc (the_low_target)
861 * linux-tile-low.cc (the_low_target)
862 * linux-xtensa-low.cc (the_low_target): Remove the op field.
863 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
864 Declare.
865 (ia64_fetch_register): Turn into...
866 (ia64_target::low_fetch_register): ...this.
867 (the_low_target): Remove the op field.
868 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
869 Declare.
870 (mips_fetch_register): Turn into...
871 (mips_target::low_fetch_register): ...this.
872 (the_low_target): Remove the op field.
873 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
874 Declare.
875 (riscv_fetch_register): Turn into...
876 (riscv_target::low_fetch_register): ...this.
877 (the_low_target): Remove the op field.
878
879 Update the callers below.
880
881 * linux-low.cc (linux_process_target::fetch_registers)
882 (linux_process_target::low_fetch_register)
883
884 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
885
886 Turn the 'cannot_fetch_register' and 'cannot_store_register'
887 linux target ops into methods of linux_process_target.
888
889 * linux-low.h (struct linux_target_ops): Remove the low target ops.
890 (class linux_process_target) <fetch_register>
891 <store_register>
892 <usr_fetch_inferior_registers>
893 <usr_store_inferior_registers>
894 <low_cannot_fetch_register>
895 <low_cannot_fetch_register> Declare.
896 * linux-low.cc (fetch_register): Turn into...
897 (linux_process_target::fetch_register): ...this.
898 (store_register): Turn into ...
899 (linux_process_target::store_register): ...this.
900 (usr_fetch_inferior_registers): Turn into...
901 (linux_process_target::usr_fetch_inferior_registers): ...this.
902 (usr_store_inferior_registers): Turn into...
903 (linux_process_target::usr_store_inferior_registers): ...this.
904 * linux-x86-low.cc (class x86_target)
905 <low_cannot_fetch_register>
906 <low_cannot_store_register>: Declare.
907 (x86_cannot_store_register): Turn into...
908 (x86_target::low_cannot_store_register): ...this.
909 (x86_cannot_fetch_register): Turn into...
910 (x86_target::low_cannot_fetch_register): ...this.
911 (the_low_target): Remove the target op fields.
912 * linux-aarch64-low.cc (class aarch64_target)
913 <low_cannot_fetch_register>
914 <low_cannot_store_register>: Declare.
915 (aarch64_target::low_cannot_fetch_register)
916 (aarch64_target::low_cannot_store_register): Define.
917 (the_low_target): Remove the op fields.
918 * linux-arm-low.cc (class arm_target)
919 <low_cannot_fetch_register>
920 <low_cannot_store_register>: Declare.
921 (arm_cannot_fetch_register): Turn into...
922 (arm_target::low_cannot_fetch_register): ...this.
923 (arm_cannot_store_register): Turn into...
924 (arm_target::low_cannot_store_register): ...this.
925 (the_low_target): Remove the op fields.
926 * linux-bfin-low.cc (class bfin_target)
927 <low_cannot_fetch_register>
928 <low_cannot_store_register>: Declare.
929 (bfin_cannot_fetch_register): Turn into...
930 (bfin_target::low_cannot_fetch_register): ...this.
931 (bfin_cannot_store_register): Turn into...
932 (bfin_target::low_cannot_store_register): ...this.
933 (the_low_target): Remove the op fields.
934 * linux-cris-low.cc (class cris_target)
935 <low_cannot_fetch_register>
936 <low_cannot_store_register>: Declare.
937 (cris_cannot_fetch_register): Turn into...
938 (cris_target::low_cannot_fetch_register): ...this.
939 (cris_cannot_store_register): Turn into...
940 (cris_target::low_cannot_store_register): ...this.
941 (the_low_target): Remove the op fields.
942 * linux-crisv32-low.cc (class crisv32_target)
943 <low_cannot_fetch_register>
944 <low_cannot_store_register>: Declare.
945 (crisv32_target::low_cannot_fetch_register)
946 (crisv32_target::low_cannot_store_register): Define.
947 (the_low_target): Remove the op fields.
948 * linux-ia64-low.cc (class ia64_target)
949 <low_cannot_fetch_register>
950 <low_cannot_store_register>: Declare.
951 (ia64_cannot_fetch_register): Turn into...
952 (ia64_target::low_cannot_fetch_register): ...this.
953 (ia64_cannot_store_register): Turn into...
954 (ia64_target::low_cannot_store_register): ...this.
955 (the_low_target): Remove the op fields.
956 * linux-m32r-low.cc (class m32r_target)
957 <low_cannot_fetch_register>
958 <low_cannot_store_register>: Declare.
959 (m32r_cannot_fetch_register): Turn into...
960 (m32r_target::low_cannot_fetch_register): ...this.
961 (m32r_cannot_store_register): Turn into...
962 (m32r_target::low_cannot_store_register): ...this.
963 (the_low_target): Remove the op fields.
964 * linux-m68k-low.cc (class m68k_target)
965 <low_cannot_fetch_register>
966 <low_cannot_store_register>: Declare.
967 (m68k_cannot_fetch_register): Turn into...
968 (m68k_target::low_cannot_fetch_register): ...this.
969 (m68k_cannot_store_register): Turn into...
970 (m68k_target::low_cannot_store_register): ...this.
971 (the_low_target): Remove the op fields.
972 * linux-mips-low.cc (class mips_target)
973 <low_cannot_fetch_register>
974 <low_cannot_store_register>: Declare.
975 (mips_cannot_fetch_register): Turn into...
976 (mips_target::low_cannot_fetch_register): ...this.
977 (mips_cannot_store_register): Turn into...
978 (mips_target::low_cannot_store_register): ...this.
979 (get_usrregs_info): Inline at the call sites in
980 low_cannot_fetch_register and low_cannot_store_register,
981 and remove.
982 (the_low_target): Remove the op fields.
983 * linux-nios2-low.cc (class nios2_target)
984 <low_cannot_fetch_register>
985 <low_cannot_store_register>: Declare.
986 (nios2_cannot_fetch_register): Turn into...
987 (nios2_target::low_cannot_fetch_register): ...this.
988 (nios2_cannot_store_register): Turn into...
989 (nios2_target::low_cannot_store_register): ...this.
990 (the_low_target): Remove the op fields.
991 * linux-ppc-low.cc (class ppc_target)
992 <low_cannot_fetch_register>
993 <low_cannot_store_register>: Declare.
994 (ppc_cannot_fetch_register): Turn into...
995 (ppc_target::low_cannot_fetch_register): ...this.
996 (ppc_cannot_store_register): Turn into...
997 (ppc_target::low_cannot_store_register): ...this.
998 (the_low_target): Remove the op fields.
999 * linux-riscv-low.cc (class riscv_target)
1000 <low_cannot_fetch_register>
1001 <low_cannot_store_register>: Declare.
1002 (riscv_target::low_cannot_fetch_register)
1003 (riscv_target::low_cannot_store_register): Define.
1004 (the_low_target): Remove the op fields.
1005 * linux-s390-low.cc (class s390_target)
1006 <low_cannot_fetch_register>
1007 <low_cannot_store_register>: Declare.
1008 (s390_cannot_fetch_register): Turn into...
1009 (s390_target::low_cannot_fetch_register): ...this.
1010 (s390_cannot_store_register): Turn into...
1011 (s390_target::low_cannot_store_register): ...this.
1012 (the_low_target): Remove the op fields.
1013 * linux-sh-low.cc (class sh_target)
1014 <low_cannot_fetch_register>
1015 <low_cannot_store_register>: Declare.
1016 (sh_cannot_fetch_register): Turn into...
1017 (sh_target::low_cannot_fetch_register): ...this.
1018 (sh_cannot_store_register): Turn into...
1019 (sh_target::low_cannot_store_register): ...this.
1020 (the_low_target): Remove the op fields.
1021 * linux-sparc-low.cc (class sparc_target)
1022 <low_cannot_fetch_register>
1023 <low_cannot_store_register>: Declare.
1024 (sparc_cannot_fetch_register): Turn into...
1025 (sparc_target::low_cannot_fetch_register): ...this.
1026 (sparc_cannot_store_register): Turn into...
1027 (sparc_target::low_cannot_store_register): ...this.
1028 (the_low_target): Remove the op fields.
1029 * linux-tic6x-low.cc (class tic6x_target)
1030 <low_cannot_fetch_register>
1031 <low_cannot_store_register>: Declare.
1032 (tic6x_cannot_fetch_register): Turn into...
1033 (tic6x_target::low_cannot_fetch_register): ...this.
1034 (tic6x_cannot_store_register): Turn into...
1035 (tic6x_target::low_cannot_store_register): ...this.
1036 (the_low_target): Remove the op fields.
1037 * linux-tile-low.cc (class tile_target)
1038 <low_cannot_fetch_register>
1039 <low_cannot_store_register>: Declare.
1040 (tile_cannot_fetch_register): Turn into...
1041 (tile_target::low_cannot_fetch_register): ...this.
1042 (tile_cannot_store_register): Turn into...
1043 (tile_target::low_cannot_store_register): ...this.
1044 (the_low_target): Remove the op fields.
1045 * linux-xtensa-low.cc (class xtensa_target)
1046 <low_cannot_fetch_register>
1047 <low_cannot_store_register>: Declare.
1048 (xtensa_target::low_cannot_fetch_register)
1049 (xtensa_target::low_cannot_store_register): Define.
1050 (the_low_target): Remove the op fields.
1051
1052 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1053
1054 Turn the 'regs_info' linux target op into a method of
1055 linux_process_target.
1056
1057 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1058 (class linux_process_target) <get_regs_info>: Define.
1059
1060 Update the callers below.
1061
1062 * linux-low.cc (linux_process_target::fetch_registers)
1063 (linux_process_target::store_registers)
1064 * proc-service.cc (gregset_info)
1065
1066 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1067 (x86_linux_regs_info): Turn into ...
1068 (x86_target::get_regs_info): ...this.
1069 (the_low_target): Remove the op field.
1070 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1071 Declare.
1072 (aarch64_regs_info): Turn into ...
1073 (aarch64_target::get_regs_info): ...this.
1074 (the_low_target): Remove the op field.
1075 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1076 (arm_regs_info): Turn into ...
1077 (arm_target::get_regs_info): ...this.
1078 (the_low_target): Remove the op field.
1079 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1080 (bfin_regs_info): Turn into ...
1081 (bfin_target::get_regs_info): ...this.
1082 (the_low_target): Remove the op field.
1083 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1084 (cris_regs_info): Turn into ...
1085 (cris_target::get_regs_info): ...this.
1086 (the_low_target): Remove the op field.
1087 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1088 Declare.
1089 (crisv32_regs_info): Turn into ...
1090 (crisv32_target::get_regs_info): ...this.
1091 (the_low_target): Remove the op field.
1092 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1093 (ia64_regs_info): Turn into ...
1094 (ia64_target::get_regs_info): ...this.
1095 (the_low_target): Remove the op field.
1096 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1097 (m32r_regs_info): Turn into ...
1098 (m32r_target::get_regs_info): ...this.
1099 (the_low_target): Remove the op field.
1100 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1101 (m68k_regs_info): Turn into ...
1102 (m68k_target::get_regs_info): ...this.
1103 (the_low_target): Remove the op field.
1104 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1105 (mips_regs_info): Turn into ...
1106 (mips_target::get_regs_info): ...this.
1107 (the_low_target): Remove the op field.
1108 (get_usrregs_info): Update the call to the op.
1109 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1110 (nios2_regs_info): Turn into ...
1111 (nios2_target::get_regs_info): ...this.
1112 (the_low_target): Remove the op field.
1113 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1114 (ppc_regs_info): Turn into ...
1115 (ppc_target::get_regs_info): ...this.
1116 (the_low_target): Remove the op field.
1117 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1118 (riscv_regs_info): Turn into ...
1119 (riscv_target::get_regs_info): ...this.
1120 (the_low_target): Remove the op field.
1121 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1122 (s390_regs_info): Turn into ...
1123 (s390_target::get_regs_info): ...this.
1124 (the_low_target): Remove the op field.
1125 (s390_collect_ptrace_register)
1126 (s390_supply_ptrace_register)
1127 (s390_fill_gregset): Update the call to the op.
1128 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1129 (sh_regs_info): Turn into ...
1130 (sh_target::get_regs_info): ...this.
1131 (the_low_target): Remove the op field.
1132 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1133 (sparc_regs_info): Turn into ...
1134 (sparc_target::get_regs_info): ...this.
1135 (the_low_target): Remove the op field.
1136 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1137 (tic6x_regs_info): Turn into ...
1138 (tic6x_target::get_regs_info): ...this.
1139 (the_low_target): Remove the op field.
1140 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1141 (tile_regs_info): Turn into ...
1142 (tile_target::get_regs_info): ...this.
1143 (the_low_target): Remove the op field.
1144 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1145 Declare.
1146 (xtensa_regs_info): Turn into ...
1147 (xtensa_target::get_regs_info): ...this.
1148 (the_low_target): Remove the op field.
1149
1150 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1151
1152 Turn the 'arch_setup' linux target op into a method of
1153 linux_process_target.
1154
1155 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1156 (class linux_process_target) <arch_setup_thread>
1157 <low_arch_setup>: New declarations.
1158 * linux-low.cc (linux_arch_setup): Delete.
1159 (linux_arch_setup_thread): Turn into...
1160 (linux_process_target::arch_setup_thread): ... this.
1161
1162 Update the callers below.
1163
1164 (linux_process_target::handle_extended_wait)
1165 (linux_process_target::post_create_inferior)
1166 (linux_process_target::filter_event)
1167
1168 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1169 declaration.
1170 (x86_linux_update_xmltarget): Turn into...
1171 (x86_target::update_xmltarget): ...this.
1172 (x86_linux_process_qsupported): Update the call to
1173 x86_linux_update_xmltarget.
1174 (x86_arch_setup): Turn into ...
1175 (x86_target::low_arch_setup): ...this.
1176 (the_low_target): Remove the op field.
1177 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1178 declaration.
1179 (aarch64_arch_setup): Turn into ...
1180 (aarch64_target::low_arch_setup): ...this.
1181 (the_low_target): Remove the op field.
1182 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1183 declaration.
1184 (arm_arch_setup): Turn into ...
1185 (arm_target::low_arch_setup): ...this.
1186 (the_low_target): Remove the op field.
1187 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1188 declaration.
1189 (bfin_arch_setup): Turn into ...
1190 (bfin_target::low_arch_setup): ...this.
1191 (the_low_target): Remove the op field.
1192 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1193 declaration.
1194 (cris_arch_setup): Turn into ...
1195 (cris_target::low_arch_setup): ...this.
1196 (the_low_target): Remove the op field.
1197 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1198 declaration.
1199 (crisv32_arch_setup): Turn into ...
1200 (crisv32_target::low_arch_setup): ...this.
1201 (the_low_target): Remove the op field.
1202 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1203 declaration.
1204 (ia64_arch_setup): Turn into ...
1205 (ia64_target::low_arch_setup): ...this.
1206 (the_low_target): Remove the op field.
1207 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1208 declaration.
1209 (m32r_arch_setup): Turn into ...
1210 (m32r_target::low_arch_setup): ...this.
1211 (the_low_target): Remove the op field.
1212 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1213 declaration.
1214 (m68k_arch_setup): Turn into ...
1215 (m68k_target::low_arch_setup): ...this.
1216 (the_low_target): Remove the op field.
1217 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1218 declaration.
1219 (mips_arch_setup): Turn into ...
1220 (mips_target::low_arch_setup): ...this.
1221 (the_low_target): Remove the op field.
1222 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1223 declaration.
1224 (nios2_arch_setup): Turn into ...
1225 (nios2_target::low_arch_setup): ...this.
1226 (the_low_target): Remove the op field.
1227 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1228 declaration.
1229 (ppc_arch_setup): Turn into ...
1230 (ppc_target::low_arch_setup): ...this.
1231 (the_low_target): Remove the op field.
1232 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1233 declaration.
1234 (riscv_arch_setup): Turn into ...
1235 (riscv_target::low_arch_setup): ...this.
1236 (the_low_target): Remove the op field.
1237 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1238 declaration.
1239 (s390_arch_setup): Turn into ...
1240 (s390_target::low_arch_setup): ...this.
1241 (the_low_target): Remove the op field.
1242 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1243 declaration.
1244 (sh_arch_setup): Turn into ...
1245 (sh_target::low_arch_setup): ...this.
1246 (the_low_target): Remove the op field.
1247 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1248 declaration.
1249 (sparc_arch_setup): Turn into ...
1250 (sparc_target::low_arch_setup): ...this.
1251 (the_low_target): Remove the op field.
1252 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1253 declaration.
1254 (tic6x_arch_setup): Turn into ...
1255 (tic6x_target::low_arch_setup): ...this.
1256 (the_low_target): Remove the op field.
1257 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1258 declaration.
1259 (tile_arch_setup): Turn into ...
1260 (tile_target::low_arch_setup): ...this.
1261 (the_low_target): Remove the op field.
1262 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1263 declaration.
1264 (xtensa_arch_setup): Turn into ...
1265 (xtensa_target::low_arch_setup): ...this.
1266 (the_low_target): Remove the op field.
1267
1268 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1269
1270 * linux-low.h (the_linux_target): New extern declaration.
1271 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1272 'the_target'.
1273 (the_linux_target): Remove.
1274 * linux-x86-low.cc (class x86_target): New class.
1275 (the_x86_target): New static object.
1276 (the_linux_target): Define as pointer to the_x86_target.
1277 * linux-aarch64-low.cc (class aarch64_target): New class.
1278 (the_aarch64_target): New static object.
1279 (the_linux_target): Define as pointer to the_aarch64_target.
1280 * linux-arm-low.cc (class arm_target): New class.
1281 (the_arm_target): New static object.
1282 (the_linux_target): Define as pointer to the_arm_target.
1283 * linux-bfin-low.cc (class bfin_target): New class.
1284 (the_bfin_target): New static object.
1285 (the_linux_target): Define as pointer to the_bfin_target.
1286 * linux-cris-low.cc (class cris_target): New class.
1287 (the_cris_target): New static object.
1288 (the_linux_target): Define as pointer to the_cris_target.
1289 * linux-crisv32-low.cc (class crisv32_target): New class.
1290 (the_crisv32_target): New static object.
1291 (the_linux_target): Define as pointer to the_crisv32_target.
1292 * linux-ia64-low.cc (class ia64_target): New class.
1293 (the_ia64_target): New static object.
1294 (the_linux_target): Define as pointer to the_ia64_target.
1295 * linux-m32r-low.cc (class m32r_target): New class.
1296 (the_m32r_target): New static object.
1297 (the_linux_target): Define as pointer to the_m32r_target.
1298 * linux-m68k-low.cc (class m68k_target): New class.
1299 (the_m68k_target): New static object.
1300 (the_linux_target): Define as pointer to the_m68k_target.
1301 * linux-mips-low.cc (class mips_target): New class.
1302 (the_mips_target): New static object.
1303 (the_linux_target): Define as pointer to the_mips_target.
1304 * linux-nios2-low.cc (class nios2_target): New class.
1305 (the_nios2_target): New static object.
1306 (the_linux_target): Define as pointer to the_nios2_target.
1307 * linux-ppc-low.cc (class ppc_target): New class.
1308 (the_ppc_target): New static object.
1309 (the_linux_target): Define as pointer to the_ppc_target.
1310 * linux-riscv-low.cc (class riscv_target): New class.
1311 (the_riscv_target): New static object.
1312 (the_linux_target): Define as pointer to the_riscv_target.
1313 * linux-s390-low.cc (class s390_target): New class.
1314 (the_s390_target): New static object.
1315 (the_linux_target): Define as pointer to the_s390_target.
1316 * linux-sh-low.cc (class sh_target): New class.
1317 (the_sh_target): New static object.
1318 (the_linux_target): Define as pointer to the_sh_target.
1319 * linux-sparc-low.cc (class sparc_target): New class.
1320 (the_sparc_target): New static object.
1321 (the_linux_target): Define as pointer to the_sparc_target.
1322 * linux-tic6x-low.cc (class tic6x_target): New class.
1323 (the_tic6x_target): New static object.
1324 (the_linux_target): Define as pointer to the_tic6x_target.
1325 * linux-tile-low.cc (class tile_target): New class.
1326 (the_tile_target): New static object.
1327 (the_linux_target): Define as pointer to the_tile_target.
1328 * linux-xtensa-low.cc (class xtensa_target): New class.
1329 (the_xtensa_target): New static object.
1330 (the_linux_target): Define as pointer to the_xtensa_target.
1331
1332 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1333
1334 Turn some static functions in linux-low.cc into private methods of
1335 linux_process_target.
1336
1337 * linux-low.cc (handle_extended_wait): Turn into ...
1338 (linux_process_target::handle_extended_wait): ...this. Call
1339 'mourn' on 'this' object instead of 'the_target'.
1340 (maybe_move_out_of_jump_pad): Turn into...
1341 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1342 (linux_low_filter_event): Turn into...
1343 (linux_process_target::filter_event): ...this.
1344 (linux_wait_for_event_filtered): Turn into...
1345 (linux_process_target::wait_for_event_filtered): ...this.
1346 (linux_wait_for_event): Turn into...
1347 (linux_process_target::wait_for_event): ...this.
1348 (linux_wait_1): Turn into...
1349 (linux_process_target::wait_1): ...this.
1350 (wait_for_sigstop): Turn into...
1351 (linux_process_target::wait_for_sigstop): ...this.
1352 (move_out_of_jump_pad_callback): Turn into...
1353 (linux_process_target::move_out_of_jump_pad): ...this.
1354 (stop_all_lwps): Turn into...
1355 (linux_process_target::stop_all_lwps): ...this.
1356 (start_step_over): Turn into...
1357 (linux_process_target::start_step_over): ...this.
1358 (complete_ongoing_step_over): Turn into...
1359 (linux_process_target::complete_ongoing_step_over): ...this.
1360 (proceed_all_lwps): Turn into...
1361 (linux_process_target::proceed_all_lwps): ...this.
1362 (unstop_all_lwps): Turn into...
1363 (linux_process_target::unstop_all_lwps): ...this.
1364
1365 * linux-low.h (class linux_process_target)
1366 <handle_extended_wait>
1367 <maybe_move_out_of_jump_pad>
1368 filter_event>
1369 <wait_for_event_filtered>
1370 <wait_for_event>
1371 <wait_1>
1372 <wait_for_sigstop>
1373 <move_out_of_jump_pad>
1374 <stop_all_lwps>
1375 <start_step_over>
1376 <complete_ongoing_step_over>
1377 <proceed_all_lwps>
1378 <unstop_all_lwps>: Declare.
1379
1380 Update the callers below.
1381
1382 * linux-low.cc (linux_process_target::attach): Update.
1383 (linux_process_target::stabilize_threads): Ditto.
1384 (linux_process_target::wait): Ditto.
1385
1386 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1387
1388 * linux-low.h (struct linux_target_ops): Update the comment for
1389 'cannot_store_register' to return 0 or 1.
1390 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1391 of 2.
1392
1393 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1394
1395 * config.in: Re-generate.
1396 * configure: Re-generate.
1397
1398 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1399
1400 * regcache.cc (find_register_by_number): Update.
1401 * tdesc.cc (init_target_desc): Likewise.
1402 * tdesc.h (target_desc::reg_defs): Likewise.
1403
1404 2020-03-12 Tom Tromey <tom@tromey.com>
1405
1406 * configure: Rebuild.
1407 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1408 (WIN32APILIBS): New subst.
1409 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1410 gdbsupport files.
1411 (gdbsupport/%.o): Remove target.
1412 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1413 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1414 (WIN32APILIBS): New variable.
1415 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1416 (gdbreplay$(EXEEXT)): Likewise.
1417
1418 2020-03-12 Tom Tromey <tom@tromey.com>
1419
1420 * config.in, configure: Rebuild.
1421 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1422 * acinclude.m4: Include gettext-sister.m4.
1423 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1424 variables.
1425 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1426 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1427
1428 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1429
1430 * acinclude.m4: Update path to selftest.m4.
1431
1432 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1433
1434 * configure.ac: Don't source bfd/development.sh, move
1435 GDB_AC_COMMON higher.
1436 * configure: Re-generate.
1437
1438 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1439
1440 * configure: Re-generate.
1441
1442 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1443
1444 * configure: Re-generate.
1445
1446 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1447
1448 * .dir-locals.el: New file.
1449
1450 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1451
1452 * .gitattributes: New file.
1453
1454 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1455
1456 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1457 reply into an S reply.
1458 * server.cc (disable_packet_T): New global.
1459 (captured_main): Set new global when appropriate.
1460 * server.h (disable_packet_T): Declare.
1461
1462 2020-02-21 Tom Tromey <tom@tromey.com>
1463
1464 * Makefile.in (mostlyclean): New target.
1465
1466 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1467
1468 * target.h (struct process_stratum_target): Remove.
1469 (class process_target): Rename to ...
1470 (class process_stratum_target): ... this.
1471 * linux-low.h (class linux_process_target): Derive from
1472 'process_stratum_target'.
1473 * linux-low.cc (linux_target_ops): Remove.
1474 (initialize_low): Set the_target to the singleton instance of
1475 linux_process_target.
1476 * lynx-low.h (class lynx_process_target): Derive from
1477 'process_stratum_target'.
1478 * lynx-low.cc (lynx_target_ops): Remove.
1479 (initialize_low): Set the_target to the singleton instance of
1480 lynx_process_target.
1481 * nto-low.h (class nto_process_target): Derive from
1482 'process_stratum_target'.
1483 * nto-low.cc (nto_target_ops): Remove.
1484 (initialize_low): Set the_target to the singleton instance of
1485 nto_process_target.
1486 * win32-low.h (class win32_process_target): Derive from
1487 'process_stratum_target'.
1488 * win32-low.cc (win32_target_ops): Remove.
1489 (initialize_low): Set the_target to the singleton instance of
1490 win32_process_target.
1491
1492 Replace 'the_target->pt' with 'the_target' in the uses below.
1493
1494 * hostio.cc (hostio_error)
1495 (handle_setfs)
1496 (handle_open)
1497 (handle_unlink)
1498 (handle_readlink)
1499 * linux-aarch32-low.cc (arm_breakpoint_at)
1500 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1501 * linux-arm-low.cc (arm_sigreturn_next_pc)
1502 (arm_get_hwcap)
1503 (arm_get_syscall_trapinfo)
1504 * linux-cris-low.cc (cris_breakpoint_at)
1505 * linux-crisv32-low.cc (cris_breakpoint_at)
1506 * linux-low.cc (handle_extended_wait)
1507 (linux_wait_1)
1508 (linux_read_memory)
1509 (linux_process_target::breakpoint_kind_from_pc)
1510 (linux_get_auxv)
1511 * linux-m32r-low.cc (m32r_breakpoint_at)
1512 * linux-mips-low.cc (mips_breakpoint_at)
1513 * linux-nios2-low.cc (nios2_breakpoint_at)
1514 * linux-ppc-low.cc (ppc_breakpoint_at)
1515 * linux-s390-low.cc (s390_get_hwcap)
1516 * linux-sh-low.cc (sh_breakpoint_at)
1517 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1518 (sparc_store_gregset_from_stack)
1519 (sparc_breakpoint_at)
1520 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1521 * linux-tile-low.cc (tile_breakpoint_at)
1522 * linux-x86-low.cc (x86_breakpoint_at)
1523 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1524 * mem-break.cc (bp_size)
1525 (bp_opcode)
1526 (insert_memory_breakpoint)
1527 (set_raw_breakpoint_at)
1528 (delete_raw_breakpoint)
1529 (z_type_supported)
1530 (uninsert_raw_breakpoint)
1531 (reinsert_raw_breakpoint)
1532 (validate_inserted_breakpoint)
1533 * regcache.cc (regcache_read_pc)
1534 (regcache_write_pc)
1535 * remote-utils.cc (putpkt_binary_1)
1536 (input_interrupt)
1537 (getpkt)
1538 (prepare_resume_reply)
1539 * server.cc (handle_general_set)
1540 (handle_detach)
1541 (handle_qxfer_auxv)
1542 (handle_qxfer_exec_file)
1543 (handle_qxfer_libraries_svr4)
1544 (handle_qxfer_osdata)
1545 (handle_qxfer_siginfo)
1546 (handle_qxfer_fdpic)
1547 (handle_query)
1548 (resume)
1549 (handle_v_requests)
1550 (queue_stop_reply_callback)
1551 (captured_main)
1552 * target.cc (prepare_to_access_memory)
1553 (done_accessing_memory)
1554 (read_inferior_memory)
1555 (target_write_memory)
1556 (target_stop_and_wait)
1557 (target_wait)
1558 (target_mourn_inferior)
1559 (target_continue_no_signal)
1560 (target_continue)
1561 (target_supports_multi_process)
1562 (kill_inferior)
1563 * target.h
1564 (target_create_inferior)
1565 (target_post_create_inferior)
1566 (myattach)
1567 (target_supports_fork_events)
1568 (target_supports_vfork_events)
1569 (target_supports_exec_events)
1570 (target_handle_new_gdb_connection)
1571 (detach_inferior)
1572 (mythread_alive)
1573 (fetch_inferior_registers)
1574 (store_inferior_registers)
1575 (join_inferior)
1576 (target_supports_non_stop)
1577 (target_async)
1578 (target_process_qsupported)
1579 (target_supports_catch_syscall)
1580 (target_get_ipa_tdesc_idx)
1581 (target_supports_tracepoints)
1582 (target_supports_fast_tracepoints)
1583 (target_get_min_fast_tracepoint_insn_len)
1584 (target_thread_stopped)
1585 (target_pause_all)
1586 (target_unpause_all)
1587 (target_stabilize_threads)
1588 (target_install_fast_tracepoint_jump_pad)
1589 (target_emit_ops)
1590 (target_supports_disable_randomization)
1591 (target_supports_agent)
1592 (target_enable_btrace)
1593 (target_disable_btrace)
1594 (target_read_btrace)
1595 (target_read_btrace_conf)
1596 (target_supports_range_stepping)
1597 (target_supports_stopped_by_sw_breakpoint)
1598 (target_stopped_by_sw_breakpoint)
1599 (target_supports_stopped_by_hw_breakpoint)
1600 (target_supports_hardware_single_step)
1601 (target_stopped_by_hw_breakpoint)
1602 (target_breakpoint_kind_from_pc)
1603 (target_breakpoint_kind_from_current_state)
1604 (target_supports_software_single_step)
1605 (target_core_of_thread)
1606 (target_thread_name)
1607 (target_thread_handle)
1608 * win32-low.cc (do_initial_child_stuff)
1609
1610 Rename target op default definitions listed below.
1611
1612 * target.cc (process_target::post_create_inferior): Rename as ...
1613 (process_stratum_target::post_create_inferior): ... this.
1614 (process_target::prepare_to_access_memory): Rename as ...
1615 (process_stratum_target::prepare_to_access_memory): ... this.
1616 (process_target::done_accessing_memory): Rename as ...
1617 (process_stratum_target::done_accessing_memory): ... this.
1618 (process_target::look_up_symbols): Rename as ...
1619 (process_stratum_target::look_up_symbols): ... this.
1620 (process_target::supports_read_auxv): Rename as ...
1621 (process_stratum_target::supports_read_auxv): ... this.
1622 (process_target::read_auxv): Rename as ...
1623 (process_stratum_target::read_auxv): ... this.
1624 (process_target::supports_z_point_type): Rename as ...
1625 (process_stratum_target::supports_z_point_type): ... this.
1626 (process_target::insert_point): Rename as ...
1627 (process_stratum_target::insert_point): ... this.
1628 (process_target::remove_point): Rename as ...
1629 (process_stratum_target::remove_point): ... this.
1630 (process_target::stopped_by_sw_breakpoint): Rename as ...
1631 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1632 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1633 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1634 (process_target::stopped_by_hw_breakpoint): Rename as ...
1635 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1636 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1637 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1638 (process_target::supports_hardware_single_step): Rename as ...
1639 (process_stratum_target::supports_hardware_single_step): ... this.
1640 (process_target::stopped_by_watchpoint): Rename as ...
1641 (process_stratum_target::stopped_by_watchpoint): ... this.
1642 (process_target::stopped_data_address): Rename as ...
1643 (process_stratum_target::stopped_data_address): ... this.
1644 (process_target::supports_read_offsets): Rename as ...
1645 (process_stratum_target::supports_read_offsets): ... this.
1646 (process_target::read_offsets): Rename as ...
1647 (process_stratum_target::read_offsets): ... this.
1648 (process_target::supports_get_tls_address): Rename as ...
1649 (process_stratum_target::supports_get_tls_address): ... this.
1650 (process_target::get_tls_address): Rename as ...
1651 (process_stratum_target::get_tls_address): ... this.
1652 (process_target::hostio_last_error): Rename as ...
1653 (process_stratum_target::hostio_last_error): ... this.
1654 (process_target::supports_qxfer_osdata): Rename as ...
1655 (process_stratum_target::supports_qxfer_osdata): ... this.
1656 (process_target::qxfer_osdata): Rename as ...
1657 (process_stratum_target::qxfer_osdata): ... this.
1658 (process_target::supports_qxfer_siginfo): Rename as ...
1659 (process_stratum_target::supports_qxfer_siginfo): ... this.
1660 (process_target::qxfer_siginfo): Rename as ...
1661 (process_stratum_target::qxfer_siginfo): ... this.
1662 (process_target::supports_non_stop): Rename as ...
1663 (process_stratum_target::supports_non_stop): ... this.
1664 (process_target::async): Rename as ...
1665 (process_stratum_target::async): ... this.
1666 (process_target::start_non_stop): Rename as ...
1667 (process_stratum_target::start_non_stop): ... this.
1668 (process_target::supports_multi_process): Rename as ...
1669 (process_stratum_target::supports_multi_process): ... this.
1670 (process_target::supports_fork_events): Rename as ...
1671 (process_stratum_target::supports_fork_events): ... this.
1672 (process_target::supports_vfork_events): Rename as ...
1673 (process_stratum_target::supports_vfork_events): ... this.
1674 (process_target::supports_exec_events): Rename as ...
1675 (process_stratum_target::supports_exec_events): ... this.
1676 (process_target::handle_new_gdb_connection): Rename as ...
1677 (process_stratum_target::handle_new_gdb_connection): ... this.
1678 (process_target::handle_monitor_command): Rename as ...
1679 (process_stratum_target::handle_monitor_command): ... this.
1680 (process_target::core_of_thread): Rename as ...
1681 (process_stratum_target::core_of_thread): ... this.
1682 (process_target::supports_read_loadmap): Rename as ...
1683 (process_stratum_target::supports_read_loadmap): ... this.
1684 (process_target::read_loadmap): Rename as ...
1685 (process_stratum_target::read_loadmap): ... this.
1686 (process_target::process_qsupported): Rename as ...
1687 (process_stratum_target::process_qsupported): ... this.
1688 (process_target::supports_tracepoints): Rename as ...
1689 (process_stratum_target::supports_tracepoints): ... this.
1690 (process_target::read_pc): Rename as ...
1691 (process_stratum_target::read_pc): ... this.
1692 (process_target::write_pc): Rename as ...
1693 (process_stratum_target::write_pc): ... this.
1694 (process_target::supports_thread_stopped): Rename as ...
1695 (process_stratum_target::supports_thread_stopped): ... this.
1696 (process_target::thread_stopped): Rename as ...
1697 (process_stratum_target::thread_stopped): ... this.
1698 (process_target::supports_get_tib_address): Rename as ...
1699 (process_stratum_target::supports_get_tib_address): ... this.
1700 (process_target::get_tib_address): Rename as ...
1701 (process_stratum_target::get_tib_address): ... this.
1702 (process_target::pause_all): Rename as ...
1703 (process_stratum_target::pause_all): ... this.
1704 (process_target::unpause_all): Rename as ...
1705 (process_stratum_target::unpause_all): ... this.
1706 (process_target::stabilize_threads): Rename as ...
1707 (process_stratum_target::stabilize_threads): ... this.
1708 (process_target::supports_fast_tracepoints): Rename as ...
1709 (process_stratum_target::supports_fast_tracepoints): ... this.
1710 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1711 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1712 (process_target::emit_ops): Rename as ...
1713 (process_stratum_target::emit_ops): ... this.
1714 (process_target::supports_disable_randomization): Rename as ...
1715 (process_stratum_target::supports_disable_randomization): ... this.
1716 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1717 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1718 (process_target::qxfer_libraries_svr4): Rename as ...
1719 (process_stratum_target::qxfer_libraries_svr4): ... this.
1720 (process_target::supports_agent): Rename as ...
1721 (process_stratum_target::supports_agent): ... this.
1722 (process_target::enable_btrace): Rename as ...
1723 (process_stratum_target::enable_btrace): ... this.
1724 (process_target::disable_btrace): Rename as ...
1725 (process_stratum_target::disable_btrace): ... this.
1726 (process_target::read_btrace): Rename as ...
1727 (process_stratum_target::read_btrace): ... this.
1728 (process_target::read_btrace_conf): Rename as ...
1729 (process_stratum_target::read_btrace_conf): ... this.
1730 (process_target::supports_range_stepping): Rename as ...
1731 (process_stratum_target::supports_range_stepping): ... this.
1732 (process_target::supports_pid_to_exec_file): Rename as ...
1733 (process_stratum_target::supports_pid_to_exec_file): ... this.
1734 (process_target::pid_to_exec_file): Rename as ...
1735 (process_stratum_target::pid_to_exec_file): ... this.
1736 (process_target::supports_multifs): Rename as ...
1737 (process_stratum_target::supports_multifs): ... this.
1738 (process_target::multifs_open): Rename as ...
1739 (process_stratum_target::multifs_open): ... this.
1740 (process_target::multifs_unlink): Rename as ...
1741 (process_stratum_target::multifs_unlink): ... this.
1742 (process_target::multifs_readlink): Rename as ...
1743 (process_stratum_target::multifs_readlink): ... this.
1744 (process_target::breakpoint_kind_from_pc): Rename as ...
1745 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1746 (process_target::breakpoint_kind_from_current_state): Rename as ...
1747 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1748 (process_target::thread_name): Rename as ...
1749 (process_stratum_target::thread_name): ... this.
1750 (process_target::thread_handle): Rename as ...
1751 (process_stratum_target::thread_handle): ... this.
1752 (process_target::supports_software_single_step): Rename as ...
1753 (process_stratum_target::supports_software_single_step): ... this.
1754 (process_target::supports_catch_syscall): Rename as ...
1755 (process_stratum_target::supports_catch_syscall): ... this.
1756 (process_target::get_ipa_tdesc_idx): Rename as ...
1757 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1758
1759 2020-02-20 Pedro Alves <palves@redhat.com>
1760
1761 * target.cc (set_target_ops): Simply copy the given target pointer
1762 instead of creating a copy of the pointed object.
1763
1764 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1765
1766 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1767 of process_target.
1768
1769 * target.h (struct process_stratum_target): Remove the target op.
1770 (class process_target): Add the target op.
1771 (target_get_ipa_tdesc_idx): Update the macro.
1772 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1773
1774 Update the derived classes and callers below.
1775
1776 * linux-low.cc (linux_target_ops): Update.
1777 (linux_get_ipa_tdesc_idx): Turn into ...
1778 (linux_process_target::get_ipa_tdesc_idx): ... this.
1779 * linux-low.h (class linux_process_target): Update.
1780 * lynx-low.cc (lynx_target_ops): Update.
1781 * nto-low.cc (nto_target_ops): Update.
1782 * win32-low.cc (win32_target_ops): Update.
1783
1784 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1785
1786 Turn process_stratum_target's supports_catch_syscall op into a
1787 method of process_target.
1788
1789 * target.h (struct process_stratum_target): Remove the target op.
1790 (class process_target): Add the target op.
1791 (target_supports_catch_syscall): Update the macro.
1792 * target.cc (process_target::supports_catch_syscall): Define.
1793
1794 Update the derived classes and callers below.
1795
1796 * linux-low.cc (linux_target_ops): Update.
1797 (linux_supports_catch_syscall): Turn into ...
1798 (linux_process_target::supports_catch_syscall): ... this.
1799 * linux-low.h (class linux_process_target): Update.
1800 * lynx-low.cc (lynx_target_ops): Update.
1801 * nto-low.cc (nto_target_ops): Update.
1802 * win32-low.cc (win32_target_ops): Update.
1803
1804 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1805
1806 Turn process_stratum_target's supports_software_single_step op
1807 into a method of process_target.
1808
1809 * target.h (struct process_stratum_target): Remove the target op.
1810 (class process_target): Add the target op.
1811 (target_supports_software_single_step): Update the macro.
1812 * target.cc (process_target::supports_software_single_step): Define.
1813
1814 Update the derived classes and callers below.
1815
1816 * linux-low.cc (linux_target_ops): Update.
1817 (linux_supports_software_single_step): Turn into ...
1818 (linux_process_target::supports_software_single_step): ... this.
1819 * linux-low.h (class linux_process_target): Update.
1820 * lynx-low.cc (lynx_target_ops): Update.
1821 * nto-low.cc (nto_target_ops): Update.
1822 * win32-low.cc (win32_target_ops): Update.
1823
1824 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1825
1826 Turn process_stratum_target's thread_name and thread_handle ops
1827 into methods of process_target.
1828
1829 * target.h (struct process_stratum_target): Remove the target ops.
1830 (class process_target): Add the target ops.
1831 (target_thread_name): Update the macro.
1832 (target_thread_handle): Update the macro.
1833 * target.cc (process_target::thread_name): Define.
1834 (process_target::thread_handle): Define.
1835
1836 Update the derived classes and callers below.
1837
1838 * linux-low.cc (linux_target_ops): Update.
1839 (linux_process_target::thread_name): Define.
1840 (linux_process_target::thread_handle): Define.
1841 * linux-low.h (class linux_process_target): Update.
1842 * lynx-low.cc (lynx_target_ops): Update.
1843 * nto-low.cc (nto_target_ops): Update.
1844 * win32-low.cc (win32_target_ops): Update.
1845
1846 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1847
1848 Turn process_stratum_target's breakpoint_kind_from_pc,
1849 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1850 ops into methods of process_target.
1851
1852 * target.h (struct process_stratum_target): Remove the target op.
1853 (class process_target): Add the target op.
1854 (target_breakpoint_kind_from_pc): Update the macro.
1855 (target_breakpoint_kind_from_current_state): Update the macro.
1856 (default_breakpoint_kind_from_pc): Remove declaration.
1857 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1858 (process_target::breakpoint_kind_from_pc): ... this.
1859 (process_target::breakpoint_kind_from_current_state): Define.
1860
1861 Update the derived classes and callers below.
1862
1863 * mem-break.cc (bp_size): Update.
1864 (bp_opcode): Update.
1865 * linux-low.cc (linux_target_ops): Update.
1866 (linux_wait_1): Update.
1867 (linux_breakpoint_kind_from_pc): Turn into ...
1868 (linux_process_target::breakpoint_kind_from_pc): ... this.
1869 (linux_sw_breakpoint_from_kind): Turn into ...
1870 (linux_process_target::sw_breakpoint_from_kind): ... this.
1871 (linux_breakpoint_kind_from_current_state): Turn into ...
1872 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1873 * linux-low.h (class linux_process_target): Update.
1874 * lynx-low.cc (lynx_target_ops): Update.
1875 (lynx_process_target::sw_breakpoint_from_kind): Define.
1876 * lynx-low.h (class lynx_process_target): Update.
1877 * nto-low.cc (nto_target_ops): Update.
1878 (nto_sw_breakpoint_from_kind): Turn into ...
1879 (nto_process_target::sw_breakpoint_from_kind): ... this.
1880 * nto-low.h (class nto_process_target): Update.
1881 * win32-low.cc (win32_target_ops): Update.
1882 (win32_sw_breakpoint_from_kind): Turn into ...
1883 (win32_process_target::sw_breakpoint_from_kind): ... this.
1884 * win32-low.h (class win32_process_target): Update.
1885
1886 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1887
1888 Turn process_stratum_target's multifs_open, multifs_readlink,
1889 multifs_unlink ops into methods of process_target.
1890
1891 * target.h (struct process_stratum_target): Remove the target ops.
1892 (class process_target): Add the target ops. Also add
1893 'supports_multifs'.
1894 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1895 "sys/stat.h".
1896 (process_target::supports_multifs): Define.
1897 (process_target::multifs_open): Define.
1898 (process_target::multifs_readlink): Define.
1899 (process_target::multifs_unlink): Define.
1900
1901 Update the derived classes and callers below.
1902
1903 * hostio.cc (handle_setfs): Update.
1904 (handle_open): Update.
1905 (handle_unlink): Update.
1906 (handle_readlink): Update.
1907 * linux-low.cc (linux_target_ops): Update.
1908 (linux_process_target::supports_multifs): Define.
1909 (linux_process_target::multifs_open): Define.
1910 (linux_process_target::multifs_readlink): Define.
1911 (linux_process_target::multifs_unlink): Define.
1912 * linux-low.h (class linux_process_target): Update.
1913 * lynx-low.cc (lynx_target_ops): Update.
1914 * nto-low.cc (nto_target_ops): Update.
1915 * win32-low.cc (win32_target_ops): Update.
1916
1917 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1918
1919 Turn process_stratum_target's pid_to_exec_file op into a method
1920 of process_target.
1921
1922 * target.h (struct process_stratum_target): Remove the target op.
1923 (class process_target): Add the target op. Also add
1924 'supports_pid_to_exec_file'.
1925 * target.cc (process_target::pid_to_exec_file): Define.
1926 (process_target::supports_pid_to_exec_file): Define.
1927
1928 Update the derived classes and callers below.
1929
1930 * server.cc (handle_qxfer_exec_file): Update.
1931 (handle_query): Update.
1932 * linux-low.cc (linux_target_ops): Update.
1933 (linux_process_target::supports_pid_to_exec_file): Define.
1934 (linux_process_target::pid_to_exec_file): Define.
1935 * linux-low.h (class linux_process_target): Update.
1936 * lynx-low.cc (lynx_target_ops): Update.
1937 * nto-low.cc (nto_target_ops): Update.
1938 * win32-low.cc (win32_target_ops): Update.
1939
1940 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1941
1942 Turn process_stratum_target's supports_range_stepping op into a
1943 method of process_target.
1944
1945 * target.h (struct process_stratum_target): Remove the target op.
1946 (class process_target): Add the target op.
1947 (target_supports_range_stepping): Update the macro.
1948 * target.cc (process_target::supports_range_stepping): Define.
1949
1950 Update the derived classes and callers below.
1951
1952 * linux-low.cc (linux_target_ops): Update.
1953 (linux_supports_range_stepping): Turn into ...
1954 (linux_process_target::supports_range_stepping): ... this.
1955 * linux-low.h (class linux_process_target): Update.
1956 * lynx-low.cc (lynx_target_ops): Update.
1957 * nto-low.cc (nto_target_ops): Update.
1958 * win32-low.cc (win32_target_ops): Update.
1959
1960 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1961
1962 Turn process_stratum_target's btrace-related ops (enable_btrace,
1963 disable_btrace, read_btrace, read_btrace_conf) into methods of
1964 process_target.
1965
1966 * target.h (struct process_stratum_target): Remove the target ops.
1967 (class process_target): Add the target ops.
1968 (target_enable_btrace): Update.
1969 (target_disable_btrace): Update.
1970 (target_read_btrace): Update.
1971 (target_read_btrace_conf): Update.
1972 * target.cc (process_target::enable_btrace): Define.
1973 (process_target::disable_btrace): Define.
1974 (process_target::read_btrace): Define.
1975 (process_target::read_btrace_conf): Define.
1976
1977 Update the derived classes and callers below.
1978
1979 * linux-low.cc (linux_target_ops): Update.
1980 (linux_process_target:enable_btrace): Define as a wrapper around
1981 linux_enable_btrace.
1982 (linux_low_disable_btrace): Turn into ...
1983 (linux_process_target::disable_btrace): ... this.
1984 (linux_low_read_btrace): Turn into ...
1985 (linux_process_target::read_btrace): ... this.
1986 (linux_low_btrace_conf): Turn into ...
1987 (linux_process_target::read_btrace_conf): ... this.
1988 * linux-low.h (class linux_process_target): Update.
1989 * lynx-low.cc (lynx_target_ops): Update.
1990 * nto-low.cc (nto_target_ops): Update.
1991 * win32-low.cc (win32_target_ops): Update.
1992
1993 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1994
1995 Turn process_stratum_target's supports_agent op into a method of
1996 process_target.
1997
1998 * target.h (struct process_stratum_target): Remove the target op.
1999 (class process_target): Add the target op.
2000 (target_supports_agent): Update the macro.
2001 * target.cc (process_target::supports_agent): Define.
2002
2003 Update the derived classes and callers below.
2004
2005 * linux-low.cc (linux_target_ops): Update.
2006 (linux_supports_agent): Turn into ...
2007 (linux_process_target::supports_agent): ... this.
2008 * linux-low.h (class linux_process_target): Update.
2009 * lynx-low.cc (lynx_target_ops): Update.
2010 * nto-low.cc (nto_target_ops): Update.
2011 * win32-low.cc (win32_target_ops): Update.
2012
2013 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2014
2015 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2016 method of process_target.
2017
2018 * target.h (struct process_stratum_target): Remove the target op.
2019 (class process_target): Add the target op. Also add
2020 'supports_qxfer_libraries_svr4'.
2021 * target.cc (process_target::qxfer_libraries_svr4): Define.
2022 (process_target::supports_qxfer_libraries_svr4): Define.
2023
2024 Update the derived classes and callers below.
2025
2026 * server.cc (handle_qxfer_libraries_svr4): Update.
2027 (handle_query): Update.
2028 * linux-low.cc (linux_target_ops): Update.
2029 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2030 (linux_qxfer_libraries_svr4): Turn into ...
2031 (linux_process_target::qxfer_libraries_svr4): ... this.
2032 * linux-low.h (class linux_process_target): Update.
2033 * lynx-low.cc (lynx_target_ops): Update.
2034 * nto-low.cc (nto_target_ops): Update.
2035 * win32-low.cc (win32_target_ops): Update.
2036
2037 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2038
2039 Turn process_stratum_target's supports_disable_randomization op
2040 into a method of process_target.
2041
2042 * target.h (struct process_stratum_target): Remove the target op.
2043 (class process_target): Add the target op.
2044 (target_supports_disable_randomization): Update the macro.
2045 * target.cc (process_target::supports_disable_randomization): Define.
2046
2047 Update the derived classes and callers below.
2048
2049 * linux-low.cc (linux_target_ops): Update.
2050 (linux_supports_disable_randomization): Turn into ...
2051 (linux_process_target::supports_disable_randomization): ... this.
2052 * linux-low.h (class linux_process_target): Update.
2053 * lynx-low.cc (lynx_target_ops): Update.
2054 * nto-low.cc (nto_target_ops): Update.
2055 * win32-low.cc (win32_target_ops): Update.
2056
2057 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2058
2059 Turn process_stratum_target's emit_ops op into a method of
2060 process_target.
2061
2062 * target.h (struct process_stratum_target): Remove the target op.
2063 (class process_target): Add the target op.
2064 (target_emit_ops): Update the macro.
2065 * target.cc (process_target::emit_ops): Define.
2066
2067 Update the derived classes and callers below.
2068
2069 * linux-low.cc (linux_target_ops): Update.
2070 (linux_emit_ops): Turn into ...
2071 (linux_process_target::emit_ops): ... this.
2072 * linux-low.h (class linux_process_target): Update.
2073 * lynx-low.cc (lynx_target_ops): Update.
2074 * nto-low.cc (nto_target_ops): Update.
2075 * win32-low.cc (win32_target_ops): Update.
2076
2077 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2078
2079 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2080 and get_min_fast_tracepoint_insn_len ops into methods of
2081 process_target.
2082
2083 * target.h (struct process_stratum_target): Remove the target ops.
2084 (class process_target): Add the target ops. Also add
2085 'supports_fast_tracepoints'.
2086 (target_supports_fast_tracepoints): Update the macro.
2087 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2088 (install_fast_tracepoint_jump_pad): Update and rename the macro
2089 to ...
2090 (target_install_fast_tracepoint_jump_pad): ... this.
2091 * target.cc (process_target::supports_fast_tracepoints): Define.
2092 (process_target::install_fast_tracepoint_jump_pad): Define.
2093 (process_target::get_min_fast_tracepoint_insn_len): Define.
2094
2095 Update the derived classes and callers below.
2096
2097 * tracepoint.cc (install_fast_tracepoint): Update.
2098 * linux-low.cc (linux_target_ops): Update.
2099 (linux_process_target::supports_fast_tracepoints): Define.
2100 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2101 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2102 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2103 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2104 * linux-low.h (class linux_process_target): Update.
2105 * lynx-low.cc (lynx_target_ops): Update.
2106 * nto-low.cc (nto_target_ops): Update.
2107 * win32-low.cc (win32_target_ops): Update.
2108
2109 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2110
2111 Turn process_stratum_target's stabilize_threads op into a
2112 method of process_target.
2113
2114 * target.h (struct process_stratum_target): Remove the target op.
2115 (class process_target): Add the target op.
2116 (target_stabilize_threads): Update the macro.
2117 * target.cc (process_target::stabilize_threads): Define.
2118
2119 Update the derived classes and callers below.
2120
2121 * server.cc (handle_status): Update.
2122 * tracepoint.cc (cmd_qtdp): Update.
2123 (cmd_qtstart): Update.
2124 * linux-low.cc (linux_target_ops): Update.
2125 (linux_stabilize_threads): Turn into ...
2126 (linux_process_target::stabilize_threads): ... this.
2127 (linux_wait_1): Update.
2128 * linux-low.h (class linux_process_target): Update.
2129 * lynx-low.cc (lynx_target_ops): Update.
2130 * nto-low.cc (nto_target_ops): Update.
2131 * win32-low.cc (win32_target_ops): Update.
2132
2133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2134
2135 Turn process_stratum_target's pause_all and unpause_all ops
2136 into methods of process_target.
2137
2138 * target.h (struct process_stratum_target): Remove the target ops.
2139 (class process_target): Add the target ops.
2140 (pause_all): Update the macro and rename to...
2141 (target_pause_all): ... this.
2142 (unpause_all): Update the macro and rename to...
2143 (target_unpause_all): ... this.
2144 * target.cc (process_target::pause_all): Define.
2145 (process_target::unpause_all): Define.
2146
2147 Update the derived classes and callers below.
2148
2149 * server.cc (handle_status): Update.
2150 * tracepoint.cc (clear_installed_tracepoints): Update.
2151 (cmd_qtdp): Update.
2152 (cmd_qtstart): Update.
2153 (stop_tracing): Update.
2154 (cmd_qtstatus): Update.
2155 (upload_fast_traceframes): Update.
2156 (run_inferior_command): Update.
2157 * linux-low.cc (linux_target_ops): Update.
2158 (linux_pause_all): Turn into ...
2159 (linux_process_target::pause_all): ... this.
2160 (linux_unpause_all): Turn into ...
2161 (linux_process_target::unpause_all): ... this.
2162 (linux_process_target::prepare_to_access_memory): Update.
2163 (linux_process_target::done_accessing_memory): Update.
2164 * linux-low.h (class linux_process_target): Update.
2165 * lynx-low.cc (lynx_target_ops): Update.
2166 * nto-low.cc (nto_target_ops): Update.
2167 * win32-low.cc (win32_target_ops): Update.
2168
2169 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2170
2171 Turn process_stratum_target's get_tib_address op into a method of
2172 process_target.
2173
2174 * target.h (struct process_stratum_target): Remove the target op.
2175 (class process_target): Add the target op. Also add
2176 'supports_get_tib_address'.
2177 * target.cc (process_target::get_tib_address): Define.
2178 (process_target::supports_get_tib_address): Define.
2179
2180 Update the derived classes and callers below.
2181
2182 * server.cc (handle_query): Update.
2183 * linux-low.cc (win32_target_ops): Update.
2184 * lynx-low.cc (lynx_target_ops): Update.
2185 * nto-low.cc (nto_target_ops): Update.
2186 * win32-low.cc (win32_target_ops): Update.
2187 (win32_process_target::supports_get_tib_address): Define.
2188 (win32_get_tib_address): Turn into ...
2189 (win32_process_target::get_tib_address): ... this.
2190 * win32-low.h (class win32_process_target): Update.
2191
2192 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2193
2194 Turn process_stratum_target's thread_stopped op into a method of
2195 process_target.
2196
2197 * target.h (struct process_stratum_target): Remove the target op.
2198 (class process_target): Add the target op. Also add
2199 'supports_thread_stopped'.
2200 (target_thread_stopped): Update the macro.
2201 * target.cc (process_target::thread_stopped): Define.
2202 (process_target::supports_thread_stopped): Define.
2203 (prepare_to_access_memory): Update.
2204
2205 Update the derived classes and callers below.
2206
2207 * server.cc (queue_stop_reply_callback): Update.
2208 * linux-low.cc (linux_target_ops): Update.
2209 (linux_process_target::supports_thread_stopped): Define.
2210 (linux_thread_stopped): Turn into ...
2211 (linux_process_target::thread_stopped): ... this.
2212 * linux-low.h (class linux_process_target): Update.
2213 * lynx-low.cc (lynx_target_ops): Update.
2214 * nto-low.cc (nto_target_ops): Update.
2215 * win32-low.cc (win32_target_ops): Update.
2216
2217 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2218
2219 Turn process_stratum_target's read_pc and write_pc ops into
2220 methods of process_target.
2221
2222 * target.h (struct process_stratum_target): Remove the target ops.
2223 (class process_target): Add the target ops.
2224 * target.cc (process_target::read_pc): Define.
2225 (process_target::write_pc): Define.
2226
2227 Update the derived classes and callers below.
2228
2229 * regcache.cc (regcache_read_pc): Update.
2230 (regcache_write_pc): Update.
2231 * linux-low.cc (linux_target_ops): Update.
2232 (linux_read_pc): Turn into ...
2233 (linux_process_target::read_pc): ... this.
2234 (linux_write_pc): Turn into ...
2235 (linux_process_target::write_pc): ... this.
2236 * linux-low.h (class linux_process_target): Update.
2237 * lynx-low.cc (lynx_target_ops): Update.
2238 * nto-low.cc (nto_target_ops): Update.
2239 * win32-low.cc (win32_target_ops): Update.
2240
2241 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2242
2243 Turn process_stratum_target's supports_tracepoints op into a
2244 method of process_target.
2245
2246 * target.h (struct process_stratum_target): Remove the target op.
2247 (class process_target): Add the target op.
2248 (target_supports_tracepoints): Update the macro.
2249 * target.cc (process_target::supports_tracepoints): Define.
2250
2251 Update the derived classes and callers below.
2252
2253 * linux-low.cc (linux_target_ops): Update.
2254 (linux_supports_tracepoints): Turn into ...
2255 (linux_process_target::supports_tracepoints): ... this.
2256 * linux-low.h (class linux_process_target): Update.
2257 * lynx-low.cc (lynx_target_ops): Update.
2258 * nto-low.cc (nto_target_ops): Update.
2259 * win32-low.cc (win32_target_ops): Update.
2260
2261 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2262
2263 Turn process_stratum_target's process_qsupported op into a method
2264 of process_target.
2265
2266 * target.h (struct process_stratum_target): Remove the target op.
2267 (class process_target): Add the target op.
2268 (target_process_qsupported): Update the macro.
2269 * target.cc (process_target::process_qsupported): Define.
2270
2271 Update the derived classes and callers below.
2272
2273 * linux-low.cc (linux_target_ops): Update.
2274 (linux_process_qsupported): Turn into ...
2275 (linux_process_target::process_qsupported): ... this.
2276 * linux-low.h (class linux_process_target): Update.
2277 * lynx-low.cc (lynx_target_ops): Update.
2278 * nto-low.cc (nto_target_ops): Update.
2279 * win32-low.cc (win32_target_ops): Update.
2280
2281 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2282
2283 Turn process_stratum_target's read_loadmap op into a method of
2284 process_target.
2285
2286 * target.h (struct process_stratum_target): Remove the target op.
2287 (class process_target): Add the target op. Also add
2288 'supports_read_loadmap'.
2289 * target.cc (process_target::read_loadmap): Define.
2290 (process_target::supports_read_loadmap): Define.
2291
2292 Update the derived classes and callers below.
2293
2294 * server.cc (handle_qxfer_fdpic): Update.
2295 (handle_query): Update.
2296 * linux-low.cc (linux_target_ops): Update.
2297 (linux_process_target::supports_read_loadmap): Define.
2298 (linux_read_loadmap): Turn into ...
2299 (linux_process_target::read_loadmap): ... this.
2300 * linux-low.h (class linux_process_target): Update.
2301 * lynx-low.cc (lynx_target_ops): Update.
2302 * nto-low.cc (nto_target_ops): Update.
2303 * win32-low.cc (win32_target_ops): Update.
2304
2305 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2306
2307 Turn process_stratum_target's core_of_thread op into a method of
2308 process_target.
2309
2310 * target.h (struct process_stratum_target): Remove the target op.
2311 (class process_target): Add the target op.
2312 (target_core_of_thread): Update the macro.
2313 * target.cc (process_target::core_of_thread): Define.
2314
2315 Update the derived classes and callers below.
2316
2317 * linux-low.cc (linux_target_ops): Update.
2318 (linux_process_target::core_of_thread): Define.
2319 * linux-low.h (class linux_process_target): Update.
2320 * lynx-low.cc (lynx_target_ops): Update.
2321 * nto-low.cc (nto_target_ops): Update.
2322 * win32-low.cc (win32_target_ops): Update.
2323
2324 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2325
2326 Turn process_stratum_target's handle_monitor_command op into a
2327 method of process_target.
2328
2329 * target.h (struct process_stratum_target): Remove the target op.
2330 (class process_target): Add the target op.
2331 (target_handle_monitor_command): Update the macro.
2332 * target.cc (process_target::handle_monitor_command): Define.
2333
2334 Update the derived classes and callers below.
2335
2336 * server.cc (handle_query): Update.
2337 * linux-low.cc (linux_target_ops): Update.
2338 (linux_process_target::handle_monitor_command): Define.
2339 * linux-low.h (class linux_process_target): Update.
2340 * lynx-low.cc (lynx_target_ops): Update.
2341 * nto-low.cc (nto_target_ops): Update.
2342 * win32-low.cc (win32_target_ops): Update.
2343
2344 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2345
2346 Turn process_stratum_target's handle_new_gdb_connection op into a
2347 method of process_target.
2348
2349 * target.h (struct process_stratum_target): Remove the target op.
2350 (class process_target): Add the target op.
2351 (target_handle_new_gdb_connection): Update the macro.
2352 * target.cc (process_target::handle_new_gdb_connection): Define.
2353
2354 Update the derived classes and callers below.
2355
2356 * linux-low.cc (linux_target_ops): Update.
2357 (linux_handle_new_gdb_connection): Turn into ...
2358 (linux_process_target::handle_new_gdb_connection): ... this.
2359 * linux-low.h (class linux_process_target): Update.
2360 * lynx-low.cc (lynx_target_ops): Update.
2361 * nto-low.cc (nto_target_ops): Update.
2362 * win32-low.cc (win32_target_ops): Update.
2363
2364 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2365
2366 Turn process_stratum_target's supports_fork_events,
2367 supports_vfork_events, and supports_exec_events ops into methods
2368 of process_target.
2369
2370 * target.h (struct process_stratum_target): Remove the target ops.
2371 (class process_target): Add the target ops.
2372 (target_supports_fork_events): Update the macro.
2373 (target_supports_vfork_events): Update the macro.
2374 (target_supports_exec_events): Update the macro.
2375 * target.cc (process_target::supports_fork_events): Define.
2376 (process_target::supports_vfork_events): Define.
2377 (process_target::supports_exec_events): Define.
2378
2379 Update the derived classes and callers below.
2380
2381 * linux-low.cc (linux_target_ops): Update.
2382 (linux_supports_fork_events): Turn into ...
2383 (linux_process_target::supports_fork_events): ... this.
2384 (linux_supports_vfork_events): Turn into ...
2385 (linux_process_target::supports_vfork_events): ... this.
2386 (linux_supports_exec_events): Turn into ...
2387 (linux_process_target::supports_exec_events): ... this.
2388 * linux-low.h (class linux_process_target): Update.
2389 * lynx-low.cc (lynx_target_ops): Update.
2390 * nto-low.cc (nto_target_ops): Update.
2391 * win32-low.cc (win32_target_ops): Update.
2392
2393 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2394
2395 Turn process_stratum_target's supports_multi_process op into a
2396 method of process_target.
2397
2398 * target.h (struct process_stratum_target): Remove the target op.
2399 (class process_target): Add the target op.
2400 * target.cc (process_target::supports_multi_process): Define.
2401 (target_supports_multi_process): Update.
2402
2403 Update the derived classes and callers below.
2404
2405 * linux-low.cc (linux_target_ops): Update.
2406 (linux_supports_multi_process): Turn into ...
2407 (linux_process_target::supports_multi_process): ... this.
2408 * linux-low.h (class linux_process_target): Update.
2409 * lynx-low.cc (lynx_target_ops): Update.
2410 * nto-low.cc (nto_target_ops): Update.
2411 * win32-low.cc (win32_target_ops): Update.
2412
2413 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2414
2415 Turn process_stratum_target's supports_non_stop, async, and
2416 start_non_stop ops into methods of process_target.
2417
2418 * target.h (struct process_stratum_target): Remove the target ops.
2419 (class process_target): Add the target ops.
2420 (target_supports_non_stop): Update the macro.
2421 (target_async): Update the macro.
2422 (start_non_stop): Remove declaration.
2423 * target.cc (process_target::supports_non_stop): Define.
2424 (process_target::async): Define.
2425 (process_target::start_non_stop): Define.
2426 (start_non_stop): Remove.
2427
2428 Update the derived classes and callers below.
2429
2430 * server.cc (handle_qxfer_siginfo): Update.
2431 (handle_query): Update.
2432 * linux-low.cc (linux_target_ops): Update.
2433 (linux_supports_non_stop): Turn into ...
2434 (linux_process_target::supports_non_stop): ... this.
2435 (linux_async): Turn into ...
2436 (linux_process_target::async): ... this.
2437 (linux_start_non_stop): Turn into ...
2438 (linux_process_target::start_non_stop): ... this.
2439 * linux-low.h (class linux_process_target): Update.
2440 * lynx-low.cc (lynx_target_ops): Update.
2441 * nto-low.cc (nto_target_ops): Update.
2442 (nto_supports_non_stop): Remove; rely on the default behavior
2443 instead.
2444 * win32-low.cc (win32_target_ops): Update.
2445
2446 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2447
2448 Turn process_stratum_target's qxfer_siginfo op into a method of
2449 process_target.
2450
2451 * target.h (struct process_stratum_target): Remove the target op.
2452 (class process_target): Add the target op. Also add
2453 'supports_qxfer_siginfo'.
2454 * target.cc (process_target::qxfer_siginfo): Define.
2455 (process_target::supports_qxfer_siginfo): Define.
2456
2457 Update the derived classes and callers below.
2458
2459 * server.cc (handle_qxfer_siginfo): Update.
2460 (handle_query): Update.
2461 * linux-low.cc (linux_target_ops): Update.
2462 (linux_process_target::supports_qxfer_siginfo): Define.
2463 (linux_xfer_siginfo): Turn into ...
2464 (linux_process_target::qxfer_siginfo): ... this.
2465 * linux-low.h (class linux_process_target): Update.
2466 * lynx-low.cc (lynx_target_ops): Update.
2467 * nto-low.cc (nto_target_ops): Update.
2468 * win32-low.cc (win32_target_ops): Update.
2469
2470 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2471
2472 Turn process_stratum_target's qxfer_osdata op into a method of
2473 process_target.
2474
2475 * target.h (struct process_stratum_target): Remove the target op.
2476 (class process_target): Add the target op. Also add
2477 'supports_qxfer_osdata'.
2478 * target.cc (process_target::qxfer_osdata): Define.
2479 (process_target::supports_qxfer_osdata): Define.
2480
2481 Update the derived classes and callers below.
2482
2483 * server.cc (handle_qxfer_osdata): Update.
2484 (handle_query): Update.
2485 * linux-low.cc (linux_target_ops): Update.
2486 (linux_process_target::supports_qxfer_osdata): Define.
2487 (linux_qxfer_osdata): Turn into ...
2488 (linux_process_target::qxfer_osdata): ... this.
2489 * linux-low.h (class linux_process_target): Update.
2490 * lynx-low.cc (lynx_target_ops): Update.
2491 * nto-low.cc (nto_target_ops): Update.
2492 * win32-low.cc (win32_target_ops): Update.
2493
2494 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2495
2496 Turn process_stratum_target's hostio_last_error op into a
2497 method of process_target.
2498
2499 * target.h (struct process_stratum_target): Remove the target op.
2500 (class process_target): Add the target op.
2501 * target.cc: Add "hostio.h" to includes.
2502 (process_target::hostio_last_error): Define.
2503
2504 Update the derived classes and callers below.
2505
2506 * hostio.cc (hostio_error): Update.
2507 * linux-low.cc: Remove "hostio.h" from includes.
2508 (linux_target_ops): Update.
2509 * lynx-low.cc (lynx_target_ops): Update.
2510 * nto-low.cc (nto_target_ops): Update.
2511 * win32-low.h (class win32_process_target): Update.
2512 * win32-low.cc (win32_target_ops): Update.
2513 (wince_hostio_last_error): Turn into ...
2514 (win32_process_target::hostio_last_error): ... this.
2515
2516 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2517
2518 Turn process_stratum_target's get_tls_address op into a method of
2519 process_target.
2520
2521 * target.h (struct process_stratum_target): Remove the target op.
2522 (class process_target): Add the target op. Also add
2523 'supports_get_tls_address'.
2524 * target.cc (process_target::get_tls_address): Define.
2525 (process_target::supports_get_tls_address): Define.
2526
2527 Update the derived classes and callers below.
2528
2529 * server.cc (handle_query): Update.
2530 * linux-low.cc (linux_target_ops): Update.
2531 (linux_process_target::supports_get_tls_address): Define.
2532 (linux_process_target::get_tls_address): Define.
2533 * linux-low.h (class linux_process_target): Update.
2534 * lynx-low.cc (lynx_target_ops): Update.
2535 * nto-low.cc (nto_target_ops): Update.
2536 * win32-low.cc (win32_target_ops): Update.
2537
2538 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2539
2540 Turn process_stratum_target's read_offsets op into a method of
2541 process_target.
2542
2543 * target.h (struct process_stratum_target): Remove the target op.
2544 (class process_target): Add the target op. Also add
2545 'supports_read_offsets'.
2546 * target.cc (process_target::read_offsets): Define.
2547 (process_target::supports_read_offsets): Define.
2548
2549 Update the derived classes and callers below.
2550
2551 * server.cc (handle_query): Update.
2552 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2553 (linux_target_ops): Update.
2554 (linux_process_target::supports_read_offsets): Define.
2555 (linux_read_offsets): Turn into ...
2556 (linux_process_target::read_offsets): ... this.
2557 * linux-low.h (class linux_process_target): Update.
2558 * lynx-low.cc (lynx_target_ops): Update.
2559 * nto-low.cc (nto_target_ops): Update.
2560 * win32-low.cc (win32_target_ops): Update.
2561
2562 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2563
2564 Turn process_stratum_target's stopped_by_watchpoint and
2565 stopped_data_address ops into methods of process_target.
2566
2567 * target.h (struct process_stratum_target): Remove the target ops.
2568 (class process_target): Add the target ops.
2569 * target.cc (process_target::stopped_by_watchpoint): Define.
2570 (process_target::stopped_data_address): Define.
2571
2572 Update the derived classes and callers below.
2573
2574 * remote-utils.cc (prepare_resume_reply): Update.
2575 * linux-low.cc (linux_target_ops): Update.
2576 (linux_stopped_by_watchpoint): Turn into ...
2577 (linux_process_target::stopped_by_watchpoint): ... this.
2578 (linux_stopped_data_address): Turn into ...
2579 (linux_process_target::stopped_data_address): ... this.
2580 * linux-low.h (class linux_process_target): Update.
2581 * lynx-low.cc (lynx_target_ops): Update.
2582 * nto-low.cc (nto_target_ops): Update.
2583 (nto_stopped_by_watchpoint): Turn into ...
2584 (nto_process_target::stopped_by_watchpoint): ... this.
2585 (nto_stopped_data_address): Turn into ...
2586 (nto_process_target::stopped_data_address): ... this.
2587 * nto-low.h (class nto_process_target): Update.
2588 * win32-low.cc (win32_target_ops): Update.
2589 (win32_stopped_by_watchpoint): Turn into ...
2590 (win32_process_target::stopped_by_watchpoint): ... this.
2591 (win32_stopped_data_address): Turn into ...
2592 (win32_process_target::stopped_data_address): ... this.
2593 * win32-low.h (class win32_process_target): Update.
2594
2595 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2596
2597 Turn process_stratum_target's supports_hardware_single_step op into
2598 a method of process_target.
2599
2600 * target.h (struct process_stratum_target): Remove the target op.
2601 (class process_target): Add the target op.
2602 (target_supports_hardware_single_step): Update the macro.
2603 (target_can_do_hardware_single_step): Remove declaration.
2604 * target.cc (process_target::supports_hardware_single_step): Define.
2605 (target_can_do_hardware_single_step): Remove.
2606
2607 Update the derived classes and callers below.
2608
2609 * linux-low.h (class linux_process_target): Update.
2610 * linux-low.cc (linux_target_ops): Update.
2611 (linux_supports_hardware_single_step): Turn into ...
2612 (linux_process_target::supports_hardware_single_step): ... this.
2613 * lynx-low.h (class lynx_process_target): Update.
2614 * lynx-low.cc (lynx_target_ops): Update.
2615 (lynx_process_target::supports_hardware_single_step): Define.
2616 * nto-low.h (class nto_process_target): Update.
2617 * nto-low.cc (nto_target_ops): Update.
2618 (nto_process_target::supports_hardware_single_step): Define.
2619 * win32-low.h (class win32_process_target): Update.
2620 * win32-low.cc (win32_target_ops): Update.
2621 (win32_process_target::supports_hardware_single_step): Define.
2622
2623 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2624
2625 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2626 ops into methods of process_target.
2627
2628 * target.h (struct process_stratum_target): Remove the target ops.
2629 (class process_target): Add the target ops.
2630 (target_stopped_by_hw_breakpoint): Update the macro.
2631 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2632 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2633 (process_target::supports_stopped_by_hw_breakpoint): Define.
2634
2635 Update the derived classes and callers below.
2636
2637 * linux-low.cc (linux_target_ops): Update.
2638 (linux_stopped_by_hw_breakpoint): Turn into ...
2639 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2640 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2641 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2642 * linux-low.h (class linux_process_target): Update.
2643 * lynx-low.cc (lynx_target_ops): Update.
2644 * nto-low.cc (nto_target_ops): Update.
2645 * win32-low.cc (win32_target_ops): Update.
2646
2647 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2648
2649 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2650 ops into methods of process_target.
2651
2652 * target.h (struct process_stratum_target): Remove the target ops.
2653 (class process_target): Add the target ops.
2654 (target_stopped_by_sw_breakpoint): Update the macro.
2655 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2656 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2657 (process_target::supports_stopped_by_sw_breakpoint): Define.
2658
2659 Update the derived classes and callers below.
2660
2661 * linux-low.cc (linux_target_ops): Update.
2662 (linux_stopped_by_sw_breakpoint): Turn into ...
2663 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2664 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2665 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2666 * linux-low.h (class linux_process_target): Update.
2667 * lynx-low.cc (lynx_target_ops): Update.
2668 * nto-low.cc (nto_target_ops): Update.
2669 * win32-low.cc (win32_target_ops): Update.
2670
2671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2672
2673 Turn process_stratum_target's insert_point and remove_point ops
2674 into methods of process_target.
2675
2676 * target.h (struct process_stratum_target): Remove the target ops.
2677 (class process_target): Add the target ops.
2678 * target.cc (process_target::insert_point): Define.
2679 (process_target::remove_point): Define.
2680
2681 Update the derived classes and callers below.
2682
2683 * mem-break.cc (set_raw_breakpoint_at): Update.
2684 (delete_raw_breakpoint): Update.
2685 (uninsert_raw_breakpoint): Update.
2686 (reinsert_raw_breakpoint): Update.
2687 * linux-low.cc (linux_target_ops): Update.
2688 (linux_insert_point): Turn into ...
2689 (linux_process_target::insert_point): ... this.
2690 (linux_remove_point): Turn into ...
2691 (linux_process_target::remove_point): ... this.
2692 * linux-low.h (class linux_process_target): Update.
2693 * lynx-low.cc (lynx_target_ops): Update.
2694 * nto-low.cc (nto_target_ops): Update.
2695 (nto_insert_point): Turn into ...
2696 (nto_process_target::insert_point): ... this.
2697 (nto_remove_point): Turn into ...
2698 (nto_process_target::remove_point): ... this.
2699 * nto-low.h (class nto_process_target): Update.
2700 * win32-low.cc (win32_target_ops): Update.
2701 (win32_insert_point): Turn into ...
2702 (win32_process_target::insert_point): ... this.
2703 (win32_remove_point): Turn into ...
2704 (win32_process_target::remove_point): ... this.
2705 * win32-low.h (class win32_process_target): Update.
2706
2707 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2708
2709 Turn process_stratum_target's supports_z_point_type op into a
2710 method of process_target.
2711
2712 * target.h (struct process_stratum_target): Remove the target op.
2713 (class process_target): Add the target op.
2714 * target.cc (process_target::supports_z_point_type): Define.
2715
2716 Update the derived classes and callers below.
2717
2718 * mem-break.cc (z_type_supported): Update.
2719 * linux-low.cc (linux_target_ops): Update.
2720 (linux_supports_z_point_type): Turn into ...
2721 (linux_process_target::supports_z_point_type): ... this.
2722 * linux-low.h (class linux_process_target): Update.
2723 * lynx-low.cc (lynx_target_ops): Update.
2724 * nto-low.cc (nto_target_ops): Update.
2725 (nto_supports_z_point_type): Turn into ...
2726 (nto_process_target::supports_z_point_type): ... this.
2727 * nto-low.h (class nto_process_target): Update.
2728 * win32-low.cc (win32_target_ops): Update.
2729 (win32_supports_z_point_type): Turn into ...
2730 (win32_process_target::supports_z_point_type): ... this.
2731 * win32-low.h (class win32_process_target): Update.
2732
2733 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2734
2735 Turn process_stratum_target's read_auxv op into a method of
2736 process_target.
2737
2738 * target.h (class process_stratum_target): Remove the target op.
2739 (struct process_target): Add the target op. Also add
2740 'supports_read_auxv'.
2741 * target.cc (process_target::read_auxv): Define.
2742 (process_target::supports_read_auxv): Define.
2743
2744 Update the derived classes and callers below.
2745
2746 * server.cc (handle_qxfer_auxv): Update.
2747 (handle_query): Update.
2748 * linux-low.cc (linux_target_ops): Update.
2749 (linux_process_target::supports_read_auxv): Define.
2750 (linux_read_auxv): Turn into ...
2751 (linux_process_target::read_auxv): ... this.
2752 * linux-low.h (class linux_process_target): Update.
2753 * lynx-low.cc (lynx_target_ops): Update.
2754 * nto-low.cc (nto_target_ops): Update.
2755 (nto_process_target::supports_read_auxv): Define.
2756 (nto_read_auxv): Turn into ...
2757 (nto_process_target::read_auxv): ... this.
2758 * nto-low.h (class nto_process_target): Update.
2759 * win32-low.cc (win32_target_ops): Update.
2760
2761 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2762
2763 Turn process_stratum_target's request_interrupt op into a method of
2764 process_target.
2765
2766 * target.h (struct process_stratum_target): Remove the target op.
2767 (class process_target): Add the target op.
2768
2769 Update the derived classes and callers below.
2770
2771 * remote-utils.cc (putpkt_binary_1): Update.
2772 (input_interrupt): Update.
2773 (getpkt): Update.
2774 * server.cc (handle_v_requests): Update.
2775 * linux-low.cc (linux_target_ops): Update.
2776 (linux_request_interrupt): Turn into ...
2777 (linux_process_target::request_interrupt): ... this.
2778 * linux-low.h (class linux_process_target): Update.
2779 * lynx-low.cc (lynx_target_ops): Update.
2780 (lynx_request_interrupt): Turn into ...
2781 (lynx_process_target::request_interrupt): ... this.
2782 * lynx-low.h (class lynx_process_target): Update.
2783 * nto-low.cc (nto_target_ops): Update.
2784 (nto_request_interrupt): Turn into ...
2785 (nto_process_target::request_interrupt): ... this.
2786 * nto-low.h (class nto_process_target): Update.
2787 * win32-low.cc (win32_target_ops): Update.
2788 (win32_request_interrupt): Turn into ...
2789 (win32_process_target::request_interrupt): ... this.
2790 * win32-low.h (class win32_process_target): Update.
2791
2792 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2793
2794 Turn process_stratum_target's look_up_symbols op into a method of
2795 process_target.
2796
2797 * target.h (struct process_stratum_target): Remove the target op.
2798 (class process_target): Add the target op.
2799 * target.cc (process_target::look_up_symbols): Define.
2800
2801 Update the derived classes and callers below.
2802
2803 * server.cc (handle_query): Update.
2804 * linux-low.cc (linux_target_ops): Update.
2805 (linux_look_up_symbols): Turn into ...
2806 (linux_process_target::look_up_symbols): ... this.
2807 * linux-low.h (class linux_process_target): Update.
2808 * lynx-low.cc (lynx_target_ops): Update.
2809 * nto-low.cc (nto_target_ops): Update.
2810 * win32-low.cc (win32_target_ops): Update.
2811
2812 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2813
2814 Turn process_stratum_target's read_memory and write_memory
2815 ops into methods of process_target.
2816
2817 * target.h (struct process_stratum_target): Remove the target ops.
2818 (class process_target): Add the target ops.
2819
2820 Update the derived classes and callers below.
2821
2822 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2823 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2824 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2825 (arm_get_syscall_trapinfo): Update.
2826 * linux-cris-low.cc (cris_breakpoint_at): Update.
2827 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2828 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2829 * linux-mips-low.cc (mips_breakpoint_at): Update.
2830 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2831 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2832 * linux-sh-low.cc (sh_breakpoint_at): Update.
2833 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2834 (sparc_store_gregset_from_stack): Update.
2835 (sparc_breakpoint_at): Update.
2836 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2837 * linux-tile-low.cc (tile_breakpoint_at): Update.
2838 * linux-x86-low.cc (x86_breakpoint_at): Update.
2839 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2840 * mem-brea.cc (insert_memory_breakpoint): Update.
2841 (validate_inserted_breakpoint): Update.
2842 * target.cc (read_inferior_memory): Update.
2843 (target_write_memory): Update.
2844 * linux-low.cc (linux_target_ops): Update.
2845 (linux_read_memory): Make a wrapper around the read_memory target
2846 op call.
2847 (linux_process_target::read_memory): Rename from linux_read_memory.
2848 (linux_write_memory): Turn into ...
2849 (linux_process_target::write_memory): ... this.
2850 * linux-low.h (class linux_process_target): Update.
2851 * lynx-low.cc (lynx_target_ops): Update.
2852 (lynx_read_memory): Turn into ...
2853 (lynx_process_target::read_memory): ... this.
2854 (lynx_write_memory): Turn into ...
2855 (lynx_process_target::write_memory): ... this.
2856 * lynx-low.h (class lynx_process_target): Update.
2857 * nto-low.cc (nto_target_ops): Update.
2858 (nto_read_memory): Turn into ...
2859 (nto_process_target::read_memory): ... this.
2860 (nto_write_memory): Turn into ...
2861 (nto_process_target::write_memory): ... this.
2862 * nto-low.h (class nto_process_target): Update.
2863 * win32-low.cc (win32_target_ops): Update.
2864 (win32_read_inferior_memory): Turn into ...
2865 (win32_process_target::read_memory): ... this.
2866 (win32_write_inferior_memory): Turn into ...
2867 (win32_process_target::write_memory): ... this.
2868 * win32-low.h (class win32_process_target): Update.
2869
2870 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2871
2872 Turn process_stratum_target's prepare_to_access_memory and
2873 done_accessing_memory ops into methods of process_target.
2874
2875 * target.h (struct process_stratum_target): Remove the target ops.
2876 (class process_target): Add the target ops.
2877 * target.cc (process_target::prepare_to_access_memory): Define.
2878 (process_target::done_accessing_memory): Define.
2879 (prepare_to_access_memory): Update.
2880 (done_accessing_memory): Update.
2881
2882 Update the derived classes and callers below.
2883
2884 * linux-low.cc (linux_target_ops): Update.
2885 (linux_prepare_to_access_memory): Turn into ...
2886 (linux_process_target::prepare_to_access_memory): ... this.
2887 (linux_done_accessing_memory): Turn into ...
2888 (linux_process_target::done_accessing_memory): ... this.
2889 * linux-low.h (class linux_process_target): Update.
2890 * lynx-low.cc (lynx_target_ops): Update.
2891 * nto-low.cc (nto_target_ops): Update.
2892 * win32-low.cc (win32_target_ops): Update.
2893
2894 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2895
2896 Turn process_stratum_target's fetch_registers and store_registers
2897 ops into methods of process_target.
2898
2899 * target.h (struct process_stratum_target): Remove the target ops.
2900 (class process_target): Add the target ops.
2901 (fetch_inferior_registers): Update the macro.
2902 (store_inferior_registers): Update the macro.
2903
2904 Update the derived classes and callers below.
2905
2906 * linux-low.cc (linux_target_ops): Update.
2907 (linux_fetch_registers): Turn into ...
2908 (linux_process_target::fetch_registers): ... this.
2909 (linux_store_registers): Turn into ...
2910 (linux_process_target::store_registers): ... this.
2911 * linux-low.h (class linux_process_target): Update.
2912 * lynx-low.cc (lynx_target_ops): Update.
2913 (lynx_fetch_registers): Turn into ...
2914 (lynx_process_target::fetch_registers): ... this.
2915 (lynx_store_registers): Turn into ...
2916 (lynx_process_target::store_registers): ... this.
2917 * lynx-low.h (class lynx_process_target): Update.
2918 * nto-low.cc (nto_target_ops): Update.
2919 (nto_fetch_registers): Turn into ...
2920 (nto_process_target::fetch_registers): ... this.
2921 (nto_store_registers): Turn into ...
2922 (nto_process_target::store_registers): ... this.
2923 * nto-low.h (class nto_process_target): Update.
2924 * win32-low.cc (win32_target_ops): Update.
2925 (win32_fetch_inferior_registers): Turn into ...
2926 (win32_process_target::fetch_registers): ... this.
2927 (win32_store_inferior_registers): Turn into ...
2928 (win32_process_target::store_registers): ... this.
2929 * win32-low.h (class win32_process_target): Update.
2930
2931 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2932
2933 Turn process_stratum_target's wait op into a method of
2934 process_target.
2935
2936 * target.h (struct process_stratum_target): Remove the target op.
2937 (class process_target): Add the target op.
2938
2939 Update the derived classes and callers below.
2940
2941 * target.cc (target_wait): Update.
2942 * linux-low.cc (linux_target_ops): Update.
2943 (linux_wait): Turn into ...
2944 (linux_process_target::wait): ... this.
2945 * linux-low.h (class linux_process_target): Update.
2946 * lynx-low.cc (lynx_target_ops): Update.
2947 (lynx_wait): Turn into ...
2948 (lynx_process_target::wait): ... this.
2949 * lynx-low.h (class lynx_process_target): Update.
2950 * nto-low.cc (nto_target_ops): Update.
2951 (nto_wait): Turn into ...
2952 (nto_process_target::wait): ... this.
2953 * nto-low.h (class nto_process_target): Update.
2954 * win32-low.cc (win32_target_ops): Update.
2955 (win32_wait): Turn into ...
2956 (win32_process_target::wait): ... this.
2957 (do_initial_child_stuff): Update.
2958 * win32-low.h (class win32_process_target): Update.
2959
2960 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2961
2962 Turn process_stratum_target's resume op into a method of
2963 process_target.
2964
2965 * target.h (struct process_stratum_target): Remove the target op.
2966 (class process_target): Add the target op.
2967
2968 Update the derived classes and callers below.
2969
2970 * server.cc (resume): Update.
2971 * target.cc (target_stop_and_wait): Update.
2972 (target_continue_no_signal): Update.
2973 (target_continue): Update.
2974 * linux-low.cc (linux_target_ops): Update.
2975 (linux_resume): Turn into ...
2976 (linux_process_target::resume): ... this.
2977 * linux-low.h (class linux_process_target): Update.
2978 * lynx-low.cc (lynx_target_ops): Update.
2979 (lynx_resume): Turn into ...
2980 (lynx_process_target::resume): ... this.
2981 * lynx-low.h (class lynx_process_target): Update.
2982 * nto-low.cc (nto_target_ops): Update.
2983 (nto_resume): Turn into ...
2984 (nto_process_target::resume): ... this.
2985 * nto-low.h (class nto_process_target): Update.
2986 * win32-low.cc (win32_target_ops): Update.
2987 (win32_resume): Turn into ...
2988 (win32_process_target::resume): ... this.
2989 (win32_process_target::detach): Update.
2990 (do_initial_child_stuff): Update.
2991 * win32-low.h (class win32_process_target): Update.
2992
2993 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2994
2995 Turn process_stratum_target's thread_alive op into a method of
2996 process_target.
2997
2998 * target.h (struct process_stratum_target): Remove the target op.
2999 (class process_target): Add the target op.
3000 (mythread_alive): Update the macro.
3001
3002 Update the derived classes and callers below.
3003
3004 * linux-low.cc (linux_target_ops): Update.
3005 (linux_thread_alive): Turn into ...
3006 (linux_process_target::thread_alive): ... this.
3007 (wait_for_sigstop): Update.
3008 * linux-low.h (class linux_process_target): Update.
3009 * lynx-low.cc (lynx_target_ops): Update.
3010 (lynx_thread_alive): Turn into ...
3011 (lynx_process_target::thread_alive): ... this.
3012 * lynx-low.h (class lynx_process_target): Update.
3013 * nto-low.cc (nto_target_ops): Update.
3014 (nto_thread_alive): Turn into ...
3015 (nto_process_target::thread_alive): ... this.
3016 * nto-low.h (class nto_process_target): Update.
3017 * win32-low.cc (win32_target_ops): Update.
3018 (win32_thread_alive): Turn into ...
3019 (win32_process_target::thread_alive): ... this.
3020 * win32-low.h (class win32_process_target): Update.
3021
3022 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3023
3024 Turn process_stratum_target's join op into a method of
3025 process_target.
3026
3027 * target.h (struct process_stratum_target): Remove the target op.
3028 (class process_target): Add the target op.
3029 (join_inferior): Update the macro.
3030
3031 Update the derived classes and callers below.
3032
3033 * linux-low.cc (linux_target_ops): Update.
3034 (linux_join): Turn into ...
3035 (linux_process_target::join): ... this.
3036 * linux-low.h (class linux_process_target): Update.
3037 * lynx-low.cc (lynx_target_ops): Update.
3038 (lynx_join): Turn into ...
3039 (lynx_process_target::join): ... this.
3040 * lynx-low.h (class lynx_process_target): Update.
3041 * nto-low.cc (nto_target_ops): Update.
3042 (nto_process_target::join): Define.
3043 * nto-low.h (class nto_process_target): Update.
3044 * win32-low.cc (win32_target_ops): Update.
3045 (win32_join): Turn into ...
3046 (win32_process_target::join): ... this.
3047 * win32-low.h (class win32_process_target): Update.
3048
3049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3050
3051 Turn process_stratum_target's mourn op into a method of
3052 process_target.
3053
3054 * target.h (struct process_stratum_target): Remove the target op.
3055 (class process_target): Add the target op.
3056
3057 Update the derived classes and callers below.
3058
3059 * target.cc (target_mourn_inferior): Update.
3060 * linux-low.cc (linux_target_ops): Update.
3061 (linux_mourn): Turn into ...
3062 (linux_process_target::mourn): ... this.
3063 (handle_extended_wait): Update.
3064 (linux_process_target::kill): Update.
3065 (linux_process_target::detach): Update.
3066 * linux-low.h (class linux_process_target): Update.
3067 * lynx-low.cc (lynx_target_ops): Update.
3068 (lynx_mourn): Turn into ...
3069 (lynx_process_target::mourn): ... this.
3070 * lynx-low.h (class lynx_process_target): Update.
3071 * nto-low.cc (nto_target_ops): Update.
3072 (nto_mourn): Turn into ...
3073 (nto_process_target::mourn): ... this.
3074 * nto-low.h (class nto_process_target): Update.
3075 * win32-low.cc (win32_target_ops): Update.
3076 (win32_mourn): Turn into ...
3077 (win32_process_target::mourn): ... this.
3078 * win32-low.h (class win32_process_target): Update.
3079
3080 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3081
3082 Turn process_stratum_target's detach op into a method of
3083 process_target.
3084
3085 * target.h (struct process_stratum_target): Remove the target op.
3086 (class process_target): Add the target op.
3087 (detach_inferior): Update the macro.
3088
3089 Update the derived classes and callers below.
3090
3091 * linux-low.cc (linux_target_ops): Update.
3092 (linux_detach): Turn into ...
3093 (linux_process_target::detach): ... this.
3094 * linux-low.h (class linux_process_target): Update.
3095 * lynx-low.cc (lynx_target_ops): Update.
3096 (lynx_detach): Turn into ...
3097 (lynx_process_target::detach): ... this.
3098 * lynx-low.h (class lynx_process_target): Update.
3099 * nto-low.cc (nto_target_ops): Update.
3100 (nto_detach): Turn into ...
3101 (nto_process_target::detach): ... this.
3102 * nto-low.h (class nto_process_target): Update.
3103 * win32-low.cc (win32_target_ops): Update.
3104 (win32_detach): Turn into ...
3105 (win32_process_target::detach): ... this.
3106 * win32-low.h (class win32_process_target): Update.
3107
3108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3109
3110 Turn process_stratum_target's kill op into a method of
3111 process_target.
3112
3113 * target.h (struct process_stratum_target): Remove the target op.
3114 (class process_target): Add the target op.
3115
3116 Update the derived classes and callers below.
3117
3118 * target.cc (kill_inferior): Update.
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_kill): Turn into ...
3121 (linux_process_target::kill): ... this.
3122 * linux-low.h (class linux_process_target): Update.
3123 * lynx-low.cc (lynx_target_ops): Update.
3124 (lynx_kill): Turn into ...
3125 (lynx_process_target::kill): ... this.
3126 * lynx-low.h (class lynx_process_target): Update.
3127 * nto-low.cc (nto_target_ops): Update.
3128 (nto_kill): Turn into ...
3129 (nto_process_target::kill): ... this.
3130 * nto-low.h (class nto_process_target): Update.
3131 * win32-low.cc (win32_target_ops): Update.
3132 (win32_kill): Turn into ...
3133 (win32_process_target::kill): ... this.
3134 * win32-low.h (class win32_process_target): Update.
3135
3136 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3137
3138 Turn process_stratum_target's attach op into a method of
3139 process_target.
3140
3141 * target.h (struct process_stratum_target): Remove the target op.
3142 (class process_target): Add the target op.
3143 (myattach): Update the macro.
3144
3145 Update the derived classes and callers below.
3146
3147 * linux-low.cc (linux_target_ops): Update.
3148 (linux_attach): Turn into ...
3149 (linux_process_target::attach): ... this.
3150 * linux-low.h (class linux_process_target): Update.
3151 * lynx-low.cc (lynx_target_ops): Update.
3152 (lynx_attach): Turn into ...
3153 (lynx_process_target::attach): ... this.
3154 * lynx-low.h (class lynx_process_target): Update.
3155 * nto-low.cc (nto_target_ops): Update.
3156 (nto_attach): Turn into ...
3157 (nto_process_target::attach): ... this.
3158 * nto-low.h (class nto_process_target): Update.
3159 * win32-low.cc (win32_target_ops): Update.
3160 (win32_attach): Turn into ...
3161 (win32_process_target::attach): ... this.
3162 * win32-low.h (class win32_process_target): Update.
3163
3164 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3165
3166 Turn process_stratum_target's post_create_inferior op into a method
3167 of process_target.
3168
3169 * target.h (struct process_stratum_target): Remove the target op.
3170 (class process_target): Add the target op.
3171 (target_post_create_inferior): Update the macro.
3172 * target.cc (process_target::post_create_inferior): Define.
3173
3174 Update the derived classes and callers below.
3175
3176 * linux-low.cc (linux_target_ops): Update.
3177 (linux_post_create_inferior): Turn into ...
3178 (linux_process_target::post_create_inferior): ... this.
3179 * linux-low.h (class linux_process_target): Update.
3180 * lynx-low.cc (lynx_target_ops): Update.
3181 * nto-low.cc (nto_target_ops): Update.
3182 * win32-low.cc (win32_target_ops): Update.
3183
3184 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3185
3186 Turn process_stratum_target's create_inferior op into a method of
3187 process_target.
3188
3189 * target.h (struct process_stratum_target): Remove the target op.
3190 (class process_target): Add the target op.
3191 (create_inferior): Rename the macro to ...
3192 (target_create_inferior): ... this.
3193
3194 Update the derived classes and callers below.
3195
3196 * server.cc (handle_v_run): Update.
3197 (captured_main): Update.
3198 (process_serial_event): Update.
3199 * linux-low.cc (linux_target_ops): Update.
3200 (linux_create_inferior): Turn into ...
3201 (linux_process_target::create_inferior): ... this.
3202 * linux-low.h (class linux_process_target): Update.
3203 * lynx-low.cc (lynx_target_ops): Update.
3204 (lynx_create_inferior): Turn into ...
3205 (lynx_process_target::create_inferior): ... this.
3206 * lynx-low.h (class lynx_process_target): Update.
3207 * nto-low.cc (nto_target_ops): Update.
3208 (nto_create_inferior): Turn into ...
3209 (nto_process_target::create_inferior): ... this.
3210 * nto-low.h (class nto_process_target): Update.
3211 * win32-low.cc (win32_target_ops): Update.
3212 (win32_create_inferior): Turn into ...
3213 (win32_process_target::create_inferior): ... this.
3214 * win32-low.h (class win32_process_target): Update.
3215
3216 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3217
3218 * target.h (class process_target): New class definition.
3219 (struct process_stratum_target) <pt>: New field with type
3220 'process_target*'.
3221 * linux-low.h (class linux_process_target): Define as a derived
3222 class of 'process_target'.
3223 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3224 as the 'pt' field.
3225 * lynx-low.h (class lynx_process_target): Define as a derived
3226 class of 'process_target'.
3227 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3228 as the 'pt' field.
3229 * nto-low.h (class nto_process_target): Define as a derived
3230 class of 'process_target'.
3231 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3232 as the 'pt' field.
3233 * win32-low.h (class win32_process_target): Define as a derived
3234 class of 'process_target'.
3235 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3236 as the 'pt' field.
3237
3238 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3239
3240 * configure: Regenerate.
3241
3242 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3243 Andrew Burgess <andrew.burgess@embecosm.com>
3244
3245 * linux-riscv-low.cc: New file.
3246 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3247 and nat/riscv-linux-tdesc.c.
3248 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3249 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3250 Define.
3251
3252 2020-02-14 Tom Tromey <tom@tromey.com>
3253
3254 * acinclude.m4: Don't include acx_configure_dir.m4.
3255 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3256 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3257 (all, install-only, uninstall, clean-info, clean)
3258 (maintainer-clean): Don't recurse.
3259 (subdir_do, all-lib): Remove.
3260 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3261 (GNULIB_H): Remove.
3262 (generated_files): Update.
3263 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3264 * configure: Rebuild.
3265 * configure.ac: Don't configure gnulib or libiberty.
3266 (GNULIB): Update.
3267
3268 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3269
3270 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3271 preparing the command line for CreateProcess.
3272 (win32_create_inferior): Reflect the program name in debugging
3273 output that shows the process and its command line.
3274
3275 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3276
3277 * Makefile.in: Rename source files from .c to .cc.
3278 * %.c: Rename to %.cc.
3279 * configure.ac: Rename server.c to server.cc.
3280 * configure: Re-generate.
3281
3282 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3283
3284 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3285
3286 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3287
3288 * win32-low.c (win32_create_inferior): Set signal_pid.
3289
3290 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3291 Pedro Alves <palves@redhat.com>
3292
3293 Skip building gdbserver in a cross-configuration.
3294 * configure.srv: Set $gdbserver_host depending on whether $target
3295 is $host. Use $gdbserver_host instead of $host.
3296
3297 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3298
3299 * configure: Re-generate.
3300
3301 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3302
3303 * configure: Re-generate.
3304
3305 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3306
3307 * acinclude.m4: Update warning.m4 path.
3308
3309 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3310
3311 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3312 (handle_exception): Set siginfo_er.
3313 (win32_xfer_siginfo): New function.
3314
3315 2020-02-07 Tom Tromey <tom@tromey.com>
3316 Pedro Alves <palves@redhat.com>
3317
3318 * README: Update build documentation.
3319 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3320 host, not target.
3321 * configure.ac: Update paths.
3322 * configure: Rebuild.
3323 * acinclude.m4: Update paths.
3324 * Makefile.in: Update include paths.
3325 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3326 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3327 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3328 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3329 (%-generated.c): Update paths.
3330 * Move entire directory from ../gdb/gdbserver.
3331
3332 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3333
3334 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3335
3336 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3337
3338 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3339 assignment instead of srv_linux_obj.
3340
3341 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3342
3343 * server.c (handle_qxfer_libraries): Write segment-address with
3344 paddress.
3345
3346 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3347
3348 * Makefile.in (install-strip): New target.
3349 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3350 * aclocal.m4: Regenerate.
3351 * configure: Regenerate.
3352 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3353
3354 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3355
3356 * Makefile.in (SFILES): Adjust paths to point to real files.
3357 (OBS): Move waitstatus.o to target/waitstatus.o.
3358 (TAGS): Transform paths appropriately.
3359 (%.o): Rename to...
3360 (nat/%.o): ... this pattern rule.
3361 (%.o): Rename to...
3362 (target/%.o): ... this pattern rule.
3363 * configure.srv: Adjust paths throughout to include nat/ prefix
3364 with the revant files.
3365 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3366 * configure: Regenerate.
3367
3368 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3369
3370 * Makefile.in (TAGS): Remove config files from the recipe.
3371
3372 2020-01-14 Tom Tromey <tom@tromey.com>
3373
3374 * configure: Rebuild.
3375 * configure.ac: Remove any checks that were added to common.m4.
3376 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3377 lib-link.m4.
3378
3379 2020-01-14 Tom Tromey <tom@tromey.com>
3380
3381 * server.h: Include config.h.
3382 * gdbreplay.c: Include config.h.
3383 * configure: Rebuild.
3384 * configure.ac: Don't source common.host.
3385 * acinclude.m4: Update path.
3386 * Makefile.in (INCSUPPORT): New variable.
3387 (INCLUDE_CFLAGS): Add INCSUPPORT.
3388 (SFILES): Update paths.
3389 (version-generated.c): Update path to create-version.sh.
3390 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3391
3392 2020-01-14 Tom Tromey <tom@tromey.com>
3393
3394 * configure.ac (LIBS): Use WIN32APILIBS.
3395 (USE_WIN32API): Don't define.
3396 * configure: Rebuild.
3397
3398 2020-01-14 Tom Tromey <tom@tromey.com>
3399
3400 * configure: Rebuild.
3401
3402 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3403
3404 * Makefile.in (%-generated.c): Remove rule for files from
3405 regformats/i386.
3406
3407 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3408
3409 * configure: Re-generate.
3410
3411 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3412
3413 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3414 Define to static.
3415 * tracepoint.c (stop_tracing, flush_trace_buffer,
3416 about_to_request_buffer_space, get_trace_state_variable_value,
3417 set_trace_state_variable_value, gdb_collect): Add declaration.
3418
3419 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3420
3421 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3422 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3423 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3424 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3425 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3426 static.
3427
3428 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3429
3430 * inferiors.c: Include gdbsupport/common-inferior.h.
3431
3432 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3433
3434 * hostio-errno.c: Include hostio.h.
3435
3436 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3437
3438 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3439 prerequisite.
3440
3441 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3442
3443 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3444 * linux-arm-tdesc.h: Include arch/arm.h.
3445
3446 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3447
3448 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3449
3450 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3451
3452 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3453 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3454
3455 2020-01-10 Pedro Alves <palves@redhat.com>
3456
3457 * fork-child.c (post_fork_inferior): Pass target down to
3458 startup_inferior.
3459 * inferiors.c (switch_to_thread): Add process_stratum_target
3460 parameter.
3461 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3462 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3463 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3464 * remote-utils.c (prepare_resume_reply): Pass the target to
3465 switch_to_thread.
3466 * target.c (the_target): Now a process_stratum_target.
3467 (done_accessing_memory): Pass the target to switch_to_thread.
3468 (set_target_ops): Ajust to use process_stratum_target.
3469 * target.h (struct target_ops): Rename to ...
3470 (struct process_stratum_target): ... this.
3471 (the_target, set_target_ops): Adjust.
3472 (prepare_to_access_memory): Adjust comment.
3473 * win32-low.c (child_xfer_memory): Adjust to use
3474 process_stratum_target.
3475 (win32_target_ops): Now a process_stratum_target.
3476
3477 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3478 Pedro Alves <palves@redhat.com>
3479
3480 * win32-low.c (get_child_debug_event): Extract the fatal exception
3481 from the exit status and convert to the equivalent Posix signal
3482 number.
3483 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3484 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3485
3486 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3487
3488 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3489
3490 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3491
3492 * server.c (gdbserver_version): Change copyright year to 2020.
3493 * gdbreplay.c (gdbreplay_version): Likewise.
3494
3495 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3496
3497 * configure: Regenerate.
3498 * configure.ac: Quote variable arguments of test.
3499
3500 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3501
3502 * Makefile.in: Fix build with GNU Make 3.81
3503
3504 2019-12-16 Tom Tromey <tromey@adacore.com>
3505
3506 * server.c (get_exec_file): Constify result.
3507
3508 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3509
3510 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3511 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3512 * config.in: Regenerate.
3513 * configure: Regenerate.
3514 * configure.ac: Don't check for strerror.
3515 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3516 Call safe_strerror instead of strerror.
3517 * server.h (strerror): Remove this now-unnecessary declaration.
3518 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3519 strerror.
3520 (gdb_agent_helper_thread): Likewise.
3521 * utils.c (perror_with_name): Likewise.
3522
3523 2019-11-26 Tom Tromey <tom@tromey.com>
3524
3525 * configure, config.in: Rebuild.
3526
3527 2019-11-26 Tom Tromey <tom@tromey.com>
3528
3529 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3530 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3531 gdb_sigmask.
3532 * configure, config.in: Rebuild.
3533
3534 2019-11-26 Tom Tromey <tom@tromey.com>
3535
3536 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3537 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3538 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3539 * acinclude.m4: Include ax_pthread.m4.
3540 * config.in, configure: Rebuild.
3541
3542 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3543
3544 * debug.c (debug_set_output): Call safe_strerror instead of
3545 strerror.
3546 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3547 (linux_kill_one_lwp): Likewise.
3548 (linux_detach_one_lwp): Likewise.
3549 (linux_wait_for_event_filtered): Likewise.
3550 (store_register): Likewise.
3551 * lynx-low.c (lynx_attach): Likewise.
3552 * mem-break.c (insert_memory_breakpoint): Likewise.
3553 (remove_memory_breakpoint): Likewise.
3554 (delete_fast_tracepoint_jump): Likewise.
3555 (set_fast_tracepoint_jump): Likewise.
3556 (uninsert_fast_tracepoint_jumps_at): Likewise.
3557 (reinsert_fast_tracepoint_jumps_at): Likewise.
3558 * nto-low.c (nto_xfer_memory): Likewise.
3559 (nto_resume): Likewise.
3560
3561 2019-11-20 Luis Machado <luis.machado@linaro.org>
3562
3563 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3564 instead of register count.
3565 * tdesc.c (tdesc_contains_feature): New function.
3566 * tdesc.h (tdesc_contains_feature): New prototype.
3567
3568 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3569
3570 * Makefile.in: Add safe-strerror.c.
3571 * configure: Regenerate.
3572 * configure.ac: Don't source common.host.
3573
3574 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3575
3576 * config.in: Regenerate.
3577 * configure: Regenerate.
3578
3579 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3580
3581 * ax.c (ax_printf): Handle size_t_arg.
3582
3583 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3584
3585 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3586 * mi/mi-main.c (output_cores): Likewise.
3587 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3588 (linux_xfer_osdata_modules): Likewise.
3589 * remote.c (register_remote_support_xml): Likewise.
3590 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3591 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3592
3593 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3594
3595 * configure: Regenerate.
3596 * configure.ac: Remove check for strerror_r.
3597
3598 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3599
3600 * config.in: Regenerate.
3601 * configure: Regenerate.
3602 * configure.ac: Also check for strerror_r.
3603
3604 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3605
3606 * ax.h (debug_agent): Remove duplicate declaration.
3607
3608 2019-10-26 Tom de Vries <tdevries@suse.de>
3609
3610 * linux-aarch64-low.c: Fix typos in comments.
3611 * linux-arm-low.c: Same.
3612 * linux-low.c: Same.
3613 * linux-ppc-low.c: Same.
3614 * proc-service.c: Same.
3615 * regcache.h: Same.
3616 * server.c: Same.
3617 * tracepoint.c: Same.
3618 * win32-low.c: Same.
3619
3620 2019-10-25 Tom Tromey <tromey@adacore.com>
3621
3622 * utils.c (xstrdup): Remove.
3623
3624 2019-10-23 Tom Tromey <tom@tromey.com>
3625
3626 * configure, config.in: Rebuild.
3627
3628 2019-10-23 Tom Tromey <tom@tromey.com>
3629
3630 * configure: Rebuild.
3631 * acinclude.m4: Use m4_include, not sinclude.
3632
3633 2019-10-17 Tom Tromey <tromey@adacore.com>
3634
3635 * configure: Rebuild.
3636 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3637 in AC_CONFIG_FILES invocation.
3638 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3639 invocation.
3640
3641 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3642
3643 * server.c: Include xml-builtin.h.
3644 (get_xml_features): Don't declare xml_builtins here.
3645
3646 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3647
3648 * Makefile.in: Remove references to vec-ipa.o.
3649
3650 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3651
3652 * Makefile.in: Remove references to vec.c.
3653
3654 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3655
3656 * server.c (server_waiting): Change to bool.
3657 (extended_protocol): Likewise.
3658 (response_needed): Likewise.
3659 (exit_requested): Likewise.
3660 (run_once): Likewise.
3661 (report_no_resumed): Likewise.
3662 (non_stop): Likewise.
3663 (disable_packet_vCont): Likewise.
3664 (disable_packet_Tthread): Likewise.
3665 (disable_packet_qC): Likewise.
3666 (disable_packet_qfThreadInfo): Likewise.
3667 (handle_general_set): Update.
3668 (handle_detach): Update.
3669 (handle_monitor_command): Update.
3670 (handle_query): Update.
3671 (captured_main): Update.
3672 (process_serial_event): Update.
3673 * server.h (server_waiting): Change to bool.
3674 (disable_packet_vCont): Likewise.
3675 (disable_packet_Tthread): Likewise.
3676 (disable_packet_qC): Likewise.
3677 (disable_packet_qfThreadInfo): Likewise.
3678 (run_once): Likewise.
3679 (non_stop): Likewise.
3680 * target.c (target_stop_and_wait): Update.
3681
3682 2019-10-02 Tom Tromey <tromey@adacore.com>
3683
3684 * Makefile.in (SFILES): Add common-inferior.c.
3685 (OBS): Add common-inferior.o.
3686 * server.c (startup_with_shell): Don't define.
3687
3688 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3689
3690 * linux-low.c (linux_low_read_btrace): Update for change to
3691 std::vector.
3692
3693 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3694
3695 * debug.c (debug_threads): Remove comment in favor of the header.
3696 * debug.h (using_threads): Add declaration.
3697 (debug_threads): Add comment.
3698 * linux-aarch64-low.c: Include debug.h and remove declaration of
3699 debug_threads.
3700 * nto-low.c: Likewise.
3701 * remote-utils.c: Likewise.
3702 * thread-db.c: Likewise.
3703
3704 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3705
3706 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3707 and powerpc-cell64l-ipa.o.
3708 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3709 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3710 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3711 (spu*-*-*): Remove.
3712
3713 * spu-low.c: Remove file.
3714
3715 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3716 (parse_spufs_run): Remove.
3717 (ppc_get_pc): Remove Cell/B.E. support.
3718 (ppc_set_pc): Likewise.
3719 (ppc_breakpoint_at): Likewise.
3720 (ppc_arch_setup): Likewise.
3721 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3722 tdesc_powerpc_cell32l.
3723 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3724 or init_registers_powerpc_cell32l.
3725 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3726 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3727 or init_registers_powerpc_cell32l.
3728 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3729 (init_registers_powerpc_cell32l): Remove prototype.
3730 (init_registers_powerpc_cell64l): Likewise.
3731
3732 * target.h (struct target_ops): Remove qxfer_spu member.
3733 * server.c (handle_qxfer_spu): Remove.
3734 (qxfer_packets): Remove entry for "spu".
3735 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3736 * linux-low.c (SPUFS_MAGIC): Remove.
3737 (spu_enumerate_spu_ids): Remove.
3738 (linux_qxfer_spu): Remove.
3739 (linux_target_ops): Remove qxfer_spu member.
3740 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3741 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3742 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3743
3744 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3745
3746 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3747 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3748 * config.in: Regenerate.
3749 * configure: Regenerate.
3750
3751 2019-08-15 Tom Tromey <tromey@adacore.com>
3752
3753 * target.c (target_write_memory): Use gdb::byte_vector.
3754
3755 2019-08-15 Tom Tromey <tromey@adacore.com>
3756
3757 * tracepoint.c (write_inferior_data_pointer)
3758 (write_inferior_integer, write_inferior_int8)
3759 (write_inferior_uinteger, m_tracepoint_action_download)
3760 (r_tracepoint_action_download, x_tracepoint_action_download)
3761 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3762 (download_agent_expr, download_tracepoint_1)
3763 (download_trace_state_variables, upload_fast_traceframes): Update.
3764 * server.c (gdb_write_memory): Update.
3765 * remote-utils.c (relocate_instruction): Update.
3766 * proc-service.c (ps_pdwrite): Update.
3767 * mem-break.c (remove_memory_breakpoint)
3768 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3769 (uninsert_fast_tracepoint_jumps_at)
3770 (reinsert_fast_tracepoint_jumps_at): Update.
3771 * linux-x86-low.c (append_insns)
3772 (i386_install_fast_tracepoint_jump_pad)
3773 (amd64_write_goto_address, i386_write_goto_address): Update.
3774 * linux-s390-low.c (append_insns, s390_write_goto_address):
3775 Update.
3776 * linux-ppc-low.c (ppc_relocate_instruction)
3777 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3778 (ppc_write_goto_address): Update.
3779 * linux-aarch64-low.c (append_insns): Update.
3780 * target.h (struct target_ops): Update.
3781 (write_inferior_memory): Don't declare.
3782 * target.c (target_write_memory): Rename from
3783 write_inferior_memory. Remove old target_write_memory.
3784
3785 2019-08-15 Tom Tromey <tromey@adacore.com>
3786
3787 * target.c (write_inferior_memory): Use std::vector.
3788
3789 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3790
3791 PR build/24886
3792 * configure.ac: Drop enable-libmcheck support.
3793 * configure, config.in: Rebuild.
3794 * acinclude.m4: Don't include it.
3795
3796 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3797
3798 * configure.srv: Remove Arm xml files.
3799
3800 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3801
3802 * configure.srv: Add new files. Remove xml generated files.
3803 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3804 registers.
3805 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3806 * linux-aarch32-tdesc.c: New file.
3807 * linux-aarch32-tdesc.h: New file.
3808 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3809 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3810 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3811 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3812 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3813 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3814 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3815 (arm_read_description): Call arm_linux_read_description.
3816 (initialize_low_arch): Don't init registers.
3817 * linux-arm-tdesc.c: New file.
3818 * linux-arm-tdesc.h: New file.
3819
3820 2019-07-10 Alan Hayward <alan.hayward@arm.com>
3821
3822 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3823 Move counter inside for.
3824 (arm_read_description): Check ptrace earlier.
3825 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3826
3827 2019-07-09 Tom Tromey <tom@tromey.com>
3828
3829 * configure: Rebuild.
3830 * configure.ac: Change common to gdbsupport.
3831 * acinclude.m4: Change common to gdbsupport.
3832 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3833 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3834 common to gdbsupport.
3835 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3836 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3837 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3838 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3839 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3840 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3841 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3842 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3843 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3844 common to gdbsupport.
3845
3846 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3847
3848 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3849 defines.
3850 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3851
3852 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3853
3854 * configure.srv: Remove legacy xml.
3855 * linux-aarch64-low.c (initialize_low_arch): Remove
3856 initialize_low_tdesc call.
3857 * linux-aarch64-tdesc-selftest.c: Remove file.
3858 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3859 * linux-x86-low.c (initialize_low_arch): Remove
3860 initialize_low_tdesc call.
3861 * linux-x86-tdesc-selftest.c: Remove file.
3862 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3863
3864 2019-06-20 Tom de Vries <tdevries@suse.de>
3865
3866 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3867 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3868
3869 2019-06-19 Tom de Vries <tdevries@suse.de>
3870
3871 * debug.h (debug_write): Change return type to ssize_t.
3872 * debug.c (debug_write): Same.
3873
3874 2019-06-14 Tom Tromey <tom@tromey.com>
3875
3876 * configure.ac: Use new path to gnulib.
3877 * configure: Rebuild.
3878 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3879 to gnulib.
3880
3881 2019-06-11 Tom Tromey <tom@tromey.com>
3882
3883 * Makefile.in (SFILES): Add alloc.c.
3884 (OBS): Add alloc.o.
3885 (IPA_OBJS): Add alloc-ipa.o.
3886 (alloc-ipa.o): New target.
3887 (%.o: ../%.c): New pattern rule.
3888
3889 2019-06-10 Tom Tromey <tromey@adacore.com>
3890
3891 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3892 end warning with a newline.
3893 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3894 newline.
3895 * thread-db.c (attach_thread): Don't end warning with a newline.
3896 (thread_db_notice_clone): Likewise.
3897 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3898 newline.
3899 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3900 end warning with a newline.
3901
3902 2019-06-04 Pedro Alves <palves@redhat.com>
3903
3904 * server.c (captured_main): Use make_unique_xstrdup.
3905
3906 2019-06-02 Tom Tromey <tom@tromey.com>
3907
3908 * gdbreplay.c (fromhex): Remove.
3909 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3910
3911 2019-05-29 Tom Tromey <tromey@adacore.com>
3912
3913 * configure: Rebuild.
3914
3915 2019-05-06 Kevin Buettner <kevinb@redhat.com>
3916
3917 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3918 sign extension code on 32-bit builds.
3919
3920 2019-05-03 Eli Zaretskii <eliz@gnu.org>
3921
3922 * remote-utils.c:
3923 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3924
3925 2019-04-19 Tom Tromey <tom@tromey.com>
3926
3927 * server.c (struct vstop_notif): Derive from notif_event.
3928 <base>: Remove.
3929 (queue_stop_reply): Update.
3930 (remove_all_on_match_ptid): Change type. Rewrite.
3931 (discard_queued_stop_replies): Rewrite.
3932 (in_queued_stop_replies_ptid): Change type.
3933 (in_queued_stop_replies): Rewrite.
3934 (notif_stop): Update.
3935 (queue_stop_reply_callback): Update.
3936 (captured_main): Don't call initialize_notif.
3937 (push_stop_notification): Update.
3938 * notif.c (notif_write_event, handle_notif_ack)
3939 (notif_event_enque, notif_push): Update.
3940 (notif_event_xfree, initialize_notif): Remove.
3941 * notif.h (struct notif_event): Include <list>, not
3942 "common/queue.h".
3943 (struct notif_server) <queue>: Now a std::list.
3944 (notif_event_p): Remove typedef.
3945 (initialize_notif): Don't declare.
3946 (struct notif_event): Add virtual destructor.
3947
3948 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3949
3950 * ax.c (ax_vdebug): Call debug_printf.
3951 * debug.c (debug_write): New function.
3952 * debug.h (debug_write): New declaration.
3953 * linux-low.c (sigchld_handler): Call debug_write.
3954
3955 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3956
3957 * debug.c (debug_set_output): New function.
3958 (debug_vprintf): Send output to debug_file.
3959 (debug_flush): Likewise.
3960 * debug.h (debug_set_output): New declaration.
3961 * server.c (handle_monitor_command): Add debug-file option.
3962 (captured_main): Likewise.
3963
3964 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3965
3966 * debug.c (remote_debug): Add definition.
3967 * debug.h (remote_debug): Add declaration.
3968 * hostio.c (remote_debug): Remove declaration.
3969 * remote-utils.c (struct ui_file): Likewise.
3970 (remote_debug): Likewise.
3971 * remote-utils.h (remote_debug): Likewise,
3972 * server.c (remote_debug): Remove definition.
3973
3974 2019-04-10 Kevin Buettner <kevinb@redhat.com>
3975
3976 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3977 when using a 64-bit gdbserver.
3978
3979 2019-04-09 Tom Tromey <tromey@adacore.com>
3980
3981 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3982
3983 2019-04-08 Tom Tromey <tom@tromey.com>
3984
3985 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3986 throw.
3987 (linux_resume_one_lwp): Likewise.
3988
3989 2019-04-08 Tom Tromey <tom@tromey.com>
3990
3991 * gdbreplay.c: Update.
3992 * linux-low.c: Update.
3993 * server.c: Update.
3994
3995 2019-04-08 Tom Tromey <tom@tromey.com>
3996
3997 * server.c: Use C++ exception handling.
3998 * linux-low.c: Use C++ exception handling.
3999 * gdbreplay.c: Use C++ exception handling.
4000
4001 2019-04-08 Tom Tromey <tom@tromey.com>
4002
4003 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4004 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4005 (captured_main, main): Update.
4006 * gdbreplay.c (main): Update.
4007
4008 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4009
4010 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4011 value in argument pointer, return 1 if the entry is found and 0
4012 otherwise. Move comment.
4013 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4014 * linux-low.h (linux_get_auxv): Declare.
4015 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4016
4017 2019-04-05 Tom Tromey <tromey@adacore.com>
4018
4019 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4020 variables.
4021
4022 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4023
4024 * linux-low.c (AT_HWCAP2): Add define if not already included.
4025
4026 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4027
4028 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4029 (aarch64_arch_setup): Call linux_get_hwcap.
4030 * linux-arm-low.c (arm_get_hwcap): Remove function.
4031 (arm_read_description): Call linux_get_hwcap.
4032 * linux-low.c (linux_get_auxv): New function.
4033 (linux_get_hwcap): Likewise.
4034 (linux_get_hwcap2): Likewise.
4035 * linux-low.h (linux_get_hwcap): New declaration.
4036 (linux_get_hwcap2): Likewise.
4037 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4038 (ppc_arch_setup): Call linux_get_hwcap.
4039 * linux-s390-low.c (s390_get_hwcap): Remove function.
4040 (s390_arch_setup): Call linux_get_hwcap.
4041
4042 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4043 Jiong Wang <jiong.wang@arm.com>
4044
4045 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4046 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4047 to fail.
4048 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4049
4050 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4051 Jiong Wang <jiong.wang@arm.com>
4052
4053 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4054 (aarch64_get_hwcap): New function.
4055 (aarch64_arch_setup): Read APIA hwcap.
4056
4057 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4058 Jiong Wang <jiong.wang@arm.com>
4059
4060 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4061 (initialize_low_tracepoint): Likewise.
4062 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4063 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4064 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4065 (aarch64_linux_read_description): Likewise.
4066 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4067
4068 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4069
4070 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4071 i386_create_target_description for 'segments' parameter.
4072 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4073 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4074 * win32-i386-low.c (i386_arch_setup): Likewise.
4075
4076 2019-03-12 Tom Tromey <tromey@adacore.com>
4077
4078 * linux-low.c (iterate_over_lwps): Update.
4079
4080 2019-03-06 Tom Tromey <tom@tromey.com>
4081
4082 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4083 (captured_main): Use SCOPE_EXIT.
4084
4085 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4086
4087 * configure.srv: Use '$enable_unittest' instead of '$development'
4088 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4089 case.
4090
4091 2019-02-27 Tom Tromey <tromey@adacore.com>
4092
4093 * gdbreplay.c (logchar): Handle \r\n.
4094
4095 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4096
4097 * linux-low.c (linux_attach): Add process before lwp.
4098 * server.c (attach_inferior): Check if already attached.
4099
4100 2019-02-07 Tom Tromey <tom@tromey.com>
4101
4102 * x86-tdesc.h: Rename include guard.
4103 * x86-low.h: Add include guard.
4104 * wincecompat.h: Rename include guard.
4105 * win32-low.h: Add include guard.
4106 * utils.h: Rename include guard.
4107 * tracepoint.h: Rename include guard.
4108 * tdesc.h: Rename include guard.
4109 * target.h: Rename include guard.
4110 * server.h: Rename include guard.
4111 * remote-utils.h: Rename include guard.
4112 * regcache.h: Rename include guard.
4113 * nto-low.h: Rename include guard.
4114 * notif.h: Add include guard.
4115 * mem-break.h: Rename include guard.
4116 * lynx-low.h: Add include guard.
4117 * linux-x86-tdesc.h: Add include guard.
4118 * linux-s390-tdesc.h: Add include guard.
4119 * linux-ppc-tdesc-init.h: Add include guard.
4120 * linux-low.h: Add include guard.
4121 * linux-aarch64-tdesc.h: Add include guard.
4122 * linux-aarch32-low.h: Add include guard.
4123 * inferiors.h: Rename include guard.
4124 * i387-fp.h: Rename include guard.
4125 * hostio.h: Rename include guard.
4126 * gdbthread.h: Rename include guard.
4127 * gdb_proc_service.h: Rename include guard.
4128 * event-loop.h: Rename include guard.
4129 * dll.h: Rename include guard.
4130 * debug.h: Rename include guard.
4131 * ax.h: Rename include guard.
4132
4133 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4134
4135 PR gdb/23985
4136 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4137 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4138
4139 2019-01-25 Tom Tromey <tom@tromey.com>
4140
4141 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4142
4143 2019-01-25 Tom Tromey <tom@tromey.com>
4144
4145 * win32-low.c: Fix common/ includes.
4146 * win32-i386-low.c: Fix common/ includes.
4147 * tracepoint.c: Fix common/ includes.
4148 * thread-db.c: Fix common/ includes.
4149 * target.h: Fix common/ includes.
4150 * symbol.c: Fix common/ includes.
4151 * spu-low.c: Fix common/ includes.
4152 * server.h: Fix common/ includes.
4153 * server.c: Fix common/ includes.
4154 * remote-utils.c: Fix common/ includes.
4155 * regcache.h: Fix common/ includes.
4156 * regcache.c: Fix common/ includes.
4157 * nto-x86-low.c: Fix common/ includes.
4158 * notif.h: Fix common/ includes.
4159 * mem-break.h: Fix common/ includes.
4160 * lynx-low.c: Fix common/ includes.
4161 * lynx-i386-low.c: Fix common/ includes.
4162 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4163 * linux-x86-low.c: Fix common/ includes.
4164 * linux-low.c: Fix common/ includes.
4165 * inferiors.h: Fix common/ includes.
4166 * i387-fp.c: Fix common/ includes.
4167 * hostio.c: Fix common/ includes.
4168 * hostio-errno.c: Fix common/ includes.
4169 * gdbthread.h: Fix common/ includes.
4170 * gdbreplay.c: Fix common/ includes.
4171 * fork-child.c: Fix common/ includes.
4172 * event-loop.c: Fix common/ includes.
4173 * ax.c:
4174 (enum gdb_agent_op): Fix common/ includes.
4175
4176 2019-01-21 Tom Tromey <tom@tromey.com>
4177
4178 * tracepoint.c: Fix includes.
4179 * remote-utils.c: Fix includes.
4180 * linux-x86-low.c: Fix includes.
4181
4182 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4183
4184 * gdbreplay.c (gdbreplay_version): Update copyright year in
4185 version message.
4186 * server.c (gdbserver_version): Likewise.
4187
4188 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4189
4190 * linux-low.c (add_lwp): Switch ordering.
4191
4192 2018-11-29 Tom Tromey <tom@tromey.com>
4193
4194 * win32-low.c (win32_join): Take pid, not process.
4195 * target.h (struct target_ops) <join>: Change argument type.
4196 (join_inferior): Change argument name.
4197 * spu-low.c (spu_join): Take pid, not process.
4198 * server.c (handle_detach): Preserve pid before destroying
4199 process.
4200 * lynx-low.c (lynx_join): Take pid, not process.
4201 * linux-low.c (linux_join): Take pid, not process.
4202
4203 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4204
4205 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4206 (aarch64_cannot_fetch_register): Likewise.
4207 (struct linux_target_ops): Update references.
4208
4209 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4210
4211 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4212
4213 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4214
4215 * configure.srv (ipa_ppc_linux_regobj): Add
4216 powerpc-isa207-htm-vsx32l-ipa.o and
4217 powerpc-isa207-htm-vsx64l-ipa.o.
4218 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4219 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4220 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4221 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4222 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4223 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4224 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4225 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4226 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4227 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4228 (init_registers_powerpc_isa207_htm_vsx32l)
4229 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4230 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4231 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4232 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4233 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4234 (ppc_store_tm_ctarregset): New functions.
4235 (ppc_regsets): Add entries for HTM regsets.
4236 (ppc_arch_setup): Set htm in features struct when needed. Set
4237 sizes for the HTM regsets.
4238 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4239 (initialize_low_arch): Call
4240 init_registers_powerpc_isa207_htm_vsx32l and
4241 init_registers_powerpc_isa207_htm_vsx64l.
4242 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4243 PPC_TDESC_ISA207_HTM_VSX.
4244 (initialize_low_tracepoint): Call
4245 init_registers_powerpc_isa207_htm_vsx32l and
4246 init_registers_powerpc_isa207_htm_vsx64l.
4247
4248 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4249
4250 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4251 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4252 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4253 (ppc_store_pmuregset): New functions.
4254 (ppc_regsets): Add entries for ebb and pmu regsets.
4255 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4256 pmu regsets are available. Set sizes for these regsets.
4257
4258 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4259
4260 * configure.srv (ipa_ppc_linux_regobj): Add
4261 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4262 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4263 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4264 rs6000/powerpc-isa207-vsx32l.xml, and
4265 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4266 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4267 <PPC_TDESC_ISA207_VSX>: New enum value.
4268 (init_registers_powerpc_isa207_vsx32l): Declare.
4269 (init_registers_powerpc_isa207_vsx64l): Declare.
4270 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4271 (ppc_store_tarregset): New function.
4272 (ppc_regsets): Add entry for the TAR regset.
4273 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4274 size for the TAR regsets.
4275 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4276 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4277 and init_registers_powerpc_isa207_vsx64l.
4278 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4279 (initialize_low_tracepoint): Call
4280 init_registers_powerpc_isa207_vsx32l and
4281 init_registers_powerpc_isa207_vsx64l.
4282
4283 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4284 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4285
4286 * configure.srv (ipa_ppc_linux_regobj): Add
4287 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4288 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4289 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4290 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4291 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4292 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4293 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4294 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4295 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4296 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4297 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4298 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4299 (ppc_hwcap): Add comment.
4300 (ppc_hwcap2): New global.
4301 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4302 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4303 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4304 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4305 when needed. Set sizes for the the DSCR and PPR regsets.
4306 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4307 (initialize_low_arch): Call
4308 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4309 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4310 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4311 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4312 (initialize_low_tracepoint): Call
4313 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4314 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4315
4316 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4317
4318 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4319
4320 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4321 Simon Marchi <simark@simark.ca>
4322
4323 * acinclude.m4: Include "../selftest.m4".
4324 * configure: Regenerate.
4325 * configure.ac: Use "GDB_AC_SELFTEST".
4326 * configure.srv: Use "$enable_unittests" instead of
4327 "$development" when checking whether unit tests have been
4328 enabled.
4329 * server.c (captured_main): Update message informing that
4330 selftests have been disabled.
4331
4332 2018-10-04 Tom Tromey <tom@tromey.com>
4333
4334 * configure: Rebuild.
4335
4336 2018-10-04 Tom Tromey <tom@tromey.com>
4337
4338 * server.c (handle_status): Rename inner "thread".
4339 (process_serial_event): Declare "res" in 'm' case.
4340 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4341 (iterate_over_lwps): Rename inner "thread".
4342 (linux_qxfer_libraries_svr4): Rename inner "len".
4343 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4344
4345 2018-10-01 Gary Benson <gbenson@redhat.com>
4346
4347 * gdb_proc_service.h: Moved common code to
4348 common/gdb_proc_service.h.
4349
4350 2018-10-01 Gary Benson <gbenson@redhat.com>
4351
4352 * gdb_proc_service.h: Synchronize comments and whitespace with
4353 GDB's version of this file.
4354
4355 2018-09-25 Tom Tromey <tom@tromey.com>
4356
4357 * configure: Rebuild.
4358 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4359
4360 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4361
4362 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4363 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4364 ($(IPA_LIB)): Sort IPA_OBJS.
4365
4366 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4367
4368 * Makefile.in: Remove references to $(ADD_DEPS).
4369
4370 2018-09-16 Tom Tromey <tom@tromey.com>
4371
4372 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4373 variables.
4374 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4375 variables.
4376
4377 2018-09-05 Tom Tromey <tom@tromey.com>
4378
4379 * configure: Rebuild.
4380
4381 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4382
4383 PR build/23399
4384 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4385
4386 2018-08-27 Tom Tromey <tom@tromey.com>
4387
4388 PR build/23087:
4389 * configure: Rebuild.
4390
4391 2018-08-27 Tom Tromey <tom@tromey.com>
4392
4393 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4394 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4395 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4396 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4397 (s390x_emit_stack_adjust): Add casts to unsigned char.
4398
4399 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 PR gdb/23374
4402 PR gdb/23375
4403 * server.h (struct client_state) <disable_randomization>:
4404 Initialize to 1.
4405
4406 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4407
4408 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4409 variable.
4410 (mips_supply_ptrace_register): Likewise.
4411
4412 2018-07-22 Tom Tromey <tom@tromey.com>
4413
4414 * configure: Rebuild.
4415
4416 2018-07-22 Tom Tromey <tom@tromey.com>
4417
4418 * win32-low.c (win32_create_inferior): Remove unused variables.
4419 * gdbreplay.c (remote_open): Remove unused variable.
4420 * remote-utils.c (remote_prepare): Remove unused variable.
4421 * x86-tdesc.h (X86_TDESC_H): Define.
4422 (amd64_expedite_regs): Define conditionally.
4423 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4424 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4425 * remote-utils.c (readchar): Remove unused variable.
4426
4427 2018-07-13 Pedro Alves <palves@redhat.com>
4428
4429 * linux-low.c (linux_kill): Change parameter to process_info
4430 pointer instead of pid. Adjust.
4431 * lynx-low.c (lynx_kill): Likewise.
4432 * nto-low.c (nto_kill): Likewise.
4433 * spu-low.c (spu_kill): Likewise.
4434 * win32-low.c (win32_kill): Likewise.
4435 * server.c (handle_v_kill, kill_inferior_callback)
4436 (detach_or_kill_for_exit): Adjust.
4437 * target.c (kill_inferior): Change parameter to process_info
4438 pointer instead of pid. Adjust.
4439 * target.h (struct target_ops) <kill>: Change parameter to
4440 process_info pointer instead of pid. Adjust all implementations
4441 and callers.
4442 (kill_inferior): Likewise.
4443
4444 2018-07-13 Pedro Alves <palves@redhat.com>
4445
4446 * linux-low.c (linux_detach, linux_join): Change parameter to
4447 process_info pointer instead of pid. Adjust.
4448 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4449 * nto-low.c (nto_detach): Likewise.
4450 * spu-low.c (spu_detach, spu_join): Likewise.
4451 * win32-low.c (win32_detach, win32_join): Likewise.
4452 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4453 * target.h (struct target_ops) <detach, join>: Change parameter to
4454 process_info pointer instead of pid. Adjust all implementations
4455 and callers.
4456 (detach_inferior, join_inferior): Rename 'pid' parameter to
4457 'proc'.
4458
4459 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4460 Jan Kratochvil <jan.kratochvil@redhat.com>
4461 Paul Fertser <fercerpav@gmail.com>
4462 Tsutomu Seki <sekiriki@gmail.com>
4463
4464 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4465 (OBS): Add 'common/netstuff.o'.
4466 (GDBREPLAY_OBS): Likewise.
4467 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4468 (remote_open): Implement support for IPv6
4469 connections.
4470 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4471 and 'wspiapi.h'.
4472 (handle_accept_event): Accept connections from IPv6 sources.
4473 (remote_prepare): Handle IPv6-style hostnames; implement
4474 support for IPv6 connections.
4475 (remote_open): Implement support for printing connections from
4476 IPv6 sources.
4477
4478 2018-07-11 Pedro Alves <palves@redhat.com>
4479
4480 PR gdb/23377
4481 * mem-break.c (any_persistent_commands): Add process_info
4482 parameter and use it instead of relying on the current process.
4483 Change return type to bool.
4484 * mem-break.h (any_persistent_commands): Add process_info
4485 parameter and change return type to bool.
4486 * server.c (handle_detach): Remove require_running_or_return call.
4487 Look up the process_info for the process we're about to detach.
4488 If not found, return back error to GDB. Adjust
4489 any_persistent_commands call to pass down a process pointer.
4490
4491 2018-07-11 Pedro Alves <palves@redhat.com>
4492
4493 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4494 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4495 instead of collect_register_by_name.
4496 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4497 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4498
4499 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4500 Pedro Alves <palves@redhat.com>
4501
4502 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4503
4504 2018-07-03 Tom Tromey <tom@tromey.com>
4505
4506 * linux-low.c: Update.
4507 * lynx-low.c: Update.
4508 * mem-break.c: Update.
4509 * nto-low.c: Update.
4510 * remote-utils.c: Update.
4511 * server.c: Update.
4512 * spu-low.c: Update.
4513 * target.c: Update.
4514 * win32-low.c: Update.
4515
4516 2018-07-03 Tom Tromey <tom@tromey.com>
4517
4518 * server.c: Update.
4519
4520 2018-07-03 Tom Tromey <tom@tromey.com>
4521
4522 * linux-low.c: Update.
4523
4524 2018-07-03 Tom Tromey <tom@tromey.com>
4525
4526 * target.c: Update.
4527
4528 2018-07-03 Tom Tromey <tom@tromey.com>
4529
4530 * linux-low.c: Update.
4531 * linux-mips-low.c: Update.
4532 * lynx-low.c: Update.
4533 * nto-low.c: Update.
4534 * remote-utils.c: Update.
4535 * server.c: Update.
4536 * spu-low.c: Update.
4537 * target.c: Update.
4538 * thread-db.c: Update.
4539
4540 2018-07-03 Tom Tromey <tom@tromey.com>
4541
4542 * linux-low.c: Update.
4543 * linux-mips-low.c: Update.
4544 * lynx-low.c: Update.
4545 * mem-break.c: Update.
4546 * nto-low.c: Update.
4547 * remote-utils.c: Update.
4548 * server.c: Update.
4549 * spu-low.c: Update.
4550 * target.c: Update.
4551 * tracepoint.c: Update.
4552
4553 2018-07-03 Tom Tromey <tom@tromey.com>
4554
4555 * linux-low.c: Update.
4556 * linux-ppc-low.c: Update.
4557 * linux-x86-low.c: Update.
4558 * proc-service.c: Update.
4559 * server.c: Update.
4560 * spu-low.c: Update.
4561 * thread-db.c: Update.
4562 * win32-low.c: Update.
4563
4564 2018-07-03 Tom Tromey <tom@tromey.com>
4565
4566 * linux-low.c: Update.
4567 * lynx-low.c: Update.
4568 * nto-low.c: Update.
4569 * remote-utils.c: Update.
4570 * spu-low.c: Update.
4571 * thread-db.c: Update.
4572 * win32-low.c: Update.
4573
4574 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4575
4576 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4577 parameter in call to 'amd64_create_target_description'.
4578
4579 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4580
4581 * x86-tdesc.h: Remove executable permission flag.
4582
4583 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4584
4585 * configure.ac: Remove AC_PREREQ, add missing quoting.
4586 * configure: Re-generate.
4587 * config.in: Re-generate.
4588 * aclocal.m4: Re-generate.
4589
4590 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4591
4592 * tracepoint.h (current_traceframe): Remove declaration.
4593
4594 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4595
4596 * linux-aarch64-low.c (is_sve_tdesc): New function.
4597 (aarch64_sve_regs_copy_to_regcache): Likewise.
4598 (aarch64_sve_regs_copy_from_regcache): Likewise.
4599 (aarch64_regs_info): Add SVE checks.
4600 (initialize_low_arch): Initialize SVE.
4601
4602 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4603
4604 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4605
4606 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4607
4608 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4609 (initialize_low_tracepoint): Likewise
4610 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4611 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4612 param.
4613 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4614 checks.
4615 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4616
4617 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4618
4619 * server.h (PBUFSIZ): Increase size
4620
4621 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4622
4623 * regcache.c (regcache::raw_compare): New function.
4624 * regcache.h (regcache::raw_compare): New declaration.
4625
4626 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4627
4628 * regcache.c (new_register_cache): Use new.
4629 (free_register_cache): Use delete.
4630 (register_data): Use const.
4631 (supply_register): Move body inside regcache.
4632 (regcache::raw_supply): New override function.
4633 (collect_register): Move body inside regcache.
4634 (regcache::raw_collect): New override function.
4635 (regcache::get_register_status): New override function.
4636 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4637
4638 2018-06-09 Tom Tromey <tom@tromey.com>
4639
4640 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4641 declare queue.
4642 (event_queue): Use std::queue.
4643 (gdb_event_xfree): Remove.
4644 (initialize_event_loop, process_event, wait_for_event): Update.
4645
4646 2018-06-08 Stan Cox <scox@redhat.com>
4647
4648 * win32-low.c (win32_create_inferior): last_ptid and last_status
4649 moved to client_state.
4650
4651 2018-06-08 Pedro Alves <palves@redhat.com>
4652
4653 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4654 common/common-exceptions.o, common/common-utils.o,
4655 common/errors.o, common/print-utils.o and utils.o.
4656 * gdbreplay.c: Include "common-defs.h" instead of the two
4657 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4658 string.h or alloca.h.
4659 (perror_with_name): Delete.
4660 (remote_open): Use xstrdup instead of strdup.
4661 (main): Rename to ...
4662 (captured_main): ... this.
4663 (main): New.
4664
4665 2018-06-08 Tom Tromey <tom@tromey.com>
4666
4667 * linux-low.c (linux_low_read_btrace): Update.
4668
4669 2018-06-04 Stan Cox <scox@redhat.com>
4670
4671 * server.h (struct client_state): New.
4672 * server.c (cont_thread, general_thread, multi_process)
4673 (report_fork_events, report_vfork_events, report_exec_events)
4674 (report_thread_events, swbreak_feature, hwbreak_feature)
4675 (vCont_supported, disable_randomization, pass_signals)
4676 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4677 Moved to client_state.
4678 * remote-utils.c (remote_debug, noack_mode)
4679 (transport_is_reliable): Moved to client_state.
4680 * tracepoint.c (current_traceframe): Moved to client_state.
4681
4682 Update all callers.
4683 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4684 linux-low.c, remote-utils.h, target.c: Use client_state.
4685
4686 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4687
4688 * configure.srv: Add new c/h file.
4689
4690 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4691
4692 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4693 null VQ.
4694
4695 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4696
4697 * gdb.arch/mips-fpregset-core.exp: New test.
4698 * gdb.arch/mips-fpregset-core.c: New test source.
4699
4700 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4701
4702 PR server/23198
4703 * hostio.c (require_int): Do not report overflow for integers
4704 between 0xfffffff and 0x7fffffff.
4705
4706 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4707
4708 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4709 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4710 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4711 functions.
4712 (the_low_target): Wire them.
4713
4714 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4715
4716 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4717 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4718 mode. Call collect_register_by_name with vscr using
4719 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4720 (ppc_store_vrregset): Add and set vscr_offset variable as in
4721 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4722 vscr_offset.
4723
4724 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4725
4726 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4727 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4728 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4729
4730 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4731
4732 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4733 (ppc_store_vsxregset): Likewise.
4734 (ppc_fill_vrregset): Likewise.
4735 (ppc_store_vrregset): Likewise.
4736 (ppc_fill_evrregset): Likewise.
4737 (ppc_store_evrregset): Likewise.
4738 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4739 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4740 needed.
4741
4742 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4743
4744 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4745 wordsize of the inferior. Call ppc_linux_target_wordsize.
4746
4747 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4748
4749 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4750 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4751 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4752 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4753 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4754 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4755 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4756 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4757 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4758 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4759 (tdesc_powerpc_e500l): Remove.
4760 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4761 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4762 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4763 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4764 linux-ppc-tdesc.h.
4765 (ppc_arch_setup): Remove target description matching code. Fill a
4766 ppc_linux_features struct and call ppc_linux_match_description
4767 with it.
4768
4769 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4770
4771 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4772 width of the requested register exceeds the width of the
4773 `ptrace' data type.
4774 (mips_cannot_store_register): Likewise.
4775
4776 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4777
4778 * linux-mips-low.c (mips_fetch_register): New function. Update
4779 preceding comment.
4780 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4781 (the_low_target): Wire `mips_fetch_register'.
4782
4783 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4784
4785 * lynx-i386-low.c (LYNXOS_178): New macro.
4786 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4787 the layout on LynxOS-178.
4788 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4789 handle floating point registers that are not supported by
4790 LynxOS-178.
4791
4792 2018-05-10 Tom Tromey <tom@tromey.com>
4793
4794 * configure: Rebuild.
4795
4796 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4797
4798 PR server/23158:
4799 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4800 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4801 Use it to set the expedite_regs field in the given tdesc.
4802 * x86-tdesc.h: New file.
4803 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4804 Adjust following the addition of the new expedite_regs parameter
4805 to init_target_desc.
4806 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4807 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4808 (i386_linux_read_description, amd64_linux_read_description):
4809 Adjust following the addition of the new expedite_regs parameter
4810 to init_target_desc.
4811 * lynx-i386-low.c: #include "x86-tdesc.h".
4812 (lynx_i386_arch_setup): Adjust following the addition of the new
4813 expedite_regs parameter to init_target_desc.
4814 * nto-x86-low.c: #include "x86-tdesc.h".
4815 (nto_x86_arch_setup): Adjust following the addition of the new
4816 expedite_regs parameter to init_target_desc.
4817 * win32-i386-low.c: #include "x86-tdesc.h".
4818 (i386_arch_setup): Adjust following the addition of the new
4819 expedite_regs parameter to init_target_desc.
4820
4821 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4822
4823 PR server/23158:
4824 * win32-low.c (win32_create_inferior): Add call to my_wait
4825 setting last_status global.
4826
4827 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4828
4829 PR server/23158:
4830 * win32-low.c (create_process): Only call gdb_tilde_expand if
4831 inferior_cwd is not NULL.
4832
4833 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4834
4835 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4836 registers to the cache if their values have changed.
4837 (i387_xsave_to_cache): Provide default values for x87 control
4838 registers when these features are available, but disabled.
4839 * regcache.c (supply_register_by_name_zeroed): New function.
4840 * regcache.h (supply_register_by_name_zeroed): Declare new
4841 function.
4842
4843 2018-05-07 Tom Tromey <tom@tromey.com>
4844
4845 * configure: Rebuild.
4846
4847 2018-05-04 Tom Tromey <tom@tromey.com>
4848
4849 * configure: Rebuild.
4850
4851 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4852 Pedro Alves <palves@redhat.com>
4853
4854 * linux-aarch64-low.c (aarch64_stopped_data_address):
4855 Likewise.
4856
4857 2018-04-27 Tom Tromey <tom@tromey.com>
4858
4859 * configure: Rebuild.
4860
4861 2018-04-23 Tom Tromey <tom@tromey.com>
4862
4863 * configure: Rebuild.
4864
4865 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4866
4867 * Makefile.in (depcomp): Add "..".
4868 (all_deps_files): New and use it.
4869
4870 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4871
4872 * configure.srv (aarch64*-*-linux*): Don't include xml.
4873 (i[34567]86-*-cygwin*): Likewise.
4874 (i[34567]86-*-linux*): Likewise.
4875 (i[34567]86-*-lynxos*): Likewise.
4876 (i[34567]86-*-mingw32ce*): Likewise.
4877 (i[34567]86-*-mingw*): Likewise.
4878 (i[34567]86-*-nto*): Likewise.
4879 (tic6x-*-uclinux): Likewise.
4880 (x86_64-*-linux*): Likewise.
4881 (x86_64-*-mingw*): Likewise.
4882 (x86_64-*-cygwin*): Likewise.
4883
4884 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4885
4886 * tdesc.c: Remove xml parameter.
4887
4888 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4889
4890 * server.c (get_features_xml): Remove cast.
4891 * tdesc.c (void target_desc::accept): Fill in function.
4892 (tdesc_get_features_xml): Remove old xml creation.
4893 (print_xml_feature::visit_pre): Add xml vistor.
4894 * tdesc.h (struct target_desc): Make xmltarget mutable.
4895 (tdesc_get_features_xml): Remove declaration.
4896
4897 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4898
4899 * tdesc.c (tdesc_architecture_name): Add new function.
4900 (tdesc_osabi_name): Likewise.
4901 (tdesc_get_features_xml): Use new functions.
4902
4903 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4904
4905 * tdesc.c (tdesc_create_flags): Remove.
4906 (tdesc_add_flag): Likewise.
4907 (tdesc_named_type): Likewise.
4908 (tdesc_create_union): Likewise.
4909 (tdesc_create_struct): Likewise.
4910 (tdesc_create_vector): Likewise.
4911 (tdesc_add_bitfield): Likewise.
4912 (tdesc_add_field): Likewise.
4913 (tdesc_set_struct_size): Likewise.
4914
4915 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4916
4917 * tdesc.c (~target_desc): Remove implictly deleted items.
4918 (init_target_desc): Iterate all features.
4919 (tdesc_get_features_xml): Use vector.
4920 (tdesc_create_feature): Create feature.
4921 * tdesc.h (tdesc_feature) Remove
4922 (target_desc): Add features.
4923
4924 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4925
4926 * Makefile.in: Add common/tdesc.c
4927 * tdesc.c (init_target_desc): init all reg_defs from register
4928 vector.
4929 (tdesc_create_reg): Create tdesc_reg.
4930 * tdesc.h (tdesc_feature): Add register vector.
4931
4932 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4933
4934 * tdesc.h (struct target_desc) <features>: Change type to
4935 std::vector<std::string>.
4936 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4937 changes.
4938 (tdesc_get_features_xml): Likewise.
4939 (tdesc_create_feature): Likewise.
4940
4941 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4942
4943 * regcache.c (find_register_by_number): Return a ref.
4944 (find_regno): Use references.
4945 (register_size): Likewise.
4946 (register_data): Likewise.
4947 * tdesc.c (target_desc::~target_desc): Remove free calls.
4948 (target_desc::operator==): Use std::vector compare.
4949 (init_target_desc): Use reference.
4950 (tdesc_create_reg): Use reg constructors.
4951 * tdesc.h (struct target_desc): Replace pointer with object.
4952
4953 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4954
4955 * regcache.c (find_register_by_number): Make static.
4956 (find_regno): Use find_register_by_number
4957 * regcache.h (struct reg): Remove declaration.
4958
4959 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4960
4961 * tdesc.c (target_desc::~target_desc): Move to here.
4962 (target_desc::operator==): Likewise.
4963 * tdesc.h (target_desc::~target_desc): Move from here.
4964 (target_desc::operator==): Likewise.
4965
4966 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4967
4968 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4969
4970 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4971
4972 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4973 S390_TDESC_GS.
4974 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4975 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4976 and init_registers_s390_gs_linux64.
4977
4978 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4979
4980 * linux-s390-low.c (s390_fill_gs): Remove function.
4981 (s390_fill_gsbc): Remove function.
4982 (s390_regsets): Set fill functions for the guarded storage regsets
4983 to NULL.
4984
4985 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4986
4987 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4988 the word size. Add comment.
4989 (s390_get_wordsize): New function.
4990 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4991 pswm with it. Instead, use s390_get_wordsize to determine the
4992 word size first and derive the correct tdesc from that directly.
4993
4994 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4995
4996 * Makefile.in: Include silent-rules.mk.
4997 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4998 (COMPILE): Add ECHO_CXX.
4999 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5000 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5001 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5002 (version-generated.c): Add ECHO_GEN.
5003 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5004 (IPAGENT_COMPILE): Add ECHO_CXX.
5005 (%-generated.c): Add ECHO_REGDAT.
5006
5007 2018-03-14 Tom Tromey <tom@tromey.com>
5008
5009 PR cli/14977:
5010 * ax.c (ax_printf): Special case for NULL.
5011
5012 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5013
5014 * linux-low.c (linux_qxfer_libraries_svr4): Use
5015 xml_escape_text_append.
5016
5017 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5018
5019 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5020
5021 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5022
5023 * server.c (handle_general_set): Remove unnecessary xstrdup.
5024
5025 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5026
5027 * server.c (parse_debug_format_options): Adjust to
5028 delim_string_to_char_ptr_vec changes.
5029 * thread-db.c (thread_db_load_search): Adjust to
5030 dirnames_to_char_ptr_vec changes.
5031
5032 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5033
5034 * target.h (target_enable_btrace, target_disable_btrace)
5035 (target_read_btrace, target_read_btrace_conf): Turn macro into
5036 inline function. Throw error if target method is not defined.
5037 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5038 check for btrace target method. Be prepared to handle exceptions
5039 from btrace target methods.
5040
5041 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5042
5043 * server.c (captured_main): Change order of error message printed
5044 when the current working directory cannot be found.
5045
5046 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5047
5048 * server.c: Include "filenames.h" and "pathstuff.h".
5049 (program_name): Delete variable.
5050 (program_path): New anonymous class.
5051 (get_exec_wrapper): Use "program_path" instead of
5052 "program_name".
5053 (handle_v_run): Likewise.
5054 (captured_main): Likewise.
5055 (process_serial_event): Likewise.
5056
5057 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5058
5059 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5060 (OBJS): Add "pathstuff.o".
5061 * server.c (current_directory): New global variable.
5062 (captured_main): Initialize "current_directory".
5063
5064 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5065
5066 * tdesc.c: Use common/tdesc.h.
5067 * tdesc.h: Likewise.
5068
5069 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5070 Simon Marchi <simon.marchi@ericsson.com>
5071
5072 * Makefile.in: Switch order of make rules.
5073
5074 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5075
5076 * Makefile.in: Add common directory in build.
5077 * configure.ac: Add common reference.
5078 * configure: Regenerate.
5079
5080 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5081
5082 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5083 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5084 * spu-low.c (spu_target_ops): Likewise.
5085 * win32-low.c (win32_target_ops): Likewise.
5086 * server.c (supported_btrace_packets): Report packets unconditionally.
5087 * target.h (target_ops) <supports_btrace>: Remove.
5088 (target_supports_btrace): Remove.
5089
5090 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5091
5092 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5093 (handle_btrace_disable): Change return type to void. Use exceptions
5094 to report errors.
5095 (handle_btrace_general_set): Catch exception and copy message to
5096 return message.
5097
5098 2018-02-08 Tom Tromey <tom@tromey.com>
5099
5100 * linux-low.c (install_software_single_step_breakpoints): Use
5101 make_scoped_restore.
5102 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5103 (do_restore_current_thread_cleanup): Remove.
5104 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5105 declare.
5106
5107 2018-02-08 Tom Tromey <tom@tromey.com>
5108
5109 * mem-break.c (set_raw_breakpoint_at): Use
5110 gdb::unique_xmalloc_ptr.
5111
5112 2018-01-30 Pedro Alves <palves@redhat.com>
5113
5114 PR gdb/13211
5115 * target.c (target_terminal::terminal_state): Rename to ...
5116 (target_terminal::m_terminal_state): ... this.
5117
5118 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5119
5120 * linux-low.c (handle_extended_wait): Surround call to
5121 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5122
5123 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5124
5125 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5126 linux_ptrace_attach_fail_reason_string now returning an
5127 std::string.
5128 (linux_attach): Likewise.
5129 * thread-db.c (attach_thread): Likewise.
5130
5131 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5132
5133 PR gdb/21559
5134 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5135 checking for fs_base/gs_base fields in struct user_regs_struct.
5136 * configure: Regenerate.
5137
5138 2018-01-16 Yao Qi <yao.qi@linaro.org>
5139
5140 PR gdb/18749
5141 * linux-low.c (fetch_register): Call supply_register instead of
5142 error.
5143
5144 2018-01-08 Yao Qi <yao.qi@linaro.org>
5145 Simon Marchi <simon.marchi@ericsson.com>
5146
5147 * Makefile.in (OBS): Remove selftest.o.
5148 * configure.ac: Set srv_selftest_objs if $development is true.
5149 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5150 * configure: Re-generated.
5151 * server.c (captured_main): Wrap variable selftest_filter with
5152 GDB_SELF_TEST.
5153
5154 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5155
5156 * server.c (parse_debug_format_options): Return std::string.
5157 (handle_monitor_command, captured_main): Adjust.
5158
5159 2018-01-05 Pedro Alves <palves@redhat.com>
5160
5161 PR gdb/18653
5162 * server.c (captured_main): Pass quiet=false to
5163 save_original_signals_state.
5164
5165 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5166
5167 * gdbreplay.c (gdbreplay_version): Update copyright year in
5168 version message.
5169 * server.c (gdbserver_version): Likewise.
5170
5171 2017-12-08 Tom Tromey <tom@tromey.com>
5172
5173 * ax.c (ax_printf): Update.
5174
5175 2017-12-07 Yao Qi <yao.qi@linaro.org>
5176
5177 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5178 aarch64_linux_read_description.
5179 * linux-amd64-ipa.c (idx2mask): New array.
5180 (get_ipa_tdesc): Move idx2mask out.
5181 (initialize_low_tracepoint): Initialize target descriptions.
5182 * linux-i386-ipa.c (idx2mask): New array.
5183 (get_ipa_tdesc): Move idx2mask out.
5184 (initialize_low_tracepoint): Initialize target descriptions.
5185
5186 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5187
5188 * tdesc.c (struct tdesc_type): Change return type.
5189 (tdesc_add_flag): Change parameter type.
5190 (tdesc_add_bitfield): Likewise.
5191 (tdesc_add_field): Likewise.
5192 (tdesc_set_struct_size): Likewise.
5193
5194 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5195
5196 * regcache.c (registers_to_string): Remove unused variable.
5197
5198 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5199
5200 * inferiors.c (for_each_inferior_with_data): Remove.
5201 * inferiors.h (for_each_inferior_with_data): Remove.
5202 * server.c (handle_qxfer_threads_worker): Change parameter type.
5203 (handle_qxfer_threads_proper): Use for_each_thread.
5204
5205 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5206
5207 * inferiors.c (for_each_inferior): Remove.
5208 (clear_inferiors): Use for_each_thread.
5209 * inferiors.h (for_each_inferior): Remove.
5210 * linux-low.c (linux_wait_for_event_filtered): Use
5211 for_each_thread.
5212 (linux_stabilize_threads): Likewise.
5213 * regcache.c (regcache_release): Likewise.
5214 * server.c (gdb_wants_all_threads_stopped): Likewise.
5215 (clear_pending_status_callback): Remove.
5216 (handle_status): Use for_each_thread.
5217 (captured_main): Likewise.
5218 * win32-low.c (child_init_thread_list): Likewise.
5219 (win32_clear_inferiors): Likewise.
5220 (fake_breakpoint_event): Likewise.
5221
5222 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5223
5224 * inferiors.h (find_inferior): Remove.
5225 * inferiors.c (find_inferior): Remove.
5226
5227 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5228
5229 * linux-low.c (resume_status_pending_p): Update comment.
5230 (need_step_over_p): Update comment.
5231
5232 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5233
5234 * linux-low.c (proceed_one_lwp): Return void, change parameter
5235 type.
5236 (unsuspend_and_proceed_one_lwp): Likewise.
5237 (proceed_all_lwps): Use for_each_thread.
5238 (unstop_all_lwps): Likewise.
5239
5240 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5241
5242 * linux-low.c (linux_resume_one_thread): Return void, take
5243 parameter directly.
5244 (linux_resume): Use for_each_thread.
5245
5246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5247
5248 * linux-low.c (send_sigstop_callback): Return void, change
5249 parameter type. Rename to...
5250 (send_sigstop): ... this.
5251 (suspend_and_send_sigstop_callback): Return void, change parameter
5252 type. Rename to...
5253 (suspend_and_send_sigstop): ... this.
5254 (stop_all_lwps): Use for_each_thread.
5255
5256 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5257
5258 * linux-low.c (lwp_running): Return bool, remove unused
5259 argument.
5260 (linux_stabilize_threads): Use find_thread.
5261
5262 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5263
5264 * linux-low.c (select_singlestep_lwp_callback): Remove.
5265 (count_events_callback): Remove.
5266 (select_event_lwp_callback): Remove.
5267 (select_event_lwp): Use find_thread/for_each_thread.
5268
5269 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5270
5271 * linux-low.c (not_stopped_callback): Return bool, take filter
5272 argument directly.
5273 (linux_wait_for_event_filtered): Use find_thread.
5274 (linux_wait_1): Likewise.
5275
5276 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5277
5278 * linux-low.c (same_lwp): Remove.
5279 (find_lwp_pid): Use find_thread.
5280
5281 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5282
5283 * linux-low.c (delete_lwp_callback): Remove.
5284 (linux_mourn): Use for_each_thread.
5285
5286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5287
5288 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5289 args parameter, don't check for pid.
5290 (linux_detach): Use for_each_thread.
5291
5292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5293
5294 * linux-low.c (struct counter): Remove.
5295 (second_thread_of_pid_p): Remove.
5296 (last_thread_of_process_p): Use find_thread.
5297
5298 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5299
5300 * inferiors.c (find_inferior_in_random): Remove.
5301 * inferiors.h (find_inferior_in_random): Remove.
5302 * linux-low.c (status_pending_p_callback): Return bool, accept
5303 parameter ptid directly.
5304 (linux_wait_for_event_filtered): Use find_thread_in_random.
5305 (linux_wait_1): Likewise.
5306
5307 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5308
5309 * inferiors.c (find_inferior_id): Remove.
5310 (find_thread_ptid): Move implemention from find_inferior_id to
5311 here.
5312 * inferiors.h (find_inferior_id): Remove.
5313 * server.c (handle_status): Use find_thread_ptid.
5314 (process_serial_event): Likewise.
5315 * thread-db.c (find_one_thread): Likewise.
5316 (thread_db_thread_handle): Likewise.
5317 * win32-low.c (thread_rec): Likewise.
5318 (child_delete_thread): Likewise.
5319 (win32_thread_alive): Likewise.
5320 (get_child_debug_event): Likewise.
5321
5322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5323
5324 * linux-mips-low.c (update_watch_registers_callback): Return
5325 void, remove pid_p parameter, don't check for pid.
5326 (mips_insert_point, mips_remove_point): Use for_each_thread.
5327
5328 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5329
5330 * lynx.low (lynx_delete_thread_callback): Remove.
5331 (lynx_mourn): Use for_each_thread.
5332
5333 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5334
5335 * regcache.c (regcache_invalidate_one): Remove.
5336 (regcache_invalidate_pid): use for_each_thread.
5337
5338 2017-11-26 Tom Tromey <tom@tromey.com>
5339
5340 * linux-low.c (linux_create_inferior): Update.
5341
5342 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5343
5344 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5345
5346 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5347
5348 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5349 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5350 * linux-aarch64-tdesc-selftest.c: New file.
5351 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5352
5353 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5354
5355 * configure.srv: Add new file.
5356 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5357 * linux-aarch64-tdesc-selftest.c: New file.
5358 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5359
5360 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5361
5362 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5363 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5364 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5365
5366 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5367
5368 * configure.srv: Add new files.
5369 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5370 aarch64_linux_read_description.
5371 * linux-aarch64-low.c (aarch64_linux_read_description):
5372 Merge with aarch64_arch_setup.
5373 (aarch64_arch_setup): Call aarch64_linux_read_description.
5374 * linux-aarch64-tdesc.c: New file.
5375 * linux-aarch64-tdesc.h: New file.
5376
5377 2017-11-24 Yao Qi <yao.qi@linaro.org>
5378
5379 * configure.srv: Set $srv_regobj for tic6x-linux.
5380 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5381 (tic6x_read_description): Move some code to tic6x_arch_setup.
5382 (tic6x_tdesc_test): New function.
5383 (initialize_low_arch): Call selftests::register_test.
5384
5385 2017-11-22 Yao Qi <yao.qi@linaro.org>
5386
5387 * remote-utils.c (prepare_resume_reply): Use memcpy.
5388
5389 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5390
5391 * linux-low.c (kill_one_lwp_callback): Return void, take
5392 argument directly, don't filter on pid.
5393 (linux_kill): Use for_each_thread.
5394
5395 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5396
5397 * linux-low.c (need_step_over_p): Return bool, remove dummy
5398 argument.
5399 (linux_resume, proceed_all_lwps): Use find_thread.
5400
5401 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5402
5403 * linux-low.c (resume_status_pending_p): Return bool, remove
5404 flag_p argument.
5405 (linux_resume): Use find_thread.
5406
5407 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5408
5409 * linux-low.c (struct thread_resume_array): Remove.
5410 (linux_set_resume_request): Return void, take arguments
5411 directly.
5412 (linux_resume): Use for_each_thread.
5413
5414 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5415
5416 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5417 return bool, remove data argument.
5418 (linux_stabilize_threads): Use find_thread.
5419
5420 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5421
5422 * linux-low.c (unsuspend_one_lwp): Remove.
5423 (unsuspend_all_lwps): Use for_each_thread, inline code from
5424 unsuspend_one_lwp.
5425
5426 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5427
5428 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5429 * linux-low.c (struct iterate_over_lwps_args): Remove.
5430 (iterate_over_lwps_filter): Remove.
5431 (iterate_over_lwps): Use find_thread.
5432
5433 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5434
5435 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5436 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5437 code from reset_lwp_ptrace_options_callback.
5438
5439 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5440
5441 * linux-arm-low.c (struct update_registers_data): Remove.
5442 (update_registers_callback): Return void, take arguments
5443 directly, don't check thread's pid.
5444 (arm_insert_point, arm_remove_point): Use for_each_thread.
5445
5446 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5447
5448 * win32-low.c (continue_one_thread): Return void, take argument
5449 directly.
5450 (child_continue): Use for_each_thread.
5451
5452 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5453
5454 * win32-i386-low.c (update_debug_registers_callback): Rename
5455 to ...
5456 (update_debug_registers): ... this, return void, remove pid_p arg.
5457 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5458
5459 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5460
5461 * inferiors.h (struct process_info): Add constructor, initialize
5462 fields..
5463 <syscalls_to_catch>: Change type to std::vector<int>.
5464 * inferiors.c (add_process): Allocate process_info with new.
5465 (remove_process): Free process_info with delete.
5466 * linux-low.c (handle_extended_wait): Adjust.
5467 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5468 * server.c (handle_general_set): Adjust.
5469
5470 2017-11-16 Pedro Alves <palves@redhat.com>
5471
5472 * remote-utils.c (remote_close): Block SIGIO signals instead of
5473 uninstalling the SIGIO handler.
5474
5475 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5476
5477 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5478
5479 2017-11-16 Yao Qi <yao.qi@linaro.org>
5480
5481 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5482 (tic6x_store_gregset): Likewise.
5483 (tic6x_usrregs_info): Move it up.
5484
5485 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5486
5487 * Makefile.in: Update arch rules.
5488 * configure.srv: Explicitly mark arch/ files.
5489
5490 2017-11-13 Andreas Schwab <schwab@suse.de>
5491
5492 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5493 function.
5494 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5495
5496 2017-11-06 Pedro Alves <palves@redhat.com>
5497
5498 * config.in, configure: Regenerate.
5499
5500 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5501
5502 * target.c (struct thread_search): Remove.
5503 (thread_search_callback): Remove.
5504 (prepare_to_access_memory): Use for_each_thread instead of
5505 find_inferior. Inline code from thread_search_callback.
5506
5507 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * server.c (struct visit_actioned_threads_data): Remove.
5510 (visit_actioned_threads): Change prototype to take arguments
5511 directly.
5512 (resume): Use find_thread instead of find_inferior.
5513
5514 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5515
5516 * server.c (queue_stop_reply_callback): Change prototype, return
5517 void.
5518 (find_status_pending_thread_callback): Remove.
5519 (handle_status): Replace find_inferior with find_thread and
5520 for_each_thread.
5521
5522 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5523
5524 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5525 with REGNO.
5526 (aarch64_store_gregset): Likewise.
5527 (aarch64_fill_fpregset): Likewise.
5528 (aarch64_store_fpregset): Likewise.
5529
5530 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5531
5532 * gdbthread.h (find_thread, for_each_thread): New functions.
5533 * inferiors.c (thread_of_pid): Remove.
5534 (find_any_thread_of_pid): Use find_thread.
5535 * linux-low.c (num_lwps): Use for_each_thread.
5536
5537 2017-10-17 Yao Qi <yao.qi@linaro.org>
5538
5539 * Makefile.in: Remove one rule.
5540 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5541
5542 2017-10-17 Yao Qi <yao.qi@linaro.org>
5543
5544 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5545 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5546
5547 2017-10-17 Yao Qi <yao.qi@linaro.org>
5548
5549 * configure.srv: Rename arm.o with arch/arm.o.
5550
5551 2017-10-17 Yao Qi <yao.qi@linaro.org>
5552
5553 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5554 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5555 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5556 (arch-i386.o, arch-amd64.o): Remove rules.
5557 (arch/%.o): New rule.
5558 Update POSTCOMPILE and COMPILE.pre.
5559 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5560 * configure: Re-generated.
5561 * configure.srv: Replace arch-i386.o with arch/i386.o.
5562 Replace arch-amd64.o with arch/amd64.o.
5563
5564 2017-10-16 Yao Qi <yao.qi@linaro.org>
5565
5566 * configure: Regenerated.
5567
5568 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5569
5570 * inferiors.h: (struct inferior_list): Remove.
5571 (struct inferior_list_entry); Remove.
5572 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5573 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5574 get_first_inferior): Remove.
5575 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5576 find_inferior_id, find_inferior_in_random): Change signature.
5577 * inferiors.c (all_threads): Change type to
5578 std::list<thread_info *>.
5579 (get_thread): Remove macro.
5580 (find_inferior, find_inferior_id): Change signature, implement
5581 using find_thread.
5582 (find_inferior_in_random): Change signature, implement using
5583 find_thread_in_random.
5584 (for_each_inferior, for_each_inferior_with_data): Change
5585 signature, implement using for_each_thread.
5586 (add_inferior_to_list, remove_inferior): Remove.
5587 (add_thread, get_first_thread, thread_of_pid,
5588 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5589 (get_first_inferior, one_inferior_p, clear_inferior_list):
5590 Remove.
5591 (clear_inferiors, get_thread_process): Update.
5592 * gdbthread.h: Include <list>.
5593 (struct thread_info) <entry>: Remove field.
5594 <id>: New field.
5595 (all_threads): Change type to std::list<thread_info *>.
5596 (get_first_inferior): Add doc.
5597 (find_thread, for_each_thread, find_thread_in_random): New
5598 functions.
5599 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5600 * linux-arm-low.c (update_registers_callback): Update.
5601 * linux-low.c (second_thread_of_pid_p): Update.
5602 (kill_one_lwp_callback, linux_detach_lwp_callback,
5603 delete_lwp_callback, status_pending_p_callback, same_lwp,
5604 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5605 iterate_over_lwps, not_stopped_callback,
5606 resume_stopped_resumed_lwps, count_events_callback,
5607 select_singlestep_lwp_callback, select_event_lwp_callback,
5608 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5609 suspend_and_send_sigstop_callback, wait_for_sigstop,
5610 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5611 lwp_running, linux_set_resume_request, resume_status_pending_p,
5612 need_step_over_p, start_step_over, linux_resume_one_thread,
5613 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5614 reset_lwp_ptrace_options_callback): Update.
5615 * linux-mips-low.c (update_watch_registers_callback): Update.
5616 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5617 Update.
5618 (free_register_cache_thread_one): Remove.
5619 (regcache_release): Update.
5620 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5621 handle_qxfer_threads_worker): Update.
5622 (handle_query): Update, use list iterator.
5623 (visit_actioned_threads, handle_pending_status,
5624 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5625 clear_pending_status_callback, set_pending_status_callback,
5626 find_status_pending_thread_callback, handle_status,
5627 process_serial_event): Update.
5628 * target.c (thread_search_callback): Update.
5629 * thread-db.c (thread_db_get_tls_address): Update.
5630 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5631 Update.
5632 * win32-i386-low.c (update_debug_registers_callback): Update.
5633 * win32-low.c (delete_thread_info, child_delete_thread,
5634 continue_one_thread, suspend_one_thread,
5635 get_child_debug_event): Adjust.
5636
5637 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5638
5639 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5640 * inferiors.h: Include <list>.
5641 (struct process_info) <entry>: Remove field.
5642 <pid>: New field.
5643 (pid_of): Change macro to function.
5644 (ptid_of, lwpid_of): Remove macro.
5645 (all_processes): Change type to std::list<process_info *>.
5646 (ALL_PROCESSES): Remove macro.
5647 (for_each_process, find_process): New function.
5648 * inferiors.c (all_processes): Change type to
5649 std::list<process_info *>.
5650 (find_thread_process): Adjust.
5651 (add_process): Likewise.
5652 (remove_process): Likewise.
5653 (find_process_pid): Likewise.
5654 (get_first_process): Likewise.
5655 (started_inferior_callback): Remove.
5656 (have_started_inferiors_p): Adjust.
5657 (attached_inferior_callback): Remove.
5658 (have_attached_inferiors_p): Adjust.
5659 * linux-low.c (check_zombie_leaders): Likewise.
5660 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5661 (x86_linux_update_xmltarget): Adjust.
5662 * server.c (handle_query): Likewise.
5663 (gdb_reattached_process): Remove.
5664 (handle_status): Adjust.
5665 (kill_inferior_callback): Likewise.
5666 (detach_or_kill_inferior): Remove.
5667 (print_started_pid): Likewise.
5668 (print_attached_pid): Likewise.
5669 (detach_or_kill_for_exit): Update.
5670 (process_serial_event): Likewise.
5671 * linux-arm-low.c (arm_new_fork): Likewise.
5672
5673 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5674
5675 * dll.h: Include <list>.
5676 (struct dll_info): Add constructor.
5677 <entry>: Remove field.
5678 (all_dlls): Change type to std::list<dll_info>.
5679 * dll.c: Include <algorithm>.
5680 (get_dll): Remove macro.
5681 (all_dlls): Change type to std::list<dll_info *>.
5682 (free_one_dll): Remove.
5683 (match_dll): Likewise.
5684 (loaded_dll): Adjust.
5685 (unloaded_dll): Adjust to all_dlls type change, use
5686 std::find_if. Inline code from match_dll.
5687 (clear_dlls): Adjust to all_dlls type change.
5688 * server.c (emit_dll_description): Remove.
5689 (handle_qxfer_libraries): Adjust to all_dlls type change,
5690 integrate emit_dll_description's functionality.
5691
5692 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5693
5694 * linux-low.h (struct linux_target_ops) <delete_process>: New
5695 field.
5696 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5697 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5698 (struct linux_target_ops): Add delete_process callback.
5699 * linux-arm-low.c (arm_delete_process): New.
5700 (struct linux_target_ops): Add delete_process callback.
5701 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5702 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5703 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5704 * linux-mips-low.c (mips_linux_delete_process): New.
5705 (struct linux_target_ops): Add delete_process callback.
5706 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5707 * linux-s390-low.c (struct linux_target_ops): Likewise.
5708 * linux-sh-low.c (struct linux_target_ops): Likewise.
5709 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5710 * linux-tile-low.c (struct linux_target_ops): Likewise.
5711 * linux-x86-low.c (x86_linux_delete_process): New.
5712 (struct linux_target_ops): Add delete_process callback.
5713 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5714
5715 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5716
5717 * linux-aarch64-low.c (the_low_target): Add thread delete
5718 callback.
5719 * linux-arm-low.c (arm_delete_thread): New function.
5720 (the_low_target): Add thread delete callback.
5721 * linux-bfin-low.c (the_low_target): Likewise.
5722 * linux-crisv32-low.c (the_low_target): Likewise.
5723 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5724 set.
5725 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5726 field.
5727 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5728 * linux-mips-low.c (mips_linux_delete_thread): New function.
5729 (the_low_target): Add thread delete callback.
5730 * linux-ppc-low.c (the_low_target): Likewise.
5731 * linux-s390-low.c (the_low_target): Likewise.
5732 * linux-sh-low.c (the_low_target): Likewise.
5733 * linux-tic6x-low.c (the_low_target): Likewise.
5734 * linux-tile-low.c (the_low_target): Likewise.
5735 * linux-x86-low.c (the_low_target): Likewise.
5736 * linux-xtensa-low.c (the_low_target): Likewise.
5737
5738 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5739
5740 * win32-low.c: Include "common-inferior.h".
5741
5742 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5743
5744 * inferiors.c (set_inferior_cwd): New function.
5745 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5746 (handle_query): Inform that QSetWorkingDir is supported.
5747 * win32-low.c (create_process): Pass the inferior's cwd to
5748 CreateProcess.
5749
5750 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5751
5752 * inferiors.c (current_inferior_cwd): New global variable.
5753 (get_inferior_cwd): New function.
5754 * inferiors.h (struct process_info) <cwd>: New field.
5755
5756 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5757
5758 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5759 (OBS): Add gdb_tilde_expand.o.
5760
5761 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5762
5763 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5764 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5765
5766 2017-09-29 Pedro Alves <palves@redhat.com>
5767
5768 * ax.c (gdb_parse_agent_expr): Constify.
5769 * ax.h (gdb_parse_agent_expr): Constify.
5770 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5771 Constify.
5772 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5773 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5774 * remote-utils.h (read_ptid): Constify.
5775 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5776 (process_point_options, process_serial_event): Constify.
5777 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5778 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5779 (cmd_qtbuffer): Constify.
5780
5781 2017-09-29 Pedro Alves <palves@redhat.com>
5782
5783 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5784 fails.
5785
5786 2017-09-29 Pedro Alves <palves@redhat.com>
5787
5788 * linux-low.c (handle_extended_wait): Pass parent thread instead
5789 of process to thread_db_notice_clone.
5790 * linux-low.h (thread_db_notice_clone): Replace parent process
5791 parameter with parent thread parameter.
5792 * thread-db.c (find_one_thread): Add comment.
5793 (thread_db_notice_clone): Replace parent process parameter with
5794 parent thread parameter. Temporarily switch to the parent thread.
5795
5796 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5797
5798 * gdbthread.h: Include "common-gdbthread.h".
5799 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5800 "if" when validating the ptid.
5801 * remote-utils.c: Include "gdbthread.h".
5802 (prepare_resume_reply): Use "switch_to_thread".
5803 * target.c (done_accessing_memory): Likewise.
5804
5805 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5806
5807 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5808 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5809 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5810 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5811 s390x-gs-linux64-ipa.o to ipa_obj.
5812 * linux-s390-low.c (HWCAP_S390_GS): New define.
5813 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5814 New functions.
5815 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5816 (s390_arch_setup): Check for guarded-storage support and choose
5817 appropriate tdesc.
5818 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5819 init_registers_s390x_gs_linux64.
5820 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5821 enum value.
5822 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5823 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5824
5825 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5826
5827 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5828
5829 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5830
5831 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5832 (thread_db_thread_handle): Declare.
5833 * linux-low.c (linux_target_ops): Initialize thread_handle.
5834 * server.c (handle_qxfer_threads_worker): Add support for
5835 "handle" attribute.
5836 * target.h (struct target_ops): Add new function pointer,
5837 thread_handle.
5838 (target_thread_handle): Define.
5839 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5840 field in lwp.
5841 (thread_db_thread_handle): New function.
5842
5843 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5844
5845 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5846 * linux-low.h (thread_db_notice_clone): Declare.
5847 * thread-db.c (thread_db_notice_clone): New function.
5848
5849 2017-09-21 Pedro Alves <palves@redhat.com>
5850
5851 * server.c (gdb_read_memory, handle_status, process_serial_event)
5852 (handle_serial_event, handle_target_event): Adjust to
5853 set_desired_thread prototype change.
5854 * target.c (set_desired_thread): Remove 'use_general' parameter
5855 and adjust.
5856 * target.h (set_desired_thread): Remove 'use_general' parameter.
5857
5858 2017-09-20 Tom Tromey <tom@tromey.com>
5859
5860 * target.c (target_terminal::terminal_state): Define.
5861 (target_terminal::init): Rename from target_terminal_init.
5862 (target_terminal::inferior): Rename from
5863 target_terminal_inferior.
5864 (target_terminal::ours): Rename from target_terminal_ours.
5865 (target_terminal::ours_for_output, target_terminal::info): New.
5866
5867 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5868
5869 * server.c (accumulate_file_name_length): Remove.
5870 (emit_dll_description): Adjust to std::string change.
5871 (handle_qxfer_libraries): Use std::string to hold document.
5872
5873 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5874
5875 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5876 return type of xml_escape_text.
5877 * server.c (emit_dll_description): Likewise.
5878
5879 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5880
5881 * server.c (captured_main): Accept argument for --selftest.
5882 Update run_tests call.
5883 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5884 when registering selftests.
5885
5886 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5887
5888 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5889 instead of "VEC" for "target_desc.reg_defs".
5890 (regcache_cpy): Likewise.
5891 (registers_to_string): Likewise.
5892 (registers_from_string): Likewise.
5893 (find_regno): Likewise.
5894 (supply_regblock): Likewise.
5895 (regcache_raw_read_unsigned): Likewise.
5896 * tdesc.c (init_target_desc): Likewise.
5897 (tdesc_create_reg): Likewise.
5898 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5899 (struct target_desc) <reg_defs>: Convert to "std::vector".
5900 (target_desc): Do not initialize "reg_defs".
5901 (~target_desc): Update code to use "std::vector" instead of "VEC"
5902 for "target_desc.reg_defs".
5903 (operator==): Likewise.
5904
5905 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5906
5907 * inferiors.h (thread_to_gdb_id): Remove.
5908 * inferiors.c (thread_to_gdb_id): Remove.
5909 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5910 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5911 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5912 Likewise.
5913 * nto-low.c (nto_fetch_registers, nto_store_registers,
5914 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5915
5916 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5917
5918 * inferiors.h (gdb_id_to_thread_id): Remove.
5919 * inferiors.c (gdb_id_to_thread_id): Remove.
5920 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5921 removal. Move pid declaration closer to where it's used.
5922
5923 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5924
5925 * server.c (handle_detach): New function.
5926 (process_serial_event): Move code out, call handle_detach.
5927
5928 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5929
5930 * server.c (require_running): Rename to ...
5931 (require_running_or_return): ... this ...
5932 (require_running_or_break): ... and this.
5933 (handle_query, process_serial_event): Adjust.
5934
5935 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5936
5937 * linux-low.c (linux_set_resume_request): Remove unused
5938 variables.
5939
5940 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5941
5942 * server.c (first_thread_of): Remove.
5943 (process_serial_event): Replace usage of first_thread_of with
5944 find_any_thread_of_pid.
5945 * tracepoint.c (same_process_p): Remove.
5946 (gdb_agent_about_to_close): Replace usage of same_process_p with
5947 find_any_thread_of_pid.
5948 * linux-x86-low.c (same_process_callback): Remove.
5949 (x86_arch_setup_process_callback): Replace usage of
5950 same_process_callback with find_any_thread_of_pid.
5951 * thread-db.c (any_thread_of): Remove.
5952 (switch_to_process): Replace usage of any_thread_of with
5953 find_any_thread_of_pid.
5954 * inferiors.c (thread_pid_matches_callback): Remove.
5955 (find_thread_process): Adjust to use find_any_thread_of_pid.
5956
5957 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5958
5959 * regcache.c (get_thread_regcache): Guard calls to "memset"
5960 with "!VEC_empty".
5961
5962 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5963
5964 * linux-low.c (handle_extended_wait): Use
5965 "allocate_target_description" instead of "XNEW".
5966 * linux-x86-low.c (initialize_low_arch): Likewise.
5967
5968 2017-09-05 Yao Qi <yao.qi@linaro.org>
5969
5970 * configure.srv (srv_i386_regobj): Remove.
5971 (srv_amd64_regobj): Remove.
5972 (srv_regobj): Set it to "" for x86 non-linux targets.
5973 * linux-x86-tdesc.c (i386_linux_read_description):
5974 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5975 (init_registers_i386): Remove the declaration.
5976 (tdesc_i386): Remove the declaration.
5977 (lynx_i386_arch_setup): Call i386_create_target_description.
5978 * nto-x86-low.c: Likewise.
5979 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5980 [!__x86_64__]: include arch/i386.h.
5981 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5982
5983 2017-09-05 Yao Qi <yao.qi@linaro.org>
5984
5985 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5986 i386/amd64-XXX-linux from it.
5987
5988 2017-09-05 Yao Qi <yao.qi@linaro.org>
5989
5990 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5991 false.
5992 (ipa_amd64_linux_regobj): Remove.
5993 (ipa_x32_linux_regobj): Remove.
5994
5995 2017-09-05 Yao Qi <yao.qi@linaro.org>
5996
5997 * Makefile.in (arch-amd64.o): New rule.
5998 * configure.srv: Append arch-amd64.o.
5999 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6000 (get_ipa_tdesc): Call amd64_linux_read_description.
6001 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6002 and init_registers_amd64_XXX.
6003 * linux-x86-low.c (x86_linux_read_description): Call
6004 amd64_linux_read_description.
6005 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6006 (initialize_low_arch): Don't call init_registers_x32_XXX and
6007 init_registers_amd64_XXX.
6008 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6009 and tdesc_amd64_XXX.
6010 [__x86_64__] (amd64_tdesc_test): New function.
6011 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6012 and init_registers_amd64_XXX.
6013 * linux-x86-tdesc.c: Include arch/amd64.h.
6014 (xcr0_to_tdesc_idx): New function.
6015 (i386_linux_read_description): New function.
6016 (amd64_get_ipa_tdesc_idx): New function.
6017 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6018 (amd64_get_ipa_tdesc): Declare.
6019
6020 2017-09-05 Yao Qi <yao.qi@linaro.org>
6021
6022 * configure.srv (srv_i386_linux_xmlfiles): Remove
6023 i386/i386-XXX-linux.xml from it.
6024
6025 2017-09-05 Yao Qi <yao.qi@linaro.org>
6026
6027 * configure.srv: Set srv_i386_linux_regobj empty if $development
6028 is false.
6029 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6030 initialize_low_tdesc.
6031 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6032 with #if initialize_low_tdesc.
6033 * linux-x86-tdesc-selftest.c: New file.
6034 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6035
6036 2017-09-05 Yao Qi <yao.qi@linaro.org>
6037
6038 * Makefile.in (arch-i386.o): New rule.
6039 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6040 (x86_64-*-linux*): Likewise.
6041 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6042 include arch/i386.h.
6043 (i386_linux_read_description): Remove code and call
6044 i386_create_target_description.
6045 * tdesc.c (allocate_target_description): New function.
6046 * tdesc.h (set_tdesc_architecture): Remove declaration.
6047 (set_tdesc_osabi): Likewise.
6048
6049 2017-09-05 Yao Qi <yao.qi@linaro.org>
6050
6051 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6052 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6053 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6054 .xmltarget.
6055 * server.c (get_features_xml): Call tdesc_get_features_xml.
6056 * tdesc.c (set_tdesc_architecture): New function.
6057 (set_tdesc_osabi): New function.
6058 (tdesc_get_features_xml): New function.
6059 (tdesc_create_feature): Add an argument.
6060 * tdesc.h (struct target_desc) <features>: New field.
6061 <arch, osabi>: New field.
6062 (~target_desc): xfree features, arch, and osabi.
6063 (target_desc::oerator==): Don't compare .xmltarget.
6064 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6065 (set_tdesc_osabi): Likewise.
6066 (tdesc_get_features_xml): Likewise.
6067
6068 2017-09-05 Yao Qi <yao.qi@linaro.org>
6069
6070 * linux-x86-tdesc.c: Include selftest.h.
6071 (i386_tdesc_test): New function.
6072 (initialize_low_tdesc): Call selftests::register_test.
6073 * tdesc.h: Include regdef.h.
6074 (target_desc): Override operator == and !=.
6075
6076 2017-09-05 Yao Qi <yao.qi@linaro.org>
6077
6078 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6079 (ipa_obj): Likewise.
6080 * linux-i386-ipa.c: Include common/x86-xstate.h
6081 (get_ipa_tdesc): Call i386_linux_read_description.
6082 (initialize_low_tracepoint): Don't call init_registers_XXX
6083 functions, call initialize_low_tdesc instead.
6084 * linux-x86-low.c (x86_linux_read_description): Call
6085 i386_linux_read_description.
6086 (initialize_low_arch): Don't call init_registers_i386_XXX
6087 functions, call initialize_low_tdesc.
6088 * linux-x86-tdesc.c: New file.
6089 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6090 (i386_get_ipa_tdesc_idx): Declare.
6091 (i386_get_ipa_tdesc): Declare.
6092 (initialize_low_tdesc): Declare.
6093
6094 2017-09-05 Yao Qi <yao.qi@linaro.org>
6095
6096 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6097 instead of 0.
6098
6099 2017-09-05 Yao Qi <yao.qi@linaro.org>
6100
6101 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6102 * regcache.c (get_thread_regcache): Use VEC_length.
6103 (init_register_cache): Likewise.
6104 (regcache_cpy): Likewise.
6105 (registers_to_string): Iterate reg_defs via VEC_iterate.
6106 (find_regno): Likewise.
6107 (find_register_by_number): Use VEC_index.
6108 (register_size): Call find_register_by_number.
6109 (register_data): Call find_register_by_number.
6110 (supply_regblock): Use VEC_length.
6111 (regcache_raw_read_unsigned): Likewise.
6112 * tdesc.c (init_target_desc): Iterate reg_defs via
6113 VEC_iterate.
6114 (default_description): Update initializer.
6115 (copy_target_description): Don't update field num_registers.
6116 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6117 <num_registers>: Remove.
6118
6119 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6120
6121 * Makefile.in (.SECONDARY): Define target.
6122
6123 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6124
6125 * linux-low.c (linux_wait_1): Adjust.
6126 * server.c (queue_stop_reply_callback): Adjust.
6127
6128 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6129
6130 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6131 QEnvironmentUnset and QEnvironmentReset packets.
6132 (handle_query): Inform remote that QEnvironmentHexEncoded,
6133 QEnvironmentUnset and QEnvironmentReset are supported.
6134
6135 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6136
6137 * inferiors.h (inferior_target_data): Rename to ...
6138 (thread_target_data): ... this.
6139 (inferior_regcache_data): Rename to ...
6140 (thread_regcache_data): ... this.
6141 (set_inferior_regcache_data): Rename to ...
6142 (set_thread_regcache_data): ... this.
6143 * inferiors.c (inferior_target_data): Rename to ...
6144 (thread_target_data): ... this.
6145 (inferior_regcache_data): Rename to ...
6146 (thread_regcache_data): ... this.
6147 (set_inferior_regcache_data): Rename to ...
6148 (set_thread_regcache_data): ... this.
6149 (free_one_thread): Update.
6150 * linux-low.h (get_thread_lwp): Update.
6151 * regcache.c (get_thread_regcache): Update.
6152 (regcache_invalidate_thread): Update.
6153 (free_register_cache_thread): Update.
6154 * win32-i386-low.c (update_debug_registers_callback): Update.
6155 (win32_get_current_dr): Update.
6156 * win32-low.c (thread_rec): Update.
6157 (delete_thread_info): Update.
6158 (continue_one_thread): Update.
6159 (suspend_one_thread): Update.
6160
6161 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6162
6163 * inferiors.c (set_inferior_target_data): Remove.
6164 * inferiors.h (set_inferior_target_data): Remove.
6165
6166 2017-08-18 Yao Qi <yao.qi@linaro.org>
6167
6168 * Makefile.in (OBS): Add selftest.o.
6169 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6170 * configure, config.in: Re-generated.
6171 * server.c: Include common/sefltest.h.
6172 (captured_main): Handle option --selftest.
6173
6174 2017-08-09 Yao Qi <yao.qi@linaro.org>
6175
6176 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6177 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6178 i386-avx-mpx.o and i386-mmx.o.
6179 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6180 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6181 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6182 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6183 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6184 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6185 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6186 i386/amd64-avx-mpx.xml.
6187
6188 2017-08-09 Yao Qi <yao.qi@linaro.org>
6189
6190 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6191 and x32-avx-avx512.o.
6192 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6193 i386/x32-avx-avx512.xml.
6194
6195 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6196
6197 * tracepoint.h (enum class fast_tpoint_collect_result): New
6198 enumeration.
6199 (fast_tracepoint_collecting): Change return type to
6200 fast_tpoint_collect_result.
6201 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6202 * linux-low.h: Include tracepoint.h.
6203 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6204 fast_tpoint_collect_result.
6205 * linux-low.c (handle_tracepoints): Adjust.
6206 (linux_fast_tracepoint_collecting): Change return type to
6207 fast_tpoint_collect_result.
6208 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6209 linux_wait_1, stuck_in_jump_pad_callback,
6210 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6211 proceed_one_lwp): Adjust to type change.
6212
6213 2017-07-10 Yao Qi <yao.qi@linaro.org>
6214
6215 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6216
6217 2017-06-29 Yao Qi <yao.qi@linaro.org>
6218
6219 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6220 Remove.
6221 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6222
6223 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6226
6227 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6228
6229 * linux-low.c (linux_create_inferior): Adjust code to access the
6230 environment information via 'gdb_environ' class.
6231 * lynx-low.c (lynx_create_inferior): Likewise.
6232 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6233 (get_environ): Return a pointer to 'our_environ'.
6234 (captured_main): Initialize 'our_environ'.
6235 * server.h (get_environ): Adjust prototype.
6236 * spu-low.c (spu_create_inferior): Adjust code to access the
6237 environment information via 'gdb_environ' class.
6238
6239 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6240
6241 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6242 usage of "register" keyword.
6243
6244 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6245
6246 * configure: Re-generate.
6247
6248 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6249
6250 * configure: Re-generate.
6251
6252 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6253
6254 * Makefile.in (COMPILE.pre): Add "-x c++".
6255
6256 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6257
6258 * fork-child.c: Conditionally include <signal.h>.
6259
6260 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6261
6262 * server.c (handle_general_set): Handle new packet
6263 "QStartupWithShell".
6264 (handle_query): Add "QStartupWithShell" to the list of supported
6265 packets.
6266 (gdbserver_usage): Add help text explaining the
6267 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6268 options.
6269 (captured_main): Recognize and act upon the presence of the new
6270 CLI options.
6271
6272 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6273 Pedro Alves <palves@redhat.com>
6274
6275 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6276 * configure: Regenerate.
6277 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6278 "fork-inferior.o".
6279 (i[34567]86-*-lynxos*): Likewise.
6280 (spu*-*-*): Likewise.
6281 * fork-child.c: New file.
6282 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6283 and "environ.h".
6284 (linux_ptrace_fun): New function.
6285 (linux_create_inferior): Adjust function prototype to reflect
6286 change on "target.h". Adjust function code to use
6287 "fork_inferior".
6288 (linux_request_interrupt): Delete "signal_pid".
6289 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6290 (lynx_ptrace_fun): New function.
6291 (lynx_create_inferior): Adjust function prototype to reflect
6292 change on "target.h". Adjust function code to use
6293 "fork_inferior".
6294 * nto-low.c (nto_create_inferior): Adjust function prototype and
6295 code to reflect change on "target.h". Update comments.
6296 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6297 "common-terminal.h" and "environ.h".
6298 (terminal_fd): Moved to fork-child.c.
6299 (old_foreground_pgrp): Likewise.
6300 (restore_old_foreground_pgrp): Likewise.
6301 (last_status): Make it global.
6302 (last_ptid): Likewise.
6303 (our_environ): New variable.
6304 (startup_with_shell): Likewise.
6305 (program_name): Likewise.
6306 (program_argv): Rename to...
6307 (program_args): ...this.
6308 (wrapper_argv): New variable.
6309 (start_inferior): Delete function.
6310 (get_exec_wrapper): New function.
6311 (get_exec_file): Likewise.
6312 (get_environ): Likewise.
6313 (prefork_hook): Likewise.
6314 (post_fork_inferior): Likewise.
6315 (postfork_hook): Likewise.
6316 (postfork_child_hook): Likewise.
6317 (handle_v_run): Update code to deal with arguments coming from the
6318 remote host. Update calls from "start_inferior" to
6319 "create_inferior".
6320 (captured_main): Likewise. Initialize environment variable. Call
6321 "have_job_control".
6322 * server.h (post_fork_inferior): New prototype.
6323 (get_environ): Likewise.
6324 (last_status): Declare.
6325 (last_ptid): Likewise.
6326 (signal_pid): Likewise.
6327 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6328 (spu_ptrace_fun): New function.
6329 (spu_create_inferior): Adjust function prototype to reflect change
6330 on "target.h". Adjust function code to use "fork_inferior".
6331 * target.c (target_terminal_init): New function.
6332 (target_terminal_inferior): Likewise.
6333 (target_terminal_ours): Likewise.
6334 * target.h: Include <vector>.
6335 (struct target_ops) <create_inferior>: Update prototype.
6336 (create_inferior): Update macro.
6337 * utils.c (gdb_flush_out_err): New function.
6338 * win32-low.c (win32_create_inferior): Adjust function prototype
6339 and code to reflect change on "target.h".
6340
6341 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6342
6343 * inferiors.c (switch_to_thread): New function.
6344
6345 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6346
6347 * Makefile.in (SFILE): Add "common/job-control.c".
6348 (OBS): Add "job-control.o".
6349
6350 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6351
6352 * Makefile: Remove "@host_makefile_frag@".
6353
6354 2017-05-05 Pedro Alves <palves@redhat.com>
6355
6356 * configure: Regenerate.
6357
6358 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6359
6360 * configure: Regenerate.
6361
6362 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6363
6364 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6365 software_single_step change of return type to
6366 std::vector<CORE_ADDR>.
6367 * linux-low.c (install_software_single_step_breakpoints):
6368 Likewise.
6369 * linux-low.h (install_software_single_step_breakpoints):
6370 Likewise.
6371
6372 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6373
6374 * remote-utils.c: Include "gdb_termios.h" instead of
6375 "terminal.h".
6376 * terminal.h: Delete file.
6377
6378 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6379
6380 * server.c: Include <vector>.
6381 <program_argv, wrapper_argv>: Convert to std::vector.
6382 (start_inferior): Rewrite function to use C++.
6383 (handle_v_run): Likewise. Update code that calculates the argv
6384 based on the vRun packet; use C++.
6385 (captured_main): Likewise.
6386
6387 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6388
6389 * server.c (handle_v_cont): Initialize thread_resume::thread
6390 with null_ptid.
6391
6392 2017-04-05 Pedro Alves <palves@redhat.com>
6393
6394 * configure: Regenerate.
6395
6396 2017-04-05 Pedro Alves <palves@redhat.com>
6397
6398 * gdbreplay.c (sync_error): Constify.
6399 * linux-x86-low.c (push_opcode): Constify.
6400
6401 2017-04-05 Pedro Alves <palves@redhat.com>
6402
6403 * win32-low.c (get_child_debug_event)
6404 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6405 Report TARGET_WAITKIND_SPURIOUS instead.
6406
6407 2017-04-05 Pedro Alves <palves@redhat.com>
6408
6409 * remote-utils.c (remote_prepare, remote_open): Constify.
6410 * remote-utils.h (remote_prepare, remote_open): Constify.
6411 * server.c (captured_main): Constify 'port' handling.
6412
6413 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6414
6415 * Makefile.in (clean): Clear .deps.
6416
6417 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6418
6419 * .gitignore: Remove generated files, replace with wildcard.
6420 * (clean): Replace removal of generated files with wildcard.
6421 (version.c): Replace with...
6422 (version-generated.c): ...this.
6423 (xml-builtin.c): Replace with...
6424 (xml-builtin-generated.c): ...this.
6425 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6426 (%.c: *regformats*): Replace with...
6427 (%-generated.c: *regformats*): ...this.
6428
6429 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6430
6431 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6432 (xtensa_fill_gregset): Call collect_register_by_name for
6433 threadptr register.
6434 (xtensa_store_gregset): Call supply_register_by_name for
6435 threadptr register.
6436
6437 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6438
6439 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6440 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6441 (xtensa_store_gregset): Call supply_register for all registers in
6442 a0_regnum..a0_regnum + C0_NREGS range.
6443
6444 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6445
6446 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6447 (ax-ipa.o: ax.c): Remove.
6448 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6449 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6450 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6451 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6452 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6453
6454 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6455
6456 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6457 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6458 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6459 (errors-ipa.o: ../common/errors.c): Remove.
6460 (format-ipa.o: ../common/format.c): Remove.
6461 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6462
6463 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6464
6465 * Makefile.in (%-ipa.o: %.c): New rule.
6466 (tracepoint-ipa.o: tracepoint.c): Remove.
6467 (utils-ipa.o: utils.c): Remove.
6468 (remote-utils-ipa.o: remote-utils.c): Remove.
6469 (regcache-ipa.o: regcache.c): Remove.
6470 (i386-linux-ipa.o: i386-linux.c): Remove.
6471 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6472 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6473 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6474 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6475 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6476 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6477 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6478 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6479 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6480 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6481 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6482 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6483 (aarch64-ipa.o: aarch64.c): Remove.
6484 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6485 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6486 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6487 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6488 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6489 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6490 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6491 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6492 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6493 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6494 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6495 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6496 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6497 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6498 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6499 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6500 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6501 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6502 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6503 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6504 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6505 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6506 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6507 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6508 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6509 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6510 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6511 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6512 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6513 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6514 (tdesc-ipa.o: tdesc.c): Remove.
6515 (x32-linux-ipa.o: x32-linux.c): Remove.
6516 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6517 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6518
6519 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6520
6521 * Makefile.in (%.o: ../arch/%.c): New rule.
6522 (arm.o: ../arch/arm.c): Remove.
6523 (arm-linux.o: ../arch/arm-linux.c): Remove.
6524 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6525 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6526
6527 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6528
6529 * Makefile.in (%.o: ../nat/%.c): New rule.
6530 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6531 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6532 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6533 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6534 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6535 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6536 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6537 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6538 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6539 (linux-personality.o: ../nat/linux-personality.c): Remove.
6540 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6541 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6542 (x86-linux.o: ../nat/x86-linux.c): Remove.
6543 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6544 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6545
6546 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6547
6548 * Makefile.in (%.o: ../common/%.c): New rule.
6549 (signals.o: ../common/signals.c): Remove.
6550 (print-utils.o: ../common/print-utils.c): Remove.
6551 (rsp-low.o: ../common/rsp-low.c): Remove.
6552 (common-utils.o: ../common/common-utils.c): Remove.
6553 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6554 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6555 (vec.o: ../common/vec.c): Remove.
6556 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6557 (xml-utils.o: ../common/xml-utils.c): Remove.
6558 (ptid.o: ../common/ptid.c): Remove.
6559 (buffer.o: ../common/buffer.c): Remove.
6560 (format.o: ../common/format.c): Remove.
6561 (filestuff.o: ../common/filestuff.c): Remove.
6562 (agent.o: ../common/agent.c): Remove.
6563 (errors.o: ../common/errors.c): Remove.
6564 (environ.o: ../common/environ.c): Remove.
6565 (common-debug.o: ../common/common-debug.c): Remove.
6566 (cleanups.o: ../common/cleanups.c): Remove.
6567 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6568 (fileio.o: ../common/fileio.c): Remove.
6569 (common-regcache.o: ../common/common-regcache.c): Remove.
6570 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6571 (new-op.o: ../common/new-op.c): Remove.
6572 (btrace-common.o: ../common/btrace-common.c): Remove.
6573
6574 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6575
6576 * Makefile.in (%.o: ../target/%.c): New rule.
6577 (waitstatus.o: ../target/waitstatus.c): Remove.
6578
6579 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6580
6581 * Makefile.in
6582 (%.c: ../regformats/%.dat,
6583 (%.c: ../regformats/arm/%.dat,
6584 (%.c: ../regformats/i386/%.dat,
6585 (%.c: ../regformats/rs6000/%.dat): New rules.
6586 (aarch64.c): Remove.
6587 (reg-arm.c): Remove.
6588 (arm-with-iwmmxt.c): Remove.
6589 (arm-with-vfpv2.c): Remove.
6590 (arm-with-vfpv3.c): Remove.
6591 (arm-with-neon.c): Remove.
6592 (reg-bfin.c): Remove.
6593 (reg-cris.c): Remove.
6594 (reg-crisv32.c): Remove.
6595 (i386.c): Remove.
6596 (i386-linux.c): Remove.
6597 (i386-avx.c): Remove.
6598 (i386-avx-linux.c): Remove.
6599 (i386-avx-avx512.c): Remove.
6600 (i386-avx-avx512-linux.c): Remove.
6601 (i386-mpx.c): Remove.
6602 (i386-mpx-linux.c): Remove.
6603 (i386-avx-mpx-avx512-pku.c): Remove.
6604 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6605 (i386-avx-mpx.c): Remove.
6606 (i386-avx-mpx-linux.c): Remove.
6607 (i386-mmx.c): Remove.
6608 (i386-mmx-linux.c): Remove.
6609 (reg-ia64.c): Remove.
6610 (reg-m32r.c): Remove.
6611 (reg-m68k.c): Remove.
6612 (reg-cf.c): Remove.
6613 (mips-linux.c): Remove.
6614 (mips-dsp-linux.c): Remove.
6615 (mips64-linux.c): Remove.
6616 (mips64-dsp-linux.c): Remove.
6617 (nios2-linux.c): Remove.
6618 (powerpc-32.c): Remove.
6619 (powerpc-32l.c): Remove.
6620 (powerpc-altivec32l.c): Remove.
6621 (powerpc-cell32l.c): Remove.
6622 (powerpc-vsx32l.c): Remove.
6623 (powerpc-isa205-32l.c): Remove.
6624 (powerpc-isa205-altivec32l.c): Remove.
6625 (powerpc-isa205-vsx32l.c): Remove.
6626 (powerpc-e500l.c): Remove.
6627 (powerpc-64l.c): Remove.
6628 (powerpc-altivec64l.c): Remove.
6629 (powerpc-cell64l.c): Remove.
6630 (powerpc-vsx64l.c): Remove.
6631 (powerpc-isa205-64l.c): Remove.
6632 (powerpc-isa205-altivec64l.c): Remove.
6633 (powerpc-isa205-vsx64l.c): Remove.
6634 (s390-linux32.c): Remove.
6635 (s390-linux32v1.c): Remove.
6636 (s390-linux32v2.c): Remove.
6637 (s390-linux64.c): Remove.
6638 (s390-linux64v1.c): Remove.
6639 (s390-linux64v2.c): Remove.
6640 (s390-te-linux64.c): Remove.
6641 (s390-vx-linux64.c): Remove.
6642 (s390-tevx-linux64.c): Remove.
6643 (s390x-linux64.c): Remove.
6644 (s390x-linux64v1.c): Remove.
6645 (s390x-linux64v2.c): Remove.
6646 (s390x-te-linux64.c): Remove.
6647 (s390x-vx-linux64.c): Remove.
6648 (s390x-tevx-linux64.c): Remove.
6649 (tic6x-c64xp-linux.c): Remove.
6650 (tic6x-c64x-linux.c): Remove.
6651 (tic6x-c62x-linux.c): Remove.
6652 (reg-sh.c): Remove.
6653 (reg-sparc64.c): Remove.
6654 (reg-spu.c): Remove.
6655 (amd64.c): Remove.
6656 (amd64-linux.c): Remove.
6657 (amd64-avx.c): Remove.
6658 (amd64-avx-linux.c): Remove.
6659 (amd64-avx-avx512.c): Remove.
6660 (amd64-avx-avx512-linux.c): Remove.
6661 (amd64-mpx.c): Remove.
6662 (amd64-mpx-linux.c): Remove.
6663 (amd64-avx-mpx-avx512-pku.c): Remove.
6664 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6665 (amd64-avx-mpx.c): Remove.
6666 (amd64-avx-mpx-linux.c): Remove.
6667 (x32.c): Remove.
6668 (x32-linux.c): Remove.
6669 (x32-avx.c): Remove.
6670 (x32-avx-linux.c): Remove.
6671 (x32-avx-avx512.c): Remove.
6672 (x32-avx-avx512-linux.c): Remove.
6673 (reg-xtensa.c): Remove.
6674 (reg-tilegx.c): Remove.
6675 (reg-tilegx32.c): Remove.
6676
6677 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6678
6679 * Makefile.in (SFILES): Add "common/environ.c".
6680 (OBJS): Add "common/environ.h".
6681
6682 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6683
6684 * configure.ac: Check if the fs_base and gs_base members of
6685 `struct user_regs_struct' exist.
6686 * config.in: Regenerated.
6687 * configure: Likewise.
6688
6689 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6690
6691 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6692 target_read_memory.
6693 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6694 (get_next_pcs_syscall_next_pc): Likewise.
6695
6696 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6697
6698 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6699 * nto-x86-low.c: Likewise.
6700
6701 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6702
6703 * Makefile.in: Include disable-implicit-rules.mk.
6704
6705 2016-11-23 Pedro Alves <palves@redhat.com>
6706
6707 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6708 (debug_vprintf): Use std::chrono::steady_clock instead of
6709 gettimeofday. Use '.' instead of ':'.
6710 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6711 (get_timestamp): Use std::chrono::steady_clock instead of
6712 gettimeofday.
6713
6714 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6715
6716 * Makefile.in: Fix whitespace formatting.
6717
6718 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6719
6720 * Makefile.in (SFILES, OBS): Flatten list and order
6721 alphabetically.
6722
6723 2016-11-23 Pedro Alves <palves@redhat.com>
6724
6725 * event-loop.c (handle_file_event): Use warning.
6726 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6727 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6728 Use warning.
6729
6730 2016-11-23 Pedro Alves <palves@redhat.com>
6731
6732 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6733 output.
6734 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6735 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6736 debug_printf and debug_flush for debug output.
6737 * server.c (handle_general_set): Likewise.
6738 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6739 output.
6740
6741 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6742
6743 * Makefile.in (.c.o): Replace rule with ...
6744 (%.o: %.c): ... this one.
6745
6746 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6747
6748 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6749 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6750 make.
6751 * configure.ac: Remove checks for the make program.
6752 * configure: Re-generate.
6753
6754 2016-10-28 Pedro Alves <palves@redhat.com>
6755
6756 * Makefile.in (CXX_DIALECT): Get from configure.
6757 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6758 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6759 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6760 * config.in: Regenerate.
6761 * configure: Regenerate.
6762
6763 2016-10-27 Yao Qi <yao.qi@linaro.org>
6764
6765 * linux-low.c (linux_supports_range_stepping): Return true if
6766 can_software_single_step return true.
6767
6768 2016-10-27 Yao Qi <yao.qi@linaro.org>
6769
6770 * inferiors.c (find_inferior_in_random): New function.
6771 * inferiors.h (find_inferior_in_random): Declare.
6772 * linux-low.c (linux_wait_for_event_filtered): Call
6773 find_inferior_in_random instead of find_inferior.
6774
6775 2016-10-27 Yao Qi <yao.qi@linaro.org>
6776
6777 * linux-low.c (linux_wait_1): If single-step breakpoints are
6778 inserted, remove them.
6779
6780 2016-10-26 Pedro Alves <palves@redhat.com>
6781
6782 * linux-low.c (handle_extended_wait): Link parent/child fork
6783 threads.
6784 (linux_wait_1): Unlink them.
6785 (linux_set_resume_request): Ignore resume requests for
6786 already-resumed and unhandled fork child threads.
6787 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6788 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6789 New functions.
6790 (handle_v_requests) <vCont>: Don't call require_running.
6791 * server.h (in_queued_stop_replies): New declaration.
6792
6793 2016-10-24 Yao Qi <yao.qi@linaro.org>
6794
6795 PR server/20733
6796 * linux-aarch64-low.c (append_insns): Cast the return value to
6797 'uint32_t *'.
6798
6799 2016-10-10 Yao Qi <yao.qi@linaro.org>
6800
6801 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6802
6803 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6804
6805 * target.c (target_supports_multi_process): New function, moved
6806 from...
6807 * target.h (target_supports_multi_process): ... here. Remove
6808 macro.
6809
6810 2016-10-05 Tom Tromey <tom@tromey.com>
6811
6812 PR remote/20655:
6813 * tracepoint.c (handle_tracepoint_bkpts): Check
6814 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6815
6816 2016-10-05 Yao Qi <yao.qi@linaro.org>
6817
6818 * configure.srv: Update the path of arm-*.xml files.
6819
6820 2016-10-05 Terry Guo <terry.guo@arm.com>
6821 Yao Qi <yao.qi@linaro.org>
6822
6823 * Makefile.in: Adjust the path of rules.
6824 * configure.srv: Update the path of xml files.
6825 * regformats/arm-with-iwmmxt.dat: Regenerated.
6826 * regformats/arm-with-neon.dat: Likewise.
6827 * regformats/arm-with-vfpv2.dat: Likewise.
6828 * regformats/arm-with-vfpv3.dat Likewise.
6829
6830 2016-09-30 Yao Qi <yao.qi@linaro.org>
6831
6832 PR gdbserver/20627
6833 * target.c (target_stop_and_wait): Don't call
6834 target_continue_no_signal, use resume_stop instead.
6835
6836 2016-09-26 Yao Qi <yao.qi@linaro.org>
6837
6838 * linux-low.c (linux_wait_1): Call debug_exit.
6839
6840 2016-09-23 Pedro Alves <palves@redhat.com>
6841
6842 * Makefile.in (SFILES): Add common/new-op.c.
6843 (OBS): Add common/new-op.o.
6844 (new-op.o): New rule.
6845
6846 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6847
6848 * .gitinore: Ignore more files.
6849
6850 2016-09-21 Yao Qi <yao.qi@linaro.org>
6851
6852 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6853 23.
6854
6855 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6856
6857 * server.c (start_inferior): Call target_mourn_inferior instead of
6858 mourn_inferior; pass ptid_t argument to it.
6859 (resume): Likewise.
6860 (handle_target_event): Likewise.
6861 * target.c (target_mourn_inferior): New function.
6862 * target.h (mourn_inferior): Delete macro.
6863
6864 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6865
6866 * linux-low.c (lwp_is_stepping): New function.
6867
6868 2016-09-06 Carl Love <cel@us.ibm.com>
6869
6870 * server.c (start_inferior): Fixed comment, requested comment change
6871 didn't get updated correctly. Removed reference to ptrace () call as
6872 it is only true on Linux systems.
6873
6874 2016-09-06 Carl Love <cel@us.ibm.com>
6875
6876 * server.c (start_inferior): Do not call
6877 function target_post_create_inferior () if the
6878 inferior process has already exited.
6879
6880 2016-09-05 Pedro Alves <palves@redhat.com>
6881
6882 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6883 (COMPILE.pre, CC_LD): Use CXX directly.
6884 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6885 * acinclude.m4: Don't include build-with-cxx.m4.
6886 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6887 * configure: Regenerate.
6888
6889 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6890
6891 PR gdb/19495
6892 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6893 call writing data to own_buf.
6894
6895 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6896
6897 * target.c (mywait): Call target_wait instead of
6898 the_target->wait.
6899 (target_wait): New function.
6900
6901 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6902
6903 * server.c (start_inferior): New variable 'ptid'. Replace calls
6904 to the_target->resume by target_continue{,_no_signal}, depending
6905 on the case.
6906 * target.c (target_stop_and_wait): Call target_continue_no_signal
6907 instead of the_target->resume.
6908 (target_continue): New function.
6909
6910 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6911
6912 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6913
6914 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6915
6916 PR server/20491
6917 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6918 ps_prochandle.
6919 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6920 * linux-arm-low.c (ps_get_thread_area): Likewise.
6921 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6922 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6923 * linux-mips-low.c (ps_get_thread_area): Likewise.
6924 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6925 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6926 * linux-x86-low.c (ps_get_thread_area): Likewise.
6927 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6928
6929 2016-08-19 Pedro Alves <palves@redhat.com>
6930
6931 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6932
6933 2016-08-19 Pedro Alves <palves@redhat.com>
6934
6935 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6936 comment. Use memcpy instead of casting through unsigned long.
6937
6938 2016-08-19 Pedro Alves <palves@redhat.com>
6939
6940 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6941 allocating around 0x80000000.
6942
6943 2016-08-19 Pedro Alves <palves@redhat.com>
6944
6945 PR gdb/20415
6946 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6947 (x32-avx512-linux-ipa.o): New rules.
6948 * configure.ac (x86_64-*-linux*): New x32 check.
6949 * configure.srv (ipa_x32_linux_regobj): New.
6950 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6951 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6952 descriptions.
6953 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6954 descriptions.
6955 * configure: Regenerate.
6956
6957 2016-08-09 Pedro Alves <palves@redhat.com>
6958
6959 PR gdb/18653
6960 * Makefile.in (OBS): Add signals-state-save-restore.o.
6961 (signals-state-save-restore.o): New rule.
6962 * config.in: Regenerate.
6963 * configure: Regenerate.
6964 * linux-low.c: Include "signals-state-save-restore.h".
6965 (linux_create_inferior): Call
6966 restore_original_signals_state.
6967 * server.c: Include "dispositions-save-restore.h".
6968 (captured_main): Call save_original_signals_state.
6969
6970 2016-08-05 Pedro Alves <palves@redhat.com>
6971
6972 * configure: Regenerate.
6973
6974 2016-08-04 Yao Qi <yao.qi@linaro.org>
6975
6976 * linux-low.c (regsets_fetch_inferior_registers): Check
6977 errno is ESRCH or not.
6978
6979 2016-08-02 Yao Qi <yao.qi@linaro.org>
6980
6981 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6982 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6983 (thread_db_load_search): Update.
6984 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6985 td_ta_set_event and td_ta_event_getmsg.
6986
6987 2016-07-26 Pedro Alves <palves@redhat.com>
6988
6989 PR server/20414
6990 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6991 of unsigned long for 64-bit registers and use uint32_t instead of
6992 unsigned int for 32-bit registers.
6993
6994 2016-07-26 Pedro Alves <palves@redhat.com>
6995
6996 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6997 to 'ptrace'.
6998
6999 2016-07-21 Tom Tromey <tom@tromey.com>
7000
7001 * configure: Rebuild.
7002
7003 2016-07-21 Yao Qi <yao.qi@linaro.org>
7004
7005 * mem-break.c (find_gdb_breakpoint): Cast bp to
7006 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7007
7008 2016-07-21 Yao Qi <yao.qi@linaro.org>
7009
7010 * server.c (handle_v_requests): Support s and S actions
7011 if target_supports_software_single_step return true.
7012
7013 2016-07-21 Yao Qi <yao.qi@linaro.org>
7014
7015 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7016 is resume_step, call maybe_hw_step.
7017 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7018 and unstop them.
7019 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7020 breakpoints or not.
7021 (proceed_one_lwp): If resume request is resume_step, install
7022 reinsert breakpoints and call maybe_hw_step.
7023
7024 2016-07-21 Yao Qi <yao.qi@linaro.org>
7025
7026 * linux-low.c (proceed_one_lwp): Declare.
7027 (linux_resume_one_thread): Remove local variable 'step'.
7028 Lift code enqueue signal. Call proceed_one_lwp instead of
7029 linux_resume_one_lwp.
7030
7031 2016-07-21 Yao Qi <yao.qi@linaro.org>
7032
7033 * linux-low.c (linux_resume_one_thread): Call
7034 enqueue_pending_signal.
7035
7036 2016-07-21 Yao Qi <yao.qi@linaro.org>
7037
7038 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7039 * inferiors.c (do_restore_current_thread_cleanup): New function.
7040 (make_cleanup_restore_current_thread): Likewise.
7041 * linux-low.c (install_software_single_step_breakpoints): Call
7042 make_cleanup_restore_current_thread. Switch current_thread to
7043 thread.
7044
7045 2016-07-21 Yao Qi <yao.qi@linaro.org>
7046
7047 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7048 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7049 (clone_one_breakpoint): Likewise.
7050 (delete_reinsert_breakpoints): Change parameter to thread.
7051 Callers updated.
7052 (has_reinsert_breakpoints): Likewise.
7053 (uninsert_reinsert_breakpoints): Likewise.
7054 (reinsert_reinsert_breakpoints): Likewise.
7055 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7056 (delete_reinsert_breakpoints): Likewise.
7057 (reinsert_reinsert_breakpoints): Likewise.
7058 (uninsert_reinsert_breakpoints): Likewise.
7059 (has_reinsert_breakpoints): Likewise.
7060
7061 2016-07-21 Yao Qi <yao.qi@linaro.org>
7062
7063 * inferiors.c (get_thread_process): Make parameter const.
7064 * inferiors.h (get_thread_process): Update declaration.
7065 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7066 Add new parameters child_thread and parent_thread. Callers
7067 updated.
7068 * mem-break.h (clone_all_breakpoints): Update declaration.
7069
7070 2016-07-21 Yao Qi <yao.qi@linaro.org>
7071
7072 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7073 <command_list, handler>: Remove.
7074 (struct gdb_breakpoint): New.
7075 (struct other_breakpoint): New.
7076 (struct reinsert_breakpoint): New.
7077 (is_gdb_breakpoint): New function.
7078 (any_persistent_commands): Update command_list if
7079 is_gdb_breakpoint returns true.
7080 (set_breakpoint): Create breakpoints according to their types.
7081 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7082 (set_gdb_breakpoint_1): Likewise.
7083 (set_gdb_breakpoint): Likewise.
7084 (clear_breakpoint_conditions): Change parameter type to
7085 'struct gdb_breakpoint *'.
7086 (clear_breakpoint_commands): Likewise.
7087 (clear_breakpoint_conditions_and_commands): Likewise.
7088 (add_condition_to_breakpoint): Likewise.
7089 (add_breakpoint_condition): Likewise.
7090 (add_commands_to_breakpoint): Likewise.
7091 (check_breakpoints): Check other_breakpoint.
7092 (clone_one_breakpoint): Clone breakpopint according to its type.
7093 * mem-break.h (struct gdb_breakpoint): Declare.
7094 (set_gdb_breakpoint): Update declaration.
7095 (clear_breakpoint_conditions_and_commands): Likewise.
7096 (add_breakpoint_condition): Likewise.
7097 (add_breakpoint_commands): Likewise.
7098 * server.c (process_point_options): Change parameter type to
7099 'struct gdb_breakpoint *'.
7100
7101 2016-07-21 Yao Qi <yao.qi@linaro.org>
7102
7103 * mem-break.c (set_breakpoint_at): Rename it to ...
7104 (set_breakpoint_type_at): ... it.
7105 (set_breakpoint_at): Call set_breakpoint_type_at.
7106 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7107 * mem-break.h (set_breakpoint_at): Update comments.
7108
7109 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7110
7111 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7112 to buf parameter.
7113 (nios2_store_gregset): Likewise.
7114
7115 2016-07-01 Pedro Alves <palves@redhat.com>
7116 Antoine Tremblay <antoine.tremblay@ericsson.com>
7117
7118 * linux-low.c: Change interface to take the target lwp_info
7119 pointer directly and return void. Handle detaching from a zombie
7120 thread.
7121 (linux_detach_lwp_callback): New function.
7122 (linux_detach): Detach from the leader thread after detaching from
7123 the clone threads.
7124
7125 2016-06-28 Yao Qi <yao.qi@linaro.org>
7126
7127 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7128 for variable new_offset.
7129 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7130 (aarch64_ftrace_insn_reloc_cb): Likewise.
7131 (aarch64_ftrace_insn_reloc_tb): Likewise.
7132 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7133 PRIx64 instead of PRIx32.
7134
7135 2016-06-28 Yao Qi <yao.qi@linaro.org>
7136
7137 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7138 (the_low_target): Install arm_get_syscall_trapinfo.
7139
7140 2016-06-28 Yao Qi <yao.qi@linaro.org>
7141
7142 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7143 function.
7144 (the_low_target): Install aarch64_get_syscall_trapinfo.
7145
7146 2016-06-28 Yao Qi <yao.qi@linaro.org>
7147
7148 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7149 Callers updated.
7150 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7151 Remove parameter sysno.
7152 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7153 sysret.
7154
7155 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7156
7157 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7158 (s390_emit_ne_goto): Likewise.
7159 (s390_emit_lt_goto): Likewise.
7160 (s390_emit_le_goto): Likewise.
7161 (s390_emit_gt_goto): Likewise.
7162 (s390_emit_ge_goto): Likewise.
7163 (s390x_emit_eq_goto): Likewise.
7164 (s390x_emit_ne_goto): Likewise.
7165 (s390x_emit_lt_goto): Likewise.
7166 (s390x_emit_le_goto): Likewise.
7167 (s390x_emit_gt_goto): Likewise.
7168 (s390x_emit_ge_goto): Likewise.
7169 (s390_emit_ops_impl): Mark variable static.
7170 (s390x_emit_ops): Likewise.
7171
7172 2016-06-17 Yao Qi <yao.qi@linaro.org>
7173
7174 * linux-low.c (handle_extended_wait): Call
7175 uninsert_reinsert_breakpoints for the parent process. Remove
7176 reinsert breakpoints from the child process. Reinsert them to
7177 the parent process when vfork is done.
7178 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7179 (reinsert_reinsert_breakpoints): New function.
7180 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7181 (reinsert_reinsert_breakpoints): Declare.
7182
7183 2016-06-17 Yao Qi <yao.qi@linaro.org>
7184
7185 * linux-low.c (handle_extended_wait): If the parent is doing
7186 step-over, remove the reinsert breakpoints from the forked child.
7187
7188 2016-06-17 Yao Qi <yao.qi@linaro.org>
7189
7190 * linux-low.c (unsuspend_all_lwps): Declare.
7191 (linux_low_filter_event): If thread exited, call finish_step_over.
7192 If step-over is finished, unsuspend other threads.
7193
7194 2016-06-17 Yao Qi <yao.qi@linaro.org>
7195
7196 * linux-low.c (linux_resume_one_lwp_throw): Assert
7197 has_reinsert_breakpoints returns false.
7198 * mem-break.c (delete_disabled_breakpoints): Assert
7199 bp type isn't reinsert_breakpoint.
7200
7201 2016-06-17 Yao Qi <yao.qi@linaro.org>
7202
7203 * linux-low.c (maybe_hw_step): New function.
7204 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7205 (finish_step_over): Switch current_thread to lwp temporarily,
7206 and assert has_reinsert_breakpoints returns true.
7207 (proceed_one_lwp): Call maybe_hw_step.
7208 * mem-break.c (has_reinsert_breakpoints): New function.
7209 * mem-break.h (has_reinsert_breakpoints): Declare.
7210
7211 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7212
7213 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7214
7215 2016-05-17 Yao Qi <yao.qi@linaro.org>
7216
7217 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7218 instead of find_inferior.
7219
7220 2016-05-05 Yao Qi <yao.qi@linaro.org>
7221
7222 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7223 Initialize res to zero.
7224
7225 2016-05-05 Yao Qi <yao.qi@linaro.org>
7226
7227 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7228 to uint32_t.
7229
7230 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7231
7232 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7233 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7234 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7235
7236 2016-04-28 Par Olsson <par.olsson@windriver.com>
7237 Simon Marchi <simon.marchi@ericsson.com>
7238
7239 * tracepoint.c (write_inferior_int8): New function.
7240 (cmd_qtenable_disable): Write enable flag using
7241 write_inferior_int8.
7242
7243 2016-04-25 Yao Qi <yao.qi@linaro.org>
7244
7245 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7246 (need_step_over_p): Return zero if the LWP has pending signals
7247 can be delivered on software single step target.
7248
7249 2016-04-25 Yao Qi <yao.qi@linaro.org>
7250
7251 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7252 return instead of error.
7253
7254 2016-04-22 Yao Qi <yao.qi@linaro.org>
7255
7256 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7257 to 23.
7258
7259 2016-04-22 Yao Qi <yao.qi@linaro.org>
7260
7261 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7262 signal when stepping over breakpoint with software single
7263 step.
7264
7265 2016-04-21 Pedro Alves <palves@redhat.com>
7266
7267 * linux-s390-low.c (s390_collect_ptrace_register)
7268 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7269 add casts.
7270 (s390_check_regset): Use void * instead of gdb_byte *.
7271
7272 2016-04-20 Pedro Alves <palves@redhat.com>
7273
7274 * configure: Renegerate.
7275
7276 2016-04-20 Yao Qi <yao.qi@linaro.org>
7277
7278 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7279 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7280 number 16.
7281 (arm_store_gregset): Likewise.
7282
7283 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7284
7285 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7286 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7287 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7288 (amd64-avx-mpx-linux.c): New rules.
7289 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7290 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7291 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7292 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7293 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7294 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7295 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7296 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7297 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7298 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7299 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7300 * linux-x86-low.c (x86_linux_read_description): Add case for
7301 X86_XSTATE_AVX_MPX_MASK.
7302 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7303 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7304 init_registers_i386_avx_mpx_linux.
7305 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7306 (initialize_low_tracepoint): Call
7307 init_registers_i386_avx_mpx_linux.
7308 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7309 (initialize_low_tracepoint): Call
7310 init_registers_amd64_avx_mpx_linux.
7311 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7312 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7313 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7314 declarations.
7315
7316 2016-04-18 Pedro Alves <palves@redhat.com>
7317
7318 * configure: Regenerate.
7319
7320 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7321
7322 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7323 (aarch64_emit_sub): Likewise.
7324
7325 2016-04-12 Pedro Alves <palves@redhat.com>
7326
7327 * utils.c (prepare_to_throw_exception): Delete.
7328
7329 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7330
7331 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7332
7333 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7334
7335 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7336
7337 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7338
7339 * linux-aarch64-ipa.c: Add <elf.h> include.
7340 * linux-ppc-ipa.c: Add <elf.h> include.
7341 * linux-s390-ipa.c: Add <elf.h> include.
7342
7343 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7344
7345 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7346 (get_raw_reg_ptr): Likewise.
7347 (get_trace_state_variable_value_ptr): Likewise.
7348 (set_trace_state_variable_value_ptr): Likewise.
7349 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7350 char *.
7351
7352 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7353 Marcin Kościelnicki <koriakin@0x04.net>
7354
7355 PR/17221
7356 * linux-ppc-low.c (emit_insns): New function.
7357 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7358 (ppc_emit_prologue): New function.
7359 (ppc_emit_epilogue): New function.
7360 (ppc_emit_add): New function.
7361 (ppc_emit_sub): New function.
7362 (ppc_emit_mul): New function.
7363 (ppc_emit_lsh): New function.
7364 (ppc_emit_rsh_signed): New function.
7365 (ppc_emit_rsh_unsigned): New function.
7366 (ppc_emit_ext): New function.
7367 (ppc_emit_zero_ext): New function.
7368 (ppc_emit_log_not): New function.
7369 (ppc_emit_bit_and): New function.
7370 (ppc_emit_bit_or): New function.
7371 (ppc_emit_bit_xor): New function.
7372 (ppc_emit_bit_not): New function.
7373 (ppc_emit_equal): New function.
7374 (ppc_emit_less_signed): New function.
7375 (ppc_emit_less_unsigned): New function.
7376 (ppc_emit_ref): New function.
7377 (ppc_emit_const): New function.
7378 (ppc_emit_reg): New function.
7379 (ppc_emit_pop): New function.
7380 (ppc_emit_stack_flush): New function.
7381 (ppc_emit_swap): New function.
7382 (ppc_emit_stack_adjust): New function.
7383 (ppc_emit_call): New function.
7384 (ppc_emit_int_call_1): New function.
7385 (ppc_emit_void_call_2): New function.
7386 (ppc_emit_if_goto): New function.
7387 (ppc_emit_goto): New function.
7388 (ppc_emit_eq_goto): New function.
7389 (ppc_emit_ne_goto): New function.
7390 (ppc_emit_lt_goto): New function.
7391 (ppc_emit_le_goto): New function.
7392 (ppc_emit_gt_goto): New function.
7393 (ppc_emit_ge_goto): New function.
7394 (ppc_write_goto_address): New function.
7395 (ppc_emit_ops_impl): New static variable.
7396 (ppc64v1_emit_prologue): New function.
7397 (ppc64v2_emit_prologue): New function.
7398 (ppc64_emit_epilogue): New function.
7399 (ppc64_emit_add): New function.
7400 (ppc64_emit_sub): New function.
7401 (ppc64_emit_mul): New function.
7402 (ppc64_emit_lsh): New function.
7403 (ppc64_emit_rsh_signed): New function.
7404 (ppc64_emit_rsh_unsigned): New function.
7405 (ppc64_emit_ext): New function.
7406 (ppc64_emit_zero_ext): New function.
7407 (ppc64_emit_log_not): New function.
7408 (ppc64_emit_bit_and): New function.
7409 (ppc64_emit_bit_or): New function.
7410 (ppc64_emit_bit_xor): New function.
7411 (ppc64_emit_bit_not): New function.
7412 (ppc64_emit_equal): New function.
7413 (ppc64_emit_less_signed): New function.
7414 (ppc64_emit_less_unsigned): New function.
7415 (ppc64_emit_ref): New function.
7416 (ppc64_emit_const): New function.
7417 (ppc64v1_emit_reg): New function.
7418 (ppc64v2_emit_reg): New function.
7419 (ppc64_emit_pop): New function.
7420 (ppc64_emit_stack_flush): New function.
7421 (ppc64_emit_swap): New function.
7422 (ppc64v1_emit_call): New function.
7423 (ppc64v2_emit_call): New function.
7424 (ppc64v1_emit_int_call_1): New function.
7425 (ppc64v2_emit_int_call_1): New function.
7426 (ppc64v1_emit_void_call_2): New function.
7427 (ppc64v2_emit_void_call_2): New function.
7428 (ppc64_emit_if_goto): New function.
7429 (ppc64_emit_eq_goto): New function.
7430 (ppc64_emit_ne_goto): New function.
7431 (ppc64_emit_lt_goto): New function.
7432 (ppc64_emit_le_goto): New function.
7433 (ppc64_emit_gt_goto): New function.
7434 (ppc64_emit_ge_goto): New function.
7435 (ppc64v1_emit_ops_impl): New static variable.
7436 (ppc64v2_emit_ops_impl): New static variable.
7437 (ppc_emit_ops): New function.
7438 (linux_low_target): Wire in ppc_emit_ops.
7439
7440 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7441 Marcin Kościelnicki <koriakin@0x04.net>
7442
7443 PR/17221
7444 * Makefile.in: Add powerpc-*-ipa.o
7445 * configure.srv: Add ipa_obj for powerpc*-linux.
7446 * linux-ppc-ipa.c: New file.
7447 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7448 includes.
7449 (PPC_FIELD): New macro.
7450 (PPC_SEXT): New macro.
7451 (PPC_OP6): New macro.
7452 (PPC_BO): New macro.
7453 (PPC_LI): New macro.
7454 (PPC_BD): New macro.
7455 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7456 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7457 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7458 (ppc_get_thread_area): New function.
7459 (is_elfv2_inferior): New function.
7460 (gen_ds_form): New function.
7461 (GEN_STD): New macro.
7462 (GEN_STDU): New macro.
7463 (GEN_LD): New macro.
7464 (GEN_LDU): New macro.
7465 (gen_d_form): New function.
7466 (GEN_ADDI): New macro.
7467 (GEN_ADDIS): New macro.
7468 (GEN_LI): New macro.
7469 (GEN_LIS): New macro.
7470 (GEN_ORI): New macro.
7471 (GEN_ORIS): New macro.
7472 (GEN_LWZ): New macro.
7473 (GEN_STW): New macro.
7474 (GEN_STWU): New macro.
7475 (gen_xfx_form): New function.
7476 (GEN_MFSPR): New macro.
7477 (GEN_MTSPR): New macro.
7478 (GEN_MFCR): New macro.
7479 (GEN_MTCR): New macro.
7480 (GEN_SYNC): New macro.
7481 (GEN_LWSYNC): New macro.
7482 (gen_x_form): New function.
7483 (GEN_OR): New macro.
7484 (GEN_MR): New macro.
7485 (GEN_LWARX): New macro.
7486 (GEN_STWCX): New macro.
7487 (GEN_CMPW): New macro.
7488 (gen_md_form): New function.
7489 (GEN_RLDICL): New macro.
7490 (GEN_RLDICR): New macro.
7491 (gen_i_form): New function.
7492 (GEN_B): New macro.
7493 (GEN_BL): New macro.
7494 (gen_b_form): New function.
7495 (GEN_BNE): New macro.
7496 (GEN_LOAD): New macro.
7497 (GEN_STORE): New macro.
7498 (gen_limm): New function.
7499 (gen_atomic_xchg): New function.
7500 (gen_call): New function.
7501 (ppc_relocate_instruction): New function.
7502 (ppc_install_fast_tracepoint_jump_pad): New function.
7503 (ppc_get_min_fast_tracepoint_insn_len): New function.
7504 (ppc_get_ipa_tdesc_idx): New function.
7505 (the_low_target): Wire in the new functions.
7506 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7507 tdescs.
7508 * linux-ppc-tdesc.h: New file.
7509
7510 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7511
7512 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7513 (alloc_jump_pad_buffer): New function.
7514 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7515 (alloc_jump_pad_buffer): New function.
7516 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7517 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7518 (alloc_jump_pad_buffer): New function.
7519 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7520 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7521 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7522 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7523
7524 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7525
7526 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7527 * linux-amd64-ipa.c: Likewise.
7528 * linux-i386-ipa.c: Likewise.
7529 * linux-s390-ipa.c: Likewise.
7530 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7531 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7532 set_trace_state_variable_value_ptr.
7533 (struct ipa_sym_addresses): Likewise.
7534 (symbol_list): Likewise.
7535 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7536 accessing gdb_collect directly.
7537 (gdb_collect_ptr_type): New typedef.
7538 (get_raw_reg_ptr_type): New typedef.
7539 (get_trace_state_variable_value_ptr_type): New typedef.
7540 (set_trace_state_variable_value_ptr_type): New typedef.
7541 (gdb_collect_ptr): New global.
7542 (get_raw_reg_ptr): New global.
7543 (get_trace_state_variable_value_ptr): New global.
7544 (set_trace_state_variable_value_ptr): New global.
7545 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7546 accessing get_raw_reg directly.
7547 (get_get_tsv_func_addr): Likewise for
7548 get_trace_state_variable_value_ptr.
7549 (get_set_tsv_func_addr): Likewise for
7550 set_trace_state_variable_value_ptr.
7551 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7552
7553 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7554
7555 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7556
7557 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7558
7559 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7560 packets.
7561 (relocate_instruction): Remove own_buf.
7562 * server.c (own_buf): Make global.
7563 (handle_v_requests): Make global.
7564 * server.h (own_buf): New declaration.
7565 (handle_v_requests): New prototype.
7566
7567 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7568
7569 PR 18377
7570 * linux-s390-low.c (add_insns): New function.
7571 (s390_emit_prologue): New function.
7572 (s390_emit_epilogue): New function.
7573 (s390_emit_add): New function.
7574 (s390_emit_sub): New function.
7575 (s390_emit_mul): New function.
7576 (s390_emit_lsh): New function.
7577 (s390_emit_rsh_signed): New function.
7578 (s390_emit_rsh_unsigned): New function.
7579 (s390_emit_ext): New function.
7580 (s390_emit_log_not): New function.
7581 (s390_emit_bit_and): New function.
7582 (s390_emit_bit_or): New function.
7583 (s390_emit_bit_xor): New function.
7584 (s390_emit_bit_not): New function.
7585 (s390_emit_equal): New function.
7586 (s390_emit_less_signed): New function.
7587 (s390_emit_less_unsigned): New function.
7588 (s390_emit_ref): New function.
7589 (s390_emit_if_goto): New function.
7590 (s390_emit_goto): New function.
7591 (s390_write_goto_address): New function.
7592 (s390_emit_litpool): New function.
7593 (s390_emit_const): New function.
7594 (s390_emit_call): New function.
7595 (s390_emit_reg): New function.
7596 (s390_emit_pop): New function.
7597 (s390_emit_stack_flush): New function.
7598 (s390_emit_zero_ext): New function.
7599 (s390_emit_swap): New function.
7600 (s390_emit_stack_adjust): New function.
7601 (s390_emit_set_r2): New function.
7602 (s390_emit_int_call_1): New function.
7603 (s390_emit_void_call_2): New function.
7604 (s390_emit_eq_goto): New function.
7605 (s390_emit_ne_goto): New function.
7606 (s390_emit_lt_goto): New function.
7607 (s390_emit_le_goto): New function.
7608 (s390_emit_gt_goto): New function.
7609 (s390_emit_ge_goto): New function.
7610 (s390x_emit_prologue): New function.
7611 (s390x_emit_epilogue): New function.
7612 (s390x_emit_add): New function.
7613 (s390x_emit_sub): New function.
7614 (s390x_emit_mul): New function.
7615 (s390x_emit_lsh): New function.
7616 (s390x_emit_rsh_signed): New function.
7617 (s390x_emit_rsh_unsigned): New function.
7618 (s390x_emit_ext): New function.
7619 (s390x_emit_log_not): New function.
7620 (s390x_emit_bit_and): New function.
7621 (s390x_emit_bit_or): New function.
7622 (s390x_emit_bit_xor): New function.
7623 (s390x_emit_bit_not): New function.
7624 (s390x_emit_equal): New function.
7625 (s390x_emit_less_signed): New function.
7626 (s390x_emit_less_unsigned): New function.
7627 (s390x_emit_ref): New function.
7628 (s390x_emit_if_goto): New function.
7629 (s390x_emit_const): New function.
7630 (s390x_emit_call): New function.
7631 (s390x_emit_reg): New function.
7632 (s390x_emit_pop): New function.
7633 (s390x_emit_stack_flush): New function.
7634 (s390x_emit_zero_ext): New function.
7635 (s390x_emit_swap): New function.
7636 (s390x_emit_stack_adjust): New function.
7637 (s390x_emit_int_call_1): New function.
7638 (s390x_emit_void_call_2): New function.
7639 (s390x_emit_eq_goto): New function.
7640 (s390x_emit_ne_goto): New function.
7641 (s390x_emit_lt_goto): New function.
7642 (s390x_emit_le_goto): New function.
7643 (s390x_emit_gt_goto): New function.
7644 (s390x_emit_ge_goto): New function.
7645 (s390_emit_ops): New function.
7646 (struct linux_target_ops): Fill in emit_ops hook.
7647
7648 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7649
7650 PR 18377
7651 * Makefile.in: Add s390 IPA files.
7652 * configure.srv: Build IPA for s390.
7653 * linux-s390-ipa.c: New file.
7654 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7655 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7656 (tdesc_s390_linux32): Likewise.
7657 (init_registers_s390_linux32v1): Likewise.
7658 (tdesc_s390_linux32v1): Likewise.
7659 (init_registers_s390_linux32v2): Likewise.
7660 (tdesc_s390_linux32v2): Likewise.
7661 (init_registers_s390_linux64): Likewise.
7662 (tdesc_s390_linux64): Likewise.
7663 (init_registers_s390_linux64v1): Likewise.
7664 (tdesc_s390_linux64v1): Likewise.
7665 (init_registers_s390_linux64v2): Likewise.
7666 (tdesc_s390_linux64v2): Likewise.
7667 (init_registers_s390_te_linux64): Likewise.
7668 (tdesc_s390_te_linux64): Likewise.
7669 (init_registers_s390_vx_linux64): Likewise.
7670 (tdesc_s390_vx_linux64): Likewise.
7671 (init_registers_s390_tevx_linux64): Likewise.
7672 (tdesc_s390_tevx_linux64): Likewise.
7673 (init_registers_s390x_linux64): Likewise.
7674 (tdesc_s390x_linux64): Likewise.
7675 (init_registers_s390x_linux64v1): Likewise.
7676 (tdesc_s390x_linux64v1): Likewise.
7677 (init_registers_s390x_linux64v2): Likewise.
7678 (tdesc_s390x_linux64v2): Likewise.
7679 (init_registers_s390x_te_linux64): Likewise.
7680 (tdesc_s390x_te_linux64): Likewise.
7681 (init_registers_s390x_vx_linux64): Likewise.
7682 (tdesc_s390x_vx_linux64): Likewise.
7683 (init_registers_s390x_tevx_linux64): Likewise.
7684 (tdesc_s390x_tevx_linux64): Likewise.
7685 (have_hwcap_s390_vx): New static variable.
7686 (s390_arch_setup): Fill have_hwcap_s390_vx.
7687 (s390_get_thread_area): New function.
7688 (s390_ft_entry_gpr_esa): New const.
7689 (s390_ft_entry_gpr_zarch): New const.
7690 (s390_ft_entry_misc): New const.
7691 (s390_ft_entry_fr): New const.
7692 (s390_ft_entry_vr): New const.
7693 (s390_ft_main_31): New const.
7694 (s390_ft_main_64): New const.
7695 (s390_ft_exit_fr): New const.
7696 (s390_ft_exit_vr): New const.
7697 (s390_ft_exit_misc): New const.
7698 (s390_ft_exit_gpr_esa): New const.
7699 (s390_ft_exit_gpr_zarch): New const.
7700 (append_insns): New function.
7701 (s390_relocate_instruction): New function.
7702 (s390_install_fast_tracepoint_jump_pad): New function.
7703 (s390_get_min_fast_tracepoint_insn_len): New function.
7704 (s390_get_ipa_tdesc_idx): New function.
7705 (struct linux_target_ops): Wire in the above functions.
7706 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7707 * linux-s390-tdesc.h: New file.
7708
7709 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7710
7711 * linux-s390-low.c (s390_supports_tracepoints): New function.
7712 (struct linux_target_ops): Fill supports_tracepoints hook.
7713
7714 2016-03-18 Yao Qi <yao.qi@linaro.org>
7715
7716 * linux-low.c (lwp_signal_can_be_delivered): New function.
7717 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7718
7719 2016-03-18 Yao Qi <yao.qi@linaro.org>
7720
7721 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7722 0 if signal is enqueued. Remove 'signal' from one debugging
7723 message. Move one debugging message to some lines below.
7724 Remove code setting 'signal' to 0.
7725
7726 2016-03-18 Yao Qi <yao.qi@linaro.org>
7727
7728 * linux-low.c (linux_low_filter_event): Remove redundant
7729 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7730
7731 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7732
7733 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7734 (struct linux_target_ops): Wire in the above.
7735
7736 2016-03-03 Yao Qi <yao.qi@linaro.org>
7737
7738 * linux-low.c: Update comments to start_step_over.
7739
7740 2016-03-03 Yao Qi <yao.qi@linaro.org>
7741
7742 PR server/19736
7743 * linux-low.c (handle_extended_wait): Set child suspended
7744 if event_lwp->bp_reinsert isn't zero.
7745
7746 2016-03-02 Yao Qi <yao.qi@linaro.org>
7747
7748 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7749 enqueue_pending_signal.
7750
7751 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7752
7753 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7754 is actually loaded.
7755
7756 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7757
7758 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7759 (s390_regmap_3264) [!__s390x__]: New global.
7760 (s390_collect_ptrace_register): Skip map entries containing -1.
7761 (s390_supply_ptrace_register): Ditto.
7762 (s390_fill_gprs_high): New function.
7763 (s390_store_gprs_high): New function.
7764 (s390_regsets): Add NT_S390_HIGH_GPRS.
7765 (s390_get_hwcap): Enable on 31-bit.
7766 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7767 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7768 Detect NT_S390_HIGH_GPRS.
7769 (s390_usrregs_info_3264): Enable on 31-bit.
7770 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7771 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7772
7773 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7774
7775 PR gdb/13808
7776 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7777 * configure.srv: Ditto.
7778 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7779 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7780 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7781 (init_registers_amd64_linux): Remove prototype.
7782 (tdesc_amd64_linux): Remove declaration.
7783 (get_ipa_tdesc): New function.
7784 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7785 initialize remaining tdescs.
7786 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7787 (init_registers_i386_linux): Remove prototype.
7788 (tdesc_i386_linux): Remove declaration.
7789 (get_ipa_tdesc): New function.
7790 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7791 initialize remaining tdescs.
7792 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7793 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7794 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7795 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7796 (x86_get_ipa_tdesc_idx): New function.
7797 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7798 * linux-x86-tdesc.h: New file.
7799 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7800 (target_get_ipa_tdesc_idx): New macro.
7801 * tracepoint.c (ipa_tdesc_idx): New macro.
7802 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7803 (symbol_list): Add ipa_tdesc_idx.
7804 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7805 (ipa_tdesc): Remove.
7806 (ipa_tdesc_idx): New variable.
7807 (get_context_regcache): Use get_ipa_tdesc.
7808 (gdb_collect): Ditto.
7809 (gdb_probe): Ditto.
7810 * tracepoint.h (get_ipa_tdesc): New prototype.
7811 (ipa_tdesc): Remove.
7812
7813 2016-02-24 Pedro Alves <palves@redhat.com>
7814
7815 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7816 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7817 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7818 Factor out common code between the USE_SIGTRAP_SIGINFO and
7819 !USE_SIGTRAP_SIGINFO blocks.
7820 (linux_low_filter_event): Call save_stop_reason instead of
7821 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7822 Update comments.
7823 (linux_wait_1): Update comments.
7824
7825 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
7826
7827 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7828 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7829 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7830 ppc_insert_point, ppc_remove_point.
7831
7832 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7833
7834 * linux-s390-low.c (s390_supports_z_point_type): New function.
7835 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7836
7837 2016-02-16 Yao Qi <yao.qi@linaro.org>
7838
7839 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7840 PC. Get pc from regcache_read_pc.
7841
7842 2016-02-12 Yao Qi <yao.qi@linaro.org>
7843
7844 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7845 or linux_get_pc_32bit.
7846 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7847
7848 2016-02-12 Yao Qi <yao.qi@linaro.org>
7849
7850 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7851 arm_linux_get_next_pcs_fixup.
7852
7853 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7854
7855 * tracepoint.c (x_tracepoint_action_download): Change
7856 write_inferior_data_ptr to write_inferior_data_pointer.
7857 (cmd_qtstart): Likewise.
7858 (write_inferior_data_ptr): Remove.
7859 (download_agent_expr): Change write_inferior_data_ptr to
7860 write_inferior_data_pointer.
7861 (download_tracepoint_1): Likewise.
7862 (download_tracepoint): Likewise.
7863 (download_trace_state_variables): Likewise.
7864
7865 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
7866 Marcin Kościelnicki <koriakin@0x04.net>
7867
7868 * tracepoint.c (struct tracepoint_action_ops): Remove.
7869 (struct tracepoint_action): Remove ops.
7870 (m_tracepoint_action_download, r_tracepoint_action_download)
7871 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7872 size and offset accordingly.
7873 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7874 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7875 (tracepoint_action_send, tracepoint_action_download): New functions.
7876 Helpers for trace action handlers.
7877 (add_tracepoint_action): Remove setup actions ops.
7878 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7879
7880 2016-02-10 Yao Qi <yao.qi@linaro.org>
7881
7882 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7883
7884 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7885
7886 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7887 to AC_OUTPUT.
7888 * configure: Regenerate.
7889
7890 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7891
7892 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7893 void * to gdb_byte *.
7894 * linux-low.c (siginfo_fixup): Likewise.
7895 (linux_xfer_siginfo): Likewise.
7896 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7897 Likewise.
7898 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7899
7900 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7901
7902 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7903 to srv_tgtobj.
7904 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7905 to srv_tgtobj.
7906 * linux-x86-low.c [__x86_64__]: Include
7907 "nat/amd64-linux-siginfo.h".
7908 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7909 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7910 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7911 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7912 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7913 (cpt_si_fd, si_timerid, si_overrun): Move from
7914 nat/amd64-linux-siginfo.c.
7915 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7916
7917 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7918
7919 * server.c (skip_to_semicolon): Remove.
7920 (process_point_options): Use strchrnul instead of
7921 skip_to_semicolon.
7922
7923 2016-01-26 Yao Qi <yao.qi@linaro.org>
7924
7925 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7926 * linux-low.c (install_software_single_step_breakpoints): Don't
7927 call regcache_read_pc.
7928 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7929 argument pc.
7930
7931 2016-01-26 Yao Qi <yao.qi@linaro.org>
7932
7933 * linux-low.c (install_software_single_step_breakpoints): Call
7934 regcache_read_pc instead of get_pc.
7935
7936 2016-01-26 Yao Qi <yao.qi@linaro.org>
7937
7938 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7939 (unblock_async_io): Rename to ...
7940 (block_unblock_async_io): ... it. New function.
7941 (enable_async_io): Don't install SIGIO handler. Unblock it
7942 instead.
7943 (disable_async_io): Don't ignore SIGIO. Block it instead.
7944 (initialize_async_io): Install SIGIO handler. Don't call
7945 unblock_async_io.
7946
7947 2016-01-26 Yao Qi <yao.qi@linaro.org>
7948
7949 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7950 first character is '\003', call *the_target->request_interrupt.
7951
7952 2016-01-25 Yao Qi <yao.qi@linaro.org>
7953
7954 * remote-utils.c (new_thread_notify): Remove.
7955 (dead_thread_notify): Likewise.
7956 * remote-utils.h (new_thread_notify): Remove declaration.
7957 (dead_thread_notify): Likewise.
7958
7959 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7960
7961 * gdb.trace/pending.exp: Fix expected message on continue.
7962
7963 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7964
7965 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7966 it works properly on big-endian machines where sizeof (CORE_ADDR)
7967 != sizeof (void *).
7968
7969 2016-01-21 Pedro Alves <palves@redhat.com>
7970
7971 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7972 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7973 * configure: Regenerate.
7974
7975 2016-01-21 Yao Qi <yao.qi@linaro.org>
7976
7977 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7978 is_thumb and set it according to CPSR saved on the stack.
7979 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7980 arm_sigreturn_next_pc.
7981
7982 2016-01-18 Yao Qi <yao.qi@linaro.org>
7983
7984 * linux-low.c (linux_set_pc_64bit): New function.
7985 (linux_get_pc_64bit): New function.
7986 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7987 Declare.
7988 * linux-sparc-low.c (debug_threads): Remove declaration.
7989 (sparc_get_pc): Remove.
7990 (the_low_target): Use linux_get_pc_64bit instead of
7991 sparc_get_pc.
7992 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7993 (the_low_target): Use linux_get_pc_64bit and
7994 linux_set_pc_64bit.
7995
7996 2016-01-18 Yao Qi <yao.qi@linaro.org>
7997
7998 * linux-arm-low.c (debug_threads): Remove declaration.
7999 (arm_get_pc, arm_set_pc): Remove.
8000 (the_low_target): Use linux_get_pc_32bit and
8001 linux_set_pc_32bit.
8002 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8003 (the_low_target): Use linux_get_pc_32bit and
8004 linux_set_pc_32bit.
8005 * linux-cris-low.c (debug_threads): Remove declaration.
8006 (cris_get_pc, cris_set_pc,): Remove.
8007 (the_low_target): Use linux_get_pc_32bit and
8008 linux_set_pc_32bit.
8009 * linux-crisv32-low.c (debug_threads): Remove declaration.
8010 (cris_get_pc, cris_set_pc): Remove.
8011 (the_low_target): Use linux_get_pc_32bit and
8012 linux_set_pc_32bit.
8013 * linux-low.c: Include inttypes.h.
8014 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8015 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8016 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8017 (the_low_target): Use linux_get_pc_32bit and
8018 linux_set_pc_32bit.
8019 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8020 (the_low_target): Use linux_get_pc_32bit and
8021 linux_set_pc_32bit.
8022 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8023 (the_low_target): Use linux_get_pc_32bit and
8024 linux_set_pc_32bit.
8025 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8026 (the_low_target): Use linux_get_pc_32bit and
8027 linux_set_pc_32bit.
8028 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8029 (the_low_target): Use linux_get_pc_32bit and
8030 linux_set_pc_32bit.
8031
8032 2016-01-18 Gary Benson <gbenson@redhat.com>
8033
8034 * configure.ac (AC_FUNC_FORK): New check.
8035 * config.in: Regenerate.
8036 * configure: Likewise.
8037
8038 2016-01-14 Yao Qi <yao.qi@linaro.org>
8039
8040 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8041 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8042 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8043 arm_get_next_pcs_ctor.
8044
8045 2016-01-12 Josh Stone <jistone@redhat.com>
8046 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8047
8048 * inferiors.h: Include "gdb_vecs.h".
8049 (struct process_info): Add syscalls_to_catch.
8050 * inferiors.c (remove_process): Free syscalls_to_catch.
8051 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8052 syscall_return stops.
8053 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8054 * server.c (handle_general_set): Handle QCatchSyscalls.
8055 (handle_query): Report support for QCatchSyscalls.
8056 * target.h (struct target_ops): Add supports_catch_syscall.
8057 (target_supports_catch_syscall): New macro.
8058 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8059 (struct lwp_info): Add syscall_state.
8060 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8061 Maintain syscall_state and syscalls_to_catch across exec.
8062 (get_syscall_trapinfo): New function, proxy to the_low_target.
8063 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8064 (linux_low_filter_event): Toggle syscall_state entry/return for
8065 syscall traps, and set it ignored for all others.
8066 (gdb_catching_syscalls_p): New function.
8067 (gdb_catch_this_syscall_p): New function.
8068 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8069 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8070 (linux_supports_catch_syscall): New function.
8071 (linux_target_ops): Install it.
8072 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8073 (the_low_target): Install it.
8074
8075 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8076
8077 * acinclude.m4: Include new ../warning.m4 file.
8078 * configure: Regenerated.
8079 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8080
8081 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8082
8083 * ax.c (is_goto_target): Mark static.
8084 * linux-low.c (register_addr): Likewise.
8085 (linux_fetch_registers, linux_store_registers): Likewise.
8086 * mem-break.c (any_persistent_commands): Fix old prototype.
8087 (add_commands_to_breakpoint): Mark static.
8088 * regcache.c (find_register_by_name): Delete unused func.
8089 * remote-utils.c (hex_or_minus_one): Mark static.
8090 * server.c (monitor_show_help): Mark static.
8091 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8092 handle_v_requests): Likewise.
8093
8094 2016-01-12 Pedro Alves <palves@redhat.com>
8095
8096 Remove use of the registered trademark symbol throughout.
8097
8098 2016-01-08 Yao Qi <yao.qi@linaro.org>
8099
8100 * remote-utils.c (getpkt): If c is '\003', call target hook
8101 request_interrupt.
8102
8103 2016-01-06 Yao Qi <yao.qi@linaro.org>
8104
8105 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8106 linux-aarch32-low.c.
8107 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8108 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8109 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8110 (thumb2_breakpoint): Declare.
8111 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8112 linux-aarch32-low.h.
8113 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8114 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8115 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8116
8117 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8118
8119 * gdbreplay.c (gdbreplay_version): Change copyright year in
8120 version message.
8121 * server.c (gdbserver_version): Likewise.
8122
8123 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8124
8125 * server.c (crc32_table): Delete.
8126 (crc32): Use libiberty's xcrc32 function.
8127
8128 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8129
8130 * lynx-low.c (lynx_delete_thread_callback): New function.
8131 (lynx_mourn): Properly delete our process and all of its
8132 threads. Remove call to clear_inferiors.
8133
8134 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8135
8136 * target.c (thread_search_callback): Add check that
8137 the thread_stopped target callback is not NULL before
8138 calling it.
8139
8140 2015-12-21 Yao Qi <yao.qi@linaro.org>
8141
8142 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8143 arm breakpoint.
8144
8145 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8146
8147 * server.c (handle_query): Call target_supports_software_single_step.
8148
8149 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8150
8151 * linux-low.c (single_step): New function.
8152 (linux_resume_one_lwp_throw): Call single_step.
8153 (start_step_over): Likewise.
8154
8155 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8156
8157 * Makefile.in (SFILES): Append arch/arm-linux.c,
8158 arch/arm-get-next-pcs.c.
8159 (arm-linux.o): New rule.
8160 (arm-get-next-pcs.o): New rule.
8161 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8162 arm-linux.o.
8163 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8164 to linux-aarch32-low.c.
8165 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8166 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8167 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8168 (thumb2_breakpoint_len): Likewise.
8169 (arm_is_thumb_mode): Make non-static.
8170 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8171 from linux-aarch32-low.c.
8172 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8173 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8174 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8175 (thumb2_breakpoint_len): Likewise.
8176 (arm_is_thumb_mode): New declaration.
8177 * linux-arm-low.c: Include arch/arm-linux.h
8178 aarch/arm-get-next-pcs.h, sys/syscall.h.
8179 (get_next_pcs_ops): New struct.
8180 (get_next_pcs_addr_bits_remove): New function.
8181 (get_next_pcs_is_thumb): New function.
8182 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8183 (arm_sigreturn_next_pc): Likewise.
8184 (get_next_pcs_syscall_next_pc): Likewise.
8185 (arm_gdbserver_get_next_pcs): Likewise.
8186 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8187 Initialize.
8188 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8189 * server.h: Include gdb_vecs.h.
8190
8191 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8192
8193 * Makefile.in (SFILES): Append common/common-regcache.c.
8194 (OBS): Append common-regcache.o.
8195 (common-regcache.o): New rule.
8196 * regcache.c (init_register_cache): Initialize cache to
8197 REG_UNAVAILABLE.
8198 (regcache_raw_read_unsigned): New function.
8199 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8200 register_status enum.
8201
8202 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8203
8204 * linux-aarch64-low.c (the_low_targets): Rename
8205 breakpoint_reinsert_addr to get_next_pcs.
8206 * linux-arm-low.c (the_low_targets): Likewise.
8207 * linux-bfin-low.c (the_low_targets): Likewise.
8208 * linux-cris-low.c (the_low_targets): Likewise.
8209 * linux-crisv32-low.c (the_low_targets): Likewise.
8210 * linux-low.c (can_software_single_step): Likewise.
8211 (install_software_single_step_breakpoints): New function.
8212 (start_step_over): Use install_software_single_step_breakpoints.
8213 * linux-low.h: New CORE_ADDR vector.
8214 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8215 get_next_pcs.
8216 * linux-mips-low.c (the_low_targets): Likewise.
8217 * linux-nios2-low.c (the_low_targets): Likewise.
8218 * linux-sparc-low.c (the_low_targets): Likewise.
8219
8220 2015-12-17 Pedro Alves <palves@redhat.com>
8221
8222 * linux-low.c (linux_kill_one_lwp): Remove references to
8223 LinuxThreads.
8224 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8225 to 'kill'.
8226 (linux_init_signals): Delete.
8227 (initialize_low): Adjust.
8228 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8229
8230 2015-12-16 Pedro Alves <palves@redhat.com>
8231
8232 * configure.ac (compiler warning flags): When testing a
8233 -Wno-foo option, check whether -Wfoo works instead.
8234 * configure: Regenerate.
8235
8236 2015-12-11 Don Breazeal <donb@codesourcery.com>
8237
8238 * server.c (process_serial_event): Don't exit from gdbserver
8239 in remote mode if there are still active inferiors.
8240
8241 2015-12-11 Yao Qi <yao.qi@linaro.org>
8242
8243 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8244 arm_breakpoint_at if the process is 32-bit.
8245
8246 2015-12-11 Yao Qi <yao.qi@linaro.org>
8247
8248 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8249 arm breakpoint.
8250
8251 2015-12-07 Yao Qi <yao.qi@linaro.org>
8252
8253 * configure.srv: Append arm.o to srv_tgtobj for
8254 aarch64*-*-linux* target.
8255 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8256 from linux-arm-low.c.
8257 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8258 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8259 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8260 (thumb2_breakpoint_len): Likewise.
8261 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8262 (arm_breakpoint_kinds): Likewise.
8263 (arm_breakpoint_kind_from_pc): Likewise.
8264 (arm_sw_breakpoint_from_kind): Likewise.
8265 (arm_breakpoint_kind_from_current_state): Likewise.
8266 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8267 (arm_sw_breakpoint_from_kind): Declare.
8268 (arm_breakpoint_kind_from_current_state): Declare.
8269 (arm_breakpoint_at): Declare.
8270 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8271 arm_sw_breakpoint_from_kind if process is 32-bit.
8272 (aarch64_breakpoint_kind_from_pc): New function.
8273 (aarch64_breakpoint_kind_from_current_state): New function.
8274 (the_low_target): Initialize fields breakpoint_kind_from_pc
8275 and breakpoint_kind_from_current_state.
8276 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8277 linux-aarch32-low.c.
8278 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8279 (arm_breakpoint, arm_breakpoint_len): Likewise.
8280 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8281 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8282 (arm_is_thumb_mode): Likewise.
8283 (arm_breakpoint_at): Likewise.
8284 (arm_breakpoint_kind_from_pc): Likewise.
8285 (arm_sw_breakpoint_from_kind): Likewise.
8286 (arm_breakpoint_kind_from_current_state): Likewise.
8287
8288 Revert:
8289 2015-08-04 Yao Qi <yao.qi@linaro.org>
8290
8291 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8292 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8293 * server.c (extended_protocol): Remove "static".
8294 * server.h (extended_protocol): Declare it.
8295
8296 2015-12-04 Josh Stone <jistone@redhat.com>
8297
8298 * target.h (struct target_ops) <arch_setup>: Rename to ...
8299 (struct target_ops) <post_create_inferior>: ... this.
8300 (target_arch_setup): Rename to ...
8301 (target_post_create_inferior): ... this, calling post_create_inferior.
8302 * server.c (start_inferior): Update target_arch_setup calls to
8303 target_post_create_inferior.
8304 * linux-low.c (linux_low_ptrace_options): Forward declare.
8305 (linux_arch_setup): Update its comment for general use.
8306 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8307 (struct linux_target_ops): Use linux_post_create_inferior.
8308 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8309 to post_create_inferior.
8310 * nto-low.c (struct nto_target_ops): Likewise.
8311 * spu-low.c (struct spu_target_ops): Likewise.
8312 * win32-low.c (struct win32_target_ops): Likewise.
8313
8314 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8315
8316 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8317
8318 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8319
8320 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8321 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8322 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8323 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8324 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8325 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8326 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8327 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8328 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8329 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8330 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8331 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8332
8333 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8334
8335 * linux-low.c (linux_look_up_symbols): Don't call
8336 linux_supports_traceclone.
8337 * linux-low.h (thread_db_init): Remove use_events argument.
8338 * thread-db.c (thread_db_use_event): Remove global variable.
8339 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8340 (struct thread_db) <td_create_bp>: Remove field.
8341 (thread_db_create_event): Remove function.
8342 (thread_db_enable_reporting): Likewise.
8343 (find_one_thread): Don't check for thread_db_use_events.
8344 (attach_thread): Likewise.
8345 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8346 (try_thread_db_load_1): Don't check for thread_db_use_events.
8347 (thread_db_init): Remove use_events argument and thread events
8348 handling.
8349 (remove_thread_event_breakpoints): Remove function.
8350 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8351
8352 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8353
8354 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8355 New function.
8356 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8357 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8358 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8359 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8360 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8361 Initialize.
8362 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8363 New function.
8364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8365 * linux-low.c (can_hardware_single_step): Use
8366 supports_hardware_single_step.
8367 (can_software_single_step): New function.
8368 (start_step_over): Call can_software_single_step.
8369 (linux_supports_hardware_single_step): New function.
8370 (struct target_ops) <supports_software_single_step>: Initialize.
8371 * linux-low.h (struct linux_target_ops)
8372 <supports_hardware_single_step>: Initialize.
8373 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8374 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8375 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8376 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8377 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8378 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8379 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8380 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8381 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8382 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8383 Initialize.
8384 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8385 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8386 Initialize.
8387 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8388 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8389 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8390 New function.
8391 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8392 * target.h (struct target_ops): <supports_software_single_step>:
8393 New field.
8394 (target_supports_software_single_step): New macro.
8395
8396 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8397
8398 * linux-low.c (linux_wait_1): Fix pc advance condition.
8399 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8400 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8401
8402 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8403
8404 * linux-arm-low.c (arm_is_thumb_mode): New function.
8405 (arm_breakpoint_at): Use arm_is_thumb_mode.
8406 (arm_breakpoint_kind_from_current_state): New function.
8407 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8408 Initialize.
8409 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8410 (linux_breakpoint_kind_from_current_state): New function.
8411 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8412 * linux-low.h (struct linux_target_ops)
8413 <breakpoint_kind_from_current_state>: New field.
8414 * target.h (struct target_ops): Likewise.
8415 (target_breakpoint_kind_from_current_state): New macro.
8416
8417 2015-11-30 Pedro Alves <palves@redhat.com>
8418
8419 * linux-low.c (linux_resume): Wake up the event loop before
8420 returning.
8421
8422 2015-11-30 Pedro Alves <palves@redhat.com>
8423
8424 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8425 check.
8426 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8427 to -1.
8428 * target.c (struct thread_search): New structure.
8429 (thread_search_callback): New function.
8430 (prev_general_thread): New global.
8431 (prepare_to_access_memory, done_accessing_memory): New functions.
8432 * target.h (prepare_to_access_memory, done_accessing_memory):
8433 Replace macros with function declarations.
8434
8435 2015-11-30 Pedro Alves <palves@redhat.com>
8436
8437 PR 14618
8438 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8439 report TARGET_WAITKIND_NO_RESUMED.
8440 * remote-utils.c (prepare_resume_reply): Handle
8441 TARGET_WAITKIND_NO_RESUMED.
8442 * server.c (report_no_resumed): New global.
8443 (handle_query) <qSupported>: Handle "no-resumed+". Report
8444 "no-resumed+" support.
8445 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8446 return error if the client doesn't support no-resumed events.
8447 (push_stop_notification): New function.
8448 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8449 events if the client supports them.
8450
8451 2015-11-30 Pedro Alves <palves@redhat.com>
8452
8453 * linux-low.c (thread_still_has_status_pending_p): Don't check
8454 vCont;t here.
8455 (lwp_resumed): New function.
8456 (status_pending_p_callback): Return early if the LWP is not
8457 supposed to be resumed.
8458
8459 2015-11-30 Pedro Alves <palves@redhat.com>
8460
8461 * linux-low.c (handle_extended_wait): Assert that the LWP's
8462 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8463 thread create events, leave the new child's status pending.
8464 (linux_low_filter_event): If GDB wants to hear about thread exit
8465 events, leave the LWP marked dead and don't delete it.
8466 (linux_wait_for_event_filtered): Don't check for thread exit.
8467 (filter_exit_event): New function.
8468 (linux_wait_1): Use it, when returning an exit event.
8469 (linux_resume_one_lwp_throw): Assert that the LWP's
8470 waitstatus is TARGET_WAITKIND_IGNORE.
8471 * remote-utils.c (prepare_resume_reply): Handle
8472 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8473 * server.c (report_thread_events): New global.
8474 (handle_general_set): Handle QThreadEvents.
8475 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8476 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8477 TARGET_WAITKIND_THREAD_EXITED.
8478 * server.h (report_thread_events): Declare.
8479
8480 2015-11-30 Pedro Alves <palves@redhat.com>
8481
8482 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8483 the thread's last_resume_kind was resume_stop.
8484
8485 2015-11-30 Pedro Alves <palves@redhat.com>
8486
8487 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8488 before returning.
8489
8490 2015-11-30 Pedro Alves <palves@redhat.com>
8491
8492 * server.c (handle_v_requests): Handle vCtrlC.
8493
8494 2015-11-30 Pedro Alves <palves@redhat.com>
8495
8496 * gdbthread.h (find_any_thread_of_pid): Declare.
8497 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8498 functions.
8499 * server.c (handle_query): If current_thread is NULL, look for
8500 another thread of the selected process.
8501
8502 2015-11-26 Daniel Colascione <dancol@dancol.org>
8503 Simon Marchi <simon.marchi@ericsson.com>
8504
8505 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8506 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8507 name in reply.
8508 * target.h (struct target_ops) <thread_name>: New field.
8509 (target_thread_name): New macro.
8510
8511 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8512
8513 * regcache.h (regcache_invalidate_pid): Add declaration.
8514 * regcache.c (regcache_invalidate_pid): New function, extracted
8515 from regcache_invalidate.
8516 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8517 Add trivial documentation comment.
8518 * lynx-low.c: Use regcache_invalidate_pid instead of
8519 regcache_invalidate.
8520
8521 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8522
8523 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8524 and Elf64_auxv_t if the target is Android.
8525
8526 2015-11-22 Doug Evans <xdje42@gmail.com>
8527
8528 * target.h: #include <sys/types.h>.
8529
8530 2015-11-19 Pedro Alves <palves@redhat.com>
8531
8532 * linux-low.c (linux_process_qsupported): Change prototype.
8533 Adjust.
8534 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8535 Change prototype.
8536 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8537 and adjust to loop over all features.
8538 * server.c (handle_query) <qSupported>: Adjust to call
8539 target_process_qsupported once, passing it a vector of unprocessed
8540 features.
8541 * target.h (struct target_ops) <process_qsupported>: Change
8542 prototype.
8543 (target_process_qsupported): Adjust.
8544
8545 2015-11-19 Pedro Alves <palves@redhat.com>
8546
8547 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8548 mode.
8549 * configure: Regenerate.
8550
8551 2015-11-19 Pedro Alves <palves@redhat.com>
8552
8553 * configure: Regenerate.
8554
8555 2015-11-19 Yao Qi <yao.qi@linaro.org>
8556
8557 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8558 type to uint32_t.
8559
8560 2015-11-19 Yao Qi <yao.qi@linaro.org>
8561
8562 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8563 (struct aarch64_operand): Move enum out.
8564
8565 2015-11-19 Yao Qi <yao.qi@linaro.org>
8566
8567 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8568 struct user_fpsimd_state *.
8569 (aarch64_store_fpregset): Likewise.
8570
8571 2015-11-19 Yao Qi <yao.qi@linaro.org>
8572
8573 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8574 struct user_pt_regs *.
8575 (aarch64_store_gregset): Likewise.
8576
8577 2015-11-18 Pedro Alves <palves@redhat.com>
8578
8579 * Makefile.in (all_object_files): Add $IPA_OBJS.
8580
8581 2015-11-17 Pedro Alves <palves@redhat.com>
8582
8583 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8584 GDB_SIGNAL_0 and gdb_signal_to_string.
8585
8586 2015-11-17 Pedro Alves <palves@redhat.com>
8587
8588 * win32-low.c (handle_output_debug_string): Remove parameter.
8589 (win32_kill): Remove our_status local and adjust call to
8590 handle_output_debug_string.
8591 (get_child_debug_event): Adjust call to
8592 handle_output_debug_string.
8593
8594 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8595
8596 * linux-mips-low.c (mips_fill_gregset): Add cast.
8597 (mips_store_gregset): Likewise.
8598 (mips_fill_fpregset): Likewise.
8599 (mips_store_fpregset): Likewise.
8600
8601 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8602
8603 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8604 priv.
8605
8606 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8607
8608 * linux-mips-low.c (mips_linux_new_thread): Change type of
8609 watch_type to enum target_hw_bp_type.
8610
8611 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8612
8613 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8614 Change return type to arm_hwbp_type.
8615
8616 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8617
8618 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8619 (arm_store_gregset): Likewise.
8620 * linux-arm-low.c (arm_get_hwcap): Likewise.
8621 (arm_read_description): Likewise.
8622
8623 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8624
8625 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8626
8627 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8628
8629 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8630 (ppc_fill_vsxregset): Likewise.
8631 (ppc_store_vsxregset): Likewise.
8632 (ppc_fill_vrregset): Likewise.
8633 (ppc_store_vrregset): Likewise.
8634 (ppc_fill_evrregset): Likewise.
8635 (ppc_store_evrregset): Likewise.
8636
8637 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8638
8639 * linux-ppc-low.c (ppc_usrregs_info): Remove
8640 forward-declaration.
8641 (ppc_arch_setup): Move lower in file.
8642
8643 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8644
8645 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8646 (ps_pdwrite): Likewise.
8647
8648 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8649
8650 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8651 to after assert checks.
8652
8653 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8654
8655 * proc-service.c (ps_pdread): Add/adjust casts.
8656 (ps_pdwrite): Add/adjust casts.
8657
8658 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8659
8660 * server.c (handle_search_memory_1): Cast return value of
8661 memmem.
8662
8663 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8664
8665 * server.c (write_qxfer_response): Change type of data to
8666 gdb_byte *.
8667
8668 2015-10-29 Pedro Alves <palves@redhat.com>
8669
8670 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8671
8672 2015-10-29 Pedro Alves <palves@redhat.com>
8673
8674 * tracepoint.c (clear_installed_tracepoints): Add casts.
8675
8676 2015-10-29 Pedro Alves <palves@redhat.com>
8677
8678 * server.c (handle_v_cont, process_serial_event): Add enum
8679 gdb_signal casts to signal parsing code.
8680
8681 2015-10-29 Pedro Alves <palves@redhat.com>
8682
8683 * linux-low.h (NULL_REGSET): Define.
8684 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8685 * linux-arm-low.c (arm_regsets): Likewise.
8686 * linux-crisv32-low.c (cris_regsets): Likewise.
8687 * linux-m68k-low.c (m68k_regsets): Likewise.
8688 * linux-mips-low.c (mips_regsets): Likewise.
8689 * linux-nios2-low.c (nios2_regsets): Likewise.
8690 * linux-ppc-low.c (ppc_regsets): Likewise.
8691 * linux-s390-low.c (s390_regsets): Likewise.
8692 * linux-sh-low.c (sh_regsets): Likewise.
8693 * linux-sparc-low.c (sparc_regsets): Likewise.
8694 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8695 * linux-tile-low.c (tile_regsets): Likewise.
8696 * linux-x86-low.c (x86_regsets): Likewise.
8697 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8698
8699 2015-10-29 Pedro Alves <palves@redhat.com>
8700
8701 * linux-low.h (NULL_REGSET): Define.
8702 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8703 * linux-arm-low.c (arm_regsets): Likewise.
8704 * linux-crisv32-low.c (cris_regsets): Likewise.
8705 * linux-m68k-low.c (m68k_regsets): Likewise.
8706 * linux-mips-low.c (mips_regsets): Likewise.
8707 * linux-nios2-low.c (nios2_regsets): Likewise.
8708 * linux-ppc-low.c (ppc_regsets): Likewise.
8709 * linux-s390-low.c (s390_regsets): Likewise.
8710 * linux-sh-low.c (sh_regsets): Likewise.
8711 * linux-sparc-low.c (sparc_regsets): Likewise.
8712 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8713 * linux-tile-low.c (tile_regsets): Likewise.
8714 * linux-x86-low.c (x86_regsets): Likewise.
8715 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8716
8717 2015-10-26 Doug Evans <dje@google.com>
8718
8719 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8720
8721 2015-10-26 Doug Evans <dje@google.com>
8722
8723 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8724
8725 2015-10-26 Doug Evans <dje@google.com>
8726
8727 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8728 for debug_printf.
8729 (attach_thread, find_new_threads_callback): Ditto.
8730
8731 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8732
8733 * mem-break.h (set_breakpoint_data): Remove.
8734
8735 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8736
8737 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8738 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8739 (initialize_low): Remove set_breakpoint_data call.
8740 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8741 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8742 (initialize_low): Remove set_breakpoint_data call.
8743 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8744 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8745 (initialize_low): Remove set_breakpoint_data call.
8746
8747 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8748
8749 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8750 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8751 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8752 * target.h (target_breakpoint_kind_from_pc): New macro.
8753
8754 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8755
8756 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8757 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8758 the default breakpoint kind.
8759
8760 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8761
8762 * linux-arm-low.c (arm_supports_z_point_type): Add software
8763 breakpoint support.
8764
8765 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8766
8767 * linux-arm-low.c: Refactor breakpoint definitions.
8768 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8769 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8770
8771 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8772
8773 * Makefile.in: Add arm.c/o.
8774 * configure.srv: Likewise.
8775 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8776 (arm_breakpoint_kind_from_pc): New function.
8777 (arm_sw_breakpoint_from_kind): Return proper kind.
8778 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8779
8780 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8781
8782 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8783 removal.
8784 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8785 (struct raw_breakpoint) <size>: Remove.
8786 (struct raw_breakpoint) <kind>: Add.
8787 (bp_size): New function.
8788 (bp_opcode): Likewise.
8789 (find_raw_breakpoint_at): Adjust for kind.
8790 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8791 (remove_memory_breakpoint): Adjust for kind call bp_size.
8792 (set_raw_breakpoint_at): Adjust for kind.
8793 (set_breakpoint): Likewise.
8794 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8795 (delete_raw_breakpoint): Adjust for kind.
8796 (delete_breakpoint): Likewise.
8797 (find_gdb_breakpoint): Likewise.
8798 (set_gdb_breakpoint_1): Likewise.
8799 (set_gdb_breakpoint): Likewise.
8800 (delete_gdb_breakpoint_1): Likewise.
8801 (delete_gdb_breakpoint): Likewise.
8802 (uninsert_raw_breakpoint): Likewise.
8803 (reinsert_raw_breakpoint): Likewise.
8804 (set_breakpoint_data): Remove.
8805 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8806 (check_mem_read): Adjust for kind call bp_size.
8807 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8808 (clone_one_breakpoint): Adjust for kind.
8809 * mem-break.h (set_gdb_breakpoint): Likewise.
8810 (delete_gdb_breakpoint): Likewise.
8811 * server.c (process_serial_event): Likewise.
8812
8813 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8814
8815 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8816 (struct linux_target_ops) <breakpoint>: Remove.
8817 (struct linux_target_ops) <breakpoint_len>: Remove.
8818 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8819 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8820 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8821 (arm_sw_breakpoint_from_kind): New function.
8822 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8823 (struct linux_target_ops) <breakpoint>: Remove.
8824 (struct linux_target_ops) <breakpoint_len>: Remove.
8825 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8826 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8827 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8828 (struct linux_target_ops) <breakpoint>: Remove.
8829 (struct linux_target_ops) <breakpoint_len>: Remove.
8830 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8831 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8832 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8833 (struct linux_target_ops) <breakpoint>: Remove.
8834 (struct linux_target_ops) <breakpoint_len>: Remove.
8835 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8836 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8837 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8838 and sw_breakpoint_from_kind to increment the pc.
8839 (linux_breakpoint_kind_from_pc): New function.
8840 (linux_sw_breakpoint_from_kind): New function.
8841 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8842 (initialize_low): Call breakpoint_kind_from_pc and
8843 sw_breakpoint_from_kind to replace breakpoint_data/len.
8844 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8845 New field.
8846 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8847 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8848 (struct linux_target_ops) <breakpoint>: Remove.
8849 (struct linux_target_ops) <breakpoint_len>: Remove.
8850 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8851 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8852 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8853 (struct linux_target_ops) <breakpoint>: Remove.
8854 (struct linux_target_ops) <breakpoint_len>: Remove.
8855 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8856 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8857 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8858 (struct linux_target_ops) <breakpoint>: Remove.
8859 (struct linux_target_ops) <breakpoint_len>: Remove.
8860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8862 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8863 (struct linux_target_ops) <breakpoint>: Remove.
8864 (struct linux_target_ops) <breakpoint_len>: Remove.
8865 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8866 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8867 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8868 (struct linux_target_ops) <breakpoint>: Remove.
8869 (struct linux_target_ops) <breakpoint_len>: Remove.
8870 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8871 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8872 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8873 (struct linux_target_ops) <breakpoint>: Remove.
8874 (struct linux_target_ops) <breakpoint_len>: Remove.
8875 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8876 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8877 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8878 (struct linux_target_ops) <breakpoint>: Remove.
8879 (struct linux_target_ops) <breakpoint_len>: Remove.
8880 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8881 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8882 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8883 (struct linux_target_ops) <breakpoint>: Remove.
8884 (struct linux_target_ops) <breakpoint_len>: Remove.
8885 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8886 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8887 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8888 (struct linux_target_ops) <breakpoint>: Remove.
8889 (struct linux_target_ops) <breakpoint_len>: Remove.
8890 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8891 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8892 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8893 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8894 (struct linux_target_ops) <breakpoint>: Remove.
8895 (struct linux_target_ops) <breakpoint_len>: Remove.
8896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8898 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8899 (struct linux_target_ops) <breakpoint>: Remove.
8900 (struct linux_target_ops) <breakpoint_len>: Remove.
8901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8903
8904 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8905
8906 * linux-cris-low.c (cris_get_pc): Remove void arg.
8907
8908 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8909
8910 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8911 variable name.
8912
8913 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8914
8915 * inferiors.c (thread_pid_matches_callback): New function.
8916 (find_thread_process): New function.
8917 (remove_thread): Reset current_thread.
8918 (remove_process): Assert threads have been removed first.
8919
8920 2015-10-15 Yao Qi <yao.qi@linaro.org>
8921
8922 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8923 if it is 3.
8924 (aarch64_remove_point): Likewise.
8925 * regcache.c (regcache_register_size): New function.
8926
8927 2015-10-12 Yao Qi <yao.qi@linaro.org>
8928
8929 * linux-aarch64-low.c: Update all callers as emit_load_store
8930 is renamed to aarch64_emit_load_store.
8931
8932 2015-10-12 Yao Qi <yao.qi@linaro.org>
8933
8934 * linux-aarch64-low.c: Update all callers of function renaming
8935 from emit_insn to aarch64_emit_insn.
8936
8937 2015-10-12 Yao Qi <yao.qi@linaro.org>
8938
8939 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8940 arch/aarch64-insn.h.
8941 (struct aarch64_memory_operand): Likewise.
8942 (ENCODE): Likewise.
8943 (emit_insn): Move to arch/aarch64-insn.c.
8944 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8945 (emit_load_store): Move to arch/aarch64-insn.c.
8946 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8947 (can_encode_int32): Remove.
8948
8949 2015-10-12 Yao Qi <yao.qi@linaro.org>
8950
8951 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8952 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8953 (aarch64_relocate_instruction): Likewise.
8954 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8955 (struct aarch64_insn_visitor): Likewise.
8956
8957 2015-10-12 Yao Qi <yao.qi@linaro.org>
8958
8959 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8960 (struct aarch64_insn_visitor): New.
8961 (struct aarch64_insn_relocation_data): New.
8962 (aarch64_ftrace_insn_reloc_b): New function.
8963 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8964 (aarch64_ftrace_insn_reloc_cb): Likewise.
8965 (aarch64_ftrace_insn_reloc_tb): Likewise.
8966 (aarch64_ftrace_insn_reloc_adr): Likewise.
8967 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8968 (aarch64_ftrace_insn_reloc_others): Likewise.
8969 (visitor): New.
8970 (aarch64_relocate_instruction): Use visitor.
8971
8972 2015-10-12 Yao Qi <yao.qi@linaro.org>
8973
8974 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8975 int. Add argument buf.
8976 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8977 aarch64_relocate_instruction.
8978
8979 2015-10-12 Yao Qi <yao.qi@linaro.org>
8980
8981 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8982 argument insn. Remove local variable insn. Don't call
8983 target_read_uint32.
8984 (aarch64_install_fast_tracepoint_jump_pad): Call
8985 target_read_uint32.
8986
8987 2015-09-30 Yao Qi <yao.qi@linaro.org>
8988
8989 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8990 (emit_load_store_pair): Likewise.
8991
8992 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8993
8994 * dll.c (match_dll): Add cast(s).
8995 (unloaded_dll): Likewise.
8996 * linux-low.c (second_thread_of_pid_p): Likewise.
8997 (delete_lwp_callback): Likewise.
8998 (count_events_callback): Likewise.
8999 (select_event_lwp_callback): Likewise.
9000 (linux_set_resume_request): Likewise.
9001 * server.c (accumulate_file_name_length): Likewise.
9002 (emit_dll_description): Likewise.
9003 (handle_qxfer_threads_worker): Likewise.
9004 (visit_actioned_threads): Likewise.
9005 * thread-db.c (any_thread_of): Likewise.
9006 * tracepoint.c (same_process_p): Likewise.
9007 (match_blocktype): Likewise.
9008 (build_traceframe_info_xml): Likewise.
9009
9010 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9011
9012 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9013 assignment.
9014 (gdb_unparse_agent_expr): Likewise.
9015 * hostio.c (require_data): Likewise.
9016 (handle_pread): Likewise.
9017 * linux-low.c (disable_regset): Likewise.
9018 (fetch_register): Likewise.
9019 (store_register): Likewise.
9020 (get_dynamic): Likewise.
9021 (linux_qxfer_libraries_svr4): Likewise.
9022 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9023 (set_fast_tracepoint_jump): Likewise.
9024 (uninsert_fast_tracepoint_jumps_at): Likewise.
9025 (reinsert_fast_tracepoint_jumps_at): Likewise.
9026 (validate_inserted_breakpoint): Likewise.
9027 (clone_agent_expr): Likewise.
9028 * regcache.c (init_register_cache): Likewise.
9029 * remote-utils.c (putpkt_binary_1): Likewise.
9030 (decode_M_packet): Likewise.
9031 (decode_X_packet): Likewise.
9032 (look_up_one_symbol): Likewise.
9033 (relocate_instruction): Likewise.
9034 (monitor_output): Likewise.
9035 * server.c (handle_search_memory): Likewise.
9036 (handle_qxfer_exec_file): Likewise.
9037 (handle_qxfer_libraries): Likewise.
9038 (handle_qxfer): Likewise.
9039 (handle_query): Likewise.
9040 (handle_v_cont): Likewise.
9041 (handle_v_run): Likewise.
9042 (captured_main): Likewise.
9043 * target.c (write_inferior_memory): Likewise.
9044 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9045 * tracepoint.c (init_trace_buffer): Likewise.
9046 (add_tracepoint_action): Likewise.
9047 (add_traceframe): Likewise.
9048 (add_traceframe_block): Likewise.
9049 (cmd_qtdpsrc): Likewise.
9050 (cmd_qtdv): Likewise.
9051 (cmd_qtstatus): Likewise.
9052 (response_source): Likewise.
9053 (response_tsv): Likewise.
9054 (cmd_qtnotes): Likewise.
9055 (gdb_collect): Likewise.
9056 (initialize_tracepoint): Likewise.
9057
9058 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9059
9060 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9061 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9062 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9063 <NOP>: New.
9064 (enum aarch64_condition_codes): New enum.
9065 (w0): New static global.
9066 (fp): Likewise.
9067 (lr): Likewise.
9068 (struct aarch64_memory_operand) <type>: New
9069 MEMORY_OPERAND_POSTINDEX type.
9070 (postindex_memory_operand): New helper function.
9071 (emit_ret): New function.
9072 (emit_load_store_pair): New function, factored out of emit_stp
9073 with support for MEMORY_OPERAND_POSTINDEX.
9074 (emit_stp): Rewrite using emit_load_store_pair.
9075 (emit_ldp): New function.
9076 (emit_load_store): Likewise.
9077 (emit_ldr): Mention post-index instruction in comment.
9078 (emit_ldrh): New function.
9079 (emit_ldrb): New function.
9080 (emit_ldrsw): Mention post-index instruction in comment.
9081 (emit_str): Likewise.
9082 (emit_subs): New function.
9083 (emit_cmp): Likewise.
9084 (emit_and): Likewise.
9085 (emit_orr): Likewise.
9086 (emit_orn): Likewise.
9087 (emit_eor): Likewise.
9088 (emit_mvn): Likewise.
9089 (emit_lslv): Likewise.
9090 (emit_lsrv): Likewise.
9091 (emit_asrv): Likewise.
9092 (emit_mul): Likewise.
9093 (emit_sbfm): Likewise.
9094 (emit_sbfx): Likewise.
9095 (emit_ubfm): Likewise.
9096 (emit_ubfx): Likewise.
9097 (emit_csinc): Likewise.
9098 (emit_cset): Likewise.
9099 (emit_nop): Likewise.
9100 (emit_ops_insns): New helper function.
9101 (emit_pop): Likewise.
9102 (emit_push): Likewise.
9103 (aarch64_emit_prologue): New function.
9104 (aarch64_emit_epilogue): Likewise.
9105 (aarch64_emit_add): Likewise.
9106 (aarch64_emit_sub): Likewise.
9107 (aarch64_emit_mul): Likewise.
9108 (aarch64_emit_lsh): Likewise.
9109 (aarch64_emit_rsh_signed): Likewise.
9110 (aarch64_emit_rsh_unsigned): Likewise.
9111 (aarch64_emit_ext): Likewise.
9112 (aarch64_emit_log_not): Likewise.
9113 (aarch64_emit_bit_and): Likewise.
9114 (aarch64_emit_bit_or): Likewise.
9115 (aarch64_emit_bit_xor): Likewise.
9116 (aarch64_emit_bit_not): Likewise.
9117 (aarch64_emit_equal): Likewise.
9118 (aarch64_emit_less_signed): Likewise.
9119 (aarch64_emit_less_unsigned): Likewise.
9120 (aarch64_emit_ref): Likewise.
9121 (aarch64_emit_if_goto): Likewise.
9122 (aarch64_emit_goto): Likewise.
9123 (aarch64_write_goto_address): Likewise.
9124 (aarch64_emit_const): Likewise.
9125 (aarch64_emit_call): Likewise.
9126 (aarch64_emit_reg): Likewise.
9127 (aarch64_emit_pop): Likewise.
9128 (aarch64_emit_stack_flush): Likewise.
9129 (aarch64_emit_zero_ext): Likewise.
9130 (aarch64_emit_swap): Likewise.
9131 (aarch64_emit_stack_adjust): Likewise.
9132 (aarch64_emit_int_call_1): Likewise.
9133 (aarch64_emit_void_call_2): Likewise.
9134 (aarch64_emit_eq_goto): Likewise.
9135 (aarch64_emit_ne_goto): Likewise.
9136 (aarch64_emit_lt_goto): Likewise.
9137 (aarch64_emit_le_goto): Likewise.
9138 (aarch64_emit_gt_goto): Likewise.
9139 (aarch64_emit_ge_got): Likewise.
9140 (aarch64_emit_ops_impl): New static global variable.
9141 (aarch64_emit_ops): New target function, return
9142 &aarch64_emit_ops_impl.
9143 (struct linux_target_ops): Install it.
9144
9145 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9146
9147 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9148 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9149 aarch64-ipa.o.
9150 * linux-aarch64-ipa.c: New file.
9151 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9152 and endian.h.
9153 (aarch64_get_thread_area): New target method.
9154 (extract_signed_bitfield): New helper function.
9155 (aarch64_decode_ldr_literal): New function.
9156 (enum aarch64_opcodes): New enum.
9157 (struct aarch64_register): New struct.
9158 (struct aarch64_operand): New struct.
9159 (x0): New static global.
9160 (x1): Likewise.
9161 (x2): Likewise.
9162 (x3): Likewise.
9163 (x4): Likewise.
9164 (w2): Likewise.
9165 (ip0): Likewise.
9166 (sp): Likewise.
9167 (xzr): Likewise.
9168 (aarch64_register): New helper function.
9169 (register_operand): Likewise.
9170 (immediate_operand): Likewise.
9171 (struct aarch64_memory_operand): New struct.
9172 (offset_memory_operand): New helper function.
9173 (preindex_memory_operand): Likewise.
9174 (enum aarch64_system_control_registers): New enum.
9175 (ENCODE): New macro.
9176 (emit_insn): New helper function.
9177 (emit_b): New function.
9178 (emit_bcond): Likewise.
9179 (emit_cb): Likewise.
9180 (emit_tb): Likewise.
9181 (emit_blr): Likewise.
9182 (emit_stp): Likewise.
9183 (emit_ldp_q_offset): Likewise.
9184 (emit_stp_q_offset): Likewise.
9185 (emit_load_store): Likewise.
9186 (emit_ldr): Likewise.
9187 (emit_ldrsw): Likewise.
9188 (emit_str): Likewise.
9189 (emit_ldaxr): Likewise.
9190 (emit_stxr): Likewise.
9191 (emit_stlr): Likewise.
9192 (emit_data_processing_reg): Likewise.
9193 (emit_data_processing): Likewise.
9194 (emit_add): Likewise.
9195 (emit_sub): Likewise.
9196 (emit_mov): Likewise.
9197 (emit_movk): Likewise.
9198 (emit_mov_addr): Likewise.
9199 (emit_mrs): Likewise.
9200 (emit_msr): Likewise.
9201 (emit_sevl): Likewise.
9202 (emit_wfe): Likewise.
9203 (append_insns): Likewise.
9204 (can_encode_int32_in): New helper function.
9205 (aarch64_relocate_instruction): New function.
9206 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9207 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9208 (struct linux_target_ops): Install aarch64_get_thread_area,
9209 aarch64_install_fast_tracepoint_jump_pad and
9210 aarch64_get_min_fast_tracepoint_insn_len.
9211
9212 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9213
9214 * Makefile.in (aarch64-insn.o): New rule.
9215 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9216
9217 2015-09-21 Yao Qi <yao.qi@linaro.org>
9218
9219 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9220
9221 2015-09-21 Yao Qi <yao.qi@linaro.org>
9222
9223 * tracepoint.c (max_jump_pad_size): Remove.
9224
9225 2015-09-18 Yao Qi <yao.qi@linaro.org>
9226
9227 * linux-aarch64-low.c: Don't include sys/uio.h.
9228 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9229
9230 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9231
9232 * tracepoint.c (eval_result_type): Change prototype.
9233 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9234
9235 2015-09-15 Pedro Alves <palves@redhat.com>
9236
9237 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9238 Check whether to report exec events instead of checking whether
9239 multiprocess is enabled.
9240
9241 2015-09-15 Pedro Alves <palves@redhat.com>
9242
9243 PR remote/18965
9244 * remote-utils.c (prepare_resume_reply): Merge
9245 TARGET_WAITKIND_VFORK_DONE switch case with the
9246 TARGET_WAITKIND_FORKED case.
9247
9248 2015-09-15 Yao Qi <yao.qi@linaro.org>
9249
9250 * server.c (handle_query): Check string comparison using
9251 "else if" instead of "if".
9252
9253 2015-09-15 Yao Qi <yao.qi@linaro.org>
9254
9255 * server.c (vCont_supported): New global variable.
9256 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9257 matches. Append ";vContSupported+" to own_buf.
9258 (handle_v_requests): Append ";s;S" to own_buf if target supports
9259 hardware single step or vCont_supported is false.
9260 (capture_main): Set vCont_supported to zero.
9261
9262 2015-09-15 Yao Qi <yao.qi@linaro.org>
9263
9264 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9265 it to ...
9266 (linux_supports_hardware_single_step): ... New function.
9267 (linux_target_ops): Update.
9268 * lynx-low.c (lynx_target_ops): Set field
9269 supports_hardware_single_step to target_can_do_hardware_single_step.
9270 * nto-low.c (nto_target_ops): Likewise.
9271 * spu-low.c (spu_target_ops): Likewise.
9272 * win32-low.c (win32_target_ops): Likewise.
9273 * target.c (target_can_do_hardware_single_step): New function.
9274 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9275 Remove. <supports_hardware_single_step>: New field.
9276 (target_supports_conditional_breakpoints): Remove.
9277 (target_supports_hardware_single_step): New macro.
9278 (target_can_do_hardware_single_step): Declare.
9279 * server.c (handle_query): Use target_supports_hardware_single_step
9280 instead of target_supports_conditional_breakpoints.
9281
9282 2015-09-15 Yao Qi <yao.qi@linaro.org>
9283
9284 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9285 function.
9286 (struct linux_target_ops the_low_target): Install
9287 aarch64_linux_siginfo_fixup.
9288
9289 2015-09-11 Don Breazeal <donb@codesourcery.com>
9290 Luis Machado <lgustavo@codesourcery.com>
9291
9292 * linux-low.c (linux_mourn): Static declaration.
9293 (linux_arch_setup): Move in front of
9294 handle_extended_wait.
9295 (linux_arch_setup_thread): New function.
9296 (handle_extended_wait): Handle exec events. Call
9297 linux_arch_setup_thread. Make event_lwp argument a
9298 pointer-to-a-pointer.
9299 (check_zombie_leaders): Do not check stopped threads.
9300 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9301 (linux_low_filter_event): Add lwp and thread for exec'ing
9302 non-leader thread if leader thread has been deleted.
9303 Refactor code into linux_arch_setup_thread and call it.
9304 Pass child lwp pointer by reference to handle_extended_wait.
9305 (linux_wait_for_event_filtered): Update comment.
9306 (linux_wait_1): Prevent clobbering exec event status.
9307 (linux_supports_exec_events): New function.
9308 (linux_target_ops) <supports_exec_events>: Initialize new member.
9309 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9310 new member.
9311 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9312 * server.c (report_exec_events): New global variable.
9313 (handle_query): Handle qSupported query for exec-events feature.
9314 (captured_main): Initialize report_exec_events.
9315 * server.h (report_exec_events): Declare new global variable.
9316 * target.h (struct target_ops) <supports_exec_events>: New
9317 member.
9318 (target_supports_exec_events): New macro.
9319 * win32-low.c (win32_target_ops) <supports_exec_events>:
9320 Initialize new member.
9321
9322 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9323
9324 * linux-low.c (linux_low_enable_btrace): Remove.
9325 (linux_target_ops): Replace linux_low_enable_btrace with
9326 linux_enable_btrace.
9327
9328 2015-09-03 Yao Qi <yao.qi@linaro.org>
9329
9330 * linux-aarch64-low.c (aarch64_insert_point): Call
9331 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9332 returns true.
9333
9334 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9335
9336 * linux-low.c (check_stopped_by_breakpoint): Use
9337 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9338
9339 2015-08-27 Pedro Alves <palves@redhat.com>
9340
9341 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9342
9343 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9344
9345 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9346 the XNEW-family equivalent.
9347 (compile_bytecodes): Likewise.
9348 * dll.c (loaded_dll): Likewise.
9349 * event-loop.c (append_callback_event): Likewise.
9350 (create_file_handler): Likewise.
9351 (create_file_event): Likewise.
9352 * hostio.c (handle_open): Likewise.
9353 * inferiors.c (add_thread): Likewise.
9354 (add_process): Likewise.
9355 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9356 * linux-arm-low.c (arm_new_process): Likewise.
9357 (arm_new_thread): Likewise.
9358 * linux-low.c (add_to_pid_list): Likewise.
9359 (linux_add_process): Likewise.
9360 (handle_extended_wait): Likewise.
9361 (add_lwp): Likewise.
9362 (enqueue_one_deferred_signal): Likewise.
9363 (enqueue_pending_signal): Likewise.
9364 (linux_resume_one_lwp_throw): Likewise.
9365 (linux_resume_one_thread): Likewise.
9366 (linux_read_memory): Likewise.
9367 (linux_write_memory): Likewise.
9368 * linux-mips-low.c (mips_linux_new_process): Likewise.
9369 (mips_linux_new_thread): Likewise.
9370 (mips_add_watchpoint): Likewise.
9371 * linux-x86-low.c (initialize_low_arch): Likewise.
9372 * lynx-low.c (lynx_add_process): Likewise.
9373 * mem-break.c (set_raw_breakpoint_at): Likewise.
9374 (set_breakpoint): Likewise.
9375 (add_condition_to_breakpoint): Likewise.
9376 (add_commands_to_breakpoint): Likewise.
9377 (clone_agent_expr): Likewise.
9378 (clone_one_breakpoint): Likewise.
9379 * regcache.c (new_register_cache): Likewise.
9380 * remote-utils.c (look_up_one_symbol): Likewise.
9381 * server.c (queue_stop_reply): Likewise.
9382 (start_inferior): Likewise.
9383 (queue_stop_reply_callback): Likewise.
9384 (handle_target_event): Likewise.
9385 * spu-low.c (fetch_ppc_memory): Likewise.
9386 (store_ppc_memory): Likewise.
9387 * target.c (set_target_ops): Likewise.
9388 * thread-db.c (thread_db_load_search): Likewise.
9389 (try_thread_db_load_1): Likewise.
9390 * tracepoint.c (add_tracepoint): Likewise.
9391 (add_tracepoint_action): Likewise.
9392 (create_trace_state_variable): Likewise.
9393 (cmd_qtdpsrc): Likewise.
9394 (cmd_qtro): Likewise.
9395 (add_while_stepping_state): Likewise.
9396 * win32-low.c (child_add_thread): Likewise.
9397 (get_image_name): Likewise.
9398
9399 2015-08-25 Yao Qi <yao.qi@linaro.org>
9400
9401 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9402
9403 2015-08-25 Yao Qi <yao.qi@linaro.org>
9404
9405 * Makefile.in (aarch64-linux.o): New rule.
9406 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9407 srv_tgtobj.
9408 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9409 (aarch64_init_debug_reg_state): Make it extern.
9410 (aarch64_linux_prepare_to_resume): Remove.
9411
9412 2015-08-25 Yao Qi <yao.qi@linaro.org>
9413
9414 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9415 lwp_arch_private_info and ptid_of_lwp.
9416
9417 2015-08-25 Yao Qi <yao.qi@linaro.org>
9418
9419 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9420 Find proc_info by find_process_pid. All callers updated.
9421
9422 2015-08-25 Yao Qi <yao.qi@linaro.org>
9423
9424 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9425 Remove.
9426 (debug_reg_change_callback): Remove.
9427 (aarch64_notify_debug_reg_change): Remove.
9428
9429 2015-08-25 Yao Qi <yao.qi@linaro.org>
9430
9431 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9432 Call current_lwp_ptid.
9433
9434 2015-08-25 Yao Qi <yao.qi@linaro.org>
9435
9436 * linux-aarch64-low.c (debug_reg_change_callback): Use
9437 debug_printf.
9438
9439 2015-08-25 Yao Qi <yao.qi@linaro.org>
9440
9441 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9442
9443 2015-08-25 Yao Qi <yao.qi@linaro.org>
9444
9445 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9446
9447 2015-08-25 Yao Qi <yao.qi@linaro.org>
9448
9449 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9450 the code.
9451
9452 2015-08-25 Yao Qi <yao.qi@linaro.org>
9453
9454 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9455 Remove.
9456 (debug_reg_change_callback): Remove argument entry and add argument
9457 lwp. Remove local variable thread. Don't print thread id in the
9458 debugging output. Don't check whether pid of thread equals to pid.
9459 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9460 iterate_over_lwps instead find_inferior.
9461
9462 2015-08-24 Pedro Alves <palves@redhat.com>
9463
9464 * inferiors.c (get_first_process): New function.
9465 * inferiors.h (get_first_process): New declaration.
9466 * remote-utils.c (read_ptid): Default to the first process in the
9467 list, instead of to the current thread's process.
9468
9469 2015-08-24 Pedro Alves <palves@redhat.com>
9470
9471 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9472 * event-loop.c: Likewise.
9473 * remote-utils.c: Likewise.
9474 * tracepoint.c: Likewise.
9475
9476 2015-08-24 Pedro Alves <palves@redhat.com>
9477
9478 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9479 ptid_get_lwp.
9480
9481 2015-08-21 Pedro Alves <palves@redhat.com>
9482
9483 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9484 instead of literal 1.
9485
9486 2015-08-21 Pedro Alves <palves@redhat.com>
9487
9488 * tdesc.c (default_description): Explicitly zero-initialize.
9489
9490 2015-08-21 Pedro Alves <palves@redhat.com>
9491
9492 PR gdb/18749
9493 * inferiors.c (remove_thread): Discard any pending stop reply for
9494 this thread.
9495 * server.c (remove_all_on_match_pid): Rename to ...
9496 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9497 instead of a pid.
9498 (discard_queued_stop_replies): Change parameter to a ptid. Now
9499 extern.
9500 (handle_v_kill, kill_inferior_callback, captured_main)
9501 (process_serial_event): Adjust.
9502 * server.h (discard_queued_stop_replies): Declare.
9503
9504 2015-08-21 Pedro Alves <palves@redhat.com>
9505
9506 * linux-low.c (wait_for_sigstop): Always switch to no thread
9507 selected if the previously current thread dies.
9508 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9509 process instead of the current thread's.
9510 * remote-utils.c (input_interrupt): Don't check if there's no
9511 current thread.
9512 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9513 current thread to the general thread fails, error out.
9514 (handle_qxfer_auxv, handle_qxfer_libraries)
9515 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9516 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9517 (handle_query): Check if there's a thread selected instead of
9518 checking whether there's any thread in the thread list.
9519 (handle_qxfer_threads, handle_qxfer_btrace)
9520 (handle_qxfer_btrace_conf): Don't error out early if there's no
9521 thread in the thread list.
9522 (handle_v_cont, myresume): Don't set the current thread to the
9523 continue thread.
9524 (process_serial_event) <Hg handling>: Also set thread_id if the
9525 previous general thread is still alive.
9526 (process_serial_event) <g/G handling>: If setting the current
9527 thread to the general thread fails, error out.
9528 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9529 thread's lwp instead of the current thread's.
9530 * target.c (set_desired_thread): If the desired thread was not
9531 found, leave the current thread pointing to NULL. Return an int
9532 (boolean) indicating success.
9533 * target.h (set_desired_thread): Change return type to int.
9534
9535 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9536
9537 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9538 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9539 #includes.
9540 (ps_get_thread_area): New function.
9541
9542 2015-08-19 Gary Benson <gbenson@redhat.com>
9543
9544 * hostio.c (handle_pread): Do not attempt to read more data
9545 than hostio_reply_with_data can fit in a packet.
9546
9547 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9548
9549 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9550
9551 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9552
9553 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9554
9555 2015-08-06 Pedro Alves <palves@redhat.com>
9556
9557 * tracepoint.c (expr_eval_result): Now an int.
9558
9559 2015-08-06 Pedro Alves <palves@redhat.com>
9560
9561 * gdbthread.h (struct regcache): Forward declare.
9562 (struct thread_info) <regcache_data>: Now a struct regcache
9563 pointer.
9564 * inferiors.c (inferior_regcache_data)
9565 (set_inferior_regcache_data): Now work with struct regcache
9566 pointers.
9567 * inferiors.h (struct regcache): Forward declare.
9568 (inferior_regcache_data, set_inferior_regcache_data): Now work
9569 with struct regcache pointers.
9570 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9571 (free_register_cache_thread): Remove struct regcache pointer
9572 casts.
9573
9574 2015-08-06 Pedro Alves <palves@redhat.com>
9575
9576 * server.c (captured_main): On error, print the exception message
9577 to stderr, and if run_once is set, throw a quit.
9578
9579 2015-08-06 Pedro Alves <palves@redhat.com>
9580
9581 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9582 the current thread.
9583
9584 2015-08-06 Pedro Alves <palves@redhat.com>
9585
9586 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9587 reading beyond the passed in buffer length.
9588
9589 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9590
9591 * tracepoint.c (symbol_list) <required>: Remove.
9592
9593 2015-08-06 Pedro Alves <palves@redhat.com>
9594
9595 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9596 count if stopping and suspending threads.
9597 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9598 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9599 (linux_detach): Complete an ongoing step-over.
9600 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9601 throughout.
9602 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9603 (linux_wait_1): If passing a signal to the inferior after
9604 finishing a step-over, unsuspend and re-resume all lwps. If we
9605 see a single-step event but the thread should be continuing, don't
9606 pass the trap to gdb.
9607 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9608 internal_error instead of gdb_assert.
9609 (enqueue_pending_signal): New function.
9610 (check_ptrace_stopped_lwp_gone): Add debug output.
9611 (start_step_over): Use internal_error instead of gdb_assert.
9612 (complete_ongoing_step_over): New function.
9613 (linux_resume_one_thread): Don't resume a suspended thread.
9614 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9615 it stepping.
9616
9617 2015-08-06 Pedro Alves <palves@redhat.com>
9618
9619 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9620 (linux_thread_alive): Use lwp_is_marked_dead.
9621 (extended_event_reported): Delete.
9622 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9623 instead of extended_event_reported.
9624 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9625 as well.
9626 (lwp_is_marked_dead): New function.
9627 (lwp_running): Use lwp_is_marked_dead.
9628 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9629 comment.
9630
9631 2015-08-06 Pedro Alves <palves@redhat.com>
9632
9633 * linux-low.c (linux_wait_1): Move fork event output out of the
9634 !report_to_gdb check. Pass event_child->waitstatus to
9635 target_waitstatus_to_string instead of ourstatus.
9636
9637 2015-08-04 Yao Qi <yao.qi@linaro.org>
9638
9639 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9640 if current_thread is 32 bit.
9641
9642 2015-08-04 Yao Qi <yao.qi@linaro.org>
9643
9644 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9645 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9646 * server.c (extended_protocol): Remove "static".
9647 * server.h (extended_protocol): Declare it.
9648
9649 2015-08-04 Yao Qi <yao.qi@linaro.org>
9650
9651 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9652 both aarch64 and aarch32.
9653 (aarch64_set_pc): Likewise.
9654
9655 2015-08-04 Yao Qi <yao.qi@linaro.org>
9656
9657 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9658 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9659 arm-with-neon.xml to srv_xmlfiles.
9660 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9661 (is_64bit_tdesc): New function.
9662 (aarch64_linux_read_description): New function.
9663 (aarch64_arch_setup): Call aarch64_linux_read_description.
9664 (regs_info): Rename to regs_info_aarch64.
9665 (aarch64_regs_info): Return right regs_info.
9666 (initialize_low_arch): Call initialize_low_arch_aarch32.
9667
9668 2015-08-04 Yao Qi <yao.qi@linaro.org>
9669
9670 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9671 * linux-aarch32-low.c: New file.
9672 * linux-aarch32-low.h: New file.
9673 * linux-arm-low.c (arm_fill_gregset): Move it to
9674 linux-aarch32-low.c.
9675 (arm_store_gregset): Likewise.
9676 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9677 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9678 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9679 (regs_info): Rename to regs_info_arm.
9680 (arm_regs_info): Return regs_info_aarch32 if
9681 have_ptrace_getregset is 1 and target description is
9682 arm_with_neon or arm_with_vfpv3.
9683 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9684 Call initialize_low_arch_aarch32 instead.
9685
9686 2015-08-04 Yao Qi <yao.qi@linaro.org>
9687
9688 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9689 * linux-low.c: ... here.
9690 * linux-low.h (have_ptrace_getregset): Declare it.
9691
9692 2015-08-04 Pedro Alves <palves@redhat.com>
9693
9694 * thread-db.c (struct thread_db): Use new typedefs.
9695 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9696 CHK calls.
9697 (disable_thread_event_reporting): Cast result of dlsym to
9698 destination function pointer type.
9699 (thread_db_mourn): Use td_ta_delete_ftype.
9700
9701 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9702
9703 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9704 arch variant.
9705 (CDX_BREAKPOINT): Define for R2.
9706 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9707 (the_low_target): Add comments.
9708
9709 2015-07-30 Yao Qi <yao.qi@linaro.org>
9710
9711 * linux-arm-low.c (arm_hwcap): Remove it.
9712 (arm_read_description): New local variable arm_hwcap. Don't
9713 set arm_hwcap to zero.
9714
9715 2015-07-30 Yao Qi <yao.qi@linaro.org>
9716
9717 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9718 Use regcache->tdesc instead.
9719 (arm_store_wmmxregset): Likewise.
9720 (arm_fill_vfpregset): Likewise.
9721 (arm_store_vfpregset): Likewise.
9722
9723 2015-07-30 Yao Qi <yao.qi@linaro.org>
9724
9725 * linux-arm-low.c: Include arch/arm.h.
9726 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9727 (arm_store_gregset): Likewise.
9728
9729 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9730
9731 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9732 ptrace's 4th parameter.
9733
9734 2015-07-27 Yao Qi <yao.qi@linaro.org>
9735
9736 * configure.srv (case aarch64*-*-linux*): Don't set
9737 srv_linux_usrregs.
9738
9739 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9740
9741 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9742 sys/ptrace.h.
9743 * linux-arm-low.c: Likewise.
9744 * linux-cris-low.c: Likewise.
9745 * linux-crisv32-low.c: Likewise.
9746 * linux-low.c: Likewise.
9747 * linux-m68k-low.c: Likewise.
9748 * linux-mips-low.c: Likewise.
9749 * linux-nios2-low.c: Likewise.
9750 * linux-s390-low.c: Likewise.
9751 * linux-sparc-low.c: Likewise.
9752 * linux-tic6x-low.c: Likewise.
9753 * linux-tile-low.c: Likewise.
9754 * linux-x86-low.c: Likewise.
9755
9756 2015-07-24 Pedro Alves <palves@redhat.com>
9757
9758 * config.in: Regenerate.
9759 * configure: Regenerate.
9760
9761 2015-07-24 Pedro Alves <palves@redhat.com>
9762
9763 * acinclude.m4: Include ../ptrace.m4.
9764 * configure.ac: Call GDB_AC_PTRACE.
9765 * config.in, configure: Regenerate.
9766
9767 2015-07-24 Yao Qi <yao.qi@linaro.org>
9768
9769 * linux-low.c (linux_create_inferior): Remove setting to
9770 proc->priv->new_inferior.
9771 (linux_attach): Likewise.
9772 (linux_low_filter_event): Likewise.
9773 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9774
9775 2015-07-24 Yao Qi <yao.qi@linaro.org>
9776
9777 * linux-low.c (linux_arch_setup): New function.
9778 (linux_low_filter_event): If proc->tdesc is NULL and
9779 proc->attached is true, call the_low_target.arch_setup.
9780 Otherwise, keep status pending, and return.
9781 (linux_resume_one_lwp_throw): Don't call get_pc if
9782 thread->while_stepping isn't NULL. Don't call
9783 get_thread_regcache if proc->tdesc is NULL.
9784 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9785 (linux_target_ops): Install arch_setup.
9786 * server.c (start_inferior): Call the_target->arch_setup.
9787 * target.h (struct target_ops) <arch_setup>: New field.
9788 (target_arch_setup): New marco.
9789 * lynx-low.c (lynx_target_ops): Update.
9790 * nto-low.c (nto_target_ops): Update.
9791 * spu-low.c (spu_target_ops): Update.
9792 * win32-low.c (win32_target_ops): Update.
9793
9794 2015-07-24 Yao Qi <yao.qi@linaro.org>
9795
9796 * linux-low.c (linux_add_process): Don't set
9797 proc->priv->new_inferior.
9798 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9799 (linux_attach): Likewise.
9800
9801 2015-07-24 Yao Qi <yao.qi@linaro.org>
9802
9803 * server.c (start_inferior): Code refactor.
9804
9805 2015-07-24 Yao Qi <yao.qi@linaro.org>
9806
9807 * server.c (process_serial_event): Set general_thread.
9808
9809 2015-07-21 Yao Qi <yao.qi@linaro.org>
9810
9811 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9812 aarch64_linux_get_debug_reg_capacity.
9813
9814 2015-07-17 Yao Qi <yao.qi@linaro.org>
9815
9816 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9817 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9818 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9819 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9820 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9821 (AARCH64_HWP_ALIGNMENT): Likewise.
9822 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9823 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9824 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9825 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9826 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9827 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9828 (struct aarch64_debug_reg_state): Likewise.
9829 (struct arch_lwp_info): Likewise.
9830 (aarch64_align_watchpoint): Likewise.
9831 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9832 (aarch64_watchpoint_length): Likewise.
9833 (aarch64_point_encode_ctrl_reg): Likewise
9834 (aarch64_point_is_aligned): Likewise.
9835 (aarch64_align_watchpoint): Likewise.
9836 (aarch64_linux_set_debug_regs):
9837 (aarch64_dr_state_insert_one_point): Likewise.
9838 (aarch64_dr_state_remove_one_point): Likewise.
9839 (aarch64_handle_breakpoint): Likewise.
9840 (aarch64_handle_aligned_watchpoint): Likewise.
9841 (aarch64_handle_unaligned_watchpoint): Likewise.
9842 (aarch64_handle_watchpoint): Likewise.
9843
9844 2015-07-17 Yao Qi <yao.qi@linaro.org>
9845
9846 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9847 and don't aarch64_get_debug_reg_state. All callers update.
9848 (aarch64_handle_aligned_watchpoint): Likewise.
9849 (aarch64_handle_unaligned_watchpoint): Likewise.
9850 (aarch64_handle_watchpoint): Likewise.
9851 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9852 (aarch64_remove_point): Likewise.
9853
9854 2015-07-17 Yao Qi <yao.qi@linaro.org>
9855
9856 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9857 debug_printf.
9858 (aarch64_handle_unaligned_watchpoint): Likewise.
9859
9860 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9861
9862 Revert the previous 3 commits:
9863 Move gdb_regex* to common/
9864 Move linux_find_memory_regions_full & co.
9865 gdbserver build-id attribute generator
9866
9867 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9868 Jan Kratochvil <jan.kratochvil@redhat.com>
9869
9870 gdbserver build-id attribute generator.
9871 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9872 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9873 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9874 (find_phdr): New.
9875 (get_dynamic): Use find_pdhr to traverse program headers.
9876 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9877 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9878 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9879 (get_hex_build_id): New.
9880 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9881 to reply XML document.
9882
9883 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9884 Jan Kratochvil <jan.kratochvil@redhat.com>
9885
9886 * target.c: Include target/target-utils.h and fcntl.h.
9887 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9888 (target_fileio_read_stralloc): New functions.
9889
9890 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9891
9892 * Makefile.in (OBS): Add gdb_regex.o.
9893 (gdb_regex.o): New.
9894 * config.in: Rebuilt.
9895 * configure: Rebuilt.
9896
9897 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9898 Jan Kratochvil <jan.kratochvil@redhat.com>
9899
9900 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9901 * Makefile.in (OBS): Add target-utils.o.
9902 (linux-maps.o, target-utils.o): New.
9903 * configure.srv (srv_linux_obj): Add linux-maps.o.
9904
9905 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9906
9907 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9908 function, return 1.
9909 (the_low_target): Install it.
9910
9911 2015-07-14 Pedro Alves <palves@redhat.com>
9912
9913 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9914 Instead, ignore ECHILD, and throw an error for other errnos.
9915
9916 2015-07-10 Pedro Alves <palves@redhat.com>
9917
9918 * event-loop.c (struct callback_event) <data>: Change type to
9919 gdb_client_data instance instead of gdb_client_data pointer.
9920 (append_callback_event): Adjust.
9921
9922 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9923
9924 * linux-aarch64-low.c: Add comments for each linux_target_ops
9925 method. Remove comments already covered in target_ops and
9926 linux_target_ops definitions.
9927 (the_low_target): Add comments for each unimplemented method.
9928
9929 2015-07-09 Yao Qi <yao.qi@linaro.org>
9930
9931 * linux-aarch64-low.c (aarch64_regmap): Remove.
9932 (aarch64_usrregs_info): Remove.
9933 (regs_info): Set field usrregs to NULL.
9934
9935 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9936
9937 * linux-low.c: Include "rsp-low.h"
9938 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9939 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9940 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9941 (handle_btrace_enable_pt): New.
9942 (handle_btrace_general_set): Support "pt".
9943 (handle_btrace_conf_general_set): Support "pt:size".
9944
9945 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9946
9947 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9948 Z_PACKET_SW_BP.
9949
9950 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9951
9952 * linux-aarch64-low.c: Remove comment about endianness.
9953 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9954 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9955 memcmp.
9956
9957 2015-06-24 Gary Benson <gbenson@redhat.com>
9958
9959 * linux-i386-ipa.c (stdint.h): Do not include.
9960 * lynx-i386-low.c (stdint.h): Likewise.
9961 * lynx-ppc-low.c (stdint.h): Likewise.
9962 * mem-break.c (stdint.h): Likewise.
9963 * thread-db.c (stdint.h): Likewise.
9964 * tracepoint.c (stdint.h): Likewise.
9965 * win32-low.c (stdint.h): Likewise.
9966
9967 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9968
9969 * server.c (write_qxfer_response): Update call to
9970 remote_escape_output.
9971
9972 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9973 Jan Kratochvil <jan.kratochvil@redhat.com>
9974
9975 Merge multiple hex conversions.
9976 * gdbreplay.c (tohex): Rename to 'fromhex'.
9977 (logchar): Use fromhex.
9978
9979 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 * server.c (handle_qxfer_libraries): Set `version' attribute for
9982 <library-list>.
9983
9984 2015-06-10 Gary Benson <gbenson@redhat.com>
9985
9986 * target.h (struct target_ops) <multifs_open>: New field.
9987 <multifs_unlink>: Likewise.
9988 <multifs_readlink>: Likewise.
9989 * linux-low.c (nat/linux-namespaces.h): New include.
9990 (linux_target_ops): Initialize the_target->multifs_open,
9991 the_target->multifs_unlink and the_target->multifs_readlink.
9992 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9993 * hostio.c (hostio_fs_pid): New static variable.
9994 (hostio_handle_new_gdb_connection): New function.
9995 (handle_setfs): Likewise.
9996 (handle_open): Use the_target->multifs_open as appropriate.
9997 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9998 (handle_readlink): Use the_target->multifs_readlink as
9999 appropriate.
10000 (handle_vFile): Handle vFile:setfs packets.
10001 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10002 after target_handle_new_gdb_connection.
10003
10004 2015-06-10 Gary Benson <gbenson@redhat.com>
10005
10006 * configure.ac (AC_CHECK_FUNCS): Add setns.
10007 * config.in: Regenerate.
10008 * configure: Likewise.
10009 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10010 (linux-namespaces.o): New rule.
10011 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10012
10013 2015-06-09 Gary Benson <gbenson@redhat.com>
10014
10015 * hostio.c (handle_open): Process mode argument with
10016 fileio_to_host_mode.
10017
10018 2015-06-01 Yao Qi <yao.qi@linaro.org>
10019
10020 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10021 * linux-x86-low.c: Likewise.
10022
10023 2015-05-28 Don Breazeal <donb@codesourcery.com>
10024
10025 * linux-low.c (handle_extended_wait): Initialize
10026 thread_info.last_resume_kind for new fork children.
10027
10028 2015-05-15 Pedro Alves <palves@redhat.com>
10029
10030 * target.h (target_handle_new_gdb_connection): Rewrite using if
10031 wrapped in do/while.
10032
10033 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10034
10035 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10036 * configure, config.in: Regenerate.
10037 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10038 Declare typedef.
10039
10040 2015-05-12 Don Breazeal <donb@codesourcery.com>
10041
10042 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10043 PTRACE_EVENT_VFORK_DONE.
10044 (linux_low_ptrace_options, extended_event_reported): Add vfork
10045 events.
10046 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10047 and "vforkdone" for RSP 'T' Stop Reply Packet.
10048 * server.h (report_vfork_events): Declare
10049 global variable.
10050
10051 2015-05-12 Don Breazeal <donb@codesourcery.com>
10052
10053 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10054 (the_low_target) <new_fork>: Initialize new member.
10055 * linux-arm-low.c (arm_new_fork): New function.
10056 (the_low_target) <new_fork>: Initialize new member.
10057 * linux-low.c (handle_extended_wait): Call new target function
10058 new_fork.
10059 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10060 * linux-mips-low.c (mips_add_watchpoint): New function
10061 extracted from mips_insert_point.
10062 (the_low_target) <new_fork>: Initialize new member.
10063 (mips_linux_new_fork): New function.
10064 (mips_insert_point): Call mips_add_watchpoint.
10065 * linux-x86-low.c (x86_linux_new_fork): New function.
10066 (the_low_target) <new_fork>: Initialize new member.
10067
10068 2015-05-12 Don Breazeal <donb@codesourcery.com>
10069
10070 * linux-low.c (handle_extended_wait): Implement return value,
10071 rename argument 'event_child' to 'event_lwp', handle
10072 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10073 (linux_low_ptrace_options): New function.
10074 (linux_low_filter_event): Call linux_low_ptrace_options,
10075 use different argument fo linux_enable_event_reporting,
10076 use return value from handle_extended_wait.
10077 (extended_event_reported): New function.
10078 (linux_wait_1): Call extended_event_reported and set
10079 status to report fork events.
10080 (linux_write_memory): Add pid to debug message.
10081 (reset_lwp_ptrace_options_callback): New function.
10082 (linux_handle_new_gdb_connection): New function.
10083 (linux_target_ops): Initialize new structure member.
10084 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10085 * lynx-low.c: Initialize new structure member.
10086 * remote-utils.c (prepare_resume_reply): Implement stop reason
10087 "fork" for "T" stop message.
10088 * server.c (handle_query): Call handle_new_gdb_connection.
10089 * server.h (report_fork_events): Declare global flag.
10090 * target.h (struct target_ops) <handle_new_gdb_connection>:
10091 New member.
10092 (target_handle_new_gdb_connection): New macro.
10093 * win32-low.c: Initialize new structure member.
10094
10095 2015-05-12 Don Breazeal <donb@codesourcery.com>
10096
10097 * mem-break.c (APPEND_TO_LIST): Define macro.
10098 (clone_agent_expr): New function.
10099 (clone_one_breakpoint): New function.
10100 (clone_all_breakpoints): New function.
10101 * mem-break.h: Declare new functions.
10102
10103 2015-05-12 Don Breazeal <donb@codesourcery.com>
10104
10105 * linux-low.c (linux_supports_fork_events): New function.
10106 (linux_supports_vfork_events): New function.
10107 (linux_target_ops): Initialize new structure members.
10108 (initialize_low): Call linux_check_ptrace_features.
10109 * lynx-low.c (lynx_target_ops): Initialize new structure
10110 members.
10111 * server.c (report_fork_events, report_vfork_events):
10112 New global flags.
10113 (handle_query): Add new features to qSupported packet and
10114 response.
10115 (captured_main): Initialize new global variables.
10116 * target.h (struct target_ops) <supports_fork_events>:
10117 New member.
10118 <supports_vfork_events>: New member.
10119 (target_supports_fork_events): New macro.
10120 (target_supports_vfork_events): New macro.
10121 * win32-low.c (win32_target_ops): Initialize new structure
10122 members.
10123
10124 2015-05-12 Gary Benson <gbenson@redhat.com>
10125
10126 * server.c (handle_qxfer_exec_file): Use current process
10127 if annex is empty.
10128
10129 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10130
10131 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10132 Remove HAVE_PTRACE_GETREGS conditionals.
10133 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10134 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10135
10136 2015-05-08 Yao Qi <yao.qi@linaro.org>
10137
10138 * linux-low.c (linux_supports_conditional_breakpoints): New
10139 function.
10140 (linux_target_ops): Install new target method.
10141 * lynx-low.c (lynx_target_ops): Install NULL hook for
10142 supports_conditional_breakpoints.
10143 * nto-low.c (nto_target_ops): Likewise.
10144 * spu-low.c (spu_target_ops): Likewise.
10145 * win32-low.c (win32_target_ops): Likewise.
10146 * server.c (handle_query): Check
10147 target_supports_conditional_breakpoints.
10148 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10149 New field.
10150 (target_supports_conditional_breakpoints): New macro.
10151
10152 2015-05-06 Pedro Alves <palves@redhat.com>
10153
10154 PR server/18081
10155 * server.c (start_inferior): If the process exits, mourn it.
10156
10157 2015-04-21 Gary Benson <gbenson@redhat.com>
10158
10159 * hostio.c (fileio_open_flags_to_host): Factored out to
10160 fileio_to_host_openflags in common/fileio.c. Single use
10161 updated.
10162
10163 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10164
10165 * linux-xtensa-low.c (xtensa_fill_gregset)
10166 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10167 XCHAL_HAVE_LOOP.
10168
10169 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10170
10171 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10172 (regs_info): Replace usrregs pointer with NULL.
10173
10174 2015-04-17 Gary Benson <gbenson@redhat.com>
10175
10176 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10177 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10178 * server.c (handle_qxfer_exec_file): New function.
10179 (qxfer_packets): Add exec-file entry.
10180 (handle_query): Report qXfer:exec-file:read as supported packet.
10181
10182 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10183
10184 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10185
10186 2015-04-09 Gary Benson <gbenson@redhat.com>
10187
10188 * hostio-errno.c (errno_to_fileio_error): Remove function.
10189 Update caller to use remote_fileio_to_fio_error.
10190
10191 2015-04-09 Yao Qi <yao.qi@linaro.org>
10192
10193 * linux-low.c (linux_insert_point): Call
10194 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10195 (linux_remove_point): Call remove_memory_breakpoint if type is
10196 raw_bkpt_type_sw.
10197 * linux-x86-low.c (x86_insert_point): Don't call
10198 insert_memory_breakpoint.
10199 (x86_remove_point): Don't call remove_memory_breakpoint.
10200
10201 2015-04-01 Pedro Alves <palves@redhat.com>
10202 Cleber Rosa <crosa@redhat.com>
10203
10204 * server.c (gdbserver_usage): Reorganize and extend the usage
10205 message.
10206
10207 2015-03-24 Pedro Alves <palves@redhat.com>
10208
10209 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10210 output. Also dump TRAP_TRACE.
10211 (linux_low_filter_event): In debug output, distinguish a
10212 resume_stop SIGSTOP from a delayed SIGSTOP.
10213
10214 2015-03-24 Gary Benson <gbenson@redhat.com>
10215
10216 * linux-x86-low.c (x86_linux_new_thread): Moved to
10217 nat/x86-linux.c.
10218 (x86_linux_prepare_to_resume): Likewise.
10219
10220 2015-03-24 Gary Benson <gbenson@redhat.com>
10221
10222 * Makefile.in (x86-linux-dregs.o): New rule.
10223 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10224 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10225 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10226 (x86_linux_dr_get): Likewise.
10227 (x86_linux_dr_set): Likewise.
10228 (update_debug_registers_callback): Likewise.
10229 (x86_linux_dr_set_addr): Likewise.
10230 (x86_linux_dr_get_addr): Likewise.
10231 (x86_linux_dr_set_control): Likewise.
10232 (x86_linux_dr_get_control): Likewise.
10233 (x86_linux_dr_get_status): Likewise.
10234 (x86_linux_update_debug_registers): Likewise.
10235
10236 2015-03-24 Gary Benson <gbenson@redhat.com>
10237
10238 * linux-x86-low.c (x86_linux_update_debug_registers):
10239 New function, factored out from...
10240 (x86_linux_prepare_to_resume): ...this.
10241
10242 2015-03-24 Gary Benson <gbenson@redhat.com>
10243
10244 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10245 (x86_linux_dr_set): Likewise.
10246 (update_debug_registers_callback): Likewise.
10247 (x86_linux_dr_set_addr): Likewise.
10248 (x86_linux_dr_get_addr): Likewise.
10249 (x86_linux_dr_set_control): Likewise.
10250 (x86_linux_dr_get_control): Likewise.
10251 (x86_linux_dr_get_status): Likewise.
10252 (x86_linux_prepare_to_resume): Likewise.
10253
10254 2015-03-24 Gary Benson <gbenson@redhat.com>
10255
10256 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10257 Use perror_with_name. Pass string through gettext.
10258 (x86_linux_dr_set): Likewise.
10259
10260 2015-03-24 Gary Benson <gbenson@redhat.com>
10261
10262 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10263 (x86_linux_dr_set_addr): ...this.
10264 (x86_dr_low_get_addr): Rename to...
10265 (x86_linux_dr_get_addr): ...this.
10266 (x86_dr_low_set_control): Rename to...
10267 (x86_linux_dr_set_control): ...this.
10268 (x86_dr_low_get_control): Rename to...
10269 (x86_linux_dr_get_control): ...this.
10270 (x86_dr_low_get_status): Rename to...
10271 (x86_linux_dr_get_status): ...this.
10272 (x86_dr_low): Update with new function names.
10273
10274 2015-03-24 Gary Benson <gbenson@redhat.com>
10275
10276 * Makefile.in (x86-linux.o): New rule.
10277 * configure.srv: Add x86-linux.o to relevant targets.
10278 * linux-low.c (lwp_set_arch_private_info): New function.
10279 (lwp_arch_private_info): Likewise.
10280 * linux-x86-low.c: Include nat/x86-linux.h.
10281 (arch_lwp_info): Removed structure.
10282 (update_debug_registers_callback):
10283 Use lwp_set_debug_registers_changed.
10284 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10285 and lwp_set_debug_registers_changed.
10286 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10287
10288 2015-03-24 Gary Benson <gbenson@redhat.com>
10289
10290 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10291 * linux-arm-low.c (arm_new_thread): Likewise.
10292 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10293 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10294 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10295 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10296
10297 2015-03-24 Gary Benson <gbenson@redhat.com>
10298
10299 * linux-low.c (ptid_of_lwp): New function.
10300 (lwp_is_stopped): Likewise.
10301 (lwp_stop_reason): Likewise.
10302 * linux-x86-low.c (update_debug_registers_callback):
10303 Use lwp_is_stopped.
10304 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10305 lwp_stop_reason.
10306
10307 2015-03-24 Gary Benson <gbenson@redhat.com>
10308
10309 * linux-low.h (linux_stop_lwp): Remove declaration.
10310
10311 2015-03-24 Gary Benson <gbenson@redhat.com>
10312
10313 * linux-low.h: Include nat/linux-nat.h.
10314 * linux-low.c (iterate_over_lwps_args): New structure.
10315 (iterate_over_lwps_filter): New function.
10316 (iterate_over_lwps): Likewise.
10317 * linux-x86-low.c (update_debug_registers_callback):
10318 Update signature to what iterate_over_lwps expects.
10319 Remove PID check that iterate_over_lwps now performs.
10320 (x86_dr_low_set_addr): Use iterate_over_lwps.
10321 (x86_dr_low_set_control): Likewise.
10322
10323 2015-03-24 Gary Benson <gbenson@redhat.com>
10324
10325 * linux-x86-low.c (x86_debug_reg_state): New function.
10326 (x86_linux_prepare_to_resume): Use the above.
10327
10328 2015-03-24 Gary Benson <gbenson@redhat.com>
10329
10330 * linux-low.c (current_lwp_ptid): New function.
10331 * linux-x86-low.c: Include nat/linux-nat.h.
10332 (x86_dr_low_get_addr): Use current_lwp_ptid.
10333 (x86_dr_low_get_control): Likewise.
10334 (x86_dr_low_get_status): Likewise.
10335
10336 2015-03-20 Pedro Alves <palves@redhat.com>
10337
10338 * tracepoint.c (cmd_qtstatus): Make "str" const.
10339
10340 2015-03-20 Pedro Alves <palves@redhat.com>
10341
10342 * server.c (handle_general_set): Make "req_str" const.
10343
10344 2015-03-19 Pedro Alves <palves@redhat.com>
10345
10346 * linux-low.c (linux_resume_one_lwp): Rename to ...
10347 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10348 instead call perror_with_name.
10349 (check_ptrace_stopped_lwp_gone): New function.
10350 (linux_resume_one_lwp): Reimplement as wrapper around
10351 linux_resume_one_lwp_throw that swallows errors if the LWP is
10352 gone.
10353
10354 2015-03-19 Pedro Alves <palves@redhat.com>
10355
10356 * linux-low.c (count_events_callback, select_event_lwp_callback):
10357 No longer check whether the thread has resume_stop as last resume
10358 kind.
10359
10360 2015-03-19 Pedro Alves <palves@redhat.com>
10361
10362 * linux-low.c (count_events_callback, select_event_lwp_callback):
10363 Use the lwp's status_pending_p field, not the thread's.
10364
10365 2015-03-19 Pedro Alves <palves@redhat.com>
10366
10367 * linux-low.c (select_event_lwp_callback): Update comments to
10368 no longer mention SIGTRAP.
10369
10370 2015-03-18 Gary Benson <gbenson@redhat.com>
10371
10372 * server.c (handle_query): Do not report vFile:fstat as supported.
10373
10374 2015-03-11 Gary Benson <gbenson@redhat.com>
10375
10376 * hostio.c (sys/types.h): New include.
10377 (sys/stat.h): Likewise.
10378 (common-remote-fileio.h): Likewise.
10379 (handle_fstat): New function.
10380 (handle_vFile): Handle vFile:fstat packets.
10381
10382 2015-03-11 Gary Benson <gbenson@redhat.com>
10383
10384 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10385 struct stat.st_blocks and struct stat.st_blksize.
10386 * configure: Regenerate.
10387 * config.in: Likewise.
10388 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10389 (OBS): Add common-remote-fileio.o.
10390 (common-remote-fileio.o): New rule.
10391
10392 2015-03-09 Pedro Alves <palves@redhat.com>
10393
10394 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10395 'struct sockaddr' pointer in 'accept' call.
10396
10397 2015-03-09 Pedro Alves <palves@redhat.com>
10398
10399 Revert:
10400 2015-03-07 Pedro Alves <palves@redhat.com>
10401 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10402 or <winsock2.h> here. Instead include "gdb_socket.h".
10403 (remote_open): Use union gdb_sockaddr_u.
10404 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10405 or <winsock2.h> here. Instead include "gdb_socket.h".
10406 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10407 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10408 or <sys/un.h>.
10409 (init_named_socket, gdb_agent_helper_thread): Use union
10410 gdb_sockaddr_u.
10411
10412 2015-03-07 Pedro Alves <palves@redhat.com>
10413
10414 * configure.ac (build_warnings): Move
10415 -Wdeclaration-after-statement to the C-specific set.
10416 * configure: Regenerate.
10417
10418 2015-03-07 Pedro Alves <palves@redhat.com>
10419
10420 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10421 or <winsock2.h> here. Instead include "gdb_socket.h".
10422 (remote_open): Use union gdb_sockaddr_u.
10423 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10424 or <winsock2.h> here. Instead include "gdb_socket.h".
10425 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10426 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10427 or <sys/un.h>.
10428 (init_named_socket, gdb_agent_helper_thread): Use union
10429 gdb_sockaddr_u.
10430
10431 2015-03-07 Pedro Alves <palves@redhat.com>
10432
10433 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10434 instead.
10435
10436 2015-03-06 Yao Qi <yao.qi@linaro.org>
10437
10438 * linux-aarch64-low.c (aarch64_insert_point): Use
10439 show_debug_regs as a boolean.
10440 (aarch64_remove_point): Likewise.
10441
10442 2015-03-05 Pedro Alves <palves@redhat.com>
10443
10444 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10445 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10446 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10447 * nto-low.c (nto_target_ops): Likewise.
10448 * spu-low.c (spu_target_ops): Likewise.
10449 * win32-low.c (win32_target_ops): Likewise.
10450
10451 2015-03-04 Pedro Alves <palves@redhat.com>
10452
10453 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10454 Decide whether a breakpoint triggered based on the SIGTRAP's
10455 siginfo.si_code.
10456 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10457 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10458 (linux_low_filter_event): Check for breakpoints before checking
10459 watchpoints.
10460 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10461 siginfo.si_code.
10462 (linux_stopped_by_sw_breakpoint)
10463 (linux_supports_stopped_by_sw_breakpoint)
10464 (linux_stopped_by_hw_breakpoint)
10465 (linux_supports_stopped_by_hw_breakpoint): New functions.
10466 (linux_target_ops): Install new target methods.
10467
10468 2015-03-04 Pedro Alves <palves@redhat.com>
10469
10470 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10471 * server.c (swbreak_feature, hwbreak_feature): New globals.
10472 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10473 (captured_main): Clear swbreak_feature and hwbreak_feature.
10474 * server.h (swbreak_feature, hwbreak_feature): Declare.
10475 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10476 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10477 supports_stopped_by_hw_breakpoint>: New fields.
10478 (target_supports_stopped_by_sw_breakpoint)
10479 (target_stopped_by_sw_breakpoint)
10480 (target_supports_stopped_by_hw_breakpoint)
10481 (target_stopped_by_hw_breakpoint): Declare.
10482
10483 2015-03-04 Pedro Alves <palves@redhat.com>
10484
10485 enum lwp_stop_reason -> enum target_stop_reason
10486 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10487 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10488 (linux_wait_1, stuck_in_jump_pad_callback)
10489 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10490 (linux_stopped_by_watchpoint):
10491 * linux-low.h (enum lwp_stop_reason): Delete.
10492 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10493 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10494
10495 2015-03-04 Yao Qi <yao.qi@linaro.org>
10496
10497 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10498
10499 2015-03-03 Gary Benson <gbenson@redhat.com>
10500
10501 * hostio.c (handle_vFile): Fix prefix lengths.
10502
10503 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10504
10505 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10506 ptr_bits.
10507
10508 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10509
10510 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10511 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10512 (clean): Add "rm -f" for above C files.
10513 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10514 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10515 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10516 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10517 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10518 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10519 (init_registers_s390x_vx_linux64)
10520 (init_registers_s390x_tevx_linux64)
10521 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10522 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10523 declarations.
10524 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10525 (s390_store_vxrs_high): New functions.
10526 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10527 NT_S390_VXRS_HIGH.
10528 (s390_arch_setup): Add logic for selecting one of the new target
10529 descriptions. Activate the new vector regsets if applicable.
10530 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10531 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10532 and init_registers_s390x_tevx_linux64.
10533
10534 2015-03-01 Pedro Alves <palves@redhat.com>
10535
10536 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10537 parameter.
10538
10539 2015-02-27 Pedro Alves <palves@redhat.com>
10540
10541 * linux-x86-low.c (u_debugreg_offset): New function.
10542 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10543
10544 2015-02-27 Pedro Alves <palves@redhat.com>
10545
10546 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10547 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10548 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10549 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10550 (ps_lsetfpregs, ps_getpid)
10551 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10552 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10553 (ps_lsetxregs, ps_plog): Declare.
10554
10555 2015-02-27 Pedro Alves <palves@redhat.com>
10556
10557 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10558 IP_AGENT_EXPORT_FUNC.
10559 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10560 IP_AGENT_EXPORT_FUNC.
10561 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10562 (IP_AGENT_EXPORT): Delete.
10563 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10564 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10565 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10566 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10567 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10568 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10569 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10570 (traceframe_read_count, traceframe_write_count)
10571 (traceframes_created, trace_state_variables, get_raw_reg)
10572 (get_trace_state_variable_value, set_trace_state_variable_value)
10573 (ust_loaded, helper_thread_id, cmd_buf): Use
10574 IPA_SYM_EXPORTED_NAME.
10575 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10576 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10577 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10578 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10579 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10580 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10581 EXTERN_C_PUSH/EXTERN_C_POP.
10582 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10583 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10584 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10585 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10586 (traceframe_write_count, traceframe_read_count)
10587 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10588 (about_to_request_buffer_space, get_trace_state_variable_value)
10589 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10590 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10591 EXTERN_C_PUSH/EXTERN_C_POP.
10592 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10593 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10594 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10595 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10596 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10597 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10598 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10599 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10600 Define.
10601 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10602 (IP_AGENT_EXPORT_VAR_DECL): Define.
10603 (tracing): Declare.
10604 (gdb_agent_get_raw_reg): Declare.
10605
10606 2015-02-27 Tom Tromey <tromey@redhat.com>
10607 Pedro Alves <palves@redhat.com>
10608
10609 Rename symbols whose names are reserved C++ keywords throughout.
10610
10611 2015-02-27 Pedro Alves <palves@redhat.com>
10612
10613 * Makefile.in (COMPILER): New, get it from autoconf.
10614 (CXX): Get from autoconf instead.
10615 (COMPILE.pre): Use COMPILER.
10616 (CC-LD): Rename to ...
10617 (CC_LD): ... this. Use COMPILER.
10618 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10619 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10620 * acinclude.m4: Include build-with-cxx.m4.
10621 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10622 Disable -Werror by default if building in C++ mode.
10623 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10624 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10625 the C++ compiler. Save/restore CXXFLAGS too.
10626 * configure: Regenerate.
10627
10628 2015-02-27 Pedro Alves <palves@redhat.com>
10629
10630 * acinclude.m4: Include libiberty.m4.
10631 * configure.ac: Call libiberty_INIT.
10632 * config.in, configure: Regenerate.
10633
10634 2015-02-26 Pedro Alves <palves@redhat.com>
10635
10636 * linux-low.c (linux_wait_1): When incrementing the PC past a
10637 program breakpoint always use the_low_target.breakpoint_len as
10638 increment, rather than the maximum between that and
10639 the_low_target.decr_pc_after_break.
10640
10641 2015-02-23 Pedro Alves <palves@redhat.com>
10642
10643 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10644 thread was doing a step-over; always adjust the PC if
10645 we stepped over a permanent breakpoint.
10646 (linux_wait_1): If we stepped over breakpoint that was on top of a
10647 permanent breakpoint, manually advance the PC past it.
10648
10649 2015-02-23 Pedro Alves <palves@redhat.com>
10650
10651 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10652 modes.
10653 (x86_fill_gregset, x86_store_gregset): Use it when handling
10654 $orig_eax.
10655
10656 2015-02-20 Pedro Alves <palves@redhat.com>
10657
10658 * thread-db.c: Include "nat/linux-procfs.h".
10659 (thread_db_init): Skip listing new threads if the kernel supports
10660 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10661
10662 2015-02-20 Pedro Alves <palves@redhat.com>
10663
10664 * linux-low.c (status_pending_p_callback): Use ptid_match.
10665
10666 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10667
10668 PR breakpoints/16812
10669 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10670 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10671 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10672
10673 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10674
10675 PR breakpoints/15956
10676 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10677
10678 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10679
10680 * linux-low.c (linux_low_btrace_conf): Print size.
10681 * server.c (handle_btrace_conf_general_set): New.
10682 (hanle_general_set): Call handle_btrace_conf_general_set.
10683 (handle_query): Report Qbtrace-conf:bts:size as supported.
10684
10685 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10686
10687 * linux-low.c (linux_low_enable_btrace): Update parameters.
10688 (linux_low_btrace_conf): New.
10689 (linux_target_ops)<to_btrace_conf>: Initialize.
10690 * server.c (current_btrace_conf): New.
10691 (handle_btrace_enable): Rename to ...
10692 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10693 to target_enable_btrace. Update comment. Update users.
10694 (handle_qxfer_btrace_conf): New.
10695 (qxfer_packets): Add btrace-conf entry.
10696 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10697 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10698 (target_ops)<read_btrace_conf>: New.
10699 (target_enable_btrace): Update parameters.
10700 (target_read_btrace_conf): New.
10701
10702 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10703
10704 * server.c (handle_btrace_general_set): Remove call to
10705 target_supports_btrace.
10706 (supported_btrace_packets): New.
10707 (handle_query): Call supported_btrace_packets.
10708 * target.h: include btrace-common.h.
10709 (btrace_target_info): Removed.
10710 (supports_btrace, target_supports_btrace): Update parameters.
10711
10712 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10713
10714 * Makefile.in (SFILES): Add common/btrace-common.c.
10715 (OBS): Add common/btrace-common.o.
10716 (btrace-common.o): Add build rules.
10717 * linux-low: Include btrace-common.h.
10718 (linux_low_read_btrace): Use struct btrace_data. Call
10719 btrace_data_init and btrace_data_fini.
10720
10721 2015-02-06 Pedro Alves <palves@redhat.com>
10722
10723 * thread-db.c (find_new_threads_callback): Add debug output.
10724
10725 2015-02-04 Pedro Alves <palves@redhat.com>
10726
10727 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10728 (resume_stopped_resumed_lwps): New function.
10729 (linux_wait_for_event_filtered): Use it.
10730
10731 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10732
10733 * Makefile.in (SFILES): Add linux-personality.c.
10734 (linux-personality.o): New rule.
10735 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10736 list of objects to be built.
10737 * linux-low.c: Include nat/linux-personality.h.
10738 (linux_create_inferior): Remove code to disable address space
10739 randomization (moved to ../nat/linux-personality.c). Create
10740 cleanup to disable address space randomization.
10741
10742 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10743
10744 * Makefile.in (posix-strerror.o): New rule.
10745 (mingw-strerror.o): Likewise.
10746 * configure: Regenerated.
10747 * configure.ac: Source file ../common/common.host. Initialize new
10748 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10749
10750 2015-01-14 Yao Qi <yao@codesourcery.com>
10751
10752 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10753 (ppc-linux.o): New rule.
10754 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10755 * configure.ac: AC_CHECK_FUNCS(getauxval).
10756 * config.in: Re-generated.
10757 * configure: Re-generated.
10758 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10759 ppc64_64bit_inferior_p
10760
10761 2015-01-14 Yao Qi <yao@codesourcery.com>
10762
10763 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10764 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10765 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10766 (PT_ORIG_R3, PT_TRAP): Likewise.
10767 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10768 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10769 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10770
10771 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10772
10773 * i387-fp.c (i387_cache_to_xsave): In look over
10774 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10775 zmmh_low_space field by use of zmmh_high_space.
10776
10777 2015-01-09 Pedro Alves <palves@redhat.com>
10778
10779 * linux-low.c (step_over_bkpt): Move higher up in the file.
10780 (handle_extended_wait): Don't store the stop_pc here.
10781 (get_stop_pc): Adjust comments and rename to ...
10782 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10783 stopped for a software breakpoint or hardware breakpoint.
10784 (thread_still_has_status_pending_p): New function.
10785 (status_pending_p_callback): Use
10786 thread_still_has_status_pending_p. If the event is no longer
10787 interesting, resume the LWP.
10788 (handle_tracepoints): Add assert.
10789 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10790 (wstatus_maybe_breakpoint): New function.
10791 (cancel_breakpoint): Delete function.
10792 (check_stopped_by_watchpoint): New function, factored out from
10793 linux_low_filter_event.
10794 (lp_status_maybe_breakpoint): Delete function.
10795 (linux_low_filter_event): Remove filter_ptid argument.
10796 Leave thread group exits pending here. Store the LWP's stop PC.
10797 Always leave events pending.
10798 (linux_wait_for_event_filtered): Pull all events out of the
10799 kernel, and leave them all pending.
10800 (count_events_callback, select_event_lwp_callback): Consider all
10801 events.
10802 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10803 (select_event_lwp): Only give preference to the stepping LWP in
10804 all-stop mode. Adjust comments.
10805 (ignore_event): New function.
10806 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10807 references to cancel_breakpoints. Adjust to renames. Also give
10808 equal priority to all LWPs that have had events in non-stop mode.
10809 If reporting a software breakpoint event, unadjust the LWP's PC.
10810 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10811 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10812 Adjust.
10813 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10814 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10815 (linux_stopped_by_watchpoint): Adjust.
10816 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10817 * linux-low.h (enum lwp_stop_reason): New.
10818 (struct lwp_info) <stop_pc>: Adjust comment.
10819 <stopped_by_watchpoint>: Delete field.
10820 <stop_reason>: New field.
10821 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10822 * mem-break.c (software_breakpoint_inserted_here)
10823 (hardware_breakpoint_inserted_here): New function.
10824 * mem-break.h (software_breakpoint_inserted_here)
10825 (hardware_breakpoint_inserted_here): Declare.
10826 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10827 (cancel_breakpoints): Delete.
10828 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10829 (upload_fast_traceframes): Remove references to
10830 cancel_breakpoints.
10831
10832 2015-01-09 Pedro Alves <palves@redhat.com>
10833
10834 * thread-db.c (find_new_threads_callback): Ignore thread if the
10835 kernel thread ID is -1.
10836
10837 2015-01-09 Pedro Alves <palves@redhat.com>
10838
10839 * linux-low.c (linux_attach_fail_reason_string): Move to
10840 nat/linux-ptrace.c, and rename.
10841 (linux_attach_lwp): Update comment.
10842 (attach_proc_task_lwp_callback): New function.
10843 (linux_attach): Adjust to rename and use
10844 linux_proc_attach_tgid_threads.
10845 (linux_attach_fail_reason_string): Delete declaration.
10846
10847 2015-01-01 Joel Brobecker <brobecker@adacore.com>
10848
10849 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10850 * server.c (gdbserver_version): Likewise.
10851
10852 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10853
10854 * remote-utils.c: Include ctype.h.
10855 (input_interrupt): Explicitly handle the case when the char
10856 received is the NUL byte. Improve the printing of non-ASCII
10857 characters.
10858
10859 2014-12-16 Joel Brobecker <brobecker@adacore.com>
10860
10861 * linux-low.c (linux_low_filter_event): Update call to
10862 linux_enable_event_reporting following the addition of
10863 a new parameter to that function.
10864
10865 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
10866
10867 PR server/17457
10868 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10869 (AARCH64_FPCR_REGNO): Likewise.
10870 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10871 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10872 (aarch64_store_fpregset): Likewise.
10873
10874 2014-12-15 Joel Brobecker <brobecker@adacore.com>
10875
10876 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10877 Remove FIXME comment about assumption about N.
10878
10879 2014-12-13 Joel Brobecker <brobecker@adacore.com>
10880
10881 * configure.ac: If large-file support is disabled in GDBserver,
10882 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10883 * configure: Regenerate.
10884
10885 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10886
10887 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10888 warning upon ENODATA from ptrace.
10889 * linux-s390-low.c (s390_store_tdb): New.
10890 (s390_regsets): Add regset for NT_S390_TDB.
10891
10892 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10893
10894 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10895 without a fill_function.
10896 * linux-s390-low.c (s390_fill_last_break): Remove.
10897 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10898 (s390_arch_setup): Use regset's size instead of fill_function for
10899 loop end condition.
10900
10901 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10902
10903 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10904 the regset's store function when ptrace returned an error.
10905 * regcache.c (get_thread_regcache): Invalidate register cache
10906 before fetching inferior's registers.
10907
10908 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10909
10910 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10911 while-loop as for-loop.
10912 (regsets_store_inferior_registers): Likewise.
10913
10914 2014-11-28 Yao Qi <yao@codesourcery.com>
10915
10916 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10917 * config.in, configure: Re-generate.
10918 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10919 is defined.
10920
10921 2014-11-21 Yao Qi <yao@codesourcery.com>
10922
10923 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10924 (AC_CHECK_HEADERS): Remove malloc.h.
10925 * configure: Re-generated.
10926 * config.in: Re-generated.
10927 * server.h: Don't include alloca.h and malloc.h.
10928 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10929 Don't include malloc.h.
10930
10931 2014-11-17 Joel Brobecker <brobecker@adacore.com>
10932
10933 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10934 corresponding ERRNO check in same block.
10935
10936 2014-11-12 Pedro Alves <palves@redhat.com>
10937
10938 * server.c (cont_thread): Update comment.
10939 (start_inferior, attach_inferior): No longer clear cont_thread.
10940 (handle_v_cont): No longer set cont_thread.
10941 (captured_main): Clear cont_thread each time a GDB connects.
10942
10943 2014-11-12 Pedro Alves <palves@redhat.com>
10944
10945 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10946 thread, and don't resume all threads if the Hc thread has exited.
10947
10948 2014-11-12 Pedro Alves <palves@redhat.com>
10949
10950 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10951 the process group instead of to a specific LWP.
10952
10953 2014-10-15 Pedro Alves <palves@redhat.com>
10954
10955 PR server/17487
10956 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10957 parameter.
10958 (arm_set_thread_context): Delete.
10959 (the_low_target): Adjust.
10960 * win32-i386-low.c (debug_registers_changed)
10961 (debug_registers_used): Delete.
10962 (update_debug_registers_callback): New function.
10963 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10964 needing to update their debug registers.
10965 (win32_get_current_dr): New function.
10966 (x86_dr_low_get_addr, x86_dr_low_get_control)
10967 (x86_dr_low_get_status): Fetch the debug register from the thread
10968 record's context.
10969 (i386_initial_stuff): Adjust.
10970 (i386_get_thread_context): Remove current_event parameter. Don't
10971 clear debug_registers_changed nor copy DR values to
10972 debug_reg_state.
10973 (i386_set_thread_context): Delete.
10974 (i386_prepare_to_resume): New function.
10975 (i386_thread_added): Mark the thread as needing to update irs
10976 debug registers.
10977 (the_low_target): Remove i386_set_thread_context and install
10978 i386_prepare_to_resume.
10979 * win32-low.c (win32_get_thread_context): Adjust.
10980 (win32_set_thread_context): Use SetThreadContext
10981 directly.
10982 (win32_prepare_to_resume): New function.
10983 (win32_require_context): New function, factored out from ...
10984 (thread_rec): ... this.
10985 (continue_one_thread): Call win32_prepare_to_resume on each thread
10986 we're about to continue.
10987 (win32_resume): Call win32_prepare_to_resume on the event thread.
10988 * win32-low.h (struct win32_thread_info)
10989 <debug_registers_changed>: New field.
10990 (struct win32_target_ops): Change prototype of set_thread_context,
10991 delete set_thread_context and add prepare_to_resume.
10992 (win32_require_context): New declaration.
10993
10994 2014-10-08 Gary Benson <gbenson@redhat.com>
10995
10996 * server.h: Do not include common-exceptions.h.
10997
10998 2014-10-08 Gary Benson <gbenson@redhat.com>
10999
11000 * server.h: Do not include cleanups.h.
11001
11002 2014-09-30 James Hogan <james.hogan@imgtec.com>
11003
11004 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11005 mips64-dsp-linux.c.
11006
11007 2014-09-23 Yao Qi <yao@codesourcery.com>
11008
11009 * linux-low.c (lp_status_maybe_breakpoint): New function.
11010 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11011 (count_events_callback): Likewise.
11012 (select_event_lwp_callback): Likewise.
11013 (cancel_breakpoints_callback): Likewise.
11014
11015 2014-09-19 Don Breazeal <donb@codesourcery.com>
11016
11017 * linux-low.c (handle_extended_wait): Call
11018 linux_ptrace_get_extended_event.
11019 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11020 linux_is_extended_waitstatus.
11021
11022 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11023
11024 * Makefile.in (CPPFLAGS): Define.
11025 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11026 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11027
11028 2014-09-16 Gary Benson <gbenson@redhat.com>
11029
11030 * inferiors.h (current_inferior): Renamed as...
11031 (current_thread): New variable. All uses updated.
11032 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11033 (maybe_move_out_of_jump_pad): Likewise.
11034 (cancel_breakpoint): Likewise.
11035 (linux_low_filter_event): Likewise.
11036 (wait_for_sigstop): Likewise.
11037 (linux_resume_one_lwp): Likewise.
11038 (need_step_over_p): Likewise.
11039 (start_step_over): Likewise.
11040 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11041 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11042 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11043 and save_inferior as saved_thread.
11044 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11045 saved_thread.
11046 (regcache_invalidate_thread): Likewise.
11047 * remote-utils.c (prepare_resume_reply): Likewise.
11048 * thread-db.c (thread_db_get_tls_address): Likewise.
11049 (disable_thread_event_reporting): Likewise.
11050 (remove_thread_event_breakpoints): Likewise.
11051 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11052 as saved_thread.
11053 * target.h (set_desired_inferior): Renamed as...
11054 (set_desired_thread): New declaration. All uses updated.
11055 * server.c (myresume): Updated comment to reference thread instead
11056 of inferior.
11057 (handle_serial_event): Likewise.
11058 (handle_target_event): Likewise.
11059
11060 2014-09-12 Tom Tromey <tromey@redhat.com>
11061 Gary Benson <gbenson@redhat.com>
11062
11063 * regcache.h: Include common-regcache.h.
11064 (regcache_read_pc): Don't declare.
11065 * regcache.c (get_thread_regcache_for_ptid): New function.
11066
11067 2014-09-11 Tom Tromey <tromey@redhat.com>
11068 Gary Benson <gbenson@redhat.com>
11069
11070 * symbol.c: New file.
11071 * Makefile.in (SFILES): Add symbol.c.
11072 (OBS): Add symbol.o.
11073
11074 2014-09-11 Gary Benson <gbenson@redhat.com>
11075
11076 * target.c (target_stop_ptid, target_continue_ptid): New
11077 functions.
11078
11079 2014-09-11 Tom Tromey <tromey@redhat.com>
11080 Gary Benson <gbenson@redhat.com>
11081
11082 * target.h: Include target/target.h.
11083 * target.c (target_read_memory, target_read_uint32)
11084 (target_write_memory): New functions.
11085
11086 2014-09-11 Gary Benson <gbenson@redhat.com>
11087
11088 * server.h (debug_hw_points): Don't declare.
11089 * server.c (debug_hw_points): Don't define. Replace all uses
11090 with show_debug_regs.
11091 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11092 all uses with show_debug_regs.
11093
11094 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11095
11096 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11097 endianness into account.
11098 (ppc_supply_ptrace_register): Likewise.
11099
11100 2014-09-03 James Hogan <james.hogan@imgtec.com>
11101
11102 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11103 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11104
11105 2014-09-03 Gary Benson <gbenson@redhat.com>
11106
11107 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11108 ALL_DEBUG_ADDRESS_REGISTERS.
11109
11110 2014-09-02 Gary Benson <gbenson@redhat.com>
11111
11112 * i386-low.h: Renamed as...
11113 * x86-low.h: New file. All type, function and variable name
11114 prefixes changed from "i386_" to "x86_". All references updated.
11115 * i386-low.c: Renamed as...
11116 * x86-low.c: New file. All type, function and variable name
11117 prefixes changed from "i386_" to "x86_". All references updated.
11118
11119 2014-09-02 Gary Benson <gbenson@redhat.com>
11120
11121 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11122 (x86_linux_new_thread): Likewise.
11123
11124 2014-08-29 Gary Benson <gbenson@redhat.com>
11125
11126 * server.h (setjmp.h): Do not include.
11127 (toplevel): Do not declare.
11128 (common-exceptions.h): Include.
11129 (cleanups.h): Likewise.
11130 * server.c (toplevel): Do not define.
11131 (exit_code): New static global.
11132 (detach_or_kill_for_exit_cleanup): New function.
11133 (main): New function. Original main renamed to...
11134 (captured_main): New function.
11135 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11136
11137 2014-08-29 Gary Benson <gbenson@redhat.com>
11138
11139 * Makefile.in (SFILES): Add common/common-exceptions.c.
11140 (OBS): Add common-exceptions.o.
11141 (common-exceptions.o): New rule.
11142 * utils.c (prepare_to_throw_exception): New function.
11143
11144 2014-08-29 Gary Benson <gbenson@redhat.com>
11145
11146 * config.in: Regenerate.
11147 * configure: Likewise.
11148
11149 2014-08-29 Gary Benson <gbenson@redhat.com>
11150
11151 * Makefile.in (SFILES): Add common/cleanups.c.
11152 (OBS): cleanups.o.
11153 (cleanups.o): New rule.
11154
11155 2014-08-29 Gary Benson <gbenson@redhat.com>
11156
11157 * utils.c (internal_vwarning): New function.
11158
11159 2014-08-28 Gary Benson <gbenson@redhat.com>
11160
11161 * utils.h (fatal): Remove declaration.
11162 * utils.c (fatal): Remove function.
11163
11164 2014-08-28 Gary Benson <gbenson@redhat.com>
11165
11166 * tracepoint.c (gdb_agent_init): Replace fatal with
11167 perror_with_name.
11168 (initialize_tracepoint): Likewise.
11169
11170 2014-08-28 Gary Benson <gbenson@redhat.com>
11171
11172 * remote-utils.c (remote_prepare): Replace fatal with error.
11173
11174 2014-08-28 Gary Benson <gbenson@redhat.com>
11175
11176 * linux-low.c (linux_async): Replace fatal with warning.
11177 Tidy up and return.
11178 (linux_start_non_stop): Return -1 if linux_async failed.
11179
11180 2014-08-28 Gary Benson <gbenson@redhat.com>
11181
11182 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11183 gdb_assert.
11184 (i386_dr_low_get_addr): Remove vague comment.
11185 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11186 gdb_assert.
11187
11188 2014-08-28 Gary Benson <gbenson@redhat.com>
11189
11190 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11191 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11192 internal_error.
11193 (linux_resume_one_lwp): Likewise.
11194 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11195 gdb_assert.
11196 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11197 with internal_error.
11198 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11199 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11200 (find_register_by_name): Replace fatal with internal_error.
11201 (find_regno): Likewise.
11202 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11203 * thread-db.c (thread_db_create_event): Likewise.
11204 (thread_db_load_search): Likewise.
11205 (try_thread_db_load_1): Likewise.
11206 * tracepoint.c (get_jump_space_head): Replace fatal with
11207 internal_error.
11208 (claim_trampoline_space): Likewise.
11209 (have_fast_tracepoint_trampoline_buffer): Likewise.
11210 (cmd_qtstart): Likewise.
11211 (stop_tracing): Likewise.
11212 (fast_tracepoint_collecting): Likewise.
11213 (target_malloc): Likewise.
11214 (download_tracepoint): Likewise.
11215 (download_trace_state_variables): Replace check with gdb_assert.
11216 (upload_fast_traceframes): Replace fatal with internal_error.
11217
11218 2014-08-19 Tom Tromey <tromey@redhat.com>
11219 Gary Benson <gbenson@redhat.com>
11220
11221 * Makefile.in (SFILES): Add common/common-debug.c.
11222 (OBS): Add common-debug.o.
11223 (common-debug.o): New rule.
11224 * debug.h (debug_printf): Don't declare.
11225 * debug.c (debug_printf): Renamed and rewritten as...
11226 (debug_vprintf): New function.
11227
11228 2014-08-19 Gary Benson <gbenson@redhat.com>
11229
11230 * utils.h: Do not include print-utils.h.
11231
11232 2014-08-19 Tom Tromey <tromey@redhat.com>
11233 Gary Benson <gbenson@redhat.com>
11234
11235 * server.h: Add static assertion.
11236 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11237
11238 2014-08-19 Tom Tromey <tromey@redhat.com>
11239 Gary Benson <gbenson@redhat.com>
11240
11241 * Makefile.in (SFILES): Add common/errors.c.
11242 (OBS): Add errors.o.
11243 (IPA_OBS): Add errors-ipa.o.
11244 (errors.o): New rule.
11245 (errors-ipa.o): Likewise.
11246 * utils.h (perror_with_name, error, warning): Don't declare.
11247 * utils.c (warning): Renamed and rewritten as...
11248 (vwarning): New function.
11249 (error): Renamed and rewritten as...
11250 (verror): New function.
11251 (internal_error): Renamed and rewritten as...
11252 (internal_verror): New function.
11253
11254 2014-08-07 Gary Benson <gbenson@redhat.com>
11255
11256 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11257 * configure: Regenerate.
11258 * config.in: Likewise.
11259 * server.h: Do not include errno.h.
11260 * event-loop.c: Likewise.
11261 * hostio-errno.c: Likewise.
11262 * linux-low.c: Likewise.
11263 * remote-utils.c: Likewise.
11264 * spu-low.c: Likewise.
11265 * utils.c: Likewise.
11266 * gdbreplay.c: Unconditionally include errno.h.
11267
11268 2014-08-07 Gary Benson <gbenson@redhat.com>
11269
11270 * server.h: Do not include string.h.
11271 * event-loop.c: Likewise.
11272 * linux-low.c: Likewise.
11273 * regcache.c: Likewise.
11274 * remote-utils.c: Likewise.
11275 * spu-low.c: Likewise.
11276 * utils.c: Likewise.
11277
11278 2014-08-07 Gary Benson <gbenson@redhat.com>
11279
11280 * server.h: Do not include gdb_assert.h.
11281
11282 2014-08-07 Gary Benson <gbenson@redhat.com>
11283
11284 * server.h: Do not include common-utils.h.
11285
11286 2014-08-07 Gary Benson <gbenson@redhat.com>
11287
11288 * server.h: Do not include ptid.h.
11289 * notif.h: Likewise.
11290
11291 2014-08-07 Gary Benson <gbenson@redhat.com>
11292
11293 * server.h: Do not include gdb_locale.h.
11294
11295 2014-08-07 Gary Benson <gbenson@redhat.com>
11296
11297 * server.h: Do not include gdb/signals.h.
11298 * win32-low.c: Likewise.
11299
11300 2014-08-07 Gary Benson <gbenson@redhat.com>
11301
11302 * server.h: Do not include pathmax.h.
11303
11304 2014-08-07 Gary Benson <gbenson@redhat.com>
11305
11306 * server.h: Do not include libiberty.h.
11307 * linux-bfin-low.c: Likewise.
11308
11309 2014-08-07 Gary Benson <gbenson@redhat.com>
11310
11311 * server.h: Do not include ansidecl.h.
11312
11313 2014-08-07 Gary Benson <gbenson@redhat.com>
11314
11315 * linux-x86-low.c: Do not include stddef.h.
11316 * lynx-ppc-low.c: Likewise.
11317 * tracepoint.c: Likewise.
11318
11319 2014-08-07 Gary Benson <gbenson@redhat.com>
11320
11321 * server.h: Do not include stdarg.h.
11322 * nto-low.c: Likewise.
11323
11324 2014-08-07 Gary Benson <gbenson@redhat.com>
11325
11326 * server.h: Do not include stdlib.h.
11327 * inferiors.c: Likewise.
11328 * linux-low.c: Likewise.
11329 * regcache.c: Likewise.
11330 * spu-low.c: Likewise.
11331 * tracepoint.c: Likewise.
11332 * utils.c: Likewise.
11333
11334 2014-08-07 Gary Benson <gbenson@redhat.com>
11335
11336 * server.h: Do not include stdio.h.
11337 * linux-low.c: Likewise.
11338 * remote-utils.c: Likewise.
11339 * spu-low.c: Likewise.
11340 * utils.c: Likewise.
11341 * wincecompat.c: Likewise.
11342
11343 2014-08-06 Gary Benson <gbenson@redhat.com>
11344
11345 * regcache.c (init_register_cache): Move conditionals inside if.
11346
11347 2014-08-06 Gary Benson <gbenson@redhat.com>
11348
11349 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11350
11351 2014-07-31 Gary Benson <gbenson@redhat.com>
11352
11353 * ax.h: Do not include server.h.
11354 * gdbthread.h: Likewise.
11355 * lynx-low.h: Likewise.
11356 * notif.h: Likewise.
11357
11358 2014-07-30 Gary Benson <gbenson@redhat.com>
11359
11360 * server.h: Include common-defs.h.
11361 Do not include config.h or build-gnulib-gdbserver/config.h.
11362
11363 2014-07-30 Gary Benson <gbenson@redhat.com>
11364
11365 * hostio-errno.c: Move server.h to top of includes list.
11366 * inferiors.c: Likewise.
11367 * linux-x86-low.c: Likewise.
11368 * notif.c: Include server.h.
11369
11370 2014-07-24 Tom Tromey <tromey@redhat.com>
11371 Gary Benson <gbenson@redhat.com>
11372
11373 * server.h (CORE_ADDR): Now unsigned.
11374
11375 2014-07-16 Pedro Alves <palves@redhat.com>
11376
11377 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11378
11379 2014-07-15 Pedro Alves <palves@redhat.com>
11380
11381 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11382 copy.
11383
11384 2014-07-11 Pedro Alves <palves@redhat.com>
11385
11386 * linux-low.c (kill_wait_lwp): New function, based on
11387 kill_one_lwp_callback, but use my_waitpid directly.
11388 (kill_one_lwp_callback, linux_kill): Use it.
11389
11390 2014-06-23 Pedro Alves <palves@redhat.com>
11391
11392 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11393 before setting DR0..DR3.
11394
11395 2014-06-20 Gary Benson <gbenson@redhat.com>
11396
11397 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11398 * configure: Regenerated.
11399 * config.in: Likewise.
11400
11401 2014-06-20 Gary Benson <gbenson@redhat.com>
11402
11403 * Makefile.in (SFILES): Update locations for files moved
11404 from common to nat.
11405 (object file files): Reordered.
11406
11407 2014-06-20 Gary Benson <gbenson@redhat.com>
11408
11409 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11410 (i386_dr_low_set_addr): Likewise.
11411 (i386_dr_low_get_addr): Likewise.
11412 (i386_dr_low_can_set_control): Likewise.
11413 (i386_dr_low_set_control): Likewise.
11414 (i386_dr_low_get_control): Likewise.
11415 (i386_dr_low_get_status): Likewise.
11416 (i386_get_debug_register_length): Likewise.
11417 * linux-x86-low.c (i386_dr_low_set_addr):
11418 Changed signature. Made static.
11419 (i386_dr_low_get_addr): Likewise.
11420 (i386_dr_low_set_control): Likewise.
11421 (i386_dr_low_get_control): Likewise.
11422 (i386_dr_low_get_status): Likewise.
11423 (i386_dr_low): New global variable.
11424 * win32-i386-low.c (i386_dr_low_set_addr):
11425 Changed signature. Made static.
11426 (i386_dr_low_get_addr): Likewise.
11427 (i386_dr_low_set_control): Likewise.
11428 (i386_dr_low_get_control): Likewise.
11429 (i386_dr_low_get_status): Likewise.
11430 (i386_dr_low): New global variable.
11431
11432 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11433
11434 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11435 * Makefile.in (AR, AR_FLAGS): Define.
11436 * configure: Regenerate.
11437
11438 2014-06-19 Gary Benson <gbenson@redhat.com>
11439
11440 * Makefile.in (i386-dregs.o): New rule.
11441 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11442 * i386-low.c (target.h): Remove include.
11443 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11444 (DR_CONTROL_SHIFT): Likewise.
11445 (DR_CONTROL_SIZE): Likewise.
11446 (DR_RW_EXECUTE): Likewise.
11447 (DR_RW_WRITE): Likewise.
11448 (DR_RW_READ): Likewise.
11449 (DR_RW_IORW): Likewise.
11450 (DR_LEN_1): Likewise.
11451 (DR_LEN_2): Likewise.
11452 (DR_LEN_4): Likewise.
11453 (DR_LEN_8): Likewise.
11454 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11455 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11456 (DR_ENABLE_SIZE): Likewise.
11457 (DR_LOCAL_SLOWDOWN): Likewise.
11458 (DR_GLOBAL_SLOWDOWN): Likewise.
11459 (DR_CONTROL_RESERVED): Likewise.
11460 (I386_DR_CONTROL_MASK): Likewise.
11461 (I386_DR_VACANT): Likewise.
11462 (I386_DR_LOCAL_ENABLE): Likewise.
11463 (I386_DR_GLOBAL_ENABLE): Likewise.
11464 (I386_DR_DISABLE): Likewise.
11465 (I386_DR_SET_RW_LEN): Likewise.
11466 (I386_DR_GET_RW_LEN): Likewise.
11467 (I386_DR_WATCH_HIT): Likewise.
11468 (i386_wp_op_t): Likewise.
11469 (i386_show_dr): Likewise.
11470 (i386_length_and_rw_bits): Likewise.
11471 (i386_insert_aligned_watchpoint): Likewise.
11472 (i386_remove_aligned_watchpoint): Likewise.
11473 (i386_handle_nonaligned_watchpoint): Likewise.
11474 i386_update_inferior_debug_regs(): Likewise.
11475 (i386_dr_insert_watchpoint): Likewise.
11476 (i386_dr_remove_watchpoint): Likewise.
11477 (i386_dr_region_ok_for_watchpoint): Likewise.
11478 (i386_dr_stopped_data_address): Likewise.
11479 (i386_dr_stopped_by_watchpoint): Likewise.
11480
11481 2014-06-19 Gary Benson <gbenson@redhat.com>
11482
11483 * i386-low.c (i386_dr_show): Renamed to
11484 i386_show_dr and made static. All uses updated.
11485 (i386_dr_length_and_rw_bits): Renamed to
11486 i386_length_and_rw_bits and made static.
11487 All uses updated.
11488 (i386_dr_insert_aligned_watchpoint): Renamed to
11489 i386_insert_aligned_watchpoint and made static.
11490 All uses updated.
11491 (i386_dr_remove_aligned_watchpoint): Renamed to
11492 i386_remove_aligned_watchpoint and made static.
11493 All uses updated.
11494 (i386_dr_update_inferior_debug_regs): Renamed to
11495 i386_update_inferior_debug_regs and made static.
11496 All uses updated.
11497
11498 2014-06-18 Gary Benson <gbenson@redhat.com>
11499
11500 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11501 (i386_dr_low_can_set_control): Likewise.
11502 (i386_get_debug_register_length): Likewise.
11503 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11504 (i386_dr_low_can_set_control): Likewise.
11505 (i386_get_debug_register_length): Likewise.
11506
11507 2014-06-17 Gary Benson <gbenson@redhat.com>
11508
11509 * i386-low.h (i386-dregs.h): New include.
11510 (DR_FIRSTADDR): Now in i386-dregs.h.
11511 (DR_LASTADDR): Likewise.
11512 (DR_NADDR): Likewise.
11513 (DR_STATUS): Likewise.
11514 (DR_CONTROL): Likewise.
11515 (i386_debug_reg_state): Likewise.
11516 (i386_dr_insert_watchpoint): Likewise.
11517 (i386_dr_remove_watchpoint): Likewise.
11518 (i386_dr_region_ok_for_watchpoint): Likewise.
11519 (i386_dr_stopped_data_address): Likewise.
11520 (i386_dr_stopped_by_watchpoint): Likewise.
11521 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11522
11523 2014-06-18 Gary Benson <gbenson@redhat.com>
11524
11525 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11526 i386_dr_insert_watchpoint.
11527 (i386_low_remove_watchpoint): Renamed to
11528 i386_dr_remove_watchpoint.
11529 (i386_low_region_ok_for_watchpoint): Renamed to
11530 i386_dr_region_ok_for_watchpoint.
11531 (i386_low_stopped_data_address): Renamed to
11532 i386_dr_stopped_data_address.
11533 (i386_low_stopped_by_watchpoint): Renamed to
11534 i386_dr_stopped_by_watchpoint.
11535 * i386-low.c (i386_show_dr): Renamed to
11536 i386_dr_show and made nonstatic. All uses updated.
11537 (i386_length_and_rw_bits): Renamed to
11538 i386_dr_length_and_rw_bits and made nonstatic.
11539 All uses updated.
11540 (i386_insert_aligned_watchpoint): Renamed to
11541 i386_dr_insert_aligned_watchpoint and made nonstatic.
11542 All uses updated.
11543 (i386_remove_aligned_watchpoint): Renamed to
11544 i386_dr_remove_aligned_watchpoint and made nonstatic.
11545 All uses updated.
11546 (i386_update_inferior_debug_regs): Renamed to
11547 i386_dr_update_inferior_debug_regs and made nonstatic.
11548 All uses updated.
11549 (i386_low_insert_watchpoint): Renamed to
11550 i386_dr_insert_watchpoint. All uses updated.
11551 (i386_low_remove_watchpoint): Renamed to
11552 i386_dr_remove_watchpoint. All uses updated.
11553 (i386_low_region_ok_for_watchpoint): Renamed to
11554 i386_dr_region_ok_for_watchpoint. All uses updated.
11555 (i386_low_stopped_data_address): Renamed to
11556 i386_dr_stopped_data_address. All uses updated.
11557 (i386_low_stopped_by_watchpoint): Renamed to
11558 i386_dr_stopped_by_watchpoint. All uses updated.
11559
11560 2014-06-18 Gary Benson <gbenson@redhat.com>
11561
11562 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11563 (i386_dr_low_can_set_control): Likewise.
11564 (i386_insert_aligned_watchpoint): New check.
11565
11566 2014-06-18 Gary Benson <gbenson@redhat.com>
11567
11568 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11569 Renamed to state.
11570
11571 2014-06-18 Gary Benson <gbenson@redhat.com>
11572
11573 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11574 instead of fatal and error.
11575 (i386_handle_nonaligned_watchpoint): Likewise.
11576
11577 2014-06-18 Gary Benson <gbenson@redhat.com>
11578
11579 * i386-low.c (i386_get_debug_register_length): New macro.
11580 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11581 (i386_show_dr): Use debug_printf instead of fprintf. Use
11582 phex to format values.
11583
11584 2014-06-18 Gary Benson <gbenson@redhat.com>
11585
11586 * i386-low.h: Comment changes.
11587 * i386-low.c: Likewise.
11588
11589 2014-06-18 Gary Benson <gbenson@redhat.com>
11590
11591 * i386-low.c: Whitespace changes.
11592
11593 2014-06-12 Tom Tromey <tromey@redhat.com>
11594
11595 * utils.c (freeargv): Remove.
11596
11597 2014-06-12 Tom Tromey <tromey@redhat.com>
11598
11599 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11600 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11601 (parse_debug_format_options): Likewise.
11602 (gdbserver_usage): Likewise.
11603 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11604 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11605 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11606 against libiberty.
11607 ($(LIBGNU)): Depend on libiberty.
11608 (all-lib): Recurse into all subdirs.
11609 (install-only): Invoke "install" target in subdirs.
11610 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11611 targets.
11612 * configure: Rebuild.
11613 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11614 for vasprintf, vsnprintf, or gettimeofday.
11615 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11616 srv_tgtobj.
11617
11618 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11619
11620 * development.sh: Delete.
11621 * Makefile.in (config.status): Adjust dependency on development.sh.
11622 * configure.ac: Adjust development.sh source call.
11623 * configure: Regenerate.
11624
11625 2014-06-02 Pedro Alves <palves@redhat.com>
11626
11627 * ax.c (gdb_free_agent_expr): New function.
11628 * ax.h (gdb_free_agent_expr): New declaration.
11629 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11630 list.
11631 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11632 static.
11633 (clear_breakpoint_conditions_and_commands): New function.
11634 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11635 (clear_breakpoint_conditions_and_commands): New declaration.
11636
11637 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11638
11639 * linux-aarch64-low.c (asm/ptrace.h): Include.
11640
11641 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11642
11643 Fix TLS access for -static -pthread.
11644 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11645 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11646 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11647
11648 2014-05-20 Pedro Alves <palves@redhat.com>
11649
11650 * linux-aarch64-low.c (aarch64_insert_point)
11651 (aarch64_remove_point): No longer check whether the type is
11652 supported here. Adjust to new interface.
11653 (the_low_target): Install aarch64_supports_z_point_type as
11654 supports_z_point_type method.
11655 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11656 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11657 instead of a Z packet char. Adjust.
11658 (arm_supports_z_point_type): New function.
11659 (arm_insert_point, arm_remove_point): Adjust to new interface.
11660 (the_low_target): Install arm_supports_z_point_type.
11661 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11662 (cris_insert_point, cris_remove_point): Adjust to new interface.
11663 Don't check whether the type is supported here.
11664 (the_low_target): Install cris_supports_z_point_type.
11665 * linux-low.c (linux_supports_z_point_type): New function.
11666 (linux_insert_point, linux_remove_point): Adjust to new interface.
11667 * linux-low.h (struct linux_target_ops) <insert_point,
11668 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11669 raw_breakpoint pointer parameter.
11670 <supports_z_point_type>: New method.
11671 * linux-mips-low.c (mips_supports_z_point_type): New function.
11672 (mips_insert_point, mips_remove_point): Adjust to new interface.
11673 Use mips_supports_z_point_type.
11674 (the_low_target): Install mips_supports_z_point_type.
11675 * linux-ppc-low.c (the_low_target): Install NULL as
11676 supports_z_point_type method.
11677 * linux-s390-low.c (the_low_target): Install NULL as
11678 supports_z_point_type method.
11679 * linux-sparc-low.c (the_low_target): Install NULL as
11680 supports_z_point_type method.
11681 * linux-x86-low.c (x86_supports_z_point_type): New function.
11682 (x86_insert_point): Adjust to new insert_point interface. Use
11683 insert_memory_breakpoint. Adjust to new
11684 i386_low_insert_watchpoint interface.
11685 (x86_remove_point): Adjust to remove_point interface. Use
11686 remove_memory_breakpoint. Adjust to new
11687 i386_low_remove_watchpoint interface.
11688 (the_low_target): Install x86_supports_z_point_type.
11689 * lynx-low.c (lynx_target_ops): Install NULL as
11690 supports_z_point_type callback.
11691 * nto-low.c (nto_supports_z_point_type): New.
11692 (nto_insert_point, nto_remove_point): Adjust to new interface.
11693 (nto_target_ops): Install nto_supports_z_point_type.
11694 * mem-break.c: Adjust intro comment.
11695 (struct raw_breakpoint) <raw_type, size>: New fields.
11696 <inserted>: Update comment.
11697 <shlib_disabled>: Delete field.
11698 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11699 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11700 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11701 (raw_bkpt_type_to_target_hw_bp_type): New function.
11702 (find_enabled_raw_code_breakpoint_at): New function.
11703 (find_raw_breakpoint_at): New type and size parameters. Use them.
11704 (insert_memory_breakpoint): New function, based off
11705 set_raw_breakpoint_at.
11706 (remove_memory_breakpoint): New function.
11707 (set_raw_breakpoint_at): Reimplement.
11708 (set_breakpoint): New, based on set_breakpoint_at.
11709 (set_breakpoint_at): Reimplement.
11710 (delete_raw_breakpoint): Go through the_target->remove_point
11711 instead of assuming memory breakpoints.
11712 (find_gdb_breakpoint_at): Delete.
11713 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11714 (find_gdb_breakpoint): New function.
11715 (set_gdb_breakpoint_at): Delete.
11716 (z_type_supported): New function.
11717 (set_gdb_breakpoint_1): New function, loosely based off
11718 set_gdb_breakpoint_at.
11719 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11720 (delete_gdb_breakpoint_at): Delete.
11721 (delete_gdb_breakpoint_1): New function, loosely based off
11722 delete_gdb_breakpoint_at.
11723 (delete_gdb_breakpoint): New function.
11724 (clear_gdb_breakpoint_conditions): Rename to ...
11725 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11726 breakpoint.
11727 (add_condition_to_breakpoint): Make static.
11728 (add_breakpoint_condition): Take a struct breakpoint pointer
11729 instead of an address. Adjust.
11730 (gdb_condition_true_at_breakpoint): Rename to ...
11731 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11732 z_type parameter.
11733 (gdb_condition_true_at_breakpoint): Reimplement.
11734 (add_breakpoint_commands): Take a struct breakpoint pointer
11735 instead of an address. Adjust.
11736 (gdb_no_commands_at_breakpoint): Rename to ...
11737 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11738 parameter. Return true if no breakpoint was found. Change debug
11739 output.
11740 (gdb_no_commands_at_breakpoint): Reimplement.
11741 (run_breakpoint_commands): Rename to ...
11742 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11743 and change return type to boolean.
11744 (run_breakpoint_commands): New function.
11745 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11746 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11747 breakpoint. Go through the_target->remove_point instead of
11748 assuming memory breakpoint.
11749 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11750 software and hardware breakpoints.
11751 (reinsert_raw_breakpoint): Go through the_target->insert_point
11752 instead of assuming memory breakpoint.
11753 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11754 software and hardware breakpoints.
11755 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11756 Check both software and hardware breakpoints.
11757 (validate_inserted_breakpoint): Assert the breakpoint is a
11758 software breakpoint. Set the inserted flag to -1 instead of
11759 setting shlib_disabled.
11760 (delete_disabled_breakpoints): Adjust.
11761 (validate_breakpoints): Only validate software breakpoints.
11762 Adjust to inserted flag change.
11763 (check_mem_read, check_mem_write): Skip breakpoint types other
11764 than software breakpoints. Adjust to inserted flag change.
11765 * mem-break.h (enum raw_bkpt_type): New enum.
11766 (raw_breakpoint, struct process_info): Forward declare.
11767 (Z_packet_to_target_hw_bp_type): Delete declaration.
11768 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11769 (set_gdb_breakpoint, delete_gdb_breakpoint)
11770 (clear_breakpoint_conditions): New declarations.
11771 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11772 (breakpoint_inserted_here): Update comment.
11773 (add_breakpoint_condition, add_breakpoint_commands): Replace
11774 address parameter with a breakpoint pointer parameter.
11775 (gdb_breakpoint_here): Update comment.
11776 (delete_gdb_breakpoint_at): Delete.
11777 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11778 * server.c (process_point_options): Take a struct breakpoint
11779 pointer instead of an address. Adjust.
11780 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11781 delete_gdb_breakpoint.
11782 * spu-low.c (spu_target_ops): Install NULL as
11783 supports_z_point_type method.
11784 * target.h: Include mem-break.h.
11785 (struct target_ops) <prepare_to_access_memory>: Update comment.
11786 <supports_z_point_type>: New field.
11787 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11788 instead of a char. Also take a raw breakpoint pointer.
11789 * win32-arm-low.c (the_low_target): Install NULL as
11790 supports_z_point_type.
11791 * win32-i386-low.c (i386_supports_z_point_type): New function.
11792 (i386_insert_point, i386_remove_point): Adjust to new interface.
11793 (the_low_target): Install i386_supports_z_point_type.
11794 * win32-low.c (win32_supports_z_point_type): New function.
11795 (win32_insert_point, win32_remove_point): Adjust to new interface.
11796 (win32_target_ops): Install win32_supports_z_point_type.
11797 * win32-low.h (struct win32_target_ops):
11798 <supports_z_point_type>: New method.
11799 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11800 instead of a char. Also take a raw breakpoint pointer.
11801
11802 2014-05-20 Pedro Alves <palves@redhat.com>
11803
11804 * mem-break.h: Include break-common.h.
11805 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11806 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11807 (Z_packet_to_target_hw_bp_type): New declaration.
11808 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11809 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11810 (Z_PACKET_ACCESS_WP): Delete macros.
11811 (Z_packet_to_hw_type): Delete function.
11812 * i386-low.h: Don't include break-common.h here.
11813 (Z_packet_to_hw_type): Delete declaration.
11814 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11815 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11816 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11817 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11818 * linux-aarch64-low.c: Don't include break-common.h here.
11819 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11820 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11821 (Z_packet_to_target_hw_bp_type): Delete function.
11822 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11823 function.
11824 (mips_insert_point, mips_remove_point): Use
11825 Z_packet_to_target_hw_bp_type.
11826
11827 2014-05-20 Pedro Alves <palves@redhat.com>
11828
11829 * linux-aarch64-low.c: Include break-common.h.
11830 (enum target_point_type): Delete.
11831 (Z_packet_to_point_type): Rename to ...
11832 (Z_packet_to_target_hw_bp_type): ... this, and return a
11833 target_hw_bp_type instead.
11834 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11835 instead of an enum target_point_type.
11836 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11837 breakpoint type.
11838 (aarch64_dr_state_insert_one_point)
11839 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11840 (aarch64_handle_aligned_watchpoint)
11841 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11842 Take an enum target_hw_bp_type instead of an enum
11843 target_point_type.
11844 (aarch64_supports_z_point_type): New function.
11845 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11846 use Z_packet_to_target_hw_bp_type.
11847
11848 2014-05-20 Joel Brobecker <brobecker@adacore.com>
11849
11850 * configure.ac: Only use -Werror by default when DEVELOPMENT
11851 is true.
11852 * configure: Regenerate.
11853
11854 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11855
11856 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11857 * linux-x86-low.c (X86_64_USER_REGS): New.
11858 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11859
11860 2014-04-28 Yao Qi <yao@codesourcery.com>
11861
11862 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11863 name.
11864
11865 2014-04-25 Pedro Alves <palves@redhat.com>
11866
11867 PR server/16255
11868 * linux-low.c (linux_attach_fail_reason_string): New function.
11869 (linux_attach_lwp): Delete.
11870 (linux_attach_lwp_1): Rename to ...
11871 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11872 argument. Remove "initial" parameter. Return int instead of
11873 void. Don't error or warn here.
11874 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11875 failure to attach to the tgid. Call warning when failing to
11876 attach to an lwp.
11877 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11878 argument. Remove "initial" parameter. Return int instead of
11879 void. Don't error or warn here.
11880 (linux_attach_fail_reason_string): New declaration.
11881 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11882 interface change. Use linux_attach_fail_reason_string.
11883
11884 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
11885 Walfred Tedeschi <walfred.tedeschi@intel.com>
11886
11887 * Makefile.in: Added rules to handle new files
11888 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11889 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11890 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11891 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11892 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11893 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11894 x32-avx512-linux.o.
11895 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11896 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11897 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11898 i386/x32-avx512.xml.
11899 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11900 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11901 i386/x32-avx512-linux.xml.
11902 * i387-fp.c (num_avx512_k_registers): New constant for number
11903 of K registers.
11904 (num_avx512_zmmh_low_registers): New constant for number of
11905 lower ZMM registers (0-15).
11906 (num_avx512_zmmh_high_registers): New constant for number of
11907 higher ZMM registers (16-31).
11908 (num_avx512_ymmh_registers): New contant for number of higher
11909 YMM registers (ymm16-31 added by avx521 on x86_64).
11910 (num_avx512_xmm_registers): New constant for number of higher
11911 XMM registers (xmm16-31 added by AVX512 on x86_64).
11912 (struct i387_xsave): Add space for AVX512 registers.
11913 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11914 Add code to handle AVX512 registers.
11915 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11916 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11917 prototypei from generated file.
11918 (tdesc_amd64_avx512_linux): Likewise.
11919 (init_registers_x32_avx512_linux): Likewise.
11920 (tdesc_x32_avx512_linux): Likewise.
11921 (init_registers_i386_avx512_linux): Likewise.
11922 (tdesc_i386_avx512_linux): Likewise.
11923 (x86_64_regmap): Add AVX512 registers.
11924 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11925 mask.
11926 (initialize_low_arch): Add code to initialize AVX512 registers.
11927
11928 2014-04-23 Pedro Alves <palves@redhat.com>
11929
11930 * mem-break.c (find_gdb_breakpoint_at): Make static.
11931 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11932
11933 2014-04-23 Pedro Alves <palves@redhat.com>
11934
11935 * i386-low.c: Don't include break-common.h here.
11936 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11937 prototype to take target_hw_bp_type as argument instead of a Z
11938 packet char.
11939 * i386-low.h: Include break-common.h here.
11940 (Z_packet_to_hw_type): Declare.
11941 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11942 prototypes.
11943 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11944 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11945 (x86_remove_point): Convert the packet number to a
11946 target_hw_bp_type before calling i386_low_remove_watchpoint.
11947 * win32-i386-low.c (i386_insert_point): Convert the packet number
11948 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11949 (i386_remove_point): Convert the packet number to a
11950 target_hw_bp_type before calling i386_low_remove_watchpoint.
11951
11952 2014-04-23 Pedro Alves <palves@redhat.com>
11953
11954 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11955
11956 2014-04-10 Pedro Alves <palves@redhat.com>
11957
11958 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11959 Check if the condition or command is NULL before checking if the
11960 breakpoint is known. On success, return true.
11961 * mem-break.h (add_breakpoint_condition): Document return.
11962 (add_breakpoint_commands): Add describing comment.
11963 * server.c (skip_to_semicolon): New function.
11964 (process_point_options): Use it.
11965
11966 2014-04-09 Pedro Alves <palves@redhat.com>
11967
11968 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11969 to lwpid_of.
11970
11971 2014-02-27 Pedro Alves <palves@redhat.com>
11972
11973 PR 12702
11974 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11975 macros.
11976 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11977 output.
11978 (last_thread_of_process_p): Take a PID argument instead of a
11979 thread pointer.
11980 (linux_wait_for_lwp): Delete.
11981 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11982 functions.
11983 (linux_low_filter_event): New function, party factored out from
11984 linux_wait_for_event.
11985 (linux_wait_for_event): Rename to ...
11986 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11987 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11988 sigsuspend. Check for zombie leaders.
11989 (linux_wait_for_event): Reimplement as wrapper around
11990 linux_wait_for_event_filtered.
11991 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11992 a normal or signal exit is seen, it's the whole process exiting.
11993 (wait_for_sigstop): No longer a for_each_inferior callback.
11994 Rewrite on top of linux_wait_for_event_filtered.
11995 (stop_all_lwps): Call wait_for_sigstop directly.
11996 * server.c (resume, handle_target_event): Handle
11997 TARGET_WAITKIND_NO_RESUMED.
11998
11999 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12000
12001 * win32-low.c (psapi_get_dll_name,
12002 * win32_CreateToolhelp32Snapshot): Delete.
12003 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12004 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12005 Delete.
12006 (handle_load_dll): Add function description.
12007 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12008
12009 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12010
12011 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12012 Add comment.
12013 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12014 base address when calling win32_add_one_solib.
12015 (handle_load_dll): Delete local variable load_addr.
12016 Remove 0x1000 offset applied to DLL base address when calling
12017 win32_add_one_solib.
12018 (handle_unload_dll): Add comment.
12019
12020 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12021
12022 * win32-low.c (win32_add_all_dlls): Renames
12023 win32_ensure_ntdll_loaded. Rewrite function documentation.
12024 Adjust implementation to always load all DLLs.
12025 Add 0x1000 offset to DLL base address when calling
12026 win32_add_one_solib.
12027 (child_initialization_done): New static global.
12028 (do_initial_child_stuff): Set child_initialization_done to
12029 zero during child initialization, and 1 after. Replace call
12030 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12031 Add comment.
12032 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12033 (handle_unload_dll): Add function documentation.
12034 (get_child_debug_event): Ignore load and unload DLL events
12035 during child initialization.
12036
12037 2014-02-20 Doug Evans <dje@google.com>
12038
12039 Remove global all_lwps.
12040 * inferiors.h (ptid_of): Move here from linux-low.h.
12041 (pid_of, lwpid_of): Ditto.
12042 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12043 parameter is a struct thread_info * now.
12044 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12045 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12046 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12047 directly.
12048 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12049 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12050 * linux-arm-low.c (update_registers_callback): Update, "entry"
12051 parameter is a struct thread_info * now.
12052 Fetch lwpid from current_inferior directly.
12053 (arm_insert_point): Pass &all_threads to find_inferior instead of
12054 &all_lwps.
12055 (arm_remove_point): Ditto.
12056 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12057 (arm_prepare_to_resume): Fetch pid from thread.
12058 (arm_read_description): Fetch lwpid from current_inferior directly.
12059 * linux-low.c (all_lwps): Delete.
12060 (delete_lwp): Delete call to remove_inferior.
12061 (handle_extended_wait): Fetch lwpid from thread.
12062 (add_lwp): Don't set lwp->entry.id. Remove call to
12063 add_inferior_to_list.
12064 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12065 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12066 (kill_one_lwp_callback): Ditto.
12067 (linux_kill): Don't dereference NULL pointer.
12068 Fetch ptid,lwpid from thread.
12069 (get_detach_signal): Fetch ptid from thread.
12070 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12071 Simplify call to regcache_invalidate_thread.
12072 (delete_lwp_callback): Update, "entry" parameter is a
12073 struct thread_info * now. Fetch pid from thread.
12074 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12075 (status_pending_p_callback): Update, "entry" parameter is a
12076 struct thread_info * now. Fetch ptid from thread.
12077 (find_lwp_pid): Update, "entry" parameter is a
12078 struct thread_info * now.
12079 (linux_wait_for_lwp): Fetch pid from thread.
12080 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12081 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12082 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12083 (dequeue_one_deferred_signal): Ditto.
12084 (cancel_breakpoint): Fetch ptid from current_inferior.
12085 (linux_wait_for_event): Pass &all_threads to find_inferior,
12086 not &all_lwps. Fetch ptid, lwpid from thread.
12087 (count_events_callback): Update, "entry" parameter is a
12088 struct thread_info * now.
12089 (select_singlestep_lwp_callback): Ditto.
12090 (select_event_lwp_callback): Ditto.
12091 (cancel_breakpoints_callback): Ditto.
12092 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12093 not &all_lwps.
12094 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12095 (unsuspend_one_lwp): Update, "entry" parameter is a
12096 struct thread_info * now.
12097 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12098 not &all_lwps.
12099 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12100 Fetch lwpid from thread, not lwp.
12101 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12102 Pass &all_threads to find_inferior, not &all_lwps.
12103 (send_sigstop): Fetch lwpid from thread, not lwp.
12104 (send_sigstop_callback): Update, "entry" parameter is a
12105 struct thread_info * now.
12106 (suspend_and_send_sigstop_callback): Ditto.
12107 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12108 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12109 struct thread_info * now.
12110 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12111 from thread, lwp.
12112 (lwp_running): Update, "entry" parameter is a
12113 struct thread_info * now.
12114 (stop_all_lwps): Fetch ptid from thread.
12115 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12116 (linux_resume_one_lwp): Fetch lwpid from thread.
12117 (linux_set_resume_request): Update, "entry" parameter is a
12118 struct thread_info * now. Fetch pid, lwpid from thread.
12119 (resume_status_pending_p): Update, "entry" parameter is a
12120 struct thread_info * now.
12121 (need_step_over_p): Ditto. Fetch lwpid from thread.
12122 (start_step_over): Fetch lwpid from thread.
12123 (linux_resume_one_thread): Update, "entry" parameter is a
12124 struct thread_info * now. Fetch lwpid from thread.
12125 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12126 (proceed_one_lwp): Update, "entry" parameter is a
12127 struct thread_info * now. Fetch lwpid from thread.
12128 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12129 struct thread_info * now.
12130 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12131 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12132 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12133 directly.
12134 (regsets_store_inferior_registers): Ditto.
12135 (fetch_register, store_register): Ditto.
12136 (linux_read_memory, linux_write_memory): Ditto.
12137 (linux_request_interrupt): Ditto.
12138 (linux_read_auxv): Ditto.
12139 (linux_xfer_siginfo): Ditto.
12140 (linux_qxfer_spu): Ditto.
12141 (linux_qxfer_libraries_svr4): Ditto.
12142 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12143 moved to inferiors.h.
12144 (get_lwp): Delete.
12145 (get_thread_lwp): Update.
12146 (struct lwp_info): Delete member "entry". Simplify comment for
12147 member "thread".
12148 (all_lwps): Delete.
12149 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12150 current_inferior directly.
12151 (update_watch_registers_callback): Update, "entry" parameter is a
12152 struct thread_info * now. Fetch pid from thread.
12153 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12154 (mips_insert_point): Fetch lwpid from current_inferior.
12155 Pass &all_threads to find_inferior, not &all_lwps.
12156 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12157 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12158 directly.
12159 (mips_stopped_data_address): Ditto.
12160 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12161 directly.
12162 * linux-tile-low.c (tile_arch_setup): Ditto.
12163 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12164 (update_debug_registers_callback): Update, "entry" parameter is a
12165 struct thread_info * now. Fetch pid from thread.
12166 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12167 Pass &all_threads to find_inferior, not &all_lwps.
12168 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12169 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12170 Pass &all_threads to find_inferior, not &all_lwps.
12171 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12172 (i386_dr_low_get_status): Ditto.
12173 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12174 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12175 (x86_linux_read_description): Ditto.
12176 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12177
12178 2014-02-20 Doug Evans <dje@google.com>
12179
12180 * inferiors.c (get_first_inferior): Fix buglet.
12181
12182 2014-02-19 Doug Evans <dje@google.com>
12183
12184 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12185 * inferiors.c (add_thread): Change result type to struct thread_info *.
12186 All callers updated.
12187 (add_lwp): Call add_thread here instead of in callers.
12188 All callers updated.
12189 * linux-low.h (get_lwp_thread): Rewrite.
12190 (struct lwp_info): New member "thread".
12191
12192 2014-02-19 Doug Evans <dje@google.com>
12193
12194 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12195 All callers updated.
12196
12197 2014-02-19 Doug Evans <dje@google.com>
12198
12199 * inferiors.c (add_thread): Fix whitespace.
12200
12201 2014-02-19 Doug Evans <dje@google.com>
12202
12203 * dll.c (clear_dlls): Replace accessing list implemention details
12204 with API function.
12205 * gdbthread.h (get_first_thread): Declare.
12206 * inferiors.c (for_each_inferior_with_data): New function.
12207 (get_first_thread): New function.
12208 (find_thread_ptid): Simplify.
12209 (get_first_inferior): New function.
12210 (clear_list): Delete.
12211 (one_inferior_p): New function.
12212 (clear_inferior_list): New function.
12213 (clear_inferiors): Update.
12214 * inferiors.h (for_each_inferior_with_data): Declare.
12215 (clear_inferior_list): Declare.
12216 (one_inferior_p): Declare.
12217 (get_first_inferior): Declare.
12218 * linux-low.c (linux_wait_for_event): Replace accessing list
12219 implemention details with API function.
12220 * server.c (target_running): Ditto.
12221 (accumulate_file_name_length): New function.
12222 (emit_dll_description): New function.
12223 (handle_qxfer_libraries): Replace accessing list implemention
12224 details with API function.
12225 (handle_qxfer_threads_worker): New function.
12226 (handle_qxfer_threads_proper): Replace accessing list implemention
12227 details with API function.
12228 (handle_query): Ditto.
12229 (visit_actioned_threads_callback_ftype): New typedef.
12230 (visit_actioned_threads_data): New struct.
12231 (visit_actioned_threads): Rewrite to be find_inferior callback.
12232 (resume): Call find_inferior.
12233 (handle_status): Replace accessing list implemention
12234 details with API function.
12235 (process_serial_event): Replace accessing list implemention details
12236 with API function.
12237 * target.c (set_desired_inferior): Replace accessing list implemention
12238 details with API function.
12239 * tracepoint.c (same_process_p): New function.
12240 (gdb_agent_about_to_close): Replace accessing list implemention
12241 details with API function.
12242 * win32-low.c (child_delete_thread): Replace accessing list
12243 implemention details with API function.
12244 (match_dll_by_basename): New function.
12245 (dll_is_loaded_by_basename): New function.
12246 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12247 details call to dll_is_loaded_by_basename.
12248
12249 2014-02-19 Doug Evans <dje@google.com>
12250
12251 * dll.h (struct dll_info): Add comment.
12252 * gdbthread.h (struct thread_info): Add comment.
12253 (current_ptid): Simplify.
12254 * inferiors.c (add_process): Update.
12255 (remove_process): Update.
12256 * inferiors.h (struct process_info): Rename member "head" to "entry".
12257 * linux-low.c (delete_lwp): Update.
12258 (add_lwp): Update.
12259 (last_thread_of_process_p): Update.
12260 (kill_one_lwp_callback, linux_kill): Update.
12261 (status_pending_p_callback): Update.
12262 (wait_for_sigstop): Update. Simplify read of ptid.
12263 (start_step_over): Update.
12264 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12265 (get_lwp_thread): Update.
12266 (struct lwp_info): Rename member "head" to "entry".
12267 * regcache.h (inferior_list_entry): Delete.
12268 * server.c (kill_inferior_callback): Update.
12269 (detach_or_kill_inferior_callback): Update.
12270 (print_started_pid): Update.
12271 (print_attached_pid): Update.
12272 (process_serial_event): Simplify read of ptid.
12273 * thread-db.c (thread_db_create_event): Update.
12274 (thread_db_get_tls_address): Update.
12275 * win32-low.c (current_inferior_ptid): Simplify.
12276
12277 2014-02-19 Tom Tromey <tromey@redhat.com>
12278
12279 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12280 argument.
12281 (target_supports_btrace): Update.
12282
12283 2014-02-14 Yao Qi <yao@codesourcery.com>
12284
12285 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12286 (rsp-low-ipa.o): New target.
12287
12288 2014-02-12 Tom Tromey <tromey@redhat.com>
12289
12290 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12291 convert_ascii_to_int.
12292 * regcache.c (registers_to_string): Likewise.
12293 * remote-utils.c (decode_M_packet): Likewise.
12294 * server.c (process_serial_event): Likewise.
12295
12296 2014-02-12 Tom Tromey <tromey@redhat.com>
12297
12298 * server.c (handle_query, handle_v_run): Use hex2bin, not
12299 unhexify.
12300 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12301
12302 2014-02-12 Tom Tromey <tromey@redhat.com>
12303
12304 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12305 convert_int_to_ascii.
12306 * regcache.c (registers_to_string, collect_register_as_string):
12307 Likewise.
12308 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12309 Likewise.
12310 * server.c (process_serial_event): Likewise.
12311 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12312 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12313
12314 2014-02-12 Tom Tromey <tromey@redhat.com>
12315
12316 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12317 bin2hex, not hexify.
12318 * tracepoint.c (cmd_qtstatus): Likewise.
12319
12320 2014-02-12 Tom Tromey <tromey@redhat.com>
12321
12322 * remote-utils.c (monitor_output): Pass explicit length to
12323 hexify.
12324
12325 2014-02-12 Tom Tromey <tromey@redhat.com>
12326
12327 * tracepoint.c: Include rsp-low.h.
12328 * server.c: Include rsp-low.h.
12329 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12330 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12331 declare.
12332 * remote-utils.c: Include rsp-low.h.
12333 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12334 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12335 (convert_int_to_ascii, convert_ascii_to_int): Move to
12336 common/rsp-low.c.
12337 * regcache.c: Include rsp-low.h.
12338 * ax.c: Include rsp-low.h.
12339 * Makefile.in (SFILES): Add common/rsp-low.c.
12340 (OBS): Add rsp-low.o.
12341 (rsp-low.o): New target.
12342
12343 2014-02-12 Tom Tromey <tromey@redhat.com>
12344
12345 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12346 Include print-utils.h.
12347 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12348 (plongest, thirty_two, phex_nz): Remove.
12349 * Makefile.in (SFILES): Add common/print-utils.c.
12350 (OBS): Add print-utils.o.
12351 (print-utils-ipa.o): New target.
12352 (print-utils.o): New target.
12353 (IPA_OBJS): Add print-utils-ipa.o.
12354
12355 2014-02-06 Tom Tromey <tromey@redhat.com>
12356
12357 * Makefile.in (SFILES): Fix indentation.
12358
12359 2014-02-05 Doug Evans <dje@google.com>
12360
12361 * linux-low.c (linux_wait_for_event): Improve comment.
12362 (linux_wait_1): Keep current_inferior in sync with event_child.
12363
12364 2014-01-22 Doug Evans <dje@google.com>
12365
12366 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12367
12368 2014-01-22 Doug Evans <dje@google.com>
12369
12370 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12371 * configure: Regenerate.
12372 * config.in: Regenerate.
12373 * Makefile.in (SFILES): Add debug.c.
12374 (OBS): Add debug.o.
12375 * debug.c: New file.
12376 * debug.h: New file.
12377 * linux-aarch64-low.c (*): Update all debugging printfs to use
12378 debug_printf instead of fprintf.
12379 * linux-arm-low.c (*): Ditto.
12380 * linux-cris-low.c (*): Ditto.
12381 * linux-crisv32-low.c (*): Ditto.
12382 * linux-m32r-low.c (*): Ditto.
12383 * linux-sparc-low.c (*): Ditto.
12384 * linux-x86.c (*): Ditto.
12385 * linux-low.c (*): Ditto.
12386 (linux_wait_1): Add calls to debug_enter, debug_exit.
12387 (linux_wait): Remove redundant debugging printf.
12388 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12389 (linux_resume, unstop_all_lwps): Ditto.
12390 * mem-break.c (*): Update all debugging printfs to use
12391 debug_printf instead of fprintf.
12392 * remote-utils.c (*): Ditto.
12393 * thread-db.c (*): Ditto.
12394 * server.c #include <ctype.h>, "gdb_vecs.h".
12395 (debug_threads): Moved to debug.c.
12396 (*): Update all debugging printfs to use debug_printf instead of
12397 fprintf.
12398 (start_inferior): Replace call to fflush with call to debug_flush.
12399 (monitor_show_help): Mention set debug-format.
12400 (parse_debug_format_options): New function.
12401 (handle_monitor_command): Handle "monitor set debug-format".
12402 (gdbserver_usage): Mention --debug-format.
12403 (main): Parse --debug-format.
12404 * server.h (debug_threads): Declaration moved to debug.h.
12405 #include "debug.h".
12406 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12407 trace_debug_1 that uses debug_printf.
12408 (tracepoint_look_up_symbols): Update all debugging printfs to use
12409 debug_printf instead of fprintf.
12410
12411 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12412
12413 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12414 sys/ptrace.h.
12415
12416 2014-01-17 Pedro Alves <palves@redhat.com>
12417
12418 PR build/16445
12419 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12420 defined after including gdb_proc_service.h.
12421
12422 2014-01-16 Doug Evans <dje@google.com>
12423
12424 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12425 (match_dll): Use it.
12426
12427 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12428
12429 * target.h (target_ops) <read_btrace>: Change parameters and
12430 return type to allow error reporting.
12431 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12432 trace reading errors on.
12433 * linux-low.c (linux_low_read_btrace): Pass trace reading
12434 errors on.
12435 (linux_low_disable_btrace): New.
12436
12437 2014-01-15 Doug Evans <dje@google.com>
12438
12439 * inferiors.c (thread_id_to_gdb_id): Delete.
12440 * inferiors.h (thread_id_to_gdb_id): Delete.
12441
12442 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12443
12444 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12445 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12446 versions.
12447
12448 2014-01-08 Pedro Alves <palves@redhat.com>
12449
12450 * server.c (handle_status): Don't discard previous queued stop
12451 replies or thread's pending status here.
12452 (main) <disconnection>: Do it here instead.
12453
12454 2014-01-08 Pedro Alves <palves@redhat.com>
12455
12456 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12457 * server.c (visit_actioned_threads, handle_pending_status): New
12458 function.
12459 (handle_v_cont): Factor out parts to ...
12460 (resume): ... this new function. If in all-stop, and a thread
12461 being resumed has a pending status, report it without actually
12462 resuming.
12463 (myresume): Adjust to use the new 'resume' function.
12464 (clear_pending_status_callback, set_pending_status_callback)
12465 (find_status_pending_thread_callback): New functions.
12466 (handle_status): Handle the case of multiple threads having
12467 interesting statuses to report. Report threads' real last signal
12468 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12469 with an interesting thread to report the status for, instead of
12470 always reporting the status of the first thread.
12471
12472 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12473
12474 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12475 * gdbreplay.c (gdbreplay_version): Likewise.
12476
12477 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12478
12479 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12480 iov.iov_len with the real length in use.
12481
12482 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12483
12484 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12485 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12486 for all targets that use win32-low.c.
12487 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12488 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12489
12490 2013-12-13 Pedro Alves <palves@redhat.com>
12491
12492 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12493 if equal to TARGET_WAITKIND_LOADED.
12494 * win32-low.c (cached_status): New static global.
12495 (win32_wait): Add declaration.
12496 (do_initial_child_stuff): Flush all initial pending debug events
12497 up to the initial breakpoint.
12498 (win32_wait): If CACHED_STATUS was set, return that instead
12499 of doing a real wait. Remove the code resuming the execution
12500 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12501 during the initial phase. Also remove the code changing
12502 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12503 TARGET_WAITKIND_STOPPED.
12504
12505 2013-12-11 Yao Qi <yao@codesourcery.com>
12506
12507 * notif.c (handle_notif_ack): Return 0 if no notification
12508 matches.
12509
12510 2013-11-20 Doug Evans <dje@google.com>
12511
12512 * linux-low.c (linux_set_resume_request): Fix comment.
12513
12514 2013-11-20 Doug Evans <dje@google.com>
12515
12516 * linux-low.c (resume_status_pending_p): Tweak comment.
12517
12518 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12519
12520 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12521 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12522 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12523 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12524 (srv_amd64_regobj): Add amd64-mpx.o.
12525 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12526 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12527 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12528 * i387-fp.c (num_pl_bnd_register) Added constant.
12529 (num_pl_bnd_cfg_registers) Added constant.
12530 (struct i387_xsave) Added reserved area and MPX fields.
12531 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12532 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12533 function.
12534 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12535 (init_registers_amd64_mpx_linux): Declare new function.
12536 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12537 (x86_64_regmap): Add MPX registers.
12538 (x86_linux_read_description): Add MPX case.
12539 (initialize_low_arch): Initialize MPX targets.
12540
12541 2013-11-18 Tom Tromey <tromey@redhat.com>
12542
12543 * configure: Rebuild.
12544 * configure.ac: Don't check for stdlib.h.
12545 * gdbreplay.c: Unconditionally include stdlib.h.
12546
12547 2013-11-18 Tom Tromey <tromey@redhat.com>
12548
12549 * config.in: Rebuild.
12550 * configure: Rebuild.
12551 * configure.ac: Don't use AC_HEADER_DIRENT.
12552
12553 2013-11-18 Tom Tromey <tromey@redhat.com>
12554
12555 * server.h: Don't check HAVE_STRING_H.
12556 * gdbreplay.c: Don't check HAVE_STRING_H.
12557 * configure: Rebuild.
12558
12559 2013-11-18 Tom Tromey <tromey@redhat.com>
12560
12561 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12562 LIBGNU.
12563
12564 2013-11-08 Tom Tromey <tromey@redhat.com>
12565
12566 * configure, config.in: Rebuild.
12567 * configure.ac: Remove unused configury.
12568
12569 2013-11-08 Tom Tromey <tromey@redhat.com>
12570
12571 * acinclude.m4: Include common.m4, codeset.m4.
12572 * configure, config.in: Rebuild.
12573 * configure.ac: Use GDB_AC_COMMON.
12574
12575 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12576
12577 * linux-s390-low.c (HWCAP_S390_TE): New define.
12578 (s390_arch_setup): Consider the TE field in the HWCAP for
12579 determining 'have_regset_tdb'.
12580
12581 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12582
12583 PR gdb/16014
12584 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12585 call to sizeof.
12586
12587 2013-10-02 Pedro Alves <palves@redhat.com>
12588
12589 * server.c (process_serial_event): Don't output "GDBserver
12590 exiting" if GDB is connected through stdio.
12591 * target.c (mywait): Likewise, be silent if GDB is connected
12592 through stdio.
12593
12594 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12595
12596 * lynx-low.c (lynx_add_threads_after_attach): New function.
12597 (lynx_attach): Remove call to add_thread. Add call to
12598 lynx_add_threads_after_attach instead.
12599
12600 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12601
12602 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12603 * config.in, configure: Regenerated.
12604
12605 2013-09-18 Yao Qi <yao@codesourcery.com>
12606
12607 PR server/15959
12608 * server.c (start_inferior): Clear 'resume_info'.
12609
12610 2013-09-16 Jiong Wang <jiwang@tilera.com>
12611
12612 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12613 for each register.
12614
12615 2013-09-16 Jiong Wang <jiwang@tilera.com>
12616
12617 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12618 linux-tile-low.o to srv_tgtobj.
12619
12620 2013-09-16 Will Newton <will.newton@linaro.org>
12621
12622 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12623 out regs.
12624
12625 2013-09-06 Pedro Alves <palves@redhat.com>
12626
12627 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12628 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12629 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12630 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12631 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12632 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12633
12634 2013-09-06 Pedro Alves <palves@redhat.com>
12635
12636 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12637 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12638
12639 2013-09-06 Pedro Alves <palves@redhat.com>
12640
12641 * linux-amd64-ipa.c: Include tracepoint.h.
12642 * linux-i386-ipa.c: Include tracepoint.h.
12643
12644 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12645
12646 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12647 (ps_get_thread_area): New function.
12648
12649 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12650
12651 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12652 (initialize_low_arch): Call init_registers_crisv32 rather than
12653 init_register_crisv32.
12654
12655 2013-09-05 Pedro Alves <palves@redhat.com>
12656
12657 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12658 to ...
12659 * hostio.h: ... this new file.
12660 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12661 win32-low.c: Include hostio.h.
12662
12663 2013-09-05 Pedro Alves <palves@redhat.com>
12664
12665 * server.h (gdb_client_data, handler_func, callback_handler_func)
12666 (delete_file_handler, add_file_handler, append_callback_event)
12667 (delete_callback_event, start_event_loop, initialize_event_loop):
12668 Move to event-loop.h and include it.
12669 * event-loop.h: New file.
12670
12671 2013-09-05 Pedro Alves <palves@redhat.com>
12672
12673 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12674 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12675 (loaded_dll, unloaded_dll): Move to ...
12676 * dll.h: ... this new file.
12677 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12678
12679 2013-09-05 Pedro Alves <palves@redhat.com>
12680
12681 * server.h (current_process, get_thread_process, all_processes)
12682 (add_inferior_to_list, for_each_inferior, current_inferior)
12683 (remove_inferior, add_process, remove_process, find_process_pid)
12684 (have_started_inferiors_p, have_attached_inferiors_p)
12685 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12686 (clear_inferiors, find_inferior, find_inferior_id)
12687 (inferior_target_data, set_inferior_target_data)
12688 (inferior_regcache_data, set_inferior_regcache_data): Move to
12689 inferiors.h, and include it.
12690 * inferiors.h: New file.
12691
12692 2013-09-05 Pedro Alves <palves@redhat.com>
12693
12694 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12695 Move ...
12696 * ax.h: ... here.
12697
12698 2013-09-05 Pedro Alves <palves@redhat.com>
12699
12700 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12701 tracepoint.h.
12702 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12703 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12704 (handle_tracepoint_general_set, handle_tracepoint_query)
12705 (tracepoint_finished_step, tracepoint_was_hit)
12706 (release_while_stepping_state_list, current_traceframe)
12707 (in_readonly_region, traceframe_read_mem)
12708 (fetch_traceframe_registers, traceframe_read_sdata)
12709 (traceframe_read_info, struct fast_tpoint_collect_status)
12710 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12711 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12712 (supply_fast_tracepoint_registers)
12713 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12714 (ipa_tdesc, claim_trampoline_space)
12715 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12716 (agent_mem_read, agent_get_trace_state_variable_value)
12717 (agent_set_trace_state_variable_value, agent_tsv_read)
12718 (agent_mem_read_string, get_raw_reg_func_addr)
12719 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12720 * tracepoint.h: ... this new file.
12721
12722 2013-09-05 Pedro Alves <palves@redhat.com>
12723
12724 * server.h (perror_with_name, error, fatal, warning, paddress)
12725 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12726 include it.
12727 * utils.h: New file.
12728
12729 2013-09-05 Pedro Alves <palves@redhat.com>
12730
12731 * server.h (remote_debug, noack_mode, transport_is_reliable)
12732 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12733 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12734 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12735 (write_enn, initialize_async_io, enable_async_io)
12736 (disable_async_io, check_remote_input_interrupt_request)
12737 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12738 (dead_thread_notify, prepare_resume_reply)
12739 (decode_address_to_semicolon, decode_address, decode_m_packet)
12740 (decode_M_packet, decode_X_packet, decode_xfer_write)
12741 (decode_search_memory_packet, unhexify, hexify)
12742 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12743 (look_up_one_symbol, relocate_instruction)
12744 (monitor_output): Move to remote-utils.h, and include it.
12745 * remote-utils.h: New file.
12746
12747 2013-09-05 Pedro Alves <palves@redhat.com>
12748
12749 * server.h (_): Delete.
12750
12751 2013-09-02 Pedro Alves <palves@redhat.com>
12752
12753 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12754 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12755 allocated.
12756 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12757
12758 2013-09-02 Pierre Muller <muller@sourceware.org>
12759
12760 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12761 or WriteProcessMemory complete successfully and handle
12762 ERROR_PARTIAL_COPY error.
12763
12764 2013-09-02 Pedro Alves <palves@redhat.com>
12765
12766 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12767 error instead of EIO.
12768
12769 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12770
12771 PR server/15604
12772 * linux-low.c: Include filestuff.h.
12773 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12774 * lynx-low.c: Include filestuff.h.
12775 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12776 * server.c: Include filestuff.h.
12777 (main): Call notice_open_fds.
12778 * spu-low.c: Include filestuff.h.
12779 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12780
12781 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12782
12783 * Makefile.in: Explain why ../target and ../nat are not
12784 listed as include file search paths.
12785 (linux-waitpid.o): New object file rule.
12786 * configure.srv (srv_native_linux_obj): New variable.
12787 Replace all occurrences of linux native object files with
12788 $srv_native_linux_obj.
12789 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12790 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12791 (linux_enable_event_reporting): Remove declaration.
12792 (my_waitpid): Moved to common/linux-waitpid.c.
12793 (linux_wait_for_event): Pass ptid when calling
12794 linux_enable_event_reporting.
12795 (linux_supports_tracefork_flag): Remove.
12796 (linux_enable_event_reporting): Likewise.
12797 (linux_tracefork_grandchild): Remove.
12798 (STACK_SIZE): Moved to common/linux-ptrace.c.
12799 (linux_tracefork_child): Remove.
12800 (linux_test_for_tracefork): Remove.
12801 (linux_look_up_symbols): Call linux_supports_traceclone.
12802 (initialize_low): Remove call to linux_test_for_tracefork.
12803 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12804 common/linux-ptrace.h.
12805 (PTRACE_TYPE_ARG4): Likewise.
12806 Include linux-ptrace.h.
12807
12808 2013-08-21 Pedro Alves <palves@redhat.com>
12809
12810 * config.in: Renegerate.
12811
12812 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
12813
12814 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12815 (SFILES): Remove $(srcdir)/common/target-common.c and
12816 add $(srcdir)/target/waitstatus.c.
12817 (OBS): Remove target-common.o and add waitstatus.o.
12818 (server_h): Remove $(srcdir)/../common/target-common.h and
12819 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12820 and $(srcdir)/../target/waitstatus.h.
12821 (target-common.o): Remove.
12822 (waitstatus.o): New target object file.
12823 * target.h: Do not include target-common.h and
12824 include target/resume.h, target/wait.h and
12825 target/waitstatus.h.
12826
12827 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
12828
12829 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12830 to PTRACE_TYPE_ARG3.
12831 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12832 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12833 PTRACE_TYPE_ARG4.
12834 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12835 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12836
12837 2013-07-27 Jie Zhang <jie@codesourcery.com>
12838 Daniel Jacobowitz <dan@codesourcery.com>
12839 Yao Qi <yao@codesourcery.com>
12840
12841 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12842 (mips-linux-watch.o): New rule.
12843 (mips_linux_watch_h): New variable.
12844 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12845 srv_tgtobj.
12846 * linux-mips-low.c: Include mips-linux-watch.h.
12847 (struct arch_process_info, struct arch_lwp_info): New.
12848 (update_watch_registers_callback): New function.
12849 (mips_linux_new_process, mips_linux_new_thread) New functions.
12850 (mips_linux_prepare_to_resume, mips_insert_point): New
12851 functions.
12852 (mips_remove_point, mips_stopped_by_watchpoint): New
12853 functions.
12854 (rsp_bp_type_to_target_hw_bp_type): New function.
12855 (mips_stopped_data_address): New function.
12856 (the_low_target): Add watchpoint support functions.
12857
12858 2013-07-27 Yao Qi <yao@codesourcery.com>
12859
12860 * i386-low.c: Include break-common.h.
12861 (enum target_hw_bp_type): Remove.
12862
12863 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
12864
12865 * Makefile.in (SFILES): /common/target-common.c.
12866 (OBS): Add target-common.o.
12867 (server_h): Add $(srcdir)/../common/target-common.h.
12868 (target-common.o): New target.
12869 * server.c (queue_stop_reply_callback): Free
12870 status string after use.
12871 * target.c (target_waitstatus_to_string): Remove.
12872 * target.h: Include target-common.h.
12873 (resume_kind): Likewise.
12874 (target_waitkind): Likewise.
12875 (target_waitstatus): Likewise.
12876 (TARGET_WNOHANG): Likewise.
12877
12878 2013-07-04 Yao Qi <yao@codesourcery.com>
12879
12880 * Makefile.in (host_alias): Use @host_noncanonical@.
12881 (target_alias): Use @target_noncanonical@.
12882 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12883 ACX_NONCANONICAL_HOST.
12884 * configure: Regenerated.
12885
12886 Revert:
12887 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12888
12889 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12890 * configure: Rebuild.
12891 * Makefile.in (version_host, version_target): Get from configure.
12892 (version.c): Use $(version_host) and $(version_target).
12893
12894 2013-07-03 Pedro Alves <palves@redhat.com>
12895
12896 * Makefile.in (config.status): Depend on development.sh.
12897 * acinclude.m4: Include libmcheck.m4.
12898 * configure: Regenerate.
12899
12900 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12901
12902 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12903 attribute inside the parentheses.
12904 (winapi_DebugSetProcessKillOnExit): Ditto.
12905 (winapi_DebugBreakProcess): Ditto.
12906 (winapi_GenerateConsoleCtrlEvent): Ditto.
12907
12908 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12909
12910 * notif.h (notif_event): Add a dummy member to avoid compiler
12911 errors.
12912
12913 2013-07-01 Pedro Alves <palves@redhat.com>
12914
12915 * hostio.c (HOSTIO_PATH_MAX): Define.
12916 (require_filename, handle_open, handle_unlink, handle_readlink):
12917 Use it.
12918
12919 2013-07-01 Pedro Alves <palves@redhat.com>
12920
12921 * server.h: Include "pathmax.h".
12922 * linux-low.c: Don't include sys/param.h.
12923 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12924 MAXPATHLEN.
12925 * win32-low.c: Don't include sys/param.h.
12926 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12927
12928 2013-07-01 Pedro Alves <palves@redhat.com>
12929
12930 * event-loop.c: Don't check HAVE_UNISTD_H before including
12931 <unistd.h>.
12932 * gdbreplay.c: Likewise.
12933 * remote-utils.c: Likewise.
12934 * server.c: Likewise.
12935 * configure.ac: Don't check for unistd.h.
12936 * configure: Regenerate.
12937
12938 2013-06-28 Tom Tromey <tromey@redhat.com>
12939
12940 * Makefile.in (version.c): Use version.in, not
12941 common/version.in.
12942
12943 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12944
12945 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12946 * configure: Rebuild.
12947 * Makefile.in (version_host, version_target): Get from configure.
12948 (version.c): Use $(version_host) and $(version_target).
12949
12950 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12951
12952 Fix trace-status to output user name without trailing colon.
12953 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12954
12955 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12956
12957 Fix trace-status to output proper start-time and stop-time.
12958 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12959 output start time and stop time in hex as gdb expects.
12960
12961 2013-06-26 Pedro Alves <pedro@codesourcery.com>
12962
12963 * tracepoint.c (build_traceframe_info_xml): Output trace state
12964 variables present in the trace buffer.
12965
12966 2013-06-24 Tom Tromey <tromey@redhat.com>
12967
12968 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12969 create-version.sh.
12970 (version.o): Remove.
12971 * gdbreplay.c: Include version.h.
12972 (version, host_name): Don't declare.
12973 * server.h: Include version.h.
12974 (version, host_name): Don't declare.
12975
12976 2013-06-12 Pedro Alves <palves@redhat.com>
12977
12978 * linux-x86-low.c (linux_is_elf64): Delete global.
12979 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12980 with local linux_pid_exe_is_elf_64_file use.
12981
12982 2013-06-11 Pedro Alves <palves@redhat.com>
12983
12984 * linux-low.c (regset_disabled, disable_regset): New functions.
12985 (regsets_fetch_inferior_registers)
12986 (regsets_store_inferior_registers): Use them.
12987 (initialize_regsets_info); Don't allocate the disabled_regsets
12988 array here.
12989 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12990 comment.
12991
12992 2013-06-11 Pedro Alves <palves@redhat.com>
12993
12994 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12995 xmalloc.
12996
12997 2013-06-11 Pedro Alves <palves@redhat.com>
12998
12999 * linux-x86-low.c (initialize_low_arch): Call
13000 init_registers_x32_avx_linux.
13001
13002 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13003
13004 Fix compatibility with Android Bionic.
13005 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13006 it is not empty.
13007
13008 2013-06-07 Pedro Alves <palves@redhat.com>
13009
13010 PR server/14823
13011 * Makefile.in (OBS): Add tdesc.o.
13012 (IPA_OBJS): Add tdesc-ipa.o.
13013 (tdesc-ipa.o): New rule.
13014 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13015 interface.
13016 * linux-low.c (new_inferior): Delete.
13017 (disabled_regsets, num_regsets): Delete.
13018 (linux_add_process): Adjust to set the new per-process
13019 new_inferior flag.
13020 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13021 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13022 was a stop. When calling arch_setup, switch the current inferior
13023 to the thread that got an event.
13024 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13025 (regsets_fetch_inferior_registers)
13026 (regsets_store_inferior_registers): New regsets_info parameter.
13027 Adjust to use it.
13028 (linux_register_in_regsets): New regs_info parameter. Adjust to
13029 use it.
13030 (register_addr, fetch_register, store_register): New usrregs_info
13031 parameter. Adjust to use it.
13032 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13033 parameter regs_info. Adjust to use it.
13034 (linux_fetch_registers): Get the current inferior's regs_info, and
13035 adjust to use it.
13036 (linux_store_registers): Ditto.
13037 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13038 (initialize_low): Don't initialize the target_regsets here. Call
13039 initialize_low_arch.
13040 * linux-low.h (target_regsets): Delete declaration.
13041 (struct regsets_info): New.
13042 (struct usrregs_info): New.
13043 (struct regs_info): New.
13044 (struct process_info_private) <new_inferior>: New field.
13045 (struct linux_target_ops): Delete the num_regs, regmap, and
13046 regset_bitmap fields. New field regs_info.
13047 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13048 * i387-fp.c (num_xmm_registers): Delete.
13049 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13050 calls to new interface.
13051 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13052 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13053 Infer the number of xmm registers from the regcache's target
13054 description.
13055 * i387-fp.h (num_xmm_registers): Delete.
13056 * inferiors.c (add_thread): Don't install the thread's regcache
13057 here.
13058 * proc-service.c (gregset_info): Fetch the current inferior's
13059 regs_info. Adjust to use it.
13060 * regcache.c: Include tdesc.h.
13061 (register_bytes, reg_defs, num_registers)
13062 (gdbserver_expedite_regs): Delete.
13063 (get_thread_regcache): If the thread doesn't have a regcache yet,
13064 create one, instead of aborting gdbserver.
13065 (regcache_invalidate_one): Rename to ...
13066 (regcache_invalidate_thread): ... this.
13067 (regcache_invalidate_one): New.
13068 (regcache_invalidate): Only invalidate registers of the current
13069 process.
13070 (init_register_cache): Add target_desc parameter, and use it.
13071 (new_register_cache): Ditto. Assert the target description has a
13072 non zero registers_size.
13073 (regcache_cpy): Add assertions. Adjust.
13074 (realloc_register_cache, set_register_cache): Delete.
13075 (registers_to_string, registers_from_string): Adjust.
13076 (find_register_by_name, find_regno, find_register_by_number)
13077 (register_cache_size): Add target_desc parameter, and use it.
13078 (free_register_cache_thread, free_register_cache_thread_one)
13079 (regcache_release, register_cache_size): New.
13080 (register_size): Add target_desc parameter, and use it.
13081 (register_data, supply_register, supply_register_zeroed)
13082 (supply_regblock, supply_register_by_name, collect_register)
13083 (collect_register_as_string, collect_register_by_name): Adjust.
13084 * regcache.h (struct target_desc): Forward declare.
13085 (struct regcache) <tdesc>: New field.
13086 (init_register_cache, new_register_cache): Add target_desc
13087 parameter.
13088 (regcache_invalidate_thread): Declare.
13089 (regcache_invalidate_one): Delete declaration.
13090 (regcache_release): Declare.
13091 (find_register_by_number, register_cache_size, register_size)
13092 (find_regno): Add target_desc parameter.
13093 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13094 declarations.
13095 * remote-utils.c: Include tdesc.h.
13096 (outreg, prepare_resume_reply): Adjust.
13097 * server.c: Include tdesc.h.
13098 (gdbserver_xmltarget): Delete declaration.
13099 (get_features_xml, process_serial_event): Adjust.
13100 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13101 declare.
13102 (struct process_info) <tdesc>: New field.
13103 (ipa_tdesc): Declare.
13104 * tdesc.c: New file.
13105 * tdesc.h: New file.
13106 * tracepoint.c: Include tdesc.h.
13107 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13108 (get_context_regcache): Adjust to pass ipa_tdesc down.
13109 (do_action_at_tracepoint): Adjust to get the register cache size
13110 from the context regcache's description.
13111 (traceframe_walk_blocks): Adjust to get the register cache size
13112 from the current trace frame's description.
13113 (traceframe_get_pc): Adjust to get current trace frame's
13114 description and pass it down.
13115 (gdb_collect): Adjust to get the register cache size from the
13116 IPA's description.
13117 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13118 (gdbserver_xmltarget): Delete.
13119 (initialize_low_tracepoint): Set the ipa's target description.
13120 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13121 (initialize_low_tracepoint): Set the ipa's target description.
13122 * linux-x86-low.c: Include tdesc.h.
13123 [__x86_64__] (is_64bit_tdesc): New.
13124 (ps_get_thread_area, x86_get_thread_area): Use it.
13125 (i386_cannot_store_register): Rename to ...
13126 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13127 (i386_cannot_fetch_register): Rename to ...
13128 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13129 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13130 to new interface.
13131 (target_regsets): Rename to ...
13132 (x86_regsets): ... this.
13133 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13134 interface.
13135 (x86_siginfo_fixup): Use is_64bit_tdesc.
13136 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13137 (tdesc_x32_avx_linux, tdesc_x32_linux)
13138 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13139 Declare.
13140 (x86_linux_update_xmltarget): Delete.
13141 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13142 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13143 (AMD64_LINUX_USER64_CS): New.
13144 (x86_linux_read_description): New, based on
13145 x86_linux_update_xmltarget.
13146 (same_process_callback): New.
13147 (x86_arch_setup_process_callback): New.
13148 (x86_linux_update_xmltarget): New.
13149 (x86_regsets_info): New.
13150 (amd64_linux_regs_info): New.
13151 (i386_linux_usrregs_info): New.
13152 (i386_linux_regs_info): New.
13153 (x86_linux_regs_info): New.
13154 (x86_arch_setup): Reimplement.
13155 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13156 (x86_emit_ops): Ditto.
13157 (the_low_target): Adjust. Install x86_linux_regs_info,
13158 x86_cannot_fetch_register, and x86_cannot_store_register.
13159 (initialize_low_arch): New.
13160 * linux-ia64-low.c (tdesc_ia64): Declare.
13161 (ia64_fetch_register): Adjust.
13162 (ia64_usrregs_info, regs_info): New globals.
13163 (ia64_regs_info): New function.
13164 (the_low_target): Adjust.
13165 (initialize_low_arch): New function.
13166 * linux-sparc-low.c (tdesc_sparc64): Declare.
13167 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13168 Adjust.
13169 (sparc_arch_setup): New function.
13170 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13171 (the_low_target): Adjust.
13172 (initialize_low_arch): New function.
13173 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13174 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13175 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13176 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13177 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13178 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13179 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13180 (tdesc_powerpc_isa205_vsx64l): Declare.
13181 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13182 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13183 (ppc_set_pc, ppc_get_hwcap): Adjust.
13184 (ppc_usrregs_info): Forward declare.
13185 (!__powerpc64__) ppc_regmap_adjusted: New global.
13186 (ppc_arch_setup): Adjust to the current process'es target
13187 description.
13188 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13189 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13190 (ppc_store_evrregset): Adjust.
13191 (target_regsets): Rename to ...
13192 (ppc_regsets): ... this, and make static.
13193 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13194 (ppc_regs_info): New function.
13195 (the_low_target): Adjust.
13196 (initialize_low_arch): New function.
13197 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13198 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13199 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13200 (tdesc_s390x_linux64v2): Declare.
13201 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13202 (s390_fill_gregset, s390_store_last_break): Adjust.
13203 (target_regsets): Rename to ...
13204 (s390_regsets): ... this, and make static.
13205 (s390_get_pc, s390_set_pc): Adjust.
13206 (s390_get_hwcap): New target_desc parameter, and use it.
13207 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13208 (s390_arch_setup): Adjust to set the current process'es target
13209 description. Don't adjust the regmap.
13210 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13211 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13212 (regs_info_3264): New globals.
13213 (s390_regs_info): New function.
13214 (the_low_target): Adjust.
13215 (initialize_low_arch): New function.
13216 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13217 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13218 [__mips64] (init_registers_mips_linux)
13219 (init_registers_mips_dsp_linux): Delete defines.
13220 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13221 (have_dsp): New global.
13222 (mips_read_description): New, based on mips_arch_setup.
13223 (mips_arch_setup): Reimplement.
13224 (get_usrregs_info): New function.
13225 (mips_cannot_fetch_register, mips_cannot_store_register)
13226 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13227 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13228 (target_regsets): Rename to ...
13229 (mips_regsets): ... this, and make static.
13230 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13231 (dsp_regs_info, regs_info): New globals.
13232 (mips_regs_info): New function.
13233 (the_low_target): Adjust.
13234 (initialize_low_arch): New function.
13235 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13236 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13237 Declare.
13238 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13239 (arm_read_description): New, with bits factored from
13240 arm_arch_setup.
13241 (arm_arch_setup): Reimplement.
13242 (target_regsets): Rename to ...
13243 (arm_regsets): ... this, and make static.
13244 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13245 (arm_regs_info): New function.
13246 (the_low_target): Adjust.
13247 (initialize_low_arch): New function.
13248 * linux-m68k-low.c (tdesc_m68k): Declare.
13249 (target_regsets): Rename to ...
13250 (m68k_regsets): ... this, and make static.
13251 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13252 (m68k_regs_info): New function.
13253 (m68k_arch_setup): New function.
13254 (the_low_target): Adjust.
13255 (initialize_low_arch): New function.
13256 * linux-sh-low.c (tdesc_sharch): Declare.
13257 (target_regsets): Rename to ...
13258 (sh_regsets): ... this, and make static.
13259 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13260 (sh_regs_info, sh_arch_setup): New functions.
13261 (the_low_target): Adjust.
13262 (initialize_low_arch): New function.
13263 * linux-bfin-low.c (tdesc_bfin): Declare.
13264 (bfin_arch_setup): New function.
13265 (bfin_usrregs_info, regs_info): New globals.
13266 (bfin_regs_info): New function.
13267 (the_low_target): Adjust.
13268 (initialize_low_arch): New function.
13269 * linux-cris-low.c (tdesc_cris): Declare.
13270 (cris_arch_setup): New function.
13271 (cris_usrregs_info, regs_info): New globals.
13272 (cris_regs_info): New function.
13273 (the_low_target): Adjust.
13274 (initialize_low_arch): New function.
13275 * linux-cris-low.c (tdesc_crisv32): Declare.
13276 (cris_arch_setup): New function.
13277 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13278 (cris_regs_info): New function.
13279 (the_low_target): Adjust.
13280 (initialize_low_arch): New function.
13281 * linux-m32r-low.c (tdesc_m32r): Declare.
13282 (m32r_arch_setup): New function.
13283 (m32r_usrregs_info, regs_info): New globals.
13284 (m32r_regs_info): Adjust.
13285 (initialize_low_arch): New function.
13286 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13287 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13288 (tic6x_usrregs_info): Forward declare.
13289 (tic6x_read_description): New function, based on ...
13290 (tic6x_arch_setup): ... this. Reimplement.
13291 (target_regsets): Rename to ...
13292 (tic6x_regsets): ... this, and make static.
13293 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13294 (tic6x_regs_info): New function.
13295 (the_low_target): Adjust.
13296 (initialize_low_arch): New function.
13297 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13298 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13299 (target_regsets): Rename to ...
13300 (xtensa_regsets): ... this, and make static.
13301 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13302 globals.
13303 (xtensa_arch_setup, xtensa_regs_info): New functions.
13304 (the_low_target): Adjust.
13305 (initialize_low_arch): New function.
13306 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13307 (nios2_arch_setup): Set the current process'es tdesc.
13308 (target_regsets): Rename to ...
13309 (nios2_regsets): ... this.
13310 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13311 (nios2_regs_info): New function.
13312 (the_low_target): Adjust.
13313 (initialize_low_arch): New function.
13314 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13315 (aarch64_arch_setup): Set the current process'es tdesc.
13316 (target_regsets): Rename to ...
13317 (aarch64_regsets): ... this.
13318 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13319 (aarch64_regs_info): New function.
13320 (the_low_target): Adjust.
13321 (initialize_low_arch): New function.
13322 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13323 globals.
13324 (target_regsets): Rename to ...
13325 (tile_regsets): ... this.
13326 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13327 (tile_regs_info): New function.
13328 (tile_arch_setup): Set the current process'es tdesc.
13329 (the_low_target): Adjust.
13330 (initialize_low_arch): New function.
13331 * spu-low.c (tdesc_spu): Declare.
13332 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13333 * win32-arm-low.c (tdesc_arm): Declare.
13334 (arm_arch_setup): New function.
13335 (the_low_target): Install arm_arch_setup instead of
13336 init_registers_arm.
13337 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13338 (init_windows_x86): Rename to ...
13339 (i386_arch_setup): ... this. Set `win32_tdesc'.
13340 (the_low_target): Adjust.
13341 * win32-low.c (win32_tdesc): New global.
13342 (child_add_thread): Don't create the thread cache here.
13343 (do_initial_child_stuff): Set the new process'es tdesc.
13344 * win32-low.h (struct target_desc): Forward declare.
13345 (win32_tdesc): Declare.
13346 * lynx-i386-low.c (tdesc_i386): Declare global.
13347 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13348 * lynx-low.c (lynx_tdesc): New global.
13349 (lynx_add_process): Set the new process'es tdesc.
13350 * lynx-low.h (struct target_desc): Forward declare.
13351 (lynx_tdesc): Declare global.
13352 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13353 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13354 * nto-low.c (nto_tdesc): New global.
13355 (do_attach): Set the new process'es tdesc.
13356 * nto-low.h (struct target_desc): Forward declare.
13357 (nto_tdesc): Declare.
13358 * nto-x86-low.c (tdesc_i386): Declare.
13359 (nto_x86_arch_setup): Set `nto_tdesc'.
13360
13361 2013-06-04 Gary Benson <gbenson@redhat.com>
13362
13363 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13364 to qSupported response when appropriate.
13365 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13366 with nonzero-length annex.
13367 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13368 arguments supplied in annex.
13369
13370 2013-05-31 Doug Evans <dje@google.com>
13371
13372 PR server/15594
13373 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13374 64 bits in 64-cross-32 environment.
13375
13376 2013-05-28 Pedro Alves <palves@redhat.com>
13377
13378 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13379 (aarch64-without-fpu.c): Delete rule.
13380 * configure.srv (aarch64*-*-linux*): Remove references to
13381 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13382 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13383 declaration.
13384
13385 2013-05-24 Pedro Alves <palves@redhat.com>
13386
13387 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13388 instead of strchr/decode_address. Error if the range isn't split
13389 with a ','. Don't assume there's be a ':' in the action.
13390
13391 2013-05-23 Yao Qi <yao@codesourcery.com>
13392 Pedro Alves <palves@redhat.com>
13393
13394 * linux-low.c (lwp_in_step_range): New function.
13395 (linux_wait_1): If the thread was range stepping and stopped
13396 outside the stepping range, report the stop to GDB. Otherwise,
13397 continue stepping. Add range stepping debug output.
13398 (linux_set_resume_request): Copy the step range from the resume
13399 request to the lwp.
13400 (linux_supports_range_stepping): New.
13401 (linux_target_ops) <supports_range_stepping>: Set to
13402 linux_supports_range_stepping.
13403 * linux-low.h (struct linux_target_ops)
13404 <supports_range_stepping>: New field.
13405 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13406 * linux-x86-low.c (x86_supports_range_stepping): New.
13407 (the_low_target) <supports_range_stepping>: Set to
13408 x86_supports_range_stepping.
13409 * server.c (handle_v_cont): Handle 'r' action.
13410 (handle_v_requests): Append ";r" if the target supports range
13411 stepping.
13412 * target.h (struct thread_resume) <step_range_start,
13413 step_range_end>: New fields.
13414 (struct target_ops) <supports_range_stepping>:
13415 New field.
13416 (target_supports_range_stepping): New macro.
13417
13418 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13419
13420 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13421 confusion in comment.
13422
13423 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13424
13425 * lynx-low.c (struct process_info_private): New type.
13426 (lynx_add_process): New function.
13427 (lynx_create_inferior, lynx_attach): Replace calls to
13428 add_process by calls to lynx_add_process.
13429 (lynx_resume): If PTID is null, then try using
13430 current_process()->private->last_wait_event_ptid.
13431 Add comments.
13432 (lynx_clear_inferiors): Delete. The contents of that function
13433 has been inlined in lynx_mourn;
13434 (lynx_wait_1): Save the ptid in the process's private data.
13435 (lynx_mourn): Free the process' private data. Replace call
13436 to lynx_clear_inferiors by call to clear_inferiors.
13437
13438 2013-05-17 Yao Qi <yao@codesourcery.com>
13439
13440 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13441 the right place.
13442
13443 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13444
13445 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13446 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13447 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13448 PT_TEXT_END_ADDR guards. Update comments.
13449 (linux_target_op) <read_offsets>: Conditionally define to
13450 linux_read_offsets if the target is UCLIBC and if it defines
13451 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13452
13453 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13454 Andrew Jenner <andrew@codesourcery.com>
13455
13456 * Makefile.in (SFILES): Add linux-nios2-low.c.
13457 (clean): Add action to delete nios2-linux.c.
13458 (nios2-linux.c): New rule.
13459 * configure.srv: Add nios2*-*-linux*.
13460 * linux-nios2-low.c: New.
13461
13462 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13463
13464 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13465
13466 2013-04-25 Hui Zhu <hui@codesourcery.com>
13467
13468 PR gdb/15186
13469 * ax.c (ax_printf): Add fflush.
13470
13471 2013-04-22 Tom Tromey <tromey@redhat.com>
13472
13473 * Makefile.in (SFILES): Add filestuff.c.
13474 (OBS): Add filestuff.o.
13475 (filestuff.o): New target.
13476 * config.in, configure: Rebuild.
13477 * configure.ac: Check for fdwalk, pipe2.
13478
13479 2013-04-17 Pedro Alves <palves@redhat.com>
13480
13481 * configure.ac (USE_THREAD_DB): Delete variable.
13482 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13483 Don't AC_SUBST USE_THREAD_DB.
13484 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13485 * config.in, configure: Regenerate.
13486
13487 2013-04-16 Pedro Alves <palves@redhat.com>
13488
13489 * linux-low.h (struct lwp_info) <thread_known>: Move under
13490 the USE_THREAD_DB #ifdef.
13491
13492 2013-04-16 Pedro Alves <palves@redhat.com>
13493
13494 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13495 (linux-low.o): Delete rule.
13496 * linux-low.h: Always include "gdb_thread_db.h" instead of
13497 conditionally including thread_db.h.
13498 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13499 HAVE_THREAD_DB_H.
13500
13501 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13502
13503 * Makefile.in (install-only): Fix make install regression.
13504
13505 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13506
13507 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13508 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13509 installation.
13510 * gdbserver.1: Remove.
13511
13512 2013-03-22 Pedro Alves <palves@redhat.com>
13513
13514 * linux-low.c (handle_extended_wait): Don't call
13515 linux_enable_event_reporting.
13516
13517 2013-03-15 Tony Theodore <tonyt@logyst.com>
13518
13519 PR build/9098:
13520 * Makefile.in (SHELL): Use @SHELL@.
13521
13522 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13523
13524 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13525 compiler warning.
13526
13527 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13528
13529 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13530 Remove extraneous NULL element.
13531
13532 2013-03-13 Yao Qi <yao@codesourcery.com>
13533
13534 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13535 'V' block in trace frame.
13536
13537 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13538
13539 * target.h (struct target_ops): Add btrace ops.
13540 (target_supports_btrace): New macro.
13541 (target_enable_btrace): New macro.
13542 (target_disable_btrace): New macro.
13543 (target_read_btrace): New macro.
13544 * gdbthread.h (struct thread_info): Add btrace field.
13545 * server.c: Include btrace-common.h.
13546 (handle_btrace_general_set): New function.
13547 (handle_btrace_enable): New function.
13548 (handle_btrace_disable): New function.
13549 (handle_general_set): Call handle_btrace_general_set.
13550 (handle_qxfer_btrace): New function.
13551 (struct qxfer qxfer_packets[]): Add btrace entry.
13552 * inferiors.c (remove_thread): Disable btrace.
13553 * linux-low: Include linux-btrace.h.
13554 (linux_low_enable_btrace): New function.
13555 (linux_low_read_btrace): New function.
13556 (linux_target_ops): Add btrace ops.
13557 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13558 Add srv_linux_btrace=yes.
13559 (x86_64-*-linux*): Add linux-btrace.o.
13560 Add srv_linux_btrace=yes.
13561 * configure.ac: Define HAVE_LINUX_BTRACE.
13562 * config.in: Regenerated.
13563 * configure: Regenerated.
13564
13565 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13566
13567 * server.c (handle_qxfer): Preserve error message if -3 is
13568 returned.
13569 (qxfer): Document the -3 return value.
13570
13571 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13572
13573 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13574 (linux_btrace_h): New variable.
13575 (linux-btrace.o): New rule.
13576
13577 2013-03-08 Stan Shebs <stan@codesourcery.com>
13578 Hafiz Abid Qadeer <abidh@codesourcery.com>
13579
13580 * tracepoint.c (trace_buffer_size): New global.
13581 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13582 (init_trace_buffer): Change to one-argument function. Allocate
13583 trace buffer memory.
13584 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13585 handle QTBuffer:size packet.
13586 (cmd_bigqtbuffer_size): New function.
13587 (initialize_tracepoint): Call init_trace_buffer with
13588 DEFAULT_TRACE_BUFFER_SIZE.
13589 * server.c (handle_query): Add QTBuffer:size in the
13590 supported packets.
13591
13592 2013-03-07 Yao Qi <yao@codesourcery.com>
13593
13594 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13595 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13596 of -1.
13597 (cmd_qtsp): Adjust condition. Do post increment.
13598 Set cur_action and cur_step_action back to 0.
13599
13600 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13601
13602 PR server/15236
13603 * linux-low.c (linux_write_memory): Return early success if LEN is
13604 zero.
13605
13606 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13607
13608 * configure.srv: Add x86_64-*-cygwin* as target.
13609
13610 2013-02-28 Tom Tromey <tromey@redhat.com>
13611
13612 * configure.ac: Invoke AC_SYS_LARGEFILE.
13613 * configure, config.in: Rebuild.
13614
13615 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13616
13617 * win32-low.c: Throughout, fix format strings and casts of
13618 printf-like functions to avoid type related warnings on all
13619 platforms.
13620 (get_child_debug_event): Print dwDebugEventCode as hex since
13621 that's how it's usually documented.
13622
13623 2013-02-28 Yao Qi <yao@codesourcery.com>
13624
13625 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13626 pulongest.
13627
13628 2013-02-27 Jiong Wang <jiwang@tilera.com>
13629
13630 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13631 (reg-tilegx32.c): New rule.
13632 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13633 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13634 different register info initializer according to elf class.
13635 (init_registers_tilgx32): New function. The tilegx32 register info
13636 initializer.
13637 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13638 (tile_store_gregset): Likewise.
13639
13640 2013-02-27 Yao Qi <yao@codesourcery.com>
13641
13642 * server.c (process_point_options): Print debug message when
13643 debug_threads is true.
13644
13645 2013-02-26 Yao Qi <yao@codesourcery.com>
13646
13647 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13648
13649 2013-02-19 Pedro Alves <palves@redhat.com>
13650 Kai Tietz <ktietz@redhat.com>
13651
13652 PR gdb/15161
13653
13654 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13655 instead of strtoul to extract address from packet.
13656 (process_serial_event) <'z'>: Likewise.
13657
13658 2013-02-18 Yao Qi <yao@codesourcery.com>
13659
13660 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13661
13662 2013-02-14 Pedro Alves <palves@redhat.com>
13663
13664 Plug memory leak.
13665
13666 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13667 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13668
13669 2013-02-14 Pedro Alves <palves@redhat.com>
13670
13671 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13672
13673 2013-02-14 Pedro Alves <palves@redhat.com>
13674
13675 * tracepoint.c (save_string): Delete.
13676 (add_tracepoint_action): Use savestring instead of save_string.
13677
13678 2013-02-12 Pedro Alves <palves@redhat.com>
13679
13680 * linux-xtensa-low.c: Ditto.
13681 * xtensa-xtregs.c: Ditto.
13682
13683 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13684
13685 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13686 thread_db.
13687
13688 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13689
13690 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13691 aarch64_num_wp_regs and aarch64_num_bp_regs to
13692 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13693
13694 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13695
13696 * linux-aarch64-low.c (ps_get_thread_area): Replace
13697 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13698
13699 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13700 Marcus Shawcroft <marcus.shawcroft@arm.com>
13701 Nigel Stephens <nigel.stephens@arm.com>
13702 Yufeng Zhang <yufeng.zhang@arm.com>
13703
13704 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13705 (aarch64.c, aarch64-without-fpu.c): New targets.
13706 * configure.srv (aarch64*-*-linux*): New.
13707 * linux-aarch64-low.c: New file.
13708
13709 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13710
13711 * linux-low.c (handle_extended_wait, linux_create_inferior)
13712 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13713 (dequeue_one_deferred_signal, linux_resume_one_thread)
13714 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13715 (linux_tracefork_grandchild, linux_test_for_tracefork)
13716 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13717 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13718 where the argument is 0.
13719
13720 2013-01-25 Yao Qi <yao@codesourcery.com>
13721
13722 * event-loop.c: Include "queue.h".
13723 (gdb_event_p): New typedef.
13724 (struct gdb_event) <next_event>: Remove.
13725 (event_queue): Change to QUEUE(gdb_event_p).
13726 (async_queue_event): Remove.
13727 (gdb_event_xfree): New.
13728 (initialize_event_loop): New.
13729 (process_event): Use API from QUEUE.
13730 (wait_for_event): Likewise.
13731 * server.c (main): Call initialize_event_loop.
13732 * server.h (initialize_event_loop): Declare.
13733
13734 2013-01-18 Yao Qi <yao@codesourcery.com>
13735
13736 * ax.h (struct eval_agent_expr_context): New.
13737 (gdb_eval_agent_expr): Update declaration.
13738 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13739 TFRAME. Add new argument CTX.
13740 * server.h (struct eval_agent_expr_context): Declare.
13741 (agent_mem_read, agent_tsv_read): Update declaration.
13742 (agent_mem_read_string): Likewise.
13743 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13744 (add_traceframe_block): Add new argument TPOINT.
13745 Increase TPOINT->traceframe_usage.
13746 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13747 eval_tracepoint_agent_expr.
13748 (condition_true_at_tracepoint): Likewise.
13749 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13750 (agent_mem_read_string, agent_tsv_read): Likewise.
13751
13752 2013-01-16 Yao Qi <yao@codesourcery.com>
13753
13754 * linux-low.c (linux_resume_one_lwp): Don't check
13755 'lwp->bp_reinsert != 0'.
13756
13757 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13758 Pedro Alves <palves@redhat.com>
13759
13760 * lynx-low.c (ptrace_request_to_str): Define a temporary
13761 macro and use it to simplify this function's implementation.
13762
13763 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13764
13765 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13766 sets errno.
13767
13768 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13769
13770 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13771
13772 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13773
13774 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13775
13776 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13777
13778 * lynx-low.c (lynx_resume): Use the resume_info parameter
13779 to determine the ptid for the lynx_ptrace call, unless
13780 it is equal to minus_one_ptid, in which case we use the
13781 ptid of the current_inferior.
13782 (lynx_wait_1): After having received a thread create/exit
13783 event, resume the inferior's execution using the signaling
13784 thread's ptid, rather than the old ptid.
13785
13786 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13787
13788 * lynx-low.c (lynx_resume): Delete variable ret.
13789
13790 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13791
13792 * gdbreplay.c (gdbreplay_version): Update copyright year.
13793 * server.c (gdbserver_version): Likewise.
13794
13795 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13796
13797 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13798 new thread.
13799
13800 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13801
13802 * lynx-low.c (ptrace_request_to_str): Add handling for
13803 PTRACE_GETTRACESIG.
13804
13805 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13806
13807 * lynx-low.c (lynx_attach): Delete variable new_process.
13808
13809 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13810
13811 * lynx-low.c (lynx_create_inferior): Delete variable
13812 new_process.
13813
13814 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13815
13816 * lynx-low.c (ptrace_request_to_str): Do not handle
13817 PTRACE_GETTHREADLIST if this macro does not exist.
13818
13819 2012-12-15 Yao Qi <yao@codesourcery.com>
13820
13821 * Makefile.in (OBS): Add notif.o.
13822 * notif.c, notif.h: New.
13823 * server.c: Include "notif.h".
13824 (struct vstop_notif) <next>: Remove.
13825 <base>: New field.
13826 (queue_stop_reply): Update.
13827 (push_event, send_next_stop_reply): Remove.
13828 (discard_queued_stop_replies): Update.
13829 (notif_stop): New variable.
13830 (handle_v_stopped): Remove.
13831 (handle_v_requests): Don't call handle_v_stopped. Call
13832 handle_ack_notif instead.
13833 (queue_stop_reply_callback): Call notif_event_enque instead
13834 of queue_stop_reply.
13835 (handle_status): Don't call send_next_stop_reply, call
13836 notif_write_event instead.
13837 (kill_inferior_callback): Likewise.
13838 (detach_or_kill_inferior_callback): Likewise.
13839 (main): Call initialize_notif.
13840 (process_serial_event): Call QUEUE_is_empty.
13841 (handle_target_event): Call notif_push instead of push event.
13842 * server.h (push_event): Remove declaration.
13843
13844 2012-12-10 Tom Tromey <tromey@redhat.com>
13845
13846 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13847 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13848 macros.
13849 (.c.o): Rewrite.
13850 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13851 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13852 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13853 (amd64-linux-ipa.o, ax.o): Rewrite.
13854 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13855 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13856 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13857 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13858 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13859 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13860 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13861 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13862 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13863 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13864 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13865 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13866 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13867 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13868 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13869 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13870 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13871 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13872 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13873 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13874 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13875 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13876 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13877 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13878 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13879 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13880 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13881 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13882 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13883 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13884 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13885 (reg-tilegx.o): Remove.
13886 (all_object_files): New macro.
13887 Include .deps files.
13888 * aclocal.m4, configure: Rebuild.
13889 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13890 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13891 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13892
13893 2012-12-05 Tom Tromey <tromey@redhat.com>
13894
13895 PR gdb/14917:
13896 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13897
13898 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
13899
13900 * configure.ac: Check for linux/perf_event.h.
13901 * config.in: Regenerated.
13902 * configure: Regenerated.
13903
13904 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13905
13906 * hostio.c (handle_readlink): Decrease buffer size
13907 parameter passed to readlink by one byte.
13908
13909 2012-11-26 Yao Qi <yao@codesourcery.com>
13910
13911 * configure.ac (build_warnings): Append '-Wempty-body'.
13912 * configure: Regenerated.
13913 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13914 body.
13915
13916 2012-11-15 Pierre Muller <muller@sourceware.org>
13917
13918 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13919 * config.in: Regenerate.
13920 * configure: Regenerate.
13921 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13922 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13923 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13924 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13925 header.
13926 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13927 instead of <sys/wait.h> header.
13928 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13929
13930 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
13931
13932 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13933 (various make rules): Remove -DGDBSERVER
13934
13935 2012-11-09 Yao Qi <yao@codesourcery.com>
13936
13937 * spu-low.c (current_ptid): Move it to ..
13938 * gdbthread.h: ... here. New.
13939 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13940 * server.c (myresume, process_serial_event): Likewise.
13941 * thread-db.c (thread_db_find_new_threads): Likewise.
13942 * tracepoint.c (run_inferior_command): Likewise.
13943
13944 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
13945
13946 * server.c (handle_search_memory_1): Include access length in
13947 warning message.
13948
13949 2012-09-05 Michael Brandt <michael.brandt@axis.com>
13950
13951 * linux-crisv32-low.c: Fix compile errors.
13952
13953 2012-09-04 Yao Qi <yao@codesourcery.com>
13954
13955 * tracepoint.c (cmd_qtsv): Adjust debug message.
13956 Don't check CUR_TPOINT.
13957
13958 2012-08-28 Yao Qi <yao@codesourcery.com>
13959
13960 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13961 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13962 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13963 Remove declarations of xmalloc, xreallloc, xstrdup and
13964 freeargv.
13965 * Makefile.in (libiberty_h): New.
13966 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13967 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13968
13969 2012-08-23 Yao Qi <yao@codesourcery.com>
13970
13971 * server.h: Remove declaration of 'xsnprintf'.
13972
13973 2012-08-22 Keith Seitz <keiths@redhat.com>
13974
13975 * server.h: Include build-gnulib-gbserver/config.h.
13976 * gdbreplay.c: Likewise.
13977
13978 2012-08-08 Doug Evans <dje@google.com>
13979
13980 * Makefile.in (SFILES): Add gdb_vecs.c.
13981 (OBS): Add gdb_vecs.o.
13982 (gdb_vecs_h, host_defs_h): New variables.
13983 (thread-db.o): Add $(gdb_vecs_h) dependency.
13984 (gdb_vecs.o): New rule.
13985 * thread-db.c: #include "gdb_vecs.h".
13986 (thread_db_load_search): Use a vector to iterate over path elements.
13987 Handle text appearing after "$pdir".
13988
13989 * configure.ac: Add check for strstr.
13990 * config.in: Regenerate.
13991 * configure: Regenerate.
13992
13993 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13994
13995 * hostio.c (handle_pread): If pread fails, fall back to attempting
13996 lseek/read.
13997 (handle_pwrite): Likewise for pwrite.
13998
13999 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14000
14001 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14002 between unsupported TYPE and unimplementable ADDR/LEN combination.
14003 (arm_insert_point): Act on new return value.
14004
14005 2012-07-31 Pedro Alves <palves@redhat.com>
14006
14007 * server.c (process_point_options): Only skip tokens if we find
14008 one that is unrecognized. Don't treat 'X' specially while
14009 skipping unrecognized tokens.
14010
14011 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14012
14013 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14014 to 4-byte-align HW breakpoint addresses for Thumb.
14015
14016 2012-07-27 Yao Qi <yao@codesourcery.com>
14017
14018 PR remote/14161.
14019
14020 * server.h: Declare gdb_agent_about_to_close.
14021 * target.c (kill_inferior): Include "agent.h".
14022 New. Send command 'kill'.
14023 * target.h (kill_inferior): Removed macro.
14024 * tracepoint.c (gdb_agent_about_to_close): New.
14025 (gdb_agent_helper_thread): Handle command 'close'.
14026 Wait endlessly until the inferior stops.
14027 Install gdb_agent_remove_socket to atexit hook.
14028 (agent_socket_name): New static variable.
14029 (gdb_agent_socket_init): Replace local variable 'name' with
14030 'agent_socket_name'.
14031 (gdb_agent_remove_socket): New.
14032
14033 2012-07-27 Yao Qi <yao@codesourcery.com>
14034
14035 * server.c (process_point_options): Stop at 'X' when parsing.
14036
14037 2012-07-19 Michael Eager <eager@eagercon.com>
14038
14039 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14040 to hw_execute.
14041 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14042 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14043 hardware breakpoint.
14044
14045 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14046
14047 * gdbserver/linux-low.c (initialize_low): Call
14048 linux_ptrace_init_warnings.
14049
14050 2012-07-02 Doug Evans <dje@google.com>
14051
14052 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14053 pointer to int.
14054
14055 2012-07-02 Stan Shebs <stan@codesourcery.com>
14056
14057 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14058 (ax.o): Add it to build rule.
14059 (ax-ipa.o): Ditto.
14060 (OBS): Add format.o.
14061 (IPA_OBS): Add format.o.
14062 * server.c (handle_query): Claim support for breakpoint commands.
14063 (process_point_options): Add command case.
14064 (process_serial_event): Leave running if there are printfs in
14065 effect.
14066 * mem-break.h (any_persistent_commands): Declare.
14067 (add_breakpoint_commands): Declare.
14068 (gdb_no_commands_at_breakpoint): Declare.
14069 (run_breakpoint_commands): Declare.
14070 * mem-break.c (struct point_command_list): New struct.
14071 (struct breakpoint): New field command_list.
14072 (any_persistent_commands): New function.
14073 (add_commands_to_breakpoint): New function.
14074 (add_breakpoint_commands): New function.
14075 (gdb_no_commands_at_breakpoint): New function.
14076 (run_breakpoint_commands): New function.
14077 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14078 locally.
14079 * ax.c: Include format.h.
14080 (ax_printf): New function.
14081 (gdb_eval_agent_expr): Add printf opcode.
14082
14083 2012-06-13 Yao Qi <yao@codesourcery.com>
14084
14085 * server.c (start_inferior): Remove duplicated writes to fields
14086 'last_resume_kind' and 'last_status' of 'current_inferior'.
14087
14088 2012-06-12 Yao Qi <yao@codesourcery.com>
14089 Pedro Alves <palves@redhat.com>
14090
14091 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14092 comment.
14093 * server.c (handle_v_cont): Extend comment.
14094
14095 2012-06-11 Yao Qi <yao@codesourcery.com>
14096
14097 * linux-low.c (linux_attach): Add 'static'.
14098
14099 2012-06-06 Yao Qi <yao@codesourcery.com>
14100
14101 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14102
14103 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14104
14105 Fix gcc -flto compilation warning.
14106 * server.c (main): Make variable multi_mode and attach volatile.
14107
14108 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14109
14110 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14111 if the platform doesn't know about it.
14112
14113 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14114
14115 * Makefile.in (SFILES): Add linux-tile-low.c.
14116 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14117 * configure.srv: Handle tilegx-*-linux*.
14118 * linux-tile-low.c: New file.
14119
14120 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14121
14122 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14123
14124 2012-05-24 Pedro Alves <palves@redhat.com>
14125
14126 PR gdb/7205
14127
14128 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14129
14130 2012-05-24 Pedro Alves <palves@redhat.com>
14131
14132 PR gdb/7205
14133
14134 Replace target_signal with gdb_signal throughout.
14135
14136 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14137
14138 * linux-low.c (linux_store_registers): Avoid the copying sequence
14139 when no data has been retrieved by ptrace.
14140
14141 2012-05-22 Will Deacon <will.deacon@arm.com>
14142
14143 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14144 Include asm/ptrace.h.
14145 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14146 already defined.
14147
14148 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14149
14150 * linux-low.c (linux_store_registers): Don't re-retrieve data
14151 with ptrace that has already been obtained from /proc. Always
14152 copy any data retrieved with ptrace to the buffer supplied.
14153
14154 2012-05-11 Yao Qi <yao@codesourcery.com>
14155 Pedro Alves <palves@redhat.com>
14156
14157 * linux-low.c (enum stopping_threads_kind): New.
14158 (stopping_threads): Change type to `enum stopping_threads_kind'.
14159 (handle_extended_wait): If stopping and suspending threads, leave
14160 the new_lwp suspended too.
14161 (linux_wait_for_event): Adjust.
14162 (stop_all_lwps): Set `stopping_threads' to
14163 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14164 whether we're suspending threads or just stopping them. Assert no
14165 recursion happens.
14166
14167 2012-04-29 Yao Qi <yao@codesourcery.com>
14168
14169 * server.h: Move some code to ...
14170 * gdbthread.h: ... here. New.
14171 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14172 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14173 (nto-low.o, win32-low.o): Likewise.
14174 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14175 * regcache.c, remote-utils.c, server.c: Likewise.
14176 * target.c, tracepoint.c, win32-low.c: Likewise.
14177
14178 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14179
14180 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14181 (PTRACE_ARG4_TYPE): Likewise.
14182 (PTRACE_XFER_TYPE): Likewise.
14183 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14184 ptrace to PTRACE_ARG3_TYPE.
14185 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14186 (PTRACE_ARG4_TYPE): Likewise.
14187 (PTRACE_XFER_TYPE): Likewise.
14188 (linux_detach_one_lwp): Cast fourth argument of
14189 ptrace to long then PTRACE_ARG4_TYPE.
14190 (regsets_fetch_inferior_registers): Cast third argument of
14191 ptrace to long then PTRACE_ARG3_TYPE.
14192 (regsets_store_inferior_registers): Likewise.
14193
14194 2012-04-20 Pedro Alves <palves@redhat.com>
14195
14196 * configure: Regenerate.
14197
14198 2012-04-19 Pedro Alves <palves@redhat.com>
14199
14200 * Makefile.in (GNULIB_BUILDDIR): New.
14201 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14202 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14203 (all, install-only, uninstall, clean-info, all-lib, clean): No
14204 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14205 (maintainer-clean realclean distclean): Use subdir_do.
14206 (subdir_do): New.
14207 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14208 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14209 * acinclude.m4: Include acx_configure_dir.m4.
14210 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14211 calls. Call AC_PROG_RANLIB. Configure gnulib using
14212 ACX_CONFIGURE_DIR.
14213 (GNULIB): New.
14214 (GNULIB_STDINT_H): Adjust.
14215 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14216 * gdbreplay.c: Include build-gnulib/config.h.
14217 * server.h: Likewise.
14218 * aclocal.m4: Regenerate.
14219 * config.in: Regenerate.
14220 * configure: Regenerate.
14221
14222 2012-04-19 Pedro Alves <palves@redhat.com>
14223
14224 * Makefile.in (LIBGNU, INCGNU): Adjust.
14225 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14226 (all, install-only, uninstall, clean-info, all-lib, clean)
14227 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14228 * configure.ac: Adjust AC_OUTPUT output.
14229 * aclocal.m4: Regenerate.
14230 * configure: Regenerate.
14231
14232 2012-04-19 Pedro Alves <palves@redhat.com>
14233
14234 * Makefile.in (generated_files): New.
14235 (server_h): Remove the explicit dependency on config.h, and depend
14236 on $generated_files.
14237
14238 2012-04-19 Pedro Alves <palves@redhat.com>
14239
14240 * Makefile.in (INCGNU): Add -Ignulib.
14241
14242 2012-04-19 Pedro Alves <palves@redhat.com>
14243
14244 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14245 (INCGNU): ... this, and spell out -I here.
14246 (GNULIB_LIB): Rename to ...
14247 (LIBGNU): ... this.
14248 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14249
14250 2012-04-19 Pedro Alves <palves@redhat.com>
14251
14252 * config.in: Regenerate.
14253
14254 2012-04-19 Pedro Alves <palves@redhat.com>
14255
14256 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14257 * server.h (memmem): Remove declaration.
14258 * config.in: Regenerate.
14259 * configure: Regenerate.
14260
14261 2012-04-19 Yao Qi <yao@codesourcery.com>
14262
14263 * Makefile.in (SFILES): Add common/vec.c.
14264 (OBS): Add vec.o.
14265 (vec.o): New rule.
14266
14267 2012-04-19 Yao Qi <yao@codesourcery.com>
14268
14269 * remote-utils.c (prepare_resume_reply): Replace with macro
14270 target_core_of_thread.
14271 * server.c (handle_qxfer_threads_proper): Likewise.
14272 * target.h (traget_core_of_thread): New macro.
14273
14274 2012-04-18 Pedro Alves <palves@redhat.com>
14275
14276 * aclocal.m4: Regenerate.
14277 * configure: Regenerate.
14278
14279 2012-04-16 Yao Qi <yao@codesourcery.com>
14280
14281 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14282 duplicated on address.
14283
14284 2012-04-16 Yao Qi <yao@codesourcery.com>
14285
14286 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14287 (struct tracepoint_action_ops) <send>: New field.
14288 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14289 (agent_expr_send, x_tracepoint_action_send): New.
14290 (l_tracepoint_action_send): New.
14291 (cmd_qtdp): Download and install tracepoint
14292 according to `use_agent'.
14293 (run_inferior_command): Add one more parameter `len'.
14294 Update callers.
14295 (tracepoint_send_agent): New.
14296 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14297
14298 2012-04-16 Yao Qi <yao@codesourcery.com>
14299
14300 * tracepoint.c (download_tracepoints): Moved to ...
14301 (cmd_qtstart): ... here.
14302
14303 2012-04-14 Yao Qi <yao@codesourcery.com>
14304
14305 * tracepoint.c: Include inttypes.h.
14306 (struct collect_memory_action): Use sized types.
14307 (struct tracepoint): Likewise.
14308 (cmd_qtdp, stop_tracing): Update print specifiers.
14309 (cmd_qtp, response_tracepoint): Likewise.
14310 (collect_data_at_tracepoint): Likewise.
14311 (collect_data_at_step): Likewise.
14312
14313 2012-04-14 Yao Qi <yao@codesourcery.com>
14314
14315 Import gnulib module inttypes.
14316 * aclocal.m4, config.in, configure: Regenerated.
14317
14318 2012-04-14 Yao Qi <yao@codesourcery.com>
14319
14320 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14321 Makefile and config.status at last.
14322
14323 2012-04-13 Yao Qi <yao@codesourcery.com>
14324
14325 * tracepoint.c: Include stdint.h unconditionally.
14326
14327 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14328
14329 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14330 on BFD_HAVE_SYS_PROCFS_TYPE.
14331 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14332 * configure: Regenerate.
14333 * config.in: Likewise.
14334
14335 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14336
14337 * Makefile.in (clean): Also remove x32.c x32-linux.c
14338 x32-avx.c x32-avx-linux.c.
14339 (x32.o): New target.
14340 (x32.c): Likewise.
14341 (x32-linux.o): Likewise.
14342 (x32-linux.c): Likewise.
14343 (x32-avx.o): Likewise.
14344 (x32-avx.c): Likewise.
14345 (x32-avx-linux.o): Likewise.
14346 (x32-avx-linux.c): Likewise.
14347
14348 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14349 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14350 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14351 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14352 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14353 i386/x32-avx-linux.xml.
14354
14355 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14356 (init_registers_x32_avx_linux): Likwise.
14357 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14358 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14359
14360 2012-04-13 Pedro Alves <palves@redhat.com>
14361
14362 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14363 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14364 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14365 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14366 the sub-make.
14367
14368 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14369
14370 * linux-x86-low.c (compat_x32_clock_t): New.
14371 (compat_x32_siginfo_t): Likewise.
14372 (compat_x32_siginfo_from_siginfo): Likewise.
14373 (siginfo_from_compat_x32_siginfo): Likewise.
14374 (linux_is_elf64): Likewise.
14375 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14376 and siginfo_from_compat_x32_siginfo for x32.
14377 (x86_arch_setup): Set linux_is_elf64.
14378
14379 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14380
14381 PR gdb/13969
14382 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14383 e_machine field.
14384 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14385 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14386 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14387 compatible with process.
14388
14389 2012-04-12 Yao Qi <yao@codesourcery.com>
14390
14391 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14392 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14393 (install-only, install-info, clean): Handle sub dir gnulib.
14394 (all-lib, am--refresh): New targets.
14395 (memmem.o): Remove target.
14396 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14397 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14398 (AC_REPLACE_FUNCS): Remove memmem.
14399 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14400 (AC_OUTPUT): Generate Makefile in gnulib/.
14401 * aclocal.m4, config.in, configure: Regenerated.
14402
14403 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14404
14405 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14406
14407 2012-04-05 Pedro Alves <palves@redhat.com>
14408
14409 -Werror=strict-aliasing
14410
14411 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14412 pointer.
14413
14414 2012-04-04 Pedro Alves <palves@redhat.com>
14415
14416 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14417 (sparc_store_gregset_from_stack, sparc_store_gregset)
14418 (sparc_breakpoint_at): Fix formatting.
14419
14420 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14421
14422 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14423 are available.
14424 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14425 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14426 * config.in: Regenerate.
14427 * configure: Likewise.
14428
14429 2012-03-29 Pedro Alves <palves@redhat.com>
14430
14431 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14432 Correct ptrace arguments.
14433
14434 2012-03-28 Pedro Alves <palves@redhat.com>
14435
14436 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14437 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14438 (IA64_FR1_REGNUM): New defines.
14439 (ia64_fetch_register): New.
14440 (the_low_target): Install it.
14441 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14442 field.
14443 * linux-low.c (linux_fetch_registers): Try the
14444 the_low_target.fetch_register hook first.
14445
14446 * linux-arm-low.c (the_low_target): Adjust.
14447 * linux-bfin-low.c (the_low_target): Adjust.
14448 * linux-cris-low.c (the_low_target): Adjust.
14449 * linux-crisv32-low.c (the_low_target): Adjust.
14450 * linux-m32r-low.c (the_low_target): Adjust.
14451 * linux-m68k-low.c (the_low_target): Adjust.
14452 * linux-mips-low.c (the_low_target): Adjust.
14453 * linux-ppc-low.c (the_low_target): Adjust.
14454 * linux-s390-low.c (the_low_target): Adjust.
14455 * linux-sh-low.c (the_low_target): Adjust.
14456 * linux-sparc-low.c (the_low_target): Adjust.
14457 * linux-tic6x-low.c (the_low_target): Adjust.
14458 * linux-x86-low.c (the_low_target): Adjust.
14459 * linux-xtensa-low.c (the_low_target): Adjust.
14460
14461 2012-03-26 Pedro Alves <palves@redhat.com>
14462
14463 * server.c (handle_qxfer_libraries): Don't bail early if
14464 the_target->qxfer_libraries_svr4 is not NULL.
14465
14466 2012-03-26 Pedro Alves <palves@redhat.com>
14467
14468 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14469
14470 2012-03-23 Pedro Alves <palves@redhat.com>
14471
14472 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14473 "library-list-svr4" element's start tag when the the DSO list is
14474 empty.
14475
14476 2012-03-23 Pedro Alves <palves@redhat.com>
14477
14478 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14479 a variable whose type size is the same as the inferior's pointer
14480 size.
14481
14482 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14483
14484 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14485 struct siginfo.
14486 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14487 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14488 * linux-low.h: Include <signal.h>.
14489 (struct siginfo): Remove forward declaration.
14490 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14491 struct siginfo.
14492
14493 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14494
14495 * .gitignore: Ignore more files.
14496
14497 2012-03-19 Pedro Alves <palves@redhat.com>
14498 Jan Kratochvil <jan.kratochvil@redhat.com>
14499
14500 * server.c (cont_thread, general_thread): Add describing comments.
14501 (start_inferior): Clear `cont_thread'.
14502 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14503 of a process.
14504
14505 2012-03-15 Yao Qi <yao@codesourcery.com>
14506
14507 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14508 handling to ...
14509 (cmd_qtdp): ... here.
14510
14511 2012-03-15 Yao Qi <yao@codesourcery.com>
14512
14513 * tracepoint.c (struct tracepoint_action_ops): New.
14514 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14515 (m_tracepoint_action_download): New.
14516 (r_tracepoint_action_download): New.
14517 (x_tracepoint_action_download): New.
14518 (l_tracepoint_action_download): New.
14519 (add_tracepoint_action): Install `action->ops' according type.
14520 (download_tracepoint_1): Move code `download' function pointer
14521 of various tracepoint_action_ops.
14522
14523 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14524
14525 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14526 linux_ptrace_attach_warnings.
14527
14528 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14529
14530 * Makefile.in (linux-ptrace.o): New.
14531 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14532 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14533 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14534 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14535 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14536 of these targets.
14537 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14538
14539 2012-03-08 Yao Qi <yao@codesourcery.com>
14540 Pedro Alves <palves@redhat.com>
14541
14542 Fix PR server/13392.
14543 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14544 offset of JMP insn.
14545 * tracepoint.c (remove_tracepoint): New.
14546 (cmd_qtdp): Call remove_tracepoint when failed to install.
14547
14548 2012-03-07 Pedro Alves <palves@redhat.com>
14549
14550 * linux-low.c (get_detach_signal): New.
14551 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14552 Pass on pending signals to PTRACE_DETACH. Check the result of the
14553 ptrace call.
14554 * server.c (program_signals, program_signals_p): New.
14555 (handle_general_set): Handle QProgramSignals.
14556 * server.h (program_signals, program_signals_p): Declare.
14557
14558 2012-03-05 Pedro Alves <palves@redhat.com>
14559 Jan Kratochvil <jan.kratochvil@redhat.com>
14560
14561 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14562 New comment why.
14563
14564 2012-03-03 Yao Qi <yao@codesourcery.com>
14565
14566 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14567 agent_look_up_symbols.
14568
14569 2012-03-03 Yao Qi <yao@codesourcery.com>
14570
14571 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14572 (linux-x86-low.o): Likewise.
14573 * server.h: Remove in_process_agent_loaded.
14574 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14575 common/agent.c.
14576 Update callers.
14577
14578 2012-03-03 Yao Qi <yao@codesourcery.com>
14579
14580 * tracepoint.c (gdb_agent_capability): New global.
14581 (in_process_agent_loaded_ust): Renamed to
14582 `in_process_agent_supports_ust'.
14583 Update callers.
14584 (in_process_agent_supports_ust): Call agent_capability_check.
14585 (clear_installed_tracepoints): Assert that agent supports
14586 agent.
14587
14588 2012-03-03 Yao Qi <yao@codesourcery.com>
14589
14590 * linux-low.c (linux_supports_agent): New.
14591 (linux_target_ops): Initialize field `supports_agent' with
14592 linux_supports_agent.
14593 * target.h (struct target_ops) <supports_agent>: New.
14594 (target_supports_agent): New macro.
14595 * server.c (handle_general_set): Handle packet 'QAgent'.
14596 (handle_query): Send `QAgent+'.
14597 * Makefile.in (server.o): Depends on agent.h.
14598
14599 2012-03-03 Yao Qi <yao@codesourcery.com>
14600
14601 * Makefile.in (OBS): Add agent.o.
14602 Add new rule for agent.o.
14603 Track dependence of tracepoint.c on agent.h.
14604 * tracepoint.c (run_inferior_command_1):
14605 (run_inferior_command): Call agent_run_command.
14606 (gdb_ust_connect_sync_socket): Deleted. Move it to
14607 common/agent.c.
14608 (resume_thread, stop_thread): Likewise.
14609 (gdb_ust_socket_init): Renamed to ...
14610 (gdb_agent_socket_init): ... New.
14611 (gdb_ust_thread): Renamed to ...
14612 (gdb_agent_helper_thread): ... New.
14613 (gdb_ust_init): Move some code to ...
14614 (gdb_agent_init): ... here. New.
14615 [HAVE_UST]: Call gdb_ust_init.
14616 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14617 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14618 * config.in, configure: Regenerated.
14619
14620 2012-03-02 Pedro Alves <palves@redhat.com>
14621
14622 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14623 * linux-low.c (struct simple_pid_list): New.
14624 (stopped_pids): New a struct simple_pid_list pointer.
14625 (add_to_pid_list, pull_pid_from_list): New.
14626 (handle_extended_wait): Don't assume the first signal new children
14627 report is SIGSTOP. Adjust call to pull_pid_from_list.
14628 (linux_wait_for_lwp): Adjust.
14629
14630 2012-03-02 Yao Qi <yao@codesourcery.com>
14631
14632 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14633 debug log.
14634
14635 2012-03-02 Yao Qi <yao@codesourcery.com>
14636
14637 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14638 `stop_pc' and `tpoint'. Update caller.
14639
14640 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14641
14642 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14643 * linux-low.c (use_linux_regsets): New macro.
14644 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14645 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14646 (linux_register_in_regsets): New function.
14647 (usr_fetch_inferior_registers): Skip registers covered by
14648 regsets.
14649 (usr_store_inferior_registers): Likewise.
14650 (usr_fetch_inferior_registers): New macro.
14651 (usr_store_inferior_registers): Likewise.
14652 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14653 (linux_store_registers): Likewise.
14654 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14655 prototype.
14656 (init_registers_mips64_dsp_linux): Likewise.
14657 (init_registers_mips_linux): New macro.
14658 (init_registers_mips_dsp_linux): Likewise.
14659 (mips_dsp_num_regs): Likewise.
14660 (DSP_BASE, DSP_CONTROL): New fallback macros.
14661 (mips_base_regs): New macro.
14662 (mips_regmap): Use it. Fix the size.
14663 (mips_dsp_regmap): New variable.
14664 (mips_dsp_regset_bitmap): Likewise.
14665 (mips_arch_setup): New function.
14666 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14667 than mips_regmap.
14668 (mips_cannot_store_register): Likewise.
14669 (the_low_target): Update .arch_setup, .num_regs and .regmap
14670 initializers. Add .regset_bitmap initializer.
14671 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14672 initializer.
14673 * linux-bfin-low.c (the_low_target): Likewise.
14674 * linux-cris-low.c (the_low_target): Likewise.
14675 * linux-crisv32-low.c (the_low_target): Likewise.
14676 * linux-ia64-low.c (the_low_target): Likewise.
14677 * linux-m32r-low.c (the_low_target): Likewise.
14678 * linux-m68k-low.c (the_low_target): Likewise.
14679 * linux-ppc-low.c (the_low_target): Likewise.
14680 * linux-s390-low.c (the_low_target): Likewise.
14681 * linux-sh-low.c (the_low_target): Likewise.
14682 * linux-sparc-low.c (the_low_target): Likewise.
14683 * linux-tic6x-low.c (the_low_target): Likewise.
14684 * linux-x86-low.c (the_low_target): Likewise.
14685 * linux-xtensa-low.c (the_low_target): Likewise.
14686 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14687 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14688 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14689 srv_xmlfiles.
14690 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14691 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14692
14693 2012-02-29 Yao Qi <yao@codesourcery.com>
14694 Pedro Alves <palves@redhat.com>
14695
14696 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14697 `step_over_finished' is true.
14698
14699 2012-02-27 Pedro Alves <palves@redhat.com>
14700
14701 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14702 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14703
14704 2012-02-27 Pedro Alves <palves@redhat.com>
14705
14706 PR server/9684
14707 * linux-low.c (pid_is_stopped): New.
14708 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14709
14710 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14711
14712 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14713 of conditions.
14714
14715 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14716
14717 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14718
14719 2012-02-24 Luis Machado <lgustavo@codesourcery>
14720
14721 * server.c (handle_query): Advertise support for target-side
14722 breakpoint condition evaluation.
14723 (process_point_options): New function.
14724 (process_serial_event): When inserting a breakpoint, check for
14725 a target-side condition that should be evaluated.
14726
14727 * mem-break.c: Include regcache.h and ax.h.
14728 (point_cond_list_t): New data structure.
14729 (breakpoint) <cond_list>: New field.
14730 (find_gdb_breakpoint_at): Make non-static.
14731 (delete_gdb_breakpoint_at): Clear any target-side
14732 conditions.
14733 (clear_gdb_breakpoint_conditions): New function.
14734 (add_condition_to_breakpoint): Likewise.
14735 (add_breakpoint_condition): Likewise.
14736 (gdb_condition_true_at_breakpoint): Likewise.
14737 (gdb_breakpoint_here): Return result directly instead
14738 of going through a local variable.
14739
14740 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14741 (clear_gdb_breakpoint_conditions): Likewise.
14742 (add_breakpoint_condition): Likewise.
14743 (gdb_condition_true_at_breakpoint): Likewise.
14744
14745 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14746 (need_step_over_p): Take target-side breakpoint condition into
14747 consideration.
14748
14749 2012-02-24 Luis Machado <lgustavo@codesourcery>
14750
14751 * server.h: Include tracepoint.h.
14752 (agent_mem_read, agent_get_trace_state_variable_value,
14753 agent_set_trace_state_variable_value,
14754 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14755 get_set_tsv_func_addr): New prototypes.
14756
14757 * ax.h: New include file.
14758 * ax.c: New source file.
14759
14760 * tracepoint.c: Include ax.h.
14761 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14762 agent_expr, eval_result_type): Move to ax.h.
14763 (parse_agent_expr): Rename to ...
14764 (gdb_parse_agent_expr): ... this, make it non-static and move
14765 to ax.h.
14766 (unparse_agent_expr) Rename to ...
14767 (gdb_unparse_agent_expr): ... this, make it non-static and move
14768 to ax.h.
14769 (eval_agent_expr): Rename to ...
14770 (eval_tracepoint_agent_expr): ... this.
14771 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14772 forward declarations.
14773 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14774 (agent_get_trace_state_variable_value): New function.
14775 (agent_set_trace_state_variable_value): New function.
14776 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14777 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14778 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14779 (condition_true_at_tracepoint): Likewise.
14780 (parse_agent_expr): Rename to ...
14781 (gdb_parse_agent_expr): ... this and move to ax.c.
14782 (unparse_agent_expr): Rename to ...
14783 (gdb_unparse_agent_expr): ... this and move to ax.c.
14784 (gdb_agent_op_name): Move to ax.c.
14785 (eval_agent_expr): Rename to ...
14786 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14787 and move to ax.c.
14788 (eval_tracepoint_agent_expr): New function.
14789 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14790 non-static.
14791 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14792 ax.c.
14793 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14794 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14795 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14796 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14797 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14798 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14799 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14800 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14801 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14802 (compile_bytecodes): Remove forward declaration.
14803 (is_goto_target): Move to ax.c.
14804 (compile_bytecodes): Move to ax.c and call
14805 agent_get_trace_state_variable_value (...) and
14806 agent_set_trace_state_variable_value (...).
14807
14808 * Makefile.in: Update ax.c and IPA dependencies.
14809
14810 2012-02-24 Pedro Alves <palves@redhat.com>
14811
14812 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14813 (cmd_bigqtbuffer_circular): ... this. Only handle
14814 'QTBuffer:circular:'.
14815 (handle_tracepoint_general_set): Adjust.
14816
14817 2012-02-16 Yao Qi <yao@codesourcery.com>
14818
14819 * inferiors.c: Move code to ...
14820 * dll.c: .... here. New.
14821 * server.h: Declare clear_dlls.
14822 * Makefile.in (SFILES): Add dll.c.
14823 (OBS): Add dll.o
14824 (dll.o): New rule.
14825
14826 2012-02-11 Yao Qi <yao@codesourcery.com>
14827
14828 * server.c: (handle_monitor_command): Add a new parameter
14829 `own_buf'.
14830 (handle_query): Update caller.
14831
14832 2012-02-09 Joel Brobecker <brobecker@adacore.com>
14833
14834 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14835 * configure, config.in: Regenerate.
14836 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14837 is not defined.
14838
14839 2012-02-02 Pedro Alves <palves@redhat.com>
14840
14841 Try SIGKILL first, then PTRACE_KILL.
14842 * linux-low.c (linux_kill_one_lwp): New.
14843 (linux_kill_one_lwp): Rename to ...
14844 (kill_one_lwp_callback): ... this. Use the new
14845 linux_kill_one_lwp.
14846
14847 2012-02-02 Pedro Alves <palves@redhat.com>
14848
14849 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14850 inferior.
14851
14852 2012-01-27 Pedro Alves <palves@redhat.com>
14853
14854 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14855 (elf_64_file_p): Make static.
14856 (linux_pid_exe_is_elf_64_file): New.
14857 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14858 Delete declarations.
14859 (linux_pid_exe_is_elf_64_file): Declare.
14860 * linux-x86-low.c (x86_arch_setup): Use
14861 linux_pid_exe_is_elf_64_file.
14862
14863 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14864
14865 * linux-low.c (linux_wait_for_event_1): Rename to ...
14866 (linux_wait_for_event): ... here and merge it with former
14867 linux_wait_for_event - new variable wait_ptid, use it.
14868 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14869
14870 2012-01-23 Pedro Alves <palves@redhat.com>
14871
14872 * server.c (main): Avoid yet another case of infinite loop while
14873 detaching/killing after a longjmp.
14874
14875 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14876
14877 Code cleanup.
14878 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14879
14880 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14881
14882 * hostio.c (handle_readlink): New function.
14883 (handle_vFile): Call it to handle "vFile:readlink" packets.
14884
14885 2012-01-20 Pedro Alves <palves@redhat.com>
14886 Ulrich Weigand <ulrich.weigand@linaro.org>
14887
14888 * server.c (handle_v_requests): Only support vAttach and vRun to
14889 start multiple processes when in extended protocol mode.
14890
14891 2012-01-17 Pedro Alves <palves@redhat.com>
14892
14893 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14894 memalign plus mprotect to allocate the scratch buffer.
14895
14896 2012-01-13 Pedro Alves <palves@redhat.com>
14897
14898 * server.c (attach_inferior): Clear `cont_thread'.
14899
14900 2012-01-13 Pedro Alves <palves@redhat.com>
14901
14902 * server.c (main): Avoid infinite loop while detaching/killing
14903 after a longjmp.
14904
14905 2012-01-09 Doug Evans <dje@google.com>
14906
14907 * server.c (start_inferior): Set last_ptid in --wrapper case.
14908
14909 2012-01-06 Yao Qi <yao@codesourcery.com>
14910
14911 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14912 defined.
14913 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14914
14915 2012-01-04 Yao Qi <yao@codesourcery.com>
14916
14917 * tracepoint.c (cmd_qtdp): Print debug message
14918 for static tracepoint.
14919
14920 2012-01-04 Yao Qi <yao@codesourcery.com>
14921
14922 * tracepoint.c (trace_vdebug): Differentiate debug message
14923 between gdbserver and IPA.
14924
14925 2012-01-03 Yao Qi <yao@codesourcery.com>
14926
14927 * tracepoint.c (tracepoint_was_hit): Don't collect for
14928 static tracepoint.
14929
14930 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14931
14932 * terminal.h: Reformat copyright header.
14933
14934 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14935
14936 * server.c (gdbserver_version): Update copyright year.
14937 * gdbreplay.c (gdbreplay_version): Likewise.
14938
14939 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14940
14941 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14942
14943 Revert:
14944 2011-12-18 Hui Zhu <teawater@gmail.com>
14945 * linux-low.c (linux_create_inferior): Save return value to ret.
14946
14947 2011-12-18 Hui Zhu <teawater@gmail.com>
14948
14949 * linux-low.c (linux_create_inferior): Save return value to ret.
14950
14951 2011-12-16 Doug Evans <dje@google.com>
14952
14953 * linux-low.c (linux_create_inferior): If stdio connection,
14954 redirect stdin from /dev/null, stdout to stderr.
14955 * remote-utils.c (remote_is_stdio): New static global.
14956 (remote_connection_is_stdio): New function.
14957 (remote_prepare): Handle stdio connection.
14958 (remote_open): Ditto.
14959 (remote_close): Don't close stdin for stdio connections.
14960 (read_prim,write_prim): New functions. Replace all calls to
14961 read/write to these.
14962 * server.c (main): Watch for "-" argument. Move call to
14963 remote_prepare before start_inferior.
14964 * server.h (STDIO_CONNECTION_NAME): New macro.
14965 (remote_connection_is_stdio): Declare.
14966
14967 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14968 in debugging output.
14969
14970 2011-12-15 Yao Qi <yao@codesourcery.com>
14971
14972 * tracepoint.c: Include sys/syscall.h.
14973 (gdb_ust_thread): Remove preprocessor conditional.
14974
14975 2011-12-14 Pedro Alves <pedro@codesourcery.com>
14976
14977 * linux-low.c (linux_detach_one_lwp): Call
14978 the_low_target.prepare_to_resume before detaching.
14979
14980 2011-12-14 Yao Qi <yao@codesourcery.com>
14981
14982 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14983 of write.
14984
14985 2011-12-14 Yao Qi <yao@codesourcery.com>
14986
14987 * i386-low.c (i386_low_stopped_data_address): Initialize local
14988 variable `control'.
14989
14990 2011-12-13 Pedro Alves <pedro@codesourcery.com>
14991
14992 PR remote/13492
14993
14994 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14995 DR_CONTROL unless necessary. Extend comments.
14996 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14997 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14998
14999 2011-12-13 Yao Qi <yao@codesourcery.com>
15000
15001 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15002 macros.
15003 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15004
15005 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15006
15007 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15008 Print new debug message for such case.
15009
15010 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15011
15012 Fix overlapping memcpy.
15013 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15014 the read_inferior_memory transfer.
15015 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15016 write_inferior_memory transfer.
15017 (set_fast_tracepoint_jump): New variable buf. Use it for the
15018 read_inferior_memory and write_inferior_memory transfers.
15019 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15020 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15021 Use it for the write_inferior_memory transfer.
15022 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15023 buffers.
15024
15025 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15026
15027 * linux-low.c (fetch_register, store_register): Make code
15028 consistent, fix formatting.
15029
15030 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15031
15032 * linux-low.c (usr_store_inferior_registers): Factor out code
15033 to handle individual registers into...
15034 (store_register): ... this new function.
15035
15036 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15037
15038 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15039 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15040 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15041 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15042 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15043 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15044 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15045 (srv_xmlfiles): Add new XML files.
15046
15047 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15048 and <sys/uio.h>.
15049 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15050 (init_registers_s390_linux32v1): Add prototype.
15051 (init_registers_s390_linux32v2): Likewise.
15052 (init_registers_s390_linux64v1): Likewise.
15053 (init_registers_s390_linux64v2): Likewise.
15054 (init_registers_s390x_linux64v1): Likewise.
15055 (init_registers_s390x_linux64v2): Likewise.
15056 (s390_num_regs): Increment to 52.
15057 (s390_regmap): Add orig_r2 register.
15058 (s390_num_regs_3264): Increment to 68.
15059 (s390_regmap_3264): Add orig_r2 register.
15060 (s390_collect_ptrace_register): Handle orig_r2 register.
15061 (s390_supply_ptrace_register): Likewise.
15062 (s390_fill_last_break): New function.
15063 (s390_store_last_break): Likewise.
15064 (s390_fill_system_call): New function.
15065 (s390_store_system_call): Likewise.
15066 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15067 register sets.
15068 (s390_check_regset): New function.
15069 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15070 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15071 Update target_regsets for available register sets.
15072
15073 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15074 Jan Kratochvil <jan.kratochvil@redhat.com>
15075
15076 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15077 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15078 New.
15079 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15080 * linux-low.h (struct process_info_private): New member r_debug.
15081 * server.c (handle_qxfer_libraries): Call
15082 the_target->qxfer_libraries_svr4.
15083 (handle_qxfer_libraries_svr4): New function.
15084 (qxfer_packets): New entry "libraries-svr4".
15085 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15086 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15087 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15088 PACKET_qXfer_libraries_svr4.
15089
15090 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15091
15092 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15093 PSW address/mask between 8-byte and 16-byte formats.
15094 (s390_supply_ptrace_register): Likewise.
15095 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15096 basic addressing mode bit.
15097
15098 2011-11-24 Stan Shebs <stan@codesourcery.com>
15099
15100 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15101
15102 2011-11-17 Stan Shebs <stan@codesourcery.com>
15103
15104 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15105 (tracing_start_time): New global.
15106 (tracing_stop_time): New global.
15107 (tracing_user_name): New global.
15108 (tracing_notes): New global.
15109 (tracing_stop_note): New global.
15110 (cmd_qtstart): Set traceframe_usage, start_time.
15111 (stop_tracing): Set stop_time.
15112 (cmd_qtstatus): Report additional status.
15113 (cmd_qtp): New function.
15114 (handle_tracepoint_query): Call it.
15115 (cmd_qtnotes): New function.
15116 (handle_tracepoint_general_set): Call it.
15117 (get_timestamp): Rename from tsv_get_timestamp.
15118
15119 2011-11-14 Stan Shebs <stan@codesourcery.com>
15120 Kwok Cheung Yeung <kcy@codesourcery.com>
15121
15122 * linux-x86-low.c (small_jump_insn): New.
15123 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15124 trampoline and error message, build a trampoline and issue a small
15125 jump instruction to it.
15126 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15127 trampoline and error message.
15128 (x86_get_min_fast_tracepoint_insn_len): New.
15129 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15130 * linux-low.h (struct linux_target_ops): Add arguments to
15131 install_fast_tracepoint_jump_pad operation, add new operation.
15132 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15133 arguments.
15134 (linux_get_min_fast_tracepoint_insn_len): New function.
15135 (linux_target_op): Add new operation.
15136 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15137 (gdb_trampoline_buffer_end): Ditto.
15138 (gdb_trampoline_buffer_error): Ditto.
15139 (struct ipa_sym_addresses): Add fields for new IPA variables.
15140 (symbol_list): Add entries for new IPA variables.
15141 (struct tracepoint): Add fields to hold the address range of the
15142 trampoline used by the tracepoint.
15143 (trampoline_buffer_head): New static variable.
15144 (trampoline_buffer_tail): Ditto.
15145 (claim_trampoline_space): New function.
15146 (have_fast_tracepoint_trampoline_buffer): New function.
15147 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15148 structure.
15149 (install_fast_tracepoint): Ditto, also add error buffer argument.
15150 (cmd_qtminftpilen): New function.
15151 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15152 (fast_tracepoint_from_trampoline_address): New function.
15153 (fast_tracepoint_collecting): Handle trampoline as part of jump
15154 pad space.
15155 (set_trampoline_buffer_space): New function.
15156 (initialize_tracepoint): Initialize new IPA variables.
15157 * target.h (struct target_ops): Add arguments to
15158 install_fast_tracepoint_jump_pad operation, add new
15159 get_min_fast_tracepoint_insn_len operation.
15160 (target_get_min_fast_tracepoint_insn_len): New.
15161 (install_fast_tracepoint_jump_pad): Add arguments.
15162 * server.h (IPA_BUFSIZ): Define.
15163 * linux-i386-ipa.c: Include extra header files.
15164 (initialize_fast_tracepoint_trampoline_buffer): New function.
15165 (initialize_low_tracepoint): Call it.
15166 * server.h (set_trampoline_buffer_space): Declare.
15167 (claim_trampoline_space): Ditto.
15168 (have_fast_tracepoint_trampoline_buffer): Ditto.
15169
15170 2011-11-14 Yao Qi <yao@codesourcery.com>
15171
15172 * server.c (handle_query): Handle InstallInTrace for qSupported.
15173 * tracepoint.c (add_tracepoint): Sort list.
15174 (install_tracepoint, download_tracepoint): New.
15175 (cmd_qtdp): Call them to install and download tracepoints.
15176 (sort_tracepoints): Removed.
15177 (cmd_qtstart): Update.
15178
15179 2011-11-14 Yao Qi <yao@codesourcery.com>
15180
15181 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15182 * mem-break.h: Declare.
15183 * tracepoint.c (cmd_qtstart): Move some code to ...
15184 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15185 New.
15186 (download_tracepoints): Move some code to ...
15187 (download_tracepoint_1): ... here. New.
15188
15189 2011-11-08 Yao Qi <yao@codesourcery.com>
15190
15191 * remote-utils.c (relocate_instruction): A comment fix.
15192
15193 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15194
15195 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15196 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15197 dr_status_mirror and dr_control_mirror from debug_reg_state.
15198 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15199 (i386_initial_stuff): Remove use of deleted globals.
15200 (i386_get_thread_context, i386_set_thread_context,
15201 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15202 from debug_reg_state.
15203
15204 2011-11-05 Yao Qi <yao@codesourcery.com>
15205
15206 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15207 address as TPOINT's.
15208
15209 2011-11-02 Stan Shebs <stan@codesourcery.com>
15210
15211 * tracepoint.c (agent_mem_read_string): New function.
15212 (eval_agent_expr): Call it for tracenz.
15213 * server.c (handle_query): Report support for tracenz.
15214
15215 2011-11-02 Yao Qi <yao@codesourcery.com>
15216
15217 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15218
15219 2011-11-02 Yao Qi <yao@codesourcery.com>
15220
15221 * target.h: Fix a typo in comment.
15222
15223 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15224
15225 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15226 clobber the breakpoints' shadows with fast tracepoint jumps.
15227 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15228 * target.c (write_inferior_memory): Also pass MYADDR down to
15229 check_mem_write.
15230
15231 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15232
15233 * configure.ac: Check support for personality routine.
15234 * configure: Regenerate.
15235 * config.in: Likewise.
15236 * linux-low.c: Include <sys/personality.h>.
15237 Define ADDR_NO_RANDOMIZE if necessary.
15238 (linux_create_inferior): Disable address space randomization when
15239 forking inferior, if requested.
15240 (linux_supports_disable_randomization): New function.
15241 (linux_target_ops): Install it.
15242 * server.h (disable_randomization): Declare.
15243 * server.c (disable_randomization): New global variable.
15244 (handle_general_set): Handle QDisableRandomization.
15245 (handle_query): Likewise for qSupported.
15246 (main): Support --disable-randomization and --no-disable-randomization
15247 command line arguments.
15248 * target.h (struct target_ops): Add supports_disable_randomization.
15249 (target_supports_disable_randomization): New macro.
15250
15251 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15252
15253 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15254 ifdef check.
15255 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15256 [!PT_GETDSBT] (target_loadmap): New definition.
15257 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15258 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15259 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15260 and PT_GETDSBT to LINUX_LOADMAP.
15261 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15262 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15263
15264 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15265
15266 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15267 (arm_linux_hwbp_cap): New static variable.
15268 (arm_linux_get_hwbp_cap): Replace by ...
15269 (arm_linux_init_hwbp_cap): ... this new function.
15270 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15271 (arm_linux_get_hw_watchpoint_count): Likewise.
15272 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15273 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15274 (arm_prepare_to_resume): Use perror_with_name instead of error.
15275
15276 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15277
15278 * linux-arm-low.c: Include <signal.h>.
15279 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15280 (struct arm_linux_hwbp_cap): New data type.
15281 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15282 (struct arm_linux_hw_breakpoint): New data type.
15283 (MAX_BPTS, MAX_WPTS): Define.
15284 (struct arch_process_info, struct arch_lwp_info): New data types.
15285 (arm_linux_get_hwbp_cap): New function.
15286 (arm_linux_get_hw_breakpoint_count): Likewise.
15287 (arm_linux_get_hw_watchpoint_count): Likewise.
15288 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15289 (arm_hwbp_control_initialize): Likewise.
15290 (arm_hwbp_control_is_enabled): Likewise.
15291 (arm_hwbp_control_is_initialized): Likewise.
15292 (arm_hwbp_control_disable): Likewise.
15293 (arm_linux_hw_breakpoint_equal): Likewise.
15294 (arm_linux_hw_point_initialize): Likewise.
15295 (struct update_registers_data): New data structure.
15296 (update_registers_callback: New function.
15297 (arm_insert_point): Likewise.
15298 (arm_remove_point): Likewise.
15299 (arm_stopped_by_watchpoint): Likewise.
15300 (arm_stopped_data_address): Likewise.
15301 (arm_new_process): Likewise.
15302 (arm_new_thread): Likewise.
15303 (arm_prepare_to_resume): Likewise.
15304 (the_low_target): Register arm_insert_point, arm_remove_point,
15305 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15306 arm_new_thread, and arm_prepare_to_resume.
15307
15308 2011-09-15 Stan Shebs <stan@codesourcery.com>
15309
15310 * server.h (struct emit_ops): Add compare-goto fields.
15311 * tracepoint.c (gdb_agent_op_sizes): New table.
15312 (emit_eq_goto): New function.
15313 (emit_ne_goto): New function.
15314 (emit_lt_goto): New function.
15315 (emit_le_goto): New function.
15316 (emit_gt_goto): New function.
15317 (emit_ge_goto): New function.
15318 (is_goto_target): New function.
15319 (compile_bytecodes): Recognize special cases of compare-goto
15320 combinations and call specialized emitters for them.
15321 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15322 (amd64_emit_ne_goto): New function.
15323 (amd64_emit_lt_goto): New function.
15324 (amd64_emit_le_goto): New function.
15325 (amd64_emit_gt_goto): New function.
15326 (amd64_emit_ge_goto): New function.
15327 (amd64_emit_ops): Add the new functions.
15328 (i386_emit_eq_goto): New function.
15329 (i386_emit_ne_goto): New function.
15330 (i386_emit_lt_goto): New function.
15331 (i386_emit_le_goto): New function.
15332 (i386_emit_gt_goto): New function.
15333 (i386_emit_ge_goto): New function.
15334 (i386_emit_ops): Add the new functions.
15335
15336 2011-09-08 Stan Shebs <stan@codesourcery.com>
15337
15338 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15339 (i386_emit_epilogue): Restore %ebx.
15340
15341 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15342
15343 * server.c (step_thread): Remove definition.
15344 (process_serial_event): Don't handle Hs.
15345 * server.h (step_thread): Remove declaration.
15346 * target.c (set_desired_inferior): Remove use of step_thread.
15347
15348 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15349
15350 * linux-low.c: Include linux-procfs.h.
15351 (linux_attach_lwp_1): Update comments.
15352 (linux_attach): Scan for existing threads when attaching to a
15353 process that is the tgid.
15354 * Makefile.in: Update dependencies.
15355
15356 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15357
15358 * configure.srv: Add linux-procfs.o dependencies.
15359
15360 2011-08-14 Yao Qi <yao@codesourcery.com>
15361
15362 * target.h (struct target_ops): Fix indent.
15363 * win32-low.c (win32_target_ops): Fix comment.
15364
15365 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15366 Yao Qi <yao@codesourcery.com>
15367
15368 * Makefile.in (clean): Remove tic6x-*.c files.
15369 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15370 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15371 (tic6x-c64xp-linux.c): Likewise.
15372 * configure.srv: Add support for tic6x-*-uclinux.
15373 * linux-tic6x-low.c: New.
15374 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15375
15376 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15377 Yao Qi <yao@codesourcery.com>
15378
15379 * target.h (struct target_ops): Add read_loadmap.
15380 * linux-low.c (struct target_loadseg): New type.
15381 (struct target_loadmap): New type.
15382 (linux_read_loadmap): New function.
15383 (linux_target_ops): Add linux_read_loadmap.
15384 * server.c (handle_query): Support qXfer:fdpic:read packet.
15385 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15386 to NULL.
15387
15388 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15389
15390 * win32-low.c: Include <stdint.h>.
15391
15392 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15393
15394 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15395 to the inferior here.
15396 (i386_remove_aligned_watchpoint): Ditto.
15397 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15398 fit part of the watchpoint in the debug registers.
15399 (i386_update_inferior_debug_regs): New.
15400 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15401 registers, and only update the inferior on success.
15402 (i386_low_remove_watchpoint): Ditto.
15403
15404 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15405
15406 * linux-low.c (compare_ints, unique, list_threads, show_process,
15407 linux_core_of_thread): Delete.
15408 (linux_target_ops): Change linux_core_of_thread to
15409 linux_common_core_of_thread.
15410 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15411 * utils.c (malloc_failure): Change type of argument.
15412 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15413 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15414 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15415 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15416 (IPA_OBJS): Add common-utils-ipa.o.
15417 (ptid_h, linux_osdata_h): New macros.
15418 (server_h): Add common/common-utils.h, common/xml-utils.h,
15419 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15420 common/ptid.h.
15421 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15422 ptid.o, buffer.o): New rules.
15423 (linux-low.o): Add common/linux-osdata.h as a dependency.
15424 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15425 * configure.ac: Add AC_HEADER_DIRENT check.
15426 * config.in: Regenerate.
15427 * configure: Regenerate.
15428 * remote-utils.c (xml_escape_text): Delete.
15429 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15430 buffer_xml_printf): Move to common/buffer.c.
15431 * server.c (main): Remove call to initialize_inferiors.
15432 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15433 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15434 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15435 internal_error, gdb_assert, gdb_assert_fail): Delete.
15436 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15437 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15438 common/buffer.h.
15439 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15440 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15441 initialize_inferiors): Delete.
15442
15443 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15444
15445 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15446 symbol error.
15447
15448 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15449
15450 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15451 assertion.
15452 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15453
15454 2011-05-26 Yao Qi <yao@codesourcery.com>
15455
15456 * Makefile.in (thread-db.o): Track dependence to
15457 common/gdb_thread_db.h.
15458 * thread-db.c: include gdb_thread_db.h from right place.
15459
15460 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15461
15462 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15463 __FILE__ and __LINE__ to internal_error.
15464
15465 2011-05-13 Doug Evans <dje@google.com>
15466
15467 * thread-db.c (try_thread_db_load_from_sdir): New function.
15468 (try_thread_db_load_from_dir): New function.
15469 (thread_db_load_search): Handle $sdir, ignore $pdir.
15470 Remove trying of system directories if search of
15471 libthread-db-search-path fails, that is now done via $sdir.
15472
15473 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15474
15475 * server.c (handle_query): Add EnableDisableTracepoints to the list
15476 of supported features.
15477 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15478 tracepoints.
15479 (cmd_qtenable_disable): New.
15480 (cmd_qtstart): Install tracepoints even if disabled.
15481 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15482 receiving a QTEnable or QTDisable packet.
15483 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15484 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15485 tracepoints.
15486 (gdb_probe): Skip data collection if static tracepoint is disabled.
15487
15488 2011-05-10 Doug Evans <dje@google.com>
15489
15490 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15491
15492 2011-05-04 Doug Evans <dje@google.com>
15493
15494 * linux-low.c (linux_join): Skip process lookup.
15495 * spu-low.c (spu_join): Ditto.
15496 * server.c (join_inferiors_callback): Delete.
15497 (process_serial_event): For 'D' packet (detach) call join_inferior
15498 directly.
15499
15500 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15501
15502 * README: Don't mention xscale*-*-linux*.
15503 * configure.srv (xscale*-*-linux*): Don't handle target.
15504
15505 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15506
15507 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15508 casting pointers.
15509 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15510 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15511 (i386_emit_void_call_2): Likewise.
15512
15513 2011-04-26 Yao Qi <yao@codesourcery.com>
15514
15515 * linux-low.c: Move common macros to linux-ptrace.h.
15516 Include linux-ptrace.h.
15517 * Makefile.in (linux_ptrace_h): New.
15518 (linux-low.o): Depends on linux-ptrace.h.
15519
15520 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15521
15522 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15523 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15524 (remote_prepare): New function with most of the TCP code from ...
15525 (remote_open): ... here. Detect PORT here unconditionally. Move also
15526 setting transport_is_reliable.
15527 * server.c (run_once): New variable.
15528 (gdbserver_usage): Document it.
15529 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15530 the first run if RUN_ONCE.
15531 * server.h (run_once, remote_prepare): New declarations.
15532
15533 2011-04-19 Tom Tromey <tromey@redhat.com>
15534
15535 * win32-low.c (handle_load_dll): Remove duplicate "the".
15536
15537 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15538
15539 Remove support for old Cygwin 1.5 versions.
15540 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15541 function to avoid warning.
15542 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15543 warning.
15544
15545 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15546
15547 * gdbserver/server.h (Macro _): Define it if not available.
15548
15549 2011-03-14 Michael Snyder <msnyder@vmware.com>
15550
15551 * hostio.c (handle_close): Remove unnecessary null test.
15552
15553 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15554
15555 * Makefile.in (maintainer-clean realclean distclean): Remove
15556 "make ... subdir_do" command.
15557
15558 2011-03-10 Michael Snyder <msnyder@vmware.com>
15559
15560 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15561
15562 * server.c (handle_v_run): Free alloced buffer on early return.
15563
15564 2011-03-09 Yao Qi <yao@codesourcery.com>
15565
15566 Revert:
15567 2011-03-04 Yao Qi <yao@codesourcery.com>
15568
15569 * Makefile.in: Remove GNU make feature --directory.
15570
15571 2011-03-05 Yao Qi <yao@codesourcery.com>
15572
15573 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15574 (subdir_do): New make target. Copied from gdb/Makefile.
15575 (maintainer-clean, realclean, distclean, clean): Call corresponding
15576 make targets in common/Makefile.
15577
15578 2011-02-11 Yao Qi <yao@codesourcery.com>
15579
15580 * configure.ac: Call AC_PROG_RANLIB.
15581 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15582 * configure: Regenerate.
15583
15584 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15585
15586 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15587
15588 2011-03-06 Yao Qi <yao@codesourcery.com>
15589
15590 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15591
15592 2011-03-05 Yao Qi <yao@codesourcery.com>
15593
15594 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15595 (subdir_do): New make target. Copied from gdb/Makefile.
15596 (maintainer-clean, realclean, distclean, clean): Call corresponding
15597 make targets in common/Makefile.
15598
15599 2011-03-04 Yao Qi <yao@codesourcery.com>
15600
15601 * Makefile.in: Remove GNU make feature --directory.
15602
15603 2011-03-04 Michael Snyder <msnyder@vmware.com>
15604
15605 * server.c (queue_stop_reply): Call xmalloc not malloc.
15606
15607 2011-03-02 Michael Snyder <msnyder@vmware.com>
15608
15609 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15610
15611 2011-02-28 Michael Snyder <msnyder@vmware.com>
15612
15613 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15614 (cmd_qtframe): Ditto.
15615 (cmd_qtbuffer): Ditto.
15616 (cmd_bigqtbuffer): Ditto.
15617
15618 * utils.c (decimal2str): Initialize 'width' to nine, then
15619 don't mess with it.
15620
15621 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15622
15623 * hostio.c (require_data): Free *data, not data.
15624
15625 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15626
15627 * hostio.c (require_data): Use free, not xfree.
15628
15629 2011-02-27 Michael Snyder <msnyder@vmware.com>
15630
15631 * server.c (handle_query): Discard unused value.
15632
15633 * hostio.c (require_data): Free malloc memory before returning
15634 error.
15635
15636 2011-02-26 Michael Snyder <msnyder@vmware.com>
15637
15638 * linux-low.c (list_threads): Call closedir for dirent.
15639
15640 2011-02-27 Michael Snyder <msnyder@vmware.com>
15641
15642 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15643 a case statement falls through.
15644
15645 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15646
15647 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15648 in comparison.
15649
15650 2011-02-26 Michael Snyder <msnyder@vmware.com>
15651
15652 * utils.c (decimal2str): Eliminate dead code and dead param.
15653 (pulongest): Drop dead param from call to decimal2str.
15654 (plongest): Ditto.
15655
15656 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15657
15658 Revert the following patch (not approved yet):
15659 2011-02-21 Hui Zhu <teawater@gmail.com>
15660 * tracepoint.c (tp_printf): New function.
15661 (eval_agent_expr): Handle gdb_agent_op_printf.
15662
15663 2011-02-21 Hui Zhu <teawater@gmail.com>
15664
15665 * tracepoint.c (tp_printf): New function.
15666 (eval_agent_expr): Handle gdb_agent_op_printf.
15667
15668 2011-02-18 Tom Tromey <tromey@redhat.com>
15669
15670 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15671 (tracepoint.o): Likewise.
15672 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15673 (gdb_agent_op_names): Likewise.
15674
15675 2011-02-18 Tom Tromey <tromey@redhat.com>
15676
15677 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15678 gdb_agent_op_rot>: New constants.
15679 (gdb_agent_op_names): Add pick and roll.
15680 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15681 cases.
15682
15683 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15684
15685 * aclocal.m4: Regenerated with aclocal-1.11.1.
15686
15687 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15688
15689 * server.c (handle_qxfer_traceframe_info): New.
15690 (qxfer_packets): Register "traceframe-info".
15691 (handle_query): Report support for qXfer:traceframe-info:read+.
15692 * tracepoint.c (match_blocktype): New.
15693 (traceframe_find_block_type): Rename to ...
15694 (traceframe_walk_blocks): ... this. Add callback filter argument,
15695 and use it.
15696 (traceframe_find_block_type): New, reimplemented on top of
15697 traceframe_walk_blocks.
15698 (build_traceframe_info_xml): New.
15699 (traceframe_read_info): New.
15700 * server.h (traceframe_read_info): Declare.
15701
15702 2011-02-11 Yao Qi <yao@codesourcery.com>
15703
15704 * configure.ac: Call AC_PROG_RANLIB.
15705 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15706 * configure: Regenerate.
15707
15708 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15709
15710 * server.c (gdb_read_memory): Change return semantics to allow
15711 partial transfers.
15712 (handle_search_memory_1): Adjust.
15713 (process_serial_event) <'m' packet>: Handle partial transfers.
15714 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15715
15716 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15717
15718 * regcache.c (init_register_cache): Initialize
15719 regcache->register_status.
15720 (free_register_cache): Release regcache->register_status.
15721 (regcache_cpy): Copy register_status.
15722 (registers_to_string): Print 'x's for unavailable registers.
15723 (supply_register): Mark the register's status valid or
15724 unavailable, depending on whether a buffer was passed in or not.
15725 (supply_register_zeroed): New.
15726 (supply_regblock): Mark the registers' status valid or
15727 unavailable, depending on whether a buffer was passed in or not.
15728 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15729 (struct regcache): New `register_status' field.
15730 (supply_register_zeroed): Declare.
15731 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15732 supply_register_zeroed, rather than passing a NULL buffer to
15733 supply_register.
15734 * tracepoint.c (fetch_traceframe_registers): Update comment.
15735
15736 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15737
15738 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15739 buffer explicit.
15740
15741 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15742
15743 * server.h (decode_xfer_write): Change prototype.
15744 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15745 and don't extract the annex here.
15746 * server.c (decode_xfer_read): Remove `annex' parameter,
15747 and don't extract the annex here.
15748 (decode_xfer): New.
15749 (struct qxfer): New.
15750 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15751 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15752 (handle_qxfer_statictrace): New functions, abstracted out from
15753 handle_query, and made to use the struct qxfer interface.
15754 (handle_threads_qxfer_proper): Rename to ...
15755 (handle_qxfer_threads_proper): ... this.
15756 (handle_threads_qxfer): Rename to ...
15757 (handle_qxfer_threads): ... this. Adjust.
15758 (qxfer_packets): New array.
15759 (handle_qxfer): New function.
15760 (handle_query): Use handle_qxfer.
15761
15762 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15763
15764 * gdbreplay.c: Shorten lines of >= 80 columns.
15765 * linux-low.c: Ditto.
15766 * linux-ppc-low.c: Ditto.
15767 * linux-s390-low.c: Ditto.
15768 * linux-sparc-low.c: Ditto.
15769 * linux-x86-low.c: Ditto.
15770 * linux-xtensa-low.c: Ditto.
15771 * mem-break.c: Ditto.
15772 * nto-low.c: Ditto.
15773 * regcache.h: Ditto.
15774 * remote-utils.c: Ditto.
15775 * server.c: Ditto.
15776 * server.h: Ditto.
15777 * thread-db.c: Ditto.
15778 * tracepoint.c: Ditto.
15779 * utils.c: Ditto.
15780 * win32-low.h: Ditto.
15781
15782 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15783
15784 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15785 update.
15786
15787 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15788
15789 * server.c (gdbserver_version): Update copyright year in version
15790 output.
15791 * gdbreplay.c (gdbreplay_version): Ditto.
15792
15793 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15794
15795 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15796 * linux-bfin-low.c: New file.
15797 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15798 PT_DATA_ADDR for BFIN targets.
15799 * Makefile.in (SFILES): Add linux-bfin-low.c.
15800 (clean): Remove reg-bfin.c.
15801 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15802 * README: Mention supported Blackfin targets.
15803
15804 2010-12-23 Mike Frysinger <vapier@gentoo.org>
15805
15806 * .gitignore: New file.
15807
15808 2010-11-16 Mike Frysinger <vapier@gentoo.org>
15809
15810 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15811
15812 2010-10-22 Jie Zhang <jie@codesourcery.com>
15813
15814 * Makefile.in: Add FLAGS_TO_PASS variable.
15815 (install): Remove dependency of install-only and recursively
15816 invoke make for install-only.
15817
15818 2010-10-04 Doug Evans <dje@google.com>
15819
15820 * Makefile.in (uninstall): Use $(DESTDIR).
15821
15822 2010-09-24 Pedro Alves <pedro@codesourcery.com>
15823
15824 PR gdb/11842
15825
15826 * linux-x86-low.c (compat_siginfo_from_siginfo)
15827 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15828 si_code is < 0. Check for si_code == SI_TIMER before checking for
15829 si_code < 0.
15830
15831 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15832
15833 * lynx-i386-low.c: New file.
15834 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15835
15836 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15837
15838 * lynx-low.c (ptrace_request_to_str): Remove handling for
15839 request values that have been removed in LynxOS 5.x.
15840
15841 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15842
15843 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15844 <ptrace.h>
15845
15846 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15847
15848 * configure.ac: Add --enable-inprocess-agent option.
15849 * configure: Rebuilt.
15850
15851 2010-09-06 Yao Qi <yao@codesourcery.com>
15852
15853 * linux-low.c (linux_kill): Remove unused variable.
15854 (linux_stabilize_threads): Likewise.
15855 * server.c (start_inferior): Likewise.
15856 (queue_stop_reply_callback): Likewise.
15857 * tracepoint.c (do_action_at_tracepoint): Likewise.
15858
15859 2010-09-06 Yao Qi <yao@codesourcery.com>
15860
15861 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15862 on return.
15863
15864 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15865
15866 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15867
15868 2010-09-06 Pedro Alves <pedro@codesourcery.com>
15869
15870 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15871 "$(IPA_DEPFILES)".
15872
15873 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15874
15875 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15876 gdbserver/lynx-ppc-low.c: New files.
15877 * Makefile.in (lynx_low_h): New variable.
15878 (lynx-low.o, lynx-ppc-low.o): New rules.
15879 * configure.ac: On LynxOS, link with -lnetinet.
15880 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15881 * configure: regenerate.
15882
15883 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15884
15885 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15886 * configure.ac: Add check for vasprintf and vsnprintf.
15887 * configure, config.in: Regenerate.
15888 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15889
15890 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15891
15892 * gdbreplay.c: Move include of alloca.h up, next to include of
15893 malloc.h.
15894 * server.h: Add include of malloc.h.
15895 * mem-break.c: Remove include of malloc.h.
15896 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15897
15898 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15899
15900 * Makefile.in (memmem.o): Build with -Wno-error.
15901
15902 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15903
15904 * utils.c (xsnprintf): Make non-static.
15905 * server.h: Add xsnprintf declaration.
15906 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15907 replace calls to snprintf by calls to xsnprintf throughout.
15908
15909 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15910
15911 * configure.ac: Add configure check for alloca.
15912 * configure, config.in: Regenerate.
15913 * server.h: Include alloca.h if it exists.
15914 * gdbreplay.c: Include alloca.h if it exists.
15915
15916 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15917
15918 * linux-low.c (__SIGRTMIN): Define if not already defined.
15919 (linux_create_inferior): Check for __ANDROID__ rather than
15920 __SIGRTMIN.
15921 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15922 are already deferred.
15923 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15924 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15925 stopped and already has a pending signal to report.
15926 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15927 a pending signal to report or is moving out of a jump pad.
15928 (linux_init_signals): Check for __ANDROID__ rather than
15929 __SIGRTMIN.
15930
15931 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15932
15933 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15934 debug_threads check. Avoid a linear search when not doing debug
15935 output.
15936
15937 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15938
15939 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15940 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15941 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15942 (process_event): Change local fd's type to gdb_fildes_t.
15943 (create_file_handler): Adjust prototype.
15944 (delete_file_handler): Adjust prototype.
15945 (handle_file_event): Adjust prototype. Use pfildes.
15946 (create_file_event): Adjsut prototype.
15947 * remote-utils.c (remote_desc, listen_desc): Change type to
15948 gdb_fildes_t.
15949 * server.h: New gdb_fildes_t typedef.
15950 [USE_WIN32API]: Include winsock2.h.
15951 (delete_file_handler, add_file_handler): Adjust prototypes.
15952 (pfildes): Declare.
15953 * utils.c (pfildes): New.
15954
15955 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15956
15957 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15958 * configure: Regenerate.
15959
15960 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15961
15962 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15963 (linux_done_accessing_memory): ... this.
15964 (linux_target_ops): Adjust.
15965 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15966 * nto-low.c (nto_target_ops): Adjust comment.
15967 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15968 * spu-low.c (spu_target_ops): Adjust comment.
15969 * target.h (target_ops): Rename unprepare_to_access_memory field
15970 to done_accessing_memory.
15971 (unprepare_to_access_memory): Rename to ...
15972 (done_accessing_memory): ... this.
15973
15974 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15975
15976 * linux-low.c (linux_prepare_to_access_memory): New.
15977 (linux_unprepare_to_access_memory): New.
15978 (linux_target_ops): Install them.
15979 * server.c (read_memory): Rename to ...
15980 (gdb_read_memory): ... this. Use
15981 prepare_to_access_memory/prepare_to_access_memory.
15982 (write_memory): Rename to ...
15983 (gdb_write_memory): ... this. Use
15984 prepare_to_access_memory/prepare_to_access_memory.
15985 (handle_search_memory_1): Adjust.
15986 (process_serial_event): Adjust.
15987 * target.h (struct target_ops): New fields
15988 prepare_to_access_memory and unprepare_to_access_memory.
15989 (prepare_to_access_memory, unprepare_to_access_memory): New.
15990 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15991 prepare_to_access_memory/prepare_to_access_memory.
15992 * nto-low.c (nto_target_ops): Adjust.
15993 * spu-low.c (spu_target_ops): Adjust.
15994 * win32-low.c (win32_target_ops): Adjust.
15995
15996 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15997
15998 * Makefile.in (WARN_CFLAGS): Get it from configure.
15999 (WERROR_CFLAGS): New.
16000 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16001 * configure.ac: Introduce --enable-werror, which adds -Werror to
16002 the compiler command line. Enabled by default. Disable with
16003 --disable-werror. Add -Wdeclaration-after-statement
16004 Wpointer-arith and -Wformat-nonliteral to warning flags.
16005 * configure: Regenerate.
16006
16007 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16008
16009 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16010
16011 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16012
16013 * gdbreplay.c (remote_error): New.
16014 (gdbchar): New.
16015 (expect): Use gdbchar. Check for error reading from GDB.
16016 Clarify sync error output.
16017 (play): Check for errors writing to GDB.
16018 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16019 * remote-utils.c (getpkt): Check for errors writing to the remote
16020 descriptor.
16021
16022 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16023
16024 * linux-low.c (linux_wait_1): Move non-debugging code out of
16025 `debug_threads' control.
16026
16027 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16028
16029 * linux-low.c (linux_wait_1): Don't set last_status here.
16030 * server.c (push_event, queue_stop_reply_callback): Assert we're
16031 not pushing a TARGET_WAITKIND_IGNORE event.
16032 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16033 (myresume, handle_target_event): Set the thread's last_resume_kind
16034 and last_status from the target returned status.
16035
16036 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16037
16038 PR threads/10729
16039
16040 * linux-x86-low.c (update_debug_registers_callback): New.
16041 (i386_dr_low_set_addr): Use it.
16042 (i386_dr_low_get_addr): New.
16043 (i386_dr_low_set_control): Use update_debug_registers_callback.
16044 (i386_dr_low_get_control): New.
16045 (i386_dr_low_get_status): Adjust.
16046 * linux-low.c (linux_stop_lwp): New.
16047 * linux-low.h (linux_stop_lwp): Declare.
16048
16049 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16050 argument instead of a i386_debug_reg_state.
16051 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16052 a i386_debug_reg_state.
16053 (i386_insert_aligned_watchpoint): Adjust.
16054 (i386_remove_aligned_watchpoint): Adjust.
16055 (i386_low_stopped_data_address): Read the debug registers from the
16056 inferior instead of from the mirrors.
16057 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16058 (i386_dr_low_get_addr): Declare.
16059 (i386_dr_low_get_control): Declare.
16060 (i386_dr_low_get_status): Change prototype.
16061
16062 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16063 (i386_dr_low_get_addr): New.
16064 (i386_dr_low_get_control): New.
16065 (i386_dr_low_get_status): Adjust prototype. Return
16066 dr_status_mirror.
16067 (i386_initial_stuff): Clear dr_status_mirror and
16068 dr_control_mirror.
16069 (i386_get_thread_context): Adjust.
16070 (i386_set_thread_context): Adjust.
16071 (i386_thread_added): Adjust.
16072
16073 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16074
16075 * linux-low.h (linux_thread_area): Delete declaration.
16076
16077 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16078
16079 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16080 after its termination.
16081
16082 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16083
16084 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16085 (gdb_wants_all_stopped): Delete.
16086 (linux_wait_1): Don't call them.
16087 * server.c (handle_v_cont): Tag all threads as want-stopped.
16088 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16089 stopped as "client-wants-stopped".
16090
16091 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16092
16093 * Makefile.in (signals_h): New.
16094 (server_h): Depend on it.
16095 (server.o): Don't depend on $(signals_def).
16096 (signals.o): Depend on $(signals_def).
16097
16098 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16099
16100 * Makefile.in (signals_def): New.
16101 (server_h): Append include/gdb/signals.h and signals_def.
16102 (server.o): Append signals_def.
16103
16104 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16105
16106 * server.c (handle_target_event): Use target_signal_to_host for
16107 resume_info.sig initialization.
16108 * target.h (struct thread_resume) <sig>: New comment.
16109
16110 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16111
16112 * server.c (handle_query): strcpy() the returned string from paddress()
16113 instead of sprintf().
16114 * utils.c (paddress): Return phex_nz().
16115
16116 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16117
16118 * server.c (handle_v_cont): Call mourn_inferior if process
16119 just exited.
16120 (myresume): Likewise.
16121
16122 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16123
16124 Static tracepoints, and integration with UST.
16125
16126 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16127 * mem-break.c (uninsert_all_breakpoints)
16128 (reinsert_all_breakpoints): New.
16129 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16130 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16131 (gdb_agent_ust_loaded, helper_thread_id)
16132 (gdb_agent_helper_thread_id): New macros.
16133 (struct ipa_sym_addresses): Add addr_ust_loaded,
16134 addr_helper_thread_id, addr_cmd_buf.
16135 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16136 (in_process_agent_loaded_ust): New.
16137 (write_e_ust_not_loaded): New.
16138 (maybe_write_ipa_ust_not_loaded): New.
16139 (struct collect_static_trace_data_action): New.
16140 (enum tracepoint_type) <static_tracepoint>: New.
16141 (struct tracepoint) <handle>: Mention static tracepoints.
16142 (struct static_tracepoint_ctx): New.
16143 (CMD_BUF_SIZE): New.
16144 (add_tracepoint_action): Handle static tracepoint actions.
16145 (unprobe_marker_at): New.
16146 (clear_installed_tracepoints): Handle static tracepoints.
16147 (cmd_qtdp): Handle static tracepoints.
16148 (probe_marker_at): New.
16149 (cmd_qtstart): Handle static tracepoints.
16150 (response_tracepoint): Handle static tracepoints.
16151 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16152 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16153 (get_context_regcache): Handle static tracepoints.
16154 (do_action_at_tracepoint): Handle static tracepoint actions.
16155 (traceframe_find_block_type): Handle static trace data blocks.
16156 (traceframe_read_sdata): New.
16157 (download_tracepoints): Download static tracepoint actions.
16158 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16159 (GDB_PROBE_NAME): New.
16160 (ust_ops): New.
16161 (GET_UST_SYM): New.
16162 (USTF): New.
16163 (dlsym_ust): New.
16164 (ust_marker_to_static_tracepoint): New.
16165 (gdb_probe): New.
16166 (collect_ust_data_at_tracepoint): New.
16167 (gdb_ust_probe): New.
16168 (UNIX_PATH_MAX, SOCK_DIR): New.
16169 (gdb_ust_connect_sync_socket): New.
16170 (resume_thread, stop_thread): New.
16171 (run_inferior_command): New.
16172 (init_named_socket): New.
16173 (gdb_ust_socket_init): New.
16174 (cstr_to_hexstr): New.
16175 (next_st): New.
16176 (first_marker, next_marker): New.
16177 (response_ust_marker): New.
16178 (cmd_qtfstm, cmd_qtsstm): New.
16179 (unprobe_marker_at, probe_marker_at): New.
16180 (cmd_qtstmat, gdb_ust_thread): New.
16181 (gdb_ust_init): New.
16182 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16183 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16184 (ST_REGENTRY): New.
16185 (x86_64_st_collect_regmap): New.
16186 (X86_64_NUM_ST_COLLECT_GREGS): New.
16187 (AMD64_RIP_REGNUM): New.
16188 (supply_static_tracepoint_registers): New.
16189 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16190 (ST_REGENTRY): New.
16191 (i386_st_collect_regmap): New.
16192 (i386_NUM_ST_COLLECT_GREGS): New.
16193 (supply_static_tracepoint_registers): New.
16194 * server.c (handle_query): Handle qXfer:statictrace:read.
16195 <qSupported>: Report support for StaticTracepoints, and
16196 qXfer:statictrace:read features.
16197 * server.h (traceframe_read_sdata)
16198 (supply_static_tracepoint_registers): Declare.
16199 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16200 (unpack_varlen_hex): Include in IPA build.
16201 * Makefile.in (ustlibs, ustinc): New.
16202 (IPA_OBJS): Add remote-utils-ipa.o.
16203 ($(IPA_LIB)): Link -ldl and -lpthread.
16204 (UST_CFLAGS): New.
16205 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16206 * config.in, configure: Regenerate.
16207
16208 2010-06-20 Ian Lance Taylor <iant@google.com>
16209 Pedro Alves <pedro@codesourcery.com>
16210
16211 * linux-x86-low.c (always_true): Delete.
16212 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16213 trying to fool the compiler with always_true.
16214
16215 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16216
16217 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16218 conditions in gdbserver.
16219
16220 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16221
16222 * spu-low.c (spu_read_memory): Wrap around local store limit.
16223 (spu_write_memory): Likewise.
16224
16225 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16226
16227 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16228 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16229 LONGEST uses.
16230 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16231 uses.
16232 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16233 uses with LONGEST uses.
16234
16235 2010-06-14 Stan Shebs <stan@codesourcery.com>
16236 Pedro Alves <pedro@codesourcery.com>
16237
16238 Bytecode compiler.
16239
16240 * linux-x86-low.c: Include limits.h.
16241 (add_insns): New.
16242 (always_true): New.
16243 (EMIT_ASM): New.
16244 (EMIT_ASM32): New.
16245 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16246 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16247 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16248 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16249 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16250 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16251 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16252 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16253 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16254 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16255 (amd64_emit_void_call_2): New.
16256 (amd64_emit_ops): New.
16257 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16258 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16259 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16260 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16261 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16262 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16263 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16264 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16265 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16266 (i386_emit_stack_adjust, i386_emit_int_call_1)
16267 (i386_emit_void_call_2): New.
16268 (i386_emit_ops): New.
16269 (x86_emit_ops): New.
16270 (the_low_target): Install x86_emit_ops.
16271 * server.h (struct emit_ops): New.
16272 (get_raw_reg_func_addr): Declare.
16273 (current_insn_ptr, emit_error): Declare.
16274 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16275 (set_trace_state_variable_value): New defines.
16276 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16277 addr_get_trace_state_variable_value and
16278 addr_set_trace_state_variable_value.
16279 (symbol_list): New fields for get_raw_reg,
16280 get_trace_state_variable_value and set_trace_state_variable_value.
16281 (condfn): New typedef.
16282 (struct tracepoint): New field `compiled_cond'.
16283 (do_action_at_tracepoint): Clear compiled_cond.
16284 (get_trace_state_variable_value, set_trace_state_variable_value):
16285 Export in the IPA.
16286 (condition_true_at_tracepoint): If there's a compiled condition,
16287 run that.
16288 (current_insn_ptr, emit_error): New globals.
16289 (struct bytecode_address): New.
16290 (get_raw_reg_func_addr): New.
16291 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16292 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16293 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16294 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16295 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16296 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16297 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16298 (compile_tracepoint_condition, compile_bytecodes): New.
16299 * target.h (emit_ops): Forward declare.
16300 (struct target_ops): New field emit_ops.
16301 (target_emit_ops): New.
16302 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16303 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16304 * linux-low.c (linux_emit_ops): New.
16305 (linux_target_ops): Install it.
16306 * linux-low.h (struct linux_target_ops): New field emit_ops.
16307
16308 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16309
16310 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16311 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16312
16313 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16314 Stan Shebs <stan@codesourcery.com>
16315
16316 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16317 (all): Depend on $(extra_libraries).
16318 (install-only): Install the IPA.
16319 (IPA_OBJS, IPA_LIB): New.
16320 (clean): Remove the IPA lib.
16321 (IPAGENT_CFLAGS): New.
16322 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16323 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16324 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16325 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16326 * configure.ac: Check for atomic builtins support in the compiler.
16327 (IPA_DEPFILES, extra_libraries): Define.
16328 * configure.srv (ipa_obj): Add description.
16329 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16330 (i[34567]86-*-linux*): Set ipa_obj.
16331 (x86_64-*-linux*): Set ipa_obj.
16332 * linux-low.c (stabilizing_threads): New.
16333 (supports_fast_tracepoints): New.
16334 (linux_detach): Stabilize threads before detaching.
16335 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16336 the lwp is either not stabilizing, or is moving out of a jump pad.
16337 (linux_fast_tracepoint_collecting): New.
16338 (maybe_move_out_of_jump_pad): New.
16339 (enqueue_one_deferred_signal): New.
16340 (dequeue_one_deferred_signal): New.
16341 (linux_wait_for_event_1): If moving out of a jump pad, defer
16342 pending signals to later.
16343 (linux_stabilize_threads): New.
16344 (linux_wait_1): Check if threads need moving out of jump pads, and
16345 do it if so.
16346 (stuck_in_jump_pad_callback): New.
16347 (move_out_of_jump_pad_callback): New.
16348 (lwp_running): New.
16349 (linux_resume_one_lwp): Handle moving out of jump pads.
16350 (linux_set_resume_request): Dequeue deferred signals.
16351 (need_step_over_p): Also step over fast tracepoint jumps.
16352 (start_step_over): Also uninsert fast tracepoint jumps.
16353 (finish_step_over): Also reinsert fast tracepoint jumps.
16354 (linux_install_fast_tracepoint_jump): New.
16355 (linux_target_ops): Install linux_stabilize_threads and
16356 linux_install_fast_tracepoint_jump_pad.
16357 * linux-low.h (linux_target_ops) <get_thread_area,
16358 install_fast_tracepoint_jump_pad>: New fields.
16359 (struct lwp_info) <collecting_fast_tracepoint,
16360 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16361 (linux_get_thread_area): Declare.
16362 * linux-x86-low.c (jump_insn): New.
16363 (x86_get_thread_area): New.
16364 (append_insns): New.
16365 (push_opcode): New.
16366 (amd64_install_fast_tracepoint_jump_pad): New.
16367 (i386_install_fast_tracepoint_jump_pad): New.
16368 (x86_install_fast_tracepoint_jump_pad): New.
16369 (the_low_target): Install x86_get_thread_area and
16370 x86_install_fast_tracepoint_jump_pad.
16371 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16372 (struct fast_tracepoint_jump): New.
16373 (fast_tracepoint_jump_insn): New.
16374 (fast_tracepoint_jump_shadow): New.
16375 (find_fast_tracepoint_jump_at): New.
16376 (fast_tracepoint_jump_here): New.
16377 (delete_fast_tracepoint_jump): New.
16378 (set_fast_tracepoint_jump): New.
16379 (uninsert_fast_tracepoint_jumps_at): New.
16380 (reinsert_fast_tracepoint_jumps_at): New.
16381 (set_breakpoint_at): Use write_inferior_memory.
16382 (uninsert_raw_breakpoint): Use write_inferior_memory.
16383 (check_mem_read): Mask out fast tracepoint jumps.
16384 (check_mem_write): Mask out fast tracepoint jumps.
16385 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16386 (set_fast_tracepoint_jump): Declare.
16387 (delete_fast_tracepoint_jump)
16388 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16389 (reinsert_fast_tracepoint_jumps_at): Declare.
16390 * regcache.c: Don't compile many functions when building the
16391 in-process agent library.
16392 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16393 the register buffer in the heap.
16394 (free_register_cache): If the register buffer isn't owned by the
16395 regcache, don't free it.
16396 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16397 pre-existing register caches.
16398 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16399 type.
16400 (convert_ascii_to_int): : Constify `from' parameter type.
16401 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16402 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16403 the needed buffer in-place.
16404 (relocate_instruction): New.
16405 * server.c (handle_query) <qSymbols>: If the target supports
16406 tracepoints, give it a chance of looking up symbols. Report
16407 support for fast tracepoints.
16408 (handle_status): Stabilize threads.
16409 (process_serial_event): Adjust.
16410 * server.h (struct fast_tracepoint_jump): Forward declare.
16411 (struct process_info) <fast_tracepoint_jumps>: New field.
16412 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16413 (decode_X_packet, decode_M_packet): Adjust.
16414 (relocate_instruction): Declare.
16415 (in_process_agent_loaded): Declare.
16416 (tracepoint_look_up_symbols): Declare.
16417 (struct fast_tpoint_collect_status): Declare.
16418 (fast_tracepoint_collecting): Declare.
16419 (force_unlock_trace_buffer): Declare.
16420 (handle_tracepoint_bkpts): Declare.
16421 (initialize_low_tracepoint)
16422 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16423 * target.h (struct target_ops) <stabilize_threads,
16424 install_fast_tracepoint_jump_pad>: New fields.
16425 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16426 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16427 [HAVE_STDINT_H]: Include stdint.h.
16428 (trace_debug_1): Rename to ...
16429 (trace_vdebug): ... this.
16430 (trace_debug): Rename to ...
16431 (trace_debug_1): ... this. Add `level' parameter.
16432 (trace_debug): New.
16433 (ATTR_USED, ATTR_NOINLINE): New.
16434 (IP_AGENT_EXPORT): New.
16435 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16436 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16437 (about_to_request_buffer_space, trace_buffer_is_full)
16438 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16439 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16440 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16441 (traceframe_write_count, traceframes_created)
16442 (trace_state_variables)
16443 New renaming defines.
16444 (struct ipa_sym_addresses): New.
16445 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16446 (symbol_list): New.
16447 (ipa_sym_addrs): New.
16448 (all_tracepoint_symbols_looked_up): New.
16449 (in_process_agent_loaded): New.
16450 (write_e_ipa_not_loaded): New.
16451 (maybe_write_ipa_not_loaded): New.
16452 (tracepoint_look_up_symbols): New.
16453 (debug_threads) [IN_PROCESS_AGENT]: New.
16454 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16455 (UNKNOWN_SIDE_EFFECTS): New.
16456 (stop_tracing): New.
16457 (flush_trace_buffer): New.
16458 (stop_tracing_bkpt): New.
16459 (flush_trace_buffer_bkpt): New.
16460 (read_inferior_integer): New.
16461 (read_inferior_uinteger): New.
16462 (read_inferior_data_pointer): New.
16463 (write_inferior_data_pointer): New.
16464 (write_inferior_integer): New.
16465 (write_inferior_uinteger): New.
16466 (struct collect_static_trace_data_action): Delete.
16467 (enum tracepoint_type): New.
16468 (struct tracepoint) <type>: New field `type'.
16469 <actions_str, step_actions, step_actions_str>: Only include in
16470 GDBserver.
16471 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16472 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16473 (tracepoints): Use IP_AGENT_EXPORT.
16474 (last_tracepoint): Don't include in the IPA.
16475 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16476 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16477 (alloced_trace_state_variables): New.
16478 (trace_state_variables): Use IP_AGENT_EXPORT.
16479 (traceframe_t): Delete unused variable.
16480 (circular_trace_buffer): Don't include in the IPA.
16481 (trace_buffer_start): Delete.
16482 (struct trace_buffer_control): New.
16483 (trace_buffer_free): Delete.
16484 (struct ipa_trace_buffer_control): New.
16485 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16486 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16487 New.
16488 (trace_buffer_ctrl): New.
16489 (TRACE_BUFFER_CTRL_CURR): New.
16490 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16491 Reimplement as macros.
16492 (trace_buffer_wrap): Delete.
16493 (traceframe_write_count, traceframe_read_count)
16494 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16495 (struct tracepoint_hit_ctx) <type>: New field.
16496 (struct fast_tracepoint_ctx): New.
16497 (memory_barrier): New.
16498 (cmpxchg): New.
16499 (record_tracepoint_error): Update atomically in the IPA.
16500 (clear_inferior_trace_buffer): New.
16501 (about_to_request_buffer_space): New.
16502 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16503 updating the same buffer.
16504 (add_tracepoint): Default the tracepoint's type to trap
16505 tracepoint, and orig_size to -1.
16506 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16507 internal variables.
16508 (create_trace_state_variable): New parameter `gdb'. Handle it.
16509 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16510 (cmd_qtdp): Handle fast tracepoints.
16511 (cmd_qtdv): Adjust.
16512 (max_jump_pad_size): New.
16513 (gdb_jump_pad_head): New.
16514 (get_jump_space_head): New.
16515 (claim_jump_space): New.
16516 (sort_tracepoints): New.
16517 (MAX_JUMP_SIZE): New.
16518 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16519 IPA.
16520 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16521 support. Upload fast traceframes, and delete internal IPA
16522 breakpoints.
16523 (stop_tracing_handler): New.
16524 (flush_trace_buffer_handler): New.
16525 (cmd_qtstop): Upload fast tracepoints.
16526 (response_tracepoint): Handle fast tracepoints.
16527 (tracepoint_finished_step): Upload fast traceframes. Set the
16528 tracepoint hit context's tracepoint type.
16529 (handle_tracepoint_bkpts): New.
16530 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16531 type. Add comment about fast tracepoints.
16532 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16533 non-existing action_str field.
16534 (get_context_regcache): Handle fast tracepoints.
16535 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16536 to the regcache.
16537 (fast_tracepoint_from_jump_pad_address): New.
16538 (fast_tracepoint_from_ipa_tpoint_address): New.
16539 (collecting_t): New.
16540 (force_unlock_trace_buffer): New.
16541 (fast_tracepoint_collecting): New.
16542 (collecting): New.
16543 (gdb_collect): New.
16544 (write_inferior_data_ptr): New.
16545 (target_tp_heap): New.
16546 (target_malloc): New.
16547 (download_agent_expr): New.
16548 (UALIGN): New.
16549 (download_tracepoints): New.
16550 (download_trace_state_variables): New.
16551 (upload_fast_traceframes): New.
16552 (IPA_FIRST_TRACEFRAME): New.
16553 (IPA_NEXT_TRACEFRAME_1): New.
16554 (IPA_NEXT_TRACEFRAME): New.
16555 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16556 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16557 (gdb_jump_pad_buffer_end): New.
16558 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16559 (initialize_tracepoint): Adjust.
16560 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16561 buffer. Initialize the low module.
16562 * utils.c (PREFIX, TOOLNAME): New.
16563 (malloc_failure): Use PREFIX.
16564 (error): In the IPA, an error causes an exit.
16565 (fatal, warning): Use PREFIX.
16566 (internal_error): Use TOOLNAME.
16567 (NUMCELLS): Increase to 10.
16568 * configure, config.in: Regenerate.
16569
16570 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16571
16572 * server.c (handle_query) <qSupported>: Do two passes over the
16573 qSupported string to avoid nesting strtok.
16574
16575 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16576
16577 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16578 (CDEPS): New.
16579 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16580 -Wl,--dynamic-list.
16581 * configure: Regenerate.
16582 * proc-service.list: New.
16583
16584 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16585
16586 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16587 New comment.
16588
16589 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16590
16591 * gdbreplay.c (remote_open): Check error return from socket() call by
16592 its equality to -1 not by it being negative.
16593 * remote-utils.c (remote_open): Likewise.
16594
16595 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16596
16597 * config.h: Regenerate.
16598
16599 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16600
16601 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16602 doesn't provide PTRACE_GET_THREAD_AREA.
16603
16604 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16605
16606 * linux-m68k-low.c: Include <asm/ptrace.h>
16607 (ps_get_thread_area): Implement.
16608
16609 2010-05-03 Doug Evans <dje@google.com>
16610
16611 * event-loop.c (struct callback_event): New struct.
16612 (callback_list): New global.
16613 (append_callback_event, delete_callback_event): New functions.
16614 (process_callback): New function.
16615 (start_event_loop): Call it.
16616 * remote-utils.c (NOT_SCHEDULED): Define.
16617 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16618 moved out of readchar.
16619 (readchar): Rewrite. Call reschedule before returning.
16620 (reset_readchar): New function.
16621 (remote_close): Call it.
16622 (process_remaining, reschedule): New functions.
16623 * server.h (callback_handler_func): New typedef.
16624 (append_callback_event, delete_callback_event): Declare.
16625
16626 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16627
16628 * proc-service.c (ps_pglobal_lookup): Use
16629 thread_db_look_up_one_symbol.
16630 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16631 parameter. Use it instead of all_symbols_looked_up.
16632 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16633 field.
16634 (all_symbols_looked_up): Don't declare.
16635 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16636 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16637 field.
16638 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16639 Set all_symbols_looked_up here.
16640 (thread_db_look_up_one_symbol): New.
16641 (thread_db_get_tls_address): Adjust.
16642 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16643 thread_db object on the heap, and tentatively set it in the
16644 process structure.
16645 (thread_db_init): Don't set all_symbols_looked_up here.
16646 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16647
16648 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16649
16650 * linux-low.c (linux_kill, linux_detach): Adjust.
16651 (status_pending_p_callback): Remove redundant statement. Check
16652 for !TARGET_WAITIKIND_IGNORE, instead of
16653 TARGET_WAITKIND_STOPPED.
16654 (handle_tracepoints): Make sure LWP is locked. Adjust.
16655 (linux_wait_for_event_1): Adjust.
16656 (linux_cancel_breakpoints): New.
16657 (unsuspend_one_lwp): New.
16658 (unsuspend_all_lwps): New.
16659 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16660 (send_sigstop_callback): Change return type to int, add new
16661 `except' parameter and handle it.
16662 (suspend_and_send_sigstop_callback): New.
16663 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16664 pass them down. If SUSPEND, also increment the lwp's suspend
16665 count.
16666 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16667 (need_step_over_p): Don't consider suspended LWPs.
16668 (start_step_over): Adjust.
16669 (proceed_one_lwp): Change return type to int, add new `except'
16670 parameter and handle it.
16671 (unsuspend_and_proceed_one_lwp): New.
16672 (proceed_all_lwps): Use find_inferior instead of
16673 for_each_inferior.
16674 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16675 also decrement the suspend count of LWPs. Pass `except' down,
16676 instead of hacking its suspend count.
16677 (linux_pause_all): Add `freeze' parameter. Adjust.
16678 (linux_unpause_all): New.
16679 (linux_target_ops): Install linux_unpause_all.
16680 * server.c (handle_status): Adjust.
16681 * target.h (struct target_ops): New fields `unpause_all' and
16682 `cancel_breakpoints'. Add new parameter to `pause_all'.
16683 (pause_all): Add new `freeze' parameter.
16684 (unpause_all): New.
16685 (cancel_breakpoints): New.
16686 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16687 cancel breakpoints.
16688 (cmd_qtstart): Pause threads.
16689 (stop_tracing): Pause threads, and cancel breakpoints.
16690 * win32-low.c (win32_target_ops): Adjust.
16691
16692 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16693
16694 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16695 the inferior right away from here...
16696 (linux_wait_1): ... to here, and adjust to check the thread's
16697 last_resume_kind instead of the lwp's step or stop_expected flags.
16698
16699 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16700
16701 * README: Use consistent `GDB' and `GDBserver' spellings.
16702
16703 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16704
16705 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16706 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16707 (linux_detach_one_lwp): Assume the lwp is stopped.
16708 (any_thread_of): Delete.
16709 (linux_detach): Stop all lwps here. Don't blindly delete all
16710 breakpoints.
16711 (delete_lwp_callback): New.
16712 (linux_mourn): Delete all lwps of the process that is gone.
16713 (linux_wait_1): Don't delete the last lwp of the process here.
16714 * mem-break.h (mark_breakpoints_out): Declare.
16715 * mem-break.c (mark_breakpoints_out): New.
16716 (free_all_breakpoints): Use it.
16717 * server.c (handle_target_event): If the process is gone, mark
16718 breakpoints out.
16719 * thread-db.c (struct thread_db) <create_bp>: New field.
16720 (thread_db_enable_reporting): Fix prototype. Store a thread event
16721 breakpoint reference in the thread_db struct.
16722 (thread_db_load_search): Clear the thread_db object.
16723 (try_thread_db_load_1): Ditto.
16724 (switch_to_process): New.
16725 (disable_thread_event_reporting): Use it.
16726 (remove_thread_event_breakpoints): New.
16727 (thread_db_detach, thread_db_mourn): Use it.
16728
16729 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16730
16731 * linux-low.c (linux_enable_event_reporting): New.
16732 (linux_wait_for_event_1, handle_extended_wait): Use it.
16733
16734 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16735
16736 * linux-low.c (linux_kill_one_lwp, linux_kill)
16737 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16738 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16739 SIGSTOP even if the LWP is stopped.
16740 (send_sigstop_callback): New.
16741 (stop_all_lwps): Use send_sigstop_callback instead.
16742 (linux_resume_one_thread): Adjust.
16743 (proceed_one_lwp): Still proceed an LWP that the client has
16744 requested to stop, if we haven't reported it as stopped yet. Make
16745 sure that LWPs the client want stopped, have a pending SIGSTOP.
16746
16747 2010-04-26 Doug Evans <dje@google.com>
16748
16749 * server.c (handle_general_set): Make static.
16750
16751 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16752 Print received char after testing for error/eof instead of before.
16753 (input_interrupt): Tweak comment.
16754
16755 2010-04-23 Doug Evans <dje@google.com>
16756
16757 * server.c (start_inferior): Print inferior argv if --debug.
16758
16759 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16760
16761 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16762 * nto-x86-low.c: Include server.h
16763
16764 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16765
16766 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16767 be consistent with other sources of this directory.
16768 (init_registers_amd64): Correct name of source file of this function
16769 in the comment.
16770
16771 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16772
16773 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16774 64-bit executables.
16775
16776 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16777
16778 * win32-i386-low.c: Add 64-bit support.
16779 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16780 (init_registers_amd64): Declare.
16781 (mappings): Add 64-bit version of array.
16782 (init_windows_x86): New function.
16783 (the_low_target): Change init_arch field to init_windows_x86.
16784
16785 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16786
16787 * win32-low.c: Adapt to support also 64-bit architecture.
16788 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16789 (get_image_name): Use SIZE_T type for local variable `done'.
16790 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16791 (toolhelp_get_dll_name): Idem.
16792 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16793 Use uintptr_t typecast to avoid warning.
16794 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16795 (handle_exception): Use phex_nz to avoid warning.
16796 (win32_wait): Remove unused local variable `process'.
16797
16798 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16799
16800 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16801 `amd64-avx.o'.
16802
16803 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16804
16805 * configure.ac: Use `ws2_32' library for srv_mingw.
16806 * configure: Regenerate.
16807 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16808 * remote-utils.c: Likewise.
16809
16810 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16811
16812 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16813 if __x86_64__ is defined.
16814
16815 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16816
16817 * configure: Regenerate.
16818
16819 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16820
16821 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16822 * target.h (target_ops): New get_tib_address field.
16823 * win32-low.h (win32_thread_info): Add thread_local_base field.
16824 * win32-low.c (child_add_thread): Add tlb argument.
16825 Set thread_local_base field to TLB.
16826 (get_child_debug_event): Adapt to child_add_thread change.
16827 (win32_get_tib_address): New function.
16828 (win32_target_ops): Set get_tib_address field to
16829 win32_get_tib_address.
16830 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16831
16832 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16833
16834 * linux-low.c (linux_mourn): Also remove the process.
16835 * server.c (handle_target_event): Don't remove the process here.
16836 * nto-low.c (nto_mourn): New.
16837 (nto_target_ops): Install it.
16838 * spu-low.c (spu_mourn): New.
16839 (spu_target_ops): Install it.
16840 * win32-low.c (win32_mourn): New.
16841 (win32_target_ops): Install it.
16842
16843 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16844
16845 * server.h (buffer_xml_printf): Remove redundant `;'.
16846
16847 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16848
16849 * regcache.c (set_register_cache): Invalidate regcaches before
16850 changing the register cache layout.
16851 (regcache_invalidate_one): Allow a NULL regcache.
16852 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16853 regcaches before changing the register cache layout or the target
16854 regsets.
16855
16856 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16857
16858 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16859 variable warning on Linux/x86-64.
16860
16861 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16862
16863 GDBserver disconnected tracing support.
16864
16865 * linux-low.c (linux_remove_process): Delete.
16866 (add_lwp): Don't set last_resume_kind here.
16867 (linux_kill): Use `mourn'.
16868 (linux_detach): Use `thread_db_detach', and `mourn'.
16869 (linux_mourn): New.
16870 (linux_attach_lwp_1): Adjust comment.
16871 (linux_attach): last_resume_kind moved the thread_info; adjust.
16872 (status_pending_p_callback): Adjust.
16873 (linux_wait_for_event_1): Adjust.
16874 (count_events_callback, select_singlestep_lwp_callback)
16875 (select_event_lwp_callback, cancel_breakpoints_callback)
16876 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16877 (proceed_one_lwp): Adjust.
16878 (linux_async): Add debug output.
16879 (linux_thread_stopped): New.
16880 (linux_pause_all): New.
16881 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16882 linux_pause_all.
16883 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16884 (thread_db_free): Delete declaration.
16885 (thread_db_detach, thread_db_mourn): Declare.
16886 * thread-db.c (thread_db_init): Use thread_db_mourn.
16887 (thread_db_free): Delete, split in two.
16888 (disable_thread_event_reporting): New.
16889 (thread_db_detach): New.
16890 (thread_db_mourn): New.
16891
16892 * server.h (struct thread_info) <last_resume_kind>: New field.
16893 <attached>: Add comment.
16894 <gdb_detached>: New field.
16895 (handler_func): Change return type to int.
16896 (handle_serial_event, handle_target_event): Ditto.
16897 (gdb_connected): Declare.
16898 (tracing): Delete.
16899 (disconnected_tracing): Declare.
16900 (stop_tracing): Declare.
16901
16902 * server.c (handle_query) <qSupported>: Report support for
16903 disconnected tracing.
16904 (queue_stop_reply_callback): Account for running threads.
16905 (gdb_wants_thread_stopped): New.
16906 (gdb_wants_all_threads_stopped): New.
16907 (gdb_reattached_process): New.
16908 (handle_status): Clear the `gdb_detached' flag of all processes.
16909 In all-stop, stop all threads.
16910 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16911 (process_serial_event): If the remote connection breaks, or if an
16912 exit was forced with "monitor exit", force an event loop exit.
16913 Handle disconnected tracing on detach.
16914 (handle_serial_event): Adjust.
16915 (handle_target_event): If GDB isn't connected, forward events back
16916 to the inferior, unless the last process exited, in which case,
16917 exit gdbserver. Adjust interface.
16918
16919 * remote-utils.c (remote_open): Don't block in accept. Instead
16920 register an event loop source on the listen socket file
16921 descriptor. Refactor bits into ...
16922 (listen_desc): ... this new global.
16923 (gdb_connected): ... this new function.
16924 (enable_async_notification): ... this new function.
16925 (handle_accept_event): ... this new function.
16926 (remote_close): Clear remote_desc.
16927
16928 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16929
16930 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16931 New fields.
16932 (mourn_inferior): Define.
16933 (target_process_qsupported): Avoid the dangling else problem.
16934 (thread_stopped): Define.
16935 (pause_all): Define.
16936 (target_waitstatus_to_string): Declare.
16937 * target.c (target_waitstatus_to_string): New.
16938
16939 * tracepoint.c (tracing): Make extern.
16940 (disconnected_tracing): New.
16941 (stop_tracing): Make extern. Handle tracing stops due to GDB
16942 disconnecting.
16943 (cmd_qtdisconnected): New.
16944 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16945 (handle_tracepoint_general_set): Handle QTDisconnected.
16946
16947 * event-loop.c (event_handler_func): Change return type to int.
16948 (process_event): Bail out if the event handler wants the event
16949 loop to stop.
16950 (handle_file_event): Ditto.
16951 (start_event_loop): Bail out if the event handler wants the event
16952 loop to stop.
16953
16954 * nto-low.c (nto_target_ops): Adjust.
16955 * spu-low.c (spu_wait): Don't remove the process here.
16956 (spu_target_ops): Adjust.
16957 * win32-low.c (win32_wait): Don't remove the process here.
16958 (win32_target_ops): Adjust.
16959
16960 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16961
16962 * regcache.c (realloc_register_cache): Invalidate inferior's
16963 regcache before recreating it.
16964
16965 2010-04-09 Pedro Alves <pedro@codesourcery.com>
16966
16967 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16968
16969 2010-04-09 Stan Shebs <stan@codesourcery.com>
16970 Pedro Alves <pedro@codesourcery.com>
16971
16972 * server.h (LONGEST): New.
16973 (struct thread_info) <while_stepping>: New field.
16974 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16975 Declare.
16976 (initialize_tracepoint, handle_tracepoint_general_set)
16977 (handle_tracepoint_query, tracepoint_finished_step)
16978 (tracepoint_was_hit, release_while_stepping_state_list):
16979 (current_traceframe): Declare.
16980 * server.c (handle_general_set): Handle tracepoint packets.
16981 (read_memory): New.
16982 (write_memory): New.
16983 (handle_search_memory_1): Use read_memory.
16984 (handle_query): Report support for conditional tracepoints, trace
16985 state variables, and tracepoint sources. Handle tracepoint
16986 queries.
16987 (main): Initialize the tracepoints module.
16988 (process_serial_event): Handle traceframe reads/writes.
16989
16990 * linux-low.c (handle_tracepoints): New.
16991 (linux_wait_1): Call it.
16992 (linux_resume_one_lwp): Handle while-stepping.
16993 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16994 (linux_target_ops): Install them.
16995 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16996 New field.
16997 * linux-x86-low.c (x86_supports_tracepoints): New.
16998 (the_low_target). Install it.
16999
17000 * mem-break.h (delete_breakpoint): Declare.
17001 * mem-break.c (delete_breakpoint): Make external.
17002
17003 * target.h (struct target_ops): Add `supports_tracepoints',
17004 `read_pc', and `write_pc' fields.
17005 (target_supports_tracepoints): Define.
17006 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17007 (phex_nz): New.
17008
17009 * regcache.h (struct regcache) <registers_owned>: New field.
17010 (init_register_cache, regcache_cpy): Declare.
17011 (regcache_read_pc, regcache_write_pc): Declare.
17012 (register_cache_size): Declare.
17013 (supply_regblock): Declare.
17014 * regcache.c (init_register_cache): New.
17015 (new_register_cache): Use it.
17016 (regcache_cpy): New.
17017 (register_cache_size): New.
17018 (supply_regblock): New.
17019 (regcache_read_pc, regcache_write_pc): New.
17020
17021 * tracepoint.c: New.
17022
17023 * Makefile.in (OBS): Add tracepoint.o.
17024 (tracepoint.o): New rule.
17025
17026 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17027
17028 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17029 (i386-mmx.o): New.
17030 (i386-mmx.c): Likewise.
17031 (i386-mmx-linux.o): Likewise.
17032 (i386-mmx-linux.c): Likewise.
17033
17034 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17035 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17036 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17037 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17038
17039 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17040 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17041 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17042
17043 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17044
17045 * Makefile.in (clean): Updated.
17046 (i386-avx.o): New.
17047 (i386-avx.c): Likewise.
17048 (i386-avx-linux.o): Likewise.
17049 (i386-avx-linux.c): Likewise.
17050 (amd64-avx.o): Likewise.
17051 (amd64-avx.c): Likewise.
17052 (amd64-avx-linux.o): Likewise.
17053 (amd64-avx-linux.c): Likewise.
17054
17055 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17056 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17057 (srv_amd64_regobj): Add amd64-avx.o.
17058 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17059 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17060 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17061 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17062 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17063 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17064 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17065
17066 * i387-fp.c: Include "i386-xstate.h".
17067 (i387_xsave): New.
17068 (i387_cache_to_xsave): Likewise.
17069 (i387_xsave_to_cache): Likewise.
17070 (x86_xcr0): Likewise.
17071
17072 * i387-fp.h (i387_cache_to_xsave): Likewise.
17073 (i387_xsave_to_cache): Likewise.
17074 (x86_xcr0): Likewise.
17075
17076 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17077 * linux-crisv32-low.c (target_regsets): Likewise.
17078 * linux-m68k-low.c (target_regsets): Likewise.
17079 * linux-mips-low.c (target_regsets): Likewise.
17080 * linux-ppc-low.c (target_regsets): Likewise.
17081 * linux-s390-low.c (target_regsets): Likewise.
17082 * linux-sh-low.c (target_regsets): Likewise.
17083 * linux-sparc-low.c (target_regsets): Likewise.
17084 * linux-xtensa-low.c (target_regsets): Likewise.
17085
17086 * linux-low.c: Include <sys/uio.h>.
17087 (regsets_fetch_inferior_registers): Support nt_type.
17088 (regsets_store_inferior_registers): Likewise.
17089 (linux_process_qsupported): New.
17090 (linux_target_ops): Add linux_process_qsupported.
17091
17092 * linux-low.h (regset_info): Add nt_type.
17093 (linux_target_ops): Add process_qsupported.
17094
17095 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17096 and <sys/uio.h>.
17097 (init_registers_i386_avx_linux): New.
17098 (init_registers_amd64_avx_linux): Likewise.
17099 (xmltarget_i386_linux_no_xml): Likewise.
17100 (xmltarget_amd64_linux_no_xml): Likewise.
17101 (PTRACE_GETREGSET): Likewise.
17102 (PTRACE_SETREGSET): Likewise.
17103 (x86_fill_xstateregset): Likewise.
17104 (x86_store_xstateregset): Likewise.
17105 (use_xml): Likewise.
17106 (x86_linux_update_xmltarget): Likewise.
17107 (x86_linux_process_qsupported): Likewise.
17108 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17109 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17110 init_registers_i386_linux here. Call
17111 x86_linux_update_xmltarget.
17112 (the_low_target): Add x86_linux_process_qsupported.
17113
17114 * server.c (handle_query): Call target_process_qsupported.
17115
17116 * target.h (target_ops): Add process_qsupported.
17117 (target_process_qsupported): New.
17118
17119 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17120
17121 * inferiors.c (add_thread): Set last_status kind to
17122 TARGET_WAITKIND_IGNORE.
17123 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17124 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17125 (linux_wait_1): Move `thread' local definition to block that uses
17126 it. Don't NULL initialize `event_child'.
17127 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17128 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17129 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17130
17131 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17132
17133 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17134 an extended waitstatus, or by a watchpoint.
17135 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17136 thread was stepping or has been stopped by a watchpoint.
17137
17138 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17139
17140 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17141 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17142 of another, then delete the previous, and validate all
17143 breakpoints.
17144 (validate_inserted_breakpoint): New.
17145 (delete_disabled_breakpoints): New.
17146 (validate_breakpoints): New.
17147 (check_mem_read): Validate breakpoints before trusting their
17148 shadow. Delete disabled breakpoints.
17149 (check_mem_write): Validate breakpoints before trusting they
17150 should be inserted. Delete disabled breakpoints.
17151 * mem-break.h (validate_breakpoints):
17152 * server.c (handle_query): Validate breakpoints when we see a
17153 qSymbol query.
17154
17155 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17156
17157 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17158 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17159 if we could tell there's a GDB breakpoint at stop_pc.
17160 (need_step_over_p): Don't do a step over if we find a GDB
17161 breakpoint at the resume PC.
17162
17163 * mem-break.c (struct raw_breakpoint): New.
17164 (enum bkpt_type): New type `gdb_breakpoint'.
17165 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17166 fields. New field `raw'.
17167 (find_raw_breakpoint_at): New.
17168 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17169 breakpoint instead.
17170 (set_breakpoint_at): Adjust.
17171 (delete_raw_breakpoint): New.
17172 (release_breakpoint): New.
17173 (delete_breakpoint): Rename to...
17174 (delete_breakpoint_1): ... this. Add proc parameter. Use
17175 release_breakpoint. Return ENOENT.
17176 (delete_breakpoint): Reimplement.
17177 (find_breakpoint_at): Delete.
17178 (find_gdb_breakpoint_at): New.
17179 (delete_breakpoint_at): Delete.
17180 (set_gdb_breakpoint_at): New.
17181 (delete_gdb_breakpoint_at): New.
17182 (gdb_breakpoint_here): New.
17183 (set_reinsert_breakpoint): Use release_breakpoint.
17184 (uninsert_breakpoint): Rename to ...
17185 (uninsert_raw_breakpoint): ... this.
17186 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17187 (reinsert_raw_breakpoint): Change parameter type to
17188 raw_breakpoint.
17189 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17190 instead.
17191 (check_breakpoints): Adjust. Use release_breakpoint.
17192 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17193 (breakpoint_inserted_here): Ditto.
17194 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17195 Don't trust the breakpoint's shadow if it is not inserted.
17196 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17197 (delete_all_breakpoints): Adjust.
17198 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17199 use delete_breakpoint_1.
17200
17201 * mem-break.h (breakpoints_supported): Delete declaration.
17202 (set_gdb_breakpoint_at): Declare.
17203 (gdb_breakpoint_here): Declare.
17204 (delete_breakpoint_at): Delete.
17205 (delete_gdb_breakpoint_at): Declare.
17206
17207 * server.h (struct raw_breakpoint): Forward declare.
17208 (struct process_info): New field `raw_breakpoints'.
17209
17210 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17211 breakpoints.
17212
17213 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17214
17215 * linux-low.c (status_pending_p_callback): Fix comment.
17216 (linux_wait_for_event_1): Move most of the internal breakpoint
17217 handling from here...
17218 (linux_wait_1): ... to here.
17219 (count_events_callback): New.
17220 (select_singlestep_lwp_callback): New.
17221 (select_event_lwp_callback): New.
17222 (cancel_breakpoints_callback): New.
17223 (select_event_lwp): New.
17224 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17225 priority to all LWPs that have had events that should be reported
17226 to the client. Cancel breakpoints when about to reporting the
17227 event to the client, not while stopping lwps. No longer cancel
17228 finished single-steps here.
17229 (cancel_finished_single_step): Delete.
17230 (cancel_finished_single_steps): Delete.
17231
17232 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17233
17234 * mem-break.c (enum bkpt_type): New.
17235 (struct breakpoint): New field `type'.
17236 (set_breakpoint_at): Change return type to struct breakpoint
17237 pointer. Set type to `other_breakpoint' by default.
17238 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17239 in the breakpoint list.
17240 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17241 (reinsert_breakpoint): Rename to ...
17242 (reinsert_raw_breakpoint): ... this.
17243 (reinsert_breakpoints_at): Adjust.
17244 * mem-break.h (struct breakpoint): Declare.
17245 (set_breakpoint_at): Change return type to struct breakpoint
17246 pointer.
17247
17248 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17249
17250 * server.c (handle_query): Assign, not compare.
17251
17252 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17253
17254 Teach linux gdbserver to step-over-breakpoints.
17255
17256 * linux-low.c (can_hardware_single_step): New.
17257 (supports_breakpoints): New.
17258 (handle_extended_wait): If stopping threads, read the stop pc of
17259 the new cloned LWP.
17260 (get_pc): New.
17261 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17262 low target doesn't support retrieving the PC.
17263 (add_lwp): Set last_resume_kind to resume_continue.
17264 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17265 (linux_attach): Don't clear stop_expected. Set the lwp's
17266 last_resume_kind to resume_stop.
17267 (linux_detach_one_lwp): Don't check for removed breakpoints.
17268 (check_removed_breakpoint): Delete.
17269 (status_pending_p): Rename to ...
17270 (status_pending_p_callback): ... this. Don't check for removed
17271 breakpoints. Don't consider threads that are stopped from GDB's
17272 perspective.
17273 (linux_wait_for_lwp): Always read the stop_pc here.
17274 (cancel_breakpoint): New.
17275 (step_over_bkpt): New global.
17276 (linux_wait_for_event_1): Implement stepping over breakpoints.
17277 (gdb_wants_lwp_stopped): New.
17278 (gdb_wants_all_stopped): New.
17279 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17280 single-step traps here. Store the thread's last reported target
17281 wait status.
17282 (send_sigstop): Don't clear stop_expected. Always set it,
17283 instead.
17284 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17285 (cancel_finished_single_step): New.
17286 (cancel_finished_single_steps): New.
17287 (wait_for_sigstop): Don't cancel finished single-step traps here.
17288 (linux_resume_one_lwp): Don't check for removed breakpoints.
17289 Don't set `step' on non-hardware step archs.
17290 (linux_set_resume_request): Ignore resume_stop requests if already
17291 stopping or stopped. Set the lwp's last_resume_kind.
17292 (resume_status_pending_p): Don't check for removed breakpoints.
17293 (need_step_over_p): New.
17294 (start_step_over): New.
17295 (finish_step_over): New.
17296 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17297 requests. Clear the thread's last reported target waitstatus.
17298 Don't use the `suspended' flag. Don't consider pending breakpoints.
17299 (linux_resume): Start a step-over if necessary.
17300 (proceed_one_lwp): New.
17301 (proceed_all_lwps): New.
17302 (unstop_all_lwps): New.
17303 * linux-low.h (struct lwp_info): Rewrite comment for the
17304 `suspended' flag. Add the `stop_pc' field. Delete the
17305 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17306 Add `'last_resume_kind' and `need_step_over' fields.
17307 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17308 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17309 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17310 (set_raw_breakpoint_at): New.
17311 (set_breakpoint_at): Rewrite to use it.
17312 (reinsert_breakpoint_handler): Delete.
17313 (set_reinsert_breakpoint): New.
17314 (reinsert_breakpoint_by_bp): Delete.
17315 (delete_reinsert_breakpoints): New.
17316 (uninsert_breakpoint): Rewrite.
17317 (uninsert_breakpoints_at): New.
17318 (reinsert_breakpoint): Rewrite.
17319 (reinsert_breakpoints_at): New.
17320 (check_breakpoints): Rewrite.
17321 (breakpoint_here): New.
17322 (breakpoint_inserted_here): New.
17323 (check_mem_read): Adjust.
17324 * mem-break.h (breakpoints_supported, breakpoint_here)
17325 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17326 (reinsert_breakpoint_by_bp): Delete declaration.
17327 (delete_reinsert_breakpoints): Declare.
17328 (reinsert_breakpoint): Delete declaration.
17329 (reinsert_breakpoints_at): Declare.
17330 (uninsert_breakpoint): Delete declaration.
17331 (uninsert_breakpoints_at): Declare.
17332 (check_breakpoints): Adjust prototype.
17333 * server.h: Adjust include order.
17334 (struct thread_info): Declare here. Add a `last_status' field.
17335
17336 2010-03-23 Michael Snyder <msnyder@vmware.com>
17337
17338 * server.c (crc32): New function.
17339 (handle_query): Add handling for 'qCRC:' request.
17340
17341 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17342
17343 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17344 lwp had been stopped by a watchpoint.
17345
17346 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17347
17348 * server.h (internal_error): Declare.
17349 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17350 * utils.c (internal_error): New function.
17351
17352 2010-03-15 Andreas Schwab <schwab@redhat.com>
17353
17354 * configure.srv: Fix typo setting srv_regobj.
17355
17356 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17357
17358 * linux-low.c (fetch_register): Avoid passing a non string literal
17359 format to `error'.
17360 (usr_store_inferior_registers): Ditto.
17361
17362 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17363
17364 * linux-low.c (linux_write_memory): Bail out early if peeking
17365 memory failed.
17366
17367 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17368
17369 * linux-low.h (struct lwp_info): New fields
17370 `stopped_by_watchpoint' and `stopped_data_address'.
17371 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17372 here, and cache them in the lwp object.
17373 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17374 directly.
17375 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17376 field.
17377 (linux_stopped_by_watchpoint): Rewrite.
17378 (linux_stopped_data_address): Rewrite.
17379
17380 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17381
17382 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17383 switching the current inferior, not before.
17384
17385 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17386
17387 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17388 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17389 i386-linux.c and amd64-linux.c.
17390 (reg-i386.o): Removed.
17391 (reg-i386.c): Likewise.
17392 (reg-i386-linux.o): Likewise.
17393 (reg-i386-linux.c): Likewise.
17394 (reg-x86-64.o): Likewise.
17395 (reg-x86-64.c): Likewise.
17396 (reg-x86-64-linux.o): Likewise.
17397 (reg-x86-64-linux.c): Likewise.
17398 (i386.o): New.
17399 (i386.c): Likewise.
17400 (i386-linux.o): Likewise.
17401 (i386-linux.c): Likewise.
17402 (amd64.o): Likewise.
17403 (amd64.c): Likewise.
17404 (amd64-linux.o): Likewise.
17405 (amd64-linux.c): Likewise.
17406
17407 * configure.srv (srv_i386_regobj): New.
17408 (srv_i386_linux_regobj): Likewise.
17409 (srv_amd64_regobj): Likewise.
17410 (srv_amd64_linux_regobj): Likewise.
17411 (srv_i386_32bit_xmlfiles): Likewise.
17412 (srv_i386_64bit_xmlfiles): Likewise.
17413 (srv_i386_xmlfiles): Likewise.
17414 (srv_amd64_xmlfiles): Likewise.
17415 (srv_i386_linux_xmlfiles): Likewise.
17416 (srv_amd64_linux_xmlfiles): Likewise.
17417 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17418 srv_xmlfiles to $srv_i386_xmlfiles.
17419 (i[34567]86-*-mingw32ce*): Likewise.
17420 (i[34567]86-*-mingw*): Likewise.
17421 (i[34567]86-*-nto*): Likewise.
17422 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17423 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17424 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17425 (x86_64-*-linux*): Likewise.
17426
17427 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17428 (init_registers_amd64_linux): New.
17429 (x86_arch_setup): Replace init_registers_x86_64_linux with
17430 init_registers_amd64_linux.
17431
17432 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17433
17434 * configure.ac: Check for libdl. If it is not available link against
17435 static libthread_db.
17436 * configure: Regenerate.
17437
17438 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17439
17440 PR9605
17441
17442 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17443 handing a read watchpoint.
17444 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17445
17446 2010-02-12 Doug Evans <dje@google.com>
17447
17448 * linux-low.c (linux_supports_tracefork_flag): Document.
17449 (linux_look_up_symbols): Add comment.
17450
17451 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17452
17453 * regcache.c (supply_register): Clear regcache if buf is NULL.
17454
17455 2010-02-02 Nicolas Roche <roche@sourceware.org>
17456 Joel Brobecker <brobecker@adacore.com>
17457
17458 * inferiors.c (find_inferior): Add function documentation.
17459 (unloaded_dll): Handle the case where the unloaded dll has not
17460 been previously registered in the dll list.
17461
17462 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17463
17464 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17465 (thumb2_breakpoint): New.
17466 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17467
17468 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17469
17470 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17471 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17472 breakpoints.
17473
17474 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17475
17476 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17477
17478 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17479
17480 * linux-s390-low.c (s390_collect_ptrace_register)
17481 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17482
17483 2010-01-21 Doug Evans <dje@google.com>
17484
17485 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17486 (PTRACE_ARG4_TYPE): New macro.
17487 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17488 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17489 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17490 (usr_store_inferior_registers): Ditto.
17491 (linux_read_memory, linux_write_memory): Ditto.
17492 (linux_test_for_tracefork): Ditto.
17493
17494 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17495 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17496
17497 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17498
17499 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17500 target.
17501
17502 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17503
17504 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17505 prototype to take a regcache. Adjust.
17506
17507 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17508
17509 * regcache.h (struct thread_info): Forward declare.
17510 (struct regcache): New.
17511 (new_register_cache): Adjust prototype.
17512 (get_thread_regcache): Declare.
17513 (free_register_cache): Adjust prototype.
17514 (registers_to_string, registers_from_string): Ditto.
17515 (supply_register, supply_register_by_name, collect_register)
17516 (collect_register_as_string, collect_register_by_name): Ditto.
17517 * regcache.c (struct inferior_regcache_data): Delete.
17518 (get_regcache): Rename to ...
17519 (get_thread_regcache): ... this. Adjust. Switch inferior before
17520 fetching registers.
17521 (regcache_invalidate_one): Adjust.
17522 (regcache_invalidate): Fix prototype.
17523 (new_register_cache): Return the new register cache.
17524 (free_register_cache): Change prototype.
17525 (realloc_register_cache): Adjust.
17526 (registers_to_string): Change prototype to take a regcache. Adjust.
17527 (registers_from_string): Ditto.
17528 (register_data): Ditto.
17529 (supply_register): Ditto.
17530 (supply_register_by_name): Ditto.
17531 (collect_register): Ditto.
17532 (collect_register_as_string): Ditto.
17533 (collect_register_by_name): Ditto.
17534 * server.c (process_serial_event): Adjust.
17535 * linux-low.h (regset_fill_func, regset_store_func): Change
17536 prototype.
17537 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17538 Change prototype.
17539 * linux-low.c (get_stop_pc): Adjust.
17540 (check_removed_breakpoint): Adjust.
17541 (linux_wait_for_event): Adjust.
17542 (linux_resume_one_lwp): Adjust.
17543 (fetch_register): Add regcache parameter. Adjust.
17544 (usr_store_inferior_registers): Ditto.
17545 (regsets_fetch_inferior_registers): Ditto.
17546 (regsets_store_inferior_registers): Ditto.
17547 (linux_fetch_registers, linux_store_registers): Ditto.
17548 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17549 regcache. Adjust.
17550 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17551 Ditto.
17552 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17553 prototype to take a regcache.
17554 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17555 * remote-utils.c (convert_ascii_to_int, outreg)
17556 (prepare_resume_reply): Change prototype to take a regcache.
17557 Adjust.
17558 * target.h (struct target_ops) <fetch_registers, store_registers>:
17559 Change prototype to take a regcache.
17560 (fetch_inferior_registers, store_inferior_registers): Change
17561 prototype to take a regcache. Adjust.
17562 * proc-service.c (ps_lgetregs): Adjust.
17563 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17564 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17565 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17566 take a regcache. Adjust.
17567 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17568 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17569 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17570 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17571 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17572 (cris_cannot_fetch_register):
17573 (cris_breakpoint_at): Change prototype to take a regcache.
17574 Adjust.
17575 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17576 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17577 to take a regcache. Adjust.
17578 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17579 Adjust.
17580 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17581 take a regcache. Adjust.
17582 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17583 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17584 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17585 * linux-mips-low.c (mips_get_pc):
17586 (mips_set_pc): Change prototype to take a regcache. Adjust.
17587 (mips_reinsert_addr): Adjust.
17588 (mips_collect_register): Change prototype to take a regcache.
17589 Adjust.
17590 (mips_supply_register):
17591 (mips_collect_register_32bit, mips_supply_register_32bit)
17592 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17593 (mips_store_fpregset): Ditto.
17594 * linux-ppc-low.c (ppc_supply_ptrace_register)
17595 (ppc_supply_ptrace_register): Ditto.
17596 (parse_spufs_run): Adjust.
17597 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17598 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17599 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17600 take a regcache. Adjust.
17601 * linux-s390-low.c (s390_collect_ptrace_register)
17602 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17603 (s390_set_pc): Change prototype to take a regcache. Adjust.
17604 (s390_arch_setup): Adjust.
17605 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17606 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17607 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17608 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17609 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17610 regcache. Adjust.
17611 (sparc_breakpoint_at): Adjust.
17612 * linux-xtensa-low.c (xtensa_fill_gregset):
17613 (xtensa_store_gregset):
17614 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17615 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17616 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17617 prototype to take a regcache. Adjust.
17618 * win32-arm-low.c (arm_fetch_inferior_register)
17619 (arm_store_inferior_register): Change prototype to take a
17620 regcache. Adjust.
17621 * win32-i386-low.c (i386_fetch_inferior_register)
17622 (i386_store_inferior_register): Change prototype to take a
17623 regcache. Adjust.
17624 * win32-low.c (child_fetch_inferior_registers)
17625 (child_store_inferior_registers): Change prototype to take a
17626 regcache. Adjust.
17627 (win32_wait): Adjust.
17628 (win32_fetch_inferior_registers): Change prototype to take a
17629 regcache. Adjust.
17630 (win32_store_inferior_registers): Adjust.
17631 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17632 store_inferior_register>: Change prototype to take a regcache.
17633
17634 2010-01-20 Doug Evans <dje@google.com>
17635
17636 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17637 #ifdef.
17638 (linux_wait_for_event1, linux_init_signals): Ditto.
17639 (W_STOPCODE): Provide definition if missing.
17640
17641 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17642
17643 * linux-low.c (linux_core_of_thread): New.
17644 (compare_ints, show_process, list_threads): New.
17645 (linux_qxfer_osdata): Report threads and cores.
17646 (linux_target_op): Register linux_core_of_thread.
17647 * remote-utils.c (prepare_resume_reply): Report the core.
17648 (buffer_xml_printf): Support %d specifier.
17649 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17650 New.
17651 (handle_query): Handle qXfer:threads. Announce availability
17652 thereof.
17653 * target.h (struct target_ops): New field core_of_thread.
17654
17655 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17656
17657 * Makefile.in (clean): Remove new generated files.
17658 (reg-s390.o, reg-s390.c): Remove rules.
17659 (reg-s390x.o, reg-s390x.c): Likewise.
17660 (s390-linux32.o, s390-linux32.c): Add rules.
17661 (s390-linux64.o, s390-linux64.c): Likewise.
17662 (s390x-linux64.o, s390x-linux64.c): Likewise.
17663 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17664 * linux-s390-low.c: Include <elf.h>.
17665 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17666 (init_registers_s390): Remove prototype.
17667 (init_registers_s390x): Likewise.
17668 (init_registers_s390_linux32): Add prototype.
17669 (init_registers_s390_linux64): Likewise.
17670 (init_registers_s390x_linux64): Likewise.
17671 (s390_num_regs_3264): New define.
17672 (s390_regmap_3264): New global variable.
17673 (s390_cannot_fetch_register): Remove obsolete check.
17674 (s390_cannot_store_register): Likewise.
17675 (s390_collect_ptrace_register): Handle upper/lower register halves.
17676 (s390_supply_ptrace_register): Likewise.
17677 (s390_fill_gregset): Update to register number changes.
17678 (s390_get_hwcap): New routine.
17679 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17680 Install appropriate regmap and register set.
17681
17682 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17683
17684 * server.c (gdbserver_version): Update copyright year to 2010.
17685 * gdbreplay.c (gdbreplay_version): Likewise.
17686
17687 2009-12-28 Doug Evans <dje@google.com>
17688
17689 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17690 elf/external.h. Include <elf.h> instead but only if necessary.
17691
17692 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17693
17694 * linux-low.c (linux_remove_process): Remove `detaching'
17695 parameter. Don't release/detach from thread_db here.
17696 (linux_kill): Release/detach from thread_db here, ...
17697 (linux_detach): ... and here, before actually detaching.
17698 (linux_wait_1): ... and here, when a process exits.
17699 * thread-db.c (any_thread_of): New.
17700 (thread_db_free): Switch the current inferior to a thread of the
17701 passed in process.
17702
17703 2009-12-21 Doug Evans <dje@google.com>
17704
17705 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17706
17707 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17708 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17709 warning ifndef __NR_tkill. Move setting of errno there too.
17710 Delete unnecessary resetting of errno after syscall.
17711 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17712
17713 * configure.ac: Check for dladdr.
17714 * config.in: Regenerate.
17715 * configure: Regenerate.
17716 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17717 (try_thread_db_load): Update.
17718
17719 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17720
17721 2009-12-18 Doug Evans <dje@google.com>
17722
17723 * event-loop.c: Include unistd.h if it exists.
17724
17725 * linux-low.c (my_waitpid): Move definition away from being in
17726 between linux_tracefork_child/linux_test_for_tracefork.
17727
17728 * gdb_proc_service.h (psaddr_t): Fix type.
17729 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17730 signature to match glibc.
17731
17732 2009-12-16 Doug Evans <dje@google.com>
17733
17734 * linux-low.c (linux_read_memory): Fix argument to read.
17735
17736 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17737
17738 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17739 events, don't leave current_inferior pointing at null.
17740
17741 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17742
17743 * win32-low.c (LOG): Delete.
17744 (OUTMSG): Output to stderr.
17745 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17746 on compile time LOG macro.
17747 (win32_wait): Fix debug output.
17748
17749 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17750
17751 * win32-low.c (win32_add_one_solib): If the dll name is
17752 "ntdll.dll", prepend the system directory to the dll path.
17753
17754 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17755
17756 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17757
17758 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17759 Vladimir Prus <vladimir@codesourcery.com>
17760
17761 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17762 * configure.ac: Check for __mcoldfire__ and set
17763 gdb_cv_m68k_is_coldfire.
17764 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17765 reg-cf.o and reg-m68k.o.
17766 * configure: Regenerated.
17767
17768 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17769
17770 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17771 Pass it to thread_db_free.
17772 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17773 proper `detaching' argument to linux_remove_process.
17774 * linux-low.h (thread_db_free): Add `detaching' parameter.
17775 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17776 to thread_db_free.
17777 (thread_db_free): Add `detaching' parameter. Only
17778 call td_ta_clear_event if detaching from process.
17779
17780 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17781
17782 * thread-db.c (thread_db_free): Fix typo.
17783
17784 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17785
17786 PR gdb/10838
17787 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17788
17789 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17790
17791 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17792 with an i686 compiler.
17793 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17794 needed.
17795 * configure: Rebuilt.
17796
17797 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17798
17799 PR gdb/10783
17800
17801 * server.c (handle_search_memory_1): Correct read_addr initialization
17802 in loop for searching subsequent chunks.
17803
17804 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17805
17806 * configure.ac: New --with-libthread-db option.
17807 * thread-db.c: Allow direct dependence on libthread_db.
17808 (thread_db_free): Adjust.
17809 * config.in: Regenerate.
17810 * configure: Likewise.
17811
17812 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17813
17814 PR gdb/10757
17815 * thread-db.c (attach_thread): New function.
17816 (maybe_attach_thread): Return success/failure.
17817 (find_new_threads_callback): Adjust.
17818 (thread_db_find_new_threads): Loop until no new threads.
17819
17820 2009-10-13 Pedro Alves <pedro@codesourcery.com>
17821
17822 * proc-service.c (ps_lgetregs): Formatting.
17823
17824 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17825
17826 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17827 * configure.ac: Adjust.
17828 * linux-low.h (struct process_info_private): Move members to struct
17829 thread_db.
17830 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17831 * linux-low.c (linux_remove_process): Adjust.
17832 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17833 * server.c (handle_query): Move code ...
17834 (handle_monitor_command): ... here. New function.
17835 * target.h (struct target_ops): New member.
17836 * thread-db.c (struct thread_db): New.
17837 (libthread_db_search_path): New variable.
17838 (thread_db_create_event, thread_db_enable_reporting)
17839 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17840 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17841 (try_thread_db_load_1, dladdr_to_soname): New functions.
17842 (try_thread_db_load, thread_db_load_search): New functions.
17843 (thread_db_init): Search for libthread_db.
17844 (thread_db_free): New function.
17845 (thread_db_handle_monitor_command): Likewise.
17846 * config.in: Regenerate.
17847 * configure: Regenerate.
17848
17849 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17850
17851 * spu-low.c (spu_kill): Wait for inferior to terminate.
17852 Call clear_inferiors.
17853 (spu_detach): Call clear_inferiors.
17854
17855 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17856
17857 * aclocal.m4: Regenerate.
17858 * config.in: Likewise.
17859 * configure: Likewise.
17860
17861 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17862
17863 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17864 (parse_spufs_run): New function.
17865 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17866 (ppc_breakpoint_at): Handle SPU breakpoints.
17867
17868 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17869
17870 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17871 (SPUFS_MAGIC): Define.
17872 (spu_enumerate_spu_ids): New function.
17873 (linux_qxfer_spu): New function.
17874 (linux_target_ops): Install linux_qxfer_spu.
17875
17876 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17877
17878 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17879 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17880 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17881 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17882 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17883 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17884 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17885 (init_registers_powerpc_cell32l): Add prototype.
17886 (init_registers_powerpc_cell64l): Likewise.
17887 (ppc_arch_setup): Detect Cell/B.E. architecture.
17888
17889 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17890
17891 * Makefile.in (datarootdir): New variable.
17892
17893 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17894
17895 * linux-low.c (linux_write_memory): Update debugging output.
17896 * Makefile.in (clean): Add new descriptions.
17897 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17898 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17899 * configure.srv: Add new files for arm*-*-linux*.
17900 * linux-arm-low.c: Add new declarations.
17901 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17902 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17903 (HWCAP_VFPv3D16): New.
17904 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17905 instead of __IWMMXT__.
17906 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17907 (arm_arch_setup): New.
17908 (target_regsets): Remove #ifdef. Add VFP regset.
17909 (the_low_target): Use arm_arch_setup.
17910
17911 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17912
17913 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17914 the main thread again.
17915
17916 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17917
17918 Adding Neutrino gdbserver.
17919 * configure: Regenerated.
17920 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17921 * configure.srv (i[34567]86-*-nto*): New target.
17922 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17923 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17924 (nto_comctrl) [__QNX__]: New function.
17925 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17926
17927 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
17928
17929 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17930 srv_tgtobj.
17931
17932 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17933 Pedro Alves <pedro@codesourcery.com>
17934
17935 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17936 don't support CONTEXT_EXTENDED_REGISTERS.
17937 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17938 (the_low_target): Install them.
17939 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17940 failing with ERROR_PIPE_NOT_CONNECTED.
17941
17942 2009-06-30 Doug Evans <dje@google.com>
17943 Pierre Muller <muller@ics.u-strasbg.fr>
17944
17945 Add h/w watchpoint support to x86-linux, win32-i386.
17946 * Makefile.in (SFILES): Add i386-low.c
17947 (i386_low_h): Define.
17948 (i386-low.o): Add dependencies.
17949 (linux-x86-low.o): Add i386-low.h dependency.
17950 (win32-i386-low.o): Ditto.
17951 * i386-low.c: New file.
17952 * i386-low.h: New file.
17953 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17954 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17955 * linux-low.c (linux_add_process): Initialize arch_private.
17956 (linux_remove_process): Free arch_private.
17957 (add_lwp): Initialize arch_private.
17958 (delete_lwp): Free arch_private.
17959 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17960 provided.
17961 * linux-low.h (process_info_private): New member arch_private.
17962 (lwp_info): New member arch_private.
17963 (linux_target_ops): New members new_process, new_thread,
17964 prepare_to_resume.
17965 (ptid_of): New macro.
17966 * linux-x86-low.c: Include stddef.h, i386-low.h.
17967 (arch_process_info): New struct.
17968 (arch_lwp_info): New struct.
17969 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17970 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17971 (i386_dr_low_get_status): New function.
17972 (x86_insert_point, x86_remove_point): New functions.
17973 (x86_stopped_by_watchpoint): New function.
17974 (x86_stopped_data_address): New function.
17975 (x86_linux_new_process, x86_linux_new_thread): New functions.
17976 (x86_linux_prepare_to_resume): New function.
17977 (the_low_target): Add entries for insert_point, remove_point,
17978 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17979 prepare_to_resume.
17980 * server.c (debug_hw_points): New global.
17981 (monitor_show_help): Document set debug-hw-points.
17982 (handle_query): Process "set debug-hw-points".
17983 * server.h (debug_hw_points): Declare.
17984 (paddress): Declare.
17985 * utils.c (NUMCELLS, CELLSIZE): New macros.
17986 (get_sell, xsnprintf, paddress): New functions.
17987 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17988 remove_point, stopped_by_watchpoint, stopped_data_address.
17989 * win32-i386-low.c: Include i386-low.h.
17990 (debug_reg_state): Replaces dr.
17991 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17992 (i386_dr_low_get_status): New function.
17993 (i386_insert_point, i386_remove_point): New functions.
17994 (i386_stopped_by_watchpoint): New function.
17995 (i386_stopped_data_address): New function.
17996 (i386_initial_stuff): Update.
17997 (get_thread_context,set_thread_context,i386_thread_added): Update.
17998 (the_low_target): Add entries for insert_point,
17999 remove_point, stopped_by_watchpoint, stopped_data_address.
18000 * win32-low.c (win32_insert_watchpoint): New function.
18001 (win32_remove_watchpoint): New function.
18002 (win32_stopped_by_watchpoint): New function.
18003 (win32_stopped_data_address): New function.
18004 (win32_target_ops): Add entries for insert_watchpoint,
18005 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18006 * win32-low.h (win32_target_ops): New members insert_point,
18007 remove_point, stopped_by_watchpoint, stopped_data_address.
18008
18009 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18010
18011 * server.c (process_serial_event): Re-return unsupported, not
18012 error, if the type isn't recognized. Re-allow supporting only
18013 insert or remove packets. Also call require_running for
18014 breakpoints. Add missing break statement to default case. Tidy.
18015 * target.h (struct target_ops): Rename insert_watchpoint to
18016 insert_point, and remove_watchpoint to remove_point.
18017
18018 * linux-low.h (struct linux_target_ops): Likewise.
18019 * linux-low.c (linux_insert_watchpoint): Rename to ...
18020 (linux_insert_point): ... this. Adjust.
18021 (linux_remove_watchpoint): Rename to ...
18022 (linux_remove_point): ... this. Adjust.
18023 (linux_target_ops): Adjust.
18024 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18025 (cris_insert_point): ... this.
18026 (cris_remove_watchpoint): Rename to ...
18027 (cris_remove_point): ... this.
18028 (the_low_target): Adjust.
18029
18030 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18031
18032 * server.c (handle_v_kill): Pass signal_pid to
18033 kill_inferior if multi_process is zero.
18034
18035 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18036
18037 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18038 * target.h (target_ops): Comment for *_watchpoint to make it clear
18039 the functions can get types '0' and '1'.
18040
18041 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18042
18043 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18044 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18045 * regcache.c (get_regcache): Likewise.
18046 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18047 * win32-low.c (child_fetch_inferior_registers): Remove check for
18048 regno 0.
18049
18050 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18051 Pedro Alves <pedro@codesourcery.com>
18052
18053 * target.h (struct target_ops) <supports_multi_process>: New
18054 callback.
18055 (target_supports_multi_process): New.
18056 * server.c (handle_query): Even if GDB reports support, only
18057 enable multi-process if the target also supports it. Report
18058 multi-process support only if the target backend supports it.
18059 * linux-low.c (linux_supports_multi_process): New function.
18060 (linux_target_ops): Install it as target_supports_multi_process
18061 callback.
18062
18063 2009-05-24 Doug Evans <dje@google.com>
18064
18065 Global renaming of find_thread_pid to find_thread_ptid.
18066 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18067 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18068 All callers updated.
18069
18070 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18071 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18072 directly.
18073
18074 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18075 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18076 (linux_resume_one_lwp): Ditto.
18077
18078 2009-05-23 Doug Evans <dje@google.com>
18079
18080 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18081 from struct inferior_list_entry * to struct lwp_info *.
18082 All callers updated.
18083
18084 2009-05-13 Doug Evans <dje@google.com>
18085
18086 * linux-x86-low.c: Don't include assert.h.
18087 (x86_siginfo_fixup): Use fatal, not assert.
18088 (x86_arch_setup): Fix comment.
18089
18090 2009-05-12 Doug Evans <dje@google.com>
18091
18092 Biarch support for i386/amd64 gdbserver.
18093 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18094 Add linux-x86-low.c.
18095 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18096 (linux-x86-low.o): Add.
18097 * linux-x86-64-low.c: Delete.
18098 * linux-i386-low.c: Delete.
18099 * linux-x86-low.c: New file.
18100 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18101 linux-x86-low.o.
18102 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18103 linux-x86-low.o.
18104 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18105 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18106 (linux_child_pid_to_exec_file): New function.
18107 (elf_64_header_p, elf_64_file_p): New functions.
18108 (siginfo_fixup): New function.
18109 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18110 give target a chance to convert layout.
18111 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18112 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18113
18114 2009-05-07 Doug Evans <dje@google.com>
18115
18116 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18117 (regsets_store_inferior_registers): Ditto.
18118
18119 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18120
18121 PR server/10048
18122
18123 * linux-low.c (must_set_ptrace_flags): Delete.
18124 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18125 of the global.
18126 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18127 `lwp->must_set_ptrace_flags' instead.
18128 (linux_wait_for_event_1): Set ptrace options here.
18129 (linux_wait_1): ... not here.
18130
18131 2009-04-30 Doug Evans <dje@google.com>
18132
18133 * inferiors.c (started_inferior_callback): New function.
18134 (attached_inferior_callback): New function.
18135 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18136 * server.c (print_started_pid, print_attached_pid): New functions.
18137 (detach_or_kill_for_exit): New function.
18138 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18139 * server.h (have_started_inferiors_p): Declare.
18140 (have_attached_inferiors_p): Declare.
18141
18142 * inferiors.c (remove_process): Fix memory leak, free process.
18143 * linux-low.c (linux_remove_process): New function.
18144 (linux_kill): Call it instead of remove_process.
18145 (linux_detach, linux_wait_1): Ditto.
18146
18147 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18148
18149 * configure.srv: Add x86 Windows CE target.
18150
18151 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18152
18153 * inferiors.c (get_thread_process): Make global.
18154 * server.h (get_thread_process): Add prototype.
18155 * thread-db.c (find_one_thread): Use get_thread_process
18156 instead of current_process.
18157 (thread_db_get_tls_address): Do not crash if called when
18158 thread layer is not yet initialized.
18159
18160 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18161
18162 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18163 * spu-low.c (current_tid): Rename to ...
18164 (current_ptid): ... this.
18165 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18166 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18167 ptid_get_lwp (current_ptid) instead of current_tid.
18168 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18169 instead of current_tid. Use find_process_pid to verify pid
18170 argument is valid. Pass proper argument to remove_process.
18171 (spu_thread_alive): Compare current_ptid instead of current_tid.
18172 (spu_resume): Likewise.
18173
18174 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18175
18176 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18177 variable.
18178
18179 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18180
18181 Implement the multiprocess extensions, and add linux multiprocess
18182 support.
18183
18184 * server.h (ULONGEST): Declare.
18185 (struct ptid, ptid_t): New.
18186 (minus_one_ptid, null_ptid): Declare.
18187 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18188 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18189 (struct inferior_list_entry): Change `id' type from unsigned from
18190 to ptid_t.
18191 (struct sym_cache, struct breakpoint, struct
18192 process_info_private): Forward declare.
18193 (struct process_info): Declare.
18194 (current_process): Declare.
18195 (all_processes): Declare.
18196 (initialize_inferiors): Declare.
18197 (add_thread): Adjust to use ptid_t.
18198 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18199 (add_process, remove_process, find_thread_pid): Declare.
18200 (find_inferior_id): Adjust to use ptid_t.
18201 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18202 (multi_process): Declare.
18203 (push_event): Adjust to use ptid_t.
18204 (read_ptid, write_ptid): Declare.
18205 (prepare_resume_reply): Adjust to use ptid_t.
18206 (clear_symbol_cache): Declare.
18207 * inferiors.c (all_processes): New.
18208 (null_ptid, minus_one_ptid): New.
18209 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18210 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18211 (add_thread): Change unsigned long to ptid. Remove gdb_id
18212 parameter. Adjust.
18213 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18214 (gdb_id_to_thread): Rename to ...
18215 (find_thread_pid): ... this. Change unsigned long to ptid.
18216 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18217 (loaded_dll, pull_pid_from_list): Adjust.
18218 (add_process, remove_process, find_process_pid)
18219 (get_thread_process, current_process, initialize_inferiors): New.
18220 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18221 (struct target_waitstatus) <related_pid>: Ditto.
18222 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18223 return type to int.
18224 (struct target_ops) <join>: Add `pid' argument.
18225 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18226 (struct target_ops) <wait>: Add `ptid' field. Change return type
18227 to ptid.
18228 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18229 (mywait): Add `ptid' argument. Change return type to ptid_t.
18230 (target_pid_to_str): Declare.
18231 * target.c (set_desired_inferior): Adjust to use ptids.
18232 (mywait): Add new `ptid' argument. Adjust.
18233 (target_pid_to_str): New.
18234 * mem-break.h (free_all_breakpoints): Declare.
18235 * mem-break.c (breakpoints): Delelete.
18236 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18237 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18238 to use per-process breakpoint list.
18239 (free_all_breakpoints): New.
18240 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18241 (symbol_cache, all_symbols_looked_up): Delete.
18242 (hexchars): New.
18243 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18244 read_ptid): New.
18245 (prepare_resume_reply): Change ptid argument's type from unsigned
18246 long to ptid_t. Adjust. Implement W;process and X;process.
18247 (free_sym_cache, clear_symbol_cache): New.
18248 (look_up_one_symbol): Adjust to per-process symbol cache. *
18249 * server.c (cont_thread, general_thread, step_thread): Change type
18250 to ptid_t.
18251 (attached): Delete.
18252 (multi_process): New.
18253 (last_ptid): Change type to ptid_t.
18254 (struct vstop_notif) <ptid>: Change type to ptid_t.
18255 (queue_stop_reply, push_event): Change `ptid' argument's type to
18256 ptid_t.
18257 (discard_queued_stop_replies): Add `pid' argument.
18258 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18259 changes. Don't reference the `attached' global.
18260 (attach_inferior): Adjust to mywait interface changes.
18261 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18262 features. Handle and report "multiprocess+". Handle
18263 "qAttached:PID".
18264 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18265 changes.
18266 (handle_v_kill): New.
18267 (handle_v_stopped): Adjust to use target_pid_to_str.
18268 (handle_v_requests): Allow multiple attaches and runs when
18269 multiprocess extensions are in effect. Handle "vKill".
18270 (myresume): Adjust to use ptids.
18271 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18272 (handle_status): Adjust to discard_queued_stop_replies interface
18273 change.
18274 (first_thread_of, kill_inferior_callback)
18275 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18276 (main): Call initialize_inferiors. Adjust to use ptids, killing
18277 and detaching from all inferiors. Handle multiprocess packet
18278 variants.
18279 * linux-low.h: Include gdb_proc_service.h.
18280 (struct process_info_private): New.
18281 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18282 <lwpid_of>: Use ptid_get_lwp.
18283 (get_lwp_thread): Adjust.
18284 (struct lwp_info): Add `dead' member.
18285 (find_lwp_pid): Declare.
18286 * linux-low.c (thread_db_active): Delete.
18287 (new_inferior): Adjust comment.
18288 (inferior_pid): Delete.
18289 (linux_add_process): New.
18290 (handle_extended_wait): Adjust.
18291 (add_lwp): Change unsigned long to ptid.
18292 (linux_create_inferior): Add process to processes table. Adjust
18293 to use ptids. Don't set new_inferior here.
18294 (linux_attach_lwp): Rename to ...
18295 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18296 it. Adjust to use ptids.
18297 (linux_attach_lwp): New.
18298 (linux_attach): Add process to processes table. Don't set
18299 new_inferior here.
18300 (struct counter): New.
18301 (second_thread_of_pid_p, last_thread_of_process_p): New.
18302 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18303 multiple processes.
18304 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18305 processes. Remove process from process table.
18306 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18307 to multiple processes.
18308 (any_thread_of): New.
18309 (linux_detach): Add `pid' argument, and handle it. Remove process
18310 from processes table.
18311 (linux_join): Add `pid' argument. Handle it.
18312 (linux_thread_alive): Change unsighed long argument to ptid_t.
18313 Consider dead lwps as not being alive.
18314 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18315 threads we're not interested in.
18316 (same_lwp, find_lwp_pid): New.
18317 (linux_wait_for_lwp): Change `pid' argument's type from int to
18318 ptid_t. Adjust.
18319 (linux_wait_for_event): Rename to ...
18320 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18321 from int to ptid_t. Adjust.
18322 (linux_wait_for_event): New.
18323 (linux_wait_1): Add `ptid' argument. Change return type to
18324 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18325 that exit from the process table.
18326 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18327 Adjust.
18328 (mark_lwp_dead): New.
18329 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18330 stopping all threads, mark its main lwp as dead.
18331 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18332 ptids.
18333 (fetch_register, usr_store_inferior_registers)
18334 (regsets_fetch_inferior_registers)
18335 (regsets_store_inferior_registers, linux_read_memory)
18336 (linux_write_memory): Inline `inferior_pid'.
18337 (linux_look_up_symbols): Adjust to use per-process
18338 `thread_db_active'.
18339 (linux_request_interrupt): Adjust to use ptids.
18340 (linux_read_auxv): Inline `inferior_pid'.
18341 (initialize_low): Don't reference thread_db_active.
18342 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18343 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18344 (ps_getpid): Return the pid of the current inferior.
18345 * thread-db.c (proc_handle, thread_agent): Delete.
18346 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18347 per-process data.
18348 (find_one_thread): Change argument type to ptid_t. Adjust to
18349 per-process data.
18350 (maybe_attach_thread): Adjust to per-process data and ptids.
18351 (thread_db_find_new_threads): Ditto.
18352 (thread_db_init): Ditto.
18353 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18354 processes table. Adjust to use ptids.
18355 (spu_kill, spu_detach): Adjust interface. Remove process from
18356 processes table.
18357 (spu_join, spu_thread_alive): Adjust interface.
18358 (spu_wait): Adjust interface. Remove process from processes
18359 table. Adjust to use ptids.
18360 * win32-low.c (current_inferior_tid): Delete.
18361 (current_inferior_ptid): New.
18362 (debug_event_ptid): New.
18363 (thread_rec): Take a ptid. Adjust.
18364 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18365 (child_delete_thread): Ditto.
18366 (do_initial_child_stuff): Add `attached' argument. Add process to
18367 processes table.
18368 (child_fetch_inferior_registers, child_store_inferior_registers):
18369 Adjust.
18370 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18371 (win32_attach): Pass 1 to do_initial_child_stuff.
18372 (win32_kill): Adjust interface. Remove process from processes
18373 table.
18374 (win32_detach): Ditto.
18375 (win32_join): Adjust interface.
18376 (win32_thread_alive): Take a ptid.
18377 (win32_resume): Adjust to use ptids.
18378 (get_child_debug_event): Ditto.
18379 (win32_wait): Adjust interface. Remove exiting process from
18380 processes table.
18381
18382 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18383
18384 Non-stop mode support.
18385
18386 * server.h (non_stop): Declare.
18387 (gdb_client_data, handler_func): Declare.
18388 (delete_file_handler, add_file_handler, start_event_loop):
18389 Declare.
18390 (handle_serial_event, handle_target_event, push_event)
18391 (putpkt_notif): Declare.
18392 * target.h (enum resume_kind): New.
18393 (struct thread_resume): Replace `step' field by `kind' field.
18394 (TARGET_WNOHANG): Define.
18395 (struct target_ops) <wait>: Add `options' argument.
18396 <supports_non_stop, async, start_non_stop>: New fields.
18397 (target_supports_non_stop, target_async): New.
18398 (start_non_stop): Declare.
18399 (mywait): Add `options' argument.
18400 * target.c (mywait): Add `options' argument. Print child exit
18401 notifications here.
18402 (start_non_stop): New.
18403 * server.c (non_stop, own_buf, mem_buf): New globals.
18404 (struct vstop_notif): New.
18405 (notif_queue): New global.
18406 (queue_stop_reply, push_event, discard_queued_stop_replies)
18407 (send_next_stop_reply): New.
18408 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18409 interface changes.
18410 (attach_inferior): In non-stop mode, don't wait for the target
18411 here.
18412 (handle_general_set): Handle QNonStop.
18413 (handle_query): When handling qC, return the current general
18414 thread, instead of the first thread of the list.
18415 (handle_query): If the backend supports non-stop mode, include
18416 QNonStop+ in the qSupported query response.
18417 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18418 and non-stop mode.
18419 (handle_v_attach, handle_v_run): Handle non-stop mode.
18420 (handle_v_stopped): New.
18421 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18422 (myresume): Adjust to use resume_kind. Handle non-stop.
18423 (queue_stop_reply_callback): New.
18424 (handle_status): Handle non-stop mode.
18425 (main): Clear non_stop flag on reconnection. Use the event-loop.
18426 Refactor serial protocol handling from here ...
18427 (process_serial_event): ... to this new function. When GDB
18428 selects any thread, select one here. In non-stop mode, wait until
18429 GDB acks all pending events before exiting.
18430 (handle_serial_event, handle_target_event): New.
18431 * remote-utils.c (remote_open): Install remote_desc in the event
18432 loop.
18433 (remote_close): Remove remote_desc from the event loop.
18434 (putpkt_binary): Rename to...
18435 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18436 (putpkt_binary): New as wrapper around putpkt_binary_1.
18437 (putpkt_notif): New.
18438 (prepare_resume_reply): In non-stop mode, don't change the
18439 general_thread.
18440 * event-loop.c: New.
18441 * Makefile.in (OBJ): Add event-loop.o.
18442 (event-loop.o): New rule.
18443
18444 * linux-low.h (pid_of): Moved here.
18445 (lwpid_of): New.
18446 (get_lwp_thread): Use lwpid_of.
18447 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18448 * linux-low.c (pid_of): Delete.
18449 (inferior_pid): Use lwpid_of.
18450 (linux_event_pipe): New.
18451 (target_is_async_p): New.
18452 (delete_lwp): New.
18453 (handle_extended_wait): Use lwpid_of.
18454 (add_lwp): Don't set lwpid field.
18455 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18456 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18457 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18458 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18459 first. Adjust to linux_wait_for_event interface changes. Use
18460 lwpid_of.
18461 (linux_detach): Don't delete the main lwp here.
18462 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18463 (status_pending_p): Don't consider explicitly suspended lwps.
18464 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18465 pointer. Add OPTIONS argument. Change return type to int. Use
18466 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18467 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18468 pointer. Add status pointer argument. Return a pid instead of a
18469 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18470 changes. In non-stop mode, don't switch to a random thread.
18471 (linux_wait): Rename to...
18472 (linux_wait_1): ... this. Add target_options argument, and handle
18473 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18474 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18475 clean exit and signal exit code. Don't stop all threads in
18476 non-stop mode. In all-stop mode, only stop all threads when
18477 reporting a stop to GDB. Handle explicit thread stop requests.
18478 (async_file_flush, async_file_mark): New.
18479 (linux_wait): New.
18480 (send_sigstop): Use lwpid_of.
18481 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18482 interface changes. In non-stop mode, don't switch to a random
18483 thread.
18484 (linux_resume_one_lwp): Use lwpid_of.
18485 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18486 (linux_resume_one_thread): ... this. Handle resume_stop. In
18487 non-stop mode, don't look for pending flag in all threads.
18488 (resume_status_pending_p): Don't consider explicitly suspended
18489 threads.
18490 (my_waitpid): Reimplement. Emulate __WALL.
18491 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18492 Use lwpid_of.
18493 (sigchld_handler, linux_supports_non_stop, linux_async)
18494 (linux_start_non_stop): New.
18495 (linux_target_ops): Register linux_supports_non_stop, linux_async
18496 and linux_start_non_stop.
18497 (initialize_low): Install SIGCHLD handler.
18498 * thread-db.c (thread_db_create_event, find_one_thread)
18499 (thread_db_get_tls_address): Use lwpid_of.
18500 * win32-low.c (win32_detach): Adjust to use resume_kind.
18501 (win32_wait): Add `options' argument.
18502 * spu-low.c (spu_resume): Adjust to use resume_kind.
18503 (spu_wait): Add `options' argument.
18504
18505 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18506
18507 Decouple target code from remote protocol.
18508
18509 * target.h (enum target_waitkind): New.
18510 (struct target_waitstatus): New.
18511 (struct target_ops) <wait>: Return an unsigned long. Take a
18512 target_waitstatus pointer instead of a char pointer.
18513 (mywait): Likewise.
18514 * target.c (mywait): Change prototype to return an unsigned long.
18515 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18516 * server.h (thread_from_wait, old_thread_from_wait): Delete
18517 declarations.
18518 (prepare_resume_reply): Change prototype to take a
18519 target_waitstatus.
18520 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18521 (last_status, last_ptid): New.
18522 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18523 pid instead of a signal.
18524 (attach_inferior): Remove "status" and "signal" parameters.
18525 Adjust.
18526 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18527 not as an address.
18528 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18529 (handle_v_requests, myresume): Remove "status" and "signal"
18530 parameters. Adjust.
18531 (handle_status): New.
18532 (main): Delete local `status'. Adjust.
18533 * remote-utils.c: Include target.h.
18534 (prepare_resume_reply): Change prototype to take a
18535 target_waitstatus. Adjust.
18536
18537 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18538 interface.
18539 * spu-low.c (spu_wait): Adjust.
18540 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18541 Delete.
18542 (win32_wait): Adjust.
18543
18544 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18545
18546 * target.h (struct thread_resume): Delete leave_stopped member.
18547 (struct target_ops): Add a `n' argument to the `resume' callback.
18548 * server.c (start_inferior): Adjust.
18549 (handle_v_cont, myresume): Adjust.
18550 * linux-low.c (check_removed_breakpoint): Adjust to resume
18551 interface change, and to removed leave_stopped field.
18552 (resume_ptr): Delete.
18553 (struct thread_resume_array): New.
18554 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18555 resume interface change.
18556 (linux_continue_one_thread, linux_queue_one_thread)
18557 (resume_status_pending_p): Check if the resume field is NULL
18558 instead of checking the leave_stopped member.
18559 (linux_resume): Adjust to the target resume interface change.
18560 * spu-low.c (spu_resume): Adjust to the target resume interface
18561 change.
18562 * win32-low.c (win32_detach, win32_resume): Ditto.
18563
18564 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18565
18566 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18567 flag.
18568 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18569 pending.
18570 (linux_continue_one_thread): Only preserve the stepping flag if
18571 there's a pending breakpoint.
18572
18573 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18574
18575 * server.c (main): After the inferior having exited, call
18576 remote_close before exiting gdbserver.
18577
18578 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18579
18580 Fix size of FPSCR in Power 7 processors.
18581 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18582 (PPC_FEATURE_HAS_DFP): New #define.
18583 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18584 size of the FPSCR.
18585
18586 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18587
18588 * server.c (handle_query) Whitespace and formatting.
18589
18590 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18591
18592 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18593 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18594 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18595 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18596 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18597 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18598 Makefile.in, configure.ac: Fix whitespace throughout.
18599 * configure: Regenerate.
18600
18601 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18602
18603 * inferiors.c (find_inferior): Make it safe for the callback
18604 function to delete the currently iterated inferior.
18605
18606 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18607
18608 * Makefile.in (linuw_low_h): Move higher.
18609 (thread-db.o): Depend on $(linux_low_h).
18610
18611 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18612
18613 Rename "process" to "lwp" throughout.
18614
18615 * linux-low.c (all_processes): Rename to...
18616 (all_lwps): ... this.
18617 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18618 (add_process): Rename to ...
18619 (add_lwp): ... this. Adjust.
18620 (linux_create_inferior): Adjust.
18621 (linux_attach_lwp): Adjust.
18622 (linux_attach): Adjust.
18623 (linux_kill_one_process): Rename to ...
18624 (linux_kill_one_lwp): ... this. Adjust.
18625 (linux_kill): Adjust.
18626 (linux_detach_one_process): Rename to ...
18627 (linux_detach_one_lwp): ... this. Adjust.
18628 (linux_detach): Adjust.
18629 (check_removed_breakpoint): Adjust.
18630 (status_pending_p): Adjust.
18631 (linux_wait_for_process): Rename to ...
18632 (linux_wait_for_lwp): ... this. Adjust.
18633 (linux_wait_for_event): Adjust.
18634 (send_sigstop): Adjust.
18635 (wait_for_sigstop): Adjust.
18636 (stop_all_processes): Rename to ...
18637 (stop_all_lwps): ... this.
18638 (linux_resume_one_process): Rename to ...
18639 (linux_resume_one_lwp): ... this. Adjust.
18640 (linux_set_resume_request, linux_continue_one_thread)
18641 (linux_queue_one_thread, resume_status_pending_p)
18642 (usr_store_inferior_registers, regsets_store_inferior_registers)
18643 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18644 Adjust.
18645 * linux-low.h (get_process): Rename to ...
18646 (get_lwp): ... this. Adjust.
18647 (get_thread_process): Rename to ...
18648 (get_thread_lwp): ... this. Adjust.
18649 (get_process_thread): Rename to ...
18650 (get_lwp_thread): ... this. Adjust.
18651 (struct process_info): Rename to ...
18652 (struct lwp_info): ... this.
18653 (all_processes): Rename to ...
18654 (all_lwps): ... this.
18655 * proc-service.c (ps_lgetregs): Adjust.
18656 * thread-db.c (thread_db_create_event, find_one_thread)
18657 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18658
18659 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18660
18661 * server.c (handle_query): Handle "qAttached".
18662
18663 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18664
18665 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18666 GPLv3, update license URL.
18667
18668 2009-03-01 Doug Evans <dje@google.com>
18669
18670 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18671 (server_h): Add gdb_signals.h.
18672 (signals.o): Update.
18673 * server.h (target_signal_from_host,target_signal_to_host_p)
18674 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18675
18676 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18677
18678 * remote-utils.c (getpkt): Also generate remote-debug
18679 information if noack_mode is set.
18680
18681 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18682
18683 * server.c (handle_query): Report qXfer:siginfo:read and
18684 qXfer:siginfo:write as supported and handle them.
18685 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18686 * linux-low.c (linux_xfer_siginfo): New.
18687 (linux_target_ops): Set it.
18688
18689 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18690
18691 * server.c (gdbserver_usage): Mention --remote-debug.
18692 (main): Accept '--remote-debug' switch.
18693
18694 2009-01-18 Doug Evans <dje@google.com>
18695
18696 * regcache.c (new_register_cache): No need to check result of xcalloc.
18697 * server.c (handle_search_memory): Back out calls to xmalloc,
18698 result is checked and error is returned to user upon failure.
18699 (handle_query): Ditto. Add more checks for result of malloc.
18700 (handle_v_cont): Check result of malloc, report error back to
18701 user upon failure.
18702 (handle_v_run): Ditto. Call freeargv.
18703 * server.h (freeargv): Declare.
18704 * utils.c (freeargv): New fn.
18705
18706 2009-01-15 Doug Evans <dje@google.com>
18707
18708 * gdbreplay.c (perror_with_name): Make arg const char *.
18709 * server.h (target_signal_to_name): Make return type const char *.
18710 * thread-db.c (thread_db_err_str): Make return type const char *.
18711 * utils.c (perror_with_name): Make arg const char *.
18712
18713 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18714
18715 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18716 when handling a EXIT_PROCESS_DEBUG_EVENT.
18717
18718 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18719
18720 * gdbreplay.c (gdbreplay_version): Update copyright year.
18721 * server.c (gdbserver_version): Likewise.
18722
18723 2009-01-05 Doug Evans <dje@google.com>
18724
18725 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18726 (handle_extended_wait): Improve comment.
18727
18728 2008-12-13 Doug Evans <dje@google.com>
18729
18730 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18731 * server.h (ATTR_MALLOC): New macro.
18732 (xmalloc,xcalloc,xstrdup): Declare.
18733 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18734 * inferiors.c: Ditto.
18735 * linux-low.c: Ditto.
18736 * mem-break.c: Ditto.
18737 * regcache.c: Ditto.
18738 * remote-utils.c: Ditto.
18739 * server.c: Ditto.
18740 * target.c: Ditto.
18741 * win32-low.c: Ditto.
18742
18743 2008-12-12 Doug Evans <dje@google.com>
18744
18745 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18746 in debugging printf.
18747
18748 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18749
18750 2008-12-09 Doug Evans <dje@google.com>
18751
18752 * linux-low.h (struct process_info): Delete member tid, unused.
18753 * thread-db.c (find_one_thread): Update.
18754 (maybe_attach_thread): Update.
18755
18756 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18757
18758 * target.h (struct target_ops): Add qxfer_osdata member.
18759 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18760 and dirent.h.
18761 (linux_qxfer_osdata): New functions.
18762 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18763 callback.
18764 * server.c (handle_query): Handle "qXfer:osdata:read:".
18765 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18766 (buffer_xml_printf): New functions.
18767 * server.h (struct buffer): New.
18768 (buffer_grow_str, buffer_grow_str0): New macros.
18769 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18770 (buffer_xml_printf): Declare.
18771
18772 2008-11-24 Doug Evans <dje@google.com>
18773
18774 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18775
18776 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18777
18778 * server.c (handle_v_run): Always use the supplied argument list.
18779
18780 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18781
18782 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18783 (xtensa_regmap_table): Add entry for scompare1.
18784
18785 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18786
18787 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18788 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18789 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18790 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18791 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18792 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18793 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18794 XML target descriptions.
18795 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18796 when inferior is running on an ISA 2.05 or later processor. Add
18797 special case to return offset for full 64-bit slot of FPSCR when
18798 in 32-bits.
18799
18800 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18801
18802 * Makefile.in (SFILES, clean): Added sparc64 files.
18803 (reg-sparc64.o, reg-sparc64.c): New.
18804 * configure.srv (sparc*-*-linux*): New configuration.
18805 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18806 syscall arguments for SPARC.
18807 (regsets_store_inferior_registers): Likewise.
18808 * linux-sparc-low.c: New file.
18809
18810 2008-10-21 Doug Evans <dje@google.com>
18811
18812 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18813 (READLINE_DIR,READLINE_DEP): Delete.
18814 (INTERNAL_CFLAGS): Update.
18815 (LINTFLAGS): Update.
18816
18817 2008-10-10 Pedro Alves <pedro@codesourcery.com>
18818
18819 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18820 whole argv from the last run, not just argv[0].
18821
18822 2008-09-08 Pedro Alves <pedro@codesourcery.com>
18823
18824 * regcache.c (new_register_cache): Return NULL if the register
18825 cache size isn't known yet.
18826 (free_register_cache): Avoid dereferencing a NULL regcache.
18827
18828 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18829
18830 * configure.srv: Merge MIPS and MIPS64.
18831
18832 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18833
18834 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18835
18836 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
18837
18838 * Makefile.in: Add required vsx dependencies.
18839
18840 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18841 Declare init_registers_powerpc_vsx32l.
18842 Declare init_registers_powerpc_vsx64l.
18843 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18844 (ppc_arch_setup): Check for VSX in hwcap.
18845 (ppc_fill_vsxregset): New function.
18846 (ppc_store_vsxregset): New function.
18847 Add new VSX entry in regset_info target_regsets.
18848
18849 * configure.srv: Add new VSX dependencies.
18850
18851 2008-08-12 Pedro Alves <pedro@codesourcery.com>
18852
18853 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18854 (remote_open): Set or clear transport_is_reliable.
18855 (putpkt_binary): Don't expect acks in noack mode.
18856 (getpkt): Don't send ack/nac in noack mode.
18857 * server.c (handle_general_set): Handle QStartNoAckMode.
18858 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18859 qSupported.
18860 (main): Reset noack_mode on every connection.
18861 * server.h (noack_mode): Declare.
18862
18863 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18864
18865 * Makefile.in (GDBREPLAY_OBS): New variable.
18866 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18867
18868 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18869 Daniel Jacobowitz <dan@codesourcery.com>
18870
18871 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18872 (usr_store_inferior_registers): Likewise.
18873 (regsets_store_inferior_registers): Likewise.
18874
18875 2008-07-31 Rolf Jansen <rj@surtec.com>
18876 Pedro Alves <pedro@codesourcery.com>
18877
18878 * configure.ac: Check for memmem declaration.
18879 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18880 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18881 (disable_packet_qfThreadInfo): Unconditionally compile.
18882 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18883 * configure, config.in: Regenerate.
18884
18885 2008-07-28 Doug Kwan <dougkwan@google.com>
18886
18887 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18888 (linux_write_memory): Remove declaration of errno.
18889
18890 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18891
18892 * linux-low.c (handle_extended_wait): Do not use "status"
18893 variable uninitialized.
18894
18895 2008-07-07 Pedro Alves <pedro@codesourcery.com>
18896
18897 * server.c (handle_v_attach): Inhibit reporting dll changes.
18898
18899 2008-06-27 Pedro Alves <pedro@codesourcery.com>
18900
18901 * remote-utils.c (prepare_resume_reply): If requested, don't
18902 output "thread:TID" in the T stop reply.
18903
18904 * server.c (disable_packet_vCont, disable_packet_Tthread)
18905 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18906 (handle_query): If requested, disable support for qC, qfThreadInfo
18907 and qsThreadInfo.
18908 (handle_v_requests): If requested, disable support for vCont.
18909 (gdbserver_show_disableable): New.
18910 (main): Handle --disable-packet and --disable-packet=LIST.
18911
18912 * server.h (disable_packet_vCont, disable_packet_Tthread)
18913 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18914
18915 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18916
18917 * server.c (gdbserver_usage): Mention --version.
18918
18919 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18920
18921 * Makefile.in (gdbreplay.o): New rule.
18922
18923 2008-06-06 Joseph Myers <joseph@codesourcery.com>
18924
18925 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18926 message, not gdbserver.
18927
18928 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
18929 Nathan Sidwell <nathan@codesourcery.com>
18930 Joseph Myers <joseph@codesourcery.com>
18931
18932 * acinclude.m4: Include ../../config/acx.m4.
18933 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18934 * configure, config.in: Regenerate.
18935 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18936 * server.c (gdbserver_version): Print PKGVERSION.
18937 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18938 (main): Adjust gdbserver_usage calls.
18939 * gdbreplay.c (version, host_name): Add declarations.
18940 (gdbreplay_version, gdbreplay_usage): New.
18941 (main): Accept --version and --help options.
18942
18943 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18944
18945 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18946 (arm_breakpoint_at): Handle Thumb.
18947 (the_low_target): Add comment.
18948
18949 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18950
18951 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18952
18953 2008-05-09 Doug Evans <dje@google.com>
18954
18955 * server.h (decode_search_memory_packet): Declare.
18956 * remote-utils.c (decode_search_memory_packet): New fn.
18957 * server.c (handle_search_memory_1): New fn.
18958 (handle_search_memory): New fn.
18959 (handle_query): Process qSearch:memory packets.
18960
18961 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18962
18963 * regcache.c (registers_length): Remove.
18964 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18965 full register packet.
18966 * regcache.h (registers_length): Remove prototype.
18967 * server.h (PBUFSIZ): Define to 16384.
18968
18969 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18970
18971 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18972 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18973 powerpc-64l.o, and powerpc-altivec64l.o.
18974 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18975 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18976 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18977 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18978 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18979 to srv_xmlfiles.
18980
18981 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18982 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18983 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18984 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18985 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18986 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18987 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18988 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18989 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18990 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18991 (clean): Update.
18992
18993 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18994 (init_registers_powerpc_32l): ... this new prototype.
18995 (init_registers_powerpc_32): Remove, replace by ...
18996 (init_registers_powerpc_altivec32l): ... this new prototype.
18997 (init_registers_powerpc_e500): Remove, replace by ...
18998 (init_registers_powerpc_e500l): ... this new prototype.
18999 (init_registers_ppc64): Remove, replace by ...
19000 (init_registers_powerpc_64l): ... this new prototype.
19001 (init_registers_powerpc_64): Remove, replace by ...
19002 (init_registers_powerpc_altivec64l): ... this new prototype.
19003 (ppc_num_regs): Set to 73.
19004 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19005 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19006 (ppc_cannot_store_register): Handle orig_r3 and trap.
19007 (ppc_arch_setup): Update init_registers_... calls.
19008 (ppc_fill_gregset): Handle orig_r3 and trap.
19009
19010 * inferiors.c (clear_inferiors): Reset current_inferior.
19011
19012 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19013
19014 * acinclude.m4: Add override.m4.
19015 * configure: Regenerate.
19016
19017 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19018
19019 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19020 initial call to init_register_ppc64.
19021
19022 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19023
19024 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19025 single powerpc*-*-linux* case.
19026 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19027
19028 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19029
19030 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19031 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19032 from reg_xmlfiles.
19033 * linux-ppc-low.c: Include <elf.h>.
19034 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19035 (ppc_hwcap): New global variable.
19036 (ppc_regmap): Remove __SPE__ #ifdef sections.
19037 (ppc_regmap_e500): New global variable.
19038 (ppc_cannot_store_register): Update __SPE__ special case.
19039 (ppc_get_hwcap): New function.
19040 (ppc_arch_setup): Use it to determine whether inferior supports
19041 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19042 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19043 Do not access registers if target does not support AltiVec.
19044 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19045 Do not access registers if target does not support SPE.
19046 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19047
19048 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19049
19050 * linux-low.c (disabled_regsets, num_regsets): New.
19051 (use_regsets_p): Delete.
19052 (linux_wait_for_process): Clear disabled_regsets.
19053 (regsets_fetch_inferior_registers): Check and set it.
19054 (regsets_store_inferior_registers): Likewise.
19055 (linux_fetch_registers, linux_store_registers): Do not use
19056 use_regsets_p.
19057 (initialize_low): Allocate disabled_regsets.
19058
19059 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19060
19061 * Makefile.in (LIBOBJS): New.
19062 (OBS): Use LIBOBJS.
19063 (memmem.o): New rule.
19064 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19065 * configure: Regenerated.
19066
19067 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19068
19069 * server.c (handle_query): Never return "unsupported" for
19070 qXfer:features:read queries.
19071
19072 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19073
19074 * server.c (get_features_xml): Fix inverted condition.
19075 (handle_query): Always support qXfer:feature:read.
19076
19077 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19078
19079 * server.c (wrapper_argv): New.
19080 (start_inferior): Handle wrapper_argv. If set, expect an extra
19081 trap.
19082 (gdbserver_usage): Document --wrapper.
19083 (main): Parse --wrapper.
19084
19085 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19086
19087 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19088 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19089 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19090 (ppc_set_pc): Likewise.
19091 (ppc_arch_setup): New function.
19092 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19093 of collect_register.
19094 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19095
19096 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19097
19098 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19099 instead of linux-ppc64-low.o.
19100 * linux-ppc64-low.c: Remove file.
19101 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19102 (linux-ppc64-low.o): Remove rule.
19103
19104 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19105 (init_registers_powerpc_64): Likewise.
19106 (ppc_regmap): Conditionally define depending on __powerpc64__.
19107 (ppc_cannot_store_register): Do not special-case "fpscr" when
19108 compiled on __powerpc64__.
19109 (ppc_collect_ptrace_register): New function.
19110 (ppc_supply_ptrace_register): New function.
19111 (ppc_breakpoint): Change type to "unsigned int".
19112 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19113 (the_low_target): Conditionally provide initializers for the
19114 arch_setup member depending on __powerpc64__. Install
19115 collect_ptrace_register and supply_ptrace_register members.
19116
19117 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19118
19119 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19120 * server.c (gdbserver_xmltarget): Define.
19121 (get_features_xml): Use it to replace "target.xml" and arch_string.
19122
19123 * configure.srv: Remove srv_xmltarget. Add XML files that were
19124 mentioned there to srv_xmlfiles instead. Remove conditional tests
19125 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19126 srv_xmlfiles and srv_regobj to include all possible choices.
19127 * configure.ac (srv_xmltarget): Remove.
19128 (srv_xmlfiles): Do not add "target.xml".
19129 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19130 checks for supplementary target information.
19131 * configure: Regenerate.
19132 * Makefile.in (XML_TARGET): Remove.
19133 (target.xml): Remove rule.
19134 (clean): Do not clean up target.xml.
19135 (.PRECIOUS): Do not mention target.xml.
19136
19137 * target.h (struct target_ops): Remove arch_string member.
19138 * linux-low.c (linux_arch_string): Remove.
19139 (linux_target_ops): Remove arch_string initializer.
19140 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19141 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19142 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19143 * spu-low.c (spu_arch_string): Remove.
19144 (spu_target_ops): Remove arch_string initializer.
19145 * win32-low.c (win32_arch_string): Remove.
19146 (win32_target_ops): Remove arch_string initializer.
19147 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19148 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19149 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19150
19151 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19152
19153 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19154 by collect_ptrace_register and supply_ptrace_register hooks.
19155 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19156 instead of checking for the_low_target.left_pad_xfer.
19157 (usr_store_inferior_registers): Use collect_ptrace_register callback
19158 instead of checking for the_low_target.left_pad_xfer.
19159
19160 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19161 (s390_supply_ptrace_register): Likewise.
19162 (s390_fill_gregset): Call s390_collect_ptrace_register.
19163 (the_low_target): Update.
19164
19165 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19166 (ppc_supply_ptrace_register): Likewise.
19167 (the_low_target): Update.
19168
19169 * linux-i386-low.c (the_low_target): Update.
19170 * linux-x86-64-low.c (the_low_target): Update.
19171
19172 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19173
19174 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19175 reg-s390.o and reg-s390x.o.
19176
19177 * linux-low.c (new_inferior): New global variable.
19178 (linux_create_inferior, linux_attach): Set it.
19179 (linux_wait_for_process): Call the_low_target.arch_setup after the
19180 target has stopped for the first time.
19181 (initialize_low): Do not call the_low_target.arch_setup.
19182
19183 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19184 (s390_set_pc): Likewise.
19185 (s390_arch_setup): New function.
19186 (the_low_target): Use s390_arch_setup as arch_setup routine.
19187
19188 * regcache.c (realloc_register_cache): New function.
19189 (set_register_cache): Call it for each existing regcache.
19190
19191 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19192
19193 * server.h (init_registers): Remove prototype.
19194
19195 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19196 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19197 instead of init_registers ().
19198 * linux-arm-low.c (init_registers_arm): Add prototype.
19199 (init_registers_arm_with_iwmmxt): Likewise.
19200 (the_low_target): Add initializer for arch_setup field.
19201 * linux-cris-low.c (init_registers_cris): Add prototype.
19202 (the_low_target): Add initializer for arch_setup field.
19203 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19204 (the_low_target): Add initializer for arch_setup field.
19205 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19206 (the_low_target): Add initializer for arch_setup field.
19207 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19208 (the_low_target): Add initializer for arch_setup field.
19209 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19210 (the_low_target): Add initializer for arch_setup field.
19211 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19212 (the_low_target): Add initializer for arch_setup field.
19213 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19214 (init_registers_mips64_linux): Likewise.
19215 (the_low_target): Add initializer for arch_setup field.
19216 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19217 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19218 (the_low_target): Add initializer for arch_setup field.
19219 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19220 (init_registers_powerpc_64): Likewise.
19221 (the_low_target): Add initializer for arch_setup field.
19222 * linux-s390-low.c (init_registers_s390): Add prototype.
19223 (init_registers_s390x): Likewise.
19224 (the_low_target): Add initializer for arch_setup field.
19225 * linux-sh-low.c (init_registers_sh): Add prototype.
19226 (the_low_target): Add initializer for arch_setup field.
19227 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19228 (the_low_target): Add initializer for arch_setup field.
19229 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19230 (the_low_target): Add initializer for arch_setup field.
19231
19232 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19233 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19234 instead of init_registers ().
19235 * win32-arm-low.c (init_registers_arm): Add prototype.
19236 (the_low_target): Add initializer for arch_setup field.
19237 * win32-i386-low.c (init_registers_i386): Add prototype.
19238 (the_low_target): Add initializer for arch_setup field.
19239
19240 * spu-low.c (init_registers_spu): Add prototype.
19241 (initialize_low): Call initialie_registers_spu () instead of
19242 initialize_registers ().
19243
19244 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19245
19246 * server.c (handle_v_requests): When handling the vRun and vAttach
19247 packets, if already debugging a process, don't kill it. Return an
19248 error instead.
19249
19250 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19251
19252 * server.c (handle_query): Correct length check.
19253
19254 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19255
19256 * win32-low.c (do_initial_child_stuff): Add process handle
19257 parameter. Set current_process_handle and current_process_id from the
19258 parameters. Clear globals.
19259 (win32_create_inferior): Don't set current_process_handle and
19260 current_process_id here. Instead pass them on the call to
19261 do_initial_child_stuff.
19262 (win32_attach): Likewise.
19263 (win32_clear_inferiors): New.
19264 (win32_kill): Don't close the current process handle or the
19265 current thread handle here. Instead call win32_clear_inferiors.
19266 (win32_detach): Don't open a new handle to the process. Call
19267 win32_clear_inferiors.
19268 (win32_join): Don't rely on current_process_handle; open a new
19269 handle using the process id.
19270 (win32_wait): Call win32_clear_inferiors when the inferior process
19271 has exited.
19272
19273 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19274
19275 * server.c (monitor_show_help): Add "exit".
19276
19277 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19278
19279 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19280 (clean): Add reg-xtensa.c.
19281 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19282 * configure.srv (xtensa*-*-linux*) New target.
19283 * linux-xtensa-low.c: New.
19284 * xtensa-xtregs.c: New.
19285
19286 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19287
19288 * hostio.c: Don't include errno.h.
19289 (errno_to_fileio_errno): Move to hostio-errno.
19290 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19291 error number outputting to the target->hostio_last_error callback.
19292 (hostio_packet_error): Use FILEIO_EINVAL directly.
19293 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19294 calls to hostio_error.
19295 * hostio-errno.c: New.
19296 * server.h (hostio_last_error_from_errno): Declare.
19297 * target.h (target_ops): Add hostio_last_error member.
19298 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19299 as hostio_last_error handler.
19300 * spu-low.c (spu_target_ops): Likewise.
19301 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19302 (wince_hostio_last_error): New functions.
19303 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19304 as hostio_last_error handler.
19305 (win32_target_ops) [!_WIN32_WCE]: Register
19306 hostio_last_error_from_errno as hostio_last_error handler.
19307 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19308 (hostio-errno.o): New rule.
19309 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19310 * configure.srv (srv_hostio_err_objs): New variable. Default to
19311 hostio-errno.o.
19312 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19313 * configure: Regenerate.
19314
19315 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19316
19317 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19318 (linux_kill, linux_detach): Clean up the process list.
19319 * remote-utils.c (remote_open): Improve port number parsing.
19320 (putpkt_binary, input_interrupt): Only send interrupts if the target
19321 is running.
19322 * server.c (extended_protocol): Make static.
19323 (attached): Define earlier.
19324 (exit_requested, response_needed, program_argv): New variables.
19325 (target_running): New.
19326 (start_inferior): Clear attached here.
19327 (attach_inferior): Set attached here.
19328 (require_running): Define.
19329 (handle_query): Use require_running and target_running. Implement
19330 "monitor exit".
19331 (handle_v_attach, handle_v_run): New.
19332 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19333 (gdbserver_usage): Update.
19334 (main): Redo argument parsing. Handle --debug and --multi. Handle
19335 --attach along with other options or after the port. Save
19336 program_argv. Support no initial program. Resynchronize
19337 communication with GDB after an error. Handle "monitor exit".
19338 Use require_running and target_running. Always allow the extended
19339 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19340 restart in extended mode.
19341 * README: Refer to the GDB manual. Update --attach usage.
19342
19343 2007-12-20 Andreas Schwab <schwab@suse.de>
19344
19345 * linux-low.c (STACK_SIZE): Define.
19346 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19347 (linux_test_for_tracefork): Likewise.
19348
19349 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19350
19351 * linux-low.c (linux_wait_for_event): Update messages. Do not
19352 reinsert auto-delete breakpoints.
19353 * mem-break.c (struct breakpoint): Change return type of handler to
19354 int.
19355 (set_breakpoint_at): Update handler type.
19356 (reinsert_breakpoint_handler): Return 1 instead of calling
19357 delete_breakpoint.
19358 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19359 setting a new one.
19360 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19361 * mem-break.h (set_breakpoint_at): Update handler type.
19362 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19363 * win32-low.c (auto_delete_breakpoint): New.
19364 (get_child_debug_event): Use it.
19365
19366 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19367
19368 * configure.ac: Check for pread and pwrite.
19369 * hostio.c (handle_pread): Fall back to lseek and read.
19370 (handle_pwrite): Fall back to lseek and write.
19371 * config.in, configure: Regenerated.
19372
19373 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19374
19375 * server.c (myresume): Add own_buf argument.
19376 (main): Update calls.
19377
19378 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19379
19380 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19381 * remote-utils.c (remote_open): Do not call disable_async_io.
19382 (block_async_io): Delete.
19383 (unblock_async_io): Make static.
19384 (initialize_async_io): New.
19385 * server.c (handle_v_cont): Handle async I/O here.
19386 (myresume): Likewise. Move other common resume tasks here...
19387 (main): ... from here. Call initialize_async_io. Disable async
19388 I/O before the main loop.
19389 * server.h (initialize_async_io): Declare.
19390 (block_async_io, unblock_async_io): Delete prototypes.
19391 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19392
19393 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19394
19395 * remote-utils.c (readchar): Allow binary data in received messages.
19396
19397 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19398
19399 * win32-low.c (attaching): New global.
19400 (win32_create_inferior): Clear the `attaching' global.
19401 (win32_attach): Set the `attaching' global.
19402 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19403 attaching. Only set a breakpoint at the entry point if not
19404 attaching.
19405
19406 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19407
19408 * server.c (main): Don't report dll events on the initial
19409 connection on attaches.
19410
19411 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19412
19413 * server.c (main): Relax numerical bases supported for the pid of
19414 the --attach command line argument.
19415
19416 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19417
19418 * win32-low.c (win32_attach): Call OpenProcess before
19419 DebugActiveProcess, not after. Add last error output to error
19420 call.
19421
19422 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19423
19424 * win32-low.c (win32_get_thread_context)
19425 (win32_set_thread_context): New functions.
19426 (thread_rec): Use win32_get_thread_context.
19427 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19428 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19429 field.
19430
19431 2007-12-03 Leo Zayas
19432 Pedro Alves <pedro_alves@portugalmail.pt>
19433
19434 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19435 global variables.
19436 (child_add_thread): Minor cleanup.
19437 (child_continue): Resume artificially suspended threads before
19438 calling ContinueDebugEvent.
19439 (suspend_one_thread): New.
19440 (fake_breakpoint_event): New.
19441 (get_child_debug_event): Change return type to int. Check here if
19442 gdb sent an interrupt request. If a soft interrupt was requested,
19443 fake a breakpoint event. Return 0 if there is no event to handle,
19444 and 1 otherwise.
19445 (win32_wait): Don't check here if gdb sent an interrupt request.
19446 Ensure there is a valid event to handle.
19447 (win32_request_interrupt): Add soft interruption method as last
19448 resort.
19449
19450 2007-12-03 Leo Zayas
19451 Pedro Alves <pedro_alves@portugalmail.pt>
19452
19453 * win32-low.h (win32_thread_info): Add descriptions to the
19454 structure members. Replace `suspend_count' counter by a
19455 `suspended' flag.
19456 * win32-low.c (thread_rec): Update condition of when to get the
19457 context from the inferior. Rely on ContextFlags being set if it
19458 has already been retrieved. Only suspend the inferior thread if
19459 we haven't already. Warn if that fails.
19460 (continue_one_thread): s/suspend_count/suspended/. Only call
19461 ResumeThread once. Warn if that fails.
19462
19463 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19464
19465 * win32-low.c (win32_wait): Don't read from the inferior when it
19466 has already exited.
19467
19468 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19469
19470 * Makefile.in (win32_low_h): New variable.
19471 (win32-low.o): Add dependency on $(win32_low_h).
19472 (win32-arm-low.o, win32-i386-low.o): New rules.
19473
19474 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19475
19476 * hostio.c: Correct copyright year.
19477
19478 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19479
19480 * Makefile.in (OBS): Add hostio.o.
19481 (hostio.o): New rule.
19482 * server.h (handle_vFile): Declare.
19483 * hostio.c: New file.
19484 * server.c (handle_v_requests): Take packet_len and new_packet_len
19485 for binary packets. Call handle_vFile.
19486 (main): Update call to handle_v_requests.
19487
19488 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19489
19490 * linux-low.c: Include <sched.h>.
19491
19492 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19493
19494 * linux-low.c (linux_tracefork_grandchild): New.
19495 (linux_tracefork_child): Use clone.
19496 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19497
19498 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19499
19500 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19501
19502 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19503
19504 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19505
19506 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19507
19508 * inferiors.c (change_inferior_id): Delete.
19509 (add_pid_to_list, pull_pid_from_list): New.
19510 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19511 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19512 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19513 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19514 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19515 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19516 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19517 (using_threads): Always set to 1.
19518 (handle_extended_wait): New.
19519 (add_process): Do not set TID.
19520 (linux_create_inferior): Set must_set_ptrace_flags.
19521 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19522 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19523 (linux_thread_alive): Rename TID argument to LWPID.
19524 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19525 (linux_wait_for_event): Do not use TID or check using_threads. Update
19526 call to dead_thread_notify. Call handle_extended_wait.
19527 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19528 (send_sigstop): Delete sigstop_sent.
19529 (wait_for_sigstop): Avoid TID.
19530 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19531 (linux_test_for_tracefork): New.
19532 (linux_lookup_signals): Use thread_db_active and
19533 linux_supports_tracefork_flag.
19534 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19535 * linux-low.h (get_process_thread): Avoid TID.
19536 (struct process_ifo): Move thread_known and tid to the end. Remove
19537 sigstop_sent.
19538 (linux_attach_lwp, thread_db_init): Update prototypes.
19539 * server.h (change_inferior_id): Delete prototype.
19540 (add_pid_to_list, pull_pid_from_list): New prototypes.
19541 * thread-db.c (thread_db_use_events): New.
19542 (find_first_thread): Rename to...
19543 (find_one_thread): ...this. Update callers and messages. Do not
19544 call fatal. Check thread_db_use_events. Do not call
19545 change_inferior_id or new_thread_notify.
19546 (maybe_attach_thread): Update. Do not call new_thread_notify.
19547 (thread_db_init): Set thread_db_use_events. Check use_events.
19548 * utils.c (fatal, warning): Correct message prefix.
19549
19550 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19551
19552 * Makefile.in (clean): Remove new files.
19553 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19554 (powerpc-64.o, powerpc-64.c): New rules.
19555 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19556 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19557 with SPE.
19558 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19559 SPE targets.
19560 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19561 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19562 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19563 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19564 (target_regsets): Add AltiVec and SPE register sets.
19565 * configure.ac: Check for AltiVec and SPE.
19566 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19567 (ppc_fill_vrregset, ppc_store_vrregset): New.
19568 (target_regsets): Add AltiVec register set.
19569 * configure: Regenerated.
19570
19571 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19572
19573 * linux-low.c (O_LARGEFILE): Define.
19574 (linux_read_memory): Use /proc/PID/mem.
19575 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19576 * configure, config.in: Regenerated.
19577
19578 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19579
19580 * linux-low.c (linux_wait_for_event): Do not pass signals while
19581 single-stepping.
19582
19583 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19584
19585 * win32-low.c (create_process): New.
19586 (win32_create_inferior): Use create_process instead of
19587 CreateProcess. If create_process failed retry appending an ".exe"
19588 suffix. Store the GetLastError result immediatelly after
19589 create_process calls and use it on the call to error.
19590
19591 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19592
19593 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19594
19595 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19596
19597 * configure.ac: Switch license to GPLv3.
19598
19599 2007-08-01 Michael Snyder <msnyder@access-company.com>
19600
19601 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19602
19603 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19604
19605 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19606 typedef.
19607 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19608 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19609 CloseToolhelp32Snapshot.
19610 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19611 CloseToolhelp32Snapshot.
19612
19613 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19614
19615 * server.c (main): Check for inferior exit before main loop.
19616
19617 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19618
19619 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19620 instead of on tmp_desc.
19621
19622 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19623 Daniel Jacobowitz <dan@codesourcery.com>
19624
19625 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19626 (add_thread): Minor cleanups.
19627 (clear_inferiors): Move lower in the file. Clear the DLL
19628 list.
19629 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19630 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19631 (xml_escape_text): New.
19632 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19633 for qSupported.
19634 (handle_v_cont): Report errors.
19635 (gdbserver_version): Update.
19636 (main): Correct size of own_buf. Do not report initial DLL events.
19637 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19638 (unloaded_dll, xml_escape_text): New.
19639 * win32-low.c (enum target_waitkind): Update comments.
19640 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19641 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19642 (win32_EnumProcessModules, win32_GetModuleInformation)
19643 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19644 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19645 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19646 (win32_Module32First, win32_Module32Next, load_toolhelp)
19647 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19648 (get_child_debug_event): Handle DLL events.
19649 (win32_wait): Likewise.
19650
19651 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19652
19653 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19654 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19655
19656 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19657
19658 * win32-low.c (handle_output_debug_string): Ignore event if not
19659 waiting.
19660
19661 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19662
19663 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19664
19665 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19666
19667 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19668
19669 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19670
19671 * inferiors.c (change_inferior_id): Add comment.
19672 * linux-low.c (check_removed_breakpoint): Add an early
19673 prototype. Improve debug output.
19674 (linux_attach): Doc update.
19675 (linux_detach_one_process, linux_detach): Clean up before releasing
19676 each process.
19677 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19678 * linux-low.h (struct process_info): Doc improvement.
19679 * mem-break.c (delete_all_breakpoints): New.
19680 * mem-break.h (delete_all_breakpoints): New prototype.
19681 * thread-db.c (find_first_thread): New.
19682 (thread_db_create_event): Call it instead of
19683 thread_db_find_new_threads. Clean up unused variables.
19684 (maybe_attach_thread): Remove first thread handling.
19685 (thread_db_find_new_threads): Use find_first_thread.
19686 (thread_db_get_tls_address): Likewise.
19687
19688 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19689
19690 * thread-db.c (thread_db_find_new_threads): Add prototype.
19691 (thread_db_create_event): Check for the main thread before adding
19692 a new thread.
19693 (maybe_attach_thread): Only enable event reporting if TID == 0.
19694 (thread_db_get_tls_address): Check for new threads.
19695
19696 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19697
19698 * linux-low.c (linux_create_inferior): Try execv before execvp.
19699 * spu-low.c (spu_create_inferior): Likewise.
19700
19701 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19702
19703 * linux-low.c (linux_create_inferior): Change execv to execvp.
19704 * spu-low.c (spu_create_inferior): Likewies.
19705
19706 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19707
19708 * Makefile.in (clean): Clean new files instead of deleted ones.
19709 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19710 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19711 rules.
19712 * configure.srv: Specify XML files and new regformats for MIPS and
19713 MIPS64 GNU/Linux.
19714 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19715 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19716 an entry for the restart register.
19717 (mips_cannot_fetch_register, mips_cannot_store_register)
19718 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19719 register names to match the XML descriptions.
19720 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19721 restart register instead of $0.
19722
19723 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19724 Markus Deuling <deuling@de.ibm.com>
19725
19726 * remote-utils.c (decode_xfer_write): New function.
19727 * server.h (decode_xfer_write): Add prototype.
19728 * server.c (handle_query): Add PACKET_LEN argument. Support
19729 qXfer:spu:read and qXfer:spu:write packets.
19730 (main): Pass packet_len to handle_query.
19731 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19732 * target.h (target_ops): Add qxfer_spu.
19733
19734 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19735
19736 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19737 accessing non-seekable spufs files.
19738
19739 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19740
19741 * server.c (handle_query): Add reply for qC packet.
19742
19743 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19744 Leo Zayas <lerele@champenstudios@com>
19745
19746 * server.h (check_remote_input_interrupt_request): New function.
19747 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19748 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19749 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19750 (check_remote_input_interrupt_request): New function.
19751 * server.h (check_remote_input_interrupt_request): Declare.
19752 * win32-low.c (winapi_DebugBreakProcess,
19753 winapi_GenerateConsoleCtrlEvent): New typedefs.
19754 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19755 to 250 ms.
19756 (win32_wait): Check for remote interrupt request
19757 with check_remote_input_interrupt_request.
19758 (win32_request_interrupt): New function.
19759 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19760
19761 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19762
19763 * win32-low.c (debug_registers_changed,
19764 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19765 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19766 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19767 (thread_rec): Get context using the low target.
19768 (child_add_thread): Call thread_added on the low target,
19769 which does the same thing.
19770 (regptr): Delete.
19771 (do_initial_child_stuff): Remove debug registers references.
19772 Set context using the low target. Resume threads after
19773 setting the contexts.
19774 (child_continue): Remove dead variable. Remove debug
19775 registers references.
19776 (child_fetch_inferior_registers): Go through the low target.
19777 (do_child_store_inferior_registers): Remove.
19778 (child_store_inferior_registers): Go through the low target.
19779 (win32_resume): Remove debug registers references.
19780 Set context using the low target.
19781 (handle_exception): Change return type to void. Don't record
19782 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19783 first chance exception.
19784 (get_child_debug_event): Change return type to void. Remove
19785 goto loop. Always return after waiting for debug event.
19786 (win32_wait): Convert to switch statement. Handle spurious
19787 events.
19788
19789 * win32-i386-low.c (debug_registers_changed,
19790 debug_registers_used): New.
19791 (initial_stuff): Rename to ...
19792 (i386_initial_stuff): ... this. Clear debug registers
19793 state variables.
19794 (store_debug_registers): Delete.
19795 (i386_get_thread_context): New.
19796 (load_debug_registers): Delete.
19797 (i386_set_thread_context): New.
19798 (i386_thread_added): New.
19799 (single_step): Rename to ...
19800 (i386_single_step): ... this.
19801 (do_fetch_inferior_registers): Rename to ...
19802 (i386_fetch_inferior_register): ... this.
19803 (i386_store_inferior_register): New.
19804 (the_low_target): Adapt to new interface.
19805
19806 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19807 (arm_get_thread_context): New.
19808 (arm_set_thread_context): New.
19809 (regptr): New.
19810 (do_fetch_inferior_registers): Rename to ...
19811 (arm_fetch_inferior_register): ... this.
19812 (arm_store_inferior_register): New.
19813 (arm_wince_breakpoint): Reimplement as unsigned long.
19814 (arm_wince_breakpoint_len): Define.
19815 (the_low_target): Adapt to new interface.
19816
19817 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19818 load_debug_registers. Add get_thread_context, set_thread_context,
19819 thread_added and store_inferior_register. Rename
19820 fetch_inferior_registers to fetch_inferior_register.
19821 (regptr): Remove declaration.
19822
19823 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19824
19825 * linux-low.c (linux_detach): Change return type to int. Return 0.
19826 * spu-low.c (spu_detach): Likewise.
19827
19828 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19829
19830 * target.h (target_ops): Change return type of detach to int.
19831 Add join.
19832 (join_inferior): New.
19833 * server.c (main): Don't skip detach support on mingw32.
19834 If the inferior doesn't support detaching return error.
19835 Call join_inferior instead of using waitpid.
19836 * linux-low.c (linux_join): New.
19837 (linux_target_op): Add linux_join.
19838 * spu-low.c (spu_join): New.
19839 (spu_target_ops): Add spu_join.
19840 * win32-low.c (win32_detach): Adapt to new interface.
19841 Reopen current_process_handle before detaching. Issue a child
19842 resume before detaching.
19843 (win32_join): New.
19844 (win32_target_op): Add win32_join.
19845
19846 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19847
19848 * win32-low.c (win32-attach): Fix return value.
19849 * target.h (target_ops): Describe ATTACH return values.
19850
19851 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19852
19853 * win32-low.c (GETPROCADDRESS): Define.
19854 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19855 (winapi_DebugSetProcessKillOnExit): Likewise.
19856 (win32_create_inferior): Force usage of ansi CreateProcessA.
19857 (win32_attach): Use GETPROCADDRESS.
19858 (win32_detach): Likewise.
19859
19860 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19861
19862 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19863
19864 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19865
19866 * win32-low.c: Commit leftover changes from 2007-03-29.
19867
19868 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19869
19870 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19871 fields short instead of int. Add explicit padding.
19872 (i387_cache_to_fsave): Remove unnecessary casts.
19873 (i387_fsave_to_cache): Doc fix.
19874 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19875
19876 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19877
19878 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19879 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19880
19881 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19882
19883 * configure.srv (arm*-*-mingw32ce*): Move near the other
19884 arm targets.
19885
19886 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19887
19888 * configure.ac: Add errno checking.
19889 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19890 sys/file.h and malloc.h.
19891 (AC_CHECK_DECLS): Add perror.
19892 (srv_mingwce): Handle.
19893 * configure.srv (i[34567]86-*-cygwin*): Add
19894 win32-i386-low.o to srv_tgtobj.
19895 (i[34567]86-*-mingw*): Likewise.
19896 (arm*-*-mingw32ce*): Add case.
19897 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19898 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19899 [__MINGW32CE__] (strerror): New function.
19900 [__MINGW32CE__] (errno): Define to GetLastError.
19901 [__MINGW32CE__] (COUNTOF): New macro.
19902 (remote_open): Remove extra close call.
19903 * mem-break.c (delete_breakpoint_at): New function.
19904 * mem-break.h (delete_breakpoint_at): Declare.
19905 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19906 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19907 [USE_WIN32API] (read, write): Add char* casts.
19908 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19909 * server.h: Include wincecompat.h on Windows CE.
19910 [HAVE_ERRNO_H]: Check.
19911 (perror): Declare if not declared.
19912 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19913 (perror_with_name): Remove errno declaration.
19914 * wincecompat.h: New.
19915 * wincecompat.c: New.
19916 * win32-low.h: New.
19917 * win32-arm-low.c: New.
19918 * win32-i386-low.c: New.
19919 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19920 (OUTMSG2): Make it safe.
19921 (_T): New macro.
19922 (COUNTOF): New macro.
19923 (NUM_REGS): Get it from the low target.
19924 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19925 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19926 (thread_rec): Let low target handle debug registers.
19927 (child_add_thread): Likewise.
19928 (child_init_thread_list): Likewise.
19929 (continue_one_thread): Likewise.
19930 (regptr): New.
19931 (do_child_fetch_inferior_registers): Move to ...
19932 * win32-i386-low.c: ... here, and rename to ...
19933 (do_fetch_inferior_registers): ... this.
19934 * win32-low.c (child_fetch_inferior_registers):
19935 Go through the low target.
19936 (do_child_store_inferior_registers): Use regptr.
19937 (strwinerror): New function.
19938 (win32_create_inferior): Handle Windows CE.
19939 Use strwinerror instead of strerror on Windows error
19940 codes. Add program to the error output.
19941 Don't close the main thread handle on Windows CE.
19942 (win32_attach): Use coredll.dll on Windows CE.
19943 (win32_kill): Close current process and current
19944 thread handles.
19945 (win32_detach): Use coredll.dll on Windows CE.
19946 (win32_resume): Let low target handle debug registers, and
19947 step request.
19948 (handle_exception): Add/Remove initial breakpoint. Avoid
19949 non-existant WSTOPSIG on Windows CE.
19950 (win32_read_inferior_memory): Cast to remove warning.
19951 (win32_arch_string): Go through the low target.
19952 (initialize_low): Call set_breakpoint_data with the low
19953 target's breakpoint.
19954 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19955 FOP_REGNUM, mappings): Move to ...
19956 * win32-i386-low.c: ... here.
19957 * win32-low.c (win32_thread_info): Move to ...
19958 * win32-low.h: ... here.
19959 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19960 win32-arm-low.c and wincecompat.c.
19961 (all:): Add $EXEEXT.
19962 (install-only:): Likewise.
19963 (gdbserver:): Likewise.
19964 (gdbreplay:): Likewise.
19965 * config.in: Regenerate.
19966 * configure: Regenerate.
19967
19968 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19969
19970 * win32-low.c: Rename typedef thread_info to
19971 win32_thread_info throughout.
19972
19973 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19974
19975 * win32-i386-low.c: Rename to ...
19976 * win32-low.c: ... this.
19977 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19978 * Makefile.in: Likewise.
19979
19980 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19981
19982 * remote-utils.c (monitor_output): Constify msg parameter.
19983 * server.h (monitor_output): Likewise.
19984 * win32-i386-low.c (handle_output_debug_string): New.
19985 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19986 handle_output_debug_string.
19987 (get_child_debug_event): Likewise.
19988
19989 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19990
19991 * server.c (main): Correct strtoul check.
19992
19993 2007-03-27 Jon Ringle <jon@ringle.org>
19994
19995 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19996
19997 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19998
19999 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20000
20001 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20002
20003 * terminal.h: Check HAVE_SGTTY_H.
20004
20005 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20006
20007 * remote-utils.c (remote_open): Print out the assigned port number.
20008
20009 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20010
20011 * remote-utils.c (monitor_output): New function.
20012 * server.c (debug_threads): Define here.
20013 (monitor_show_help): New function.
20014 (handle_query): Handle qRcmd.
20015 (main): Do not handle 'd' packet.
20016 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20017 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20018 of debug_threads.
20019
20020 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20021
20022 * Makefile.in (EXEEXT): New.
20023 (clean): Use $(EXEEXT).
20024
20025 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20026
20027 * target.h (target_ops): Rename send_signal to request_interrupt,
20028 and remove enum target_signal parameter.
20029 * linux-low.c (linux_request_interrupt): Rename from
20030 linux_send_signal, and always send SIGINT.
20031 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20032 and always send SIGINT.
20033 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20034 of send_signal.
20035 (input_interrupt): Likewise.
20036
20037 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20038
20039 * server.c (get_features_xml): Check if target implemented
20040 arch_string.
20041 * win32-i386-low.c (win32_arch_string): New.
20042 (win32_target_ops): Add win32_arch_string as arch_string member.
20043
20044 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20045
20046 * spu-low.c (spu_arch_string): New.
20047 (spu_target_ops): Add spu_arch_string.
20048
20049 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20050
20051 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20052 * configure.ac: Do not check for terminal.h.
20053 * configure, config.in: Regenerated.
20054
20055 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20056
20057 * Makefile.in (OBS): Add $(XML_BUILTIN).
20058 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20059 (clean): Update.
20060 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20061 (arm-with-iwmmxt.c): New.
20062 * config.in, configure: Regenerate.
20063 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20064 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20065 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20066 (arm*-*-linux*): Add iWMMXt and regset support.
20067 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20068 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20069 (arm_store_wmmxregset, target_regsets): New.
20070 * server.c (get_features_xml): Take annex argument. Check builtin
20071 XML documents.
20072 (handle_query): Handle multiple annexes.
20073
20074 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20075
20076 * remote-utils.c [USE_WIN32API] (read, write): Define.
20077 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20078 write.
20079
20080 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20081
20082 * linux-i386-low.c (the_low_target): Set arch_string.
20083 * linux-x86-64-low.c (the_low_target): Likewise.
20084 * linux-low.c (linux_arch_string): New.
20085 (linux_target_ops): Add it.
20086 * linux-low.h (struct linux_target_ops): Add arch_string.
20087 * server.c (write_qxfer_response): Use const void * for DATA.
20088 (get_features_xml): New.
20089 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20090 * target.h (struct target_ops): Add arch_string method.
20091
20092 2007-01-03 Denis Pilat <denis.pilat@st.com>
20093 Daniel Jacobowitz <dan@codesourcery.com>
20094
20095 * linux-low.c (linux_kill): Handle being called with no threads.
20096 * win32-i386-low.c (win32_kill): Likewise.
20097 (get_child_debug_event): Clear current_process_handle.
20098
20099 2006-12-30 Denis PILAT <denis.pilat@st.com>
20100 Daniel Jacobowitz <dan@codesourcery.com>
20101
20102 * remote-utils.c (remote_open): Check the type of specified
20103 serial port devices before opening them.
20104 * server.c (main): Kill the inferior if an error occurs during
20105 the first remote_open.
20106
20107 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20108
20109 * README: Update supported targets.
20110
20111 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20112
20113 * Makefile.in (clean): Remove reg-mips64.c.
20114 (reg-mips64.c, reg-mips64.o): New rules.
20115 * configure.srv: Handle mips64. Include regset support for mips.
20116 * linux-mips-low.c (union mips_register): New.
20117 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20118 (mips_breakpoint, mips_breakpoint_at): Use int.
20119 (mips_collect_register, mips_supply_register)
20120 (mips_collect_register_32bit, mips_supply_register_32bit)
20121 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20122 (mips_store_fpregset, target_regsets): New.
20123 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20124
20125 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20126
20127 * configure.srv: Add target "spu*-*-*".
20128 * Makefile.in (clean): Remove reg-spu.c.
20129 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20130 * spu-low.c: New file.
20131
20132 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20133
20134 * configure.ac: Correct td_thr_tls_get_addr test.
20135 * configure: Regenerated.
20136
20137 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20138
20139 * linux-low.c (linux_wait_for_event): Reformat. Use the
20140 pass_signals array.
20141 * remote-utils.c (decode_address_to_semicolon): New.
20142 * server.c (pass_signals, handle_general_set): New.
20143 (handle_query): Mention QPassSignals for qSupported.
20144 (main): Call handle_general_set.
20145 * server.h (pass_signals, decode_address_to_semicolon): New.
20146
20147 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20148
20149 * server.c (handle_query): Correct error handling for read_auxv.
20150
20151 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20152
20153 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20154 and srv_linux_thread_db to yes.
20155 * linux-s390-low.c (s390_fill_gregset): New function.
20156 (target_regsets): Define data structure.
20157
20158 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20159
20160 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20161 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20162 * config.in, configure: Regenerated.
20163 * inferiors.c (gdb_id_to_thread): New function.
20164 (gdb_id_to_thread_id): Use it.
20165 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20166 * linux-low.h (struct process_info): Add th member.
20167 (thread_db_get_tls_address): New prototype.
20168 * remote-utils.c (decode_address): Make non-static.
20169 * server.c (handle_query): Handle qGetTLSAddr.
20170 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20171 * target.h (struct target_ops): Add get_tls_address.
20172 * thread-db.c (maybe_attach_thread): Save the thread handle.
20173 (thread_db_get_tls_address): New.
20174
20175 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20176
20177 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20178 (linux_resume_one_process): Take a siginfo_t *. Update all
20179 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20180 (struct pending_signals): Add a siginfo_t.
20181 (linux_wait_for_process): Always set last_status.
20182 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20183 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20184 * linux-low.h (struct process_info): Add last_status.
20185
20186 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20187
20188 * remote-utils.c (try_rle): New function.
20189 (putpkt_binary): Use it.
20190
20191 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20192
20193 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20194 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20195 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20196 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20197 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20198 point registers.
20199
20200 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20201
20202 * server.c (terminal_fd): New variable.
20203 (old_foreground_pgrp): Likewise.
20204 (restore_old_foreground_pgrp): New function.
20205 (start_inferior): Record the terminal file descriptor in terminal_fd
20206 and its original foreground group in old_foreground_pgrp. Register
20207 restore_old_foreground_pgrp with atexit().
20208
20209 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20210
20211 * server.c (handle_query): Correct qPart to qXfer.
20212
20213 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20214
20215 * configure.ac: Check for more headers which are missing on
20216 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20217 * configure.srv: Add Cygwin and mingw32.
20218 * remote-utils.c: Don't include headers unconditionally which
20219 are missing on mingw32. Include <winsock.h> for mingw32.
20220 (remote_open): Adjust for mingw32 support. Flush
20221 standard error after writing to it.
20222 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20223 (unblock_async_io, enable_async_io, disable_async_io)
20224 (readchar, getpkt): Update for Winsock support.
20225 (prepare_resume_reply): Expect a protocol signal number.
20226 * server.c: Disable <sys/wait.h> on mingw32.
20227 (start_inferior): Adjust for mingw32 support. Flush
20228 standard error after writing to it.
20229 (attach_inferior): Likewise. Use protocol signal
20230 numbers.
20231 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20232 and names.
20233 * win32-i386-low.c: New file.
20234 * Makefile.in (XM_CLIBS): Set.
20235 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20236 (win32-i386-low.o): New dependency rule.
20237 * linux-low.c (linux_wait): Use target signal numbers.
20238 * target.h (struct target_ops): Doc fix.
20239 * server.h (target_signal_to_name): New prototype.
20240 * gdbreplay.c: Don't include headers unconditionally which
20241 are missing on mingw32. Include <winsock.h> for mingw32.
20242 (remote_close, remote_open): Adjust for Winsock support.
20243 * configure, config.in: Regenerated.
20244
20245 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20246
20247 * server.c (decode_xfer_read, write_qxfer_response): New.
20248 (handle_query): Take a packet length argument. Handle
20249 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20250 the qSupported response.
20251 (main): Update call to handle_query.
20252
20253 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20254
20255 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20256 (putpkt_binary): Renamed from putpkt and adjusted for binary
20257 data.
20258 (putpkt): New wrapper for putpkt_binary.
20259 (readchar): Don't mask off the high bit.
20260 (decode_X_packet): New function.
20261 * server.c (main): Call putpkt_binary if a handler sets the packet
20262 length. Save the length of the incoming packet. Handle 'X'.
20263 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20264
20265 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20266
20267 * server.c (handle_query): Handle qSupported.
20268
20269 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20270
20271 * remote-utils.c (all_symbols_looked_up): New variable.
20272 (look_up_one_symbol): Check it.
20273 * server.h (look_up_one_symbol): New declaration.
20274 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20275
20276 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20277
20278 * Makefile.in (linux-arm-low.o): Update dependencies.
20279 * linux-arm-low.c: Include "gdb_proc_service.h".
20280 (PTRACE_GET_THREAD_AREA): Define.
20281 (ps_get_thread_area): New function.
20282
20283 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20284
20285 * configure.srv (m68k*-*-uclinux*): New target.
20286 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20287 (linux_resume_one_process): Remove extraneous cast.
20288 (linux_read_offsets): New.
20289 (linux_target_op): Add linux_read_offsets on mmuless systems.
20290 * server.c (handle_query): Add qOffsets logic.
20291 * target.h (struct target_ops): Add read_offsets.
20292
20293 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20294
20295 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20296 (PTRACE_GET_THREAD_AREA): Define.
20297 (ps_get_thread_area): New function.
20298 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20299 (linux-x86-64-low.o): Update.
20300
20301 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20302
20303 * configure.ac: Remove checks for prfpregset_t.
20304 * gdb_proc_service.h: New file.
20305 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20306 new "gdb_proc_service.h".
20307 * proc-service.c: Likewise.
20308 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20309 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20310 * Makefile.in (gdb_proc_service_h): Updated.
20311 * configure, config.in: Regenerated.
20312
20313 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20314
20315 * remote-utils.c (prepare_resume_reply): Move declaration
20316 of gdb_id_from_wait to the top of the block.
20317
20318 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20319
20320 * linux-low.c (regsets_store_inferior_registers): Read the regset
20321 from the target before filling it.
20322
20323 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20324
20325 * server.c (attach_inferior): Return SIGTRAP for a successful
20326 attach.
20327
20328 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20329
20330 * Makefile.in (OBS): Add version.o.
20331 (STAGESTUFF): Delete.
20332 (version.o): Add dependencies.
20333 (version.c): Replace rule.
20334 (clean): Remove version.c.
20335 * server.c (gdbserver_version): New.
20336 (gdbserver_usage): Use printf.
20337 (main): Handle --version and --help.
20338 * server.h (version, host_name): Add declarations.
20339
20340 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20341
20342 * linux-arm-low.c:
20343 * linux-arm-low.c:
20344 * inferiors.c:
20345 * i387-fp.h:
20346 * i387-fp.c:
20347 * gdbreplay.c:
20348 * regcache.c:
20349 * proc-service.c:
20350 * mem-break.h:
20351 * mem-break.c:
20352 * linux-x86-64-low.c:
20353 * linux-sh-low.c:
20354 * linux-s390-low.c:
20355 * linux-ppc64-low.c:
20356 * linux-ppc-low.c:
20357 * linux-mips-low.c:
20358 * linux-m68k-low.c:
20359 * linux-m32r-low.c:
20360 * linux-low.h:
20361 * linux-low.c:
20362 * linux-ia64-low.c:
20363 * linux-i386-low.c:
20364 * linux-crisv32-low.c:
20365 * thread-db.c:
20366 * terminal.h:
20367 * target.h:
20368 * target.c:
20369 * server.h:
20370 * server.c:
20371 * remote-utils.c:
20372 * regcache.h:
20373 * utils.c:
20374 * Makefile.in:
20375 * configure.ac:
20376 * gdbserver.1: Add (C) after Copyright. Update the FSF
20377 address.
20378
20379 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20380
20381 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20382 (arm_breakpoint_at): Recognize both breakpoints.
20383 (the_low_target): Use the correct breakpoint instruction.
20384
20385 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20386
20387 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20388 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20389 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20390 (the_low_target): Update.
20391
20392 2005-10-25 Andreas Schwab <schwab@suse.de>
20393
20394 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20395
20396 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20397 (ia64_num_regs): Reduce to 462.
20398
20399 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20400
20401 * acinclude.m4: Correct quoting.
20402 * aclocal.m4: Regenerated.
20403
20404 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20405 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20406 (thread_db_init): Call thread_db_err_str.
20407 * configure.ac: Check for TD_VERSION.
20408 * config.in, configure: Regenerated.
20409
20410 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20411
20412 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20413
20414 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20415
20416 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20417 is not available. Define HAVE_PTRACE_GETREGS if it is.
20418 * config.in, configure: Regenerated.
20419 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20420 * linux-i386-low.c, linux-m68k-low.c: Update to use
20421 HAVE_PTRACE_GETREGS.
20422 * linux-low.c (regsets_fetch_inferior_registers)
20423 (regsets_store_inferior_registers): Only return 0 if we processed
20424 GENERAL_REGS.
20425 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20426 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20427
20428 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20429
20430 * inferiors.c (struct thread_info): Add gdb_id.
20431 (add_thread): Add gdb_id argument.
20432 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20433 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20434 calls to add_thread.
20435 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20436 * server.c (handle_query): Use thread_to_gdb_id.
20437 (handle_v_cont, main): Use gdb_id_to_thread_id.
20438 * server.h (add_thread): Update prototype.
20439 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20440 prototypes.
20441
20442 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20443
20444 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20445 left-padded registers.
20446 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20447 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20448
20449 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20450
20451 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20452 * configure: Regenerate.
20453 * config.in: Regenerate.
20454 * server.h (NEED_DECLARATION_STRERROR):
20455 Replace with !HAVE_DECL_STRERROR.
20456
20457 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20458
20459 * linux-low.c (linux_wait, linux_send_signal): Don't test
20460 an unsigned long variable for > 0 if it could be MAX_ULONG.
20461 * server.c (myresume): Likewise.
20462 * target.c (set_desired_inferior): Likewise.
20463
20464 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20465
20466 * configure.ac: Simplify and improve check for socklen_t.
20467 * configure, config.in: Regenerate.
20468
20469 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20470
20471 * acconfig.h: Remove.
20472 * configure.ac: Add a test for socklen_t. Use three-argument
20473 AC_DEFINE throughout.
20474 * config.in: Regenerated using autoheader 2.59.
20475 * configure: Regenerated.
20476
20477 * gdbreplay.c (socklen_t): Provide a default.
20478 (remote_open): Use socklen_t.
20479 * remote-utils.c (socklen_t): Provide a default.
20480 (remote_open): Use socklen_t.
20481 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20482 unsigned char.
20483
20484 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20485 char for buffers.
20486 * linux-low.c (linux_read_memory, linux_write_memory)
20487 (linux_read_auxv): Likewise.
20488 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20489 (check_mem_write): Likewise.
20490 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20491 Likewise.
20492 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20493 (registers_from_string, register_data): Likewise.
20494 * server.c (handle_query, main): Likewise.
20495 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20496 (decode_M_packet): Likewise.
20497 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20498 * target.h (struct target_ops): Update read_memory, write_memory,
20499 and read_auxv.
20500 (read_inferior_memory, write_inferior_memory): Update.
20501 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20502 to unsigned char *.
20503 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20504 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20505 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20506 linux-s390-low.c, linux-sh-low.c: Update for changes in
20507 read_inferior_memory and the_low_target->breakpoint.
20508
20509 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20510
20511 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20512 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20513 * configure.srv: Add powerpc64-*-linux*.
20514 * linux-ppc64-low.c: New file.
20515
20516 2005-05-23 Orjan Friberg <orjanf@axis.com>
20517
20518 * linux-cris-low.c: New file with support for CRIS.
20519 * linux-crisv32-low.c: Ditto for CRISv32.
20520 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20521 (clean): Add reg-cris.c and reg-crisv32.c.
20522 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20523 reg-crisv32.o, and reg-crisv32.c to make rules.
20524 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20525 recognized targets.
20526
20527 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20528
20529 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20530 of sizeof (PTRACE_XFER_TYPE).
20531 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20532
20533 2005-05-12 Orjan Friberg <orjanf@axis.com>
20534
20535 * target.h (struct target_ops): Add insert_watchpoint,
20536 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20537 pointers for hardware watchpoint support.
20538 * linux-low.h (struct linux_target_ops): Ditto.
20539 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20540 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20541 to linux_target_ops.
20542 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20543 reply packet.
20544 * server.c (main): Recognize 'Z' and 'z' packets.
20545
20546 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20547
20548 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20549 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20550 (the_low_target): Add new members.
20551
20552 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20553
20554 * proc-service.c (ps_lgetregs): Search all_processes instead of
20555 all_threads.
20556
20557 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20558
20559 * server.c (start_inferior): Change return type to int.
20560 (attach_inferior): Change sigptr to int *.
20561 (handle_v_cont, handle_v_requests): Change signal to int *.
20562 (main): Change signal to int.
20563
20564 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20565
20566 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20567 * configure.srv: Add m32r*-*-linux*.
20568 * linux-m32r-low.c: New file.
20569
20570 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20571
20572 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20573
20574 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20575
20576 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20577 Take unsigned long arguments for PIDs.
20578 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20579 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20580 (wait_for_sigstop, linux_resume_one_process)
20581 (regsets_fetch_inferior_registers, linux_send_signal)
20582 (linux_read_auxv): Likewise. Update the types of variables holding
20583 PIDs. Update format string specifiers.
20584 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20585 * remote-utils.c (prepare_resume_reply): Likewise.
20586 * server.c (cont_thread, general_thread, step_thread)
20587 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20588 unsigned long.
20589 (handle_query): Update format specifiers.
20590 (handle_v_cont, main): Use strtoul for thread IDs.
20591 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20592 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20593 (general_thread, step_thread, thread_from_wait)
20594 (old_thread_from_wait): Update.
20595 * target.h (struct thread_resume): Use unsigned long for THREAD.
20596 (struct target_ops): Use unsigned long for arguments to attach and
20597 thread_alive.
20598
20599 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20600
20601 * acinclude.m4: Include bfd/bfd.m4 directly.
20602 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20603 <agriffis@toolchain.org>.
20604 * aclocal.m4, configure: Regenerated.
20605
20606 2005-01-07 Andrew Cagney <cagney@gnu.org>
20607
20608 * configure.ac: Rename configure.in, require autoconf 2.59.
20609 * configure: Re-generate.
20610
20611 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20612
20613 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20614 LIBS when finished.
20615 * aclocal.m4: Regenerated.
20616 * configure: Regenerated.
20617
20618 2004-11-21 Andreas Schwab <schwab@suse.de>
20619
20620 * linux-m68k-low.c (m68k_num_gregs): Define.
20621 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20622 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20623 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20624 (m68k_breakpoint_at): New. Add to the_low_target.
20625
20626 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20627 srv_linux_thread_db to yes.
20628
20629 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20630
20631 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20632 (ARCH_SET_FS): Likewise.
20633 (ARCH_GET_FS): Likewise.
20634 (ARCH_GET_GS): Likewise.
20635
20636 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20637
20638 * linux-i386-low.c (ps_get_thread_area): New.
20639 * linux-x86-64-low.c (ps_get_thread_area): New.
20640 * linux-low.c: Include <sys/syscall.h>.
20641 (linux_kill_one_process): Don't kill the first thread here.
20642 (linux_kill): Kill the first thread here.
20643 (kill_lwp): New function.
20644 (send_sigstop, linux_send_signal): Use it.
20645 * proc-service.c: Clean up #ifdefs.
20646 (fpregset_info): Delete.
20647 (ps_lgetregs): Update and enable implementation.
20648 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20649 implementations.
20650 * remote-utils.c (struct sym_cache, symbol_cache): New.
20651 (input_interrupt): Print a clearer message.
20652 (async_io_enabled): New variable.
20653 (enable_async_io, disable_async_io): Use it. Update comments.
20654 (look_up_one_symbol): Use the symbol cache.
20655 * thread-db.c (thread_db_look_up_symbols): New function.
20656 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20657
20658 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20659
20660 * configure.in: Test for -rdynamic.
20661 * configure: Regenerated.
20662 * Makefile (INTERNAL_LDFLAGS): New.
20663 (gdbserver, gdbreplay): Use it.
20664
20665 2004-09-02 Andrew Cagney <cagney@gnu.org>
20666
20667 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20668
20669 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20670
20671 * linux-low.c (linux_wait): Clear all_processes list also.
20672
20673 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20674
20675 * linux-low.c: Include <errno.h>. Remove extern declaration of
20676 errno.
20677
20678 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20679
20680 * gdbreplay.c, server.h, utils.c: Update copyright years.
20681
20682 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20683
20684 * server.c (main): Print child status or termination signal from
20685 variable 'signal', not 'sig'.
20686
20687 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20688
20689 * linux-low.c (linux_read_memory): Change return type to
20690 int. Check for and return error from ptrace().
20691 * target.c (read_inferior_memory): Change return type to int. Pass
20692 back return status from the_target->read_memory().
20693 * target.h (struct target_ops): Adapt *read_memory() prototype.
20694 Update comment.
20695 (read_inferior_memory): Adapt prototype.
20696 * server.c (main): Return an error packet if
20697 read_inferior_memory() returns an error.
20698
20699 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20700
20701 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20702 Unify with other clean targets.
20703
20704 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20705
20706 * server.c (handle_v_cont): Call set_desired_inferior.
20707
20708 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20709
20710 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20711
20712 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20713
20714 * linux-low.c (linux_wait): Unblock async I/O.
20715 (linux_resume): Block and enable async I/O.
20716 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20717 * server.h (block_async_io, unblock_async_io): Add prototypes.
20718
20719 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20720
20721 * remote-utils.c (remote_open): Print a status notice after
20722 opening a TCP port.
20723 * server.c (attach_inferior): Print a status notice after
20724 attaching.
20725
20726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20727
20728 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20729
20730 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20731
20732 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20733 error packet.
20734 * server.c, target.h: Update copyright years.
20735
20736 2004-02-25 Roland McGrath <roland@redhat.com>
20737
20738 * target.h (struct target_ops): New member `read_auxv'.
20739 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20740 * linux-low.c (linux_read_auxv): New function.
20741 (linux_target_ops): Initialize `read_auxv' member to that.
20742
20743 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20744
20745 Committed by Jim Blandy <jimb@redhat.com>.
20746
20747 * linux-s390-low.c (s390_num_regs): Update.
20748 (s390_regmap): Remove control registers. Use __s390x__ predefine
20749 instead of GPR_SIZE to distiguish s390 and s390x targets.
20750
20751 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20752
20753 * linux-low.c: Update copyright year.
20754 (check_removed_breakpoint): Clear pending_is_breakpoint.
20755 (linux_set_resume_request, linux_queue_one_thread)
20756 (resume_status_pending_p): New functions.
20757 (linux_continue_one_thread): Use process->resume.
20758 (linux_resume): Only resume threads if there are no pending events.
20759 * linux-low.h (struct process_info): Add resume request
20760 pointer.
20761
20762 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20763
20764 * regcache.c (new_register_cache): Clear the allocated register
20765 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20766
20767 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20768
20769 * linux-low.c (linux_resume): Take a struct thread_resume *
20770 argument.
20771 (linux_wait): Update call.
20772 (resume_ptr): New static variable.
20773 (linux_continue_one_thread): Renamed from
20774 linux_continue_one_process. Use resume_ptr.
20775 (linux_resume): Use linux_continue_one_thread.
20776 * server.c (handle_v_cont, handle_v_requests): New functions.
20777 (myresume): New function.
20778 (main): Handle 'v' case.
20779 * target.h (struct thread_resume): New type.
20780 (struct target_ops): Change argument of "resume" to struct
20781 thread_resume *.
20782 (myresume): Delete macro.
20783
20784 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20785
20786 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20787 (uninstall): Support DESTDIR.
20788
20789 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20790
20791 * configure.srv: Add xscale*linux copy of arm*linux entry.
20792
20793 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20794
20795 * linux-arm-low.c (arm_reinsert_addr): New function.
20796 (the_low_target): Add arm_reinsert_addr.
20797
20798 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20799
20800 * mem-break.c: Remove whitespace at end of file.
20801
20802 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20803
20804 * configure.in: Check whether we need to prototype strerror.
20805 * server.h: Optionally prototype strerror.
20806 * gdbreplay.c (perror_with_name): Use strerror.
20807 * linux-low.c (linux_attach_lwp): Use strerror.
20808 * utils.c (perror_with_name): Use strerror.
20809 * config.in, configure: Regenerated.
20810
20811 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20812
20813 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20814 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20815
20816 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
20817
20818 * Makefile.in (SFILES): Update.
20819 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20820 low-sun3.c: Remove files.
20821
20822 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
20823
20824 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20825 (linux_detach_one_process, linux_detach): New functions.
20826 (linux_target_ops): Add linux_detach.
20827 * server.c (main): Handle 'D' packet.
20828 * target.h (struct target_ops): Add "detach" member.
20829 (detach_inferior): Define.
20830
20831 2003-06-13 Mark Kettenis <kettenis@gnu.org>
20832
20833 From Kelley Cook <kelleycook@wideopenwest.com>:
20834 * configure.srv: Accept i[34567]86 variants.
20835
20836 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
20837
20838 * linux-low.c (linux_wait_for_event): Correct comment typos.
20839 (linux_resume_one_process): Call check_removed_breakpoint.
20840 (linux_send_signal): New function.
20841 (linux_target_ops): Add linux_send_signal.
20842 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20843 of kill.
20844 * target.h (struct target_ops): Add send_signal.
20845
20846 2003-05-29 Jim Blandy <jimb@redhat.com>
20847
20848 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20849 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20850 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20851 away part of the register's value.
20852
20853 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
20854
20855 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20856 (linux_wait_for_event, linux_init_signals): Likewise.
20857
20858 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
20859
20860 * configure.in: Check for stdlib.h.
20861 * configure: Regenerated.
20862 * config.in: Regenerated.
20863
20864 2003-01-04 Andreas Schwab <schwab@suse.de>
20865
20866 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20867
20868 2003-01-02 Andrew Cagney <ac131313@redhat.com>
20869
20870 * Makefile.in: Remove obsolete code.
20871
20872 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
20873
20874 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20875 defined(PT_FPR0_HI).
20876
20877 2002-11-17 Stuart Hughes <seh@zee2.com>
20878
20879 * linux-arm-low.c (arm_num_regs): Increase.
20880 (arm_regmap): Include status register.
20881
20882 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
20883
20884 * linux-low.c (register_addr): Remove incorrect -1 check.
20885
20886 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
20887
20888 * linux-low.c (linux_create_inferior): Call setpgid. Return
20889 the new PID.
20890 (unstopped_p, linux_signal_pid): Remove.
20891 (linux_target_ops): Remove linux_signal_pid.
20892 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20893 global instead of target method.
20894 * target.h (struct target_ops): Remove signal_pid. Update comment
20895 for create_inferior.
20896 * server.c (signal_pid): New variable.
20897 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
20898 gdbserver. Set the child to be the foreground process group.
20899 (attach_inferior): Set signal_pid.
20900
20901 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
20902
20903 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20904
20905 2002-08-20 Jim Blandy <jimb@redhat.com>
20906
20907 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20908 default for this.
20909
20910 2002-08-01 Andrew Cagney <cagney@redhat.com>
20911
20912 * Makefile.in: Make chill references obsolete.
20913
20914 2002-07-24 Kevin Buettner <kevinb@redhat.com>
20915
20916 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20917 * configure: Regenerate.
20918 * config.in: Regenerate.
20919
20920 2002-07-09 David O'Brien <obrien@FreeBSD.org>
20921
20922 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20923 (perror_with_name, remote_close, remote_open, expect, play): Static.
20924
20925 2002-07-04 Michal Ludvig <mludvig@suse.cz>
20926
20927 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
20928 byte offsets instead of an array of indexes.
20929 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20930
20931 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
20932
20933 * regcache.c: Add comment.
20934
20935 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
20936
20937 * thread-db.c: New file.
20938 * proc-service.c: New file.
20939 * acinclude.m4: New file.
20940 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20941 proc-service.o, and thread-db.o.
20942 (linux-low.o): Add USE_THREAD_DB.
20943 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20944 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20945 * aclocal.m4: Regenerated.
20946 * config.in: Regenerated.
20947 * configure: Regenerated.
20948 * configure.in: Check for proc_service.h, sys/procfs.h,
20949 thread_db.h, and linux/elf.h headrs.
20950 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20951 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20952 Check for -lthread_db and thread support.
20953 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20954 PowerPC, and SuperH.
20955 * i387-fp.c: Constify arguments.
20956 * i387-fp.h: Likewise.
20957 * inferiors.c: (struct thread_info): Renamed from
20958 `struct inferior_info'. Remove PID member. Use generic inferior
20959 list header. All uses updated.
20960 (inferiors, signal_pid): Removed.
20961 (all_threads): New variable.
20962 (get_thread): Define.
20963 (add_inferior_to_list): New function.
20964 (for_each_inferior): New function.
20965 (change_inferior_id): New function.
20966 (add_inferior): Removed.
20967 (remove_inferior): New function.
20968 (add_thread): New function.
20969 (free_one_thread): New function.
20970 (remove_thread): New function.
20971 (clear_inferiors): Use for_each_inferior and free_one_thread.
20972 (find_inferior): New function.
20973 (find_inferior_id): New function.
20974 (inferior_target_data): Update argument type.
20975 (set_inferior_target_data): Likewise.
20976 (inferior_regcache_data): Likewise.
20977 (set_inferior_regcache_data): Likewise.
20978 * linux-low.c (linux_bp_reinsert): Remove.
20979 (all_processes, stopping_threads, using_thrads)
20980 (struct pending_signals, debug_threads, pid_of): New.
20981 (inferior_pid): Replace with macro.
20982 (struct inferior_linux_data): Remove.
20983 (get_stop_pc, add_process): New functions.
20984 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20985 Use add_process and add_thread.
20986 (linux_attach_lwp): New function, based on old linux_attach. Use
20987 add_process and add_thread. Set stop_expected for new threads.
20988 (linux_attach): New function.
20989 (linux_kill_one_process): New function.
20990 (linux_kill): Kill all LWPs.
20991 (linux_thread_alive): Use find_inferior_id.
20992 (check_removed_breakpoints, status_pending_p): New functions.
20993 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20994 Update. Use WNOHANG. Wait for cloned processes also. Update process
20995 struct for the found process.
20996 (linux_wait_for_event): New function.
20997 (linux_wait): Use it. Support LWPs.
20998 (send_sigstop, wait_for_sigstop, stop_all_processes)
20999 (linux_resume_one_process, linux_continue_one_process): New functions.
21000 (linux_resume): Support LWPs.
21001 (REGISTER_RAW_SIZE): Remove.
21002 (fetch_register): Use register_size instead. Call supply_register.
21003 (usr_store_inferior_registers): Likewise. Call collect_register.
21004 Fix recursive case.
21005 (regsets_fetch_inferior_registers): Improve error message.
21006 (regsets_store_inferior_registers): Add debugging.
21007 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21008 (unstopped_p, linux_signal_pid): New functions.
21009 (linux_target_ops): Add linux_signal_pid.
21010 (linux_init_signals): New function.
21011 (initialize_low): Call it. Initialize using_threads.
21012 * regcache.c (inferior_regcache_data): Add valid
21013 flag.
21014 (get_regcache): Fetch registers lazily. Add fetch argument
21015 and update all callers.
21016 (regcache_invalidate_one, regcache_invalidate): New
21017 functions.
21018 (new_register_cache): Renamed from create_register_cache.
21019 Return the new regcache.
21020 (free_register_cache): Change argument to a void *.
21021 (registers_to_string, registers_from_string): Call get_regcache
21022 with fetch flag set.
21023 (register_data): Make static. Pass fetch flag to get_regcache.
21024 (supply_register): Call get_regcache with fetch flag clear.
21025 (collect_register): Call get_regcache with fetch flag set.
21026 (collect_register_as_string): New function.
21027 * regcache.h: Update.
21028 * remote-utils.c (putpkt): Flush after debug output and use
21029 stderr.
21030 Handle input interrupts while waiting for an ACK.
21031 (input_interrupt): Use signal_pid method.
21032 (getpkt): Flush after debug output and use stderr.
21033 (outreg): Use collect_register_as_string.
21034 (new_thread_notify, dead_thread_notify): New functions.
21035 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21036 and general_thread.
21037 (look_up_one_symbol): Flush after debug output.
21038 * server.c (step_thread, server_waiting): New variables.
21039 (start_inferior): Don't use signal_pid. Update call to mywait.
21040 (attach_inferior): Update call to mywait.
21041 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21042 (main): Don't fetch/store registers explicitly. Use
21043 set_desired_inferior. Support proposed ``Hs'' packet. Update
21044 calls to mywait.
21045 * server.h: Update.
21046 (struct inferior_list, struct_inferior_list_entry): New.
21047 * target.c (set_desired_inferior): New.
21048 (write_inferior_memory): Constify.
21049 (mywait): New function.
21050 * target.h: Update.
21051 (struct target_ops): New signal_pid method.
21052 (mywait): Removed macro, added prototype.
21053
21054 * linux-low.h (regset_func): Removed.
21055 (regset_fill_func, regset_store_func): New.
21056 (enum regset_type): New.
21057 (struct regset_info): Add type field. Use new operation types.
21058 (struct linux_target_ops): stop_pc renamed to get_pc.
21059 Add decr_pc_after_break and breakpoint_at.
21060 (get_process, get_thread_proess, get_process_thread)
21061 (strut process_info, all_processes, linux_attach_lwp)
21062 (thread_db_init): New.
21063
21064 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21065 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21066 (the_low_target): Add new members.
21067 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21068 (i386_store_fpxregset): Constify.
21069 (target_regsets): Add new kind identifier.
21070 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21071 (i386_set_pc): Add debugging.
21072 (i386_breakpoint_at): New function.
21073 (the_low_target): Add new members.
21074 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21075 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21076 (mips_breakpoint_at): New.
21077 (the_low_target): Add new members.
21078 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21079 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21080 (the_low_target): Add new members.
21081 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21082 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21083 (the_low_target): Add new members.
21084 * linux-x86-64-low.c (target_regsets): Add new kind
21085 identifier.
21086
21087 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21088
21089 From Martin Pool <mbp@samba.org>:
21090 * server.c (gdbserver_usage): New function.
21091 (main): Call it.
21092
21093 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21094
21095 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21096 stop_at -> stop_pc.
21097
21098 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21099
21100 * Makefile.in: Remove obsolete code.
21101
21102 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21103
21104 * linux-low.c (regsets_fetch_inferior_registers),
21105 (regsets_store_inferior_registers): Removed cast to int from
21106 ptrace() calls.
21107 * regcache.h: Added declaration of struct inferior_info.
21108
21109 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21110
21111 * inferiors.c (struct inferior_info): Add regcache_data.
21112 (add_inferior): Call create_register_cache.
21113 (clear_inferiors): Call free_register_cache.
21114 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21115 * regcache.c (struct inferior_regcache_data): New.
21116 (registers): Remove.
21117 (get_regcache): New function.
21118 (create_register_cache, free_register_cache): New functions.
21119 (set_register_cache): Don't initialize the register cache here.
21120 (registers_to_string, registers_from_string, register_data): Call
21121 get_regcache.
21122 * regcache.h: Add prototypes.
21123 * server.h: Likewise.
21124
21125 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21126
21127 * mem-break.c: New file.
21128 * mem-break.h: New file.
21129 * Makefile.in: Add mem-break.o rule; update server.h
21130 dependencies.
21131 * inferiors.c (struct inferior_info): Add target_data
21132 member.
21133 (clear_inferiors): Free target_data member if set.
21134 (inferior_target_data, set_inferior_target_data): New functions.
21135 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21136 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21137 * linux-low.c (linux_bp_reinsert): New variable.
21138 (struct inferior_linux_data): New.
21139 (linux_create_inferior): Use set_inferior_target_data.
21140 (linux_attach): Likewise. Call add_inferior.
21141 (linux_wait_for_one_inferior): New function.
21142 (linux_wait): Call it.
21143 (linux_write_memory): Add const.
21144 (initialize_low): Call set_breakpoint_data.
21145 * linux-low.h (struct linux_target_ops): Add breakpoint
21146 handling members.
21147 * server.c (attach_inferior): Remove extra add_inferior
21148 call.
21149 * server.h: Include mem-break.h. Update inferior.c
21150 prototypes.
21151 * target.c (read_inferior_memory)
21152 (write_inferior_memory): New functions.
21153 * target.h (read_inferior_memory)
21154 (write_inferior_memory): Change macros to prototypes.
21155 (struct target_ops): Update comments. Add const to write_memory
21156 definition.
21157
21158 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21159
21160 * linux-low.c (usr_store_inferior_registers): Support
21161 registers which are allowed to fail to store.
21162 * linux-low.h (linux_target_ops): Likewise.
21163 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21164 (ppc_cannot_store_register): FPSCR may not be storable.
21165
21166 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21167
21168 * server.h: Include <string.h> if HAVE_STRING_H.
21169 * ChangeLog: Correct paths in last ChangeLog entry.
21170
21171 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21172
21173 * linux-low.h: Remove obsolete prototypes.
21174 (struct linux_target_ops): New.
21175 (extern the_low_target): New.
21176 * linux-low.c (num_regs, regmap): Remove declarations.
21177 (register_addr): Use the_low_target explicitly.
21178 (fetch_register): Likewise.
21179 (usr_fetch_inferior_registers): Likewise.
21180 (usr_store_inferior_registers): Likewise.
21181 * linux-arm-low.c (num_regs): Remove.
21182 (arm_num_regs): Define.
21183 (arm_regmap): Renamed from regmap, made static.
21184 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21185 made static.
21186 (arm_cannot_store_register): Renamed from cannot_store_register,
21187 made static.
21188 (the_low_target): New.
21189 * linux-i386-low.c (num_regs): Remove.
21190 (i386_num_regs): Define.
21191 (i386_regmap): Renamed from regmap, made static.
21192 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21193 made static.
21194 (i386_cannot_store_register): Renamed from cannot_store_register,
21195 made static.
21196 (the_low_target): New.
21197 * linux-ia64-low.c (num_regs): Remove.
21198 (ia64_num_regs): Define.
21199 (ia64_regmap): Renamed from regmap, made static.
21200 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21201 made static.
21202 (ia64_cannot_store_register): Renamed from cannot_store_register,
21203 made static.
21204 (the_low_target): New.
21205 * linux-m68k-low.c (num_regs): Remove.
21206 (m68k_num_regs): Define.
21207 (m68k_regmap): Renamed from regmap, made static.
21208 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21209 made static.
21210 (m68k_cannot_store_register): Renamed from cannot_store_register,
21211 made static.
21212 (the_low_target): New.
21213 * linux-mips-low.c (num_regs): Remove.
21214 (mips_num_regs): Define.
21215 (mips_regmap): Renamed from regmap, made static.
21216 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21217 made static.
21218 (mips_cannot_store_register): Renamed from cannot_store_register,
21219 made static.
21220 (the_low_target): New.
21221 * linux-ppc-low.c (num_regs): Remove.
21222 (ppc_num_regs): Define.
21223 (ppc_regmap): Renamed from regmap, made static.
21224 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21225 made static.
21226 (ppc_cannot_store_register): Renamed from cannot_store_register,
21227 made static.
21228 (the_low_target): New.
21229 * linux-s390-low.c (num_regs): Remove.
21230 (s390_num_regs): Define.
21231 (s390_regmap): Renamed from regmap, made static.
21232 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21233 made static.
21234 (s390_cannot_store_register): Renamed from cannot_store_register,
21235 made static.
21236 (the_low_target): New.
21237 * linux-sh-low.c (num_regs): Remove.
21238 (sh_num_regs): Define.
21239 (sh_regmap): Renamed from regmap, made static.
21240 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21241 made static.
21242 (sh_cannot_store_register): Renamed from cannot_store_register,
21243 made static.
21244 (the_low_target): New.
21245 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21246 (the_low_target): New.
21247
21248 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21249
21250 * Makefile.in: Add stamp-h target.
21251 * configure.in: Create stamp-h.
21252 * configure: Regenerated.
21253
21254 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21255
21256 * inferiors.c: New file.
21257 * target.c: New file.
21258 * target.h: New file.
21259 * Makefile.in: Add target.o and inferiors.o. Update
21260 dependencies.
21261 * linux-low.c (inferior_pid): New static variable,
21262 moved from server.c.
21263 (linux_create_inferior): Renamed from create_inferior.
21264 Call add_inferior. Return 0 on success instead of a PID.
21265 (linux_attach): Renamed from myattach.
21266 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21267 (linux_thread_alive): Renamed from mythread_alive.
21268 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21269 child dies.
21270 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21271 (regsets_store_inferior_registers): Correct error message.
21272 Add missing ``return 0''.
21273 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21274 (linux_store_registers): Renamed from store_inferior_registers.
21275 (linux_read_memory): Renamed from read_inferior_memory.
21276 (linux_write_memory): Renamed from write_inferior_memory.
21277 (linux_target_ops): New structure.
21278 (initialize_low): Call set_target_ops ().
21279 * remote-utils.c (unhexify): New function.
21280 (hexify): New function.
21281 (input_interrupt): Send signals to ``signal_pid''.
21282 * server.c (inferior_pid): Remove.
21283 (start_inferior): Update create_inferior call.
21284 (attach_inferior): Call add_inferior.
21285 (handle_query): New function.
21286 (main): Call handle_query for `q' packets.
21287 * server.h: Include "target.h". Remove obsolete prototypes.
21288 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21289
21290 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21291
21292 * Makefile.in: Add WARN_CFLAGS. Update configury
21293 dependencies.
21294 * configure.in: Check for <string.h>
21295 * configure: Regenerate.
21296 * config.in: Regenerate.
21297 * gdbreplay.c: Include needed system headers.
21298 (remote_open): Remove strchr prototype.
21299 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21300 * regcache.c (supply_register): Change buf argument to const void *.
21301 (supply_register_by_name): Likewise.
21302 (collect_register): Change buf argument to void *.
21303 (collect_register_by_name): Likewise.
21304 * regcache.h: Add missing prototypes.
21305 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21306 * server.c (handle_query): New function.
21307 (attached): New static variable, moved out of main.
21308 (main): Quiet longjmp clobber warnings.
21309 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21310 * utils.c (error): Remove NORETURN.
21311 (fatal): Likewise.
This page took 0.593971 seconds and 4 git commands to generate.