gdbserver/linux-low: turn 'insert_point' and 'remove_point' into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn the 'insert_point' and 'remove_point' linux target ops into
4 methods of linux_process_target.
5
6 * linux-low.h (struct linux_target_ops): Remove the ops.
7 (class linux_process_target) <low_insert_point>
8 <low_remove_point>: Declare.
9 * linux-low.cc (linux_process_target::low_insert_point)
10 (linux_process_target::low_remove_point): Define.
11 (linux_process_target::insert_point)
12 (linux_process_target::remove_point): Update for calls to
13 low_insert_point and low_remove_point.
14 * linux-x86-low.cc (class x86_target) <low_insert_point>
15 <low_remove_point>: Declare.
16 (x86_insert_point): Turn into...
17 (x86_target::low_insert_point): ...this.
18 (x86_remove_point): Turn into...
19 (x86_target::low_remove_point): ...this.
20 (the_low_target): Remove the op fields.
21 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
22 <low_remove_point>: Declare.
23 (aarch64_insert_point): Turn into...
24 (aarch64_target::low_insert_point): ...this.
25 (aarch64_remove_point): Turn into...
26 (aarch64_target::low_remove_point): ...this.
27 (the_low_target): Remove the op fields.
28 * linux-arm-low.cc (class arm_target) <low_insert_point>
29 <low_remove_point>: Declare.
30 (arm_insert_point): Turn into...
31 (arm_target::low_insert_point): ...this.
32 (arm_remove_point): Turn into...
33 (arm_target::low_remove_point): ...this.
34 (the_low_target): Remove the op fields.
35 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
36 <low_remove_point>: Declare.
37 (crisv32_insert_point): Turn into...
38 (crisv32_target::low_insert_point): ...this.
39 (crisv32_remove_point): Turn into...
40 (crisv32_target::low_remove_point): ...this.
41 (the_low_target): Remove the op fields.
42 * linux-mips-low.cc (class mips_target) <low_insert_point>
43 <low_remove_point>: Declare.
44 (mips_insert_point): Turn into...
45 (mips_target::low_insert_point): ...this.
46 (mips_remove_point): Turn into...
47 (mips_target::low_remove_point): ...this.
48 (the_low_target): Remove the op fields.
49 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
50 <low_remove_point>: Declare.
51 (ppc_insert_point): Turn into...
52 (ppc_target::low_insert_point): ...this.
53 (ppc_remove_point): Turn into...
54 (ppc_target::low_remove_point): ...this.
55 (the_low_target): Remove the op fields.
56 * linux-bfin-low.cc (the_low_target): Remove the op fields.
57 * linux-m32r-low.cc (the_low_target): Ditto.
58 * linux-m68k-low.cc (the_low_target): Ditto.
59 * linux-s390-low.cc (the_low_target): Ditto.
60 * linux-sh-low.cc (the_low_target): Ditto.
61 * linux-sparc-low.cc (the_low_target): Ditto.
62 * linux-tic6x-low.cc (the_low_target): Ditto.
63 * linux-tile-low.cc (the_low_target): Ditto.
64 * linux-xtensa-low.cc (the_low_target): Ditto.
65
66 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
67
68 Remove the 'supports_z_point_type' linux target op and let the
69 concrete linux target define it by overriding the op declared in
70 process_stratum_target.
71
72 * linux-low.cc (linux_process_target::supports_z_point_type):
73 Remove.
74 * linux-low.h (struct linux_target_ops): Remove the op.
75 (class linux_process_target) <supports_z_point_type>: Remove.
76 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
77 Declare.
78 (x86_supports_z_point_type): Turn into...
79 (x86_target::supports_z_point_type): ...this.
80 (the_low_target): Remove the op field.
81 * linux-aarch64-low.cc (class aarch64_target)
82 <supports_z_point_type>: Declare.
83 (aarch64_supports_z_point_type): Turn into...
84 (aarch64_target::supports_z_point_type): ...this.
85 (the_low_target): Remove the op field.
86 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
87 Declare.
88 (arm_supports_z_point_type): Turn into...
89 (arm_target::supports_z_point_type): ...this.
90 (the_low_target): Remove the op field.
91 * linux-crisv32-low.cc (class crisv32_target)
92 <supports_z_point_type>: Declare.
93 (cris_supports_z_point_type): Turn into...
94 (crisv32_target::supports_z_point_type): ...this.
95 (the_low_target): Remove the op field.
96 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
97 Declare.
98 (mips_supports_z_point_type): Turn into...
99 (mips_target::supports_z_point_type): ...this.
100 (the_low_target): Remove the op field.
101 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
102 Declare.
103 (ppc_supports_z_point_type): Turn into...
104 (ppc_target::supports_z_point_type): ...this.
105 (the_low_target): Remove the op field.
106 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
107 Declare.
108 (s390_supports_z_point_type): Turn into...
109 (s390_target::supports_z_point_type): ...this.
110 (the_low_target): Remove the op field.
111 * linux-bfin-low.cc (the_low_target): Remove the op field.
112 * linux-m32r-low.cc (the_low_target): Ditto.
113 * linux-m68k-low.cc (the_low_target): Ditto.
114 * linux-sh-low.cc (the_low_target): Ditto.
115 * linux-sparc-low.cc (the_low_target): Ditto.
116 * linux-tic6x-low.cc (the_low_target): Ditto.
117 * linux-tile-low.cc (the_low_target): Ditto.
118 * linux-xtensa-low.cc (the_low_target): Ditto.
119
120 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
121
122 Turn the 'breakpoint_at' linux target op into a method of
123 linux_process_target.
124
125 * linux-low.h (struct linux_target_ops): Remove the op.
126 (class linux_process_target) <low_breakpoint_at>: Declare.
127
128 Update the callers below:
129
130 * linux-low.cc (linux_process_target::save_stop_reason)
131 (linux_process_target::thread_still_has_status_pending)
132 (linux_process_target::wait_1)
133
134 * linux-x86-low.cc (class x86_target)
135 <low_breakpoint_at>: Declare.
136 (x86_breakpoint_at): Turn into...
137 (x86_target::low_breakpoint_at): ...this.
138 (the_low_target): Remove the op field.
139 * linux-aarch64-low.cc (class aarch64_target)
140 <low_breakpoint_at>: Declare.
141 (aarch64_breakpoint_at): Turn into...
142 (aarch64_target::low_breakpoint_at): ...this.
143 (the_low_target): Remove the op field.
144 * linux-arm-low.cc (class arm_target)
145 <low_breakpoint_at>: Declare.
146 (arm_target::low_breakpoint_at): Define.
147 (the_low_target): Remove the op field.
148 * linux-bfin-low.cc (class bfin_target)
149 <low_breakpoint_at>: Declare.
150 (bfin_breakpoint_at): Turn into...
151 (bfin_target::low_breakpoint_at): ...this.
152 (the_low_target): Remove the op field.
153 * linux-cris-low.cc (class cris_target)
154 <low_breakpoint_at>: Declare.
155 (cris_breakpoint_at): Turn into...
156 (cris_target::low_breakpoint_at): ...this.
157 (the_low_target): Remove the op field.
158 * linux-crisv32-low.cc (class crisv32_target)
159 <low_breakpoint_at>: Declare.
160 (crisv32_breakpoint_at): Turn into...
161 (crisv32_target::low_breakpoint_at): ...this.
162 (the_low_target): Remove the op field.
163 * linux-ia64-low.cc (class ia64_target)
164 <low_breakpoint_at>: Declare.
165 (ia64_target::low_breakpoint_at): Define.
166 * linux-m32r-low.cc (class m32r_target)
167 <low_breakpoint_at>: Declare.
168 (m32r_breakpoint_at): Turn into...
169 (m32r_target::low_breakpoint_at): ...this.
170 (the_low_target): Remove the op field.
171 * linux-m68k-low.cc (class m68k_target)
172 <low_breakpoint_at>: Declare.
173 (m68k_breakpoint_at): Turn into...
174 (m68k_target::low_breakpoint_at): ...this.
175 (the_low_target): Remove the op field.
176 * linux-mips-low.cc (class mips_target)
177 <low_breakpoint_at>: Declare.
178 (mips_breakpoint_at): Turn into...
179 (mips_target::low_breakpoint_at): ...this.
180 (the_low_target): Remove the op field.
181 * linux-nios2-low.cc (class nios2_target)
182 <low_breakpoint_at>: Declare.
183 (nios2_breakpoint_at): Turn into...
184 (nios2_target::low_breakpoint_at): ...this.
185 (the_low_target): Remove the op field.
186 * linux-ppc-low.cc (class ppc_target)
187 <low_breakpoint_at>: Declare.
188 (ppc_breakpoint_at): Turn into...
189 (ppc_target::low_breakpoint_at): ...this.
190 (the_low_target): Remove the op field.
191 * linux-riscv-low.cc (class riscv_target)
192 <low_breakpoint_at>: Declare.
193 (riscv_breakpoint_at): Turn into...
194 (riscv_target::low_breakpoint_at): ...this.
195 (the_low_target): Remove the op field.
196 * linux-s390-low.cc (class s390_target)
197 <low_breakpoint_at>: Declare.
198 (s390_breakpoint_at): Turn into...
199 (s390_target::low_breakpoint_at): ...this.
200 (the_low_target): Remove the op field.
201 * linux-sh-low.cc (class sh_target)
202 <low_breakpoint_at>: Declare.
203 (sh_breakpoint_at): Turn into...
204 (sh_target::low_breakpoint_at): ...this.
205 (the_low_target): Remove the op field.
206 * linux-sparc-low.cc (class sparc_target)
207 <low_breakpoint_at>: Declare.
208 (sparc_breakpoint_at): Turn into...
209 (sparc_target::low_breakpoint_at): ...this.
210 (the_low_target): Remove the op field.
211 * linux-tic6x-low.cc (class tic6x_target)
212 <low_breakpoint_at>: Declare.
213 (tic6x_breakpoint_at): Turn into...
214 (tic6x_target::low_breakpoint_at): ...this.
215 (the_low_target): Remove the op field.
216 * linux-tile-low.cc (class tile_target)
217 <low_breakpoint_at>: Declare.
218 (tile_breakpoint_at): Turn into...
219 (tile_target::low_breakpoint_at): ...this.
220 (the_low_target): Remove the op field.
221 * linux-xtensa-low.cc (class xtensa_target)
222 <low_breakpoint_at>: Declare.
223 (xtensa_breakpoint_at): Turn into...
224 (xtensa_target::low_breakpoint_at): ...this.
225 (the_low_target): Remove the op field.
226
227 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
228
229 Turn the 'decr_pc_after_break' linux_target_ops field into
230 a method of linux_process_target.
231
232 * linux-low.h (struct linux_target_ops)
233 <decr_pc_after_break>: Remove.
234 (class linux_process_target) <low_decr_pc_after_break>: New method
235 declaration.
236 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
237 New method implementation.
238
239 Update the users below.
240
241 (linux_process_target::save_stop_reason)
242 (linux_process_target::wait_1)
243 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
244 New declaration.
245 (x86_target::low_decr_pc_after_break): New method implementation.
246 (the_low_target): Remove the field.
247 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
248 New declaration.
249 (bfin_target::low_decr_pc_after_break): New method implementation.
250 (the_low_target): Remove the field.
251 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
252 New declaration.
253 (m68k_target::low_decr_pc_after_break): New method implementation.
254 (the_low_target): Remove the field.
255 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
256 New declaration.
257 (s390_target::low_decr_pc_after_break): New method implementation.
258 (the_low_target): Remove the field.
259 * linux-aarch64-low.cc (the_low_target): Remove the field.
260 * linux-arm-low.cc (the_low_target): Remove the field.
261 * linux-cris-low.cc (the_low_target): Remove the field.
262 * linux-crisv32-low.cc (the_low_target): Remove the field.
263 * linux-m32r-low.cc (the_low_target): Remove the field.
264 * linux-mips-low.cc (the_low_target): Remove the field.
265 * linux-nios2-low.cc (the_low_target): Remove the field.
266 * linux-ppc-low.cc (the_low_target): Remove the field.
267 * linux-riscv-low.cc (the_low_target): Remove the field.
268 * linux-sh-low.cc (the_low_target): Remove the field.
269 * linux-sparc-low.cc (the_low_target): Remove the field.
270 * linux-tic6x-low.cc (the_low_target): Remove the field.
271 * linux-tile-low.cc (the_low_target): Remove the field.
272 * linux-xtensa-low.cc (the_low_target): Remove the field.
273
274 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
275
276 Remove the 'supports_software_single_step' linux target op and let
277 the concrete linux target define it by overriding the op in
278 process_stratum_target.
279 Turn the 'get_next_pcs' linux target op into a method of
280 linux_process_target.
281
282 * linux-low.h (struct linux_target_ops): Remove the ops.
283 (class linux_process_target) <supports_software_single_step>:
284 Remove.
285 <low_get_next_pcs>: Declare.
286 * linux-low.cc (can_software_single_step): Remove.
287 (linux_process_target::low_get_next_pcs): Define.
288 (linux_process_target::supports_software_single_step): Remove.
289
290 Update the callers below.
291
292 (linux_process_target::handle_extended_wait)
293 (linux_process_target::wait_1)
294 (linux_process_target::install_software_single_step_breakpoints)
295 (linux_process_target::single_step)
296 (linux_process_target::thread_needs_step_over)
297 (linux_process_target::proceed_one_lwp)
298 (linux_process_target::supports_range_stepping)
299
300 * linux-x86-low.cc (the_low_target): Remove the op field.
301 * linux-aarch64-low.cc (the_low_target): Ditto.
302 * linux-bfin-low.cc (the_low_target): Ditto.
303 * linux-cris-low.cc (the_low_target): Ditto.
304 * linux-crisv32-low.cc (the_low_target): Ditto.
305 * linux-m32r-low.cc (the_low_target): Ditto.
306 * linux-m68k-low.cc (the_low_target): Ditto.
307 * linux-mips-low.cc (the_low_target): Ditto.
308 * linux-nios2-low.cc (the_low_target): Ditto.
309 * linux-ppc-low.cc (the_low_target): Ditto.
310 * linux-riscv-low.cc (the_low_target): Ditto.
311 * linux-s390-low.cc (the_low_target): Ditto.
312 * linux-sh-low.cc (the_low_target): Ditto.
313 * linux-sparc-low.cc (the_low_target): Ditto.
314 * linux-tic6x-low.cc (the_low_target): Ditto.
315 * linux-tile-low.cc (the_low_target): Ditto.
316 * linux-xtensa-low.cc (the_low_target): Ditto.
317 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
318 <supports_software_single_step>: Declare.
319 (arm_target::supports_software_single_step): Define.
320 (arm_gdbserver_get_next_pcs): Turn into...
321 (arm_target::low_get_next_pcs): ...this.
322 (the_low_target): Remove the op field.
323
324 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
325
326 Remove the 'sw_breakpoint_from_kind' linux target op, and let
327 the concrete linux target define it by overriding the op
328 in process_stratum_target.
329
330 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
331 Remove.
332 * linux-low.h (struct linux_target_ops): Remove the op.
333 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
334 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
335 Declare.
336 (x86_sw_breakpoint_from_kind): Turn into...
337 (x86_target::sw_breakpoint_from_kind): ...this.
338 (the_low_target): Remove the op field.
339 * linux-aarch64-low.cc (class aarch64_target)
340 <sw_breakpoint_from_kind>: Declare.
341 (aarch64_sw_breakpoint_from_kind): Turn into...
342 (aarch64_target::sw_breakpoint_from_kind): ...this.
343 (the_low_target): Remove the op field.
344 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
345 Declare.
346 (arm_target::sw_breakpoint_from_kind): Define.
347 (the_low_target): Remove the op field.
348 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
349 Declare.
350 (bfin_sw_breakpoint_from_kind): Turn into...
351 (bfin_target::sw_breakpoint_from_kind): ...this.
352 (the_low_target): Remove the op field.
353 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
354 Declare.
355 (cris_sw_breakpoint_from_kind): Turn into...
356 (cris_target::sw_breakpoint_from_kind): ...this.
357 (the_low_target): Remove the op field.
358 * linux-crisv32-low.cc (class crisv32_target)
359 <sw_breakpoint_from_kind>: Declare.
360 (cris_sw_breakpoint_from_kind): Turn into...
361 (crisv32_target::sw_breakpoint_from_kind): ...this.
362 (the_low_target): Remove the op field.
363 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
364 Declare.
365 (ia64_target::sw_breakpoint_from_kind): Define.
366 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
367 Declare.
368 (m32r_sw_breakpoint_from_kind): Turn into...
369 (m32r_target::sw_breakpoint_from_kind): ...this.
370 (the_low_target): Remove the op field.
371 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
372 Declare.
373 (m68k_sw_breakpoint_from_kind): Turn into...
374 (m68k_target::sw_breakpoint_from_kind): ...this.
375 (the_low_target): Remove the op field.
376 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
377 Declare.
378 (mips_sw_breakpoint_from_kind): Turn into...
379 (mips_target::sw_breakpoint_from_kind): ...this.
380 (the_low_target): Remove the op field.
381 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
382 Declare.
383 (nios2_sw_breakpoint_from_kind): Turn into...
384 (nios2_target::sw_breakpoint_from_kind): ...this.
385 (the_low_target): Remove the op field.
386 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
387 Declare.
388 (ppc_sw_breakpoint_from_kind): Turn into...
389 (ppc_target::sw_breakpoint_from_kind): ...this.
390 (the_low_target): Remove the op field.
391 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
392 Declare.
393 (riscv_sw_breakpoint_from_kind): Turn into...
394 (riscv_target::sw_breakpoint_from_kind): ...this.
395 (the_low_target): Remove the op field.
396 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
397 Declare.
398 (s390_sw_breakpoint_from_kind): Turn into...
399 (s390_target::sw_breakpoint_from_kind): ...this.
400 (the_low_target): Remove the op field.
401 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
402 Declare.
403 (sh_sw_breakpoint_from_kind): Turn into...
404 (sh_target::sw_breakpoint_from_kind): ...this.
405 (the_low_target): Remove the op field.
406 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
407 Declare.
408 (sparc_sw_breakpoint_from_kind): Turn into...
409 (sparc_target::sw_breakpoint_from_kind): ...this.
410 (the_low_target): Remove the op field.
411 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
412 Declare.
413 (tic6x_sw_breakpoint_from_kind): Turn into...
414 (tic6x_target::sw_breakpoint_from_kind): ...this.
415 (the_low_target): Remove the op field.
416 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
417 Declare.
418 (tile_sw_breakpoint_from_kind): Turn into...
419 (tile_target::sw_breakpoint_from_kind): ...this.
420 (the_low_target): Remove the op field.
421 * linux-xtensa-low.cc (class xtensa_target)
422 <sw_breakpoint_from_kind>: Declare.
423 (xtensa_sw_breakpoint_from_kind): Turn into...
424 (xtensa_target::sw_breakpoint_from_kind): ...this.
425 (the_low_target): Remove the op field.
426
427 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
428
429 Remove the 'breakpoint_kind_from_pc' and
430 'breakpoint_kind_from_current_state' linux target ops, and let the
431 concrete linux target define them by overriding the ops of
432 process_stratum_target.
433
434 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
435 Remove.
436 (linux_process_target::breakpoint_kind_from_current_state): Remove.
437 * linux-low.h (struct linux_target_ops): Remove ops.
438 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
439 <breakpoint_kind_from_current_state>: Remove.
440 * linux-x86-low.cc (the_low_target): Remove the op fields.
441 * linux-bfin-low.cc (the_low_target): Ditto.
442 * linux-cris-low.cc (the_low_target): Ditto.
443 * linux-crisv32-low.cc (the_low_target): Ditto.
444 * linux-m32r-low.cc (the_low_target): Ditto.
445 * linux-m68k-low.cc (the_low_target): Ditto.
446 * linux-mips-low.cc (the_low_target): Ditto.
447 * linux-nios2-low.cc (the_low_target): Ditto.
448 * linux-ppc-low.cc (the_low_target): Ditto.
449 * linux-s390-low.cc (the_low_target): Ditto.
450 * linux-sh-low.cc (the_low_target): Ditto.
451 * linux-sparc-low.cc (the_low_target): Ditto.
452 * linux-tic6x-low.cc (the_low_target): Ditto.
453 * linux-tile-low.cc (the_low_target): Ditto.
454 * linux-xtensa-low.cc (the_low_target): Ditto.
455 * linux-aarch64-low.cc (class aarch64_target)
456 <breakpoint_kind_from_pc>
457 <breakpoint_kind_from_current_state>: Declare.
458 (aarch64_breakpoint_kind_from_pc): Turn into...
459 (aarch64_target::breakpoint_kind_from_pc): ...this.
460 (aarch64_breakpoint_kind_from_current_state): Turn into...
461 (aarch64_target::breakpoint_kind_from_current_state): ...this.
462 (the_low_target): Remove the op fields.
463 * linux-arm-low.cc (class arm_target):
464 <breakpoint_kind_from_pc>
465 <breakpoint_kind_from_current_state>: Declare.
466 (arm_target::breakpoint_kind_from_pc): Define.
467 (arm_target::breakpoint_kind_from_current_state): Define.
468 (the_low_target): Remove the op fields.
469 * linux-riscv-low.cc (class riscv_target):
470 <breakpoint_kind_from_pc>: Declare.
471 (riscv_breakpoint_kind_from_pc): Turn into...
472 (riscv_target::breakpoint_kind_from_pc): ...this.
473 (the_low_target): Remove the op fields.
474
475 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
476
477 Turn the 'get_pc' and 'set_pc' linux target ops into methods
478 of linux_process_target.
479
480 * linux-low.h (struct linux_target_ops): Remove the ops.
481 (class linux_process_target) <low_supports_breakpoints>
482 <low_get_pc>
483 <low_set_pc>: Declare.
484 * linux-low.cc (supports_breakpoints): Turn into...
485 (linux_process_target::low_supports_breakpoints): ...this.
486 (linux_process_target::low_get_pc): Define.
487 (linux_process_target::low_set_pc): Define.
488
489 Update the callers below.
490
491 (linux_process_target::get_pc)
492 (linux_process_target::save_stop_reason)
493 (linux_process_target::maybe_move_out_of_jump_pad)
494 (linux_process_target::wait_1)
495 (linux_process_target::resume_one_lwp_throw)
496 (linux_process_target::resume)
497 (linux_process_target::proceed_all_lwps)
498 (linux_process_target::read_pc)
499 (linux_process_target::write_pc)
500
501 * linux-x86-low.cc (class linux_process_target)
502 <low_supports_breakpoints>
503 <low_get_pc>
504 <low_set_pc>: Declare.
505 (x86_target::low_supports_breakpoints): Define.
506 (x86_get_pc): Turn into...
507 (x86_target::low_get_pc): ...this.
508 (x86_set_pc): Turn into...
509 (x86_target::low_set_pc): ...this.
510 (the_low_target): Remove the op fields.
511 * linux-arm-low.cc (class arm_target)
512 <low_supports_breakpoints>
513 <low_get_pc>
514 <low_set_pc>: Declare.
515 (arm_target::low_supports_breakpoints)
516 (arm_target::low_get_pc)
517 (arm_target::low_set_pc): Define.
518 (the_low_target): Remove the op fields.
519 * linux-bfin-low.cc (class bfin_target)
520 <low_supports_breakpoints>
521 <low_get_pc>
522 <low_set_pc>: Declare.
523 (bfin_target::low_supports_breakpoints)
524 (bfin_target::low_get_pc)
525 (bfin_target::low_set_pc): Define.
526 (the_low_target): Remove the op fields.
527 * linux-cris-low.cc (class cris_target)
528 <low_supports_breakpoints>
529 <low_get_pc>
530 <low_set_pc>: Declare.
531 (cris_target::low_supports_breakpoints)
532 (cris_target::low_get_pc)
533 (cris_target::low_set_pc): Define.
534 (the_low_target): Remove the op fields.
535 * linux-crisv32-low.cc (class crisv32_target)
536 <low_supports_breakpoints>
537 <low_get_pc>
538 <low_set_pc>: Declare.
539 (crisv32_target::low_supports_breakpoints)
540 (crisv32_target::low_get_pc)
541 (crisv32_target::low_set_pc): Define.
542 (the_low_target): Remove the op fields.
543 * linux-m32r-low.cc (class m32r_target)
544 <low_supports_breakpoints>
545 <low_get_pc>
546 <low_set_pc>: Declare.
547 (m32r_target::low_supports_breakpoints)
548 (m32r_target::low_get_pc)
549 (m32r_target::low_set_pc): Define.
550 (the_low_target): Remove the op fields.
551 * linux-m68k-low.cc (class m68k_target)
552 <low_supports_breakpoints>
553 <low_get_pc>
554 <low_set_pc>: Declare.
555 (m68k_target::low_supports_breakpoints)
556 (m68k_target::low_get_pc)
557 (m68k_target::low_set_pc): Define.
558 (the_low_target): Remove the op fields.
559 * linux-nios2-low.cc (class nios2_target)
560 <low_supports_breakpoints>
561 <low_get_pc>
562 <low_set_pc>: Declare.
563 (nios2_target::low_supports_breakpoints)
564 (nios2_target::low_get_pc)
565 (nios2_target::low_set_pc): Define.
566 (the_low_target): Remove the op fields.
567 * linux-sh-low.cc (class sh_target)
568 <low_supports_breakpoints>
569 <low_get_pc>
570 <low_set_pc>: Declare.
571 (sh_target::low_supports_breakpoints)
572 (sh_target::low_get_pc)
573 (sh_target::low_set_pc): Define.
574 (the_low_target): Remove the op fields.
575 * linux-xtensa-low.cc (class xtensa_target)
576 <low_supports_breakpoints>
577 <low_get_pc>
578 <low_set_pc>: Declare.
579 (xtensa_target::low_supports_breakpoints)
580 (xtensa_target::low_get_pc)
581 (xtensa_target::low_set_pc): Define.
582 (the_low_target): Remove the op fields.
583 * linux-sparc-low.cc (class sparc_target)
584 <low_supports_breakpoints>
585 <low_get_pc>: Declare.
586 (sparc_target::low_supports_breakpoints)
587 (sparc_target::low_get_pc): Define.
588 (the_low_target): Remove the op fields.
589 * linux-tile-low.cc (class tile_target)
590 <low_supports_breakpoints>
591 <low_get_pc>
592 <low_set_pc>: Declare.
593 (tile_target::low_supports_breakpoints)
594 (tile_target::low_get_pc)
595 (tile_target::low_set_pc): Define.
596 (the_low_target): Remove the op fields.
597 * linux-aarch64-low.cc (class aarch64_target)
598 <low_supports_breakpoints>
599 <low_get_pc>
600 <low_set_pc>: Declare.
601 (aarch64_target::low_supports_breakpoints): Define.
602 (aarch64_get_pc): Turn into...
603 (aarch64_target::low_get_pc): ...this.
604 (aarch64_set_pc): Turn into...
605 (aarch64_target::low_set_pc): ...this.
606 (the_low_target): Remove the op fields.
607 * linux-mips-low.cc (class mips_target)
608 <low_supports_breakpoints>
609 <low_get_pc>
610 <low_set_pc>: Declare.
611 (mips_target::low_supports_breakpoints): Define.
612 (mips_get_pc): Turn into...
613 (mips_target::low_get_pc): ...this.
614 (mips_set_pc): Turn into...
615 (mips_target::low_set_pc): ...this.
616 (the_low_target): Remove the op fields.
617 * linux-ppc-low.cc (class ppc_target)
618 <low_supports_breakpoints>
619 <low_get_pc>
620 <low_set_pc>: Declare.
621 (ppc_target::low_supports_breakpoints): Define.
622 (ppc_get_pc): Turn into...
623 (ppc_target::low_get_pc): ...this.
624 (ppc_set_pc): Turn into...
625 (ppc_target::low_set_pc): ...this.
626 (the_low_target): Remove the op fields.
627 * linux-riscv-low.cc (class riscv_target)
628 <low_supports_breakpoints>
629 <low_get_pc>
630 <low_set_pc>: Declare.
631 (riscv_target::low_supports_breakpoints): Define.
632 (riscv_get_pc): Turn into...
633 (riscv_target::low_get_pc): ...this.
634 (riscv_set_pc): Turn into...
635 (riscv_target::low_set_pc): ...this.
636 (the_low_target): Remove the op fields.
637 * linux-s390-low.cc (class s390_target)
638 <low_supports_breakpoints>
639 <low_get_pc>
640 <low_set_pc>: Declare.
641 (s390_target::low_supports_breakpoints): Define.
642 (s390_get_pc): Turn into...
643 (s390_target::low_get_pc): ...this.
644 (s390_set_pc): Turn into...
645 (s390_target::low_set_pc): ...this.
646 (the_low_target): Remove the op fields.
647 * linux-tic6x-low.cc (class tic6x_target)
648 <low_supports_breakpoints>
649 <low_get_pc>
650 <low_set_pc>: Declare.
651 (tic6x_target::low_supports_breakpoints): Define.
652 (tic6x_get_pc): Turn into...
653 (tic6x_target::low_get_pc): ...this.
654 (tic6x_set_pc): Turn into...
655 (tic6x_target::low_set_pc): ...this.
656 (the_low_target): Remove the op fields.
657
658 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
659
660 Turn some more static methods in linux-low into private methods
661 of linux_process_target.
662
663 * linux-low.cc (get_pc): Turn into...
664 (linux_process_target::get_pc): ...this.
665 (save_stop_reason): Turn into...
666 (linux_process_target::save_stop_reason): ...this.
667 (thread_still_has_status_pending_p): Turn into...
668 (linux_process_target::thread_still_has_status_pending): ...this.
669 (status_pending_p_callback): Turn into...
670 (linux_process_target::status_pending_p_callback): ...this.
671 (resume_stopped_resumed_lwps): Turn into...
672 (linux_process_target::resume_stopped_resumed_lwps): ...this.
673 (install_software_single_step_breakpoints): Turn into...
674 (linux_process_target::install_software_single_step_breakpoints):
675 ...this.
676 (single_step): Turn into...
677 (linux_process_target::single_step): ...this.
678 (linux_resume_one_lwp_throw): Turn into...
679 (linux_process_target::resume_one_lwp_throw): ...this.
680 (linux_resume_one_lwp): Turn into...
681 (linux_process_target::resume_one_lwp): ...this.
682 (resume_status_pending_p): Turn into...
683 (linux_process_target::resume_status_pending): ...this.
684 (need_step_over_p): Turn into...
685 (linux_process_target::thread_needs_step_over): ...this.
686 (linux_resume_one_thread): Turn into...
687 (linux_process_target::resume_one_thread): ...this.
688 (proceed_one_lwp): Turn into...
689 (linux_process_target::proceed_one_lwp): ...this.
690 (unsuspend_and_proceed_one_lwp): Turn into...
691 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
692
693 Update the calls/references to the above functions below.
694
695 (linux_process_target::handle_extended_wait)
696 (linux_process_target::filter_event)
697 (linux_process_target::wait_for_event_filtered)
698 (linux_process_target::wait_1)
699 (linux_process_target::move_out_of_jump_pad)
700 (linux_process_target::start_step_over)
701 (linux_process_target::resume)
702 (linux_process_target::proceed_all_lwps)
703 (regsets_store_inferior_registers)
704 (linux_process_target::store_register)
705
706 * linux-low.h (class linux_process_target)
707 <get_pc>
708 <save_stop_reason>
709 <thread_still_has_status_pending>
710 <status_pending_p_callback>
711 <resume_stopped_resumed_lwps>
712 <install_software_single_step_breakpoints>
713 <single_step>
714 <resume_one_lwp_throw>
715 <resume_one_lwp>
716 <resume_status_pending>
717 <thread_needs_step_over>
718 <resume_one_thread>
719 <proceed_one_lwp>
720 <unsuspend_and_proceed_one_lwp>: Declare.
721
722 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
723
724 Turn the 'fetch_register' linux target op into a method of
725 linux_process_target.
726
727 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
728 (class linux_process_target) <low_fetch_register>: Declare.
729 * linux-x86-low.cc (the_low_target)
730 * linux-aarch64-low.cc (the_low_target)
731 * linux-arm-low.cc (the_low_target)
732 * linux-bfin-low.cc (the_low_target)
733 * linux-cris-low.cc (the_low_target)
734 * linux-crisv32-low.cc (the_low_target)
735 * linux-m32r-low.cc (the_low_target)
736 * linux-m68k-low.cc (the_low_target)
737 * linux-nios2-low.cc (the_low_target)
738 * linux-ppc-low.cc (the_low_target)
739 * linux-s390-low.cc (the_low_target)
740 * linux-sh-low.cc (the_low_target)
741 * linux-sparc-low.cc (the_low_target)
742 * linux-tic6x-low.cc (the_low_target)
743 * linux-tile-low.cc (the_low_target)
744 * linux-xtensa-low.cc (the_low_target): Remove the op field.
745 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
746 Declare.
747 (ia64_fetch_register): Turn into...
748 (ia64_target::low_fetch_register): ...this.
749 (the_low_target): Remove the op field.
750 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
751 Declare.
752 (mips_fetch_register): Turn into...
753 (mips_target::low_fetch_register): ...this.
754 (the_low_target): Remove the op field.
755 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
756 Declare.
757 (riscv_fetch_register): Turn into...
758 (riscv_target::low_fetch_register): ...this.
759 (the_low_target): Remove the op field.
760
761 Update the callers below.
762
763 * linux-low.cc (linux_process_target::fetch_registers)
764 (linux_process_target::low_fetch_register)
765
766 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
767
768 Turn the 'cannot_fetch_register' and 'cannot_store_register'
769 linux target ops into methods of linux_process_target.
770
771 * linux-low.h (struct linux_target_ops): Remove the low target ops.
772 (class linux_process_target) <fetch_register>
773 <store_register>
774 <usr_fetch_inferior_registers>
775 <usr_store_inferior_registers>
776 <low_cannot_fetch_register>
777 <low_cannot_fetch_register> Declare.
778 * linux-low.cc (fetch_register): Turn into...
779 (linux_process_target::fetch_register): ...this.
780 (store_register): Turn into ...
781 (linux_process_target::store_register): ...this.
782 (usr_fetch_inferior_registers): Turn into...
783 (linux_process_target::usr_fetch_inferior_registers): ...this.
784 (usr_store_inferior_registers): Turn into...
785 (linux_process_target::usr_store_inferior_registers): ...this.
786 * linux-x86-low.cc (class x86_target)
787 <low_cannot_fetch_register>
788 <low_cannot_store_register>: Declare.
789 (x86_cannot_store_register): Turn into...
790 (x86_target::low_cannot_store_register): ...this.
791 (x86_cannot_fetch_register): Turn into...
792 (x86_target::low_cannot_fetch_register): ...this.
793 (the_low_target): Remove the target op fields.
794 * linux-aarch64-low.cc (class aarch64_target)
795 <low_cannot_fetch_register>
796 <low_cannot_store_register>: Declare.
797 (aarch64_target::low_cannot_fetch_register)
798 (aarch64_target::low_cannot_store_register): Define.
799 (the_low_target): Remove the op fields.
800 * linux-arm-low.cc (class arm_target)
801 <low_cannot_fetch_register>
802 <low_cannot_store_register>: Declare.
803 (arm_cannot_fetch_register): Turn into...
804 (arm_target::low_cannot_fetch_register): ...this.
805 (arm_cannot_store_register): Turn into...
806 (arm_target::low_cannot_store_register): ...this.
807 (the_low_target): Remove the op fields.
808 * linux-bfin-low.cc (class bfin_target)
809 <low_cannot_fetch_register>
810 <low_cannot_store_register>: Declare.
811 (bfin_cannot_fetch_register): Turn into...
812 (bfin_target::low_cannot_fetch_register): ...this.
813 (bfin_cannot_store_register): Turn into...
814 (bfin_target::low_cannot_store_register): ...this.
815 (the_low_target): Remove the op fields.
816 * linux-cris-low.cc (class cris_target)
817 <low_cannot_fetch_register>
818 <low_cannot_store_register>: Declare.
819 (cris_cannot_fetch_register): Turn into...
820 (cris_target::low_cannot_fetch_register): ...this.
821 (cris_cannot_store_register): Turn into...
822 (cris_target::low_cannot_store_register): ...this.
823 (the_low_target): Remove the op fields.
824 * linux-crisv32-low.cc (class crisv32_target)
825 <low_cannot_fetch_register>
826 <low_cannot_store_register>: Declare.
827 (crisv32_target::low_cannot_fetch_register)
828 (crisv32_target::low_cannot_store_register): Define.
829 (the_low_target): Remove the op fields.
830 * linux-ia64-low.cc (class ia64_target)
831 <low_cannot_fetch_register>
832 <low_cannot_store_register>: Declare.
833 (ia64_cannot_fetch_register): Turn into...
834 (ia64_target::low_cannot_fetch_register): ...this.
835 (ia64_cannot_store_register): Turn into...
836 (ia64_target::low_cannot_store_register): ...this.
837 (the_low_target): Remove the op fields.
838 * linux-m32r-low.cc (class m32r_target)
839 <low_cannot_fetch_register>
840 <low_cannot_store_register>: Declare.
841 (m32r_cannot_fetch_register): Turn into...
842 (m32r_target::low_cannot_fetch_register): ...this.
843 (m32r_cannot_store_register): Turn into...
844 (m32r_target::low_cannot_store_register): ...this.
845 (the_low_target): Remove the op fields.
846 * linux-m68k-low.cc (class m68k_target)
847 <low_cannot_fetch_register>
848 <low_cannot_store_register>: Declare.
849 (m68k_cannot_fetch_register): Turn into...
850 (m68k_target::low_cannot_fetch_register): ...this.
851 (m68k_cannot_store_register): Turn into...
852 (m68k_target::low_cannot_store_register): ...this.
853 (the_low_target): Remove the op fields.
854 * linux-mips-low.cc (class mips_target)
855 <low_cannot_fetch_register>
856 <low_cannot_store_register>: Declare.
857 (mips_cannot_fetch_register): Turn into...
858 (mips_target::low_cannot_fetch_register): ...this.
859 (mips_cannot_store_register): Turn into...
860 (mips_target::low_cannot_store_register): ...this.
861 (get_usrregs_info): Inline at the call sites in
862 low_cannot_fetch_register and low_cannot_store_register,
863 and remove.
864 (the_low_target): Remove the op fields.
865 * linux-nios2-low.cc (class nios2_target)
866 <low_cannot_fetch_register>
867 <low_cannot_store_register>: Declare.
868 (nios2_cannot_fetch_register): Turn into...
869 (nios2_target::low_cannot_fetch_register): ...this.
870 (nios2_cannot_store_register): Turn into...
871 (nios2_target::low_cannot_store_register): ...this.
872 (the_low_target): Remove the op fields.
873 * linux-ppc-low.cc (class ppc_target)
874 <low_cannot_fetch_register>
875 <low_cannot_store_register>: Declare.
876 (ppc_cannot_fetch_register): Turn into...
877 (ppc_target::low_cannot_fetch_register): ...this.
878 (ppc_cannot_store_register): Turn into...
879 (ppc_target::low_cannot_store_register): ...this.
880 (the_low_target): Remove the op fields.
881 * linux-riscv-low.cc (class riscv_target)
882 <low_cannot_fetch_register>
883 <low_cannot_store_register>: Declare.
884 (riscv_target::low_cannot_fetch_register)
885 (riscv_target::low_cannot_store_register): Define.
886 (the_low_target): Remove the op fields.
887 * linux-s390-low.cc (class s390_target)
888 <low_cannot_fetch_register>
889 <low_cannot_store_register>: Declare.
890 (s390_cannot_fetch_register): Turn into...
891 (s390_target::low_cannot_fetch_register): ...this.
892 (s390_cannot_store_register): Turn into...
893 (s390_target::low_cannot_store_register): ...this.
894 (the_low_target): Remove the op fields.
895 * linux-sh-low.cc (class sh_target)
896 <low_cannot_fetch_register>
897 <low_cannot_store_register>: Declare.
898 (sh_cannot_fetch_register): Turn into...
899 (sh_target::low_cannot_fetch_register): ...this.
900 (sh_cannot_store_register): Turn into...
901 (sh_target::low_cannot_store_register): ...this.
902 (the_low_target): Remove the op fields.
903 * linux-sparc-low.cc (class sparc_target)
904 <low_cannot_fetch_register>
905 <low_cannot_store_register>: Declare.
906 (sparc_cannot_fetch_register): Turn into...
907 (sparc_target::low_cannot_fetch_register): ...this.
908 (sparc_cannot_store_register): Turn into...
909 (sparc_target::low_cannot_store_register): ...this.
910 (the_low_target): Remove the op fields.
911 * linux-tic6x-low.cc (class tic6x_target)
912 <low_cannot_fetch_register>
913 <low_cannot_store_register>: Declare.
914 (tic6x_cannot_fetch_register): Turn into...
915 (tic6x_target::low_cannot_fetch_register): ...this.
916 (tic6x_cannot_store_register): Turn into...
917 (tic6x_target::low_cannot_store_register): ...this.
918 (the_low_target): Remove the op fields.
919 * linux-tile-low.cc (class tile_target)
920 <low_cannot_fetch_register>
921 <low_cannot_store_register>: Declare.
922 (tile_cannot_fetch_register): Turn into...
923 (tile_target::low_cannot_fetch_register): ...this.
924 (tile_cannot_store_register): Turn into...
925 (tile_target::low_cannot_store_register): ...this.
926 (the_low_target): Remove the op fields.
927 * linux-xtensa-low.cc (class xtensa_target)
928 <low_cannot_fetch_register>
929 <low_cannot_store_register>: Declare.
930 (xtensa_target::low_cannot_fetch_register)
931 (xtensa_target::low_cannot_store_register): Define.
932 (the_low_target): Remove the op fields.
933
934 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
935
936 Turn the 'regs_info' linux target op into a method of
937 linux_process_target.
938
939 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
940 (class linux_process_target) <get_regs_info>: Define.
941
942 Update the callers below.
943
944 * linux-low.cc (linux_process_target::fetch_registers)
945 (linux_process_target::store_registers)
946 * proc-service.cc (gregset_info)
947
948 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
949 (x86_linux_regs_info): Turn into ...
950 (x86_target::get_regs_info): ...this.
951 (the_low_target): Remove the op field.
952 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
953 Declare.
954 (aarch64_regs_info): Turn into ...
955 (aarch64_target::get_regs_info): ...this.
956 (the_low_target): Remove the op field.
957 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
958 (arm_regs_info): Turn into ...
959 (arm_target::get_regs_info): ...this.
960 (the_low_target): Remove the op field.
961 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
962 (bfin_regs_info): Turn into ...
963 (bfin_target::get_regs_info): ...this.
964 (the_low_target): Remove the op field.
965 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
966 (cris_regs_info): Turn into ...
967 (cris_target::get_regs_info): ...this.
968 (the_low_target): Remove the op field.
969 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
970 Declare.
971 (crisv32_regs_info): Turn into ...
972 (crisv32_target::get_regs_info): ...this.
973 (the_low_target): Remove the op field.
974 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
975 (ia64_regs_info): Turn into ...
976 (ia64_target::get_regs_info): ...this.
977 (the_low_target): Remove the op field.
978 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
979 (m32r_regs_info): Turn into ...
980 (m32r_target::get_regs_info): ...this.
981 (the_low_target): Remove the op field.
982 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
983 (m68k_regs_info): Turn into ...
984 (m68k_target::get_regs_info): ...this.
985 (the_low_target): Remove the op field.
986 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
987 (mips_regs_info): Turn into ...
988 (mips_target::get_regs_info): ...this.
989 (the_low_target): Remove the op field.
990 (get_usrregs_info): Update the call to the op.
991 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
992 (nios2_regs_info): Turn into ...
993 (nios2_target::get_regs_info): ...this.
994 (the_low_target): Remove the op field.
995 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
996 (ppc_regs_info): Turn into ...
997 (ppc_target::get_regs_info): ...this.
998 (the_low_target): Remove the op field.
999 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1000 (riscv_regs_info): Turn into ...
1001 (riscv_target::get_regs_info): ...this.
1002 (the_low_target): Remove the op field.
1003 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1004 (s390_regs_info): Turn into ...
1005 (s390_target::get_regs_info): ...this.
1006 (the_low_target): Remove the op field.
1007 (s390_collect_ptrace_register)
1008 (s390_supply_ptrace_register)
1009 (s390_fill_gregset): Update the call to the op.
1010 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1011 (sh_regs_info): Turn into ...
1012 (sh_target::get_regs_info): ...this.
1013 (the_low_target): Remove the op field.
1014 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1015 (sparc_regs_info): Turn into ...
1016 (sparc_target::get_regs_info): ...this.
1017 (the_low_target): Remove the op field.
1018 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1019 (tic6x_regs_info): Turn into ...
1020 (tic6x_target::get_regs_info): ...this.
1021 (the_low_target): Remove the op field.
1022 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1023 (tile_regs_info): Turn into ...
1024 (tile_target::get_regs_info): ...this.
1025 (the_low_target): Remove the op field.
1026 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1027 Declare.
1028 (xtensa_regs_info): Turn into ...
1029 (xtensa_target::get_regs_info): ...this.
1030 (the_low_target): Remove the op field.
1031
1032 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1033
1034 Turn the 'arch_setup' linux target op into a method of
1035 linux_process_target.
1036
1037 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1038 (class linux_process_target) <arch_setup_thread>
1039 <low_arch_setup>: New declarations.
1040 * linux-low.cc (linux_arch_setup): Delete.
1041 (linux_arch_setup_thread): Turn into...
1042 (linux_process_target::arch_setup_thread): ... this.
1043
1044 Update the callers below.
1045
1046 (linux_process_target::handle_extended_wait)
1047 (linux_process_target::post_create_inferior)
1048 (linux_process_target::filter_event)
1049
1050 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1051 declaration.
1052 (x86_linux_update_xmltarget): Turn into...
1053 (x86_target::update_xmltarget): ...this.
1054 (x86_linux_process_qsupported): Update the call to
1055 x86_linux_update_xmltarget.
1056 (x86_arch_setup): Turn into ...
1057 (x86_target::low_arch_setup): ...this.
1058 (the_low_target): Remove the op field.
1059 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1060 declaration.
1061 (aarch64_arch_setup): Turn into ...
1062 (aarch64_target::low_arch_setup): ...this.
1063 (the_low_target): Remove the op field.
1064 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1065 declaration.
1066 (arm_arch_setup): Turn into ...
1067 (arm_target::low_arch_setup): ...this.
1068 (the_low_target): Remove the op field.
1069 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1070 declaration.
1071 (bfin_arch_setup): Turn into ...
1072 (bfin_target::low_arch_setup): ...this.
1073 (the_low_target): Remove the op field.
1074 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1075 declaration.
1076 (cris_arch_setup): Turn into ...
1077 (cris_target::low_arch_setup): ...this.
1078 (the_low_target): Remove the op field.
1079 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1080 declaration.
1081 (crisv32_arch_setup): Turn into ...
1082 (crisv32_target::low_arch_setup): ...this.
1083 (the_low_target): Remove the op field.
1084 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1085 declaration.
1086 (ia64_arch_setup): Turn into ...
1087 (ia64_target::low_arch_setup): ...this.
1088 (the_low_target): Remove the op field.
1089 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1090 declaration.
1091 (m32r_arch_setup): Turn into ...
1092 (m32r_target::low_arch_setup): ...this.
1093 (the_low_target): Remove the op field.
1094 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1095 declaration.
1096 (m68k_arch_setup): Turn into ...
1097 (m68k_target::low_arch_setup): ...this.
1098 (the_low_target): Remove the op field.
1099 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1100 declaration.
1101 (mips_arch_setup): Turn into ...
1102 (mips_target::low_arch_setup): ...this.
1103 (the_low_target): Remove the op field.
1104 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1105 declaration.
1106 (nios2_arch_setup): Turn into ...
1107 (nios2_target::low_arch_setup): ...this.
1108 (the_low_target): Remove the op field.
1109 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1110 declaration.
1111 (ppc_arch_setup): Turn into ...
1112 (ppc_target::low_arch_setup): ...this.
1113 (the_low_target): Remove the op field.
1114 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1115 declaration.
1116 (riscv_arch_setup): Turn into ...
1117 (riscv_target::low_arch_setup): ...this.
1118 (the_low_target): Remove the op field.
1119 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1120 declaration.
1121 (s390_arch_setup): Turn into ...
1122 (s390_target::low_arch_setup): ...this.
1123 (the_low_target): Remove the op field.
1124 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
1125 declaration.
1126 (sh_arch_setup): Turn into ...
1127 (sh_target::low_arch_setup): ...this.
1128 (the_low_target): Remove the op field.
1129 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
1130 declaration.
1131 (sparc_arch_setup): Turn into ...
1132 (sparc_target::low_arch_setup): ...this.
1133 (the_low_target): Remove the op field.
1134 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
1135 declaration.
1136 (tic6x_arch_setup): Turn into ...
1137 (tic6x_target::low_arch_setup): ...this.
1138 (the_low_target): Remove the op field.
1139 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
1140 declaration.
1141 (tile_arch_setup): Turn into ...
1142 (tile_target::low_arch_setup): ...this.
1143 (the_low_target): Remove the op field.
1144 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
1145 declaration.
1146 (xtensa_arch_setup): Turn into ...
1147 (xtensa_target::low_arch_setup): ...this.
1148 (the_low_target): Remove the op field.
1149
1150 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1151
1152 * linux-low.h (the_linux_target): New extern declaration.
1153 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
1154 'the_target'.
1155 (the_linux_target): Remove.
1156 * linux-x86-low.cc (class x86_target): New class.
1157 (the_x86_target): New static object.
1158 (the_linux_target): Define as pointer to the_x86_target.
1159 * linux-aarch64-low.cc (class aarch64_target): New class.
1160 (the_aarch64_target): New static object.
1161 (the_linux_target): Define as pointer to the_aarch64_target.
1162 * linux-arm-low.cc (class arm_target): New class.
1163 (the_arm_target): New static object.
1164 (the_linux_target): Define as pointer to the_arm_target.
1165 * linux-bfin-low.cc (class bfin_target): New class.
1166 (the_bfin_target): New static object.
1167 (the_linux_target): Define as pointer to the_bfin_target.
1168 * linux-cris-low.cc (class cris_target): New class.
1169 (the_cris_target): New static object.
1170 (the_linux_target): Define as pointer to the_cris_target.
1171 * linux-crisv32-low.cc (class crisv32_target): New class.
1172 (the_crisv32_target): New static object.
1173 (the_linux_target): Define as pointer to the_crisv32_target.
1174 * linux-ia64-low.cc (class ia64_target): New class.
1175 (the_ia64_target): New static object.
1176 (the_linux_target): Define as pointer to the_ia64_target.
1177 * linux-m32r-low.cc (class m32r_target): New class.
1178 (the_m32r_target): New static object.
1179 (the_linux_target): Define as pointer to the_m32r_target.
1180 * linux-m68k-low.cc (class m68k_target): New class.
1181 (the_m68k_target): New static object.
1182 (the_linux_target): Define as pointer to the_m68k_target.
1183 * linux-mips-low.cc (class mips_target): New class.
1184 (the_mips_target): New static object.
1185 (the_linux_target): Define as pointer to the_mips_target.
1186 * linux-nios2-low.cc (class nios2_target): New class.
1187 (the_nios2_target): New static object.
1188 (the_linux_target): Define as pointer to the_nios2_target.
1189 * linux-ppc-low.cc (class ppc_target): New class.
1190 (the_ppc_target): New static object.
1191 (the_linux_target): Define as pointer to the_ppc_target.
1192 * linux-riscv-low.cc (class riscv_target): New class.
1193 (the_riscv_target): New static object.
1194 (the_linux_target): Define as pointer to the_riscv_target.
1195 * linux-s390-low.cc (class s390_target): New class.
1196 (the_s390_target): New static object.
1197 (the_linux_target): Define as pointer to the_s390_target.
1198 * linux-sh-low.cc (class sh_target): New class.
1199 (the_sh_target): New static object.
1200 (the_linux_target): Define as pointer to the_sh_target.
1201 * linux-sparc-low.cc (class sparc_target): New class.
1202 (the_sparc_target): New static object.
1203 (the_linux_target): Define as pointer to the_sparc_target.
1204 * linux-tic6x-low.cc (class tic6x_target): New class.
1205 (the_tic6x_target): New static object.
1206 (the_linux_target): Define as pointer to the_tic6x_target.
1207 * linux-tile-low.cc (class tile_target): New class.
1208 (the_tile_target): New static object.
1209 (the_linux_target): Define as pointer to the_tile_target.
1210 * linux-xtensa-low.cc (class xtensa_target): New class.
1211 (the_xtensa_target): New static object.
1212 (the_linux_target): Define as pointer to the_xtensa_target.
1213
1214 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1215
1216 Turn some static functions in linux-low.cc into private methods of
1217 linux_process_target.
1218
1219 * linux-low.cc (handle_extended_wait): Turn into ...
1220 (linux_process_target::handle_extended_wait): ...this. Call
1221 'mourn' on 'this' object instead of 'the_target'.
1222 (maybe_move_out_of_jump_pad): Turn into...
1223 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
1224 (linux_low_filter_event): Turn into...
1225 (linux_process_target::filter_event): ...this.
1226 (linux_wait_for_event_filtered): Turn into...
1227 (linux_process_target::wait_for_event_filtered): ...this.
1228 (linux_wait_for_event): Turn into...
1229 (linux_process_target::wait_for_event): ...this.
1230 (linux_wait_1): Turn into...
1231 (linux_process_target::wait_1): ...this.
1232 (wait_for_sigstop): Turn into...
1233 (linux_process_target::wait_for_sigstop): ...this.
1234 (move_out_of_jump_pad_callback): Turn into...
1235 (linux_process_target::move_out_of_jump_pad): ...this.
1236 (stop_all_lwps): Turn into...
1237 (linux_process_target::stop_all_lwps): ...this.
1238 (start_step_over): Turn into...
1239 (linux_process_target::start_step_over): ...this.
1240 (complete_ongoing_step_over): Turn into...
1241 (linux_process_target::complete_ongoing_step_over): ...this.
1242 (proceed_all_lwps): Turn into...
1243 (linux_process_target::proceed_all_lwps): ...this.
1244 (unstop_all_lwps): Turn into...
1245 (linux_process_target::unstop_all_lwps): ...this.
1246
1247 * linux-low.h (class linux_process_target)
1248 <handle_extended_wait>
1249 <maybe_move_out_of_jump_pad>
1250 filter_event>
1251 <wait_for_event_filtered>
1252 <wait_for_event>
1253 <wait_1>
1254 <wait_for_sigstop>
1255 <move_out_of_jump_pad>
1256 <stop_all_lwps>
1257 <start_step_over>
1258 <complete_ongoing_step_over>
1259 <proceed_all_lwps>
1260 <unstop_all_lwps>: Declare.
1261
1262 Update the callers below.
1263
1264 * linux-low.cc (linux_process_target::attach): Update.
1265 (linux_process_target::stabilize_threads): Ditto.
1266 (linux_process_target::wait): Ditto.
1267
1268 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1269
1270 * linux-low.h (struct linux_target_ops): Update the comment for
1271 'cannot_store_register' to return 0 or 1.
1272 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
1273 of 2.
1274
1275 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
1276
1277 * config.in: Re-generate.
1278 * configure: Re-generate.
1279
1280 2020-03-17 Kamil Rytarowski <n54@gmx.com>
1281
1282 * regcache.cc (find_register_by_number): Update.
1283 * tdesc.cc (init_target_desc): Likewise.
1284 * tdesc.h (target_desc::reg_defs): Likewise.
1285
1286 2020-03-12 Tom Tromey <tom@tromey.com>
1287
1288 * configure: Rebuild.
1289 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
1290 (WIN32APILIBS): New subst.
1291 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
1292 gdbsupport files.
1293 (gdbsupport/%.o): Remove target.
1294 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
1295 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
1296 (WIN32APILIBS): New variable.
1297 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
1298 (gdbreplay$(EXEEXT)): Likewise.
1299
1300 2020-03-12 Tom Tromey <tom@tromey.com>
1301
1302 * config.in, configure: Rebuild.
1303 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
1304 * acinclude.m4: Include gettext-sister.m4.
1305 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
1306 variables.
1307 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
1308 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
1309
1310 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1311
1312 * acinclude.m4: Update path to selftest.m4.
1313
1314 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1315
1316 * configure.ac: Don't source bfd/development.sh, move
1317 GDB_AC_COMMON higher.
1318 * configure: Re-generate.
1319
1320 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
1321
1322 * configure: Re-generate.
1323
1324 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1325
1326 * configure: Re-generate.
1327
1328 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1329
1330 * .dir-locals.el: New file.
1331
1332 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1333
1334 * .gitattributes: New file.
1335
1336 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1337
1338 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1339 reply into an S reply.
1340 * server.cc (disable_packet_T): New global.
1341 (captured_main): Set new global when appropriate.
1342 * server.h (disable_packet_T): Declare.
1343
1344 2020-02-21 Tom Tromey <tom@tromey.com>
1345
1346 * Makefile.in (mostlyclean): New target.
1347
1348 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1349
1350 * target.h (struct process_stratum_target): Remove.
1351 (class process_target): Rename to ...
1352 (class process_stratum_target): ... this.
1353 * linux-low.h (class linux_process_target): Derive from
1354 'process_stratum_target'.
1355 * linux-low.cc (linux_target_ops): Remove.
1356 (initialize_low): Set the_target to the singleton instance of
1357 linux_process_target.
1358 * lynx-low.h (class lynx_process_target): Derive from
1359 'process_stratum_target'.
1360 * lynx-low.cc (lynx_target_ops): Remove.
1361 (initialize_low): Set the_target to the singleton instance of
1362 lynx_process_target.
1363 * nto-low.h (class nto_process_target): Derive from
1364 'process_stratum_target'.
1365 * nto-low.cc (nto_target_ops): Remove.
1366 (initialize_low): Set the_target to the singleton instance of
1367 nto_process_target.
1368 * win32-low.h (class win32_process_target): Derive from
1369 'process_stratum_target'.
1370 * win32-low.cc (win32_target_ops): Remove.
1371 (initialize_low): Set the_target to the singleton instance of
1372 win32_process_target.
1373
1374 Replace 'the_target->pt' with 'the_target' in the uses below.
1375
1376 * hostio.cc (hostio_error)
1377 (handle_setfs)
1378 (handle_open)
1379 (handle_unlink)
1380 (handle_readlink)
1381 * linux-aarch32-low.cc (arm_breakpoint_at)
1382 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1383 * linux-arm-low.cc (arm_sigreturn_next_pc)
1384 (arm_get_hwcap)
1385 (arm_get_syscall_trapinfo)
1386 * linux-cris-low.cc (cris_breakpoint_at)
1387 * linux-crisv32-low.cc (cris_breakpoint_at)
1388 * linux-low.cc (handle_extended_wait)
1389 (linux_wait_1)
1390 (linux_read_memory)
1391 (linux_process_target::breakpoint_kind_from_pc)
1392 (linux_get_auxv)
1393 * linux-m32r-low.cc (m32r_breakpoint_at)
1394 * linux-mips-low.cc (mips_breakpoint_at)
1395 * linux-nios2-low.cc (nios2_breakpoint_at)
1396 * linux-ppc-low.cc (ppc_breakpoint_at)
1397 * linux-s390-low.cc (s390_get_hwcap)
1398 * linux-sh-low.cc (sh_breakpoint_at)
1399 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1400 (sparc_store_gregset_from_stack)
1401 (sparc_breakpoint_at)
1402 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1403 * linux-tile-low.cc (tile_breakpoint_at)
1404 * linux-x86-low.cc (x86_breakpoint_at)
1405 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1406 * mem-break.cc (bp_size)
1407 (bp_opcode)
1408 (insert_memory_breakpoint)
1409 (set_raw_breakpoint_at)
1410 (delete_raw_breakpoint)
1411 (z_type_supported)
1412 (uninsert_raw_breakpoint)
1413 (reinsert_raw_breakpoint)
1414 (validate_inserted_breakpoint)
1415 * regcache.cc (regcache_read_pc)
1416 (regcache_write_pc)
1417 * remote-utils.cc (putpkt_binary_1)
1418 (input_interrupt)
1419 (getpkt)
1420 (prepare_resume_reply)
1421 * server.cc (handle_general_set)
1422 (handle_detach)
1423 (handle_qxfer_auxv)
1424 (handle_qxfer_exec_file)
1425 (handle_qxfer_libraries_svr4)
1426 (handle_qxfer_osdata)
1427 (handle_qxfer_siginfo)
1428 (handle_qxfer_fdpic)
1429 (handle_query)
1430 (resume)
1431 (handle_v_requests)
1432 (queue_stop_reply_callback)
1433 (captured_main)
1434 * target.cc (prepare_to_access_memory)
1435 (done_accessing_memory)
1436 (read_inferior_memory)
1437 (target_write_memory)
1438 (target_stop_and_wait)
1439 (target_wait)
1440 (target_mourn_inferior)
1441 (target_continue_no_signal)
1442 (target_continue)
1443 (target_supports_multi_process)
1444 (kill_inferior)
1445 * target.h
1446 (target_create_inferior)
1447 (target_post_create_inferior)
1448 (myattach)
1449 (target_supports_fork_events)
1450 (target_supports_vfork_events)
1451 (target_supports_exec_events)
1452 (target_handle_new_gdb_connection)
1453 (detach_inferior)
1454 (mythread_alive)
1455 (fetch_inferior_registers)
1456 (store_inferior_registers)
1457 (join_inferior)
1458 (target_supports_non_stop)
1459 (target_async)
1460 (target_process_qsupported)
1461 (target_supports_catch_syscall)
1462 (target_get_ipa_tdesc_idx)
1463 (target_supports_tracepoints)
1464 (target_supports_fast_tracepoints)
1465 (target_get_min_fast_tracepoint_insn_len)
1466 (target_thread_stopped)
1467 (target_pause_all)
1468 (target_unpause_all)
1469 (target_stabilize_threads)
1470 (target_install_fast_tracepoint_jump_pad)
1471 (target_emit_ops)
1472 (target_supports_disable_randomization)
1473 (target_supports_agent)
1474 (target_enable_btrace)
1475 (target_disable_btrace)
1476 (target_read_btrace)
1477 (target_read_btrace_conf)
1478 (target_supports_range_stepping)
1479 (target_supports_stopped_by_sw_breakpoint)
1480 (target_stopped_by_sw_breakpoint)
1481 (target_supports_stopped_by_hw_breakpoint)
1482 (target_supports_hardware_single_step)
1483 (target_stopped_by_hw_breakpoint)
1484 (target_breakpoint_kind_from_pc)
1485 (target_breakpoint_kind_from_current_state)
1486 (target_supports_software_single_step)
1487 (target_core_of_thread)
1488 (target_thread_name)
1489 (target_thread_handle)
1490 * win32-low.cc (do_initial_child_stuff)
1491
1492 Rename target op default definitions listed below.
1493
1494 * target.cc (process_target::post_create_inferior): Rename as ...
1495 (process_stratum_target::post_create_inferior): ... this.
1496 (process_target::prepare_to_access_memory): Rename as ...
1497 (process_stratum_target::prepare_to_access_memory): ... this.
1498 (process_target::done_accessing_memory): Rename as ...
1499 (process_stratum_target::done_accessing_memory): ... this.
1500 (process_target::look_up_symbols): Rename as ...
1501 (process_stratum_target::look_up_symbols): ... this.
1502 (process_target::supports_read_auxv): Rename as ...
1503 (process_stratum_target::supports_read_auxv): ... this.
1504 (process_target::read_auxv): Rename as ...
1505 (process_stratum_target::read_auxv): ... this.
1506 (process_target::supports_z_point_type): Rename as ...
1507 (process_stratum_target::supports_z_point_type): ... this.
1508 (process_target::insert_point): Rename as ...
1509 (process_stratum_target::insert_point): ... this.
1510 (process_target::remove_point): Rename as ...
1511 (process_stratum_target::remove_point): ... this.
1512 (process_target::stopped_by_sw_breakpoint): Rename as ...
1513 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1514 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1515 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1516 (process_target::stopped_by_hw_breakpoint): Rename as ...
1517 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1518 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1519 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1520 (process_target::supports_hardware_single_step): Rename as ...
1521 (process_stratum_target::supports_hardware_single_step): ... this.
1522 (process_target::stopped_by_watchpoint): Rename as ...
1523 (process_stratum_target::stopped_by_watchpoint): ... this.
1524 (process_target::stopped_data_address): Rename as ...
1525 (process_stratum_target::stopped_data_address): ... this.
1526 (process_target::supports_read_offsets): Rename as ...
1527 (process_stratum_target::supports_read_offsets): ... this.
1528 (process_target::read_offsets): Rename as ...
1529 (process_stratum_target::read_offsets): ... this.
1530 (process_target::supports_get_tls_address): Rename as ...
1531 (process_stratum_target::supports_get_tls_address): ... this.
1532 (process_target::get_tls_address): Rename as ...
1533 (process_stratum_target::get_tls_address): ... this.
1534 (process_target::hostio_last_error): Rename as ...
1535 (process_stratum_target::hostio_last_error): ... this.
1536 (process_target::supports_qxfer_osdata): Rename as ...
1537 (process_stratum_target::supports_qxfer_osdata): ... this.
1538 (process_target::qxfer_osdata): Rename as ...
1539 (process_stratum_target::qxfer_osdata): ... this.
1540 (process_target::supports_qxfer_siginfo): Rename as ...
1541 (process_stratum_target::supports_qxfer_siginfo): ... this.
1542 (process_target::qxfer_siginfo): Rename as ...
1543 (process_stratum_target::qxfer_siginfo): ... this.
1544 (process_target::supports_non_stop): Rename as ...
1545 (process_stratum_target::supports_non_stop): ... this.
1546 (process_target::async): Rename as ...
1547 (process_stratum_target::async): ... this.
1548 (process_target::start_non_stop): Rename as ...
1549 (process_stratum_target::start_non_stop): ... this.
1550 (process_target::supports_multi_process): Rename as ...
1551 (process_stratum_target::supports_multi_process): ... this.
1552 (process_target::supports_fork_events): Rename as ...
1553 (process_stratum_target::supports_fork_events): ... this.
1554 (process_target::supports_vfork_events): Rename as ...
1555 (process_stratum_target::supports_vfork_events): ... this.
1556 (process_target::supports_exec_events): Rename as ...
1557 (process_stratum_target::supports_exec_events): ... this.
1558 (process_target::handle_new_gdb_connection): Rename as ...
1559 (process_stratum_target::handle_new_gdb_connection): ... this.
1560 (process_target::handle_monitor_command): Rename as ...
1561 (process_stratum_target::handle_monitor_command): ... this.
1562 (process_target::core_of_thread): Rename as ...
1563 (process_stratum_target::core_of_thread): ... this.
1564 (process_target::supports_read_loadmap): Rename as ...
1565 (process_stratum_target::supports_read_loadmap): ... this.
1566 (process_target::read_loadmap): Rename as ...
1567 (process_stratum_target::read_loadmap): ... this.
1568 (process_target::process_qsupported): Rename as ...
1569 (process_stratum_target::process_qsupported): ... this.
1570 (process_target::supports_tracepoints): Rename as ...
1571 (process_stratum_target::supports_tracepoints): ... this.
1572 (process_target::read_pc): Rename as ...
1573 (process_stratum_target::read_pc): ... this.
1574 (process_target::write_pc): Rename as ...
1575 (process_stratum_target::write_pc): ... this.
1576 (process_target::supports_thread_stopped): Rename as ...
1577 (process_stratum_target::supports_thread_stopped): ... this.
1578 (process_target::thread_stopped): Rename as ...
1579 (process_stratum_target::thread_stopped): ... this.
1580 (process_target::supports_get_tib_address): Rename as ...
1581 (process_stratum_target::supports_get_tib_address): ... this.
1582 (process_target::get_tib_address): Rename as ...
1583 (process_stratum_target::get_tib_address): ... this.
1584 (process_target::pause_all): Rename as ...
1585 (process_stratum_target::pause_all): ... this.
1586 (process_target::unpause_all): Rename as ...
1587 (process_stratum_target::unpause_all): ... this.
1588 (process_target::stabilize_threads): Rename as ...
1589 (process_stratum_target::stabilize_threads): ... this.
1590 (process_target::supports_fast_tracepoints): Rename as ...
1591 (process_stratum_target::supports_fast_tracepoints): ... this.
1592 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1593 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1594 (process_target::emit_ops): Rename as ...
1595 (process_stratum_target::emit_ops): ... this.
1596 (process_target::supports_disable_randomization): Rename as ...
1597 (process_stratum_target::supports_disable_randomization): ... this.
1598 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1599 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1600 (process_target::qxfer_libraries_svr4): Rename as ...
1601 (process_stratum_target::qxfer_libraries_svr4): ... this.
1602 (process_target::supports_agent): Rename as ...
1603 (process_stratum_target::supports_agent): ... this.
1604 (process_target::enable_btrace): Rename as ...
1605 (process_stratum_target::enable_btrace): ... this.
1606 (process_target::disable_btrace): Rename as ...
1607 (process_stratum_target::disable_btrace): ... this.
1608 (process_target::read_btrace): Rename as ...
1609 (process_stratum_target::read_btrace): ... this.
1610 (process_target::read_btrace_conf): Rename as ...
1611 (process_stratum_target::read_btrace_conf): ... this.
1612 (process_target::supports_range_stepping): Rename as ...
1613 (process_stratum_target::supports_range_stepping): ... this.
1614 (process_target::supports_pid_to_exec_file): Rename as ...
1615 (process_stratum_target::supports_pid_to_exec_file): ... this.
1616 (process_target::pid_to_exec_file): Rename as ...
1617 (process_stratum_target::pid_to_exec_file): ... this.
1618 (process_target::supports_multifs): Rename as ...
1619 (process_stratum_target::supports_multifs): ... this.
1620 (process_target::multifs_open): Rename as ...
1621 (process_stratum_target::multifs_open): ... this.
1622 (process_target::multifs_unlink): Rename as ...
1623 (process_stratum_target::multifs_unlink): ... this.
1624 (process_target::multifs_readlink): Rename as ...
1625 (process_stratum_target::multifs_readlink): ... this.
1626 (process_target::breakpoint_kind_from_pc): Rename as ...
1627 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1628 (process_target::breakpoint_kind_from_current_state): Rename as ...
1629 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1630 (process_target::thread_name): Rename as ...
1631 (process_stratum_target::thread_name): ... this.
1632 (process_target::thread_handle): Rename as ...
1633 (process_stratum_target::thread_handle): ... this.
1634 (process_target::supports_software_single_step): Rename as ...
1635 (process_stratum_target::supports_software_single_step): ... this.
1636 (process_target::supports_catch_syscall): Rename as ...
1637 (process_stratum_target::supports_catch_syscall): ... this.
1638 (process_target::get_ipa_tdesc_idx): Rename as ...
1639 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1640
1641 2020-02-20 Pedro Alves <palves@redhat.com>
1642
1643 * target.cc (set_target_ops): Simply copy the given target pointer
1644 instead of creating a copy of the pointed object.
1645
1646 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1647
1648 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1649 of process_target.
1650
1651 * target.h (struct process_stratum_target): Remove the target op.
1652 (class process_target): Add the target op.
1653 (target_get_ipa_tdesc_idx): Update the macro.
1654 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1655
1656 Update the derived classes and callers below.
1657
1658 * linux-low.cc (linux_target_ops): Update.
1659 (linux_get_ipa_tdesc_idx): Turn into ...
1660 (linux_process_target::get_ipa_tdesc_idx): ... this.
1661 * linux-low.h (class linux_process_target): Update.
1662 * lynx-low.cc (lynx_target_ops): Update.
1663 * nto-low.cc (nto_target_ops): Update.
1664 * win32-low.cc (win32_target_ops): Update.
1665
1666 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1667
1668 Turn process_stratum_target's supports_catch_syscall op into a
1669 method of process_target.
1670
1671 * target.h (struct process_stratum_target): Remove the target op.
1672 (class process_target): Add the target op.
1673 (target_supports_catch_syscall): Update the macro.
1674 * target.cc (process_target::supports_catch_syscall): Define.
1675
1676 Update the derived classes and callers below.
1677
1678 * linux-low.cc (linux_target_ops): Update.
1679 (linux_supports_catch_syscall): Turn into ...
1680 (linux_process_target::supports_catch_syscall): ... this.
1681 * linux-low.h (class linux_process_target): Update.
1682 * lynx-low.cc (lynx_target_ops): Update.
1683 * nto-low.cc (nto_target_ops): Update.
1684 * win32-low.cc (win32_target_ops): Update.
1685
1686 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1687
1688 Turn process_stratum_target's supports_software_single_step op
1689 into a method of process_target.
1690
1691 * target.h (struct process_stratum_target): Remove the target op.
1692 (class process_target): Add the target op.
1693 (target_supports_software_single_step): Update the macro.
1694 * target.cc (process_target::supports_software_single_step): Define.
1695
1696 Update the derived classes and callers below.
1697
1698 * linux-low.cc (linux_target_ops): Update.
1699 (linux_supports_software_single_step): Turn into ...
1700 (linux_process_target::supports_software_single_step): ... this.
1701 * linux-low.h (class linux_process_target): Update.
1702 * lynx-low.cc (lynx_target_ops): Update.
1703 * nto-low.cc (nto_target_ops): Update.
1704 * win32-low.cc (win32_target_ops): Update.
1705
1706 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1707
1708 Turn process_stratum_target's thread_name and thread_handle ops
1709 into methods of process_target.
1710
1711 * target.h (struct process_stratum_target): Remove the target ops.
1712 (class process_target): Add the target ops.
1713 (target_thread_name): Update the macro.
1714 (target_thread_handle): Update the macro.
1715 * target.cc (process_target::thread_name): Define.
1716 (process_target::thread_handle): Define.
1717
1718 Update the derived classes and callers below.
1719
1720 * linux-low.cc (linux_target_ops): Update.
1721 (linux_process_target::thread_name): Define.
1722 (linux_process_target::thread_handle): Define.
1723 * linux-low.h (class linux_process_target): Update.
1724 * lynx-low.cc (lynx_target_ops): Update.
1725 * nto-low.cc (nto_target_ops): Update.
1726 * win32-low.cc (win32_target_ops): Update.
1727
1728 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1729
1730 Turn process_stratum_target's breakpoint_kind_from_pc,
1731 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1732 ops into methods of process_target.
1733
1734 * target.h (struct process_stratum_target): Remove the target op.
1735 (class process_target): Add the target op.
1736 (target_breakpoint_kind_from_pc): Update the macro.
1737 (target_breakpoint_kind_from_current_state): Update the macro.
1738 (default_breakpoint_kind_from_pc): Remove declaration.
1739 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1740 (process_target::breakpoint_kind_from_pc): ... this.
1741 (process_target::breakpoint_kind_from_current_state): Define.
1742
1743 Update the derived classes and callers below.
1744
1745 * mem-break.cc (bp_size): Update.
1746 (bp_opcode): Update.
1747 * linux-low.cc (linux_target_ops): Update.
1748 (linux_wait_1): Update.
1749 (linux_breakpoint_kind_from_pc): Turn into ...
1750 (linux_process_target::breakpoint_kind_from_pc): ... this.
1751 (linux_sw_breakpoint_from_kind): Turn into ...
1752 (linux_process_target::sw_breakpoint_from_kind): ... this.
1753 (linux_breakpoint_kind_from_current_state): Turn into ...
1754 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1755 * linux-low.h (class linux_process_target): Update.
1756 * lynx-low.cc (lynx_target_ops): Update.
1757 (lynx_process_target::sw_breakpoint_from_kind): Define.
1758 * lynx-low.h (class lynx_process_target): Update.
1759 * nto-low.cc (nto_target_ops): Update.
1760 (nto_sw_breakpoint_from_kind): Turn into ...
1761 (nto_process_target::sw_breakpoint_from_kind): ... this.
1762 * nto-low.h (class nto_process_target): Update.
1763 * win32-low.cc (win32_target_ops): Update.
1764 (win32_sw_breakpoint_from_kind): Turn into ...
1765 (win32_process_target::sw_breakpoint_from_kind): ... this.
1766 * win32-low.h (class win32_process_target): Update.
1767
1768 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1769
1770 Turn process_stratum_target's multifs_open, multifs_readlink,
1771 multifs_unlink ops into methods of process_target.
1772
1773 * target.h (struct process_stratum_target): Remove the target ops.
1774 (class process_target): Add the target ops. Also add
1775 'supports_multifs'.
1776 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1777 "sys/stat.h".
1778 (process_target::supports_multifs): Define.
1779 (process_target::multifs_open): Define.
1780 (process_target::multifs_readlink): Define.
1781 (process_target::multifs_unlink): Define.
1782
1783 Update the derived classes and callers below.
1784
1785 * hostio.cc (handle_setfs): Update.
1786 (handle_open): Update.
1787 (handle_unlink): Update.
1788 (handle_readlink): Update.
1789 * linux-low.cc (linux_target_ops): Update.
1790 (linux_process_target::supports_multifs): Define.
1791 (linux_process_target::multifs_open): Define.
1792 (linux_process_target::multifs_readlink): Define.
1793 (linux_process_target::multifs_unlink): Define.
1794 * linux-low.h (class linux_process_target): Update.
1795 * lynx-low.cc (lynx_target_ops): Update.
1796 * nto-low.cc (nto_target_ops): Update.
1797 * win32-low.cc (win32_target_ops): Update.
1798
1799 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1800
1801 Turn process_stratum_target's pid_to_exec_file op into a method
1802 of process_target.
1803
1804 * target.h (struct process_stratum_target): Remove the target op.
1805 (class process_target): Add the target op. Also add
1806 'supports_pid_to_exec_file'.
1807 * target.cc (process_target::pid_to_exec_file): Define.
1808 (process_target::supports_pid_to_exec_file): Define.
1809
1810 Update the derived classes and callers below.
1811
1812 * server.cc (handle_qxfer_exec_file): Update.
1813 (handle_query): Update.
1814 * linux-low.cc (linux_target_ops): Update.
1815 (linux_process_target::supports_pid_to_exec_file): Define.
1816 (linux_process_target::pid_to_exec_file): Define.
1817 * linux-low.h (class linux_process_target): Update.
1818 * lynx-low.cc (lynx_target_ops): Update.
1819 * nto-low.cc (nto_target_ops): Update.
1820 * win32-low.cc (win32_target_ops): Update.
1821
1822 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1823
1824 Turn process_stratum_target's supports_range_stepping op into a
1825 method of process_target.
1826
1827 * target.h (struct process_stratum_target): Remove the target op.
1828 (class process_target): Add the target op.
1829 (target_supports_range_stepping): Update the macro.
1830 * target.cc (process_target::supports_range_stepping): Define.
1831
1832 Update the derived classes and callers below.
1833
1834 * linux-low.cc (linux_target_ops): Update.
1835 (linux_supports_range_stepping): Turn into ...
1836 (linux_process_target::supports_range_stepping): ... this.
1837 * linux-low.h (class linux_process_target): Update.
1838 * lynx-low.cc (lynx_target_ops): Update.
1839 * nto-low.cc (nto_target_ops): Update.
1840 * win32-low.cc (win32_target_ops): Update.
1841
1842 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1843
1844 Turn process_stratum_target's btrace-related ops (enable_btrace,
1845 disable_btrace, read_btrace, read_btrace_conf) into methods of
1846 process_target.
1847
1848 * target.h (struct process_stratum_target): Remove the target ops.
1849 (class process_target): Add the target ops.
1850 (target_enable_btrace): Update.
1851 (target_disable_btrace): Update.
1852 (target_read_btrace): Update.
1853 (target_read_btrace_conf): Update.
1854 * target.cc (process_target::enable_btrace): Define.
1855 (process_target::disable_btrace): Define.
1856 (process_target::read_btrace): Define.
1857 (process_target::read_btrace_conf): Define.
1858
1859 Update the derived classes and callers below.
1860
1861 * linux-low.cc (linux_target_ops): Update.
1862 (linux_process_target:enable_btrace): Define as a wrapper around
1863 linux_enable_btrace.
1864 (linux_low_disable_btrace): Turn into ...
1865 (linux_process_target::disable_btrace): ... this.
1866 (linux_low_read_btrace): Turn into ...
1867 (linux_process_target::read_btrace): ... this.
1868 (linux_low_btrace_conf): Turn into ...
1869 (linux_process_target::read_btrace_conf): ... this.
1870 * linux-low.h (class linux_process_target): Update.
1871 * lynx-low.cc (lynx_target_ops): Update.
1872 * nto-low.cc (nto_target_ops): Update.
1873 * win32-low.cc (win32_target_ops): Update.
1874
1875 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1876
1877 Turn process_stratum_target's supports_agent op into a method of
1878 process_target.
1879
1880 * target.h (struct process_stratum_target): Remove the target op.
1881 (class process_target): Add the target op.
1882 (target_supports_agent): Update the macro.
1883 * target.cc (process_target::supports_agent): Define.
1884
1885 Update the derived classes and callers below.
1886
1887 * linux-low.cc (linux_target_ops): Update.
1888 (linux_supports_agent): Turn into ...
1889 (linux_process_target::supports_agent): ... this.
1890 * linux-low.h (class linux_process_target): Update.
1891 * lynx-low.cc (lynx_target_ops): Update.
1892 * nto-low.cc (nto_target_ops): Update.
1893 * win32-low.cc (win32_target_ops): Update.
1894
1895 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1896
1897 Turn process_stratum_target's qxfer_libraries_svr4 op into a
1898 method of process_target.
1899
1900 * target.h (struct process_stratum_target): Remove the target op.
1901 (class process_target): Add the target op. Also add
1902 'supports_qxfer_libraries_svr4'.
1903 * target.cc (process_target::qxfer_libraries_svr4): Define.
1904 (process_target::supports_qxfer_libraries_svr4): Define.
1905
1906 Update the derived classes and callers below.
1907
1908 * server.cc (handle_qxfer_libraries_svr4): Update.
1909 (handle_query): Update.
1910 * linux-low.cc (linux_target_ops): Update.
1911 (linux_process_target::supports_qxfer_libraries_svr4): Define.
1912 (linux_qxfer_libraries_svr4): Turn into ...
1913 (linux_process_target::qxfer_libraries_svr4): ... this.
1914 * linux-low.h (class linux_process_target): Update.
1915 * lynx-low.cc (lynx_target_ops): Update.
1916 * nto-low.cc (nto_target_ops): Update.
1917 * win32-low.cc (win32_target_ops): Update.
1918
1919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1920
1921 Turn process_stratum_target's supports_disable_randomization op
1922 into a method of process_target.
1923
1924 * target.h (struct process_stratum_target): Remove the target op.
1925 (class process_target): Add the target op.
1926 (target_supports_disable_randomization): Update the macro.
1927 * target.cc (process_target::supports_disable_randomization): Define.
1928
1929 Update the derived classes and callers below.
1930
1931 * linux-low.cc (linux_target_ops): Update.
1932 (linux_supports_disable_randomization): Turn into ...
1933 (linux_process_target::supports_disable_randomization): ... this.
1934 * linux-low.h (class linux_process_target): Update.
1935 * lynx-low.cc (lynx_target_ops): Update.
1936 * nto-low.cc (nto_target_ops): Update.
1937 * win32-low.cc (win32_target_ops): Update.
1938
1939 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1940
1941 Turn process_stratum_target's emit_ops op into a method of
1942 process_target.
1943
1944 * target.h (struct process_stratum_target): Remove the target op.
1945 (class process_target): Add the target op.
1946 (target_emit_ops): Update the macro.
1947 * target.cc (process_target::emit_ops): Define.
1948
1949 Update the derived classes and callers below.
1950
1951 * linux-low.cc (linux_target_ops): Update.
1952 (linux_emit_ops): Turn into ...
1953 (linux_process_target::emit_ops): ... this.
1954 * linux-low.h (class linux_process_target): Update.
1955 * lynx-low.cc (lynx_target_ops): Update.
1956 * nto-low.cc (nto_target_ops): Update.
1957 * win32-low.cc (win32_target_ops): Update.
1958
1959 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1960
1961 Turn process_stratum_target's install_fast_tracepoint_jump_pad
1962 and get_min_fast_tracepoint_insn_len ops into methods of
1963 process_target.
1964
1965 * target.h (struct process_stratum_target): Remove the target ops.
1966 (class process_target): Add the target ops. Also add
1967 'supports_fast_tracepoints'.
1968 (target_supports_fast_tracepoints): Update the macro.
1969 (target_get_min_fast_tracepoint_insn_len): Update the macro.
1970 (install_fast_tracepoint_jump_pad): Update and rename the macro
1971 to ...
1972 (target_install_fast_tracepoint_jump_pad): ... this.
1973 * target.cc (process_target::supports_fast_tracepoints): Define.
1974 (process_target::install_fast_tracepoint_jump_pad): Define.
1975 (process_target::get_min_fast_tracepoint_insn_len): Define.
1976
1977 Update the derived classes and callers below.
1978
1979 * tracepoint.cc (install_fast_tracepoint): Update.
1980 * linux-low.cc (linux_target_ops): Update.
1981 (linux_process_target::supports_fast_tracepoints): Define.
1982 (linux_install_fast_tracepoint_jump_pad): Turn into ...
1983 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
1984 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
1985 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
1986 * linux-low.h (class linux_process_target): Update.
1987 * lynx-low.cc (lynx_target_ops): Update.
1988 * nto-low.cc (nto_target_ops): Update.
1989 * win32-low.cc (win32_target_ops): Update.
1990
1991 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1992
1993 Turn process_stratum_target's stabilize_threads op into a
1994 method of process_target.
1995
1996 * target.h (struct process_stratum_target): Remove the target op.
1997 (class process_target): Add the target op.
1998 (target_stabilize_threads): Update the macro.
1999 * target.cc (process_target::stabilize_threads): Define.
2000
2001 Update the derived classes and callers below.
2002
2003 * server.cc (handle_status): Update.
2004 * tracepoint.cc (cmd_qtdp): Update.
2005 (cmd_qtstart): Update.
2006 * linux-low.cc (linux_target_ops): Update.
2007 (linux_stabilize_threads): Turn into ...
2008 (linux_process_target::stabilize_threads): ... this.
2009 (linux_wait_1): Update.
2010 * linux-low.h (class linux_process_target): Update.
2011 * lynx-low.cc (lynx_target_ops): Update.
2012 * nto-low.cc (nto_target_ops): Update.
2013 * win32-low.cc (win32_target_ops): Update.
2014
2015 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2016
2017 Turn process_stratum_target's pause_all and unpause_all ops
2018 into methods of process_target.
2019
2020 * target.h (struct process_stratum_target): Remove the target ops.
2021 (class process_target): Add the target ops.
2022 (pause_all): Update the macro and rename to...
2023 (target_pause_all): ... this.
2024 (unpause_all): Update the macro and rename to...
2025 (target_unpause_all): ... this.
2026 * target.cc (process_target::pause_all): Define.
2027 (process_target::unpause_all): Define.
2028
2029 Update the derived classes and callers below.
2030
2031 * server.cc (handle_status): Update.
2032 * tracepoint.cc (clear_installed_tracepoints): Update.
2033 (cmd_qtdp): Update.
2034 (cmd_qtstart): Update.
2035 (stop_tracing): Update.
2036 (cmd_qtstatus): Update.
2037 (upload_fast_traceframes): Update.
2038 (run_inferior_command): Update.
2039 * linux-low.cc (linux_target_ops): Update.
2040 (linux_pause_all): Turn into ...
2041 (linux_process_target::pause_all): ... this.
2042 (linux_unpause_all): Turn into ...
2043 (linux_process_target::unpause_all): ... this.
2044 (linux_process_target::prepare_to_access_memory): Update.
2045 (linux_process_target::done_accessing_memory): Update.
2046 * linux-low.h (class linux_process_target): Update.
2047 * lynx-low.cc (lynx_target_ops): Update.
2048 * nto-low.cc (nto_target_ops): Update.
2049 * win32-low.cc (win32_target_ops): Update.
2050
2051 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2052
2053 Turn process_stratum_target's get_tib_address op into a method of
2054 process_target.
2055
2056 * target.h (struct process_stratum_target): Remove the target op.
2057 (class process_target): Add the target op. Also add
2058 'supports_get_tib_address'.
2059 * target.cc (process_target::get_tib_address): Define.
2060 (process_target::supports_get_tib_address): Define.
2061
2062 Update the derived classes and callers below.
2063
2064 * server.cc (handle_query): Update.
2065 * linux-low.cc (win32_target_ops): Update.
2066 * lynx-low.cc (lynx_target_ops): Update.
2067 * nto-low.cc (nto_target_ops): Update.
2068 * win32-low.cc (win32_target_ops): Update.
2069 (win32_process_target::supports_get_tib_address): Define.
2070 (win32_get_tib_address): Turn into ...
2071 (win32_process_target::get_tib_address): ... this.
2072 * win32-low.h (class win32_process_target): Update.
2073
2074 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2075
2076 Turn process_stratum_target's thread_stopped op into a method of
2077 process_target.
2078
2079 * target.h (struct process_stratum_target): Remove the target op.
2080 (class process_target): Add the target op. Also add
2081 'supports_thread_stopped'.
2082 (target_thread_stopped): Update the macro.
2083 * target.cc (process_target::thread_stopped): Define.
2084 (process_target::supports_thread_stopped): Define.
2085 (prepare_to_access_memory): Update.
2086
2087 Update the derived classes and callers below.
2088
2089 * server.cc (queue_stop_reply_callback): Update.
2090 * linux-low.cc (linux_target_ops): Update.
2091 (linux_process_target::supports_thread_stopped): Define.
2092 (linux_thread_stopped): Turn into ...
2093 (linux_process_target::thread_stopped): ... this.
2094 * linux-low.h (class linux_process_target): Update.
2095 * lynx-low.cc (lynx_target_ops): Update.
2096 * nto-low.cc (nto_target_ops): Update.
2097 * win32-low.cc (win32_target_ops): Update.
2098
2099 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2100
2101 Turn process_stratum_target's read_pc and write_pc ops into
2102 methods of process_target.
2103
2104 * target.h (struct process_stratum_target): Remove the target ops.
2105 (class process_target): Add the target ops.
2106 * target.cc (process_target::read_pc): Define.
2107 (process_target::write_pc): Define.
2108
2109 Update the derived classes and callers below.
2110
2111 * regcache.cc (regcache_read_pc): Update.
2112 (regcache_write_pc): Update.
2113 * linux-low.cc (linux_target_ops): Update.
2114 (linux_read_pc): Turn into ...
2115 (linux_process_target::read_pc): ... this.
2116 (linux_write_pc): Turn into ...
2117 (linux_process_target::write_pc): ... this.
2118 * linux-low.h (class linux_process_target): Update.
2119 * lynx-low.cc (lynx_target_ops): Update.
2120 * nto-low.cc (nto_target_ops): Update.
2121 * win32-low.cc (win32_target_ops): Update.
2122
2123 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2124
2125 Turn process_stratum_target's supports_tracepoints op into a
2126 method of process_target.
2127
2128 * target.h (struct process_stratum_target): Remove the target op.
2129 (class process_target): Add the target op.
2130 (target_supports_tracepoints): Update the macro.
2131 * target.cc (process_target::supports_tracepoints): Define.
2132
2133 Update the derived classes and callers below.
2134
2135 * linux-low.cc (linux_target_ops): Update.
2136 (linux_supports_tracepoints): Turn into ...
2137 (linux_process_target::supports_tracepoints): ... this.
2138 * linux-low.h (class linux_process_target): Update.
2139 * lynx-low.cc (lynx_target_ops): Update.
2140 * nto-low.cc (nto_target_ops): Update.
2141 * win32-low.cc (win32_target_ops): Update.
2142
2143 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2144
2145 Turn process_stratum_target's process_qsupported op into a method
2146 of process_target.
2147
2148 * target.h (struct process_stratum_target): Remove the target op.
2149 (class process_target): Add the target op.
2150 (target_process_qsupported): Update the macro.
2151 * target.cc (process_target::process_qsupported): Define.
2152
2153 Update the derived classes and callers below.
2154
2155 * linux-low.cc (linux_target_ops): Update.
2156 (linux_process_qsupported): Turn into ...
2157 (linux_process_target::process_qsupported): ... this.
2158 * linux-low.h (class linux_process_target): Update.
2159 * lynx-low.cc (lynx_target_ops): Update.
2160 * nto-low.cc (nto_target_ops): Update.
2161 * win32-low.cc (win32_target_ops): Update.
2162
2163 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2164
2165 Turn process_stratum_target's read_loadmap op into a method of
2166 process_target.
2167
2168 * target.h (struct process_stratum_target): Remove the target op.
2169 (class process_target): Add the target op. Also add
2170 'supports_read_loadmap'.
2171 * target.cc (process_target::read_loadmap): Define.
2172 (process_target::supports_read_loadmap): Define.
2173
2174 Update the derived classes and callers below.
2175
2176 * server.cc (handle_qxfer_fdpic): Update.
2177 (handle_query): Update.
2178 * linux-low.cc (linux_target_ops): Update.
2179 (linux_process_target::supports_read_loadmap): Define.
2180 (linux_read_loadmap): Turn into ...
2181 (linux_process_target::read_loadmap): ... this.
2182 * linux-low.h (class linux_process_target): Update.
2183 * lynx-low.cc (lynx_target_ops): Update.
2184 * nto-low.cc (nto_target_ops): Update.
2185 * win32-low.cc (win32_target_ops): Update.
2186
2187 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2188
2189 Turn process_stratum_target's core_of_thread op into a method of
2190 process_target.
2191
2192 * target.h (struct process_stratum_target): Remove the target op.
2193 (class process_target): Add the target op.
2194 (target_core_of_thread): Update the macro.
2195 * target.cc (process_target::core_of_thread): Define.
2196
2197 Update the derived classes and callers below.
2198
2199 * linux-low.cc (linux_target_ops): Update.
2200 (linux_process_target::core_of_thread): Define.
2201 * linux-low.h (class linux_process_target): Update.
2202 * lynx-low.cc (lynx_target_ops): Update.
2203 * nto-low.cc (nto_target_ops): Update.
2204 * win32-low.cc (win32_target_ops): Update.
2205
2206 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2207
2208 Turn process_stratum_target's handle_monitor_command op into a
2209 method of process_target.
2210
2211 * target.h (struct process_stratum_target): Remove the target op.
2212 (class process_target): Add the target op.
2213 (target_handle_monitor_command): Update the macro.
2214 * target.cc (process_target::handle_monitor_command): Define.
2215
2216 Update the derived classes and callers below.
2217
2218 * server.cc (handle_query): Update.
2219 * linux-low.cc (linux_target_ops): Update.
2220 (linux_process_target::handle_monitor_command): Define.
2221 * linux-low.h (class linux_process_target): Update.
2222 * lynx-low.cc (lynx_target_ops): Update.
2223 * nto-low.cc (nto_target_ops): Update.
2224 * win32-low.cc (win32_target_ops): Update.
2225
2226 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2227
2228 Turn process_stratum_target's handle_new_gdb_connection op into a
2229 method of process_target.
2230
2231 * target.h (struct process_stratum_target): Remove the target op.
2232 (class process_target): Add the target op.
2233 (target_handle_new_gdb_connection): Update the macro.
2234 * target.cc (process_target::handle_new_gdb_connection): Define.
2235
2236 Update the derived classes and callers below.
2237
2238 * linux-low.cc (linux_target_ops): Update.
2239 (linux_handle_new_gdb_connection): Turn into ...
2240 (linux_process_target::handle_new_gdb_connection): ... this.
2241 * linux-low.h (class linux_process_target): Update.
2242 * lynx-low.cc (lynx_target_ops): Update.
2243 * nto-low.cc (nto_target_ops): Update.
2244 * win32-low.cc (win32_target_ops): Update.
2245
2246 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2247
2248 Turn process_stratum_target's supports_fork_events,
2249 supports_vfork_events, and supports_exec_events ops into methods
2250 of process_target.
2251
2252 * target.h (struct process_stratum_target): Remove the target ops.
2253 (class process_target): Add the target ops.
2254 (target_supports_fork_events): Update the macro.
2255 (target_supports_vfork_events): Update the macro.
2256 (target_supports_exec_events): Update the macro.
2257 * target.cc (process_target::supports_fork_events): Define.
2258 (process_target::supports_vfork_events): Define.
2259 (process_target::supports_exec_events): Define.
2260
2261 Update the derived classes and callers below.
2262
2263 * linux-low.cc (linux_target_ops): Update.
2264 (linux_supports_fork_events): Turn into ...
2265 (linux_process_target::supports_fork_events): ... this.
2266 (linux_supports_vfork_events): Turn into ...
2267 (linux_process_target::supports_vfork_events): ... this.
2268 (linux_supports_exec_events): Turn into ...
2269 (linux_process_target::supports_exec_events): ... this.
2270 * linux-low.h (class linux_process_target): Update.
2271 * lynx-low.cc (lynx_target_ops): Update.
2272 * nto-low.cc (nto_target_ops): Update.
2273 * win32-low.cc (win32_target_ops): Update.
2274
2275 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2276
2277 Turn process_stratum_target's supports_multi_process op into a
2278 method of process_target.
2279
2280 * target.h (struct process_stratum_target): Remove the target op.
2281 (class process_target): Add the target op.
2282 * target.cc (process_target::supports_multi_process): Define.
2283 (target_supports_multi_process): Update.
2284
2285 Update the derived classes and callers below.
2286
2287 * linux-low.cc (linux_target_ops): Update.
2288 (linux_supports_multi_process): Turn into ...
2289 (linux_process_target::supports_multi_process): ... this.
2290 * linux-low.h (class linux_process_target): Update.
2291 * lynx-low.cc (lynx_target_ops): Update.
2292 * nto-low.cc (nto_target_ops): Update.
2293 * win32-low.cc (win32_target_ops): Update.
2294
2295 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2296
2297 Turn process_stratum_target's supports_non_stop, async, and
2298 start_non_stop ops into methods of process_target.
2299
2300 * target.h (struct process_stratum_target): Remove the target ops.
2301 (class process_target): Add the target ops.
2302 (target_supports_non_stop): Update the macro.
2303 (target_async): Update the macro.
2304 (start_non_stop): Remove declaration.
2305 * target.cc (process_target::supports_non_stop): Define.
2306 (process_target::async): Define.
2307 (process_target::start_non_stop): Define.
2308 (start_non_stop): Remove.
2309
2310 Update the derived classes and callers below.
2311
2312 * server.cc (handle_qxfer_siginfo): Update.
2313 (handle_query): Update.
2314 * linux-low.cc (linux_target_ops): Update.
2315 (linux_supports_non_stop): Turn into ...
2316 (linux_process_target::supports_non_stop): ... this.
2317 (linux_async): Turn into ...
2318 (linux_process_target::async): ... this.
2319 (linux_start_non_stop): Turn into ...
2320 (linux_process_target::start_non_stop): ... this.
2321 * linux-low.h (class linux_process_target): Update.
2322 * lynx-low.cc (lynx_target_ops): Update.
2323 * nto-low.cc (nto_target_ops): Update.
2324 (nto_supports_non_stop): Remove; rely on the default behavior
2325 instead.
2326 * win32-low.cc (win32_target_ops): Update.
2327
2328 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2329
2330 Turn process_stratum_target's qxfer_siginfo op into a method of
2331 process_target.
2332
2333 * target.h (struct process_stratum_target): Remove the target op.
2334 (class process_target): Add the target op. Also add
2335 'supports_qxfer_siginfo'.
2336 * target.cc (process_target::qxfer_siginfo): Define.
2337 (process_target::supports_qxfer_siginfo): Define.
2338
2339 Update the derived classes and callers below.
2340
2341 * server.cc (handle_qxfer_siginfo): Update.
2342 (handle_query): Update.
2343 * linux-low.cc (linux_target_ops): Update.
2344 (linux_process_target::supports_qxfer_siginfo): Define.
2345 (linux_xfer_siginfo): Turn into ...
2346 (linux_process_target::qxfer_siginfo): ... this.
2347 * linux-low.h (class linux_process_target): Update.
2348 * lynx-low.cc (lynx_target_ops): Update.
2349 * nto-low.cc (nto_target_ops): Update.
2350 * win32-low.cc (win32_target_ops): Update.
2351
2352 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2353
2354 Turn process_stratum_target's qxfer_osdata op into a method of
2355 process_target.
2356
2357 * target.h (struct process_stratum_target): Remove the target op.
2358 (class process_target): Add the target op. Also add
2359 'supports_qxfer_osdata'.
2360 * target.cc (process_target::qxfer_osdata): Define.
2361 (process_target::supports_qxfer_osdata): Define.
2362
2363 Update the derived classes and callers below.
2364
2365 * server.cc (handle_qxfer_osdata): Update.
2366 (handle_query): Update.
2367 * linux-low.cc (linux_target_ops): Update.
2368 (linux_process_target::supports_qxfer_osdata): Define.
2369 (linux_qxfer_osdata): Turn into ...
2370 (linux_process_target::qxfer_osdata): ... this.
2371 * linux-low.h (class linux_process_target): Update.
2372 * lynx-low.cc (lynx_target_ops): Update.
2373 * nto-low.cc (nto_target_ops): Update.
2374 * win32-low.cc (win32_target_ops): Update.
2375
2376 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2377
2378 Turn process_stratum_target's hostio_last_error op into a
2379 method of process_target.
2380
2381 * target.h (struct process_stratum_target): Remove the target op.
2382 (class process_target): Add the target op.
2383 * target.cc: Add "hostio.h" to includes.
2384 (process_target::hostio_last_error): Define.
2385
2386 Update the derived classes and callers below.
2387
2388 * hostio.cc (hostio_error): Update.
2389 * linux-low.cc: Remove "hostio.h" from includes.
2390 (linux_target_ops): Update.
2391 * lynx-low.cc (lynx_target_ops): Update.
2392 * nto-low.cc (nto_target_ops): Update.
2393 * win32-low.h (class win32_process_target): Update.
2394 * win32-low.cc (win32_target_ops): Update.
2395 (wince_hostio_last_error): Turn into ...
2396 (win32_process_target::hostio_last_error): ... this.
2397
2398 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2399
2400 Turn process_stratum_target's get_tls_address op into a method of
2401 process_target.
2402
2403 * target.h (struct process_stratum_target): Remove the target op.
2404 (class process_target): Add the target op. Also add
2405 'supports_get_tls_address'.
2406 * target.cc (process_target::get_tls_address): Define.
2407 (process_target::supports_get_tls_address): Define.
2408
2409 Update the derived classes and callers below.
2410
2411 * server.cc (handle_query): Update.
2412 * linux-low.cc (linux_target_ops): Update.
2413 (linux_process_target::supports_get_tls_address): Define.
2414 (linux_process_target::get_tls_address): Define.
2415 * linux-low.h (class linux_process_target): Update.
2416 * lynx-low.cc (lynx_target_ops): Update.
2417 * nto-low.cc (nto_target_ops): Update.
2418 * win32-low.cc (win32_target_ops): Update.
2419
2420 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2421
2422 Turn process_stratum_target's read_offsets op into a method of
2423 process_target.
2424
2425 * target.h (struct process_stratum_target): Remove the target op.
2426 (class process_target): Add the target op. Also add
2427 'supports_read_offsets'.
2428 * target.cc (process_target::read_offsets): Define.
2429 (process_target::supports_read_offsets): Define.
2430
2431 Update the derived classes and callers below.
2432
2433 * server.cc (handle_query): Update.
2434 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2435 (linux_target_ops): Update.
2436 (linux_process_target::supports_read_offsets): Define.
2437 (linux_read_offsets): Turn into ...
2438 (linux_process_target::read_offsets): ... 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 * win32-low.cc (win32_target_ops): Update.
2443
2444 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2445
2446 Turn process_stratum_target's stopped_by_watchpoint and
2447 stopped_data_address ops into methods of process_target.
2448
2449 * target.h (struct process_stratum_target): Remove the target ops.
2450 (class process_target): Add the target ops.
2451 * target.cc (process_target::stopped_by_watchpoint): Define.
2452 (process_target::stopped_data_address): Define.
2453
2454 Update the derived classes and callers below.
2455
2456 * remote-utils.cc (prepare_resume_reply): Update.
2457 * linux-low.cc (linux_target_ops): Update.
2458 (linux_stopped_by_watchpoint): Turn into ...
2459 (linux_process_target::stopped_by_watchpoint): ... this.
2460 (linux_stopped_data_address): Turn into ...
2461 (linux_process_target::stopped_data_address): ... this.
2462 * linux-low.h (class linux_process_target): Update.
2463 * lynx-low.cc (lynx_target_ops): Update.
2464 * nto-low.cc (nto_target_ops): Update.
2465 (nto_stopped_by_watchpoint): Turn into ...
2466 (nto_process_target::stopped_by_watchpoint): ... this.
2467 (nto_stopped_data_address): Turn into ...
2468 (nto_process_target::stopped_data_address): ... this.
2469 * nto-low.h (class nto_process_target): Update.
2470 * win32-low.cc (win32_target_ops): Update.
2471 (win32_stopped_by_watchpoint): Turn into ...
2472 (win32_process_target::stopped_by_watchpoint): ... this.
2473 (win32_stopped_data_address): Turn into ...
2474 (win32_process_target::stopped_data_address): ... this.
2475 * win32-low.h (class win32_process_target): Update.
2476
2477 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2478
2479 Turn process_stratum_target's supports_hardware_single_step op into
2480 a method of process_target.
2481
2482 * target.h (struct process_stratum_target): Remove the target op.
2483 (class process_target): Add the target op.
2484 (target_supports_hardware_single_step): Update the macro.
2485 (target_can_do_hardware_single_step): Remove declaration.
2486 * target.cc (process_target::supports_hardware_single_step): Define.
2487 (target_can_do_hardware_single_step): Remove.
2488
2489 Update the derived classes and callers below.
2490
2491 * linux-low.h (class linux_process_target): Update.
2492 * linux-low.cc (linux_target_ops): Update.
2493 (linux_supports_hardware_single_step): Turn into ...
2494 (linux_process_target::supports_hardware_single_step): ... this.
2495 * lynx-low.h (class lynx_process_target): Update.
2496 * lynx-low.cc (lynx_target_ops): Update.
2497 (lynx_process_target::supports_hardware_single_step): Define.
2498 * nto-low.h (class nto_process_target): Update.
2499 * nto-low.cc (nto_target_ops): Update.
2500 (nto_process_target::supports_hardware_single_step): Define.
2501 * win32-low.h (class win32_process_target): Update.
2502 * win32-low.cc (win32_target_ops): Update.
2503 (win32_process_target::supports_hardware_single_step): Define.
2504
2505 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2506
2507 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2508 ops into methods of process_target.
2509
2510 * target.h (struct process_stratum_target): Remove the target ops.
2511 (class process_target): Add the target ops.
2512 (target_stopped_by_hw_breakpoint): Update the macro.
2513 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2514 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2515 (process_target::supports_stopped_by_hw_breakpoint): Define.
2516
2517 Update the derived classes and callers below.
2518
2519 * linux-low.cc (linux_target_ops): Update.
2520 (linux_stopped_by_hw_breakpoint): Turn into ...
2521 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2522 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2523 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2524 * linux-low.h (class linux_process_target): Update.
2525 * lynx-low.cc (lynx_target_ops): Update.
2526 * nto-low.cc (nto_target_ops): Update.
2527 * win32-low.cc (win32_target_ops): Update.
2528
2529 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2530
2531 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2532 ops into methods of process_target.
2533
2534 * target.h (struct process_stratum_target): Remove the target ops.
2535 (class process_target): Add the target ops.
2536 (target_stopped_by_sw_breakpoint): Update the macro.
2537 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2538 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2539 (process_target::supports_stopped_by_sw_breakpoint): Define.
2540
2541 Update the derived classes and callers below.
2542
2543 * linux-low.cc (linux_target_ops): Update.
2544 (linux_stopped_by_sw_breakpoint): Turn into ...
2545 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2546 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2547 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2548 * linux-low.h (class linux_process_target): Update.
2549 * lynx-low.cc (lynx_target_ops): Update.
2550 * nto-low.cc (nto_target_ops): Update.
2551 * win32-low.cc (win32_target_ops): Update.
2552
2553 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2554
2555 Turn process_stratum_target's insert_point and remove_point ops
2556 into methods of process_target.
2557
2558 * target.h (struct process_stratum_target): Remove the target ops.
2559 (class process_target): Add the target ops.
2560 * target.cc (process_target::insert_point): Define.
2561 (process_target::remove_point): Define.
2562
2563 Update the derived classes and callers below.
2564
2565 * mem-break.cc (set_raw_breakpoint_at): Update.
2566 (delete_raw_breakpoint): Update.
2567 (uninsert_raw_breakpoint): Update.
2568 (reinsert_raw_breakpoint): Update.
2569 * linux-low.cc (linux_target_ops): Update.
2570 (linux_insert_point): Turn into ...
2571 (linux_process_target::insert_point): ... this.
2572 (linux_remove_point): Turn into ...
2573 (linux_process_target::remove_point): ... this.
2574 * linux-low.h (class linux_process_target): Update.
2575 * lynx-low.cc (lynx_target_ops): Update.
2576 * nto-low.cc (nto_target_ops): Update.
2577 (nto_insert_point): Turn into ...
2578 (nto_process_target::insert_point): ... this.
2579 (nto_remove_point): Turn into ...
2580 (nto_process_target::remove_point): ... this.
2581 * nto-low.h (class nto_process_target): Update.
2582 * win32-low.cc (win32_target_ops): Update.
2583 (win32_insert_point): Turn into ...
2584 (win32_process_target::insert_point): ... this.
2585 (win32_remove_point): Turn into ...
2586 (win32_process_target::remove_point): ... this.
2587 * win32-low.h (class win32_process_target): Update.
2588
2589 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2590
2591 Turn process_stratum_target's supports_z_point_type op into a
2592 method of process_target.
2593
2594 * target.h (struct process_stratum_target): Remove the target op.
2595 (class process_target): Add the target op.
2596 * target.cc (process_target::supports_z_point_type): Define.
2597
2598 Update the derived classes and callers below.
2599
2600 * mem-break.cc (z_type_supported): Update.
2601 * linux-low.cc (linux_target_ops): Update.
2602 (linux_supports_z_point_type): Turn into ...
2603 (linux_process_target::supports_z_point_type): ... this.
2604 * linux-low.h (class linux_process_target): Update.
2605 * lynx-low.cc (lynx_target_ops): Update.
2606 * nto-low.cc (nto_target_ops): Update.
2607 (nto_supports_z_point_type): Turn into ...
2608 (nto_process_target::supports_z_point_type): ... this.
2609 * nto-low.h (class nto_process_target): Update.
2610 * win32-low.cc (win32_target_ops): Update.
2611 (win32_supports_z_point_type): Turn into ...
2612 (win32_process_target::supports_z_point_type): ... this.
2613 * win32-low.h (class win32_process_target): Update.
2614
2615 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2616
2617 Turn process_stratum_target's read_auxv op into a method of
2618 process_target.
2619
2620 * target.h (class process_stratum_target): Remove the target op.
2621 (struct process_target): Add the target op. Also add
2622 'supports_read_auxv'.
2623 * target.cc (process_target::read_auxv): Define.
2624 (process_target::supports_read_auxv): Define.
2625
2626 Update the derived classes and callers below.
2627
2628 * server.cc (handle_qxfer_auxv): Update.
2629 (handle_query): Update.
2630 * linux-low.cc (linux_target_ops): Update.
2631 (linux_process_target::supports_read_auxv): Define.
2632 (linux_read_auxv): Turn into ...
2633 (linux_process_target::read_auxv): ... this.
2634 * linux-low.h (class linux_process_target): Update.
2635 * lynx-low.cc (lynx_target_ops): Update.
2636 * nto-low.cc (nto_target_ops): Update.
2637 (nto_process_target::supports_read_auxv): Define.
2638 (nto_read_auxv): Turn into ...
2639 (nto_process_target::read_auxv): ... this.
2640 * nto-low.h (class nto_process_target): Update.
2641 * win32-low.cc (win32_target_ops): Update.
2642
2643 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2644
2645 Turn process_stratum_target's request_interrupt op into a method of
2646 process_target.
2647
2648 * target.h (struct process_stratum_target): Remove the target op.
2649 (class process_target): Add the target op.
2650
2651 Update the derived classes and callers below.
2652
2653 * remote-utils.cc (putpkt_binary_1): Update.
2654 (input_interrupt): Update.
2655 (getpkt): Update.
2656 * server.cc (handle_v_requests): Update.
2657 * linux-low.cc (linux_target_ops): Update.
2658 (linux_request_interrupt): Turn into ...
2659 (linux_process_target::request_interrupt): ... this.
2660 * linux-low.h (class linux_process_target): Update.
2661 * lynx-low.cc (lynx_target_ops): Update.
2662 (lynx_request_interrupt): Turn into ...
2663 (lynx_process_target::request_interrupt): ... this.
2664 * lynx-low.h (class lynx_process_target): Update.
2665 * nto-low.cc (nto_target_ops): Update.
2666 (nto_request_interrupt): Turn into ...
2667 (nto_process_target::request_interrupt): ... this.
2668 * nto-low.h (class nto_process_target): Update.
2669 * win32-low.cc (win32_target_ops): Update.
2670 (win32_request_interrupt): Turn into ...
2671 (win32_process_target::request_interrupt): ... this.
2672 * win32-low.h (class win32_process_target): Update.
2673
2674 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2675
2676 Turn process_stratum_target's look_up_symbols op into a method of
2677 process_target.
2678
2679 * target.h (struct process_stratum_target): Remove the target op.
2680 (class process_target): Add the target op.
2681 * target.cc (process_target::look_up_symbols): Define.
2682
2683 Update the derived classes and callers below.
2684
2685 * server.cc (handle_query): Update.
2686 * linux-low.cc (linux_target_ops): Update.
2687 (linux_look_up_symbols): Turn into ...
2688 (linux_process_target::look_up_symbols): ... this.
2689 * linux-low.h (class linux_process_target): Update.
2690 * lynx-low.cc (lynx_target_ops): Update.
2691 * nto-low.cc (nto_target_ops): Update.
2692 * win32-low.cc (win32_target_ops): Update.
2693
2694 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2695
2696 Turn process_stratum_target's read_memory and write_memory
2697 ops into methods of process_target.
2698
2699 * target.h (struct process_stratum_target): Remove the target ops.
2700 (class process_target): Add the target ops.
2701
2702 Update the derived classes and callers below.
2703
2704 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2705 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2706 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2707 (arm_get_syscall_trapinfo): Update.
2708 * linux-cris-low.cc (cris_breakpoint_at): Update.
2709 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2710 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2711 * linux-mips-low.cc (mips_breakpoint_at): Update.
2712 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2713 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2714 * linux-sh-low.cc (sh_breakpoint_at): Update.
2715 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2716 (sparc_store_gregset_from_stack): Update.
2717 (sparc_breakpoint_at): Update.
2718 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2719 * linux-tile-low.cc (tile_breakpoint_at): Update.
2720 * linux-x86-low.cc (x86_breakpoint_at): Update.
2721 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2722 * mem-brea.cc (insert_memory_breakpoint): Update.
2723 (validate_inserted_breakpoint): Update.
2724 * target.cc (read_inferior_memory): Update.
2725 (target_write_memory): Update.
2726 * linux-low.cc (linux_target_ops): Update.
2727 (linux_read_memory): Make a wrapper around the read_memory target
2728 op call.
2729 (linux_process_target::read_memory): Rename from linux_read_memory.
2730 (linux_write_memory): Turn into ...
2731 (linux_process_target::write_memory): ... this.
2732 * linux-low.h (class linux_process_target): Update.
2733 * lynx-low.cc (lynx_target_ops): Update.
2734 (lynx_read_memory): Turn into ...
2735 (lynx_process_target::read_memory): ... this.
2736 (lynx_write_memory): Turn into ...
2737 (lynx_process_target::write_memory): ... this.
2738 * lynx-low.h (class lynx_process_target): Update.
2739 * nto-low.cc (nto_target_ops): Update.
2740 (nto_read_memory): Turn into ...
2741 (nto_process_target::read_memory): ... this.
2742 (nto_write_memory): Turn into ...
2743 (nto_process_target::write_memory): ... this.
2744 * nto-low.h (class nto_process_target): Update.
2745 * win32-low.cc (win32_target_ops): Update.
2746 (win32_read_inferior_memory): Turn into ...
2747 (win32_process_target::read_memory): ... this.
2748 (win32_write_inferior_memory): Turn into ...
2749 (win32_process_target::write_memory): ... this.
2750 * win32-low.h (class win32_process_target): Update.
2751
2752 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2753
2754 Turn process_stratum_target's prepare_to_access_memory and
2755 done_accessing_memory ops into methods of process_target.
2756
2757 * target.h (struct process_stratum_target): Remove the target ops.
2758 (class process_target): Add the target ops.
2759 * target.cc (process_target::prepare_to_access_memory): Define.
2760 (process_target::done_accessing_memory): Define.
2761 (prepare_to_access_memory): Update.
2762 (done_accessing_memory): Update.
2763
2764 Update the derived classes and callers below.
2765
2766 * linux-low.cc (linux_target_ops): Update.
2767 (linux_prepare_to_access_memory): Turn into ...
2768 (linux_process_target::prepare_to_access_memory): ... this.
2769 (linux_done_accessing_memory): Turn into ...
2770 (linux_process_target::done_accessing_memory): ... this.
2771 * linux-low.h (class linux_process_target): Update.
2772 * lynx-low.cc (lynx_target_ops): Update.
2773 * nto-low.cc (nto_target_ops): Update.
2774 * win32-low.cc (win32_target_ops): Update.
2775
2776 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2777
2778 Turn process_stratum_target's fetch_registers and store_registers
2779 ops into methods of process_target.
2780
2781 * target.h (struct process_stratum_target): Remove the target ops.
2782 (class process_target): Add the target ops.
2783 (fetch_inferior_registers): Update the macro.
2784 (store_inferior_registers): Update the macro.
2785
2786 Update the derived classes and callers below.
2787
2788 * linux-low.cc (linux_target_ops): Update.
2789 (linux_fetch_registers): Turn into ...
2790 (linux_process_target::fetch_registers): ... this.
2791 (linux_store_registers): Turn into ...
2792 (linux_process_target::store_registers): ... this.
2793 * linux-low.h (class linux_process_target): Update.
2794 * lynx-low.cc (lynx_target_ops): Update.
2795 (lynx_fetch_registers): Turn into ...
2796 (lynx_process_target::fetch_registers): ... this.
2797 (lynx_store_registers): Turn into ...
2798 (lynx_process_target::store_registers): ... this.
2799 * lynx-low.h (class lynx_process_target): Update.
2800 * nto-low.cc (nto_target_ops): Update.
2801 (nto_fetch_registers): Turn into ...
2802 (nto_process_target::fetch_registers): ... this.
2803 (nto_store_registers): Turn into ...
2804 (nto_process_target::store_registers): ... this.
2805 * nto-low.h (class nto_process_target): Update.
2806 * win32-low.cc (win32_target_ops): Update.
2807 (win32_fetch_inferior_registers): Turn into ...
2808 (win32_process_target::fetch_registers): ... this.
2809 (win32_store_inferior_registers): Turn into ...
2810 (win32_process_target::store_registers): ... this.
2811 * win32-low.h (class win32_process_target): Update.
2812
2813 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2814
2815 Turn process_stratum_target's wait op into a method of
2816 process_target.
2817
2818 * target.h (struct process_stratum_target): Remove the target op.
2819 (class process_target): Add the target op.
2820
2821 Update the derived classes and callers below.
2822
2823 * target.cc (target_wait): Update.
2824 * linux-low.cc (linux_target_ops): Update.
2825 (linux_wait): Turn into ...
2826 (linux_process_target::wait): ... this.
2827 * linux-low.h (class linux_process_target): Update.
2828 * lynx-low.cc (lynx_target_ops): Update.
2829 (lynx_wait): Turn into ...
2830 (lynx_process_target::wait): ... this.
2831 * lynx-low.h (class lynx_process_target): Update.
2832 * nto-low.cc (nto_target_ops): Update.
2833 (nto_wait): Turn into ...
2834 (nto_process_target::wait): ... this.
2835 * nto-low.h (class nto_process_target): Update.
2836 * win32-low.cc (win32_target_ops): Update.
2837 (win32_wait): Turn into ...
2838 (win32_process_target::wait): ... this.
2839 (do_initial_child_stuff): Update.
2840 * win32-low.h (class win32_process_target): Update.
2841
2842 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2843
2844 Turn process_stratum_target's resume op into a method of
2845 process_target.
2846
2847 * target.h (struct process_stratum_target): Remove the target op.
2848 (class process_target): Add the target op.
2849
2850 Update the derived classes and callers below.
2851
2852 * server.cc (resume): Update.
2853 * target.cc (target_stop_and_wait): Update.
2854 (target_continue_no_signal): Update.
2855 (target_continue): Update.
2856 * linux-low.cc (linux_target_ops): Update.
2857 (linux_resume): Turn into ...
2858 (linux_process_target::resume): ... this.
2859 * linux-low.h (class linux_process_target): Update.
2860 * lynx-low.cc (lynx_target_ops): Update.
2861 (lynx_resume): Turn into ...
2862 (lynx_process_target::resume): ... this.
2863 * lynx-low.h (class lynx_process_target): Update.
2864 * nto-low.cc (nto_target_ops): Update.
2865 (nto_resume): Turn into ...
2866 (nto_process_target::resume): ... this.
2867 * nto-low.h (class nto_process_target): Update.
2868 * win32-low.cc (win32_target_ops): Update.
2869 (win32_resume): Turn into ...
2870 (win32_process_target::resume): ... this.
2871 (win32_process_target::detach): Update.
2872 (do_initial_child_stuff): Update.
2873 * win32-low.h (class win32_process_target): Update.
2874
2875 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2876
2877 Turn process_stratum_target's thread_alive op into a method of
2878 process_target.
2879
2880 * target.h (struct process_stratum_target): Remove the target op.
2881 (class process_target): Add the target op.
2882 (mythread_alive): Update the macro.
2883
2884 Update the derived classes and callers below.
2885
2886 * linux-low.cc (linux_target_ops): Update.
2887 (linux_thread_alive): Turn into ...
2888 (linux_process_target::thread_alive): ... this.
2889 (wait_for_sigstop): Update.
2890 * linux-low.h (class linux_process_target): Update.
2891 * lynx-low.cc (lynx_target_ops): Update.
2892 (lynx_thread_alive): Turn into ...
2893 (lynx_process_target::thread_alive): ... this.
2894 * lynx-low.h (class lynx_process_target): Update.
2895 * nto-low.cc (nto_target_ops): Update.
2896 (nto_thread_alive): Turn into ...
2897 (nto_process_target::thread_alive): ... this.
2898 * nto-low.h (class nto_process_target): Update.
2899 * win32-low.cc (win32_target_ops): Update.
2900 (win32_thread_alive): Turn into ...
2901 (win32_process_target::thread_alive): ... this.
2902 * win32-low.h (class win32_process_target): Update.
2903
2904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2905
2906 Turn process_stratum_target's join op into a method of
2907 process_target.
2908
2909 * target.h (struct process_stratum_target): Remove the target op.
2910 (class process_target): Add the target op.
2911 (join_inferior): Update the macro.
2912
2913 Update the derived classes and callers below.
2914
2915 * linux-low.cc (linux_target_ops): Update.
2916 (linux_join): Turn into ...
2917 (linux_process_target::join): ... this.
2918 * linux-low.h (class linux_process_target): Update.
2919 * lynx-low.cc (lynx_target_ops): Update.
2920 (lynx_join): Turn into ...
2921 (lynx_process_target::join): ... this.
2922 * lynx-low.h (class lynx_process_target): Update.
2923 * nto-low.cc (nto_target_ops): Update.
2924 (nto_process_target::join): Define.
2925 * nto-low.h (class nto_process_target): Update.
2926 * win32-low.cc (win32_target_ops): Update.
2927 (win32_join): Turn into ...
2928 (win32_process_target::join): ... 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 mourn 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_mourn_inferior): Update.
2942 * linux-low.cc (linux_target_ops): Update.
2943 (linux_mourn): Turn into ...
2944 (linux_process_target::mourn): ... this.
2945 (handle_extended_wait): Update.
2946 (linux_process_target::kill): Update.
2947 (linux_process_target::detach): Update.
2948 * linux-low.h (class linux_process_target): Update.
2949 * lynx-low.cc (lynx_target_ops): Update.
2950 (lynx_mourn): Turn into ...
2951 (lynx_process_target::mourn): ... this.
2952 * lynx-low.h (class lynx_process_target): Update.
2953 * nto-low.cc (nto_target_ops): Update.
2954 (nto_mourn): Turn into ...
2955 (nto_process_target::mourn): ... this.
2956 * nto-low.h (class nto_process_target): Update.
2957 * win32-low.cc (win32_target_ops): Update.
2958 (win32_mourn): Turn into ...
2959 (win32_process_target::mourn): ... this.
2960 * win32-low.h (class win32_process_target): Update.
2961
2962 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2963
2964 Turn process_stratum_target's detach op into a method of
2965 process_target.
2966
2967 * target.h (struct process_stratum_target): Remove the target op.
2968 (class process_target): Add the target op.
2969 (detach_inferior): Update the macro.
2970
2971 Update the derived classes and callers below.
2972
2973 * linux-low.cc (linux_target_ops): Update.
2974 (linux_detach): Turn into ...
2975 (linux_process_target::detach): ... this.
2976 * linux-low.h (class linux_process_target): Update.
2977 * lynx-low.cc (lynx_target_ops): Update.
2978 (lynx_detach): Turn into ...
2979 (lynx_process_target::detach): ... this.
2980 * lynx-low.h (class lynx_process_target): Update.
2981 * nto-low.cc (nto_target_ops): Update.
2982 (nto_detach): Turn into ...
2983 (nto_process_target::detach): ... this.
2984 * nto-low.h (class nto_process_target): Update.
2985 * win32-low.cc (win32_target_ops): Update.
2986 (win32_detach): Turn into ...
2987 (win32_process_target::detach): ... this.
2988 * win32-low.h (class win32_process_target): Update.
2989
2990 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2991
2992 Turn process_stratum_target's kill op into a method of
2993 process_target.
2994
2995 * target.h (struct process_stratum_target): Remove the target op.
2996 (class process_target): Add the target op.
2997
2998 Update the derived classes and callers below.
2999
3000 * target.cc (kill_inferior): Update.
3001 * linux-low.cc (linux_target_ops): Update.
3002 (linux_kill): Turn into ...
3003 (linux_process_target::kill): ... this.
3004 * linux-low.h (class linux_process_target): Update.
3005 * lynx-low.cc (lynx_target_ops): Update.
3006 (lynx_kill): Turn into ...
3007 (lynx_process_target::kill): ... this.
3008 * lynx-low.h (class lynx_process_target): Update.
3009 * nto-low.cc (nto_target_ops): Update.
3010 (nto_kill): Turn into ...
3011 (nto_process_target::kill): ... this.
3012 * nto-low.h (class nto_process_target): Update.
3013 * win32-low.cc (win32_target_ops): Update.
3014 (win32_kill): Turn into ...
3015 (win32_process_target::kill): ... this.
3016 * win32-low.h (class win32_process_target): Update.
3017
3018 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3019
3020 Turn process_stratum_target's attach op into a method of
3021 process_target.
3022
3023 * target.h (struct process_stratum_target): Remove the target op.
3024 (class process_target): Add the target op.
3025 (myattach): Update the macro.
3026
3027 Update the derived classes and callers below.
3028
3029 * linux-low.cc (linux_target_ops): Update.
3030 (linux_attach): Turn into ...
3031 (linux_process_target::attach): ... this.
3032 * linux-low.h (class linux_process_target): Update.
3033 * lynx-low.cc (lynx_target_ops): Update.
3034 (lynx_attach): Turn into ...
3035 (lynx_process_target::attach): ... this.
3036 * lynx-low.h (class lynx_process_target): Update.
3037 * nto-low.cc (nto_target_ops): Update.
3038 (nto_attach): Turn into ...
3039 (nto_process_target::attach): ... this.
3040 * nto-low.h (class nto_process_target): Update.
3041 * win32-low.cc (win32_target_ops): Update.
3042 (win32_attach): Turn into ...
3043 (win32_process_target::attach): ... this.
3044 * win32-low.h (class win32_process_target): Update.
3045
3046 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3047
3048 Turn process_stratum_target's post_create_inferior op into a method
3049 of process_target.
3050
3051 * target.h (struct process_stratum_target): Remove the target op.
3052 (class process_target): Add the target op.
3053 (target_post_create_inferior): Update the macro.
3054 * target.cc (process_target::post_create_inferior): Define.
3055
3056 Update the derived classes and callers below.
3057
3058 * linux-low.cc (linux_target_ops): Update.
3059 (linux_post_create_inferior): Turn into ...
3060 (linux_process_target::post_create_inferior): ... this.
3061 * linux-low.h (class linux_process_target): Update.
3062 * lynx-low.cc (lynx_target_ops): Update.
3063 * nto-low.cc (nto_target_ops): Update.
3064 * win32-low.cc (win32_target_ops): Update.
3065
3066 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3067
3068 Turn process_stratum_target's create_inferior op into a method of
3069 process_target.
3070
3071 * target.h (struct process_stratum_target): Remove the target op.
3072 (class process_target): Add the target op.
3073 (create_inferior): Rename the macro to ...
3074 (target_create_inferior): ... this.
3075
3076 Update the derived classes and callers below.
3077
3078 * server.cc (handle_v_run): Update.
3079 (captured_main): Update.
3080 (process_serial_event): Update.
3081 * linux-low.cc (linux_target_ops): Update.
3082 (linux_create_inferior): Turn into ...
3083 (linux_process_target::create_inferior): ... this.
3084 * linux-low.h (class linux_process_target): Update.
3085 * lynx-low.cc (lynx_target_ops): Update.
3086 (lynx_create_inferior): Turn into ...
3087 (lynx_process_target::create_inferior): ... this.
3088 * lynx-low.h (class lynx_process_target): Update.
3089 * nto-low.cc (nto_target_ops): Update.
3090 (nto_create_inferior): Turn into ...
3091 (nto_process_target::create_inferior): ... this.
3092 * nto-low.h (class nto_process_target): Update.
3093 * win32-low.cc (win32_target_ops): Update.
3094 (win32_create_inferior): Turn into ...
3095 (win32_process_target::create_inferior): ... this.
3096 * win32-low.h (class win32_process_target): Update.
3097
3098 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3099
3100 * target.h (class process_target): New class definition.
3101 (struct process_stratum_target) <pt>: New field with type
3102 'process_target*'.
3103 * linux-low.h (class linux_process_target): Define as a derived
3104 class of 'process_target'.
3105 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3106 as the 'pt' field.
3107 * lynx-low.h (class lynx_process_target): Define as a derived
3108 class of 'process_target'.
3109 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3110 as the 'pt' field.
3111 * nto-low.h (class nto_process_target): Define as a derived
3112 class of 'process_target'.
3113 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3114 as the 'pt' field.
3115 * win32-low.h (class win32_process_target): Define as a derived
3116 class of 'process_target'.
3117 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3118 as the 'pt' field.
3119
3120 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3121
3122 * configure: Regenerate.
3123
3124 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
3125 Andrew Burgess <andrew.burgess@embecosm.com>
3126
3127 * linux-riscv-low.cc: New file.
3128 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
3129 and nat/riscv-linux-tdesc.c.
3130 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
3131 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
3132 Define.
3133
3134 2020-02-14 Tom Tromey <tom@tromey.com>
3135
3136 * acinclude.m4: Don't include acx_configure_dir.m4.
3137 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
3138 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
3139 (all, install-only, uninstall, clean-info, clean)
3140 (maintainer-clean): Don't recurse.
3141 (subdir_do, all-lib): Remove.
3142 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
3143 (GNULIB_H): Remove.
3144 (generated_files): Update.
3145 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
3146 * configure: Rebuild.
3147 * configure.ac: Don't configure gnulib or libiberty.
3148 (GNULIB): Update.
3149
3150 2020-02-14 Eli Zaretskii <eliz@gnu.org>
3151
3152 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
3153 preparing the command line for CreateProcess.
3154 (win32_create_inferior): Reflect the program name in debugging
3155 output that shows the process and its command line.
3156
3157 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3158
3159 * Makefile.in: Rename source files from .c to .cc.
3160 * %.c: Rename to %.cc.
3161 * configure.ac: Rename server.c to server.cc.
3162 * configure: Re-generate.
3163
3164 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
3165
3166 * Makefile.in: Rename gdbsupport source files from .c to .cc.
3167
3168 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3169
3170 * win32-low.c (win32_create_inferior): Set signal_pid.
3171
3172 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
3173 Pedro Alves <palves@redhat.com>
3174
3175 Skip building gdbserver in a cross-configuration.
3176 * configure.srv: Set $gdbserver_host depending on whether $target
3177 is $host. Use $gdbserver_host instead of $host.
3178
3179 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3180
3181 * configure: Re-generate.
3182
3183 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3184
3185 * configure: Re-generate.
3186
3187 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3188
3189 * acinclude.m4: Update warning.m4 path.
3190
3191 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3192
3193 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
3194 (handle_exception): Set siginfo_er.
3195 (win32_xfer_siginfo): New function.
3196
3197 2020-02-07 Tom Tromey <tom@tromey.com>
3198 Pedro Alves <palves@redhat.com>
3199
3200 * README: Update build documentation.
3201 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
3202 host, not target.
3203 * configure.ac: Update paths.
3204 * configure: Rebuild.
3205 * acinclude.m4: Update paths.
3206 * Makefile.in: Update include paths.
3207 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
3208 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
3209 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
3210 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
3211 (%-generated.c): Update paths.
3212 * Move entire directory from ../gdb/gdbserver.
3213
3214 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
3215
3216 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
3217
3218 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3219
3220 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
3221 assignment instead of srv_linux_obj.
3222
3223 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
3224
3225 * server.c (handle_qxfer_libraries): Write segment-address with
3226 paddress.
3227
3228 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
3229
3230 * Makefile.in (install-strip): New target.
3231 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
3232 * aclocal.m4: Regenerate.
3233 * configure: Regenerate.
3234 * configure.ac: Add AM_PROG_INSTALL_STRIP.
3235
3236 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3237
3238 * Makefile.in (SFILES): Adjust paths to point to real files.
3239 (OBS): Move waitstatus.o to target/waitstatus.o.
3240 (TAGS): Transform paths appropriately.
3241 (%.o): Rename to...
3242 (nat/%.o): ... this pattern rule.
3243 (%.o): Rename to...
3244 (target/%.o): ... this pattern rule.
3245 * configure.srv: Adjust paths throughout to include nat/ prefix
3246 with the revant files.
3247 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
3248 * configure: Regenerate.
3249
3250 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
3251
3252 * Makefile.in (TAGS): Remove config files from the recipe.
3253
3254 2020-01-14 Tom Tromey <tom@tromey.com>
3255
3256 * configure: Rebuild.
3257 * configure.ac: Remove any checks that were added to common.m4.
3258 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
3259 lib-link.m4.
3260
3261 2020-01-14 Tom Tromey <tom@tromey.com>
3262
3263 * server.h: Include config.h.
3264 * gdbreplay.c: Include config.h.
3265 * configure: Rebuild.
3266 * configure.ac: Don't source common.host.
3267 * acinclude.m4: Update path.
3268 * Makefile.in (INCSUPPORT): New variable.
3269 (INCLUDE_CFLAGS): Add INCSUPPORT.
3270 (SFILES): Update paths.
3271 (version-generated.c): Update path to create-version.sh.
3272 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
3273
3274 2020-01-14 Tom Tromey <tom@tromey.com>
3275
3276 * configure.ac (LIBS): Use WIN32APILIBS.
3277 (USE_WIN32API): Don't define.
3278 * configure: Rebuild.
3279
3280 2020-01-14 Tom Tromey <tom@tromey.com>
3281
3282 * configure: Rebuild.
3283
3284 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3285
3286 * Makefile.in (%-generated.c): Remove rule for files from
3287 regformats/i386.
3288
3289 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3290
3291 * configure: Re-generate.
3292
3293 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3294
3295 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
3296 Define to static.
3297 * tracepoint.c (stop_tracing, flush_trace_buffer,
3298 about_to_request_buffer_space, get_trace_state_variable_value,
3299 set_trace_state_variable_value, gdb_collect): Add declaration.
3300
3301 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3302
3303 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
3304 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
3305 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
3306 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
3307 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
3308 static.
3309
3310 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3311
3312 * inferiors.c: Include gdbsupport/common-inferior.h.
3313
3314 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3315
3316 * hostio-errno.c: Include hostio.h.
3317
3318 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3319
3320 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
3321 prerequisite.
3322
3323 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3324
3325 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3326 * linux-arm-tdesc.h: Include arch/arm.h.
3327
3328 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3329
3330 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3331
3332 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3333
3334 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3335 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3336
3337 2020-01-10 Pedro Alves <palves@redhat.com>
3338
3339 * fork-child.c (post_fork_inferior): Pass target down to
3340 startup_inferior.
3341 * inferiors.c (switch_to_thread): Add process_stratum_target
3342 parameter.
3343 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3344 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3345 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3346 * remote-utils.c (prepare_resume_reply): Pass the target to
3347 switch_to_thread.
3348 * target.c (the_target): Now a process_stratum_target.
3349 (done_accessing_memory): Pass the target to switch_to_thread.
3350 (set_target_ops): Ajust to use process_stratum_target.
3351 * target.h (struct target_ops): Rename to ...
3352 (struct process_stratum_target): ... this.
3353 (the_target, set_target_ops): Adjust.
3354 (prepare_to_access_memory): Adjust comment.
3355 * win32-low.c (child_xfer_memory): Adjust to use
3356 process_stratum_target.
3357 (win32_target_ops): Now a process_stratum_target.
3358
3359 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3360 Pedro Alves <palves@redhat.com>
3361
3362 * win32-low.c (get_child_debug_event): Extract the fatal exception
3363 from the exit status and convert to the equivalent Posix signal
3364 number.
3365 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3366 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3367
3368 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3369
3370 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3371
3372 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3373
3374 * server.c (gdbserver_version): Change copyright year to 2020.
3375 * gdbreplay.c (gdbreplay_version): Likewise.
3376
3377 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3378
3379 * configure: Regenerate.
3380 * configure.ac: Quote variable arguments of test.
3381
3382 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3383
3384 * Makefile.in: Fix build with GNU Make 3.81
3385
3386 2019-12-16 Tom Tromey <tromey@adacore.com>
3387
3388 * server.c (get_exec_file): Constify result.
3389
3390 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3391
3392 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3393 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3394 * config.in: Regenerate.
3395 * configure: Regenerate.
3396 * configure.ac: Don't check for strerror.
3397 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3398 Call safe_strerror instead of strerror.
3399 * server.h (strerror): Remove this now-unnecessary declaration.
3400 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3401 strerror.
3402 (gdb_agent_helper_thread): Likewise.
3403 * utils.c (perror_with_name): Likewise.
3404
3405 2019-11-26 Tom Tromey <tom@tromey.com>
3406
3407 * configure, config.in: Rebuild.
3408
3409 2019-11-26 Tom Tromey <tom@tromey.com>
3410
3411 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3412 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3413 gdb_sigmask.
3414 * configure, config.in: Rebuild.
3415
3416 2019-11-26 Tom Tromey <tom@tromey.com>
3417
3418 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3419 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3420 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3421 * acinclude.m4: Include ax_pthread.m4.
3422 * config.in, configure: Rebuild.
3423
3424 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3425
3426 * debug.c (debug_set_output): Call safe_strerror instead of
3427 strerror.
3428 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3429 (linux_kill_one_lwp): Likewise.
3430 (linux_detach_one_lwp): Likewise.
3431 (linux_wait_for_event_filtered): Likewise.
3432 (store_register): Likewise.
3433 * lynx-low.c (lynx_attach): Likewise.
3434 * mem-break.c (insert_memory_breakpoint): Likewise.
3435 (remove_memory_breakpoint): Likewise.
3436 (delete_fast_tracepoint_jump): Likewise.
3437 (set_fast_tracepoint_jump): Likewise.
3438 (uninsert_fast_tracepoint_jumps_at): Likewise.
3439 (reinsert_fast_tracepoint_jumps_at): Likewise.
3440 * nto-low.c (nto_xfer_memory): Likewise.
3441 (nto_resume): Likewise.
3442
3443 2019-11-20 Luis Machado <luis.machado@linaro.org>
3444
3445 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3446 instead of register count.
3447 * tdesc.c (tdesc_contains_feature): New function.
3448 * tdesc.h (tdesc_contains_feature): New prototype.
3449
3450 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3451
3452 * Makefile.in: Add safe-strerror.c.
3453 * configure: Regenerate.
3454 * configure.ac: Don't source common.host.
3455
3456 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3457
3458 * config.in: Regenerate.
3459 * configure: Regenerate.
3460
3461 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3462
3463 * ax.c (ax_printf): Handle size_t_arg.
3464
3465 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3466
3467 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3468 * mi/mi-main.c (output_cores): Likewise.
3469 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3470 (linux_xfer_osdata_modules): Likewise.
3471 * remote.c (register_remote_support_xml): Likewise.
3472 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3473 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3474
3475 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3476
3477 * configure: Regenerate.
3478 * configure.ac: Remove check for strerror_r.
3479
3480 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3481
3482 * config.in: Regenerate.
3483 * configure: Regenerate.
3484 * configure.ac: Also check for strerror_r.
3485
3486 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3487
3488 * ax.h (debug_agent): Remove duplicate declaration.
3489
3490 2019-10-26 Tom de Vries <tdevries@suse.de>
3491
3492 * linux-aarch64-low.c: Fix typos in comments.
3493 * linux-arm-low.c: Same.
3494 * linux-low.c: Same.
3495 * linux-ppc-low.c: Same.
3496 * proc-service.c: Same.
3497 * regcache.h: Same.
3498 * server.c: Same.
3499 * tracepoint.c: Same.
3500 * win32-low.c: Same.
3501
3502 2019-10-25 Tom Tromey <tromey@adacore.com>
3503
3504 * utils.c (xstrdup): Remove.
3505
3506 2019-10-23 Tom Tromey <tom@tromey.com>
3507
3508 * configure, config.in: Rebuild.
3509
3510 2019-10-23 Tom Tromey <tom@tromey.com>
3511
3512 * configure: Rebuild.
3513 * acinclude.m4: Use m4_include, not sinclude.
3514
3515 2019-10-17 Tom Tromey <tromey@adacore.com>
3516
3517 * configure: Rebuild.
3518 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3519 in AC_CONFIG_FILES invocation.
3520 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3521 invocation.
3522
3523 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3524
3525 * server.c: Include xml-builtin.h.
3526 (get_xml_features): Don't declare xml_builtins here.
3527
3528 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3529
3530 * Makefile.in: Remove references to vec-ipa.o.
3531
3532 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3533
3534 * Makefile.in: Remove references to vec.c.
3535
3536 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3537
3538 * server.c (server_waiting): Change to bool.
3539 (extended_protocol): Likewise.
3540 (response_needed): Likewise.
3541 (exit_requested): Likewise.
3542 (run_once): Likewise.
3543 (report_no_resumed): Likewise.
3544 (non_stop): Likewise.
3545 (disable_packet_vCont): Likewise.
3546 (disable_packet_Tthread): Likewise.
3547 (disable_packet_qC): Likewise.
3548 (disable_packet_qfThreadInfo): Likewise.
3549 (handle_general_set): Update.
3550 (handle_detach): Update.
3551 (handle_monitor_command): Update.
3552 (handle_query): Update.
3553 (captured_main): Update.
3554 (process_serial_event): Update.
3555 * server.h (server_waiting): Change to bool.
3556 (disable_packet_vCont): Likewise.
3557 (disable_packet_Tthread): Likewise.
3558 (disable_packet_qC): Likewise.
3559 (disable_packet_qfThreadInfo): Likewise.
3560 (run_once): Likewise.
3561 (non_stop): Likewise.
3562 * target.c (target_stop_and_wait): Update.
3563
3564 2019-10-02 Tom Tromey <tromey@adacore.com>
3565
3566 * Makefile.in (SFILES): Add common-inferior.c.
3567 (OBS): Add common-inferior.o.
3568 * server.c (startup_with_shell): Don't define.
3569
3570 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3571
3572 * linux-low.c (linux_low_read_btrace): Update for change to
3573 std::vector.
3574
3575 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3576
3577 * debug.c (debug_threads): Remove comment in favor of the header.
3578 * debug.h (using_threads): Add declaration.
3579 (debug_threads): Add comment.
3580 * linux-aarch64-low.c: Include debug.h and remove declaration of
3581 debug_threads.
3582 * nto-low.c: Likewise.
3583 * remote-utils.c: Likewise.
3584 * thread-db.c: Likewise.
3585
3586 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3587
3588 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3589 and powerpc-cell64l-ipa.o.
3590 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3591 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3592 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3593 (spu*-*-*): Remove.
3594
3595 * spu-low.c: Remove file.
3596
3597 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3598 (parse_spufs_run): Remove.
3599 (ppc_get_pc): Remove Cell/B.E. support.
3600 (ppc_set_pc): Likewise.
3601 (ppc_breakpoint_at): Likewise.
3602 (ppc_arch_setup): Likewise.
3603 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3604 tdesc_powerpc_cell32l.
3605 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3606 or init_registers_powerpc_cell32l.
3607 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3608 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3609 or init_registers_powerpc_cell32l.
3610 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3611 (init_registers_powerpc_cell32l): Remove prototype.
3612 (init_registers_powerpc_cell64l): Likewise.
3613
3614 * target.h (struct target_ops): Remove qxfer_spu member.
3615 * server.c (handle_qxfer_spu): Remove.
3616 (qxfer_packets): Remove entry for "spu".
3617 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3618 * linux-low.c (SPUFS_MAGIC): Remove.
3619 (spu_enumerate_spu_ids): Remove.
3620 (linux_qxfer_spu): Remove.
3621 (linux_target_ops): Remove qxfer_spu member.
3622 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3623 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3624 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3625
3626 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3627
3628 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3629 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3630 * config.in: Regenerate.
3631 * configure: Regenerate.
3632
3633 2019-08-15 Tom Tromey <tromey@adacore.com>
3634
3635 * target.c (target_write_memory): Use gdb::byte_vector.
3636
3637 2019-08-15 Tom Tromey <tromey@adacore.com>
3638
3639 * tracepoint.c (write_inferior_data_pointer)
3640 (write_inferior_integer, write_inferior_int8)
3641 (write_inferior_uinteger, m_tracepoint_action_download)
3642 (r_tracepoint_action_download, x_tracepoint_action_download)
3643 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3644 (download_agent_expr, download_tracepoint_1)
3645 (download_trace_state_variables, upload_fast_traceframes): Update.
3646 * server.c (gdb_write_memory): Update.
3647 * remote-utils.c (relocate_instruction): Update.
3648 * proc-service.c (ps_pdwrite): Update.
3649 * mem-break.c (remove_memory_breakpoint)
3650 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3651 (uninsert_fast_tracepoint_jumps_at)
3652 (reinsert_fast_tracepoint_jumps_at): Update.
3653 * linux-x86-low.c (append_insns)
3654 (i386_install_fast_tracepoint_jump_pad)
3655 (amd64_write_goto_address, i386_write_goto_address): Update.
3656 * linux-s390-low.c (append_insns, s390_write_goto_address):
3657 Update.
3658 * linux-ppc-low.c (ppc_relocate_instruction)
3659 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3660 (ppc_write_goto_address): Update.
3661 * linux-aarch64-low.c (append_insns): Update.
3662 * target.h (struct target_ops): Update.
3663 (write_inferior_memory): Don't declare.
3664 * target.c (target_write_memory): Rename from
3665 write_inferior_memory. Remove old target_write_memory.
3666
3667 2019-08-15 Tom Tromey <tromey@adacore.com>
3668
3669 * target.c (write_inferior_memory): Use std::vector.
3670
3671 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3672
3673 PR build/24886
3674 * configure.ac: Drop enable-libmcheck support.
3675 * configure, config.in: Rebuild.
3676 * acinclude.m4: Don't include it.
3677
3678 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3679
3680 * configure.srv: Remove Arm xml files.
3681
3682 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3683
3684 * configure.srv: Add new files. Remove xml generated files.
3685 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3686 registers.
3687 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3688 * linux-aarch32-tdesc.c: New file.
3689 * linux-aarch32-tdesc.h: New file.
3690 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3691 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3692 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3693 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3694 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3695 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3696 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3697 (arm_read_description): Call arm_linux_read_description.
3698 (initialize_low_arch): Don't init registers.
3699 * linux-arm-tdesc.c: New file.
3700 * linux-arm-tdesc.h: New file.
3701
3702 2019-07-10 Alan Hayward <alan.hayward@arm.com>
3703
3704 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3705 Move counter inside for.
3706 (arm_read_description): Check ptrace earlier.
3707 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3708
3709 2019-07-09 Tom Tromey <tom@tromey.com>
3710
3711 * configure: Rebuild.
3712 * configure.ac: Change common to gdbsupport.
3713 * acinclude.m4: Change common to gdbsupport.
3714 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3715 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3716 common to gdbsupport.
3717 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3718 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3719 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3720 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3721 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3722 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3723 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3724 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3725 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3726 common to gdbsupport.
3727
3728 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3729
3730 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3731 defines.
3732 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3733
3734 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3735
3736 * configure.srv: Remove legacy xml.
3737 * linux-aarch64-low.c (initialize_low_arch): Remove
3738 initialize_low_tdesc call.
3739 * linux-aarch64-tdesc-selftest.c: Remove file.
3740 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3741 * linux-x86-low.c (initialize_low_arch): Remove
3742 initialize_low_tdesc call.
3743 * linux-x86-tdesc-selftest.c: Remove file.
3744 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3745
3746 2019-06-20 Tom de Vries <tdevries@suse.de>
3747
3748 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3749 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3750
3751 2019-06-19 Tom de Vries <tdevries@suse.de>
3752
3753 * debug.h (debug_write): Change return type to ssize_t.
3754 * debug.c (debug_write): Same.
3755
3756 2019-06-14 Tom Tromey <tom@tromey.com>
3757
3758 * configure.ac: Use new path to gnulib.
3759 * configure: Rebuild.
3760 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3761 to gnulib.
3762
3763 2019-06-11 Tom Tromey <tom@tromey.com>
3764
3765 * Makefile.in (SFILES): Add alloc.c.
3766 (OBS): Add alloc.o.
3767 (IPA_OBJS): Add alloc-ipa.o.
3768 (alloc-ipa.o): New target.
3769 (%.o: ../%.c): New pattern rule.
3770
3771 2019-06-10 Tom Tromey <tromey@adacore.com>
3772
3773 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3774 end warning with a newline.
3775 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3776 newline.
3777 * thread-db.c (attach_thread): Don't end warning with a newline.
3778 (thread_db_notice_clone): Likewise.
3779 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3780 newline.
3781 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3782 end warning with a newline.
3783
3784 2019-06-04 Pedro Alves <palves@redhat.com>
3785
3786 * server.c (captured_main): Use make_unique_xstrdup.
3787
3788 2019-06-02 Tom Tromey <tom@tromey.com>
3789
3790 * gdbreplay.c (fromhex): Remove.
3791 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3792
3793 2019-05-29 Tom Tromey <tromey@adacore.com>
3794
3795 * configure: Rebuild.
3796
3797 2019-05-06 Kevin Buettner <kevinb@redhat.com>
3798
3799 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3800 sign extension code on 32-bit builds.
3801
3802 2019-05-03 Eli Zaretskii <eliz@gnu.org>
3803
3804 * remote-utils.c:
3805 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3806
3807 2019-04-19 Tom Tromey <tom@tromey.com>
3808
3809 * server.c (struct vstop_notif): Derive from notif_event.
3810 <base>: Remove.
3811 (queue_stop_reply): Update.
3812 (remove_all_on_match_ptid): Change type. Rewrite.
3813 (discard_queued_stop_replies): Rewrite.
3814 (in_queued_stop_replies_ptid): Change type.
3815 (in_queued_stop_replies): Rewrite.
3816 (notif_stop): Update.
3817 (queue_stop_reply_callback): Update.
3818 (captured_main): Don't call initialize_notif.
3819 (push_stop_notification): Update.
3820 * notif.c (notif_write_event, handle_notif_ack)
3821 (notif_event_enque, notif_push): Update.
3822 (notif_event_xfree, initialize_notif): Remove.
3823 * notif.h (struct notif_event): Include <list>, not
3824 "common/queue.h".
3825 (struct notif_server) <queue>: Now a std::list.
3826 (notif_event_p): Remove typedef.
3827 (initialize_notif): Don't declare.
3828 (struct notif_event): Add virtual destructor.
3829
3830 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3831
3832 * ax.c (ax_vdebug): Call debug_printf.
3833 * debug.c (debug_write): New function.
3834 * debug.h (debug_write): New declaration.
3835 * linux-low.c (sigchld_handler): Call debug_write.
3836
3837 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3838
3839 * debug.c (debug_set_output): New function.
3840 (debug_vprintf): Send output to debug_file.
3841 (debug_flush): Likewise.
3842 * debug.h (debug_set_output): New declaration.
3843 * server.c (handle_monitor_command): Add debug-file option.
3844 (captured_main): Likewise.
3845
3846 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3847
3848 * debug.c (remote_debug): Add definition.
3849 * debug.h (remote_debug): Add declaration.
3850 * hostio.c (remote_debug): Remove declaration.
3851 * remote-utils.c (struct ui_file): Likewise.
3852 (remote_debug): Likewise.
3853 * remote-utils.h (remote_debug): Likewise,
3854 * server.c (remote_debug): Remove definition.
3855
3856 2019-04-10 Kevin Buettner <kevinb@redhat.com>
3857
3858 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3859 when using a 64-bit gdbserver.
3860
3861 2019-04-09 Tom Tromey <tromey@adacore.com>
3862
3863 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3864
3865 2019-04-08 Tom Tromey <tom@tromey.com>
3866
3867 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3868 throw.
3869 (linux_resume_one_lwp): Likewise.
3870
3871 2019-04-08 Tom Tromey <tom@tromey.com>
3872
3873 * gdbreplay.c: Update.
3874 * linux-low.c: Update.
3875 * server.c: Update.
3876
3877 2019-04-08 Tom Tromey <tom@tromey.com>
3878
3879 * server.c: Use C++ exception handling.
3880 * linux-low.c: Use C++ exception handling.
3881 * gdbreplay.c: Use C++ exception handling.
3882
3883 2019-04-08 Tom Tromey <tom@tromey.com>
3884
3885 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
3886 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
3887 (captured_main, main): Update.
3888 * gdbreplay.c (main): Update.
3889
3890 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3891
3892 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
3893 value in argument pointer, return 1 if the entry is found and 0
3894 otherwise. Move comment.
3895 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
3896 * linux-low.h (linux_get_auxv): Declare.
3897 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
3898
3899 2019-04-05 Tom Tromey <tromey@adacore.com>
3900
3901 * server.c (gdbserver_usage): Use upper-case for metasyntactic
3902 variables.
3903
3904 2019-03-28 Alan Hayward <alan.hayward@arm.com>
3905
3906 * linux-low.c (AT_HWCAP2): Add define if not already included.
3907
3908 2019-03-26 Alan Hayward <alan.hayward@arm.com>
3909
3910 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
3911 (aarch64_arch_setup): Call linux_get_hwcap.
3912 * linux-arm-low.c (arm_get_hwcap): Remove function.
3913 (arm_read_description): Call linux_get_hwcap.
3914 * linux-low.c (linux_get_auxv): New function.
3915 (linux_get_hwcap): Likewise.
3916 (linux_get_hwcap2): Likewise.
3917 * linux-low.h (linux_get_hwcap): New declaration.
3918 (linux_get_hwcap2): Likewise.
3919 * linux-ppc-low.c (ppc_get_auxv): Remove function.
3920 (ppc_arch_setup): Call linux_get_hwcap.
3921 * linux-s390-low.c (s390_get_hwcap): Remove function.
3922 (s390_arch_setup): Call linux_get_hwcap.
3923
3924 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3925 Jiong Wang <jiong.wang@arm.com>
3926
3927 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
3928 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
3929 to fail.
3930 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
3931
3932 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3933 Jiong Wang <jiong.wang@arm.com>
3934
3935 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
3936 (aarch64_get_hwcap): New function.
3937 (aarch64_arch_setup): Read APIA hwcap.
3938
3939 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3940 Jiong Wang <jiong.wang@arm.com>
3941
3942 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
3943 (initialize_low_tracepoint): Likewise.
3944 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
3945 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
3946 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
3947 (aarch64_linux_read_description): Likewise.
3948 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
3949
3950 2019-03-12 John Baldwin <jhb@FreeBSD.org>
3951
3952 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
3953 i386_create_target_description for 'segments' parameter.
3954 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
3955 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3956 * win32-i386-low.c (i386_arch_setup): Likewise.
3957
3958 2019-03-12 Tom Tromey <tromey@adacore.com>
3959
3960 * linux-low.c (iterate_over_lwps): Update.
3961
3962 2019-03-06 Tom Tromey <tom@tromey.com>
3963
3964 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
3965 (captured_main): Use SCOPE_EXIT.
3966
3967 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
3968
3969 * configure.srv: Use '$enable_unittest' instead of '$development'
3970 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
3971 case.
3972
3973 2019-02-27 Tom Tromey <tromey@adacore.com>
3974
3975 * gdbreplay.c (logchar): Handle \r\n.
3976
3977 2019-02-07 Alan Hayward <alan.hayward@arm.com>
3978
3979 * linux-low.c (linux_attach): Add process before lwp.
3980 * server.c (attach_inferior): Check if already attached.
3981
3982 2019-02-07 Tom Tromey <tom@tromey.com>
3983
3984 * x86-tdesc.h: Rename include guard.
3985 * x86-low.h: Add include guard.
3986 * wincecompat.h: Rename include guard.
3987 * win32-low.h: Add include guard.
3988 * utils.h: Rename include guard.
3989 * tracepoint.h: Rename include guard.
3990 * tdesc.h: Rename include guard.
3991 * target.h: Rename include guard.
3992 * server.h: Rename include guard.
3993 * remote-utils.h: Rename include guard.
3994 * regcache.h: Rename include guard.
3995 * nto-low.h: Rename include guard.
3996 * notif.h: Add include guard.
3997 * mem-break.h: Rename include guard.
3998 * lynx-low.h: Add include guard.
3999 * linux-x86-tdesc.h: Add include guard.
4000 * linux-s390-tdesc.h: Add include guard.
4001 * linux-ppc-tdesc-init.h: Add include guard.
4002 * linux-low.h: Add include guard.
4003 * linux-aarch64-tdesc.h: Add include guard.
4004 * linux-aarch32-low.h: Add include guard.
4005 * inferiors.h: Rename include guard.
4006 * i387-fp.h: Rename include guard.
4007 * hostio.h: Rename include guard.
4008 * gdbthread.h: Rename include guard.
4009 * gdb_proc_service.h: Rename include guard.
4010 * event-loop.h: Rename include guard.
4011 * dll.h: Rename include guard.
4012 * debug.h: Rename include guard.
4013 * ax.h: Rename include guard.
4014
4015 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4016
4017 PR gdb/23985
4018 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4019 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4020
4021 2019-01-25 Tom Tromey <tom@tromey.com>
4022
4023 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4024
4025 2019-01-25 Tom Tromey <tom@tromey.com>
4026
4027 * win32-low.c: Fix common/ includes.
4028 * win32-i386-low.c: Fix common/ includes.
4029 * tracepoint.c: Fix common/ includes.
4030 * thread-db.c: Fix common/ includes.
4031 * target.h: Fix common/ includes.
4032 * symbol.c: Fix common/ includes.
4033 * spu-low.c: Fix common/ includes.
4034 * server.h: Fix common/ includes.
4035 * server.c: Fix common/ includes.
4036 * remote-utils.c: Fix common/ includes.
4037 * regcache.h: Fix common/ includes.
4038 * regcache.c: Fix common/ includes.
4039 * nto-x86-low.c: Fix common/ includes.
4040 * notif.h: Fix common/ includes.
4041 * mem-break.h: Fix common/ includes.
4042 * lynx-low.c: Fix common/ includes.
4043 * lynx-i386-low.c: Fix common/ includes.
4044 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4045 * linux-x86-low.c: Fix common/ includes.
4046 * linux-low.c: Fix common/ includes.
4047 * inferiors.h: Fix common/ includes.
4048 * i387-fp.c: Fix common/ includes.
4049 * hostio.c: Fix common/ includes.
4050 * hostio-errno.c: Fix common/ includes.
4051 * gdbthread.h: Fix common/ includes.
4052 * gdbreplay.c: Fix common/ includes.
4053 * fork-child.c: Fix common/ includes.
4054 * event-loop.c: Fix common/ includes.
4055 * ax.c:
4056 (enum gdb_agent_op): Fix common/ includes.
4057
4058 2019-01-21 Tom Tromey <tom@tromey.com>
4059
4060 * tracepoint.c: Fix includes.
4061 * remote-utils.c: Fix includes.
4062 * linux-x86-low.c: Fix includes.
4063
4064 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4065
4066 * gdbreplay.c (gdbreplay_version): Update copyright year in
4067 version message.
4068 * server.c (gdbserver_version): Likewise.
4069
4070 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4071
4072 * linux-low.c (add_lwp): Switch ordering.
4073
4074 2018-11-29 Tom Tromey <tom@tromey.com>
4075
4076 * win32-low.c (win32_join): Take pid, not process.
4077 * target.h (struct target_ops) <join>: Change argument type.
4078 (join_inferior): Change argument name.
4079 * spu-low.c (spu_join): Take pid, not process.
4080 * server.c (handle_detach): Preserve pid before destroying
4081 process.
4082 * lynx-low.c (lynx_join): Take pid, not process.
4083 * linux-low.c (linux_join): Take pid, not process.
4084
4085 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4086
4087 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4088 (aarch64_cannot_fetch_register): Likewise.
4089 (struct linux_target_ops): Update references.
4090
4091 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4092
4093 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4094
4095 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4096
4097 * configure.srv (ipa_ppc_linux_regobj): Add
4098 powerpc-isa207-htm-vsx32l-ipa.o and
4099 powerpc-isa207-htm-vsx64l-ipa.o.
4100 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4101 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4102 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4103 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4104 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4105 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4106 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4107 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4108 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4109 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4110 (init_registers_powerpc_isa207_htm_vsx32l)
4111 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4112 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4113 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4114 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4115 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4116 (ppc_store_tm_ctarregset): New functions.
4117 (ppc_regsets): Add entries for HTM regsets.
4118 (ppc_arch_setup): Set htm in features struct when needed. Set
4119 sizes for the HTM regsets.
4120 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
4121 (initialize_low_arch): Call
4122 init_registers_powerpc_isa207_htm_vsx32l and
4123 init_registers_powerpc_isa207_htm_vsx64l.
4124 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4125 PPC_TDESC_ISA207_HTM_VSX.
4126 (initialize_low_tracepoint): Call
4127 init_registers_powerpc_isa207_htm_vsx32l and
4128 init_registers_powerpc_isa207_htm_vsx64l.
4129
4130 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4131
4132 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
4133 rs6000/power-linux-pmu.xml to srv_xmlfiles.
4134 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
4135 (ppc_store_pmuregset): New functions.
4136 (ppc_regsets): Add entries for ebb and pmu regsets.
4137 (ppc_arch_setup): Set isa207 in features struct if the ebb and
4138 pmu regsets are available. Set sizes for these regsets.
4139
4140 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4141
4142 * configure.srv (ipa_ppc_linux_regobj): Add
4143 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
4144 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
4145 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
4146 rs6000/powerpc-isa207-vsx32l.xml, and
4147 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
4148 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4149 <PPC_TDESC_ISA207_VSX>: New enum value.
4150 (init_registers_powerpc_isa207_vsx32l): Declare.
4151 (init_registers_powerpc_isa207_vsx64l): Declare.
4152 * linux-ppc-low.c (ppc_fill_tarregset): New function.
4153 (ppc_store_tarregset): New function.
4154 (ppc_regsets): Add entry for the TAR regset.
4155 (ppc_arch_setup): Set isa207 in features struct when needed. Set
4156 size for the TAR regsets.
4157 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
4158 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
4159 and init_registers_powerpc_isa207_vsx64l.
4160 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
4161 (initialize_low_tracepoint): Call
4162 init_registers_powerpc_isa207_vsx32l and
4163 init_registers_powerpc_isa207_vsx64l.
4164
4165 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4166 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4167
4168 * configure.srv (ipa_ppc_linux_regobj): Add
4169 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
4170 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
4171 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
4172 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
4173 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
4174 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
4175 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
4176 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4177 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
4178 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
4179 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
4180 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
4181 (ppc_hwcap): Add comment.
4182 (ppc_hwcap2): New global.
4183 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
4184 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
4185 (ppc_regsets): Add entries for the DSCR and PPR regsets.
4186 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
4187 when needed. Set sizes for the the DSCR and PPR regsets.
4188 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
4189 (initialize_low_arch): Call
4190 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4191 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4192 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
4193 PPC_TDESC_ISA205_PPR_DSCR_VSX.
4194 (initialize_low_tracepoint): Call
4195 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
4196 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
4197
4198 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4199
4200 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
4201
4202 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
4203 Simon Marchi <simark@simark.ca>
4204
4205 * acinclude.m4: Include "../selftest.m4".
4206 * configure: Regenerate.
4207 * configure.ac: Use "GDB_AC_SELFTEST".
4208 * configure.srv: Use "$enable_unittests" instead of
4209 "$development" when checking whether unit tests have been
4210 enabled.
4211 * server.c (captured_main): Update message informing that
4212 selftests have been disabled.
4213
4214 2018-10-04 Tom Tromey <tom@tromey.com>
4215
4216 * configure: Rebuild.
4217
4218 2018-10-04 Tom Tromey <tom@tromey.com>
4219
4220 * server.c (handle_status): Rename inner "thread".
4221 (process_serial_event): Declare "res" in 'm' case.
4222 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
4223 (iterate_over_lwps): Rename inner "thread".
4224 (linux_qxfer_libraries_svr4): Rename inner "len".
4225 * gdbthread.h (find_thread_in_random): Rename inner "thread".
4226
4227 2018-10-01 Gary Benson <gbenson@redhat.com>
4228
4229 * gdb_proc_service.h: Moved common code to
4230 common/gdb_proc_service.h.
4231
4232 2018-10-01 Gary Benson <gbenson@redhat.com>
4233
4234 * gdb_proc_service.h: Synchronize comments and whitespace with
4235 GDB's version of this file.
4236
4237 2018-09-25 Tom Tromey <tom@tromey.com>
4238
4239 * configure: Rebuild.
4240 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
4241
4242 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4243
4244 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4245 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
4246 ($(IPA_LIB)): Sort IPA_OBJS.
4247
4248 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
4249
4250 * Makefile.in: Remove references to $(ADD_DEPS).
4251
4252 2018-09-16 Tom Tromey <tom@tromey.com>
4253
4254 * remote-utils.c (remote_open): Use GNU style for metasyntactic
4255 variables.
4256 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
4257 variables.
4258
4259 2018-09-05 Tom Tromey <tom@tromey.com>
4260
4261 * configure: Rebuild.
4262
4263 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4264
4265 PR build/23399
4266 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
4267
4268 2018-08-27 Tom Tromey <tom@tromey.com>
4269
4270 PR build/23087:
4271 * configure: Rebuild.
4272
4273 2018-08-27 Tom Tromey <tom@tromey.com>
4274
4275 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
4276 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
4277 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
4278 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
4279 (s390x_emit_stack_adjust): Add casts to unsigned char.
4280
4281 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
4282
4283 PR gdb/23374
4284 PR gdb/23375
4285 * server.h (struct client_state) <disable_randomization>:
4286 Initialize to 1.
4287
4288 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4289
4290 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4291 variable.
4292 (mips_supply_ptrace_register): Likewise.
4293
4294 2018-07-22 Tom Tromey <tom@tromey.com>
4295
4296 * configure: Rebuild.
4297
4298 2018-07-22 Tom Tromey <tom@tromey.com>
4299
4300 * win32-low.c (win32_create_inferior): Remove unused variables.
4301 * gdbreplay.c (remote_open): Remove unused variable.
4302 * remote-utils.c (remote_prepare): Remove unused variable.
4303 * x86-tdesc.h (X86_TDESC_H): Define.
4304 (amd64_expedite_regs): Define conditionally.
4305 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
4306 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
4307 * remote-utils.c (readchar): Remove unused variable.
4308
4309 2018-07-13 Pedro Alves <palves@redhat.com>
4310
4311 * linux-low.c (linux_kill): Change parameter to process_info
4312 pointer instead of pid. Adjust.
4313 * lynx-low.c (lynx_kill): Likewise.
4314 * nto-low.c (nto_kill): Likewise.
4315 * spu-low.c (spu_kill): Likewise.
4316 * win32-low.c (win32_kill): Likewise.
4317 * server.c (handle_v_kill, kill_inferior_callback)
4318 (detach_or_kill_for_exit): Adjust.
4319 * target.c (kill_inferior): Change parameter to process_info
4320 pointer instead of pid. Adjust.
4321 * target.h (struct target_ops) <kill>: Change parameter to
4322 process_info pointer instead of pid. Adjust all implementations
4323 and callers.
4324 (kill_inferior): Likewise.
4325
4326 2018-07-13 Pedro Alves <palves@redhat.com>
4327
4328 * linux-low.c (linux_detach, linux_join): Change parameter to
4329 process_info pointer instead of pid. Adjust.
4330 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4331 * nto-low.c (nto_detach): Likewise.
4332 * spu-low.c (spu_detach, spu_join): Likewise.
4333 * win32-low.c (win32_detach, win32_join): Likewise.
4334 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4335 * target.h (struct target_ops) <detach, join>: Change parameter to
4336 process_info pointer instead of pid. Adjust all implementations
4337 and callers.
4338 (detach_inferior, join_inferior): Rename 'pid' parameter to
4339 'proc'.
4340
4341 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4342 Jan Kratochvil <jan.kratochvil@redhat.com>
4343 Paul Fertser <fercerpav@gmail.com>
4344 Tsutomu Seki <sekiriki@gmail.com>
4345
4346 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4347 (OBS): Add 'common/netstuff.o'.
4348 (GDBREPLAY_OBS): Likewise.
4349 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4350 (remote_open): Implement support for IPv6
4351 connections.
4352 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4353 and 'wspiapi.h'.
4354 (handle_accept_event): Accept connections from IPv6 sources.
4355 (remote_prepare): Handle IPv6-style hostnames; implement
4356 support for IPv6 connections.
4357 (remote_open): Implement support for printing connections from
4358 IPv6 sources.
4359
4360 2018-07-11 Pedro Alves <palves@redhat.com>
4361
4362 PR gdb/23377
4363 * mem-break.c (any_persistent_commands): Add process_info
4364 parameter and use it instead of relying on the current process.
4365 Change return type to bool.
4366 * mem-break.h (any_persistent_commands): Add process_info
4367 parameter and change return type to bool.
4368 * server.c (handle_detach): Remove require_running_or_return call.
4369 Look up the process_info for the process we're about to detach.
4370 If not found, return back error to GDB. Adjust
4371 any_persistent_commands call to pass down a process pointer.
4372
4373 2018-07-11 Pedro Alves <palves@redhat.com>
4374
4375 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4376 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4377 instead of collect_register_by_name.
4378 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4379 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4380
4381 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4382 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4385
4386 2018-07-03 Tom Tromey <tom@tromey.com>
4387
4388 * linux-low.c: Update.
4389 * lynx-low.c: Update.
4390 * mem-break.c: Update.
4391 * nto-low.c: Update.
4392 * remote-utils.c: Update.
4393 * server.c: Update.
4394 * spu-low.c: Update.
4395 * target.c: Update.
4396 * win32-low.c: Update.
4397
4398 2018-07-03 Tom Tromey <tom@tromey.com>
4399
4400 * server.c: Update.
4401
4402 2018-07-03 Tom Tromey <tom@tromey.com>
4403
4404 * linux-low.c: Update.
4405
4406 2018-07-03 Tom Tromey <tom@tromey.com>
4407
4408 * target.c: Update.
4409
4410 2018-07-03 Tom Tromey <tom@tromey.com>
4411
4412 * linux-low.c: Update.
4413 * linux-mips-low.c: Update.
4414 * lynx-low.c: Update.
4415 * nto-low.c: Update.
4416 * remote-utils.c: Update.
4417 * server.c: Update.
4418 * spu-low.c: Update.
4419 * target.c: Update.
4420 * thread-db.c: Update.
4421
4422 2018-07-03 Tom Tromey <tom@tromey.com>
4423
4424 * linux-low.c: Update.
4425 * linux-mips-low.c: Update.
4426 * lynx-low.c: Update.
4427 * mem-break.c: Update.
4428 * nto-low.c: Update.
4429 * remote-utils.c: Update.
4430 * server.c: Update.
4431 * spu-low.c: Update.
4432 * target.c: Update.
4433 * tracepoint.c: Update.
4434
4435 2018-07-03 Tom Tromey <tom@tromey.com>
4436
4437 * linux-low.c: Update.
4438 * linux-ppc-low.c: Update.
4439 * linux-x86-low.c: Update.
4440 * proc-service.c: Update.
4441 * server.c: Update.
4442 * spu-low.c: Update.
4443 * thread-db.c: Update.
4444 * win32-low.c: Update.
4445
4446 2018-07-03 Tom Tromey <tom@tromey.com>
4447
4448 * linux-low.c: Update.
4449 * lynx-low.c: Update.
4450 * nto-low.c: Update.
4451 * remote-utils.c: Update.
4452 * spu-low.c: Update.
4453 * thread-db.c: Update.
4454 * win32-low.c: Update.
4455
4456 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4457
4458 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4459 parameter in call to 'amd64_create_target_description'.
4460
4461 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4462
4463 * x86-tdesc.h: Remove executable permission flag.
4464
4465 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4466
4467 * configure.ac: Remove AC_PREREQ, add missing quoting.
4468 * configure: Re-generate.
4469 * config.in: Re-generate.
4470 * aclocal.m4: Re-generate.
4471
4472 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4473
4474 * tracepoint.h (current_traceframe): Remove declaration.
4475
4476 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4477
4478 * linux-aarch64-low.c (is_sve_tdesc): New function.
4479 (aarch64_sve_regs_copy_to_regcache): Likewise.
4480 (aarch64_sve_regs_copy_from_regcache): Likewise.
4481 (aarch64_regs_info): Add SVE checks.
4482 (initialize_low_arch): Initialize SVE.
4483
4484 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4485
4486 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4487
4488 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4489
4490 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4491 (initialize_low_tracepoint): Likewise
4492 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4493 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4494 param.
4495 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4496 checks.
4497 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4498
4499 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4500
4501 * server.h (PBUFSIZ): Increase size
4502
4503 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4504
4505 * regcache.c (regcache::raw_compare): New function.
4506 * regcache.h (regcache::raw_compare): New declaration.
4507
4508 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4509
4510 * regcache.c (new_register_cache): Use new.
4511 (free_register_cache): Use delete.
4512 (register_data): Use const.
4513 (supply_register): Move body inside regcache.
4514 (regcache::raw_supply): New override function.
4515 (collect_register): Move body inside regcache.
4516 (regcache::raw_collect): New override function.
4517 (regcache::get_register_status): New override function.
4518 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4519
4520 2018-06-09 Tom Tromey <tom@tromey.com>
4521
4522 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4523 declare queue.
4524 (event_queue): Use std::queue.
4525 (gdb_event_xfree): Remove.
4526 (initialize_event_loop, process_event, wait_for_event): Update.
4527
4528 2018-06-08 Stan Cox <scox@redhat.com>
4529
4530 * win32-low.c (win32_create_inferior): last_ptid and last_status
4531 moved to client_state.
4532
4533 2018-06-08 Pedro Alves <palves@redhat.com>
4534
4535 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4536 common/common-exceptions.o, common/common-utils.o,
4537 common/errors.o, common/print-utils.o and utils.o.
4538 * gdbreplay.c: Include "common-defs.h" instead of the two
4539 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4540 string.h or alloca.h.
4541 (perror_with_name): Delete.
4542 (remote_open): Use xstrdup instead of strdup.
4543 (main): Rename to ...
4544 (captured_main): ... this.
4545 (main): New.
4546
4547 2018-06-08 Tom Tromey <tom@tromey.com>
4548
4549 * linux-low.c (linux_low_read_btrace): Update.
4550
4551 2018-06-04 Stan Cox <scox@redhat.com>
4552
4553 * server.h (struct client_state): New.
4554 * server.c (cont_thread, general_thread, multi_process)
4555 (report_fork_events, report_vfork_events, report_exec_events)
4556 (report_thread_events, swbreak_feature, hwbreak_feature)
4557 (vCont_supported, disable_randomization, pass_signals)
4558 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4559 Moved to client_state.
4560 * remote-utils.c (remote_debug, noack_mode)
4561 (transport_is_reliable): Moved to client_state.
4562 * tracepoint.c (current_traceframe): Moved to client_state.
4563
4564 Update all callers.
4565 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4566 linux-low.c, remote-utils.h, target.c: Use client_state.
4567
4568 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4569
4570 * configure.srv: Add new c/h file.
4571
4572 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4573
4574 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4575 null VQ.
4576
4577 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4578
4579 * gdb.arch/mips-fpregset-core.exp: New test.
4580 * gdb.arch/mips-fpregset-core.c: New test source.
4581
4582 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4583
4584 PR server/23198
4585 * hostio.c (require_int): Do not report overflow for integers
4586 between 0xfffffff and 0x7fffffff.
4587
4588 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4589
4590 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4591 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4592 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4593 functions.
4594 (the_low_target): Wire them.
4595
4596 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4597
4598 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4599 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4600 mode. Call collect_register_by_name with vscr using
4601 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4602 (ppc_store_vrregset): Add and set vscr_offset variable as in
4603 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4604 vscr_offset.
4605
4606 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4607
4608 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4609 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4610 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4611
4612 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4613
4614 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4615 (ppc_store_vsxregset): Likewise.
4616 (ppc_fill_vrregset): Likewise.
4617 (ppc_store_vrregset): Likewise.
4618 (ppc_fill_evrregset): Likewise.
4619 (ppc_store_evrregset): Likewise.
4620 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4621 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4622 needed.
4623
4624 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4625
4626 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4627 wordsize of the inferior. Call ppc_linux_target_wordsize.
4628
4629 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4630
4631 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4632 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4633 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4634 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4635 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4636 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4637 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4638 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4639 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4640 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4641 (tdesc_powerpc_e500l): Remove.
4642 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4643 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4644 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4645 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4646 linux-ppc-tdesc.h.
4647 (ppc_arch_setup): Remove target description matching code. Fill a
4648 ppc_linux_features struct and call ppc_linux_match_description
4649 with it.
4650
4651 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4652
4653 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4654 width of the requested register exceeds the width of the
4655 `ptrace' data type.
4656 (mips_cannot_store_register): Likewise.
4657
4658 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4659
4660 * linux-mips-low.c (mips_fetch_register): New function. Update
4661 preceding comment.
4662 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4663 (the_low_target): Wire `mips_fetch_register'.
4664
4665 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4666
4667 * lynx-i386-low.c (LYNXOS_178): New macro.
4668 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4669 the layout on LynxOS-178.
4670 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4671 handle floating point registers that are not supported by
4672 LynxOS-178.
4673
4674 2018-05-10 Tom Tromey <tom@tromey.com>
4675
4676 * configure: Rebuild.
4677
4678 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4679
4680 PR server/23158:
4681 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4682 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4683 Use it to set the expedite_regs field in the given tdesc.
4684 * x86-tdesc.h: New file.
4685 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4686 Adjust following the addition of the new expedite_regs parameter
4687 to init_target_desc.
4688 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4689 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4690 (i386_linux_read_description, amd64_linux_read_description):
4691 Adjust following the addition of the new expedite_regs parameter
4692 to init_target_desc.
4693 * lynx-i386-low.c: #include "x86-tdesc.h".
4694 (lynx_i386_arch_setup): Adjust following the addition of the new
4695 expedite_regs parameter to init_target_desc.
4696 * nto-x86-low.c: #include "x86-tdesc.h".
4697 (nto_x86_arch_setup): Adjust following the addition of the new
4698 expedite_regs parameter to init_target_desc.
4699 * win32-i386-low.c: #include "x86-tdesc.h".
4700 (i386_arch_setup): Adjust following the addition of the new
4701 expedite_regs parameter to init_target_desc.
4702
4703 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4704
4705 PR server/23158:
4706 * win32-low.c (win32_create_inferior): Add call to my_wait
4707 setting last_status global.
4708
4709 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4710
4711 PR server/23158:
4712 * win32-low.c (create_process): Only call gdb_tilde_expand if
4713 inferior_cwd is not NULL.
4714
4715 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4716
4717 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4718 registers to the cache if their values have changed.
4719 (i387_xsave_to_cache): Provide default values for x87 control
4720 registers when these features are available, but disabled.
4721 * regcache.c (supply_register_by_name_zeroed): New function.
4722 * regcache.h (supply_register_by_name_zeroed): Declare new
4723 function.
4724
4725 2018-05-07 Tom Tromey <tom@tromey.com>
4726
4727 * configure: Rebuild.
4728
4729 2018-05-04 Tom Tromey <tom@tromey.com>
4730
4731 * configure: Rebuild.
4732
4733 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4734 Pedro Alves <palves@redhat.com>
4735
4736 * linux-aarch64-low.c (aarch64_stopped_data_address):
4737 Likewise.
4738
4739 2018-04-27 Tom Tromey <tom@tromey.com>
4740
4741 * configure: Rebuild.
4742
4743 2018-04-23 Tom Tromey <tom@tromey.com>
4744
4745 * configure: Rebuild.
4746
4747 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4748
4749 * Makefile.in (depcomp): Add "..".
4750 (all_deps_files): New and use it.
4751
4752 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4753
4754 * configure.srv (aarch64*-*-linux*): Don't include xml.
4755 (i[34567]86-*-cygwin*): Likewise.
4756 (i[34567]86-*-linux*): Likewise.
4757 (i[34567]86-*-lynxos*): Likewise.
4758 (i[34567]86-*-mingw32ce*): Likewise.
4759 (i[34567]86-*-mingw*): Likewise.
4760 (i[34567]86-*-nto*): Likewise.
4761 (tic6x-*-uclinux): Likewise.
4762 (x86_64-*-linux*): Likewise.
4763 (x86_64-*-mingw*): Likewise.
4764 (x86_64-*-cygwin*): Likewise.
4765
4766 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4767
4768 * tdesc.c: Remove xml parameter.
4769
4770 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4771
4772 * server.c (get_features_xml): Remove cast.
4773 * tdesc.c (void target_desc::accept): Fill in function.
4774 (tdesc_get_features_xml): Remove old xml creation.
4775 (print_xml_feature::visit_pre): Add xml vistor.
4776 * tdesc.h (struct target_desc): Make xmltarget mutable.
4777 (tdesc_get_features_xml): Remove declaration.
4778
4779 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4780
4781 * tdesc.c (tdesc_architecture_name): Add new function.
4782 (tdesc_osabi_name): Likewise.
4783 (tdesc_get_features_xml): Use new functions.
4784
4785 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4786
4787 * tdesc.c (tdesc_create_flags): Remove.
4788 (tdesc_add_flag): Likewise.
4789 (tdesc_named_type): Likewise.
4790 (tdesc_create_union): Likewise.
4791 (tdesc_create_struct): Likewise.
4792 (tdesc_create_vector): Likewise.
4793 (tdesc_add_bitfield): Likewise.
4794 (tdesc_add_field): Likewise.
4795 (tdesc_set_struct_size): Likewise.
4796
4797 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4798
4799 * tdesc.c (~target_desc): Remove implictly deleted items.
4800 (init_target_desc): Iterate all features.
4801 (tdesc_get_features_xml): Use vector.
4802 (tdesc_create_feature): Create feature.
4803 * tdesc.h (tdesc_feature) Remove
4804 (target_desc): Add features.
4805
4806 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4807
4808 * Makefile.in: Add common/tdesc.c
4809 * tdesc.c (init_target_desc): init all reg_defs from register
4810 vector.
4811 (tdesc_create_reg): Create tdesc_reg.
4812 * tdesc.h (tdesc_feature): Add register vector.
4813
4814 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4815
4816 * tdesc.h (struct target_desc) <features>: Change type to
4817 std::vector<std::string>.
4818 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4819 changes.
4820 (tdesc_get_features_xml): Likewise.
4821 (tdesc_create_feature): Likewise.
4822
4823 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4824
4825 * regcache.c (find_register_by_number): Return a ref.
4826 (find_regno): Use references.
4827 (register_size): Likewise.
4828 (register_data): Likewise.
4829 * tdesc.c (target_desc::~target_desc): Remove free calls.
4830 (target_desc::operator==): Use std::vector compare.
4831 (init_target_desc): Use reference.
4832 (tdesc_create_reg): Use reg constructors.
4833 * tdesc.h (struct target_desc): Replace pointer with object.
4834
4835 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4836
4837 * regcache.c (find_register_by_number): Make static.
4838 (find_regno): Use find_register_by_number
4839 * regcache.h (struct reg): Remove declaration.
4840
4841 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4842
4843 * tdesc.c (target_desc::~target_desc): Move to here.
4844 (target_desc::operator==): Likewise.
4845 * tdesc.h (target_desc::~target_desc): Move from here.
4846 (target_desc::operator==): Likewise.
4847
4848 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4849
4850 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4851
4852 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4853
4854 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4855 S390_TDESC_GS.
4856 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4857 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4858 and init_registers_s390_gs_linux64.
4859
4860 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4861
4862 * linux-s390-low.c (s390_fill_gs): Remove function.
4863 (s390_fill_gsbc): Remove function.
4864 (s390_regsets): Set fill functions for the guarded storage regsets
4865 to NULL.
4866
4867 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4868
4869 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4870 the word size. Add comment.
4871 (s390_get_wordsize): New function.
4872 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4873 pswm with it. Instead, use s390_get_wordsize to determine the
4874 word size first and derive the correct tdesc from that directly.
4875
4876 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4877
4878 * Makefile.in: Include silent-rules.mk.
4879 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4880 (COMPILE): Add ECHO_CXX.
4881 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4882 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4883 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
4884 (version-generated.c): Add ECHO_GEN.
4885 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
4886 (IPAGENT_COMPILE): Add ECHO_CXX.
4887 (%-generated.c): Add ECHO_REGDAT.
4888
4889 2018-03-14 Tom Tromey <tom@tromey.com>
4890
4891 PR cli/14977:
4892 * ax.c (ax_printf): Special case for NULL.
4893
4894 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4895
4896 * linux-low.c (linux_qxfer_libraries_svr4): Use
4897 xml_escape_text_append.
4898
4899 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4900
4901 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
4902
4903 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4904
4905 * server.c (handle_general_set): Remove unnecessary xstrdup.
4906
4907 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4908
4909 * server.c (parse_debug_format_options): Adjust to
4910 delim_string_to_char_ptr_vec changes.
4911 * thread-db.c (thread_db_load_search): Adjust to
4912 dirnames_to_char_ptr_vec changes.
4913
4914 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
4915
4916 * target.h (target_enable_btrace, target_disable_btrace)
4917 (target_read_btrace, target_read_btrace_conf): Turn macro into
4918 inline function. Throw error if target method is not defined.
4919 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
4920 check for btrace target method. Be prepared to handle exceptions
4921 from btrace target methods.
4922
4923 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4924
4925 * server.c (captured_main): Change order of error message printed
4926 when the current working directory cannot be found.
4927
4928 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4929
4930 * server.c: Include "filenames.h" and "pathstuff.h".
4931 (program_name): Delete variable.
4932 (program_path): New anonymous class.
4933 (get_exec_wrapper): Use "program_path" instead of
4934 "program_name".
4935 (handle_v_run): Likewise.
4936 (captured_main): Likewise.
4937 (process_serial_event): Likewise.
4938
4939 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4940
4941 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
4942 (OBJS): Add "pathstuff.o".
4943 * server.c (current_directory): New global variable.
4944 (captured_main): Initialize "current_directory".
4945
4946 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4947
4948 * tdesc.c: Use common/tdesc.h.
4949 * tdesc.h: Likewise.
4950
4951 2018-02-20 Alan Hayward <alan.hayward@arm.com>
4952 Simon Marchi <simon.marchi@ericsson.com>
4953
4954 * Makefile.in: Switch order of make rules.
4955
4956 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4957
4958 * Makefile.in: Add common directory in build.
4959 * configure.ac: Add common reference.
4960 * configure: Regenerate.
4961
4962 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4963
4964 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
4965 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
4966 * spu-low.c (spu_target_ops): Likewise.
4967 * win32-low.c (win32_target_ops): Likewise.
4968 * server.c (supported_btrace_packets): Report packets unconditionally.
4969 * target.h (target_ops) <supports_btrace>: Remove.
4970 (target_supports_btrace): Remove.
4971
4972 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4973
4974 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
4975 (handle_btrace_disable): Change return type to void. Use exceptions
4976 to report errors.
4977 (handle_btrace_general_set): Catch exception and copy message to
4978 return message.
4979
4980 2018-02-08 Tom Tromey <tom@tromey.com>
4981
4982 * linux-low.c (install_software_single_step_breakpoints): Use
4983 make_scoped_restore.
4984 * inferiors.c (make_cleanup_restore_current_thread): Remove.
4985 (do_restore_current_thread_cleanup): Remove.
4986 * gdbthread.h (make_cleanup_restore_current_thread): Don't
4987 declare.
4988
4989 2018-02-08 Tom Tromey <tom@tromey.com>
4990
4991 * mem-break.c (set_raw_breakpoint_at): Use
4992 gdb::unique_xmalloc_ptr.
4993
4994 2018-01-30 Pedro Alves <palves@redhat.com>
4995
4996 PR gdb/13211
4997 * target.c (target_terminal::terminal_state): Rename to ...
4998 (target_terminal::m_terminal_state): ... this.
4999
5000 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5001
5002 * linux-low.c (handle_extended_wait): Surround call to
5003 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5004
5005 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5006
5007 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5008 linux_ptrace_attach_fail_reason_string now returning an
5009 std::string.
5010 (linux_attach): Likewise.
5011 * thread-db.c (attach_thread): Likewise.
5012
5013 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5014
5015 PR gdb/21559
5016 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5017 checking for fs_base/gs_base fields in struct user_regs_struct.
5018 * configure: Regenerate.
5019
5020 2018-01-16 Yao Qi <yao.qi@linaro.org>
5021
5022 PR gdb/18749
5023 * linux-low.c (fetch_register): Call supply_register instead of
5024 error.
5025
5026 2018-01-08 Yao Qi <yao.qi@linaro.org>
5027 Simon Marchi <simon.marchi@ericsson.com>
5028
5029 * Makefile.in (OBS): Remove selftest.o.
5030 * configure.ac: Set srv_selftest_objs if $development is true.
5031 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5032 * configure: Re-generated.
5033 * server.c (captured_main): Wrap variable selftest_filter with
5034 GDB_SELF_TEST.
5035
5036 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5037
5038 * server.c (parse_debug_format_options): Return std::string.
5039 (handle_monitor_command, captured_main): Adjust.
5040
5041 2018-01-05 Pedro Alves <palves@redhat.com>
5042
5043 PR gdb/18653
5044 * server.c (captured_main): Pass quiet=false to
5045 save_original_signals_state.
5046
5047 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5048
5049 * gdbreplay.c (gdbreplay_version): Update copyright year in
5050 version message.
5051 * server.c (gdbserver_version): Likewise.
5052
5053 2017-12-08 Tom Tromey <tom@tromey.com>
5054
5055 * ax.c (ax_printf): Update.
5056
5057 2017-12-07 Yao Qi <yao.qi@linaro.org>
5058
5059 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5060 aarch64_linux_read_description.
5061 * linux-amd64-ipa.c (idx2mask): New array.
5062 (get_ipa_tdesc): Move idx2mask out.
5063 (initialize_low_tracepoint): Initialize target descriptions.
5064 * linux-i386-ipa.c (idx2mask): New array.
5065 (get_ipa_tdesc): Move idx2mask out.
5066 (initialize_low_tracepoint): Initialize target descriptions.
5067
5068 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5069
5070 * tdesc.c (struct tdesc_type): Change return type.
5071 (tdesc_add_flag): Change parameter type.
5072 (tdesc_add_bitfield): Likewise.
5073 (tdesc_add_field): Likewise.
5074 (tdesc_set_struct_size): Likewise.
5075
5076 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5077
5078 * regcache.c (registers_to_string): Remove unused variable.
5079
5080 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5081
5082 * inferiors.c (for_each_inferior_with_data): Remove.
5083 * inferiors.h (for_each_inferior_with_data): Remove.
5084 * server.c (handle_qxfer_threads_worker): Change parameter type.
5085 (handle_qxfer_threads_proper): Use for_each_thread.
5086
5087 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5088
5089 * inferiors.c (for_each_inferior): Remove.
5090 (clear_inferiors): Use for_each_thread.
5091 * inferiors.h (for_each_inferior): Remove.
5092 * linux-low.c (linux_wait_for_event_filtered): Use
5093 for_each_thread.
5094 (linux_stabilize_threads): Likewise.
5095 * regcache.c (regcache_release): Likewise.
5096 * server.c (gdb_wants_all_threads_stopped): Likewise.
5097 (clear_pending_status_callback): Remove.
5098 (handle_status): Use for_each_thread.
5099 (captured_main): Likewise.
5100 * win32-low.c (child_init_thread_list): Likewise.
5101 (win32_clear_inferiors): Likewise.
5102 (fake_breakpoint_event): Likewise.
5103
5104 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5105
5106 * inferiors.h (find_inferior): Remove.
5107 * inferiors.c (find_inferior): Remove.
5108
5109 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5110
5111 * linux-low.c (resume_status_pending_p): Update comment.
5112 (need_step_over_p): Update comment.
5113
5114 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5115
5116 * linux-low.c (proceed_one_lwp): Return void, change parameter
5117 type.
5118 (unsuspend_and_proceed_one_lwp): Likewise.
5119 (proceed_all_lwps): Use for_each_thread.
5120 (unstop_all_lwps): Likewise.
5121
5122 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5123
5124 * linux-low.c (linux_resume_one_thread): Return void, take
5125 parameter directly.
5126 (linux_resume): Use for_each_thread.
5127
5128 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5129
5130 * linux-low.c (send_sigstop_callback): Return void, change
5131 parameter type. Rename to...
5132 (send_sigstop): ... this.
5133 (suspend_and_send_sigstop_callback): Return void, change parameter
5134 type. Rename to...
5135 (suspend_and_send_sigstop): ... this.
5136 (stop_all_lwps): Use for_each_thread.
5137
5138 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5139
5140 * linux-low.c (lwp_running): Return bool, remove unused
5141 argument.
5142 (linux_stabilize_threads): Use find_thread.
5143
5144 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5145
5146 * linux-low.c (select_singlestep_lwp_callback): Remove.
5147 (count_events_callback): Remove.
5148 (select_event_lwp_callback): Remove.
5149 (select_event_lwp): Use find_thread/for_each_thread.
5150
5151 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5152
5153 * linux-low.c (not_stopped_callback): Return bool, take filter
5154 argument directly.
5155 (linux_wait_for_event_filtered): Use find_thread.
5156 (linux_wait_1): Likewise.
5157
5158 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5159
5160 * linux-low.c (same_lwp): Remove.
5161 (find_lwp_pid): Use find_thread.
5162
5163 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5164
5165 * linux-low.c (delete_lwp_callback): Remove.
5166 (linux_mourn): Use for_each_thread.
5167
5168 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5169
5170 * linux-low.c (linux_detach_lwp_callback): Return void, remove
5171 args parameter, don't check for pid.
5172 (linux_detach): Use for_each_thread.
5173
5174 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5175
5176 * linux-low.c (struct counter): Remove.
5177 (second_thread_of_pid_p): Remove.
5178 (last_thread_of_process_p): Use find_thread.
5179
5180 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5181
5182 * inferiors.c (find_inferior_in_random): Remove.
5183 * inferiors.h (find_inferior_in_random): Remove.
5184 * linux-low.c (status_pending_p_callback): Return bool, accept
5185 parameter ptid directly.
5186 (linux_wait_for_event_filtered): Use find_thread_in_random.
5187 (linux_wait_1): Likewise.
5188
5189 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5190
5191 * inferiors.c (find_inferior_id): Remove.
5192 (find_thread_ptid): Move implemention from find_inferior_id to
5193 here.
5194 * inferiors.h (find_inferior_id): Remove.
5195 * server.c (handle_status): Use find_thread_ptid.
5196 (process_serial_event): Likewise.
5197 * thread-db.c (find_one_thread): Likewise.
5198 (thread_db_thread_handle): Likewise.
5199 * win32-low.c (thread_rec): Likewise.
5200 (child_delete_thread): Likewise.
5201 (win32_thread_alive): Likewise.
5202 (get_child_debug_event): Likewise.
5203
5204 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5205
5206 * linux-mips-low.c (update_watch_registers_callback): Return
5207 void, remove pid_p parameter, don't check for pid.
5208 (mips_insert_point, mips_remove_point): Use for_each_thread.
5209
5210 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5211
5212 * lynx.low (lynx_delete_thread_callback): Remove.
5213 (lynx_mourn): Use for_each_thread.
5214
5215 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5216
5217 * regcache.c (regcache_invalidate_one): Remove.
5218 (regcache_invalidate_pid): use for_each_thread.
5219
5220 2017-11-26 Tom Tromey <tom@tromey.com>
5221
5222 * linux-low.c (linux_create_inferior): Update.
5223
5224 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
5225
5226 * spu-low.c (spu_create_inferior): Fix typo in argument name.
5227
5228 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5229
5230 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
5231 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5232 * linux-aarch64-tdesc-selftest.c: New file.
5233 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5234
5235 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5236
5237 * configure.srv: Add new file.
5238 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5239 * linux-aarch64-tdesc-selftest.c: New file.
5240 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
5241
5242 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5243
5244 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
5245 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5246 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
5247
5248 2017-11-24 Alan Hayward <alan.hayward@arm.com>
5249
5250 * configure.srv: Add new files.
5251 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5252 aarch64_linux_read_description.
5253 * linux-aarch64-low.c (aarch64_linux_read_description):
5254 Merge with aarch64_arch_setup.
5255 (aarch64_arch_setup): Call aarch64_linux_read_description.
5256 * linux-aarch64-tdesc.c: New file.
5257 * linux-aarch64-tdesc.h: New file.
5258
5259 2017-11-24 Yao Qi <yao.qi@linaro.org>
5260
5261 * configure.srv: Set $srv_regobj for tic6x-linux.
5262 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
5263 (tic6x_read_description): Move some code to tic6x_arch_setup.
5264 (tic6x_tdesc_test): New function.
5265 (initialize_low_arch): Call selftests::register_test.
5266
5267 2017-11-22 Yao Qi <yao.qi@linaro.org>
5268
5269 * remote-utils.c (prepare_resume_reply): Use memcpy.
5270
5271 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5272
5273 * linux-low.c (kill_one_lwp_callback): Return void, take
5274 argument directly, don't filter on pid.
5275 (linux_kill): Use for_each_thread.
5276
5277 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5278
5279 * linux-low.c (need_step_over_p): Return bool, remove dummy
5280 argument.
5281 (linux_resume, proceed_all_lwps): Use find_thread.
5282
5283 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5284
5285 * linux-low.c (resume_status_pending_p): Return bool, remove
5286 flag_p argument.
5287 (linux_resume): Use find_thread.
5288
5289 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5290
5291 * linux-low.c (struct thread_resume_array): Remove.
5292 (linux_set_resume_request): Return void, take arguments
5293 directly.
5294 (linux_resume): Use for_each_thread.
5295
5296 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5297
5298 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
5299 return bool, remove data argument.
5300 (linux_stabilize_threads): Use find_thread.
5301
5302 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5303
5304 * linux-low.c (unsuspend_one_lwp): Remove.
5305 (unsuspend_all_lwps): Use for_each_thread, inline code from
5306 unsuspend_one_lwp.
5307
5308 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5309
5310 * gdbthread.h (find_thread): Add overload with ptid_t filter.
5311 * linux-low.c (struct iterate_over_lwps_args): Remove.
5312 (iterate_over_lwps_filter): Remove.
5313 (iterate_over_lwps): Use find_thread.
5314
5315 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5316
5317 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
5318 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5319 code from reset_lwp_ptrace_options_callback.
5320
5321 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5322
5323 * linux-arm-low.c (struct update_registers_data): Remove.
5324 (update_registers_callback): Return void, take arguments
5325 directly, don't check thread's pid.
5326 (arm_insert_point, arm_remove_point): Use for_each_thread.
5327
5328 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5329
5330 * win32-low.c (continue_one_thread): Return void, take argument
5331 directly.
5332 (child_continue): Use for_each_thread.
5333
5334 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5335
5336 * win32-i386-low.c (update_debug_registers_callback): Rename
5337 to ...
5338 (update_debug_registers): ... this, return void, remove pid_p arg.
5339 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5340
5341 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5342
5343 * inferiors.h (struct process_info): Add constructor, initialize
5344 fields..
5345 <syscalls_to_catch>: Change type to std::vector<int>.
5346 * inferiors.c (add_process): Allocate process_info with new.
5347 (remove_process): Free process_info with delete.
5348 * linux-low.c (handle_extended_wait): Adjust.
5349 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5350 * server.c (handle_general_set): Adjust.
5351
5352 2017-11-16 Pedro Alves <palves@redhat.com>
5353
5354 * remote-utils.c (remote_close): Block SIGIO signals instead of
5355 uninstalling the SIGIO handler.
5356
5357 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5358
5359 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5360
5361 2017-11-16 Yao Qi <yao.qi@linaro.org>
5362
5363 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5364 (tic6x_store_gregset): Likewise.
5365 (tic6x_usrregs_info): Move it up.
5366
5367 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5368
5369 * Makefile.in: Update arch rules.
5370 * configure.srv: Explicitly mark arch/ files.
5371
5372 2017-11-13 Andreas Schwab <schwab@suse.de>
5373
5374 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5375 function.
5376 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5377
5378 2017-11-06 Pedro Alves <palves@redhat.com>
5379
5380 * config.in, configure: Regenerate.
5381
5382 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5383
5384 * target.c (struct thread_search): Remove.
5385 (thread_search_callback): Remove.
5386 (prepare_to_access_memory): Use for_each_thread instead of
5387 find_inferior. Inline code from thread_search_callback.
5388
5389 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5390
5391 * server.c (struct visit_actioned_threads_data): Remove.
5392 (visit_actioned_threads): Change prototype to take arguments
5393 directly.
5394 (resume): Use find_thread instead of find_inferior.
5395
5396 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5397
5398 * server.c (queue_stop_reply_callback): Change prototype, return
5399 void.
5400 (find_status_pending_thread_callback): Remove.
5401 (handle_status): Replace find_inferior with find_thread and
5402 for_each_thread.
5403
5404 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5405
5406 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5407 with REGNO.
5408 (aarch64_store_gregset): Likewise.
5409 (aarch64_fill_fpregset): Likewise.
5410 (aarch64_store_fpregset): Likewise.
5411
5412 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5413
5414 * gdbthread.h (find_thread, for_each_thread): New functions.
5415 * inferiors.c (thread_of_pid): Remove.
5416 (find_any_thread_of_pid): Use find_thread.
5417 * linux-low.c (num_lwps): Use for_each_thread.
5418
5419 2017-10-17 Yao Qi <yao.qi@linaro.org>
5420
5421 * Makefile.in: Remove one rule.
5422 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5423
5424 2017-10-17 Yao Qi <yao.qi@linaro.org>
5425
5426 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5427 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5428
5429 2017-10-17 Yao Qi <yao.qi@linaro.org>
5430
5431 * configure.srv: Rename arm.o with arch/arm.o.
5432
5433 2017-10-17 Yao Qi <yao.qi@linaro.org>
5434
5435 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5436 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5437 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5438 (arch-i386.o, arch-amd64.o): Remove rules.
5439 (arch/%.o): New rule.
5440 Update POSTCOMPILE and COMPILE.pre.
5441 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5442 * configure: Re-generated.
5443 * configure.srv: Replace arch-i386.o with arch/i386.o.
5444 Replace arch-amd64.o with arch/amd64.o.
5445
5446 2017-10-16 Yao Qi <yao.qi@linaro.org>
5447
5448 * configure: Regenerated.
5449
5450 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5451
5452 * inferiors.h: (struct inferior_list): Remove.
5453 (struct inferior_list_entry); Remove.
5454 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5455 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5456 get_first_inferior): Remove.
5457 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5458 find_inferior_id, find_inferior_in_random): Change signature.
5459 * inferiors.c (all_threads): Change type to
5460 std::list<thread_info *>.
5461 (get_thread): Remove macro.
5462 (find_inferior, find_inferior_id): Change signature, implement
5463 using find_thread.
5464 (find_inferior_in_random): Change signature, implement using
5465 find_thread_in_random.
5466 (for_each_inferior, for_each_inferior_with_data): Change
5467 signature, implement using for_each_thread.
5468 (add_inferior_to_list, remove_inferior): Remove.
5469 (add_thread, get_first_thread, thread_of_pid,
5470 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5471 (get_first_inferior, one_inferior_p, clear_inferior_list):
5472 Remove.
5473 (clear_inferiors, get_thread_process): Update.
5474 * gdbthread.h: Include <list>.
5475 (struct thread_info) <entry>: Remove field.
5476 <id>: New field.
5477 (all_threads): Change type to std::list<thread_info *>.
5478 (get_first_inferior): Add doc.
5479 (find_thread, for_each_thread, find_thread_in_random): New
5480 functions.
5481 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5482 * linux-arm-low.c (update_registers_callback): Update.
5483 * linux-low.c (second_thread_of_pid_p): Update.
5484 (kill_one_lwp_callback, linux_detach_lwp_callback,
5485 delete_lwp_callback, status_pending_p_callback, same_lwp,
5486 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5487 iterate_over_lwps, not_stopped_callback,
5488 resume_stopped_resumed_lwps, count_events_callback,
5489 select_singlestep_lwp_callback, select_event_lwp_callback,
5490 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5491 suspend_and_send_sigstop_callback, wait_for_sigstop,
5492 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5493 lwp_running, linux_set_resume_request, resume_status_pending_p,
5494 need_step_over_p, start_step_over, linux_resume_one_thread,
5495 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5496 reset_lwp_ptrace_options_callback): Update.
5497 * linux-mips-low.c (update_watch_registers_callback): Update.
5498 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5499 Update.
5500 (free_register_cache_thread_one): Remove.
5501 (regcache_release): Update.
5502 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5503 handle_qxfer_threads_worker): Update.
5504 (handle_query): Update, use list iterator.
5505 (visit_actioned_threads, handle_pending_status,
5506 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5507 clear_pending_status_callback, set_pending_status_callback,
5508 find_status_pending_thread_callback, handle_status,
5509 process_serial_event): Update.
5510 * target.c (thread_search_callback): Update.
5511 * thread-db.c (thread_db_get_tls_address): Update.
5512 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5513 Update.
5514 * win32-i386-low.c (update_debug_registers_callback): Update.
5515 * win32-low.c (delete_thread_info, child_delete_thread,
5516 continue_one_thread, suspend_one_thread,
5517 get_child_debug_event): Adjust.
5518
5519 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5520
5521 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5522 * inferiors.h: Include <list>.
5523 (struct process_info) <entry>: Remove field.
5524 <pid>: New field.
5525 (pid_of): Change macro to function.
5526 (ptid_of, lwpid_of): Remove macro.
5527 (all_processes): Change type to std::list<process_info *>.
5528 (ALL_PROCESSES): Remove macro.
5529 (for_each_process, find_process): New function.
5530 * inferiors.c (all_processes): Change type to
5531 std::list<process_info *>.
5532 (find_thread_process): Adjust.
5533 (add_process): Likewise.
5534 (remove_process): Likewise.
5535 (find_process_pid): Likewise.
5536 (get_first_process): Likewise.
5537 (started_inferior_callback): Remove.
5538 (have_started_inferiors_p): Adjust.
5539 (attached_inferior_callback): Remove.
5540 (have_attached_inferiors_p): Adjust.
5541 * linux-low.c (check_zombie_leaders): Likewise.
5542 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5543 (x86_linux_update_xmltarget): Adjust.
5544 * server.c (handle_query): Likewise.
5545 (gdb_reattached_process): Remove.
5546 (handle_status): Adjust.
5547 (kill_inferior_callback): Likewise.
5548 (detach_or_kill_inferior): Remove.
5549 (print_started_pid): Likewise.
5550 (print_attached_pid): Likewise.
5551 (detach_or_kill_for_exit): Update.
5552 (process_serial_event): Likewise.
5553 * linux-arm-low.c (arm_new_fork): Likewise.
5554
5555 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5556
5557 * dll.h: Include <list>.
5558 (struct dll_info): Add constructor.
5559 <entry>: Remove field.
5560 (all_dlls): Change type to std::list<dll_info>.
5561 * dll.c: Include <algorithm>.
5562 (get_dll): Remove macro.
5563 (all_dlls): Change type to std::list<dll_info *>.
5564 (free_one_dll): Remove.
5565 (match_dll): Likewise.
5566 (loaded_dll): Adjust.
5567 (unloaded_dll): Adjust to all_dlls type change, use
5568 std::find_if. Inline code from match_dll.
5569 (clear_dlls): Adjust to all_dlls type change.
5570 * server.c (emit_dll_description): Remove.
5571 (handle_qxfer_libraries): Adjust to all_dlls type change,
5572 integrate emit_dll_description's functionality.
5573
5574 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5575
5576 * linux-low.h (struct linux_target_ops) <delete_process>: New
5577 field.
5578 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5579 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5580 (struct linux_target_ops): Add delete_process callback.
5581 * linux-arm-low.c (arm_delete_process): New.
5582 (struct linux_target_ops): Add delete_process callback.
5583 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5584 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5585 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5586 * linux-mips-low.c (mips_linux_delete_process): New.
5587 (struct linux_target_ops): Add delete_process callback.
5588 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5589 * linux-s390-low.c (struct linux_target_ops): Likewise.
5590 * linux-sh-low.c (struct linux_target_ops): Likewise.
5591 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5592 * linux-tile-low.c (struct linux_target_ops): Likewise.
5593 * linux-x86-low.c (x86_linux_delete_process): New.
5594 (struct linux_target_ops): Add delete_process callback.
5595 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5596
5597 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5598
5599 * linux-aarch64-low.c (the_low_target): Add thread delete
5600 callback.
5601 * linux-arm-low.c (arm_delete_thread): New function.
5602 (the_low_target): Add thread delete callback.
5603 * linux-bfin-low.c (the_low_target): Likewise.
5604 * linux-crisv32-low.c (the_low_target): Likewise.
5605 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5606 set.
5607 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5608 field.
5609 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5610 * linux-mips-low.c (mips_linux_delete_thread): New function.
5611 (the_low_target): Add thread delete callback.
5612 * linux-ppc-low.c (the_low_target): Likewise.
5613 * linux-s390-low.c (the_low_target): Likewise.
5614 * linux-sh-low.c (the_low_target): Likewise.
5615 * linux-tic6x-low.c (the_low_target): Likewise.
5616 * linux-tile-low.c (the_low_target): Likewise.
5617 * linux-x86-low.c (the_low_target): Likewise.
5618 * linux-xtensa-low.c (the_low_target): Likewise.
5619
5620 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5621
5622 * win32-low.c: Include "common-inferior.h".
5623
5624 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5625
5626 * inferiors.c (set_inferior_cwd): New function.
5627 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5628 (handle_query): Inform that QSetWorkingDir is supported.
5629 * win32-low.c (create_process): Pass the inferior's cwd to
5630 CreateProcess.
5631
5632 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5633
5634 * inferiors.c (current_inferior_cwd): New global variable.
5635 (get_inferior_cwd): New function.
5636 * inferiors.h (struct process_info) <cwd>: New field.
5637
5638 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5639
5640 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5641 (OBS): Add gdb_tilde_expand.o.
5642
5643 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5644
5645 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5646 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5647
5648 2017-09-29 Pedro Alves <palves@redhat.com>
5649
5650 * ax.c (gdb_parse_agent_expr): Constify.
5651 * ax.h (gdb_parse_agent_expr): Constify.
5652 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5653 Constify.
5654 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5655 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5656 * remote-utils.h (read_ptid): Constify.
5657 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5658 (process_point_options, process_serial_event): Constify.
5659 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5660 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5661 (cmd_qtbuffer): Constify.
5662
5663 2017-09-29 Pedro Alves <palves@redhat.com>
5664
5665 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5666 fails.
5667
5668 2017-09-29 Pedro Alves <palves@redhat.com>
5669
5670 * linux-low.c (handle_extended_wait): Pass parent thread instead
5671 of process to thread_db_notice_clone.
5672 * linux-low.h (thread_db_notice_clone): Replace parent process
5673 parameter with parent thread parameter.
5674 * thread-db.c (find_one_thread): Add comment.
5675 (thread_db_notice_clone): Replace parent process parameter with
5676 parent thread parameter. Temporarily switch to the parent thread.
5677
5678 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5679
5680 * gdbthread.h: Include "common-gdbthread.h".
5681 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5682 "if" when validating the ptid.
5683 * remote-utils.c: Include "gdbthread.h".
5684 (prepare_resume_reply): Use "switch_to_thread".
5685 * target.c (done_accessing_memory): Likewise.
5686
5687 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5688
5689 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5690 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5691 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5692 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5693 s390x-gs-linux64-ipa.o to ipa_obj.
5694 * linux-s390-low.c (HWCAP_S390_GS): New define.
5695 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5696 New functions.
5697 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5698 (s390_arch_setup): Check for guarded-storage support and choose
5699 appropriate tdesc.
5700 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5701 init_registers_s390x_gs_linux64.
5702 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5703 enum value.
5704 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5705 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5706
5707 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5708
5709 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5710
5711 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5712
5713 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5714 (thread_db_thread_handle): Declare.
5715 * linux-low.c (linux_target_ops): Initialize thread_handle.
5716 * server.c (handle_qxfer_threads_worker): Add support for
5717 "handle" attribute.
5718 * target.h (struct target_ops): Add new function pointer,
5719 thread_handle.
5720 (target_thread_handle): Define.
5721 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5722 field in lwp.
5723 (thread_db_thread_handle): New function.
5724
5725 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5726
5727 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5728 * linux-low.h (thread_db_notice_clone): Declare.
5729 * thread-db.c (thread_db_notice_clone): New function.
5730
5731 2017-09-21 Pedro Alves <palves@redhat.com>
5732
5733 * server.c (gdb_read_memory, handle_status, process_serial_event)
5734 (handle_serial_event, handle_target_event): Adjust to
5735 set_desired_thread prototype change.
5736 * target.c (set_desired_thread): Remove 'use_general' parameter
5737 and adjust.
5738 * target.h (set_desired_thread): Remove 'use_general' parameter.
5739
5740 2017-09-20 Tom Tromey <tom@tromey.com>
5741
5742 * target.c (target_terminal::terminal_state): Define.
5743 (target_terminal::init): Rename from target_terminal_init.
5744 (target_terminal::inferior): Rename from
5745 target_terminal_inferior.
5746 (target_terminal::ours): Rename from target_terminal_ours.
5747 (target_terminal::ours_for_output, target_terminal::info): New.
5748
5749 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5750
5751 * server.c (accumulate_file_name_length): Remove.
5752 (emit_dll_description): Adjust to std::string change.
5753 (handle_qxfer_libraries): Use std::string to hold document.
5754
5755 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5756
5757 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5758 return type of xml_escape_text.
5759 * server.c (emit_dll_description): Likewise.
5760
5761 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5762
5763 * server.c (captured_main): Accept argument for --selftest.
5764 Update run_tests call.
5765 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5766 when registering selftests.
5767
5768 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5769
5770 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5771 instead of "VEC" for "target_desc.reg_defs".
5772 (regcache_cpy): Likewise.
5773 (registers_to_string): Likewise.
5774 (registers_from_string): Likewise.
5775 (find_regno): Likewise.
5776 (supply_regblock): Likewise.
5777 (regcache_raw_read_unsigned): Likewise.
5778 * tdesc.c (init_target_desc): Likewise.
5779 (tdesc_create_reg): Likewise.
5780 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5781 (struct target_desc) <reg_defs>: Convert to "std::vector".
5782 (target_desc): Do not initialize "reg_defs".
5783 (~target_desc): Update code to use "std::vector" instead of "VEC"
5784 for "target_desc.reg_defs".
5785 (operator==): Likewise.
5786
5787 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5788
5789 * inferiors.h (thread_to_gdb_id): Remove.
5790 * inferiors.c (thread_to_gdb_id): Remove.
5791 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5792 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5793 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5794 Likewise.
5795 * nto-low.c (nto_fetch_registers, nto_store_registers,
5796 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5797
5798 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5799
5800 * inferiors.h (gdb_id_to_thread_id): Remove.
5801 * inferiors.c (gdb_id_to_thread_id): Remove.
5802 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5803 removal. Move pid declaration closer to where it's used.
5804
5805 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5806
5807 * server.c (handle_detach): New function.
5808 (process_serial_event): Move code out, call handle_detach.
5809
5810 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5811
5812 * server.c (require_running): Rename to ...
5813 (require_running_or_return): ... this ...
5814 (require_running_or_break): ... and this.
5815 (handle_query, process_serial_event): Adjust.
5816
5817 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5818
5819 * linux-low.c (linux_set_resume_request): Remove unused
5820 variables.
5821
5822 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * server.c (first_thread_of): Remove.
5825 (process_serial_event): Replace usage of first_thread_of with
5826 find_any_thread_of_pid.
5827 * tracepoint.c (same_process_p): Remove.
5828 (gdb_agent_about_to_close): Replace usage of same_process_p with
5829 find_any_thread_of_pid.
5830 * linux-x86-low.c (same_process_callback): Remove.
5831 (x86_arch_setup_process_callback): Replace usage of
5832 same_process_callback with find_any_thread_of_pid.
5833 * thread-db.c (any_thread_of): Remove.
5834 (switch_to_process): Replace usage of any_thread_of with
5835 find_any_thread_of_pid.
5836 * inferiors.c (thread_pid_matches_callback): Remove.
5837 (find_thread_process): Adjust to use find_any_thread_of_pid.
5838
5839 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5840
5841 * regcache.c (get_thread_regcache): Guard calls to "memset"
5842 with "!VEC_empty".
5843
5844 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5845
5846 * linux-low.c (handle_extended_wait): Use
5847 "allocate_target_description" instead of "XNEW".
5848 * linux-x86-low.c (initialize_low_arch): Likewise.
5849
5850 2017-09-05 Yao Qi <yao.qi@linaro.org>
5851
5852 * configure.srv (srv_i386_regobj): Remove.
5853 (srv_amd64_regobj): Remove.
5854 (srv_regobj): Set it to "" for x86 non-linux targets.
5855 * linux-x86-tdesc.c (i386_linux_read_description):
5856 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5857 (init_registers_i386): Remove the declaration.
5858 (tdesc_i386): Remove the declaration.
5859 (lynx_i386_arch_setup): Call i386_create_target_description.
5860 * nto-x86-low.c: Likewise.
5861 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5862 [!__x86_64__]: include arch/i386.h.
5863 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5864
5865 2017-09-05 Yao Qi <yao.qi@linaro.org>
5866
5867 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5868 i386/amd64-XXX-linux from it.
5869
5870 2017-09-05 Yao Qi <yao.qi@linaro.org>
5871
5872 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5873 false.
5874 (ipa_amd64_linux_regobj): Remove.
5875 (ipa_x32_linux_regobj): Remove.
5876
5877 2017-09-05 Yao Qi <yao.qi@linaro.org>
5878
5879 * Makefile.in (arch-amd64.o): New rule.
5880 * configure.srv: Append arch-amd64.o.
5881 * linux-amd64-ipa.c: Include common/x86-xstate.h.
5882 (get_ipa_tdesc): Call amd64_linux_read_description.
5883 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
5884 and init_registers_amd64_XXX.
5885 * linux-x86-low.c (x86_linux_read_description): Call
5886 amd64_linux_read_description.
5887 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
5888 (initialize_low_arch): Don't call init_registers_x32_XXX and
5889 init_registers_amd64_XXX.
5890 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
5891 and tdesc_amd64_XXX.
5892 [__x86_64__] (amd64_tdesc_test): New function.
5893 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
5894 and init_registers_amd64_XXX.
5895 * linux-x86-tdesc.c: Include arch/amd64.h.
5896 (xcr0_to_tdesc_idx): New function.
5897 (i386_linux_read_description): New function.
5898 (amd64_get_ipa_tdesc_idx): New function.
5899 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
5900 (amd64_get_ipa_tdesc): Declare.
5901
5902 2017-09-05 Yao Qi <yao.qi@linaro.org>
5903
5904 * configure.srv (srv_i386_linux_xmlfiles): Remove
5905 i386/i386-XXX-linux.xml from it.
5906
5907 2017-09-05 Yao Qi <yao.qi@linaro.org>
5908
5909 * configure.srv: Set srv_i386_linux_regobj empty if $development
5910 is false.
5911 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
5912 initialize_low_tdesc.
5913 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
5914 with #if initialize_low_tdesc.
5915 * linux-x86-tdesc-selftest.c: New file.
5916 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
5917
5918 2017-09-05 Yao Qi <yao.qi@linaro.org>
5919
5920 * Makefile.in (arch-i386.o): New rule.
5921 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
5922 (x86_64-*-linux*): Likewise.
5923 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
5924 include arch/i386.h.
5925 (i386_linux_read_description): Remove code and call
5926 i386_create_target_description.
5927 * tdesc.c (allocate_target_description): New function.
5928 * tdesc.h (set_tdesc_architecture): Remove declaration.
5929 (set_tdesc_osabi): Likewise.
5930
5931 2017-09-05 Yao Qi <yao.qi@linaro.org>
5932
5933 * linux-x86-tdesc.c: Don't include <inttypes.h>.
5934 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5935 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
5936 .xmltarget.
5937 * server.c (get_features_xml): Call tdesc_get_features_xml.
5938 * tdesc.c (set_tdesc_architecture): New function.
5939 (set_tdesc_osabi): New function.
5940 (tdesc_get_features_xml): New function.
5941 (tdesc_create_feature): Add an argument.
5942 * tdesc.h (struct target_desc) <features>: New field.
5943 <arch, osabi>: New field.
5944 (~target_desc): xfree features, arch, and osabi.
5945 (target_desc::oerator==): Don't compare .xmltarget.
5946 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
5947 (set_tdesc_osabi): Likewise.
5948 (tdesc_get_features_xml): Likewise.
5949
5950 2017-09-05 Yao Qi <yao.qi@linaro.org>
5951
5952 * linux-x86-tdesc.c: Include selftest.h.
5953 (i386_tdesc_test): New function.
5954 (initialize_low_tdesc): Call selftests::register_test.
5955 * tdesc.h: Include regdef.h.
5956 (target_desc): Override operator == and !=.
5957
5958 2017-09-05 Yao Qi <yao.qi@linaro.org>
5959
5960 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
5961 (ipa_obj): Likewise.
5962 * linux-i386-ipa.c: Include common/x86-xstate.h
5963 (get_ipa_tdesc): Call i386_linux_read_description.
5964 (initialize_low_tracepoint): Don't call init_registers_XXX
5965 functions, call initialize_low_tdesc instead.
5966 * linux-x86-low.c (x86_linux_read_description): Call
5967 i386_linux_read_description.
5968 (initialize_low_arch): Don't call init_registers_i386_XXX
5969 functions, call initialize_low_tdesc.
5970 * linux-x86-tdesc.c: New file.
5971 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
5972 (i386_get_ipa_tdesc_idx): Declare.
5973 (i386_get_ipa_tdesc): Declare.
5974 (initialize_low_tdesc): Declare.
5975
5976 2017-09-05 Yao Qi <yao.qi@linaro.org>
5977
5978 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
5979 instead of 0.
5980
5981 2017-09-05 Yao Qi <yao.qi@linaro.org>
5982
5983 * Makefile.in (IPA_OBJS): Add vec-ipa.o
5984 * regcache.c (get_thread_regcache): Use VEC_length.
5985 (init_register_cache): Likewise.
5986 (regcache_cpy): Likewise.
5987 (registers_to_string): Iterate reg_defs via VEC_iterate.
5988 (find_regno): Likewise.
5989 (find_register_by_number): Use VEC_index.
5990 (register_size): Call find_register_by_number.
5991 (register_data): Call find_register_by_number.
5992 (supply_regblock): Use VEC_length.
5993 (regcache_raw_read_unsigned): Likewise.
5994 * tdesc.c (init_target_desc): Iterate reg_defs via
5995 VEC_iterate.
5996 (default_description): Update initializer.
5997 (copy_target_description): Don't update field num_registers.
5998 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
5999 <num_registers>: Remove.
6000
6001 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6002
6003 * Makefile.in (.SECONDARY): Define target.
6004
6005 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6006
6007 * linux-low.c (linux_wait_1): Adjust.
6008 * server.c (queue_stop_reply_callback): Adjust.
6009
6010 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6011
6012 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6013 QEnvironmentUnset and QEnvironmentReset packets.
6014 (handle_query): Inform remote that QEnvironmentHexEncoded,
6015 QEnvironmentUnset and QEnvironmentReset are supported.
6016
6017 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6018
6019 * inferiors.h (inferior_target_data): Rename to ...
6020 (thread_target_data): ... this.
6021 (inferior_regcache_data): Rename to ...
6022 (thread_regcache_data): ... this.
6023 (set_inferior_regcache_data): Rename to ...
6024 (set_thread_regcache_data): ... this.
6025 * inferiors.c (inferior_target_data): Rename to ...
6026 (thread_target_data): ... this.
6027 (inferior_regcache_data): Rename to ...
6028 (thread_regcache_data): ... this.
6029 (set_inferior_regcache_data): Rename to ...
6030 (set_thread_regcache_data): ... this.
6031 (free_one_thread): Update.
6032 * linux-low.h (get_thread_lwp): Update.
6033 * regcache.c (get_thread_regcache): Update.
6034 (regcache_invalidate_thread): Update.
6035 (free_register_cache_thread): Update.
6036 * win32-i386-low.c (update_debug_registers_callback): Update.
6037 (win32_get_current_dr): Update.
6038 * win32-low.c (thread_rec): Update.
6039 (delete_thread_info): Update.
6040 (continue_one_thread): Update.
6041 (suspend_one_thread): Update.
6042
6043 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6044
6045 * inferiors.c (set_inferior_target_data): Remove.
6046 * inferiors.h (set_inferior_target_data): Remove.
6047
6048 2017-08-18 Yao Qi <yao.qi@linaro.org>
6049
6050 * Makefile.in (OBS): Add selftest.o.
6051 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6052 * configure, config.in: Re-generated.
6053 * server.c: Include common/sefltest.h.
6054 (captured_main): Handle option --selftest.
6055
6056 2017-08-09 Yao Qi <yao.qi@linaro.org>
6057
6058 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6059 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6060 i386-avx-mpx.o and i386-mmx.o.
6061 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6062 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6063 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6064 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6065 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6066 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6067 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6068 i386/amd64-avx-mpx.xml.
6069
6070 2017-08-09 Yao Qi <yao.qi@linaro.org>
6071
6072 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6073 and x32-avx-avx512.o.
6074 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6075 i386/x32-avx-avx512.xml.
6076
6077 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6078
6079 * tracepoint.h (enum class fast_tpoint_collect_result): New
6080 enumeration.
6081 (fast_tracepoint_collecting): Change return type to
6082 fast_tpoint_collect_result.
6083 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6084 * linux-low.h: Include tracepoint.h.
6085 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6086 fast_tpoint_collect_result.
6087 * linux-low.c (handle_tracepoints): Adjust.
6088 (linux_fast_tracepoint_collecting): Change return type to
6089 fast_tpoint_collect_result.
6090 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6091 linux_wait_1, stuck_in_jump_pad_callback,
6092 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6093 proceed_one_lwp): Adjust to type change.
6094
6095 2017-07-10 Yao Qi <yao.qi@linaro.org>
6096
6097 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6098
6099 2017-06-29 Yao Qi <yao.qi@linaro.org>
6100
6101 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6102 Remove.
6103 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6104
6105 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6106
6107 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6108
6109 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6110
6111 * linux-low.c (linux_create_inferior): Adjust code to access the
6112 environment information via 'gdb_environ' class.
6113 * lynx-low.c (lynx_create_inferior): Likewise.
6114 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6115 (get_environ): Return a pointer to 'our_environ'.
6116 (captured_main): Initialize 'our_environ'.
6117 * server.h (get_environ): Adjust prototype.
6118 * spu-low.c (spu_create_inferior): Adjust code to access the
6119 environment information via 'gdb_environ' class.
6120
6121 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6122
6123 * linux-low.c (linux_read_memory, linux_write_memory): Remove
6124 usage of "register" keyword.
6125
6126 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6127
6128 * configure: Re-generate.
6129
6130 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6131
6132 * configure: Re-generate.
6133
6134 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * Makefile.in (COMPILE.pre): Add "-x c++".
6137
6138 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
6139
6140 * fork-child.c: Conditionally include <signal.h>.
6141
6142 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6143
6144 * server.c (handle_general_set): Handle new packet
6145 "QStartupWithShell".
6146 (handle_query): Add "QStartupWithShell" to the list of supported
6147 packets.
6148 (gdbserver_usage): Add help text explaining the
6149 new "--startup-with-shell" and "--no-startup-with-shell" CLI
6150 options.
6151 (captured_main): Recognize and act upon the presence of the new
6152 CLI options.
6153
6154 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6155 Pedro Alves <palves@redhat.com>
6156
6157 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
6158 * configure: Regenerate.
6159 * configure.srv (srv_linux_obj): Add "fork-child.o" and
6160 "fork-inferior.o".
6161 (i[34567]86-*-lynxos*): Likewise.
6162 (spu*-*-*): Likewise.
6163 * fork-child.c: New file.
6164 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
6165 and "environ.h".
6166 (linux_ptrace_fun): New function.
6167 (linux_create_inferior): Adjust function prototype to reflect
6168 change on "target.h". Adjust function code to use
6169 "fork_inferior".
6170 (linux_request_interrupt): Delete "signal_pid".
6171 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6172 (lynx_ptrace_fun): New function.
6173 (lynx_create_inferior): Adjust function prototype to reflect
6174 change on "target.h". Adjust function code to use
6175 "fork_inferior".
6176 * nto-low.c (nto_create_inferior): Adjust function prototype and
6177 code to reflect change on "target.h". Update comments.
6178 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
6179 "common-terminal.h" and "environ.h".
6180 (terminal_fd): Moved to fork-child.c.
6181 (old_foreground_pgrp): Likewise.
6182 (restore_old_foreground_pgrp): Likewise.
6183 (last_status): Make it global.
6184 (last_ptid): Likewise.
6185 (our_environ): New variable.
6186 (startup_with_shell): Likewise.
6187 (program_name): Likewise.
6188 (program_argv): Rename to...
6189 (program_args): ...this.
6190 (wrapper_argv): New variable.
6191 (start_inferior): Delete function.
6192 (get_exec_wrapper): New function.
6193 (get_exec_file): Likewise.
6194 (get_environ): Likewise.
6195 (prefork_hook): Likewise.
6196 (post_fork_inferior): Likewise.
6197 (postfork_hook): Likewise.
6198 (postfork_child_hook): Likewise.
6199 (handle_v_run): Update code to deal with arguments coming from the
6200 remote host. Update calls from "start_inferior" to
6201 "create_inferior".
6202 (captured_main): Likewise. Initialize environment variable. Call
6203 "have_job_control".
6204 * server.h (post_fork_inferior): New prototype.
6205 (get_environ): Likewise.
6206 (last_status): Declare.
6207 (last_ptid): Likewise.
6208 (signal_pid): Likewise.
6209 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
6210 (spu_ptrace_fun): New function.
6211 (spu_create_inferior): Adjust function prototype to reflect change
6212 on "target.h". Adjust function code to use "fork_inferior".
6213 * target.c (target_terminal_init): New function.
6214 (target_terminal_inferior): Likewise.
6215 (target_terminal_ours): Likewise.
6216 * target.h: Include <vector>.
6217 (struct target_ops) <create_inferior>: Update prototype.
6218 (create_inferior): Update macro.
6219 * utils.c (gdb_flush_out_err): New function.
6220 * win32-low.c (win32_create_inferior): Adjust function prototype
6221 and code to reflect change on "target.h".
6222
6223 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6224
6225 * inferiors.c (switch_to_thread): New function.
6226
6227 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6228
6229 * Makefile.in (SFILE): Add "common/job-control.c".
6230 (OBS): Add "job-control.o".
6231
6232 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6233
6234 * Makefile: Remove "@host_makefile_frag@".
6235
6236 2017-05-05 Pedro Alves <palves@redhat.com>
6237
6238 * configure: Regenerate.
6239
6240 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6241
6242 * configure: Regenerate.
6243
6244 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6245
6246 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
6247 software_single_step change of return type to
6248 std::vector<CORE_ADDR>.
6249 * linux-low.c (install_software_single_step_breakpoints):
6250 Likewise.
6251 * linux-low.h (install_software_single_step_breakpoints):
6252 Likewise.
6253
6254 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6255
6256 * remote-utils.c: Include "gdb_termios.h" instead of
6257 "terminal.h".
6258 * terminal.h: Delete file.
6259
6260 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6261
6262 * server.c: Include <vector>.
6263 <program_argv, wrapper_argv>: Convert to std::vector.
6264 (start_inferior): Rewrite function to use C++.
6265 (handle_v_run): Likewise. Update code that calculates the argv
6266 based on the vRun packet; use C++.
6267 (captured_main): Likewise.
6268
6269 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
6270
6271 * server.c (handle_v_cont): Initialize thread_resume::thread
6272 with null_ptid.
6273
6274 2017-04-05 Pedro Alves <palves@redhat.com>
6275
6276 * configure: Regenerate.
6277
6278 2017-04-05 Pedro Alves <palves@redhat.com>
6279
6280 * gdbreplay.c (sync_error): Constify.
6281 * linux-x86-low.c (push_opcode): Constify.
6282
6283 2017-04-05 Pedro Alves <palves@redhat.com>
6284
6285 * win32-low.c (get_child_debug_event)
6286 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
6287 Report TARGET_WAITKIND_SPURIOUS instead.
6288
6289 2017-04-05 Pedro Alves <palves@redhat.com>
6290
6291 * remote-utils.c (remote_prepare, remote_open): Constify.
6292 * remote-utils.h (remote_prepare, remote_open): Constify.
6293 * server.c (captured_main): Constify 'port' handling.
6294
6295 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
6296
6297 * Makefile.in (clean): Clear .deps.
6298
6299 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6300
6301 * .gitignore: Remove generated files, replace with wildcard.
6302 * (clean): Replace removal of generated files with wildcard.
6303 (version.c): Replace with...
6304 (version-generated.c): ...this.
6305 (xml-builtin.c): Replace with...
6306 (xml-builtin-generated.c): ...this.
6307 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
6308 (%.c: *regformats*): Replace with...
6309 (%-generated.c: *regformats*): ...this.
6310
6311 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6312
6313 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
6314 (xtensa_fill_gregset): Call collect_register_by_name for
6315 threadptr register.
6316 (xtensa_store_gregset): Call supply_register_by_name for
6317 threadptr register.
6318
6319 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
6320
6321 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
6322 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6323 (xtensa_store_gregset): Call supply_register for all registers in
6324 a0_regnum..a0_regnum + C0_NREGS range.
6325
6326 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6327
6328 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6329 (ax-ipa.o: ax.c): Remove.
6330 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6331 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6332 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6333 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6334 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6335
6336 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6337
6338 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6339 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6340 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6341 (errors-ipa.o: ../common/errors.c): Remove.
6342 (format-ipa.o: ../common/format.c): Remove.
6343 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6344
6345 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6346
6347 * Makefile.in (%-ipa.o: %.c): New rule.
6348 (tracepoint-ipa.o: tracepoint.c): Remove.
6349 (utils-ipa.o: utils.c): Remove.
6350 (remote-utils-ipa.o: remote-utils.c): Remove.
6351 (regcache-ipa.o: regcache.c): Remove.
6352 (i386-linux-ipa.o: i386-linux.c): Remove.
6353 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6354 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6355 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6356 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6357 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6358 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6359 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6360 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6361 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6362 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6363 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6364 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6365 (aarch64-ipa.o: aarch64.c): Remove.
6366 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6367 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6368 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6369 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6370 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6371 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6372 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6373 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6374 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6375 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6376 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6377 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6378 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6379 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6380 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6381 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6382 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6383 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6384 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6385 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6386 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6387 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6388 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6389 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6390 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6391 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6392 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6393 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6394 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6395 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6396 (tdesc-ipa.o: tdesc.c): Remove.
6397 (x32-linux-ipa.o: x32-linux.c): Remove.
6398 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6399 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6400
6401 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6402
6403 * Makefile.in (%.o: ../arch/%.c): New rule.
6404 (arm.o: ../arch/arm.c): Remove.
6405 (arm-linux.o: ../arch/arm-linux.c): Remove.
6406 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6407 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6408
6409 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6410
6411 * Makefile.in (%.o: ../nat/%.c): New rule.
6412 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6413 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6414 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6415 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6416 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6417 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6418 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6419 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6420 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6421 (linux-personality.o: ../nat/linux-personality.c): Remove.
6422 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6423 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6424 (x86-linux.o: ../nat/x86-linux.c): Remove.
6425 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6426 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6427
6428 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6429
6430 * Makefile.in (%.o: ../common/%.c): New rule.
6431 (signals.o: ../common/signals.c): Remove.
6432 (print-utils.o: ../common/print-utils.c): Remove.
6433 (rsp-low.o: ../common/rsp-low.c): Remove.
6434 (common-utils.o: ../common/common-utils.c): Remove.
6435 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6436 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6437 (vec.o: ../common/vec.c): Remove.
6438 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6439 (xml-utils.o: ../common/xml-utils.c): Remove.
6440 (ptid.o: ../common/ptid.c): Remove.
6441 (buffer.o: ../common/buffer.c): Remove.
6442 (format.o: ../common/format.c): Remove.
6443 (filestuff.o: ../common/filestuff.c): Remove.
6444 (agent.o: ../common/agent.c): Remove.
6445 (errors.o: ../common/errors.c): Remove.
6446 (environ.o: ../common/environ.c): Remove.
6447 (common-debug.o: ../common/common-debug.c): Remove.
6448 (cleanups.o: ../common/cleanups.c): Remove.
6449 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6450 (fileio.o: ../common/fileio.c): Remove.
6451 (common-regcache.o: ../common/common-regcache.c): Remove.
6452 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6453 (new-op.o: ../common/new-op.c): Remove.
6454 (btrace-common.o: ../common/btrace-common.c): Remove.
6455
6456 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6457
6458 * Makefile.in (%.o: ../target/%.c): New rule.
6459 (waitstatus.o: ../target/waitstatus.c): Remove.
6460
6461 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6462
6463 * Makefile.in
6464 (%.c: ../regformats/%.dat,
6465 (%.c: ../regformats/arm/%.dat,
6466 (%.c: ../regformats/i386/%.dat,
6467 (%.c: ../regformats/rs6000/%.dat): New rules.
6468 (aarch64.c): Remove.
6469 (reg-arm.c): Remove.
6470 (arm-with-iwmmxt.c): Remove.
6471 (arm-with-vfpv2.c): Remove.
6472 (arm-with-vfpv3.c): Remove.
6473 (arm-with-neon.c): Remove.
6474 (reg-bfin.c): Remove.
6475 (reg-cris.c): Remove.
6476 (reg-crisv32.c): Remove.
6477 (i386.c): Remove.
6478 (i386-linux.c): Remove.
6479 (i386-avx.c): Remove.
6480 (i386-avx-linux.c): Remove.
6481 (i386-avx-avx512.c): Remove.
6482 (i386-avx-avx512-linux.c): Remove.
6483 (i386-mpx.c): Remove.
6484 (i386-mpx-linux.c): Remove.
6485 (i386-avx-mpx-avx512-pku.c): Remove.
6486 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6487 (i386-avx-mpx.c): Remove.
6488 (i386-avx-mpx-linux.c): Remove.
6489 (i386-mmx.c): Remove.
6490 (i386-mmx-linux.c): Remove.
6491 (reg-ia64.c): Remove.
6492 (reg-m32r.c): Remove.
6493 (reg-m68k.c): Remove.
6494 (reg-cf.c): Remove.
6495 (mips-linux.c): Remove.
6496 (mips-dsp-linux.c): Remove.
6497 (mips64-linux.c): Remove.
6498 (mips64-dsp-linux.c): Remove.
6499 (nios2-linux.c): Remove.
6500 (powerpc-32.c): Remove.
6501 (powerpc-32l.c): Remove.
6502 (powerpc-altivec32l.c): Remove.
6503 (powerpc-cell32l.c): Remove.
6504 (powerpc-vsx32l.c): Remove.
6505 (powerpc-isa205-32l.c): Remove.
6506 (powerpc-isa205-altivec32l.c): Remove.
6507 (powerpc-isa205-vsx32l.c): Remove.
6508 (powerpc-e500l.c): Remove.
6509 (powerpc-64l.c): Remove.
6510 (powerpc-altivec64l.c): Remove.
6511 (powerpc-cell64l.c): Remove.
6512 (powerpc-vsx64l.c): Remove.
6513 (powerpc-isa205-64l.c): Remove.
6514 (powerpc-isa205-altivec64l.c): Remove.
6515 (powerpc-isa205-vsx64l.c): Remove.
6516 (s390-linux32.c): Remove.
6517 (s390-linux32v1.c): Remove.
6518 (s390-linux32v2.c): Remove.
6519 (s390-linux64.c): Remove.
6520 (s390-linux64v1.c): Remove.
6521 (s390-linux64v2.c): Remove.
6522 (s390-te-linux64.c): Remove.
6523 (s390-vx-linux64.c): Remove.
6524 (s390-tevx-linux64.c): Remove.
6525 (s390x-linux64.c): Remove.
6526 (s390x-linux64v1.c): Remove.
6527 (s390x-linux64v2.c): Remove.
6528 (s390x-te-linux64.c): Remove.
6529 (s390x-vx-linux64.c): Remove.
6530 (s390x-tevx-linux64.c): Remove.
6531 (tic6x-c64xp-linux.c): Remove.
6532 (tic6x-c64x-linux.c): Remove.
6533 (tic6x-c62x-linux.c): Remove.
6534 (reg-sh.c): Remove.
6535 (reg-sparc64.c): Remove.
6536 (reg-spu.c): Remove.
6537 (amd64.c): Remove.
6538 (amd64-linux.c): Remove.
6539 (amd64-avx.c): Remove.
6540 (amd64-avx-linux.c): Remove.
6541 (amd64-avx-avx512.c): Remove.
6542 (amd64-avx-avx512-linux.c): Remove.
6543 (amd64-mpx.c): Remove.
6544 (amd64-mpx-linux.c): Remove.
6545 (amd64-avx-mpx-avx512-pku.c): Remove.
6546 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6547 (amd64-avx-mpx.c): Remove.
6548 (amd64-avx-mpx-linux.c): Remove.
6549 (x32.c): Remove.
6550 (x32-linux.c): Remove.
6551 (x32-avx.c): Remove.
6552 (x32-avx-linux.c): Remove.
6553 (x32-avx-avx512.c): Remove.
6554 (x32-avx-avx512-linux.c): Remove.
6555 (reg-xtensa.c): Remove.
6556 (reg-tilegx.c): Remove.
6557 (reg-tilegx32.c): Remove.
6558
6559 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6560
6561 * Makefile.in (SFILES): Add "common/environ.c".
6562 (OBJS): Add "common/environ.h".
6563
6564 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6565
6566 * configure.ac: Check if the fs_base and gs_base members of
6567 `struct user_regs_struct' exist.
6568 * config.in: Regenerated.
6569 * configure: Likewise.
6570
6571 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6572
6573 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6574 target_read_memory.
6575 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6576 (get_next_pcs_syscall_next_pc): Likewise.
6577
6578 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6579
6580 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6581 * nto-x86-low.c: Likewise.
6582
6583 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6584
6585 * Makefile.in: Include disable-implicit-rules.mk.
6586
6587 2016-11-23 Pedro Alves <palves@redhat.com>
6588
6589 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6590 (debug_vprintf): Use std::chrono::steady_clock instead of
6591 gettimeofday. Use '.' instead of ':'.
6592 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6593 (get_timestamp): Use std::chrono::steady_clock instead of
6594 gettimeofday.
6595
6596 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6597
6598 * Makefile.in: Fix whitespace formatting.
6599
6600 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6601
6602 * Makefile.in (SFILES, OBS): Flatten list and order
6603 alphabetically.
6604
6605 2016-11-23 Pedro Alves <palves@redhat.com>
6606
6607 * event-loop.c (handle_file_event): Use warning.
6608 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6609 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6610 Use warning.
6611
6612 2016-11-23 Pedro Alves <palves@redhat.com>
6613
6614 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6615 output.
6616 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6617 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6618 debug_printf and debug_flush for debug output.
6619 * server.c (handle_general_set): Likewise.
6620 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6621 output.
6622
6623 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6624
6625 * Makefile.in (.c.o): Replace rule with ...
6626 (%.o: %.c): ... this one.
6627
6628 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6629
6630 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6631 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6632 make.
6633 * configure.ac: Remove checks for the make program.
6634 * configure: Re-generate.
6635
6636 2016-10-28 Pedro Alves <palves@redhat.com>
6637
6638 * Makefile.in (CXX_DIALECT): Get from configure.
6639 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6640 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6641 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6642 * config.in: Regenerate.
6643 * configure: Regenerate.
6644
6645 2016-10-27 Yao Qi <yao.qi@linaro.org>
6646
6647 * linux-low.c (linux_supports_range_stepping): Return true if
6648 can_software_single_step return true.
6649
6650 2016-10-27 Yao Qi <yao.qi@linaro.org>
6651
6652 * inferiors.c (find_inferior_in_random): New function.
6653 * inferiors.h (find_inferior_in_random): Declare.
6654 * linux-low.c (linux_wait_for_event_filtered): Call
6655 find_inferior_in_random instead of find_inferior.
6656
6657 2016-10-27 Yao Qi <yao.qi@linaro.org>
6658
6659 * linux-low.c (linux_wait_1): If single-step breakpoints are
6660 inserted, remove them.
6661
6662 2016-10-26 Pedro Alves <palves@redhat.com>
6663
6664 * linux-low.c (handle_extended_wait): Link parent/child fork
6665 threads.
6666 (linux_wait_1): Unlink them.
6667 (linux_set_resume_request): Ignore resume requests for
6668 already-resumed and unhandled fork child threads.
6669 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6670 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6671 New functions.
6672 (handle_v_requests) <vCont>: Don't call require_running.
6673 * server.h (in_queued_stop_replies): New declaration.
6674
6675 2016-10-24 Yao Qi <yao.qi@linaro.org>
6676
6677 PR server/20733
6678 * linux-aarch64-low.c (append_insns): Cast the return value to
6679 'uint32_t *'.
6680
6681 2016-10-10 Yao Qi <yao.qi@linaro.org>
6682
6683 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6684
6685 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6686
6687 * target.c (target_supports_multi_process): New function, moved
6688 from...
6689 * target.h (target_supports_multi_process): ... here. Remove
6690 macro.
6691
6692 2016-10-05 Tom Tromey <tom@tromey.com>
6693
6694 PR remote/20655:
6695 * tracepoint.c (handle_tracepoint_bkpts): Check
6696 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6697
6698 2016-10-05 Yao Qi <yao.qi@linaro.org>
6699
6700 * configure.srv: Update the path of arm-*.xml files.
6701
6702 2016-10-05 Terry Guo <terry.guo@arm.com>
6703 Yao Qi <yao.qi@linaro.org>
6704
6705 * Makefile.in: Adjust the path of rules.
6706 * configure.srv: Update the path of xml files.
6707 * regformats/arm-with-iwmmxt.dat: Regenerated.
6708 * regformats/arm-with-neon.dat: Likewise.
6709 * regformats/arm-with-vfpv2.dat: Likewise.
6710 * regformats/arm-with-vfpv3.dat Likewise.
6711
6712 2016-09-30 Yao Qi <yao.qi@linaro.org>
6713
6714 PR gdbserver/20627
6715 * target.c (target_stop_and_wait): Don't call
6716 target_continue_no_signal, use resume_stop instead.
6717
6718 2016-09-26 Yao Qi <yao.qi@linaro.org>
6719
6720 * linux-low.c (linux_wait_1): Call debug_exit.
6721
6722 2016-09-23 Pedro Alves <palves@redhat.com>
6723
6724 * Makefile.in (SFILES): Add common/new-op.c.
6725 (OBS): Add common/new-op.o.
6726 (new-op.o): New rule.
6727
6728 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6729
6730 * .gitinore: Ignore more files.
6731
6732 2016-09-21 Yao Qi <yao.qi@linaro.org>
6733
6734 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6735 23.
6736
6737 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6738
6739 * server.c (start_inferior): Call target_mourn_inferior instead of
6740 mourn_inferior; pass ptid_t argument to it.
6741 (resume): Likewise.
6742 (handle_target_event): Likewise.
6743 * target.c (target_mourn_inferior): New function.
6744 * target.h (mourn_inferior): Delete macro.
6745
6746 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6747
6748 * linux-low.c (lwp_is_stepping): New function.
6749
6750 2016-09-06 Carl Love <cel@us.ibm.com>
6751
6752 * server.c (start_inferior): Fixed comment, requested comment change
6753 didn't get updated correctly. Removed reference to ptrace () call as
6754 it is only true on Linux systems.
6755
6756 2016-09-06 Carl Love <cel@us.ibm.com>
6757
6758 * server.c (start_inferior): Do not call
6759 function target_post_create_inferior () if the
6760 inferior process has already exited.
6761
6762 2016-09-05 Pedro Alves <palves@redhat.com>
6763
6764 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6765 (COMPILE.pre, CC_LD): Use CXX directly.
6766 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6767 * acinclude.m4: Don't include build-with-cxx.m4.
6768 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6769 * configure: Regenerate.
6770
6771 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6772
6773 PR gdb/19495
6774 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6775 call writing data to own_buf.
6776
6777 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6778
6779 * target.c (mywait): Call target_wait instead of
6780 the_target->wait.
6781 (target_wait): New function.
6782
6783 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6784
6785 * server.c (start_inferior): New variable 'ptid'. Replace calls
6786 to the_target->resume by target_continue{,_no_signal}, depending
6787 on the case.
6788 * target.c (target_stop_and_wait): Call target_continue_no_signal
6789 instead of the_target->resume.
6790 (target_continue): New function.
6791
6792 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6793
6794 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6795
6796 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6797
6798 PR server/20491
6799 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6800 ps_prochandle.
6801 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6802 * linux-arm-low.c (ps_get_thread_area): Likewise.
6803 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6804 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6805 * linux-mips-low.c (ps_get_thread_area): Likewise.
6806 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6807 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6808 * linux-x86-low.c (ps_get_thread_area): Likewise.
6809 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6810
6811 2016-08-19 Pedro Alves <palves@redhat.com>
6812
6813 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6814
6815 2016-08-19 Pedro Alves <palves@redhat.com>
6816
6817 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6818 comment. Use memcpy instead of casting through unsigned long.
6819
6820 2016-08-19 Pedro Alves <palves@redhat.com>
6821
6822 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6823 allocating around 0x80000000.
6824
6825 2016-08-19 Pedro Alves <palves@redhat.com>
6826
6827 PR gdb/20415
6828 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6829 (x32-avx512-linux-ipa.o): New rules.
6830 * configure.ac (x86_64-*-linux*): New x32 check.
6831 * configure.srv (ipa_x32_linux_regobj): New.
6832 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6833 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6834 descriptions.
6835 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6836 descriptions.
6837 * configure: Regenerate.
6838
6839 2016-08-09 Pedro Alves <palves@redhat.com>
6840
6841 PR gdb/18653
6842 * Makefile.in (OBS): Add signals-state-save-restore.o.
6843 (signals-state-save-restore.o): New rule.
6844 * config.in: Regenerate.
6845 * configure: Regenerate.
6846 * linux-low.c: Include "signals-state-save-restore.h".
6847 (linux_create_inferior): Call
6848 restore_original_signals_state.
6849 * server.c: Include "dispositions-save-restore.h".
6850 (captured_main): Call save_original_signals_state.
6851
6852 2016-08-05 Pedro Alves <palves@redhat.com>
6853
6854 * configure: Regenerate.
6855
6856 2016-08-04 Yao Qi <yao.qi@linaro.org>
6857
6858 * linux-low.c (regsets_fetch_inferior_registers): Check
6859 errno is ESRCH or not.
6860
6861 2016-08-02 Yao Qi <yao.qi@linaro.org>
6862
6863 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6864 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6865 (thread_db_load_search): Update.
6866 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6867 td_ta_set_event and td_ta_event_getmsg.
6868
6869 2016-07-26 Pedro Alves <palves@redhat.com>
6870
6871 PR server/20414
6872 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6873 of unsigned long for 64-bit registers and use uint32_t instead of
6874 unsigned int for 32-bit registers.
6875
6876 2016-07-26 Pedro Alves <palves@redhat.com>
6877
6878 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6879 to 'ptrace'.
6880
6881 2016-07-21 Tom Tromey <tom@tromey.com>
6882
6883 * configure: Rebuild.
6884
6885 2016-07-21 Yao Qi <yao.qi@linaro.org>
6886
6887 * mem-break.c (find_gdb_breakpoint): Cast bp to
6888 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
6889
6890 2016-07-21 Yao Qi <yao.qi@linaro.org>
6891
6892 * server.c (handle_v_requests): Support s and S actions
6893 if target_supports_software_single_step return true.
6894
6895 2016-07-21 Yao Qi <yao.qi@linaro.org>
6896
6897 * linux-low.c (resume_stopped_resumed_lwps): If resume request
6898 is resume_step, call maybe_hw_step.
6899 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6900 and unstop them.
6901 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
6902 breakpoints or not.
6903 (proceed_one_lwp): If resume request is resume_step, install
6904 reinsert breakpoints and call maybe_hw_step.
6905
6906 2016-07-21 Yao Qi <yao.qi@linaro.org>
6907
6908 * linux-low.c (proceed_one_lwp): Declare.
6909 (linux_resume_one_thread): Remove local variable 'step'.
6910 Lift code enqueue signal. Call proceed_one_lwp instead of
6911 linux_resume_one_lwp.
6912
6913 2016-07-21 Yao Qi <yao.qi@linaro.org>
6914
6915 * linux-low.c (linux_resume_one_thread): Call
6916 enqueue_pending_signal.
6917
6918 2016-07-21 Yao Qi <yao.qi@linaro.org>
6919
6920 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
6921 * inferiors.c (do_restore_current_thread_cleanup): New function.
6922 (make_cleanup_restore_current_thread): Likewise.
6923 * linux-low.c (install_software_single_step_breakpoints): Call
6924 make_cleanup_restore_current_thread. Switch current_thread to
6925 thread.
6926
6927 2016-07-21 Yao Qi <yao.qi@linaro.org>
6928
6929 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
6930 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
6931 (clone_one_breakpoint): Likewise.
6932 (delete_reinsert_breakpoints): Change parameter to thread.
6933 Callers updated.
6934 (has_reinsert_breakpoints): Likewise.
6935 (uninsert_reinsert_breakpoints): Likewise.
6936 (reinsert_reinsert_breakpoints): Likewise.
6937 * mem-break.h (set_reinsert_breakpoint): Update declaration.
6938 (delete_reinsert_breakpoints): Likewise.
6939 (reinsert_reinsert_breakpoints): Likewise.
6940 (uninsert_reinsert_breakpoints): Likewise.
6941 (has_reinsert_breakpoints): Likewise.
6942
6943 2016-07-21 Yao Qi <yao.qi@linaro.org>
6944
6945 * inferiors.c (get_thread_process): Make parameter const.
6946 * inferiors.h (get_thread_process): Update declaration.
6947 * mem-break.c (clone_all_breakpoints): Remove all parameters.
6948 Add new parameters child_thread and parent_thread. Callers
6949 updated.
6950 * mem-break.h (clone_all_breakpoints): Update declaration.
6951
6952 2016-07-21 Yao Qi <yao.qi@linaro.org>
6953
6954 * mem-break.c (struct breakpoint) <cond_list>: Remove.
6955 <command_list, handler>: Remove.
6956 (struct gdb_breakpoint): New.
6957 (struct other_breakpoint): New.
6958 (struct reinsert_breakpoint): New.
6959 (is_gdb_breakpoint): New function.
6960 (any_persistent_commands): Update command_list if
6961 is_gdb_breakpoint returns true.
6962 (set_breakpoint): Create breakpoints according to their types.
6963 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
6964 (set_gdb_breakpoint_1): Likewise.
6965 (set_gdb_breakpoint): Likewise.
6966 (clear_breakpoint_conditions): Change parameter type to
6967 'struct gdb_breakpoint *'.
6968 (clear_breakpoint_commands): Likewise.
6969 (clear_breakpoint_conditions_and_commands): Likewise.
6970 (add_condition_to_breakpoint): Likewise.
6971 (add_breakpoint_condition): Likewise.
6972 (add_commands_to_breakpoint): Likewise.
6973 (check_breakpoints): Check other_breakpoint.
6974 (clone_one_breakpoint): Clone breakpopint according to its type.
6975 * mem-break.h (struct gdb_breakpoint): Declare.
6976 (set_gdb_breakpoint): Update declaration.
6977 (clear_breakpoint_conditions_and_commands): Likewise.
6978 (add_breakpoint_condition): Likewise.
6979 (add_breakpoint_commands): Likewise.
6980 * server.c (process_point_options): Change parameter type to
6981 'struct gdb_breakpoint *'.
6982
6983 2016-07-21 Yao Qi <yao.qi@linaro.org>
6984
6985 * mem-break.c (set_breakpoint_at): Rename it to ...
6986 (set_breakpoint_type_at): ... it.
6987 (set_breakpoint_at): Call set_breakpoint_type_at.
6988 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
6989 * mem-break.h (set_breakpoint_at): Update comments.
6990
6991 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
6992
6993 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
6994 to buf parameter.
6995 (nios2_store_gregset): Likewise.
6996
6997 2016-07-01 Pedro Alves <palves@redhat.com>
6998 Antoine Tremblay <antoine.tremblay@ericsson.com>
6999
7000 * linux-low.c: Change interface to take the target lwp_info
7001 pointer directly and return void. Handle detaching from a zombie
7002 thread.
7003 (linux_detach_lwp_callback): New function.
7004 (linux_detach): Detach from the leader thread after detaching from
7005 the clone threads.
7006
7007 2016-06-28 Yao Qi <yao.qi@linaro.org>
7008
7009 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7010 for variable new_offset.
7011 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7012 (aarch64_ftrace_insn_reloc_cb): Likewise.
7013 (aarch64_ftrace_insn_reloc_tb): Likewise.
7014 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7015 PRIx64 instead of PRIx32.
7016
7017 2016-06-28 Yao Qi <yao.qi@linaro.org>
7018
7019 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7020 (the_low_target): Install arm_get_syscall_trapinfo.
7021
7022 2016-06-28 Yao Qi <yao.qi@linaro.org>
7023
7024 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7025 function.
7026 (the_low_target): Install aarch64_get_syscall_trapinfo.
7027
7028 2016-06-28 Yao Qi <yao.qi@linaro.org>
7029
7030 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7031 Callers updated.
7032 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7033 Remove parameter sysno.
7034 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7035 sysret.
7036
7037 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7038
7039 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7040 (s390_emit_ne_goto): Likewise.
7041 (s390_emit_lt_goto): Likewise.
7042 (s390_emit_le_goto): Likewise.
7043 (s390_emit_gt_goto): Likewise.
7044 (s390_emit_ge_goto): Likewise.
7045 (s390x_emit_eq_goto): Likewise.
7046 (s390x_emit_ne_goto): Likewise.
7047 (s390x_emit_lt_goto): Likewise.
7048 (s390x_emit_le_goto): Likewise.
7049 (s390x_emit_gt_goto): Likewise.
7050 (s390x_emit_ge_goto): Likewise.
7051 (s390_emit_ops_impl): Mark variable static.
7052 (s390x_emit_ops): Likewise.
7053
7054 2016-06-17 Yao Qi <yao.qi@linaro.org>
7055
7056 * linux-low.c (handle_extended_wait): Call
7057 uninsert_reinsert_breakpoints for the parent process. Remove
7058 reinsert breakpoints from the child process. Reinsert them to
7059 the parent process when vfork is done.
7060 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7061 (reinsert_reinsert_breakpoints): New function.
7062 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7063 (reinsert_reinsert_breakpoints): Declare.
7064
7065 2016-06-17 Yao Qi <yao.qi@linaro.org>
7066
7067 * linux-low.c (handle_extended_wait): If the parent is doing
7068 step-over, remove the reinsert breakpoints from the forked child.
7069
7070 2016-06-17 Yao Qi <yao.qi@linaro.org>
7071
7072 * linux-low.c (unsuspend_all_lwps): Declare.
7073 (linux_low_filter_event): If thread exited, call finish_step_over.
7074 If step-over is finished, unsuspend other threads.
7075
7076 2016-06-17 Yao Qi <yao.qi@linaro.org>
7077
7078 * linux-low.c (linux_resume_one_lwp_throw): Assert
7079 has_reinsert_breakpoints returns false.
7080 * mem-break.c (delete_disabled_breakpoints): Assert
7081 bp type isn't reinsert_breakpoint.
7082
7083 2016-06-17 Yao Qi <yao.qi@linaro.org>
7084
7085 * linux-low.c (maybe_hw_step): New function.
7086 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7087 (finish_step_over): Switch current_thread to lwp temporarily,
7088 and assert has_reinsert_breakpoints returns true.
7089 (proceed_one_lwp): Call maybe_hw_step.
7090 * mem-break.c (has_reinsert_breakpoints): New function.
7091 * mem-break.h (has_reinsert_breakpoints): Declare.
7092
7093 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7094
7095 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7096
7097 2016-05-17 Yao Qi <yao.qi@linaro.org>
7098
7099 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7100 instead of find_inferior.
7101
7102 2016-05-05 Yao Qi <yao.qi@linaro.org>
7103
7104 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7105 Initialize res to zero.
7106
7107 2016-05-05 Yao Qi <yao.qi@linaro.org>
7108
7109 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7110 to uint32_t.
7111
7112 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7113
7114 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7115 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7116 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7117
7118 2016-04-28 Par Olsson <par.olsson@windriver.com>
7119 Simon Marchi <simon.marchi@ericsson.com>
7120
7121 * tracepoint.c (write_inferior_int8): New function.
7122 (cmd_qtenable_disable): Write enable flag using
7123 write_inferior_int8.
7124
7125 2016-04-25 Yao Qi <yao.qi@linaro.org>
7126
7127 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
7128 (need_step_over_p): Return zero if the LWP has pending signals
7129 can be delivered on software single step target.
7130
7131 2016-04-25 Yao Qi <yao.qi@linaro.org>
7132
7133 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
7134 return instead of error.
7135
7136 2016-04-22 Yao Qi <yao.qi@linaro.org>
7137
7138 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
7139 to 23.
7140
7141 2016-04-22 Yao Qi <yao.qi@linaro.org>
7142
7143 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
7144 signal when stepping over breakpoint with software single
7145 step.
7146
7147 2016-04-21 Pedro Alves <palves@redhat.com>
7148
7149 * linux-s390-low.c (s390_collect_ptrace_register)
7150 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
7151 add casts.
7152 (s390_check_regset): Use void * instead of gdb_byte *.
7153
7154 2016-04-20 Pedro Alves <palves@redhat.com>
7155
7156 * configure: Renegerate.
7157
7158 2016-04-20 Yao Qi <yao.qi@linaro.org>
7159
7160 * linux-aarch32-low.c: Include "arch/arm-linux.h".
7161 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
7162 number 16.
7163 (arm_store_gregset): Likewise.
7164
7165 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
7166
7167 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
7168 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
7169 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
7170 (amd64-avx-mpx-linux.c): New rules.
7171 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
7172 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
7173 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
7174 (srv_amd64_regobj): Add amd64-avx-mpx.o.
7175 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
7176 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
7177 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
7178 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
7179 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
7180 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
7181 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
7182 * linux-x86-low.c (x86_linux_read_description): Add case for
7183 X86_XSTATE_AVX_MPX_MASK.
7184 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
7185 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
7186 init_registers_i386_avx_mpx_linux.
7187 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7188 (initialize_low_tracepoint): Call
7189 init_registers_i386_avx_mpx_linux.
7190 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
7191 (initialize_low_tracepoint): Call
7192 init_registers_amd64_avx_mpx_linux.
7193 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
7194 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
7195 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
7196 declarations.
7197
7198 2016-04-18 Pedro Alves <palves@redhat.com>
7199
7200 * configure: Regenerate.
7201
7202 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
7203
7204 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
7205 (aarch64_emit_sub): Likewise.
7206
7207 2016-04-12 Pedro Alves <palves@redhat.com>
7208
7209 * utils.c (prepare_to_throw_exception): Delete.
7210
7211 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
7212
7213 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
7214
7215 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
7216
7217 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
7218
7219 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
7220
7221 * linux-aarch64-ipa.c: Add <elf.h> include.
7222 * linux-ppc-ipa.c: Add <elf.h> include.
7223 * linux-s390-ipa.c: Add <elf.h> include.
7224
7225 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7226
7227 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
7228 (get_raw_reg_ptr): Likewise.
7229 (get_trace_state_variable_value_ptr): Likewise.
7230 (set_trace_state_variable_value_ptr): Likewise.
7231 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
7232 char *.
7233
7234 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7235 Marcin Kościelnicki <koriakin@0x04.net>
7236
7237 PR/17221
7238 * linux-ppc-low.c (emit_insns): New function.
7239 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
7240 (ppc_emit_prologue): New function.
7241 (ppc_emit_epilogue): New function.
7242 (ppc_emit_add): New function.
7243 (ppc_emit_sub): New function.
7244 (ppc_emit_mul): New function.
7245 (ppc_emit_lsh): New function.
7246 (ppc_emit_rsh_signed): New function.
7247 (ppc_emit_rsh_unsigned): New function.
7248 (ppc_emit_ext): New function.
7249 (ppc_emit_zero_ext): New function.
7250 (ppc_emit_log_not): New function.
7251 (ppc_emit_bit_and): New function.
7252 (ppc_emit_bit_or): New function.
7253 (ppc_emit_bit_xor): New function.
7254 (ppc_emit_bit_not): New function.
7255 (ppc_emit_equal): New function.
7256 (ppc_emit_less_signed): New function.
7257 (ppc_emit_less_unsigned): New function.
7258 (ppc_emit_ref): New function.
7259 (ppc_emit_const): New function.
7260 (ppc_emit_reg): New function.
7261 (ppc_emit_pop): New function.
7262 (ppc_emit_stack_flush): New function.
7263 (ppc_emit_swap): New function.
7264 (ppc_emit_stack_adjust): New function.
7265 (ppc_emit_call): New function.
7266 (ppc_emit_int_call_1): New function.
7267 (ppc_emit_void_call_2): New function.
7268 (ppc_emit_if_goto): New function.
7269 (ppc_emit_goto): New function.
7270 (ppc_emit_eq_goto): New function.
7271 (ppc_emit_ne_goto): New function.
7272 (ppc_emit_lt_goto): New function.
7273 (ppc_emit_le_goto): New function.
7274 (ppc_emit_gt_goto): New function.
7275 (ppc_emit_ge_goto): New function.
7276 (ppc_write_goto_address): New function.
7277 (ppc_emit_ops_impl): New static variable.
7278 (ppc64v1_emit_prologue): New function.
7279 (ppc64v2_emit_prologue): New function.
7280 (ppc64_emit_epilogue): New function.
7281 (ppc64_emit_add): New function.
7282 (ppc64_emit_sub): New function.
7283 (ppc64_emit_mul): New function.
7284 (ppc64_emit_lsh): New function.
7285 (ppc64_emit_rsh_signed): New function.
7286 (ppc64_emit_rsh_unsigned): New function.
7287 (ppc64_emit_ext): New function.
7288 (ppc64_emit_zero_ext): New function.
7289 (ppc64_emit_log_not): New function.
7290 (ppc64_emit_bit_and): New function.
7291 (ppc64_emit_bit_or): New function.
7292 (ppc64_emit_bit_xor): New function.
7293 (ppc64_emit_bit_not): New function.
7294 (ppc64_emit_equal): New function.
7295 (ppc64_emit_less_signed): New function.
7296 (ppc64_emit_less_unsigned): New function.
7297 (ppc64_emit_ref): New function.
7298 (ppc64_emit_const): New function.
7299 (ppc64v1_emit_reg): New function.
7300 (ppc64v2_emit_reg): New function.
7301 (ppc64_emit_pop): New function.
7302 (ppc64_emit_stack_flush): New function.
7303 (ppc64_emit_swap): New function.
7304 (ppc64v1_emit_call): New function.
7305 (ppc64v2_emit_call): New function.
7306 (ppc64v1_emit_int_call_1): New function.
7307 (ppc64v2_emit_int_call_1): New function.
7308 (ppc64v1_emit_void_call_2): New function.
7309 (ppc64v2_emit_void_call_2): New function.
7310 (ppc64_emit_if_goto): New function.
7311 (ppc64_emit_eq_goto): New function.
7312 (ppc64_emit_ne_goto): New function.
7313 (ppc64_emit_lt_goto): New function.
7314 (ppc64_emit_le_goto): New function.
7315 (ppc64_emit_gt_goto): New function.
7316 (ppc64_emit_ge_goto): New function.
7317 (ppc64v1_emit_ops_impl): New static variable.
7318 (ppc64v2_emit_ops_impl): New static variable.
7319 (ppc_emit_ops): New function.
7320 (linux_low_target): Wire in ppc_emit_ops.
7321
7322 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7323 Marcin Kościelnicki <koriakin@0x04.net>
7324
7325 PR/17221
7326 * Makefile.in: Add powerpc-*-ipa.o
7327 * configure.srv: Add ipa_obj for powerpc*-linux.
7328 * linux-ppc-ipa.c: New file.
7329 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7330 includes.
7331 (PPC_FIELD): New macro.
7332 (PPC_SEXT): New macro.
7333 (PPC_OP6): New macro.
7334 (PPC_BO): New macro.
7335 (PPC_LI): New macro.
7336 (PPC_BD): New macro.
7337 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7338 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7339 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7340 (ppc_get_thread_area): New function.
7341 (is_elfv2_inferior): New function.
7342 (gen_ds_form): New function.
7343 (GEN_STD): New macro.
7344 (GEN_STDU): New macro.
7345 (GEN_LD): New macro.
7346 (GEN_LDU): New macro.
7347 (gen_d_form): New function.
7348 (GEN_ADDI): New macro.
7349 (GEN_ADDIS): New macro.
7350 (GEN_LI): New macro.
7351 (GEN_LIS): New macro.
7352 (GEN_ORI): New macro.
7353 (GEN_ORIS): New macro.
7354 (GEN_LWZ): New macro.
7355 (GEN_STW): New macro.
7356 (GEN_STWU): New macro.
7357 (gen_xfx_form): New function.
7358 (GEN_MFSPR): New macro.
7359 (GEN_MTSPR): New macro.
7360 (GEN_MFCR): New macro.
7361 (GEN_MTCR): New macro.
7362 (GEN_SYNC): New macro.
7363 (GEN_LWSYNC): New macro.
7364 (gen_x_form): New function.
7365 (GEN_OR): New macro.
7366 (GEN_MR): New macro.
7367 (GEN_LWARX): New macro.
7368 (GEN_STWCX): New macro.
7369 (GEN_CMPW): New macro.
7370 (gen_md_form): New function.
7371 (GEN_RLDICL): New macro.
7372 (GEN_RLDICR): New macro.
7373 (gen_i_form): New function.
7374 (GEN_B): New macro.
7375 (GEN_BL): New macro.
7376 (gen_b_form): New function.
7377 (GEN_BNE): New macro.
7378 (GEN_LOAD): New macro.
7379 (GEN_STORE): New macro.
7380 (gen_limm): New function.
7381 (gen_atomic_xchg): New function.
7382 (gen_call): New function.
7383 (ppc_relocate_instruction): New function.
7384 (ppc_install_fast_tracepoint_jump_pad): New function.
7385 (ppc_get_min_fast_tracepoint_insn_len): New function.
7386 (ppc_get_ipa_tdesc_idx): New function.
7387 (the_low_target): Wire in the new functions.
7388 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7389 tdescs.
7390 * linux-ppc-tdesc.h: New file.
7391
7392 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7393
7394 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7395 (alloc_jump_pad_buffer): New function.
7396 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7397 (alloc_jump_pad_buffer): New function.
7398 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7399 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7400 (alloc_jump_pad_buffer): New function.
7401 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7402 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7403 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7404 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7405
7406 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7407
7408 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7409 * linux-amd64-ipa.c: Likewise.
7410 * linux-i386-ipa.c: Likewise.
7411 * linux-s390-ipa.c: Likewise.
7412 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7413 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7414 set_trace_state_variable_value_ptr.
7415 (struct ipa_sym_addresses): Likewise.
7416 (symbol_list): Likewise.
7417 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7418 accessing gdb_collect directly.
7419 (gdb_collect_ptr_type): New typedef.
7420 (get_raw_reg_ptr_type): New typedef.
7421 (get_trace_state_variable_value_ptr_type): New typedef.
7422 (set_trace_state_variable_value_ptr_type): New typedef.
7423 (gdb_collect_ptr): New global.
7424 (get_raw_reg_ptr): New global.
7425 (get_trace_state_variable_value_ptr): New global.
7426 (set_trace_state_variable_value_ptr): New global.
7427 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7428 accessing get_raw_reg directly.
7429 (get_get_tsv_func_addr): Likewise for
7430 get_trace_state_variable_value_ptr.
7431 (get_set_tsv_func_addr): Likewise for
7432 set_trace_state_variable_value_ptr.
7433 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7434
7435 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7436
7437 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7438
7439 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7440
7441 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7442 packets.
7443 (relocate_instruction): Remove own_buf.
7444 * server.c (own_buf): Make global.
7445 (handle_v_requests): Make global.
7446 * server.h (own_buf): New declaration.
7447 (handle_v_requests): New prototype.
7448
7449 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7450
7451 PR 18377
7452 * linux-s390-low.c (add_insns): New function.
7453 (s390_emit_prologue): New function.
7454 (s390_emit_epilogue): New function.
7455 (s390_emit_add): New function.
7456 (s390_emit_sub): New function.
7457 (s390_emit_mul): New function.
7458 (s390_emit_lsh): New function.
7459 (s390_emit_rsh_signed): New function.
7460 (s390_emit_rsh_unsigned): New function.
7461 (s390_emit_ext): New function.
7462 (s390_emit_log_not): New function.
7463 (s390_emit_bit_and): New function.
7464 (s390_emit_bit_or): New function.
7465 (s390_emit_bit_xor): New function.
7466 (s390_emit_bit_not): New function.
7467 (s390_emit_equal): New function.
7468 (s390_emit_less_signed): New function.
7469 (s390_emit_less_unsigned): New function.
7470 (s390_emit_ref): New function.
7471 (s390_emit_if_goto): New function.
7472 (s390_emit_goto): New function.
7473 (s390_write_goto_address): New function.
7474 (s390_emit_litpool): New function.
7475 (s390_emit_const): New function.
7476 (s390_emit_call): New function.
7477 (s390_emit_reg): New function.
7478 (s390_emit_pop): New function.
7479 (s390_emit_stack_flush): New function.
7480 (s390_emit_zero_ext): New function.
7481 (s390_emit_swap): New function.
7482 (s390_emit_stack_adjust): New function.
7483 (s390_emit_set_r2): New function.
7484 (s390_emit_int_call_1): New function.
7485 (s390_emit_void_call_2): New function.
7486 (s390_emit_eq_goto): New function.
7487 (s390_emit_ne_goto): New function.
7488 (s390_emit_lt_goto): New function.
7489 (s390_emit_le_goto): New function.
7490 (s390_emit_gt_goto): New function.
7491 (s390_emit_ge_goto): New function.
7492 (s390x_emit_prologue): New function.
7493 (s390x_emit_epilogue): New function.
7494 (s390x_emit_add): New function.
7495 (s390x_emit_sub): New function.
7496 (s390x_emit_mul): New function.
7497 (s390x_emit_lsh): New function.
7498 (s390x_emit_rsh_signed): New function.
7499 (s390x_emit_rsh_unsigned): New function.
7500 (s390x_emit_ext): New function.
7501 (s390x_emit_log_not): New function.
7502 (s390x_emit_bit_and): New function.
7503 (s390x_emit_bit_or): New function.
7504 (s390x_emit_bit_xor): New function.
7505 (s390x_emit_bit_not): New function.
7506 (s390x_emit_equal): New function.
7507 (s390x_emit_less_signed): New function.
7508 (s390x_emit_less_unsigned): New function.
7509 (s390x_emit_ref): New function.
7510 (s390x_emit_if_goto): New function.
7511 (s390x_emit_const): New function.
7512 (s390x_emit_call): New function.
7513 (s390x_emit_reg): New function.
7514 (s390x_emit_pop): New function.
7515 (s390x_emit_stack_flush): New function.
7516 (s390x_emit_zero_ext): New function.
7517 (s390x_emit_swap): New function.
7518 (s390x_emit_stack_adjust): New function.
7519 (s390x_emit_int_call_1): New function.
7520 (s390x_emit_void_call_2): New function.
7521 (s390x_emit_eq_goto): New function.
7522 (s390x_emit_ne_goto): New function.
7523 (s390x_emit_lt_goto): New function.
7524 (s390x_emit_le_goto): New function.
7525 (s390x_emit_gt_goto): New function.
7526 (s390x_emit_ge_goto): New function.
7527 (s390_emit_ops): New function.
7528 (struct linux_target_ops): Fill in emit_ops hook.
7529
7530 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7531
7532 PR 18377
7533 * Makefile.in: Add s390 IPA files.
7534 * configure.srv: Build IPA for s390.
7535 * linux-s390-ipa.c: New file.
7536 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7537 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7538 (tdesc_s390_linux32): Likewise.
7539 (init_registers_s390_linux32v1): Likewise.
7540 (tdesc_s390_linux32v1): Likewise.
7541 (init_registers_s390_linux32v2): Likewise.
7542 (tdesc_s390_linux32v2): Likewise.
7543 (init_registers_s390_linux64): Likewise.
7544 (tdesc_s390_linux64): Likewise.
7545 (init_registers_s390_linux64v1): Likewise.
7546 (tdesc_s390_linux64v1): Likewise.
7547 (init_registers_s390_linux64v2): Likewise.
7548 (tdesc_s390_linux64v2): Likewise.
7549 (init_registers_s390_te_linux64): Likewise.
7550 (tdesc_s390_te_linux64): Likewise.
7551 (init_registers_s390_vx_linux64): Likewise.
7552 (tdesc_s390_vx_linux64): Likewise.
7553 (init_registers_s390_tevx_linux64): Likewise.
7554 (tdesc_s390_tevx_linux64): Likewise.
7555 (init_registers_s390x_linux64): Likewise.
7556 (tdesc_s390x_linux64): Likewise.
7557 (init_registers_s390x_linux64v1): Likewise.
7558 (tdesc_s390x_linux64v1): Likewise.
7559 (init_registers_s390x_linux64v2): Likewise.
7560 (tdesc_s390x_linux64v2): Likewise.
7561 (init_registers_s390x_te_linux64): Likewise.
7562 (tdesc_s390x_te_linux64): Likewise.
7563 (init_registers_s390x_vx_linux64): Likewise.
7564 (tdesc_s390x_vx_linux64): Likewise.
7565 (init_registers_s390x_tevx_linux64): Likewise.
7566 (tdesc_s390x_tevx_linux64): Likewise.
7567 (have_hwcap_s390_vx): New static variable.
7568 (s390_arch_setup): Fill have_hwcap_s390_vx.
7569 (s390_get_thread_area): New function.
7570 (s390_ft_entry_gpr_esa): New const.
7571 (s390_ft_entry_gpr_zarch): New const.
7572 (s390_ft_entry_misc): New const.
7573 (s390_ft_entry_fr): New const.
7574 (s390_ft_entry_vr): New const.
7575 (s390_ft_main_31): New const.
7576 (s390_ft_main_64): New const.
7577 (s390_ft_exit_fr): New const.
7578 (s390_ft_exit_vr): New const.
7579 (s390_ft_exit_misc): New const.
7580 (s390_ft_exit_gpr_esa): New const.
7581 (s390_ft_exit_gpr_zarch): New const.
7582 (append_insns): New function.
7583 (s390_relocate_instruction): New function.
7584 (s390_install_fast_tracepoint_jump_pad): New function.
7585 (s390_get_min_fast_tracepoint_insn_len): New function.
7586 (s390_get_ipa_tdesc_idx): New function.
7587 (struct linux_target_ops): Wire in the above functions.
7588 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7589 * linux-s390-tdesc.h: New file.
7590
7591 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7592
7593 * linux-s390-low.c (s390_supports_tracepoints): New function.
7594 (struct linux_target_ops): Fill supports_tracepoints hook.
7595
7596 2016-03-18 Yao Qi <yao.qi@linaro.org>
7597
7598 * linux-low.c (lwp_signal_can_be_delivered): New function.
7599 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7600
7601 2016-03-18 Yao Qi <yao.qi@linaro.org>
7602
7603 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7604 0 if signal is enqueued. Remove 'signal' from one debugging
7605 message. Move one debugging message to some lines below.
7606 Remove code setting 'signal' to 0.
7607
7608 2016-03-18 Yao Qi <yao.qi@linaro.org>
7609
7610 * linux-low.c (linux_low_filter_event): Remove redundant
7611 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7612
7613 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7614
7615 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7616 (struct linux_target_ops): Wire in the above.
7617
7618 2016-03-03 Yao Qi <yao.qi@linaro.org>
7619
7620 * linux-low.c: Update comments to start_step_over.
7621
7622 2016-03-03 Yao Qi <yao.qi@linaro.org>
7623
7624 PR server/19736
7625 * linux-low.c (handle_extended_wait): Set child suspended
7626 if event_lwp->bp_reinsert isn't zero.
7627
7628 2016-03-02 Yao Qi <yao.qi@linaro.org>
7629
7630 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7631 enqueue_pending_signal.
7632
7633 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7634
7635 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7636 is actually loaded.
7637
7638 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7639
7640 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7641 (s390_regmap_3264) [!__s390x__]: New global.
7642 (s390_collect_ptrace_register): Skip map entries containing -1.
7643 (s390_supply_ptrace_register): Ditto.
7644 (s390_fill_gprs_high): New function.
7645 (s390_store_gprs_high): New function.
7646 (s390_regsets): Add NT_S390_HIGH_GPRS.
7647 (s390_get_hwcap): Enable on 31-bit.
7648 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7649 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7650 Detect NT_S390_HIGH_GPRS.
7651 (s390_usrregs_info_3264): Enable on 31-bit.
7652 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7653 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7654
7655 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7656
7657 PR gdb/13808
7658 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7659 * configure.srv: Ditto.
7660 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7661 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7662 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7663 (init_registers_amd64_linux): Remove prototype.
7664 (tdesc_amd64_linux): Remove declaration.
7665 (get_ipa_tdesc): New function.
7666 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7667 initialize remaining tdescs.
7668 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7669 (init_registers_i386_linux): Remove prototype.
7670 (tdesc_i386_linux): Remove declaration.
7671 (get_ipa_tdesc): New function.
7672 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7673 initialize remaining tdescs.
7674 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7675 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7676 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7677 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7678 (x86_get_ipa_tdesc_idx): New function.
7679 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7680 * linux-x86-tdesc.h: New file.
7681 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7682 (target_get_ipa_tdesc_idx): New macro.
7683 * tracepoint.c (ipa_tdesc_idx): New macro.
7684 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7685 (symbol_list): Add ipa_tdesc_idx.
7686 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7687 (ipa_tdesc): Remove.
7688 (ipa_tdesc_idx): New variable.
7689 (get_context_regcache): Use get_ipa_tdesc.
7690 (gdb_collect): Ditto.
7691 (gdb_probe): Ditto.
7692 * tracepoint.h (get_ipa_tdesc): New prototype.
7693 (ipa_tdesc): Remove.
7694
7695 2016-02-24 Pedro Alves <palves@redhat.com>
7696
7697 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7698 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7699 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7700 Factor out common code between the USE_SIGTRAP_SIGINFO and
7701 !USE_SIGTRAP_SIGINFO blocks.
7702 (linux_low_filter_event): Call save_stop_reason instead of
7703 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7704 Update comments.
7705 (linux_wait_1): Update comments.
7706
7707 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
7708
7709 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7710 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7711 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7712 ppc_insert_point, ppc_remove_point.
7713
7714 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7715
7716 * linux-s390-low.c (s390_supports_z_point_type): New function.
7717 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7718
7719 2016-02-16 Yao Qi <yao.qi@linaro.org>
7720
7721 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7722 PC. Get pc from regcache_read_pc.
7723
7724 2016-02-12 Yao Qi <yao.qi@linaro.org>
7725
7726 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7727 or linux_get_pc_32bit.
7728 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7729
7730 2016-02-12 Yao Qi <yao.qi@linaro.org>
7731
7732 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7733 arm_linux_get_next_pcs_fixup.
7734
7735 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7736
7737 * tracepoint.c (x_tracepoint_action_download): Change
7738 write_inferior_data_ptr to write_inferior_data_pointer.
7739 (cmd_qtstart): Likewise.
7740 (write_inferior_data_ptr): Remove.
7741 (download_agent_expr): Change write_inferior_data_ptr to
7742 write_inferior_data_pointer.
7743 (download_tracepoint_1): Likewise.
7744 (download_tracepoint): Likewise.
7745 (download_trace_state_variables): Likewise.
7746
7747 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
7748 Marcin Kościelnicki <koriakin@0x04.net>
7749
7750 * tracepoint.c (struct tracepoint_action_ops): Remove.
7751 (struct tracepoint_action): Remove ops.
7752 (m_tracepoint_action_download, r_tracepoint_action_download)
7753 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7754 size and offset accordingly.
7755 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7756 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7757 (tracepoint_action_send, tracepoint_action_download): New functions.
7758 Helpers for trace action handlers.
7759 (add_tracepoint_action): Remove setup actions ops.
7760 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7761
7762 2016-02-10 Yao Qi <yao.qi@linaro.org>
7763
7764 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7765
7766 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7767
7768 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7769 to AC_OUTPUT.
7770 * configure: Regenerate.
7771
7772 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7773
7774 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7775 void * to gdb_byte *.
7776 * linux-low.c (siginfo_fixup): Likewise.
7777 (linux_xfer_siginfo): Likewise.
7778 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7779 Likewise.
7780 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7781
7782 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7783
7784 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7785 to srv_tgtobj.
7786 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7787 to srv_tgtobj.
7788 * linux-x86-low.c [__x86_64__]: Include
7789 "nat/amd64-linux-siginfo.h".
7790 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7791 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7792 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7793 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7794 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7795 (cpt_si_fd, si_timerid, si_overrun): Move from
7796 nat/amd64-linux-siginfo.c.
7797 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7798
7799 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7800
7801 * server.c (skip_to_semicolon): Remove.
7802 (process_point_options): Use strchrnul instead of
7803 skip_to_semicolon.
7804
7805 2016-01-26 Yao Qi <yao.qi@linaro.org>
7806
7807 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7808 * linux-low.c (install_software_single_step_breakpoints): Don't
7809 call regcache_read_pc.
7810 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7811 argument pc.
7812
7813 2016-01-26 Yao Qi <yao.qi@linaro.org>
7814
7815 * linux-low.c (install_software_single_step_breakpoints): Call
7816 regcache_read_pc instead of get_pc.
7817
7818 2016-01-26 Yao Qi <yao.qi@linaro.org>
7819
7820 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7821 (unblock_async_io): Rename to ...
7822 (block_unblock_async_io): ... it. New function.
7823 (enable_async_io): Don't install SIGIO handler. Unblock it
7824 instead.
7825 (disable_async_io): Don't ignore SIGIO. Block it instead.
7826 (initialize_async_io): Install SIGIO handler. Don't call
7827 unblock_async_io.
7828
7829 2016-01-26 Yao Qi <yao.qi@linaro.org>
7830
7831 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7832 first character is '\003', call *the_target->request_interrupt.
7833
7834 2016-01-25 Yao Qi <yao.qi@linaro.org>
7835
7836 * remote-utils.c (new_thread_notify): Remove.
7837 (dead_thread_notify): Likewise.
7838 * remote-utils.h (new_thread_notify): Remove declaration.
7839 (dead_thread_notify): Likewise.
7840
7841 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7842
7843 * gdb.trace/pending.exp: Fix expected message on continue.
7844
7845 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7846
7847 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7848 it works properly on big-endian machines where sizeof (CORE_ADDR)
7849 != sizeof (void *).
7850
7851 2016-01-21 Pedro Alves <palves@redhat.com>
7852
7853 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7854 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7855 * configure: Regenerate.
7856
7857 2016-01-21 Yao Qi <yao.qi@linaro.org>
7858
7859 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7860 is_thumb and set it according to CPSR saved on the stack.
7861 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7862 arm_sigreturn_next_pc.
7863
7864 2016-01-18 Yao Qi <yao.qi@linaro.org>
7865
7866 * linux-low.c (linux_set_pc_64bit): New function.
7867 (linux_get_pc_64bit): New function.
7868 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7869 Declare.
7870 * linux-sparc-low.c (debug_threads): Remove declaration.
7871 (sparc_get_pc): Remove.
7872 (the_low_target): Use linux_get_pc_64bit instead of
7873 sparc_get_pc.
7874 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7875 (the_low_target): Use linux_get_pc_64bit and
7876 linux_set_pc_64bit.
7877
7878 2016-01-18 Yao Qi <yao.qi@linaro.org>
7879
7880 * linux-arm-low.c (debug_threads): Remove declaration.
7881 (arm_get_pc, arm_set_pc): Remove.
7882 (the_low_target): Use linux_get_pc_32bit and
7883 linux_set_pc_32bit.
7884 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
7885 (the_low_target): Use linux_get_pc_32bit and
7886 linux_set_pc_32bit.
7887 * linux-cris-low.c (debug_threads): Remove declaration.
7888 (cris_get_pc, cris_set_pc,): Remove.
7889 (the_low_target): Use linux_get_pc_32bit and
7890 linux_set_pc_32bit.
7891 * linux-crisv32-low.c (debug_threads): Remove declaration.
7892 (cris_get_pc, cris_set_pc): Remove.
7893 (the_low_target): Use linux_get_pc_32bit and
7894 linux_set_pc_32bit.
7895 * linux-low.c: Include inttypes.h.
7896 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
7897 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
7898 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
7899 (the_low_target): Use linux_get_pc_32bit and
7900 linux_set_pc_32bit.
7901 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
7902 (the_low_target): Use linux_get_pc_32bit and
7903 linux_set_pc_32bit.
7904 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
7905 (the_low_target): Use linux_get_pc_32bit and
7906 linux_set_pc_32bit.
7907 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
7908 (the_low_target): Use linux_get_pc_32bit and
7909 linux_set_pc_32bit.
7910 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
7911 (the_low_target): Use linux_get_pc_32bit and
7912 linux_set_pc_32bit.
7913
7914 2016-01-18 Gary Benson <gbenson@redhat.com>
7915
7916 * configure.ac (AC_FUNC_FORK): New check.
7917 * config.in: Regenerate.
7918 * configure: Likewise.
7919
7920 2016-01-14 Yao Qi <yao.qi@linaro.org>
7921
7922 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
7923 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
7924 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
7925 arm_get_next_pcs_ctor.
7926
7927 2016-01-12 Josh Stone <jistone@redhat.com>
7928 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7929
7930 * inferiors.h: Include "gdb_vecs.h".
7931 (struct process_info): Add syscalls_to_catch.
7932 * inferiors.c (remove_process): Free syscalls_to_catch.
7933 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
7934 syscall_return stops.
7935 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
7936 * server.c (handle_general_set): Handle QCatchSyscalls.
7937 (handle_query): Report support for QCatchSyscalls.
7938 * target.h (struct target_ops): Add supports_catch_syscall.
7939 (target_supports_catch_syscall): New macro.
7940 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
7941 (struct lwp_info): Add syscall_state.
7942 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
7943 Maintain syscall_state and syscalls_to_catch across exec.
7944 (get_syscall_trapinfo): New function, proxy to the_low_target.
7945 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
7946 (linux_low_filter_event): Toggle syscall_state entry/return for
7947 syscall traps, and set it ignored for all others.
7948 (gdb_catching_syscalls_p): New function.
7949 (gdb_catch_this_syscall_p): New function.
7950 (linux_wait_1): Handle SYSCALL_SIGTRAP.
7951 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
7952 (linux_supports_catch_syscall): New function.
7953 (linux_target_ops): Install it.
7954 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
7955 (the_low_target): Install it.
7956
7957 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7958
7959 * acinclude.m4: Include new ../warning.m4 file.
7960 * configure: Regenerated.
7961 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
7962
7963 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7964
7965 * ax.c (is_goto_target): Mark static.
7966 * linux-low.c (register_addr): Likewise.
7967 (linux_fetch_registers, linux_store_registers): Likewise.
7968 * mem-break.c (any_persistent_commands): Fix old prototype.
7969 (add_commands_to_breakpoint): Mark static.
7970 * regcache.c (find_register_by_name): Delete unused func.
7971 * remote-utils.c (hex_or_minus_one): Mark static.
7972 * server.c (monitor_show_help): Mark static.
7973 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
7974 handle_v_requests): Likewise.
7975
7976 2016-01-12 Pedro Alves <palves@redhat.com>
7977
7978 Remove use of the registered trademark symbol throughout.
7979
7980 2016-01-08 Yao Qi <yao.qi@linaro.org>
7981
7982 * remote-utils.c (getpkt): If c is '\003', call target hook
7983 request_interrupt.
7984
7985 2016-01-06 Yao Qi <yao.qi@linaro.org>
7986
7987 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
7988 linux-aarch32-low.c.
7989 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7990 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7991 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7992 (thumb2_breakpoint): Declare.
7993 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
7994 linux-aarch32-low.h.
7995 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7996 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7997 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7998
7999 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8000
8001 * gdbreplay.c (gdbreplay_version): Change copyright year in
8002 version message.
8003 * server.c (gdbserver_version): Likewise.
8004
8005 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8006
8007 * server.c (crc32_table): Delete.
8008 (crc32): Use libiberty's xcrc32 function.
8009
8010 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8011
8012 * lynx-low.c (lynx_delete_thread_callback): New function.
8013 (lynx_mourn): Properly delete our process and all of its
8014 threads. Remove call to clear_inferiors.
8015
8016 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8017
8018 * target.c (thread_search_callback): Add check that
8019 the thread_stopped target callback is not NULL before
8020 calling it.
8021
8022 2015-12-21 Yao Qi <yao.qi@linaro.org>
8023
8024 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8025 arm breakpoint.
8026
8027 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8028
8029 * server.c (handle_query): Call target_supports_software_single_step.
8030
8031 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8032
8033 * linux-low.c (single_step): New function.
8034 (linux_resume_one_lwp_throw): Call single_step.
8035 (start_step_over): Likewise.
8036
8037 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8038
8039 * Makefile.in (SFILES): Append arch/arm-linux.c,
8040 arch/arm-get-next-pcs.c.
8041 (arm-linux.o): New rule.
8042 (arm-get-next-pcs.o): New rule.
8043 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8044 arm-linux.o.
8045 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8046 to linux-aarch32-low.c.
8047 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8048 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8049 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8050 (thumb2_breakpoint_len): Likewise.
8051 (arm_is_thumb_mode): Make non-static.
8052 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8053 from linux-aarch32-low.c.
8054 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8055 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8056 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8057 (thumb2_breakpoint_len): Likewise.
8058 (arm_is_thumb_mode): New declaration.
8059 * linux-arm-low.c: Include arch/arm-linux.h
8060 aarch/arm-get-next-pcs.h, sys/syscall.h.
8061 (get_next_pcs_ops): New struct.
8062 (get_next_pcs_addr_bits_remove): New function.
8063 (get_next_pcs_is_thumb): New function.
8064 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8065 (arm_sigreturn_next_pc): Likewise.
8066 (get_next_pcs_syscall_next_pc): Likewise.
8067 (arm_gdbserver_get_next_pcs): Likewise.
8068 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8069 Initialize.
8070 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8071 * server.h: Include gdb_vecs.h.
8072
8073 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8074
8075 * Makefile.in (SFILES): Append common/common-regcache.c.
8076 (OBS): Append common-regcache.o.
8077 (common-regcache.o): New rule.
8078 * regcache.c (init_register_cache): Initialize cache to
8079 REG_UNAVAILABLE.
8080 (regcache_raw_read_unsigned): New function.
8081 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8082 register_status enum.
8083
8084 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8085
8086 * linux-aarch64-low.c (the_low_targets): Rename
8087 breakpoint_reinsert_addr to get_next_pcs.
8088 * linux-arm-low.c (the_low_targets): Likewise.
8089 * linux-bfin-low.c (the_low_targets): Likewise.
8090 * linux-cris-low.c (the_low_targets): Likewise.
8091 * linux-crisv32-low.c (the_low_targets): Likewise.
8092 * linux-low.c (can_software_single_step): Likewise.
8093 (install_software_single_step_breakpoints): New function.
8094 (start_step_over): Use install_software_single_step_breakpoints.
8095 * linux-low.h: New CORE_ADDR vector.
8096 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8097 get_next_pcs.
8098 * linux-mips-low.c (the_low_targets): Likewise.
8099 * linux-nios2-low.c (the_low_targets): Likewise.
8100 * linux-sparc-low.c (the_low_targets): Likewise.
8101
8102 2015-12-17 Pedro Alves <palves@redhat.com>
8103
8104 * linux-low.c (linux_kill_one_lwp): Remove references to
8105 LinuxThreads.
8106 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8107 to 'kill'.
8108 (linux_init_signals): Delete.
8109 (initialize_low): Adjust.
8110 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8111
8112 2015-12-16 Pedro Alves <palves@redhat.com>
8113
8114 * configure.ac (compiler warning flags): When testing a
8115 -Wno-foo option, check whether -Wfoo works instead.
8116 * configure: Regenerate.
8117
8118 2015-12-11 Don Breazeal <donb@codesourcery.com>
8119
8120 * server.c (process_serial_event): Don't exit from gdbserver
8121 in remote mode if there are still active inferiors.
8122
8123 2015-12-11 Yao Qi <yao.qi@linaro.org>
8124
8125 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
8126 arm_breakpoint_at if the process is 32-bit.
8127
8128 2015-12-11 Yao Qi <yao.qi@linaro.org>
8129
8130 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
8131 arm breakpoint.
8132
8133 2015-12-07 Yao Qi <yao.qi@linaro.org>
8134
8135 * configure.srv: Append arm.o to srv_tgtobj for
8136 aarch64*-*-linux* target.
8137 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
8138 from linux-arm-low.c.
8139 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8140 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8141 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8142 (thumb2_breakpoint_len): Likewise.
8143 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
8144 (arm_breakpoint_kinds): Likewise.
8145 (arm_breakpoint_kind_from_pc): Likewise.
8146 (arm_sw_breakpoint_from_kind): Likewise.
8147 (arm_breakpoint_kind_from_current_state): Likewise.
8148 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
8149 (arm_sw_breakpoint_from_kind): Declare.
8150 (arm_breakpoint_kind_from_current_state): Declare.
8151 (arm_breakpoint_at): Declare.
8152 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
8153 arm_sw_breakpoint_from_kind if process is 32-bit.
8154 (aarch64_breakpoint_kind_from_pc): New function.
8155 (aarch64_breakpoint_kind_from_current_state): New function.
8156 (the_low_target): Initialize fields breakpoint_kind_from_pc
8157 and breakpoint_kind_from_current_state.
8158 * linux-arm-low.c (arm_breakpoint_kinds): Move to
8159 linux-aarch32-low.c.
8160 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
8161 (arm_breakpoint, arm_breakpoint_len): Likewise.
8162 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
8163 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8164 (arm_is_thumb_mode): Likewise.
8165 (arm_breakpoint_at): Likewise.
8166 (arm_breakpoint_kind_from_pc): Likewise.
8167 (arm_sw_breakpoint_from_kind): Likewise.
8168 (arm_breakpoint_kind_from_current_state): Likewise.
8169
8170 Revert:
8171 2015-08-04 Yao Qi <yao.qi@linaro.org>
8172
8173 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8174 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8175 * server.c (extended_protocol): Remove "static".
8176 * server.h (extended_protocol): Declare it.
8177
8178 2015-12-04 Josh Stone <jistone@redhat.com>
8179
8180 * target.h (struct target_ops) <arch_setup>: Rename to ...
8181 (struct target_ops) <post_create_inferior>: ... this.
8182 (target_arch_setup): Rename to ...
8183 (target_post_create_inferior): ... this, calling post_create_inferior.
8184 * server.c (start_inferior): Update target_arch_setup calls to
8185 target_post_create_inferior.
8186 * linux-low.c (linux_low_ptrace_options): Forward declare.
8187 (linux_arch_setup): Update its comment for general use.
8188 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
8189 (struct linux_target_ops): Use linux_post_create_inferior.
8190 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
8191 to post_create_inferior.
8192 * nto-low.c (struct nto_target_ops): Likewise.
8193 * spu-low.c (struct spu_target_ops): Likewise.
8194 * win32-low.c (struct win32_target_ops): Likewise.
8195
8196 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
8197
8198 * linux-arm-low.c: Remove duplicate arch/arm.h include.
8199
8200 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8201
8202 * linux-arm-low.c (arm_reinsert_addr): Remove function.
8203 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
8204 * linux-cris-low.c (cris_reinsert_addr> Remove function.
8205 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8206 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
8207 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8208 * linux-mips-low.c (mips_reinsert_addr): Remove function.
8209 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8210 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
8211 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8212 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
8213 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
8214
8215 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8216
8217 * linux-low.c (linux_look_up_symbols): Don't call
8218 linux_supports_traceclone.
8219 * linux-low.h (thread_db_init): Remove use_events argument.
8220 * thread-db.c (thread_db_use_event): Remove global variable.
8221 (struct thread_db) <td_thr_event_enable_p>: Remove field.
8222 (struct thread_db) <td_create_bp>: Remove field.
8223 (thread_db_create_event): Remove function.
8224 (thread_db_enable_reporting): Likewise.
8225 (find_one_thread): Don't check for thread_db_use_events.
8226 (attach_thread): Likewise.
8227 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
8228 (try_thread_db_load_1): Don't check for thread_db_use_events.
8229 (thread_db_init): Remove use_events argument and thread events
8230 handling.
8231 (remove_thread_event_breakpoints): Remove function.
8232 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
8233
8234 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8235
8236 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
8237 New function.
8238 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8239 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
8240 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8241 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
8242 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
8243 Initialize.
8244 * linux-crisv32-low.c (cris_supports_hardware_single_step):
8245 New function.
8246 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8247 * linux-low.c (can_hardware_single_step): Use
8248 supports_hardware_single_step.
8249 (can_software_single_step): New function.
8250 (start_step_over): Call can_software_single_step.
8251 (linux_supports_hardware_single_step): New function.
8252 (struct target_ops) <supports_software_single_step>: Initialize.
8253 * linux-low.h (struct linux_target_ops)
8254 <supports_hardware_single_step>: Initialize.
8255 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
8256 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8257 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
8258 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
8259 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
8260 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8261 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
8262 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8263 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
8264 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
8265 Initialize.
8266 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
8267 (struct linux_target_ops) <tile_supports_hardware_single_step>:
8268 Initialize.
8269 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
8270 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8271 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
8272 New function.
8273 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
8274 * target.h (struct target_ops): <supports_software_single_step>:
8275 New field.
8276 (target_supports_software_single_step): New macro.
8277
8278 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8279
8280 * linux-low.c (linux_wait_1): Fix pc advance condition.
8281 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
8282 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
8283
8284 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
8285
8286 * linux-arm-low.c (arm_is_thumb_mode): New function.
8287 (arm_breakpoint_at): Use arm_is_thumb_mode.
8288 (arm_breakpoint_kind_from_current_state): New function.
8289 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
8290 Initialize.
8291 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
8292 (linux_breakpoint_kind_from_current_state): New function.
8293 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
8294 * linux-low.h (struct linux_target_ops)
8295 <breakpoint_kind_from_current_state>: New field.
8296 * target.h (struct target_ops): Likewise.
8297 (target_breakpoint_kind_from_current_state): New macro.
8298
8299 2015-11-30 Pedro Alves <palves@redhat.com>
8300
8301 * linux-low.c (linux_resume): Wake up the event loop before
8302 returning.
8303
8304 2015-11-30 Pedro Alves <palves@redhat.com>
8305
8306 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
8307 check.
8308 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
8309 to -1.
8310 * target.c (struct thread_search): New structure.
8311 (thread_search_callback): New function.
8312 (prev_general_thread): New global.
8313 (prepare_to_access_memory, done_accessing_memory): New functions.
8314 * target.h (prepare_to_access_memory, done_accessing_memory):
8315 Replace macros with function declarations.
8316
8317 2015-11-30 Pedro Alves <palves@redhat.com>
8318
8319 PR 14618
8320 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
8321 report TARGET_WAITKIND_NO_RESUMED.
8322 * remote-utils.c (prepare_resume_reply): Handle
8323 TARGET_WAITKIND_NO_RESUMED.
8324 * server.c (report_no_resumed): New global.
8325 (handle_query) <qSupported>: Handle "no-resumed+". Report
8326 "no-resumed+" support.
8327 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8328 return error if the client doesn't support no-resumed events.
8329 (push_stop_notification): New function.
8330 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8331 events if the client supports them.
8332
8333 2015-11-30 Pedro Alves <palves@redhat.com>
8334
8335 * linux-low.c (thread_still_has_status_pending_p): Don't check
8336 vCont;t here.
8337 (lwp_resumed): New function.
8338 (status_pending_p_callback): Return early if the LWP is not
8339 supposed to be resumed.
8340
8341 2015-11-30 Pedro Alves <palves@redhat.com>
8342
8343 * linux-low.c (handle_extended_wait): Assert that the LWP's
8344 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8345 thread create events, leave the new child's status pending.
8346 (linux_low_filter_event): If GDB wants to hear about thread exit
8347 events, leave the LWP marked dead and don't delete it.
8348 (linux_wait_for_event_filtered): Don't check for thread exit.
8349 (filter_exit_event): New function.
8350 (linux_wait_1): Use it, when returning an exit event.
8351 (linux_resume_one_lwp_throw): Assert that the LWP's
8352 waitstatus is TARGET_WAITKIND_IGNORE.
8353 * remote-utils.c (prepare_resume_reply): Handle
8354 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8355 * server.c (report_thread_events): New global.
8356 (handle_general_set): Handle QThreadEvents.
8357 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8358 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8359 TARGET_WAITKIND_THREAD_EXITED.
8360 * server.h (report_thread_events): Declare.
8361
8362 2015-11-30 Pedro Alves <palves@redhat.com>
8363
8364 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8365 the thread's last_resume_kind was resume_stop.
8366
8367 2015-11-30 Pedro Alves <palves@redhat.com>
8368
8369 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8370 before returning.
8371
8372 2015-11-30 Pedro Alves <palves@redhat.com>
8373
8374 * server.c (handle_v_requests): Handle vCtrlC.
8375
8376 2015-11-30 Pedro Alves <palves@redhat.com>
8377
8378 * gdbthread.h (find_any_thread_of_pid): Declare.
8379 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8380 functions.
8381 * server.c (handle_query): If current_thread is NULL, look for
8382 another thread of the selected process.
8383
8384 2015-11-26 Daniel Colascione <dancol@dancol.org>
8385 Simon Marchi <simon.marchi@ericsson.com>
8386
8387 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8388 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8389 name in reply.
8390 * target.h (struct target_ops) <thread_name>: New field.
8391 (target_thread_name): New macro.
8392
8393 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8394
8395 * regcache.h (regcache_invalidate_pid): Add declaration.
8396 * regcache.c (regcache_invalidate_pid): New function, extracted
8397 from regcache_invalidate.
8398 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8399 Add trivial documentation comment.
8400 * lynx-low.c: Use regcache_invalidate_pid instead of
8401 regcache_invalidate.
8402
8403 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8404
8405 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8406 and Elf64_auxv_t if the target is Android.
8407
8408 2015-11-22 Doug Evans <xdje42@gmail.com>
8409
8410 * target.h: #include <sys/types.h>.
8411
8412 2015-11-19 Pedro Alves <palves@redhat.com>
8413
8414 * linux-low.c (linux_process_qsupported): Change prototype.
8415 Adjust.
8416 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8417 Change prototype.
8418 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8419 and adjust to loop over all features.
8420 * server.c (handle_query) <qSupported>: Adjust to call
8421 target_process_qsupported once, passing it a vector of unprocessed
8422 features.
8423 * target.h (struct target_ops) <process_qsupported>: Change
8424 prototype.
8425 (target_process_qsupported): Adjust.
8426
8427 2015-11-19 Pedro Alves <palves@redhat.com>
8428
8429 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8430 mode.
8431 * configure: Regenerate.
8432
8433 2015-11-19 Pedro Alves <palves@redhat.com>
8434
8435 * configure: Regenerate.
8436
8437 2015-11-19 Yao Qi <yao.qi@linaro.org>
8438
8439 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8440 type to uint32_t.
8441
8442 2015-11-19 Yao Qi <yao.qi@linaro.org>
8443
8444 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8445 (struct aarch64_operand): Move enum out.
8446
8447 2015-11-19 Yao Qi <yao.qi@linaro.org>
8448
8449 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8450 struct user_fpsimd_state *.
8451 (aarch64_store_fpregset): Likewise.
8452
8453 2015-11-19 Yao Qi <yao.qi@linaro.org>
8454
8455 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8456 struct user_pt_regs *.
8457 (aarch64_store_gregset): Likewise.
8458
8459 2015-11-18 Pedro Alves <palves@redhat.com>
8460
8461 * Makefile.in (all_object_files): Add $IPA_OBJS.
8462
8463 2015-11-17 Pedro Alves <palves@redhat.com>
8464
8465 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8466 GDB_SIGNAL_0 and gdb_signal_to_string.
8467
8468 2015-11-17 Pedro Alves <palves@redhat.com>
8469
8470 * win32-low.c (handle_output_debug_string): Remove parameter.
8471 (win32_kill): Remove our_status local and adjust call to
8472 handle_output_debug_string.
8473 (get_child_debug_event): Adjust call to
8474 handle_output_debug_string.
8475
8476 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8477
8478 * linux-mips-low.c (mips_fill_gregset): Add cast.
8479 (mips_store_gregset): Likewise.
8480 (mips_fill_fpregset): Likewise.
8481 (mips_store_fpregset): Likewise.
8482
8483 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8484
8485 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8486 priv.
8487
8488 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8489
8490 * linux-mips-low.c (mips_linux_new_thread): Change type of
8491 watch_type to enum target_hw_bp_type.
8492
8493 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8494
8495 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8496 Change return type to arm_hwbp_type.
8497
8498 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8499
8500 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8501 (arm_store_gregset): Likewise.
8502 * linux-arm-low.c (arm_get_hwcap): Likewise.
8503 (arm_read_description): Likewise.
8504
8505 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8506
8507 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8508
8509 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8510
8511 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8512 (ppc_fill_vsxregset): Likewise.
8513 (ppc_store_vsxregset): Likewise.
8514 (ppc_fill_vrregset): Likewise.
8515 (ppc_store_vrregset): Likewise.
8516 (ppc_fill_evrregset): Likewise.
8517 (ppc_store_evrregset): Likewise.
8518
8519 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8520
8521 * linux-ppc-low.c (ppc_usrregs_info): Remove
8522 forward-declaration.
8523 (ppc_arch_setup): Move lower in file.
8524
8525 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8526
8527 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8528 (ps_pdwrite): Likewise.
8529
8530 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8531
8532 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8533 to after assert checks.
8534
8535 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8536
8537 * proc-service.c (ps_pdread): Add/adjust casts.
8538 (ps_pdwrite): Add/adjust casts.
8539
8540 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8541
8542 * server.c (handle_search_memory_1): Cast return value of
8543 memmem.
8544
8545 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8546
8547 * server.c (write_qxfer_response): Change type of data to
8548 gdb_byte *.
8549
8550 2015-10-29 Pedro Alves <palves@redhat.com>
8551
8552 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8553
8554 2015-10-29 Pedro Alves <palves@redhat.com>
8555
8556 * tracepoint.c (clear_installed_tracepoints): Add casts.
8557
8558 2015-10-29 Pedro Alves <palves@redhat.com>
8559
8560 * server.c (handle_v_cont, process_serial_event): Add enum
8561 gdb_signal casts to signal parsing code.
8562
8563 2015-10-29 Pedro Alves <palves@redhat.com>
8564
8565 * linux-low.h (NULL_REGSET): Define.
8566 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8567 * linux-arm-low.c (arm_regsets): Likewise.
8568 * linux-crisv32-low.c (cris_regsets): Likewise.
8569 * linux-m68k-low.c (m68k_regsets): Likewise.
8570 * linux-mips-low.c (mips_regsets): Likewise.
8571 * linux-nios2-low.c (nios2_regsets): Likewise.
8572 * linux-ppc-low.c (ppc_regsets): Likewise.
8573 * linux-s390-low.c (s390_regsets): Likewise.
8574 * linux-sh-low.c (sh_regsets): Likewise.
8575 * linux-sparc-low.c (sparc_regsets): Likewise.
8576 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8577 * linux-tile-low.c (tile_regsets): Likewise.
8578 * linux-x86-low.c (x86_regsets): Likewise.
8579 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8580
8581 2015-10-29 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.h (NULL_REGSET): Define.
8584 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8585 * linux-arm-low.c (arm_regsets): Likewise.
8586 * linux-crisv32-low.c (cris_regsets): Likewise.
8587 * linux-m68k-low.c (m68k_regsets): Likewise.
8588 * linux-mips-low.c (mips_regsets): Likewise.
8589 * linux-nios2-low.c (nios2_regsets): Likewise.
8590 * linux-ppc-low.c (ppc_regsets): Likewise.
8591 * linux-s390-low.c (s390_regsets): Likewise.
8592 * linux-sh-low.c (sh_regsets): Likewise.
8593 * linux-sparc-low.c (sparc_regsets): Likewise.
8594 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8595 * linux-tile-low.c (tile_regsets): Likewise.
8596 * linux-x86-low.c (x86_regsets): Likewise.
8597 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8598
8599 2015-10-26 Doug Evans <dje@google.com>
8600
8601 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8602
8603 2015-10-26 Doug Evans <dje@google.com>
8604
8605 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8606
8607 2015-10-26 Doug Evans <dje@google.com>
8608
8609 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8610 for debug_printf.
8611 (attach_thread, find_new_threads_callback): Ditto.
8612
8613 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8614
8615 * mem-break.h (set_breakpoint_data): Remove.
8616
8617 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8618
8619 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8620 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8621 (initialize_low): Remove set_breakpoint_data call.
8622 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8623 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8624 (initialize_low): Remove set_breakpoint_data call.
8625 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8626 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8627 (initialize_low): Remove set_breakpoint_data call.
8628
8629 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8630
8631 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8632 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8633 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8634 * target.h (target_breakpoint_kind_from_pc): New macro.
8635
8636 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8637
8638 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8639 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8640 the default breakpoint kind.
8641
8642 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8643
8644 * linux-arm-low.c (arm_supports_z_point_type): Add software
8645 breakpoint support.
8646
8647 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8648
8649 * linux-arm-low.c: Refactor breakpoint definitions.
8650 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8651 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8652
8653 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8654
8655 * Makefile.in: Add arm.c/o.
8656 * configure.srv: Likewise.
8657 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8658 (arm_breakpoint_kind_from_pc): New function.
8659 (arm_sw_breakpoint_from_kind): Return proper kind.
8660 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8661
8662 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8663
8664 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8665 removal.
8666 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8667 (struct raw_breakpoint) <size>: Remove.
8668 (struct raw_breakpoint) <kind>: Add.
8669 (bp_size): New function.
8670 (bp_opcode): Likewise.
8671 (find_raw_breakpoint_at): Adjust for kind.
8672 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8673 (remove_memory_breakpoint): Adjust for kind call bp_size.
8674 (set_raw_breakpoint_at): Adjust for kind.
8675 (set_breakpoint): Likewise.
8676 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8677 (delete_raw_breakpoint): Adjust for kind.
8678 (delete_breakpoint): Likewise.
8679 (find_gdb_breakpoint): Likewise.
8680 (set_gdb_breakpoint_1): Likewise.
8681 (set_gdb_breakpoint): Likewise.
8682 (delete_gdb_breakpoint_1): Likewise.
8683 (delete_gdb_breakpoint): Likewise.
8684 (uninsert_raw_breakpoint): Likewise.
8685 (reinsert_raw_breakpoint): Likewise.
8686 (set_breakpoint_data): Remove.
8687 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8688 (check_mem_read): Adjust for kind call bp_size.
8689 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8690 (clone_one_breakpoint): Adjust for kind.
8691 * mem-break.h (set_gdb_breakpoint): Likewise.
8692 (delete_gdb_breakpoint): Likewise.
8693 * server.c (process_serial_event): Likewise.
8694
8695 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8696
8697 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8698 (struct linux_target_ops) <breakpoint>: Remove.
8699 (struct linux_target_ops) <breakpoint_len>: Remove.
8700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8702 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8703 (arm_sw_breakpoint_from_kind): New function.
8704 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8705 (struct linux_target_ops) <breakpoint>: Remove.
8706 (struct linux_target_ops) <breakpoint_len>: Remove.
8707 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8708 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8709 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8710 (struct linux_target_ops) <breakpoint>: Remove.
8711 (struct linux_target_ops) <breakpoint_len>: Remove.
8712 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8713 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8714 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8715 (struct linux_target_ops) <breakpoint>: Remove.
8716 (struct linux_target_ops) <breakpoint_len>: Remove.
8717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8719 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8720 and sw_breakpoint_from_kind to increment the pc.
8721 (linux_breakpoint_kind_from_pc): New function.
8722 (linux_sw_breakpoint_from_kind): New function.
8723 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8724 (initialize_low): Call breakpoint_kind_from_pc and
8725 sw_breakpoint_from_kind to replace breakpoint_data/len.
8726 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8727 New field.
8728 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8729 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8730 (struct linux_target_ops) <breakpoint>: Remove.
8731 (struct linux_target_ops) <breakpoint_len>: Remove.
8732 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8733 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8734 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8735 (struct linux_target_ops) <breakpoint>: Remove.
8736 (struct linux_target_ops) <breakpoint_len>: Remove.
8737 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8738 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8739 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8740 (struct linux_target_ops) <breakpoint>: Remove.
8741 (struct linux_target_ops) <breakpoint_len>: Remove.
8742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8743 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8744 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8745 (struct linux_target_ops) <breakpoint>: Remove.
8746 (struct linux_target_ops) <breakpoint_len>: Remove.
8747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8748 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8749 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8750 (struct linux_target_ops) <breakpoint>: Remove.
8751 (struct linux_target_ops) <breakpoint_len>: Remove.
8752 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8753 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8754 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8755 (struct linux_target_ops) <breakpoint>: Remove.
8756 (struct linux_target_ops) <breakpoint_len>: Remove.
8757 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8758 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8759 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8760 (struct linux_target_ops) <breakpoint>: Remove.
8761 (struct linux_target_ops) <breakpoint_len>: Remove.
8762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8764 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8765 (struct linux_target_ops) <breakpoint>: Remove.
8766 (struct linux_target_ops) <breakpoint_len>: Remove.
8767 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8768 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8769 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8770 (struct linux_target_ops) <breakpoint>: Remove.
8771 (struct linux_target_ops) <breakpoint_len>: Remove.
8772 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8773 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8774 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8775 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8776 (struct linux_target_ops) <breakpoint>: Remove.
8777 (struct linux_target_ops) <breakpoint_len>: Remove.
8778 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8779 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8780 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8781 (struct linux_target_ops) <breakpoint>: Remove.
8782 (struct linux_target_ops) <breakpoint_len>: Remove.
8783 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8784 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8785
8786 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8787
8788 * linux-cris-low.c (cris_get_pc): Remove void arg.
8789
8790 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8791
8792 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8793 variable name.
8794
8795 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8796
8797 * inferiors.c (thread_pid_matches_callback): New function.
8798 (find_thread_process): New function.
8799 (remove_thread): Reset current_thread.
8800 (remove_process): Assert threads have been removed first.
8801
8802 2015-10-15 Yao Qi <yao.qi@linaro.org>
8803
8804 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8805 if it is 3.
8806 (aarch64_remove_point): Likewise.
8807 * regcache.c (regcache_register_size): New function.
8808
8809 2015-10-12 Yao Qi <yao.qi@linaro.org>
8810
8811 * linux-aarch64-low.c: Update all callers as emit_load_store
8812 is renamed to aarch64_emit_load_store.
8813
8814 2015-10-12 Yao Qi <yao.qi@linaro.org>
8815
8816 * linux-aarch64-low.c: Update all callers of function renaming
8817 from emit_insn to aarch64_emit_insn.
8818
8819 2015-10-12 Yao Qi <yao.qi@linaro.org>
8820
8821 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8822 arch/aarch64-insn.h.
8823 (struct aarch64_memory_operand): Likewise.
8824 (ENCODE): Likewise.
8825 (emit_insn): Move to arch/aarch64-insn.c.
8826 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8827 (emit_load_store): Move to arch/aarch64-insn.c.
8828 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8829 (can_encode_int32): Remove.
8830
8831 2015-10-12 Yao Qi <yao.qi@linaro.org>
8832
8833 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8834 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8835 (aarch64_relocate_instruction): Likewise.
8836 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8837 (struct aarch64_insn_visitor): Likewise.
8838
8839 2015-10-12 Yao Qi <yao.qi@linaro.org>
8840
8841 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8842 (struct aarch64_insn_visitor): New.
8843 (struct aarch64_insn_relocation_data): New.
8844 (aarch64_ftrace_insn_reloc_b): New function.
8845 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8846 (aarch64_ftrace_insn_reloc_cb): Likewise.
8847 (aarch64_ftrace_insn_reloc_tb): Likewise.
8848 (aarch64_ftrace_insn_reloc_adr): Likewise.
8849 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8850 (aarch64_ftrace_insn_reloc_others): Likewise.
8851 (visitor): New.
8852 (aarch64_relocate_instruction): Use visitor.
8853
8854 2015-10-12 Yao Qi <yao.qi@linaro.org>
8855
8856 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8857 int. Add argument buf.
8858 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8859 aarch64_relocate_instruction.
8860
8861 2015-10-12 Yao Qi <yao.qi@linaro.org>
8862
8863 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8864 argument insn. Remove local variable insn. Don't call
8865 target_read_uint32.
8866 (aarch64_install_fast_tracepoint_jump_pad): Call
8867 target_read_uint32.
8868
8869 2015-09-30 Yao Qi <yao.qi@linaro.org>
8870
8871 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8872 (emit_load_store_pair): Likewise.
8873
8874 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8875
8876 * dll.c (match_dll): Add cast(s).
8877 (unloaded_dll): Likewise.
8878 * linux-low.c (second_thread_of_pid_p): Likewise.
8879 (delete_lwp_callback): Likewise.
8880 (count_events_callback): Likewise.
8881 (select_event_lwp_callback): Likewise.
8882 (linux_set_resume_request): Likewise.
8883 * server.c (accumulate_file_name_length): Likewise.
8884 (emit_dll_description): Likewise.
8885 (handle_qxfer_threads_worker): Likewise.
8886 (visit_actioned_threads): Likewise.
8887 * thread-db.c (any_thread_of): Likewise.
8888 * tracepoint.c (same_process_p): Likewise.
8889 (match_blocktype): Likewise.
8890 (build_traceframe_info_xml): Likewise.
8891
8892 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8893
8894 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
8895 assignment.
8896 (gdb_unparse_agent_expr): Likewise.
8897 * hostio.c (require_data): Likewise.
8898 (handle_pread): Likewise.
8899 * linux-low.c (disable_regset): Likewise.
8900 (fetch_register): Likewise.
8901 (store_register): Likewise.
8902 (get_dynamic): Likewise.
8903 (linux_qxfer_libraries_svr4): Likewise.
8904 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
8905 (set_fast_tracepoint_jump): Likewise.
8906 (uninsert_fast_tracepoint_jumps_at): Likewise.
8907 (reinsert_fast_tracepoint_jumps_at): Likewise.
8908 (validate_inserted_breakpoint): Likewise.
8909 (clone_agent_expr): Likewise.
8910 * regcache.c (init_register_cache): Likewise.
8911 * remote-utils.c (putpkt_binary_1): Likewise.
8912 (decode_M_packet): Likewise.
8913 (decode_X_packet): Likewise.
8914 (look_up_one_symbol): Likewise.
8915 (relocate_instruction): Likewise.
8916 (monitor_output): Likewise.
8917 * server.c (handle_search_memory): Likewise.
8918 (handle_qxfer_exec_file): Likewise.
8919 (handle_qxfer_libraries): Likewise.
8920 (handle_qxfer): Likewise.
8921 (handle_query): Likewise.
8922 (handle_v_cont): Likewise.
8923 (handle_v_run): Likewise.
8924 (captured_main): Likewise.
8925 * target.c (write_inferior_memory): Likewise.
8926 * thread-db.c (try_thread_db_load_from_dir): Likewise.
8927 * tracepoint.c (init_trace_buffer): Likewise.
8928 (add_tracepoint_action): Likewise.
8929 (add_traceframe): Likewise.
8930 (add_traceframe_block): Likewise.
8931 (cmd_qtdpsrc): Likewise.
8932 (cmd_qtdv): Likewise.
8933 (cmd_qtstatus): Likewise.
8934 (response_source): Likewise.
8935 (response_tsv): Likewise.
8936 (cmd_qtnotes): Likewise.
8937 (gdb_collect): Likewise.
8938 (initialize_tracepoint): Likewise.
8939
8940 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8941
8942 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
8943 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
8944 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
8945 <NOP>: New.
8946 (enum aarch64_condition_codes): New enum.
8947 (w0): New static global.
8948 (fp): Likewise.
8949 (lr): Likewise.
8950 (struct aarch64_memory_operand) <type>: New
8951 MEMORY_OPERAND_POSTINDEX type.
8952 (postindex_memory_operand): New helper function.
8953 (emit_ret): New function.
8954 (emit_load_store_pair): New function, factored out of emit_stp
8955 with support for MEMORY_OPERAND_POSTINDEX.
8956 (emit_stp): Rewrite using emit_load_store_pair.
8957 (emit_ldp): New function.
8958 (emit_load_store): Likewise.
8959 (emit_ldr): Mention post-index instruction in comment.
8960 (emit_ldrh): New function.
8961 (emit_ldrb): New function.
8962 (emit_ldrsw): Mention post-index instruction in comment.
8963 (emit_str): Likewise.
8964 (emit_subs): New function.
8965 (emit_cmp): Likewise.
8966 (emit_and): Likewise.
8967 (emit_orr): Likewise.
8968 (emit_orn): Likewise.
8969 (emit_eor): Likewise.
8970 (emit_mvn): Likewise.
8971 (emit_lslv): Likewise.
8972 (emit_lsrv): Likewise.
8973 (emit_asrv): Likewise.
8974 (emit_mul): Likewise.
8975 (emit_sbfm): Likewise.
8976 (emit_sbfx): Likewise.
8977 (emit_ubfm): Likewise.
8978 (emit_ubfx): Likewise.
8979 (emit_csinc): Likewise.
8980 (emit_cset): Likewise.
8981 (emit_nop): Likewise.
8982 (emit_ops_insns): New helper function.
8983 (emit_pop): Likewise.
8984 (emit_push): Likewise.
8985 (aarch64_emit_prologue): New function.
8986 (aarch64_emit_epilogue): Likewise.
8987 (aarch64_emit_add): Likewise.
8988 (aarch64_emit_sub): Likewise.
8989 (aarch64_emit_mul): Likewise.
8990 (aarch64_emit_lsh): Likewise.
8991 (aarch64_emit_rsh_signed): Likewise.
8992 (aarch64_emit_rsh_unsigned): Likewise.
8993 (aarch64_emit_ext): Likewise.
8994 (aarch64_emit_log_not): Likewise.
8995 (aarch64_emit_bit_and): Likewise.
8996 (aarch64_emit_bit_or): Likewise.
8997 (aarch64_emit_bit_xor): Likewise.
8998 (aarch64_emit_bit_not): Likewise.
8999 (aarch64_emit_equal): Likewise.
9000 (aarch64_emit_less_signed): Likewise.
9001 (aarch64_emit_less_unsigned): Likewise.
9002 (aarch64_emit_ref): Likewise.
9003 (aarch64_emit_if_goto): Likewise.
9004 (aarch64_emit_goto): Likewise.
9005 (aarch64_write_goto_address): Likewise.
9006 (aarch64_emit_const): Likewise.
9007 (aarch64_emit_call): Likewise.
9008 (aarch64_emit_reg): Likewise.
9009 (aarch64_emit_pop): Likewise.
9010 (aarch64_emit_stack_flush): Likewise.
9011 (aarch64_emit_zero_ext): Likewise.
9012 (aarch64_emit_swap): Likewise.
9013 (aarch64_emit_stack_adjust): Likewise.
9014 (aarch64_emit_int_call_1): Likewise.
9015 (aarch64_emit_void_call_2): Likewise.
9016 (aarch64_emit_eq_goto): Likewise.
9017 (aarch64_emit_ne_goto): Likewise.
9018 (aarch64_emit_lt_goto): Likewise.
9019 (aarch64_emit_le_goto): Likewise.
9020 (aarch64_emit_gt_goto): Likewise.
9021 (aarch64_emit_ge_got): Likewise.
9022 (aarch64_emit_ops_impl): New static global variable.
9023 (aarch64_emit_ops): New target function, return
9024 &aarch64_emit_ops_impl.
9025 (struct linux_target_ops): Install it.
9026
9027 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9028
9029 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9030 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9031 aarch64-ipa.o.
9032 * linux-aarch64-ipa.c: New file.
9033 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9034 and endian.h.
9035 (aarch64_get_thread_area): New target method.
9036 (extract_signed_bitfield): New helper function.
9037 (aarch64_decode_ldr_literal): New function.
9038 (enum aarch64_opcodes): New enum.
9039 (struct aarch64_register): New struct.
9040 (struct aarch64_operand): New struct.
9041 (x0): New static global.
9042 (x1): Likewise.
9043 (x2): Likewise.
9044 (x3): Likewise.
9045 (x4): Likewise.
9046 (w2): Likewise.
9047 (ip0): Likewise.
9048 (sp): Likewise.
9049 (xzr): Likewise.
9050 (aarch64_register): New helper function.
9051 (register_operand): Likewise.
9052 (immediate_operand): Likewise.
9053 (struct aarch64_memory_operand): New struct.
9054 (offset_memory_operand): New helper function.
9055 (preindex_memory_operand): Likewise.
9056 (enum aarch64_system_control_registers): New enum.
9057 (ENCODE): New macro.
9058 (emit_insn): New helper function.
9059 (emit_b): New function.
9060 (emit_bcond): Likewise.
9061 (emit_cb): Likewise.
9062 (emit_tb): Likewise.
9063 (emit_blr): Likewise.
9064 (emit_stp): Likewise.
9065 (emit_ldp_q_offset): Likewise.
9066 (emit_stp_q_offset): Likewise.
9067 (emit_load_store): Likewise.
9068 (emit_ldr): Likewise.
9069 (emit_ldrsw): Likewise.
9070 (emit_str): Likewise.
9071 (emit_ldaxr): Likewise.
9072 (emit_stxr): Likewise.
9073 (emit_stlr): Likewise.
9074 (emit_data_processing_reg): Likewise.
9075 (emit_data_processing): Likewise.
9076 (emit_add): Likewise.
9077 (emit_sub): Likewise.
9078 (emit_mov): Likewise.
9079 (emit_movk): Likewise.
9080 (emit_mov_addr): Likewise.
9081 (emit_mrs): Likewise.
9082 (emit_msr): Likewise.
9083 (emit_sevl): Likewise.
9084 (emit_wfe): Likewise.
9085 (append_insns): Likewise.
9086 (can_encode_int32_in): New helper function.
9087 (aarch64_relocate_instruction): New function.
9088 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9089 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9090 (struct linux_target_ops): Install aarch64_get_thread_area,
9091 aarch64_install_fast_tracepoint_jump_pad and
9092 aarch64_get_min_fast_tracepoint_insn_len.
9093
9094 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9095
9096 * Makefile.in (aarch64-insn.o): New rule.
9097 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9098
9099 2015-09-21 Yao Qi <yao.qi@linaro.org>
9100
9101 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9102
9103 2015-09-21 Yao Qi <yao.qi@linaro.org>
9104
9105 * tracepoint.c (max_jump_pad_size): Remove.
9106
9107 2015-09-18 Yao Qi <yao.qi@linaro.org>
9108
9109 * linux-aarch64-low.c: Don't include sys/uio.h.
9110 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9111
9112 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9113
9114 * tracepoint.c (eval_result_type): Change prototype.
9115 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9116
9117 2015-09-15 Pedro Alves <palves@redhat.com>
9118
9119 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9120 Check whether to report exec events instead of checking whether
9121 multiprocess is enabled.
9122
9123 2015-09-15 Pedro Alves <palves@redhat.com>
9124
9125 PR remote/18965
9126 * remote-utils.c (prepare_resume_reply): Merge
9127 TARGET_WAITKIND_VFORK_DONE switch case with the
9128 TARGET_WAITKIND_FORKED case.
9129
9130 2015-09-15 Yao Qi <yao.qi@linaro.org>
9131
9132 * server.c (handle_query): Check string comparison using
9133 "else if" instead of "if".
9134
9135 2015-09-15 Yao Qi <yao.qi@linaro.org>
9136
9137 * server.c (vCont_supported): New global variable.
9138 (handle_query): Set vCont_supported to 1 if "vContSupported+"
9139 matches. Append ";vContSupported+" to own_buf.
9140 (handle_v_requests): Append ";s;S" to own_buf if target supports
9141 hardware single step or vCont_supported is false.
9142 (capture_main): Set vCont_supported to zero.
9143
9144 2015-09-15 Yao Qi <yao.qi@linaro.org>
9145
9146 * linux-low.c (linux_supports_conditional_breakpoints): Rename
9147 it to ...
9148 (linux_supports_hardware_single_step): ... New function.
9149 (linux_target_ops): Update.
9150 * lynx-low.c (lynx_target_ops): Set field
9151 supports_hardware_single_step to target_can_do_hardware_single_step.
9152 * nto-low.c (nto_target_ops): Likewise.
9153 * spu-low.c (spu_target_ops): Likewise.
9154 * win32-low.c (win32_target_ops): Likewise.
9155 * target.c (target_can_do_hardware_single_step): New function.
9156 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9157 Remove. <supports_hardware_single_step>: New field.
9158 (target_supports_conditional_breakpoints): Remove.
9159 (target_supports_hardware_single_step): New macro.
9160 (target_can_do_hardware_single_step): Declare.
9161 * server.c (handle_query): Use target_supports_hardware_single_step
9162 instead of target_supports_conditional_breakpoints.
9163
9164 2015-09-15 Yao Qi <yao.qi@linaro.org>
9165
9166 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
9167 function.
9168 (struct linux_target_ops the_low_target): Install
9169 aarch64_linux_siginfo_fixup.
9170
9171 2015-09-11 Don Breazeal <donb@codesourcery.com>
9172 Luis Machado <lgustavo@codesourcery.com>
9173
9174 * linux-low.c (linux_mourn): Static declaration.
9175 (linux_arch_setup): Move in front of
9176 handle_extended_wait.
9177 (linux_arch_setup_thread): New function.
9178 (handle_extended_wait): Handle exec events. Call
9179 linux_arch_setup_thread. Make event_lwp argument a
9180 pointer-to-a-pointer.
9181 (check_zombie_leaders): Do not check stopped threads.
9182 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
9183 (linux_low_filter_event): Add lwp and thread for exec'ing
9184 non-leader thread if leader thread has been deleted.
9185 Refactor code into linux_arch_setup_thread and call it.
9186 Pass child lwp pointer by reference to handle_extended_wait.
9187 (linux_wait_for_event_filtered): Update comment.
9188 (linux_wait_1): Prevent clobbering exec event status.
9189 (linux_supports_exec_events): New function.
9190 (linux_target_ops) <supports_exec_events>: Initialize new member.
9191 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
9192 new member.
9193 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
9194 * server.c (report_exec_events): New global variable.
9195 (handle_query): Handle qSupported query for exec-events feature.
9196 (captured_main): Initialize report_exec_events.
9197 * server.h (report_exec_events): Declare new global variable.
9198 * target.h (struct target_ops) <supports_exec_events>: New
9199 member.
9200 (target_supports_exec_events): New macro.
9201 * win32-low.c (win32_target_ops) <supports_exec_events>:
9202 Initialize new member.
9203
9204 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
9205
9206 * linux-low.c (linux_low_enable_btrace): Remove.
9207 (linux_target_ops): Replace linux_low_enable_btrace with
9208 linux_enable_btrace.
9209
9210 2015-09-03 Yao Qi <yao.qi@linaro.org>
9211
9212 * linux-aarch64-low.c (aarch64_insert_point): Call
9213 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
9214 returns true.
9215
9216 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9217
9218 * linux-low.c (check_stopped_by_breakpoint): Use
9219 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
9220
9221 2015-08-27 Pedro Alves <palves@redhat.com>
9222
9223 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
9224
9225 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
9226
9227 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
9228 the XNEW-family equivalent.
9229 (compile_bytecodes): Likewise.
9230 * dll.c (loaded_dll): Likewise.
9231 * event-loop.c (append_callback_event): Likewise.
9232 (create_file_handler): Likewise.
9233 (create_file_event): Likewise.
9234 * hostio.c (handle_open): Likewise.
9235 * inferiors.c (add_thread): Likewise.
9236 (add_process): Likewise.
9237 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
9238 * linux-arm-low.c (arm_new_process): Likewise.
9239 (arm_new_thread): Likewise.
9240 * linux-low.c (add_to_pid_list): Likewise.
9241 (linux_add_process): Likewise.
9242 (handle_extended_wait): Likewise.
9243 (add_lwp): Likewise.
9244 (enqueue_one_deferred_signal): Likewise.
9245 (enqueue_pending_signal): Likewise.
9246 (linux_resume_one_lwp_throw): Likewise.
9247 (linux_resume_one_thread): Likewise.
9248 (linux_read_memory): Likewise.
9249 (linux_write_memory): Likewise.
9250 * linux-mips-low.c (mips_linux_new_process): Likewise.
9251 (mips_linux_new_thread): Likewise.
9252 (mips_add_watchpoint): Likewise.
9253 * linux-x86-low.c (initialize_low_arch): Likewise.
9254 * lynx-low.c (lynx_add_process): Likewise.
9255 * mem-break.c (set_raw_breakpoint_at): Likewise.
9256 (set_breakpoint): Likewise.
9257 (add_condition_to_breakpoint): Likewise.
9258 (add_commands_to_breakpoint): Likewise.
9259 (clone_agent_expr): Likewise.
9260 (clone_one_breakpoint): Likewise.
9261 * regcache.c (new_register_cache): Likewise.
9262 * remote-utils.c (look_up_one_symbol): Likewise.
9263 * server.c (queue_stop_reply): Likewise.
9264 (start_inferior): Likewise.
9265 (queue_stop_reply_callback): Likewise.
9266 (handle_target_event): Likewise.
9267 * spu-low.c (fetch_ppc_memory): Likewise.
9268 (store_ppc_memory): Likewise.
9269 * target.c (set_target_ops): Likewise.
9270 * thread-db.c (thread_db_load_search): Likewise.
9271 (try_thread_db_load_1): Likewise.
9272 * tracepoint.c (add_tracepoint): Likewise.
9273 (add_tracepoint_action): Likewise.
9274 (create_trace_state_variable): Likewise.
9275 (cmd_qtdpsrc): Likewise.
9276 (cmd_qtro): Likewise.
9277 (add_while_stepping_state): Likewise.
9278 * win32-low.c (child_add_thread): Likewise.
9279 (get_image_name): Likewise.
9280
9281 2015-08-25 Yao Qi <yao.qi@linaro.org>
9282
9283 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
9284
9285 2015-08-25 Yao Qi <yao.qi@linaro.org>
9286
9287 * Makefile.in (aarch64-linux.o): New rule.
9288 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
9289 srv_tgtobj.
9290 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
9291 (aarch64_init_debug_reg_state): Make it extern.
9292 (aarch64_linux_prepare_to_resume): Remove.
9293
9294 2015-08-25 Yao Qi <yao.qi@linaro.org>
9295
9296 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
9297 lwp_arch_private_info and ptid_of_lwp.
9298
9299 2015-08-25 Yao Qi <yao.qi@linaro.org>
9300
9301 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9302 Find proc_info by find_process_pid. All callers updated.
9303
9304 2015-08-25 Yao Qi <yao.qi@linaro.org>
9305
9306 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9307 Remove.
9308 (debug_reg_change_callback): Remove.
9309 (aarch64_notify_debug_reg_change): Remove.
9310
9311 2015-08-25 Yao Qi <yao.qi@linaro.org>
9312
9313 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
9314 Call current_lwp_ptid.
9315
9316 2015-08-25 Yao Qi <yao.qi@linaro.org>
9317
9318 * linux-aarch64-low.c (debug_reg_change_callback): Use
9319 debug_printf.
9320
9321 2015-08-25 Yao Qi <yao.qi@linaro.org>
9322
9323 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9324
9325 2015-08-25 Yao Qi <yao.qi@linaro.org>
9326
9327 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9328
9329 2015-08-25 Yao Qi <yao.qi@linaro.org>
9330
9331 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9332 the code.
9333
9334 2015-08-25 Yao Qi <yao.qi@linaro.org>
9335
9336 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9337 Remove.
9338 (debug_reg_change_callback): Remove argument entry and add argument
9339 lwp. Remove local variable thread. Don't print thread id in the
9340 debugging output. Don't check whether pid of thread equals to pid.
9341 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9342 iterate_over_lwps instead find_inferior.
9343
9344 2015-08-24 Pedro Alves <palves@redhat.com>
9345
9346 * inferiors.c (get_first_process): New function.
9347 * inferiors.h (get_first_process): New declaration.
9348 * remote-utils.c (read_ptid): Default to the first process in the
9349 list, instead of to the current thread's process.
9350
9351 2015-08-24 Pedro Alves <palves@redhat.com>
9352
9353 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9354 * event-loop.c: Likewise.
9355 * remote-utils.c: Likewise.
9356 * tracepoint.c: Likewise.
9357
9358 2015-08-24 Pedro Alves <palves@redhat.com>
9359
9360 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9361 ptid_get_lwp.
9362
9363 2015-08-21 Pedro Alves <palves@redhat.com>
9364
9365 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9366 instead of literal 1.
9367
9368 2015-08-21 Pedro Alves <palves@redhat.com>
9369
9370 * tdesc.c (default_description): Explicitly zero-initialize.
9371
9372 2015-08-21 Pedro Alves <palves@redhat.com>
9373
9374 PR gdb/18749
9375 * inferiors.c (remove_thread): Discard any pending stop reply for
9376 this thread.
9377 * server.c (remove_all_on_match_pid): Rename to ...
9378 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9379 instead of a pid.
9380 (discard_queued_stop_replies): Change parameter to a ptid. Now
9381 extern.
9382 (handle_v_kill, kill_inferior_callback, captured_main)
9383 (process_serial_event): Adjust.
9384 * server.h (discard_queued_stop_replies): Declare.
9385
9386 2015-08-21 Pedro Alves <palves@redhat.com>
9387
9388 * linux-low.c (wait_for_sigstop): Always switch to no thread
9389 selected if the previously current thread dies.
9390 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9391 process instead of the current thread's.
9392 * remote-utils.c (input_interrupt): Don't check if there's no
9393 current thread.
9394 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9395 current thread to the general thread fails, error out.
9396 (handle_qxfer_auxv, handle_qxfer_libraries)
9397 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9398 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9399 (handle_query): Check if there's a thread selected instead of
9400 checking whether there's any thread in the thread list.
9401 (handle_qxfer_threads, handle_qxfer_btrace)
9402 (handle_qxfer_btrace_conf): Don't error out early if there's no
9403 thread in the thread list.
9404 (handle_v_cont, myresume): Don't set the current thread to the
9405 continue thread.
9406 (process_serial_event) <Hg handling>: Also set thread_id if the
9407 previous general thread is still alive.
9408 (process_serial_event) <g/G handling>: If setting the current
9409 thread to the general thread fails, error out.
9410 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9411 thread's lwp instead of the current thread's.
9412 * target.c (set_desired_thread): If the desired thread was not
9413 found, leave the current thread pointing to NULL. Return an int
9414 (boolean) indicating success.
9415 * target.h (set_desired_thread): Change return type to int.
9416
9417 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9418
9419 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9420 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9421 #includes.
9422 (ps_get_thread_area): New function.
9423
9424 2015-08-19 Gary Benson <gbenson@redhat.com>
9425
9426 * hostio.c (handle_pread): Do not attempt to read more data
9427 than hostio_reply_with_data can fit in a packet.
9428
9429 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9430
9431 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9432
9433 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9434
9435 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9436
9437 2015-08-06 Pedro Alves <palves@redhat.com>
9438
9439 * tracepoint.c (expr_eval_result): Now an int.
9440
9441 2015-08-06 Pedro Alves <palves@redhat.com>
9442
9443 * gdbthread.h (struct regcache): Forward declare.
9444 (struct thread_info) <regcache_data>: Now a struct regcache
9445 pointer.
9446 * inferiors.c (inferior_regcache_data)
9447 (set_inferior_regcache_data): Now work with struct regcache
9448 pointers.
9449 * inferiors.h (struct regcache): Forward declare.
9450 (inferior_regcache_data, set_inferior_regcache_data): Now work
9451 with struct regcache pointers.
9452 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9453 (free_register_cache_thread): Remove struct regcache pointer
9454 casts.
9455
9456 2015-08-06 Pedro Alves <palves@redhat.com>
9457
9458 * server.c (captured_main): On error, print the exception message
9459 to stderr, and if run_once is set, throw a quit.
9460
9461 2015-08-06 Pedro Alves <palves@redhat.com>
9462
9463 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9464 the current thread.
9465
9466 2015-08-06 Pedro Alves <palves@redhat.com>
9467
9468 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9469 reading beyond the passed in buffer length.
9470
9471 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9472
9473 * tracepoint.c (symbol_list) <required>: Remove.
9474
9475 2015-08-06 Pedro Alves <palves@redhat.com>
9476
9477 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9478 count if stopping and suspending threads.
9479 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9480 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9481 (linux_detach): Complete an ongoing step-over.
9482 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9483 throughout.
9484 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9485 (linux_wait_1): If passing a signal to the inferior after
9486 finishing a step-over, unsuspend and re-resume all lwps. If we
9487 see a single-step event but the thread should be continuing, don't
9488 pass the trap to gdb.
9489 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9490 internal_error instead of gdb_assert.
9491 (enqueue_pending_signal): New function.
9492 (check_ptrace_stopped_lwp_gone): Add debug output.
9493 (start_step_over): Use internal_error instead of gdb_assert.
9494 (complete_ongoing_step_over): New function.
9495 (linux_resume_one_thread): Don't resume a suspended thread.
9496 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9497 it stepping.
9498
9499 2015-08-06 Pedro Alves <palves@redhat.com>
9500
9501 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9502 (linux_thread_alive): Use lwp_is_marked_dead.
9503 (extended_event_reported): Delete.
9504 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9505 instead of extended_event_reported.
9506 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9507 as well.
9508 (lwp_is_marked_dead): New function.
9509 (lwp_running): Use lwp_is_marked_dead.
9510 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9511 comment.
9512
9513 2015-08-06 Pedro Alves <palves@redhat.com>
9514
9515 * linux-low.c (linux_wait_1): Move fork event output out of the
9516 !report_to_gdb check. Pass event_child->waitstatus to
9517 target_waitstatus_to_string instead of ourstatus.
9518
9519 2015-08-04 Yao Qi <yao.qi@linaro.org>
9520
9521 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9522 if current_thread is 32 bit.
9523
9524 2015-08-04 Yao Qi <yao.qi@linaro.org>
9525
9526 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9527 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9528 * server.c (extended_protocol): Remove "static".
9529 * server.h (extended_protocol): Declare it.
9530
9531 2015-08-04 Yao Qi <yao.qi@linaro.org>
9532
9533 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9534 both aarch64 and aarch32.
9535 (aarch64_set_pc): Likewise.
9536
9537 2015-08-04 Yao Qi <yao.qi@linaro.org>
9538
9539 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9540 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9541 arm-with-neon.xml to srv_xmlfiles.
9542 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9543 (is_64bit_tdesc): New function.
9544 (aarch64_linux_read_description): New function.
9545 (aarch64_arch_setup): Call aarch64_linux_read_description.
9546 (regs_info): Rename to regs_info_aarch64.
9547 (aarch64_regs_info): Return right regs_info.
9548 (initialize_low_arch): Call initialize_low_arch_aarch32.
9549
9550 2015-08-04 Yao Qi <yao.qi@linaro.org>
9551
9552 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9553 * linux-aarch32-low.c: New file.
9554 * linux-aarch32-low.h: New file.
9555 * linux-arm-low.c (arm_fill_gregset): Move it to
9556 linux-aarch32-low.c.
9557 (arm_store_gregset): Likewise.
9558 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9559 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9560 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9561 (regs_info): Rename to regs_info_arm.
9562 (arm_regs_info): Return regs_info_aarch32 if
9563 have_ptrace_getregset is 1 and target description is
9564 arm_with_neon or arm_with_vfpv3.
9565 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9566 Call initialize_low_arch_aarch32 instead.
9567
9568 2015-08-04 Yao Qi <yao.qi@linaro.org>
9569
9570 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9571 * linux-low.c: ... here.
9572 * linux-low.h (have_ptrace_getregset): Declare it.
9573
9574 2015-08-04 Pedro Alves <palves@redhat.com>
9575
9576 * thread-db.c (struct thread_db): Use new typedefs.
9577 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9578 CHK calls.
9579 (disable_thread_event_reporting): Cast result of dlsym to
9580 destination function pointer type.
9581 (thread_db_mourn): Use td_ta_delete_ftype.
9582
9583 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9584
9585 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9586 arch variant.
9587 (CDX_BREAKPOINT): Define for R2.
9588 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9589 (the_low_target): Add comments.
9590
9591 2015-07-30 Yao Qi <yao.qi@linaro.org>
9592
9593 * linux-arm-low.c (arm_hwcap): Remove it.
9594 (arm_read_description): New local variable arm_hwcap. Don't
9595 set arm_hwcap to zero.
9596
9597 2015-07-30 Yao Qi <yao.qi@linaro.org>
9598
9599 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9600 Use regcache->tdesc instead.
9601 (arm_store_wmmxregset): Likewise.
9602 (arm_fill_vfpregset): Likewise.
9603 (arm_store_vfpregset): Likewise.
9604
9605 2015-07-30 Yao Qi <yao.qi@linaro.org>
9606
9607 * linux-arm-low.c: Include arch/arm.h.
9608 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9609 (arm_store_gregset): Likewise.
9610
9611 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9612
9613 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9614 ptrace's 4th parameter.
9615
9616 2015-07-27 Yao Qi <yao.qi@linaro.org>
9617
9618 * configure.srv (case aarch64*-*-linux*): Don't set
9619 srv_linux_usrregs.
9620
9621 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9622
9623 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9624 sys/ptrace.h.
9625 * linux-arm-low.c: Likewise.
9626 * linux-cris-low.c: Likewise.
9627 * linux-crisv32-low.c: Likewise.
9628 * linux-low.c: Likewise.
9629 * linux-m68k-low.c: Likewise.
9630 * linux-mips-low.c: Likewise.
9631 * linux-nios2-low.c: Likewise.
9632 * linux-s390-low.c: Likewise.
9633 * linux-sparc-low.c: Likewise.
9634 * linux-tic6x-low.c: Likewise.
9635 * linux-tile-low.c: Likewise.
9636 * linux-x86-low.c: Likewise.
9637
9638 2015-07-24 Pedro Alves <palves@redhat.com>
9639
9640 * config.in: Regenerate.
9641 * configure: Regenerate.
9642
9643 2015-07-24 Pedro Alves <palves@redhat.com>
9644
9645 * acinclude.m4: Include ../ptrace.m4.
9646 * configure.ac: Call GDB_AC_PTRACE.
9647 * config.in, configure: Regenerate.
9648
9649 2015-07-24 Yao Qi <yao.qi@linaro.org>
9650
9651 * linux-low.c (linux_create_inferior): Remove setting to
9652 proc->priv->new_inferior.
9653 (linux_attach): Likewise.
9654 (linux_low_filter_event): Likewise.
9655 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9656
9657 2015-07-24 Yao Qi <yao.qi@linaro.org>
9658
9659 * linux-low.c (linux_arch_setup): New function.
9660 (linux_low_filter_event): If proc->tdesc is NULL and
9661 proc->attached is true, call the_low_target.arch_setup.
9662 Otherwise, keep status pending, and return.
9663 (linux_resume_one_lwp_throw): Don't call get_pc if
9664 thread->while_stepping isn't NULL. Don't call
9665 get_thread_regcache if proc->tdesc is NULL.
9666 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9667 (linux_target_ops): Install arch_setup.
9668 * server.c (start_inferior): Call the_target->arch_setup.
9669 * target.h (struct target_ops) <arch_setup>: New field.
9670 (target_arch_setup): New marco.
9671 * lynx-low.c (lynx_target_ops): Update.
9672 * nto-low.c (nto_target_ops): Update.
9673 * spu-low.c (spu_target_ops): Update.
9674 * win32-low.c (win32_target_ops): Update.
9675
9676 2015-07-24 Yao Qi <yao.qi@linaro.org>
9677
9678 * linux-low.c (linux_add_process): Don't set
9679 proc->priv->new_inferior.
9680 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9681 (linux_attach): Likewise.
9682
9683 2015-07-24 Yao Qi <yao.qi@linaro.org>
9684
9685 * server.c (start_inferior): Code refactor.
9686
9687 2015-07-24 Yao Qi <yao.qi@linaro.org>
9688
9689 * server.c (process_serial_event): Set general_thread.
9690
9691 2015-07-21 Yao Qi <yao.qi@linaro.org>
9692
9693 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9694 aarch64_linux_get_debug_reg_capacity.
9695
9696 2015-07-17 Yao Qi <yao.qi@linaro.org>
9697
9698 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9699 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9700 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9701 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9702 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9703 (AARCH64_HWP_ALIGNMENT): Likewise.
9704 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9705 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9706 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9707 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9708 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9709 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9710 (struct aarch64_debug_reg_state): Likewise.
9711 (struct arch_lwp_info): Likewise.
9712 (aarch64_align_watchpoint): Likewise.
9713 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9714 (aarch64_watchpoint_length): Likewise.
9715 (aarch64_point_encode_ctrl_reg): Likewise
9716 (aarch64_point_is_aligned): Likewise.
9717 (aarch64_align_watchpoint): Likewise.
9718 (aarch64_linux_set_debug_regs):
9719 (aarch64_dr_state_insert_one_point): Likewise.
9720 (aarch64_dr_state_remove_one_point): Likewise.
9721 (aarch64_handle_breakpoint): Likewise.
9722 (aarch64_handle_aligned_watchpoint): Likewise.
9723 (aarch64_handle_unaligned_watchpoint): Likewise.
9724 (aarch64_handle_watchpoint): Likewise.
9725
9726 2015-07-17 Yao Qi <yao.qi@linaro.org>
9727
9728 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9729 and don't aarch64_get_debug_reg_state. All callers update.
9730 (aarch64_handle_aligned_watchpoint): Likewise.
9731 (aarch64_handle_unaligned_watchpoint): Likewise.
9732 (aarch64_handle_watchpoint): Likewise.
9733 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9734 (aarch64_remove_point): Likewise.
9735
9736 2015-07-17 Yao Qi <yao.qi@linaro.org>
9737
9738 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9739 debug_printf.
9740 (aarch64_handle_unaligned_watchpoint): Likewise.
9741
9742 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9743
9744 Revert the previous 3 commits:
9745 Move gdb_regex* to common/
9746 Move linux_find_memory_regions_full & co.
9747 gdbserver build-id attribute generator
9748
9749 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9750 Jan Kratochvil <jan.kratochvil@redhat.com>
9751
9752 gdbserver build-id attribute generator.
9753 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9754 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9755 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9756 (find_phdr): New.
9757 (get_dynamic): Use find_pdhr to traverse program headers.
9758 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9759 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9760 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9761 (get_hex_build_id): New.
9762 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9763 to reply XML document.
9764
9765 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9766 Jan Kratochvil <jan.kratochvil@redhat.com>
9767
9768 * target.c: Include target/target-utils.h and fcntl.h.
9769 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9770 (target_fileio_read_stralloc): New functions.
9771
9772 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9773
9774 * Makefile.in (OBS): Add gdb_regex.o.
9775 (gdb_regex.o): New.
9776 * config.in: Rebuilt.
9777 * configure: Rebuilt.
9778
9779 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9780 Jan Kratochvil <jan.kratochvil@redhat.com>
9781
9782 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9783 * Makefile.in (OBS): Add target-utils.o.
9784 (linux-maps.o, target-utils.o): New.
9785 * configure.srv (srv_linux_obj): Add linux-maps.o.
9786
9787 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9788
9789 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9790 function, return 1.
9791 (the_low_target): Install it.
9792
9793 2015-07-14 Pedro Alves <palves@redhat.com>
9794
9795 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9796 Instead, ignore ECHILD, and throw an error for other errnos.
9797
9798 2015-07-10 Pedro Alves <palves@redhat.com>
9799
9800 * event-loop.c (struct callback_event) <data>: Change type to
9801 gdb_client_data instance instead of gdb_client_data pointer.
9802 (append_callback_event): Adjust.
9803
9804 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9805
9806 * linux-aarch64-low.c: Add comments for each linux_target_ops
9807 method. Remove comments already covered in target_ops and
9808 linux_target_ops definitions.
9809 (the_low_target): Add comments for each unimplemented method.
9810
9811 2015-07-09 Yao Qi <yao.qi@linaro.org>
9812
9813 * linux-aarch64-low.c (aarch64_regmap): Remove.
9814 (aarch64_usrregs_info): Remove.
9815 (regs_info): Set field usrregs to NULL.
9816
9817 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9818
9819 * linux-low.c: Include "rsp-low.h"
9820 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9821 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9822 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9823 (handle_btrace_enable_pt): New.
9824 (handle_btrace_general_set): Support "pt".
9825 (handle_btrace_conf_general_set): Support "pt:size".
9826
9827 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9828
9829 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9830 Z_PACKET_SW_BP.
9831
9832 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9833
9834 * linux-aarch64-low.c: Remove comment about endianness.
9835 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9836 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9837 memcmp.
9838
9839 2015-06-24 Gary Benson <gbenson@redhat.com>
9840
9841 * linux-i386-ipa.c (stdint.h): Do not include.
9842 * lynx-i386-low.c (stdint.h): Likewise.
9843 * lynx-ppc-low.c (stdint.h): Likewise.
9844 * mem-break.c (stdint.h): Likewise.
9845 * thread-db.c (stdint.h): Likewise.
9846 * tracepoint.c (stdint.h): Likewise.
9847 * win32-low.c (stdint.h): Likewise.
9848
9849 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9850
9851 * server.c (write_qxfer_response): Update call to
9852 remote_escape_output.
9853
9854 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9855 Jan Kratochvil <jan.kratochvil@redhat.com>
9856
9857 Merge multiple hex conversions.
9858 * gdbreplay.c (tohex): Rename to 'fromhex'.
9859 (logchar): Use fromhex.
9860
9861 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9862
9863 * server.c (handle_qxfer_libraries): Set `version' attribute for
9864 <library-list>.
9865
9866 2015-06-10 Gary Benson <gbenson@redhat.com>
9867
9868 * target.h (struct target_ops) <multifs_open>: New field.
9869 <multifs_unlink>: Likewise.
9870 <multifs_readlink>: Likewise.
9871 * linux-low.c (nat/linux-namespaces.h): New include.
9872 (linux_target_ops): Initialize the_target->multifs_open,
9873 the_target->multifs_unlink and the_target->multifs_readlink.
9874 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9875 * hostio.c (hostio_fs_pid): New static variable.
9876 (hostio_handle_new_gdb_connection): New function.
9877 (handle_setfs): Likewise.
9878 (handle_open): Use the_target->multifs_open as appropriate.
9879 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9880 (handle_readlink): Use the_target->multifs_readlink as
9881 appropriate.
9882 (handle_vFile): Handle vFile:setfs packets.
9883 * server.c (handle_query): Call hostio_handle_new_gdb_connection
9884 after target_handle_new_gdb_connection.
9885
9886 2015-06-10 Gary Benson <gbenson@redhat.com>
9887
9888 * configure.ac (AC_CHECK_FUNCS): Add setns.
9889 * config.in: Regenerate.
9890 * configure: Likewise.
9891 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
9892 (linux-namespaces.o): New rule.
9893 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9894
9895 2015-06-09 Gary Benson <gbenson@redhat.com>
9896
9897 * hostio.c (handle_open): Process mode argument with
9898 fileio_to_host_mode.
9899
9900 2015-06-01 Yao Qi <yao.qi@linaro.org>
9901
9902 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9903 * linux-x86-low.c: Likewise.
9904
9905 2015-05-28 Don Breazeal <donb@codesourcery.com>
9906
9907 * linux-low.c (handle_extended_wait): Initialize
9908 thread_info.last_resume_kind for new fork children.
9909
9910 2015-05-15 Pedro Alves <palves@redhat.com>
9911
9912 * target.h (target_handle_new_gdb_connection): Rewrite using if
9913 wrapped in do/while.
9914
9915 2015-05-14 Joel Brobecker <brobecker@adacore.com>
9916
9917 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9918 * configure, config.in: Regenerate.
9919 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
9920 Declare typedef.
9921
9922 2015-05-12 Don Breazeal <donb@codesourcery.com>
9923
9924 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
9925 PTRACE_EVENT_VFORK_DONE.
9926 (linux_low_ptrace_options, extended_event_reported): Add vfork
9927 events.
9928 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
9929 and "vforkdone" for RSP 'T' Stop Reply Packet.
9930 * server.h (report_vfork_events): Declare
9931 global variable.
9932
9933 2015-05-12 Don Breazeal <donb@codesourcery.com>
9934
9935 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
9936 (the_low_target) <new_fork>: Initialize new member.
9937 * linux-arm-low.c (arm_new_fork): New function.
9938 (the_low_target) <new_fork>: Initialize new member.
9939 * linux-low.c (handle_extended_wait): Call new target function
9940 new_fork.
9941 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
9942 * linux-mips-low.c (mips_add_watchpoint): New function
9943 extracted from mips_insert_point.
9944 (the_low_target) <new_fork>: Initialize new member.
9945 (mips_linux_new_fork): New function.
9946 (mips_insert_point): Call mips_add_watchpoint.
9947 * linux-x86-low.c (x86_linux_new_fork): New function.
9948 (the_low_target) <new_fork>: Initialize new member.
9949
9950 2015-05-12 Don Breazeal <donb@codesourcery.com>
9951
9952 * linux-low.c (handle_extended_wait): Implement return value,
9953 rename argument 'event_child' to 'event_lwp', handle
9954 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
9955 (linux_low_ptrace_options): New function.
9956 (linux_low_filter_event): Call linux_low_ptrace_options,
9957 use different argument fo linux_enable_event_reporting,
9958 use return value from handle_extended_wait.
9959 (extended_event_reported): New function.
9960 (linux_wait_1): Call extended_event_reported and set
9961 status to report fork events.
9962 (linux_write_memory): Add pid to debug message.
9963 (reset_lwp_ptrace_options_callback): New function.
9964 (linux_handle_new_gdb_connection): New function.
9965 (linux_target_ops): Initialize new structure member.
9966 * linux-low.h (struct lwp_info) <waitstatus>: New member.
9967 * lynx-low.c: Initialize new structure member.
9968 * remote-utils.c (prepare_resume_reply): Implement stop reason
9969 "fork" for "T" stop message.
9970 * server.c (handle_query): Call handle_new_gdb_connection.
9971 * server.h (report_fork_events): Declare global flag.
9972 * target.h (struct target_ops) <handle_new_gdb_connection>:
9973 New member.
9974 (target_handle_new_gdb_connection): New macro.
9975 * win32-low.c: Initialize new structure member.
9976
9977 2015-05-12 Don Breazeal <donb@codesourcery.com>
9978
9979 * mem-break.c (APPEND_TO_LIST): Define macro.
9980 (clone_agent_expr): New function.
9981 (clone_one_breakpoint): New function.
9982 (clone_all_breakpoints): New function.
9983 * mem-break.h: Declare new functions.
9984
9985 2015-05-12 Don Breazeal <donb@codesourcery.com>
9986
9987 * linux-low.c (linux_supports_fork_events): New function.
9988 (linux_supports_vfork_events): New function.
9989 (linux_target_ops): Initialize new structure members.
9990 (initialize_low): Call linux_check_ptrace_features.
9991 * lynx-low.c (lynx_target_ops): Initialize new structure
9992 members.
9993 * server.c (report_fork_events, report_vfork_events):
9994 New global flags.
9995 (handle_query): Add new features to qSupported packet and
9996 response.
9997 (captured_main): Initialize new global variables.
9998 * target.h (struct target_ops) <supports_fork_events>:
9999 New member.
10000 <supports_vfork_events>: New member.
10001 (target_supports_fork_events): New macro.
10002 (target_supports_vfork_events): New macro.
10003 * win32-low.c (win32_target_ops): Initialize new structure
10004 members.
10005
10006 2015-05-12 Gary Benson <gbenson@redhat.com>
10007
10008 * server.c (handle_qxfer_exec_file): Use current process
10009 if annex is empty.
10010
10011 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10012
10013 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10014 Remove HAVE_PTRACE_GETREGS conditionals.
10015 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10016 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10017
10018 2015-05-08 Yao Qi <yao.qi@linaro.org>
10019
10020 * linux-low.c (linux_supports_conditional_breakpoints): New
10021 function.
10022 (linux_target_ops): Install new target method.
10023 * lynx-low.c (lynx_target_ops): Install NULL hook for
10024 supports_conditional_breakpoints.
10025 * nto-low.c (nto_target_ops): Likewise.
10026 * spu-low.c (spu_target_ops): Likewise.
10027 * win32-low.c (win32_target_ops): Likewise.
10028 * server.c (handle_query): Check
10029 target_supports_conditional_breakpoints.
10030 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10031 New field.
10032 (target_supports_conditional_breakpoints): New macro.
10033
10034 2015-05-06 Pedro Alves <palves@redhat.com>
10035
10036 PR server/18081
10037 * server.c (start_inferior): If the process exits, mourn it.
10038
10039 2015-04-21 Gary Benson <gbenson@redhat.com>
10040
10041 * hostio.c (fileio_open_flags_to_host): Factored out to
10042 fileio_to_host_openflags in common/fileio.c. Single use
10043 updated.
10044
10045 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10046
10047 * linux-xtensa-low.c (xtensa_fill_gregset)
10048 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10049 XCHAL_HAVE_LOOP.
10050
10051 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10052
10053 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10054 (regs_info): Replace usrregs pointer with NULL.
10055
10056 2015-04-17 Gary Benson <gbenson@redhat.com>
10057
10058 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10059 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10060 * server.c (handle_qxfer_exec_file): New function.
10061 (qxfer_packets): Add exec-file entry.
10062 (handle_query): Report qXfer:exec-file:read as supported packet.
10063
10064 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10065
10066 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10067
10068 2015-04-09 Gary Benson <gbenson@redhat.com>
10069
10070 * hostio-errno.c (errno_to_fileio_error): Remove function.
10071 Update caller to use remote_fileio_to_fio_error.
10072
10073 2015-04-09 Yao Qi <yao.qi@linaro.org>
10074
10075 * linux-low.c (linux_insert_point): Call
10076 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10077 (linux_remove_point): Call remove_memory_breakpoint if type is
10078 raw_bkpt_type_sw.
10079 * linux-x86-low.c (x86_insert_point): Don't call
10080 insert_memory_breakpoint.
10081 (x86_remove_point): Don't call remove_memory_breakpoint.
10082
10083 2015-04-01 Pedro Alves <palves@redhat.com>
10084 Cleber Rosa <crosa@redhat.com>
10085
10086 * server.c (gdbserver_usage): Reorganize and extend the usage
10087 message.
10088
10089 2015-03-24 Pedro Alves <palves@redhat.com>
10090
10091 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10092 output. Also dump TRAP_TRACE.
10093 (linux_low_filter_event): In debug output, distinguish a
10094 resume_stop SIGSTOP from a delayed SIGSTOP.
10095
10096 2015-03-24 Gary Benson <gbenson@redhat.com>
10097
10098 * linux-x86-low.c (x86_linux_new_thread): Moved to
10099 nat/x86-linux.c.
10100 (x86_linux_prepare_to_resume): Likewise.
10101
10102 2015-03-24 Gary Benson <gbenson@redhat.com>
10103
10104 * Makefile.in (x86-linux-dregs.o): New rule.
10105 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10106 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10107 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10108 (x86_linux_dr_get): Likewise.
10109 (x86_linux_dr_set): Likewise.
10110 (update_debug_registers_callback): Likewise.
10111 (x86_linux_dr_set_addr): Likewise.
10112 (x86_linux_dr_get_addr): Likewise.
10113 (x86_linux_dr_set_control): Likewise.
10114 (x86_linux_dr_get_control): Likewise.
10115 (x86_linux_dr_get_status): Likewise.
10116 (x86_linux_update_debug_registers): Likewise.
10117
10118 2015-03-24 Gary Benson <gbenson@redhat.com>
10119
10120 * linux-x86-low.c (x86_linux_update_debug_registers):
10121 New function, factored out from...
10122 (x86_linux_prepare_to_resume): ...this.
10123
10124 2015-03-24 Gary Benson <gbenson@redhat.com>
10125
10126 * linux-x86-low.c (x86_linux_dr_get): Update comments.
10127 (x86_linux_dr_set): Likewise.
10128 (update_debug_registers_callback): Likewise.
10129 (x86_linux_dr_set_addr): Likewise.
10130 (x86_linux_dr_get_addr): Likewise.
10131 (x86_linux_dr_set_control): Likewise.
10132 (x86_linux_dr_get_control): Likewise.
10133 (x86_linux_dr_get_status): Likewise.
10134 (x86_linux_prepare_to_resume): Likewise.
10135
10136 2015-03-24 Gary Benson <gbenson@redhat.com>
10137
10138 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
10139 Use perror_with_name. Pass string through gettext.
10140 (x86_linux_dr_set): Likewise.
10141
10142 2015-03-24 Gary Benson <gbenson@redhat.com>
10143
10144 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
10145 (x86_linux_dr_set_addr): ...this.
10146 (x86_dr_low_get_addr): Rename to...
10147 (x86_linux_dr_get_addr): ...this.
10148 (x86_dr_low_set_control): Rename to...
10149 (x86_linux_dr_set_control): ...this.
10150 (x86_dr_low_get_control): Rename to...
10151 (x86_linux_dr_get_control): ...this.
10152 (x86_dr_low_get_status): Rename to...
10153 (x86_linux_dr_get_status): ...this.
10154 (x86_dr_low): Update with new function names.
10155
10156 2015-03-24 Gary Benson <gbenson@redhat.com>
10157
10158 * Makefile.in (x86-linux.o): New rule.
10159 * configure.srv: Add x86-linux.o to relevant targets.
10160 * linux-low.c (lwp_set_arch_private_info): New function.
10161 (lwp_arch_private_info): Likewise.
10162 * linux-x86-low.c: Include nat/x86-linux.h.
10163 (arch_lwp_info): Removed structure.
10164 (update_debug_registers_callback):
10165 Use lwp_set_debug_registers_changed.
10166 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
10167 and lwp_set_debug_registers_changed.
10168 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
10169
10170 2015-03-24 Gary Benson <gbenson@redhat.com>
10171
10172 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
10173 * linux-arm-low.c (arm_new_thread): Likewise.
10174 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
10175 * linux-mips-low.c (mips_linux_new_thread): Likewise.
10176 * linux-x86-low.c (x86_linux_new_thread): Likewise.
10177 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
10178
10179 2015-03-24 Gary Benson <gbenson@redhat.com>
10180
10181 * linux-low.c (ptid_of_lwp): New function.
10182 (lwp_is_stopped): Likewise.
10183 (lwp_stop_reason): Likewise.
10184 * linux-x86-low.c (update_debug_registers_callback):
10185 Use lwp_is_stopped.
10186 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
10187 lwp_stop_reason.
10188
10189 2015-03-24 Gary Benson <gbenson@redhat.com>
10190
10191 * linux-low.h (linux_stop_lwp): Remove declaration.
10192
10193 2015-03-24 Gary Benson <gbenson@redhat.com>
10194
10195 * linux-low.h: Include nat/linux-nat.h.
10196 * linux-low.c (iterate_over_lwps_args): New structure.
10197 (iterate_over_lwps_filter): New function.
10198 (iterate_over_lwps): Likewise.
10199 * linux-x86-low.c (update_debug_registers_callback):
10200 Update signature to what iterate_over_lwps expects.
10201 Remove PID check that iterate_over_lwps now performs.
10202 (x86_dr_low_set_addr): Use iterate_over_lwps.
10203 (x86_dr_low_set_control): Likewise.
10204
10205 2015-03-24 Gary Benson <gbenson@redhat.com>
10206
10207 * linux-x86-low.c (x86_debug_reg_state): New function.
10208 (x86_linux_prepare_to_resume): Use the above.
10209
10210 2015-03-24 Gary Benson <gbenson@redhat.com>
10211
10212 * linux-low.c (current_lwp_ptid): New function.
10213 * linux-x86-low.c: Include nat/linux-nat.h.
10214 (x86_dr_low_get_addr): Use current_lwp_ptid.
10215 (x86_dr_low_get_control): Likewise.
10216 (x86_dr_low_get_status): Likewise.
10217
10218 2015-03-20 Pedro Alves <palves@redhat.com>
10219
10220 * tracepoint.c (cmd_qtstatus): Make "str" const.
10221
10222 2015-03-20 Pedro Alves <palves@redhat.com>
10223
10224 * server.c (handle_general_set): Make "req_str" const.
10225
10226 2015-03-19 Pedro Alves <palves@redhat.com>
10227
10228 * linux-low.c (linux_resume_one_lwp): Rename to ...
10229 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
10230 instead call perror_with_name.
10231 (check_ptrace_stopped_lwp_gone): New function.
10232 (linux_resume_one_lwp): Reimplement as wrapper around
10233 linux_resume_one_lwp_throw that swallows errors if the LWP is
10234 gone.
10235
10236 2015-03-19 Pedro Alves <palves@redhat.com>
10237
10238 * linux-low.c (count_events_callback, select_event_lwp_callback):
10239 No longer check whether the thread has resume_stop as last resume
10240 kind.
10241
10242 2015-03-19 Pedro Alves <palves@redhat.com>
10243
10244 * linux-low.c (count_events_callback, select_event_lwp_callback):
10245 Use the lwp's status_pending_p field, not the thread's.
10246
10247 2015-03-19 Pedro Alves <palves@redhat.com>
10248
10249 * linux-low.c (select_event_lwp_callback): Update comments to
10250 no longer mention SIGTRAP.
10251
10252 2015-03-18 Gary Benson <gbenson@redhat.com>
10253
10254 * server.c (handle_query): Do not report vFile:fstat as supported.
10255
10256 2015-03-11 Gary Benson <gbenson@redhat.com>
10257
10258 * hostio.c (sys/types.h): New include.
10259 (sys/stat.h): Likewise.
10260 (common-remote-fileio.h): Likewise.
10261 (handle_fstat): New function.
10262 (handle_vFile): Handle vFile:fstat packets.
10263
10264 2015-03-11 Gary Benson <gbenson@redhat.com>
10265
10266 * configure.ac (AC_CHECK_MEMBERS): Add checks for
10267 struct stat.st_blocks and struct stat.st_blksize.
10268 * configure: Regenerate.
10269 * config.in: Likewise.
10270 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
10271 (OBS): Add common-remote-fileio.o.
10272 (common-remote-fileio.o): New rule.
10273
10274 2015-03-09 Pedro Alves <palves@redhat.com>
10275
10276 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
10277 'struct sockaddr' pointer in 'accept' call.
10278
10279 2015-03-09 Pedro Alves <palves@redhat.com>
10280
10281 Revert:
10282 2015-03-07 Pedro Alves <palves@redhat.com>
10283 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10284 or <winsock2.h> here. Instead include "gdb_socket.h".
10285 (remote_open): Use union gdb_sockaddr_u.
10286 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10287 or <winsock2.h> here. Instead include "gdb_socket.h".
10288 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10289 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10290 or <sys/un.h>.
10291 (init_named_socket, gdb_agent_helper_thread): Use union
10292 gdb_sockaddr_u.
10293
10294 2015-03-07 Pedro Alves <palves@redhat.com>
10295
10296 * configure.ac (build_warnings): Move
10297 -Wdeclaration-after-statement to the C-specific set.
10298 * configure: Regenerate.
10299
10300 2015-03-07 Pedro Alves <palves@redhat.com>
10301
10302 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
10303 or <winsock2.h> here. Instead include "gdb_socket.h".
10304 (remote_open): Use union gdb_sockaddr_u.
10305 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
10306 or <winsock2.h> here. Instead include "gdb_socket.h".
10307 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
10308 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10309 or <sys/un.h>.
10310 (init_named_socket, gdb_agent_helper_thread): Use union
10311 gdb_sockaddr_u.
10312
10313 2015-03-07 Pedro Alves <palves@redhat.com>
10314
10315 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
10316 instead.
10317
10318 2015-03-06 Yao Qi <yao.qi@linaro.org>
10319
10320 * linux-aarch64-low.c (aarch64_insert_point): Use
10321 show_debug_regs as a boolean.
10322 (aarch64_remove_point): Likewise.
10323
10324 2015-03-05 Pedro Alves <palves@redhat.com>
10325
10326 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10327 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10328 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10329 * nto-low.c (nto_target_ops): Likewise.
10330 * spu-low.c (spu_target_ops): Likewise.
10331 * win32-low.c (win32_target_ops): Likewise.
10332
10333 2015-03-04 Pedro Alves <palves@redhat.com>
10334
10335 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10336 Decide whether a breakpoint triggered based on the SIGTRAP's
10337 siginfo.si_code.
10338 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10339 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10340 (linux_low_filter_event): Check for breakpoints before checking
10341 watchpoints.
10342 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10343 siginfo.si_code.
10344 (linux_stopped_by_sw_breakpoint)
10345 (linux_supports_stopped_by_sw_breakpoint)
10346 (linux_stopped_by_hw_breakpoint)
10347 (linux_supports_stopped_by_hw_breakpoint): New functions.
10348 (linux_target_ops): Install new target methods.
10349
10350 2015-03-04 Pedro Alves <palves@redhat.com>
10351
10352 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10353 * server.c (swbreak_feature, hwbreak_feature): New globals.
10354 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10355 (captured_main): Clear swbreak_feature and hwbreak_feature.
10356 * server.h (swbreak_feature, hwbreak_feature): Declare.
10357 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10358 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10359 supports_stopped_by_hw_breakpoint>: New fields.
10360 (target_supports_stopped_by_sw_breakpoint)
10361 (target_stopped_by_sw_breakpoint)
10362 (target_supports_stopped_by_hw_breakpoint)
10363 (target_stopped_by_hw_breakpoint): Declare.
10364
10365 2015-03-04 Pedro Alves <palves@redhat.com>
10366
10367 enum lwp_stop_reason -> enum target_stop_reason
10368 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10369 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10370 (linux_wait_1, stuck_in_jump_pad_callback)
10371 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10372 (linux_stopped_by_watchpoint):
10373 * linux-low.h (enum lwp_stop_reason): Delete.
10374 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10375 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10376
10377 2015-03-04 Yao Qi <yao.qi@linaro.org>
10378
10379 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10380
10381 2015-03-03 Gary Benson <gbenson@redhat.com>
10382
10383 * hostio.c (handle_vFile): Fix prefix lengths.
10384
10385 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10386
10387 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10388 ptr_bits.
10389
10390 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10391
10392 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10393 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10394 (clean): Add "rm -f" for above C files.
10395 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10396 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10397 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10398 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10399 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10400 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10401 (init_registers_s390x_vx_linux64)
10402 (init_registers_s390x_tevx_linux64)
10403 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10404 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10405 declarations.
10406 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10407 (s390_store_vxrs_high): New functions.
10408 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10409 NT_S390_VXRS_HIGH.
10410 (s390_arch_setup): Add logic for selecting one of the new target
10411 descriptions. Activate the new vector regsets if applicable.
10412 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10413 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10414 and init_registers_s390x_tevx_linux64.
10415
10416 2015-03-01 Pedro Alves <palves@redhat.com>
10417
10418 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10419 parameter.
10420
10421 2015-02-27 Pedro Alves <palves@redhat.com>
10422
10423 * linux-x86-low.c (u_debugreg_offset): New function.
10424 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10425
10426 2015-02-27 Pedro Alves <palves@redhat.com>
10427
10428 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10429 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10430 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10431 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10432 (ps_lsetfpregs, ps_getpid)
10433 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10434 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10435 (ps_lsetxregs, ps_plog): Declare.
10436
10437 2015-02-27 Pedro Alves <palves@redhat.com>
10438
10439 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10440 IP_AGENT_EXPORT_FUNC.
10441 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10442 IP_AGENT_EXPORT_FUNC.
10443 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10444 (IP_AGENT_EXPORT): Delete.
10445 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10446 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10447 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10448 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10449 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10450 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10451 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10452 (traceframe_read_count, traceframe_write_count)
10453 (traceframes_created, trace_state_variables, get_raw_reg)
10454 (get_trace_state_variable_value, set_trace_state_variable_value)
10455 (ust_loaded, helper_thread_id, cmd_buf): Use
10456 IPA_SYM_EXPORTED_NAME.
10457 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10458 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10459 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10460 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10461 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10462 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10463 EXTERN_C_PUSH/EXTERN_C_POP.
10464 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10465 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10466 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10467 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10468 (traceframe_write_count, traceframe_read_count)
10469 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10470 (about_to_request_buffer_space, get_trace_state_variable_value)
10471 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10472 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10473 EXTERN_C_PUSH/EXTERN_C_POP.
10474 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10475 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10476 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10477 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10478 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10479 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10480 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10481 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10482 Define.
10483 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10484 (IP_AGENT_EXPORT_VAR_DECL): Define.
10485 (tracing): Declare.
10486 (gdb_agent_get_raw_reg): Declare.
10487
10488 2015-02-27 Tom Tromey <tromey@redhat.com>
10489 Pedro Alves <palves@redhat.com>
10490
10491 Rename symbols whose names are reserved C++ keywords throughout.
10492
10493 2015-02-27 Pedro Alves <palves@redhat.com>
10494
10495 * Makefile.in (COMPILER): New, get it from autoconf.
10496 (CXX): Get from autoconf instead.
10497 (COMPILE.pre): Use COMPILER.
10498 (CC-LD): Rename to ...
10499 (CC_LD): ... this. Use COMPILER.
10500 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10501 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10502 * acinclude.m4: Include build-with-cxx.m4.
10503 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10504 Disable -Werror by default if building in C++ mode.
10505 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10506 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10507 the C++ compiler. Save/restore CXXFLAGS too.
10508 * configure: Regenerate.
10509
10510 2015-02-27 Pedro Alves <palves@redhat.com>
10511
10512 * acinclude.m4: Include libiberty.m4.
10513 * configure.ac: Call libiberty_INIT.
10514 * config.in, configure: Regenerate.
10515
10516 2015-02-26 Pedro Alves <palves@redhat.com>
10517
10518 * linux-low.c (linux_wait_1): When incrementing the PC past a
10519 program breakpoint always use the_low_target.breakpoint_len as
10520 increment, rather than the maximum between that and
10521 the_low_target.decr_pc_after_break.
10522
10523 2015-02-23 Pedro Alves <palves@redhat.com>
10524
10525 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10526 thread was doing a step-over; always adjust the PC if
10527 we stepped over a permanent breakpoint.
10528 (linux_wait_1): If we stepped over breakpoint that was on top of a
10529 permanent breakpoint, manually advance the PC past it.
10530
10531 2015-02-23 Pedro Alves <palves@redhat.com>
10532
10533 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10534 modes.
10535 (x86_fill_gregset, x86_store_gregset): Use it when handling
10536 $orig_eax.
10537
10538 2015-02-20 Pedro Alves <palves@redhat.com>
10539
10540 * thread-db.c: Include "nat/linux-procfs.h".
10541 (thread_db_init): Skip listing new threads if the kernel supports
10542 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10543
10544 2015-02-20 Pedro Alves <palves@redhat.com>
10545
10546 * linux-low.c (status_pending_p_callback): Use ptid_match.
10547
10548 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10549
10550 PR breakpoints/16812
10551 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10552 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10553 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10554
10555 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10556
10557 PR breakpoints/15956
10558 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10559
10560 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10561
10562 * linux-low.c (linux_low_btrace_conf): Print size.
10563 * server.c (handle_btrace_conf_general_set): New.
10564 (hanle_general_set): Call handle_btrace_conf_general_set.
10565 (handle_query): Report Qbtrace-conf:bts:size as supported.
10566
10567 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10568
10569 * linux-low.c (linux_low_enable_btrace): Update parameters.
10570 (linux_low_btrace_conf): New.
10571 (linux_target_ops)<to_btrace_conf>: Initialize.
10572 * server.c (current_btrace_conf): New.
10573 (handle_btrace_enable): Rename to ...
10574 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10575 to target_enable_btrace. Update comment. Update users.
10576 (handle_qxfer_btrace_conf): New.
10577 (qxfer_packets): Add btrace-conf entry.
10578 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10579 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10580 (target_ops)<read_btrace_conf>: New.
10581 (target_enable_btrace): Update parameters.
10582 (target_read_btrace_conf): New.
10583
10584 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10585
10586 * server.c (handle_btrace_general_set): Remove call to
10587 target_supports_btrace.
10588 (supported_btrace_packets): New.
10589 (handle_query): Call supported_btrace_packets.
10590 * target.h: include btrace-common.h.
10591 (btrace_target_info): Removed.
10592 (supports_btrace, target_supports_btrace): Update parameters.
10593
10594 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10595
10596 * Makefile.in (SFILES): Add common/btrace-common.c.
10597 (OBS): Add common/btrace-common.o.
10598 (btrace-common.o): Add build rules.
10599 * linux-low: Include btrace-common.h.
10600 (linux_low_read_btrace): Use struct btrace_data. Call
10601 btrace_data_init and btrace_data_fini.
10602
10603 2015-02-06 Pedro Alves <palves@redhat.com>
10604
10605 * thread-db.c (find_new_threads_callback): Add debug output.
10606
10607 2015-02-04 Pedro Alves <palves@redhat.com>
10608
10609 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10610 (resume_stopped_resumed_lwps): New function.
10611 (linux_wait_for_event_filtered): Use it.
10612
10613 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10614
10615 * Makefile.in (SFILES): Add linux-personality.c.
10616 (linux-personality.o): New rule.
10617 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10618 list of objects to be built.
10619 * linux-low.c: Include nat/linux-personality.h.
10620 (linux_create_inferior): Remove code to disable address space
10621 randomization (moved to ../nat/linux-personality.c). Create
10622 cleanup to disable address space randomization.
10623
10624 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10625
10626 * Makefile.in (posix-strerror.o): New rule.
10627 (mingw-strerror.o): Likewise.
10628 * configure: Regenerated.
10629 * configure.ac: Source file ../common/common.host. Initialize new
10630 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10631
10632 2015-01-14 Yao Qi <yao@codesourcery.com>
10633
10634 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10635 (ppc-linux.o): New rule.
10636 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10637 * configure.ac: AC_CHECK_FUNCS(getauxval).
10638 * config.in: Re-generated.
10639 * configure: Re-generated.
10640 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10641 ppc64_64bit_inferior_p
10642
10643 2015-01-14 Yao Qi <yao@codesourcery.com>
10644
10645 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10646 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10647 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10648 (PT_ORIG_R3, PT_TRAP): Likewise.
10649 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10650 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10651 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10652
10653 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10654
10655 * i387-fp.c (i387_cache_to_xsave): In look over
10656 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10657 zmmh_low_space field by use of zmmh_high_space.
10658
10659 2015-01-09 Pedro Alves <palves@redhat.com>
10660
10661 * linux-low.c (step_over_bkpt): Move higher up in the file.
10662 (handle_extended_wait): Don't store the stop_pc here.
10663 (get_stop_pc): Adjust comments and rename to ...
10664 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10665 stopped for a software breakpoint or hardware breakpoint.
10666 (thread_still_has_status_pending_p): New function.
10667 (status_pending_p_callback): Use
10668 thread_still_has_status_pending_p. If the event is no longer
10669 interesting, resume the LWP.
10670 (handle_tracepoints): Add assert.
10671 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10672 (wstatus_maybe_breakpoint): New function.
10673 (cancel_breakpoint): Delete function.
10674 (check_stopped_by_watchpoint): New function, factored out from
10675 linux_low_filter_event.
10676 (lp_status_maybe_breakpoint): Delete function.
10677 (linux_low_filter_event): Remove filter_ptid argument.
10678 Leave thread group exits pending here. Store the LWP's stop PC.
10679 Always leave events pending.
10680 (linux_wait_for_event_filtered): Pull all events out of the
10681 kernel, and leave them all pending.
10682 (count_events_callback, select_event_lwp_callback): Consider all
10683 events.
10684 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10685 (select_event_lwp): Only give preference to the stepping LWP in
10686 all-stop mode. Adjust comments.
10687 (ignore_event): New function.
10688 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10689 references to cancel_breakpoints. Adjust to renames. Also give
10690 equal priority to all LWPs that have had events in non-stop mode.
10691 If reporting a software breakpoint event, unadjust the LWP's PC.
10692 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10693 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10694 Adjust.
10695 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10696 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10697 (linux_stopped_by_watchpoint): Adjust.
10698 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10699 * linux-low.h (enum lwp_stop_reason): New.
10700 (struct lwp_info) <stop_pc>: Adjust comment.
10701 <stopped_by_watchpoint>: Delete field.
10702 <stop_reason>: New field.
10703 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10704 * mem-break.c (software_breakpoint_inserted_here)
10705 (hardware_breakpoint_inserted_here): New function.
10706 * mem-break.h (software_breakpoint_inserted_here)
10707 (hardware_breakpoint_inserted_here): Declare.
10708 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10709 (cancel_breakpoints): Delete.
10710 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10711 (upload_fast_traceframes): Remove references to
10712 cancel_breakpoints.
10713
10714 2015-01-09 Pedro Alves <palves@redhat.com>
10715
10716 * thread-db.c (find_new_threads_callback): Ignore thread if the
10717 kernel thread ID is -1.
10718
10719 2015-01-09 Pedro Alves <palves@redhat.com>
10720
10721 * linux-low.c (linux_attach_fail_reason_string): Move to
10722 nat/linux-ptrace.c, and rename.
10723 (linux_attach_lwp): Update comment.
10724 (attach_proc_task_lwp_callback): New function.
10725 (linux_attach): Adjust to rename and use
10726 linux_proc_attach_tgid_threads.
10727 (linux_attach_fail_reason_string): Delete declaration.
10728
10729 2015-01-01 Joel Brobecker <brobecker@adacore.com>
10730
10731 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10732 * server.c (gdbserver_version): Likewise.
10733
10734 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10735
10736 * remote-utils.c: Include ctype.h.
10737 (input_interrupt): Explicitly handle the case when the char
10738 received is the NUL byte. Improve the printing of non-ASCII
10739 characters.
10740
10741 2014-12-16 Joel Brobecker <brobecker@adacore.com>
10742
10743 * linux-low.c (linux_low_filter_event): Update call to
10744 linux_enable_event_reporting following the addition of
10745 a new parameter to that function.
10746
10747 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
10748
10749 PR server/17457
10750 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10751 (AARCH64_FPCR_REGNO): Likewise.
10752 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10753 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10754 (aarch64_store_fpregset): Likewise.
10755
10756 2014-12-15 Joel Brobecker <brobecker@adacore.com>
10757
10758 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10759 Remove FIXME comment about assumption about N.
10760
10761 2014-12-13 Joel Brobecker <brobecker@adacore.com>
10762
10763 * configure.ac: If large-file support is disabled in GDBserver,
10764 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10765 * configure: Regenerate.
10766
10767 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10768
10769 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10770 warning upon ENODATA from ptrace.
10771 * linux-s390-low.c (s390_store_tdb): New.
10772 (s390_regsets): Add regset for NT_S390_TDB.
10773
10774 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10775
10776 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10777 without a fill_function.
10778 * linux-s390-low.c (s390_fill_last_break): Remove.
10779 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10780 (s390_arch_setup): Use regset's size instead of fill_function for
10781 loop end condition.
10782
10783 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10784
10785 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10786 the regset's store function when ptrace returned an error.
10787 * regcache.c (get_thread_regcache): Invalidate register cache
10788 before fetching inferior's registers.
10789
10790 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10791
10792 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10793 while-loop as for-loop.
10794 (regsets_store_inferior_registers): Likewise.
10795
10796 2014-11-28 Yao Qi <yao@codesourcery.com>
10797
10798 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10799 * config.in, configure: Re-generate.
10800 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10801 is defined.
10802
10803 2014-11-21 Yao Qi <yao@codesourcery.com>
10804
10805 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10806 (AC_CHECK_HEADERS): Remove malloc.h.
10807 * configure: Re-generated.
10808 * config.in: Re-generated.
10809 * server.h: Don't include alloca.h and malloc.h.
10810 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10811 Don't include malloc.h.
10812
10813 2014-11-17 Joel Brobecker <brobecker@adacore.com>
10814
10815 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10816 corresponding ERRNO check in same block.
10817
10818 2014-11-12 Pedro Alves <palves@redhat.com>
10819
10820 * server.c (cont_thread): Update comment.
10821 (start_inferior, attach_inferior): No longer clear cont_thread.
10822 (handle_v_cont): No longer set cont_thread.
10823 (captured_main): Clear cont_thread each time a GDB connects.
10824
10825 2014-11-12 Pedro Alves <palves@redhat.com>
10826
10827 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10828 thread, and don't resume all threads if the Hc thread has exited.
10829
10830 2014-11-12 Pedro Alves <palves@redhat.com>
10831
10832 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10833 the process group instead of to a specific LWP.
10834
10835 2014-10-15 Pedro Alves <palves@redhat.com>
10836
10837 PR server/17487
10838 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10839 parameter.
10840 (arm_set_thread_context): Delete.
10841 (the_low_target): Adjust.
10842 * win32-i386-low.c (debug_registers_changed)
10843 (debug_registers_used): Delete.
10844 (update_debug_registers_callback): New function.
10845 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10846 needing to update their debug registers.
10847 (win32_get_current_dr): New function.
10848 (x86_dr_low_get_addr, x86_dr_low_get_control)
10849 (x86_dr_low_get_status): Fetch the debug register from the thread
10850 record's context.
10851 (i386_initial_stuff): Adjust.
10852 (i386_get_thread_context): Remove current_event parameter. Don't
10853 clear debug_registers_changed nor copy DR values to
10854 debug_reg_state.
10855 (i386_set_thread_context): Delete.
10856 (i386_prepare_to_resume): New function.
10857 (i386_thread_added): Mark the thread as needing to update irs
10858 debug registers.
10859 (the_low_target): Remove i386_set_thread_context and install
10860 i386_prepare_to_resume.
10861 * win32-low.c (win32_get_thread_context): Adjust.
10862 (win32_set_thread_context): Use SetThreadContext
10863 directly.
10864 (win32_prepare_to_resume): New function.
10865 (win32_require_context): New function, factored out from ...
10866 (thread_rec): ... this.
10867 (continue_one_thread): Call win32_prepare_to_resume on each thread
10868 we're about to continue.
10869 (win32_resume): Call win32_prepare_to_resume on the event thread.
10870 * win32-low.h (struct win32_thread_info)
10871 <debug_registers_changed>: New field.
10872 (struct win32_target_ops): Change prototype of set_thread_context,
10873 delete set_thread_context and add prepare_to_resume.
10874 (win32_require_context): New declaration.
10875
10876 2014-10-08 Gary Benson <gbenson@redhat.com>
10877
10878 * server.h: Do not include common-exceptions.h.
10879
10880 2014-10-08 Gary Benson <gbenson@redhat.com>
10881
10882 * server.h: Do not include cleanups.h.
10883
10884 2014-09-30 James Hogan <james.hogan@imgtec.com>
10885
10886 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
10887 mips64-dsp-linux.c.
10888
10889 2014-09-23 Yao Qi <yao@codesourcery.com>
10890
10891 * linux-low.c (lp_status_maybe_breakpoint): New function.
10892 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
10893 (count_events_callback): Likewise.
10894 (select_event_lwp_callback): Likewise.
10895 (cancel_breakpoints_callback): Likewise.
10896
10897 2014-09-19 Don Breazeal <donb@codesourcery.com>
10898
10899 * linux-low.c (handle_extended_wait): Call
10900 linux_ptrace_get_extended_event.
10901 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
10902 linux_is_extended_waitstatus.
10903
10904 2014-09-16 Joel Brobecker <brobecker@adacore.com>
10905
10906 * Makefile.in (CPPFLAGS): Define.
10907 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
10908 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
10909
10910 2014-09-16 Gary Benson <gbenson@redhat.com>
10911
10912 * inferiors.h (current_inferior): Renamed as...
10913 (current_thread): New variable. All uses updated.
10914 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
10915 (maybe_move_out_of_jump_pad): Likewise.
10916 (cancel_breakpoint): Likewise.
10917 (linux_low_filter_event): Likewise.
10918 (wait_for_sigstop): Likewise.
10919 (linux_resume_one_lwp): Likewise.
10920 (need_step_over_p): Likewise.
10921 (start_step_over): Likewise.
10922 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
10923 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
10924 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
10925 and save_inferior as saved_thread.
10926 * regcache.c (get_thread_regcache): Renamed saved_inferior as
10927 saved_thread.
10928 (regcache_invalidate_thread): Likewise.
10929 * remote-utils.c (prepare_resume_reply): Likewise.
10930 * thread-db.c (thread_db_get_tls_address): Likewise.
10931 (disable_thread_event_reporting): Likewise.
10932 (remove_thread_event_breakpoints): Likewise.
10933 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
10934 as saved_thread.
10935 * target.h (set_desired_inferior): Renamed as...
10936 (set_desired_thread): New declaration. All uses updated.
10937 * server.c (myresume): Updated comment to reference thread instead
10938 of inferior.
10939 (handle_serial_event): Likewise.
10940 (handle_target_event): Likewise.
10941
10942 2014-09-12 Tom Tromey <tromey@redhat.com>
10943 Gary Benson <gbenson@redhat.com>
10944
10945 * regcache.h: Include common-regcache.h.
10946 (regcache_read_pc): Don't declare.
10947 * regcache.c (get_thread_regcache_for_ptid): New function.
10948
10949 2014-09-11 Tom Tromey <tromey@redhat.com>
10950 Gary Benson <gbenson@redhat.com>
10951
10952 * symbol.c: New file.
10953 * Makefile.in (SFILES): Add symbol.c.
10954 (OBS): Add symbol.o.
10955
10956 2014-09-11 Gary Benson <gbenson@redhat.com>
10957
10958 * target.c (target_stop_ptid, target_continue_ptid): New
10959 functions.
10960
10961 2014-09-11 Tom Tromey <tromey@redhat.com>
10962 Gary Benson <gbenson@redhat.com>
10963
10964 * target.h: Include target/target.h.
10965 * target.c (target_read_memory, target_read_uint32)
10966 (target_write_memory): New functions.
10967
10968 2014-09-11 Gary Benson <gbenson@redhat.com>
10969
10970 * server.h (debug_hw_points): Don't declare.
10971 * server.c (debug_hw_points): Don't define. Replace all uses
10972 with show_debug_regs.
10973 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
10974 all uses with show_debug_regs.
10975
10976 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10977
10978 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
10979 endianness into account.
10980 (ppc_supply_ptrace_register): Likewise.
10981
10982 2014-09-03 James Hogan <james.hogan@imgtec.com>
10983
10984 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
10985 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
10986
10987 2014-09-03 Gary Benson <gbenson@redhat.com>
10988
10989 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
10990 ALL_DEBUG_ADDRESS_REGISTERS.
10991
10992 2014-09-02 Gary Benson <gbenson@redhat.com>
10993
10994 * i386-low.h: Renamed as...
10995 * x86-low.h: New file. All type, function and variable name
10996 prefixes changed from "i386_" to "x86_". All references updated.
10997 * i386-low.c: Renamed as...
10998 * x86-low.c: New file. All type, function and variable name
10999 prefixes changed from "i386_" to "x86_". All references updated.
11000
11001 2014-09-02 Gary Benson <gbenson@redhat.com>
11002
11003 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11004 (x86_linux_new_thread): Likewise.
11005
11006 2014-08-29 Gary Benson <gbenson@redhat.com>
11007
11008 * server.h (setjmp.h): Do not include.
11009 (toplevel): Do not declare.
11010 (common-exceptions.h): Include.
11011 (cleanups.h): Likewise.
11012 * server.c (toplevel): Do not define.
11013 (exit_code): New static global.
11014 (detach_or_kill_for_exit_cleanup): New function.
11015 (main): New function. Original main renamed to...
11016 (captured_main): New function.
11017 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11018
11019 2014-08-29 Gary Benson <gbenson@redhat.com>
11020
11021 * Makefile.in (SFILES): Add common/common-exceptions.c.
11022 (OBS): Add common-exceptions.o.
11023 (common-exceptions.o): New rule.
11024 * utils.c (prepare_to_throw_exception): New function.
11025
11026 2014-08-29 Gary Benson <gbenson@redhat.com>
11027
11028 * config.in: Regenerate.
11029 * configure: Likewise.
11030
11031 2014-08-29 Gary Benson <gbenson@redhat.com>
11032
11033 * Makefile.in (SFILES): Add common/cleanups.c.
11034 (OBS): cleanups.o.
11035 (cleanups.o): New rule.
11036
11037 2014-08-29 Gary Benson <gbenson@redhat.com>
11038
11039 * utils.c (internal_vwarning): New function.
11040
11041 2014-08-28 Gary Benson <gbenson@redhat.com>
11042
11043 * utils.h (fatal): Remove declaration.
11044 * utils.c (fatal): Remove function.
11045
11046 2014-08-28 Gary Benson <gbenson@redhat.com>
11047
11048 * tracepoint.c (gdb_agent_init): Replace fatal with
11049 perror_with_name.
11050 (initialize_tracepoint): Likewise.
11051
11052 2014-08-28 Gary Benson <gbenson@redhat.com>
11053
11054 * remote-utils.c (remote_prepare): Replace fatal with error.
11055
11056 2014-08-28 Gary Benson <gbenson@redhat.com>
11057
11058 * linux-low.c (linux_async): Replace fatal with warning.
11059 Tidy up and return.
11060 (linux_start_non_stop): Return -1 if linux_async failed.
11061
11062 2014-08-28 Gary Benson <gbenson@redhat.com>
11063
11064 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11065 gdb_assert.
11066 (i386_dr_low_get_addr): Remove vague comment.
11067 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11068 gdb_assert.
11069
11070 2014-08-28 Gary Benson <gbenson@redhat.com>
11071
11072 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11073 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11074 internal_error.
11075 (linux_resume_one_lwp): Likewise.
11076 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11077 gdb_assert.
11078 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11079 with internal_error.
11080 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11081 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11082 (find_register_by_name): Replace fatal with internal_error.
11083 (find_regno): Likewise.
11084 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11085 * thread-db.c (thread_db_create_event): Likewise.
11086 (thread_db_load_search): Likewise.
11087 (try_thread_db_load_1): Likewise.
11088 * tracepoint.c (get_jump_space_head): Replace fatal with
11089 internal_error.
11090 (claim_trampoline_space): Likewise.
11091 (have_fast_tracepoint_trampoline_buffer): Likewise.
11092 (cmd_qtstart): Likewise.
11093 (stop_tracing): Likewise.
11094 (fast_tracepoint_collecting): Likewise.
11095 (target_malloc): Likewise.
11096 (download_tracepoint): Likewise.
11097 (download_trace_state_variables): Replace check with gdb_assert.
11098 (upload_fast_traceframes): Replace fatal with internal_error.
11099
11100 2014-08-19 Tom Tromey <tromey@redhat.com>
11101 Gary Benson <gbenson@redhat.com>
11102
11103 * Makefile.in (SFILES): Add common/common-debug.c.
11104 (OBS): Add common-debug.o.
11105 (common-debug.o): New rule.
11106 * debug.h (debug_printf): Don't declare.
11107 * debug.c (debug_printf): Renamed and rewritten as...
11108 (debug_vprintf): New function.
11109
11110 2014-08-19 Gary Benson <gbenson@redhat.com>
11111
11112 * utils.h: Do not include print-utils.h.
11113
11114 2014-08-19 Tom Tromey <tromey@redhat.com>
11115 Gary Benson <gbenson@redhat.com>
11116
11117 * server.h: Add static assertion.
11118 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11119
11120 2014-08-19 Tom Tromey <tromey@redhat.com>
11121 Gary Benson <gbenson@redhat.com>
11122
11123 * Makefile.in (SFILES): Add common/errors.c.
11124 (OBS): Add errors.o.
11125 (IPA_OBS): Add errors-ipa.o.
11126 (errors.o): New rule.
11127 (errors-ipa.o): Likewise.
11128 * utils.h (perror_with_name, error, warning): Don't declare.
11129 * utils.c (warning): Renamed and rewritten as...
11130 (vwarning): New function.
11131 (error): Renamed and rewritten as...
11132 (verror): New function.
11133 (internal_error): Renamed and rewritten as...
11134 (internal_verror): New function.
11135
11136 2014-08-07 Gary Benson <gbenson@redhat.com>
11137
11138 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
11139 * configure: Regenerate.
11140 * config.in: Likewise.
11141 * server.h: Do not include errno.h.
11142 * event-loop.c: Likewise.
11143 * hostio-errno.c: Likewise.
11144 * linux-low.c: Likewise.
11145 * remote-utils.c: Likewise.
11146 * spu-low.c: Likewise.
11147 * utils.c: Likewise.
11148 * gdbreplay.c: Unconditionally include errno.h.
11149
11150 2014-08-07 Gary Benson <gbenson@redhat.com>
11151
11152 * server.h: Do not include string.h.
11153 * event-loop.c: Likewise.
11154 * linux-low.c: Likewise.
11155 * regcache.c: Likewise.
11156 * remote-utils.c: Likewise.
11157 * spu-low.c: Likewise.
11158 * utils.c: Likewise.
11159
11160 2014-08-07 Gary Benson <gbenson@redhat.com>
11161
11162 * server.h: Do not include gdb_assert.h.
11163
11164 2014-08-07 Gary Benson <gbenson@redhat.com>
11165
11166 * server.h: Do not include common-utils.h.
11167
11168 2014-08-07 Gary Benson <gbenson@redhat.com>
11169
11170 * server.h: Do not include ptid.h.
11171 * notif.h: Likewise.
11172
11173 2014-08-07 Gary Benson <gbenson@redhat.com>
11174
11175 * server.h: Do not include gdb_locale.h.
11176
11177 2014-08-07 Gary Benson <gbenson@redhat.com>
11178
11179 * server.h: Do not include gdb/signals.h.
11180 * win32-low.c: Likewise.
11181
11182 2014-08-07 Gary Benson <gbenson@redhat.com>
11183
11184 * server.h: Do not include pathmax.h.
11185
11186 2014-08-07 Gary Benson <gbenson@redhat.com>
11187
11188 * server.h: Do not include libiberty.h.
11189 * linux-bfin-low.c: Likewise.
11190
11191 2014-08-07 Gary Benson <gbenson@redhat.com>
11192
11193 * server.h: Do not include ansidecl.h.
11194
11195 2014-08-07 Gary Benson <gbenson@redhat.com>
11196
11197 * linux-x86-low.c: Do not include stddef.h.
11198 * lynx-ppc-low.c: Likewise.
11199 * tracepoint.c: Likewise.
11200
11201 2014-08-07 Gary Benson <gbenson@redhat.com>
11202
11203 * server.h: Do not include stdarg.h.
11204 * nto-low.c: Likewise.
11205
11206 2014-08-07 Gary Benson <gbenson@redhat.com>
11207
11208 * server.h: Do not include stdlib.h.
11209 * inferiors.c: Likewise.
11210 * linux-low.c: Likewise.
11211 * regcache.c: Likewise.
11212 * spu-low.c: Likewise.
11213 * tracepoint.c: Likewise.
11214 * utils.c: Likewise.
11215
11216 2014-08-07 Gary Benson <gbenson@redhat.com>
11217
11218 * server.h: Do not include stdio.h.
11219 * linux-low.c: Likewise.
11220 * remote-utils.c: Likewise.
11221 * spu-low.c: Likewise.
11222 * utils.c: Likewise.
11223 * wincecompat.c: Likewise.
11224
11225 2014-08-06 Gary Benson <gbenson@redhat.com>
11226
11227 * regcache.c (init_register_cache): Move conditionals inside if.
11228
11229 2014-08-06 Gary Benson <gbenson@redhat.com>
11230
11231 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
11232
11233 2014-07-31 Gary Benson <gbenson@redhat.com>
11234
11235 * ax.h: Do not include server.h.
11236 * gdbthread.h: Likewise.
11237 * lynx-low.h: Likewise.
11238 * notif.h: Likewise.
11239
11240 2014-07-30 Gary Benson <gbenson@redhat.com>
11241
11242 * server.h: Include common-defs.h.
11243 Do not include config.h or build-gnulib-gdbserver/config.h.
11244
11245 2014-07-30 Gary Benson <gbenson@redhat.com>
11246
11247 * hostio-errno.c: Move server.h to top of includes list.
11248 * inferiors.c: Likewise.
11249 * linux-x86-low.c: Likewise.
11250 * notif.c: Include server.h.
11251
11252 2014-07-24 Tom Tromey <tromey@redhat.com>
11253 Gary Benson <gbenson@redhat.com>
11254
11255 * server.h (CORE_ADDR): Now unsigned.
11256
11257 2014-07-16 Pedro Alves <palves@redhat.com>
11258
11259 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
11260
11261 2014-07-15 Pedro Alves <palves@redhat.com>
11262
11263 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
11264 copy.
11265
11266 2014-07-11 Pedro Alves <palves@redhat.com>
11267
11268 * linux-low.c (kill_wait_lwp): New function, based on
11269 kill_one_lwp_callback, but use my_waitpid directly.
11270 (kill_one_lwp_callback, linux_kill): Use it.
11271
11272 2014-06-23 Pedro Alves <palves@redhat.com>
11273
11274 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
11275 before setting DR0..DR3.
11276
11277 2014-06-20 Gary Benson <gbenson@redhat.com>
11278
11279 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
11280 * configure: Regenerated.
11281 * config.in: Likewise.
11282
11283 2014-06-20 Gary Benson <gbenson@redhat.com>
11284
11285 * Makefile.in (SFILES): Update locations for files moved
11286 from common to nat.
11287 (object file files): Reordered.
11288
11289 2014-06-20 Gary Benson <gbenson@redhat.com>
11290
11291 * i386-low.h (i386_dr_low_can_set_addr): Removed.
11292 (i386_dr_low_set_addr): Likewise.
11293 (i386_dr_low_get_addr): Likewise.
11294 (i386_dr_low_can_set_control): Likewise.
11295 (i386_dr_low_set_control): Likewise.
11296 (i386_dr_low_get_control): Likewise.
11297 (i386_dr_low_get_status): Likewise.
11298 (i386_get_debug_register_length): Likewise.
11299 * linux-x86-low.c (i386_dr_low_set_addr):
11300 Changed signature. Made static.
11301 (i386_dr_low_get_addr): Likewise.
11302 (i386_dr_low_set_control): Likewise.
11303 (i386_dr_low_get_control): Likewise.
11304 (i386_dr_low_get_status): Likewise.
11305 (i386_dr_low): New global variable.
11306 * win32-i386-low.c (i386_dr_low_set_addr):
11307 Changed signature. Made static.
11308 (i386_dr_low_get_addr): Likewise.
11309 (i386_dr_low_set_control): Likewise.
11310 (i386_dr_low_get_control): Likewise.
11311 (i386_dr_low_get_status): Likewise.
11312 (i386_dr_low): New global variable.
11313
11314 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
11315
11316 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
11317 * Makefile.in (AR, AR_FLAGS): Define.
11318 * configure: Regenerate.
11319
11320 2014-06-19 Gary Benson <gbenson@redhat.com>
11321
11322 * Makefile.in (i386-dregs.o): New rule.
11323 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11324 * i386-low.c (target.h): Remove include.
11325 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11326 (DR_CONTROL_SHIFT): Likewise.
11327 (DR_CONTROL_SIZE): Likewise.
11328 (DR_RW_EXECUTE): Likewise.
11329 (DR_RW_WRITE): Likewise.
11330 (DR_RW_READ): Likewise.
11331 (DR_RW_IORW): Likewise.
11332 (DR_LEN_1): Likewise.
11333 (DR_LEN_2): Likewise.
11334 (DR_LEN_4): Likewise.
11335 (DR_LEN_8): Likewise.
11336 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11337 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11338 (DR_ENABLE_SIZE): Likewise.
11339 (DR_LOCAL_SLOWDOWN): Likewise.
11340 (DR_GLOBAL_SLOWDOWN): Likewise.
11341 (DR_CONTROL_RESERVED): Likewise.
11342 (I386_DR_CONTROL_MASK): Likewise.
11343 (I386_DR_VACANT): Likewise.
11344 (I386_DR_LOCAL_ENABLE): Likewise.
11345 (I386_DR_GLOBAL_ENABLE): Likewise.
11346 (I386_DR_DISABLE): Likewise.
11347 (I386_DR_SET_RW_LEN): Likewise.
11348 (I386_DR_GET_RW_LEN): Likewise.
11349 (I386_DR_WATCH_HIT): Likewise.
11350 (i386_wp_op_t): Likewise.
11351 (i386_show_dr): Likewise.
11352 (i386_length_and_rw_bits): Likewise.
11353 (i386_insert_aligned_watchpoint): Likewise.
11354 (i386_remove_aligned_watchpoint): Likewise.
11355 (i386_handle_nonaligned_watchpoint): Likewise.
11356 i386_update_inferior_debug_regs(): Likewise.
11357 (i386_dr_insert_watchpoint): Likewise.
11358 (i386_dr_remove_watchpoint): Likewise.
11359 (i386_dr_region_ok_for_watchpoint): Likewise.
11360 (i386_dr_stopped_data_address): Likewise.
11361 (i386_dr_stopped_by_watchpoint): Likewise.
11362
11363 2014-06-19 Gary Benson <gbenson@redhat.com>
11364
11365 * i386-low.c (i386_dr_show): Renamed to
11366 i386_show_dr and made static. All uses updated.
11367 (i386_dr_length_and_rw_bits): Renamed to
11368 i386_length_and_rw_bits and made static.
11369 All uses updated.
11370 (i386_dr_insert_aligned_watchpoint): Renamed to
11371 i386_insert_aligned_watchpoint and made static.
11372 All uses updated.
11373 (i386_dr_remove_aligned_watchpoint): Renamed to
11374 i386_remove_aligned_watchpoint and made static.
11375 All uses updated.
11376 (i386_dr_update_inferior_debug_regs): Renamed to
11377 i386_update_inferior_debug_regs and made static.
11378 All uses updated.
11379
11380 2014-06-18 Gary Benson <gbenson@redhat.com>
11381
11382 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11383 (i386_dr_low_can_set_control): Likewise.
11384 (i386_get_debug_register_length): Likewise.
11385 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11386 (i386_dr_low_can_set_control): Likewise.
11387 (i386_get_debug_register_length): Likewise.
11388
11389 2014-06-17 Gary Benson <gbenson@redhat.com>
11390
11391 * i386-low.h (i386-dregs.h): New include.
11392 (DR_FIRSTADDR): Now in i386-dregs.h.
11393 (DR_LASTADDR): Likewise.
11394 (DR_NADDR): Likewise.
11395 (DR_STATUS): Likewise.
11396 (DR_CONTROL): Likewise.
11397 (i386_debug_reg_state): Likewise.
11398 (i386_dr_insert_watchpoint): Likewise.
11399 (i386_dr_remove_watchpoint): Likewise.
11400 (i386_dr_region_ok_for_watchpoint): Likewise.
11401 (i386_dr_stopped_data_address): Likewise.
11402 (i386_dr_stopped_by_watchpoint): Likewise.
11403 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11404
11405 2014-06-18 Gary Benson <gbenson@redhat.com>
11406
11407 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11408 i386_dr_insert_watchpoint.
11409 (i386_low_remove_watchpoint): Renamed to
11410 i386_dr_remove_watchpoint.
11411 (i386_low_region_ok_for_watchpoint): Renamed to
11412 i386_dr_region_ok_for_watchpoint.
11413 (i386_low_stopped_data_address): Renamed to
11414 i386_dr_stopped_data_address.
11415 (i386_low_stopped_by_watchpoint): Renamed to
11416 i386_dr_stopped_by_watchpoint.
11417 * i386-low.c (i386_show_dr): Renamed to
11418 i386_dr_show and made nonstatic. All uses updated.
11419 (i386_length_and_rw_bits): Renamed to
11420 i386_dr_length_and_rw_bits and made nonstatic.
11421 All uses updated.
11422 (i386_insert_aligned_watchpoint): Renamed to
11423 i386_dr_insert_aligned_watchpoint and made nonstatic.
11424 All uses updated.
11425 (i386_remove_aligned_watchpoint): Renamed to
11426 i386_dr_remove_aligned_watchpoint and made nonstatic.
11427 All uses updated.
11428 (i386_update_inferior_debug_regs): Renamed to
11429 i386_dr_update_inferior_debug_regs and made nonstatic.
11430 All uses updated.
11431 (i386_low_insert_watchpoint): Renamed to
11432 i386_dr_insert_watchpoint. All uses updated.
11433 (i386_low_remove_watchpoint): Renamed to
11434 i386_dr_remove_watchpoint. All uses updated.
11435 (i386_low_region_ok_for_watchpoint): Renamed to
11436 i386_dr_region_ok_for_watchpoint. All uses updated.
11437 (i386_low_stopped_data_address): Renamed to
11438 i386_dr_stopped_data_address. All uses updated.
11439 (i386_low_stopped_by_watchpoint): Renamed to
11440 i386_dr_stopped_by_watchpoint. All uses updated.
11441
11442 2014-06-18 Gary Benson <gbenson@redhat.com>
11443
11444 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11445 (i386_dr_low_can_set_control): Likewise.
11446 (i386_insert_aligned_watchpoint): New check.
11447
11448 2014-06-18 Gary Benson <gbenson@redhat.com>
11449
11450 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11451 Renamed to state.
11452
11453 2014-06-18 Gary Benson <gbenson@redhat.com>
11454
11455 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11456 instead of fatal and error.
11457 (i386_handle_nonaligned_watchpoint): Likewise.
11458
11459 2014-06-18 Gary Benson <gbenson@redhat.com>
11460
11461 * i386-low.c (i386_get_debug_register_length): New macro.
11462 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11463 (i386_show_dr): Use debug_printf instead of fprintf. Use
11464 phex to format values.
11465
11466 2014-06-18 Gary Benson <gbenson@redhat.com>
11467
11468 * i386-low.h: Comment changes.
11469 * i386-low.c: Likewise.
11470
11471 2014-06-18 Gary Benson <gbenson@redhat.com>
11472
11473 * i386-low.c: Whitespace changes.
11474
11475 2014-06-12 Tom Tromey <tromey@redhat.com>
11476
11477 * utils.c (freeargv): Remove.
11478
11479 2014-06-12 Tom Tromey <tromey@redhat.com>
11480
11481 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11482 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11483 (parse_debug_format_options): Likewise.
11484 (gdbserver_usage): Likewise.
11485 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11486 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11487 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11488 against libiberty.
11489 ($(LIBGNU)): Depend on libiberty.
11490 (all-lib): Recurse into all subdirs.
11491 (install-only): Invoke "install" target in subdirs.
11492 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11493 targets.
11494 * configure: Rebuild.
11495 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11496 for vasprintf, vsnprintf, or gettimeofday.
11497 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11498 srv_tgtobj.
11499
11500 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11501
11502 * development.sh: Delete.
11503 * Makefile.in (config.status): Adjust dependency on development.sh.
11504 * configure.ac: Adjust development.sh source call.
11505 * configure: Regenerate.
11506
11507 2014-06-02 Pedro Alves <palves@redhat.com>
11508
11509 * ax.c (gdb_free_agent_expr): New function.
11510 * ax.h (gdb_free_agent_expr): New declaration.
11511 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11512 list.
11513 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11514 static.
11515 (clear_breakpoint_conditions_and_commands): New function.
11516 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11517 (clear_breakpoint_conditions_and_commands): New declaration.
11518
11519 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11520
11521 * linux-aarch64-low.c (asm/ptrace.h): Include.
11522
11523 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11524
11525 Fix TLS access for -static -pthread.
11526 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11527 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11528 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11529
11530 2014-05-20 Pedro Alves <palves@redhat.com>
11531
11532 * linux-aarch64-low.c (aarch64_insert_point)
11533 (aarch64_remove_point): No longer check whether the type is
11534 supported here. Adjust to new interface.
11535 (the_low_target): Install aarch64_supports_z_point_type as
11536 supports_z_point_type method.
11537 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11538 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11539 instead of a Z packet char. Adjust.
11540 (arm_supports_z_point_type): New function.
11541 (arm_insert_point, arm_remove_point): Adjust to new interface.
11542 (the_low_target): Install arm_supports_z_point_type.
11543 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11544 (cris_insert_point, cris_remove_point): Adjust to new interface.
11545 Don't check whether the type is supported here.
11546 (the_low_target): Install cris_supports_z_point_type.
11547 * linux-low.c (linux_supports_z_point_type): New function.
11548 (linux_insert_point, linux_remove_point): Adjust to new interface.
11549 * linux-low.h (struct linux_target_ops) <insert_point,
11550 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11551 raw_breakpoint pointer parameter.
11552 <supports_z_point_type>: New method.
11553 * linux-mips-low.c (mips_supports_z_point_type): New function.
11554 (mips_insert_point, mips_remove_point): Adjust to new interface.
11555 Use mips_supports_z_point_type.
11556 (the_low_target): Install mips_supports_z_point_type.
11557 * linux-ppc-low.c (the_low_target): Install NULL as
11558 supports_z_point_type method.
11559 * linux-s390-low.c (the_low_target): Install NULL as
11560 supports_z_point_type method.
11561 * linux-sparc-low.c (the_low_target): Install NULL as
11562 supports_z_point_type method.
11563 * linux-x86-low.c (x86_supports_z_point_type): New function.
11564 (x86_insert_point): Adjust to new insert_point interface. Use
11565 insert_memory_breakpoint. Adjust to new
11566 i386_low_insert_watchpoint interface.
11567 (x86_remove_point): Adjust to remove_point interface. Use
11568 remove_memory_breakpoint. Adjust to new
11569 i386_low_remove_watchpoint interface.
11570 (the_low_target): Install x86_supports_z_point_type.
11571 * lynx-low.c (lynx_target_ops): Install NULL as
11572 supports_z_point_type callback.
11573 * nto-low.c (nto_supports_z_point_type): New.
11574 (nto_insert_point, nto_remove_point): Adjust to new interface.
11575 (nto_target_ops): Install nto_supports_z_point_type.
11576 * mem-break.c: Adjust intro comment.
11577 (struct raw_breakpoint) <raw_type, size>: New fields.
11578 <inserted>: Update comment.
11579 <shlib_disabled>: Delete field.
11580 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11581 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11582 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11583 (raw_bkpt_type_to_target_hw_bp_type): New function.
11584 (find_enabled_raw_code_breakpoint_at): New function.
11585 (find_raw_breakpoint_at): New type and size parameters. Use them.
11586 (insert_memory_breakpoint): New function, based off
11587 set_raw_breakpoint_at.
11588 (remove_memory_breakpoint): New function.
11589 (set_raw_breakpoint_at): Reimplement.
11590 (set_breakpoint): New, based on set_breakpoint_at.
11591 (set_breakpoint_at): Reimplement.
11592 (delete_raw_breakpoint): Go through the_target->remove_point
11593 instead of assuming memory breakpoints.
11594 (find_gdb_breakpoint_at): Delete.
11595 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11596 (find_gdb_breakpoint): New function.
11597 (set_gdb_breakpoint_at): Delete.
11598 (z_type_supported): New function.
11599 (set_gdb_breakpoint_1): New function, loosely based off
11600 set_gdb_breakpoint_at.
11601 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11602 (delete_gdb_breakpoint_at): Delete.
11603 (delete_gdb_breakpoint_1): New function, loosely based off
11604 delete_gdb_breakpoint_at.
11605 (delete_gdb_breakpoint): New function.
11606 (clear_gdb_breakpoint_conditions): Rename to ...
11607 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11608 breakpoint.
11609 (add_condition_to_breakpoint): Make static.
11610 (add_breakpoint_condition): Take a struct breakpoint pointer
11611 instead of an address. Adjust.
11612 (gdb_condition_true_at_breakpoint): Rename to ...
11613 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11614 z_type parameter.
11615 (gdb_condition_true_at_breakpoint): Reimplement.
11616 (add_breakpoint_commands): Take a struct breakpoint pointer
11617 instead of an address. Adjust.
11618 (gdb_no_commands_at_breakpoint): Rename to ...
11619 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11620 parameter. Return true if no breakpoint was found. Change debug
11621 output.
11622 (gdb_no_commands_at_breakpoint): Reimplement.
11623 (run_breakpoint_commands): Rename to ...
11624 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11625 and change return type to boolean.
11626 (run_breakpoint_commands): New function.
11627 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11628 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11629 breakpoint. Go through the_target->remove_point instead of
11630 assuming memory breakpoint.
11631 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11632 software and hardware breakpoints.
11633 (reinsert_raw_breakpoint): Go through the_target->insert_point
11634 instead of assuming memory breakpoint.
11635 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11636 software and hardware breakpoints.
11637 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11638 Check both software and hardware breakpoints.
11639 (validate_inserted_breakpoint): Assert the breakpoint is a
11640 software breakpoint. Set the inserted flag to -1 instead of
11641 setting shlib_disabled.
11642 (delete_disabled_breakpoints): Adjust.
11643 (validate_breakpoints): Only validate software breakpoints.
11644 Adjust to inserted flag change.
11645 (check_mem_read, check_mem_write): Skip breakpoint types other
11646 than software breakpoints. Adjust to inserted flag change.
11647 * mem-break.h (enum raw_bkpt_type): New enum.
11648 (raw_breakpoint, struct process_info): Forward declare.
11649 (Z_packet_to_target_hw_bp_type): Delete declaration.
11650 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11651 (set_gdb_breakpoint, delete_gdb_breakpoint)
11652 (clear_breakpoint_conditions): New declarations.
11653 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11654 (breakpoint_inserted_here): Update comment.
11655 (add_breakpoint_condition, add_breakpoint_commands): Replace
11656 address parameter with a breakpoint pointer parameter.
11657 (gdb_breakpoint_here): Update comment.
11658 (delete_gdb_breakpoint_at): Delete.
11659 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11660 * server.c (process_point_options): Take a struct breakpoint
11661 pointer instead of an address. Adjust.
11662 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11663 delete_gdb_breakpoint.
11664 * spu-low.c (spu_target_ops): Install NULL as
11665 supports_z_point_type method.
11666 * target.h: Include mem-break.h.
11667 (struct target_ops) <prepare_to_access_memory>: Update comment.
11668 <supports_z_point_type>: New field.
11669 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11670 instead of a char. Also take a raw breakpoint pointer.
11671 * win32-arm-low.c (the_low_target): Install NULL as
11672 supports_z_point_type.
11673 * win32-i386-low.c (i386_supports_z_point_type): New function.
11674 (i386_insert_point, i386_remove_point): Adjust to new interface.
11675 (the_low_target): Install i386_supports_z_point_type.
11676 * win32-low.c (win32_supports_z_point_type): New function.
11677 (win32_insert_point, win32_remove_point): Adjust to new interface.
11678 (win32_target_ops): Install win32_supports_z_point_type.
11679 * win32-low.h (struct win32_target_ops):
11680 <supports_z_point_type>: New method.
11681 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11682 instead of a char. Also take a raw breakpoint pointer.
11683
11684 2014-05-20 Pedro Alves <palves@redhat.com>
11685
11686 * mem-break.h: Include break-common.h.
11687 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11688 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11689 (Z_packet_to_target_hw_bp_type): New declaration.
11690 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11691 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11692 (Z_PACKET_ACCESS_WP): Delete macros.
11693 (Z_packet_to_hw_type): Delete function.
11694 * i386-low.h: Don't include break-common.h here.
11695 (Z_packet_to_hw_type): Delete declaration.
11696 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11697 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11698 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11699 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11700 * linux-aarch64-low.c: Don't include break-common.h here.
11701 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11702 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11703 (Z_packet_to_target_hw_bp_type): Delete function.
11704 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11705 function.
11706 (mips_insert_point, mips_remove_point): Use
11707 Z_packet_to_target_hw_bp_type.
11708
11709 2014-05-20 Pedro Alves <palves@redhat.com>
11710
11711 * linux-aarch64-low.c: Include break-common.h.
11712 (enum target_point_type): Delete.
11713 (Z_packet_to_point_type): Rename to ...
11714 (Z_packet_to_target_hw_bp_type): ... this, and return a
11715 target_hw_bp_type instead.
11716 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11717 instead of an enum target_point_type.
11718 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11719 breakpoint type.
11720 (aarch64_dr_state_insert_one_point)
11721 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11722 (aarch64_handle_aligned_watchpoint)
11723 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11724 Take an enum target_hw_bp_type instead of an enum
11725 target_point_type.
11726 (aarch64_supports_z_point_type): New function.
11727 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11728 use Z_packet_to_target_hw_bp_type.
11729
11730 2014-05-20 Joel Brobecker <brobecker@adacore.com>
11731
11732 * configure.ac: Only use -Werror by default when DEVELOPMENT
11733 is true.
11734 * configure: Regenerate.
11735
11736 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11737
11738 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11739 * linux-x86-low.c (X86_64_USER_REGS): New.
11740 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11741
11742 2014-04-28 Yao Qi <yao@codesourcery.com>
11743
11744 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11745 name.
11746
11747 2014-04-25 Pedro Alves <palves@redhat.com>
11748
11749 PR server/16255
11750 * linux-low.c (linux_attach_fail_reason_string): New function.
11751 (linux_attach_lwp): Delete.
11752 (linux_attach_lwp_1): Rename to ...
11753 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11754 argument. Remove "initial" parameter. Return int instead of
11755 void. Don't error or warn here.
11756 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11757 failure to attach to the tgid. Call warning when failing to
11758 attach to an lwp.
11759 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11760 argument. Remove "initial" parameter. Return int instead of
11761 void. Don't error or warn here.
11762 (linux_attach_fail_reason_string): New declaration.
11763 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11764 interface change. Use linux_attach_fail_reason_string.
11765
11766 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
11767 Walfred Tedeschi <walfred.tedeschi@intel.com>
11768
11769 * Makefile.in: Added rules to handle new files
11770 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11771 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11772 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11773 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11774 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11775 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11776 x32-avx512-linux.o.
11777 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11778 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11779 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11780 i386/x32-avx512.xml.
11781 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11783 i386/x32-avx512-linux.xml.
11784 * i387-fp.c (num_avx512_k_registers): New constant for number
11785 of K registers.
11786 (num_avx512_zmmh_low_registers): New constant for number of
11787 lower ZMM registers (0-15).
11788 (num_avx512_zmmh_high_registers): New constant for number of
11789 higher ZMM registers (16-31).
11790 (num_avx512_ymmh_registers): New contant for number of higher
11791 YMM registers (ymm16-31 added by avx521 on x86_64).
11792 (num_avx512_xmm_registers): New constant for number of higher
11793 XMM registers (xmm16-31 added by AVX512 on x86_64).
11794 (struct i387_xsave): Add space for AVX512 registers.
11795 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11796 Add code to handle AVX512 registers.
11797 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11798 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11799 prototypei from generated file.
11800 (tdesc_amd64_avx512_linux): Likewise.
11801 (init_registers_x32_avx512_linux): Likewise.
11802 (tdesc_x32_avx512_linux): Likewise.
11803 (init_registers_i386_avx512_linux): Likewise.
11804 (tdesc_i386_avx512_linux): Likewise.
11805 (x86_64_regmap): Add AVX512 registers.
11806 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11807 mask.
11808 (initialize_low_arch): Add code to initialize AVX512 registers.
11809
11810 2014-04-23 Pedro Alves <palves@redhat.com>
11811
11812 * mem-break.c (find_gdb_breakpoint_at): Make static.
11813 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11814
11815 2014-04-23 Pedro Alves <palves@redhat.com>
11816
11817 * i386-low.c: Don't include break-common.h here.
11818 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11819 prototype to take target_hw_bp_type as argument instead of a Z
11820 packet char.
11821 * i386-low.h: Include break-common.h here.
11822 (Z_packet_to_hw_type): Declare.
11823 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11824 prototypes.
11825 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11826 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11827 (x86_remove_point): Convert the packet number to a
11828 target_hw_bp_type before calling i386_low_remove_watchpoint.
11829 * win32-i386-low.c (i386_insert_point): Convert the packet number
11830 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11831 (i386_remove_point): Convert the packet number to a
11832 target_hw_bp_type before calling i386_low_remove_watchpoint.
11833
11834 2014-04-23 Pedro Alves <palves@redhat.com>
11835
11836 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11837
11838 2014-04-10 Pedro Alves <palves@redhat.com>
11839
11840 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11841 Check if the condition or command is NULL before checking if the
11842 breakpoint is known. On success, return true.
11843 * mem-break.h (add_breakpoint_condition): Document return.
11844 (add_breakpoint_commands): Add describing comment.
11845 * server.c (skip_to_semicolon): New function.
11846 (process_point_options): Use it.
11847
11848 2014-04-09 Pedro Alves <palves@redhat.com>
11849
11850 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11851 to lwpid_of.
11852
11853 2014-02-27 Pedro Alves <palves@redhat.com>
11854
11855 PR 12702
11856 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11857 macros.
11858 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11859 output.
11860 (last_thread_of_process_p): Take a PID argument instead of a
11861 thread pointer.
11862 (linux_wait_for_lwp): Delete.
11863 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11864 functions.
11865 (linux_low_filter_event): New function, party factored out from
11866 linux_wait_for_event.
11867 (linux_wait_for_event): Rename to ...
11868 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11869 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11870 sigsuspend. Check for zombie leaders.
11871 (linux_wait_for_event): Reimplement as wrapper around
11872 linux_wait_for_event_filtered.
11873 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11874 a normal or signal exit is seen, it's the whole process exiting.
11875 (wait_for_sigstop): No longer a for_each_inferior callback.
11876 Rewrite on top of linux_wait_for_event_filtered.
11877 (stop_all_lwps): Call wait_for_sigstop directly.
11878 * server.c (resume, handle_target_event): Handle
11879 TARGET_WAITKIND_NO_RESUMED.
11880
11881 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11882
11883 * win32-low.c (psapi_get_dll_name,
11884 * win32_CreateToolhelp32Snapshot): Delete.
11885 (win32_CreateToolhelp32Snapshot, win32_Module32First)
11886 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
11887 Delete.
11888 (handle_load_dll): Add function description.
11889 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
11890
11891 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11892
11893 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
11894 Add comment.
11895 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
11896 base address when calling win32_add_one_solib.
11897 (handle_load_dll): Delete local variable load_addr.
11898 Remove 0x1000 offset applied to DLL base address when calling
11899 win32_add_one_solib.
11900 (handle_unload_dll): Add comment.
11901
11902 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11903
11904 * win32-low.c (win32_add_all_dlls): Renames
11905 win32_ensure_ntdll_loaded. Rewrite function documentation.
11906 Adjust implementation to always load all DLLs.
11907 Add 0x1000 offset to DLL base address when calling
11908 win32_add_one_solib.
11909 (child_initialization_done): New static global.
11910 (do_initial_child_stuff): Set child_initialization_done to
11911 zero during child initialization, and 1 after. Replace call
11912 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
11913 Add comment.
11914 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
11915 (handle_unload_dll): Add function documentation.
11916 (get_child_debug_event): Ignore load and unload DLL events
11917 during child initialization.
11918
11919 2014-02-20 Doug Evans <dje@google.com>
11920
11921 Remove global all_lwps.
11922 * inferiors.h (ptid_of): Move here from linux-low.h.
11923 (pid_of, lwpid_of): Ditto.
11924 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
11925 parameter is a struct thread_info * now.
11926 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
11927 directly. Pass &all_threads to find_inferior instead of &all_lwps.
11928 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
11929 directly.
11930 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
11931 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
11932 * linux-arm-low.c (update_registers_callback): Update, "entry"
11933 parameter is a struct thread_info * now.
11934 Fetch lwpid from current_inferior directly.
11935 (arm_insert_point): Pass &all_threads to find_inferior instead of
11936 &all_lwps.
11937 (arm_remove_point): Ditto.
11938 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
11939 (arm_prepare_to_resume): Fetch pid from thread.
11940 (arm_read_description): Fetch lwpid from current_inferior directly.
11941 * linux-low.c (all_lwps): Delete.
11942 (delete_lwp): Delete call to remove_inferior.
11943 (handle_extended_wait): Fetch lwpid from thread.
11944 (add_lwp): Don't set lwp->entry.id. Remove call to
11945 add_inferior_to_list.
11946 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
11947 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
11948 (kill_one_lwp_callback): Ditto.
11949 (linux_kill): Don't dereference NULL pointer.
11950 Fetch ptid,lwpid from thread.
11951 (get_detach_signal): Fetch ptid from thread.
11952 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
11953 Simplify call to regcache_invalidate_thread.
11954 (delete_lwp_callback): Update, "entry" parameter is a
11955 struct thread_info * now. Fetch pid from thread.
11956 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
11957 (status_pending_p_callback): Update, "entry" parameter is a
11958 struct thread_info * now. Fetch ptid from thread.
11959 (find_lwp_pid): Update, "entry" parameter is a
11960 struct thread_info * now.
11961 (linux_wait_for_lwp): Fetch pid from thread.
11962 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
11963 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
11964 (enqueue_one_deferred_signal): Fetch lwpid from thread.
11965 (dequeue_one_deferred_signal): Ditto.
11966 (cancel_breakpoint): Fetch ptid from current_inferior.
11967 (linux_wait_for_event): Pass &all_threads to find_inferior,
11968 not &all_lwps. Fetch ptid, lwpid from thread.
11969 (count_events_callback): Update, "entry" parameter is a
11970 struct thread_info * now.
11971 (select_singlestep_lwp_callback): Ditto.
11972 (select_event_lwp_callback): Ditto.
11973 (cancel_breakpoints_callback): Ditto.
11974 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
11975 not &all_lwps.
11976 (select_event_lwp): Ditto. Fetch ptid from event_thread.
11977 (unsuspend_one_lwp): Update, "entry" parameter is a
11978 struct thread_info * now.
11979 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
11980 not &all_lwps.
11981 (linux_stabilize_threads): Ditto. And for for_each_inferior.
11982 Fetch lwpid from thread, not lwp.
11983 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
11984 Pass &all_threads to find_inferior, not &all_lwps.
11985 (send_sigstop): Fetch lwpid from thread, not lwp.
11986 (send_sigstop_callback): Update, "entry" parameter is a
11987 struct thread_info * now.
11988 (suspend_and_send_sigstop_callback): Ditto.
11989 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
11990 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
11991 struct thread_info * now.
11992 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
11993 from thread, lwp.
11994 (lwp_running): Update, "entry" parameter is a
11995 struct thread_info * now.
11996 (stop_all_lwps): Fetch ptid from thread.
11997 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
11998 (linux_resume_one_lwp): Fetch lwpid from thread.
11999 (linux_set_resume_request): Update, "entry" parameter is a
12000 struct thread_info * now. Fetch pid, lwpid from thread.
12001 (resume_status_pending_p): Update, "entry" parameter is a
12002 struct thread_info * now.
12003 (need_step_over_p): Ditto. Fetch lwpid from thread.
12004 (start_step_over): Fetch lwpid from thread.
12005 (linux_resume_one_thread): Update, "entry" parameter is a
12006 struct thread_info * now. Fetch lwpid from thread.
12007 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12008 (proceed_one_lwp): Update, "entry" parameter is a
12009 struct thread_info * now. Fetch lwpid from thread.
12010 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12011 struct thread_info * now.
12012 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12013 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12014 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12015 directly.
12016 (regsets_store_inferior_registers): Ditto.
12017 (fetch_register, store_register): Ditto.
12018 (linux_read_memory, linux_write_memory): Ditto.
12019 (linux_request_interrupt): Ditto.
12020 (linux_read_auxv): Ditto.
12021 (linux_xfer_siginfo): Ditto.
12022 (linux_qxfer_spu): Ditto.
12023 (linux_qxfer_libraries_svr4): Ditto.
12024 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12025 moved to inferiors.h.
12026 (get_lwp): Delete.
12027 (get_thread_lwp): Update.
12028 (struct lwp_info): Delete member "entry". Simplify comment for
12029 member "thread".
12030 (all_lwps): Delete.
12031 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12032 current_inferior directly.
12033 (update_watch_registers_callback): Update, "entry" parameter is a
12034 struct thread_info * now. Fetch pid from thread.
12035 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12036 (mips_insert_point): Fetch lwpid from current_inferior.
12037 Pass &all_threads to find_inferior, not &all_lwps.
12038 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12039 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12040 directly.
12041 (mips_stopped_data_address): Ditto.
12042 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12043 directly.
12044 * linux-tile-low.c (tile_arch_setup): Ditto.
12045 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12046 (update_debug_registers_callback): Update, "entry" parameter is a
12047 struct thread_info * now. Fetch pid from thread.
12048 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12049 Pass &all_threads to find_inferior, not &all_lwps.
12050 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12051 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12052 Pass &all_threads to find_inferior, not &all_lwps.
12053 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12054 (i386_dr_low_get_status): Ditto.
12055 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12056 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12057 (x86_linux_read_description): Ditto.
12058 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12059
12060 2014-02-20 Doug Evans <dje@google.com>
12061
12062 * inferiors.c (get_first_inferior): Fix buglet.
12063
12064 2014-02-19 Doug Evans <dje@google.com>
12065
12066 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12067 * inferiors.c (add_thread): Change result type to struct thread_info *.
12068 All callers updated.
12069 (add_lwp): Call add_thread here instead of in callers.
12070 All callers updated.
12071 * linux-low.h (get_lwp_thread): Rewrite.
12072 (struct lwp_info): New member "thread".
12073
12074 2014-02-19 Doug Evans <dje@google.com>
12075
12076 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12077 All callers updated.
12078
12079 2014-02-19 Doug Evans <dje@google.com>
12080
12081 * inferiors.c (add_thread): Fix whitespace.
12082
12083 2014-02-19 Doug Evans <dje@google.com>
12084
12085 * dll.c (clear_dlls): Replace accessing list implemention details
12086 with API function.
12087 * gdbthread.h (get_first_thread): Declare.
12088 * inferiors.c (for_each_inferior_with_data): New function.
12089 (get_first_thread): New function.
12090 (find_thread_ptid): Simplify.
12091 (get_first_inferior): New function.
12092 (clear_list): Delete.
12093 (one_inferior_p): New function.
12094 (clear_inferior_list): New function.
12095 (clear_inferiors): Update.
12096 * inferiors.h (for_each_inferior_with_data): Declare.
12097 (clear_inferior_list): Declare.
12098 (one_inferior_p): Declare.
12099 (get_first_inferior): Declare.
12100 * linux-low.c (linux_wait_for_event): Replace accessing list
12101 implemention details with API function.
12102 * server.c (target_running): Ditto.
12103 (accumulate_file_name_length): New function.
12104 (emit_dll_description): New function.
12105 (handle_qxfer_libraries): Replace accessing list implemention
12106 details with API function.
12107 (handle_qxfer_threads_worker): New function.
12108 (handle_qxfer_threads_proper): Replace accessing list implemention
12109 details with API function.
12110 (handle_query): Ditto.
12111 (visit_actioned_threads_callback_ftype): New typedef.
12112 (visit_actioned_threads_data): New struct.
12113 (visit_actioned_threads): Rewrite to be find_inferior callback.
12114 (resume): Call find_inferior.
12115 (handle_status): Replace accessing list implemention
12116 details with API function.
12117 (process_serial_event): Replace accessing list implemention details
12118 with API function.
12119 * target.c (set_desired_inferior): Replace accessing list implemention
12120 details with API function.
12121 * tracepoint.c (same_process_p): New function.
12122 (gdb_agent_about_to_close): Replace accessing list implemention
12123 details with API function.
12124 * win32-low.c (child_delete_thread): Replace accessing list
12125 implemention details with API function.
12126 (match_dll_by_basename): New function.
12127 (dll_is_loaded_by_basename): New function.
12128 (win32_ensure_ntdll_loaded): Replace accessing list implemention
12129 details call to dll_is_loaded_by_basename.
12130
12131 2014-02-19 Doug Evans <dje@google.com>
12132
12133 * dll.h (struct dll_info): Add comment.
12134 * gdbthread.h (struct thread_info): Add comment.
12135 (current_ptid): Simplify.
12136 * inferiors.c (add_process): Update.
12137 (remove_process): Update.
12138 * inferiors.h (struct process_info): Rename member "head" to "entry".
12139 * linux-low.c (delete_lwp): Update.
12140 (add_lwp): Update.
12141 (last_thread_of_process_p): Update.
12142 (kill_one_lwp_callback, linux_kill): Update.
12143 (status_pending_p_callback): Update.
12144 (wait_for_sigstop): Update. Simplify read of ptid.
12145 (start_step_over): Update.
12146 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
12147 (get_lwp_thread): Update.
12148 (struct lwp_info): Rename member "head" to "entry".
12149 * regcache.h (inferior_list_entry): Delete.
12150 * server.c (kill_inferior_callback): Update.
12151 (detach_or_kill_inferior_callback): Update.
12152 (print_started_pid): Update.
12153 (print_attached_pid): Update.
12154 (process_serial_event): Simplify read of ptid.
12155 * thread-db.c (thread_db_create_event): Update.
12156 (thread_db_get_tls_address): Update.
12157 * win32-low.c (current_inferior_ptid): Simplify.
12158
12159 2014-02-19 Tom Tromey <tromey@redhat.com>
12160
12161 * target.h (struct target_ops) <supports_btrace>: Add target_ops
12162 argument.
12163 (target_supports_btrace): Update.
12164
12165 2014-02-14 Yao Qi <yao@codesourcery.com>
12166
12167 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
12168 (rsp-low-ipa.o): New target.
12169
12170 2014-02-12 Tom Tromey <tromey@redhat.com>
12171
12172 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
12173 convert_ascii_to_int.
12174 * regcache.c (registers_to_string): Likewise.
12175 * remote-utils.c (decode_M_packet): Likewise.
12176 * server.c (process_serial_event): Likewise.
12177
12178 2014-02-12 Tom Tromey <tromey@redhat.com>
12179
12180 * server.c (handle_query, handle_v_run): Use hex2bin, not
12181 unhexify.
12182 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
12183
12184 2014-02-12 Tom Tromey <tromey@redhat.com>
12185
12186 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
12187 convert_int_to_ascii.
12188 * regcache.c (registers_to_string, collect_register_as_string):
12189 Likewise.
12190 * remote-utils.c (look_up_one_symbol, relocate_instruction):
12191 Likewise.
12192 * server.c (process_serial_event): Likewise.
12193 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
12194 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
12195
12196 2014-02-12 Tom Tromey <tromey@redhat.com>
12197
12198 * remote-utils.c (look_up_one_symbol, monitor_output): Use
12199 bin2hex, not hexify.
12200 * tracepoint.c (cmd_qtstatus): Likewise.
12201
12202 2014-02-12 Tom Tromey <tromey@redhat.com>
12203
12204 * remote-utils.c (monitor_output): Pass explicit length to
12205 hexify.
12206
12207 2014-02-12 Tom Tromey <tromey@redhat.com>
12208
12209 * tracepoint.c: Include rsp-low.h.
12210 * server.c: Include rsp-low.h.
12211 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
12212 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
12213 declare.
12214 * remote-utils.c: Include rsp-low.h.
12215 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
12216 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
12217 (convert_int_to_ascii, convert_ascii_to_int): Move to
12218 common/rsp-low.c.
12219 * regcache.c: Include rsp-low.h.
12220 * ax.c: Include rsp-low.h.
12221 * Makefile.in (SFILES): Add common/rsp-low.c.
12222 (OBS): Add rsp-low.o.
12223 (rsp-low.o): New target.
12224
12225 2014-02-12 Tom Tromey <tromey@redhat.com>
12226
12227 * utils.h (pulongest, plongest, phex_nz): Don't declare.
12228 Include print-utils.h.
12229 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
12230 (plongest, thirty_two, phex_nz): Remove.
12231 * Makefile.in (SFILES): Add common/print-utils.c.
12232 (OBS): Add print-utils.o.
12233 (print-utils-ipa.o): New target.
12234 (print-utils.o): New target.
12235 (IPA_OBJS): Add print-utils-ipa.o.
12236
12237 2014-02-06 Tom Tromey <tromey@redhat.com>
12238
12239 * Makefile.in (SFILES): Fix indentation.
12240
12241 2014-02-05 Doug Evans <dje@google.com>
12242
12243 * linux-low.c (linux_wait_for_event): Improve comment.
12244 (linux_wait_1): Keep current_inferior in sync with event_child.
12245
12246 2014-01-22 Doug Evans <dje@google.com>
12247
12248 * gdbthread.h (gdb_id_to_thread): Delete, unused.
12249
12250 2014-01-22 Doug Evans <dje@google.com>
12251
12252 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
12253 * configure: Regenerate.
12254 * config.in: Regenerate.
12255 * Makefile.in (SFILES): Add debug.c.
12256 (OBS): Add debug.o.
12257 * debug.c: New file.
12258 * debug.h: New file.
12259 * linux-aarch64-low.c (*): Update all debugging printfs to use
12260 debug_printf instead of fprintf.
12261 * linux-arm-low.c (*): Ditto.
12262 * linux-cris-low.c (*): Ditto.
12263 * linux-crisv32-low.c (*): Ditto.
12264 * linux-m32r-low.c (*): Ditto.
12265 * linux-sparc-low.c (*): Ditto.
12266 * linux-x86.c (*): Ditto.
12267 * linux-low.c (*): Ditto.
12268 (linux_wait_1): Add calls to debug_enter, debug_exit.
12269 (linux_wait): Remove redundant debugging printf.
12270 (stop_all_lwps): Add calls to debug_enter, debug_exit.
12271 (linux_resume, unstop_all_lwps): Ditto.
12272 * mem-break.c (*): Update all debugging printfs to use
12273 debug_printf instead of fprintf.
12274 * remote-utils.c (*): Ditto.
12275 * thread-db.c (*): Ditto.
12276 * server.c #include <ctype.h>, "gdb_vecs.h".
12277 (debug_threads): Moved to debug.c.
12278 (*): Update all debugging printfs to use debug_printf instead of
12279 fprintf.
12280 (start_inferior): Replace call to fflush with call to debug_flush.
12281 (monitor_show_help): Mention set debug-format.
12282 (parse_debug_format_options): New function.
12283 (handle_monitor_command): Handle "monitor set debug-format".
12284 (gdbserver_usage): Mention --debug-format.
12285 (main): Parse --debug-format.
12286 * server.h (debug_threads): Declaration moved to debug.h.
12287 #include "debug.h".
12288 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
12289 trace_debug_1 that uses debug_printf.
12290 (tracepoint_look_up_symbols): Update all debugging printfs to use
12291 debug_printf instead of fprintf.
12292
12293 2014-01-20 Baruch Siach <baruch@tkos.co.il>
12294
12295 * linux-xtensa-low.c: Include asm/ptrace.h instead of
12296 sys/ptrace.h.
12297
12298 2014-01-17 Pedro Alves <palves@redhat.com>
12299
12300 PR build/16445
12301 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
12302 defined after including gdb_proc_service.h.
12303
12304 2014-01-16 Doug Evans <dje@google.com>
12305
12306 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
12307 (match_dll): Use it.
12308
12309 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
12310
12311 * target.h (target_ops) <read_btrace>: Change parameters and
12312 return type to allow error reporting.
12313 * server.c (handle_qxfer_btrace): Support delta reads. Pass
12314 trace reading errors on.
12315 * linux-low.c (linux_low_read_btrace): Pass trace reading
12316 errors on.
12317 (linux_low_disable_btrace): New.
12318
12319 2014-01-15 Doug Evans <dje@google.com>
12320
12321 * inferiors.c (thread_id_to_gdb_id): Delete.
12322 * inferiors.h (thread_id_to_gdb_id): Delete.
12323
12324 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12325
12326 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12327 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12328 versions.
12329
12330 2014-01-08 Pedro Alves <palves@redhat.com>
12331
12332 * server.c (handle_status): Don't discard previous queued stop
12333 replies or thread's pending status here.
12334 (main) <disconnection>: Do it here instead.
12335
12336 2014-01-08 Pedro Alves <palves@redhat.com>
12337
12338 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12339 * server.c (visit_actioned_threads, handle_pending_status): New
12340 function.
12341 (handle_v_cont): Factor out parts to ...
12342 (resume): ... this new function. If in all-stop, and a thread
12343 being resumed has a pending status, report it without actually
12344 resuming.
12345 (myresume): Adjust to use the new 'resume' function.
12346 (clear_pending_status_callback, set_pending_status_callback)
12347 (find_status_pending_thread_callback): New functions.
12348 (handle_status): Handle the case of multiple threads having
12349 interesting statuses to report. Report threads' real last signal
12350 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12351 with an interesting thread to report the status for, instead of
12352 always reporting the status of the first thread.
12353
12354 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12355
12356 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12357 * gdbreplay.c (gdbreplay_version): Likewise.
12358
12359 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12360
12361 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12362 iov.iov_len with the real length in use.
12363
12364 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12365
12366 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12367 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12368 for all targets that use win32-low.c.
12369 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12370 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12371
12372 2013-12-13 Pedro Alves <palves@redhat.com>
12373
12374 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12375 if equal to TARGET_WAITKIND_LOADED.
12376 * win32-low.c (cached_status): New static global.
12377 (win32_wait): Add declaration.
12378 (do_initial_child_stuff): Flush all initial pending debug events
12379 up to the initial breakpoint.
12380 (win32_wait): If CACHED_STATUS was set, return that instead
12381 of doing a real wait. Remove the code resuming the execution
12382 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12383 during the initial phase. Also remove the code changing
12384 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12385 TARGET_WAITKIND_STOPPED.
12386
12387 2013-12-11 Yao Qi <yao@codesourcery.com>
12388
12389 * notif.c (handle_notif_ack): Return 0 if no notification
12390 matches.
12391
12392 2013-11-20 Doug Evans <dje@google.com>
12393
12394 * linux-low.c (linux_set_resume_request): Fix comment.
12395
12396 2013-11-20 Doug Evans <dje@google.com>
12397
12398 * linux-low.c (resume_status_pending_p): Tweak comment.
12399
12400 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12401
12402 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12403 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12404 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12405 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12406 (srv_amd64_regobj): Add amd64-mpx.o.
12407 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12408 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12409 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12410 * i387-fp.c (num_pl_bnd_register) Added constant.
12411 (num_pl_bnd_cfg_registers) Added constant.
12412 (struct i387_xsave) Added reserved area and MPX fields.
12413 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12414 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12415 function.
12416 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12417 (init_registers_amd64_mpx_linux): Declare new function.
12418 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12419 (x86_64_regmap): Add MPX registers.
12420 (x86_linux_read_description): Add MPX case.
12421 (initialize_low_arch): Initialize MPX targets.
12422
12423 2013-11-18 Tom Tromey <tromey@redhat.com>
12424
12425 * configure: Rebuild.
12426 * configure.ac: Don't check for stdlib.h.
12427 * gdbreplay.c: Unconditionally include stdlib.h.
12428
12429 2013-11-18 Tom Tromey <tromey@redhat.com>
12430
12431 * config.in: Rebuild.
12432 * configure: Rebuild.
12433 * configure.ac: Don't use AC_HEADER_DIRENT.
12434
12435 2013-11-18 Tom Tromey <tromey@redhat.com>
12436
12437 * server.h: Don't check HAVE_STRING_H.
12438 * gdbreplay.c: Don't check HAVE_STRING_H.
12439 * configure: Rebuild.
12440
12441 2013-11-18 Tom Tromey <tromey@redhat.com>
12442
12443 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12444 LIBGNU.
12445
12446 2013-11-08 Tom Tromey <tromey@redhat.com>
12447
12448 * configure, config.in: Rebuild.
12449 * configure.ac: Remove unused configury.
12450
12451 2013-11-08 Tom Tromey <tromey@redhat.com>
12452
12453 * acinclude.m4: Include common.m4, codeset.m4.
12454 * configure, config.in: Rebuild.
12455 * configure.ac: Use GDB_AC_COMMON.
12456
12457 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12458
12459 * linux-s390-low.c (HWCAP_S390_TE): New define.
12460 (s390_arch_setup): Consider the TE field in the HWCAP for
12461 determining 'have_regset_tdb'.
12462
12463 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12464
12465 PR gdb/16014
12466 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12467 call to sizeof.
12468
12469 2013-10-02 Pedro Alves <palves@redhat.com>
12470
12471 * server.c (process_serial_event): Don't output "GDBserver
12472 exiting" if GDB is connected through stdio.
12473 * target.c (mywait): Likewise, be silent if GDB is connected
12474 through stdio.
12475
12476 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12477
12478 * lynx-low.c (lynx_add_threads_after_attach): New function.
12479 (lynx_attach): Remove call to add_thread. Add call to
12480 lynx_add_threads_after_attach instead.
12481
12482 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12483
12484 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12485 * config.in, configure: Regenerated.
12486
12487 2013-09-18 Yao Qi <yao@codesourcery.com>
12488
12489 PR server/15959
12490 * server.c (start_inferior): Clear 'resume_info'.
12491
12492 2013-09-16 Jiong Wang <jiwang@tilera.com>
12493
12494 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12495 for each register.
12496
12497 2013-09-16 Jiong Wang <jiwang@tilera.com>
12498
12499 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12500 linux-tile-low.o to srv_tgtobj.
12501
12502 2013-09-16 Will Newton <will.newton@linaro.org>
12503
12504 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12505 out regs.
12506
12507 2013-09-06 Pedro Alves <palves@redhat.com>
12508
12509 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12510 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12511 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12512 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12513 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12514 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12515
12516 2013-09-06 Pedro Alves <palves@redhat.com>
12517
12518 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12519 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12520
12521 2013-09-06 Pedro Alves <palves@redhat.com>
12522
12523 * linux-amd64-ipa.c: Include tracepoint.h.
12524 * linux-i386-ipa.c: Include tracepoint.h.
12525
12526 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12527
12528 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12529 (ps_get_thread_area): New function.
12530
12531 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12532
12533 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12534 (initialize_low_arch): Call init_registers_crisv32 rather than
12535 init_register_crisv32.
12536
12537 2013-09-05 Pedro Alves <palves@redhat.com>
12538
12539 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12540 to ...
12541 * hostio.h: ... this new file.
12542 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12543 win32-low.c: Include hostio.h.
12544
12545 2013-09-05 Pedro Alves <palves@redhat.com>
12546
12547 * server.h (gdb_client_data, handler_func, callback_handler_func)
12548 (delete_file_handler, add_file_handler, append_callback_event)
12549 (delete_callback_event, start_event_loop, initialize_event_loop):
12550 Move to event-loop.h and include it.
12551 * event-loop.h: New file.
12552
12553 2013-09-05 Pedro Alves <palves@redhat.com>
12554
12555 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12556 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12557 (loaded_dll, unloaded_dll): Move to ...
12558 * dll.h: ... this new file.
12559 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12560
12561 2013-09-05 Pedro Alves <palves@redhat.com>
12562
12563 * server.h (current_process, get_thread_process, all_processes)
12564 (add_inferior_to_list, for_each_inferior, current_inferior)
12565 (remove_inferior, add_process, remove_process, find_process_pid)
12566 (have_started_inferiors_p, have_attached_inferiors_p)
12567 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12568 (clear_inferiors, find_inferior, find_inferior_id)
12569 (inferior_target_data, set_inferior_target_data)
12570 (inferior_regcache_data, set_inferior_regcache_data): Move to
12571 inferiors.h, and include it.
12572 * inferiors.h: New file.
12573
12574 2013-09-05 Pedro Alves <palves@redhat.com>
12575
12576 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12577 Move ...
12578 * ax.h: ... here.
12579
12580 2013-09-05 Pedro Alves <palves@redhat.com>
12581
12582 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12583 tracepoint.h.
12584 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12585 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12586 (handle_tracepoint_general_set, handle_tracepoint_query)
12587 (tracepoint_finished_step, tracepoint_was_hit)
12588 (release_while_stepping_state_list, current_traceframe)
12589 (in_readonly_region, traceframe_read_mem)
12590 (fetch_traceframe_registers, traceframe_read_sdata)
12591 (traceframe_read_info, struct fast_tpoint_collect_status)
12592 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12593 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12594 (supply_fast_tracepoint_registers)
12595 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12596 (ipa_tdesc, claim_trampoline_space)
12597 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12598 (agent_mem_read, agent_get_trace_state_variable_value)
12599 (agent_set_trace_state_variable_value, agent_tsv_read)
12600 (agent_mem_read_string, get_raw_reg_func_addr)
12601 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12602 * tracepoint.h: ... this new file.
12603
12604 2013-09-05 Pedro Alves <palves@redhat.com>
12605
12606 * server.h (perror_with_name, error, fatal, warning, paddress)
12607 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12608 include it.
12609 * utils.h: New file.
12610
12611 2013-09-05 Pedro Alves <palves@redhat.com>
12612
12613 * server.h (remote_debug, noack_mode, transport_is_reliable)
12614 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12615 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12616 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12617 (write_enn, initialize_async_io, enable_async_io)
12618 (disable_async_io, check_remote_input_interrupt_request)
12619 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12620 (dead_thread_notify, prepare_resume_reply)
12621 (decode_address_to_semicolon, decode_address, decode_m_packet)
12622 (decode_M_packet, decode_X_packet, decode_xfer_write)
12623 (decode_search_memory_packet, unhexify, hexify)
12624 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12625 (look_up_one_symbol, relocate_instruction)
12626 (monitor_output): Move to remote-utils.h, and include it.
12627 * remote-utils.h: New file.
12628
12629 2013-09-05 Pedro Alves <palves@redhat.com>
12630
12631 * server.h (_): Delete.
12632
12633 2013-09-02 Pedro Alves <palves@redhat.com>
12634
12635 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12636 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12637 allocated.
12638 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12639
12640 2013-09-02 Pierre Muller <muller@sourceware.org>
12641
12642 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12643 or WriteProcessMemory complete successfully and handle
12644 ERROR_PARTIAL_COPY error.
12645
12646 2013-09-02 Pedro Alves <palves@redhat.com>
12647
12648 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12649 error instead of EIO.
12650
12651 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12652
12653 PR server/15604
12654 * linux-low.c: Include filestuff.h.
12655 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12656 * lynx-low.c: Include filestuff.h.
12657 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12658 * server.c: Include filestuff.h.
12659 (main): Call notice_open_fds.
12660 * spu-low.c: Include filestuff.h.
12661 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12662
12663 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12664
12665 * Makefile.in: Explain why ../target and ../nat are not
12666 listed as include file search paths.
12667 (linux-waitpid.o): New object file rule.
12668 * configure.srv (srv_native_linux_obj): New variable.
12669 Replace all occurrences of linux native object files with
12670 $srv_native_linux_obj.
12671 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12672 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12673 (linux_enable_event_reporting): Remove declaration.
12674 (my_waitpid): Moved to common/linux-waitpid.c.
12675 (linux_wait_for_event): Pass ptid when calling
12676 linux_enable_event_reporting.
12677 (linux_supports_tracefork_flag): Remove.
12678 (linux_enable_event_reporting): Likewise.
12679 (linux_tracefork_grandchild): Remove.
12680 (STACK_SIZE): Moved to common/linux-ptrace.c.
12681 (linux_tracefork_child): Remove.
12682 (linux_test_for_tracefork): Remove.
12683 (linux_look_up_symbols): Call linux_supports_traceclone.
12684 (initialize_low): Remove call to linux_test_for_tracefork.
12685 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12686 common/linux-ptrace.h.
12687 (PTRACE_TYPE_ARG4): Likewise.
12688 Include linux-ptrace.h.
12689
12690 2013-08-21 Pedro Alves <palves@redhat.com>
12691
12692 * config.in: Renegerate.
12693
12694 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
12695
12696 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12697 (SFILES): Remove $(srcdir)/common/target-common.c and
12698 add $(srcdir)/target/waitstatus.c.
12699 (OBS): Remove target-common.o and add waitstatus.o.
12700 (server_h): Remove $(srcdir)/../common/target-common.h and
12701 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12702 and $(srcdir)/../target/waitstatus.h.
12703 (target-common.o): Remove.
12704 (waitstatus.o): New target object file.
12705 * target.h: Do not include target-common.h and
12706 include target/resume.h, target/wait.h and
12707 target/waitstatus.h.
12708
12709 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
12710
12711 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12712 to PTRACE_TYPE_ARG3.
12713 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12714 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12715 PTRACE_TYPE_ARG4.
12716 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12717 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12718
12719 2013-07-27 Jie Zhang <jie@codesourcery.com>
12720 Daniel Jacobowitz <dan@codesourcery.com>
12721 Yao Qi <yao@codesourcery.com>
12722
12723 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12724 (mips-linux-watch.o): New rule.
12725 (mips_linux_watch_h): New variable.
12726 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12727 srv_tgtobj.
12728 * linux-mips-low.c: Include mips-linux-watch.h.
12729 (struct arch_process_info, struct arch_lwp_info): New.
12730 (update_watch_registers_callback): New function.
12731 (mips_linux_new_process, mips_linux_new_thread) New functions.
12732 (mips_linux_prepare_to_resume, mips_insert_point): New
12733 functions.
12734 (mips_remove_point, mips_stopped_by_watchpoint): New
12735 functions.
12736 (rsp_bp_type_to_target_hw_bp_type): New function.
12737 (mips_stopped_data_address): New function.
12738 (the_low_target): Add watchpoint support functions.
12739
12740 2013-07-27 Yao Qi <yao@codesourcery.com>
12741
12742 * i386-low.c: Include break-common.h.
12743 (enum target_hw_bp_type): Remove.
12744
12745 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
12746
12747 * Makefile.in (SFILES): /common/target-common.c.
12748 (OBS): Add target-common.o.
12749 (server_h): Add $(srcdir)/../common/target-common.h.
12750 (target-common.o): New target.
12751 * server.c (queue_stop_reply_callback): Free
12752 status string after use.
12753 * target.c (target_waitstatus_to_string): Remove.
12754 * target.h: Include target-common.h.
12755 (resume_kind): Likewise.
12756 (target_waitkind): Likewise.
12757 (target_waitstatus): Likewise.
12758 (TARGET_WNOHANG): Likewise.
12759
12760 2013-07-04 Yao Qi <yao@codesourcery.com>
12761
12762 * Makefile.in (host_alias): Use @host_noncanonical@.
12763 (target_alias): Use @target_noncanonical@.
12764 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12765 ACX_NONCANONICAL_HOST.
12766 * configure: Regenerated.
12767
12768 Revert:
12769 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12770
12771 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12772 * configure: Rebuild.
12773 * Makefile.in (version_host, version_target): Get from configure.
12774 (version.c): Use $(version_host) and $(version_target).
12775
12776 2013-07-03 Pedro Alves <palves@redhat.com>
12777
12778 * Makefile.in (config.status): Depend on development.sh.
12779 * acinclude.m4: Include libmcheck.m4.
12780 * configure: Regenerate.
12781
12782 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12783
12784 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12785 attribute inside the parentheses.
12786 (winapi_DebugSetProcessKillOnExit): Ditto.
12787 (winapi_DebugBreakProcess): Ditto.
12788 (winapi_GenerateConsoleCtrlEvent): Ditto.
12789
12790 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12791
12792 * notif.h (notif_event): Add a dummy member to avoid compiler
12793 errors.
12794
12795 2013-07-01 Pedro Alves <palves@redhat.com>
12796
12797 * hostio.c (HOSTIO_PATH_MAX): Define.
12798 (require_filename, handle_open, handle_unlink, handle_readlink):
12799 Use it.
12800
12801 2013-07-01 Pedro Alves <palves@redhat.com>
12802
12803 * server.h: Include "pathmax.h".
12804 * linux-low.c: Don't include sys/param.h.
12805 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12806 MAXPATHLEN.
12807 * win32-low.c: Don't include sys/param.h.
12808 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12809
12810 2013-07-01 Pedro Alves <palves@redhat.com>
12811
12812 * event-loop.c: Don't check HAVE_UNISTD_H before including
12813 <unistd.h>.
12814 * gdbreplay.c: Likewise.
12815 * remote-utils.c: Likewise.
12816 * server.c: Likewise.
12817 * configure.ac: Don't check for unistd.h.
12818 * configure: Regenerate.
12819
12820 2013-06-28 Tom Tromey <tromey@redhat.com>
12821
12822 * Makefile.in (version.c): Use version.in, not
12823 common/version.in.
12824
12825 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12826
12827 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12828 * configure: Rebuild.
12829 * Makefile.in (version_host, version_target): Get from configure.
12830 (version.c): Use $(version_host) and $(version_target).
12831
12832 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12833
12834 Fix trace-status to output user name without trailing colon.
12835 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12836
12837 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12838
12839 Fix trace-status to output proper start-time and stop-time.
12840 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12841 output start time and stop time in hex as gdb expects.
12842
12843 2013-06-26 Pedro Alves <pedro@codesourcery.com>
12844
12845 * tracepoint.c (build_traceframe_info_xml): Output trace state
12846 variables present in the trace buffer.
12847
12848 2013-06-24 Tom Tromey <tromey@redhat.com>
12849
12850 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12851 create-version.sh.
12852 (version.o): Remove.
12853 * gdbreplay.c: Include version.h.
12854 (version, host_name): Don't declare.
12855 * server.h: Include version.h.
12856 (version, host_name): Don't declare.
12857
12858 2013-06-12 Pedro Alves <palves@redhat.com>
12859
12860 * linux-x86-low.c (linux_is_elf64): Delete global.
12861 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12862 with local linux_pid_exe_is_elf_64_file use.
12863
12864 2013-06-11 Pedro Alves <palves@redhat.com>
12865
12866 * linux-low.c (regset_disabled, disable_regset): New functions.
12867 (regsets_fetch_inferior_registers)
12868 (regsets_store_inferior_registers): Use them.
12869 (initialize_regsets_info); Don't allocate the disabled_regsets
12870 array here.
12871 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12872 comment.
12873
12874 2013-06-11 Pedro Alves <palves@redhat.com>
12875
12876 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12877 xmalloc.
12878
12879 2013-06-11 Pedro Alves <palves@redhat.com>
12880
12881 * linux-x86-low.c (initialize_low_arch): Call
12882 init_registers_x32_avx_linux.
12883
12884 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
12885
12886 Fix compatibility with Android Bionic.
12887 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
12888 it is not empty.
12889
12890 2013-06-07 Pedro Alves <palves@redhat.com>
12891
12892 PR server/14823
12893 * Makefile.in (OBS): Add tdesc.o.
12894 (IPA_OBJS): Add tdesc-ipa.o.
12895 (tdesc-ipa.o): New rule.
12896 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
12897 interface.
12898 * linux-low.c (new_inferior): Delete.
12899 (disabled_regsets, num_regsets): Delete.
12900 (linux_add_process): Adjust to set the new per-process
12901 new_inferior flag.
12902 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
12903 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
12904 was a stop. When calling arch_setup, switch the current inferior
12905 to the thread that got an event.
12906 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
12907 (regsets_fetch_inferior_registers)
12908 (regsets_store_inferior_registers): New regsets_info parameter.
12909 Adjust to use it.
12910 (linux_register_in_regsets): New regs_info parameter. Adjust to
12911 use it.
12912 (register_addr, fetch_register, store_register): New usrregs_info
12913 parameter. Adjust to use it.
12914 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
12915 parameter regs_info. Adjust to use it.
12916 (linux_fetch_registers): Get the current inferior's regs_info, and
12917 adjust to use it.
12918 (linux_store_registers): Ditto.
12919 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
12920 (initialize_low): Don't initialize the target_regsets here. Call
12921 initialize_low_arch.
12922 * linux-low.h (target_regsets): Delete declaration.
12923 (struct regsets_info): New.
12924 (struct usrregs_info): New.
12925 (struct regs_info): New.
12926 (struct process_info_private) <new_inferior>: New field.
12927 (struct linux_target_ops): Delete the num_regs, regmap, and
12928 regset_bitmap fields. New field regs_info.
12929 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
12930 * i387-fp.c (num_xmm_registers): Delete.
12931 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
12932 calls to new interface.
12933 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
12934 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
12935 Infer the number of xmm registers from the regcache's target
12936 description.
12937 * i387-fp.h (num_xmm_registers): Delete.
12938 * inferiors.c (add_thread): Don't install the thread's regcache
12939 here.
12940 * proc-service.c (gregset_info): Fetch the current inferior's
12941 regs_info. Adjust to use it.
12942 * regcache.c: Include tdesc.h.
12943 (register_bytes, reg_defs, num_registers)
12944 (gdbserver_expedite_regs): Delete.
12945 (get_thread_regcache): If the thread doesn't have a regcache yet,
12946 create one, instead of aborting gdbserver.
12947 (regcache_invalidate_one): Rename to ...
12948 (regcache_invalidate_thread): ... this.
12949 (regcache_invalidate_one): New.
12950 (regcache_invalidate): Only invalidate registers of the current
12951 process.
12952 (init_register_cache): Add target_desc parameter, and use it.
12953 (new_register_cache): Ditto. Assert the target description has a
12954 non zero registers_size.
12955 (regcache_cpy): Add assertions. Adjust.
12956 (realloc_register_cache, set_register_cache): Delete.
12957 (registers_to_string, registers_from_string): Adjust.
12958 (find_register_by_name, find_regno, find_register_by_number)
12959 (register_cache_size): Add target_desc parameter, and use it.
12960 (free_register_cache_thread, free_register_cache_thread_one)
12961 (regcache_release, register_cache_size): New.
12962 (register_size): Add target_desc parameter, and use it.
12963 (register_data, supply_register, supply_register_zeroed)
12964 (supply_regblock, supply_register_by_name, collect_register)
12965 (collect_register_as_string, collect_register_by_name): Adjust.
12966 * regcache.h (struct target_desc): Forward declare.
12967 (struct regcache) <tdesc>: New field.
12968 (init_register_cache, new_register_cache): Add target_desc
12969 parameter.
12970 (regcache_invalidate_thread): Declare.
12971 (regcache_invalidate_one): Delete declaration.
12972 (regcache_release): Declare.
12973 (find_register_by_number, register_cache_size, register_size)
12974 (find_regno): Add target_desc parameter.
12975 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
12976 declarations.
12977 * remote-utils.c: Include tdesc.h.
12978 (outreg, prepare_resume_reply): Adjust.
12979 * server.c: Include tdesc.h.
12980 (gdbserver_xmltarget): Delete declaration.
12981 (get_features_xml, process_serial_event): Adjust.
12982 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
12983 declare.
12984 (struct process_info) <tdesc>: New field.
12985 (ipa_tdesc): Declare.
12986 * tdesc.c: New file.
12987 * tdesc.h: New file.
12988 * tracepoint.c: Include tdesc.h.
12989 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
12990 (get_context_regcache): Adjust to pass ipa_tdesc down.
12991 (do_action_at_tracepoint): Adjust to get the register cache size
12992 from the context regcache's description.
12993 (traceframe_walk_blocks): Adjust to get the register cache size
12994 from the current trace frame's description.
12995 (traceframe_get_pc): Adjust to get current trace frame's
12996 description and pass it down.
12997 (gdb_collect): Adjust to get the register cache size from the
12998 IPA's description.
12999 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13000 (gdbserver_xmltarget): Delete.
13001 (initialize_low_tracepoint): Set the ipa's target description.
13002 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13003 (initialize_low_tracepoint): Set the ipa's target description.
13004 * linux-x86-low.c: Include tdesc.h.
13005 [__x86_64__] (is_64bit_tdesc): New.
13006 (ps_get_thread_area, x86_get_thread_area): Use it.
13007 (i386_cannot_store_register): Rename to ...
13008 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13009 (i386_cannot_fetch_register): Rename to ...
13010 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13011 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13012 to new interface.
13013 (target_regsets): Rename to ...
13014 (x86_regsets): ... this.
13015 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13016 interface.
13017 (x86_siginfo_fixup): Use is_64bit_tdesc.
13018 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13019 (tdesc_x32_avx_linux, tdesc_x32_linux)
13020 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13021 Declare.
13022 (x86_linux_update_xmltarget): Delete.
13023 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13024 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13025 (AMD64_LINUX_USER64_CS): New.
13026 (x86_linux_read_description): New, based on
13027 x86_linux_update_xmltarget.
13028 (same_process_callback): New.
13029 (x86_arch_setup_process_callback): New.
13030 (x86_linux_update_xmltarget): New.
13031 (x86_regsets_info): New.
13032 (amd64_linux_regs_info): New.
13033 (i386_linux_usrregs_info): New.
13034 (i386_linux_regs_info): New.
13035 (x86_linux_regs_info): New.
13036 (x86_arch_setup): Reimplement.
13037 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13038 (x86_emit_ops): Ditto.
13039 (the_low_target): Adjust. Install x86_linux_regs_info,
13040 x86_cannot_fetch_register, and x86_cannot_store_register.
13041 (initialize_low_arch): New.
13042 * linux-ia64-low.c (tdesc_ia64): Declare.
13043 (ia64_fetch_register): Adjust.
13044 (ia64_usrregs_info, regs_info): New globals.
13045 (ia64_regs_info): New function.
13046 (the_low_target): Adjust.
13047 (initialize_low_arch): New function.
13048 * linux-sparc-low.c (tdesc_sparc64): Declare.
13049 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13050 Adjust.
13051 (sparc_arch_setup): New function.
13052 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13053 (the_low_target): Adjust.
13054 (initialize_low_arch): New function.
13055 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13056 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13057 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13058 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13059 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13060 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13061 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13062 (tdesc_powerpc_isa205_vsx64l): Declare.
13063 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13064 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13065 (ppc_set_pc, ppc_get_hwcap): Adjust.
13066 (ppc_usrregs_info): Forward declare.
13067 (!__powerpc64__) ppc_regmap_adjusted: New global.
13068 (ppc_arch_setup): Adjust to the current process'es target
13069 description.
13070 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13071 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13072 (ppc_store_evrregset): Adjust.
13073 (target_regsets): Rename to ...
13074 (ppc_regsets): ... this, and make static.
13075 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13076 (ppc_regs_info): New function.
13077 (the_low_target): Adjust.
13078 (initialize_low_arch): New function.
13079 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13080 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13081 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13082 (tdesc_s390x_linux64v2): Declare.
13083 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13084 (s390_fill_gregset, s390_store_last_break): Adjust.
13085 (target_regsets): Rename to ...
13086 (s390_regsets): ... this, and make static.
13087 (s390_get_pc, s390_set_pc): Adjust.
13088 (s390_get_hwcap): New target_desc parameter, and use it.
13089 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13090 (s390_arch_setup): Adjust to set the current process'es target
13091 description. Don't adjust the regmap.
13092 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13093 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13094 (regs_info_3264): New globals.
13095 (s390_regs_info): New function.
13096 (the_low_target): Adjust.
13097 (initialize_low_arch): New function.
13098 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13099 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13100 [__mips64] (init_registers_mips_linux)
13101 (init_registers_mips_dsp_linux): Delete defines.
13102 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13103 (have_dsp): New global.
13104 (mips_read_description): New, based on mips_arch_setup.
13105 (mips_arch_setup): Reimplement.
13106 (get_usrregs_info): New function.
13107 (mips_cannot_fetch_register, mips_cannot_store_register)
13108 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13109 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13110 (target_regsets): Rename to ...
13111 (mips_regsets): ... this, and make static.
13112 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13113 (dsp_regs_info, regs_info): New globals.
13114 (mips_regs_info): New function.
13115 (the_low_target): Adjust.
13116 (initialize_low_arch): New function.
13117 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13118 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13119 Declare.
13120 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
13121 (arm_read_description): New, with bits factored from
13122 arm_arch_setup.
13123 (arm_arch_setup): Reimplement.
13124 (target_regsets): Rename to ...
13125 (arm_regsets): ... this, and make static.
13126 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
13127 (arm_regs_info): New function.
13128 (the_low_target): Adjust.
13129 (initialize_low_arch): New function.
13130 * linux-m68k-low.c (tdesc_m68k): Declare.
13131 (target_regsets): Rename to ...
13132 (m68k_regsets): ... this, and make static.
13133 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
13134 (m68k_regs_info): New function.
13135 (m68k_arch_setup): New function.
13136 (the_low_target): Adjust.
13137 (initialize_low_arch): New function.
13138 * linux-sh-low.c (tdesc_sharch): Declare.
13139 (target_regsets): Rename to ...
13140 (sh_regsets): ... this, and make static.
13141 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
13142 (sh_regs_info, sh_arch_setup): New functions.
13143 (the_low_target): Adjust.
13144 (initialize_low_arch): New function.
13145 * linux-bfin-low.c (tdesc_bfin): Declare.
13146 (bfin_arch_setup): New function.
13147 (bfin_usrregs_info, regs_info): New globals.
13148 (bfin_regs_info): New function.
13149 (the_low_target): Adjust.
13150 (initialize_low_arch): New function.
13151 * linux-cris-low.c (tdesc_cris): Declare.
13152 (cris_arch_setup): New function.
13153 (cris_usrregs_info, regs_info): New globals.
13154 (cris_regs_info): New function.
13155 (the_low_target): Adjust.
13156 (initialize_low_arch): New function.
13157 * linux-cris-low.c (tdesc_crisv32): Declare.
13158 (cris_arch_setup): New function.
13159 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
13160 (cris_regs_info): New function.
13161 (the_low_target): Adjust.
13162 (initialize_low_arch): New function.
13163 * linux-m32r-low.c (tdesc_m32r): Declare.
13164 (m32r_arch_setup): New function.
13165 (m32r_usrregs_info, regs_info): New globals.
13166 (m32r_regs_info): Adjust.
13167 (initialize_low_arch): New function.
13168 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
13169 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
13170 (tic6x_usrregs_info): Forward declare.
13171 (tic6x_read_description): New function, based on ...
13172 (tic6x_arch_setup): ... this. Reimplement.
13173 (target_regsets): Rename to ...
13174 (tic6x_regsets): ... this, and make static.
13175 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
13176 (tic6x_regs_info): New function.
13177 (the_low_target): Adjust.
13178 (initialize_low_arch): New function.
13179 * linux-xtensa-low.c (tdesc_xtensa): Declare.
13180 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
13181 (target_regsets): Rename to ...
13182 (xtensa_regsets): ... this, and make static.
13183 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
13184 globals.
13185 (xtensa_arch_setup, xtensa_regs_info): New functions.
13186 (the_low_target): Adjust.
13187 (initialize_low_arch): New function.
13188 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
13189 (nios2_arch_setup): Set the current process'es tdesc.
13190 (target_regsets): Rename to ...
13191 (nios2_regsets): ... this.
13192 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
13193 (nios2_regs_info): New function.
13194 (the_low_target): Adjust.
13195 (initialize_low_arch): New function.
13196 * linux-aarch64-low.c (tdesc_aarch64): Declare.
13197 (aarch64_arch_setup): Set the current process'es tdesc.
13198 (target_regsets): Rename to ...
13199 (aarch64_regsets): ... this.
13200 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
13201 (aarch64_regs_info): New function.
13202 (the_low_target): Adjust.
13203 (initialize_low_arch): New function.
13204 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
13205 globals.
13206 (target_regsets): Rename to ...
13207 (tile_regsets): ... this.
13208 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
13209 (tile_regs_info): New function.
13210 (tile_arch_setup): Set the current process'es tdesc.
13211 (the_low_target): Adjust.
13212 (initialize_low_arch): New function.
13213 * spu-low.c (tdesc_spu): Declare.
13214 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
13215 * win32-arm-low.c (tdesc_arm): Declare.
13216 (arm_arch_setup): New function.
13217 (the_low_target): Install arm_arch_setup instead of
13218 init_registers_arm.
13219 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
13220 (init_windows_x86): Rename to ...
13221 (i386_arch_setup): ... this. Set `win32_tdesc'.
13222 (the_low_target): Adjust.
13223 * win32-low.c (win32_tdesc): New global.
13224 (child_add_thread): Don't create the thread cache here.
13225 (do_initial_child_stuff): Set the new process'es tdesc.
13226 * win32-low.h (struct target_desc): Forward declare.
13227 (win32_tdesc): Declare.
13228 * lynx-i386-low.c (tdesc_i386): Declare global.
13229 (lynx_i386_arch_setup): Set `lynx_tdesc'.
13230 * lynx-low.c (lynx_tdesc): New global.
13231 (lynx_add_process): Set the new process'es tdesc.
13232 * lynx-low.h (struct target_desc): Forward declare.
13233 (lynx_tdesc): Declare global.
13234 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
13235 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
13236 * nto-low.c (nto_tdesc): New global.
13237 (do_attach): Set the new process'es tdesc.
13238 * nto-low.h (struct target_desc): Forward declare.
13239 (nto_tdesc): Declare.
13240 * nto-x86-low.c (tdesc_i386): Declare.
13241 (nto_x86_arch_setup): Set `nto_tdesc'.
13242
13243 2013-06-04 Gary Benson <gbenson@redhat.com>
13244
13245 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
13246 to qSupported response when appropriate.
13247 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
13248 with nonzero-length annex.
13249 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
13250 arguments supplied in annex.
13251
13252 2013-05-31 Doug Evans <dje@google.com>
13253
13254 PR server/15594
13255 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
13256 64 bits in 64-cross-32 environment.
13257
13258 2013-05-28 Pedro Alves <palves@redhat.com>
13259
13260 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
13261 (aarch64-without-fpu.c): Delete rule.
13262 * configure.srv (aarch64*-*-linux*): Remove references to
13263 aarch64-without-fpu.o and aarch64-without-fpu.xml.
13264 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
13265 declaration.
13266
13267 2013-05-24 Pedro Alves <palves@redhat.com>
13268
13269 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
13270 instead of strchr/decode_address. Error if the range isn't split
13271 with a ','. Don't assume there's be a ':' in the action.
13272
13273 2013-05-23 Yao Qi <yao@codesourcery.com>
13274 Pedro Alves <palves@redhat.com>
13275
13276 * linux-low.c (lwp_in_step_range): New function.
13277 (linux_wait_1): If the thread was range stepping and stopped
13278 outside the stepping range, report the stop to GDB. Otherwise,
13279 continue stepping. Add range stepping debug output.
13280 (linux_set_resume_request): Copy the step range from the resume
13281 request to the lwp.
13282 (linux_supports_range_stepping): New.
13283 (linux_target_ops) <supports_range_stepping>: Set to
13284 linux_supports_range_stepping.
13285 * linux-low.h (struct linux_target_ops)
13286 <supports_range_stepping>: New field.
13287 (struct lwp_info) <step_range_start, step_range_end>: New fields.
13288 * linux-x86-low.c (x86_supports_range_stepping): New.
13289 (the_low_target) <supports_range_stepping>: Set to
13290 x86_supports_range_stepping.
13291 * server.c (handle_v_cont): Handle 'r' action.
13292 (handle_v_requests): Append ";r" if the target supports range
13293 stepping.
13294 * target.h (struct thread_resume) <step_range_start,
13295 step_range_end>: New fields.
13296 (struct target_ops) <supports_range_stepping>:
13297 New field.
13298 (target_supports_range_stepping): New macro.
13299
13300 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13301
13302 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
13303 confusion in comment.
13304
13305 2013-05-17 Joel Brobecker <brobecker@adacore.com>
13306
13307 * lynx-low.c (struct process_info_private): New type.
13308 (lynx_add_process): New function.
13309 (lynx_create_inferior, lynx_attach): Replace calls to
13310 add_process by calls to lynx_add_process.
13311 (lynx_resume): If PTID is null, then try using
13312 current_process()->private->last_wait_event_ptid.
13313 Add comments.
13314 (lynx_clear_inferiors): Delete. The contents of that function
13315 has been inlined in lynx_mourn;
13316 (lynx_wait_1): Save the ptid in the process's private data.
13317 (lynx_mourn): Free the process' private data. Replace call
13318 to lynx_clear_inferiors by call to clear_inferiors.
13319
13320 2013-05-17 Yao Qi <yao@codesourcery.com>
13321
13322 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13323 the right place.
13324
13325 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13326
13327 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13328 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13329 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13330 PT_TEXT_END_ADDR guards. Update comments.
13331 (linux_target_op) <read_offsets>: Conditionally define to
13332 linux_read_offsets if the target is UCLIBC and if it defines
13333 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13334
13335 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13336 Andrew Jenner <andrew@codesourcery.com>
13337
13338 * Makefile.in (SFILES): Add linux-nios2-low.c.
13339 (clean): Add action to delete nios2-linux.c.
13340 (nios2-linux.c): New rule.
13341 * configure.srv: Add nios2*-*-linux*.
13342 * linux-nios2-low.c: New.
13343
13344 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13345
13346 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13347
13348 2013-04-25 Hui Zhu <hui@codesourcery.com>
13349
13350 PR gdb/15186
13351 * ax.c (ax_printf): Add fflush.
13352
13353 2013-04-22 Tom Tromey <tromey@redhat.com>
13354
13355 * Makefile.in (SFILES): Add filestuff.c.
13356 (OBS): Add filestuff.o.
13357 (filestuff.o): New target.
13358 * config.in, configure: Rebuild.
13359 * configure.ac: Check for fdwalk, pipe2.
13360
13361 2013-04-17 Pedro Alves <palves@redhat.com>
13362
13363 * configure.ac (USE_THREAD_DB): Delete variable.
13364 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13365 Don't AC_SUBST USE_THREAD_DB.
13366 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13367 * config.in, configure: Regenerate.
13368
13369 2013-04-16 Pedro Alves <palves@redhat.com>
13370
13371 * linux-low.h (struct lwp_info) <thread_known>: Move under
13372 the USE_THREAD_DB #ifdef.
13373
13374 2013-04-16 Pedro Alves <palves@redhat.com>
13375
13376 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13377 (linux-low.o): Delete rule.
13378 * linux-low.h: Always include "gdb_thread_db.h" instead of
13379 conditionally including thread_db.h.
13380 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13381 HAVE_THREAD_DB_H.
13382
13383 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13384
13385 * Makefile.in (install-only): Fix make install regression.
13386
13387 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13388
13389 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13390 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13391 installation.
13392 * gdbserver.1: Remove.
13393
13394 2013-03-22 Pedro Alves <palves@redhat.com>
13395
13396 * linux-low.c (handle_extended_wait): Don't call
13397 linux_enable_event_reporting.
13398
13399 2013-03-15 Tony Theodore <tonyt@logyst.com>
13400
13401 PR build/9098:
13402 * Makefile.in (SHELL): Use @SHELL@.
13403
13404 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13405
13406 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13407 compiler warning.
13408
13409 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13410
13411 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13412 Remove extraneous NULL element.
13413
13414 2013-03-13 Yao Qi <yao@codesourcery.com>
13415
13416 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13417 'V' block in trace frame.
13418
13419 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13420
13421 * target.h (struct target_ops): Add btrace ops.
13422 (target_supports_btrace): New macro.
13423 (target_enable_btrace): New macro.
13424 (target_disable_btrace): New macro.
13425 (target_read_btrace): New macro.
13426 * gdbthread.h (struct thread_info): Add btrace field.
13427 * server.c: Include btrace-common.h.
13428 (handle_btrace_general_set): New function.
13429 (handle_btrace_enable): New function.
13430 (handle_btrace_disable): New function.
13431 (handle_general_set): Call handle_btrace_general_set.
13432 (handle_qxfer_btrace): New function.
13433 (struct qxfer qxfer_packets[]): Add btrace entry.
13434 * inferiors.c (remove_thread): Disable btrace.
13435 * linux-low: Include linux-btrace.h.
13436 (linux_low_enable_btrace): New function.
13437 (linux_low_read_btrace): New function.
13438 (linux_target_ops): Add btrace ops.
13439 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13440 Add srv_linux_btrace=yes.
13441 (x86_64-*-linux*): Add linux-btrace.o.
13442 Add srv_linux_btrace=yes.
13443 * configure.ac: Define HAVE_LINUX_BTRACE.
13444 * config.in: Regenerated.
13445 * configure: Regenerated.
13446
13447 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13448
13449 * server.c (handle_qxfer): Preserve error message if -3 is
13450 returned.
13451 (qxfer): Document the -3 return value.
13452
13453 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13454
13455 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13456 (linux_btrace_h): New variable.
13457 (linux-btrace.o): New rule.
13458
13459 2013-03-08 Stan Shebs <stan@codesourcery.com>
13460 Hafiz Abid Qadeer <abidh@codesourcery.com>
13461
13462 * tracepoint.c (trace_buffer_size): New global.
13463 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13464 (init_trace_buffer): Change to one-argument function. Allocate
13465 trace buffer memory.
13466 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13467 handle QTBuffer:size packet.
13468 (cmd_bigqtbuffer_size): New function.
13469 (initialize_tracepoint): Call init_trace_buffer with
13470 DEFAULT_TRACE_BUFFER_SIZE.
13471 * server.c (handle_query): Add QTBuffer:size in the
13472 supported packets.
13473
13474 2013-03-07 Yao Qi <yao@codesourcery.com>
13475
13476 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13477 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13478 of -1.
13479 (cmd_qtsp): Adjust condition. Do post increment.
13480 Set cur_action and cur_step_action back to 0.
13481
13482 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13483
13484 PR server/15236
13485 * linux-low.c (linux_write_memory): Return early success if LEN is
13486 zero.
13487
13488 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13489
13490 * configure.srv: Add x86_64-*-cygwin* as target.
13491
13492 2013-02-28 Tom Tromey <tromey@redhat.com>
13493
13494 * configure.ac: Invoke AC_SYS_LARGEFILE.
13495 * configure, config.in: Rebuild.
13496
13497 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13498
13499 * win32-low.c: Throughout, fix format strings and casts of
13500 printf-like functions to avoid type related warnings on all
13501 platforms.
13502 (get_child_debug_event): Print dwDebugEventCode as hex since
13503 that's how it's usually documented.
13504
13505 2013-02-28 Yao Qi <yao@codesourcery.com>
13506
13507 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13508 pulongest.
13509
13510 2013-02-27 Jiong Wang <jiwang@tilera.com>
13511
13512 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13513 (reg-tilegx32.c): New rule.
13514 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13515 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13516 different register info initializer according to elf class.
13517 (init_registers_tilgx32): New function. The tilegx32 register info
13518 initializer.
13519 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13520 (tile_store_gregset): Likewise.
13521
13522 2013-02-27 Yao Qi <yao@codesourcery.com>
13523
13524 * server.c (process_point_options): Print debug message when
13525 debug_threads is true.
13526
13527 2013-02-26 Yao Qi <yao@codesourcery.com>
13528
13529 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13530
13531 2013-02-19 Pedro Alves <palves@redhat.com>
13532 Kai Tietz <ktietz@redhat.com>
13533
13534 PR gdb/15161
13535
13536 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13537 instead of strtoul to extract address from packet.
13538 (process_serial_event) <'z'>: Likewise.
13539
13540 2013-02-18 Yao Qi <yao@codesourcery.com>
13541
13542 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13543
13544 2013-02-14 Pedro Alves <palves@redhat.com>
13545
13546 Plug memory leak.
13547
13548 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13549 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13550
13551 2013-02-14 Pedro Alves <palves@redhat.com>
13552
13553 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13554
13555 2013-02-14 Pedro Alves <palves@redhat.com>
13556
13557 * tracepoint.c (save_string): Delete.
13558 (add_tracepoint_action): Use savestring instead of save_string.
13559
13560 2013-02-12 Pedro Alves <palves@redhat.com>
13561
13562 * linux-xtensa-low.c: Ditto.
13563 * xtensa-xtregs.c: Ditto.
13564
13565 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13566
13567 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13568 thread_db.
13569
13570 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13571
13572 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13573 aarch64_num_wp_regs and aarch64_num_bp_regs to
13574 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13575
13576 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13577
13578 * linux-aarch64-low.c (ps_get_thread_area): Replace
13579 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13580
13581 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13582 Marcus Shawcroft <marcus.shawcroft@arm.com>
13583 Nigel Stephens <nigel.stephens@arm.com>
13584 Yufeng Zhang <yufeng.zhang@arm.com>
13585
13586 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13587 (aarch64.c, aarch64-without-fpu.c): New targets.
13588 * configure.srv (aarch64*-*-linux*): New.
13589 * linux-aarch64-low.c: New file.
13590
13591 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13592
13593 * linux-low.c (handle_extended_wait, linux_create_inferior)
13594 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13595 (dequeue_one_deferred_signal, linux_resume_one_thread)
13596 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13597 (linux_tracefork_grandchild, linux_test_for_tracefork)
13598 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13599 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13600 where the argument is 0.
13601
13602 2013-01-25 Yao Qi <yao@codesourcery.com>
13603
13604 * event-loop.c: Include "queue.h".
13605 (gdb_event_p): New typedef.
13606 (struct gdb_event) <next_event>: Remove.
13607 (event_queue): Change to QUEUE(gdb_event_p).
13608 (async_queue_event): Remove.
13609 (gdb_event_xfree): New.
13610 (initialize_event_loop): New.
13611 (process_event): Use API from QUEUE.
13612 (wait_for_event): Likewise.
13613 * server.c (main): Call initialize_event_loop.
13614 * server.h (initialize_event_loop): Declare.
13615
13616 2013-01-18 Yao Qi <yao@codesourcery.com>
13617
13618 * ax.h (struct eval_agent_expr_context): New.
13619 (gdb_eval_agent_expr): Update declaration.
13620 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13621 TFRAME. Add new argument CTX.
13622 * server.h (struct eval_agent_expr_context): Declare.
13623 (agent_mem_read, agent_tsv_read): Update declaration.
13624 (agent_mem_read_string): Likewise.
13625 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13626 (add_traceframe_block): Add new argument TPOINT.
13627 Increase TPOINT->traceframe_usage.
13628 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13629 eval_tracepoint_agent_expr.
13630 (condition_true_at_tracepoint): Likewise.
13631 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13632 (agent_mem_read_string, agent_tsv_read): Likewise.
13633
13634 2013-01-16 Yao Qi <yao@codesourcery.com>
13635
13636 * linux-low.c (linux_resume_one_lwp): Don't check
13637 'lwp->bp_reinsert != 0'.
13638
13639 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13640 Pedro Alves <palves@redhat.com>
13641
13642 * lynx-low.c (ptrace_request_to_str): Define a temporary
13643 macro and use it to simplify this function's implementation.
13644
13645 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13646
13647 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13648 sets errno.
13649
13650 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13651
13652 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13653
13654 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13655
13656 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13657
13658 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13659
13660 * lynx-low.c (lynx_resume): Use the resume_info parameter
13661 to determine the ptid for the lynx_ptrace call, unless
13662 it is equal to minus_one_ptid, in which case we use the
13663 ptid of the current_inferior.
13664 (lynx_wait_1): After having received a thread create/exit
13665 event, resume the inferior's execution using the signaling
13666 thread's ptid, rather than the old ptid.
13667
13668 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13669
13670 * lynx-low.c (lynx_resume): Delete variable ret.
13671
13672 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13673
13674 * gdbreplay.c (gdbreplay_version): Update copyright year.
13675 * server.c (gdbserver_version): Likewise.
13676
13677 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13678
13679 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13680 new thread.
13681
13682 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13683
13684 * lynx-low.c (ptrace_request_to_str): Add handling for
13685 PTRACE_GETTRACESIG.
13686
13687 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13688
13689 * lynx-low.c (lynx_attach): Delete variable new_process.
13690
13691 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13692
13693 * lynx-low.c (lynx_create_inferior): Delete variable
13694 new_process.
13695
13696 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13697
13698 * lynx-low.c (ptrace_request_to_str): Do not handle
13699 PTRACE_GETTHREADLIST if this macro does not exist.
13700
13701 2012-12-15 Yao Qi <yao@codesourcery.com>
13702
13703 * Makefile.in (OBS): Add notif.o.
13704 * notif.c, notif.h: New.
13705 * server.c: Include "notif.h".
13706 (struct vstop_notif) <next>: Remove.
13707 <base>: New field.
13708 (queue_stop_reply): Update.
13709 (push_event, send_next_stop_reply): Remove.
13710 (discard_queued_stop_replies): Update.
13711 (notif_stop): New variable.
13712 (handle_v_stopped): Remove.
13713 (handle_v_requests): Don't call handle_v_stopped. Call
13714 handle_ack_notif instead.
13715 (queue_stop_reply_callback): Call notif_event_enque instead
13716 of queue_stop_reply.
13717 (handle_status): Don't call send_next_stop_reply, call
13718 notif_write_event instead.
13719 (kill_inferior_callback): Likewise.
13720 (detach_or_kill_inferior_callback): Likewise.
13721 (main): Call initialize_notif.
13722 (process_serial_event): Call QUEUE_is_empty.
13723 (handle_target_event): Call notif_push instead of push event.
13724 * server.h (push_event): Remove declaration.
13725
13726 2012-12-10 Tom Tromey <tromey@redhat.com>
13727
13728 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13729 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13730 macros.
13731 (.c.o): Rewrite.
13732 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13733 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13734 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13735 (amd64-linux-ipa.o, ax.o): Rewrite.
13736 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13737 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13738 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13739 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13740 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13741 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13742 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13743 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13744 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13745 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13746 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13747 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13748 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13749 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13750 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13751 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13752 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13753 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13754 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13755 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13756 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13757 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13758 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13759 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13760 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13761 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13762 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13763 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13764 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13765 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13766 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13767 (reg-tilegx.o): Remove.
13768 (all_object_files): New macro.
13769 Include .deps files.
13770 * aclocal.m4, configure: Rebuild.
13771 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13772 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13773 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13774
13775 2012-12-05 Tom Tromey <tromey@redhat.com>
13776
13777 PR gdb/14917:
13778 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13779
13780 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
13781
13782 * configure.ac: Check for linux/perf_event.h.
13783 * config.in: Regenerated.
13784 * configure: Regenerated.
13785
13786 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13787
13788 * hostio.c (handle_readlink): Decrease buffer size
13789 parameter passed to readlink by one byte.
13790
13791 2012-11-26 Yao Qi <yao@codesourcery.com>
13792
13793 * configure.ac (build_warnings): Append '-Wempty-body'.
13794 * configure: Regenerated.
13795 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13796 body.
13797
13798 2012-11-15 Pierre Muller <muller@sourceware.org>
13799
13800 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13801 * config.in: Regenerate.
13802 * configure: Regenerate.
13803 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13804 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13805 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13806 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13807 header.
13808 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13809 instead of <sys/wait.h> header.
13810 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13811
13812 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
13813
13814 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13815 (various make rules): Remove -DGDBSERVER
13816
13817 2012-11-09 Yao Qi <yao@codesourcery.com>
13818
13819 * spu-low.c (current_ptid): Move it to ..
13820 * gdbthread.h: ... here. New.
13821 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13822 * server.c (myresume, process_serial_event): Likewise.
13823 * thread-db.c (thread_db_find_new_threads): Likewise.
13824 * tracepoint.c (run_inferior_command): Likewise.
13825
13826 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
13827
13828 * server.c (handle_search_memory_1): Include access length in
13829 warning message.
13830
13831 2012-09-05 Michael Brandt <michael.brandt@axis.com>
13832
13833 * linux-crisv32-low.c: Fix compile errors.
13834
13835 2012-09-04 Yao Qi <yao@codesourcery.com>
13836
13837 * tracepoint.c (cmd_qtsv): Adjust debug message.
13838 Don't check CUR_TPOINT.
13839
13840 2012-08-28 Yao Qi <yao@codesourcery.com>
13841
13842 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13843 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13844 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13845 Remove declarations of xmalloc, xreallloc, xstrdup and
13846 freeargv.
13847 * Makefile.in (libiberty_h): New.
13848 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13849 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13850
13851 2012-08-23 Yao Qi <yao@codesourcery.com>
13852
13853 * server.h: Remove declaration of 'xsnprintf'.
13854
13855 2012-08-22 Keith Seitz <keiths@redhat.com>
13856
13857 * server.h: Include build-gnulib-gbserver/config.h.
13858 * gdbreplay.c: Likewise.
13859
13860 2012-08-08 Doug Evans <dje@google.com>
13861
13862 * Makefile.in (SFILES): Add gdb_vecs.c.
13863 (OBS): Add gdb_vecs.o.
13864 (gdb_vecs_h, host_defs_h): New variables.
13865 (thread-db.o): Add $(gdb_vecs_h) dependency.
13866 (gdb_vecs.o): New rule.
13867 * thread-db.c: #include "gdb_vecs.h".
13868 (thread_db_load_search): Use a vector to iterate over path elements.
13869 Handle text appearing after "$pdir".
13870
13871 * configure.ac: Add check for strstr.
13872 * config.in: Regenerate.
13873 * configure: Regenerate.
13874
13875 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13876
13877 * hostio.c (handle_pread): If pread fails, fall back to attempting
13878 lseek/read.
13879 (handle_pwrite): Likewise for pwrite.
13880
13881 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
13882
13883 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
13884 between unsupported TYPE and unimplementable ADDR/LEN combination.
13885 (arm_insert_point): Act on new return value.
13886
13887 2012-07-31 Pedro Alves <palves@redhat.com>
13888
13889 * server.c (process_point_options): Only skip tokens if we find
13890 one that is unrecognized. Don't treat 'X' specially while
13891 skipping unrecognized tokens.
13892
13893 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
13894
13895 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
13896 to 4-byte-align HW breakpoint addresses for Thumb.
13897
13898 2012-07-27 Yao Qi <yao@codesourcery.com>
13899
13900 PR remote/14161.
13901
13902 * server.h: Declare gdb_agent_about_to_close.
13903 * target.c (kill_inferior): Include "agent.h".
13904 New. Send command 'kill'.
13905 * target.h (kill_inferior): Removed macro.
13906 * tracepoint.c (gdb_agent_about_to_close): New.
13907 (gdb_agent_helper_thread): Handle command 'close'.
13908 Wait endlessly until the inferior stops.
13909 Install gdb_agent_remove_socket to atexit hook.
13910 (agent_socket_name): New static variable.
13911 (gdb_agent_socket_init): Replace local variable 'name' with
13912 'agent_socket_name'.
13913 (gdb_agent_remove_socket): New.
13914
13915 2012-07-27 Yao Qi <yao@codesourcery.com>
13916
13917 * server.c (process_point_options): Stop at 'X' when parsing.
13918
13919 2012-07-19 Michael Eager <eager@eagercon.com>
13920
13921 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
13922 to hw_execute.
13923 * linux-x86-low.c (x86_insert_point, x86_remove_point):
13924 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
13925 hardware breakpoint.
13926
13927 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13928
13929 * gdbserver/linux-low.c (initialize_low): Call
13930 linux_ptrace_init_warnings.
13931
13932 2012-07-02 Doug Evans <dje@google.com>
13933
13934 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
13935 pointer to int.
13936
13937 2012-07-02 Stan Shebs <stan@codesourcery.com>
13938
13939 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
13940 (ax.o): Add it to build rule.
13941 (ax-ipa.o): Ditto.
13942 (OBS): Add format.o.
13943 (IPA_OBS): Add format.o.
13944 * server.c (handle_query): Claim support for breakpoint commands.
13945 (process_point_options): Add command case.
13946 (process_serial_event): Leave running if there are printfs in
13947 effect.
13948 * mem-break.h (any_persistent_commands): Declare.
13949 (add_breakpoint_commands): Declare.
13950 (gdb_no_commands_at_breakpoint): Declare.
13951 (run_breakpoint_commands): Declare.
13952 * mem-break.c (struct point_command_list): New struct.
13953 (struct breakpoint): New field command_list.
13954 (any_persistent_commands): New function.
13955 (add_commands_to_breakpoint): New function.
13956 (add_breakpoint_commands): New function.
13957 (gdb_no_commands_at_breakpoint): New function.
13958 (run_breakpoint_commands): New function.
13959 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
13960 locally.
13961 * ax.c: Include format.h.
13962 (ax_printf): New function.
13963 (gdb_eval_agent_expr): Add printf opcode.
13964
13965 2012-06-13 Yao Qi <yao@codesourcery.com>
13966
13967 * server.c (start_inferior): Remove duplicated writes to fields
13968 'last_resume_kind' and 'last_status' of 'current_inferior'.
13969
13970 2012-06-12 Yao Qi <yao@codesourcery.com>
13971 Pedro Alves <palves@redhat.com>
13972
13973 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
13974 comment.
13975 * server.c (handle_v_cont): Extend comment.
13976
13977 2012-06-11 Yao Qi <yao@codesourcery.com>
13978
13979 * linux-low.c (linux_attach): Add 'static'.
13980
13981 2012-06-06 Yao Qi <yao@codesourcery.com>
13982
13983 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
13984
13985 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
13986
13987 Fix gcc -flto compilation warning.
13988 * server.c (main): Make variable multi_mode and attach volatile.
13989
13990 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13991
13992 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
13993 if the platform doesn't know about it.
13994
13995 2012-05-30 Jeff Kenton <jkenton@tilera.com>
13996
13997 * Makefile.in (SFILES): Add linux-tile-low.c.
13998 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
13999 * configure.srv: Handle tilegx-*-linux*.
14000 * linux-tile-low.c: New file.
14001
14002 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14003
14004 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14005
14006 2012-05-24 Pedro Alves <palves@redhat.com>
14007
14008 PR gdb/7205
14009
14010 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14011
14012 2012-05-24 Pedro Alves <palves@redhat.com>
14013
14014 PR gdb/7205
14015
14016 Replace target_signal with gdb_signal throughout.
14017
14018 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14019
14020 * linux-low.c (linux_store_registers): Avoid the copying sequence
14021 when no data has been retrieved by ptrace.
14022
14023 2012-05-22 Will Deacon <will.deacon@arm.com>
14024
14025 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14026 Include asm/ptrace.h.
14027 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14028 already defined.
14029
14030 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14031
14032 * linux-low.c (linux_store_registers): Don't re-retrieve data
14033 with ptrace that has already been obtained from /proc. Always
14034 copy any data retrieved with ptrace to the buffer supplied.
14035
14036 2012-05-11 Yao Qi <yao@codesourcery.com>
14037 Pedro Alves <palves@redhat.com>
14038
14039 * linux-low.c (enum stopping_threads_kind): New.
14040 (stopping_threads): Change type to `enum stopping_threads_kind'.
14041 (handle_extended_wait): If stopping and suspending threads, leave
14042 the new_lwp suspended too.
14043 (linux_wait_for_event): Adjust.
14044 (stop_all_lwps): Set `stopping_threads' to
14045 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14046 whether we're suspending threads or just stopping them. Assert no
14047 recursion happens.
14048
14049 2012-04-29 Yao Qi <yao@codesourcery.com>
14050
14051 * server.h: Move some code to ...
14052 * gdbthread.h: ... here. New.
14053 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14054 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14055 (nto-low.o, win32-low.o): Likewise.
14056 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14057 * regcache.c, remote-utils.c, server.c: Likewise.
14058 * target.c, tracepoint.c, win32-low.c: Likewise.
14059
14060 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14061
14062 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14063 (PTRACE_ARG4_TYPE): Likewise.
14064 (PTRACE_XFER_TYPE): Likewise.
14065 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14066 ptrace to PTRACE_ARG3_TYPE.
14067 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14068 (PTRACE_ARG4_TYPE): Likewise.
14069 (PTRACE_XFER_TYPE): Likewise.
14070 (linux_detach_one_lwp): Cast fourth argument of
14071 ptrace to long then PTRACE_ARG4_TYPE.
14072 (regsets_fetch_inferior_registers): Cast third argument of
14073 ptrace to long then PTRACE_ARG3_TYPE.
14074 (regsets_store_inferior_registers): Likewise.
14075
14076 2012-04-20 Pedro Alves <palves@redhat.com>
14077
14078 * configure: Regenerate.
14079
14080 2012-04-19 Pedro Alves <palves@redhat.com>
14081
14082 * Makefile.in (GNULIB_BUILDDIR): New.
14083 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14084 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14085 (all, install-only, uninstall, clean-info, all-lib, clean): No
14086 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14087 (maintainer-clean realclean distclean): Use subdir_do.
14088 (subdir_do): New.
14089 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14090 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14091 * acinclude.m4: Include acx_configure_dir.m4.
14092 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14093 calls. Call AC_PROG_RANLIB. Configure gnulib using
14094 ACX_CONFIGURE_DIR.
14095 (GNULIB): New.
14096 (GNULIB_STDINT_H): Adjust.
14097 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14098 * gdbreplay.c: Include build-gnulib/config.h.
14099 * server.h: Likewise.
14100 * aclocal.m4: Regenerate.
14101 * config.in: Regenerate.
14102 * configure: Regenerate.
14103
14104 2012-04-19 Pedro Alves <palves@redhat.com>
14105
14106 * Makefile.in (LIBGNU, INCGNU): Adjust.
14107 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14108 (all, install-only, uninstall, clean-info, all-lib, clean)
14109 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14110 * configure.ac: Adjust AC_OUTPUT output.
14111 * aclocal.m4: Regenerate.
14112 * configure: Regenerate.
14113
14114 2012-04-19 Pedro Alves <palves@redhat.com>
14115
14116 * Makefile.in (generated_files): New.
14117 (server_h): Remove the explicit dependency on config.h, and depend
14118 on $generated_files.
14119
14120 2012-04-19 Pedro Alves <palves@redhat.com>
14121
14122 * Makefile.in (INCGNU): Add -Ignulib.
14123
14124 2012-04-19 Pedro Alves <palves@redhat.com>
14125
14126 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
14127 (INCGNU): ... this, and spell out -I here.
14128 (GNULIB_LIB): Rename to ...
14129 (LIBGNU): ... this.
14130 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
14131
14132 2012-04-19 Pedro Alves <palves@redhat.com>
14133
14134 * config.in: Regenerate.
14135
14136 2012-04-19 Pedro Alves <palves@redhat.com>
14137
14138 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
14139 * server.h (memmem): Remove declaration.
14140 * config.in: Regenerate.
14141 * configure: Regenerate.
14142
14143 2012-04-19 Yao Qi <yao@codesourcery.com>
14144
14145 * Makefile.in (SFILES): Add common/vec.c.
14146 (OBS): Add vec.o.
14147 (vec.o): New rule.
14148
14149 2012-04-19 Yao Qi <yao@codesourcery.com>
14150
14151 * remote-utils.c (prepare_resume_reply): Replace with macro
14152 target_core_of_thread.
14153 * server.c (handle_qxfer_threads_proper): Likewise.
14154 * target.h (traget_core_of_thread): New macro.
14155
14156 2012-04-18 Pedro Alves <palves@redhat.com>
14157
14158 * aclocal.m4: Regenerate.
14159 * configure: Regenerate.
14160
14161 2012-04-16 Yao Qi <yao@codesourcery.com>
14162
14163 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
14164 duplicated on address.
14165
14166 2012-04-16 Yao Qi <yao@codesourcery.com>
14167
14168 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
14169 (struct tracepoint_action_ops) <send>: New field.
14170 (m_tracepoint_action_send, r_tracepoint_action_send): New.
14171 (agent_expr_send, x_tracepoint_action_send): New.
14172 (l_tracepoint_action_send): New.
14173 (cmd_qtdp): Download and install tracepoint
14174 according to `use_agent'.
14175 (run_inferior_command): Add one more parameter `len'.
14176 Update callers.
14177 (tracepoint_send_agent): New.
14178 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
14179
14180 2012-04-16 Yao Qi <yao@codesourcery.com>
14181
14182 * tracepoint.c (download_tracepoints): Moved to ...
14183 (cmd_qtstart): ... here.
14184
14185 2012-04-14 Yao Qi <yao@codesourcery.com>
14186
14187 * tracepoint.c: Include inttypes.h.
14188 (struct collect_memory_action): Use sized types.
14189 (struct tracepoint): Likewise.
14190 (cmd_qtdp, stop_tracing): Update print specifiers.
14191 (cmd_qtp, response_tracepoint): Likewise.
14192 (collect_data_at_tracepoint): Likewise.
14193 (collect_data_at_step): Likewise.
14194
14195 2012-04-14 Yao Qi <yao@codesourcery.com>
14196
14197 Import gnulib module inttypes.
14198 * aclocal.m4, config.in, configure: Regenerated.
14199
14200 2012-04-14 Yao Qi <yao@codesourcery.com>
14201
14202 * Makefile.in (maintainer-clean, realclean, distclean): Remove
14203 Makefile and config.status at last.
14204
14205 2012-04-13 Yao Qi <yao@codesourcery.com>
14206
14207 * tracepoint.c: Include stdint.h unconditionally.
14208
14209 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14210
14211 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
14212 on BFD_HAVE_SYS_PROCFS_TYPE.
14213 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
14214 * configure: Regenerate.
14215 * config.in: Likewise.
14216
14217 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
14218
14219 * Makefile.in (clean): Also remove x32.c x32-linux.c
14220 x32-avx.c x32-avx-linux.c.
14221 (x32.o): New target.
14222 (x32.c): Likewise.
14223 (x32-linux.o): Likewise.
14224 (x32-linux.c): Likewise.
14225 (x32-avx.o): Likewise.
14226 (x32-avx.c): Likewise.
14227 (x32-avx-linux.o): Likewise.
14228 (x32-avx-linux.c): Likewise.
14229
14230 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
14231 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
14232 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
14233 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
14234 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
14235 i386/x32-avx-linux.xml.
14236
14237 * linux-x86-low.c (init_registers_x32_linux): New prototype.
14238 (init_registers_x32_avx_linux): Likwise.
14239 (x86_linux_update_xmltarget): Call init_registers_x32_linux
14240 or init_registers_x32_avx_linux if linux_is_elf64 is false.
14241
14242 2012-04-13 Pedro Alves <palves@redhat.com>
14243
14244 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
14245 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
14246 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
14247 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
14248 the sub-make.
14249
14250 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14251
14252 * linux-x86-low.c (compat_x32_clock_t): New.
14253 (compat_x32_siginfo_t): Likewise.
14254 (compat_x32_siginfo_from_siginfo): Likewise.
14255 (siginfo_from_compat_x32_siginfo): Likewise.
14256 (linux_is_elf64): Likewise.
14257 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
14258 and siginfo_from_compat_x32_siginfo for x32.
14259 (x86_arch_setup): Set linux_is_elf64.
14260
14261 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
14262
14263 PR gdb/13969
14264 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
14265 e_machine field.
14266 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
14267 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
14268 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
14269 compatible with process.
14270
14271 2012-04-12 Yao Qi <yao@codesourcery.com>
14272
14273 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
14274 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
14275 (install-only, install-info, clean): Handle sub dir gnulib.
14276 (all-lib, am--refresh): New targets.
14277 (memmem.o): Remove target.
14278 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
14279 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
14280 (AC_REPLACE_FUNCS): Remove memmem.
14281 Invoke gl_INIT and AM_INIT_AUTOMAKE.
14282 (AC_OUTPUT): Generate Makefile in gnulib/.
14283 * aclocal.m4, config.in, configure: Regenerated.
14284
14285 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
14286
14287 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
14288
14289 2012-04-05 Pedro Alves <palves@redhat.com>
14290
14291 -Werror=strict-aliasing
14292
14293 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
14294 pointer.
14295
14296 2012-04-04 Pedro Alves <palves@redhat.com>
14297
14298 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14299 (sparc_store_gregset_from_stack, sparc_store_gregset)
14300 (sparc_breakpoint_at): Fix formatting.
14301
14302 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14303
14304 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
14305 are available.
14306 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
14307 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
14308 * config.in: Regenerate.
14309 * configure: Likewise.
14310
14311 2012-03-29 Pedro Alves <palves@redhat.com>
14312
14313 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
14314 Correct ptrace arguments.
14315
14316 2012-03-28 Pedro Alves <palves@redhat.com>
14317
14318 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
14319 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
14320 (IA64_FR1_REGNUM): New defines.
14321 (ia64_fetch_register): New.
14322 (the_low_target): Install it.
14323 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14324 field.
14325 * linux-low.c (linux_fetch_registers): Try the
14326 the_low_target.fetch_register hook first.
14327
14328 * linux-arm-low.c (the_low_target): Adjust.
14329 * linux-bfin-low.c (the_low_target): Adjust.
14330 * linux-cris-low.c (the_low_target): Adjust.
14331 * linux-crisv32-low.c (the_low_target): Adjust.
14332 * linux-m32r-low.c (the_low_target): Adjust.
14333 * linux-m68k-low.c (the_low_target): Adjust.
14334 * linux-mips-low.c (the_low_target): Adjust.
14335 * linux-ppc-low.c (the_low_target): Adjust.
14336 * linux-s390-low.c (the_low_target): Adjust.
14337 * linux-sh-low.c (the_low_target): Adjust.
14338 * linux-sparc-low.c (the_low_target): Adjust.
14339 * linux-tic6x-low.c (the_low_target): Adjust.
14340 * linux-x86-low.c (the_low_target): Adjust.
14341 * linux-xtensa-low.c (the_low_target): Adjust.
14342
14343 2012-03-26 Pedro Alves <palves@redhat.com>
14344
14345 * server.c (handle_qxfer_libraries): Don't bail early if
14346 the_target->qxfer_libraries_svr4 is not NULL.
14347
14348 2012-03-26 Pedro Alves <palves@redhat.com>
14349
14350 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14351
14352 2012-03-23 Pedro Alves <palves@redhat.com>
14353
14354 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14355 "library-list-svr4" element's start tag when the the DSO list is
14356 empty.
14357
14358 2012-03-23 Pedro Alves <palves@redhat.com>
14359
14360 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14361 a variable whose type size is the same as the inferior's pointer
14362 size.
14363
14364 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14365
14366 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14367 struct siginfo.
14368 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14369 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14370 * linux-low.h: Include <signal.h>.
14371 (struct siginfo): Remove forward declaration.
14372 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14373 struct siginfo.
14374
14375 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14376
14377 * .gitignore: Ignore more files.
14378
14379 2012-03-19 Pedro Alves <palves@redhat.com>
14380 Jan Kratochvil <jan.kratochvil@redhat.com>
14381
14382 * server.c (cont_thread, general_thread): Add describing comments.
14383 (start_inferior): Clear `cont_thread'.
14384 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14385 of a process.
14386
14387 2012-03-15 Yao Qi <yao@codesourcery.com>
14388
14389 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14390 handling to ...
14391 (cmd_qtdp): ... here.
14392
14393 2012-03-15 Yao Qi <yao@codesourcery.com>
14394
14395 * tracepoint.c (struct tracepoint_action_ops): New.
14396 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14397 (m_tracepoint_action_download): New.
14398 (r_tracepoint_action_download): New.
14399 (x_tracepoint_action_download): New.
14400 (l_tracepoint_action_download): New.
14401 (add_tracepoint_action): Install `action->ops' according type.
14402 (download_tracepoint_1): Move code `download' function pointer
14403 of various tracepoint_action_ops.
14404
14405 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14406
14407 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14408 linux_ptrace_attach_warnings.
14409
14410 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14411
14412 * Makefile.in (linux-ptrace.o): New.
14413 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14414 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14415 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14416 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14417 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14418 of these targets.
14419 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14420
14421 2012-03-08 Yao Qi <yao@codesourcery.com>
14422 Pedro Alves <palves@redhat.com>
14423
14424 Fix PR server/13392.
14425 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14426 offset of JMP insn.
14427 * tracepoint.c (remove_tracepoint): New.
14428 (cmd_qtdp): Call remove_tracepoint when failed to install.
14429
14430 2012-03-07 Pedro Alves <palves@redhat.com>
14431
14432 * linux-low.c (get_detach_signal): New.
14433 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14434 Pass on pending signals to PTRACE_DETACH. Check the result of the
14435 ptrace call.
14436 * server.c (program_signals, program_signals_p): New.
14437 (handle_general_set): Handle QProgramSignals.
14438 * server.h (program_signals, program_signals_p): Declare.
14439
14440 2012-03-05 Pedro Alves <palves@redhat.com>
14441 Jan Kratochvil <jan.kratochvil@redhat.com>
14442
14443 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14444 New comment why.
14445
14446 2012-03-03 Yao Qi <yao@codesourcery.com>
14447
14448 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14449 agent_look_up_symbols.
14450
14451 2012-03-03 Yao Qi <yao@codesourcery.com>
14452
14453 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14454 (linux-x86-low.o): Likewise.
14455 * server.h: Remove in_process_agent_loaded.
14456 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14457 common/agent.c.
14458 Update callers.
14459
14460 2012-03-03 Yao Qi <yao@codesourcery.com>
14461
14462 * tracepoint.c (gdb_agent_capability): New global.
14463 (in_process_agent_loaded_ust): Renamed to
14464 `in_process_agent_supports_ust'.
14465 Update callers.
14466 (in_process_agent_supports_ust): Call agent_capability_check.
14467 (clear_installed_tracepoints): Assert that agent supports
14468 agent.
14469
14470 2012-03-03 Yao Qi <yao@codesourcery.com>
14471
14472 * linux-low.c (linux_supports_agent): New.
14473 (linux_target_ops): Initialize field `supports_agent' with
14474 linux_supports_agent.
14475 * target.h (struct target_ops) <supports_agent>: New.
14476 (target_supports_agent): New macro.
14477 * server.c (handle_general_set): Handle packet 'QAgent'.
14478 (handle_query): Send `QAgent+'.
14479 * Makefile.in (server.o): Depends on agent.h.
14480
14481 2012-03-03 Yao Qi <yao@codesourcery.com>
14482
14483 * Makefile.in (OBS): Add agent.o.
14484 Add new rule for agent.o.
14485 Track dependence of tracepoint.c on agent.h.
14486 * tracepoint.c (run_inferior_command_1):
14487 (run_inferior_command): Call agent_run_command.
14488 (gdb_ust_connect_sync_socket): Deleted. Move it to
14489 common/agent.c.
14490 (resume_thread, stop_thread): Likewise.
14491 (gdb_ust_socket_init): Renamed to ...
14492 (gdb_agent_socket_init): ... New.
14493 (gdb_ust_thread): Renamed to ...
14494 (gdb_agent_helper_thread): ... New.
14495 (gdb_ust_init): Move some code to ...
14496 (gdb_agent_init): ... here. New.
14497 [HAVE_UST]: Call gdb_ust_init.
14498 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14499 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14500 * config.in, configure: Regenerated.
14501
14502 2012-03-02 Pedro Alves <palves@redhat.com>
14503
14504 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14505 * linux-low.c (struct simple_pid_list): New.
14506 (stopped_pids): New a struct simple_pid_list pointer.
14507 (add_to_pid_list, pull_pid_from_list): New.
14508 (handle_extended_wait): Don't assume the first signal new children
14509 report is SIGSTOP. Adjust call to pull_pid_from_list.
14510 (linux_wait_for_lwp): Adjust.
14511
14512 2012-03-02 Yao Qi <yao@codesourcery.com>
14513
14514 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14515 debug log.
14516
14517 2012-03-02 Yao Qi <yao@codesourcery.com>
14518
14519 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14520 `stop_pc' and `tpoint'. Update caller.
14521
14522 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14523
14524 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14525 * linux-low.c (use_linux_regsets): New macro.
14526 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14527 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14528 (linux_register_in_regsets): New function.
14529 (usr_fetch_inferior_registers): Skip registers covered by
14530 regsets.
14531 (usr_store_inferior_registers): Likewise.
14532 (usr_fetch_inferior_registers): New macro.
14533 (usr_store_inferior_registers): Likewise.
14534 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14535 (linux_store_registers): Likewise.
14536 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14537 prototype.
14538 (init_registers_mips64_dsp_linux): Likewise.
14539 (init_registers_mips_linux): New macro.
14540 (init_registers_mips_dsp_linux): Likewise.
14541 (mips_dsp_num_regs): Likewise.
14542 (DSP_BASE, DSP_CONTROL): New fallback macros.
14543 (mips_base_regs): New macro.
14544 (mips_regmap): Use it. Fix the size.
14545 (mips_dsp_regmap): New variable.
14546 (mips_dsp_regset_bitmap): Likewise.
14547 (mips_arch_setup): New function.
14548 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14549 than mips_regmap.
14550 (mips_cannot_store_register): Likewise.
14551 (the_low_target): Update .arch_setup, .num_regs and .regmap
14552 initializers. Add .regset_bitmap initializer.
14553 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14554 initializer.
14555 * linux-bfin-low.c (the_low_target): Likewise.
14556 * linux-cris-low.c (the_low_target): Likewise.
14557 * linux-crisv32-low.c (the_low_target): Likewise.
14558 * linux-ia64-low.c (the_low_target): Likewise.
14559 * linux-m32r-low.c (the_low_target): Likewise.
14560 * linux-m68k-low.c (the_low_target): Likewise.
14561 * linux-ppc-low.c (the_low_target): Likewise.
14562 * linux-s390-low.c (the_low_target): Likewise.
14563 * linux-sh-low.c (the_low_target): Likewise.
14564 * linux-sparc-low.c (the_low_target): Likewise.
14565 * linux-tic6x-low.c (the_low_target): Likewise.
14566 * linux-x86-low.c (the_low_target): Likewise.
14567 * linux-xtensa-low.c (the_low_target): Likewise.
14568 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14569 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14570 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14571 srv_xmlfiles.
14572 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14573 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14574
14575 2012-02-29 Yao Qi <yao@codesourcery.com>
14576 Pedro Alves <palves@redhat.com>
14577
14578 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14579 `step_over_finished' is true.
14580
14581 2012-02-27 Pedro Alves <palves@redhat.com>
14582
14583 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14584 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14585
14586 2012-02-27 Pedro Alves <palves@redhat.com>
14587
14588 PR server/9684
14589 * linux-low.c (pid_is_stopped): New.
14590 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14591
14592 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14593
14594 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14595 of conditions.
14596
14597 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14598
14599 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14600
14601 2012-02-24 Luis Machado <lgustavo@codesourcery>
14602
14603 * server.c (handle_query): Advertise support for target-side
14604 breakpoint condition evaluation.
14605 (process_point_options): New function.
14606 (process_serial_event): When inserting a breakpoint, check for
14607 a target-side condition that should be evaluated.
14608
14609 * mem-break.c: Include regcache.h and ax.h.
14610 (point_cond_list_t): New data structure.
14611 (breakpoint) <cond_list>: New field.
14612 (find_gdb_breakpoint_at): Make non-static.
14613 (delete_gdb_breakpoint_at): Clear any target-side
14614 conditions.
14615 (clear_gdb_breakpoint_conditions): New function.
14616 (add_condition_to_breakpoint): Likewise.
14617 (add_breakpoint_condition): Likewise.
14618 (gdb_condition_true_at_breakpoint): Likewise.
14619 (gdb_breakpoint_here): Return result directly instead
14620 of going through a local variable.
14621
14622 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14623 (clear_gdb_breakpoint_conditions): Likewise.
14624 (add_breakpoint_condition): Likewise.
14625 (gdb_condition_true_at_breakpoint): Likewise.
14626
14627 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14628 (need_step_over_p): Take target-side breakpoint condition into
14629 consideration.
14630
14631 2012-02-24 Luis Machado <lgustavo@codesourcery>
14632
14633 * server.h: Include tracepoint.h.
14634 (agent_mem_read, agent_get_trace_state_variable_value,
14635 agent_set_trace_state_variable_value,
14636 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14637 get_set_tsv_func_addr): New prototypes.
14638
14639 * ax.h: New include file.
14640 * ax.c: New source file.
14641
14642 * tracepoint.c: Include ax.h.
14643 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14644 agent_expr, eval_result_type): Move to ax.h.
14645 (parse_agent_expr): Rename to ...
14646 (gdb_parse_agent_expr): ... this, make it non-static and move
14647 to ax.h.
14648 (unparse_agent_expr) Rename to ...
14649 (gdb_unparse_agent_expr): ... this, make it non-static and move
14650 to ax.h.
14651 (eval_agent_expr): Rename to ...
14652 (eval_tracepoint_agent_expr): ... this.
14653 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14654 forward declarations.
14655 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14656 (agent_get_trace_state_variable_value): New function.
14657 (agent_set_trace_state_variable_value): New function.
14658 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14659 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14660 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14661 (condition_true_at_tracepoint): Likewise.
14662 (parse_agent_expr): Rename to ...
14663 (gdb_parse_agent_expr): ... this and move to ax.c.
14664 (unparse_agent_expr): Rename to ...
14665 (gdb_unparse_agent_expr): ... this and move to ax.c.
14666 (gdb_agent_op_name): Move to ax.c.
14667 (eval_agent_expr): Rename to ...
14668 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14669 and move to ax.c.
14670 (eval_tracepoint_agent_expr): New function.
14671 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14672 non-static.
14673 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14674 ax.c.
14675 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14676 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14677 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14678 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14679 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14680 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14681 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14682 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14683 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14684 (compile_bytecodes): Remove forward declaration.
14685 (is_goto_target): Move to ax.c.
14686 (compile_bytecodes): Move to ax.c and call
14687 agent_get_trace_state_variable_value (...) and
14688 agent_set_trace_state_variable_value (...).
14689
14690 * Makefile.in: Update ax.c and IPA dependencies.
14691
14692 2012-02-24 Pedro Alves <palves@redhat.com>
14693
14694 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14695 (cmd_bigqtbuffer_circular): ... this. Only handle
14696 'QTBuffer:circular:'.
14697 (handle_tracepoint_general_set): Adjust.
14698
14699 2012-02-16 Yao Qi <yao@codesourcery.com>
14700
14701 * inferiors.c: Move code to ...
14702 * dll.c: .... here. New.
14703 * server.h: Declare clear_dlls.
14704 * Makefile.in (SFILES): Add dll.c.
14705 (OBS): Add dll.o
14706 (dll.o): New rule.
14707
14708 2012-02-11 Yao Qi <yao@codesourcery.com>
14709
14710 * server.c: (handle_monitor_command): Add a new parameter
14711 `own_buf'.
14712 (handle_query): Update caller.
14713
14714 2012-02-09 Joel Brobecker <brobecker@adacore.com>
14715
14716 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14717 * configure, config.in: Regenerate.
14718 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14719 is not defined.
14720
14721 2012-02-02 Pedro Alves <palves@redhat.com>
14722
14723 Try SIGKILL first, then PTRACE_KILL.
14724 * linux-low.c (linux_kill_one_lwp): New.
14725 (linux_kill_one_lwp): Rename to ...
14726 (kill_one_lwp_callback): ... this. Use the new
14727 linux_kill_one_lwp.
14728
14729 2012-02-02 Pedro Alves <palves@redhat.com>
14730
14731 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14732 inferior.
14733
14734 2012-01-27 Pedro Alves <palves@redhat.com>
14735
14736 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14737 (elf_64_file_p): Make static.
14738 (linux_pid_exe_is_elf_64_file): New.
14739 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14740 Delete declarations.
14741 (linux_pid_exe_is_elf_64_file): Declare.
14742 * linux-x86-low.c (x86_arch_setup): Use
14743 linux_pid_exe_is_elf_64_file.
14744
14745 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14746
14747 * linux-low.c (linux_wait_for_event_1): Rename to ...
14748 (linux_wait_for_event): ... here and merge it with former
14749 linux_wait_for_event - new variable wait_ptid, use it.
14750 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14751
14752 2012-01-23 Pedro Alves <palves@redhat.com>
14753
14754 * server.c (main): Avoid yet another case of infinite loop while
14755 detaching/killing after a longjmp.
14756
14757 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14758
14759 Code cleanup.
14760 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14761
14762 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14763
14764 * hostio.c (handle_readlink): New function.
14765 (handle_vFile): Call it to handle "vFile:readlink" packets.
14766
14767 2012-01-20 Pedro Alves <palves@redhat.com>
14768 Ulrich Weigand <ulrich.weigand@linaro.org>
14769
14770 * server.c (handle_v_requests): Only support vAttach and vRun to
14771 start multiple processes when in extended protocol mode.
14772
14773 2012-01-17 Pedro Alves <palves@redhat.com>
14774
14775 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14776 memalign plus mprotect to allocate the scratch buffer.
14777
14778 2012-01-13 Pedro Alves <palves@redhat.com>
14779
14780 * server.c (attach_inferior): Clear `cont_thread'.
14781
14782 2012-01-13 Pedro Alves <palves@redhat.com>
14783
14784 * server.c (main): Avoid infinite loop while detaching/killing
14785 after a longjmp.
14786
14787 2012-01-09 Doug Evans <dje@google.com>
14788
14789 * server.c (start_inferior): Set last_ptid in --wrapper case.
14790
14791 2012-01-06 Yao Qi <yao@codesourcery.com>
14792
14793 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14794 defined.
14795 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14796
14797 2012-01-04 Yao Qi <yao@codesourcery.com>
14798
14799 * tracepoint.c (cmd_qtdp): Print debug message
14800 for static tracepoint.
14801
14802 2012-01-04 Yao Qi <yao@codesourcery.com>
14803
14804 * tracepoint.c (trace_vdebug): Differentiate debug message
14805 between gdbserver and IPA.
14806
14807 2012-01-03 Yao Qi <yao@codesourcery.com>
14808
14809 * tracepoint.c (tracepoint_was_hit): Don't collect for
14810 static tracepoint.
14811
14812 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14813
14814 * terminal.h: Reformat copyright header.
14815
14816 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14817
14818 * server.c (gdbserver_version): Update copyright year.
14819 * gdbreplay.c (gdbreplay_version): Likewise.
14820
14821 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14822
14823 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14824
14825 Revert:
14826 2011-12-18 Hui Zhu <teawater@gmail.com>
14827 * linux-low.c (linux_create_inferior): Save return value to ret.
14828
14829 2011-12-18 Hui Zhu <teawater@gmail.com>
14830
14831 * linux-low.c (linux_create_inferior): Save return value to ret.
14832
14833 2011-12-16 Doug Evans <dje@google.com>
14834
14835 * linux-low.c (linux_create_inferior): If stdio connection,
14836 redirect stdin from /dev/null, stdout to stderr.
14837 * remote-utils.c (remote_is_stdio): New static global.
14838 (remote_connection_is_stdio): New function.
14839 (remote_prepare): Handle stdio connection.
14840 (remote_open): Ditto.
14841 (remote_close): Don't close stdin for stdio connections.
14842 (read_prim,write_prim): New functions. Replace all calls to
14843 read/write to these.
14844 * server.c (main): Watch for "-" argument. Move call to
14845 remote_prepare before start_inferior.
14846 * server.h (STDIO_CONNECTION_NAME): New macro.
14847 (remote_connection_is_stdio): Declare.
14848
14849 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14850 in debugging output.
14851
14852 2011-12-15 Yao Qi <yao@codesourcery.com>
14853
14854 * tracepoint.c: Include sys/syscall.h.
14855 (gdb_ust_thread): Remove preprocessor conditional.
14856
14857 2011-12-14 Pedro Alves <pedro@codesourcery.com>
14858
14859 * linux-low.c (linux_detach_one_lwp): Call
14860 the_low_target.prepare_to_resume before detaching.
14861
14862 2011-12-14 Yao Qi <yao@codesourcery.com>
14863
14864 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14865 of write.
14866
14867 2011-12-14 Yao Qi <yao@codesourcery.com>
14868
14869 * i386-low.c (i386_low_stopped_data_address): Initialize local
14870 variable `control'.
14871
14872 2011-12-13 Pedro Alves <pedro@codesourcery.com>
14873
14874 PR remote/13492
14875
14876 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14877 DR_CONTROL unless necessary. Extend comments.
14878 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14879 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14880
14881 2011-12-13 Yao Qi <yao@codesourcery.com>
14882
14883 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14884 macros.
14885 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
14886
14887 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
14888
14889 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
14890 Print new debug message for such case.
14891
14892 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14893
14894 Fix overlapping memcpy.
14895 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
14896 the read_inferior_memory transfer.
14897 (delete_fast_tracepoint_jump): New variable buf. Use it for the
14898 write_inferior_memory transfer.
14899 (set_fast_tracepoint_jump): New variable buf. Use it for the
14900 read_inferior_memory and write_inferior_memory transfers.
14901 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
14902 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
14903 Use it for the write_inferior_memory transfer.
14904 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
14905 buffers.
14906
14907 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14908
14909 * linux-low.c (fetch_register, store_register): Make code
14910 consistent, fix formatting.
14911
14912 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14913
14914 * linux-low.c (usr_store_inferior_registers): Factor out code
14915 to handle individual registers into...
14916 (store_register): ... this new function.
14917
14918 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
14919
14920 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
14921 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
14922 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
14923 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
14924 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
14925 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
14926 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
14927 (srv_xmlfiles): Add new XML files.
14928
14929 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
14930 and <sys/uio.h>.
14931 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
14932 (init_registers_s390_linux32v1): Add prototype.
14933 (init_registers_s390_linux32v2): Likewise.
14934 (init_registers_s390_linux64v1): Likewise.
14935 (init_registers_s390_linux64v2): Likewise.
14936 (init_registers_s390x_linux64v1): Likewise.
14937 (init_registers_s390x_linux64v2): Likewise.
14938 (s390_num_regs): Increment to 52.
14939 (s390_regmap): Add orig_r2 register.
14940 (s390_num_regs_3264): Increment to 68.
14941 (s390_regmap_3264): Add orig_r2 register.
14942 (s390_collect_ptrace_register): Handle orig_r2 register.
14943 (s390_supply_ptrace_register): Likewise.
14944 (s390_fill_last_break): New function.
14945 (s390_store_last_break): Likewise.
14946 (s390_fill_system_call): New function.
14947 (s390_store_system_call): Likewise.
14948 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
14949 register sets.
14950 (s390_check_regset): New function.
14951 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
14952 NT_S390_SYSTEM_CALL regsets and use appropriate description.
14953 Update target_regsets for available register sets.
14954
14955 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
14956 Jan Kratochvil <jan.kratochvil@redhat.com>
14957
14958 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
14959 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
14960 New.
14961 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
14962 * linux-low.h (struct process_info_private): New member r_debug.
14963 * server.c (handle_qxfer_libraries): Call
14964 the_target->qxfer_libraries_svr4.
14965 (handle_qxfer_libraries_svr4): New function.
14966 (qxfer_packets): New entry "libraries-svr4".
14967 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
14968 * target.h (struct target_ops): New member qxfer_libraries_svr4.
14969 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
14970 PACKET_qXfer_libraries_svr4.
14971
14972 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
14973
14974 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
14975 PSW address/mask between 8-byte and 16-byte formats.
14976 (s390_supply_ptrace_register): Likewise.
14977 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
14978 basic addressing mode bit.
14979
14980 2011-11-24 Stan Shebs <stan@codesourcery.com>
14981
14982 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
14983
14984 2011-11-17 Stan Shebs <stan@codesourcery.com>
14985
14986 * tracepoint.c (struct tracepoint): New field traceframe_usage.
14987 (tracing_start_time): New global.
14988 (tracing_stop_time): New global.
14989 (tracing_user_name): New global.
14990 (tracing_notes): New global.
14991 (tracing_stop_note): New global.
14992 (cmd_qtstart): Set traceframe_usage, start_time.
14993 (stop_tracing): Set stop_time.
14994 (cmd_qtstatus): Report additional status.
14995 (cmd_qtp): New function.
14996 (handle_tracepoint_query): Call it.
14997 (cmd_qtnotes): New function.
14998 (handle_tracepoint_general_set): Call it.
14999 (get_timestamp): Rename from tsv_get_timestamp.
15000
15001 2011-11-14 Stan Shebs <stan@codesourcery.com>
15002 Kwok Cheung Yeung <kcy@codesourcery.com>
15003
15004 * linux-x86-low.c (small_jump_insn): New.
15005 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15006 trampoline and error message, build a trampoline and issue a small
15007 jump instruction to it.
15008 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15009 trampoline and error message.
15010 (x86_get_min_fast_tracepoint_insn_len): New.
15011 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15012 * linux-low.h (struct linux_target_ops): Add arguments to
15013 install_fast_tracepoint_jump_pad operation, add new operation.
15014 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15015 arguments.
15016 (linux_get_min_fast_tracepoint_insn_len): New function.
15017 (linux_target_op): Add new operation.
15018 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15019 (gdb_trampoline_buffer_end): Ditto.
15020 (gdb_trampoline_buffer_error): Ditto.
15021 (struct ipa_sym_addresses): Add fields for new IPA variables.
15022 (symbol_list): Add entries for new IPA variables.
15023 (struct tracepoint): Add fields to hold the address range of the
15024 trampoline used by the tracepoint.
15025 (trampoline_buffer_head): New static variable.
15026 (trampoline_buffer_tail): Ditto.
15027 (claim_trampoline_space): New function.
15028 (have_fast_tracepoint_trampoline_buffer): New function.
15029 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15030 structure.
15031 (install_fast_tracepoint): Ditto, also add error buffer argument.
15032 (cmd_qtminftpilen): New function.
15033 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15034 (fast_tracepoint_from_trampoline_address): New function.
15035 (fast_tracepoint_collecting): Handle trampoline as part of jump
15036 pad space.
15037 (set_trampoline_buffer_space): New function.
15038 (initialize_tracepoint): Initialize new IPA variables.
15039 * target.h (struct target_ops): Add arguments to
15040 install_fast_tracepoint_jump_pad operation, add new
15041 get_min_fast_tracepoint_insn_len operation.
15042 (target_get_min_fast_tracepoint_insn_len): New.
15043 (install_fast_tracepoint_jump_pad): Add arguments.
15044 * server.h (IPA_BUFSIZ): Define.
15045 * linux-i386-ipa.c: Include extra header files.
15046 (initialize_fast_tracepoint_trampoline_buffer): New function.
15047 (initialize_low_tracepoint): Call it.
15048 * server.h (set_trampoline_buffer_space): Declare.
15049 (claim_trampoline_space): Ditto.
15050 (have_fast_tracepoint_trampoline_buffer): Ditto.
15051
15052 2011-11-14 Yao Qi <yao@codesourcery.com>
15053
15054 * server.c (handle_query): Handle InstallInTrace for qSupported.
15055 * tracepoint.c (add_tracepoint): Sort list.
15056 (install_tracepoint, download_tracepoint): New.
15057 (cmd_qtdp): Call them to install and download tracepoints.
15058 (sort_tracepoints): Removed.
15059 (cmd_qtstart): Update.
15060
15061 2011-11-14 Yao Qi <yao@codesourcery.com>
15062
15063 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15064 * mem-break.h: Declare.
15065 * tracepoint.c (cmd_qtstart): Move some code to ...
15066 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15067 New.
15068 (download_tracepoints): Move some code to ...
15069 (download_tracepoint_1): ... here. New.
15070
15071 2011-11-08 Yao Qi <yao@codesourcery.com>
15072
15073 * remote-utils.c (relocate_instruction): A comment fix.
15074
15075 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15076
15077 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15078 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15079 dr_status_mirror and dr_control_mirror from debug_reg_state.
15080 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15081 (i386_initial_stuff): Remove use of deleted globals.
15082 (i386_get_thread_context, i386_set_thread_context,
15083 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15084 from debug_reg_state.
15085
15086 2011-11-05 Yao Qi <yao@codesourcery.com>
15087
15088 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15089 address as TPOINT's.
15090
15091 2011-11-02 Stan Shebs <stan@codesourcery.com>
15092
15093 * tracepoint.c (agent_mem_read_string): New function.
15094 (eval_agent_expr): Call it for tracenz.
15095 * server.c (handle_query): Report support for tracenz.
15096
15097 2011-11-02 Yao Qi <yao@codesourcery.com>
15098
15099 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15100
15101 2011-11-02 Yao Qi <yao@codesourcery.com>
15102
15103 * target.h: Fix a typo in comment.
15104
15105 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15106
15107 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15108 clobber the breakpoints' shadows with fast tracepoint jumps.
15109 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15110 * target.c (write_inferior_memory): Also pass MYADDR down to
15111 check_mem_write.
15112
15113 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15114
15115 * configure.ac: Check support for personality routine.
15116 * configure: Regenerate.
15117 * config.in: Likewise.
15118 * linux-low.c: Include <sys/personality.h>.
15119 Define ADDR_NO_RANDOMIZE if necessary.
15120 (linux_create_inferior): Disable address space randomization when
15121 forking inferior, if requested.
15122 (linux_supports_disable_randomization): New function.
15123 (linux_target_ops): Install it.
15124 * server.h (disable_randomization): Declare.
15125 * server.c (disable_randomization): New global variable.
15126 (handle_general_set): Handle QDisableRandomization.
15127 (handle_query): Likewise for qSupported.
15128 (main): Support --disable-randomization and --no-disable-randomization
15129 command line arguments.
15130 * target.h (struct target_ops): Add supports_disable_randomization.
15131 (target_supports_disable_randomization): New macro.
15132
15133 2011-09-29 Mike Frysinger <vapier@gentoo.org>
15134
15135 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
15136 ifdef check.
15137 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
15138 [!PT_GETDSBT] (target_loadmap): New definition.
15139 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
15140 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
15141 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
15142 and PT_GETDSBT to LINUX_LOADMAP.
15143 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
15144 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
15145
15146 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15147
15148 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
15149 (arm_linux_hwbp_cap): New static variable.
15150 (arm_linux_get_hwbp_cap): Replace by ...
15151 (arm_linux_init_hwbp_cap): ... this new function.
15152 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
15153 (arm_linux_get_hw_watchpoint_count): Likewise.
15154 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15155 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
15156 (arm_prepare_to_resume): Use perror_with_name instead of error.
15157
15158 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
15159
15160 * linux-arm-low.c: Include <signal.h>.
15161 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
15162 (struct arm_linux_hwbp_cap): New data type.
15163 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
15164 (struct arm_linux_hw_breakpoint): New data type.
15165 (MAX_BPTS, MAX_WPTS): Define.
15166 (struct arch_process_info, struct arch_lwp_info): New data types.
15167 (arm_linux_get_hwbp_cap): New function.
15168 (arm_linux_get_hw_breakpoint_count): Likewise.
15169 (arm_linux_get_hw_watchpoint_count): Likewise.
15170 (arm_linux_get_hw_watchpoint_max_length): Likewise.
15171 (arm_hwbp_control_initialize): Likewise.
15172 (arm_hwbp_control_is_enabled): Likewise.
15173 (arm_hwbp_control_is_initialized): Likewise.
15174 (arm_hwbp_control_disable): Likewise.
15175 (arm_linux_hw_breakpoint_equal): Likewise.
15176 (arm_linux_hw_point_initialize): Likewise.
15177 (struct update_registers_data): New data structure.
15178 (update_registers_callback: New function.
15179 (arm_insert_point): Likewise.
15180 (arm_remove_point): Likewise.
15181 (arm_stopped_by_watchpoint): Likewise.
15182 (arm_stopped_data_address): Likewise.
15183 (arm_new_process): Likewise.
15184 (arm_new_thread): Likewise.
15185 (arm_prepare_to_resume): Likewise.
15186 (the_low_target): Register arm_insert_point, arm_remove_point,
15187 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
15188 arm_new_thread, and arm_prepare_to_resume.
15189
15190 2011-09-15 Stan Shebs <stan@codesourcery.com>
15191
15192 * server.h (struct emit_ops): Add compare-goto fields.
15193 * tracepoint.c (gdb_agent_op_sizes): New table.
15194 (emit_eq_goto): New function.
15195 (emit_ne_goto): New function.
15196 (emit_lt_goto): New function.
15197 (emit_le_goto): New function.
15198 (emit_gt_goto): New function.
15199 (emit_ge_goto): New function.
15200 (is_goto_target): New function.
15201 (compile_bytecodes): Recognize special cases of compare-goto
15202 combinations and call specialized emitters for them.
15203 * linux-x86-low.c (amd64_emit_eq_goto): New function.
15204 (amd64_emit_ne_goto): New function.
15205 (amd64_emit_lt_goto): New function.
15206 (amd64_emit_le_goto): New function.
15207 (amd64_emit_gt_goto): New function.
15208 (amd64_emit_ge_goto): New function.
15209 (amd64_emit_ops): Add the new functions.
15210 (i386_emit_eq_goto): New function.
15211 (i386_emit_ne_goto): New function.
15212 (i386_emit_lt_goto): New function.
15213 (i386_emit_le_goto): New function.
15214 (i386_emit_gt_goto): New function.
15215 (i386_emit_ge_goto): New function.
15216 (i386_emit_ops): Add the new functions.
15217
15218 2011-09-08 Stan Shebs <stan@codesourcery.com>
15219
15220 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
15221 (i386_emit_epilogue): Restore %ebx.
15222
15223 2011-08-31 Jie Zhang <jzhang918@gmail.com>
15224
15225 * server.c (step_thread): Remove definition.
15226 (process_serial_event): Don't handle Hs.
15227 * server.h (step_thread): Remove declaration.
15228 * target.c (set_desired_inferior): Remove use of step_thread.
15229
15230 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15231
15232 * linux-low.c: Include linux-procfs.h.
15233 (linux_attach_lwp_1): Update comments.
15234 (linux_attach): Scan for existing threads when attaching to a
15235 process that is the tgid.
15236 * Makefile.in: Update dependencies.
15237
15238 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
15239
15240 * configure.srv: Add linux-procfs.o dependencies.
15241
15242 2011-08-14 Yao Qi <yao@codesourcery.com>
15243
15244 * target.h (struct target_ops): Fix indent.
15245 * win32-low.c (win32_target_ops): Fix comment.
15246
15247 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
15248 Yao Qi <yao@codesourcery.com>
15249
15250 * Makefile.in (clean): Remove tic6x-*.c files.
15251 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
15252 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
15253 (tic6x-c64xp-linux.c): Likewise.
15254 * configure.srv: Add support for tic6x-*-uclinux.
15255 * linux-tic6x-low.c: New.
15256 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
15257
15258 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
15259 Yao Qi <yao@codesourcery.com>
15260
15261 * target.h (struct target_ops): Add read_loadmap.
15262 * linux-low.c (struct target_loadseg): New type.
15263 (struct target_loadmap): New type.
15264 (linux_read_loadmap): New function.
15265 (linux_target_ops): Add linux_read_loadmap.
15266 * server.c (handle_query): Support qXfer:fdpic:read packet.
15267 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
15268 to NULL.
15269
15270 2011-08-05 Eli Zaretskii <eliz@gnu.org>
15271
15272 * win32-low.c: Include <stdint.h>.
15273
15274 2011-07-22 Pedro Alves <pedro@codesourcery.com>
15275
15276 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
15277 to the inferior here.
15278 (i386_remove_aligned_watchpoint): Ditto.
15279 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
15280 fit part of the watchpoint in the debug registers.
15281 (i386_update_inferior_debug_regs): New.
15282 (i386_low_insert_watchpoint): Work on a local mirror of the debug
15283 registers, and only update the inferior on success.
15284 (i386_low_remove_watchpoint): Ditto.
15285
15286 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15287
15288 * linux-low.c (compare_ints, unique, list_threads, show_process,
15289 linux_core_of_thread): Delete.
15290 (linux_target_ops): Change linux_core_of_thread to
15291 linux_common_core_of_thread.
15292 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
15293 * utils.c (malloc_failure): Change type of argument.
15294 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
15295 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
15296 common/linux-osdata.c, common/ptid.c and common/buffer.c.
15297 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
15298 (IPA_OBJS): Add common-utils-ipa.o.
15299 (ptid_h, linux_osdata_h): New macros.
15300 (server_h): Add common/common-utils.h, common/xml-utils.h,
15301 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
15302 common/ptid.h.
15303 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
15304 ptid.o, buffer.o): New rules.
15305 (linux-low.o): Add common/linux-osdata.h as a dependency.
15306 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
15307 * configure.ac: Add AC_HEADER_DIRENT check.
15308 * config.in: Regenerate.
15309 * configure: Regenerate.
15310 * remote-utils.c (xml_escape_text): Delete.
15311 (buffer_grow, buffer_free, buffer_init, buffer_finish,
15312 buffer_xml_printf): Move to common/buffer.c.
15313 * server.c (main): Remove call to initialize_inferiors.
15314 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
15315 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
15316 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
15317 internal_error, gdb_assert, gdb_assert_fail): Delete.
15318 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
15319 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
15320 common/buffer.h.
15321 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
15322 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15323 initialize_inferiors): Delete.
15324
15325 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15326
15327 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15328 symbol error.
15329
15330 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15331
15332 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15333 assertion.
15334 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15335
15336 2011-05-26 Yao Qi <yao@codesourcery.com>
15337
15338 * Makefile.in (thread-db.o): Track dependence to
15339 common/gdb_thread_db.h.
15340 * thread-db.c: include gdb_thread_db.h from right place.
15341
15342 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15343
15344 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15345 __FILE__ and __LINE__ to internal_error.
15346
15347 2011-05-13 Doug Evans <dje@google.com>
15348
15349 * thread-db.c (try_thread_db_load_from_sdir): New function.
15350 (try_thread_db_load_from_dir): New function.
15351 (thread_db_load_search): Handle $sdir, ignore $pdir.
15352 Remove trying of system directories if search of
15353 libthread-db-search-path fails, that is now done via $sdir.
15354
15355 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15356
15357 * server.c (handle_query): Add EnableDisableTracepoints to the list
15358 of supported features.
15359 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15360 tracepoints.
15361 (cmd_qtenable_disable): New.
15362 (cmd_qtstart): Install tracepoints even if disabled.
15363 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15364 receiving a QTEnable or QTDisable packet.
15365 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15366 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15367 tracepoints.
15368 (gdb_probe): Skip data collection if static tracepoint is disabled.
15369
15370 2011-05-10 Doug Evans <dje@google.com>
15371
15372 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15373
15374 2011-05-04 Doug Evans <dje@google.com>
15375
15376 * linux-low.c (linux_join): Skip process lookup.
15377 * spu-low.c (spu_join): Ditto.
15378 * server.c (join_inferiors_callback): Delete.
15379 (process_serial_event): For 'D' packet (detach) call join_inferior
15380 directly.
15381
15382 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15383
15384 * README: Don't mention xscale*-*-linux*.
15385 * configure.srv (xscale*-*-linux*): Don't handle target.
15386
15387 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15388
15389 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15390 casting pointers.
15391 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15392 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15393 (i386_emit_void_call_2): Likewise.
15394
15395 2011-04-26 Yao Qi <yao@codesourcery.com>
15396
15397 * linux-low.c: Move common macros to linux-ptrace.h.
15398 Include linux-ptrace.h.
15399 * Makefile.in (linux_ptrace_h): New.
15400 (linux-low.o): Depends on linux-ptrace.h.
15401
15402 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15403
15404 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15405 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15406 (remote_prepare): New function with most of the TCP code from ...
15407 (remote_open): ... here. Detect PORT here unconditionally. Move also
15408 setting transport_is_reliable.
15409 * server.c (run_once): New variable.
15410 (gdbserver_usage): Document it.
15411 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15412 the first run if RUN_ONCE.
15413 * server.h (run_once, remote_prepare): New declarations.
15414
15415 2011-04-19 Tom Tromey <tromey@redhat.com>
15416
15417 * win32-low.c (handle_load_dll): Remove duplicate "the".
15418
15419 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15420
15421 Remove support for old Cygwin 1.5 versions.
15422 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15423 function to avoid warning.
15424 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15425 warning.
15426
15427 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15428
15429 * gdbserver/server.h (Macro _): Define it if not available.
15430
15431 2011-03-14 Michael Snyder <msnyder@vmware.com>
15432
15433 * hostio.c (handle_close): Remove unnecessary null test.
15434
15435 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15436
15437 * Makefile.in (maintainer-clean realclean distclean): Remove
15438 "make ... subdir_do" command.
15439
15440 2011-03-10 Michael Snyder <msnyder@vmware.com>
15441
15442 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15443
15444 * server.c (handle_v_run): Free alloced buffer on early return.
15445
15446 2011-03-09 Yao Qi <yao@codesourcery.com>
15447
15448 Revert:
15449 2011-03-04 Yao Qi <yao@codesourcery.com>
15450
15451 * Makefile.in: Remove GNU make feature --directory.
15452
15453 2011-03-05 Yao Qi <yao@codesourcery.com>
15454
15455 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15456 (subdir_do): New make target. Copied from gdb/Makefile.
15457 (maintainer-clean, realclean, distclean, clean): Call corresponding
15458 make targets in common/Makefile.
15459
15460 2011-02-11 Yao Qi <yao@codesourcery.com>
15461
15462 * configure.ac: Call AC_PROG_RANLIB.
15463 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15464 * configure: Regenerate.
15465
15466 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15467
15468 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15469
15470 2011-03-06 Yao Qi <yao@codesourcery.com>
15471
15472 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15473
15474 2011-03-05 Yao Qi <yao@codesourcery.com>
15475
15476 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15477 (subdir_do): New make target. Copied from gdb/Makefile.
15478 (maintainer-clean, realclean, distclean, clean): Call corresponding
15479 make targets in common/Makefile.
15480
15481 2011-03-04 Yao Qi <yao@codesourcery.com>
15482
15483 * Makefile.in: Remove GNU make feature --directory.
15484
15485 2011-03-04 Michael Snyder <msnyder@vmware.com>
15486
15487 * server.c (queue_stop_reply): Call xmalloc not malloc.
15488
15489 2011-03-02 Michael Snyder <msnyder@vmware.com>
15490
15491 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15492
15493 2011-02-28 Michael Snyder <msnyder@vmware.com>
15494
15495 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15496 (cmd_qtframe): Ditto.
15497 (cmd_qtbuffer): Ditto.
15498 (cmd_bigqtbuffer): Ditto.
15499
15500 * utils.c (decimal2str): Initialize 'width' to nine, then
15501 don't mess with it.
15502
15503 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15504
15505 * hostio.c (require_data): Free *data, not data.
15506
15507 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15508
15509 * hostio.c (require_data): Use free, not xfree.
15510
15511 2011-02-27 Michael Snyder <msnyder@vmware.com>
15512
15513 * server.c (handle_query): Discard unused value.
15514
15515 * hostio.c (require_data): Free malloc memory before returning
15516 error.
15517
15518 2011-02-26 Michael Snyder <msnyder@vmware.com>
15519
15520 * linux-low.c (list_threads): Call closedir for dirent.
15521
15522 2011-02-27 Michael Snyder <msnyder@vmware.com>
15523
15524 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15525 a case statement falls through.
15526
15527 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15528
15529 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15530 in comparison.
15531
15532 2011-02-26 Michael Snyder <msnyder@vmware.com>
15533
15534 * utils.c (decimal2str): Eliminate dead code and dead param.
15535 (pulongest): Drop dead param from call to decimal2str.
15536 (plongest): Ditto.
15537
15538 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15539
15540 Revert the following patch (not approved yet):
15541 2011-02-21 Hui Zhu <teawater@gmail.com>
15542 * tracepoint.c (tp_printf): New function.
15543 (eval_agent_expr): Handle gdb_agent_op_printf.
15544
15545 2011-02-21 Hui Zhu <teawater@gmail.com>
15546
15547 * tracepoint.c (tp_printf): New function.
15548 (eval_agent_expr): Handle gdb_agent_op_printf.
15549
15550 2011-02-18 Tom Tromey <tromey@redhat.com>
15551
15552 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15553 (tracepoint.o): Likewise.
15554 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15555 (gdb_agent_op_names): Likewise.
15556
15557 2011-02-18 Tom Tromey <tromey@redhat.com>
15558
15559 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15560 gdb_agent_op_rot>: New constants.
15561 (gdb_agent_op_names): Add pick and roll.
15562 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15563 cases.
15564
15565 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15566
15567 * aclocal.m4: Regenerated with aclocal-1.11.1.
15568
15569 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15570
15571 * server.c (handle_qxfer_traceframe_info): New.
15572 (qxfer_packets): Register "traceframe-info".
15573 (handle_query): Report support for qXfer:traceframe-info:read+.
15574 * tracepoint.c (match_blocktype): New.
15575 (traceframe_find_block_type): Rename to ...
15576 (traceframe_walk_blocks): ... this. Add callback filter argument,
15577 and use it.
15578 (traceframe_find_block_type): New, reimplemented on top of
15579 traceframe_walk_blocks.
15580 (build_traceframe_info_xml): New.
15581 (traceframe_read_info): New.
15582 * server.h (traceframe_read_info): Declare.
15583
15584 2011-02-11 Yao Qi <yao@codesourcery.com>
15585
15586 * configure.ac: Call AC_PROG_RANLIB.
15587 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15588 * configure: Regenerate.
15589
15590 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15591
15592 * server.c (gdb_read_memory): Change return semantics to allow
15593 partial transfers.
15594 (handle_search_memory_1): Adjust.
15595 (process_serial_event) <'m' packet>: Handle partial transfers.
15596 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15597
15598 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15599
15600 * regcache.c (init_register_cache): Initialize
15601 regcache->register_status.
15602 (free_register_cache): Release regcache->register_status.
15603 (regcache_cpy): Copy register_status.
15604 (registers_to_string): Print 'x's for unavailable registers.
15605 (supply_register): Mark the register's status valid or
15606 unavailable, depending on whether a buffer was passed in or not.
15607 (supply_register_zeroed): New.
15608 (supply_regblock): Mark the registers' status valid or
15609 unavailable, depending on whether a buffer was passed in or not.
15610 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15611 (struct regcache): New `register_status' field.
15612 (supply_register_zeroed): Declare.
15613 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15614 supply_register_zeroed, rather than passing a NULL buffer to
15615 supply_register.
15616 * tracepoint.c (fetch_traceframe_registers): Update comment.
15617
15618 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15619
15620 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15621 buffer explicit.
15622
15623 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15624
15625 * server.h (decode_xfer_write): Change prototype.
15626 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15627 and don't extract the annex here.
15628 * server.c (decode_xfer_read): Remove `annex' parameter,
15629 and don't extract the annex here.
15630 (decode_xfer): New.
15631 (struct qxfer): New.
15632 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15633 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15634 (handle_qxfer_statictrace): New functions, abstracted out from
15635 handle_query, and made to use the struct qxfer interface.
15636 (handle_threads_qxfer_proper): Rename to ...
15637 (handle_qxfer_threads_proper): ... this.
15638 (handle_threads_qxfer): Rename to ...
15639 (handle_qxfer_threads): ... this. Adjust.
15640 (qxfer_packets): New array.
15641 (handle_qxfer): New function.
15642 (handle_query): Use handle_qxfer.
15643
15644 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15645
15646 * gdbreplay.c: Shorten lines of >= 80 columns.
15647 * linux-low.c: Ditto.
15648 * linux-ppc-low.c: Ditto.
15649 * linux-s390-low.c: Ditto.
15650 * linux-sparc-low.c: Ditto.
15651 * linux-x86-low.c: Ditto.
15652 * linux-xtensa-low.c: Ditto.
15653 * mem-break.c: Ditto.
15654 * nto-low.c: Ditto.
15655 * regcache.h: Ditto.
15656 * remote-utils.c: Ditto.
15657 * server.c: Ditto.
15658 * server.h: Ditto.
15659 * thread-db.c: Ditto.
15660 * tracepoint.c: Ditto.
15661 * utils.c: Ditto.
15662 * win32-low.h: Ditto.
15663
15664 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15665
15666 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15667 update.
15668
15669 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15670
15671 * server.c (gdbserver_version): Update copyright year in version
15672 output.
15673 * gdbreplay.c (gdbreplay_version): Ditto.
15674
15675 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15676
15677 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15678 * linux-bfin-low.c: New file.
15679 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15680 PT_DATA_ADDR for BFIN targets.
15681 * Makefile.in (SFILES): Add linux-bfin-low.c.
15682 (clean): Remove reg-bfin.c.
15683 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15684 * README: Mention supported Blackfin targets.
15685
15686 2010-12-23 Mike Frysinger <vapier@gentoo.org>
15687
15688 * .gitignore: New file.
15689
15690 2010-11-16 Mike Frysinger <vapier@gentoo.org>
15691
15692 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15693
15694 2010-10-22 Jie Zhang <jie@codesourcery.com>
15695
15696 * Makefile.in: Add FLAGS_TO_PASS variable.
15697 (install): Remove dependency of install-only and recursively
15698 invoke make for install-only.
15699
15700 2010-10-04 Doug Evans <dje@google.com>
15701
15702 * Makefile.in (uninstall): Use $(DESTDIR).
15703
15704 2010-09-24 Pedro Alves <pedro@codesourcery.com>
15705
15706 PR gdb/11842
15707
15708 * linux-x86-low.c (compat_siginfo_from_siginfo)
15709 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15710 si_code is < 0. Check for si_code == SI_TIMER before checking for
15711 si_code < 0.
15712
15713 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15714
15715 * lynx-i386-low.c: New file.
15716 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15717
15718 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15719
15720 * lynx-low.c (ptrace_request_to_str): Remove handling for
15721 request values that have been removed in LynxOS 5.x.
15722
15723 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15724
15725 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15726 <ptrace.h>
15727
15728 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15729
15730 * configure.ac: Add --enable-inprocess-agent option.
15731 * configure: Rebuilt.
15732
15733 2010-09-06 Yao Qi <yao@codesourcery.com>
15734
15735 * linux-low.c (linux_kill): Remove unused variable.
15736 (linux_stabilize_threads): Likewise.
15737 * server.c (start_inferior): Likewise.
15738 (queue_stop_reply_callback): Likewise.
15739 * tracepoint.c (do_action_at_tracepoint): Likewise.
15740
15741 2010-09-06 Yao Qi <yao@codesourcery.com>
15742
15743 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15744 on return.
15745
15746 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15747
15748 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15749
15750 2010-09-06 Pedro Alves <pedro@codesourcery.com>
15751
15752 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15753 "$(IPA_DEPFILES)".
15754
15755 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15756
15757 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15758 gdbserver/lynx-ppc-low.c: New files.
15759 * Makefile.in (lynx_low_h): New variable.
15760 (lynx-low.o, lynx-ppc-low.o): New rules.
15761 * configure.ac: On LynxOS, link with -lnetinet.
15762 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15763 * configure: regenerate.
15764
15765 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15766
15767 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15768 * configure.ac: Add check for vasprintf and vsnprintf.
15769 * configure, config.in: Regenerate.
15770 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15771
15772 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15773
15774 * gdbreplay.c: Move include of alloca.h up, next to include of
15775 malloc.h.
15776 * server.h: Add include of malloc.h.
15777 * mem-break.c: Remove include of malloc.h.
15778 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15779
15780 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15781
15782 * Makefile.in (memmem.o): Build with -Wno-error.
15783
15784 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15785
15786 * utils.c (xsnprintf): Make non-static.
15787 * server.h: Add xsnprintf declaration.
15788 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15789 replace calls to snprintf by calls to xsnprintf throughout.
15790
15791 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15792
15793 * configure.ac: Add configure check for alloca.
15794 * configure, config.in: Regenerate.
15795 * server.h: Include alloca.h if it exists.
15796 * gdbreplay.c: Include alloca.h if it exists.
15797
15798 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15799
15800 * linux-low.c (__SIGRTMIN): Define if not already defined.
15801 (linux_create_inferior): Check for __ANDROID__ rather than
15802 __SIGRTMIN.
15803 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15804 are already deferred.
15805 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15806 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15807 stopped and already has a pending signal to report.
15808 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15809 a pending signal to report or is moving out of a jump pad.
15810 (linux_init_signals): Check for __ANDROID__ rather than
15811 __SIGRTMIN.
15812
15813 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15814
15815 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15816 debug_threads check. Avoid a linear search when not doing debug
15817 output.
15818
15819 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15820
15821 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15822 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15823 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15824 (process_event): Change local fd's type to gdb_fildes_t.
15825 (create_file_handler): Adjust prototype.
15826 (delete_file_handler): Adjust prototype.
15827 (handle_file_event): Adjust prototype. Use pfildes.
15828 (create_file_event): Adjsut prototype.
15829 * remote-utils.c (remote_desc, listen_desc): Change type to
15830 gdb_fildes_t.
15831 * server.h: New gdb_fildes_t typedef.
15832 [USE_WIN32API]: Include winsock2.h.
15833 (delete_file_handler, add_file_handler): Adjust prototypes.
15834 (pfildes): Declare.
15835 * utils.c (pfildes): New.
15836
15837 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15838
15839 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15840 * configure: Regenerate.
15841
15842 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15843
15844 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15845 (linux_done_accessing_memory): ... this.
15846 (linux_target_ops): Adjust.
15847 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15848 * nto-low.c (nto_target_ops): Adjust comment.
15849 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15850 * spu-low.c (spu_target_ops): Adjust comment.
15851 * target.h (target_ops): Rename unprepare_to_access_memory field
15852 to done_accessing_memory.
15853 (unprepare_to_access_memory): Rename to ...
15854 (done_accessing_memory): ... this.
15855
15856 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15857
15858 * linux-low.c (linux_prepare_to_access_memory): New.
15859 (linux_unprepare_to_access_memory): New.
15860 (linux_target_ops): Install them.
15861 * server.c (read_memory): Rename to ...
15862 (gdb_read_memory): ... this. Use
15863 prepare_to_access_memory/prepare_to_access_memory.
15864 (write_memory): Rename to ...
15865 (gdb_write_memory): ... this. Use
15866 prepare_to_access_memory/prepare_to_access_memory.
15867 (handle_search_memory_1): Adjust.
15868 (process_serial_event): Adjust.
15869 * target.h (struct target_ops): New fields
15870 prepare_to_access_memory and unprepare_to_access_memory.
15871 (prepare_to_access_memory, unprepare_to_access_memory): New.
15872 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15873 prepare_to_access_memory/prepare_to_access_memory.
15874 * nto-low.c (nto_target_ops): Adjust.
15875 * spu-low.c (spu_target_ops): Adjust.
15876 * win32-low.c (win32_target_ops): Adjust.
15877
15878 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15879
15880 * Makefile.in (WARN_CFLAGS): Get it from configure.
15881 (WERROR_CFLAGS): New.
15882 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
15883 * configure.ac: Introduce --enable-werror, which adds -Werror to
15884 the compiler command line. Enabled by default. Disable with
15885 --disable-werror. Add -Wdeclaration-after-statement
15886 Wpointer-arith and -Wformat-nonliteral to warning flags.
15887 * configure: Regenerate.
15888
15889 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15890
15891 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
15892
15893 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15894
15895 * gdbreplay.c (remote_error): New.
15896 (gdbchar): New.
15897 (expect): Use gdbchar. Check for error reading from GDB.
15898 Clarify sync error output.
15899 (play): Check for errors writing to GDB.
15900 * linux-low.c (sigchld_handler): Really ignore `write' errors.
15901 * remote-utils.c (getpkt): Check for errors writing to the remote
15902 descriptor.
15903
15904 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15905
15906 * linux-low.c (linux_wait_1): Move non-debugging code out of
15907 `debug_threads' control.
15908
15909 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15910
15911 * linux-low.c (linux_wait_1): Don't set last_status here.
15912 * server.c (push_event, queue_stop_reply_callback): Assert we're
15913 not pushing a TARGET_WAITKIND_IGNORE event.
15914 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
15915 (myresume, handle_target_event): Set the thread's last_resume_kind
15916 and last_status from the target returned status.
15917
15918 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15919
15920 PR threads/10729
15921
15922 * linux-x86-low.c (update_debug_registers_callback): New.
15923 (i386_dr_low_set_addr): Use it.
15924 (i386_dr_low_get_addr): New.
15925 (i386_dr_low_set_control): Use update_debug_registers_callback.
15926 (i386_dr_low_get_control): New.
15927 (i386_dr_low_get_status): Adjust.
15928 * linux-low.c (linux_stop_lwp): New.
15929 * linux-low.h (linux_stop_lwp): Declare.
15930
15931 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
15932 argument instead of a i386_debug_reg_state.
15933 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
15934 a i386_debug_reg_state.
15935 (i386_insert_aligned_watchpoint): Adjust.
15936 (i386_remove_aligned_watchpoint): Adjust.
15937 (i386_low_stopped_data_address): Read the debug registers from the
15938 inferior instead of from the mirrors.
15939 * i386-low.h (struct i386_debug_reg_state): Extend comment.
15940 (i386_dr_low_get_addr): Declare.
15941 (i386_dr_low_get_control): Declare.
15942 (i386_dr_low_get_status): Change prototype.
15943
15944 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
15945 (i386_dr_low_get_addr): New.
15946 (i386_dr_low_get_control): New.
15947 (i386_dr_low_get_status): Adjust prototype. Return
15948 dr_status_mirror.
15949 (i386_initial_stuff): Clear dr_status_mirror and
15950 dr_control_mirror.
15951 (i386_get_thread_context): Adjust.
15952 (i386_set_thread_context): Adjust.
15953 (i386_thread_added): Adjust.
15954
15955 2010-08-24 Pedro Alves <pedro@codesourcery.com>
15956
15957 * linux-low.h (linux_thread_area): Delete declaration.
15958
15959 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
15960
15961 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
15962 after its termination.
15963
15964 2010-08-09 Pedro Alves <pedro@codesourcery.com>
15965
15966 * linux-low.c (gdb_wants_lwp_stopped): Delete.
15967 (gdb_wants_all_stopped): Delete.
15968 (linux_wait_1): Don't call them.
15969 * server.c (handle_v_cont): Tag all threads as want-stopped.
15970 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
15971 stopped as "client-wants-stopped".
15972
15973 2010-07-31 Pedro Alves <pedro@codesourcery.com>
15974
15975 * Makefile.in (signals_h): New.
15976 (server_h): Depend on it.
15977 (server.o): Don't depend on $(signals_def).
15978 (signals.o): Depend on $(signals_def).
15979
15980 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
15981
15982 * Makefile.in (signals_def): New.
15983 (server_h): Append include/gdb/signals.h and signals_def.
15984 (server.o): Append signals_def.
15985
15986 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15987
15988 * server.c (handle_target_event): Use target_signal_to_host for
15989 resume_info.sig initialization.
15990 * target.h (struct thread_resume) <sig>: New comment.
15991
15992 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
15993
15994 * server.c (handle_query): strcpy() the returned string from paddress()
15995 instead of sprintf().
15996 * utils.c (paddress): Return phex_nz().
15997
15998 2010-07-07 Joel Brobecker <brobecker@adacore.com>
15999
16000 * server.c (handle_v_cont): Call mourn_inferior if process
16001 just exited.
16002 (myresume): Likewise.
16003
16004 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16005
16006 Static tracepoints, and integration with UST.
16007
16008 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16009 * mem-break.c (uninsert_all_breakpoints)
16010 (reinsert_all_breakpoints): New.
16011 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16012 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16013 (gdb_agent_ust_loaded, helper_thread_id)
16014 (gdb_agent_helper_thread_id): New macros.
16015 (struct ipa_sym_addresses): Add addr_ust_loaded,
16016 addr_helper_thread_id, addr_cmd_buf.
16017 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16018 (in_process_agent_loaded_ust): New.
16019 (write_e_ust_not_loaded): New.
16020 (maybe_write_ipa_ust_not_loaded): New.
16021 (struct collect_static_trace_data_action): New.
16022 (enum tracepoint_type) <static_tracepoint>: New.
16023 (struct tracepoint) <handle>: Mention static tracepoints.
16024 (struct static_tracepoint_ctx): New.
16025 (CMD_BUF_SIZE): New.
16026 (add_tracepoint_action): Handle static tracepoint actions.
16027 (unprobe_marker_at): New.
16028 (clear_installed_tracepoints): Handle static tracepoints.
16029 (cmd_qtdp): Handle static tracepoints.
16030 (probe_marker_at): New.
16031 (cmd_qtstart): Handle static tracepoints.
16032 (response_tracepoint): Handle static tracepoints.
16033 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16034 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16035 (get_context_regcache): Handle static tracepoints.
16036 (do_action_at_tracepoint): Handle static tracepoint actions.
16037 (traceframe_find_block_type): Handle static trace data blocks.
16038 (traceframe_read_sdata): New.
16039 (download_tracepoints): Download static tracepoint actions.
16040 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16041 (GDB_PROBE_NAME): New.
16042 (ust_ops): New.
16043 (GET_UST_SYM): New.
16044 (USTF): New.
16045 (dlsym_ust): New.
16046 (ust_marker_to_static_tracepoint): New.
16047 (gdb_probe): New.
16048 (collect_ust_data_at_tracepoint): New.
16049 (gdb_ust_probe): New.
16050 (UNIX_PATH_MAX, SOCK_DIR): New.
16051 (gdb_ust_connect_sync_socket): New.
16052 (resume_thread, stop_thread): New.
16053 (run_inferior_command): New.
16054 (init_named_socket): New.
16055 (gdb_ust_socket_init): New.
16056 (cstr_to_hexstr): New.
16057 (next_st): New.
16058 (first_marker, next_marker): New.
16059 (response_ust_marker): New.
16060 (cmd_qtfstm, cmd_qtsstm): New.
16061 (unprobe_marker_at, probe_marker_at): New.
16062 (cmd_qtstmat, gdb_ust_thread): New.
16063 (gdb_ust_init): New.
16064 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16065 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16066 (ST_REGENTRY): New.
16067 (x86_64_st_collect_regmap): New.
16068 (X86_64_NUM_ST_COLLECT_GREGS): New.
16069 (AMD64_RIP_REGNUM): New.
16070 (supply_static_tracepoint_registers): New.
16071 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16072 (ST_REGENTRY): New.
16073 (i386_st_collect_regmap): New.
16074 (i386_NUM_ST_COLLECT_GREGS): New.
16075 (supply_static_tracepoint_registers): New.
16076 * server.c (handle_query): Handle qXfer:statictrace:read.
16077 <qSupported>: Report support for StaticTracepoints, and
16078 qXfer:statictrace:read features.
16079 * server.h (traceframe_read_sdata)
16080 (supply_static_tracepoint_registers): Declare.
16081 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16082 (unpack_varlen_hex): Include in IPA build.
16083 * Makefile.in (ustlibs, ustinc): New.
16084 (IPA_OBJS): Add remote-utils-ipa.o.
16085 ($(IPA_LIB)): Link -ldl and -lpthread.
16086 (UST_CFLAGS): New.
16087 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16088 * config.in, configure: Regenerate.
16089
16090 2010-06-20 Ian Lance Taylor <iant@google.com>
16091 Pedro Alves <pedro@codesourcery.com>
16092
16093 * linux-x86-low.c (always_true): Delete.
16094 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16095 trying to fool the compiler with always_true.
16096
16097 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16098
16099 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16100 conditions in gdbserver.
16101
16102 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16103
16104 * spu-low.c (spu_read_memory): Wrap around local store limit.
16105 (spu_write_memory): Likewise.
16106
16107 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16108
16109 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16110 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16111 LONGEST uses.
16112 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16113 uses.
16114 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16115 uses with LONGEST uses.
16116
16117 2010-06-14 Stan Shebs <stan@codesourcery.com>
16118 Pedro Alves <pedro@codesourcery.com>
16119
16120 Bytecode compiler.
16121
16122 * linux-x86-low.c: Include limits.h.
16123 (add_insns): New.
16124 (always_true): New.
16125 (EMIT_ASM): New.
16126 (EMIT_ASM32): New.
16127 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
16128 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
16129 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
16130 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
16131 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16132 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
16133 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
16134 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
16135 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
16136 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
16137 (amd64_emit_void_call_2): New.
16138 (amd64_emit_ops): New.
16139 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
16140 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
16141 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
16142 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
16143 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
16144 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
16145 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
16146 (i386_emit_call, i386_emit_reg, i386_emit_pop)
16147 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
16148 (i386_emit_stack_adjust, i386_emit_int_call_1)
16149 (i386_emit_void_call_2): New.
16150 (i386_emit_ops): New.
16151 (x86_emit_ops): New.
16152 (the_low_target): Install x86_emit_ops.
16153 * server.h (struct emit_ops): New.
16154 (get_raw_reg_func_addr): Declare.
16155 (current_insn_ptr, emit_error): Declare.
16156 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
16157 (set_trace_state_variable_value): New defines.
16158 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
16159 addr_get_trace_state_variable_value and
16160 addr_set_trace_state_variable_value.
16161 (symbol_list): New fields for get_raw_reg,
16162 get_trace_state_variable_value and set_trace_state_variable_value.
16163 (condfn): New typedef.
16164 (struct tracepoint): New field `compiled_cond'.
16165 (do_action_at_tracepoint): Clear compiled_cond.
16166 (get_trace_state_variable_value, set_trace_state_variable_value):
16167 Export in the IPA.
16168 (condition_true_at_tracepoint): If there's a compiled condition,
16169 run that.
16170 (current_insn_ptr, emit_error): New globals.
16171 (struct bytecode_address): New.
16172 (get_raw_reg_func_addr): New.
16173 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
16174 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
16175 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
16176 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
16177 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
16178 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
16179 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
16180 (compile_tracepoint_condition, compile_bytecodes): New.
16181 * target.h (emit_ops): Forward declare.
16182 (struct target_ops): New field emit_ops.
16183 (target_emit_ops): New.
16184 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
16185 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
16186 * linux-low.c (linux_emit_ops): New.
16187 (linux_target_ops): Install it.
16188 * linux-low.h (struct linux_target_ops): New field emit_ops.
16189
16190 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
16191
16192 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
16193 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
16194
16195 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16196 Stan Shebs <stan@codesourcery.com>
16197
16198 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
16199 (all): Depend on $(extra_libraries).
16200 (install-only): Install the IPA.
16201 (IPA_OBJS, IPA_LIB): New.
16202 (clean): Remove the IPA lib.
16203 (IPAGENT_CFLAGS): New.
16204 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
16205 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
16206 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
16207 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
16208 * configure.ac: Check for atomic builtins support in the compiler.
16209 (IPA_DEPFILES, extra_libraries): Define.
16210 * configure.srv (ipa_obj): Add description.
16211 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
16212 (i[34567]86-*-linux*): Set ipa_obj.
16213 (x86_64-*-linux*): Set ipa_obj.
16214 * linux-low.c (stabilizing_threads): New.
16215 (supports_fast_tracepoints): New.
16216 (linux_detach): Stabilize threads before detaching.
16217 (handle_tracepoints): Handle internal tracing breakpoints. Assert
16218 the lwp is either not stabilizing, or is moving out of a jump pad.
16219 (linux_fast_tracepoint_collecting): New.
16220 (maybe_move_out_of_jump_pad): New.
16221 (enqueue_one_deferred_signal): New.
16222 (dequeue_one_deferred_signal): New.
16223 (linux_wait_for_event_1): If moving out of a jump pad, defer
16224 pending signals to later.
16225 (linux_stabilize_threads): New.
16226 (linux_wait_1): Check if threads need moving out of jump pads, and
16227 do it if so.
16228 (stuck_in_jump_pad_callback): New.
16229 (move_out_of_jump_pad_callback): New.
16230 (lwp_running): New.
16231 (linux_resume_one_lwp): Handle moving out of jump pads.
16232 (linux_set_resume_request): Dequeue deferred signals.
16233 (need_step_over_p): Also step over fast tracepoint jumps.
16234 (start_step_over): Also uninsert fast tracepoint jumps.
16235 (finish_step_over): Also reinsert fast tracepoint jumps.
16236 (linux_install_fast_tracepoint_jump): New.
16237 (linux_target_ops): Install linux_stabilize_threads and
16238 linux_install_fast_tracepoint_jump_pad.
16239 * linux-low.h (linux_target_ops) <get_thread_area,
16240 install_fast_tracepoint_jump_pad>: New fields.
16241 (struct lwp_info) <collecting_fast_tracepoint,
16242 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
16243 (linux_get_thread_area): Declare.
16244 * linux-x86-low.c (jump_insn): New.
16245 (x86_get_thread_area): New.
16246 (append_insns): New.
16247 (push_opcode): New.
16248 (amd64_install_fast_tracepoint_jump_pad): New.
16249 (i386_install_fast_tracepoint_jump_pad): New.
16250 (x86_install_fast_tracepoint_jump_pad): New.
16251 (the_low_target): Install x86_get_thread_area and
16252 x86_install_fast_tracepoint_jump_pad.
16253 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
16254 (struct fast_tracepoint_jump): New.
16255 (fast_tracepoint_jump_insn): New.
16256 (fast_tracepoint_jump_shadow): New.
16257 (find_fast_tracepoint_jump_at): New.
16258 (fast_tracepoint_jump_here): New.
16259 (delete_fast_tracepoint_jump): New.
16260 (set_fast_tracepoint_jump): New.
16261 (uninsert_fast_tracepoint_jumps_at): New.
16262 (reinsert_fast_tracepoint_jumps_at): New.
16263 (set_breakpoint_at): Use write_inferior_memory.
16264 (uninsert_raw_breakpoint): Use write_inferior_memory.
16265 (check_mem_read): Mask out fast tracepoint jumps.
16266 (check_mem_write): Mask out fast tracepoint jumps.
16267 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
16268 (set_fast_tracepoint_jump): Declare.
16269 (delete_fast_tracepoint_jump)
16270 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
16271 (reinsert_fast_tracepoint_jumps_at): Declare.
16272 * regcache.c: Don't compile many functions when building the
16273 in-process agent library.
16274 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
16275 the register buffer in the heap.
16276 (free_register_cache): If the register buffer isn't owned by the
16277 regcache, don't free it.
16278 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
16279 pre-existing register caches.
16280 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
16281 type.
16282 (convert_ascii_to_int): : Constify `from' parameter type.
16283 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
16284 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
16285 the needed buffer in-place.
16286 (relocate_instruction): New.
16287 * server.c (handle_query) <qSymbols>: If the target supports
16288 tracepoints, give it a chance of looking up symbols. Report
16289 support for fast tracepoints.
16290 (handle_status): Stabilize threads.
16291 (process_serial_event): Adjust.
16292 * server.h (struct fast_tracepoint_jump): Forward declare.
16293 (struct process_info) <fast_tracepoint_jumps>: New field.
16294 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
16295 (decode_X_packet, decode_M_packet): Adjust.
16296 (relocate_instruction): Declare.
16297 (in_process_agent_loaded): Declare.
16298 (tracepoint_look_up_symbols): Declare.
16299 (struct fast_tpoint_collect_status): Declare.
16300 (fast_tracepoint_collecting): Declare.
16301 (force_unlock_trace_buffer): Declare.
16302 (handle_tracepoint_bkpts): Declare.
16303 (initialize_low_tracepoint)
16304 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
16305 * target.h (struct target_ops) <stabilize_threads,
16306 install_fast_tracepoint_jump_pad>: New fields.
16307 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
16308 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
16309 [HAVE_STDINT_H]: Include stdint.h.
16310 (trace_debug_1): Rename to ...
16311 (trace_vdebug): ... this.
16312 (trace_debug): Rename to ...
16313 (trace_debug_1): ... this. Add `level' parameter.
16314 (trace_debug): New.
16315 (ATTR_USED, ATTR_NOINLINE): New.
16316 (IP_AGENT_EXPORT): New.
16317 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
16318 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
16319 (about_to_request_buffer_space, trace_buffer_is_full)
16320 (stopping_tracepoint, expr_eval_result, error_tracepoint)
16321 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
16322 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16323 (traceframe_write_count, traceframes_created)
16324 (trace_state_variables)
16325 New renaming defines.
16326 (struct ipa_sym_addresses): New.
16327 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16328 (symbol_list): New.
16329 (ipa_sym_addrs): New.
16330 (all_tracepoint_symbols_looked_up): New.
16331 (in_process_agent_loaded): New.
16332 (write_e_ipa_not_loaded): New.
16333 (maybe_write_ipa_not_loaded): New.
16334 (tracepoint_look_up_symbols): New.
16335 (debug_threads) [IN_PROCESS_AGENT]: New.
16336 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16337 (UNKNOWN_SIDE_EFFECTS): New.
16338 (stop_tracing): New.
16339 (flush_trace_buffer): New.
16340 (stop_tracing_bkpt): New.
16341 (flush_trace_buffer_bkpt): New.
16342 (read_inferior_integer): New.
16343 (read_inferior_uinteger): New.
16344 (read_inferior_data_pointer): New.
16345 (write_inferior_data_pointer): New.
16346 (write_inferior_integer): New.
16347 (write_inferior_uinteger): New.
16348 (struct collect_static_trace_data_action): Delete.
16349 (enum tracepoint_type): New.
16350 (struct tracepoint) <type>: New field `type'.
16351 <actions_str, step_actions, step_actions_str>: Only include in
16352 GDBserver.
16353 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16354 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16355 (tracepoints): Use IP_AGENT_EXPORT.
16356 (last_tracepoint): Don't include in the IPA.
16357 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16358 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16359 (alloced_trace_state_variables): New.
16360 (trace_state_variables): Use IP_AGENT_EXPORT.
16361 (traceframe_t): Delete unused variable.
16362 (circular_trace_buffer): Don't include in the IPA.
16363 (trace_buffer_start): Delete.
16364 (struct trace_buffer_control): New.
16365 (trace_buffer_free): Delete.
16366 (struct ipa_trace_buffer_control): New.
16367 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16368 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16369 New.
16370 (trace_buffer_ctrl): New.
16371 (TRACE_BUFFER_CTRL_CURR): New.
16372 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16373 Reimplement as macros.
16374 (trace_buffer_wrap): Delete.
16375 (traceframe_write_count, traceframe_read_count)
16376 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16377 (struct tracepoint_hit_ctx) <type>: New field.
16378 (struct fast_tracepoint_ctx): New.
16379 (memory_barrier): New.
16380 (cmpxchg): New.
16381 (record_tracepoint_error): Update atomically in the IPA.
16382 (clear_inferior_trace_buffer): New.
16383 (about_to_request_buffer_space): New.
16384 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16385 updating the same buffer.
16386 (add_tracepoint): Default the tracepoint's type to trap
16387 tracepoint, and orig_size to -1.
16388 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16389 internal variables.
16390 (create_trace_state_variable): New parameter `gdb'. Handle it.
16391 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16392 (cmd_qtdp): Handle fast tracepoints.
16393 (cmd_qtdv): Adjust.
16394 (max_jump_pad_size): New.
16395 (gdb_jump_pad_head): New.
16396 (get_jump_space_head): New.
16397 (claim_jump_space): New.
16398 (sort_tracepoints): New.
16399 (MAX_JUMP_SIZE): New.
16400 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16401 IPA.
16402 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16403 support. Upload fast traceframes, and delete internal IPA
16404 breakpoints.
16405 (stop_tracing_handler): New.
16406 (flush_trace_buffer_handler): New.
16407 (cmd_qtstop): Upload fast tracepoints.
16408 (response_tracepoint): Handle fast tracepoints.
16409 (tracepoint_finished_step): Upload fast traceframes. Set the
16410 tracepoint hit context's tracepoint type.
16411 (handle_tracepoint_bkpts): New.
16412 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16413 type. Add comment about fast tracepoints.
16414 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16415 non-existing action_str field.
16416 (get_context_regcache): Handle fast tracepoints.
16417 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16418 to the regcache.
16419 (fast_tracepoint_from_jump_pad_address): New.
16420 (fast_tracepoint_from_ipa_tpoint_address): New.
16421 (collecting_t): New.
16422 (force_unlock_trace_buffer): New.
16423 (fast_tracepoint_collecting): New.
16424 (collecting): New.
16425 (gdb_collect): New.
16426 (write_inferior_data_ptr): New.
16427 (target_tp_heap): New.
16428 (target_malloc): New.
16429 (download_agent_expr): New.
16430 (UALIGN): New.
16431 (download_tracepoints): New.
16432 (download_trace_state_variables): New.
16433 (upload_fast_traceframes): New.
16434 (IPA_FIRST_TRACEFRAME): New.
16435 (IPA_NEXT_TRACEFRAME_1): New.
16436 (IPA_NEXT_TRACEFRAME): New.
16437 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16438 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16439 (gdb_jump_pad_buffer_end): New.
16440 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16441 (initialize_tracepoint): Adjust.
16442 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16443 buffer. Initialize the low module.
16444 * utils.c (PREFIX, TOOLNAME): New.
16445 (malloc_failure): Use PREFIX.
16446 (error): In the IPA, an error causes an exit.
16447 (fatal, warning): Use PREFIX.
16448 (internal_error): Use TOOLNAME.
16449 (NUMCELLS): Increase to 10.
16450 * configure, config.in: Regenerate.
16451
16452 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16453
16454 * server.c (handle_query) <qSupported>: Do two passes over the
16455 qSupported string to avoid nesting strtok.
16456
16457 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16458
16459 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16460 (CDEPS): New.
16461 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16462 -Wl,--dynamic-list.
16463 * configure: Regenerate.
16464 * proc-service.list: New.
16465
16466 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16467
16468 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16469 New comment.
16470
16471 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16472
16473 * gdbreplay.c (remote_open): Check error return from socket() call by
16474 its equality to -1 not by it being negative.
16475 * remote-utils.c (remote_open): Likewise.
16476
16477 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16478
16479 * config.h: Regenerate.
16480
16481 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16482
16483 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16484 doesn't provide PTRACE_GET_THREAD_AREA.
16485
16486 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16487
16488 * linux-m68k-low.c: Include <asm/ptrace.h>
16489 (ps_get_thread_area): Implement.
16490
16491 2010-05-03 Doug Evans <dje@google.com>
16492
16493 * event-loop.c (struct callback_event): New struct.
16494 (callback_list): New global.
16495 (append_callback_event, delete_callback_event): New functions.
16496 (process_callback): New function.
16497 (start_event_loop): Call it.
16498 * remote-utils.c (NOT_SCHEDULED): Define.
16499 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16500 moved out of readchar.
16501 (readchar): Rewrite. Call reschedule before returning.
16502 (reset_readchar): New function.
16503 (remote_close): Call it.
16504 (process_remaining, reschedule): New functions.
16505 * server.h (callback_handler_func): New typedef.
16506 (append_callback_event, delete_callback_event): Declare.
16507
16508 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16509
16510 * proc-service.c (ps_pglobal_lookup): Use
16511 thread_db_look_up_one_symbol.
16512 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16513 parameter. Use it instead of all_symbols_looked_up.
16514 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16515 field.
16516 (all_symbols_looked_up): Don't declare.
16517 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16518 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16519 field.
16520 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16521 Set all_symbols_looked_up here.
16522 (thread_db_look_up_one_symbol): New.
16523 (thread_db_get_tls_address): Adjust.
16524 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16525 thread_db object on the heap, and tentatively set it in the
16526 process structure.
16527 (thread_db_init): Don't set all_symbols_looked_up here.
16528 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16529
16530 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16531
16532 * linux-low.c (linux_kill, linux_detach): Adjust.
16533 (status_pending_p_callback): Remove redundant statement. Check
16534 for !TARGET_WAITIKIND_IGNORE, instead of
16535 TARGET_WAITKIND_STOPPED.
16536 (handle_tracepoints): Make sure LWP is locked. Adjust.
16537 (linux_wait_for_event_1): Adjust.
16538 (linux_cancel_breakpoints): New.
16539 (unsuspend_one_lwp): New.
16540 (unsuspend_all_lwps): New.
16541 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16542 (send_sigstop_callback): Change return type to int, add new
16543 `except' parameter and handle it.
16544 (suspend_and_send_sigstop_callback): New.
16545 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16546 pass them down. If SUSPEND, also increment the lwp's suspend
16547 count.
16548 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16549 (need_step_over_p): Don't consider suspended LWPs.
16550 (start_step_over): Adjust.
16551 (proceed_one_lwp): Change return type to int, add new `except'
16552 parameter and handle it.
16553 (unsuspend_and_proceed_one_lwp): New.
16554 (proceed_all_lwps): Use find_inferior instead of
16555 for_each_inferior.
16556 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16557 also decrement the suspend count of LWPs. Pass `except' down,
16558 instead of hacking its suspend count.
16559 (linux_pause_all): Add `freeze' parameter. Adjust.
16560 (linux_unpause_all): New.
16561 (linux_target_ops): Install linux_unpause_all.
16562 * server.c (handle_status): Adjust.
16563 * target.h (struct target_ops): New fields `unpause_all' and
16564 `cancel_breakpoints'. Add new parameter to `pause_all'.
16565 (pause_all): Add new `freeze' parameter.
16566 (unpause_all): New.
16567 (cancel_breakpoints): New.
16568 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16569 cancel breakpoints.
16570 (cmd_qtstart): Pause threads.
16571 (stop_tracing): Pause threads, and cancel breakpoints.
16572 * win32-low.c (win32_target_ops): Adjust.
16573
16574 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16575
16576 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16577 the inferior right away from here...
16578 (linux_wait_1): ... to here, and adjust to check the thread's
16579 last_resume_kind instead of the lwp's step or stop_expected flags.
16580
16581 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16582
16583 * README: Use consistent `GDB' and `GDBserver' spellings.
16584
16585 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16586
16587 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16588 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16589 (linux_detach_one_lwp): Assume the lwp is stopped.
16590 (any_thread_of): Delete.
16591 (linux_detach): Stop all lwps here. Don't blindly delete all
16592 breakpoints.
16593 (delete_lwp_callback): New.
16594 (linux_mourn): Delete all lwps of the process that is gone.
16595 (linux_wait_1): Don't delete the last lwp of the process here.
16596 * mem-break.h (mark_breakpoints_out): Declare.
16597 * mem-break.c (mark_breakpoints_out): New.
16598 (free_all_breakpoints): Use it.
16599 * server.c (handle_target_event): If the process is gone, mark
16600 breakpoints out.
16601 * thread-db.c (struct thread_db) <create_bp>: New field.
16602 (thread_db_enable_reporting): Fix prototype. Store a thread event
16603 breakpoint reference in the thread_db struct.
16604 (thread_db_load_search): Clear the thread_db object.
16605 (try_thread_db_load_1): Ditto.
16606 (switch_to_process): New.
16607 (disable_thread_event_reporting): Use it.
16608 (remove_thread_event_breakpoints): New.
16609 (thread_db_detach, thread_db_mourn): Use it.
16610
16611 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16612
16613 * linux-low.c (linux_enable_event_reporting): New.
16614 (linux_wait_for_event_1, handle_extended_wait): Use it.
16615
16616 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16617
16618 * linux-low.c (linux_kill_one_lwp, linux_kill)
16619 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16620 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16621 SIGSTOP even if the LWP is stopped.
16622 (send_sigstop_callback): New.
16623 (stop_all_lwps): Use send_sigstop_callback instead.
16624 (linux_resume_one_thread): Adjust.
16625 (proceed_one_lwp): Still proceed an LWP that the client has
16626 requested to stop, if we haven't reported it as stopped yet. Make
16627 sure that LWPs the client want stopped, have a pending SIGSTOP.
16628
16629 2010-04-26 Doug Evans <dje@google.com>
16630
16631 * server.c (handle_general_set): Make static.
16632
16633 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16634 Print received char after testing for error/eof instead of before.
16635 (input_interrupt): Tweak comment.
16636
16637 2010-04-23 Doug Evans <dje@google.com>
16638
16639 * server.c (start_inferior): Print inferior argv if --debug.
16640
16641 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16642
16643 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16644 * nto-x86-low.c: Include server.h
16645
16646 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16647
16648 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16649 be consistent with other sources of this directory.
16650 (init_registers_amd64): Correct name of source file of this function
16651 in the comment.
16652
16653 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16654
16655 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16656 64-bit executables.
16657
16658 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16659
16660 * win32-i386-low.c: Add 64-bit support.
16661 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16662 (init_registers_amd64): Declare.
16663 (mappings): Add 64-bit version of array.
16664 (init_windows_x86): New function.
16665 (the_low_target): Change init_arch field to init_windows_x86.
16666
16667 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16668
16669 * win32-low.c: Adapt to support also 64-bit architecture.
16670 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16671 (get_image_name): Use SIZE_T type for local variable `done'.
16672 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16673 (toolhelp_get_dll_name): Idem.
16674 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16675 Use uintptr_t typecast to avoid warning.
16676 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16677 (handle_exception): Use phex_nz to avoid warning.
16678 (win32_wait): Remove unused local variable `process'.
16679
16680 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16681
16682 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16683 `amd64-avx.o'.
16684
16685 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16686
16687 * configure.ac: Use `ws2_32' library for srv_mingw.
16688 * configure: Regenerate.
16689 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16690 * remote-utils.c: Likewise.
16691
16692 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16693
16694 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16695 if __x86_64__ is defined.
16696
16697 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16698
16699 * configure: Regenerate.
16700
16701 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16702
16703 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16704 * target.h (target_ops): New get_tib_address field.
16705 * win32-low.h (win32_thread_info): Add thread_local_base field.
16706 * win32-low.c (child_add_thread): Add tlb argument.
16707 Set thread_local_base field to TLB.
16708 (get_child_debug_event): Adapt to child_add_thread change.
16709 (win32_get_tib_address): New function.
16710 (win32_target_ops): Set get_tib_address field to
16711 win32_get_tib_address.
16712 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16713
16714 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16715
16716 * linux-low.c (linux_mourn): Also remove the process.
16717 * server.c (handle_target_event): Don't remove the process here.
16718 * nto-low.c (nto_mourn): New.
16719 (nto_target_ops): Install it.
16720 * spu-low.c (spu_mourn): New.
16721 (spu_target_ops): Install it.
16722 * win32-low.c (win32_mourn): New.
16723 (win32_target_ops): Install it.
16724
16725 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16726
16727 * server.h (buffer_xml_printf): Remove redundant `;'.
16728
16729 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16730
16731 * regcache.c (set_register_cache): Invalidate regcaches before
16732 changing the register cache layout.
16733 (regcache_invalidate_one): Allow a NULL regcache.
16734 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16735 regcaches before changing the register cache layout or the target
16736 regsets.
16737
16738 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16739
16740 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16741 variable warning on Linux/x86-64.
16742
16743 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16744
16745 GDBserver disconnected tracing support.
16746
16747 * linux-low.c (linux_remove_process): Delete.
16748 (add_lwp): Don't set last_resume_kind here.
16749 (linux_kill): Use `mourn'.
16750 (linux_detach): Use `thread_db_detach', and `mourn'.
16751 (linux_mourn): New.
16752 (linux_attach_lwp_1): Adjust comment.
16753 (linux_attach): last_resume_kind moved the thread_info; adjust.
16754 (status_pending_p_callback): Adjust.
16755 (linux_wait_for_event_1): Adjust.
16756 (count_events_callback, select_singlestep_lwp_callback)
16757 (select_event_lwp_callback, cancel_breakpoints_callback)
16758 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16759 (proceed_one_lwp): Adjust.
16760 (linux_async): Add debug output.
16761 (linux_thread_stopped): New.
16762 (linux_pause_all): New.
16763 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16764 linux_pause_all.
16765 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16766 (thread_db_free): Delete declaration.
16767 (thread_db_detach, thread_db_mourn): Declare.
16768 * thread-db.c (thread_db_init): Use thread_db_mourn.
16769 (thread_db_free): Delete, split in two.
16770 (disable_thread_event_reporting): New.
16771 (thread_db_detach): New.
16772 (thread_db_mourn): New.
16773
16774 * server.h (struct thread_info) <last_resume_kind>: New field.
16775 <attached>: Add comment.
16776 <gdb_detached>: New field.
16777 (handler_func): Change return type to int.
16778 (handle_serial_event, handle_target_event): Ditto.
16779 (gdb_connected): Declare.
16780 (tracing): Delete.
16781 (disconnected_tracing): Declare.
16782 (stop_tracing): Declare.
16783
16784 * server.c (handle_query) <qSupported>: Report support for
16785 disconnected tracing.
16786 (queue_stop_reply_callback): Account for running threads.
16787 (gdb_wants_thread_stopped): New.
16788 (gdb_wants_all_threads_stopped): New.
16789 (gdb_reattached_process): New.
16790 (handle_status): Clear the `gdb_detached' flag of all processes.
16791 In all-stop, stop all threads.
16792 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16793 (process_serial_event): If the remote connection breaks, or if an
16794 exit was forced with "monitor exit", force an event loop exit.
16795 Handle disconnected tracing on detach.
16796 (handle_serial_event): Adjust.
16797 (handle_target_event): If GDB isn't connected, forward events back
16798 to the inferior, unless the last process exited, in which case,
16799 exit gdbserver. Adjust interface.
16800
16801 * remote-utils.c (remote_open): Don't block in accept. Instead
16802 register an event loop source on the listen socket file
16803 descriptor. Refactor bits into ...
16804 (listen_desc): ... this new global.
16805 (gdb_connected): ... this new function.
16806 (enable_async_notification): ... this new function.
16807 (handle_accept_event): ... this new function.
16808 (remote_close): Clear remote_desc.
16809
16810 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16811
16812 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16813 New fields.
16814 (mourn_inferior): Define.
16815 (target_process_qsupported): Avoid the dangling else problem.
16816 (thread_stopped): Define.
16817 (pause_all): Define.
16818 (target_waitstatus_to_string): Declare.
16819 * target.c (target_waitstatus_to_string): New.
16820
16821 * tracepoint.c (tracing): Make extern.
16822 (disconnected_tracing): New.
16823 (stop_tracing): Make extern. Handle tracing stops due to GDB
16824 disconnecting.
16825 (cmd_qtdisconnected): New.
16826 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16827 (handle_tracepoint_general_set): Handle QTDisconnected.
16828
16829 * event-loop.c (event_handler_func): Change return type to int.
16830 (process_event): Bail out if the event handler wants the event
16831 loop to stop.
16832 (handle_file_event): Ditto.
16833 (start_event_loop): Bail out if the event handler wants the event
16834 loop to stop.
16835
16836 * nto-low.c (nto_target_ops): Adjust.
16837 * spu-low.c (spu_wait): Don't remove the process here.
16838 (spu_target_ops): Adjust.
16839 * win32-low.c (win32_wait): Don't remove the process here.
16840 (win32_target_ops): Adjust.
16841
16842 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16843
16844 * regcache.c (realloc_register_cache): Invalidate inferior's
16845 regcache before recreating it.
16846
16847 2010-04-09 Pedro Alves <pedro@codesourcery.com>
16848
16849 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16850
16851 2010-04-09 Stan Shebs <stan@codesourcery.com>
16852 Pedro Alves <pedro@codesourcery.com>
16853
16854 * server.h (LONGEST): New.
16855 (struct thread_info) <while_stepping>: New field.
16856 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16857 Declare.
16858 (initialize_tracepoint, handle_tracepoint_general_set)
16859 (handle_tracepoint_query, tracepoint_finished_step)
16860 (tracepoint_was_hit, release_while_stepping_state_list):
16861 (current_traceframe): Declare.
16862 * server.c (handle_general_set): Handle tracepoint packets.
16863 (read_memory): New.
16864 (write_memory): New.
16865 (handle_search_memory_1): Use read_memory.
16866 (handle_query): Report support for conditional tracepoints, trace
16867 state variables, and tracepoint sources. Handle tracepoint
16868 queries.
16869 (main): Initialize the tracepoints module.
16870 (process_serial_event): Handle traceframe reads/writes.
16871
16872 * linux-low.c (handle_tracepoints): New.
16873 (linux_wait_1): Call it.
16874 (linux_resume_one_lwp): Handle while-stepping.
16875 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16876 (linux_target_ops): Install them.
16877 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16878 New field.
16879 * linux-x86-low.c (x86_supports_tracepoints): New.
16880 (the_low_target). Install it.
16881
16882 * mem-break.h (delete_breakpoint): Declare.
16883 * mem-break.c (delete_breakpoint): Make external.
16884
16885 * target.h (struct target_ops): Add `supports_tracepoints',
16886 `read_pc', and `write_pc' fields.
16887 (target_supports_tracepoints): Define.
16888 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
16889 (phex_nz): New.
16890
16891 * regcache.h (struct regcache) <registers_owned>: New field.
16892 (init_register_cache, regcache_cpy): Declare.
16893 (regcache_read_pc, regcache_write_pc): Declare.
16894 (register_cache_size): Declare.
16895 (supply_regblock): Declare.
16896 * regcache.c (init_register_cache): New.
16897 (new_register_cache): Use it.
16898 (regcache_cpy): New.
16899 (register_cache_size): New.
16900 (supply_regblock): New.
16901 (regcache_read_pc, regcache_write_pc): New.
16902
16903 * tracepoint.c: New.
16904
16905 * Makefile.in (OBS): Add tracepoint.o.
16906 (tracepoint.o): New rule.
16907
16908 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
16909
16910 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
16911 (i386-mmx.o): New.
16912 (i386-mmx.c): Likewise.
16913 (i386-mmx-linux.o): Likewise.
16914 (i386-mmx-linux.c): Likewise.
16915
16916 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
16917 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
16918 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
16919 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
16920
16921 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
16922 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
16923 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
16924
16925 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
16926
16927 * Makefile.in (clean): Updated.
16928 (i386-avx.o): New.
16929 (i386-avx.c): Likewise.
16930 (i386-avx-linux.o): Likewise.
16931 (i386-avx-linux.c): Likewise.
16932 (amd64-avx.o): Likewise.
16933 (amd64-avx.c): Likewise.
16934 (amd64-avx-linux.o): Likewise.
16935 (amd64-avx-linux.c): Likewise.
16936
16937 * configure.srv (srv_i386_regobj): Add i386-avx.o.
16938 (srv_i386_linux_regobj): Add i386-avx-linux.o.
16939 (srv_amd64_regobj): Add amd64-avx.o.
16940 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
16941 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
16942 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
16943 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
16944 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
16945 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
16946 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
16947
16948 * i387-fp.c: Include "i386-xstate.h".
16949 (i387_xsave): New.
16950 (i387_cache_to_xsave): Likewise.
16951 (i387_xsave_to_cache): Likewise.
16952 (x86_xcr0): Likewise.
16953
16954 * i387-fp.h (i387_cache_to_xsave): Likewise.
16955 (i387_xsave_to_cache): Likewise.
16956 (x86_xcr0): Likewise.
16957
16958 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
16959 * linux-crisv32-low.c (target_regsets): Likewise.
16960 * linux-m68k-low.c (target_regsets): Likewise.
16961 * linux-mips-low.c (target_regsets): Likewise.
16962 * linux-ppc-low.c (target_regsets): Likewise.
16963 * linux-s390-low.c (target_regsets): Likewise.
16964 * linux-sh-low.c (target_regsets): Likewise.
16965 * linux-sparc-low.c (target_regsets): Likewise.
16966 * linux-xtensa-low.c (target_regsets): Likewise.
16967
16968 * linux-low.c: Include <sys/uio.h>.
16969 (regsets_fetch_inferior_registers): Support nt_type.
16970 (regsets_store_inferior_registers): Likewise.
16971 (linux_process_qsupported): New.
16972 (linux_target_ops): Add linux_process_qsupported.
16973
16974 * linux-low.h (regset_info): Add nt_type.
16975 (linux_target_ops): Add process_qsupported.
16976
16977 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
16978 and <sys/uio.h>.
16979 (init_registers_i386_avx_linux): New.
16980 (init_registers_amd64_avx_linux): Likewise.
16981 (xmltarget_i386_linux_no_xml): Likewise.
16982 (xmltarget_amd64_linux_no_xml): Likewise.
16983 (PTRACE_GETREGSET): Likewise.
16984 (PTRACE_SETREGSET): Likewise.
16985 (x86_fill_xstateregset): Likewise.
16986 (x86_store_xstateregset): Likewise.
16987 (use_xml): Likewise.
16988 (x86_linux_update_xmltarget): Likewise.
16989 (x86_linux_process_qsupported): Likewise.
16990 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
16991 (x86_arch_setup): Don't call init_registers_amd64_linux nor
16992 init_registers_i386_linux here. Call
16993 x86_linux_update_xmltarget.
16994 (the_low_target): Add x86_linux_process_qsupported.
16995
16996 * server.c (handle_query): Call target_process_qsupported.
16997
16998 * target.h (target_ops): Add process_qsupported.
16999 (target_process_qsupported): New.
17000
17001 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17002
17003 * inferiors.c (add_thread): Set last_status kind to
17004 TARGET_WAITKIND_IGNORE.
17005 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17006 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17007 (linux_wait_1): Move `thread' local definition to block that uses
17008 it. Don't NULL initialize `event_child'.
17009 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17010 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17011 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17012
17013 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17014
17015 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17016 an extended waitstatus, or by a watchpoint.
17017 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17018 thread was stepping or has been stopped by a watchpoint.
17019
17020 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17021
17022 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17023 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17024 of another, then delete the previous, and validate all
17025 breakpoints.
17026 (validate_inserted_breakpoint): New.
17027 (delete_disabled_breakpoints): New.
17028 (validate_breakpoints): New.
17029 (check_mem_read): Validate breakpoints before trusting their
17030 shadow. Delete disabled breakpoints.
17031 (check_mem_write): Validate breakpoints before trusting they
17032 should be inserted. Delete disabled breakpoints.
17033 * mem-break.h (validate_breakpoints):
17034 * server.c (handle_query): Validate breakpoints when we see a
17035 qSymbol query.
17036
17037 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17038
17039 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17040 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17041 if we could tell there's a GDB breakpoint at stop_pc.
17042 (need_step_over_p): Don't do a step over if we find a GDB
17043 breakpoint at the resume PC.
17044
17045 * mem-break.c (struct raw_breakpoint): New.
17046 (enum bkpt_type): New type `gdb_breakpoint'.
17047 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17048 fields. New field `raw'.
17049 (find_raw_breakpoint_at): New.
17050 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17051 breakpoint instead.
17052 (set_breakpoint_at): Adjust.
17053 (delete_raw_breakpoint): New.
17054 (release_breakpoint): New.
17055 (delete_breakpoint): Rename to...
17056 (delete_breakpoint_1): ... this. Add proc parameter. Use
17057 release_breakpoint. Return ENOENT.
17058 (delete_breakpoint): Reimplement.
17059 (find_breakpoint_at): Delete.
17060 (find_gdb_breakpoint_at): New.
17061 (delete_breakpoint_at): Delete.
17062 (set_gdb_breakpoint_at): New.
17063 (delete_gdb_breakpoint_at): New.
17064 (gdb_breakpoint_here): New.
17065 (set_reinsert_breakpoint): Use release_breakpoint.
17066 (uninsert_breakpoint): Rename to ...
17067 (uninsert_raw_breakpoint): ... this.
17068 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17069 (reinsert_raw_breakpoint): Change parameter type to
17070 raw_breakpoint.
17071 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17072 instead.
17073 (check_breakpoints): Adjust. Use release_breakpoint.
17074 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17075 (breakpoint_inserted_here): Ditto.
17076 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17077 Don't trust the breakpoint's shadow if it is not inserted.
17078 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17079 (delete_all_breakpoints): Adjust.
17080 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17081 use delete_breakpoint_1.
17082
17083 * mem-break.h (breakpoints_supported): Delete declaration.
17084 (set_gdb_breakpoint_at): Declare.
17085 (gdb_breakpoint_here): Declare.
17086 (delete_breakpoint_at): Delete.
17087 (delete_gdb_breakpoint_at): Declare.
17088
17089 * server.h (struct raw_breakpoint): Forward declare.
17090 (struct process_info): New field `raw_breakpoints'.
17091
17092 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17093 breakpoints.
17094
17095 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17096
17097 * linux-low.c (status_pending_p_callback): Fix comment.
17098 (linux_wait_for_event_1): Move most of the internal breakpoint
17099 handling from here...
17100 (linux_wait_1): ... to here.
17101 (count_events_callback): New.
17102 (select_singlestep_lwp_callback): New.
17103 (select_event_lwp_callback): New.
17104 (cancel_breakpoints_callback): New.
17105 (select_event_lwp): New.
17106 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17107 priority to all LWPs that have had events that should be reported
17108 to the client. Cancel breakpoints when about to reporting the
17109 event to the client, not while stopping lwps. No longer cancel
17110 finished single-steps here.
17111 (cancel_finished_single_step): Delete.
17112 (cancel_finished_single_steps): Delete.
17113
17114 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17115
17116 * mem-break.c (enum bkpt_type): New.
17117 (struct breakpoint): New field `type'.
17118 (set_breakpoint_at): Change return type to struct breakpoint
17119 pointer. Set type to `other_breakpoint' by default.
17120 (delete_breakpoint): Rewrite, supporting more than one breakpoint
17121 in the breakpoint list.
17122 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
17123 (reinsert_breakpoint): Rename to ...
17124 (reinsert_raw_breakpoint): ... this.
17125 (reinsert_breakpoints_at): Adjust.
17126 * mem-break.h (struct breakpoint): Declare.
17127 (set_breakpoint_at): Change return type to struct breakpoint
17128 pointer.
17129
17130 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17131
17132 * server.c (handle_query): Assign, not compare.
17133
17134 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17135
17136 Teach linux gdbserver to step-over-breakpoints.
17137
17138 * linux-low.c (can_hardware_single_step): New.
17139 (supports_breakpoints): New.
17140 (handle_extended_wait): If stopping threads, read the stop pc of
17141 the new cloned LWP.
17142 (get_pc): New.
17143 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
17144 low target doesn't support retrieving the PC.
17145 (add_lwp): Set last_resume_kind to resume_continue.
17146 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
17147 (linux_attach): Don't clear stop_expected. Set the lwp's
17148 last_resume_kind to resume_stop.
17149 (linux_detach_one_lwp): Don't check for removed breakpoints.
17150 (check_removed_breakpoint): Delete.
17151 (status_pending_p): Rename to ...
17152 (status_pending_p_callback): ... this. Don't check for removed
17153 breakpoints. Don't consider threads that are stopped from GDB's
17154 perspective.
17155 (linux_wait_for_lwp): Always read the stop_pc here.
17156 (cancel_breakpoint): New.
17157 (step_over_bkpt): New global.
17158 (linux_wait_for_event_1): Implement stepping over breakpoints.
17159 (gdb_wants_lwp_stopped): New.
17160 (gdb_wants_all_stopped): New.
17161 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
17162 single-step traps here. Store the thread's last reported target
17163 wait status.
17164 (send_sigstop): Don't clear stop_expected. Always set it,
17165 instead.
17166 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
17167 (cancel_finished_single_step): New.
17168 (cancel_finished_single_steps): New.
17169 (wait_for_sigstop): Don't cancel finished single-step traps here.
17170 (linux_resume_one_lwp): Don't check for removed breakpoints.
17171 Don't set `step' on non-hardware step archs.
17172 (linux_set_resume_request): Ignore resume_stop requests if already
17173 stopping or stopped. Set the lwp's last_resume_kind.
17174 (resume_status_pending_p): Don't check for removed breakpoints.
17175 (need_step_over_p): New.
17176 (start_step_over): New.
17177 (finish_step_over): New.
17178 (linux_resume_one_thread): Always queue a sigstop for resume_stop
17179 requests. Clear the thread's last reported target waitstatus.
17180 Don't use the `suspended' flag. Don't consider pending breakpoints.
17181 (linux_resume): Start a step-over if necessary.
17182 (proceed_one_lwp): New.
17183 (proceed_all_lwps): New.
17184 (unstop_all_lwps): New.
17185 * linux-low.h (struct lwp_info): Rewrite comment for the
17186 `suspended' flag. Add the `stop_pc' field. Delete the
17187 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
17188 Add `'last_resume_kind' and `need_step_over' fields.
17189 * inferiors.c (struct thread_info): Delete, moved elsewhere.
17190 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
17191 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
17192 (set_raw_breakpoint_at): New.
17193 (set_breakpoint_at): Rewrite to use it.
17194 (reinsert_breakpoint_handler): Delete.
17195 (set_reinsert_breakpoint): New.
17196 (reinsert_breakpoint_by_bp): Delete.
17197 (delete_reinsert_breakpoints): New.
17198 (uninsert_breakpoint): Rewrite.
17199 (uninsert_breakpoints_at): New.
17200 (reinsert_breakpoint): Rewrite.
17201 (reinsert_breakpoints_at): New.
17202 (check_breakpoints): Rewrite.
17203 (breakpoint_here): New.
17204 (breakpoint_inserted_here): New.
17205 (check_mem_read): Adjust.
17206 * mem-break.h (breakpoints_supported, breakpoint_here)
17207 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
17208 (reinsert_breakpoint_by_bp): Delete declaration.
17209 (delete_reinsert_breakpoints): Declare.
17210 (reinsert_breakpoint): Delete declaration.
17211 (reinsert_breakpoints_at): Declare.
17212 (uninsert_breakpoint): Delete declaration.
17213 (uninsert_breakpoints_at): Declare.
17214 (check_breakpoints): Adjust prototype.
17215 * server.h: Adjust include order.
17216 (struct thread_info): Declare here. Add a `last_status' field.
17217
17218 2010-03-23 Michael Snyder <msnyder@vmware.com>
17219
17220 * server.c (crc32): New function.
17221 (handle_query): Add handling for 'qCRC:' request.
17222
17223 2010-03-23 Pedro Alves <pedro@codesourcery.com>
17224
17225 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
17226 lwp had been stopped by a watchpoint.
17227
17228 2010-03-16 Pedro Alves <pedro@codesourcery.com>
17229
17230 * server.h (internal_error): Declare.
17231 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
17232 * utils.c (internal_error): New function.
17233
17234 2010-03-15 Andreas Schwab <schwab@redhat.com>
17235
17236 * configure.srv: Fix typo setting srv_regobj.
17237
17238 2010-03-15 Pedro Alves <pedro@codesourcery.com>
17239
17240 * linux-low.c (fetch_register): Avoid passing a non string literal
17241 format to `error'.
17242 (usr_store_inferior_registers): Ditto.
17243
17244 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17245
17246 * linux-low.c (linux_write_memory): Bail out early if peeking
17247 memory failed.
17248
17249 2010-03-14 Pedro Alves <pedro@codesourcery.com>
17250
17251 * linux-low.h (struct lwp_info): New fields
17252 `stopped_by_watchpoint' and `stopped_data_address'.
17253 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
17254 here, and cache them in the lwp object.
17255 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
17256 directly.
17257 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
17258 field.
17259 (linux_stopped_by_watchpoint): Rewrite.
17260 (linux_stopped_data_address): Rewrite.
17261
17262 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
17263
17264 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
17265 switching the current inferior, not before.
17266
17267 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
17268
17269 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
17270 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
17271 i386-linux.c and amd64-linux.c.
17272 (reg-i386.o): Removed.
17273 (reg-i386.c): Likewise.
17274 (reg-i386-linux.o): Likewise.
17275 (reg-i386-linux.c): Likewise.
17276 (reg-x86-64.o): Likewise.
17277 (reg-x86-64.c): Likewise.
17278 (reg-x86-64-linux.o): Likewise.
17279 (reg-x86-64-linux.c): Likewise.
17280 (i386.o): New.
17281 (i386.c): Likewise.
17282 (i386-linux.o): Likewise.
17283 (i386-linux.c): Likewise.
17284 (amd64.o): Likewise.
17285 (amd64.c): Likewise.
17286 (amd64-linux.o): Likewise.
17287 (amd64-linux.c): Likewise.
17288
17289 * configure.srv (srv_i386_regobj): New.
17290 (srv_i386_linux_regobj): Likewise.
17291 (srv_amd64_regobj): Likewise.
17292 (srv_amd64_linux_regobj): Likewise.
17293 (srv_i386_32bit_xmlfiles): Likewise.
17294 (srv_i386_64bit_xmlfiles): Likewise.
17295 (srv_i386_xmlfiles): Likewise.
17296 (srv_amd64_xmlfiles): Likewise.
17297 (srv_i386_linux_xmlfiles): Likewise.
17298 (srv_amd64_linux_xmlfiles): Likewise.
17299 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
17300 srv_xmlfiles to $srv_i386_xmlfiles.
17301 (i[34567]86-*-mingw32ce*): Likewise.
17302 (i[34567]86-*-mingw*): Likewise.
17303 (i[34567]86-*-nto*): Likewise.
17304 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
17305 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
17306 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
17307 (x86_64-*-linux*): Likewise.
17308
17309 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
17310 (init_registers_amd64_linux): New.
17311 (x86_arch_setup): Replace init_registers_x86_64_linux with
17312 init_registers_amd64_linux.
17313
17314 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
17315
17316 * configure.ac: Check for libdl. If it is not available link against
17317 static libthread_db.
17318 * configure: Regenerate.
17319
17320 2010-02-22 Pedro Alves <pedro@codesourcery.com>
17321
17322 PR9605
17323
17324 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17325 handing a read watchpoint.
17326 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17327
17328 2010-02-12 Doug Evans <dje@google.com>
17329
17330 * linux-low.c (linux_supports_tracefork_flag): Document.
17331 (linux_look_up_symbols): Add comment.
17332
17333 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17334
17335 * regcache.c (supply_register): Clear regcache if buf is NULL.
17336
17337 2010-02-02 Nicolas Roche <roche@sourceware.org>
17338 Joel Brobecker <brobecker@adacore.com>
17339
17340 * inferiors.c (find_inferior): Add function documentation.
17341 (unloaded_dll): Handle the case where the unloaded dll has not
17342 been previously registered in the dll list.
17343
17344 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17345
17346 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17347 (thumb2_breakpoint): New.
17348 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17349
17350 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17351
17352 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17353 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17354 breakpoints.
17355
17356 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17357
17358 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17359
17360 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17361
17362 * linux-s390-low.c (s390_collect_ptrace_register)
17363 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17364
17365 2010-01-21 Doug Evans <dje@google.com>
17366
17367 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17368 (PTRACE_ARG4_TYPE): New macro.
17369 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17370 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17371 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17372 (usr_store_inferior_registers): Ditto.
17373 (linux_read_memory, linux_write_memory): Ditto.
17374 (linux_test_for_tracefork): Ditto.
17375
17376 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17377 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17378
17379 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17380
17381 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17382 target.
17383
17384 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17385
17386 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17387 prototype to take a regcache. Adjust.
17388
17389 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17390
17391 * regcache.h (struct thread_info): Forward declare.
17392 (struct regcache): New.
17393 (new_register_cache): Adjust prototype.
17394 (get_thread_regcache): Declare.
17395 (free_register_cache): Adjust prototype.
17396 (registers_to_string, registers_from_string): Ditto.
17397 (supply_register, supply_register_by_name, collect_register)
17398 (collect_register_as_string, collect_register_by_name): Ditto.
17399 * regcache.c (struct inferior_regcache_data): Delete.
17400 (get_regcache): Rename to ...
17401 (get_thread_regcache): ... this. Adjust. Switch inferior before
17402 fetching registers.
17403 (regcache_invalidate_one): Adjust.
17404 (regcache_invalidate): Fix prototype.
17405 (new_register_cache): Return the new register cache.
17406 (free_register_cache): Change prototype.
17407 (realloc_register_cache): Adjust.
17408 (registers_to_string): Change prototype to take a regcache. Adjust.
17409 (registers_from_string): Ditto.
17410 (register_data): Ditto.
17411 (supply_register): Ditto.
17412 (supply_register_by_name): Ditto.
17413 (collect_register): Ditto.
17414 (collect_register_as_string): Ditto.
17415 (collect_register_by_name): Ditto.
17416 * server.c (process_serial_event): Adjust.
17417 * linux-low.h (regset_fill_func, regset_store_func): Change
17418 prototype.
17419 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17420 Change prototype.
17421 * linux-low.c (get_stop_pc): Adjust.
17422 (check_removed_breakpoint): Adjust.
17423 (linux_wait_for_event): Adjust.
17424 (linux_resume_one_lwp): Adjust.
17425 (fetch_register): Add regcache parameter. Adjust.
17426 (usr_store_inferior_registers): Ditto.
17427 (regsets_fetch_inferior_registers): Ditto.
17428 (regsets_store_inferior_registers): Ditto.
17429 (linux_fetch_registers, linux_store_registers): Ditto.
17430 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17431 regcache. Adjust.
17432 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17433 Ditto.
17434 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17435 prototype to take a regcache.
17436 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17437 * remote-utils.c (convert_ascii_to_int, outreg)
17438 (prepare_resume_reply): Change prototype to take a regcache.
17439 Adjust.
17440 * target.h (struct target_ops) <fetch_registers, store_registers>:
17441 Change prototype to take a regcache.
17442 (fetch_inferior_registers, store_inferior_registers): Change
17443 prototype to take a regcache. Adjust.
17444 * proc-service.c (ps_lgetregs): Adjust.
17445 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17446 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17447 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17448 take a regcache. Adjust.
17449 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17450 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17451 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17452 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17453 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17454 (cris_cannot_fetch_register):
17455 (cris_breakpoint_at): Change prototype to take a regcache.
17456 Adjust.
17457 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17458 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17459 to take a regcache. Adjust.
17460 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17461 Adjust.
17462 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17463 take a regcache. Adjust.
17464 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17465 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17466 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17467 * linux-mips-low.c (mips_get_pc):
17468 (mips_set_pc): Change prototype to take a regcache. Adjust.
17469 (mips_reinsert_addr): Adjust.
17470 (mips_collect_register): Change prototype to take a regcache.
17471 Adjust.
17472 (mips_supply_register):
17473 (mips_collect_register_32bit, mips_supply_register_32bit)
17474 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17475 (mips_store_fpregset): Ditto.
17476 * linux-ppc-low.c (ppc_supply_ptrace_register)
17477 (ppc_supply_ptrace_register): Ditto.
17478 (parse_spufs_run): Adjust.
17479 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17480 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17481 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17482 take a regcache. Adjust.
17483 * linux-s390-low.c (s390_collect_ptrace_register)
17484 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17485 (s390_set_pc): Change prototype to take a regcache. Adjust.
17486 (s390_arch_setup): Adjust.
17487 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17488 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17489 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17490 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17491 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17492 regcache. Adjust.
17493 (sparc_breakpoint_at): Adjust.
17494 * linux-xtensa-low.c (xtensa_fill_gregset):
17495 (xtensa_store_gregset):
17496 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17497 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17498 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17499 prototype to take a regcache. Adjust.
17500 * win32-arm-low.c (arm_fetch_inferior_register)
17501 (arm_store_inferior_register): Change prototype to take a
17502 regcache. Adjust.
17503 * win32-i386-low.c (i386_fetch_inferior_register)
17504 (i386_store_inferior_register): Change prototype to take a
17505 regcache. Adjust.
17506 * win32-low.c (child_fetch_inferior_registers)
17507 (child_store_inferior_registers): Change prototype to take a
17508 regcache. Adjust.
17509 (win32_wait): Adjust.
17510 (win32_fetch_inferior_registers): Change prototype to take a
17511 regcache. Adjust.
17512 (win32_store_inferior_registers): Adjust.
17513 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17514 store_inferior_register>: Change prototype to take a regcache.
17515
17516 2010-01-20 Doug Evans <dje@google.com>
17517
17518 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17519 #ifdef.
17520 (linux_wait_for_event1, linux_init_signals): Ditto.
17521 (W_STOPCODE): Provide definition if missing.
17522
17523 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17524
17525 * linux-low.c (linux_core_of_thread): New.
17526 (compare_ints, show_process, list_threads): New.
17527 (linux_qxfer_osdata): Report threads and cores.
17528 (linux_target_op): Register linux_core_of_thread.
17529 * remote-utils.c (prepare_resume_reply): Report the core.
17530 (buffer_xml_printf): Support %d specifier.
17531 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17532 New.
17533 (handle_query): Handle qXfer:threads. Announce availability
17534 thereof.
17535 * target.h (struct target_ops): New field core_of_thread.
17536
17537 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17538
17539 * Makefile.in (clean): Remove new generated files.
17540 (reg-s390.o, reg-s390.c): Remove rules.
17541 (reg-s390x.o, reg-s390x.c): Likewise.
17542 (s390-linux32.o, s390-linux32.c): Add rules.
17543 (s390-linux64.o, s390-linux64.c): Likewise.
17544 (s390x-linux64.o, s390x-linux64.c): Likewise.
17545 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17546 * linux-s390-low.c: Include <elf.h>.
17547 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17548 (init_registers_s390): Remove prototype.
17549 (init_registers_s390x): Likewise.
17550 (init_registers_s390_linux32): Add prototype.
17551 (init_registers_s390_linux64): Likewise.
17552 (init_registers_s390x_linux64): Likewise.
17553 (s390_num_regs_3264): New define.
17554 (s390_regmap_3264): New global variable.
17555 (s390_cannot_fetch_register): Remove obsolete check.
17556 (s390_cannot_store_register): Likewise.
17557 (s390_collect_ptrace_register): Handle upper/lower register halves.
17558 (s390_supply_ptrace_register): Likewise.
17559 (s390_fill_gregset): Update to register number changes.
17560 (s390_get_hwcap): New routine.
17561 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17562 Install appropriate regmap and register set.
17563
17564 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17565
17566 * server.c (gdbserver_version): Update copyright year to 2010.
17567 * gdbreplay.c (gdbreplay_version): Likewise.
17568
17569 2009-12-28 Doug Evans <dje@google.com>
17570
17571 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17572 elf/external.h. Include <elf.h> instead but only if necessary.
17573
17574 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17575
17576 * linux-low.c (linux_remove_process): Remove `detaching'
17577 parameter. Don't release/detach from thread_db here.
17578 (linux_kill): Release/detach from thread_db here, ...
17579 (linux_detach): ... and here, before actually detaching.
17580 (linux_wait_1): ... and here, when a process exits.
17581 * thread-db.c (any_thread_of): New.
17582 (thread_db_free): Switch the current inferior to a thread of the
17583 passed in process.
17584
17585 2009-12-21 Doug Evans <dje@google.com>
17586
17587 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17588
17589 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17590 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17591 warning ifndef __NR_tkill. Move setting of errno there too.
17592 Delete unnecessary resetting of errno after syscall.
17593 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17594
17595 * configure.ac: Check for dladdr.
17596 * config.in: Regenerate.
17597 * configure: Regenerate.
17598 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17599 (try_thread_db_load): Update.
17600
17601 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17602
17603 2009-12-18 Doug Evans <dje@google.com>
17604
17605 * event-loop.c: Include unistd.h if it exists.
17606
17607 * linux-low.c (my_waitpid): Move definition away from being in
17608 between linux_tracefork_child/linux_test_for_tracefork.
17609
17610 * gdb_proc_service.h (psaddr_t): Fix type.
17611 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17612 signature to match glibc.
17613
17614 2009-12-16 Doug Evans <dje@google.com>
17615
17616 * linux-low.c (linux_read_memory): Fix argument to read.
17617
17618 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17619
17620 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17621 events, don't leave current_inferior pointing at null.
17622
17623 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17624
17625 * win32-low.c (LOG): Delete.
17626 (OUTMSG): Output to stderr.
17627 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17628 on compile time LOG macro.
17629 (win32_wait): Fix debug output.
17630
17631 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17632
17633 * win32-low.c (win32_add_one_solib): If the dll name is
17634 "ntdll.dll", prepend the system directory to the dll path.
17635
17636 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17637
17638 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17639
17640 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17641 Vladimir Prus <vladimir@codesourcery.com>
17642
17643 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17644 * configure.ac: Check for __mcoldfire__ and set
17645 gdb_cv_m68k_is_coldfire.
17646 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17647 reg-cf.o and reg-m68k.o.
17648 * configure: Regenerated.
17649
17650 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17651
17652 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17653 Pass it to thread_db_free.
17654 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17655 proper `detaching' argument to linux_remove_process.
17656 * linux-low.h (thread_db_free): Add `detaching' parameter.
17657 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17658 to thread_db_free.
17659 (thread_db_free): Add `detaching' parameter. Only
17660 call td_ta_clear_event if detaching from process.
17661
17662 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17663
17664 * thread-db.c (thread_db_free): Fix typo.
17665
17666 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17667
17668 PR gdb/10838
17669 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17670
17671 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17672
17673 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17674 with an i686 compiler.
17675 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17676 needed.
17677 * configure: Rebuilt.
17678
17679 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17680
17681 PR gdb/10783
17682
17683 * server.c (handle_search_memory_1): Correct read_addr initialization
17684 in loop for searching subsequent chunks.
17685
17686 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17687
17688 * configure.ac: New --with-libthread-db option.
17689 * thread-db.c: Allow direct dependence on libthread_db.
17690 (thread_db_free): Adjust.
17691 * config.in: Regenerate.
17692 * configure: Likewise.
17693
17694 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17695
17696 PR gdb/10757
17697 * thread-db.c (attach_thread): New function.
17698 (maybe_attach_thread): Return success/failure.
17699 (find_new_threads_callback): Adjust.
17700 (thread_db_find_new_threads): Loop until no new threads.
17701
17702 2009-10-13 Pedro Alves <pedro@codesourcery.com>
17703
17704 * proc-service.c (ps_lgetregs): Formatting.
17705
17706 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17707
17708 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17709 * configure.ac: Adjust.
17710 * linux-low.h (struct process_info_private): Move members to struct
17711 thread_db.
17712 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17713 * linux-low.c (linux_remove_process): Adjust.
17714 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17715 * server.c (handle_query): Move code ...
17716 (handle_monitor_command): ... here. New function.
17717 * target.h (struct target_ops): New member.
17718 * thread-db.c (struct thread_db): New.
17719 (libthread_db_search_path): New variable.
17720 (thread_db_create_event, thread_db_enable_reporting)
17721 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17722 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17723 (try_thread_db_load_1, dladdr_to_soname): New functions.
17724 (try_thread_db_load, thread_db_load_search): New functions.
17725 (thread_db_init): Search for libthread_db.
17726 (thread_db_free): New function.
17727 (thread_db_handle_monitor_command): Likewise.
17728 * config.in: Regenerate.
17729 * configure: Regenerate.
17730
17731 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17732
17733 * spu-low.c (spu_kill): Wait for inferior to terminate.
17734 Call clear_inferiors.
17735 (spu_detach): Call clear_inferiors.
17736
17737 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17738
17739 * aclocal.m4: Regenerate.
17740 * config.in: Likewise.
17741 * configure: Likewise.
17742
17743 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17744
17745 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17746 (parse_spufs_run): New function.
17747 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17748 (ppc_breakpoint_at): Handle SPU breakpoints.
17749
17750 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17751
17752 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17753 (SPUFS_MAGIC): Define.
17754 (spu_enumerate_spu_ids): New function.
17755 (linux_qxfer_spu): New function.
17756 (linux_target_ops): Install linux_qxfer_spu.
17757
17758 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17759
17760 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17761 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17762 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17763 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17764 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17765 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17766 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17767 (init_registers_powerpc_cell32l): Add prototype.
17768 (init_registers_powerpc_cell64l): Likewise.
17769 (ppc_arch_setup): Detect Cell/B.E. architecture.
17770
17771 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17772
17773 * Makefile.in (datarootdir): New variable.
17774
17775 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17776
17777 * linux-low.c (linux_write_memory): Update debugging output.
17778 * Makefile.in (clean): Add new descriptions.
17779 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17780 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17781 * configure.srv: Add new files for arm*-*-linux*.
17782 * linux-arm-low.c: Add new declarations.
17783 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17784 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17785 (HWCAP_VFPv3D16): New.
17786 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17787 instead of __IWMMXT__.
17788 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17789 (arm_arch_setup): New.
17790 (target_regsets): Remove #ifdef. Add VFP regset.
17791 (the_low_target): Use arm_arch_setup.
17792
17793 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17794
17795 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17796 the main thread again.
17797
17798 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17799
17800 Adding Neutrino gdbserver.
17801 * configure: Regenerated.
17802 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17803 * configure.srv (i[34567]86-*-nto*): New target.
17804 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17805 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17806 (nto_comctrl) [__QNX__]: New function.
17807 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17808
17809 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
17810
17811 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17812 srv_tgtobj.
17813
17814 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17815 Pedro Alves <pedro@codesourcery.com>
17816
17817 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17818 don't support CONTEXT_EXTENDED_REGISTERS.
17819 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17820 (the_low_target): Install them.
17821 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17822 failing with ERROR_PIPE_NOT_CONNECTED.
17823
17824 2009-06-30 Doug Evans <dje@google.com>
17825 Pierre Muller <muller@ics.u-strasbg.fr>
17826
17827 Add h/w watchpoint support to x86-linux, win32-i386.
17828 * Makefile.in (SFILES): Add i386-low.c
17829 (i386_low_h): Define.
17830 (i386-low.o): Add dependencies.
17831 (linux-x86-low.o): Add i386-low.h dependency.
17832 (win32-i386-low.o): Ditto.
17833 * i386-low.c: New file.
17834 * i386-low.h: New file.
17835 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17836 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17837 * linux-low.c (linux_add_process): Initialize arch_private.
17838 (linux_remove_process): Free arch_private.
17839 (add_lwp): Initialize arch_private.
17840 (delete_lwp): Free arch_private.
17841 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17842 provided.
17843 * linux-low.h (process_info_private): New member arch_private.
17844 (lwp_info): New member arch_private.
17845 (linux_target_ops): New members new_process, new_thread,
17846 prepare_to_resume.
17847 (ptid_of): New macro.
17848 * linux-x86-low.c: Include stddef.h, i386-low.h.
17849 (arch_process_info): New struct.
17850 (arch_lwp_info): New struct.
17851 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17852 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17853 (i386_dr_low_get_status): New function.
17854 (x86_insert_point, x86_remove_point): New functions.
17855 (x86_stopped_by_watchpoint): New function.
17856 (x86_stopped_data_address): New function.
17857 (x86_linux_new_process, x86_linux_new_thread): New functions.
17858 (x86_linux_prepare_to_resume): New function.
17859 (the_low_target): Add entries for insert_point, remove_point,
17860 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17861 prepare_to_resume.
17862 * server.c (debug_hw_points): New global.
17863 (monitor_show_help): Document set debug-hw-points.
17864 (handle_query): Process "set debug-hw-points".
17865 * server.h (debug_hw_points): Declare.
17866 (paddress): Declare.
17867 * utils.c (NUMCELLS, CELLSIZE): New macros.
17868 (get_sell, xsnprintf, paddress): New functions.
17869 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17870 remove_point, stopped_by_watchpoint, stopped_data_address.
17871 * win32-i386-low.c: Include i386-low.h.
17872 (debug_reg_state): Replaces dr.
17873 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17874 (i386_dr_low_get_status): New function.
17875 (i386_insert_point, i386_remove_point): New functions.
17876 (i386_stopped_by_watchpoint): New function.
17877 (i386_stopped_data_address): New function.
17878 (i386_initial_stuff): Update.
17879 (get_thread_context,set_thread_context,i386_thread_added): Update.
17880 (the_low_target): Add entries for insert_point,
17881 remove_point, stopped_by_watchpoint, stopped_data_address.
17882 * win32-low.c (win32_insert_watchpoint): New function.
17883 (win32_remove_watchpoint): New function.
17884 (win32_stopped_by_watchpoint): New function.
17885 (win32_stopped_data_address): New function.
17886 (win32_target_ops): Add entries for insert_watchpoint,
17887 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
17888 * win32-low.h (win32_target_ops): New members insert_point,
17889 remove_point, stopped_by_watchpoint, stopped_data_address.
17890
17891 2009-06-25 Pedro Alves <pedro@codesourcery.com>
17892
17893 * server.c (process_serial_event): Re-return unsupported, not
17894 error, if the type isn't recognized. Re-allow supporting only
17895 insert or remove packets. Also call require_running for
17896 breakpoints. Add missing break statement to default case. Tidy.
17897 * target.h (struct target_ops): Rename insert_watchpoint to
17898 insert_point, and remove_watchpoint to remove_point.
17899
17900 * linux-low.h (struct linux_target_ops): Likewise.
17901 * linux-low.c (linux_insert_watchpoint): Rename to ...
17902 (linux_insert_point): ... this. Adjust.
17903 (linux_remove_watchpoint): Rename to ...
17904 (linux_remove_point): ... this. Adjust.
17905 (linux_target_ops): Adjust.
17906 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
17907 (cris_insert_point): ... this.
17908 (cris_remove_watchpoint): Rename to ...
17909 (cris_remove_point): ... this.
17910 (the_low_target): Adjust.
17911
17912 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
17913
17914 * server.c (handle_v_kill): Pass signal_pid to
17915 kill_inferior if multi_process is zero.
17916
17917 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
17918
17919 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
17920 * target.h (target_ops): Comment for *_watchpoint to make it clear
17921 the functions can get types '0' and '1'.
17922
17923 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
17924
17925 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
17926 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
17927 * regcache.c (get_regcache): Likewise.
17928 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
17929 * win32-low.c (child_fetch_inferior_registers): Remove check for
17930 regno 0.
17931
17932 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
17933 Pedro Alves <pedro@codesourcery.com>
17934
17935 * target.h (struct target_ops) <supports_multi_process>: New
17936 callback.
17937 (target_supports_multi_process): New.
17938 * server.c (handle_query): Even if GDB reports support, only
17939 enable multi-process if the target also supports it. Report
17940 multi-process support only if the target backend supports it.
17941 * linux-low.c (linux_supports_multi_process): New function.
17942 (linux_target_ops): Install it as target_supports_multi_process
17943 callback.
17944
17945 2009-05-24 Doug Evans <dje@google.com>
17946
17947 Global renaming of find_thread_pid to find_thread_ptid.
17948 * server.h (find_thread_ptid): Renamed from find_thread_pid.
17949 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
17950 All callers updated.
17951
17952 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
17953 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
17954 directly.
17955
17956 * linux-low.c (get_stop_pc): Print pc if debug_threads.
17957 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
17958 (linux_resume_one_lwp): Ditto.
17959
17960 2009-05-23 Doug Evans <dje@google.com>
17961
17962 * linux-low.c (linux_resume_one_lwp): Change type of first arg
17963 from struct inferior_list_entry * to struct lwp_info *.
17964 All callers updated.
17965
17966 2009-05-13 Doug Evans <dje@google.com>
17967
17968 * linux-x86-low.c: Don't include assert.h.
17969 (x86_siginfo_fixup): Use fatal, not assert.
17970 (x86_arch_setup): Fix comment.
17971
17972 2009-05-12 Doug Evans <dje@google.com>
17973
17974 Biarch support for i386/amd64 gdbserver.
17975 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
17976 Add linux-x86-low.c.
17977 (linux-i386-low.o, linux-x86-64-low.o): Delete.
17978 (linux-x86-low.o): Add.
17979 * linux-x86-64-low.c: Delete.
17980 * linux-i386-low.c: Delete.
17981 * linux-x86-low.c: New file.
17982 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
17983 linux-x86-low.o.
17984 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
17985 linux-x86-low.o.
17986 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
17987 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
17988 (linux_child_pid_to_exec_file): New function.
17989 (elf_64_header_p, elf_64_file_p): New functions.
17990 (siginfo_fixup): New function.
17991 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
17992 give target a chance to convert layout.
17993 * linux-low.h (linux_target_ops): New member siginfo_fixup.
17994 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
17995
17996 2009-05-07 Doug Evans <dje@google.com>
17997
17998 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
17999 (regsets_store_inferior_registers): Ditto.
18000
18001 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18002
18003 PR server/10048
18004
18005 * linux-low.c (must_set_ptrace_flags): Delete.
18006 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18007 of the global.
18008 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18009 `lwp->must_set_ptrace_flags' instead.
18010 (linux_wait_for_event_1): Set ptrace options here.
18011 (linux_wait_1): ... not here.
18012
18013 2009-04-30 Doug Evans <dje@google.com>
18014
18015 * inferiors.c (started_inferior_callback): New function.
18016 (attached_inferior_callback): New function.
18017 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18018 * server.c (print_started_pid, print_attached_pid): New functions.
18019 (detach_or_kill_for_exit): New function.
18020 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18021 * server.h (have_started_inferiors_p): Declare.
18022 (have_attached_inferiors_p): Declare.
18023
18024 * inferiors.c (remove_process): Fix memory leak, free process.
18025 * linux-low.c (linux_remove_process): New function.
18026 (linux_kill): Call it instead of remove_process.
18027 (linux_detach, linux_wait_1): Ditto.
18028
18029 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18030
18031 * configure.srv: Add x86 Windows CE target.
18032
18033 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18034
18035 * inferiors.c (get_thread_process): Make global.
18036 * server.h (get_thread_process): Add prototype.
18037 * thread-db.c (find_one_thread): Use get_thread_process
18038 instead of current_process.
18039 (thread_db_get_tls_address): Do not crash if called when
18040 thread layer is not yet initialized.
18041
18042 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18043
18044 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18045 * spu-low.c (current_tid): Rename to ...
18046 (current_ptid): ... this.
18047 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18048 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18049 ptid_get_lwp (current_ptid) instead of current_tid.
18050 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18051 instead of current_tid. Use find_process_pid to verify pid
18052 argument is valid. Pass proper argument to remove_process.
18053 (spu_thread_alive): Compare current_ptid instead of current_tid.
18054 (spu_resume): Likewise.
18055
18056 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18057
18058 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18059 variable.
18060
18061 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18062
18063 Implement the multiprocess extensions, and add linux multiprocess
18064 support.
18065
18066 * server.h (ULONGEST): Declare.
18067 (struct ptid, ptid_t): New.
18068 (minus_one_ptid, null_ptid): Declare.
18069 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18070 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18071 (struct inferior_list_entry): Change `id' type from unsigned from
18072 to ptid_t.
18073 (struct sym_cache, struct breakpoint, struct
18074 process_info_private): Forward declare.
18075 (struct process_info): Declare.
18076 (current_process): Declare.
18077 (all_processes): Declare.
18078 (initialize_inferiors): Declare.
18079 (add_thread): Adjust to use ptid_t.
18080 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18081 (add_process, remove_process, find_thread_pid): Declare.
18082 (find_inferior_id): Adjust to use ptid_t.
18083 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18084 (multi_process): Declare.
18085 (push_event): Adjust to use ptid_t.
18086 (read_ptid, write_ptid): Declare.
18087 (prepare_resume_reply): Adjust to use ptid_t.
18088 (clear_symbol_cache): Declare.
18089 * inferiors.c (all_processes): New.
18090 (null_ptid, minus_one_ptid): New.
18091 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18092 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18093 (add_thread): Change unsigned long to ptid. Remove gdb_id
18094 parameter. Adjust.
18095 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18096 (gdb_id_to_thread): Rename to ...
18097 (find_thread_pid): ... this. Change unsigned long to ptid.
18098 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18099 (loaded_dll, pull_pid_from_list): Adjust.
18100 (add_process, remove_process, find_process_pid)
18101 (get_thread_process, current_process, initialize_inferiors): New.
18102 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18103 (struct target_waitstatus) <related_pid>: Ditto.
18104 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18105 return type to int.
18106 (struct target_ops) <join>: Add `pid' argument.
18107 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18108 (struct target_ops) <wait>: Add `ptid' field. Change return type
18109 to ptid.
18110 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18111 (mywait): Add `ptid' argument. Change return type to ptid_t.
18112 (target_pid_to_str): Declare.
18113 * target.c (set_desired_inferior): Adjust to use ptids.
18114 (mywait): Add new `ptid' argument. Adjust.
18115 (target_pid_to_str): New.
18116 * mem-break.h (free_all_breakpoints): Declare.
18117 * mem-break.c (breakpoints): Delelete.
18118 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18119 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18120 to use per-process breakpoint list.
18121 (free_all_breakpoints): New.
18122 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
18123 (symbol_cache, all_symbols_looked_up): Delete.
18124 (hexchars): New.
18125 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
18126 read_ptid): New.
18127 (prepare_resume_reply): Change ptid argument's type from unsigned
18128 long to ptid_t. Adjust. Implement W;process and X;process.
18129 (free_sym_cache, clear_symbol_cache): New.
18130 (look_up_one_symbol): Adjust to per-process symbol cache. *
18131 * server.c (cont_thread, general_thread, step_thread): Change type
18132 to ptid_t.
18133 (attached): Delete.
18134 (multi_process): New.
18135 (last_ptid): Change type to ptid_t.
18136 (struct vstop_notif) <ptid>: Change type to ptid_t.
18137 (queue_stop_reply, push_event): Change `ptid' argument's type to
18138 ptid_t.
18139 (discard_queued_stop_replies): Add `pid' argument.
18140 (start_inferior): Adjust to use ptids. Adjust to mywait interface
18141 changes. Don't reference the `attached' global.
18142 (attach_inferior): Adjust to mywait interface changes.
18143 (handle_query): Adjust to use ptids. Parse GDB's qSupported
18144 features. Handle and report "multiprocess+". Handle
18145 "qAttached:PID".
18146 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
18147 changes.
18148 (handle_v_kill): New.
18149 (handle_v_stopped): Adjust to use target_pid_to_str.
18150 (handle_v_requests): Allow multiple attaches and runs when
18151 multiprocess extensions are in effect. Handle "vKill".
18152 (myresume): Adjust to use ptids.
18153 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
18154 (handle_status): Adjust to discard_queued_stop_replies interface
18155 change.
18156 (first_thread_of, kill_inferior_callback)
18157 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
18158 (main): Call initialize_inferiors. Adjust to use ptids, killing
18159 and detaching from all inferiors. Handle multiprocess packet
18160 variants.
18161 * linux-low.h: Include gdb_proc_service.h.
18162 (struct process_info_private): New.
18163 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
18164 <lwpid_of>: Use ptid_get_lwp.
18165 (get_lwp_thread): Adjust.
18166 (struct lwp_info): Add `dead' member.
18167 (find_lwp_pid): Declare.
18168 * linux-low.c (thread_db_active): Delete.
18169 (new_inferior): Adjust comment.
18170 (inferior_pid): Delete.
18171 (linux_add_process): New.
18172 (handle_extended_wait): Adjust.
18173 (add_lwp): Change unsigned long to ptid.
18174 (linux_create_inferior): Add process to processes table. Adjust
18175 to use ptids. Don't set new_inferior here.
18176 (linux_attach_lwp): Rename to ...
18177 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
18178 it. Adjust to use ptids.
18179 (linux_attach_lwp): New.
18180 (linux_attach): Add process to processes table. Don't set
18181 new_inferior here.
18182 (struct counter): New.
18183 (second_thread_of_pid_p, last_thread_of_process_p): New.
18184 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
18185 multiple processes.
18186 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
18187 processes. Remove process from process table.
18188 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
18189 to multiple processes.
18190 (any_thread_of): New.
18191 (linux_detach): Add `pid' argument, and handle it. Remove process
18192 from processes table.
18193 (linux_join): Add `pid' argument. Handle it.
18194 (linux_thread_alive): Change unsighed long argument to ptid_t.
18195 Consider dead lwps as not being alive.
18196 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
18197 threads we're not interested in.
18198 (same_lwp, find_lwp_pid): New.
18199 (linux_wait_for_lwp): Change `pid' argument's type from int to
18200 ptid_t. Adjust.
18201 (linux_wait_for_event): Rename to ...
18202 (linux_wait_for_event_1): ... this. Change `pid' argument's type
18203 from int to ptid_t. Adjust.
18204 (linux_wait_for_event): New.
18205 (linux_wait_1): Add `ptid' argument. Change return type to
18206 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
18207 that exit from the process table.
18208 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
18209 Adjust.
18210 (mark_lwp_dead): New.
18211 (wait_for_sigstop): Adjust to use ptids. If a process exits while
18212 stopping all threads, mark its main lwp as dead.
18213 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
18214 ptids.
18215 (fetch_register, usr_store_inferior_registers)
18216 (regsets_fetch_inferior_registers)
18217 (regsets_store_inferior_registers, linux_read_memory)
18218 (linux_write_memory): Inline `inferior_pid'.
18219 (linux_look_up_symbols): Adjust to use per-process
18220 `thread_db_active'.
18221 (linux_request_interrupt): Adjust to use ptids.
18222 (linux_read_auxv): Inline `inferior_pid'.
18223 (initialize_low): Don't reference thread_db_active.
18224 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
18225 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
18226 (ps_getpid): Return the pid of the current inferior.
18227 * thread-db.c (proc_handle, thread_agent): Delete.
18228 (thread_db_create_event, thread_db_enable_reporting): Adjust to
18229 per-process data.
18230 (find_one_thread): Change argument type to ptid_t. Adjust to
18231 per-process data.
18232 (maybe_attach_thread): Adjust to per-process data and ptids.
18233 (thread_db_find_new_threads): Ditto.
18234 (thread_db_init): Ditto.
18235 * spu-low.c (spu_create_inferior, spu_attach): Add process to
18236 processes table. Adjust to use ptids.
18237 (spu_kill, spu_detach): Adjust interface. Remove process from
18238 processes table.
18239 (spu_join, spu_thread_alive): Adjust interface.
18240 (spu_wait): Adjust interface. Remove process from processes
18241 table. Adjust to use ptids.
18242 * win32-low.c (current_inferior_tid): Delete.
18243 (current_inferior_ptid): New.
18244 (debug_event_ptid): New.
18245 (thread_rec): Take a ptid. Adjust.
18246 (child_add_thread): Add `pid' argument. Adjust to use ptids.
18247 (child_delete_thread): Ditto.
18248 (do_initial_child_stuff): Add `attached' argument. Add process to
18249 processes table.
18250 (child_fetch_inferior_registers, child_store_inferior_registers):
18251 Adjust.
18252 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
18253 (win32_attach): Pass 1 to do_initial_child_stuff.
18254 (win32_kill): Adjust interface. Remove process from processes
18255 table.
18256 (win32_detach): Ditto.
18257 (win32_join): Adjust interface.
18258 (win32_thread_alive): Take a ptid.
18259 (win32_resume): Adjust to use ptids.
18260 (get_child_debug_event): Ditto.
18261 (win32_wait): Adjust interface. Remove exiting process from
18262 processes table.
18263
18264 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18265
18266 Non-stop mode support.
18267
18268 * server.h (non_stop): Declare.
18269 (gdb_client_data, handler_func): Declare.
18270 (delete_file_handler, add_file_handler, start_event_loop):
18271 Declare.
18272 (handle_serial_event, handle_target_event, push_event)
18273 (putpkt_notif): Declare.
18274 * target.h (enum resume_kind): New.
18275 (struct thread_resume): Replace `step' field by `kind' field.
18276 (TARGET_WNOHANG): Define.
18277 (struct target_ops) <wait>: Add `options' argument.
18278 <supports_non_stop, async, start_non_stop>: New fields.
18279 (target_supports_non_stop, target_async): New.
18280 (start_non_stop): Declare.
18281 (mywait): Add `options' argument.
18282 * target.c (mywait): Add `options' argument. Print child exit
18283 notifications here.
18284 (start_non_stop): New.
18285 * server.c (non_stop, own_buf, mem_buf): New globals.
18286 (struct vstop_notif): New.
18287 (notif_queue): New global.
18288 (queue_stop_reply, push_event, discard_queued_stop_replies)
18289 (send_next_stop_reply): New.
18290 (start_inferior): Adjust to use resume_kind. Adjust to mywait
18291 interface changes.
18292 (attach_inferior): In non-stop mode, don't wait for the target
18293 here.
18294 (handle_general_set): Handle QNonStop.
18295 (handle_query): When handling qC, return the current general
18296 thread, instead of the first thread of the list.
18297 (handle_query): If the backend supports non-stop mode, include
18298 QNonStop+ in the qSupported query response.
18299 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
18300 and non-stop mode.
18301 (handle_v_attach, handle_v_run): Handle non-stop mode.
18302 (handle_v_stopped): New.
18303 (handle_v_requests): Report support for vCont;t. Handle vStopped.
18304 (myresume): Adjust to use resume_kind. Handle non-stop.
18305 (queue_stop_reply_callback): New.
18306 (handle_status): Handle non-stop mode.
18307 (main): Clear non_stop flag on reconnection. Use the event-loop.
18308 Refactor serial protocol handling from here ...
18309 (process_serial_event): ... to this new function. When GDB
18310 selects any thread, select one here. In non-stop mode, wait until
18311 GDB acks all pending events before exiting.
18312 (handle_serial_event, handle_target_event): New.
18313 * remote-utils.c (remote_open): Install remote_desc in the event
18314 loop.
18315 (remote_close): Remove remote_desc from the event loop.
18316 (putpkt_binary): Rename to...
18317 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
18318 (putpkt_binary): New as wrapper around putpkt_binary_1.
18319 (putpkt_notif): New.
18320 (prepare_resume_reply): In non-stop mode, don't change the
18321 general_thread.
18322 * event-loop.c: New.
18323 * Makefile.in (OBJ): Add event-loop.o.
18324 (event-loop.o): New rule.
18325
18326 * linux-low.h (pid_of): Moved here.
18327 (lwpid_of): New.
18328 (get_lwp_thread): Use lwpid_of.
18329 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18330 * linux-low.c (pid_of): Delete.
18331 (inferior_pid): Use lwpid_of.
18332 (linux_event_pipe): New.
18333 (target_is_async_p): New.
18334 (delete_lwp): New.
18335 (handle_extended_wait): Use lwpid_of.
18336 (add_lwp): Don't set lwpid field.
18337 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18338 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18339 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18340 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18341 first. Adjust to linux_wait_for_event interface changes. Use
18342 lwpid_of.
18343 (linux_detach): Don't delete the main lwp here.
18344 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18345 (status_pending_p): Don't consider explicitly suspended lwps.
18346 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18347 pointer. Add OPTIONS argument. Change return type to int. Use
18348 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18349 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18350 pointer. Add status pointer argument. Return a pid instead of a
18351 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18352 changes. In non-stop mode, don't switch to a random thread.
18353 (linux_wait): Rename to...
18354 (linux_wait_1): ... this. Add target_options argument, and handle
18355 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18356 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18357 clean exit and signal exit code. Don't stop all threads in
18358 non-stop mode. In all-stop mode, only stop all threads when
18359 reporting a stop to GDB. Handle explicit thread stop requests.
18360 (async_file_flush, async_file_mark): New.
18361 (linux_wait): New.
18362 (send_sigstop): Use lwpid_of.
18363 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18364 interface changes. In non-stop mode, don't switch to a random
18365 thread.
18366 (linux_resume_one_lwp): Use lwpid_of.
18367 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18368 (linux_resume_one_thread): ... this. Handle resume_stop. In
18369 non-stop mode, don't look for pending flag in all threads.
18370 (resume_status_pending_p): Don't consider explicitly suspended
18371 threads.
18372 (my_waitpid): Reimplement. Emulate __WALL.
18373 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18374 Use lwpid_of.
18375 (sigchld_handler, linux_supports_non_stop, linux_async)
18376 (linux_start_non_stop): New.
18377 (linux_target_ops): Register linux_supports_non_stop, linux_async
18378 and linux_start_non_stop.
18379 (initialize_low): Install SIGCHLD handler.
18380 * thread-db.c (thread_db_create_event, find_one_thread)
18381 (thread_db_get_tls_address): Use lwpid_of.
18382 * win32-low.c (win32_detach): Adjust to use resume_kind.
18383 (win32_wait): Add `options' argument.
18384 * spu-low.c (spu_resume): Adjust to use resume_kind.
18385 (spu_wait): Add `options' argument.
18386
18387 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18388
18389 Decouple target code from remote protocol.
18390
18391 * target.h (enum target_waitkind): New.
18392 (struct target_waitstatus): New.
18393 (struct target_ops) <wait>: Return an unsigned long. Take a
18394 target_waitstatus pointer instead of a char pointer.
18395 (mywait): Likewise.
18396 * target.c (mywait): Change prototype to return an unsigned long.
18397 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18398 * server.h (thread_from_wait, old_thread_from_wait): Delete
18399 declarations.
18400 (prepare_resume_reply): Change prototype to take a
18401 target_waitstatus.
18402 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18403 (last_status, last_ptid): New.
18404 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18405 pid instead of a signal.
18406 (attach_inferior): Remove "status" and "signal" parameters.
18407 Adjust.
18408 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18409 not as an address.
18410 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18411 (handle_v_requests, myresume): Remove "status" and "signal"
18412 parameters. Adjust.
18413 (handle_status): New.
18414 (main): Delete local `status'. Adjust.
18415 * remote-utils.c: Include target.h.
18416 (prepare_resume_reply): Change prototype to take a
18417 target_waitstatus. Adjust.
18418
18419 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18420 interface.
18421 * spu-low.c (spu_wait): Adjust.
18422 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18423 Delete.
18424 (win32_wait): Adjust.
18425
18426 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18427
18428 * target.h (struct thread_resume): Delete leave_stopped member.
18429 (struct target_ops): Add a `n' argument to the `resume' callback.
18430 * server.c (start_inferior): Adjust.
18431 (handle_v_cont, myresume): Adjust.
18432 * linux-low.c (check_removed_breakpoint): Adjust to resume
18433 interface change, and to removed leave_stopped field.
18434 (resume_ptr): Delete.
18435 (struct thread_resume_array): New.
18436 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18437 resume interface change.
18438 (linux_continue_one_thread, linux_queue_one_thread)
18439 (resume_status_pending_p): Check if the resume field is NULL
18440 instead of checking the leave_stopped member.
18441 (linux_resume): Adjust to the target resume interface change.
18442 * spu-low.c (spu_resume): Adjust to the target resume interface
18443 change.
18444 * win32-low.c (win32_detach, win32_resume): Ditto.
18445
18446 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18447
18448 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18449 flag.
18450 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18451 pending.
18452 (linux_continue_one_thread): Only preserve the stepping flag if
18453 there's a pending breakpoint.
18454
18455 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18456
18457 * server.c (main): After the inferior having exited, call
18458 remote_close before exiting gdbserver.
18459
18460 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18461
18462 Fix size of FPSCR in Power 7 processors.
18463 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18464 (PPC_FEATURE_HAS_DFP): New #define.
18465 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18466 size of the FPSCR.
18467
18468 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18469
18470 * server.c (handle_query) Whitespace and formatting.
18471
18472 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18473
18474 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18475 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18476 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18477 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18478 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18479 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18480 Makefile.in, configure.ac: Fix whitespace throughout.
18481 * configure: Regenerate.
18482
18483 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18484
18485 * inferiors.c (find_inferior): Make it safe for the callback
18486 function to delete the currently iterated inferior.
18487
18488 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18489
18490 * Makefile.in (linuw_low_h): Move higher.
18491 (thread-db.o): Depend on $(linux_low_h).
18492
18493 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18494
18495 Rename "process" to "lwp" throughout.
18496
18497 * linux-low.c (all_processes): Rename to...
18498 (all_lwps): ... this.
18499 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18500 (add_process): Rename to ...
18501 (add_lwp): ... this. Adjust.
18502 (linux_create_inferior): Adjust.
18503 (linux_attach_lwp): Adjust.
18504 (linux_attach): Adjust.
18505 (linux_kill_one_process): Rename to ...
18506 (linux_kill_one_lwp): ... this. Adjust.
18507 (linux_kill): Adjust.
18508 (linux_detach_one_process): Rename to ...
18509 (linux_detach_one_lwp): ... this. Adjust.
18510 (linux_detach): Adjust.
18511 (check_removed_breakpoint): Adjust.
18512 (status_pending_p): Adjust.
18513 (linux_wait_for_process): Rename to ...
18514 (linux_wait_for_lwp): ... this. Adjust.
18515 (linux_wait_for_event): Adjust.
18516 (send_sigstop): Adjust.
18517 (wait_for_sigstop): Adjust.
18518 (stop_all_processes): Rename to ...
18519 (stop_all_lwps): ... this.
18520 (linux_resume_one_process): Rename to ...
18521 (linux_resume_one_lwp): ... this. Adjust.
18522 (linux_set_resume_request, linux_continue_one_thread)
18523 (linux_queue_one_thread, resume_status_pending_p)
18524 (usr_store_inferior_registers, regsets_store_inferior_registers)
18525 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18526 Adjust.
18527 * linux-low.h (get_process): Rename to ...
18528 (get_lwp): ... this. Adjust.
18529 (get_thread_process): Rename to ...
18530 (get_thread_lwp): ... this. Adjust.
18531 (get_process_thread): Rename to ...
18532 (get_lwp_thread): ... this. Adjust.
18533 (struct process_info): Rename to ...
18534 (struct lwp_info): ... this.
18535 (all_processes): Rename to ...
18536 (all_lwps): ... this.
18537 * proc-service.c (ps_lgetregs): Adjust.
18538 * thread-db.c (thread_db_create_event, find_one_thread)
18539 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18540
18541 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18542
18543 * server.c (handle_query): Handle "qAttached".
18544
18545 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18546
18547 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18548 GPLv3, update license URL.
18549
18550 2009-03-01 Doug Evans <dje@google.com>
18551
18552 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18553 (server_h): Add gdb_signals.h.
18554 (signals.o): Update.
18555 * server.h (target_signal_from_host,target_signal_to_host_p)
18556 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18557
18558 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18559
18560 * remote-utils.c (getpkt): Also generate remote-debug
18561 information if noack_mode is set.
18562
18563 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18564
18565 * server.c (handle_query): Report qXfer:siginfo:read and
18566 qXfer:siginfo:write as supported and handle them.
18567 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18568 * linux-low.c (linux_xfer_siginfo): New.
18569 (linux_target_ops): Set it.
18570
18571 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18572
18573 * server.c (gdbserver_usage): Mention --remote-debug.
18574 (main): Accept '--remote-debug' switch.
18575
18576 2009-01-18 Doug Evans <dje@google.com>
18577
18578 * regcache.c (new_register_cache): No need to check result of xcalloc.
18579 * server.c (handle_search_memory): Back out calls to xmalloc,
18580 result is checked and error is returned to user upon failure.
18581 (handle_query): Ditto. Add more checks for result of malloc.
18582 (handle_v_cont): Check result of malloc, report error back to
18583 user upon failure.
18584 (handle_v_run): Ditto. Call freeargv.
18585 * server.h (freeargv): Declare.
18586 * utils.c (freeargv): New fn.
18587
18588 2009-01-15 Doug Evans <dje@google.com>
18589
18590 * gdbreplay.c (perror_with_name): Make arg const char *.
18591 * server.h (target_signal_to_name): Make return type const char *.
18592 * thread-db.c (thread_db_err_str): Make return type const char *.
18593 * utils.c (perror_with_name): Make arg const char *.
18594
18595 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18596
18597 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18598 when handling a EXIT_PROCESS_DEBUG_EVENT.
18599
18600 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18601
18602 * gdbreplay.c (gdbreplay_version): Update copyright year.
18603 * server.c (gdbserver_version): Likewise.
18604
18605 2009-01-05 Doug Evans <dje@google.com>
18606
18607 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18608 (handle_extended_wait): Improve comment.
18609
18610 2008-12-13 Doug Evans <dje@google.com>
18611
18612 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18613 * server.h (ATTR_MALLOC): New macro.
18614 (xmalloc,xcalloc,xstrdup): Declare.
18615 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18616 * inferiors.c: Ditto.
18617 * linux-low.c: Ditto.
18618 * mem-break.c: Ditto.
18619 * regcache.c: Ditto.
18620 * remote-utils.c: Ditto.
18621 * server.c: Ditto.
18622 * target.c: Ditto.
18623 * win32-low.c: Ditto.
18624
18625 2008-12-12 Doug Evans <dje@google.com>
18626
18627 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18628 in debugging printf.
18629
18630 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18631
18632 2008-12-09 Doug Evans <dje@google.com>
18633
18634 * linux-low.h (struct process_info): Delete member tid, unused.
18635 * thread-db.c (find_one_thread): Update.
18636 (maybe_attach_thread): Update.
18637
18638 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18639
18640 * target.h (struct target_ops): Add qxfer_osdata member.
18641 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18642 and dirent.h.
18643 (linux_qxfer_osdata): New functions.
18644 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18645 callback.
18646 * server.c (handle_query): Handle "qXfer:osdata:read:".
18647 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18648 (buffer_xml_printf): New functions.
18649 * server.h (struct buffer): New.
18650 (buffer_grow_str, buffer_grow_str0): New macros.
18651 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18652 (buffer_xml_printf): Declare.
18653
18654 2008-11-24 Doug Evans <dje@google.com>
18655
18656 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18657
18658 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18659
18660 * server.c (handle_v_run): Always use the supplied argument list.
18661
18662 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18663
18664 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18665 (xtensa_regmap_table): Add entry for scompare1.
18666
18667 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18668
18669 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18670 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18671 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18672 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18673 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18674 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18675 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18676 XML target descriptions.
18677 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18678 when inferior is running on an ISA 2.05 or later processor. Add
18679 special case to return offset for full 64-bit slot of FPSCR when
18680 in 32-bits.
18681
18682 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18683
18684 * Makefile.in (SFILES, clean): Added sparc64 files.
18685 (reg-sparc64.o, reg-sparc64.c): New.
18686 * configure.srv (sparc*-*-linux*): New configuration.
18687 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18688 syscall arguments for SPARC.
18689 (regsets_store_inferior_registers): Likewise.
18690 * linux-sparc-low.c: New file.
18691
18692 2008-10-21 Doug Evans <dje@google.com>
18693
18694 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18695 (READLINE_DIR,READLINE_DEP): Delete.
18696 (INTERNAL_CFLAGS): Update.
18697 (LINTFLAGS): Update.
18698
18699 2008-10-10 Pedro Alves <pedro@codesourcery.com>
18700
18701 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18702 whole argv from the last run, not just argv[0].
18703
18704 2008-09-08 Pedro Alves <pedro@codesourcery.com>
18705
18706 * regcache.c (new_register_cache): Return NULL if the register
18707 cache size isn't known yet.
18708 (free_register_cache): Avoid dereferencing a NULL regcache.
18709
18710 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18711
18712 * configure.srv: Merge MIPS and MIPS64.
18713
18714 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18715
18716 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18717
18718 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
18719
18720 * Makefile.in: Add required vsx dependencies.
18721
18722 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18723 Declare init_registers_powerpc_vsx32l.
18724 Declare init_registers_powerpc_vsx64l.
18725 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18726 (ppc_arch_setup): Check for VSX in hwcap.
18727 (ppc_fill_vsxregset): New function.
18728 (ppc_store_vsxregset): New function.
18729 Add new VSX entry in regset_info target_regsets.
18730
18731 * configure.srv: Add new VSX dependencies.
18732
18733 2008-08-12 Pedro Alves <pedro@codesourcery.com>
18734
18735 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18736 (remote_open): Set or clear transport_is_reliable.
18737 (putpkt_binary): Don't expect acks in noack mode.
18738 (getpkt): Don't send ack/nac in noack mode.
18739 * server.c (handle_general_set): Handle QStartNoAckMode.
18740 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18741 qSupported.
18742 (main): Reset noack_mode on every connection.
18743 * server.h (noack_mode): Declare.
18744
18745 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18746
18747 * Makefile.in (GDBREPLAY_OBS): New variable.
18748 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18749
18750 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18751 Daniel Jacobowitz <dan@codesourcery.com>
18752
18753 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18754 (usr_store_inferior_registers): Likewise.
18755 (regsets_store_inferior_registers): Likewise.
18756
18757 2008-07-31 Rolf Jansen <rj@surtec.com>
18758 Pedro Alves <pedro@codesourcery.com>
18759
18760 * configure.ac: Check for memmem declaration.
18761 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18762 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18763 (disable_packet_qfThreadInfo): Unconditionally compile.
18764 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18765 * configure, config.in: Regenerate.
18766
18767 2008-07-28 Doug Kwan <dougkwan@google.com>
18768
18769 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18770 (linux_write_memory): Remove declaration of errno.
18771
18772 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18773
18774 * linux-low.c (handle_extended_wait): Do not use "status"
18775 variable uninitialized.
18776
18777 2008-07-07 Pedro Alves <pedro@codesourcery.com>
18778
18779 * server.c (handle_v_attach): Inhibit reporting dll changes.
18780
18781 2008-06-27 Pedro Alves <pedro@codesourcery.com>
18782
18783 * remote-utils.c (prepare_resume_reply): If requested, don't
18784 output "thread:TID" in the T stop reply.
18785
18786 * server.c (disable_packet_vCont, disable_packet_Tthread)
18787 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18788 (handle_query): If requested, disable support for qC, qfThreadInfo
18789 and qsThreadInfo.
18790 (handle_v_requests): If requested, disable support for vCont.
18791 (gdbserver_show_disableable): New.
18792 (main): Handle --disable-packet and --disable-packet=LIST.
18793
18794 * server.h (disable_packet_vCont, disable_packet_Tthread)
18795 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18796
18797 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18798
18799 * server.c (gdbserver_usage): Mention --version.
18800
18801 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18802
18803 * Makefile.in (gdbreplay.o): New rule.
18804
18805 2008-06-06 Joseph Myers <joseph@codesourcery.com>
18806
18807 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18808 message, not gdbserver.
18809
18810 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
18811 Nathan Sidwell <nathan@codesourcery.com>
18812 Joseph Myers <joseph@codesourcery.com>
18813
18814 * acinclude.m4: Include ../../config/acx.m4.
18815 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18816 * configure, config.in: Regenerate.
18817 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18818 * server.c (gdbserver_version): Print PKGVERSION.
18819 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18820 (main): Adjust gdbserver_usage calls.
18821 * gdbreplay.c (version, host_name): Add declarations.
18822 (gdbreplay_version, gdbreplay_usage): New.
18823 (main): Accept --version and --help options.
18824
18825 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18826
18827 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18828 (arm_breakpoint_at): Handle Thumb.
18829 (the_low_target): Add comment.
18830
18831 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18832
18833 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18834
18835 2008-05-09 Doug Evans <dje@google.com>
18836
18837 * server.h (decode_search_memory_packet): Declare.
18838 * remote-utils.c (decode_search_memory_packet): New fn.
18839 * server.c (handle_search_memory_1): New fn.
18840 (handle_search_memory): New fn.
18841 (handle_query): Process qSearch:memory packets.
18842
18843 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18844
18845 * regcache.c (registers_length): Remove.
18846 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18847 full register packet.
18848 * regcache.h (registers_length): Remove prototype.
18849 * server.h (PBUFSIZ): Define to 16384.
18850
18851 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18852
18853 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18854 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18855 powerpc-64l.o, and powerpc-altivec64l.o.
18856 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18857 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18858 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18859 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18860 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18861 to srv_xmlfiles.
18862
18863 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18864 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18865 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18866 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18867 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18868 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18869 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18870 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18871 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18872 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18873 (clean): Update.
18874
18875 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18876 (init_registers_powerpc_32l): ... this new prototype.
18877 (init_registers_powerpc_32): Remove, replace by ...
18878 (init_registers_powerpc_altivec32l): ... this new prototype.
18879 (init_registers_powerpc_e500): Remove, replace by ...
18880 (init_registers_powerpc_e500l): ... this new prototype.
18881 (init_registers_ppc64): Remove, replace by ...
18882 (init_registers_powerpc_64l): ... this new prototype.
18883 (init_registers_powerpc_64): Remove, replace by ...
18884 (init_registers_powerpc_altivec64l): ... this new prototype.
18885 (ppc_num_regs): Set to 73.
18886 (PT_ORIG_R3, PT_TRAP): Define if necessary.
18887 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
18888 (ppc_cannot_store_register): Handle orig_r3 and trap.
18889 (ppc_arch_setup): Update init_registers_... calls.
18890 (ppc_fill_gregset): Handle orig_r3 and trap.
18891
18892 * inferiors.c (clear_inferiors): Reset current_inferior.
18893
18894 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
18895
18896 * acinclude.m4: Add override.m4.
18897 * configure: Regenerate.
18898
18899 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18900
18901 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
18902 initial call to init_register_ppc64.
18903
18904 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18905
18906 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
18907 single powerpc*-*-linux* case.
18908 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
18909
18910 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
18911
18912 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
18913 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
18914 from reg_xmlfiles.
18915 * linux-ppc-low.c: Include <elf.h>.
18916 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
18917 (ppc_hwcap): New global variable.
18918 (ppc_regmap): Remove __SPE__ #ifdef sections.
18919 (ppc_regmap_e500): New global variable.
18920 (ppc_cannot_store_register): Update __SPE__ special case.
18921 (ppc_get_hwcap): New function.
18922 (ppc_arch_setup): Use it to determine whether inferior supports
18923 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
18924 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
18925 Do not access registers if target does not support AltiVec.
18926 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18927 Do not access registers if target does not support SPE.
18928 (target_regsets): Unconditionally include AltiVec and SPE regsets.
18929
18930 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
18931
18932 * linux-low.c (disabled_regsets, num_regsets): New.
18933 (use_regsets_p): Delete.
18934 (linux_wait_for_process): Clear disabled_regsets.
18935 (regsets_fetch_inferior_registers): Check and set it.
18936 (regsets_store_inferior_registers): Likewise.
18937 (linux_fetch_registers, linux_store_registers): Do not use
18938 use_regsets_p.
18939 (initialize_low): Allocate disabled_regsets.
18940
18941 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
18942
18943 * Makefile.in (LIBOBJS): New.
18944 (OBS): Use LIBOBJS.
18945 (memmem.o): New rule.
18946 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
18947 * configure: Regenerated.
18948
18949 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
18950
18951 * server.c (handle_query): Never return "unsupported" for
18952 qXfer:features:read queries.
18953
18954 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
18955
18956 * server.c (get_features_xml): Fix inverted condition.
18957 (handle_query): Always support qXfer:feature:read.
18958
18959 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
18960
18961 * server.c (wrapper_argv): New.
18962 (start_inferior): Handle wrapper_argv. If set, expect an extra
18963 trap.
18964 (gdbserver_usage): Document --wrapper.
18965 (main): Parse --wrapper.
18966
18967 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18968
18969 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
18970 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
18971 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
18972 (ppc_set_pc): Likewise.
18973 (ppc_arch_setup): New function.
18974 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
18975 of collect_register.
18976 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
18977
18978 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18979
18980 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
18981 instead of linux-ppc64-low.o.
18982 * linux-ppc64-low.c: Remove file.
18983 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
18984 (linux-ppc64-low.o): Remove rule.
18985
18986 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
18987 (init_registers_powerpc_64): Likewise.
18988 (ppc_regmap): Conditionally define depending on __powerpc64__.
18989 (ppc_cannot_store_register): Do not special-case "fpscr" when
18990 compiled on __powerpc64__.
18991 (ppc_collect_ptrace_register): New function.
18992 (ppc_supply_ptrace_register): New function.
18993 (ppc_breakpoint): Change type to "unsigned int".
18994 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
18995 (the_low_target): Conditionally provide initializers for the
18996 arch_setup member depending on __powerpc64__. Install
18997 collect_ptrace_register and supply_ptrace_register members.
18998
18999 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19000
19001 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19002 * server.c (gdbserver_xmltarget): Define.
19003 (get_features_xml): Use it to replace "target.xml" and arch_string.
19004
19005 * configure.srv: Remove srv_xmltarget. Add XML files that were
19006 mentioned there to srv_xmlfiles instead. Remove conditional tests
19007 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19008 srv_xmlfiles and srv_regobj to include all possible choices.
19009 * configure.ac (srv_xmltarget): Remove.
19010 (srv_xmlfiles): Do not add "target.xml".
19011 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19012 checks for supplementary target information.
19013 * configure: Regenerate.
19014 * Makefile.in (XML_TARGET): Remove.
19015 (target.xml): Remove rule.
19016 (clean): Do not clean up target.xml.
19017 (.PRECIOUS): Do not mention target.xml.
19018
19019 * target.h (struct target_ops): Remove arch_string member.
19020 * linux-low.c (linux_arch_string): Remove.
19021 (linux_target_ops): Remove arch_string initializer.
19022 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19023 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19024 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19025 * spu-low.c (spu_arch_string): Remove.
19026 (spu_target_ops): Remove arch_string initializer.
19027 * win32-low.c (win32_arch_string): Remove.
19028 (win32_target_ops): Remove arch_string initializer.
19029 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19030 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19031 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19032
19033 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19034
19035 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19036 by collect_ptrace_register and supply_ptrace_register hooks.
19037 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19038 instead of checking for the_low_target.left_pad_xfer.
19039 (usr_store_inferior_registers): Use collect_ptrace_register callback
19040 instead of checking for the_low_target.left_pad_xfer.
19041
19042 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19043 (s390_supply_ptrace_register): Likewise.
19044 (s390_fill_gregset): Call s390_collect_ptrace_register.
19045 (the_low_target): Update.
19046
19047 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19048 (ppc_supply_ptrace_register): Likewise.
19049 (the_low_target): Update.
19050
19051 * linux-i386-low.c (the_low_target): Update.
19052 * linux-x86-64-low.c (the_low_target): Update.
19053
19054 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19055
19056 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19057 reg-s390.o and reg-s390x.o.
19058
19059 * linux-low.c (new_inferior): New global variable.
19060 (linux_create_inferior, linux_attach): Set it.
19061 (linux_wait_for_process): Call the_low_target.arch_setup after the
19062 target has stopped for the first time.
19063 (initialize_low): Do not call the_low_target.arch_setup.
19064
19065 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19066 (s390_set_pc): Likewise.
19067 (s390_arch_setup): New function.
19068 (the_low_target): Use s390_arch_setup as arch_setup routine.
19069
19070 * regcache.c (realloc_register_cache): New function.
19071 (set_register_cache): Call it for each existing regcache.
19072
19073 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19074
19075 * server.h (init_registers): Remove prototype.
19076
19077 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19078 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19079 instead of init_registers ().
19080 * linux-arm-low.c (init_registers_arm): Add prototype.
19081 (init_registers_arm_with_iwmmxt): Likewise.
19082 (the_low_target): Add initializer for arch_setup field.
19083 * linux-cris-low.c (init_registers_cris): Add prototype.
19084 (the_low_target): Add initializer for arch_setup field.
19085 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19086 (the_low_target): Add initializer for arch_setup field.
19087 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19088 (the_low_target): Add initializer for arch_setup field.
19089 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19090 (the_low_target): Add initializer for arch_setup field.
19091 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19092 (the_low_target): Add initializer for arch_setup field.
19093 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19094 (the_low_target): Add initializer for arch_setup field.
19095 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19096 (init_registers_mips64_linux): Likewise.
19097 (the_low_target): Add initializer for arch_setup field.
19098 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19099 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19100 (the_low_target): Add initializer for arch_setup field.
19101 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19102 (init_registers_powerpc_64): Likewise.
19103 (the_low_target): Add initializer for arch_setup field.
19104 * linux-s390-low.c (init_registers_s390): Add prototype.
19105 (init_registers_s390x): Likewise.
19106 (the_low_target): Add initializer for arch_setup field.
19107 * linux-sh-low.c (init_registers_sh): Add prototype.
19108 (the_low_target): Add initializer for arch_setup field.
19109 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19110 (the_low_target): Add initializer for arch_setup field.
19111 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19112 (the_low_target): Add initializer for arch_setup field.
19113
19114 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19115 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19116 instead of init_registers ().
19117 * win32-arm-low.c (init_registers_arm): Add prototype.
19118 (the_low_target): Add initializer for arch_setup field.
19119 * win32-i386-low.c (init_registers_i386): Add prototype.
19120 (the_low_target): Add initializer for arch_setup field.
19121
19122 * spu-low.c (init_registers_spu): Add prototype.
19123 (initialize_low): Call initialie_registers_spu () instead of
19124 initialize_registers ().
19125
19126 2008-02-19 Pedro Alves <pedro@codesourcery.com>
19127
19128 * server.c (handle_v_requests): When handling the vRun and vAttach
19129 packets, if already debugging a process, don't kill it. Return an
19130 error instead.
19131
19132 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
19133
19134 * server.c (handle_query): Correct length check.
19135
19136 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
19137
19138 * win32-low.c (do_initial_child_stuff): Add process handle
19139 parameter. Set current_process_handle and current_process_id from the
19140 parameters. Clear globals.
19141 (win32_create_inferior): Don't set current_process_handle and
19142 current_process_id here. Instead pass them on the call to
19143 do_initial_child_stuff.
19144 (win32_attach): Likewise.
19145 (win32_clear_inferiors): New.
19146 (win32_kill): Don't close the current process handle or the
19147 current thread handle here. Instead call win32_clear_inferiors.
19148 (win32_detach): Don't open a new handle to the process. Call
19149 win32_clear_inferiors.
19150 (win32_join): Don't rely on current_process_handle; open a new
19151 handle using the process id.
19152 (win32_wait): Call win32_clear_inferiors when the inferior process
19153 has exited.
19154
19155 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
19156
19157 * server.c (monitor_show_help): Add "exit".
19158
19159 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
19160
19161 * Makefile.in (SFILES): Add linux-xtensa-low.c.
19162 (clean): Add reg-xtensa.c.
19163 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
19164 * configure.srv (xtensa*-*-linux*) New target.
19165 * linux-xtensa-low.c: New.
19166 * xtensa-xtregs.c: New.
19167
19168 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
19169
19170 * hostio.c: Don't include errno.h.
19171 (errno_to_fileio_errno): Move to hostio-errno.
19172 * hostio.c: (hostio_error): Remove the error parameter. Defer the
19173 error number outputting to the target->hostio_last_error callback.
19174 (hostio_packet_error): Use FILEIO_EINVAL directly.
19175 (handle_open, handle_pread, hostio_error, handle_unlink): Update
19176 calls to hostio_error.
19177 * hostio-errno.c: New.
19178 * server.h (hostio_last_error_from_errno): Declare.
19179 * target.h (target_ops): Add hostio_last_error member.
19180 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
19181 as hostio_last_error handler.
19182 * spu-low.c (spu_target_ops): Likewise.
19183 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
19184 (wince_hostio_last_error): New functions.
19185 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
19186 as hostio_last_error handler.
19187 (win32_target_ops) [!_WIN32_WCE]: Register
19188 hostio_last_error_from_errno as hostio_last_error handler.
19189 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
19190 (hostio-errno.o): New rule.
19191 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
19192 * configure.srv (srv_hostio_err_objs): New variable. Default to
19193 hostio-errno.o.
19194 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
19195 * configure: Regenerate.
19196
19197 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19198
19199 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
19200 (linux_kill, linux_detach): Clean up the process list.
19201 * remote-utils.c (remote_open): Improve port number parsing.
19202 (putpkt_binary, input_interrupt): Only send interrupts if the target
19203 is running.
19204 * server.c (extended_protocol): Make static.
19205 (attached): Define earlier.
19206 (exit_requested, response_needed, program_argv): New variables.
19207 (target_running): New.
19208 (start_inferior): Clear attached here.
19209 (attach_inferior): Set attached here.
19210 (require_running): Define.
19211 (handle_query): Use require_running and target_running. Implement
19212 "monitor exit".
19213 (handle_v_attach, handle_v_run): New.
19214 (handle_v_requests): Use require_running. Handle vAttach and vRun.
19215 (gdbserver_usage): Update.
19216 (main): Redo argument parsing. Handle --debug and --multi. Handle
19217 --attach along with other options or after the port. Save
19218 program_argv. Support no initial program. Resynchronize
19219 communication with GDB after an error. Handle "monitor exit".
19220 Use require_running and target_running. Always allow the extended
19221 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
19222 restart in extended mode.
19223 * README: Refer to the GDB manual. Update --attach usage.
19224
19225 2007-12-20 Andreas Schwab <schwab@suse.de>
19226
19227 * linux-low.c (STACK_SIZE): Define.
19228 (linux_tracefork_child): Use it. Use __clone2 on ia64.
19229 (linux_test_for_tracefork): Likewise.
19230
19231 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
19232
19233 * linux-low.c (linux_wait_for_event): Update messages. Do not
19234 reinsert auto-delete breakpoints.
19235 * mem-break.c (struct breakpoint): Change return type of handler to
19236 int.
19237 (set_breakpoint_at): Update handler type.
19238 (reinsert_breakpoint_handler): Return 1 instead of calling
19239 delete_breakpoint.
19240 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
19241 setting a new one.
19242 (check_breakpoints): Delete auto-delete breakpoints and return 2.
19243 * mem-break.h (set_breakpoint_at): Update handler type.
19244 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
19245 * win32-low.c (auto_delete_breakpoint): New.
19246 (get_child_debug_event): Use it.
19247
19248 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
19249
19250 * configure.ac: Check for pread and pwrite.
19251 * hostio.c (handle_pread): Fall back to lseek and read.
19252 (handle_pwrite): Fall back to lseek and write.
19253 * config.in, configure: Regenerated.
19254
19255 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
19256
19257 * server.c (myresume): Add own_buf argument.
19258 (main): Update calls.
19259
19260 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
19261
19262 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
19263 * remote-utils.c (remote_open): Do not call disable_async_io.
19264 (block_async_io): Delete.
19265 (unblock_async_io): Make static.
19266 (initialize_async_io): New.
19267 * server.c (handle_v_cont): Handle async I/O here.
19268 (myresume): Likewise. Move other common resume tasks here...
19269 (main): ... from here. Call initialize_async_io. Disable async
19270 I/O before the main loop.
19271 * server.h (initialize_async_io): Declare.
19272 (block_async_io, unblock_async_io): Delete prototypes.
19273 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
19274
19275 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
19276
19277 * remote-utils.c (readchar): Allow binary data in received messages.
19278
19279 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19280
19281 * win32-low.c (attaching): New global.
19282 (win32_create_inferior): Clear the `attaching' global.
19283 (win32_attach): Set the `attaching' global.
19284 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
19285 attaching. Only set a breakpoint at the entry point if not
19286 attaching.
19287
19288 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19289
19290 * server.c (main): Don't report dll events on the initial
19291 connection on attaches.
19292
19293 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19294
19295 * server.c (main): Relax numerical bases supported for the pid of
19296 the --attach command line argument.
19297
19298 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19299
19300 * win32-low.c (win32_attach): Call OpenProcess before
19301 DebugActiveProcess, not after. Add last error output to error
19302 call.
19303
19304 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
19305
19306 * win32-low.c (win32_get_thread_context)
19307 (win32_set_thread_context): New functions.
19308 (thread_rec): Use win32_get_thread_context.
19309 (continue_one_thread, win32_resume): Use win32_set_thread_context.
19310 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
19311 field.
19312
19313 2007-12-03 Leo Zayas
19314 Pedro Alves <pedro_alves@portugalmail.pt>
19315
19316 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
19317 global variables.
19318 (child_add_thread): Minor cleanup.
19319 (child_continue): Resume artificially suspended threads before
19320 calling ContinueDebugEvent.
19321 (suspend_one_thread): New.
19322 (fake_breakpoint_event): New.
19323 (get_child_debug_event): Change return type to int. Check here if
19324 gdb sent an interrupt request. If a soft interrupt was requested,
19325 fake a breakpoint event. Return 0 if there is no event to handle,
19326 and 1 otherwise.
19327 (win32_wait): Don't check here if gdb sent an interrupt request.
19328 Ensure there is a valid event to handle.
19329 (win32_request_interrupt): Add soft interruption method as last
19330 resort.
19331
19332 2007-12-03 Leo Zayas
19333 Pedro Alves <pedro_alves@portugalmail.pt>
19334
19335 * win32-low.h (win32_thread_info): Add descriptions to the
19336 structure members. Replace `suspend_count' counter by a
19337 `suspended' flag.
19338 * win32-low.c (thread_rec): Update condition of when to get the
19339 context from the inferior. Rely on ContextFlags being set if it
19340 has already been retrieved. Only suspend the inferior thread if
19341 we haven't already. Warn if that fails.
19342 (continue_one_thread): s/suspend_count/suspended/. Only call
19343 ResumeThread once. Warn if that fails.
19344
19345 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19346
19347 * win32-low.c (win32_wait): Don't read from the inferior when it
19348 has already exited.
19349
19350 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19351
19352 * Makefile.in (win32_low_h): New variable.
19353 (win32-low.o): Add dependency on $(win32_low_h).
19354 (win32-arm-low.o, win32-i386-low.o): New rules.
19355
19356 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19357
19358 * hostio.c: Correct copyright year.
19359
19360 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19361
19362 * Makefile.in (OBS): Add hostio.o.
19363 (hostio.o): New rule.
19364 * server.h (handle_vFile): Declare.
19365 * hostio.c: New file.
19366 * server.c (handle_v_requests): Take packet_len and new_packet_len
19367 for binary packets. Call handle_vFile.
19368 (main): Update call to handle_v_requests.
19369
19370 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19371
19372 * linux-low.c: Include <sched.h>.
19373
19374 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19375
19376 * linux-low.c (linux_tracefork_grandchild): New.
19377 (linux_tracefork_child): Use clone.
19378 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19379
19380 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19381
19382 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19383
19384 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19385
19386 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19387
19388 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19389
19390 * inferiors.c (change_inferior_id): Delete.
19391 (add_pid_to_list, pull_pid_from_list): New.
19392 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19393 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19394 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19395 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19396 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19397 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19398 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19399 (using_threads): Always set to 1.
19400 (handle_extended_wait): New.
19401 (add_process): Do not set TID.
19402 (linux_create_inferior): Set must_set_ptrace_flags.
19403 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19404 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19405 (linux_thread_alive): Rename TID argument to LWPID.
19406 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19407 (linux_wait_for_event): Do not use TID or check using_threads. Update
19408 call to dead_thread_notify. Call handle_extended_wait.
19409 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19410 (send_sigstop): Delete sigstop_sent.
19411 (wait_for_sigstop): Avoid TID.
19412 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19413 (linux_test_for_tracefork): New.
19414 (linux_lookup_signals): Use thread_db_active and
19415 linux_supports_tracefork_flag.
19416 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19417 * linux-low.h (get_process_thread): Avoid TID.
19418 (struct process_ifo): Move thread_known and tid to the end. Remove
19419 sigstop_sent.
19420 (linux_attach_lwp, thread_db_init): Update prototypes.
19421 * server.h (change_inferior_id): Delete prototype.
19422 (add_pid_to_list, pull_pid_from_list): New prototypes.
19423 * thread-db.c (thread_db_use_events): New.
19424 (find_first_thread): Rename to...
19425 (find_one_thread): ...this. Update callers and messages. Do not
19426 call fatal. Check thread_db_use_events. Do not call
19427 change_inferior_id or new_thread_notify.
19428 (maybe_attach_thread): Update. Do not call new_thread_notify.
19429 (thread_db_init): Set thread_db_use_events. Check use_events.
19430 * utils.c (fatal, warning): Correct message prefix.
19431
19432 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19433
19434 * Makefile.in (clean): Remove new files.
19435 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19436 (powerpc-64.o, powerpc-64.c): New rules.
19437 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19438 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19439 with SPE.
19440 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19441 SPE targets.
19442 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19443 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19444 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19445 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19446 (target_regsets): Add AltiVec and SPE register sets.
19447 * configure.ac: Check for AltiVec and SPE.
19448 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19449 (ppc_fill_vrregset, ppc_store_vrregset): New.
19450 (target_regsets): Add AltiVec register set.
19451 * configure: Regenerated.
19452
19453 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19454
19455 * linux-low.c (O_LARGEFILE): Define.
19456 (linux_read_memory): Use /proc/PID/mem.
19457 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19458 * configure, config.in: Regenerated.
19459
19460 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19461
19462 * linux-low.c (linux_wait_for_event): Do not pass signals while
19463 single-stepping.
19464
19465 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19466
19467 * win32-low.c (create_process): New.
19468 (win32_create_inferior): Use create_process instead of
19469 CreateProcess. If create_process failed retry appending an ".exe"
19470 suffix. Store the GetLastError result immediatelly after
19471 create_process calls and use it on the call to error.
19472
19473 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19474
19475 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19476
19477 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19478
19479 * configure.ac: Switch license to GPLv3.
19480
19481 2007-08-01 Michael Snyder <msnyder@access-company.com>
19482
19483 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19484
19485 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19486
19487 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19488 typedef.
19489 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19490 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19491 CloseToolhelp32Snapshot.
19492 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19493 CloseToolhelp32Snapshot.
19494
19495 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19496
19497 * server.c (main): Check for inferior exit before main loop.
19498
19499 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19500
19501 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19502 instead of on tmp_desc.
19503
19504 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19505 Daniel Jacobowitz <dan@codesourcery.com>
19506
19507 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19508 (add_thread): Minor cleanups.
19509 (clear_inferiors): Move lower in the file. Clear the DLL
19510 list.
19511 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19512 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19513 (xml_escape_text): New.
19514 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19515 for qSupported.
19516 (handle_v_cont): Report errors.
19517 (gdbserver_version): Update.
19518 (main): Correct size of own_buf. Do not report initial DLL events.
19519 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19520 (unloaded_dll, xml_escape_text): New.
19521 * win32-low.c (enum target_waitkind): Update comments.
19522 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19523 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19524 (win32_EnumProcessModules, win32_GetModuleInformation)
19525 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19526 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19527 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19528 (win32_Module32First, win32_Module32Next, load_toolhelp)
19529 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19530 (get_child_debug_event): Handle DLL events.
19531 (win32_wait): Likewise.
19532
19533 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19534
19535 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19536 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19537
19538 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19539
19540 * win32-low.c (handle_output_debug_string): Ignore event if not
19541 waiting.
19542
19543 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19544
19545 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19546
19547 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19548
19549 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19550
19551 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19552
19553 * inferiors.c (change_inferior_id): Add comment.
19554 * linux-low.c (check_removed_breakpoint): Add an early
19555 prototype. Improve debug output.
19556 (linux_attach): Doc update.
19557 (linux_detach_one_process, linux_detach): Clean up before releasing
19558 each process.
19559 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19560 * linux-low.h (struct process_info): Doc improvement.
19561 * mem-break.c (delete_all_breakpoints): New.
19562 * mem-break.h (delete_all_breakpoints): New prototype.
19563 * thread-db.c (find_first_thread): New.
19564 (thread_db_create_event): Call it instead of
19565 thread_db_find_new_threads. Clean up unused variables.
19566 (maybe_attach_thread): Remove first thread handling.
19567 (thread_db_find_new_threads): Use find_first_thread.
19568 (thread_db_get_tls_address): Likewise.
19569
19570 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19571
19572 * thread-db.c (thread_db_find_new_threads): Add prototype.
19573 (thread_db_create_event): Check for the main thread before adding
19574 a new thread.
19575 (maybe_attach_thread): Only enable event reporting if TID == 0.
19576 (thread_db_get_tls_address): Check for new threads.
19577
19578 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19579
19580 * linux-low.c (linux_create_inferior): Try execv before execvp.
19581 * spu-low.c (spu_create_inferior): Likewise.
19582
19583 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19584
19585 * linux-low.c (linux_create_inferior): Change execv to execvp.
19586 * spu-low.c (spu_create_inferior): Likewies.
19587
19588 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19589
19590 * Makefile.in (clean): Clean new files instead of deleted ones.
19591 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19592 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19593 rules.
19594 * configure.srv: Specify XML files and new regformats for MIPS and
19595 MIPS64 GNU/Linux.
19596 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19597 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19598 an entry for the restart register.
19599 (mips_cannot_fetch_register, mips_cannot_store_register)
19600 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19601 register names to match the XML descriptions.
19602 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19603 restart register instead of $0.
19604
19605 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19606 Markus Deuling <deuling@de.ibm.com>
19607
19608 * remote-utils.c (decode_xfer_write): New function.
19609 * server.h (decode_xfer_write): Add prototype.
19610 * server.c (handle_query): Add PACKET_LEN argument. Support
19611 qXfer:spu:read and qXfer:spu:write packets.
19612 (main): Pass packet_len to handle_query.
19613 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19614 * target.h (target_ops): Add qxfer_spu.
19615
19616 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19617
19618 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19619 accessing non-seekable spufs files.
19620
19621 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19622
19623 * server.c (handle_query): Add reply for qC packet.
19624
19625 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19626 Leo Zayas <lerele@champenstudios@com>
19627
19628 * server.h (check_remote_input_interrupt_request): New function.
19629 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19630 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19631 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19632 (check_remote_input_interrupt_request): New function.
19633 * server.h (check_remote_input_interrupt_request): Declare.
19634 * win32-low.c (winapi_DebugBreakProcess,
19635 winapi_GenerateConsoleCtrlEvent): New typedefs.
19636 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19637 to 250 ms.
19638 (win32_wait): Check for remote interrupt request
19639 with check_remote_input_interrupt_request.
19640 (win32_request_interrupt): New function.
19641 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19642
19643 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19644
19645 * win32-low.c (debug_registers_changed,
19646 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19647 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19648 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19649 (thread_rec): Get context using the low target.
19650 (child_add_thread): Call thread_added on the low target,
19651 which does the same thing.
19652 (regptr): Delete.
19653 (do_initial_child_stuff): Remove debug registers references.
19654 Set context using the low target. Resume threads after
19655 setting the contexts.
19656 (child_continue): Remove dead variable. Remove debug
19657 registers references.
19658 (child_fetch_inferior_registers): Go through the low target.
19659 (do_child_store_inferior_registers): Remove.
19660 (child_store_inferior_registers): Go through the low target.
19661 (win32_resume): Remove debug registers references.
19662 Set context using the low target.
19663 (handle_exception): Change return type to void. Don't record
19664 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19665 first chance exception.
19666 (get_child_debug_event): Change return type to void. Remove
19667 goto loop. Always return after waiting for debug event.
19668 (win32_wait): Convert to switch statement. Handle spurious
19669 events.
19670
19671 * win32-i386-low.c (debug_registers_changed,
19672 debug_registers_used): New.
19673 (initial_stuff): Rename to ...
19674 (i386_initial_stuff): ... this. Clear debug registers
19675 state variables.
19676 (store_debug_registers): Delete.
19677 (i386_get_thread_context): New.
19678 (load_debug_registers): Delete.
19679 (i386_set_thread_context): New.
19680 (i386_thread_added): New.
19681 (single_step): Rename to ...
19682 (i386_single_step): ... this.
19683 (do_fetch_inferior_registers): Rename to ...
19684 (i386_fetch_inferior_register): ... this.
19685 (i386_store_inferior_register): New.
19686 (the_low_target): Adapt to new interface.
19687
19688 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19689 (arm_get_thread_context): New.
19690 (arm_set_thread_context): New.
19691 (regptr): New.
19692 (do_fetch_inferior_registers): Rename to ...
19693 (arm_fetch_inferior_register): ... this.
19694 (arm_store_inferior_register): New.
19695 (arm_wince_breakpoint): Reimplement as unsigned long.
19696 (arm_wince_breakpoint_len): Define.
19697 (the_low_target): Adapt to new interface.
19698
19699 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19700 load_debug_registers. Add get_thread_context, set_thread_context,
19701 thread_added and store_inferior_register. Rename
19702 fetch_inferior_registers to fetch_inferior_register.
19703 (regptr): Remove declaration.
19704
19705 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19706
19707 * linux-low.c (linux_detach): Change return type to int. Return 0.
19708 * spu-low.c (spu_detach): Likewise.
19709
19710 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19711
19712 * target.h (target_ops): Change return type of detach to int.
19713 Add join.
19714 (join_inferior): New.
19715 * server.c (main): Don't skip detach support on mingw32.
19716 If the inferior doesn't support detaching return error.
19717 Call join_inferior instead of using waitpid.
19718 * linux-low.c (linux_join): New.
19719 (linux_target_op): Add linux_join.
19720 * spu-low.c (spu_join): New.
19721 (spu_target_ops): Add spu_join.
19722 * win32-low.c (win32_detach): Adapt to new interface.
19723 Reopen current_process_handle before detaching. Issue a child
19724 resume before detaching.
19725 (win32_join): New.
19726 (win32_target_op): Add win32_join.
19727
19728 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19729
19730 * win32-low.c (win32-attach): Fix return value.
19731 * target.h (target_ops): Describe ATTACH return values.
19732
19733 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19734
19735 * win32-low.c (GETPROCADDRESS): Define.
19736 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19737 (winapi_DebugSetProcessKillOnExit): Likewise.
19738 (win32_create_inferior): Force usage of ansi CreateProcessA.
19739 (win32_attach): Use GETPROCADDRESS.
19740 (win32_detach): Likewise.
19741
19742 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19743
19744 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19745
19746 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19747
19748 * win32-low.c: Commit leftover changes from 2007-03-29.
19749
19750 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19751
19752 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19753 fields short instead of int. Add explicit padding.
19754 (i387_cache_to_fsave): Remove unnecessary casts.
19755 (i387_fsave_to_cache): Doc fix.
19756 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19757
19758 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19759
19760 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19761 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19762
19763 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19764
19765 * configure.srv (arm*-*-mingw32ce*): Move near the other
19766 arm targets.
19767
19768 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19769
19770 * configure.ac: Add errno checking.
19771 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19772 sys/file.h and malloc.h.
19773 (AC_CHECK_DECLS): Add perror.
19774 (srv_mingwce): Handle.
19775 * configure.srv (i[34567]86-*-cygwin*): Add
19776 win32-i386-low.o to srv_tgtobj.
19777 (i[34567]86-*-mingw*): Likewise.
19778 (arm*-*-mingw32ce*): Add case.
19779 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19780 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19781 [__MINGW32CE__] (strerror): New function.
19782 [__MINGW32CE__] (errno): Define to GetLastError.
19783 [__MINGW32CE__] (COUNTOF): New macro.
19784 (remote_open): Remove extra close call.
19785 * mem-break.c (delete_breakpoint_at): New function.
19786 * mem-break.h (delete_breakpoint_at): Declare.
19787 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19788 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19789 [USE_WIN32API] (read, write): Add char* casts.
19790 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19791 * server.h: Include wincecompat.h on Windows CE.
19792 [HAVE_ERRNO_H]: Check.
19793 (perror): Declare if not declared.
19794 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19795 (perror_with_name): Remove errno declaration.
19796 * wincecompat.h: New.
19797 * wincecompat.c: New.
19798 * win32-low.h: New.
19799 * win32-arm-low.c: New.
19800 * win32-i386-low.c: New.
19801 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19802 (OUTMSG2): Make it safe.
19803 (_T): New macro.
19804 (COUNTOF): New macro.
19805 (NUM_REGS): Get it from the low target.
19806 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19807 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19808 (thread_rec): Let low target handle debug registers.
19809 (child_add_thread): Likewise.
19810 (child_init_thread_list): Likewise.
19811 (continue_one_thread): Likewise.
19812 (regptr): New.
19813 (do_child_fetch_inferior_registers): Move to ...
19814 * win32-i386-low.c: ... here, and rename to ...
19815 (do_fetch_inferior_registers): ... this.
19816 * win32-low.c (child_fetch_inferior_registers):
19817 Go through the low target.
19818 (do_child_store_inferior_registers): Use regptr.
19819 (strwinerror): New function.
19820 (win32_create_inferior): Handle Windows CE.
19821 Use strwinerror instead of strerror on Windows error
19822 codes. Add program to the error output.
19823 Don't close the main thread handle on Windows CE.
19824 (win32_attach): Use coredll.dll on Windows CE.
19825 (win32_kill): Close current process and current
19826 thread handles.
19827 (win32_detach): Use coredll.dll on Windows CE.
19828 (win32_resume): Let low target handle debug registers, and
19829 step request.
19830 (handle_exception): Add/Remove initial breakpoint. Avoid
19831 non-existant WSTOPSIG on Windows CE.
19832 (win32_read_inferior_memory): Cast to remove warning.
19833 (win32_arch_string): Go through the low target.
19834 (initialize_low): Call set_breakpoint_data with the low
19835 target's breakpoint.
19836 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19837 FOP_REGNUM, mappings): Move to ...
19838 * win32-i386-low.c: ... here.
19839 * win32-low.c (win32_thread_info): Move to ...
19840 * win32-low.h: ... here.
19841 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19842 win32-arm-low.c and wincecompat.c.
19843 (all:): Add $EXEEXT.
19844 (install-only:): Likewise.
19845 (gdbserver:): Likewise.
19846 (gdbreplay:): Likewise.
19847 * config.in: Regenerate.
19848 * configure: Regenerate.
19849
19850 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19851
19852 * win32-low.c: Rename typedef thread_info to
19853 win32_thread_info throughout.
19854
19855 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19856
19857 * win32-i386-low.c: Rename to ...
19858 * win32-low.c: ... this.
19859 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19860 * Makefile.in: Likewise.
19861
19862 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19863
19864 * remote-utils.c (monitor_output): Constify msg parameter.
19865 * server.h (monitor_output): Likewise.
19866 * win32-i386-low.c (handle_output_debug_string): New.
19867 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19868 handle_output_debug_string.
19869 (get_child_debug_event): Likewise.
19870
19871 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19872
19873 * server.c (main): Correct strtoul check.
19874
19875 2007-03-27 Jon Ringle <jon@ringle.org>
19876
19877 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19878
19879 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19880
19881 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
19882
19883 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
19884
19885 * terminal.h: Check HAVE_SGTTY_H.
19886
19887 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
19888
19889 * remote-utils.c (remote_open): Print out the assigned port number.
19890
19891 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
19892
19893 * remote-utils.c (monitor_output): New function.
19894 * server.c (debug_threads): Define here.
19895 (monitor_show_help): New function.
19896 (handle_query): Handle qRcmd.
19897 (main): Do not handle 'd' packet.
19898 * server.h (debug_threads, remote_debug, monitor_output): Declare.
19899 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
19900 of debug_threads.
19901
19902 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19903
19904 * Makefile.in (EXEEXT): New.
19905 (clean): Use $(EXEEXT).
19906
19907 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19908
19909 * target.h (target_ops): Rename send_signal to request_interrupt,
19910 and remove enum target_signal parameter.
19911 * linux-low.c (linux_request_interrupt): Rename from
19912 linux_send_signal, and always send SIGINT.
19913 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
19914 and always send SIGINT.
19915 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
19916 of send_signal.
19917 (input_interrupt): Likewise.
19918
19919 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19920
19921 * server.c (get_features_xml): Check if target implemented
19922 arch_string.
19923 * win32-i386-low.c (win32_arch_string): New.
19924 (win32_target_ops): Add win32_arch_string as arch_string member.
19925
19926 2007-02-22 Markus Deuling <deuling@de.ibm.com>
19927
19928 * spu-low.c (spu_arch_string): New.
19929 (spu_target_ops): Add spu_arch_string.
19930
19931 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
19932
19933 * remote-utils.c: Remove HAVE_TERMINAL_H check.
19934 * configure.ac: Do not check for terminal.h.
19935 * configure, config.in: Regenerated.
19936
19937 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19938
19939 * Makefile.in (OBS): Add $(XML_BUILTIN).
19940 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
19941 (clean): Update.
19942 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
19943 (arm-with-iwmmxt.c): New.
19944 * config.in, configure: Regenerate.
19945 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
19946 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
19947 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
19948 (arm*-*-linux*): Add iWMMXt and regset support.
19949 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
19950 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
19951 (arm_store_wmmxregset, target_regsets): New.
19952 * server.c (get_features_xml): Take annex argument. Check builtin
19953 XML documents.
19954 (handle_query): Handle multiple annexes.
19955
19956 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19957
19958 * remote-utils.c [USE_WIN32API] (read, write): Define.
19959 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
19960 write.
19961
19962 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
19963
19964 * linux-i386-low.c (the_low_target): Set arch_string.
19965 * linux-x86-64-low.c (the_low_target): Likewise.
19966 * linux-low.c (linux_arch_string): New.
19967 (linux_target_ops): Add it.
19968 * linux-low.h (struct linux_target_ops): Add arch_string.
19969 * server.c (write_qxfer_response): Use const void * for DATA.
19970 (get_features_xml): New.
19971 (handle_query): Handle qXfer:features:read. Report it for qSupported.
19972 * target.h (struct target_ops): Add arch_string method.
19973
19974 2007-01-03 Denis Pilat <denis.pilat@st.com>
19975 Daniel Jacobowitz <dan@codesourcery.com>
19976
19977 * linux-low.c (linux_kill): Handle being called with no threads.
19978 * win32-i386-low.c (win32_kill): Likewise.
19979 (get_child_debug_event): Clear current_process_handle.
19980
19981 2006-12-30 Denis PILAT <denis.pilat@st.com>
19982 Daniel Jacobowitz <dan@codesourcery.com>
19983
19984 * remote-utils.c (remote_open): Check the type of specified
19985 serial port devices before opening them.
19986 * server.c (main): Kill the inferior if an error occurs during
19987 the first remote_open.
19988
19989 2006-12-05 Markus Deuling <deuling@de.ibm.com>
19990
19991 * README: Update supported targets.
19992
19993 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
19994
19995 * Makefile.in (clean): Remove reg-mips64.c.
19996 (reg-mips64.c, reg-mips64.o): New rules.
19997 * configure.srv: Handle mips64. Include regset support for mips.
19998 * linux-mips-low.c (union mips_register): New.
19999 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20000 (mips_breakpoint, mips_breakpoint_at): Use int.
20001 (mips_collect_register, mips_supply_register)
20002 (mips_collect_register_32bit, mips_supply_register_32bit)
20003 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20004 (mips_store_fpregset, target_regsets): New.
20005 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20006
20007 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20008
20009 * configure.srv: Add target "spu*-*-*".
20010 * Makefile.in (clean): Remove reg-spu.c.
20011 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20012 * spu-low.c: New file.
20013
20014 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20015
20016 * configure.ac: Correct td_thr_tls_get_addr test.
20017 * configure: Regenerated.
20018
20019 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20020
20021 * linux-low.c (linux_wait_for_event): Reformat. Use the
20022 pass_signals array.
20023 * remote-utils.c (decode_address_to_semicolon): New.
20024 * server.c (pass_signals, handle_general_set): New.
20025 (handle_query): Mention QPassSignals for qSupported.
20026 (main): Call handle_general_set.
20027 * server.h (pass_signals, decode_address_to_semicolon): New.
20028
20029 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20030
20031 * server.c (handle_query): Correct error handling for read_auxv.
20032
20033 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20034
20035 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20036 and srv_linux_thread_db to yes.
20037 * linux-s390-low.c (s390_fill_gregset): New function.
20038 (target_regsets): Define data structure.
20039
20040 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20041
20042 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20043 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20044 * config.in, configure: Regenerated.
20045 * inferiors.c (gdb_id_to_thread): New function.
20046 (gdb_id_to_thread_id): Use it.
20047 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20048 * linux-low.h (struct process_info): Add th member.
20049 (thread_db_get_tls_address): New prototype.
20050 * remote-utils.c (decode_address): Make non-static.
20051 * server.c (handle_query): Handle qGetTLSAddr.
20052 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20053 * target.h (struct target_ops): Add get_tls_address.
20054 * thread-db.c (maybe_attach_thread): Save the thread handle.
20055 (thread_db_get_tls_address): New.
20056
20057 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20058
20059 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20060 (linux_resume_one_process): Take a siginfo_t *. Update all
20061 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20062 (struct pending_signals): Add a siginfo_t.
20063 (linux_wait_for_process): Always set last_status.
20064 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20065 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20066 * linux-low.h (struct process_info): Add last_status.
20067
20068 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20069
20070 * remote-utils.c (try_rle): New function.
20071 (putpkt_binary): Use it.
20072
20073 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20074
20075 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20076 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20077 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20078 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20079 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20080 point registers.
20081
20082 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20083
20084 * server.c (terminal_fd): New variable.
20085 (old_foreground_pgrp): Likewise.
20086 (restore_old_foreground_pgrp): New function.
20087 (start_inferior): Record the terminal file descriptor in terminal_fd
20088 and its original foreground group in old_foreground_pgrp. Register
20089 restore_old_foreground_pgrp with atexit().
20090
20091 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20092
20093 * server.c (handle_query): Correct qPart to qXfer.
20094
20095 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20096
20097 * configure.ac: Check for more headers which are missing on
20098 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20099 * configure.srv: Add Cygwin and mingw32.
20100 * remote-utils.c: Don't include headers unconditionally which
20101 are missing on mingw32. Include <winsock.h> for mingw32.
20102 (remote_open): Adjust for mingw32 support. Flush
20103 standard error after writing to it.
20104 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20105 (unblock_async_io, enable_async_io, disable_async_io)
20106 (readchar, getpkt): Update for Winsock support.
20107 (prepare_resume_reply): Expect a protocol signal number.
20108 * server.c: Disable <sys/wait.h> on mingw32.
20109 (start_inferior): Adjust for mingw32 support. Flush
20110 standard error after writing to it.
20111 (attach_inferior): Likewise. Use protocol signal
20112 numbers.
20113 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20114 and names.
20115 * win32-i386-low.c: New file.
20116 * Makefile.in (XM_CLIBS): Set.
20117 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20118 (win32-i386-low.o): New dependency rule.
20119 * linux-low.c (linux_wait): Use target signal numbers.
20120 * target.h (struct target_ops): Doc fix.
20121 * server.h (target_signal_to_name): New prototype.
20122 * gdbreplay.c: Don't include headers unconditionally which
20123 are missing on mingw32. Include <winsock.h> for mingw32.
20124 (remote_close, remote_open): Adjust for Winsock support.
20125 * configure, config.in: Regenerated.
20126
20127 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20128
20129 * server.c (decode_xfer_read, write_qxfer_response): New.
20130 (handle_query): Take a packet length argument. Handle
20131 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
20132 the qSupported response.
20133 (main): Update call to handle_query.
20134
20135 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
20136
20137 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
20138 (putpkt_binary): Renamed from putpkt and adjusted for binary
20139 data.
20140 (putpkt): New wrapper for putpkt_binary.
20141 (readchar): Don't mask off the high bit.
20142 (decode_X_packet): New function.
20143 * server.c (main): Call putpkt_binary if a handler sets the packet
20144 length. Save the length of the incoming packet. Handle 'X'.
20145 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
20146
20147 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
20148
20149 * server.c (handle_query): Handle qSupported.
20150
20151 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20152
20153 * remote-utils.c (all_symbols_looked_up): New variable.
20154 (look_up_one_symbol): Check it.
20155 * server.h (look_up_one_symbol): New declaration.
20156 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
20157
20158 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
20159
20160 * Makefile.in (linux-arm-low.o): Update dependencies.
20161 * linux-arm-low.c: Include "gdb_proc_service.h".
20162 (PTRACE_GET_THREAD_AREA): Define.
20163 (ps_get_thread_area): New function.
20164
20165 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
20166
20167 * configure.srv (m68k*-*-uclinux*): New target.
20168 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
20169 (linux_resume_one_process): Remove extraneous cast.
20170 (linux_read_offsets): New.
20171 (linux_target_op): Add linux_read_offsets on mmuless systems.
20172 * server.c (handle_query): Add qOffsets logic.
20173 * target.h (struct target_ops): Add read_offsets.
20174
20175 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20176
20177 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
20178 (PTRACE_GET_THREAD_AREA): Define.
20179 (ps_get_thread_area): New function.
20180 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
20181 (linux-x86-64-low.o): Update.
20182
20183 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
20184
20185 * configure.ac: Remove checks for prfpregset_t.
20186 * gdb_proc_service.h: New file.
20187 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
20188 new "gdb_proc_service.h".
20189 * proc-service.c: Likewise.
20190 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
20191 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
20192 * Makefile.in (gdb_proc_service_h): Updated.
20193 * configure, config.in: Regenerated.
20194
20195 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20196
20197 * remote-utils.c (prepare_resume_reply): Move declaration
20198 of gdb_id_from_wait to the top of the block.
20199
20200 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
20201
20202 * linux-low.c (regsets_store_inferior_registers): Read the regset
20203 from the target before filling it.
20204
20205 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20206
20207 * server.c (attach_inferior): Return SIGTRAP for a successful
20208 attach.
20209
20210 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
20211
20212 * Makefile.in (OBS): Add version.o.
20213 (STAGESTUFF): Delete.
20214 (version.o): Add dependencies.
20215 (version.c): Replace rule.
20216 (clean): Remove version.c.
20217 * server.c (gdbserver_version): New.
20218 (gdbserver_usage): Use printf.
20219 (main): Handle --version and --help.
20220 * server.h (version, host_name): Add declarations.
20221
20222 2005-12-23 Eli Zaretskii <eliz@gnu.org>
20223
20224 * linux-arm-low.c:
20225 * linux-arm-low.c:
20226 * inferiors.c:
20227 * i387-fp.h:
20228 * i387-fp.c:
20229 * gdbreplay.c:
20230 * regcache.c:
20231 * proc-service.c:
20232 * mem-break.h:
20233 * mem-break.c:
20234 * linux-x86-64-low.c:
20235 * linux-sh-low.c:
20236 * linux-s390-low.c:
20237 * linux-ppc64-low.c:
20238 * linux-ppc-low.c:
20239 * linux-mips-low.c:
20240 * linux-m68k-low.c:
20241 * linux-m32r-low.c:
20242 * linux-low.h:
20243 * linux-low.c:
20244 * linux-ia64-low.c:
20245 * linux-i386-low.c:
20246 * linux-crisv32-low.c:
20247 * thread-db.c:
20248 * terminal.h:
20249 * target.h:
20250 * target.c:
20251 * server.h:
20252 * server.c:
20253 * remote-utils.c:
20254 * regcache.h:
20255 * utils.c:
20256 * Makefile.in:
20257 * configure.ac:
20258 * gdbserver.1: Add (C) after Copyright. Update the FSF
20259 address.
20260
20261 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
20262
20263 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
20264 (arm_breakpoint_at): Recognize both breakpoints.
20265 (the_low_target): Use the correct breakpoint instruction.
20266
20267 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
20268
20269 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
20270 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
20271 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
20272 (the_low_target): Update.
20273
20274 2005-10-25 Andreas Schwab <schwab@suse.de>
20275
20276 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
20277
20278 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
20279 (ia64_num_regs): Reduce to 462.
20280
20281 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
20282
20283 * acinclude.m4: Correct quoting.
20284 * aclocal.m4: Regenerated.
20285
20286 Suggested by SZOKOVACS Robert <szo@ies.hu>:
20287 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
20288 (thread_db_init): Call thread_db_err_str.
20289 * configure.ac: Check for TD_VERSION.
20290 * config.in, configure: Regenerated.
20291
20292 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20293
20294 * server.h (error, fatal, warning): Add ATTR_FORMAT.
20295
20296 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20297
20298 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
20299 is not available. Define HAVE_PTRACE_GETREGS if it is.
20300 * config.in, configure: Regenerated.
20301 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
20302 * linux-i386-low.c, linux-m68k-low.c: Update to use
20303 HAVE_PTRACE_GETREGS.
20304 * linux-low.c (regsets_fetch_inferior_registers)
20305 (regsets_store_inferior_registers): Only return 0 if we processed
20306 GENERAL_REGS.
20307 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
20308 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
20309
20310 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20311
20312 * inferiors.c (struct thread_info): Add gdb_id.
20313 (add_thread): Add gdb_id argument.
20314 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
20315 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
20316 calls to add_thread.
20317 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
20318 * server.c (handle_query): Use thread_to_gdb_id.
20319 (handle_v_cont, main): Use gdb_id_to_thread_id.
20320 * server.h (add_thread): Update prototype.
20321 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
20322 prototypes.
20323
20324 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20325
20326 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20327 left-padded registers.
20328 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20329 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20330
20331 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20332
20333 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20334 * configure: Regenerate.
20335 * config.in: Regenerate.
20336 * server.h (NEED_DECLARATION_STRERROR):
20337 Replace with !HAVE_DECL_STRERROR.
20338
20339 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20340
20341 * linux-low.c (linux_wait, linux_send_signal): Don't test
20342 an unsigned long variable for > 0 if it could be MAX_ULONG.
20343 * server.c (myresume): Likewise.
20344 * target.c (set_desired_inferior): Likewise.
20345
20346 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20347
20348 * configure.ac: Simplify and improve check for socklen_t.
20349 * configure, config.in: Regenerate.
20350
20351 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20352
20353 * acconfig.h: Remove.
20354 * configure.ac: Add a test for socklen_t. Use three-argument
20355 AC_DEFINE throughout.
20356 * config.in: Regenerated using autoheader 2.59.
20357 * configure: Regenerated.
20358
20359 * gdbreplay.c (socklen_t): Provide a default.
20360 (remote_open): Use socklen_t.
20361 * remote-utils.c (socklen_t): Provide a default.
20362 (remote_open): Use socklen_t.
20363 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20364 unsigned char.
20365
20366 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20367 char for buffers.
20368 * linux-low.c (linux_read_memory, linux_write_memory)
20369 (linux_read_auxv): Likewise.
20370 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20371 (check_mem_write): Likewise.
20372 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20373 Likewise.
20374 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20375 (registers_from_string, register_data): Likewise.
20376 * server.c (handle_query, main): Likewise.
20377 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20378 (decode_M_packet): Likewise.
20379 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20380 * target.h (struct target_ops): Update read_memory, write_memory,
20381 and read_auxv.
20382 (read_inferior_memory, write_inferior_memory): Update.
20383 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20384 to unsigned char *.
20385 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20386 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20387 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20388 linux-s390-low.c, linux-sh-low.c: Update for changes in
20389 read_inferior_memory and the_low_target->breakpoint.
20390
20391 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20392
20393 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20394 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20395 * configure.srv: Add powerpc64-*-linux*.
20396 * linux-ppc64-low.c: New file.
20397
20398 2005-05-23 Orjan Friberg <orjanf@axis.com>
20399
20400 * linux-cris-low.c: New file with support for CRIS.
20401 * linux-crisv32-low.c: Ditto for CRISv32.
20402 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20403 (clean): Add reg-cris.c and reg-crisv32.c.
20404 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20405 reg-crisv32.o, and reg-crisv32.c to make rules.
20406 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20407 recognized targets.
20408
20409 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20410
20411 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20412 of sizeof (PTRACE_XFER_TYPE).
20413 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20414
20415 2005-05-12 Orjan Friberg <orjanf@axis.com>
20416
20417 * target.h (struct target_ops): Add insert_watchpoint,
20418 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20419 pointers for hardware watchpoint support.
20420 * linux-low.h (struct linux_target_ops): Ditto.
20421 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20422 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20423 to linux_target_ops.
20424 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20425 reply packet.
20426 * server.c (main): Recognize 'Z' and 'z' packets.
20427
20428 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20429
20430 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20431 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20432 (the_low_target): Add new members.
20433
20434 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20435
20436 * proc-service.c (ps_lgetregs): Search all_processes instead of
20437 all_threads.
20438
20439 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20440
20441 * server.c (start_inferior): Change return type to int.
20442 (attach_inferior): Change sigptr to int *.
20443 (handle_v_cont, handle_v_requests): Change signal to int *.
20444 (main): Change signal to int.
20445
20446 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20447
20448 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20449 * configure.srv: Add m32r*-*-linux*.
20450 * linux-m32r-low.c: New file.
20451
20452 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20453
20454 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20455
20456 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20457
20458 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20459 Take unsigned long arguments for PIDs.
20460 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20461 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20462 (wait_for_sigstop, linux_resume_one_process)
20463 (regsets_fetch_inferior_registers, linux_send_signal)
20464 (linux_read_auxv): Likewise. Update the types of variables holding
20465 PIDs. Update format string specifiers.
20466 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20467 * remote-utils.c (prepare_resume_reply): Likewise.
20468 * server.c (cont_thread, general_thread, step_thread)
20469 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20470 unsigned long.
20471 (handle_query): Update format specifiers.
20472 (handle_v_cont, main): Use strtoul for thread IDs.
20473 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20474 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20475 (general_thread, step_thread, thread_from_wait)
20476 (old_thread_from_wait): Update.
20477 * target.h (struct thread_resume): Use unsigned long for THREAD.
20478 (struct target_ops): Use unsigned long for arguments to attach and
20479 thread_alive.
20480
20481 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20482
20483 * acinclude.m4: Include bfd/bfd.m4 directly.
20484 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20485 <agriffis@toolchain.org>.
20486 * aclocal.m4, configure: Regenerated.
20487
20488 2005-01-07 Andrew Cagney <cagney@gnu.org>
20489
20490 * configure.ac: Rename configure.in, require autoconf 2.59.
20491 * configure: Re-generate.
20492
20493 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20494
20495 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20496 LIBS when finished.
20497 * aclocal.m4: Regenerated.
20498 * configure: Regenerated.
20499
20500 2004-11-21 Andreas Schwab <schwab@suse.de>
20501
20502 * linux-m68k-low.c (m68k_num_gregs): Define.
20503 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20504 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20505 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20506 (m68k_breakpoint_at): New. Add to the_low_target.
20507
20508 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20509 srv_linux_thread_db to yes.
20510
20511 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20512
20513 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20514 (ARCH_SET_FS): Likewise.
20515 (ARCH_GET_FS): Likewise.
20516 (ARCH_GET_GS): Likewise.
20517
20518 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20519
20520 * linux-i386-low.c (ps_get_thread_area): New.
20521 * linux-x86-64-low.c (ps_get_thread_area): New.
20522 * linux-low.c: Include <sys/syscall.h>.
20523 (linux_kill_one_process): Don't kill the first thread here.
20524 (linux_kill): Kill the first thread here.
20525 (kill_lwp): New function.
20526 (send_sigstop, linux_send_signal): Use it.
20527 * proc-service.c: Clean up #ifdefs.
20528 (fpregset_info): Delete.
20529 (ps_lgetregs): Update and enable implementation.
20530 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20531 implementations.
20532 * remote-utils.c (struct sym_cache, symbol_cache): New.
20533 (input_interrupt): Print a clearer message.
20534 (async_io_enabled): New variable.
20535 (enable_async_io, disable_async_io): Use it. Update comments.
20536 (look_up_one_symbol): Use the symbol cache.
20537 * thread-db.c (thread_db_look_up_symbols): New function.
20538 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20539
20540 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20541
20542 * configure.in: Test for -rdynamic.
20543 * configure: Regenerated.
20544 * Makefile (INTERNAL_LDFLAGS): New.
20545 (gdbserver, gdbreplay): Use it.
20546
20547 2004-09-02 Andrew Cagney <cagney@gnu.org>
20548
20549 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20550
20551 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20552
20553 * linux-low.c (linux_wait): Clear all_processes list also.
20554
20555 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20556
20557 * linux-low.c: Include <errno.h>. Remove extern declaration of
20558 errno.
20559
20560 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20561
20562 * gdbreplay.c, server.h, utils.c: Update copyright years.
20563
20564 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20565
20566 * server.c (main): Print child status or termination signal from
20567 variable 'signal', not 'sig'.
20568
20569 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20570
20571 * linux-low.c (linux_read_memory): Change return type to
20572 int. Check for and return error from ptrace().
20573 * target.c (read_inferior_memory): Change return type to int. Pass
20574 back return status from the_target->read_memory().
20575 * target.h (struct target_ops): Adapt *read_memory() prototype.
20576 Update comment.
20577 (read_inferior_memory): Adapt prototype.
20578 * server.c (main): Return an error packet if
20579 read_inferior_memory() returns an error.
20580
20581 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20582
20583 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20584 Unify with other clean targets.
20585
20586 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20587
20588 * server.c (handle_v_cont): Call set_desired_inferior.
20589
20590 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20591
20592 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20593
20594 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20595
20596 * linux-low.c (linux_wait): Unblock async I/O.
20597 (linux_resume): Block and enable async I/O.
20598 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20599 * server.h (block_async_io, unblock_async_io): Add prototypes.
20600
20601 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20602
20603 * remote-utils.c (remote_open): Print a status notice after
20604 opening a TCP port.
20605 * server.c (attach_inferior): Print a status notice after
20606 attaching.
20607
20608 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20609
20610 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20611
20612 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20613
20614 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20615 error packet.
20616 * server.c, target.h: Update copyright years.
20617
20618 2004-02-25 Roland McGrath <roland@redhat.com>
20619
20620 * target.h (struct target_ops): New member `read_auxv'.
20621 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20622 * linux-low.c (linux_read_auxv): New function.
20623 (linux_target_ops): Initialize `read_auxv' member to that.
20624
20625 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20626
20627 Committed by Jim Blandy <jimb@redhat.com>.
20628
20629 * linux-s390-low.c (s390_num_regs): Update.
20630 (s390_regmap): Remove control registers. Use __s390x__ predefine
20631 instead of GPR_SIZE to distiguish s390 and s390x targets.
20632
20633 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20634
20635 * linux-low.c: Update copyright year.
20636 (check_removed_breakpoint): Clear pending_is_breakpoint.
20637 (linux_set_resume_request, linux_queue_one_thread)
20638 (resume_status_pending_p): New functions.
20639 (linux_continue_one_thread): Use process->resume.
20640 (linux_resume): Only resume threads if there are no pending events.
20641 * linux-low.h (struct process_info): Add resume request
20642 pointer.
20643
20644 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20645
20646 * regcache.c (new_register_cache): Clear the allocated register
20647 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20648
20649 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20650
20651 * linux-low.c (linux_resume): Take a struct thread_resume *
20652 argument.
20653 (linux_wait): Update call.
20654 (resume_ptr): New static variable.
20655 (linux_continue_one_thread): Renamed from
20656 linux_continue_one_process. Use resume_ptr.
20657 (linux_resume): Use linux_continue_one_thread.
20658 * server.c (handle_v_cont, handle_v_requests): New functions.
20659 (myresume): New function.
20660 (main): Handle 'v' case.
20661 * target.h (struct thread_resume): New type.
20662 (struct target_ops): Change argument of "resume" to struct
20663 thread_resume *.
20664 (myresume): Delete macro.
20665
20666 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20667
20668 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20669 (uninstall): Support DESTDIR.
20670
20671 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20672
20673 * configure.srv: Add xscale*linux copy of arm*linux entry.
20674
20675 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20676
20677 * linux-arm-low.c (arm_reinsert_addr): New function.
20678 (the_low_target): Add arm_reinsert_addr.
20679
20680 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20681
20682 * mem-break.c: Remove whitespace at end of file.
20683
20684 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20685
20686 * configure.in: Check whether we need to prototype strerror.
20687 * server.h: Optionally prototype strerror.
20688 * gdbreplay.c (perror_with_name): Use strerror.
20689 * linux-low.c (linux_attach_lwp): Use strerror.
20690 * utils.c (perror_with_name): Use strerror.
20691 * config.in, configure: Regenerated.
20692
20693 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20694
20695 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20696 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20697
20698 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
20699
20700 * Makefile.in (SFILES): Update.
20701 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20702 low-sun3.c: Remove files.
20703
20704 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
20705
20706 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20707 (linux_detach_one_process, linux_detach): New functions.
20708 (linux_target_ops): Add linux_detach.
20709 * server.c (main): Handle 'D' packet.
20710 * target.h (struct target_ops): Add "detach" member.
20711 (detach_inferior): Define.
20712
20713 2003-06-13 Mark Kettenis <kettenis@gnu.org>
20714
20715 From Kelley Cook <kelleycook@wideopenwest.com>:
20716 * configure.srv: Accept i[34567]86 variants.
20717
20718 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
20719
20720 * linux-low.c (linux_wait_for_event): Correct comment typos.
20721 (linux_resume_one_process): Call check_removed_breakpoint.
20722 (linux_send_signal): New function.
20723 (linux_target_ops): Add linux_send_signal.
20724 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20725 of kill.
20726 * target.h (struct target_ops): Add send_signal.
20727
20728 2003-05-29 Jim Blandy <jimb@redhat.com>
20729
20730 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20731 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20732 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20733 away part of the register's value.
20734
20735 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
20736
20737 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20738 (linux_wait_for_event, linux_init_signals): Likewise.
20739
20740 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
20741
20742 * configure.in: Check for stdlib.h.
20743 * configure: Regenerated.
20744 * config.in: Regenerated.
20745
20746 2003-01-04 Andreas Schwab <schwab@suse.de>
20747
20748 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20749
20750 2003-01-02 Andrew Cagney <ac131313@redhat.com>
20751
20752 * Makefile.in: Remove obsolete code.
20753
20754 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
20755
20756 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20757 defined(PT_FPR0_HI).
20758
20759 2002-11-17 Stuart Hughes <seh@zee2.com>
20760
20761 * linux-arm-low.c (arm_num_regs): Increase.
20762 (arm_regmap): Include status register.
20763
20764 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
20765
20766 * linux-low.c (register_addr): Remove incorrect -1 check.
20767
20768 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
20769
20770 * linux-low.c (linux_create_inferior): Call setpgid. Return
20771 the new PID.
20772 (unstopped_p, linux_signal_pid): Remove.
20773 (linux_target_ops): Remove linux_signal_pid.
20774 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20775 global instead of target method.
20776 * target.h (struct target_ops): Remove signal_pid. Update comment
20777 for create_inferior.
20778 * server.c (signal_pid): New variable.
20779 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
20780 gdbserver. Set the child to be the foreground process group.
20781 (attach_inferior): Set signal_pid.
20782
20783 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
20784
20785 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20786
20787 2002-08-20 Jim Blandy <jimb@redhat.com>
20788
20789 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20790 default for this.
20791
20792 2002-08-01 Andrew Cagney <cagney@redhat.com>
20793
20794 * Makefile.in: Make chill references obsolete.
20795
20796 2002-07-24 Kevin Buettner <kevinb@redhat.com>
20797
20798 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20799 * configure: Regenerate.
20800 * config.in: Regenerate.
20801
20802 2002-07-09 David O'Brien <obrien@FreeBSD.org>
20803
20804 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20805 (perror_with_name, remote_close, remote_open, expect, play): Static.
20806
20807 2002-07-04 Michal Ludvig <mludvig@suse.cz>
20808
20809 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
20810 byte offsets instead of an array of indexes.
20811 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20812
20813 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
20814
20815 * regcache.c: Add comment.
20816
20817 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
20818
20819 * thread-db.c: New file.
20820 * proc-service.c: New file.
20821 * acinclude.m4: New file.
20822 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20823 proc-service.o, and thread-db.o.
20824 (linux-low.o): Add USE_THREAD_DB.
20825 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20826 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20827 * aclocal.m4: Regenerated.
20828 * config.in: Regenerated.
20829 * configure: Regenerated.
20830 * configure.in: Check for proc_service.h, sys/procfs.h,
20831 thread_db.h, and linux/elf.h headrs.
20832 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20833 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20834 Check for -lthread_db and thread support.
20835 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20836 PowerPC, and SuperH.
20837 * i387-fp.c: Constify arguments.
20838 * i387-fp.h: Likewise.
20839 * inferiors.c: (struct thread_info): Renamed from
20840 `struct inferior_info'. Remove PID member. Use generic inferior
20841 list header. All uses updated.
20842 (inferiors, signal_pid): Removed.
20843 (all_threads): New variable.
20844 (get_thread): Define.
20845 (add_inferior_to_list): New function.
20846 (for_each_inferior): New function.
20847 (change_inferior_id): New function.
20848 (add_inferior): Removed.
20849 (remove_inferior): New function.
20850 (add_thread): New function.
20851 (free_one_thread): New function.
20852 (remove_thread): New function.
20853 (clear_inferiors): Use for_each_inferior and free_one_thread.
20854 (find_inferior): New function.
20855 (find_inferior_id): New function.
20856 (inferior_target_data): Update argument type.
20857 (set_inferior_target_data): Likewise.
20858 (inferior_regcache_data): Likewise.
20859 (set_inferior_regcache_data): Likewise.
20860 * linux-low.c (linux_bp_reinsert): Remove.
20861 (all_processes, stopping_threads, using_thrads)
20862 (struct pending_signals, debug_threads, pid_of): New.
20863 (inferior_pid): Replace with macro.
20864 (struct inferior_linux_data): Remove.
20865 (get_stop_pc, add_process): New functions.
20866 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20867 Use add_process and add_thread.
20868 (linux_attach_lwp): New function, based on old linux_attach. Use
20869 add_process and add_thread. Set stop_expected for new threads.
20870 (linux_attach): New function.
20871 (linux_kill_one_process): New function.
20872 (linux_kill): Kill all LWPs.
20873 (linux_thread_alive): Use find_inferior_id.
20874 (check_removed_breakpoints, status_pending_p): New functions.
20875 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20876 Update. Use WNOHANG. Wait for cloned processes also. Update process
20877 struct for the found process.
20878 (linux_wait_for_event): New function.
20879 (linux_wait): Use it. Support LWPs.
20880 (send_sigstop, wait_for_sigstop, stop_all_processes)
20881 (linux_resume_one_process, linux_continue_one_process): New functions.
20882 (linux_resume): Support LWPs.
20883 (REGISTER_RAW_SIZE): Remove.
20884 (fetch_register): Use register_size instead. Call supply_register.
20885 (usr_store_inferior_registers): Likewise. Call collect_register.
20886 Fix recursive case.
20887 (regsets_fetch_inferior_registers): Improve error message.
20888 (regsets_store_inferior_registers): Add debugging.
20889 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
20890 (unstopped_p, linux_signal_pid): New functions.
20891 (linux_target_ops): Add linux_signal_pid.
20892 (linux_init_signals): New function.
20893 (initialize_low): Call it. Initialize using_threads.
20894 * regcache.c (inferior_regcache_data): Add valid
20895 flag.
20896 (get_regcache): Fetch registers lazily. Add fetch argument
20897 and update all callers.
20898 (regcache_invalidate_one, regcache_invalidate): New
20899 functions.
20900 (new_register_cache): Renamed from create_register_cache.
20901 Return the new regcache.
20902 (free_register_cache): Change argument to a void *.
20903 (registers_to_string, registers_from_string): Call get_regcache
20904 with fetch flag set.
20905 (register_data): Make static. Pass fetch flag to get_regcache.
20906 (supply_register): Call get_regcache with fetch flag clear.
20907 (collect_register): Call get_regcache with fetch flag set.
20908 (collect_register_as_string): New function.
20909 * regcache.h: Update.
20910 * remote-utils.c (putpkt): Flush after debug output and use
20911 stderr.
20912 Handle input interrupts while waiting for an ACK.
20913 (input_interrupt): Use signal_pid method.
20914 (getpkt): Flush after debug output and use stderr.
20915 (outreg): Use collect_register_as_string.
20916 (new_thread_notify, dead_thread_notify): New functions.
20917 (prepare_resume_reply): Check using_threads. Set thread_from_wait
20918 and general_thread.
20919 (look_up_one_symbol): Flush after debug output.
20920 * server.c (step_thread, server_waiting): New variables.
20921 (start_inferior): Don't use signal_pid. Update call to mywait.
20922 (attach_inferior): Update call to mywait.
20923 (handle_query): Handle qfThreadInfo and qsThreadInfo.
20924 (main): Don't fetch/store registers explicitly. Use
20925 set_desired_inferior. Support proposed ``Hs'' packet. Update
20926 calls to mywait.
20927 * server.h: Update.
20928 (struct inferior_list, struct_inferior_list_entry): New.
20929 * target.c (set_desired_inferior): New.
20930 (write_inferior_memory): Constify.
20931 (mywait): New function.
20932 * target.h: Update.
20933 (struct target_ops): New signal_pid method.
20934 (mywait): Removed macro, added prototype.
20935
20936 * linux-low.h (regset_func): Removed.
20937 (regset_fill_func, regset_store_func): New.
20938 (enum regset_type): New.
20939 (struct regset_info): Add type field. Use new operation types.
20940 (struct linux_target_ops): stop_pc renamed to get_pc.
20941 Add decr_pc_after_break and breakpoint_at.
20942 (get_process, get_thread_proess, get_process_thread)
20943 (strut process_info, all_processes, linux_attach_lwp)
20944 (thread_db_init): New.
20945
20946 * linux-arm-low.c (arm_get_pc, arm_set_pc,
20947 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
20948 (the_low_target): Add new members.
20949 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
20950 (i386_store_fpxregset): Constify.
20951 (target_regsets): Add new kind identifier.
20952 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
20953 (i386_set_pc): Add debugging.
20954 (i386_breakpoint_at): New function.
20955 (the_low_target): Add new members.
20956 * linux-mips-low.c (mips_get_pc, mips_set_pc)
20957 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
20958 (mips_breakpoint_at): New.
20959 (the_low_target): Add new members.
20960 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
20961 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
20962 (the_low_target): Add new members.
20963 * linux-sh-low.c (sh_get_pc, sh_set_pc)
20964 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
20965 (the_low_target): Add new members.
20966 * linux-x86-64-low.c (target_regsets): Add new kind
20967 identifier.
20968
20969 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
20970
20971 From Martin Pool <mbp@samba.org>:
20972 * server.c (gdbserver_usage): New function.
20973 (main): Call it.
20974
20975 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
20976
20977 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
20978 stop_at -> stop_pc.
20979
20980 2002-05-04 Andrew Cagney <ac131313@redhat.com>
20981
20982 * Makefile.in: Remove obsolete code.
20983
20984 2002-04-24 Michal Ludvig <mludvig@suse.cz>
20985
20986 * linux-low.c (regsets_fetch_inferior_registers),
20987 (regsets_store_inferior_registers): Removed cast to int from
20988 ptrace() calls.
20989 * regcache.h: Added declaration of struct inferior_info.
20990
20991 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20992
20993 * inferiors.c (struct inferior_info): Add regcache_data.
20994 (add_inferior): Call create_register_cache.
20995 (clear_inferiors): Call free_register_cache.
20996 (inferior_regcache_data, set_inferior_regcache_data): New functions.
20997 * regcache.c (struct inferior_regcache_data): New.
20998 (registers): Remove.
20999 (get_regcache): New function.
21000 (create_register_cache, free_register_cache): New functions.
21001 (set_register_cache): Don't initialize the register cache here.
21002 (registers_to_string, registers_from_string, register_data): Call
21003 get_regcache.
21004 * regcache.h: Add prototypes.
21005 * server.h: Likewise.
21006
21007 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21008
21009 * mem-break.c: New file.
21010 * mem-break.h: New file.
21011 * Makefile.in: Add mem-break.o rule; update server.h
21012 dependencies.
21013 * inferiors.c (struct inferior_info): Add target_data
21014 member.
21015 (clear_inferiors): Free target_data member if set.
21016 (inferior_target_data, set_inferior_target_data): New functions.
21017 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21018 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21019 * linux-low.c (linux_bp_reinsert): New variable.
21020 (struct inferior_linux_data): New.
21021 (linux_create_inferior): Use set_inferior_target_data.
21022 (linux_attach): Likewise. Call add_inferior.
21023 (linux_wait_for_one_inferior): New function.
21024 (linux_wait): Call it.
21025 (linux_write_memory): Add const.
21026 (initialize_low): Call set_breakpoint_data.
21027 * linux-low.h (struct linux_target_ops): Add breakpoint
21028 handling members.
21029 * server.c (attach_inferior): Remove extra add_inferior
21030 call.
21031 * server.h: Include mem-break.h. Update inferior.c
21032 prototypes.
21033 * target.c (read_inferior_memory)
21034 (write_inferior_memory): New functions.
21035 * target.h (read_inferior_memory)
21036 (write_inferior_memory): Change macros to prototypes.
21037 (struct target_ops): Update comments. Add const to write_memory
21038 definition.
21039
21040 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21041
21042 * linux-low.c (usr_store_inferior_registers): Support
21043 registers which are allowed to fail to store.
21044 * linux-low.h (linux_target_ops): Likewise.
21045 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21046 (ppc_cannot_store_register): FPSCR may not be storable.
21047
21048 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21049
21050 * server.h: Include <string.h> if HAVE_STRING_H.
21051 * ChangeLog: Correct paths in last ChangeLog entry.
21052
21053 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21054
21055 * linux-low.h: Remove obsolete prototypes.
21056 (struct linux_target_ops): New.
21057 (extern the_low_target): New.
21058 * linux-low.c (num_regs, regmap): Remove declarations.
21059 (register_addr): Use the_low_target explicitly.
21060 (fetch_register): Likewise.
21061 (usr_fetch_inferior_registers): Likewise.
21062 (usr_store_inferior_registers): Likewise.
21063 * linux-arm-low.c (num_regs): Remove.
21064 (arm_num_regs): Define.
21065 (arm_regmap): Renamed from regmap, made static.
21066 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21067 made static.
21068 (arm_cannot_store_register): Renamed from cannot_store_register,
21069 made static.
21070 (the_low_target): New.
21071 * linux-i386-low.c (num_regs): Remove.
21072 (i386_num_regs): Define.
21073 (i386_regmap): Renamed from regmap, made static.
21074 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21075 made static.
21076 (i386_cannot_store_register): Renamed from cannot_store_register,
21077 made static.
21078 (the_low_target): New.
21079 * linux-ia64-low.c (num_regs): Remove.
21080 (ia64_num_regs): Define.
21081 (ia64_regmap): Renamed from regmap, made static.
21082 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21083 made static.
21084 (ia64_cannot_store_register): Renamed from cannot_store_register,
21085 made static.
21086 (the_low_target): New.
21087 * linux-m68k-low.c (num_regs): Remove.
21088 (m68k_num_regs): Define.
21089 (m68k_regmap): Renamed from regmap, made static.
21090 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21091 made static.
21092 (m68k_cannot_store_register): Renamed from cannot_store_register,
21093 made static.
21094 (the_low_target): New.
21095 * linux-mips-low.c (num_regs): Remove.
21096 (mips_num_regs): Define.
21097 (mips_regmap): Renamed from regmap, made static.
21098 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21099 made static.
21100 (mips_cannot_store_register): Renamed from cannot_store_register,
21101 made static.
21102 (the_low_target): New.
21103 * linux-ppc-low.c (num_regs): Remove.
21104 (ppc_num_regs): Define.
21105 (ppc_regmap): Renamed from regmap, made static.
21106 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21107 made static.
21108 (ppc_cannot_store_register): Renamed from cannot_store_register,
21109 made static.
21110 (the_low_target): New.
21111 * linux-s390-low.c (num_regs): Remove.
21112 (s390_num_regs): Define.
21113 (s390_regmap): Renamed from regmap, made static.
21114 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21115 made static.
21116 (s390_cannot_store_register): Renamed from cannot_store_register,
21117 made static.
21118 (the_low_target): New.
21119 * linux-sh-low.c (num_regs): Remove.
21120 (sh_num_regs): Define.
21121 (sh_regmap): Renamed from regmap, made static.
21122 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
21123 made static.
21124 (sh_cannot_store_register): Renamed from cannot_store_register,
21125 made static.
21126 (the_low_target): New.
21127 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
21128 (the_low_target): New.
21129
21130 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21131
21132 * Makefile.in: Add stamp-h target.
21133 * configure.in: Create stamp-h.
21134 * configure: Regenerated.
21135
21136 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21137
21138 * inferiors.c: New file.
21139 * target.c: New file.
21140 * target.h: New file.
21141 * Makefile.in: Add target.o and inferiors.o. Update
21142 dependencies.
21143 * linux-low.c (inferior_pid): New static variable,
21144 moved from server.c.
21145 (linux_create_inferior): Renamed from create_inferior.
21146 Call add_inferior. Return 0 on success instead of a PID.
21147 (linux_attach): Renamed from myattach.
21148 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
21149 (linux_thread_alive): Renamed from mythread_alive.
21150 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
21151 child dies.
21152 (linux_resume): Renamed from myresume. Add missing ``return 0''.
21153 (regsets_store_inferior_registers): Correct error message.
21154 Add missing ``return 0''.
21155 (linux_fetch_registers): Renamed from fetch_inferior_registers.
21156 (linux_store_registers): Renamed from store_inferior_registers.
21157 (linux_read_memory): Renamed from read_inferior_memory.
21158 (linux_write_memory): Renamed from write_inferior_memory.
21159 (linux_target_ops): New structure.
21160 (initialize_low): Call set_target_ops ().
21161 * remote-utils.c (unhexify): New function.
21162 (hexify): New function.
21163 (input_interrupt): Send signals to ``signal_pid''.
21164 * server.c (inferior_pid): Remove.
21165 (start_inferior): Update create_inferior call.
21166 (attach_inferior): Call add_inferior.
21167 (handle_query): New function.
21168 (main): Call handle_query for `q' packets.
21169 * server.h: Include "target.h". Remove obsolete prototypes.
21170 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
21171
21172 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21173
21174 * Makefile.in: Add WARN_CFLAGS. Update configury
21175 dependencies.
21176 * configure.in: Check for <string.h>
21177 * configure: Regenerate.
21178 * config.in: Regenerate.
21179 * gdbreplay.c: Include needed system headers.
21180 (remote_open): Remove strchr prototype.
21181 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
21182 * regcache.c (supply_register): Change buf argument to const void *.
21183 (supply_register_by_name): Likewise.
21184 (collect_register): Change buf argument to void *.
21185 (collect_register_by_name): Likewise.
21186 * regcache.h: Add missing prototypes.
21187 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
21188 * server.c (handle_query): New function.
21189 (attached): New static variable, moved out of main.
21190 (main): Quiet longjmp clobber warnings.
21191 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
21192 * utils.c (error): Remove NORETURN.
21193 (fatal): Likewise.
This page took 0.698895 seconds and 4 git commands to generate.