77c766d8052a2d5034deb442ba5b1374447af659
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Remove the 'sw_breakpoint_from_kind' linux target op, and let
4 the concrete linux target define it by overriding the op
5 in process_stratum_target.
6
7 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
8 Remove.
9 * linux-low.h (struct linux_target_ops): Remove the op.
10 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
11 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
12 Declare.
13 (x86_sw_breakpoint_from_kind): Turn into...
14 (x86_target::sw_breakpoint_from_kind): ...this.
15 (the_low_target): Remove the op field.
16 * linux-aarch64-low.cc (class aarch64_target)
17 <sw_breakpoint_from_kind>: Declare.
18 (aarch64_sw_breakpoint_from_kind): Turn into...
19 (aarch64_target::sw_breakpoint_from_kind): ...this.
20 (the_low_target): Remove the op field.
21 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
22 Declare.
23 (arm_target::sw_breakpoint_from_kind): Define.
24 (the_low_target): Remove the op field.
25 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
26 Declare.
27 (bfin_sw_breakpoint_from_kind): Turn into...
28 (bfin_target::sw_breakpoint_from_kind): ...this.
29 (the_low_target): Remove the op field.
30 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
31 Declare.
32 (cris_sw_breakpoint_from_kind): Turn into...
33 (cris_target::sw_breakpoint_from_kind): ...this.
34 (the_low_target): Remove the op field.
35 * linux-crisv32-low.cc (class crisv32_target)
36 <sw_breakpoint_from_kind>: Declare.
37 (cris_sw_breakpoint_from_kind): Turn into...
38 (crisv32_target::sw_breakpoint_from_kind): ...this.
39 (the_low_target): Remove the op field.
40 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
41 Declare.
42 (ia64_target::sw_breakpoint_from_kind): Define.
43 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
44 Declare.
45 (m32r_sw_breakpoint_from_kind): Turn into...
46 (m32r_target::sw_breakpoint_from_kind): ...this.
47 (the_low_target): Remove the op field.
48 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
49 Declare.
50 (m68k_sw_breakpoint_from_kind): Turn into...
51 (m68k_target::sw_breakpoint_from_kind): ...this.
52 (the_low_target): Remove the op field.
53 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
54 Declare.
55 (mips_sw_breakpoint_from_kind): Turn into...
56 (mips_target::sw_breakpoint_from_kind): ...this.
57 (the_low_target): Remove the op field.
58 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
59 Declare.
60 (nios2_sw_breakpoint_from_kind): Turn into...
61 (nios2_target::sw_breakpoint_from_kind): ...this.
62 (the_low_target): Remove the op field.
63 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
64 Declare.
65 (ppc_sw_breakpoint_from_kind): Turn into...
66 (ppc_target::sw_breakpoint_from_kind): ...this.
67 (the_low_target): Remove the op field.
68 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
69 Declare.
70 (riscv_sw_breakpoint_from_kind): Turn into...
71 (riscv_target::sw_breakpoint_from_kind): ...this.
72 (the_low_target): Remove the op field.
73 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
74 Declare.
75 (s390_sw_breakpoint_from_kind): Turn into...
76 (s390_target::sw_breakpoint_from_kind): ...this.
77 (the_low_target): Remove the op field.
78 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
79 Declare.
80 (sh_sw_breakpoint_from_kind): Turn into...
81 (sh_target::sw_breakpoint_from_kind): ...this.
82 (the_low_target): Remove the op field.
83 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
84 Declare.
85 (sparc_sw_breakpoint_from_kind): Turn into...
86 (sparc_target::sw_breakpoint_from_kind): ...this.
87 (the_low_target): Remove the op field.
88 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
89 Declare.
90 (tic6x_sw_breakpoint_from_kind): Turn into...
91 (tic6x_target::sw_breakpoint_from_kind): ...this.
92 (the_low_target): Remove the op field.
93 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
94 Declare.
95 (tile_sw_breakpoint_from_kind): Turn into...
96 (tile_target::sw_breakpoint_from_kind): ...this.
97 (the_low_target): Remove the op field.
98 * linux-xtensa-low.cc (class xtensa_target)
99 <sw_breakpoint_from_kind>: Declare.
100 (xtensa_sw_breakpoint_from_kind): Turn into...
101 (xtensa_target::sw_breakpoint_from_kind): ...this.
102 (the_low_target): Remove the op field.
103
104 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
105
106 Remove the 'breakpoint_kind_from_pc' and
107 'breakpoint_kind_from_current_state' linux target ops, and let the
108 concrete linux target define them by overriding the ops of
109 process_stratum_target.
110
111 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
112 Remove.
113 (linux_process_target::breakpoint_kind_from_current_state): Remove.
114 * linux-low.h (struct linux_target_ops): Remove ops.
115 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
116 <breakpoint_kind_from_current_state>: Remove.
117 * linux-x86-low.cc (the_low_target): Remove the op fields.
118 * linux-bfin-low.cc (the_low_target): Ditto.
119 * linux-cris-low.cc (the_low_target): Ditto.
120 * linux-crisv32-low.cc (the_low_target): Ditto.
121 * linux-m32r-low.cc (the_low_target): Ditto.
122 * linux-m68k-low.cc (the_low_target): Ditto.
123 * linux-mips-low.cc (the_low_target): Ditto.
124 * linux-nios2-low.cc (the_low_target): Ditto.
125 * linux-ppc-low.cc (the_low_target): Ditto.
126 * linux-s390-low.cc (the_low_target): Ditto.
127 * linux-sh-low.cc (the_low_target): Ditto.
128 * linux-sparc-low.cc (the_low_target): Ditto.
129 * linux-tic6x-low.cc (the_low_target): Ditto.
130 * linux-tile-low.cc (the_low_target): Ditto.
131 * linux-xtensa-low.cc (the_low_target): Ditto.
132 * linux-aarch64-low.cc (class aarch64_target)
133 <breakpoint_kind_from_pc>
134 <breakpoint_kind_from_current_state>: Declare.
135 (aarch64_breakpoint_kind_from_pc): Turn into...
136 (aarch64_target::breakpoint_kind_from_pc): ...this.
137 (aarch64_breakpoint_kind_from_current_state): Turn into...
138 (aarch64_target::breakpoint_kind_from_current_state): ...this.
139 (the_low_target): Remove the op fields.
140 * linux-arm-low.cc (class arm_target):
141 <breakpoint_kind_from_pc>
142 <breakpoint_kind_from_current_state>: Declare.
143 (arm_target::breakpoint_kind_from_pc): Define.
144 (arm_target::breakpoint_kind_from_current_state): Define.
145 (the_low_target): Remove the op fields.
146 * linux-riscv-low.cc (class riscv_target):
147 <breakpoint_kind_from_pc>: Declare.
148 (riscv_breakpoint_kind_from_pc): Turn into...
149 (riscv_target::breakpoint_kind_from_pc): ...this.
150 (the_low_target): Remove the op fields.
151
152 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
153
154 Turn the 'get_pc' and 'set_pc' linux target ops into methods
155 of linux_process_target.
156
157 * linux-low.h (struct linux_target_ops): Remove the ops.
158 (class linux_process_target) <low_supports_breakpoints>
159 <low_get_pc>
160 <low_set_pc>: Declare.
161 * linux-low.cc (supports_breakpoints): Turn into...
162 (linux_process_target::low_supports_breakpoints): ...this.
163 (linux_process_target::low_get_pc): Define.
164 (linux_process_target::low_set_pc): Define.
165
166 Update the callers below.
167
168 (linux_process_target::get_pc)
169 (linux_process_target::save_stop_reason)
170 (linux_process_target::maybe_move_out_of_jump_pad)
171 (linux_process_target::wait_1)
172 (linux_process_target::resume_one_lwp_throw)
173 (linux_process_target::resume)
174 (linux_process_target::proceed_all_lwps)
175 (linux_process_target::read_pc)
176 (linux_process_target::write_pc)
177
178 * linux-x86-low.cc (class linux_process_target)
179 <low_supports_breakpoints>
180 <low_get_pc>
181 <low_set_pc>: Declare.
182 (x86_target::low_supports_breakpoints): Define.
183 (x86_get_pc): Turn into...
184 (x86_target::low_get_pc): ...this.
185 (x86_set_pc): Turn into...
186 (x86_target::low_set_pc): ...this.
187 (the_low_target): Remove the op fields.
188 * linux-arm-low.cc (class arm_target)
189 <low_supports_breakpoints>
190 <low_get_pc>
191 <low_set_pc>: Declare.
192 (arm_target::low_supports_breakpoints)
193 (arm_target::low_get_pc)
194 (arm_target::low_set_pc): Define.
195 (the_low_target): Remove the op fields.
196 * linux-bfin-low.cc (class bfin_target)
197 <low_supports_breakpoints>
198 <low_get_pc>
199 <low_set_pc>: Declare.
200 (bfin_target::low_supports_breakpoints)
201 (bfin_target::low_get_pc)
202 (bfin_target::low_set_pc): Define.
203 (the_low_target): Remove the op fields.
204 * linux-cris-low.cc (class cris_target)
205 <low_supports_breakpoints>
206 <low_get_pc>
207 <low_set_pc>: Declare.
208 (cris_target::low_supports_breakpoints)
209 (cris_target::low_get_pc)
210 (cris_target::low_set_pc): Define.
211 (the_low_target): Remove the op fields.
212 * linux-crisv32-low.cc (class crisv32_target)
213 <low_supports_breakpoints>
214 <low_get_pc>
215 <low_set_pc>: Declare.
216 (crisv32_target::low_supports_breakpoints)
217 (crisv32_target::low_get_pc)
218 (crisv32_target::low_set_pc): Define.
219 (the_low_target): Remove the op fields.
220 * linux-m32r-low.cc (class m32r_target)
221 <low_supports_breakpoints>
222 <low_get_pc>
223 <low_set_pc>: Declare.
224 (m32r_target::low_supports_breakpoints)
225 (m32r_target::low_get_pc)
226 (m32r_target::low_set_pc): Define.
227 (the_low_target): Remove the op fields.
228 * linux-m68k-low.cc (class m68k_target)
229 <low_supports_breakpoints>
230 <low_get_pc>
231 <low_set_pc>: Declare.
232 (m68k_target::low_supports_breakpoints)
233 (m68k_target::low_get_pc)
234 (m68k_target::low_set_pc): Define.
235 (the_low_target): Remove the op fields.
236 * linux-nios2-low.cc (class nios2_target)
237 <low_supports_breakpoints>
238 <low_get_pc>
239 <low_set_pc>: Declare.
240 (nios2_target::low_supports_breakpoints)
241 (nios2_target::low_get_pc)
242 (nios2_target::low_set_pc): Define.
243 (the_low_target): Remove the op fields.
244 * linux-sh-low.cc (class sh_target)
245 <low_supports_breakpoints>
246 <low_get_pc>
247 <low_set_pc>: Declare.
248 (sh_target::low_supports_breakpoints)
249 (sh_target::low_get_pc)
250 (sh_target::low_set_pc): Define.
251 (the_low_target): Remove the op fields.
252 * linux-xtensa-low.cc (class xtensa_target)
253 <low_supports_breakpoints>
254 <low_get_pc>
255 <low_set_pc>: Declare.
256 (xtensa_target::low_supports_breakpoints)
257 (xtensa_target::low_get_pc)
258 (xtensa_target::low_set_pc): Define.
259 (the_low_target): Remove the op fields.
260 * linux-sparc-low.cc (class sparc_target)
261 <low_supports_breakpoints>
262 <low_get_pc>: Declare.
263 (sparc_target::low_supports_breakpoints)
264 (sparc_target::low_get_pc): Define.
265 (the_low_target): Remove the op fields.
266 * linux-tile-low.cc (class tile_target)
267 <low_supports_breakpoints>
268 <low_get_pc>
269 <low_set_pc>: Declare.
270 (tile_target::low_supports_breakpoints)
271 (tile_target::low_get_pc)
272 (tile_target::low_set_pc): Define.
273 (the_low_target): Remove the op fields.
274 * linux-aarch64-low.cc (class aarch64_target)
275 <low_supports_breakpoints>
276 <low_get_pc>
277 <low_set_pc>: Declare.
278 (aarch64_target::low_supports_breakpoints): Define.
279 (aarch64_get_pc): Turn into...
280 (aarch64_target::low_get_pc): ...this.
281 (aarch64_set_pc): Turn into...
282 (aarch64_target::low_set_pc): ...this.
283 (the_low_target): Remove the op fields.
284 * linux-mips-low.cc (class mips_target)
285 <low_supports_breakpoints>
286 <low_get_pc>
287 <low_set_pc>: Declare.
288 (mips_target::low_supports_breakpoints): Define.
289 (mips_get_pc): Turn into...
290 (mips_target::low_get_pc): ...this.
291 (mips_set_pc): Turn into...
292 (mips_target::low_set_pc): ...this.
293 (the_low_target): Remove the op fields.
294 * linux-ppc-low.cc (class ppc_target)
295 <low_supports_breakpoints>
296 <low_get_pc>
297 <low_set_pc>: Declare.
298 (ppc_target::low_supports_breakpoints): Define.
299 (ppc_get_pc): Turn into...
300 (ppc_target::low_get_pc): ...this.
301 (ppc_set_pc): Turn into...
302 (ppc_target::low_set_pc): ...this.
303 (the_low_target): Remove the op fields.
304 * linux-riscv-low.cc (class riscv_target)
305 <low_supports_breakpoints>
306 <low_get_pc>
307 <low_set_pc>: Declare.
308 (riscv_target::low_supports_breakpoints): Define.
309 (riscv_get_pc): Turn into...
310 (riscv_target::low_get_pc): ...this.
311 (riscv_set_pc): Turn into...
312 (riscv_target::low_set_pc): ...this.
313 (the_low_target): Remove the op fields.
314 * linux-s390-low.cc (class s390_target)
315 <low_supports_breakpoints>
316 <low_get_pc>
317 <low_set_pc>: Declare.
318 (s390_target::low_supports_breakpoints): Define.
319 (s390_get_pc): Turn into...
320 (s390_target::low_get_pc): ...this.
321 (s390_set_pc): Turn into...
322 (s390_target::low_set_pc): ...this.
323 (the_low_target): Remove the op fields.
324 * linux-tic6x-low.cc (class tic6x_target)
325 <low_supports_breakpoints>
326 <low_get_pc>
327 <low_set_pc>: Declare.
328 (tic6x_target::low_supports_breakpoints): Define.
329 (tic6x_get_pc): Turn into...
330 (tic6x_target::low_get_pc): ...this.
331 (tic6x_set_pc): Turn into...
332 (tic6x_target::low_set_pc): ...this.
333 (the_low_target): Remove the op fields.
334
335 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
336
337 Turn some more static methods in linux-low into private methods
338 of linux_process_target.
339
340 * linux-low.cc (get_pc): Turn into...
341 (linux_process_target::get_pc): ...this.
342 (save_stop_reason): Turn into...
343 (linux_process_target::save_stop_reason): ...this.
344 (thread_still_has_status_pending_p): Turn into...
345 (linux_process_target::thread_still_has_status_pending): ...this.
346 (status_pending_p_callback): Turn into...
347 (linux_process_target::status_pending_p_callback): ...this.
348 (resume_stopped_resumed_lwps): Turn into...
349 (linux_process_target::resume_stopped_resumed_lwps): ...this.
350 (install_software_single_step_breakpoints): Turn into...
351 (linux_process_target::install_software_single_step_breakpoints):
352 ...this.
353 (single_step): Turn into...
354 (linux_process_target::single_step): ...this.
355 (linux_resume_one_lwp_throw): Turn into...
356 (linux_process_target::resume_one_lwp_throw): ...this.
357 (linux_resume_one_lwp): Turn into...
358 (linux_process_target::resume_one_lwp): ...this.
359 (resume_status_pending_p): Turn into...
360 (linux_process_target::resume_status_pending): ...this.
361 (need_step_over_p): Turn into...
362 (linux_process_target::thread_needs_step_over): ...this.
363 (linux_resume_one_thread): Turn into...
364 (linux_process_target::resume_one_thread): ...this.
365 (proceed_one_lwp): Turn into...
366 (linux_process_target::proceed_one_lwp): ...this.
367 (unsuspend_and_proceed_one_lwp): Turn into...
368 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
369
370 Update the calls/references to the above functions below.
371
372 (linux_process_target::handle_extended_wait)
373 (linux_process_target::filter_event)
374 (linux_process_target::wait_for_event_filtered)
375 (linux_process_target::wait_1)
376 (linux_process_target::move_out_of_jump_pad)
377 (linux_process_target::start_step_over)
378 (linux_process_target::resume)
379 (linux_process_target::proceed_all_lwps)
380 (regsets_store_inferior_registers)
381 (linux_process_target::store_register)
382
383 * linux-low.h (class linux_process_target)
384 <get_pc>
385 <save_stop_reason>
386 <thread_still_has_status_pending>
387 <status_pending_p_callback>
388 <resume_stopped_resumed_lwps>
389 <install_software_single_step_breakpoints>
390 <single_step>
391 <resume_one_lwp_throw>
392 <resume_one_lwp>
393 <resume_status_pending>
394 <thread_needs_step_over>
395 <resume_one_thread>
396 <proceed_one_lwp>
397 <unsuspend_and_proceed_one_lwp>: Declare.
398
399 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
400
401 Turn the 'fetch_register' linux target op into a method of
402 linux_process_target.
403
404 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
405 (class linux_process_target) <low_fetch_register>: Declare.
406 * linux-x86-low.cc (the_low_target)
407 * linux-aarch64-low.cc (the_low_target)
408 * linux-arm-low.cc (the_low_target)
409 * linux-bfin-low.cc (the_low_target)
410 * linux-cris-low.cc (the_low_target)
411 * linux-crisv32-low.cc (the_low_target)
412 * linux-m32r-low.cc (the_low_target)
413 * linux-m68k-low.cc (the_low_target)
414 * linux-nios2-low.cc (the_low_target)
415 * linux-ppc-low.cc (the_low_target)
416 * linux-s390-low.cc (the_low_target)
417 * linux-sh-low.cc (the_low_target)
418 * linux-sparc-low.cc (the_low_target)
419 * linux-tic6x-low.cc (the_low_target)
420 * linux-tile-low.cc (the_low_target)
421 * linux-xtensa-low.cc (the_low_target): Remove the op field.
422 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
423 Declare.
424 (ia64_fetch_register): Turn into...
425 (ia64_target::low_fetch_register): ...this.
426 (the_low_target): Remove the op field.
427 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
428 Declare.
429 (mips_fetch_register): Turn into...
430 (mips_target::low_fetch_register): ...this.
431 (the_low_target): Remove the op field.
432 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
433 Declare.
434 (riscv_fetch_register): Turn into...
435 (riscv_target::low_fetch_register): ...this.
436 (the_low_target): Remove the op field.
437
438 Update the callers below.
439
440 * linux-low.cc (linux_process_target::fetch_registers)
441 (linux_process_target::low_fetch_register)
442
443 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
444
445 Turn the 'cannot_fetch_register' and 'cannot_store_register'
446 linux target ops into methods of linux_process_target.
447
448 * linux-low.h (struct linux_target_ops): Remove the low target ops.
449 (class linux_process_target) <fetch_register>
450 <store_register>
451 <usr_fetch_inferior_registers>
452 <usr_store_inferior_registers>
453 <low_cannot_fetch_register>
454 <low_cannot_fetch_register> Declare.
455 * linux-low.cc (fetch_register): Turn into...
456 (linux_process_target::fetch_register): ...this.
457 (store_register): Turn into ...
458 (linux_process_target::store_register): ...this.
459 (usr_fetch_inferior_registers): Turn into...
460 (linux_process_target::usr_fetch_inferior_registers): ...this.
461 (usr_store_inferior_registers): Turn into...
462 (linux_process_target::usr_store_inferior_registers): ...this.
463 * linux-x86-low.cc (class x86_target)
464 <low_cannot_fetch_register>
465 <low_cannot_store_register>: Declare.
466 (x86_cannot_store_register): Turn into...
467 (x86_target::low_cannot_store_register): ...this.
468 (x86_cannot_fetch_register): Turn into...
469 (x86_target::low_cannot_fetch_register): ...this.
470 (the_low_target): Remove the target op fields.
471 * linux-aarch64-low.cc (class aarch64_target)
472 <low_cannot_fetch_register>
473 <low_cannot_store_register>: Declare.
474 (aarch64_target::low_cannot_fetch_register)
475 (aarch64_target::low_cannot_store_register): Define.
476 (the_low_target): Remove the op fields.
477 * linux-arm-low.cc (class arm_target)
478 <low_cannot_fetch_register>
479 <low_cannot_store_register>: Declare.
480 (arm_cannot_fetch_register): Turn into...
481 (arm_target::low_cannot_fetch_register): ...this.
482 (arm_cannot_store_register): Turn into...
483 (arm_target::low_cannot_store_register): ...this.
484 (the_low_target): Remove the op fields.
485 * linux-bfin-low.cc (class bfin_target)
486 <low_cannot_fetch_register>
487 <low_cannot_store_register>: Declare.
488 (bfin_cannot_fetch_register): Turn into...
489 (bfin_target::low_cannot_fetch_register): ...this.
490 (bfin_cannot_store_register): Turn into...
491 (bfin_target::low_cannot_store_register): ...this.
492 (the_low_target): Remove the op fields.
493 * linux-cris-low.cc (class cris_target)
494 <low_cannot_fetch_register>
495 <low_cannot_store_register>: Declare.
496 (cris_cannot_fetch_register): Turn into...
497 (cris_target::low_cannot_fetch_register): ...this.
498 (cris_cannot_store_register): Turn into...
499 (cris_target::low_cannot_store_register): ...this.
500 (the_low_target): Remove the op fields.
501 * linux-crisv32-low.cc (class crisv32_target)
502 <low_cannot_fetch_register>
503 <low_cannot_store_register>: Declare.
504 (crisv32_target::low_cannot_fetch_register)
505 (crisv32_target::low_cannot_store_register): Define.
506 (the_low_target): Remove the op fields.
507 * linux-ia64-low.cc (class ia64_target)
508 <low_cannot_fetch_register>
509 <low_cannot_store_register>: Declare.
510 (ia64_cannot_fetch_register): Turn into...
511 (ia64_target::low_cannot_fetch_register): ...this.
512 (ia64_cannot_store_register): Turn into...
513 (ia64_target::low_cannot_store_register): ...this.
514 (the_low_target): Remove the op fields.
515 * linux-m32r-low.cc (class m32r_target)
516 <low_cannot_fetch_register>
517 <low_cannot_store_register>: Declare.
518 (m32r_cannot_fetch_register): Turn into...
519 (m32r_target::low_cannot_fetch_register): ...this.
520 (m32r_cannot_store_register): Turn into...
521 (m32r_target::low_cannot_store_register): ...this.
522 (the_low_target): Remove the op fields.
523 * linux-m68k-low.cc (class m68k_target)
524 <low_cannot_fetch_register>
525 <low_cannot_store_register>: Declare.
526 (m68k_cannot_fetch_register): Turn into...
527 (m68k_target::low_cannot_fetch_register): ...this.
528 (m68k_cannot_store_register): Turn into...
529 (m68k_target::low_cannot_store_register): ...this.
530 (the_low_target): Remove the op fields.
531 * linux-mips-low.cc (class mips_target)
532 <low_cannot_fetch_register>
533 <low_cannot_store_register>: Declare.
534 (mips_cannot_fetch_register): Turn into...
535 (mips_target::low_cannot_fetch_register): ...this.
536 (mips_cannot_store_register): Turn into...
537 (mips_target::low_cannot_store_register): ...this.
538 (get_usrregs_info): Inline at the call sites in
539 low_cannot_fetch_register and low_cannot_store_register,
540 and remove.
541 (the_low_target): Remove the op fields.
542 * linux-nios2-low.cc (class nios2_target)
543 <low_cannot_fetch_register>
544 <low_cannot_store_register>: Declare.
545 (nios2_cannot_fetch_register): Turn into...
546 (nios2_target::low_cannot_fetch_register): ...this.
547 (nios2_cannot_store_register): Turn into...
548 (nios2_target::low_cannot_store_register): ...this.
549 (the_low_target): Remove the op fields.
550 * linux-ppc-low.cc (class ppc_target)
551 <low_cannot_fetch_register>
552 <low_cannot_store_register>: Declare.
553 (ppc_cannot_fetch_register): Turn into...
554 (ppc_target::low_cannot_fetch_register): ...this.
555 (ppc_cannot_store_register): Turn into...
556 (ppc_target::low_cannot_store_register): ...this.
557 (the_low_target): Remove the op fields.
558 * linux-riscv-low.cc (class riscv_target)
559 <low_cannot_fetch_register>
560 <low_cannot_store_register>: Declare.
561 (riscv_target::low_cannot_fetch_register)
562 (riscv_target::low_cannot_store_register): Define.
563 (the_low_target): Remove the op fields.
564 * linux-s390-low.cc (class s390_target)
565 <low_cannot_fetch_register>
566 <low_cannot_store_register>: Declare.
567 (s390_cannot_fetch_register): Turn into...
568 (s390_target::low_cannot_fetch_register): ...this.
569 (s390_cannot_store_register): Turn into...
570 (s390_target::low_cannot_store_register): ...this.
571 (the_low_target): Remove the op fields.
572 * linux-sh-low.cc (class sh_target)
573 <low_cannot_fetch_register>
574 <low_cannot_store_register>: Declare.
575 (sh_cannot_fetch_register): Turn into...
576 (sh_target::low_cannot_fetch_register): ...this.
577 (sh_cannot_store_register): Turn into...
578 (sh_target::low_cannot_store_register): ...this.
579 (the_low_target): Remove the op fields.
580 * linux-sparc-low.cc (class sparc_target)
581 <low_cannot_fetch_register>
582 <low_cannot_store_register>: Declare.
583 (sparc_cannot_fetch_register): Turn into...
584 (sparc_target::low_cannot_fetch_register): ...this.
585 (sparc_cannot_store_register): Turn into...
586 (sparc_target::low_cannot_store_register): ...this.
587 (the_low_target): Remove the op fields.
588 * linux-tic6x-low.cc (class tic6x_target)
589 <low_cannot_fetch_register>
590 <low_cannot_store_register>: Declare.
591 (tic6x_cannot_fetch_register): Turn into...
592 (tic6x_target::low_cannot_fetch_register): ...this.
593 (tic6x_cannot_store_register): Turn into...
594 (tic6x_target::low_cannot_store_register): ...this.
595 (the_low_target): Remove the op fields.
596 * linux-tile-low.cc (class tile_target)
597 <low_cannot_fetch_register>
598 <low_cannot_store_register>: Declare.
599 (tile_cannot_fetch_register): Turn into...
600 (tile_target::low_cannot_fetch_register): ...this.
601 (tile_cannot_store_register): Turn into...
602 (tile_target::low_cannot_store_register): ...this.
603 (the_low_target): Remove the op fields.
604 * linux-xtensa-low.cc (class xtensa_target)
605 <low_cannot_fetch_register>
606 <low_cannot_store_register>: Declare.
607 (xtensa_target::low_cannot_fetch_register)
608 (xtensa_target::low_cannot_store_register): Define.
609 (the_low_target): Remove the op fields.
610
611 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
612
613 Turn the 'regs_info' linux target op into a method of
614 linux_process_target.
615
616 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
617 (class linux_process_target) <get_regs_info>: Define.
618
619 Update the callers below.
620
621 * linux-low.cc (linux_process_target::fetch_registers)
622 (linux_process_target::store_registers)
623 * proc-service.cc (gregset_info)
624
625 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
626 (x86_linux_regs_info): Turn into ...
627 (x86_target::get_regs_info): ...this.
628 (the_low_target): Remove the op field.
629 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
630 Declare.
631 (aarch64_regs_info): Turn into ...
632 (aarch64_target::get_regs_info): ...this.
633 (the_low_target): Remove the op field.
634 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
635 (arm_regs_info): Turn into ...
636 (arm_target::get_regs_info): ...this.
637 (the_low_target): Remove the op field.
638 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
639 (bfin_regs_info): Turn into ...
640 (bfin_target::get_regs_info): ...this.
641 (the_low_target): Remove the op field.
642 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
643 (cris_regs_info): Turn into ...
644 (cris_target::get_regs_info): ...this.
645 (the_low_target): Remove the op field.
646 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
647 Declare.
648 (crisv32_regs_info): Turn into ...
649 (crisv32_target::get_regs_info): ...this.
650 (the_low_target): Remove the op field.
651 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
652 (ia64_regs_info): Turn into ...
653 (ia64_target::get_regs_info): ...this.
654 (the_low_target): Remove the op field.
655 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
656 (m32r_regs_info): Turn into ...
657 (m32r_target::get_regs_info): ...this.
658 (the_low_target): Remove the op field.
659 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
660 (m68k_regs_info): Turn into ...
661 (m68k_target::get_regs_info): ...this.
662 (the_low_target): Remove the op field.
663 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
664 (mips_regs_info): Turn into ...
665 (mips_target::get_regs_info): ...this.
666 (the_low_target): Remove the op field.
667 (get_usrregs_info): Update the call to the op.
668 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
669 (nios2_regs_info): Turn into ...
670 (nios2_target::get_regs_info): ...this.
671 (the_low_target): Remove the op field.
672 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
673 (ppc_regs_info): Turn into ...
674 (ppc_target::get_regs_info): ...this.
675 (the_low_target): Remove the op field.
676 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
677 (riscv_regs_info): Turn into ...
678 (riscv_target::get_regs_info): ...this.
679 (the_low_target): Remove the op field.
680 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
681 (s390_regs_info): Turn into ...
682 (s390_target::get_regs_info): ...this.
683 (the_low_target): Remove the op field.
684 (s390_collect_ptrace_register)
685 (s390_supply_ptrace_register)
686 (s390_fill_gregset): Update the call to the op.
687 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
688 (sh_regs_info): Turn into ...
689 (sh_target::get_regs_info): ...this.
690 (the_low_target): Remove the op field.
691 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
692 (sparc_regs_info): Turn into ...
693 (sparc_target::get_regs_info): ...this.
694 (the_low_target): Remove the op field.
695 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
696 (tic6x_regs_info): Turn into ...
697 (tic6x_target::get_regs_info): ...this.
698 (the_low_target): Remove the op field.
699 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
700 (tile_regs_info): Turn into ...
701 (tile_target::get_regs_info): ...this.
702 (the_low_target): Remove the op field.
703 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
704 Declare.
705 (xtensa_regs_info): Turn into ...
706 (xtensa_target::get_regs_info): ...this.
707 (the_low_target): Remove the op field.
708
709 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
710
711 Turn the 'arch_setup' linux target op into a method of
712 linux_process_target.
713
714 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
715 (class linux_process_target) <arch_setup_thread>
716 <low_arch_setup>: New declarations.
717 * linux-low.cc (linux_arch_setup): Delete.
718 (linux_arch_setup_thread): Turn into...
719 (linux_process_target::arch_setup_thread): ... this.
720
721 Update the callers below.
722
723 (linux_process_target::handle_extended_wait)
724 (linux_process_target::post_create_inferior)
725 (linux_process_target::filter_event)
726
727 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
728 declaration.
729 (x86_linux_update_xmltarget): Turn into...
730 (x86_target::update_xmltarget): ...this.
731 (x86_linux_process_qsupported): Update the call to
732 x86_linux_update_xmltarget.
733 (x86_arch_setup): Turn into ...
734 (x86_target::low_arch_setup): ...this.
735 (the_low_target): Remove the op field.
736 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
737 declaration.
738 (aarch64_arch_setup): Turn into ...
739 (aarch64_target::low_arch_setup): ...this.
740 (the_low_target): Remove the op field.
741 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
742 declaration.
743 (arm_arch_setup): Turn into ...
744 (arm_target::low_arch_setup): ...this.
745 (the_low_target): Remove the op field.
746 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
747 declaration.
748 (bfin_arch_setup): Turn into ...
749 (bfin_target::low_arch_setup): ...this.
750 (the_low_target): Remove the op field.
751 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
752 declaration.
753 (cris_arch_setup): Turn into ...
754 (cris_target::low_arch_setup): ...this.
755 (the_low_target): Remove the op field.
756 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
757 declaration.
758 (crisv32_arch_setup): Turn into ...
759 (crisv32_target::low_arch_setup): ...this.
760 (the_low_target): Remove the op field.
761 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
762 declaration.
763 (ia64_arch_setup): Turn into ...
764 (ia64_target::low_arch_setup): ...this.
765 (the_low_target): Remove the op field.
766 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
767 declaration.
768 (m32r_arch_setup): Turn into ...
769 (m32r_target::low_arch_setup): ...this.
770 (the_low_target): Remove the op field.
771 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
772 declaration.
773 (m68k_arch_setup): Turn into ...
774 (m68k_target::low_arch_setup): ...this.
775 (the_low_target): Remove the op field.
776 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
777 declaration.
778 (mips_arch_setup): Turn into ...
779 (mips_target::low_arch_setup): ...this.
780 (the_low_target): Remove the op field.
781 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
782 declaration.
783 (nios2_arch_setup): Turn into ...
784 (nios2_target::low_arch_setup): ...this.
785 (the_low_target): Remove the op field.
786 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
787 declaration.
788 (ppc_arch_setup): Turn into ...
789 (ppc_target::low_arch_setup): ...this.
790 (the_low_target): Remove the op field.
791 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
792 declaration.
793 (riscv_arch_setup): Turn into ...
794 (riscv_target::low_arch_setup): ...this.
795 (the_low_target): Remove the op field.
796 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
797 declaration.
798 (s390_arch_setup): Turn into ...
799 (s390_target::low_arch_setup): ...this.
800 (the_low_target): Remove the op field.
801 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
802 declaration.
803 (sh_arch_setup): Turn into ...
804 (sh_target::low_arch_setup): ...this.
805 (the_low_target): Remove the op field.
806 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
807 declaration.
808 (sparc_arch_setup): Turn into ...
809 (sparc_target::low_arch_setup): ...this.
810 (the_low_target): Remove the op field.
811 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
812 declaration.
813 (tic6x_arch_setup): Turn into ...
814 (tic6x_target::low_arch_setup): ...this.
815 (the_low_target): Remove the op field.
816 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
817 declaration.
818 (tile_arch_setup): Turn into ...
819 (tile_target::low_arch_setup): ...this.
820 (the_low_target): Remove the op field.
821 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
822 declaration.
823 (xtensa_arch_setup): Turn into ...
824 (xtensa_target::low_arch_setup): ...this.
825 (the_low_target): Remove the op field.
826
827 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
828
829 * linux-low.h (the_linux_target): New extern declaration.
830 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
831 'the_target'.
832 (the_linux_target): Remove.
833 * linux-x86-low.cc (class x86_target): New class.
834 (the_x86_target): New static object.
835 (the_linux_target): Define as pointer to the_x86_target.
836 * linux-aarch64-low.cc (class aarch64_target): New class.
837 (the_aarch64_target): New static object.
838 (the_linux_target): Define as pointer to the_aarch64_target.
839 * linux-arm-low.cc (class arm_target): New class.
840 (the_arm_target): New static object.
841 (the_linux_target): Define as pointer to the_arm_target.
842 * linux-bfin-low.cc (class bfin_target): New class.
843 (the_bfin_target): New static object.
844 (the_linux_target): Define as pointer to the_bfin_target.
845 * linux-cris-low.cc (class cris_target): New class.
846 (the_cris_target): New static object.
847 (the_linux_target): Define as pointer to the_cris_target.
848 * linux-crisv32-low.cc (class crisv32_target): New class.
849 (the_crisv32_target): New static object.
850 (the_linux_target): Define as pointer to the_crisv32_target.
851 * linux-ia64-low.cc (class ia64_target): New class.
852 (the_ia64_target): New static object.
853 (the_linux_target): Define as pointer to the_ia64_target.
854 * linux-m32r-low.cc (class m32r_target): New class.
855 (the_m32r_target): New static object.
856 (the_linux_target): Define as pointer to the_m32r_target.
857 * linux-m68k-low.cc (class m68k_target): New class.
858 (the_m68k_target): New static object.
859 (the_linux_target): Define as pointer to the_m68k_target.
860 * linux-mips-low.cc (class mips_target): New class.
861 (the_mips_target): New static object.
862 (the_linux_target): Define as pointer to the_mips_target.
863 * linux-nios2-low.cc (class nios2_target): New class.
864 (the_nios2_target): New static object.
865 (the_linux_target): Define as pointer to the_nios2_target.
866 * linux-ppc-low.cc (class ppc_target): New class.
867 (the_ppc_target): New static object.
868 (the_linux_target): Define as pointer to the_ppc_target.
869 * linux-riscv-low.cc (class riscv_target): New class.
870 (the_riscv_target): New static object.
871 (the_linux_target): Define as pointer to the_riscv_target.
872 * linux-s390-low.cc (class s390_target): New class.
873 (the_s390_target): New static object.
874 (the_linux_target): Define as pointer to the_s390_target.
875 * linux-sh-low.cc (class sh_target): New class.
876 (the_sh_target): New static object.
877 (the_linux_target): Define as pointer to the_sh_target.
878 * linux-sparc-low.cc (class sparc_target): New class.
879 (the_sparc_target): New static object.
880 (the_linux_target): Define as pointer to the_sparc_target.
881 * linux-tic6x-low.cc (class tic6x_target): New class.
882 (the_tic6x_target): New static object.
883 (the_linux_target): Define as pointer to the_tic6x_target.
884 * linux-tile-low.cc (class tile_target): New class.
885 (the_tile_target): New static object.
886 (the_linux_target): Define as pointer to the_tile_target.
887 * linux-xtensa-low.cc (class xtensa_target): New class.
888 (the_xtensa_target): New static object.
889 (the_linux_target): Define as pointer to the_xtensa_target.
890
891 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
892
893 Turn some static functions in linux-low.cc into private methods of
894 linux_process_target.
895
896 * linux-low.cc (handle_extended_wait): Turn into ...
897 (linux_process_target::handle_extended_wait): ...this. Call
898 'mourn' on 'this' object instead of 'the_target'.
899 (maybe_move_out_of_jump_pad): Turn into...
900 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
901 (linux_low_filter_event): Turn into...
902 (linux_process_target::filter_event): ...this.
903 (linux_wait_for_event_filtered): Turn into...
904 (linux_process_target::wait_for_event_filtered): ...this.
905 (linux_wait_for_event): Turn into...
906 (linux_process_target::wait_for_event): ...this.
907 (linux_wait_1): Turn into...
908 (linux_process_target::wait_1): ...this.
909 (wait_for_sigstop): Turn into...
910 (linux_process_target::wait_for_sigstop): ...this.
911 (move_out_of_jump_pad_callback): Turn into...
912 (linux_process_target::move_out_of_jump_pad): ...this.
913 (stop_all_lwps): Turn into...
914 (linux_process_target::stop_all_lwps): ...this.
915 (start_step_over): Turn into...
916 (linux_process_target::start_step_over): ...this.
917 (complete_ongoing_step_over): Turn into...
918 (linux_process_target::complete_ongoing_step_over): ...this.
919 (proceed_all_lwps): Turn into...
920 (linux_process_target::proceed_all_lwps): ...this.
921 (unstop_all_lwps): Turn into...
922 (linux_process_target::unstop_all_lwps): ...this.
923
924 * linux-low.h (class linux_process_target)
925 <handle_extended_wait>
926 <maybe_move_out_of_jump_pad>
927 filter_event>
928 <wait_for_event_filtered>
929 <wait_for_event>
930 <wait_1>
931 <wait_for_sigstop>
932 <move_out_of_jump_pad>
933 <stop_all_lwps>
934 <start_step_over>
935 <complete_ongoing_step_over>
936 <proceed_all_lwps>
937 <unstop_all_lwps>: Declare.
938
939 Update the callers below.
940
941 * linux-low.cc (linux_process_target::attach): Update.
942 (linux_process_target::stabilize_threads): Ditto.
943 (linux_process_target::wait): Ditto.
944
945 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
946
947 * linux-low.h (struct linux_target_ops): Update the comment for
948 'cannot_store_register' to return 0 or 1.
949 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
950 of 2.
951
952 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
953
954 * config.in: Re-generate.
955 * configure: Re-generate.
956
957 2020-03-17 Kamil Rytarowski <n54@gmx.com>
958
959 * regcache.cc (find_register_by_number): Update.
960 * tdesc.cc (init_target_desc): Likewise.
961 * tdesc.h (target_desc::reg_defs): Likewise.
962
963 2020-03-12 Tom Tromey <tom@tromey.com>
964
965 * configure: Rebuild.
966 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
967 (WIN32APILIBS): New subst.
968 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
969 gdbsupport files.
970 (gdbsupport/%.o): Remove target.
971 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
972 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
973 (WIN32APILIBS): New variable.
974 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
975 (gdbreplay$(EXEEXT)): Likewise.
976
977 2020-03-12 Tom Tromey <tom@tromey.com>
978
979 * config.in, configure: Rebuild.
980 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
981 * acinclude.m4: Include gettext-sister.m4.
982 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
983 variables.
984 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
985 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
986
987 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
988
989 * acinclude.m4: Update path to selftest.m4.
990
991 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
992
993 * configure.ac: Don't source bfd/development.sh, move
994 GDB_AC_COMMON higher.
995 * configure: Re-generate.
996
997 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
998
999 * configure: Re-generate.
1000
1001 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
1002
1003 * configure: Re-generate.
1004
1005 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1006
1007 * .dir-locals.el: New file.
1008
1009 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1010
1011 * .gitattributes: New file.
1012
1013 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
1014
1015 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
1016 reply into an S reply.
1017 * server.cc (disable_packet_T): New global.
1018 (captured_main): Set new global when appropriate.
1019 * server.h (disable_packet_T): Declare.
1020
1021 2020-02-21 Tom Tromey <tom@tromey.com>
1022
1023 * Makefile.in (mostlyclean): New target.
1024
1025 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1026
1027 * target.h (struct process_stratum_target): Remove.
1028 (class process_target): Rename to ...
1029 (class process_stratum_target): ... this.
1030 * linux-low.h (class linux_process_target): Derive from
1031 'process_stratum_target'.
1032 * linux-low.cc (linux_target_ops): Remove.
1033 (initialize_low): Set the_target to the singleton instance of
1034 linux_process_target.
1035 * lynx-low.h (class lynx_process_target): Derive from
1036 'process_stratum_target'.
1037 * lynx-low.cc (lynx_target_ops): Remove.
1038 (initialize_low): Set the_target to the singleton instance of
1039 lynx_process_target.
1040 * nto-low.h (class nto_process_target): Derive from
1041 'process_stratum_target'.
1042 * nto-low.cc (nto_target_ops): Remove.
1043 (initialize_low): Set the_target to the singleton instance of
1044 nto_process_target.
1045 * win32-low.h (class win32_process_target): Derive from
1046 'process_stratum_target'.
1047 * win32-low.cc (win32_target_ops): Remove.
1048 (initialize_low): Set the_target to the singleton instance of
1049 win32_process_target.
1050
1051 Replace 'the_target->pt' with 'the_target' in the uses below.
1052
1053 * hostio.cc (hostio_error)
1054 (handle_setfs)
1055 (handle_open)
1056 (handle_unlink)
1057 (handle_readlink)
1058 * linux-aarch32-low.cc (arm_breakpoint_at)
1059 * linux-aarch64-low.cc (aarch64_breakpoint_at)
1060 * linux-arm-low.cc (arm_sigreturn_next_pc)
1061 (arm_get_hwcap)
1062 (arm_get_syscall_trapinfo)
1063 * linux-cris-low.cc (cris_breakpoint_at)
1064 * linux-crisv32-low.cc (cris_breakpoint_at)
1065 * linux-low.cc (handle_extended_wait)
1066 (linux_wait_1)
1067 (linux_read_memory)
1068 (linux_process_target::breakpoint_kind_from_pc)
1069 (linux_get_auxv)
1070 * linux-m32r-low.cc (m32r_breakpoint_at)
1071 * linux-mips-low.cc (mips_breakpoint_at)
1072 * linux-nios2-low.cc (nios2_breakpoint_at)
1073 * linux-ppc-low.cc (ppc_breakpoint_at)
1074 * linux-s390-low.cc (s390_get_hwcap)
1075 * linux-sh-low.cc (sh_breakpoint_at)
1076 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
1077 (sparc_store_gregset_from_stack)
1078 (sparc_breakpoint_at)
1079 * linux-tic6x-low.cc (tic6x_breakpoint_at)
1080 * linux-tile-low.cc (tile_breakpoint_at)
1081 * linux-x86-low.cc (x86_breakpoint_at)
1082 * linux-xtensa-low.cc (xtensa_breakpoint_at)
1083 * mem-break.cc (bp_size)
1084 (bp_opcode)
1085 (insert_memory_breakpoint)
1086 (set_raw_breakpoint_at)
1087 (delete_raw_breakpoint)
1088 (z_type_supported)
1089 (uninsert_raw_breakpoint)
1090 (reinsert_raw_breakpoint)
1091 (validate_inserted_breakpoint)
1092 * regcache.cc (regcache_read_pc)
1093 (regcache_write_pc)
1094 * remote-utils.cc (putpkt_binary_1)
1095 (input_interrupt)
1096 (getpkt)
1097 (prepare_resume_reply)
1098 * server.cc (handle_general_set)
1099 (handle_detach)
1100 (handle_qxfer_auxv)
1101 (handle_qxfer_exec_file)
1102 (handle_qxfer_libraries_svr4)
1103 (handle_qxfer_osdata)
1104 (handle_qxfer_siginfo)
1105 (handle_qxfer_fdpic)
1106 (handle_query)
1107 (resume)
1108 (handle_v_requests)
1109 (queue_stop_reply_callback)
1110 (captured_main)
1111 * target.cc (prepare_to_access_memory)
1112 (done_accessing_memory)
1113 (read_inferior_memory)
1114 (target_write_memory)
1115 (target_stop_and_wait)
1116 (target_wait)
1117 (target_mourn_inferior)
1118 (target_continue_no_signal)
1119 (target_continue)
1120 (target_supports_multi_process)
1121 (kill_inferior)
1122 * target.h
1123 (target_create_inferior)
1124 (target_post_create_inferior)
1125 (myattach)
1126 (target_supports_fork_events)
1127 (target_supports_vfork_events)
1128 (target_supports_exec_events)
1129 (target_handle_new_gdb_connection)
1130 (detach_inferior)
1131 (mythread_alive)
1132 (fetch_inferior_registers)
1133 (store_inferior_registers)
1134 (join_inferior)
1135 (target_supports_non_stop)
1136 (target_async)
1137 (target_process_qsupported)
1138 (target_supports_catch_syscall)
1139 (target_get_ipa_tdesc_idx)
1140 (target_supports_tracepoints)
1141 (target_supports_fast_tracepoints)
1142 (target_get_min_fast_tracepoint_insn_len)
1143 (target_thread_stopped)
1144 (target_pause_all)
1145 (target_unpause_all)
1146 (target_stabilize_threads)
1147 (target_install_fast_tracepoint_jump_pad)
1148 (target_emit_ops)
1149 (target_supports_disable_randomization)
1150 (target_supports_agent)
1151 (target_enable_btrace)
1152 (target_disable_btrace)
1153 (target_read_btrace)
1154 (target_read_btrace_conf)
1155 (target_supports_range_stepping)
1156 (target_supports_stopped_by_sw_breakpoint)
1157 (target_stopped_by_sw_breakpoint)
1158 (target_supports_stopped_by_hw_breakpoint)
1159 (target_supports_hardware_single_step)
1160 (target_stopped_by_hw_breakpoint)
1161 (target_breakpoint_kind_from_pc)
1162 (target_breakpoint_kind_from_current_state)
1163 (target_supports_software_single_step)
1164 (target_core_of_thread)
1165 (target_thread_name)
1166 (target_thread_handle)
1167 * win32-low.cc (do_initial_child_stuff)
1168
1169 Rename target op default definitions listed below.
1170
1171 * target.cc (process_target::post_create_inferior): Rename as ...
1172 (process_stratum_target::post_create_inferior): ... this.
1173 (process_target::prepare_to_access_memory): Rename as ...
1174 (process_stratum_target::prepare_to_access_memory): ... this.
1175 (process_target::done_accessing_memory): Rename as ...
1176 (process_stratum_target::done_accessing_memory): ... this.
1177 (process_target::look_up_symbols): Rename as ...
1178 (process_stratum_target::look_up_symbols): ... this.
1179 (process_target::supports_read_auxv): Rename as ...
1180 (process_stratum_target::supports_read_auxv): ... this.
1181 (process_target::read_auxv): Rename as ...
1182 (process_stratum_target::read_auxv): ... this.
1183 (process_target::supports_z_point_type): Rename as ...
1184 (process_stratum_target::supports_z_point_type): ... this.
1185 (process_target::insert_point): Rename as ...
1186 (process_stratum_target::insert_point): ... this.
1187 (process_target::remove_point): Rename as ...
1188 (process_stratum_target::remove_point): ... this.
1189 (process_target::stopped_by_sw_breakpoint): Rename as ...
1190 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1191 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1192 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1193 (process_target::stopped_by_hw_breakpoint): Rename as ...
1194 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1195 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1196 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1197 (process_target::supports_hardware_single_step): Rename as ...
1198 (process_stratum_target::supports_hardware_single_step): ... this.
1199 (process_target::stopped_by_watchpoint): Rename as ...
1200 (process_stratum_target::stopped_by_watchpoint): ... this.
1201 (process_target::stopped_data_address): Rename as ...
1202 (process_stratum_target::stopped_data_address): ... this.
1203 (process_target::supports_read_offsets): Rename as ...
1204 (process_stratum_target::supports_read_offsets): ... this.
1205 (process_target::read_offsets): Rename as ...
1206 (process_stratum_target::read_offsets): ... this.
1207 (process_target::supports_get_tls_address): Rename as ...
1208 (process_stratum_target::supports_get_tls_address): ... this.
1209 (process_target::get_tls_address): Rename as ...
1210 (process_stratum_target::get_tls_address): ... this.
1211 (process_target::hostio_last_error): Rename as ...
1212 (process_stratum_target::hostio_last_error): ... this.
1213 (process_target::supports_qxfer_osdata): Rename as ...
1214 (process_stratum_target::supports_qxfer_osdata): ... this.
1215 (process_target::qxfer_osdata): Rename as ...
1216 (process_stratum_target::qxfer_osdata): ... this.
1217 (process_target::supports_qxfer_siginfo): Rename as ...
1218 (process_stratum_target::supports_qxfer_siginfo): ... this.
1219 (process_target::qxfer_siginfo): Rename as ...
1220 (process_stratum_target::qxfer_siginfo): ... this.
1221 (process_target::supports_non_stop): Rename as ...
1222 (process_stratum_target::supports_non_stop): ... this.
1223 (process_target::async): Rename as ...
1224 (process_stratum_target::async): ... this.
1225 (process_target::start_non_stop): Rename as ...
1226 (process_stratum_target::start_non_stop): ... this.
1227 (process_target::supports_multi_process): Rename as ...
1228 (process_stratum_target::supports_multi_process): ... this.
1229 (process_target::supports_fork_events): Rename as ...
1230 (process_stratum_target::supports_fork_events): ... this.
1231 (process_target::supports_vfork_events): Rename as ...
1232 (process_stratum_target::supports_vfork_events): ... this.
1233 (process_target::supports_exec_events): Rename as ...
1234 (process_stratum_target::supports_exec_events): ... this.
1235 (process_target::handle_new_gdb_connection): Rename as ...
1236 (process_stratum_target::handle_new_gdb_connection): ... this.
1237 (process_target::handle_monitor_command): Rename as ...
1238 (process_stratum_target::handle_monitor_command): ... this.
1239 (process_target::core_of_thread): Rename as ...
1240 (process_stratum_target::core_of_thread): ... this.
1241 (process_target::supports_read_loadmap): Rename as ...
1242 (process_stratum_target::supports_read_loadmap): ... this.
1243 (process_target::read_loadmap): Rename as ...
1244 (process_stratum_target::read_loadmap): ... this.
1245 (process_target::process_qsupported): Rename as ...
1246 (process_stratum_target::process_qsupported): ... this.
1247 (process_target::supports_tracepoints): Rename as ...
1248 (process_stratum_target::supports_tracepoints): ... this.
1249 (process_target::read_pc): Rename as ...
1250 (process_stratum_target::read_pc): ... this.
1251 (process_target::write_pc): Rename as ...
1252 (process_stratum_target::write_pc): ... this.
1253 (process_target::supports_thread_stopped): Rename as ...
1254 (process_stratum_target::supports_thread_stopped): ... this.
1255 (process_target::thread_stopped): Rename as ...
1256 (process_stratum_target::thread_stopped): ... this.
1257 (process_target::supports_get_tib_address): Rename as ...
1258 (process_stratum_target::supports_get_tib_address): ... this.
1259 (process_target::get_tib_address): Rename as ...
1260 (process_stratum_target::get_tib_address): ... this.
1261 (process_target::pause_all): Rename as ...
1262 (process_stratum_target::pause_all): ... this.
1263 (process_target::unpause_all): Rename as ...
1264 (process_stratum_target::unpause_all): ... this.
1265 (process_target::stabilize_threads): Rename as ...
1266 (process_stratum_target::stabilize_threads): ... this.
1267 (process_target::supports_fast_tracepoints): Rename as ...
1268 (process_stratum_target::supports_fast_tracepoints): ... this.
1269 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1270 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1271 (process_target::emit_ops): Rename as ...
1272 (process_stratum_target::emit_ops): ... this.
1273 (process_target::supports_disable_randomization): Rename as ...
1274 (process_stratum_target::supports_disable_randomization): ... this.
1275 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1276 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1277 (process_target::qxfer_libraries_svr4): Rename as ...
1278 (process_stratum_target::qxfer_libraries_svr4): ... this.
1279 (process_target::supports_agent): Rename as ...
1280 (process_stratum_target::supports_agent): ... this.
1281 (process_target::enable_btrace): Rename as ...
1282 (process_stratum_target::enable_btrace): ... this.
1283 (process_target::disable_btrace): Rename as ...
1284 (process_stratum_target::disable_btrace): ... this.
1285 (process_target::read_btrace): Rename as ...
1286 (process_stratum_target::read_btrace): ... this.
1287 (process_target::read_btrace_conf): Rename as ...
1288 (process_stratum_target::read_btrace_conf): ... this.
1289 (process_target::supports_range_stepping): Rename as ...
1290 (process_stratum_target::supports_range_stepping): ... this.
1291 (process_target::supports_pid_to_exec_file): Rename as ...
1292 (process_stratum_target::supports_pid_to_exec_file): ... this.
1293 (process_target::pid_to_exec_file): Rename as ...
1294 (process_stratum_target::pid_to_exec_file): ... this.
1295 (process_target::supports_multifs): Rename as ...
1296 (process_stratum_target::supports_multifs): ... this.
1297 (process_target::multifs_open): Rename as ...
1298 (process_stratum_target::multifs_open): ... this.
1299 (process_target::multifs_unlink): Rename as ...
1300 (process_stratum_target::multifs_unlink): ... this.
1301 (process_target::multifs_readlink): Rename as ...
1302 (process_stratum_target::multifs_readlink): ... this.
1303 (process_target::breakpoint_kind_from_pc): Rename as ...
1304 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1305 (process_target::breakpoint_kind_from_current_state): Rename as ...
1306 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1307 (process_target::thread_name): Rename as ...
1308 (process_stratum_target::thread_name): ... this.
1309 (process_target::thread_handle): Rename as ...
1310 (process_stratum_target::thread_handle): ... this.
1311 (process_target::supports_software_single_step): Rename as ...
1312 (process_stratum_target::supports_software_single_step): ... this.
1313 (process_target::supports_catch_syscall): Rename as ...
1314 (process_stratum_target::supports_catch_syscall): ... this.
1315 (process_target::get_ipa_tdesc_idx): Rename as ...
1316 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1317
1318 2020-02-20 Pedro Alves <palves@redhat.com>
1319
1320 * target.cc (set_target_ops): Simply copy the given target pointer
1321 instead of creating a copy of the pointed object.
1322
1323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1324
1325 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1326 of process_target.
1327
1328 * target.h (struct process_stratum_target): Remove the target op.
1329 (class process_target): Add the target op.
1330 (target_get_ipa_tdesc_idx): Update the macro.
1331 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1332
1333 Update the derived classes and callers below.
1334
1335 * linux-low.cc (linux_target_ops): Update.
1336 (linux_get_ipa_tdesc_idx): Turn into ...
1337 (linux_process_target::get_ipa_tdesc_idx): ... this.
1338 * linux-low.h (class linux_process_target): Update.
1339 * lynx-low.cc (lynx_target_ops): Update.
1340 * nto-low.cc (nto_target_ops): Update.
1341 * win32-low.cc (win32_target_ops): Update.
1342
1343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1344
1345 Turn process_stratum_target's supports_catch_syscall op into a
1346 method of process_target.
1347
1348 * target.h (struct process_stratum_target): Remove the target op.
1349 (class process_target): Add the target op.
1350 (target_supports_catch_syscall): Update the macro.
1351 * target.cc (process_target::supports_catch_syscall): Define.
1352
1353 Update the derived classes and callers below.
1354
1355 * linux-low.cc (linux_target_ops): Update.
1356 (linux_supports_catch_syscall): Turn into ...
1357 (linux_process_target::supports_catch_syscall): ... this.
1358 * linux-low.h (class linux_process_target): Update.
1359 * lynx-low.cc (lynx_target_ops): Update.
1360 * nto-low.cc (nto_target_ops): Update.
1361 * win32-low.cc (win32_target_ops): Update.
1362
1363 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1364
1365 Turn process_stratum_target's supports_software_single_step op
1366 into a method of process_target.
1367
1368 * target.h (struct process_stratum_target): Remove the target op.
1369 (class process_target): Add the target op.
1370 (target_supports_software_single_step): Update the macro.
1371 * target.cc (process_target::supports_software_single_step): Define.
1372
1373 Update the derived classes and callers below.
1374
1375 * linux-low.cc (linux_target_ops): Update.
1376 (linux_supports_software_single_step): Turn into ...
1377 (linux_process_target::supports_software_single_step): ... this.
1378 * linux-low.h (class linux_process_target): Update.
1379 * lynx-low.cc (lynx_target_ops): Update.
1380 * nto-low.cc (nto_target_ops): Update.
1381 * win32-low.cc (win32_target_ops): Update.
1382
1383 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1384
1385 Turn process_stratum_target's thread_name and thread_handle ops
1386 into methods of process_target.
1387
1388 * target.h (struct process_stratum_target): Remove the target ops.
1389 (class process_target): Add the target ops.
1390 (target_thread_name): Update the macro.
1391 (target_thread_handle): Update the macro.
1392 * target.cc (process_target::thread_name): Define.
1393 (process_target::thread_handle): Define.
1394
1395 Update the derived classes and callers below.
1396
1397 * linux-low.cc (linux_target_ops): Update.
1398 (linux_process_target::thread_name): Define.
1399 (linux_process_target::thread_handle): Define.
1400 * linux-low.h (class linux_process_target): Update.
1401 * lynx-low.cc (lynx_target_ops): Update.
1402 * nto-low.cc (nto_target_ops): Update.
1403 * win32-low.cc (win32_target_ops): Update.
1404
1405 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1406
1407 Turn process_stratum_target's breakpoint_kind_from_pc,
1408 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1409 ops into methods of process_target.
1410
1411 * target.h (struct process_stratum_target): Remove the target op.
1412 (class process_target): Add the target op.
1413 (target_breakpoint_kind_from_pc): Update the macro.
1414 (target_breakpoint_kind_from_current_state): Update the macro.
1415 (default_breakpoint_kind_from_pc): Remove declaration.
1416 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1417 (process_target::breakpoint_kind_from_pc): ... this.
1418 (process_target::breakpoint_kind_from_current_state): Define.
1419
1420 Update the derived classes and callers below.
1421
1422 * mem-break.cc (bp_size): Update.
1423 (bp_opcode): Update.
1424 * linux-low.cc (linux_target_ops): Update.
1425 (linux_wait_1): Update.
1426 (linux_breakpoint_kind_from_pc): Turn into ...
1427 (linux_process_target::breakpoint_kind_from_pc): ... this.
1428 (linux_sw_breakpoint_from_kind): Turn into ...
1429 (linux_process_target::sw_breakpoint_from_kind): ... this.
1430 (linux_breakpoint_kind_from_current_state): Turn into ...
1431 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1432 * linux-low.h (class linux_process_target): Update.
1433 * lynx-low.cc (lynx_target_ops): Update.
1434 (lynx_process_target::sw_breakpoint_from_kind): Define.
1435 * lynx-low.h (class lynx_process_target): Update.
1436 * nto-low.cc (nto_target_ops): Update.
1437 (nto_sw_breakpoint_from_kind): Turn into ...
1438 (nto_process_target::sw_breakpoint_from_kind): ... this.
1439 * nto-low.h (class nto_process_target): Update.
1440 * win32-low.cc (win32_target_ops): Update.
1441 (win32_sw_breakpoint_from_kind): Turn into ...
1442 (win32_process_target::sw_breakpoint_from_kind): ... this.
1443 * win32-low.h (class win32_process_target): Update.
1444
1445 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1446
1447 Turn process_stratum_target's multifs_open, multifs_readlink,
1448 multifs_unlink ops into methods of process_target.
1449
1450 * target.h (struct process_stratum_target): Remove the target ops.
1451 (class process_target): Add the target ops. Also add
1452 'supports_multifs'.
1453 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1454 "sys/stat.h".
1455 (process_target::supports_multifs): Define.
1456 (process_target::multifs_open): Define.
1457 (process_target::multifs_readlink): Define.
1458 (process_target::multifs_unlink): Define.
1459
1460 Update the derived classes and callers below.
1461
1462 * hostio.cc (handle_setfs): Update.
1463 (handle_open): Update.
1464 (handle_unlink): Update.
1465 (handle_readlink): Update.
1466 * linux-low.cc (linux_target_ops): Update.
1467 (linux_process_target::supports_multifs): Define.
1468 (linux_process_target::multifs_open): Define.
1469 (linux_process_target::multifs_readlink): Define.
1470 (linux_process_target::multifs_unlink): Define.
1471 * linux-low.h (class linux_process_target): Update.
1472 * lynx-low.cc (lynx_target_ops): Update.
1473 * nto-low.cc (nto_target_ops): Update.
1474 * win32-low.cc (win32_target_ops): Update.
1475
1476 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1477
1478 Turn process_stratum_target's pid_to_exec_file op into a method
1479 of process_target.
1480
1481 * target.h (struct process_stratum_target): Remove the target op.
1482 (class process_target): Add the target op. Also add
1483 'supports_pid_to_exec_file'.
1484 * target.cc (process_target::pid_to_exec_file): Define.
1485 (process_target::supports_pid_to_exec_file): Define.
1486
1487 Update the derived classes and callers below.
1488
1489 * server.cc (handle_qxfer_exec_file): Update.
1490 (handle_query): Update.
1491 * linux-low.cc (linux_target_ops): Update.
1492 (linux_process_target::supports_pid_to_exec_file): Define.
1493 (linux_process_target::pid_to_exec_file): Define.
1494 * linux-low.h (class linux_process_target): Update.
1495 * lynx-low.cc (lynx_target_ops): Update.
1496 * nto-low.cc (nto_target_ops): Update.
1497 * win32-low.cc (win32_target_ops): Update.
1498
1499 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1500
1501 Turn process_stratum_target's supports_range_stepping op into a
1502 method of process_target.
1503
1504 * target.h (struct process_stratum_target): Remove the target op.
1505 (class process_target): Add the target op.
1506 (target_supports_range_stepping): Update the macro.
1507 * target.cc (process_target::supports_range_stepping): Define.
1508
1509 Update the derived classes and callers below.
1510
1511 * linux-low.cc (linux_target_ops): Update.
1512 (linux_supports_range_stepping): Turn into ...
1513 (linux_process_target::supports_range_stepping): ... this.
1514 * linux-low.h (class linux_process_target): Update.
1515 * lynx-low.cc (lynx_target_ops): Update.
1516 * nto-low.cc (nto_target_ops): Update.
1517 * win32-low.cc (win32_target_ops): Update.
1518
1519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1520
1521 Turn process_stratum_target's btrace-related ops (enable_btrace,
1522 disable_btrace, read_btrace, read_btrace_conf) into methods of
1523 process_target.
1524
1525 * target.h (struct process_stratum_target): Remove the target ops.
1526 (class process_target): Add the target ops.
1527 (target_enable_btrace): Update.
1528 (target_disable_btrace): Update.
1529 (target_read_btrace): Update.
1530 (target_read_btrace_conf): Update.
1531 * target.cc (process_target::enable_btrace): Define.
1532 (process_target::disable_btrace): Define.
1533 (process_target::read_btrace): Define.
1534 (process_target::read_btrace_conf): Define.
1535
1536 Update the derived classes and callers below.
1537
1538 * linux-low.cc (linux_target_ops): Update.
1539 (linux_process_target:enable_btrace): Define as a wrapper around
1540 linux_enable_btrace.
1541 (linux_low_disable_btrace): Turn into ...
1542 (linux_process_target::disable_btrace): ... this.
1543 (linux_low_read_btrace): Turn into ...
1544 (linux_process_target::read_btrace): ... this.
1545 (linux_low_btrace_conf): Turn into ...
1546 (linux_process_target::read_btrace_conf): ... this.
1547 * linux-low.h (class linux_process_target): Update.
1548 * lynx-low.cc (lynx_target_ops): Update.
1549 * nto-low.cc (nto_target_ops): Update.
1550 * win32-low.cc (win32_target_ops): Update.
1551
1552 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1553
1554 Turn process_stratum_target's supports_agent op into a method of
1555 process_target.
1556
1557 * target.h (struct process_stratum_target): Remove the target op.
1558 (class process_target): Add the target op.
1559 (target_supports_agent): Update the macro.
1560 * target.cc (process_target::supports_agent): Define.
1561
1562 Update the derived classes and callers below.
1563
1564 * linux-low.cc (linux_target_ops): Update.
1565 (linux_supports_agent): Turn into ...
1566 (linux_process_target::supports_agent): ... this.
1567 * linux-low.h (class linux_process_target): Update.
1568 * lynx-low.cc (lynx_target_ops): Update.
1569 * nto-low.cc (nto_target_ops): Update.
1570 * win32-low.cc (win32_target_ops): Update.
1571
1572 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1573
1574 Turn process_stratum_target's qxfer_libraries_svr4 op into a
1575 method of process_target.
1576
1577 * target.h (struct process_stratum_target): Remove the target op.
1578 (class process_target): Add the target op. Also add
1579 'supports_qxfer_libraries_svr4'.
1580 * target.cc (process_target::qxfer_libraries_svr4): Define.
1581 (process_target::supports_qxfer_libraries_svr4): Define.
1582
1583 Update the derived classes and callers below.
1584
1585 * server.cc (handle_qxfer_libraries_svr4): Update.
1586 (handle_query): Update.
1587 * linux-low.cc (linux_target_ops): Update.
1588 (linux_process_target::supports_qxfer_libraries_svr4): Define.
1589 (linux_qxfer_libraries_svr4): Turn into ...
1590 (linux_process_target::qxfer_libraries_svr4): ... this.
1591 * linux-low.h (class linux_process_target): Update.
1592 * lynx-low.cc (lynx_target_ops): Update.
1593 * nto-low.cc (nto_target_ops): Update.
1594 * win32-low.cc (win32_target_ops): Update.
1595
1596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1597
1598 Turn process_stratum_target's supports_disable_randomization op
1599 into a method of process_target.
1600
1601 * target.h (struct process_stratum_target): Remove the target op.
1602 (class process_target): Add the target op.
1603 (target_supports_disable_randomization): Update the macro.
1604 * target.cc (process_target::supports_disable_randomization): Define.
1605
1606 Update the derived classes and callers below.
1607
1608 * linux-low.cc (linux_target_ops): Update.
1609 (linux_supports_disable_randomization): Turn into ...
1610 (linux_process_target::supports_disable_randomization): ... this.
1611 * linux-low.h (class linux_process_target): Update.
1612 * lynx-low.cc (lynx_target_ops): Update.
1613 * nto-low.cc (nto_target_ops): Update.
1614 * win32-low.cc (win32_target_ops): Update.
1615
1616 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1617
1618 Turn process_stratum_target's emit_ops op into a method of
1619 process_target.
1620
1621 * target.h (struct process_stratum_target): Remove the target op.
1622 (class process_target): Add the target op.
1623 (target_emit_ops): Update the macro.
1624 * target.cc (process_target::emit_ops): Define.
1625
1626 Update the derived classes and callers below.
1627
1628 * linux-low.cc (linux_target_ops): Update.
1629 (linux_emit_ops): Turn into ...
1630 (linux_process_target::emit_ops): ... this.
1631 * linux-low.h (class linux_process_target): Update.
1632 * lynx-low.cc (lynx_target_ops): Update.
1633 * nto-low.cc (nto_target_ops): Update.
1634 * win32-low.cc (win32_target_ops): Update.
1635
1636 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1637
1638 Turn process_stratum_target's install_fast_tracepoint_jump_pad
1639 and get_min_fast_tracepoint_insn_len ops into methods of
1640 process_target.
1641
1642 * target.h (struct process_stratum_target): Remove the target ops.
1643 (class process_target): Add the target ops. Also add
1644 'supports_fast_tracepoints'.
1645 (target_supports_fast_tracepoints): Update the macro.
1646 (target_get_min_fast_tracepoint_insn_len): Update the macro.
1647 (install_fast_tracepoint_jump_pad): Update and rename the macro
1648 to ...
1649 (target_install_fast_tracepoint_jump_pad): ... this.
1650 * target.cc (process_target::supports_fast_tracepoints): Define.
1651 (process_target::install_fast_tracepoint_jump_pad): Define.
1652 (process_target::get_min_fast_tracepoint_insn_len): Define.
1653
1654 Update the derived classes and callers below.
1655
1656 * tracepoint.cc (install_fast_tracepoint): Update.
1657 * linux-low.cc (linux_target_ops): Update.
1658 (linux_process_target::supports_fast_tracepoints): Define.
1659 (linux_install_fast_tracepoint_jump_pad): Turn into ...
1660 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
1661 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
1662 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
1663 * linux-low.h (class linux_process_target): Update.
1664 * lynx-low.cc (lynx_target_ops): Update.
1665 * nto-low.cc (nto_target_ops): Update.
1666 * win32-low.cc (win32_target_ops): Update.
1667
1668 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1669
1670 Turn process_stratum_target's stabilize_threads op into a
1671 method of process_target.
1672
1673 * target.h (struct process_stratum_target): Remove the target op.
1674 (class process_target): Add the target op.
1675 (target_stabilize_threads): Update the macro.
1676 * target.cc (process_target::stabilize_threads): Define.
1677
1678 Update the derived classes and callers below.
1679
1680 * server.cc (handle_status): Update.
1681 * tracepoint.cc (cmd_qtdp): Update.
1682 (cmd_qtstart): Update.
1683 * linux-low.cc (linux_target_ops): Update.
1684 (linux_stabilize_threads): Turn into ...
1685 (linux_process_target::stabilize_threads): ... this.
1686 (linux_wait_1): Update.
1687 * linux-low.h (class linux_process_target): Update.
1688 * lynx-low.cc (lynx_target_ops): Update.
1689 * nto-low.cc (nto_target_ops): Update.
1690 * win32-low.cc (win32_target_ops): Update.
1691
1692 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1693
1694 Turn process_stratum_target's pause_all and unpause_all ops
1695 into methods of process_target.
1696
1697 * target.h (struct process_stratum_target): Remove the target ops.
1698 (class process_target): Add the target ops.
1699 (pause_all): Update the macro and rename to...
1700 (target_pause_all): ... this.
1701 (unpause_all): Update the macro and rename to...
1702 (target_unpause_all): ... this.
1703 * target.cc (process_target::pause_all): Define.
1704 (process_target::unpause_all): Define.
1705
1706 Update the derived classes and callers below.
1707
1708 * server.cc (handle_status): Update.
1709 * tracepoint.cc (clear_installed_tracepoints): Update.
1710 (cmd_qtdp): Update.
1711 (cmd_qtstart): Update.
1712 (stop_tracing): Update.
1713 (cmd_qtstatus): Update.
1714 (upload_fast_traceframes): Update.
1715 (run_inferior_command): Update.
1716 * linux-low.cc (linux_target_ops): Update.
1717 (linux_pause_all): Turn into ...
1718 (linux_process_target::pause_all): ... this.
1719 (linux_unpause_all): Turn into ...
1720 (linux_process_target::unpause_all): ... this.
1721 (linux_process_target::prepare_to_access_memory): Update.
1722 (linux_process_target::done_accessing_memory): Update.
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 get_tib_address op into a method of
1731 process_target.
1732
1733 * target.h (struct process_stratum_target): Remove the target op.
1734 (class process_target): Add the target op. Also add
1735 'supports_get_tib_address'.
1736 * target.cc (process_target::get_tib_address): Define.
1737 (process_target::supports_get_tib_address): Define.
1738
1739 Update the derived classes and callers below.
1740
1741 * server.cc (handle_query): Update.
1742 * linux-low.cc (win32_target_ops): Update.
1743 * lynx-low.cc (lynx_target_ops): Update.
1744 * nto-low.cc (nto_target_ops): Update.
1745 * win32-low.cc (win32_target_ops): Update.
1746 (win32_process_target::supports_get_tib_address): Define.
1747 (win32_get_tib_address): Turn into ...
1748 (win32_process_target::get_tib_address): ... this.
1749 * win32-low.h (class win32_process_target): Update.
1750
1751 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1752
1753 Turn process_stratum_target's thread_stopped op into a method of
1754 process_target.
1755
1756 * target.h (struct process_stratum_target): Remove the target op.
1757 (class process_target): Add the target op. Also add
1758 'supports_thread_stopped'.
1759 (target_thread_stopped): Update the macro.
1760 * target.cc (process_target::thread_stopped): Define.
1761 (process_target::supports_thread_stopped): Define.
1762 (prepare_to_access_memory): Update.
1763
1764 Update the derived classes and callers below.
1765
1766 * server.cc (queue_stop_reply_callback): Update.
1767 * linux-low.cc (linux_target_ops): Update.
1768 (linux_process_target::supports_thread_stopped): Define.
1769 (linux_thread_stopped): Turn into ...
1770 (linux_process_target::thread_stopped): ... this.
1771 * linux-low.h (class linux_process_target): Update.
1772 * lynx-low.cc (lynx_target_ops): Update.
1773 * nto-low.cc (nto_target_ops): Update.
1774 * win32-low.cc (win32_target_ops): Update.
1775
1776 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1777
1778 Turn process_stratum_target's read_pc and write_pc ops into
1779 methods of process_target.
1780
1781 * target.h (struct process_stratum_target): Remove the target ops.
1782 (class process_target): Add the target ops.
1783 * target.cc (process_target::read_pc): Define.
1784 (process_target::write_pc): Define.
1785
1786 Update the derived classes and callers below.
1787
1788 * regcache.cc (regcache_read_pc): Update.
1789 (regcache_write_pc): Update.
1790 * linux-low.cc (linux_target_ops): Update.
1791 (linux_read_pc): Turn into ...
1792 (linux_process_target::read_pc): ... this.
1793 (linux_write_pc): Turn into ...
1794 (linux_process_target::write_pc): ... this.
1795 * linux-low.h (class linux_process_target): Update.
1796 * lynx-low.cc (lynx_target_ops): Update.
1797 * nto-low.cc (nto_target_ops): Update.
1798 * win32-low.cc (win32_target_ops): Update.
1799
1800 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1801
1802 Turn process_stratum_target's supports_tracepoints op into a
1803 method of process_target.
1804
1805 * target.h (struct process_stratum_target): Remove the target op.
1806 (class process_target): Add the target op.
1807 (target_supports_tracepoints): Update the macro.
1808 * target.cc (process_target::supports_tracepoints): Define.
1809
1810 Update the derived classes and callers below.
1811
1812 * linux-low.cc (linux_target_ops): Update.
1813 (linux_supports_tracepoints): Turn into ...
1814 (linux_process_target::supports_tracepoints): ... this.
1815 * linux-low.h (class linux_process_target): Update.
1816 * lynx-low.cc (lynx_target_ops): Update.
1817 * nto-low.cc (nto_target_ops): Update.
1818 * win32-low.cc (win32_target_ops): Update.
1819
1820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1821
1822 Turn process_stratum_target's process_qsupported op into a method
1823 of process_target.
1824
1825 * target.h (struct process_stratum_target): Remove the target op.
1826 (class process_target): Add the target op.
1827 (target_process_qsupported): Update the macro.
1828 * target.cc (process_target::process_qsupported): Define.
1829
1830 Update the derived classes and callers below.
1831
1832 * linux-low.cc (linux_target_ops): Update.
1833 (linux_process_qsupported): Turn into ...
1834 (linux_process_target::process_qsupported): ... this.
1835 * linux-low.h (class linux_process_target): Update.
1836 * lynx-low.cc (lynx_target_ops): Update.
1837 * nto-low.cc (nto_target_ops): Update.
1838 * win32-low.cc (win32_target_ops): Update.
1839
1840 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1841
1842 Turn process_stratum_target's read_loadmap op into a method of
1843 process_target.
1844
1845 * target.h (struct process_stratum_target): Remove the target op.
1846 (class process_target): Add the target op. Also add
1847 'supports_read_loadmap'.
1848 * target.cc (process_target::read_loadmap): Define.
1849 (process_target::supports_read_loadmap): Define.
1850
1851 Update the derived classes and callers below.
1852
1853 * server.cc (handle_qxfer_fdpic): Update.
1854 (handle_query): Update.
1855 * linux-low.cc (linux_target_ops): Update.
1856 (linux_process_target::supports_read_loadmap): Define.
1857 (linux_read_loadmap): Turn into ...
1858 (linux_process_target::read_loadmap): ... this.
1859 * linux-low.h (class linux_process_target): Update.
1860 * lynx-low.cc (lynx_target_ops): Update.
1861 * nto-low.cc (nto_target_ops): Update.
1862 * win32-low.cc (win32_target_ops): Update.
1863
1864 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1865
1866 Turn process_stratum_target's core_of_thread op into a method of
1867 process_target.
1868
1869 * target.h (struct process_stratum_target): Remove the target op.
1870 (class process_target): Add the target op.
1871 (target_core_of_thread): Update the macro.
1872 * target.cc (process_target::core_of_thread): Define.
1873
1874 Update the derived classes and callers below.
1875
1876 * linux-low.cc (linux_target_ops): Update.
1877 (linux_process_target::core_of_thread): Define.
1878 * linux-low.h (class linux_process_target): Update.
1879 * lynx-low.cc (lynx_target_ops): Update.
1880 * nto-low.cc (nto_target_ops): Update.
1881 * win32-low.cc (win32_target_ops): Update.
1882
1883 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1884
1885 Turn process_stratum_target's handle_monitor_command op into a
1886 method of process_target.
1887
1888 * target.h (struct process_stratum_target): Remove the target op.
1889 (class process_target): Add the target op.
1890 (target_handle_monitor_command): Update the macro.
1891 * target.cc (process_target::handle_monitor_command): Define.
1892
1893 Update the derived classes and callers below.
1894
1895 * server.cc (handle_query): Update.
1896 * linux-low.cc (linux_target_ops): Update.
1897 (linux_process_target::handle_monitor_command): Define.
1898 * linux-low.h (class linux_process_target): Update.
1899 * lynx-low.cc (lynx_target_ops): Update.
1900 * nto-low.cc (nto_target_ops): Update.
1901 * win32-low.cc (win32_target_ops): Update.
1902
1903 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1904
1905 Turn process_stratum_target's handle_new_gdb_connection op into a
1906 method of process_target.
1907
1908 * target.h (struct process_stratum_target): Remove the target op.
1909 (class process_target): Add the target op.
1910 (target_handle_new_gdb_connection): Update the macro.
1911 * target.cc (process_target::handle_new_gdb_connection): Define.
1912
1913 Update the derived classes and callers below.
1914
1915 * linux-low.cc (linux_target_ops): Update.
1916 (linux_handle_new_gdb_connection): Turn into ...
1917 (linux_process_target::handle_new_gdb_connection): ... this.
1918 * linux-low.h (class linux_process_target): Update.
1919 * lynx-low.cc (lynx_target_ops): Update.
1920 * nto-low.cc (nto_target_ops): Update.
1921 * win32-low.cc (win32_target_ops): Update.
1922
1923 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1924
1925 Turn process_stratum_target's supports_fork_events,
1926 supports_vfork_events, and supports_exec_events ops into methods
1927 of process_target.
1928
1929 * target.h (struct process_stratum_target): Remove the target ops.
1930 (class process_target): Add the target ops.
1931 (target_supports_fork_events): Update the macro.
1932 (target_supports_vfork_events): Update the macro.
1933 (target_supports_exec_events): Update the macro.
1934 * target.cc (process_target::supports_fork_events): Define.
1935 (process_target::supports_vfork_events): Define.
1936 (process_target::supports_exec_events): Define.
1937
1938 Update the derived classes and callers below.
1939
1940 * linux-low.cc (linux_target_ops): Update.
1941 (linux_supports_fork_events): Turn into ...
1942 (linux_process_target::supports_fork_events): ... this.
1943 (linux_supports_vfork_events): Turn into ...
1944 (linux_process_target::supports_vfork_events): ... this.
1945 (linux_supports_exec_events): Turn into ...
1946 (linux_process_target::supports_exec_events): ... this.
1947 * linux-low.h (class linux_process_target): Update.
1948 * lynx-low.cc (lynx_target_ops): Update.
1949 * nto-low.cc (nto_target_ops): Update.
1950 * win32-low.cc (win32_target_ops): Update.
1951
1952 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1953
1954 Turn process_stratum_target's supports_multi_process op into a
1955 method of process_target.
1956
1957 * target.h (struct process_stratum_target): Remove the target op.
1958 (class process_target): Add the target op.
1959 * target.cc (process_target::supports_multi_process): Define.
1960 (target_supports_multi_process): Update.
1961
1962 Update the derived classes and callers below.
1963
1964 * linux-low.cc (linux_target_ops): Update.
1965 (linux_supports_multi_process): Turn into ...
1966 (linux_process_target::supports_multi_process): ... this.
1967 * linux-low.h (class linux_process_target): Update.
1968 * lynx-low.cc (lynx_target_ops): Update.
1969 * nto-low.cc (nto_target_ops): Update.
1970 * win32-low.cc (win32_target_ops): Update.
1971
1972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1973
1974 Turn process_stratum_target's supports_non_stop, async, and
1975 start_non_stop ops into methods of process_target.
1976
1977 * target.h (struct process_stratum_target): Remove the target ops.
1978 (class process_target): Add the target ops.
1979 (target_supports_non_stop): Update the macro.
1980 (target_async): Update the macro.
1981 (start_non_stop): Remove declaration.
1982 * target.cc (process_target::supports_non_stop): Define.
1983 (process_target::async): Define.
1984 (process_target::start_non_stop): Define.
1985 (start_non_stop): Remove.
1986
1987 Update the derived classes and callers below.
1988
1989 * server.cc (handle_qxfer_siginfo): Update.
1990 (handle_query): Update.
1991 * linux-low.cc (linux_target_ops): Update.
1992 (linux_supports_non_stop): Turn into ...
1993 (linux_process_target::supports_non_stop): ... this.
1994 (linux_async): Turn into ...
1995 (linux_process_target::async): ... this.
1996 (linux_start_non_stop): Turn into ...
1997 (linux_process_target::start_non_stop): ... this.
1998 * linux-low.h (class linux_process_target): Update.
1999 * lynx-low.cc (lynx_target_ops): Update.
2000 * nto-low.cc (nto_target_ops): Update.
2001 (nto_supports_non_stop): Remove; rely on the default behavior
2002 instead.
2003 * win32-low.cc (win32_target_ops): Update.
2004
2005 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2006
2007 Turn process_stratum_target's qxfer_siginfo op into a method of
2008 process_target.
2009
2010 * target.h (struct process_stratum_target): Remove the target op.
2011 (class process_target): Add the target op. Also add
2012 'supports_qxfer_siginfo'.
2013 * target.cc (process_target::qxfer_siginfo): Define.
2014 (process_target::supports_qxfer_siginfo): Define.
2015
2016 Update the derived classes and callers below.
2017
2018 * server.cc (handle_qxfer_siginfo): Update.
2019 (handle_query): Update.
2020 * linux-low.cc (linux_target_ops): Update.
2021 (linux_process_target::supports_qxfer_siginfo): Define.
2022 (linux_xfer_siginfo): Turn into ...
2023 (linux_process_target::qxfer_siginfo): ... this.
2024 * linux-low.h (class linux_process_target): Update.
2025 * lynx-low.cc (lynx_target_ops): Update.
2026 * nto-low.cc (nto_target_ops): Update.
2027 * win32-low.cc (win32_target_ops): Update.
2028
2029 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2030
2031 Turn process_stratum_target's qxfer_osdata op into a method of
2032 process_target.
2033
2034 * target.h (struct process_stratum_target): Remove the target op.
2035 (class process_target): Add the target op. Also add
2036 'supports_qxfer_osdata'.
2037 * target.cc (process_target::qxfer_osdata): Define.
2038 (process_target::supports_qxfer_osdata): Define.
2039
2040 Update the derived classes and callers below.
2041
2042 * server.cc (handle_qxfer_osdata): Update.
2043 (handle_query): Update.
2044 * linux-low.cc (linux_target_ops): Update.
2045 (linux_process_target::supports_qxfer_osdata): Define.
2046 (linux_qxfer_osdata): Turn into ...
2047 (linux_process_target::qxfer_osdata): ... this.
2048 * linux-low.h (class linux_process_target): Update.
2049 * lynx-low.cc (lynx_target_ops): Update.
2050 * nto-low.cc (nto_target_ops): Update.
2051 * win32-low.cc (win32_target_ops): Update.
2052
2053 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2054
2055 Turn process_stratum_target's hostio_last_error op into a
2056 method of process_target.
2057
2058 * target.h (struct process_stratum_target): Remove the target op.
2059 (class process_target): Add the target op.
2060 * target.cc: Add "hostio.h" to includes.
2061 (process_target::hostio_last_error): Define.
2062
2063 Update the derived classes and callers below.
2064
2065 * hostio.cc (hostio_error): Update.
2066 * linux-low.cc: Remove "hostio.h" from includes.
2067 (linux_target_ops): Update.
2068 * lynx-low.cc (lynx_target_ops): Update.
2069 * nto-low.cc (nto_target_ops): Update.
2070 * win32-low.h (class win32_process_target): Update.
2071 * win32-low.cc (win32_target_ops): Update.
2072 (wince_hostio_last_error): Turn into ...
2073 (win32_process_target::hostio_last_error): ... this.
2074
2075 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2076
2077 Turn process_stratum_target's get_tls_address op into a method of
2078 process_target.
2079
2080 * target.h (struct process_stratum_target): Remove the target op.
2081 (class process_target): Add the target op. Also add
2082 'supports_get_tls_address'.
2083 * target.cc (process_target::get_tls_address): Define.
2084 (process_target::supports_get_tls_address): Define.
2085
2086 Update the derived classes and callers below.
2087
2088 * server.cc (handle_query): Update.
2089 * linux-low.cc (linux_target_ops): Update.
2090 (linux_process_target::supports_get_tls_address): Define.
2091 (linux_process_target::get_tls_address): Define.
2092 * linux-low.h (class linux_process_target): Update.
2093 * lynx-low.cc (lynx_target_ops): Update.
2094 * nto-low.cc (nto_target_ops): Update.
2095 * win32-low.cc (win32_target_ops): Update.
2096
2097 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2098
2099 Turn process_stratum_target's read_offsets op into a method of
2100 process_target.
2101
2102 * target.h (struct process_stratum_target): Remove the target op.
2103 (class process_target): Add the target op. Also add
2104 'supports_read_offsets'.
2105 * target.cc (process_target::read_offsets): Define.
2106 (process_target::supports_read_offsets): Define.
2107
2108 Update the derived classes and callers below.
2109
2110 * server.cc (handle_query): Update.
2111 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2112 (linux_target_ops): Update.
2113 (linux_process_target::supports_read_offsets): Define.
2114 (linux_read_offsets): Turn into ...
2115 (linux_process_target::read_offsets): ... this.
2116 * linux-low.h (class linux_process_target): Update.
2117 * lynx-low.cc (lynx_target_ops): Update.
2118 * nto-low.cc (nto_target_ops): Update.
2119 * win32-low.cc (win32_target_ops): Update.
2120
2121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2122
2123 Turn process_stratum_target's stopped_by_watchpoint and
2124 stopped_data_address ops into methods of process_target.
2125
2126 * target.h (struct process_stratum_target): Remove the target ops.
2127 (class process_target): Add the target ops.
2128 * target.cc (process_target::stopped_by_watchpoint): Define.
2129 (process_target::stopped_data_address): Define.
2130
2131 Update the derived classes and callers below.
2132
2133 * remote-utils.cc (prepare_resume_reply): Update.
2134 * linux-low.cc (linux_target_ops): Update.
2135 (linux_stopped_by_watchpoint): Turn into ...
2136 (linux_process_target::stopped_by_watchpoint): ... this.
2137 (linux_stopped_data_address): Turn into ...
2138 (linux_process_target::stopped_data_address): ... this.
2139 * linux-low.h (class linux_process_target): Update.
2140 * lynx-low.cc (lynx_target_ops): Update.
2141 * nto-low.cc (nto_target_ops): Update.
2142 (nto_stopped_by_watchpoint): Turn into ...
2143 (nto_process_target::stopped_by_watchpoint): ... this.
2144 (nto_stopped_data_address): Turn into ...
2145 (nto_process_target::stopped_data_address): ... this.
2146 * nto-low.h (class nto_process_target): Update.
2147 * win32-low.cc (win32_target_ops): Update.
2148 (win32_stopped_by_watchpoint): Turn into ...
2149 (win32_process_target::stopped_by_watchpoint): ... this.
2150 (win32_stopped_data_address): Turn into ...
2151 (win32_process_target::stopped_data_address): ... this.
2152 * win32-low.h (class win32_process_target): Update.
2153
2154 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2155
2156 Turn process_stratum_target's supports_hardware_single_step op into
2157 a method of process_target.
2158
2159 * target.h (struct process_stratum_target): Remove the target op.
2160 (class process_target): Add the target op.
2161 (target_supports_hardware_single_step): Update the macro.
2162 (target_can_do_hardware_single_step): Remove declaration.
2163 * target.cc (process_target::supports_hardware_single_step): Define.
2164 (target_can_do_hardware_single_step): Remove.
2165
2166 Update the derived classes and callers below.
2167
2168 * linux-low.h (class linux_process_target): Update.
2169 * linux-low.cc (linux_target_ops): Update.
2170 (linux_supports_hardware_single_step): Turn into ...
2171 (linux_process_target::supports_hardware_single_step): ... this.
2172 * lynx-low.h (class lynx_process_target): Update.
2173 * lynx-low.cc (lynx_target_ops): Update.
2174 (lynx_process_target::supports_hardware_single_step): Define.
2175 * nto-low.h (class nto_process_target): Update.
2176 * nto-low.cc (nto_target_ops): Update.
2177 (nto_process_target::supports_hardware_single_step): Define.
2178 * win32-low.h (class win32_process_target): Update.
2179 * win32-low.cc (win32_target_ops): Update.
2180 (win32_process_target::supports_hardware_single_step): Define.
2181
2182 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2183
2184 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2185 ops into methods of process_target.
2186
2187 * target.h (struct process_stratum_target): Remove the target ops.
2188 (class process_target): Add the target ops.
2189 (target_stopped_by_hw_breakpoint): Update the macro.
2190 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2191 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2192 (process_target::supports_stopped_by_hw_breakpoint): Define.
2193
2194 Update the derived classes and callers below.
2195
2196 * linux-low.cc (linux_target_ops): Update.
2197 (linux_stopped_by_hw_breakpoint): Turn into ...
2198 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2199 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2200 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
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 {supports_}stopped_by_sw_breakpoint
2209 ops into methods of process_target.
2210
2211 * target.h (struct process_stratum_target): Remove the target ops.
2212 (class process_target): Add the target ops.
2213 (target_stopped_by_sw_breakpoint): Update the macro.
2214 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2215 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2216 (process_target::supports_stopped_by_sw_breakpoint): Define.
2217
2218 Update the derived classes and callers below.
2219
2220 * linux-low.cc (linux_target_ops): Update.
2221 (linux_stopped_by_sw_breakpoint): Turn into ...
2222 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2223 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2224 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2225 * linux-low.h (class linux_process_target): Update.
2226 * lynx-low.cc (lynx_target_ops): Update.
2227 * nto-low.cc (nto_target_ops): Update.
2228 * win32-low.cc (win32_target_ops): Update.
2229
2230 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2231
2232 Turn process_stratum_target's insert_point and remove_point ops
2233 into methods of process_target.
2234
2235 * target.h (struct process_stratum_target): Remove the target ops.
2236 (class process_target): Add the target ops.
2237 * target.cc (process_target::insert_point): Define.
2238 (process_target::remove_point): Define.
2239
2240 Update the derived classes and callers below.
2241
2242 * mem-break.cc (set_raw_breakpoint_at): Update.
2243 (delete_raw_breakpoint): Update.
2244 (uninsert_raw_breakpoint): Update.
2245 (reinsert_raw_breakpoint): Update.
2246 * linux-low.cc (linux_target_ops): Update.
2247 (linux_insert_point): Turn into ...
2248 (linux_process_target::insert_point): ... this.
2249 (linux_remove_point): Turn into ...
2250 (linux_process_target::remove_point): ... this.
2251 * linux-low.h (class linux_process_target): Update.
2252 * lynx-low.cc (lynx_target_ops): Update.
2253 * nto-low.cc (nto_target_ops): Update.
2254 (nto_insert_point): Turn into ...
2255 (nto_process_target::insert_point): ... this.
2256 (nto_remove_point): Turn into ...
2257 (nto_process_target::remove_point): ... this.
2258 * nto-low.h (class nto_process_target): Update.
2259 * win32-low.cc (win32_target_ops): Update.
2260 (win32_insert_point): Turn into ...
2261 (win32_process_target::insert_point): ... this.
2262 (win32_remove_point): Turn into ...
2263 (win32_process_target::remove_point): ... this.
2264 * win32-low.h (class win32_process_target): Update.
2265
2266 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2267
2268 Turn process_stratum_target's supports_z_point_type op into a
2269 method of process_target.
2270
2271 * target.h (struct process_stratum_target): Remove the target op.
2272 (class process_target): Add the target op.
2273 * target.cc (process_target::supports_z_point_type): Define.
2274
2275 Update the derived classes and callers below.
2276
2277 * mem-break.cc (z_type_supported): Update.
2278 * linux-low.cc (linux_target_ops): Update.
2279 (linux_supports_z_point_type): Turn into ...
2280 (linux_process_target::supports_z_point_type): ... this.
2281 * linux-low.h (class linux_process_target): Update.
2282 * lynx-low.cc (lynx_target_ops): Update.
2283 * nto-low.cc (nto_target_ops): Update.
2284 (nto_supports_z_point_type): Turn into ...
2285 (nto_process_target::supports_z_point_type): ... this.
2286 * nto-low.h (class nto_process_target): Update.
2287 * win32-low.cc (win32_target_ops): Update.
2288 (win32_supports_z_point_type): Turn into ...
2289 (win32_process_target::supports_z_point_type): ... this.
2290 * win32-low.h (class win32_process_target): Update.
2291
2292 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2293
2294 Turn process_stratum_target's read_auxv op into a method of
2295 process_target.
2296
2297 * target.h (class process_stratum_target): Remove the target op.
2298 (struct process_target): Add the target op. Also add
2299 'supports_read_auxv'.
2300 * target.cc (process_target::read_auxv): Define.
2301 (process_target::supports_read_auxv): Define.
2302
2303 Update the derived classes and callers below.
2304
2305 * server.cc (handle_qxfer_auxv): Update.
2306 (handle_query): Update.
2307 * linux-low.cc (linux_target_ops): Update.
2308 (linux_process_target::supports_read_auxv): Define.
2309 (linux_read_auxv): Turn into ...
2310 (linux_process_target::read_auxv): ... this.
2311 * linux-low.h (class linux_process_target): Update.
2312 * lynx-low.cc (lynx_target_ops): Update.
2313 * nto-low.cc (nto_target_ops): Update.
2314 (nto_process_target::supports_read_auxv): Define.
2315 (nto_read_auxv): Turn into ...
2316 (nto_process_target::read_auxv): ... this.
2317 * nto-low.h (class nto_process_target): Update.
2318 * win32-low.cc (win32_target_ops): Update.
2319
2320 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2321
2322 Turn process_stratum_target's request_interrupt op into a method of
2323 process_target.
2324
2325 * target.h (struct process_stratum_target): Remove the target op.
2326 (class process_target): Add the target op.
2327
2328 Update the derived classes and callers below.
2329
2330 * remote-utils.cc (putpkt_binary_1): Update.
2331 (input_interrupt): Update.
2332 (getpkt): Update.
2333 * server.cc (handle_v_requests): Update.
2334 * linux-low.cc (linux_target_ops): Update.
2335 (linux_request_interrupt): Turn into ...
2336 (linux_process_target::request_interrupt): ... this.
2337 * linux-low.h (class linux_process_target): Update.
2338 * lynx-low.cc (lynx_target_ops): Update.
2339 (lynx_request_interrupt): Turn into ...
2340 (lynx_process_target::request_interrupt): ... this.
2341 * lynx-low.h (class lynx_process_target): Update.
2342 * nto-low.cc (nto_target_ops): Update.
2343 (nto_request_interrupt): Turn into ...
2344 (nto_process_target::request_interrupt): ... this.
2345 * nto-low.h (class nto_process_target): Update.
2346 * win32-low.cc (win32_target_ops): Update.
2347 (win32_request_interrupt): Turn into ...
2348 (win32_process_target::request_interrupt): ... this.
2349 * win32-low.h (class win32_process_target): Update.
2350
2351 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2352
2353 Turn process_stratum_target's look_up_symbols op into a method of
2354 process_target.
2355
2356 * target.h (struct process_stratum_target): Remove the target op.
2357 (class process_target): Add the target op.
2358 * target.cc (process_target::look_up_symbols): Define.
2359
2360 Update the derived classes and callers below.
2361
2362 * server.cc (handle_query): Update.
2363 * linux-low.cc (linux_target_ops): Update.
2364 (linux_look_up_symbols): Turn into ...
2365 (linux_process_target::look_up_symbols): ... this.
2366 * linux-low.h (class linux_process_target): Update.
2367 * lynx-low.cc (lynx_target_ops): Update.
2368 * nto-low.cc (nto_target_ops): Update.
2369 * win32-low.cc (win32_target_ops): Update.
2370
2371 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2372
2373 Turn process_stratum_target's read_memory and write_memory
2374 ops into methods of process_target.
2375
2376 * target.h (struct process_stratum_target): Remove the target ops.
2377 (class process_target): Add the target ops.
2378
2379 Update the derived classes and callers below.
2380
2381 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2382 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2383 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2384 (arm_get_syscall_trapinfo): Update.
2385 * linux-cris-low.cc (cris_breakpoint_at): Update.
2386 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2387 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2388 * linux-mips-low.cc (mips_breakpoint_at): Update.
2389 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2390 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2391 * linux-sh-low.cc (sh_breakpoint_at): Update.
2392 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2393 (sparc_store_gregset_from_stack): Update.
2394 (sparc_breakpoint_at): Update.
2395 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2396 * linux-tile-low.cc (tile_breakpoint_at): Update.
2397 * linux-x86-low.cc (x86_breakpoint_at): Update.
2398 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2399 * mem-brea.cc (insert_memory_breakpoint): Update.
2400 (validate_inserted_breakpoint): Update.
2401 * target.cc (read_inferior_memory): Update.
2402 (target_write_memory): Update.
2403 * linux-low.cc (linux_target_ops): Update.
2404 (linux_read_memory): Make a wrapper around the read_memory target
2405 op call.
2406 (linux_process_target::read_memory): Rename from linux_read_memory.
2407 (linux_write_memory): Turn into ...
2408 (linux_process_target::write_memory): ... this.
2409 * linux-low.h (class linux_process_target): Update.
2410 * lynx-low.cc (lynx_target_ops): Update.
2411 (lynx_read_memory): Turn into ...
2412 (lynx_process_target::read_memory): ... this.
2413 (lynx_write_memory): Turn into ...
2414 (lynx_process_target::write_memory): ... this.
2415 * lynx-low.h (class lynx_process_target): Update.
2416 * nto-low.cc (nto_target_ops): Update.
2417 (nto_read_memory): Turn into ...
2418 (nto_process_target::read_memory): ... this.
2419 (nto_write_memory): Turn into ...
2420 (nto_process_target::write_memory): ... this.
2421 * nto-low.h (class nto_process_target): Update.
2422 * win32-low.cc (win32_target_ops): Update.
2423 (win32_read_inferior_memory): Turn into ...
2424 (win32_process_target::read_memory): ... this.
2425 (win32_write_inferior_memory): Turn into ...
2426 (win32_process_target::write_memory): ... this.
2427 * win32-low.h (class win32_process_target): Update.
2428
2429 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2430
2431 Turn process_stratum_target's prepare_to_access_memory and
2432 done_accessing_memory ops into methods of process_target.
2433
2434 * target.h (struct process_stratum_target): Remove the target ops.
2435 (class process_target): Add the target ops.
2436 * target.cc (process_target::prepare_to_access_memory): Define.
2437 (process_target::done_accessing_memory): Define.
2438 (prepare_to_access_memory): Update.
2439 (done_accessing_memory): Update.
2440
2441 Update the derived classes and callers below.
2442
2443 * linux-low.cc (linux_target_ops): Update.
2444 (linux_prepare_to_access_memory): Turn into ...
2445 (linux_process_target::prepare_to_access_memory): ... this.
2446 (linux_done_accessing_memory): Turn into ...
2447 (linux_process_target::done_accessing_memory): ... this.
2448 * linux-low.h (class linux_process_target): Update.
2449 * lynx-low.cc (lynx_target_ops): Update.
2450 * nto-low.cc (nto_target_ops): Update.
2451 * win32-low.cc (win32_target_ops): Update.
2452
2453 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2454
2455 Turn process_stratum_target's fetch_registers and store_registers
2456 ops into methods of process_target.
2457
2458 * target.h (struct process_stratum_target): Remove the target ops.
2459 (class process_target): Add the target ops.
2460 (fetch_inferior_registers): Update the macro.
2461 (store_inferior_registers): Update the macro.
2462
2463 Update the derived classes and callers below.
2464
2465 * linux-low.cc (linux_target_ops): Update.
2466 (linux_fetch_registers): Turn into ...
2467 (linux_process_target::fetch_registers): ... this.
2468 (linux_store_registers): Turn into ...
2469 (linux_process_target::store_registers): ... this.
2470 * linux-low.h (class linux_process_target): Update.
2471 * lynx-low.cc (lynx_target_ops): Update.
2472 (lynx_fetch_registers): Turn into ...
2473 (lynx_process_target::fetch_registers): ... this.
2474 (lynx_store_registers): Turn into ...
2475 (lynx_process_target::store_registers): ... this.
2476 * lynx-low.h (class lynx_process_target): Update.
2477 * nto-low.cc (nto_target_ops): Update.
2478 (nto_fetch_registers): Turn into ...
2479 (nto_process_target::fetch_registers): ... this.
2480 (nto_store_registers): Turn into ...
2481 (nto_process_target::store_registers): ... this.
2482 * nto-low.h (class nto_process_target): Update.
2483 * win32-low.cc (win32_target_ops): Update.
2484 (win32_fetch_inferior_registers): Turn into ...
2485 (win32_process_target::fetch_registers): ... this.
2486 (win32_store_inferior_registers): Turn into ...
2487 (win32_process_target::store_registers): ... this.
2488 * win32-low.h (class win32_process_target): Update.
2489
2490 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2491
2492 Turn process_stratum_target's wait op into a method of
2493 process_target.
2494
2495 * target.h (struct process_stratum_target): Remove the target op.
2496 (class process_target): Add the target op.
2497
2498 Update the derived classes and callers below.
2499
2500 * target.cc (target_wait): Update.
2501 * linux-low.cc (linux_target_ops): Update.
2502 (linux_wait): Turn into ...
2503 (linux_process_target::wait): ... this.
2504 * linux-low.h (class linux_process_target): Update.
2505 * lynx-low.cc (lynx_target_ops): Update.
2506 (lynx_wait): Turn into ...
2507 (lynx_process_target::wait): ... this.
2508 * lynx-low.h (class lynx_process_target): Update.
2509 * nto-low.cc (nto_target_ops): Update.
2510 (nto_wait): Turn into ...
2511 (nto_process_target::wait): ... this.
2512 * nto-low.h (class nto_process_target): Update.
2513 * win32-low.cc (win32_target_ops): Update.
2514 (win32_wait): Turn into ...
2515 (win32_process_target::wait): ... this.
2516 (do_initial_child_stuff): Update.
2517 * win32-low.h (class win32_process_target): Update.
2518
2519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2520
2521 Turn process_stratum_target's resume op into a method of
2522 process_target.
2523
2524 * target.h (struct process_stratum_target): Remove the target op.
2525 (class process_target): Add the target op.
2526
2527 Update the derived classes and callers below.
2528
2529 * server.cc (resume): Update.
2530 * target.cc (target_stop_and_wait): Update.
2531 (target_continue_no_signal): Update.
2532 (target_continue): Update.
2533 * linux-low.cc (linux_target_ops): Update.
2534 (linux_resume): Turn into ...
2535 (linux_process_target::resume): ... this.
2536 * linux-low.h (class linux_process_target): Update.
2537 * lynx-low.cc (lynx_target_ops): Update.
2538 (lynx_resume): Turn into ...
2539 (lynx_process_target::resume): ... this.
2540 * lynx-low.h (class lynx_process_target): Update.
2541 * nto-low.cc (nto_target_ops): Update.
2542 (nto_resume): Turn into ...
2543 (nto_process_target::resume): ... this.
2544 * nto-low.h (class nto_process_target): Update.
2545 * win32-low.cc (win32_target_ops): Update.
2546 (win32_resume): Turn into ...
2547 (win32_process_target::resume): ... this.
2548 (win32_process_target::detach): Update.
2549 (do_initial_child_stuff): Update.
2550 * win32-low.h (class win32_process_target): Update.
2551
2552 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2553
2554 Turn process_stratum_target's thread_alive op into a method of
2555 process_target.
2556
2557 * target.h (struct process_stratum_target): Remove the target op.
2558 (class process_target): Add the target op.
2559 (mythread_alive): Update the macro.
2560
2561 Update the derived classes and callers below.
2562
2563 * linux-low.cc (linux_target_ops): Update.
2564 (linux_thread_alive): Turn into ...
2565 (linux_process_target::thread_alive): ... this.
2566 (wait_for_sigstop): Update.
2567 * linux-low.h (class linux_process_target): Update.
2568 * lynx-low.cc (lynx_target_ops): Update.
2569 (lynx_thread_alive): Turn into ...
2570 (lynx_process_target::thread_alive): ... this.
2571 * lynx-low.h (class lynx_process_target): Update.
2572 * nto-low.cc (nto_target_ops): Update.
2573 (nto_thread_alive): Turn into ...
2574 (nto_process_target::thread_alive): ... this.
2575 * nto-low.h (class nto_process_target): Update.
2576 * win32-low.cc (win32_target_ops): Update.
2577 (win32_thread_alive): Turn into ...
2578 (win32_process_target::thread_alive): ... this.
2579 * win32-low.h (class win32_process_target): Update.
2580
2581 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2582
2583 Turn process_stratum_target's join op into a method of
2584 process_target.
2585
2586 * target.h (struct process_stratum_target): Remove the target op.
2587 (class process_target): Add the target op.
2588 (join_inferior): Update the macro.
2589
2590 Update the derived classes and callers below.
2591
2592 * linux-low.cc (linux_target_ops): Update.
2593 (linux_join): Turn into ...
2594 (linux_process_target::join): ... this.
2595 * linux-low.h (class linux_process_target): Update.
2596 * lynx-low.cc (lynx_target_ops): Update.
2597 (lynx_join): Turn into ...
2598 (lynx_process_target::join): ... this.
2599 * lynx-low.h (class lynx_process_target): Update.
2600 * nto-low.cc (nto_target_ops): Update.
2601 (nto_process_target::join): Define.
2602 * nto-low.h (class nto_process_target): Update.
2603 * win32-low.cc (win32_target_ops): Update.
2604 (win32_join): Turn into ...
2605 (win32_process_target::join): ... this.
2606 * win32-low.h (class win32_process_target): Update.
2607
2608 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2609
2610 Turn process_stratum_target's mourn op into a method of
2611 process_target.
2612
2613 * target.h (struct process_stratum_target): Remove the target op.
2614 (class process_target): Add the target op.
2615
2616 Update the derived classes and callers below.
2617
2618 * target.cc (target_mourn_inferior): Update.
2619 * linux-low.cc (linux_target_ops): Update.
2620 (linux_mourn): Turn into ...
2621 (linux_process_target::mourn): ... this.
2622 (handle_extended_wait): Update.
2623 (linux_process_target::kill): Update.
2624 (linux_process_target::detach): Update.
2625 * linux-low.h (class linux_process_target): Update.
2626 * lynx-low.cc (lynx_target_ops): Update.
2627 (lynx_mourn): Turn into ...
2628 (lynx_process_target::mourn): ... this.
2629 * lynx-low.h (class lynx_process_target): Update.
2630 * nto-low.cc (nto_target_ops): Update.
2631 (nto_mourn): Turn into ...
2632 (nto_process_target::mourn): ... this.
2633 * nto-low.h (class nto_process_target): Update.
2634 * win32-low.cc (win32_target_ops): Update.
2635 (win32_mourn): Turn into ...
2636 (win32_process_target::mourn): ... this.
2637 * win32-low.h (class win32_process_target): Update.
2638
2639 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2640
2641 Turn process_stratum_target's detach op into a method of
2642 process_target.
2643
2644 * target.h (struct process_stratum_target): Remove the target op.
2645 (class process_target): Add the target op.
2646 (detach_inferior): Update the macro.
2647
2648 Update the derived classes and callers below.
2649
2650 * linux-low.cc (linux_target_ops): Update.
2651 (linux_detach): Turn into ...
2652 (linux_process_target::detach): ... this.
2653 * linux-low.h (class linux_process_target): Update.
2654 * lynx-low.cc (lynx_target_ops): Update.
2655 (lynx_detach): Turn into ...
2656 (lynx_process_target::detach): ... this.
2657 * lynx-low.h (class lynx_process_target): Update.
2658 * nto-low.cc (nto_target_ops): Update.
2659 (nto_detach): Turn into ...
2660 (nto_process_target::detach): ... this.
2661 * nto-low.h (class nto_process_target): Update.
2662 * win32-low.cc (win32_target_ops): Update.
2663 (win32_detach): Turn into ...
2664 (win32_process_target::detach): ... this.
2665 * win32-low.h (class win32_process_target): Update.
2666
2667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2668
2669 Turn process_stratum_target's kill op into a method of
2670 process_target.
2671
2672 * target.h (struct process_stratum_target): Remove the target op.
2673 (class process_target): Add the target op.
2674
2675 Update the derived classes and callers below.
2676
2677 * target.cc (kill_inferior): Update.
2678 * linux-low.cc (linux_target_ops): Update.
2679 (linux_kill): Turn into ...
2680 (linux_process_target::kill): ... this.
2681 * linux-low.h (class linux_process_target): Update.
2682 * lynx-low.cc (lynx_target_ops): Update.
2683 (lynx_kill): Turn into ...
2684 (lynx_process_target::kill): ... this.
2685 * lynx-low.h (class lynx_process_target): Update.
2686 * nto-low.cc (nto_target_ops): Update.
2687 (nto_kill): Turn into ...
2688 (nto_process_target::kill): ... this.
2689 * nto-low.h (class nto_process_target): Update.
2690 * win32-low.cc (win32_target_ops): Update.
2691 (win32_kill): Turn into ...
2692 (win32_process_target::kill): ... this.
2693 * win32-low.h (class win32_process_target): Update.
2694
2695 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2696
2697 Turn process_stratum_target's attach op into a method of
2698 process_target.
2699
2700 * target.h (struct process_stratum_target): Remove the target op.
2701 (class process_target): Add the target op.
2702 (myattach): Update the macro.
2703
2704 Update the derived classes and callers below.
2705
2706 * linux-low.cc (linux_target_ops): Update.
2707 (linux_attach): Turn into ...
2708 (linux_process_target::attach): ... this.
2709 * linux-low.h (class linux_process_target): Update.
2710 * lynx-low.cc (lynx_target_ops): Update.
2711 (lynx_attach): Turn into ...
2712 (lynx_process_target::attach): ... this.
2713 * lynx-low.h (class lynx_process_target): Update.
2714 * nto-low.cc (nto_target_ops): Update.
2715 (nto_attach): Turn into ...
2716 (nto_process_target::attach): ... this.
2717 * nto-low.h (class nto_process_target): Update.
2718 * win32-low.cc (win32_target_ops): Update.
2719 (win32_attach): Turn into ...
2720 (win32_process_target::attach): ... this.
2721 * win32-low.h (class win32_process_target): Update.
2722
2723 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2724
2725 Turn process_stratum_target's post_create_inferior op into a method
2726 of process_target.
2727
2728 * target.h (struct process_stratum_target): Remove the target op.
2729 (class process_target): Add the target op.
2730 (target_post_create_inferior): Update the macro.
2731 * target.cc (process_target::post_create_inferior): Define.
2732
2733 Update the derived classes and callers below.
2734
2735 * linux-low.cc (linux_target_ops): Update.
2736 (linux_post_create_inferior): Turn into ...
2737 (linux_process_target::post_create_inferior): ... this.
2738 * linux-low.h (class linux_process_target): Update.
2739 * lynx-low.cc (lynx_target_ops): Update.
2740 * nto-low.cc (nto_target_ops): Update.
2741 * win32-low.cc (win32_target_ops): Update.
2742
2743 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2744
2745 Turn process_stratum_target's create_inferior op into a method of
2746 process_target.
2747
2748 * target.h (struct process_stratum_target): Remove the target op.
2749 (class process_target): Add the target op.
2750 (create_inferior): Rename the macro to ...
2751 (target_create_inferior): ... this.
2752
2753 Update the derived classes and callers below.
2754
2755 * server.cc (handle_v_run): Update.
2756 (captured_main): Update.
2757 (process_serial_event): Update.
2758 * linux-low.cc (linux_target_ops): Update.
2759 (linux_create_inferior): Turn into ...
2760 (linux_process_target::create_inferior): ... this.
2761 * linux-low.h (class linux_process_target): Update.
2762 * lynx-low.cc (lynx_target_ops): Update.
2763 (lynx_create_inferior): Turn into ...
2764 (lynx_process_target::create_inferior): ... this.
2765 * lynx-low.h (class lynx_process_target): Update.
2766 * nto-low.cc (nto_target_ops): Update.
2767 (nto_create_inferior): Turn into ...
2768 (nto_process_target::create_inferior): ... this.
2769 * nto-low.h (class nto_process_target): Update.
2770 * win32-low.cc (win32_target_ops): Update.
2771 (win32_create_inferior): Turn into ...
2772 (win32_process_target::create_inferior): ... this.
2773 * win32-low.h (class win32_process_target): Update.
2774
2775 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2776
2777 * target.h (class process_target): New class definition.
2778 (struct process_stratum_target) <pt>: New field with type
2779 'process_target*'.
2780 * linux-low.h (class linux_process_target): Define as a derived
2781 class of 'process_target'.
2782 * linux-low.cc (linux_target_ops): Add a linux_process_target*
2783 as the 'pt' field.
2784 * lynx-low.h (class lynx_process_target): Define as a derived
2785 class of 'process_target'.
2786 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
2787 as the 'pt' field.
2788 * nto-low.h (class nto_process_target): Define as a derived
2789 class of 'process_target'.
2790 * nto-low.cc (nto_target_ops): Add an nto_process_target*
2791 as the 'pt' field.
2792 * win32-low.h (class win32_process_target): Define as a derived
2793 class of 'process_target'.
2794 * win32-low.cc (win32_target_ops): Add a win32_process_target*
2795 as the 'pt' field.
2796
2797 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
2798
2799 * configure: Regenerate.
2800
2801 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
2802 Andrew Burgess <andrew.burgess@embecosm.com>
2803
2804 * linux-riscv-low.cc: New file.
2805 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
2806 and nat/riscv-linux-tdesc.c.
2807 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
2808 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
2809 Define.
2810
2811 2020-02-14 Tom Tromey <tom@tromey.com>
2812
2813 * acinclude.m4: Don't include acx_configure_dir.m4.
2814 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
2815 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
2816 (all, install-only, uninstall, clean-info, clean)
2817 (maintainer-clean): Don't recurse.
2818 (subdir_do, all-lib): Remove.
2819 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
2820 (GNULIB_H): Remove.
2821 (generated_files): Update.
2822 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
2823 * configure: Rebuild.
2824 * configure.ac: Don't configure gnulib or libiberty.
2825 (GNULIB): Update.
2826
2827 2020-02-14 Eli Zaretskii <eliz@gnu.org>
2828
2829 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
2830 preparing the command line for CreateProcess.
2831 (win32_create_inferior): Reflect the program name in debugging
2832 output that shows the process and its command line.
2833
2834 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
2835
2836 * Makefile.in: Rename source files from .c to .cc.
2837 * %.c: Rename to %.cc.
2838 * configure.ac: Rename server.c to server.cc.
2839 * configure: Re-generate.
2840
2841 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
2842
2843 * Makefile.in: Rename gdbsupport source files from .c to .cc.
2844
2845 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
2846
2847 * win32-low.c (win32_create_inferior): Set signal_pid.
2848
2849 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
2850 Pedro Alves <palves@redhat.com>
2851
2852 Skip building gdbserver in a cross-configuration.
2853 * configure.srv: Set $gdbserver_host depending on whether $target
2854 is $host. Use $gdbserver_host instead of $host.
2855
2856 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2857
2858 * configure: Re-generate.
2859
2860 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2861
2862 * configure: Re-generate.
2863
2864 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2865
2866 * acinclude.m4: Update warning.m4 path.
2867
2868 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
2869
2870 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
2871 (handle_exception): Set siginfo_er.
2872 (win32_xfer_siginfo): New function.
2873
2874 2020-02-07 Tom Tromey <tom@tromey.com>
2875 Pedro Alves <palves@redhat.com>
2876
2877 * README: Update build documentation.
2878 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
2879 host, not target.
2880 * configure.ac: Update paths.
2881 * configure: Rebuild.
2882 * acinclude.m4: Update paths.
2883 * Makefile.in: Update include paths.
2884 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
2885 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
2886 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
2887 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
2888 (%-generated.c): Update paths.
2889 * Move entire directory from ../gdb/gdbserver.
2890
2891 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
2892
2893 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
2894
2895 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2896
2897 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
2898 assignment instead of srv_linux_obj.
2899
2900 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
2901
2902 * server.c (handle_qxfer_libraries): Write segment-address with
2903 paddress.
2904
2905 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
2906
2907 * Makefile.in (install-strip): New target.
2908 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
2909 * aclocal.m4: Regenerate.
2910 * configure: Regenerate.
2911 * configure.ac: Add AM_PROG_INSTALL_STRIP.
2912
2913 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
2914
2915 * Makefile.in (SFILES): Adjust paths to point to real files.
2916 (OBS): Move waitstatus.o to target/waitstatus.o.
2917 (TAGS): Transform paths appropriately.
2918 (%.o): Rename to...
2919 (nat/%.o): ... this pattern rule.
2920 (%.o): Rename to...
2921 (target/%.o): ... this pattern rule.
2922 * configure.srv: Adjust paths throughout to include nat/ prefix
2923 with the revant files.
2924 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
2925 * configure: Regenerate.
2926
2927 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
2928
2929 * Makefile.in (TAGS): Remove config files from the recipe.
2930
2931 2020-01-14 Tom Tromey <tom@tromey.com>
2932
2933 * configure: Rebuild.
2934 * configure.ac: Remove any checks that were added to common.m4.
2935 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
2936 lib-link.m4.
2937
2938 2020-01-14 Tom Tromey <tom@tromey.com>
2939
2940 * server.h: Include config.h.
2941 * gdbreplay.c: Include config.h.
2942 * configure: Rebuild.
2943 * configure.ac: Don't source common.host.
2944 * acinclude.m4: Update path.
2945 * Makefile.in (INCSUPPORT): New variable.
2946 (INCLUDE_CFLAGS): Add INCSUPPORT.
2947 (SFILES): Update paths.
2948 (version-generated.c): Update path to create-version.sh.
2949 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
2950
2951 2020-01-14 Tom Tromey <tom@tromey.com>
2952
2953 * configure.ac (LIBS): Use WIN32APILIBS.
2954 (USE_WIN32API): Don't define.
2955 * configure: Rebuild.
2956
2957 2020-01-14 Tom Tromey <tom@tromey.com>
2958
2959 * configure: Rebuild.
2960
2961 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2962
2963 * Makefile.in (%-generated.c): Remove rule for files from
2964 regformats/i386.
2965
2966 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2967
2968 * configure: Re-generate.
2969
2970 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2971
2972 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
2973 Define to static.
2974 * tracepoint.c (stop_tracing, flush_trace_buffer,
2975 about_to_request_buffer_space, get_trace_state_variable_value,
2976 set_trace_state_variable_value, gdb_collect): Add declaration.
2977
2978 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2979
2980 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
2981 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
2982 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
2983 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
2984 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
2985 static.
2986
2987 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2988
2989 * inferiors.c: Include gdbsupport/common-inferior.h.
2990
2991 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2992
2993 * hostio-errno.c: Include hostio.h.
2994
2995 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2996
2997 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
2998 prerequisite.
2999
3000 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3001
3002 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
3003 * linux-arm-tdesc.h: Include arch/arm.h.
3004
3005 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3006
3007 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
3008
3009 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
3010
3011 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
3012 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
3013
3014 2020-01-10 Pedro Alves <palves@redhat.com>
3015
3016 * fork-child.c (post_fork_inferior): Pass target down to
3017 startup_inferior.
3018 * inferiors.c (switch_to_thread): Add process_stratum_target
3019 parameter.
3020 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
3021 * nto-low.c (nto_target_ops): Now a process_stratum_target.
3022 * linux-low.c (linux_target_ops): Now a process_stratum_target.
3023 * remote-utils.c (prepare_resume_reply): Pass the target to
3024 switch_to_thread.
3025 * target.c (the_target): Now a process_stratum_target.
3026 (done_accessing_memory): Pass the target to switch_to_thread.
3027 (set_target_ops): Ajust to use process_stratum_target.
3028 * target.h (struct target_ops): Rename to ...
3029 (struct process_stratum_target): ... this.
3030 (the_target, set_target_ops): Adjust.
3031 (prepare_to_access_memory): Adjust comment.
3032 * win32-low.c (child_xfer_memory): Adjust to use
3033 process_stratum_target.
3034 (win32_target_ops): Now a process_stratum_target.
3035
3036 2020-01-06 Eli Zaretskii <eliz@gnu.org>
3037 Pedro Alves <palves@redhat.com>
3038
3039 * win32-low.c (get_child_debug_event): Extract the fatal exception
3040 from the exit status and convert to the equivalent Posix signal
3041 number.
3042 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
3043 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
3044
3045 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
3046
3047 * Makefile.in: Use INSTALL_PROGRAM_ENV.
3048
3049 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3050
3051 * server.c (gdbserver_version): Change copyright year to 2020.
3052 * gdbreplay.c (gdbreplay_version): Likewise.
3053
3054 2019-12-19 Christian Biesinger <cbiesinger@google.com>
3055
3056 * configure: Regenerate.
3057 * configure.ac: Quote variable arguments of test.
3058
3059 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3060
3061 * Makefile.in: Fix build with GNU Make 3.81
3062
3063 2019-12-16 Tom Tromey <tromey@adacore.com>
3064
3065 * server.c (get_exec_file): Constify result.
3066
3067 2019-12-10 Christian Biesinger <cbiesinger@google.com>
3068
3069 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
3070 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
3071 * config.in: Regenerate.
3072 * configure: Regenerate.
3073 * configure.ac: Don't check for strerror.
3074 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
3075 Call safe_strerror instead of strerror.
3076 * server.h (strerror): Remove this now-unnecessary declaration.
3077 * tracepoint.c (init_named_socket): Call safe_strerror instead of
3078 strerror.
3079 (gdb_agent_helper_thread): Likewise.
3080 * utils.c (perror_with_name): Likewise.
3081
3082 2019-11-26 Tom Tromey <tom@tromey.com>
3083
3084 * configure, config.in: Rebuild.
3085
3086 2019-11-26 Tom Tromey <tom@tromey.com>
3087
3088 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
3089 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
3090 gdb_sigmask.
3091 * configure, config.in: Rebuild.
3092
3093 2019-11-26 Tom Tromey <tom@tromey.com>
3094
3095 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
3096 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
3097 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
3098 * acinclude.m4: Include ax_pthread.m4.
3099 * config.in, configure: Rebuild.
3100
3101 2019-11-26 Christian Biesinger <cbiesinger@google.com>
3102
3103 * debug.c (debug_set_output): Call safe_strerror instead of
3104 strerror.
3105 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3106 (linux_kill_one_lwp): Likewise.
3107 (linux_detach_one_lwp): Likewise.
3108 (linux_wait_for_event_filtered): Likewise.
3109 (store_register): Likewise.
3110 * lynx-low.c (lynx_attach): Likewise.
3111 * mem-break.c (insert_memory_breakpoint): Likewise.
3112 (remove_memory_breakpoint): Likewise.
3113 (delete_fast_tracepoint_jump): Likewise.
3114 (set_fast_tracepoint_jump): Likewise.
3115 (uninsert_fast_tracepoint_jumps_at): Likewise.
3116 (reinsert_fast_tracepoint_jumps_at): Likewise.
3117 * nto-low.c (nto_xfer_memory): Likewise.
3118 (nto_resume): Likewise.
3119
3120 2019-11-20 Luis Machado <luis.machado@linaro.org>
3121
3122 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3123 instead of register count.
3124 * tdesc.c (tdesc_contains_feature): New function.
3125 * tdesc.h (tdesc_contains_feature): New prototype.
3126
3127 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3128
3129 * Makefile.in: Add safe-strerror.c.
3130 * configure: Regenerate.
3131 * configure.ac: Don't source common.host.
3132
3133 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3134
3135 * config.in: Regenerate.
3136 * configure: Regenerate.
3137
3138 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3139
3140 * ax.c (ax_printf): Handle size_t_arg.
3141
3142 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3143
3144 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3145 * mi/mi-main.c (output_cores): Likewise.
3146 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3147 (linux_xfer_osdata_modules): Likewise.
3148 * remote.c (register_remote_support_xml): Likewise.
3149 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3150 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3151
3152 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3153
3154 * configure: Regenerate.
3155 * configure.ac: Remove check for strerror_r.
3156
3157 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3158
3159 * config.in: Regenerate.
3160 * configure: Regenerate.
3161 * configure.ac: Also check for strerror_r.
3162
3163 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3164
3165 * ax.h (debug_agent): Remove duplicate declaration.
3166
3167 2019-10-26 Tom de Vries <tdevries@suse.de>
3168
3169 * linux-aarch64-low.c: Fix typos in comments.
3170 * linux-arm-low.c: Same.
3171 * linux-low.c: Same.
3172 * linux-ppc-low.c: Same.
3173 * proc-service.c: Same.
3174 * regcache.h: Same.
3175 * server.c: Same.
3176 * tracepoint.c: Same.
3177 * win32-low.c: Same.
3178
3179 2019-10-25 Tom Tromey <tromey@adacore.com>
3180
3181 * utils.c (xstrdup): Remove.
3182
3183 2019-10-23 Tom Tromey <tom@tromey.com>
3184
3185 * configure, config.in: Rebuild.
3186
3187 2019-10-23 Tom Tromey <tom@tromey.com>
3188
3189 * configure: Rebuild.
3190 * acinclude.m4: Use m4_include, not sinclude.
3191
3192 2019-10-17 Tom Tromey <tromey@adacore.com>
3193
3194 * configure: Rebuild.
3195 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3196 in AC_CONFIG_FILES invocation.
3197 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3198 invocation.
3199
3200 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3201
3202 * server.c: Include xml-builtin.h.
3203 (get_xml_features): Don't declare xml_builtins here.
3204
3205 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3206
3207 * Makefile.in: Remove references to vec-ipa.o.
3208
3209 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3210
3211 * Makefile.in: Remove references to vec.c.
3212
3213 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3214
3215 * server.c (server_waiting): Change to bool.
3216 (extended_protocol): Likewise.
3217 (response_needed): Likewise.
3218 (exit_requested): Likewise.
3219 (run_once): Likewise.
3220 (report_no_resumed): Likewise.
3221 (non_stop): Likewise.
3222 (disable_packet_vCont): Likewise.
3223 (disable_packet_Tthread): Likewise.
3224 (disable_packet_qC): Likewise.
3225 (disable_packet_qfThreadInfo): Likewise.
3226 (handle_general_set): Update.
3227 (handle_detach): Update.
3228 (handle_monitor_command): Update.
3229 (handle_query): Update.
3230 (captured_main): Update.
3231 (process_serial_event): Update.
3232 * server.h (server_waiting): Change to bool.
3233 (disable_packet_vCont): Likewise.
3234 (disable_packet_Tthread): Likewise.
3235 (disable_packet_qC): Likewise.
3236 (disable_packet_qfThreadInfo): Likewise.
3237 (run_once): Likewise.
3238 (non_stop): Likewise.
3239 * target.c (target_stop_and_wait): Update.
3240
3241 2019-10-02 Tom Tromey <tromey@adacore.com>
3242
3243 * Makefile.in (SFILES): Add common-inferior.c.
3244 (OBS): Add common-inferior.o.
3245 * server.c (startup_with_shell): Don't define.
3246
3247 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3248
3249 * linux-low.c (linux_low_read_btrace): Update for change to
3250 std::vector.
3251
3252 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3253
3254 * debug.c (debug_threads): Remove comment in favor of the header.
3255 * debug.h (using_threads): Add declaration.
3256 (debug_threads): Add comment.
3257 * linux-aarch64-low.c: Include debug.h and remove declaration of
3258 debug_threads.
3259 * nto-low.c: Likewise.
3260 * remote-utils.c: Likewise.
3261 * thread-db.c: Likewise.
3262
3263 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3264
3265 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3266 and powerpc-cell64l-ipa.o.
3267 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3268 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3269 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3270 (spu*-*-*): Remove.
3271
3272 * spu-low.c: Remove file.
3273
3274 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3275 (parse_spufs_run): Remove.
3276 (ppc_get_pc): Remove Cell/B.E. support.
3277 (ppc_set_pc): Likewise.
3278 (ppc_breakpoint_at): Likewise.
3279 (ppc_arch_setup): Likewise.
3280 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3281 tdesc_powerpc_cell32l.
3282 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3283 or init_registers_powerpc_cell32l.
3284 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3285 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3286 or init_registers_powerpc_cell32l.
3287 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3288 (init_registers_powerpc_cell32l): Remove prototype.
3289 (init_registers_powerpc_cell64l): Likewise.
3290
3291 * target.h (struct target_ops): Remove qxfer_spu member.
3292 * server.c (handle_qxfer_spu): Remove.
3293 (qxfer_packets): Remove entry for "spu".
3294 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3295 * linux-low.c (SPUFS_MAGIC): Remove.
3296 (spu_enumerate_spu_ids): Remove.
3297 (linux_qxfer_spu): Remove.
3298 (linux_target_ops): Remove qxfer_spu member.
3299 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3300 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3301 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3302
3303 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3304
3305 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3306 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3307 * config.in: Regenerate.
3308 * configure: Regenerate.
3309
3310 2019-08-15 Tom Tromey <tromey@adacore.com>
3311
3312 * target.c (target_write_memory): Use gdb::byte_vector.
3313
3314 2019-08-15 Tom Tromey <tromey@adacore.com>
3315
3316 * tracepoint.c (write_inferior_data_pointer)
3317 (write_inferior_integer, write_inferior_int8)
3318 (write_inferior_uinteger, m_tracepoint_action_download)
3319 (r_tracepoint_action_download, x_tracepoint_action_download)
3320 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3321 (download_agent_expr, download_tracepoint_1)
3322 (download_trace_state_variables, upload_fast_traceframes): Update.
3323 * server.c (gdb_write_memory): Update.
3324 * remote-utils.c (relocate_instruction): Update.
3325 * proc-service.c (ps_pdwrite): Update.
3326 * mem-break.c (remove_memory_breakpoint)
3327 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3328 (uninsert_fast_tracepoint_jumps_at)
3329 (reinsert_fast_tracepoint_jumps_at): Update.
3330 * linux-x86-low.c (append_insns)
3331 (i386_install_fast_tracepoint_jump_pad)
3332 (amd64_write_goto_address, i386_write_goto_address): Update.
3333 * linux-s390-low.c (append_insns, s390_write_goto_address):
3334 Update.
3335 * linux-ppc-low.c (ppc_relocate_instruction)
3336 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3337 (ppc_write_goto_address): Update.
3338 * linux-aarch64-low.c (append_insns): Update.
3339 * target.h (struct target_ops): Update.
3340 (write_inferior_memory): Don't declare.
3341 * target.c (target_write_memory): Rename from
3342 write_inferior_memory. Remove old target_write_memory.
3343
3344 2019-08-15 Tom Tromey <tromey@adacore.com>
3345
3346 * target.c (write_inferior_memory): Use std::vector.
3347
3348 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3349
3350 PR build/24886
3351 * configure.ac: Drop enable-libmcheck support.
3352 * configure, config.in: Rebuild.
3353 * acinclude.m4: Don't include it.
3354
3355 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3356
3357 * configure.srv: Remove Arm xml files.
3358
3359 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3360
3361 * configure.srv: Add new files. Remove xml generated files.
3362 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3363 registers.
3364 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3365 * linux-aarch32-tdesc.c: New file.
3366 * linux-aarch32-tdesc.h: New file.
3367 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3368 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3369 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3370 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3371 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3372 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3373 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3374 (arm_read_description): Call arm_linux_read_description.
3375 (initialize_low_arch): Don't init registers.
3376 * linux-arm-tdesc.c: New file.
3377 * linux-arm-tdesc.h: New file.
3378
3379 2019-07-10 Alan Hayward <alan.hayward@arm.com>
3380
3381 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3382 Move counter inside for.
3383 (arm_read_description): Check ptrace earlier.
3384 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3385
3386 2019-07-09 Tom Tromey <tom@tromey.com>
3387
3388 * configure: Rebuild.
3389 * configure.ac: Change common to gdbsupport.
3390 * acinclude.m4: Change common to gdbsupport.
3391 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3392 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3393 common to gdbsupport.
3394 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3395 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3396 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3397 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3398 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3399 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3400 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3401 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3402 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3403 common to gdbsupport.
3404
3405 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3406
3407 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3408 defines.
3409 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3410
3411 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3412
3413 * configure.srv: Remove legacy xml.
3414 * linux-aarch64-low.c (initialize_low_arch): Remove
3415 initialize_low_tdesc call.
3416 * linux-aarch64-tdesc-selftest.c: Remove file.
3417 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3418 * linux-x86-low.c (initialize_low_arch): Remove
3419 initialize_low_tdesc call.
3420 * linux-x86-tdesc-selftest.c: Remove file.
3421 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3422
3423 2019-06-20 Tom de Vries <tdevries@suse.de>
3424
3425 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3426 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3427
3428 2019-06-19 Tom de Vries <tdevries@suse.de>
3429
3430 * debug.h (debug_write): Change return type to ssize_t.
3431 * debug.c (debug_write): Same.
3432
3433 2019-06-14 Tom Tromey <tom@tromey.com>
3434
3435 * configure.ac: Use new path to gnulib.
3436 * configure: Rebuild.
3437 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3438 to gnulib.
3439
3440 2019-06-11 Tom Tromey <tom@tromey.com>
3441
3442 * Makefile.in (SFILES): Add alloc.c.
3443 (OBS): Add alloc.o.
3444 (IPA_OBJS): Add alloc-ipa.o.
3445 (alloc-ipa.o): New target.
3446 (%.o: ../%.c): New pattern rule.
3447
3448 2019-06-10 Tom Tromey <tromey@adacore.com>
3449
3450 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3451 end warning with a newline.
3452 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3453 newline.
3454 * thread-db.c (attach_thread): Don't end warning with a newline.
3455 (thread_db_notice_clone): Likewise.
3456 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3457 newline.
3458 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3459 end warning with a newline.
3460
3461 2019-06-04 Pedro Alves <palves@redhat.com>
3462
3463 * server.c (captured_main): Use make_unique_xstrdup.
3464
3465 2019-06-02 Tom Tromey <tom@tromey.com>
3466
3467 * gdbreplay.c (fromhex): Remove.
3468 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3469
3470 2019-05-29 Tom Tromey <tromey@adacore.com>
3471
3472 * configure: Rebuild.
3473
3474 2019-05-06 Kevin Buettner <kevinb@redhat.com>
3475
3476 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3477 sign extension code on 32-bit builds.
3478
3479 2019-05-03 Eli Zaretskii <eliz@gnu.org>
3480
3481 * remote-utils.c:
3482 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3483
3484 2019-04-19 Tom Tromey <tom@tromey.com>
3485
3486 * server.c (struct vstop_notif): Derive from notif_event.
3487 <base>: Remove.
3488 (queue_stop_reply): Update.
3489 (remove_all_on_match_ptid): Change type. Rewrite.
3490 (discard_queued_stop_replies): Rewrite.
3491 (in_queued_stop_replies_ptid): Change type.
3492 (in_queued_stop_replies): Rewrite.
3493 (notif_stop): Update.
3494 (queue_stop_reply_callback): Update.
3495 (captured_main): Don't call initialize_notif.
3496 (push_stop_notification): Update.
3497 * notif.c (notif_write_event, handle_notif_ack)
3498 (notif_event_enque, notif_push): Update.
3499 (notif_event_xfree, initialize_notif): Remove.
3500 * notif.h (struct notif_event): Include <list>, not
3501 "common/queue.h".
3502 (struct notif_server) <queue>: Now a std::list.
3503 (notif_event_p): Remove typedef.
3504 (initialize_notif): Don't declare.
3505 (struct notif_event): Add virtual destructor.
3506
3507 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3508
3509 * ax.c (ax_vdebug): Call debug_printf.
3510 * debug.c (debug_write): New function.
3511 * debug.h (debug_write): New declaration.
3512 * linux-low.c (sigchld_handler): Call debug_write.
3513
3514 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3515
3516 * debug.c (debug_set_output): New function.
3517 (debug_vprintf): Send output to debug_file.
3518 (debug_flush): Likewise.
3519 * debug.h (debug_set_output): New declaration.
3520 * server.c (handle_monitor_command): Add debug-file option.
3521 (captured_main): Likewise.
3522
3523 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3524
3525 * debug.c (remote_debug): Add definition.
3526 * debug.h (remote_debug): Add declaration.
3527 * hostio.c (remote_debug): Remove declaration.
3528 * remote-utils.c (struct ui_file): Likewise.
3529 (remote_debug): Likewise.
3530 * remote-utils.h (remote_debug): Likewise,
3531 * server.c (remote_debug): Remove definition.
3532
3533 2019-04-10 Kevin Buettner <kevinb@redhat.com>
3534
3535 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3536 when using a 64-bit gdbserver.
3537
3538 2019-04-09 Tom Tromey <tromey@adacore.com>
3539
3540 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3541
3542 2019-04-08 Tom Tromey <tom@tromey.com>
3543
3544 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3545 throw.
3546 (linux_resume_one_lwp): Likewise.
3547
3548 2019-04-08 Tom Tromey <tom@tromey.com>
3549
3550 * gdbreplay.c: Update.
3551 * linux-low.c: Update.
3552 * server.c: Update.
3553
3554 2019-04-08 Tom Tromey <tom@tromey.com>
3555
3556 * server.c: Use C++ exception handling.
3557 * linux-low.c: Use C++ exception handling.
3558 * gdbreplay.c: Use C++ exception handling.
3559
3560 2019-04-08 Tom Tromey <tom@tromey.com>
3561
3562 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
3563 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
3564 (captured_main, main): Update.
3565 * gdbreplay.c (main): Update.
3566
3567 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3568
3569 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
3570 value in argument pointer, return 1 if the entry is found and 0
3571 otherwise. Move comment.
3572 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
3573 * linux-low.h (linux_get_auxv): Declare.
3574 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
3575
3576 2019-04-05 Tom Tromey <tromey@adacore.com>
3577
3578 * server.c (gdbserver_usage): Use upper-case for metasyntactic
3579 variables.
3580
3581 2019-03-28 Alan Hayward <alan.hayward@arm.com>
3582
3583 * linux-low.c (AT_HWCAP2): Add define if not already included.
3584
3585 2019-03-26 Alan Hayward <alan.hayward@arm.com>
3586
3587 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
3588 (aarch64_arch_setup): Call linux_get_hwcap.
3589 * linux-arm-low.c (arm_get_hwcap): Remove function.
3590 (arm_read_description): Call linux_get_hwcap.
3591 * linux-low.c (linux_get_auxv): New function.
3592 (linux_get_hwcap): Likewise.
3593 (linux_get_hwcap2): Likewise.
3594 * linux-low.h (linux_get_hwcap): New declaration.
3595 (linux_get_hwcap2): Likewise.
3596 * linux-ppc-low.c (ppc_get_auxv): Remove function.
3597 (ppc_arch_setup): Call linux_get_hwcap.
3598 * linux-s390-low.c (s390_get_hwcap): Remove function.
3599 (s390_arch_setup): Call linux_get_hwcap.
3600
3601 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3602 Jiong Wang <jiong.wang@arm.com>
3603
3604 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
3605 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
3606 to fail.
3607 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
3608
3609 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3610 Jiong Wang <jiong.wang@arm.com>
3611
3612 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
3613 (aarch64_get_hwcap): New function.
3614 (aarch64_arch_setup): Read APIA hwcap.
3615
3616 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3617 Jiong Wang <jiong.wang@arm.com>
3618
3619 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
3620 (initialize_low_tracepoint): Likewise.
3621 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
3622 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
3623 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
3624 (aarch64_linux_read_description): Likewise.
3625 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
3626
3627 2019-03-12 John Baldwin <jhb@FreeBSD.org>
3628
3629 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
3630 i386_create_target_description for 'segments' parameter.
3631 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
3632 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3633 * win32-i386-low.c (i386_arch_setup): Likewise.
3634
3635 2019-03-12 Tom Tromey <tromey@adacore.com>
3636
3637 * linux-low.c (iterate_over_lwps): Update.
3638
3639 2019-03-06 Tom Tromey <tom@tromey.com>
3640
3641 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
3642 (captured_main): Use SCOPE_EXIT.
3643
3644 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
3645
3646 * configure.srv: Use '$enable_unittest' instead of '$development'
3647 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
3648 case.
3649
3650 2019-02-27 Tom Tromey <tromey@adacore.com>
3651
3652 * gdbreplay.c (logchar): Handle \r\n.
3653
3654 2019-02-07 Alan Hayward <alan.hayward@arm.com>
3655
3656 * linux-low.c (linux_attach): Add process before lwp.
3657 * server.c (attach_inferior): Check if already attached.
3658
3659 2019-02-07 Tom Tromey <tom@tromey.com>
3660
3661 * x86-tdesc.h: Rename include guard.
3662 * x86-low.h: Add include guard.
3663 * wincecompat.h: Rename include guard.
3664 * win32-low.h: Add include guard.
3665 * utils.h: Rename include guard.
3666 * tracepoint.h: Rename include guard.
3667 * tdesc.h: Rename include guard.
3668 * target.h: Rename include guard.
3669 * server.h: Rename include guard.
3670 * remote-utils.h: Rename include guard.
3671 * regcache.h: Rename include guard.
3672 * nto-low.h: Rename include guard.
3673 * notif.h: Add include guard.
3674 * mem-break.h: Rename include guard.
3675 * lynx-low.h: Add include guard.
3676 * linux-x86-tdesc.h: Add include guard.
3677 * linux-s390-tdesc.h: Add include guard.
3678 * linux-ppc-tdesc-init.h: Add include guard.
3679 * linux-low.h: Add include guard.
3680 * linux-aarch64-tdesc.h: Add include guard.
3681 * linux-aarch32-low.h: Add include guard.
3682 * inferiors.h: Rename include guard.
3683 * i387-fp.h: Rename include guard.
3684 * hostio.h: Rename include guard.
3685 * gdbthread.h: Rename include guard.
3686 * gdb_proc_service.h: Rename include guard.
3687 * event-loop.h: Rename include guard.
3688 * dll.h: Rename include guard.
3689 * debug.h: Rename include guard.
3690 * ax.h: Rename include guard.
3691
3692 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
3693
3694 PR gdb/23985
3695 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
3696 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
3697
3698 2019-01-25 Tom Tromey <tom@tromey.com>
3699
3700 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
3701
3702 2019-01-25 Tom Tromey <tom@tromey.com>
3703
3704 * win32-low.c: Fix common/ includes.
3705 * win32-i386-low.c: Fix common/ includes.
3706 * tracepoint.c: Fix common/ includes.
3707 * thread-db.c: Fix common/ includes.
3708 * target.h: Fix common/ includes.
3709 * symbol.c: Fix common/ includes.
3710 * spu-low.c: Fix common/ includes.
3711 * server.h: Fix common/ includes.
3712 * server.c: Fix common/ includes.
3713 * remote-utils.c: Fix common/ includes.
3714 * regcache.h: Fix common/ includes.
3715 * regcache.c: Fix common/ includes.
3716 * nto-x86-low.c: Fix common/ includes.
3717 * notif.h: Fix common/ includes.
3718 * mem-break.h: Fix common/ includes.
3719 * lynx-low.c: Fix common/ includes.
3720 * lynx-i386-low.c: Fix common/ includes.
3721 * linux-x86-tdesc-selftest.c: Fix common/ includes.
3722 * linux-x86-low.c: Fix common/ includes.
3723 * linux-low.c: Fix common/ includes.
3724 * inferiors.h: Fix common/ includes.
3725 * i387-fp.c: Fix common/ includes.
3726 * hostio.c: Fix common/ includes.
3727 * hostio-errno.c: Fix common/ includes.
3728 * gdbthread.h: Fix common/ includes.
3729 * gdbreplay.c: Fix common/ includes.
3730 * fork-child.c: Fix common/ includes.
3731 * event-loop.c: Fix common/ includes.
3732 * ax.c:
3733 (enum gdb_agent_op): Fix common/ includes.
3734
3735 2019-01-21 Tom Tromey <tom@tromey.com>
3736
3737 * tracepoint.c: Fix includes.
3738 * remote-utils.c: Fix includes.
3739 * linux-x86-low.c: Fix includes.
3740
3741 2019-01-01 Joel Brobecker <brobecker@adacore.com>
3742
3743 * gdbreplay.c (gdbreplay_version): Update copyright year in
3744 version message.
3745 * server.c (gdbserver_version): Likewise.
3746
3747 2018-12-05 Alan Hayward <alan.hayward@arm.com>
3748
3749 * linux-low.c (add_lwp): Switch ordering.
3750
3751 2018-11-29 Tom Tromey <tom@tromey.com>
3752
3753 * win32-low.c (win32_join): Take pid, not process.
3754 * target.h (struct target_ops) <join>: Change argument type.
3755 (join_inferior): Change argument name.
3756 * spu-low.c (spu_join): Take pid, not process.
3757 * server.c (handle_detach): Preserve pid before destroying
3758 process.
3759 * lynx-low.c (lynx_join): Take pid, not process.
3760 * linux-low.c (linux_join): Take pid, not process.
3761
3762 2018-11-23 Alan Hayward <alan.hayward@arm.com>
3763
3764 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
3765 (aarch64_cannot_fetch_register): Likewise.
3766 (struct linux_target_ops): Update references.
3767
3768 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3769
3770 * linux-ppc-low.c: Include nat/linux-ptrace.h.
3771
3772 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3773
3774 * configure.srv (ipa_ppc_linux_regobj): Add
3775 powerpc-isa207-htm-vsx32l-ipa.o and
3776 powerpc-isa207-htm-vsx64l-ipa.o.
3777 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
3778 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
3779 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
3780 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
3781 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
3782 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
3783 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
3784 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
3785 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3786 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
3787 (init_registers_powerpc_isa207_htm_vsx32l)
3788 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
3789 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
3790 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
3791 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
3792 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
3793 (ppc_store_tm_ctarregset): New functions.
3794 (ppc_regsets): Add entries for HTM regsets.
3795 (ppc_arch_setup): Set htm in features struct when needed. Set
3796 sizes for the HTM regsets.
3797 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
3798 (initialize_low_arch): Call
3799 init_registers_powerpc_isa207_htm_vsx32l and
3800 init_registers_powerpc_isa207_htm_vsx64l.
3801 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3802 PPC_TDESC_ISA207_HTM_VSX.
3803 (initialize_low_tracepoint): Call
3804 init_registers_powerpc_isa207_htm_vsx32l and
3805 init_registers_powerpc_isa207_htm_vsx64l.
3806
3807 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3808
3809 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
3810 rs6000/power-linux-pmu.xml to srv_xmlfiles.
3811 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
3812 (ppc_store_pmuregset): New functions.
3813 (ppc_regsets): Add entries for ebb and pmu regsets.
3814 (ppc_arch_setup): Set isa207 in features struct if the ebb and
3815 pmu regsets are available. Set sizes for these regsets.
3816
3817 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3818
3819 * configure.srv (ipa_ppc_linux_regobj): Add
3820 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
3821 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
3822 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
3823 rs6000/powerpc-isa207-vsx32l.xml, and
3824 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
3825 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3826 <PPC_TDESC_ISA207_VSX>: New enum value.
3827 (init_registers_powerpc_isa207_vsx32l): Declare.
3828 (init_registers_powerpc_isa207_vsx64l): Declare.
3829 * linux-ppc-low.c (ppc_fill_tarregset): New function.
3830 (ppc_store_tarregset): New function.
3831 (ppc_regsets): Add entry for the TAR regset.
3832 (ppc_arch_setup): Set isa207 in features struct when needed. Set
3833 size for the TAR regsets.
3834 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
3835 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
3836 and init_registers_powerpc_isa207_vsx64l.
3837 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
3838 (initialize_low_tracepoint): Call
3839 init_registers_powerpc_isa207_vsx32l and
3840 init_registers_powerpc_isa207_vsx64l.
3841
3842 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3843 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3844
3845 * configure.srv (ipa_ppc_linux_regobj): Add
3846 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
3847 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
3848 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
3849 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
3850 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
3851 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
3852 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
3853 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3854 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
3855 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
3856 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
3857 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
3858 (ppc_hwcap): Add comment.
3859 (ppc_hwcap2): New global.
3860 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
3861 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
3862 (ppc_regsets): Add entries for the DSCR and PPR regsets.
3863 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
3864 when needed. Set sizes for the the DSCR and PPR regsets.
3865 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
3866 (initialize_low_arch): Call
3867 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3868 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3869 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3870 PPC_TDESC_ISA205_PPR_DSCR_VSX.
3871 (initialize_low_tracepoint): Call
3872 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3873 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3874
3875 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3876
3877 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
3878
3879 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
3880 Simon Marchi <simark@simark.ca>
3881
3882 * acinclude.m4: Include "../selftest.m4".
3883 * configure: Regenerate.
3884 * configure.ac: Use "GDB_AC_SELFTEST".
3885 * configure.srv: Use "$enable_unittests" instead of
3886 "$development" when checking whether unit tests have been
3887 enabled.
3888 * server.c (captured_main): Update message informing that
3889 selftests have been disabled.
3890
3891 2018-10-04 Tom Tromey <tom@tromey.com>
3892
3893 * configure: Rebuild.
3894
3895 2018-10-04 Tom Tromey <tom@tromey.com>
3896
3897 * server.c (handle_status): Rename inner "thread".
3898 (process_serial_event): Declare "res" in 'm' case.
3899 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
3900 (iterate_over_lwps): Rename inner "thread".
3901 (linux_qxfer_libraries_svr4): Rename inner "len".
3902 * gdbthread.h (find_thread_in_random): Rename inner "thread".
3903
3904 2018-10-01 Gary Benson <gbenson@redhat.com>
3905
3906 * gdb_proc_service.h: Moved common code to
3907 common/gdb_proc_service.h.
3908
3909 2018-10-01 Gary Benson <gbenson@redhat.com>
3910
3911 * gdb_proc_service.h: Synchronize comments and whitespace with
3912 GDB's version of this file.
3913
3914 2018-09-25 Tom Tromey <tom@tromey.com>
3915
3916 * configure: Rebuild.
3917 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
3918
3919 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3920
3921 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
3922 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
3923 ($(IPA_LIB)): Sort IPA_OBJS.
3924
3925 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3926
3927 * Makefile.in: Remove references to $(ADD_DEPS).
3928
3929 2018-09-16 Tom Tromey <tom@tromey.com>
3930
3931 * remote-utils.c (remote_open): Use GNU style for metasyntactic
3932 variables.
3933 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
3934 variables.
3935
3936 2018-09-05 Tom Tromey <tom@tromey.com>
3937
3938 * configure: Rebuild.
3939
3940 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3941
3942 PR build/23399
3943 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
3944
3945 2018-08-27 Tom Tromey <tom@tromey.com>
3946
3947 PR build/23087:
3948 * configure: Rebuild.
3949
3950 2018-08-27 Tom Tromey <tom@tromey.com>
3951
3952 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
3953 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
3954 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
3955 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
3956 (s390x_emit_stack_adjust): Add casts to unsigned char.
3957
3958 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
3959
3960 PR gdb/23374
3961 PR gdb/23375
3962 * server.h (struct client_state) <disable_randomization>:
3963 Initialize to 1.
3964
3965 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3966
3967 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
3968 variable.
3969 (mips_supply_ptrace_register): Likewise.
3970
3971 2018-07-22 Tom Tromey <tom@tromey.com>
3972
3973 * configure: Rebuild.
3974
3975 2018-07-22 Tom Tromey <tom@tromey.com>
3976
3977 * win32-low.c (win32_create_inferior): Remove unused variables.
3978 * gdbreplay.c (remote_open): Remove unused variable.
3979 * remote-utils.c (remote_prepare): Remove unused variable.
3980 * x86-tdesc.h (X86_TDESC_H): Define.
3981 (amd64_expedite_regs): Define conditionally.
3982 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
3983 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
3984 * remote-utils.c (readchar): Remove unused variable.
3985
3986 2018-07-13 Pedro Alves <palves@redhat.com>
3987
3988 * linux-low.c (linux_kill): Change parameter to process_info
3989 pointer instead of pid. Adjust.
3990 * lynx-low.c (lynx_kill): Likewise.
3991 * nto-low.c (nto_kill): Likewise.
3992 * spu-low.c (spu_kill): Likewise.
3993 * win32-low.c (win32_kill): Likewise.
3994 * server.c (handle_v_kill, kill_inferior_callback)
3995 (detach_or_kill_for_exit): Adjust.
3996 * target.c (kill_inferior): Change parameter to process_info
3997 pointer instead of pid. Adjust.
3998 * target.h (struct target_ops) <kill>: Change parameter to
3999 process_info pointer instead of pid. Adjust all implementations
4000 and callers.
4001 (kill_inferior): Likewise.
4002
4003 2018-07-13 Pedro Alves <palves@redhat.com>
4004
4005 * linux-low.c (linux_detach, linux_join): Change parameter to
4006 process_info pointer instead of pid. Adjust.
4007 * lynx-low.c (lynx_detach, lynx_join): Likewise.
4008 * nto-low.c (nto_detach): Likewise.
4009 * spu-low.c (spu_detach, spu_join): Likewise.
4010 * win32-low.c (win32_detach, win32_join): Likewise.
4011 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
4012 * target.h (struct target_ops) <detach, join>: Change parameter to
4013 process_info pointer instead of pid. Adjust all implementations
4014 and callers.
4015 (detach_inferior, join_inferior): Rename 'pid' parameter to
4016 'proc'.
4017
4018 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4019 Jan Kratochvil <jan.kratochvil@redhat.com>
4020 Paul Fertser <fercerpav@gmail.com>
4021 Tsutomu Seki <sekiriki@gmail.com>
4022
4023 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
4024 (OBS): Add 'common/netstuff.o'.
4025 (GDBREPLAY_OBS): Likewise.
4026 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
4027 (remote_open): Implement support for IPv6
4028 connections.
4029 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
4030 and 'wspiapi.h'.
4031 (handle_accept_event): Accept connections from IPv6 sources.
4032 (remote_prepare): Handle IPv6-style hostnames; implement
4033 support for IPv6 connections.
4034 (remote_open): Implement support for printing connections from
4035 IPv6 sources.
4036
4037 2018-07-11 Pedro Alves <palves@redhat.com>
4038
4039 PR gdb/23377
4040 * mem-break.c (any_persistent_commands): Add process_info
4041 parameter and use it instead of relying on the current process.
4042 Change return type to bool.
4043 * mem-break.h (any_persistent_commands): Add process_info
4044 parameter and change return type to bool.
4045 * server.c (handle_detach): Remove require_running_or_return call.
4046 Look up the process_info for the process we're about to detach.
4047 If not found, return back error to GDB. Adjust
4048 any_persistent_commands call to pass down a process pointer.
4049
4050 2018-07-11 Pedro Alves <palves@redhat.com>
4051
4052 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
4053 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
4054 instead of collect_register_by_name.
4055 * regcache.c (regcache_raw_get_unsigned_by_name): New.
4056 * regcache.h (regcache_raw_get_unsigned_by_name): New.
4057
4058 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4059 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
4062
4063 2018-07-03 Tom Tromey <tom@tromey.com>
4064
4065 * linux-low.c: Update.
4066 * lynx-low.c: Update.
4067 * mem-break.c: Update.
4068 * nto-low.c: Update.
4069 * remote-utils.c: Update.
4070 * server.c: Update.
4071 * spu-low.c: Update.
4072 * target.c: Update.
4073 * win32-low.c: Update.
4074
4075 2018-07-03 Tom Tromey <tom@tromey.com>
4076
4077 * server.c: Update.
4078
4079 2018-07-03 Tom Tromey <tom@tromey.com>
4080
4081 * linux-low.c: Update.
4082
4083 2018-07-03 Tom Tromey <tom@tromey.com>
4084
4085 * target.c: Update.
4086
4087 2018-07-03 Tom Tromey <tom@tromey.com>
4088
4089 * linux-low.c: Update.
4090 * linux-mips-low.c: Update.
4091 * lynx-low.c: Update.
4092 * nto-low.c: Update.
4093 * remote-utils.c: Update.
4094 * server.c: Update.
4095 * spu-low.c: Update.
4096 * target.c: Update.
4097 * thread-db.c: Update.
4098
4099 2018-07-03 Tom Tromey <tom@tromey.com>
4100
4101 * linux-low.c: Update.
4102 * linux-mips-low.c: Update.
4103 * lynx-low.c: Update.
4104 * mem-break.c: Update.
4105 * nto-low.c: Update.
4106 * remote-utils.c: Update.
4107 * server.c: Update.
4108 * spu-low.c: Update.
4109 * target.c: Update.
4110 * tracepoint.c: Update.
4111
4112 2018-07-03 Tom Tromey <tom@tromey.com>
4113
4114 * linux-low.c: Update.
4115 * linux-ppc-low.c: Update.
4116 * linux-x86-low.c: Update.
4117 * proc-service.c: Update.
4118 * server.c: Update.
4119 * spu-low.c: Update.
4120 * thread-db.c: Update.
4121 * win32-low.c: Update.
4122
4123 2018-07-03 Tom Tromey <tom@tromey.com>
4124
4125 * linux-low.c: Update.
4126 * lynx-low.c: Update.
4127 * nto-low.c: Update.
4128 * remote-utils.c: Update.
4129 * spu-low.c: Update.
4130 * thread-db.c: Update.
4131 * win32-low.c: Update.
4132
4133 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4134
4135 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4136 parameter in call to 'amd64_create_target_description'.
4137
4138 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4139
4140 * x86-tdesc.h: Remove executable permission flag.
4141
4142 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4143
4144 * configure.ac: Remove AC_PREREQ, add missing quoting.
4145 * configure: Re-generate.
4146 * config.in: Re-generate.
4147 * aclocal.m4: Re-generate.
4148
4149 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4150
4151 * tracepoint.h (current_traceframe): Remove declaration.
4152
4153 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4154
4155 * linux-aarch64-low.c (is_sve_tdesc): New function.
4156 (aarch64_sve_regs_copy_to_regcache): Likewise.
4157 (aarch64_sve_regs_copy_from_regcache): Likewise.
4158 (aarch64_regs_info): Add SVE checks.
4159 (initialize_low_arch): Initialize SVE.
4160
4161 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4162
4163 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4164
4165 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4166
4167 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4168 (initialize_low_tracepoint): Likewise
4169 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4170 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4171 param.
4172 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4173 checks.
4174 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4175
4176 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4177
4178 * server.h (PBUFSIZ): Increase size
4179
4180 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4181
4182 * regcache.c (regcache::raw_compare): New function.
4183 * regcache.h (regcache::raw_compare): New declaration.
4184
4185 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4186
4187 * regcache.c (new_register_cache): Use new.
4188 (free_register_cache): Use delete.
4189 (register_data): Use const.
4190 (supply_register): Move body inside regcache.
4191 (regcache::raw_supply): New override function.
4192 (collect_register): Move body inside regcache.
4193 (regcache::raw_collect): New override function.
4194 (regcache::get_register_status): New override function.
4195 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4196
4197 2018-06-09 Tom Tromey <tom@tromey.com>
4198
4199 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4200 declare queue.
4201 (event_queue): Use std::queue.
4202 (gdb_event_xfree): Remove.
4203 (initialize_event_loop, process_event, wait_for_event): Update.
4204
4205 2018-06-08 Stan Cox <scox@redhat.com>
4206
4207 * win32-low.c (win32_create_inferior): last_ptid and last_status
4208 moved to client_state.
4209
4210 2018-06-08 Pedro Alves <palves@redhat.com>
4211
4212 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4213 common/common-exceptions.o, common/common-utils.o,
4214 common/errors.o, common/print-utils.o and utils.o.
4215 * gdbreplay.c: Include "common-defs.h" instead of the two
4216 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4217 string.h or alloca.h.
4218 (perror_with_name): Delete.
4219 (remote_open): Use xstrdup instead of strdup.
4220 (main): Rename to ...
4221 (captured_main): ... this.
4222 (main): New.
4223
4224 2018-06-08 Tom Tromey <tom@tromey.com>
4225
4226 * linux-low.c (linux_low_read_btrace): Update.
4227
4228 2018-06-04 Stan Cox <scox@redhat.com>
4229
4230 * server.h (struct client_state): New.
4231 * server.c (cont_thread, general_thread, multi_process)
4232 (report_fork_events, report_vfork_events, report_exec_events)
4233 (report_thread_events, swbreak_feature, hwbreak_feature)
4234 (vCont_supported, disable_randomization, pass_signals)
4235 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4236 Moved to client_state.
4237 * remote-utils.c (remote_debug, noack_mode)
4238 (transport_is_reliable): Moved to client_state.
4239 * tracepoint.c (current_traceframe): Moved to client_state.
4240
4241 Update all callers.
4242 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4243 linux-low.c, remote-utils.h, target.c: Use client_state.
4244
4245 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4246
4247 * configure.srv: Add new c/h file.
4248
4249 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4250
4251 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4252 null VQ.
4253
4254 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4255
4256 * gdb.arch/mips-fpregset-core.exp: New test.
4257 * gdb.arch/mips-fpregset-core.c: New test source.
4258
4259 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4260
4261 PR server/23198
4262 * hostio.c (require_int): Do not report overflow for integers
4263 between 0xfffffff and 0x7fffffff.
4264
4265 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4266
4267 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4268 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4269 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4270 functions.
4271 (the_low_target): Wire them.
4272
4273 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4274
4275 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4276 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4277 mode. Call collect_register_by_name with vscr using
4278 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4279 (ppc_store_vrregset): Add and set vscr_offset variable as in
4280 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4281 vscr_offset.
4282
4283 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4284
4285 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4286 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4287 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4288
4289 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4290
4291 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4292 (ppc_store_vsxregset): Likewise.
4293 (ppc_fill_vrregset): Likewise.
4294 (ppc_store_vrregset): Likewise.
4295 (ppc_fill_evrregset): Likewise.
4296 (ppc_store_evrregset): Likewise.
4297 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4298 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4299 needed.
4300
4301 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4302
4303 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4304 wordsize of the inferior. Call ppc_linux_target_wordsize.
4305
4306 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4307
4308 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4309 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4310 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4311 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4312 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4313 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4314 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4315 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4316 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4317 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4318 (tdesc_powerpc_e500l): Remove.
4319 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4320 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4321 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4322 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4323 linux-ppc-tdesc.h.
4324 (ppc_arch_setup): Remove target description matching code. Fill a
4325 ppc_linux_features struct and call ppc_linux_match_description
4326 with it.
4327
4328 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4329
4330 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4331 width of the requested register exceeds the width of the
4332 `ptrace' data type.
4333 (mips_cannot_store_register): Likewise.
4334
4335 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4336
4337 * linux-mips-low.c (mips_fetch_register): New function. Update
4338 preceding comment.
4339 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4340 (the_low_target): Wire `mips_fetch_register'.
4341
4342 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4343
4344 * lynx-i386-low.c (LYNXOS_178): New macro.
4345 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4346 the layout on LynxOS-178.
4347 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4348 handle floating point registers that are not supported by
4349 LynxOS-178.
4350
4351 2018-05-10 Tom Tromey <tom@tromey.com>
4352
4353 * configure: Rebuild.
4354
4355 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4356
4357 PR server/23158:
4358 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4359 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4360 Use it to set the expedite_regs field in the given tdesc.
4361 * x86-tdesc.h: New file.
4362 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4363 Adjust following the addition of the new expedite_regs parameter
4364 to init_target_desc.
4365 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4366 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4367 (i386_linux_read_description, amd64_linux_read_description):
4368 Adjust following the addition of the new expedite_regs parameter
4369 to init_target_desc.
4370 * lynx-i386-low.c: #include "x86-tdesc.h".
4371 (lynx_i386_arch_setup): Adjust following the addition of the new
4372 expedite_regs parameter to init_target_desc.
4373 * nto-x86-low.c: #include "x86-tdesc.h".
4374 (nto_x86_arch_setup): Adjust following the addition of the new
4375 expedite_regs parameter to init_target_desc.
4376 * win32-i386-low.c: #include "x86-tdesc.h".
4377 (i386_arch_setup): Adjust following the addition of the new
4378 expedite_regs parameter to init_target_desc.
4379
4380 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4381
4382 PR server/23158:
4383 * win32-low.c (win32_create_inferior): Add call to my_wait
4384 setting last_status global.
4385
4386 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4387
4388 PR server/23158:
4389 * win32-low.c (create_process): Only call gdb_tilde_expand if
4390 inferior_cwd is not NULL.
4391
4392 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4393
4394 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4395 registers to the cache if their values have changed.
4396 (i387_xsave_to_cache): Provide default values for x87 control
4397 registers when these features are available, but disabled.
4398 * regcache.c (supply_register_by_name_zeroed): New function.
4399 * regcache.h (supply_register_by_name_zeroed): Declare new
4400 function.
4401
4402 2018-05-07 Tom Tromey <tom@tromey.com>
4403
4404 * configure: Rebuild.
4405
4406 2018-05-04 Tom Tromey <tom@tromey.com>
4407
4408 * configure: Rebuild.
4409
4410 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4411 Pedro Alves <palves@redhat.com>
4412
4413 * linux-aarch64-low.c (aarch64_stopped_data_address):
4414 Likewise.
4415
4416 2018-04-27 Tom Tromey <tom@tromey.com>
4417
4418 * configure: Rebuild.
4419
4420 2018-04-23 Tom Tromey <tom@tromey.com>
4421
4422 * configure: Rebuild.
4423
4424 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4425
4426 * Makefile.in (depcomp): Add "..".
4427 (all_deps_files): New and use it.
4428
4429 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4430
4431 * configure.srv (aarch64*-*-linux*): Don't include xml.
4432 (i[34567]86-*-cygwin*): Likewise.
4433 (i[34567]86-*-linux*): Likewise.
4434 (i[34567]86-*-lynxos*): Likewise.
4435 (i[34567]86-*-mingw32ce*): Likewise.
4436 (i[34567]86-*-mingw*): Likewise.
4437 (i[34567]86-*-nto*): Likewise.
4438 (tic6x-*-uclinux): Likewise.
4439 (x86_64-*-linux*): Likewise.
4440 (x86_64-*-mingw*): Likewise.
4441 (x86_64-*-cygwin*): Likewise.
4442
4443 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4444
4445 * tdesc.c: Remove xml parameter.
4446
4447 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4448
4449 * server.c (get_features_xml): Remove cast.
4450 * tdesc.c (void target_desc::accept): Fill in function.
4451 (tdesc_get_features_xml): Remove old xml creation.
4452 (print_xml_feature::visit_pre): Add xml vistor.
4453 * tdesc.h (struct target_desc): Make xmltarget mutable.
4454 (tdesc_get_features_xml): Remove declaration.
4455
4456 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4457
4458 * tdesc.c (tdesc_architecture_name): Add new function.
4459 (tdesc_osabi_name): Likewise.
4460 (tdesc_get_features_xml): Use new functions.
4461
4462 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4463
4464 * tdesc.c (tdesc_create_flags): Remove.
4465 (tdesc_add_flag): Likewise.
4466 (tdesc_named_type): Likewise.
4467 (tdesc_create_union): Likewise.
4468 (tdesc_create_struct): Likewise.
4469 (tdesc_create_vector): Likewise.
4470 (tdesc_add_bitfield): Likewise.
4471 (tdesc_add_field): Likewise.
4472 (tdesc_set_struct_size): Likewise.
4473
4474 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4475
4476 * tdesc.c (~target_desc): Remove implictly deleted items.
4477 (init_target_desc): Iterate all features.
4478 (tdesc_get_features_xml): Use vector.
4479 (tdesc_create_feature): Create feature.
4480 * tdesc.h (tdesc_feature) Remove
4481 (target_desc): Add features.
4482
4483 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4484
4485 * Makefile.in: Add common/tdesc.c
4486 * tdesc.c (init_target_desc): init all reg_defs from register
4487 vector.
4488 (tdesc_create_reg): Create tdesc_reg.
4489 * tdesc.h (tdesc_feature): Add register vector.
4490
4491 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4492
4493 * tdesc.h (struct target_desc) <features>: Change type to
4494 std::vector<std::string>.
4495 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4496 changes.
4497 (tdesc_get_features_xml): Likewise.
4498 (tdesc_create_feature): Likewise.
4499
4500 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4501
4502 * regcache.c (find_register_by_number): Return a ref.
4503 (find_regno): Use references.
4504 (register_size): Likewise.
4505 (register_data): Likewise.
4506 * tdesc.c (target_desc::~target_desc): Remove free calls.
4507 (target_desc::operator==): Use std::vector compare.
4508 (init_target_desc): Use reference.
4509 (tdesc_create_reg): Use reg constructors.
4510 * tdesc.h (struct target_desc): Replace pointer with object.
4511
4512 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4513
4514 * regcache.c (find_register_by_number): Make static.
4515 (find_regno): Use find_register_by_number
4516 * regcache.h (struct reg): Remove declaration.
4517
4518 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4519
4520 * tdesc.c (target_desc::~target_desc): Move to here.
4521 (target_desc::operator==): Likewise.
4522 * tdesc.h (target_desc::~target_desc): Move from here.
4523 (target_desc::operator==): Likewise.
4524
4525 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4526
4527 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4528
4529 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4530
4531 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4532 S390_TDESC_GS.
4533 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4534 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4535 and init_registers_s390_gs_linux64.
4536
4537 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4538
4539 * linux-s390-low.c (s390_fill_gs): Remove function.
4540 (s390_fill_gsbc): Remove function.
4541 (s390_regsets): Set fill functions for the guarded storage regsets
4542 to NULL.
4543
4544 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4545
4546 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4547 the word size. Add comment.
4548 (s390_get_wordsize): New function.
4549 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4550 pswm with it. Instead, use s390_get_wordsize to determine the
4551 word size first and derive the correct tdesc from that directly.
4552
4553 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4554
4555 * Makefile.in: Include silent-rules.mk.
4556 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4557 (COMPILE): Add ECHO_CXX.
4558 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4559 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4560 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
4561 (version-generated.c): Add ECHO_GEN.
4562 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
4563 (IPAGENT_COMPILE): Add ECHO_CXX.
4564 (%-generated.c): Add ECHO_REGDAT.
4565
4566 2018-03-14 Tom Tromey <tom@tromey.com>
4567
4568 PR cli/14977:
4569 * ax.c (ax_printf): Special case for NULL.
4570
4571 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4572
4573 * linux-low.c (linux_qxfer_libraries_svr4): Use
4574 xml_escape_text_append.
4575
4576 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4577
4578 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
4579
4580 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4581
4582 * server.c (handle_general_set): Remove unnecessary xstrdup.
4583
4584 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4585
4586 * server.c (parse_debug_format_options): Adjust to
4587 delim_string_to_char_ptr_vec changes.
4588 * thread-db.c (thread_db_load_search): Adjust to
4589 dirnames_to_char_ptr_vec changes.
4590
4591 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
4592
4593 * target.h (target_enable_btrace, target_disable_btrace)
4594 (target_read_btrace, target_read_btrace_conf): Turn macro into
4595 inline function. Throw error if target method is not defined.
4596 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
4597 check for btrace target method. Be prepared to handle exceptions
4598 from btrace target methods.
4599
4600 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4601
4602 * server.c (captured_main): Change order of error message printed
4603 when the current working directory cannot be found.
4604
4605 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4606
4607 * server.c: Include "filenames.h" and "pathstuff.h".
4608 (program_name): Delete variable.
4609 (program_path): New anonymous class.
4610 (get_exec_wrapper): Use "program_path" instead of
4611 "program_name".
4612 (handle_v_run): Likewise.
4613 (captured_main): Likewise.
4614 (process_serial_event): Likewise.
4615
4616 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4617
4618 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
4619 (OBJS): Add "pathstuff.o".
4620 * server.c (current_directory): New global variable.
4621 (captured_main): Initialize "current_directory".
4622
4623 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4624
4625 * tdesc.c: Use common/tdesc.h.
4626 * tdesc.h: Likewise.
4627
4628 2018-02-20 Alan Hayward <alan.hayward@arm.com>
4629 Simon Marchi <simon.marchi@ericsson.com>
4630
4631 * Makefile.in: Switch order of make rules.
4632
4633 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4634
4635 * Makefile.in: Add common directory in build.
4636 * configure.ac: Add common reference.
4637 * configure: Regenerate.
4638
4639 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4640
4641 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
4642 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
4643 * spu-low.c (spu_target_ops): Likewise.
4644 * win32-low.c (win32_target_ops): Likewise.
4645 * server.c (supported_btrace_packets): Report packets unconditionally.
4646 * target.h (target_ops) <supports_btrace>: Remove.
4647 (target_supports_btrace): Remove.
4648
4649 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4650
4651 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
4652 (handle_btrace_disable): Change return type to void. Use exceptions
4653 to report errors.
4654 (handle_btrace_general_set): Catch exception and copy message to
4655 return message.
4656
4657 2018-02-08 Tom Tromey <tom@tromey.com>
4658
4659 * linux-low.c (install_software_single_step_breakpoints): Use
4660 make_scoped_restore.
4661 * inferiors.c (make_cleanup_restore_current_thread): Remove.
4662 (do_restore_current_thread_cleanup): Remove.
4663 * gdbthread.h (make_cleanup_restore_current_thread): Don't
4664 declare.
4665
4666 2018-02-08 Tom Tromey <tom@tromey.com>
4667
4668 * mem-break.c (set_raw_breakpoint_at): Use
4669 gdb::unique_xmalloc_ptr.
4670
4671 2018-01-30 Pedro Alves <palves@redhat.com>
4672
4673 PR gdb/13211
4674 * target.c (target_terminal::terminal_state): Rename to ...
4675 (target_terminal::m_terminal_state): ... this.
4676
4677 2018-01-19 James Clarke <jrtc27@jrtc27.com>
4678
4679 * linux-low.c (handle_extended_wait): Surround call to
4680 thread_db_notice_clone with #ifdef USE_THREAD_DB.
4681
4682 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
4683
4684 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
4685 linux_ptrace_attach_fail_reason_string now returning an
4686 std::string.
4687 (linux_attach): Likewise.
4688 * thread-db.c (attach_thread): Likewise.
4689
4690 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
4691
4692 PR gdb/21559
4693 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
4694 checking for fs_base/gs_base fields in struct user_regs_struct.
4695 * configure: Regenerate.
4696
4697 2018-01-16 Yao Qi <yao.qi@linaro.org>
4698
4699 PR gdb/18749
4700 * linux-low.c (fetch_register): Call supply_register instead of
4701 error.
4702
4703 2018-01-08 Yao Qi <yao.qi@linaro.org>
4704 Simon Marchi <simon.marchi@ericsson.com>
4705
4706 * Makefile.in (OBS): Remove selftest.o.
4707 * configure.ac: Set srv_selftest_objs if $development is true.
4708 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
4709 * configure: Re-generated.
4710 * server.c (captured_main): Wrap variable selftest_filter with
4711 GDB_SELF_TEST.
4712
4713 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4714
4715 * server.c (parse_debug_format_options): Return std::string.
4716 (handle_monitor_command, captured_main): Adjust.
4717
4718 2018-01-05 Pedro Alves <palves@redhat.com>
4719
4720 PR gdb/18653
4721 * server.c (captured_main): Pass quiet=false to
4722 save_original_signals_state.
4723
4724 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4725
4726 * gdbreplay.c (gdbreplay_version): Update copyright year in
4727 version message.
4728 * server.c (gdbserver_version): Likewise.
4729
4730 2017-12-08 Tom Tromey <tom@tromey.com>
4731
4732 * ax.c (ax_printf): Update.
4733
4734 2017-12-07 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
4737 aarch64_linux_read_description.
4738 * linux-amd64-ipa.c (idx2mask): New array.
4739 (get_ipa_tdesc): Move idx2mask out.
4740 (initialize_low_tracepoint): Initialize target descriptions.
4741 * linux-i386-ipa.c (idx2mask): New array.
4742 (get_ipa_tdesc): Move idx2mask out.
4743 (initialize_low_tracepoint): Initialize target descriptions.
4744
4745 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
4746
4747 * tdesc.c (struct tdesc_type): Change return type.
4748 (tdesc_add_flag): Change parameter type.
4749 (tdesc_add_bitfield): Likewise.
4750 (tdesc_add_field): Likewise.
4751 (tdesc_set_struct_size): Likewise.
4752
4753 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
4754
4755 * regcache.c (registers_to_string): Remove unused variable.
4756
4757 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4758
4759 * inferiors.c (for_each_inferior_with_data): Remove.
4760 * inferiors.h (for_each_inferior_with_data): Remove.
4761 * server.c (handle_qxfer_threads_worker): Change parameter type.
4762 (handle_qxfer_threads_proper): Use for_each_thread.
4763
4764 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4765
4766 * inferiors.c (for_each_inferior): Remove.
4767 (clear_inferiors): Use for_each_thread.
4768 * inferiors.h (for_each_inferior): Remove.
4769 * linux-low.c (linux_wait_for_event_filtered): Use
4770 for_each_thread.
4771 (linux_stabilize_threads): Likewise.
4772 * regcache.c (regcache_release): Likewise.
4773 * server.c (gdb_wants_all_threads_stopped): Likewise.
4774 (clear_pending_status_callback): Remove.
4775 (handle_status): Use for_each_thread.
4776 (captured_main): Likewise.
4777 * win32-low.c (child_init_thread_list): Likewise.
4778 (win32_clear_inferiors): Likewise.
4779 (fake_breakpoint_event): Likewise.
4780
4781 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4782
4783 * inferiors.h (find_inferior): Remove.
4784 * inferiors.c (find_inferior): Remove.
4785
4786 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4787
4788 * linux-low.c (resume_status_pending_p): Update comment.
4789 (need_step_over_p): Update comment.
4790
4791 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4792
4793 * linux-low.c (proceed_one_lwp): Return void, change parameter
4794 type.
4795 (unsuspend_and_proceed_one_lwp): Likewise.
4796 (proceed_all_lwps): Use for_each_thread.
4797 (unstop_all_lwps): Likewise.
4798
4799 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4800
4801 * linux-low.c (linux_resume_one_thread): Return void, take
4802 parameter directly.
4803 (linux_resume): Use for_each_thread.
4804
4805 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4806
4807 * linux-low.c (send_sigstop_callback): Return void, change
4808 parameter type. Rename to...
4809 (send_sigstop): ... this.
4810 (suspend_and_send_sigstop_callback): Return void, change parameter
4811 type. Rename to...
4812 (suspend_and_send_sigstop): ... this.
4813 (stop_all_lwps): Use for_each_thread.
4814
4815 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4816
4817 * linux-low.c (lwp_running): Return bool, remove unused
4818 argument.
4819 (linux_stabilize_threads): Use find_thread.
4820
4821 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4822
4823 * linux-low.c (select_singlestep_lwp_callback): Remove.
4824 (count_events_callback): Remove.
4825 (select_event_lwp_callback): Remove.
4826 (select_event_lwp): Use find_thread/for_each_thread.
4827
4828 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4829
4830 * linux-low.c (not_stopped_callback): Return bool, take filter
4831 argument directly.
4832 (linux_wait_for_event_filtered): Use find_thread.
4833 (linux_wait_1): Likewise.
4834
4835 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4836
4837 * linux-low.c (same_lwp): Remove.
4838 (find_lwp_pid): Use find_thread.
4839
4840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4841
4842 * linux-low.c (delete_lwp_callback): Remove.
4843 (linux_mourn): Use for_each_thread.
4844
4845 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4846
4847 * linux-low.c (linux_detach_lwp_callback): Return void, remove
4848 args parameter, don't check for pid.
4849 (linux_detach): Use for_each_thread.
4850
4851 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4852
4853 * linux-low.c (struct counter): Remove.
4854 (second_thread_of_pid_p): Remove.
4855 (last_thread_of_process_p): Use find_thread.
4856
4857 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4858
4859 * inferiors.c (find_inferior_in_random): Remove.
4860 * inferiors.h (find_inferior_in_random): Remove.
4861 * linux-low.c (status_pending_p_callback): Return bool, accept
4862 parameter ptid directly.
4863 (linux_wait_for_event_filtered): Use find_thread_in_random.
4864 (linux_wait_1): Likewise.
4865
4866 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4867
4868 * inferiors.c (find_inferior_id): Remove.
4869 (find_thread_ptid): Move implemention from find_inferior_id to
4870 here.
4871 * inferiors.h (find_inferior_id): Remove.
4872 * server.c (handle_status): Use find_thread_ptid.
4873 (process_serial_event): Likewise.
4874 * thread-db.c (find_one_thread): Likewise.
4875 (thread_db_thread_handle): Likewise.
4876 * win32-low.c (thread_rec): Likewise.
4877 (child_delete_thread): Likewise.
4878 (win32_thread_alive): Likewise.
4879 (get_child_debug_event): Likewise.
4880
4881 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4882
4883 * linux-mips-low.c (update_watch_registers_callback): Return
4884 void, remove pid_p parameter, don't check for pid.
4885 (mips_insert_point, mips_remove_point): Use for_each_thread.
4886
4887 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4888
4889 * lynx.low (lynx_delete_thread_callback): Remove.
4890 (lynx_mourn): Use for_each_thread.
4891
4892 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4893
4894 * regcache.c (regcache_invalidate_one): Remove.
4895 (regcache_invalidate_pid): use for_each_thread.
4896
4897 2017-11-26 Tom Tromey <tom@tromey.com>
4898
4899 * linux-low.c (linux_create_inferior): Update.
4900
4901 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
4902
4903 * spu-low.c (spu_create_inferior): Fix typo in argument name.
4904
4905 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4906
4907 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
4908 * linux-aarch64-low.c (initialize_low_arch): Call init func.
4909 * linux-aarch64-tdesc-selftest.c: New file.
4910 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
4911
4912 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4913
4914 * configure.srv: Add new file.
4915 * linux-aarch64-low.c (initialize_low_arch): Call init func.
4916 * linux-aarch64-tdesc-selftest.c: New file.
4917 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
4918
4919 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4920
4921 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
4922 * linux-aarch64-low.c (initialize_low_arch): Remove init.
4923 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
4924
4925 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4926
4927 * configure.srv: Add new files.
4928 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
4929 aarch64_linux_read_description.
4930 * linux-aarch64-low.c (aarch64_linux_read_description):
4931 Merge with aarch64_arch_setup.
4932 (aarch64_arch_setup): Call aarch64_linux_read_description.
4933 * linux-aarch64-tdesc.c: New file.
4934 * linux-aarch64-tdesc.h: New file.
4935
4936 2017-11-24 Yao Qi <yao.qi@linaro.org>
4937
4938 * configure.srv: Set $srv_regobj for tic6x-linux.
4939 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
4940 (tic6x_read_description): Move some code to tic6x_arch_setup.
4941 (tic6x_tdesc_test): New function.
4942 (initialize_low_arch): Call selftests::register_test.
4943
4944 2017-11-22 Yao Qi <yao.qi@linaro.org>
4945
4946 * remote-utils.c (prepare_resume_reply): Use memcpy.
4947
4948 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4949
4950 * linux-low.c (kill_one_lwp_callback): Return void, take
4951 argument directly, don't filter on pid.
4952 (linux_kill): Use for_each_thread.
4953
4954 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4955
4956 * linux-low.c (need_step_over_p): Return bool, remove dummy
4957 argument.
4958 (linux_resume, proceed_all_lwps): Use find_thread.
4959
4960 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4961
4962 * linux-low.c (resume_status_pending_p): Return bool, remove
4963 flag_p argument.
4964 (linux_resume): Use find_thread.
4965
4966 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4967
4968 * linux-low.c (struct thread_resume_array): Remove.
4969 (linux_set_resume_request): Return void, take arguments
4970 directly.
4971 (linux_resume): Use for_each_thread.
4972
4973 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4974
4975 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
4976 return bool, remove data argument.
4977 (linux_stabilize_threads): Use find_thread.
4978
4979 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4980
4981 * linux-low.c (unsuspend_one_lwp): Remove.
4982 (unsuspend_all_lwps): Use for_each_thread, inline code from
4983 unsuspend_one_lwp.
4984
4985 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4986
4987 * gdbthread.h (find_thread): Add overload with ptid_t filter.
4988 * linux-low.c (struct iterate_over_lwps_args): Remove.
4989 (iterate_over_lwps_filter): Remove.
4990 (iterate_over_lwps): Use find_thread.
4991
4992 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4993
4994 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
4995 (linux_handle_new_gdb_connection): Use for_each_thread, inline
4996 code from reset_lwp_ptrace_options_callback.
4997
4998 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4999
5000 * linux-arm-low.c (struct update_registers_data): Remove.
5001 (update_registers_callback): Return void, take arguments
5002 directly, don't check thread's pid.
5003 (arm_insert_point, arm_remove_point): Use for_each_thread.
5004
5005 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5006
5007 * win32-low.c (continue_one_thread): Return void, take argument
5008 directly.
5009 (child_continue): Use for_each_thread.
5010
5011 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
5012
5013 * win32-i386-low.c (update_debug_registers_callback): Rename
5014 to ...
5015 (update_debug_registers): ... this, return void, remove pid_p arg.
5016 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
5017
5018 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5019
5020 * inferiors.h (struct process_info): Add constructor, initialize
5021 fields..
5022 <syscalls_to_catch>: Change type to std::vector<int>.
5023 * inferiors.c (add_process): Allocate process_info with new.
5024 (remove_process): Free process_info with delete.
5025 * linux-low.c (handle_extended_wait): Adjust.
5026 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
5027 * server.c (handle_general_set): Adjust.
5028
5029 2017-11-16 Pedro Alves <palves@redhat.com>
5030
5031 * remote-utils.c (remote_close): Block SIGIO signals instead of
5032 uninstalling the SIGIO handler.
5033
5034 2017-11-16 Alan Hayward <alan.hayward@arm.com>
5035
5036 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
5037
5038 2017-11-16 Yao Qi <yao.qi@linaro.org>
5039
5040 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
5041 (tic6x_store_gregset): Likewise.
5042 (tic6x_usrregs_info): Move it up.
5043
5044 2017-11-15 Alan Hayward <alan.hayward@arm.com>
5045
5046 * Makefile.in: Update arch rules.
5047 * configure.srv: Explicitly mark arch/ files.
5048
5049 2017-11-13 Andreas Schwab <schwab@suse.de>
5050
5051 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
5052 function.
5053 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5054
5055 2017-11-06 Pedro Alves <palves@redhat.com>
5056
5057 * config.in, configure: Regenerate.
5058
5059 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5060
5061 * target.c (struct thread_search): Remove.
5062 (thread_search_callback): Remove.
5063 (prepare_to_access_memory): Use for_each_thread instead of
5064 find_inferior. Inline code from thread_search_callback.
5065
5066 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5067
5068 * server.c (struct visit_actioned_threads_data): Remove.
5069 (visit_actioned_threads): Change prototype to take arguments
5070 directly.
5071 (resume): Use find_thread instead of find_inferior.
5072
5073 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
5074
5075 * server.c (queue_stop_reply_callback): Change prototype, return
5076 void.
5077 (find_status_pending_thread_callback): Remove.
5078 (handle_status): Replace find_inferior with find_thread and
5079 for_each_thread.
5080
5081 2017-10-25 Alan Hayward <alan.hayward@arm.com>
5082
5083 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5084 with REGNO.
5085 (aarch64_store_gregset): Likewise.
5086 (aarch64_fill_fpregset): Likewise.
5087 (aarch64_store_fpregset): Likewise.
5088
5089 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
5090
5091 * gdbthread.h (find_thread, for_each_thread): New functions.
5092 * inferiors.c (thread_of_pid): Remove.
5093 (find_any_thread_of_pid): Use find_thread.
5094 * linux-low.c (num_lwps): Use for_each_thread.
5095
5096 2017-10-17 Yao Qi <yao.qi@linaro.org>
5097
5098 * Makefile.in: Remove one rule.
5099 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
5100
5101 2017-10-17 Yao Qi <yao.qi@linaro.org>
5102
5103 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5104 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5105
5106 2017-10-17 Yao Qi <yao.qi@linaro.org>
5107
5108 * configure.srv: Rename arm.o with arch/arm.o.
5109
5110 2017-10-17 Yao Qi <yao.qi@linaro.org>
5111
5112 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5113 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5114 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5115 (arch-i386.o, arch-amd64.o): Remove rules.
5116 (arch/%.o): New rule.
5117 Update POSTCOMPILE and COMPILE.pre.
5118 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5119 * configure: Re-generated.
5120 * configure.srv: Replace arch-i386.o with arch/i386.o.
5121 Replace arch-amd64.o with arch/amd64.o.
5122
5123 2017-10-16 Yao Qi <yao.qi@linaro.org>
5124
5125 * configure: Regenerated.
5126
5127 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5128
5129 * inferiors.h: (struct inferior_list): Remove.
5130 (struct inferior_list_entry); Remove.
5131 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5132 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5133 get_first_inferior): Remove.
5134 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5135 find_inferior_id, find_inferior_in_random): Change signature.
5136 * inferiors.c (all_threads): Change type to
5137 std::list<thread_info *>.
5138 (get_thread): Remove macro.
5139 (find_inferior, find_inferior_id): Change signature, implement
5140 using find_thread.
5141 (find_inferior_in_random): Change signature, implement using
5142 find_thread_in_random.
5143 (for_each_inferior, for_each_inferior_with_data): Change
5144 signature, implement using for_each_thread.
5145 (add_inferior_to_list, remove_inferior): Remove.
5146 (add_thread, get_first_thread, thread_of_pid,
5147 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5148 (get_first_inferior, one_inferior_p, clear_inferior_list):
5149 Remove.
5150 (clear_inferiors, get_thread_process): Update.
5151 * gdbthread.h: Include <list>.
5152 (struct thread_info) <entry>: Remove field.
5153 <id>: New field.
5154 (all_threads): Change type to std::list<thread_info *>.
5155 (get_first_inferior): Add doc.
5156 (find_thread, for_each_thread, find_thread_in_random): New
5157 functions.
5158 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5159 * linux-arm-low.c (update_registers_callback): Update.
5160 * linux-low.c (second_thread_of_pid_p): Update.
5161 (kill_one_lwp_callback, linux_detach_lwp_callback,
5162 delete_lwp_callback, status_pending_p_callback, same_lwp,
5163 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5164 iterate_over_lwps, not_stopped_callback,
5165 resume_stopped_resumed_lwps, count_events_callback,
5166 select_singlestep_lwp_callback, select_event_lwp_callback,
5167 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5168 suspend_and_send_sigstop_callback, wait_for_sigstop,
5169 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5170 lwp_running, linux_set_resume_request, resume_status_pending_p,
5171 need_step_over_p, start_step_over, linux_resume_one_thread,
5172 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5173 reset_lwp_ptrace_options_callback): Update.
5174 * linux-mips-low.c (update_watch_registers_callback): Update.
5175 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5176 Update.
5177 (free_register_cache_thread_one): Remove.
5178 (regcache_release): Update.
5179 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5180 handle_qxfer_threads_worker): Update.
5181 (handle_query): Update, use list iterator.
5182 (visit_actioned_threads, handle_pending_status,
5183 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5184 clear_pending_status_callback, set_pending_status_callback,
5185 find_status_pending_thread_callback, handle_status,
5186 process_serial_event): Update.
5187 * target.c (thread_search_callback): Update.
5188 * thread-db.c (thread_db_get_tls_address): Update.
5189 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5190 Update.
5191 * win32-i386-low.c (update_debug_registers_callback): Update.
5192 * win32-low.c (delete_thread_info, child_delete_thread,
5193 continue_one_thread, suspend_one_thread,
5194 get_child_debug_event): Adjust.
5195
5196 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5197
5198 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5199 * inferiors.h: Include <list>.
5200 (struct process_info) <entry>: Remove field.
5201 <pid>: New field.
5202 (pid_of): Change macro to function.
5203 (ptid_of, lwpid_of): Remove macro.
5204 (all_processes): Change type to std::list<process_info *>.
5205 (ALL_PROCESSES): Remove macro.
5206 (for_each_process, find_process): New function.
5207 * inferiors.c (all_processes): Change type to
5208 std::list<process_info *>.
5209 (find_thread_process): Adjust.
5210 (add_process): Likewise.
5211 (remove_process): Likewise.
5212 (find_process_pid): Likewise.
5213 (get_first_process): Likewise.
5214 (started_inferior_callback): Remove.
5215 (have_started_inferiors_p): Adjust.
5216 (attached_inferior_callback): Remove.
5217 (have_attached_inferiors_p): Adjust.
5218 * linux-low.c (check_zombie_leaders): Likewise.
5219 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5220 (x86_linux_update_xmltarget): Adjust.
5221 * server.c (handle_query): Likewise.
5222 (gdb_reattached_process): Remove.
5223 (handle_status): Adjust.
5224 (kill_inferior_callback): Likewise.
5225 (detach_or_kill_inferior): Remove.
5226 (print_started_pid): Likewise.
5227 (print_attached_pid): Likewise.
5228 (detach_or_kill_for_exit): Update.
5229 (process_serial_event): Likewise.
5230 * linux-arm-low.c (arm_new_fork): Likewise.
5231
5232 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5233
5234 * dll.h: Include <list>.
5235 (struct dll_info): Add constructor.
5236 <entry>: Remove field.
5237 (all_dlls): Change type to std::list<dll_info>.
5238 * dll.c: Include <algorithm>.
5239 (get_dll): Remove macro.
5240 (all_dlls): Change type to std::list<dll_info *>.
5241 (free_one_dll): Remove.
5242 (match_dll): Likewise.
5243 (loaded_dll): Adjust.
5244 (unloaded_dll): Adjust to all_dlls type change, use
5245 std::find_if. Inline code from match_dll.
5246 (clear_dlls): Adjust to all_dlls type change.
5247 * server.c (emit_dll_description): Remove.
5248 (handle_qxfer_libraries): Adjust to all_dlls type change,
5249 integrate emit_dll_description's functionality.
5250
5251 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5252
5253 * linux-low.h (struct linux_target_ops) <delete_process>: New
5254 field.
5255 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5256 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5257 (struct linux_target_ops): Add delete_process callback.
5258 * linux-arm-low.c (arm_delete_process): New.
5259 (struct linux_target_ops): Add delete_process callback.
5260 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5261 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5262 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5263 * linux-mips-low.c (mips_linux_delete_process): New.
5264 (struct linux_target_ops): Add delete_process callback.
5265 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5266 * linux-s390-low.c (struct linux_target_ops): Likewise.
5267 * linux-sh-low.c (struct linux_target_ops): Likewise.
5268 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5269 * linux-tile-low.c (struct linux_target_ops): Likewise.
5270 * linux-x86-low.c (x86_linux_delete_process): New.
5271 (struct linux_target_ops): Add delete_process callback.
5272 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5273
5274 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5275
5276 * linux-aarch64-low.c (the_low_target): Add thread delete
5277 callback.
5278 * linux-arm-low.c (arm_delete_thread): New function.
5279 (the_low_target): Add thread delete callback.
5280 * linux-bfin-low.c (the_low_target): Likewise.
5281 * linux-crisv32-low.c (the_low_target): Likewise.
5282 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5283 set.
5284 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5285 field.
5286 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5287 * linux-mips-low.c (mips_linux_delete_thread): New function.
5288 (the_low_target): Add thread delete callback.
5289 * linux-ppc-low.c (the_low_target): Likewise.
5290 * linux-s390-low.c (the_low_target): Likewise.
5291 * linux-sh-low.c (the_low_target): Likewise.
5292 * linux-tic6x-low.c (the_low_target): Likewise.
5293 * linux-tile-low.c (the_low_target): Likewise.
5294 * linux-x86-low.c (the_low_target): Likewise.
5295 * linux-xtensa-low.c (the_low_target): Likewise.
5296
5297 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5298
5299 * win32-low.c: Include "common-inferior.h".
5300
5301 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5302
5303 * inferiors.c (set_inferior_cwd): New function.
5304 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5305 (handle_query): Inform that QSetWorkingDir is supported.
5306 * win32-low.c (create_process): Pass the inferior's cwd to
5307 CreateProcess.
5308
5309 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5310
5311 * inferiors.c (current_inferior_cwd): New global variable.
5312 (get_inferior_cwd): New function.
5313 * inferiors.h (struct process_info) <cwd>: New field.
5314
5315 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5316
5317 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5318 (OBS): Add gdb_tilde_expand.o.
5319
5320 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5321
5322 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5323 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5324
5325 2017-09-29 Pedro Alves <palves@redhat.com>
5326
5327 * ax.c (gdb_parse_agent_expr): Constify.
5328 * ax.h (gdb_parse_agent_expr): Constify.
5329 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5330 Constify.
5331 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5332 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5333 * remote-utils.h (read_ptid): Constify.
5334 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5335 (process_point_options, process_serial_event): Constify.
5336 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5337 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5338 (cmd_qtbuffer): Constify.
5339
5340 2017-09-29 Pedro Alves <palves@redhat.com>
5341
5342 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5343 fails.
5344
5345 2017-09-29 Pedro Alves <palves@redhat.com>
5346
5347 * linux-low.c (handle_extended_wait): Pass parent thread instead
5348 of process to thread_db_notice_clone.
5349 * linux-low.h (thread_db_notice_clone): Replace parent process
5350 parameter with parent thread parameter.
5351 * thread-db.c (find_one_thread): Add comment.
5352 (thread_db_notice_clone): Replace parent process parameter with
5353 parent thread parameter. Temporarily switch to the parent thread.
5354
5355 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5356
5357 * gdbthread.h: Include "common-gdbthread.h".
5358 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5359 "if" when validating the ptid.
5360 * remote-utils.c: Include "gdbthread.h".
5361 (prepare_resume_reply): Use "switch_to_thread".
5362 * target.c (done_accessing_memory): Likewise.
5363
5364 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5365
5366 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5367 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5368 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5369 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5370 s390x-gs-linux64-ipa.o to ipa_obj.
5371 * linux-s390-low.c (HWCAP_S390_GS): New define.
5372 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5373 New functions.
5374 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5375 (s390_arch_setup): Check for guarded-storage support and choose
5376 appropriate tdesc.
5377 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5378 init_registers_s390x_gs_linux64.
5379 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5380 enum value.
5381 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5382 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5383
5384 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5385
5386 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5387
5388 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5389
5390 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5391 (thread_db_thread_handle): Declare.
5392 * linux-low.c (linux_target_ops): Initialize thread_handle.
5393 * server.c (handle_qxfer_threads_worker): Add support for
5394 "handle" attribute.
5395 * target.h (struct target_ops): Add new function pointer,
5396 thread_handle.
5397 (target_thread_handle): Define.
5398 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5399 field in lwp.
5400 (thread_db_thread_handle): New function.
5401
5402 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5403
5404 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5405 * linux-low.h (thread_db_notice_clone): Declare.
5406 * thread-db.c (thread_db_notice_clone): New function.
5407
5408 2017-09-21 Pedro Alves <palves@redhat.com>
5409
5410 * server.c (gdb_read_memory, handle_status, process_serial_event)
5411 (handle_serial_event, handle_target_event): Adjust to
5412 set_desired_thread prototype change.
5413 * target.c (set_desired_thread): Remove 'use_general' parameter
5414 and adjust.
5415 * target.h (set_desired_thread): Remove 'use_general' parameter.
5416
5417 2017-09-20 Tom Tromey <tom@tromey.com>
5418
5419 * target.c (target_terminal::terminal_state): Define.
5420 (target_terminal::init): Rename from target_terminal_init.
5421 (target_terminal::inferior): Rename from
5422 target_terminal_inferior.
5423 (target_terminal::ours): Rename from target_terminal_ours.
5424 (target_terminal::ours_for_output, target_terminal::info): New.
5425
5426 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5427
5428 * server.c (accumulate_file_name_length): Remove.
5429 (emit_dll_description): Adjust to std::string change.
5430 (handle_qxfer_libraries): Use std::string to hold document.
5431
5432 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5433
5434 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5435 return type of xml_escape_text.
5436 * server.c (emit_dll_description): Likewise.
5437
5438 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5439
5440 * server.c (captured_main): Accept argument for --selftest.
5441 Update run_tests call.
5442 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5443 when registering selftests.
5444
5445 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5446
5447 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5448 instead of "VEC" for "target_desc.reg_defs".
5449 (regcache_cpy): Likewise.
5450 (registers_to_string): Likewise.
5451 (registers_from_string): Likewise.
5452 (find_regno): Likewise.
5453 (supply_regblock): Likewise.
5454 (regcache_raw_read_unsigned): Likewise.
5455 * tdesc.c (init_target_desc): Likewise.
5456 (tdesc_create_reg): Likewise.
5457 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5458 (struct target_desc) <reg_defs>: Convert to "std::vector".
5459 (target_desc): Do not initialize "reg_defs".
5460 (~target_desc): Update code to use "std::vector" instead of "VEC"
5461 for "target_desc.reg_defs".
5462 (operator==): Likewise.
5463
5464 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5465
5466 * inferiors.h (thread_to_gdb_id): Remove.
5467 * inferiors.c (thread_to_gdb_id): Remove.
5468 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5469 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5470 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5471 Likewise.
5472 * nto-low.c (nto_fetch_registers, nto_store_registers,
5473 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5474
5475 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5476
5477 * inferiors.h (gdb_id_to_thread_id): Remove.
5478 * inferiors.c (gdb_id_to_thread_id): Remove.
5479 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5480 removal. Move pid declaration closer to where it's used.
5481
5482 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5483
5484 * server.c (handle_detach): New function.
5485 (process_serial_event): Move code out, call handle_detach.
5486
5487 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5488
5489 * server.c (require_running): Rename to ...
5490 (require_running_or_return): ... this ...
5491 (require_running_or_break): ... and this.
5492 (handle_query, process_serial_event): Adjust.
5493
5494 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5495
5496 * linux-low.c (linux_set_resume_request): Remove unused
5497 variables.
5498
5499 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5500
5501 * server.c (first_thread_of): Remove.
5502 (process_serial_event): Replace usage of first_thread_of with
5503 find_any_thread_of_pid.
5504 * tracepoint.c (same_process_p): Remove.
5505 (gdb_agent_about_to_close): Replace usage of same_process_p with
5506 find_any_thread_of_pid.
5507 * linux-x86-low.c (same_process_callback): Remove.
5508 (x86_arch_setup_process_callback): Replace usage of
5509 same_process_callback with find_any_thread_of_pid.
5510 * thread-db.c (any_thread_of): Remove.
5511 (switch_to_process): Replace usage of any_thread_of with
5512 find_any_thread_of_pid.
5513 * inferiors.c (thread_pid_matches_callback): Remove.
5514 (find_thread_process): Adjust to use find_any_thread_of_pid.
5515
5516 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5517
5518 * regcache.c (get_thread_regcache): Guard calls to "memset"
5519 with "!VEC_empty".
5520
5521 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5522
5523 * linux-low.c (handle_extended_wait): Use
5524 "allocate_target_description" instead of "XNEW".
5525 * linux-x86-low.c (initialize_low_arch): Likewise.
5526
5527 2017-09-05 Yao Qi <yao.qi@linaro.org>
5528
5529 * configure.srv (srv_i386_regobj): Remove.
5530 (srv_amd64_regobj): Remove.
5531 (srv_regobj): Set it to "" for x86 non-linux targets.
5532 * linux-x86-tdesc.c (i386_linux_read_description):
5533 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5534 (init_registers_i386): Remove the declaration.
5535 (tdesc_i386): Remove the declaration.
5536 (lynx_i386_arch_setup): Call i386_create_target_description.
5537 * nto-x86-low.c: Likewise.
5538 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5539 [!__x86_64__]: include arch/i386.h.
5540 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5541
5542 2017-09-05 Yao Qi <yao.qi@linaro.org>
5543
5544 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5545 i386/amd64-XXX-linux from it.
5546
5547 2017-09-05 Yao Qi <yao.qi@linaro.org>
5548
5549 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5550 false.
5551 (ipa_amd64_linux_regobj): Remove.
5552 (ipa_x32_linux_regobj): Remove.
5553
5554 2017-09-05 Yao Qi <yao.qi@linaro.org>
5555
5556 * Makefile.in (arch-amd64.o): New rule.
5557 * configure.srv: Append arch-amd64.o.
5558 * linux-amd64-ipa.c: Include common/x86-xstate.h.
5559 (get_ipa_tdesc): Call amd64_linux_read_description.
5560 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
5561 and init_registers_amd64_XXX.
5562 * linux-x86-low.c (x86_linux_read_description): Call
5563 amd64_linux_read_description.
5564 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
5565 (initialize_low_arch): Don't call init_registers_x32_XXX and
5566 init_registers_amd64_XXX.
5567 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
5568 and tdesc_amd64_XXX.
5569 [__x86_64__] (amd64_tdesc_test): New function.
5570 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
5571 and init_registers_amd64_XXX.
5572 * linux-x86-tdesc.c: Include arch/amd64.h.
5573 (xcr0_to_tdesc_idx): New function.
5574 (i386_linux_read_description): New function.
5575 (amd64_get_ipa_tdesc_idx): New function.
5576 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
5577 (amd64_get_ipa_tdesc): Declare.
5578
5579 2017-09-05 Yao Qi <yao.qi@linaro.org>
5580
5581 * configure.srv (srv_i386_linux_xmlfiles): Remove
5582 i386/i386-XXX-linux.xml from it.
5583
5584 2017-09-05 Yao Qi <yao.qi@linaro.org>
5585
5586 * configure.srv: Set srv_i386_linux_regobj empty if $development
5587 is false.
5588 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
5589 initialize_low_tdesc.
5590 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
5591 with #if initialize_low_tdesc.
5592 * linux-x86-tdesc-selftest.c: New file.
5593 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
5594
5595 2017-09-05 Yao Qi <yao.qi@linaro.org>
5596
5597 * Makefile.in (arch-i386.o): New rule.
5598 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
5599 (x86_64-*-linux*): Likewise.
5600 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
5601 include arch/i386.h.
5602 (i386_linux_read_description): Remove code and call
5603 i386_create_target_description.
5604 * tdesc.c (allocate_target_description): New function.
5605 * tdesc.h (set_tdesc_architecture): Remove declaration.
5606 (set_tdesc_osabi): Likewise.
5607
5608 2017-09-05 Yao Qi <yao.qi@linaro.org>
5609
5610 * linux-x86-tdesc.c: Don't include <inttypes.h>.
5611 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5612 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
5613 .xmltarget.
5614 * server.c (get_features_xml): Call tdesc_get_features_xml.
5615 * tdesc.c (set_tdesc_architecture): New function.
5616 (set_tdesc_osabi): New function.
5617 (tdesc_get_features_xml): New function.
5618 (tdesc_create_feature): Add an argument.
5619 * tdesc.h (struct target_desc) <features>: New field.
5620 <arch, osabi>: New field.
5621 (~target_desc): xfree features, arch, and osabi.
5622 (target_desc::oerator==): Don't compare .xmltarget.
5623 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
5624 (set_tdesc_osabi): Likewise.
5625 (tdesc_get_features_xml): Likewise.
5626
5627 2017-09-05 Yao Qi <yao.qi@linaro.org>
5628
5629 * linux-x86-tdesc.c: Include selftest.h.
5630 (i386_tdesc_test): New function.
5631 (initialize_low_tdesc): Call selftests::register_test.
5632 * tdesc.h: Include regdef.h.
5633 (target_desc): Override operator == and !=.
5634
5635 2017-09-05 Yao Qi <yao.qi@linaro.org>
5636
5637 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
5638 (ipa_obj): Likewise.
5639 * linux-i386-ipa.c: Include common/x86-xstate.h
5640 (get_ipa_tdesc): Call i386_linux_read_description.
5641 (initialize_low_tracepoint): Don't call init_registers_XXX
5642 functions, call initialize_low_tdesc instead.
5643 * linux-x86-low.c (x86_linux_read_description): Call
5644 i386_linux_read_description.
5645 (initialize_low_arch): Don't call init_registers_i386_XXX
5646 functions, call initialize_low_tdesc.
5647 * linux-x86-tdesc.c: New file.
5648 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
5649 (i386_get_ipa_tdesc_idx): Declare.
5650 (i386_get_ipa_tdesc): Declare.
5651 (initialize_low_tdesc): Declare.
5652
5653 2017-09-05 Yao Qi <yao.qi@linaro.org>
5654
5655 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
5656 instead of 0.
5657
5658 2017-09-05 Yao Qi <yao.qi@linaro.org>
5659
5660 * Makefile.in (IPA_OBJS): Add vec-ipa.o
5661 * regcache.c (get_thread_regcache): Use VEC_length.
5662 (init_register_cache): Likewise.
5663 (regcache_cpy): Likewise.
5664 (registers_to_string): Iterate reg_defs via VEC_iterate.
5665 (find_regno): Likewise.
5666 (find_register_by_number): Use VEC_index.
5667 (register_size): Call find_register_by_number.
5668 (register_data): Call find_register_by_number.
5669 (supply_regblock): Use VEC_length.
5670 (regcache_raw_read_unsigned): Likewise.
5671 * tdesc.c (init_target_desc): Iterate reg_defs via
5672 VEC_iterate.
5673 (default_description): Update initializer.
5674 (copy_target_description): Don't update field num_registers.
5675 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
5676 <num_registers>: Remove.
5677
5678 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5679
5680 * Makefile.in (.SECONDARY): Define target.
5681
5682 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5683
5684 * linux-low.c (linux_wait_1): Adjust.
5685 * server.c (queue_stop_reply_callback): Adjust.
5686
5687 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5688
5689 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
5690 QEnvironmentUnset and QEnvironmentReset packets.
5691 (handle_query): Inform remote that QEnvironmentHexEncoded,
5692 QEnvironmentUnset and QEnvironmentReset are supported.
5693
5694 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
5695
5696 * inferiors.h (inferior_target_data): Rename to ...
5697 (thread_target_data): ... this.
5698 (inferior_regcache_data): Rename to ...
5699 (thread_regcache_data): ... this.
5700 (set_inferior_regcache_data): Rename to ...
5701 (set_thread_regcache_data): ... this.
5702 * inferiors.c (inferior_target_data): Rename to ...
5703 (thread_target_data): ... this.
5704 (inferior_regcache_data): Rename to ...
5705 (thread_regcache_data): ... this.
5706 (set_inferior_regcache_data): Rename to ...
5707 (set_thread_regcache_data): ... this.
5708 (free_one_thread): Update.
5709 * linux-low.h (get_thread_lwp): Update.
5710 * regcache.c (get_thread_regcache): Update.
5711 (regcache_invalidate_thread): Update.
5712 (free_register_cache_thread): Update.
5713 * win32-i386-low.c (update_debug_registers_callback): Update.
5714 (win32_get_current_dr): Update.
5715 * win32-low.c (thread_rec): Update.
5716 (delete_thread_info): Update.
5717 (continue_one_thread): Update.
5718 (suspend_one_thread): Update.
5719
5720 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
5721
5722 * inferiors.c (set_inferior_target_data): Remove.
5723 * inferiors.h (set_inferior_target_data): Remove.
5724
5725 2017-08-18 Yao Qi <yao.qi@linaro.org>
5726
5727 * Makefile.in (OBS): Add selftest.o.
5728 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
5729 * configure, config.in: Re-generated.
5730 * server.c: Include common/sefltest.h.
5731 (captured_main): Handle option --selftest.
5732
5733 2017-08-09 Yao Qi <yao.qi@linaro.org>
5734
5735 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
5736 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
5737 i386-avx-mpx.o and i386-mmx.o.
5738 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
5739 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
5740 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
5741 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
5742 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
5743 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
5744 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
5745 i386/amd64-avx-mpx.xml.
5746
5747 2017-08-09 Yao Qi <yao.qi@linaro.org>
5748
5749 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
5750 and x32-avx-avx512.o.
5751 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
5752 i386/x32-avx-avx512.xml.
5753
5754 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
5755
5756 * tracepoint.h (enum class fast_tpoint_collect_result): New
5757 enumeration.
5758 (fast_tracepoint_collecting): Change return type to
5759 fast_tpoint_collect_result.
5760 * tracepoint.c (fast_tracepoint_collecting): Likewise.
5761 * linux-low.h: Include tracepoint.h.
5762 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
5763 fast_tpoint_collect_result.
5764 * linux-low.c (handle_tracepoints): Adjust.
5765 (linux_fast_tracepoint_collecting): Change return type to
5766 fast_tpoint_collect_result.
5767 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
5768 linux_wait_1, stuck_in_jump_pad_callback,
5769 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
5770 proceed_one_lwp): Adjust to type change.
5771
5772 2017-07-10 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
5775
5776 2017-06-29 Yao Qi <yao.qi@linaro.org>
5777
5778 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
5779 Remove.
5780 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
5781
5782 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
5783
5784 * Makefile.in (IPA_OBJS): Sort and format one item per line.
5785
5786 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5787
5788 * linux-low.c (linux_create_inferior): Adjust code to access the
5789 environment information via 'gdb_environ' class.
5790 * lynx-low.c (lynx_create_inferior): Likewise.
5791 * server.c (our_environ): Make it an instance of 'gdb_environ'.
5792 (get_environ): Return a pointer to 'our_environ'.
5793 (captured_main): Initialize 'our_environ'.
5794 * server.h (get_environ): Adjust prototype.
5795 * spu-low.c (spu_create_inferior): Adjust code to access the
5796 environment information via 'gdb_environ' class.
5797
5798 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5799
5800 * linux-low.c (linux_read_memory, linux_write_memory): Remove
5801 usage of "register" keyword.
5802
5803 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5804
5805 * configure: Re-generate.
5806
5807 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5808
5809 * configure: Re-generate.
5810
5811 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5812
5813 * Makefile.in (COMPILE.pre): Add "-x c++".
5814
5815 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
5816
5817 * fork-child.c: Conditionally include <signal.h>.
5818
5819 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5820
5821 * server.c (handle_general_set): Handle new packet
5822 "QStartupWithShell".
5823 (handle_query): Add "QStartupWithShell" to the list of supported
5824 packets.
5825 (gdbserver_usage): Add help text explaining the
5826 new "--startup-with-shell" and "--no-startup-with-shell" CLI
5827 options.
5828 (captured_main): Recognize and act upon the presence of the new
5829 CLI options.
5830
5831 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5832 Pedro Alves <palves@redhat.com>
5833
5834 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
5835 * configure: Regenerate.
5836 * configure.srv (srv_linux_obj): Add "fork-child.o" and
5837 "fork-inferior.o".
5838 (i[34567]86-*-lynxos*): Likewise.
5839 (spu*-*-*): Likewise.
5840 * fork-child.c: New file.
5841 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
5842 and "environ.h".
5843 (linux_ptrace_fun): New function.
5844 (linux_create_inferior): Adjust function prototype to reflect
5845 change on "target.h". Adjust function code to use
5846 "fork_inferior".
5847 (linux_request_interrupt): Delete "signal_pid".
5848 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5849 (lynx_ptrace_fun): New function.
5850 (lynx_create_inferior): Adjust function prototype to reflect
5851 change on "target.h". Adjust function code to use
5852 "fork_inferior".
5853 * nto-low.c (nto_create_inferior): Adjust function prototype and
5854 code to reflect change on "target.h". Update comments.
5855 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
5856 "common-terminal.h" and "environ.h".
5857 (terminal_fd): Moved to fork-child.c.
5858 (old_foreground_pgrp): Likewise.
5859 (restore_old_foreground_pgrp): Likewise.
5860 (last_status): Make it global.
5861 (last_ptid): Likewise.
5862 (our_environ): New variable.
5863 (startup_with_shell): Likewise.
5864 (program_name): Likewise.
5865 (program_argv): Rename to...
5866 (program_args): ...this.
5867 (wrapper_argv): New variable.
5868 (start_inferior): Delete function.
5869 (get_exec_wrapper): New function.
5870 (get_exec_file): Likewise.
5871 (get_environ): Likewise.
5872 (prefork_hook): Likewise.
5873 (post_fork_inferior): Likewise.
5874 (postfork_hook): Likewise.
5875 (postfork_child_hook): Likewise.
5876 (handle_v_run): Update code to deal with arguments coming from the
5877 remote host. Update calls from "start_inferior" to
5878 "create_inferior".
5879 (captured_main): Likewise. Initialize environment variable. Call
5880 "have_job_control".
5881 * server.h (post_fork_inferior): New prototype.
5882 (get_environ): Likewise.
5883 (last_status): Declare.
5884 (last_ptid): Likewise.
5885 (signal_pid): Likewise.
5886 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5887 (spu_ptrace_fun): New function.
5888 (spu_create_inferior): Adjust function prototype to reflect change
5889 on "target.h". Adjust function code to use "fork_inferior".
5890 * target.c (target_terminal_init): New function.
5891 (target_terminal_inferior): Likewise.
5892 (target_terminal_ours): Likewise.
5893 * target.h: Include <vector>.
5894 (struct target_ops) <create_inferior>: Update prototype.
5895 (create_inferior): Update macro.
5896 * utils.c (gdb_flush_out_err): New function.
5897 * win32-low.c (win32_create_inferior): Adjust function prototype
5898 and code to reflect change on "target.h".
5899
5900 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5901
5902 * inferiors.c (switch_to_thread): New function.
5903
5904 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5905
5906 * Makefile.in (SFILE): Add "common/job-control.c".
5907 (OBS): Add "job-control.o".
5908
5909 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5910
5911 * Makefile: Remove "@host_makefile_frag@".
5912
5913 2017-05-05 Pedro Alves <palves@redhat.com>
5914
5915 * configure: Regenerate.
5916
5917 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
5918
5919 * configure: Regenerate.
5920
5921 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5922
5923 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
5924 software_single_step change of return type to
5925 std::vector<CORE_ADDR>.
5926 * linux-low.c (install_software_single_step_breakpoints):
5927 Likewise.
5928 * linux-low.h (install_software_single_step_breakpoints):
5929 Likewise.
5930
5931 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5932
5933 * remote-utils.c: Include "gdb_termios.h" instead of
5934 "terminal.h".
5935 * terminal.h: Delete file.
5936
5937 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5938
5939 * server.c: Include <vector>.
5940 <program_argv, wrapper_argv>: Convert to std::vector.
5941 (start_inferior): Rewrite function to use C++.
5942 (handle_v_run): Likewise. Update code that calculates the argv
5943 based on the vRun packet; use C++.
5944 (captured_main): Likewise.
5945
5946 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
5947
5948 * server.c (handle_v_cont): Initialize thread_resume::thread
5949 with null_ptid.
5950
5951 2017-04-05 Pedro Alves <palves@redhat.com>
5952
5953 * configure: Regenerate.
5954
5955 2017-04-05 Pedro Alves <palves@redhat.com>
5956
5957 * gdbreplay.c (sync_error): Constify.
5958 * linux-x86-low.c (push_opcode): Constify.
5959
5960 2017-04-05 Pedro Alves <palves@redhat.com>
5961
5962 * win32-low.c (get_child_debug_event)
5963 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
5964 Report TARGET_WAITKIND_SPURIOUS instead.
5965
5966 2017-04-05 Pedro Alves <palves@redhat.com>
5967
5968 * remote-utils.c (remote_prepare, remote_open): Constify.
5969 * remote-utils.h (remote_prepare, remote_open): Constify.
5970 * server.c (captured_main): Constify 'port' handling.
5971
5972 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
5973
5974 * Makefile.in (clean): Clear .deps.
5975
5976 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
5977
5978 * .gitignore: Remove generated files, replace with wildcard.
5979 * (clean): Replace removal of generated files with wildcard.
5980 (version.c): Replace with...
5981 (version-generated.c): ...this.
5982 (xml-builtin.c): Replace with...
5983 (xml-builtin-generated.c): ...this.
5984 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
5985 (%.c: *regformats*): Replace with...
5986 (%-generated.c: *regformats*): ...this.
5987
5988 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5989
5990 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
5991 (xtensa_fill_gregset): Call collect_register_by_name for
5992 threadptr register.
5993 (xtensa_store_gregset): Call supply_register_by_name for
5994 threadptr register.
5995
5996 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5997
5998 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
5999 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
6000 (xtensa_store_gregset): Call supply_register for all registers in
6001 a0_regnum..a0_regnum + C0_NREGS range.
6002
6003 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6004
6005 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
6006 (ax-ipa.o: ax.c): Remove.
6007 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
6008 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
6009 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
6010 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
6011 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
6012
6013 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6014
6015 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
6016 (print-utils-ipa.o: ../common/print-utils.c): Remove.
6017 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6018 (errors-ipa.o: ../common/errors.c): Remove.
6019 (format-ipa.o: ../common/format.c): Remove.
6020 (common-utils-ipa.o: ../common/common-utils.c): Remove.
6021
6022 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6023
6024 * Makefile.in (%-ipa.o: %.c): New rule.
6025 (tracepoint-ipa.o: tracepoint.c): Remove.
6026 (utils-ipa.o: utils.c): Remove.
6027 (remote-utils-ipa.o: remote-utils.c): Remove.
6028 (regcache-ipa.o: regcache.c): Remove.
6029 (i386-linux-ipa.o: i386-linux.c): Remove.
6030 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
6031 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
6032 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
6033 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
6034 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
6035 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
6036 (amd64-linux-ipa.o: amd64-linux.c): Remove.
6037 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
6038 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
6039 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
6040 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
6041 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
6042 (aarch64-ipa.o: aarch64.c): Remove.
6043 (s390-linux32-ipa.o: s390-linux32.c): Remove.
6044 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
6045 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
6046 (s390-linux64-ipa.o: s390-linux64.c): Remove.
6047 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
6048 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
6049 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
6050 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
6051 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
6052 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
6053 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
6054 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
6055 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
6056 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
6057 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
6058 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
6059 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
6060 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
6061 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
6062 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
6063 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
6064 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
6065 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
6066 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
6067 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
6068 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
6069 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
6070 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
6071 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
6072 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
6073 (tdesc-ipa.o: tdesc.c): Remove.
6074 (x32-linux-ipa.o: x32-linux.c): Remove.
6075 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
6076 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
6077
6078 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6079
6080 * Makefile.in (%.o: ../arch/%.c): New rule.
6081 (arm.o: ../arch/arm.c): Remove.
6082 (arm-linux.o: ../arch/arm-linux.c): Remove.
6083 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
6084 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
6085
6086 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6087
6088 * Makefile.in (%.o: ../nat/%.c): New rule.
6089 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
6090 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
6091 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
6092 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
6093 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
6094 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
6095 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
6096 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
6097 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
6098 (linux-personality.o: ../nat/linux-personality.c): Remove.
6099 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
6100 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
6101 (x86-linux.o: ../nat/x86-linux.c): Remove.
6102 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6103 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6104
6105 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6106
6107 * Makefile.in (%.o: ../common/%.c): New rule.
6108 (signals.o: ../common/signals.c): Remove.
6109 (print-utils.o: ../common/print-utils.c): Remove.
6110 (rsp-low.o: ../common/rsp-low.c): Remove.
6111 (common-utils.o: ../common/common-utils.c): Remove.
6112 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6113 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6114 (vec.o: ../common/vec.c): Remove.
6115 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6116 (xml-utils.o: ../common/xml-utils.c): Remove.
6117 (ptid.o: ../common/ptid.c): Remove.
6118 (buffer.o: ../common/buffer.c): Remove.
6119 (format.o: ../common/format.c): Remove.
6120 (filestuff.o: ../common/filestuff.c): Remove.
6121 (agent.o: ../common/agent.c): Remove.
6122 (errors.o: ../common/errors.c): Remove.
6123 (environ.o: ../common/environ.c): Remove.
6124 (common-debug.o: ../common/common-debug.c): Remove.
6125 (cleanups.o: ../common/cleanups.c): Remove.
6126 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6127 (fileio.o: ../common/fileio.c): Remove.
6128 (common-regcache.o: ../common/common-regcache.c): Remove.
6129 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6130 (new-op.o: ../common/new-op.c): Remove.
6131 (btrace-common.o: ../common/btrace-common.c): Remove.
6132
6133 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6134
6135 * Makefile.in (%.o: ../target/%.c): New rule.
6136 (waitstatus.o: ../target/waitstatus.c): Remove.
6137
6138 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6139
6140 * Makefile.in
6141 (%.c: ../regformats/%.dat,
6142 (%.c: ../regformats/arm/%.dat,
6143 (%.c: ../regformats/i386/%.dat,
6144 (%.c: ../regformats/rs6000/%.dat): New rules.
6145 (aarch64.c): Remove.
6146 (reg-arm.c): Remove.
6147 (arm-with-iwmmxt.c): Remove.
6148 (arm-with-vfpv2.c): Remove.
6149 (arm-with-vfpv3.c): Remove.
6150 (arm-with-neon.c): Remove.
6151 (reg-bfin.c): Remove.
6152 (reg-cris.c): Remove.
6153 (reg-crisv32.c): Remove.
6154 (i386.c): Remove.
6155 (i386-linux.c): Remove.
6156 (i386-avx.c): Remove.
6157 (i386-avx-linux.c): Remove.
6158 (i386-avx-avx512.c): Remove.
6159 (i386-avx-avx512-linux.c): Remove.
6160 (i386-mpx.c): Remove.
6161 (i386-mpx-linux.c): Remove.
6162 (i386-avx-mpx-avx512-pku.c): Remove.
6163 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6164 (i386-avx-mpx.c): Remove.
6165 (i386-avx-mpx-linux.c): Remove.
6166 (i386-mmx.c): Remove.
6167 (i386-mmx-linux.c): Remove.
6168 (reg-ia64.c): Remove.
6169 (reg-m32r.c): Remove.
6170 (reg-m68k.c): Remove.
6171 (reg-cf.c): Remove.
6172 (mips-linux.c): Remove.
6173 (mips-dsp-linux.c): Remove.
6174 (mips64-linux.c): Remove.
6175 (mips64-dsp-linux.c): Remove.
6176 (nios2-linux.c): Remove.
6177 (powerpc-32.c): Remove.
6178 (powerpc-32l.c): Remove.
6179 (powerpc-altivec32l.c): Remove.
6180 (powerpc-cell32l.c): Remove.
6181 (powerpc-vsx32l.c): Remove.
6182 (powerpc-isa205-32l.c): Remove.
6183 (powerpc-isa205-altivec32l.c): Remove.
6184 (powerpc-isa205-vsx32l.c): Remove.
6185 (powerpc-e500l.c): Remove.
6186 (powerpc-64l.c): Remove.
6187 (powerpc-altivec64l.c): Remove.
6188 (powerpc-cell64l.c): Remove.
6189 (powerpc-vsx64l.c): Remove.
6190 (powerpc-isa205-64l.c): Remove.
6191 (powerpc-isa205-altivec64l.c): Remove.
6192 (powerpc-isa205-vsx64l.c): Remove.
6193 (s390-linux32.c): Remove.
6194 (s390-linux32v1.c): Remove.
6195 (s390-linux32v2.c): Remove.
6196 (s390-linux64.c): Remove.
6197 (s390-linux64v1.c): Remove.
6198 (s390-linux64v2.c): Remove.
6199 (s390-te-linux64.c): Remove.
6200 (s390-vx-linux64.c): Remove.
6201 (s390-tevx-linux64.c): Remove.
6202 (s390x-linux64.c): Remove.
6203 (s390x-linux64v1.c): Remove.
6204 (s390x-linux64v2.c): Remove.
6205 (s390x-te-linux64.c): Remove.
6206 (s390x-vx-linux64.c): Remove.
6207 (s390x-tevx-linux64.c): Remove.
6208 (tic6x-c64xp-linux.c): Remove.
6209 (tic6x-c64x-linux.c): Remove.
6210 (tic6x-c62x-linux.c): Remove.
6211 (reg-sh.c): Remove.
6212 (reg-sparc64.c): Remove.
6213 (reg-spu.c): Remove.
6214 (amd64.c): Remove.
6215 (amd64-linux.c): Remove.
6216 (amd64-avx.c): Remove.
6217 (amd64-avx-linux.c): Remove.
6218 (amd64-avx-avx512.c): Remove.
6219 (amd64-avx-avx512-linux.c): Remove.
6220 (amd64-mpx.c): Remove.
6221 (amd64-mpx-linux.c): Remove.
6222 (amd64-avx-mpx-avx512-pku.c): Remove.
6223 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6224 (amd64-avx-mpx.c): Remove.
6225 (amd64-avx-mpx-linux.c): Remove.
6226 (x32.c): Remove.
6227 (x32-linux.c): Remove.
6228 (x32-avx.c): Remove.
6229 (x32-avx-linux.c): Remove.
6230 (x32-avx-avx512.c): Remove.
6231 (x32-avx-avx512-linux.c): Remove.
6232 (reg-xtensa.c): Remove.
6233 (reg-tilegx.c): Remove.
6234 (reg-tilegx32.c): Remove.
6235
6236 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6237
6238 * Makefile.in (SFILES): Add "common/environ.c".
6239 (OBJS): Add "common/environ.h".
6240
6241 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6242
6243 * configure.ac: Check if the fs_base and gs_base members of
6244 `struct user_regs_struct' exist.
6245 * config.in: Regenerated.
6246 * configure: Likewise.
6247
6248 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6249
6250 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6251 target_read_memory.
6252 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6253 (get_next_pcs_syscall_next_pc): Likewise.
6254
6255 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6256
6257 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6258 * nto-x86-low.c: Likewise.
6259
6260 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6261
6262 * Makefile.in: Include disable-implicit-rules.mk.
6263
6264 2016-11-23 Pedro Alves <palves@redhat.com>
6265
6266 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6267 (debug_vprintf): Use std::chrono::steady_clock instead of
6268 gettimeofday. Use '.' instead of ':'.
6269 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6270 (get_timestamp): Use std::chrono::steady_clock instead of
6271 gettimeofday.
6272
6273 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6274
6275 * Makefile.in: Fix whitespace formatting.
6276
6277 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6278
6279 * Makefile.in (SFILES, OBS): Flatten list and order
6280 alphabetically.
6281
6282 2016-11-23 Pedro Alves <palves@redhat.com>
6283
6284 * event-loop.c (handle_file_event): Use warning.
6285 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6286 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6287 Use warning.
6288
6289 2016-11-23 Pedro Alves <palves@redhat.com>
6290
6291 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6292 output.
6293 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6294 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6295 debug_printf and debug_flush for debug output.
6296 * server.c (handle_general_set): Likewise.
6297 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6298 output.
6299
6300 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6301
6302 * Makefile.in (.c.o): Replace rule with ...
6303 (%.o: %.c): ... this one.
6304
6305 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6306
6307 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6308 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6309 make.
6310 * configure.ac: Remove checks for the make program.
6311 * configure: Re-generate.
6312
6313 2016-10-28 Pedro Alves <palves@redhat.com>
6314
6315 * Makefile.in (CXX_DIALECT): Get from configure.
6316 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6317 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6318 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6319 * config.in: Regenerate.
6320 * configure: Regenerate.
6321
6322 2016-10-27 Yao Qi <yao.qi@linaro.org>
6323
6324 * linux-low.c (linux_supports_range_stepping): Return true if
6325 can_software_single_step return true.
6326
6327 2016-10-27 Yao Qi <yao.qi@linaro.org>
6328
6329 * inferiors.c (find_inferior_in_random): New function.
6330 * inferiors.h (find_inferior_in_random): Declare.
6331 * linux-low.c (linux_wait_for_event_filtered): Call
6332 find_inferior_in_random instead of find_inferior.
6333
6334 2016-10-27 Yao Qi <yao.qi@linaro.org>
6335
6336 * linux-low.c (linux_wait_1): If single-step breakpoints are
6337 inserted, remove them.
6338
6339 2016-10-26 Pedro Alves <palves@redhat.com>
6340
6341 * linux-low.c (handle_extended_wait): Link parent/child fork
6342 threads.
6343 (linux_wait_1): Unlink them.
6344 (linux_set_resume_request): Ignore resume requests for
6345 already-resumed and unhandled fork child threads.
6346 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6347 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6348 New functions.
6349 (handle_v_requests) <vCont>: Don't call require_running.
6350 * server.h (in_queued_stop_replies): New declaration.
6351
6352 2016-10-24 Yao Qi <yao.qi@linaro.org>
6353
6354 PR server/20733
6355 * linux-aarch64-low.c (append_insns): Cast the return value to
6356 'uint32_t *'.
6357
6358 2016-10-10 Yao Qi <yao.qi@linaro.org>
6359
6360 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6361
6362 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6363
6364 * target.c (target_supports_multi_process): New function, moved
6365 from...
6366 * target.h (target_supports_multi_process): ... here. Remove
6367 macro.
6368
6369 2016-10-05 Tom Tromey <tom@tromey.com>
6370
6371 PR remote/20655:
6372 * tracepoint.c (handle_tracepoint_bkpts): Check
6373 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6374
6375 2016-10-05 Yao Qi <yao.qi@linaro.org>
6376
6377 * configure.srv: Update the path of arm-*.xml files.
6378
6379 2016-10-05 Terry Guo <terry.guo@arm.com>
6380 Yao Qi <yao.qi@linaro.org>
6381
6382 * Makefile.in: Adjust the path of rules.
6383 * configure.srv: Update the path of xml files.
6384 * regformats/arm-with-iwmmxt.dat: Regenerated.
6385 * regformats/arm-with-neon.dat: Likewise.
6386 * regformats/arm-with-vfpv2.dat: Likewise.
6387 * regformats/arm-with-vfpv3.dat Likewise.
6388
6389 2016-09-30 Yao Qi <yao.qi@linaro.org>
6390
6391 PR gdbserver/20627
6392 * target.c (target_stop_and_wait): Don't call
6393 target_continue_no_signal, use resume_stop instead.
6394
6395 2016-09-26 Yao Qi <yao.qi@linaro.org>
6396
6397 * linux-low.c (linux_wait_1): Call debug_exit.
6398
6399 2016-09-23 Pedro Alves <palves@redhat.com>
6400
6401 * Makefile.in (SFILES): Add common/new-op.c.
6402 (OBS): Add common/new-op.o.
6403 (new-op.o): New rule.
6404
6405 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6406
6407 * .gitinore: Ignore more files.
6408
6409 2016-09-21 Yao Qi <yao.qi@linaro.org>
6410
6411 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6412 23.
6413
6414 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6415
6416 * server.c (start_inferior): Call target_mourn_inferior instead of
6417 mourn_inferior; pass ptid_t argument to it.
6418 (resume): Likewise.
6419 (handle_target_event): Likewise.
6420 * target.c (target_mourn_inferior): New function.
6421 * target.h (mourn_inferior): Delete macro.
6422
6423 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6424
6425 * linux-low.c (lwp_is_stepping): New function.
6426
6427 2016-09-06 Carl Love <cel@us.ibm.com>
6428
6429 * server.c (start_inferior): Fixed comment, requested comment change
6430 didn't get updated correctly. Removed reference to ptrace () call as
6431 it is only true on Linux systems.
6432
6433 2016-09-06 Carl Love <cel@us.ibm.com>
6434
6435 * server.c (start_inferior): Do not call
6436 function target_post_create_inferior () if the
6437 inferior process has already exited.
6438
6439 2016-09-05 Pedro Alves <palves@redhat.com>
6440
6441 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6442 (COMPILE.pre, CC_LD): Use CXX directly.
6443 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6444 * acinclude.m4: Don't include build-with-cxx.m4.
6445 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6446 * configure: Regenerate.
6447
6448 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6449
6450 PR gdb/19495
6451 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6452 call writing data to own_buf.
6453
6454 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6455
6456 * target.c (mywait): Call target_wait instead of
6457 the_target->wait.
6458 (target_wait): New function.
6459
6460 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6461
6462 * server.c (start_inferior): New variable 'ptid'. Replace calls
6463 to the_target->resume by target_continue{,_no_signal}, depending
6464 on the case.
6465 * target.c (target_stop_and_wait): Call target_continue_no_signal
6466 instead of the_target->resume.
6467 (target_continue): New function.
6468
6469 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6470
6471 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6472
6473 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6474
6475 PR server/20491
6476 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6477 ps_prochandle.
6478 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6479 * linux-arm-low.c (ps_get_thread_area): Likewise.
6480 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6481 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6482 * linux-mips-low.c (ps_get_thread_area): Likewise.
6483 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6484 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6485 * linux-x86-low.c (ps_get_thread_area): Likewise.
6486 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6487
6488 2016-08-19 Pedro Alves <palves@redhat.com>
6489
6490 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6491
6492 2016-08-19 Pedro Alves <palves@redhat.com>
6493
6494 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6495 comment. Use memcpy instead of casting through unsigned long.
6496
6497 2016-08-19 Pedro Alves <palves@redhat.com>
6498
6499 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6500 allocating around 0x80000000.
6501
6502 2016-08-19 Pedro Alves <palves@redhat.com>
6503
6504 PR gdb/20415
6505 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6506 (x32-avx512-linux-ipa.o): New rules.
6507 * configure.ac (x86_64-*-linux*): New x32 check.
6508 * configure.srv (ipa_x32_linux_regobj): New.
6509 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6510 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6511 descriptions.
6512 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6513 descriptions.
6514 * configure: Regenerate.
6515
6516 2016-08-09 Pedro Alves <palves@redhat.com>
6517
6518 PR gdb/18653
6519 * Makefile.in (OBS): Add signals-state-save-restore.o.
6520 (signals-state-save-restore.o): New rule.
6521 * config.in: Regenerate.
6522 * configure: Regenerate.
6523 * linux-low.c: Include "signals-state-save-restore.h".
6524 (linux_create_inferior): Call
6525 restore_original_signals_state.
6526 * server.c: Include "dispositions-save-restore.h".
6527 (captured_main): Call save_original_signals_state.
6528
6529 2016-08-05 Pedro Alves <palves@redhat.com>
6530
6531 * configure: Regenerate.
6532
6533 2016-08-04 Yao Qi <yao.qi@linaro.org>
6534
6535 * linux-low.c (regsets_fetch_inferior_registers): Check
6536 errno is ESRCH or not.
6537
6538 2016-08-02 Yao Qi <yao.qi@linaro.org>
6539
6540 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6541 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6542 (thread_db_load_search): Update.
6543 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6544 td_ta_set_event and td_ta_event_getmsg.
6545
6546 2016-07-26 Pedro Alves <palves@redhat.com>
6547
6548 PR server/20414
6549 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6550 of unsigned long for 64-bit registers and use uint32_t instead of
6551 unsigned int for 32-bit registers.
6552
6553 2016-07-26 Pedro Alves <palves@redhat.com>
6554
6555 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6556 to 'ptrace'.
6557
6558 2016-07-21 Tom Tromey <tom@tromey.com>
6559
6560 * configure: Rebuild.
6561
6562 2016-07-21 Yao Qi <yao.qi@linaro.org>
6563
6564 * mem-break.c (find_gdb_breakpoint): Cast bp to
6565 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
6566
6567 2016-07-21 Yao Qi <yao.qi@linaro.org>
6568
6569 * server.c (handle_v_requests): Support s and S actions
6570 if target_supports_software_single_step return true.
6571
6572 2016-07-21 Yao Qi <yao.qi@linaro.org>
6573
6574 * linux-low.c (resume_stopped_resumed_lwps): If resume request
6575 is resume_step, call maybe_hw_step.
6576 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6577 and unstop them.
6578 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
6579 breakpoints or not.
6580 (proceed_one_lwp): If resume request is resume_step, install
6581 reinsert breakpoints and call maybe_hw_step.
6582
6583 2016-07-21 Yao Qi <yao.qi@linaro.org>
6584
6585 * linux-low.c (proceed_one_lwp): Declare.
6586 (linux_resume_one_thread): Remove local variable 'step'.
6587 Lift code enqueue signal. Call proceed_one_lwp instead of
6588 linux_resume_one_lwp.
6589
6590 2016-07-21 Yao Qi <yao.qi@linaro.org>
6591
6592 * linux-low.c (linux_resume_one_thread): Call
6593 enqueue_pending_signal.
6594
6595 2016-07-21 Yao Qi <yao.qi@linaro.org>
6596
6597 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
6598 * inferiors.c (do_restore_current_thread_cleanup): New function.
6599 (make_cleanup_restore_current_thread): Likewise.
6600 * linux-low.c (install_software_single_step_breakpoints): Call
6601 make_cleanup_restore_current_thread. Switch current_thread to
6602 thread.
6603
6604 2016-07-21 Yao Qi <yao.qi@linaro.org>
6605
6606 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
6607 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
6608 (clone_one_breakpoint): Likewise.
6609 (delete_reinsert_breakpoints): Change parameter to thread.
6610 Callers updated.
6611 (has_reinsert_breakpoints): Likewise.
6612 (uninsert_reinsert_breakpoints): Likewise.
6613 (reinsert_reinsert_breakpoints): Likewise.
6614 * mem-break.h (set_reinsert_breakpoint): Update declaration.
6615 (delete_reinsert_breakpoints): Likewise.
6616 (reinsert_reinsert_breakpoints): Likewise.
6617 (uninsert_reinsert_breakpoints): Likewise.
6618 (has_reinsert_breakpoints): Likewise.
6619
6620 2016-07-21 Yao Qi <yao.qi@linaro.org>
6621
6622 * inferiors.c (get_thread_process): Make parameter const.
6623 * inferiors.h (get_thread_process): Update declaration.
6624 * mem-break.c (clone_all_breakpoints): Remove all parameters.
6625 Add new parameters child_thread and parent_thread. Callers
6626 updated.
6627 * mem-break.h (clone_all_breakpoints): Update declaration.
6628
6629 2016-07-21 Yao Qi <yao.qi@linaro.org>
6630
6631 * mem-break.c (struct breakpoint) <cond_list>: Remove.
6632 <command_list, handler>: Remove.
6633 (struct gdb_breakpoint): New.
6634 (struct other_breakpoint): New.
6635 (struct reinsert_breakpoint): New.
6636 (is_gdb_breakpoint): New function.
6637 (any_persistent_commands): Update command_list if
6638 is_gdb_breakpoint returns true.
6639 (set_breakpoint): Create breakpoints according to their types.
6640 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
6641 (set_gdb_breakpoint_1): Likewise.
6642 (set_gdb_breakpoint): Likewise.
6643 (clear_breakpoint_conditions): Change parameter type to
6644 'struct gdb_breakpoint *'.
6645 (clear_breakpoint_commands): Likewise.
6646 (clear_breakpoint_conditions_and_commands): Likewise.
6647 (add_condition_to_breakpoint): Likewise.
6648 (add_breakpoint_condition): Likewise.
6649 (add_commands_to_breakpoint): Likewise.
6650 (check_breakpoints): Check other_breakpoint.
6651 (clone_one_breakpoint): Clone breakpopint according to its type.
6652 * mem-break.h (struct gdb_breakpoint): Declare.
6653 (set_gdb_breakpoint): Update declaration.
6654 (clear_breakpoint_conditions_and_commands): Likewise.
6655 (add_breakpoint_condition): Likewise.
6656 (add_breakpoint_commands): Likewise.
6657 * server.c (process_point_options): Change parameter type to
6658 'struct gdb_breakpoint *'.
6659
6660 2016-07-21 Yao Qi <yao.qi@linaro.org>
6661
6662 * mem-break.c (set_breakpoint_at): Rename it to ...
6663 (set_breakpoint_type_at): ... it.
6664 (set_breakpoint_at): Call set_breakpoint_type_at.
6665 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
6666 * mem-break.h (set_breakpoint_at): Update comments.
6667
6668 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
6669
6670 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
6671 to buf parameter.
6672 (nios2_store_gregset): Likewise.
6673
6674 2016-07-01 Pedro Alves <palves@redhat.com>
6675 Antoine Tremblay <antoine.tremblay@ericsson.com>
6676
6677 * linux-low.c: Change interface to take the target lwp_info
6678 pointer directly and return void. Handle detaching from a zombie
6679 thread.
6680 (linux_detach_lwp_callback): New function.
6681 (linux_detach): Detach from the leader thread after detaching from
6682 the clone threads.
6683
6684 2016-06-28 Yao Qi <yao.qi@linaro.org>
6685
6686 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
6687 for variable new_offset.
6688 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6689 (aarch64_ftrace_insn_reloc_cb): Likewise.
6690 (aarch64_ftrace_insn_reloc_tb): Likewise.
6691 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
6692 PRIx64 instead of PRIx32.
6693
6694 2016-06-28 Yao Qi <yao.qi@linaro.org>
6695
6696 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
6697 (the_low_target): Install arm_get_syscall_trapinfo.
6698
6699 2016-06-28 Yao Qi <yao.qi@linaro.org>
6700
6701 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
6702 function.
6703 (the_low_target): Install aarch64_get_syscall_trapinfo.
6704
6705 2016-06-28 Yao Qi <yao.qi@linaro.org>
6706
6707 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
6708 Callers updated.
6709 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
6710 Remove parameter sysno.
6711 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
6712 sysret.
6713
6714 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6715
6716 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
6717 (s390_emit_ne_goto): Likewise.
6718 (s390_emit_lt_goto): Likewise.
6719 (s390_emit_le_goto): Likewise.
6720 (s390_emit_gt_goto): Likewise.
6721 (s390_emit_ge_goto): Likewise.
6722 (s390x_emit_eq_goto): Likewise.
6723 (s390x_emit_ne_goto): Likewise.
6724 (s390x_emit_lt_goto): Likewise.
6725 (s390x_emit_le_goto): Likewise.
6726 (s390x_emit_gt_goto): Likewise.
6727 (s390x_emit_ge_goto): Likewise.
6728 (s390_emit_ops_impl): Mark variable static.
6729 (s390x_emit_ops): Likewise.
6730
6731 2016-06-17 Yao Qi <yao.qi@linaro.org>
6732
6733 * linux-low.c (handle_extended_wait): Call
6734 uninsert_reinsert_breakpoints for the parent process. Remove
6735 reinsert breakpoints from the child process. Reinsert them to
6736 the parent process when vfork is done.
6737 * mem-break.c (uninsert_reinsert_breakpoints): New function.
6738 (reinsert_reinsert_breakpoints): New function.
6739 * mem-break.h (uninsert_reinsert_breakpoints): Declare
6740 (reinsert_reinsert_breakpoints): Declare.
6741
6742 2016-06-17 Yao Qi <yao.qi@linaro.org>
6743
6744 * linux-low.c (handle_extended_wait): If the parent is doing
6745 step-over, remove the reinsert breakpoints from the forked child.
6746
6747 2016-06-17 Yao Qi <yao.qi@linaro.org>
6748
6749 * linux-low.c (unsuspend_all_lwps): Declare.
6750 (linux_low_filter_event): If thread exited, call finish_step_over.
6751 If step-over is finished, unsuspend other threads.
6752
6753 2016-06-17 Yao Qi <yao.qi@linaro.org>
6754
6755 * linux-low.c (linux_resume_one_lwp_throw): Assert
6756 has_reinsert_breakpoints returns false.
6757 * mem-break.c (delete_disabled_breakpoints): Assert
6758 bp type isn't reinsert_breakpoint.
6759
6760 2016-06-17 Yao Qi <yao.qi@linaro.org>
6761
6762 * linux-low.c (maybe_hw_step): New function.
6763 (linux_resume_one_lwp_throw): Call maybe_hw_step.
6764 (finish_step_over): Switch current_thread to lwp temporarily,
6765 and assert has_reinsert_breakpoints returns true.
6766 (proceed_one_lwp): Call maybe_hw_step.
6767 * mem-break.c (has_reinsert_breakpoints): New function.
6768 * mem-break.h (has_reinsert_breakpoints): Declare.
6769
6770 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
6771
6772 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
6773
6774 2016-05-17 Yao Qi <yao.qi@linaro.org>
6775
6776 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
6777 instead of find_inferior.
6778
6779 2016-05-05 Yao Qi <yao.qi@linaro.org>
6780
6781 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
6782 Initialize res to zero.
6783
6784 2016-05-05 Yao Qi <yao.qi@linaro.org>
6785
6786 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
6787 to uint32_t.
6788
6789 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6790
6791 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
6792 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
6793 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
6794
6795 2016-04-28 Par Olsson <par.olsson@windriver.com>
6796 Simon Marchi <simon.marchi@ericsson.com>
6797
6798 * tracepoint.c (write_inferior_int8): New function.
6799 (cmd_qtenable_disable): Write enable flag using
6800 write_inferior_int8.
6801
6802 2016-04-25 Yao Qi <yao.qi@linaro.org>
6803
6804 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
6805 (need_step_over_p): Return zero if the LWP has pending signals
6806 can be delivered on software single step target.
6807
6808 2016-04-25 Yao Qi <yao.qi@linaro.org>
6809
6810 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
6811 return instead of error.
6812
6813 2016-04-22 Yao Qi <yao.qi@linaro.org>
6814
6815 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
6816 to 23.
6817
6818 2016-04-22 Yao Qi <yao.qi@linaro.org>
6819
6820 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
6821 signal when stepping over breakpoint with software single
6822 step.
6823
6824 2016-04-21 Pedro Alves <palves@redhat.com>
6825
6826 * linux-s390-low.c (s390_collect_ptrace_register)
6827 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
6828 add casts.
6829 (s390_check_regset): Use void * instead of gdb_byte *.
6830
6831 2016-04-20 Pedro Alves <palves@redhat.com>
6832
6833 * configure: Renegerate.
6834
6835 2016-04-20 Yao Qi <yao.qi@linaro.org>
6836
6837 * linux-aarch32-low.c: Include "arch/arm-linux.h".
6838 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
6839 number 16.
6840 (arm_store_gregset): Likewise.
6841
6842 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
6843
6844 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
6845 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
6846 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
6847 (amd64-avx-mpx-linux.c): New rules.
6848 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
6849 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
6850 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
6851 (srv_amd64_regobj): Add amd64-avx-mpx.o.
6852 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
6853 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
6854 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
6855 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
6856 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
6857 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
6858 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
6859 * linux-x86-low.c (x86_linux_read_description): Add case for
6860 X86_XSTATE_AVX_MPX_MASK.
6861 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
6862 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
6863 init_registers_i386_avx_mpx_linux.
6864 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6865 (initialize_low_tracepoint): Call
6866 init_registers_i386_avx_mpx_linux.
6867 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6868 (initialize_low_tracepoint): Call
6869 init_registers_amd64_avx_mpx_linux.
6870 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
6871 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
6872 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
6873 declarations.
6874
6875 2016-04-18 Pedro Alves <palves@redhat.com>
6876
6877 * configure: Regenerate.
6878
6879 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
6880
6881 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
6882 (aarch64_emit_sub): Likewise.
6883
6884 2016-04-12 Pedro Alves <palves@redhat.com>
6885
6886 * utils.c (prepare_to_throw_exception): Delete.
6887
6888 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
6889
6890 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
6891
6892 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
6893
6894 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
6895
6896 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
6897
6898 * linux-aarch64-ipa.c: Add <elf.h> include.
6899 * linux-ppc-ipa.c: Add <elf.h> include.
6900 * linux-s390-ipa.c: Add <elf.h> include.
6901
6902 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6903
6904 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
6905 (get_raw_reg_ptr): Likewise.
6906 (get_trace_state_variable_value_ptr): Likewise.
6907 (set_trace_state_variable_value_ptr): Likewise.
6908 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
6909 char *.
6910
6911 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
6912 Marcin Kościelnicki <koriakin@0x04.net>
6913
6914 PR/17221
6915 * linux-ppc-low.c (emit_insns): New function.
6916 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
6917 (ppc_emit_prologue): New function.
6918 (ppc_emit_epilogue): New function.
6919 (ppc_emit_add): New function.
6920 (ppc_emit_sub): New function.
6921 (ppc_emit_mul): New function.
6922 (ppc_emit_lsh): New function.
6923 (ppc_emit_rsh_signed): New function.
6924 (ppc_emit_rsh_unsigned): New function.
6925 (ppc_emit_ext): New function.
6926 (ppc_emit_zero_ext): New function.
6927 (ppc_emit_log_not): New function.
6928 (ppc_emit_bit_and): New function.
6929 (ppc_emit_bit_or): New function.
6930 (ppc_emit_bit_xor): New function.
6931 (ppc_emit_bit_not): New function.
6932 (ppc_emit_equal): New function.
6933 (ppc_emit_less_signed): New function.
6934 (ppc_emit_less_unsigned): New function.
6935 (ppc_emit_ref): New function.
6936 (ppc_emit_const): New function.
6937 (ppc_emit_reg): New function.
6938 (ppc_emit_pop): New function.
6939 (ppc_emit_stack_flush): New function.
6940 (ppc_emit_swap): New function.
6941 (ppc_emit_stack_adjust): New function.
6942 (ppc_emit_call): New function.
6943 (ppc_emit_int_call_1): New function.
6944 (ppc_emit_void_call_2): New function.
6945 (ppc_emit_if_goto): New function.
6946 (ppc_emit_goto): New function.
6947 (ppc_emit_eq_goto): New function.
6948 (ppc_emit_ne_goto): New function.
6949 (ppc_emit_lt_goto): New function.
6950 (ppc_emit_le_goto): New function.
6951 (ppc_emit_gt_goto): New function.
6952 (ppc_emit_ge_goto): New function.
6953 (ppc_write_goto_address): New function.
6954 (ppc_emit_ops_impl): New static variable.
6955 (ppc64v1_emit_prologue): New function.
6956 (ppc64v2_emit_prologue): New function.
6957 (ppc64_emit_epilogue): New function.
6958 (ppc64_emit_add): New function.
6959 (ppc64_emit_sub): New function.
6960 (ppc64_emit_mul): New function.
6961 (ppc64_emit_lsh): New function.
6962 (ppc64_emit_rsh_signed): New function.
6963 (ppc64_emit_rsh_unsigned): New function.
6964 (ppc64_emit_ext): New function.
6965 (ppc64_emit_zero_ext): New function.
6966 (ppc64_emit_log_not): New function.
6967 (ppc64_emit_bit_and): New function.
6968 (ppc64_emit_bit_or): New function.
6969 (ppc64_emit_bit_xor): New function.
6970 (ppc64_emit_bit_not): New function.
6971 (ppc64_emit_equal): New function.
6972 (ppc64_emit_less_signed): New function.
6973 (ppc64_emit_less_unsigned): New function.
6974 (ppc64_emit_ref): New function.
6975 (ppc64_emit_const): New function.
6976 (ppc64v1_emit_reg): New function.
6977 (ppc64v2_emit_reg): New function.
6978 (ppc64_emit_pop): New function.
6979 (ppc64_emit_stack_flush): New function.
6980 (ppc64_emit_swap): New function.
6981 (ppc64v1_emit_call): New function.
6982 (ppc64v2_emit_call): New function.
6983 (ppc64v1_emit_int_call_1): New function.
6984 (ppc64v2_emit_int_call_1): New function.
6985 (ppc64v1_emit_void_call_2): New function.
6986 (ppc64v2_emit_void_call_2): New function.
6987 (ppc64_emit_if_goto): New function.
6988 (ppc64_emit_eq_goto): New function.
6989 (ppc64_emit_ne_goto): New function.
6990 (ppc64_emit_lt_goto): New function.
6991 (ppc64_emit_le_goto): New function.
6992 (ppc64_emit_gt_goto): New function.
6993 (ppc64_emit_ge_goto): New function.
6994 (ppc64v1_emit_ops_impl): New static variable.
6995 (ppc64v2_emit_ops_impl): New static variable.
6996 (ppc_emit_ops): New function.
6997 (linux_low_target): Wire in ppc_emit_ops.
6998
6999 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
7000 Marcin Kościelnicki <koriakin@0x04.net>
7001
7002 PR/17221
7003 * Makefile.in: Add powerpc-*-ipa.o
7004 * configure.srv: Add ipa_obj for powerpc*-linux.
7005 * linux-ppc-ipa.c: New file.
7006 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
7007 includes.
7008 (PPC_FIELD): New macro.
7009 (PPC_SEXT): New macro.
7010 (PPC_OP6): New macro.
7011 (PPC_BO): New macro.
7012 (PPC_LI): New macro.
7013 (PPC_BD): New macro.
7014 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
7015 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
7016 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
7017 (ppc_get_thread_area): New function.
7018 (is_elfv2_inferior): New function.
7019 (gen_ds_form): New function.
7020 (GEN_STD): New macro.
7021 (GEN_STDU): New macro.
7022 (GEN_LD): New macro.
7023 (GEN_LDU): New macro.
7024 (gen_d_form): New function.
7025 (GEN_ADDI): New macro.
7026 (GEN_ADDIS): New macro.
7027 (GEN_LI): New macro.
7028 (GEN_LIS): New macro.
7029 (GEN_ORI): New macro.
7030 (GEN_ORIS): New macro.
7031 (GEN_LWZ): New macro.
7032 (GEN_STW): New macro.
7033 (GEN_STWU): New macro.
7034 (gen_xfx_form): New function.
7035 (GEN_MFSPR): New macro.
7036 (GEN_MTSPR): New macro.
7037 (GEN_MFCR): New macro.
7038 (GEN_MTCR): New macro.
7039 (GEN_SYNC): New macro.
7040 (GEN_LWSYNC): New macro.
7041 (gen_x_form): New function.
7042 (GEN_OR): New macro.
7043 (GEN_MR): New macro.
7044 (GEN_LWARX): New macro.
7045 (GEN_STWCX): New macro.
7046 (GEN_CMPW): New macro.
7047 (gen_md_form): New function.
7048 (GEN_RLDICL): New macro.
7049 (GEN_RLDICR): New macro.
7050 (gen_i_form): New function.
7051 (GEN_B): New macro.
7052 (GEN_BL): New macro.
7053 (gen_b_form): New function.
7054 (GEN_BNE): New macro.
7055 (GEN_LOAD): New macro.
7056 (GEN_STORE): New macro.
7057 (gen_limm): New function.
7058 (gen_atomic_xchg): New function.
7059 (gen_call): New function.
7060 (ppc_relocate_instruction): New function.
7061 (ppc_install_fast_tracepoint_jump_pad): New function.
7062 (ppc_get_min_fast_tracepoint_insn_len): New function.
7063 (ppc_get_ipa_tdesc_idx): New function.
7064 (the_low_target): Wire in the new functions.
7065 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
7066 tdescs.
7067 * linux-ppc-tdesc.h: New file.
7068
7069 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
7070
7071 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7072 (alloc_jump_pad_buffer): New function.
7073 * linux-amd64-ipa.c: Add <sys/mman.h> include.
7074 (alloc_jump_pad_buffer): New function.
7075 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
7076 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
7077 (alloc_jump_pad_buffer): New function.
7078 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
7079 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
7080 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
7081 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
7082
7083 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7084
7085 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
7086 * linux-amd64-ipa.c: Likewise.
7087 * linux-i386-ipa.c: Likewise.
7088 * linux-s390-ipa.c: Likewise.
7089 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
7090 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
7091 set_trace_state_variable_value_ptr.
7092 (struct ipa_sym_addresses): Likewise.
7093 (symbol_list): Likewise.
7094 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
7095 accessing gdb_collect directly.
7096 (gdb_collect_ptr_type): New typedef.
7097 (get_raw_reg_ptr_type): New typedef.
7098 (get_trace_state_variable_value_ptr_type): New typedef.
7099 (set_trace_state_variable_value_ptr_type): New typedef.
7100 (gdb_collect_ptr): New global.
7101 (get_raw_reg_ptr): New global.
7102 (get_trace_state_variable_value_ptr): New global.
7103 (set_trace_state_variable_value_ptr): New global.
7104 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7105 accessing get_raw_reg directly.
7106 (get_get_tsv_func_addr): Likewise for
7107 get_trace_state_variable_value_ptr.
7108 (get_set_tsv_func_addr): Likewise for
7109 set_trace_state_variable_value_ptr.
7110 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7111
7112 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7113
7114 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7115
7116 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7117
7118 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7119 packets.
7120 (relocate_instruction): Remove own_buf.
7121 * server.c (own_buf): Make global.
7122 (handle_v_requests): Make global.
7123 * server.h (own_buf): New declaration.
7124 (handle_v_requests): New prototype.
7125
7126 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7127
7128 PR 18377
7129 * linux-s390-low.c (add_insns): New function.
7130 (s390_emit_prologue): New function.
7131 (s390_emit_epilogue): New function.
7132 (s390_emit_add): New function.
7133 (s390_emit_sub): New function.
7134 (s390_emit_mul): New function.
7135 (s390_emit_lsh): New function.
7136 (s390_emit_rsh_signed): New function.
7137 (s390_emit_rsh_unsigned): New function.
7138 (s390_emit_ext): New function.
7139 (s390_emit_log_not): New function.
7140 (s390_emit_bit_and): New function.
7141 (s390_emit_bit_or): New function.
7142 (s390_emit_bit_xor): New function.
7143 (s390_emit_bit_not): New function.
7144 (s390_emit_equal): New function.
7145 (s390_emit_less_signed): New function.
7146 (s390_emit_less_unsigned): New function.
7147 (s390_emit_ref): New function.
7148 (s390_emit_if_goto): New function.
7149 (s390_emit_goto): New function.
7150 (s390_write_goto_address): New function.
7151 (s390_emit_litpool): New function.
7152 (s390_emit_const): New function.
7153 (s390_emit_call): New function.
7154 (s390_emit_reg): New function.
7155 (s390_emit_pop): New function.
7156 (s390_emit_stack_flush): New function.
7157 (s390_emit_zero_ext): New function.
7158 (s390_emit_swap): New function.
7159 (s390_emit_stack_adjust): New function.
7160 (s390_emit_set_r2): New function.
7161 (s390_emit_int_call_1): New function.
7162 (s390_emit_void_call_2): New function.
7163 (s390_emit_eq_goto): New function.
7164 (s390_emit_ne_goto): New function.
7165 (s390_emit_lt_goto): New function.
7166 (s390_emit_le_goto): New function.
7167 (s390_emit_gt_goto): New function.
7168 (s390_emit_ge_goto): New function.
7169 (s390x_emit_prologue): New function.
7170 (s390x_emit_epilogue): New function.
7171 (s390x_emit_add): New function.
7172 (s390x_emit_sub): New function.
7173 (s390x_emit_mul): New function.
7174 (s390x_emit_lsh): New function.
7175 (s390x_emit_rsh_signed): New function.
7176 (s390x_emit_rsh_unsigned): New function.
7177 (s390x_emit_ext): New function.
7178 (s390x_emit_log_not): New function.
7179 (s390x_emit_bit_and): New function.
7180 (s390x_emit_bit_or): New function.
7181 (s390x_emit_bit_xor): New function.
7182 (s390x_emit_bit_not): New function.
7183 (s390x_emit_equal): New function.
7184 (s390x_emit_less_signed): New function.
7185 (s390x_emit_less_unsigned): New function.
7186 (s390x_emit_ref): New function.
7187 (s390x_emit_if_goto): New function.
7188 (s390x_emit_const): New function.
7189 (s390x_emit_call): New function.
7190 (s390x_emit_reg): New function.
7191 (s390x_emit_pop): New function.
7192 (s390x_emit_stack_flush): New function.
7193 (s390x_emit_zero_ext): New function.
7194 (s390x_emit_swap): New function.
7195 (s390x_emit_stack_adjust): New function.
7196 (s390x_emit_int_call_1): New function.
7197 (s390x_emit_void_call_2): New function.
7198 (s390x_emit_eq_goto): New function.
7199 (s390x_emit_ne_goto): New function.
7200 (s390x_emit_lt_goto): New function.
7201 (s390x_emit_le_goto): New function.
7202 (s390x_emit_gt_goto): New function.
7203 (s390x_emit_ge_goto): New function.
7204 (s390_emit_ops): New function.
7205 (struct linux_target_ops): Fill in emit_ops hook.
7206
7207 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7208
7209 PR 18377
7210 * Makefile.in: Add s390 IPA files.
7211 * configure.srv: Build IPA for s390.
7212 * linux-s390-ipa.c: New file.
7213 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7214 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7215 (tdesc_s390_linux32): Likewise.
7216 (init_registers_s390_linux32v1): Likewise.
7217 (tdesc_s390_linux32v1): Likewise.
7218 (init_registers_s390_linux32v2): Likewise.
7219 (tdesc_s390_linux32v2): Likewise.
7220 (init_registers_s390_linux64): Likewise.
7221 (tdesc_s390_linux64): Likewise.
7222 (init_registers_s390_linux64v1): Likewise.
7223 (tdesc_s390_linux64v1): Likewise.
7224 (init_registers_s390_linux64v2): Likewise.
7225 (tdesc_s390_linux64v2): Likewise.
7226 (init_registers_s390_te_linux64): Likewise.
7227 (tdesc_s390_te_linux64): Likewise.
7228 (init_registers_s390_vx_linux64): Likewise.
7229 (tdesc_s390_vx_linux64): Likewise.
7230 (init_registers_s390_tevx_linux64): Likewise.
7231 (tdesc_s390_tevx_linux64): Likewise.
7232 (init_registers_s390x_linux64): Likewise.
7233 (tdesc_s390x_linux64): Likewise.
7234 (init_registers_s390x_linux64v1): Likewise.
7235 (tdesc_s390x_linux64v1): Likewise.
7236 (init_registers_s390x_linux64v2): Likewise.
7237 (tdesc_s390x_linux64v2): Likewise.
7238 (init_registers_s390x_te_linux64): Likewise.
7239 (tdesc_s390x_te_linux64): Likewise.
7240 (init_registers_s390x_vx_linux64): Likewise.
7241 (tdesc_s390x_vx_linux64): Likewise.
7242 (init_registers_s390x_tevx_linux64): Likewise.
7243 (tdesc_s390x_tevx_linux64): Likewise.
7244 (have_hwcap_s390_vx): New static variable.
7245 (s390_arch_setup): Fill have_hwcap_s390_vx.
7246 (s390_get_thread_area): New function.
7247 (s390_ft_entry_gpr_esa): New const.
7248 (s390_ft_entry_gpr_zarch): New const.
7249 (s390_ft_entry_misc): New const.
7250 (s390_ft_entry_fr): New const.
7251 (s390_ft_entry_vr): New const.
7252 (s390_ft_main_31): New const.
7253 (s390_ft_main_64): New const.
7254 (s390_ft_exit_fr): New const.
7255 (s390_ft_exit_vr): New const.
7256 (s390_ft_exit_misc): New const.
7257 (s390_ft_exit_gpr_esa): New const.
7258 (s390_ft_exit_gpr_zarch): New const.
7259 (append_insns): New function.
7260 (s390_relocate_instruction): New function.
7261 (s390_install_fast_tracepoint_jump_pad): New function.
7262 (s390_get_min_fast_tracepoint_insn_len): New function.
7263 (s390_get_ipa_tdesc_idx): New function.
7264 (struct linux_target_ops): Wire in the above functions.
7265 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7266 * linux-s390-tdesc.h: New file.
7267
7268 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7269
7270 * linux-s390-low.c (s390_supports_tracepoints): New function.
7271 (struct linux_target_ops): Fill supports_tracepoints hook.
7272
7273 2016-03-18 Yao Qi <yao.qi@linaro.org>
7274
7275 * linux-low.c (lwp_signal_can_be_delivered): New function.
7276 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7277
7278 2016-03-18 Yao Qi <yao.qi@linaro.org>
7279
7280 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7281 0 if signal is enqueued. Remove 'signal' from one debugging
7282 message. Move one debugging message to some lines below.
7283 Remove code setting 'signal' to 0.
7284
7285 2016-03-18 Yao Qi <yao.qi@linaro.org>
7286
7287 * linux-low.c (linux_low_filter_event): Remove redundant
7288 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7289
7290 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7291
7292 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7293 (struct linux_target_ops): Wire in the above.
7294
7295 2016-03-03 Yao Qi <yao.qi@linaro.org>
7296
7297 * linux-low.c: Update comments to start_step_over.
7298
7299 2016-03-03 Yao Qi <yao.qi@linaro.org>
7300
7301 PR server/19736
7302 * linux-low.c (handle_extended_wait): Set child suspended
7303 if event_lwp->bp_reinsert isn't zero.
7304
7305 2016-03-02 Yao Qi <yao.qi@linaro.org>
7306
7307 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7308 enqueue_pending_signal.
7309
7310 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7311
7312 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7313 is actually loaded.
7314
7315 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7316
7317 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7318 (s390_regmap_3264) [!__s390x__]: New global.
7319 (s390_collect_ptrace_register): Skip map entries containing -1.
7320 (s390_supply_ptrace_register): Ditto.
7321 (s390_fill_gprs_high): New function.
7322 (s390_store_gprs_high): New function.
7323 (s390_regsets): Add NT_S390_HIGH_GPRS.
7324 (s390_get_hwcap): Enable on 31-bit.
7325 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7326 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7327 Detect NT_S390_HIGH_GPRS.
7328 (s390_usrregs_info_3264): Enable on 31-bit.
7329 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7330 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7331
7332 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7333
7334 PR gdb/13808
7335 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7336 * configure.srv: Ditto.
7337 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7338 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7339 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7340 (init_registers_amd64_linux): Remove prototype.
7341 (tdesc_amd64_linux): Remove declaration.
7342 (get_ipa_tdesc): New function.
7343 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7344 initialize remaining tdescs.
7345 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7346 (init_registers_i386_linux): Remove prototype.
7347 (tdesc_i386_linux): Remove declaration.
7348 (get_ipa_tdesc): New function.
7349 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7350 initialize remaining tdescs.
7351 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7352 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7353 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7354 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7355 (x86_get_ipa_tdesc_idx): New function.
7356 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7357 * linux-x86-tdesc.h: New file.
7358 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7359 (target_get_ipa_tdesc_idx): New macro.
7360 * tracepoint.c (ipa_tdesc_idx): New macro.
7361 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7362 (symbol_list): Add ipa_tdesc_idx.
7363 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7364 (ipa_tdesc): Remove.
7365 (ipa_tdesc_idx): New variable.
7366 (get_context_regcache): Use get_ipa_tdesc.
7367 (gdb_collect): Ditto.
7368 (gdb_probe): Ditto.
7369 * tracepoint.h (get_ipa_tdesc): New prototype.
7370 (ipa_tdesc): Remove.
7371
7372 2016-02-24 Pedro Alves <palves@redhat.com>
7373
7374 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7375 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7376 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7377 Factor out common code between the USE_SIGTRAP_SIGINFO and
7378 !USE_SIGTRAP_SIGINFO blocks.
7379 (linux_low_filter_event): Call save_stop_reason instead of
7380 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7381 Update comments.
7382 (linux_wait_1): Update comments.
7383
7384 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
7385
7386 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7387 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7388 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7389 ppc_insert_point, ppc_remove_point.
7390
7391 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7392
7393 * linux-s390-low.c (s390_supports_z_point_type): New function.
7394 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7395
7396 2016-02-16 Yao Qi <yao.qi@linaro.org>
7397
7398 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7399 PC. Get pc from regcache_read_pc.
7400
7401 2016-02-12 Yao Qi <yao.qi@linaro.org>
7402
7403 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7404 or linux_get_pc_32bit.
7405 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7406
7407 2016-02-12 Yao Qi <yao.qi@linaro.org>
7408
7409 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7410 arm_linux_get_next_pcs_fixup.
7411
7412 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7413
7414 * tracepoint.c (x_tracepoint_action_download): Change
7415 write_inferior_data_ptr to write_inferior_data_pointer.
7416 (cmd_qtstart): Likewise.
7417 (write_inferior_data_ptr): Remove.
7418 (download_agent_expr): Change write_inferior_data_ptr to
7419 write_inferior_data_pointer.
7420 (download_tracepoint_1): Likewise.
7421 (download_tracepoint): Likewise.
7422 (download_trace_state_variables): Likewise.
7423
7424 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
7425 Marcin Kościelnicki <koriakin@0x04.net>
7426
7427 * tracepoint.c (struct tracepoint_action_ops): Remove.
7428 (struct tracepoint_action): Remove ops.
7429 (m_tracepoint_action_download, r_tracepoint_action_download)
7430 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7431 size and offset accordingly.
7432 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7433 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7434 (tracepoint_action_send, tracepoint_action_download): New functions.
7435 Helpers for trace action handlers.
7436 (add_tracepoint_action): Remove setup actions ops.
7437 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7438
7439 2016-02-10 Yao Qi <yao.qi@linaro.org>
7440
7441 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7442
7443 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7444
7445 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7446 to AC_OUTPUT.
7447 * configure: Regenerate.
7448
7449 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7450
7451 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7452 void * to gdb_byte *.
7453 * linux-low.c (siginfo_fixup): Likewise.
7454 (linux_xfer_siginfo): Likewise.
7455 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7456 Likewise.
7457 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7458
7459 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7460
7461 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7462 to srv_tgtobj.
7463 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7464 to srv_tgtobj.
7465 * linux-x86-low.c [__x86_64__]: Include
7466 "nat/amd64-linux-siginfo.h".
7467 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7468 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7469 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7470 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7471 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7472 (cpt_si_fd, si_timerid, si_overrun): Move from
7473 nat/amd64-linux-siginfo.c.
7474 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7475
7476 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7477
7478 * server.c (skip_to_semicolon): Remove.
7479 (process_point_options): Use strchrnul instead of
7480 skip_to_semicolon.
7481
7482 2016-01-26 Yao Qi <yao.qi@linaro.org>
7483
7484 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7485 * linux-low.c (install_software_single_step_breakpoints): Don't
7486 call regcache_read_pc.
7487 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7488 argument pc.
7489
7490 2016-01-26 Yao Qi <yao.qi@linaro.org>
7491
7492 * linux-low.c (install_software_single_step_breakpoints): Call
7493 regcache_read_pc instead of get_pc.
7494
7495 2016-01-26 Yao Qi <yao.qi@linaro.org>
7496
7497 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7498 (unblock_async_io): Rename to ...
7499 (block_unblock_async_io): ... it. New function.
7500 (enable_async_io): Don't install SIGIO handler. Unblock it
7501 instead.
7502 (disable_async_io): Don't ignore SIGIO. Block it instead.
7503 (initialize_async_io): Install SIGIO handler. Don't call
7504 unblock_async_io.
7505
7506 2016-01-26 Yao Qi <yao.qi@linaro.org>
7507
7508 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7509 first character is '\003', call *the_target->request_interrupt.
7510
7511 2016-01-25 Yao Qi <yao.qi@linaro.org>
7512
7513 * remote-utils.c (new_thread_notify): Remove.
7514 (dead_thread_notify): Likewise.
7515 * remote-utils.h (new_thread_notify): Remove declaration.
7516 (dead_thread_notify): Likewise.
7517
7518 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7519
7520 * gdb.trace/pending.exp: Fix expected message on continue.
7521
7522 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7523
7524 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7525 it works properly on big-endian machines where sizeof (CORE_ADDR)
7526 != sizeof (void *).
7527
7528 2016-01-21 Pedro Alves <palves@redhat.com>
7529
7530 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7531 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7532 * configure: Regenerate.
7533
7534 2016-01-21 Yao Qi <yao.qi@linaro.org>
7535
7536 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7537 is_thumb and set it according to CPSR saved on the stack.
7538 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7539 arm_sigreturn_next_pc.
7540
7541 2016-01-18 Yao Qi <yao.qi@linaro.org>
7542
7543 * linux-low.c (linux_set_pc_64bit): New function.
7544 (linux_get_pc_64bit): New function.
7545 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7546 Declare.
7547 * linux-sparc-low.c (debug_threads): Remove declaration.
7548 (sparc_get_pc): Remove.
7549 (the_low_target): Use linux_get_pc_64bit instead of
7550 sparc_get_pc.
7551 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7552 (the_low_target): Use linux_get_pc_64bit and
7553 linux_set_pc_64bit.
7554
7555 2016-01-18 Yao Qi <yao.qi@linaro.org>
7556
7557 * linux-arm-low.c (debug_threads): Remove declaration.
7558 (arm_get_pc, arm_set_pc): Remove.
7559 (the_low_target): Use linux_get_pc_32bit and
7560 linux_set_pc_32bit.
7561 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
7562 (the_low_target): Use linux_get_pc_32bit and
7563 linux_set_pc_32bit.
7564 * linux-cris-low.c (debug_threads): Remove declaration.
7565 (cris_get_pc, cris_set_pc,): Remove.
7566 (the_low_target): Use linux_get_pc_32bit and
7567 linux_set_pc_32bit.
7568 * linux-crisv32-low.c (debug_threads): Remove declaration.
7569 (cris_get_pc, cris_set_pc): Remove.
7570 (the_low_target): Use linux_get_pc_32bit and
7571 linux_set_pc_32bit.
7572 * linux-low.c: Include inttypes.h.
7573 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
7574 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
7575 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
7576 (the_low_target): Use linux_get_pc_32bit and
7577 linux_set_pc_32bit.
7578 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
7579 (the_low_target): Use linux_get_pc_32bit and
7580 linux_set_pc_32bit.
7581 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
7582 (the_low_target): Use linux_get_pc_32bit and
7583 linux_set_pc_32bit.
7584 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
7585 (the_low_target): Use linux_get_pc_32bit and
7586 linux_set_pc_32bit.
7587 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
7588 (the_low_target): Use linux_get_pc_32bit and
7589 linux_set_pc_32bit.
7590
7591 2016-01-18 Gary Benson <gbenson@redhat.com>
7592
7593 * configure.ac (AC_FUNC_FORK): New check.
7594 * config.in: Regenerate.
7595 * configure: Likewise.
7596
7597 2016-01-14 Yao Qi <yao.qi@linaro.org>
7598
7599 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
7600 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
7601 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
7602 arm_get_next_pcs_ctor.
7603
7604 2016-01-12 Josh Stone <jistone@redhat.com>
7605 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7606
7607 * inferiors.h: Include "gdb_vecs.h".
7608 (struct process_info): Add syscalls_to_catch.
7609 * inferiors.c (remove_process): Free syscalls_to_catch.
7610 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
7611 syscall_return stops.
7612 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
7613 * server.c (handle_general_set): Handle QCatchSyscalls.
7614 (handle_query): Report support for QCatchSyscalls.
7615 * target.h (struct target_ops): Add supports_catch_syscall.
7616 (target_supports_catch_syscall): New macro.
7617 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
7618 (struct lwp_info): Add syscall_state.
7619 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
7620 Maintain syscall_state and syscalls_to_catch across exec.
7621 (get_syscall_trapinfo): New function, proxy to the_low_target.
7622 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
7623 (linux_low_filter_event): Toggle syscall_state entry/return for
7624 syscall traps, and set it ignored for all others.
7625 (gdb_catching_syscalls_p): New function.
7626 (gdb_catch_this_syscall_p): New function.
7627 (linux_wait_1): Handle SYSCALL_SIGTRAP.
7628 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
7629 (linux_supports_catch_syscall): New function.
7630 (linux_target_ops): Install it.
7631 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
7632 (the_low_target): Install it.
7633
7634 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7635
7636 * acinclude.m4: Include new ../warning.m4 file.
7637 * configure: Regenerated.
7638 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
7639
7640 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7641
7642 * ax.c (is_goto_target): Mark static.
7643 * linux-low.c (register_addr): Likewise.
7644 (linux_fetch_registers, linux_store_registers): Likewise.
7645 * mem-break.c (any_persistent_commands): Fix old prototype.
7646 (add_commands_to_breakpoint): Mark static.
7647 * regcache.c (find_register_by_name): Delete unused func.
7648 * remote-utils.c (hex_or_minus_one): Mark static.
7649 * server.c (monitor_show_help): Mark static.
7650 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
7651 handle_v_requests): Likewise.
7652
7653 2016-01-12 Pedro Alves <palves@redhat.com>
7654
7655 Remove use of the registered trademark symbol throughout.
7656
7657 2016-01-08 Yao Qi <yao.qi@linaro.org>
7658
7659 * remote-utils.c (getpkt): If c is '\003', call target hook
7660 request_interrupt.
7661
7662 2016-01-06 Yao Qi <yao.qi@linaro.org>
7663
7664 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
7665 linux-aarch32-low.c.
7666 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7667 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7668 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7669 (thumb2_breakpoint): Declare.
7670 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
7671 linux-aarch32-low.h.
7672 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7673 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7674 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7675
7676 2016-01-01 Joel Brobecker <brobecker@adacore.com>
7677
7678 * gdbreplay.c (gdbreplay_version): Change copyright year in
7679 version message.
7680 * server.c (gdbserver_version): Likewise.
7681
7682 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
7683
7684 * server.c (crc32_table): Delete.
7685 (crc32): Use libiberty's xcrc32 function.
7686
7687 2015-12-22 Joel Brobecker <brobecker@adacore.com>
7688
7689 * lynx-low.c (lynx_delete_thread_callback): New function.
7690 (lynx_mourn): Properly delete our process and all of its
7691 threads. Remove call to clear_inferiors.
7692
7693 2015-12-22 Joel Brobecker <brobecker@adacore.com>
7694
7695 * target.c (thread_search_callback): Add check that
7696 the thread_stopped target callback is not NULL before
7697 calling it.
7698
7699 2015-12-21 Yao Qi <yao.qi@linaro.org>
7700
7701 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
7702 arm breakpoint.
7703
7704 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7705
7706 * server.c (handle_query): Call target_supports_software_single_step.
7707
7708 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7709
7710 * linux-low.c (single_step): New function.
7711 (linux_resume_one_lwp_throw): Call single_step.
7712 (start_step_over): Likewise.
7713
7714 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7715
7716 * Makefile.in (SFILES): Append arch/arm-linux.c,
7717 arch/arm-get-next-pcs.c.
7718 (arm-linux.o): New rule.
7719 (arm-get-next-pcs.o): New rule.
7720 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
7721 arm-linux.o.
7722 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
7723 to linux-aarch32-low.c.
7724 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7725 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7726 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7727 (thumb2_breakpoint_len): Likewise.
7728 (arm_is_thumb_mode): Make non-static.
7729 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
7730 from linux-aarch32-low.c.
7731 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7732 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7733 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7734 (thumb2_breakpoint_len): Likewise.
7735 (arm_is_thumb_mode): New declaration.
7736 * linux-arm-low.c: Include arch/arm-linux.h
7737 aarch/arm-get-next-pcs.h, sys/syscall.h.
7738 (get_next_pcs_ops): New struct.
7739 (get_next_pcs_addr_bits_remove): New function.
7740 (get_next_pcs_is_thumb): New function.
7741 (get_next_pcs_read_memory_unsigned_integer): Likewise.
7742 (arm_sigreturn_next_pc): Likewise.
7743 (get_next_pcs_syscall_next_pc): Likewise.
7744 (arm_gdbserver_get_next_pcs): Likewise.
7745 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
7746 Initialize.
7747 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
7748 * server.h: Include gdb_vecs.h.
7749
7750 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7751
7752 * Makefile.in (SFILES): Append common/common-regcache.c.
7753 (OBS): Append common-regcache.o.
7754 (common-regcache.o): New rule.
7755 * regcache.c (init_register_cache): Initialize cache to
7756 REG_UNAVAILABLE.
7757 (regcache_raw_read_unsigned): New function.
7758 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
7759 register_status enum.
7760
7761 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7762
7763 * linux-aarch64-low.c (the_low_targets): Rename
7764 breakpoint_reinsert_addr to get_next_pcs.
7765 * linux-arm-low.c (the_low_targets): Likewise.
7766 * linux-bfin-low.c (the_low_targets): Likewise.
7767 * linux-cris-low.c (the_low_targets): Likewise.
7768 * linux-crisv32-low.c (the_low_targets): Likewise.
7769 * linux-low.c (can_software_single_step): Likewise.
7770 (install_software_single_step_breakpoints): New function.
7771 (start_step_over): Use install_software_single_step_breakpoints.
7772 * linux-low.h: New CORE_ADDR vector.
7773 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
7774 get_next_pcs.
7775 * linux-mips-low.c (the_low_targets): Likewise.
7776 * linux-nios2-low.c (the_low_targets): Likewise.
7777 * linux-sparc-low.c (the_low_targets): Likewise.
7778
7779 2015-12-17 Pedro Alves <palves@redhat.com>
7780
7781 * linux-low.c (linux_kill_one_lwp): Remove references to
7782 LinuxThreads.
7783 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
7784 to 'kill'.
7785 (linux_init_signals): Delete.
7786 (initialize_low): Adjust.
7787 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
7788
7789 2015-12-16 Pedro Alves <palves@redhat.com>
7790
7791 * configure.ac (compiler warning flags): When testing a
7792 -Wno-foo option, check whether -Wfoo works instead.
7793 * configure: Regenerate.
7794
7795 2015-12-11 Don Breazeal <donb@codesourcery.com>
7796
7797 * server.c (process_serial_event): Don't exit from gdbserver
7798 in remote mode if there are still active inferiors.
7799
7800 2015-12-11 Yao Qi <yao.qi@linaro.org>
7801
7802 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
7803 arm_breakpoint_at if the process is 32-bit.
7804
7805 2015-12-11 Yao Qi <yao.qi@linaro.org>
7806
7807 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
7808 arm breakpoint.
7809
7810 2015-12-07 Yao Qi <yao.qi@linaro.org>
7811
7812 * configure.srv: Append arm.o to srv_tgtobj for
7813 aarch64*-*-linux* target.
7814 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
7815 from linux-arm-low.c.
7816 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7817 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7818 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7819 (thumb2_breakpoint_len): Likewise.
7820 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
7821 (arm_breakpoint_kinds): Likewise.
7822 (arm_breakpoint_kind_from_pc): Likewise.
7823 (arm_sw_breakpoint_from_kind): Likewise.
7824 (arm_breakpoint_kind_from_current_state): Likewise.
7825 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
7826 (arm_sw_breakpoint_from_kind): Declare.
7827 (arm_breakpoint_kind_from_current_state): Declare.
7828 (arm_breakpoint_at): Declare.
7829 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
7830 arm_sw_breakpoint_from_kind if process is 32-bit.
7831 (aarch64_breakpoint_kind_from_pc): New function.
7832 (aarch64_breakpoint_kind_from_current_state): New function.
7833 (the_low_target): Initialize fields breakpoint_kind_from_pc
7834 and breakpoint_kind_from_current_state.
7835 * linux-arm-low.c (arm_breakpoint_kinds): Move to
7836 linux-aarch32-low.c.
7837 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
7838 (arm_breakpoint, arm_breakpoint_len): Likewise.
7839 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
7840 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7841 (arm_is_thumb_mode): Likewise.
7842 (arm_breakpoint_at): Likewise.
7843 (arm_breakpoint_kind_from_pc): Likewise.
7844 (arm_sw_breakpoint_from_kind): Likewise.
7845 (arm_breakpoint_kind_from_current_state): Likewise.
7846
7847 Revert:
7848 2015-08-04 Yao Qi <yao.qi@linaro.org>
7849
7850 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7851 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7852 * server.c (extended_protocol): Remove "static".
7853 * server.h (extended_protocol): Declare it.
7854
7855 2015-12-04 Josh Stone <jistone@redhat.com>
7856
7857 * target.h (struct target_ops) <arch_setup>: Rename to ...
7858 (struct target_ops) <post_create_inferior>: ... this.
7859 (target_arch_setup): Rename to ...
7860 (target_post_create_inferior): ... this, calling post_create_inferior.
7861 * server.c (start_inferior): Update target_arch_setup calls to
7862 target_post_create_inferior.
7863 * linux-low.c (linux_low_ptrace_options): Forward declare.
7864 (linux_arch_setup): Update its comment for general use.
7865 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
7866 (struct linux_target_ops): Use linux_post_create_inferior.
7867 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
7868 to post_create_inferior.
7869 * nto-low.c (struct nto_target_ops): Likewise.
7870 * spu-low.c (struct spu_target_ops): Likewise.
7871 * win32-low.c (struct win32_target_ops): Likewise.
7872
7873 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
7874
7875 * linux-arm-low.c: Remove duplicate arch/arm.h include.
7876
7877 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7878
7879 * linux-arm-low.c (arm_reinsert_addr): Remove function.
7880 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
7881 * linux-cris-low.c (cris_reinsert_addr> Remove function.
7882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7883 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
7884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7885 * linux-mips-low.c (mips_reinsert_addr): Remove function.
7886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7887 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
7888 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7889 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
7890 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7891
7892 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7893
7894 * linux-low.c (linux_look_up_symbols): Don't call
7895 linux_supports_traceclone.
7896 * linux-low.h (thread_db_init): Remove use_events argument.
7897 * thread-db.c (thread_db_use_event): Remove global variable.
7898 (struct thread_db) <td_thr_event_enable_p>: Remove field.
7899 (struct thread_db) <td_create_bp>: Remove field.
7900 (thread_db_create_event): Remove function.
7901 (thread_db_enable_reporting): Likewise.
7902 (find_one_thread): Don't check for thread_db_use_events.
7903 (attach_thread): Likewise.
7904 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
7905 (try_thread_db_load_1): Don't check for thread_db_use_events.
7906 (thread_db_init): Remove use_events argument and thread events
7907 handling.
7908 (remove_thread_event_breakpoints): Remove function.
7909 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
7910
7911 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7912
7913 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
7914 New function.
7915 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7916 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
7917 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7918 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
7919 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
7920 Initialize.
7921 * linux-crisv32-low.c (cris_supports_hardware_single_step):
7922 New function.
7923 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7924 * linux-low.c (can_hardware_single_step): Use
7925 supports_hardware_single_step.
7926 (can_software_single_step): New function.
7927 (start_step_over): Call can_software_single_step.
7928 (linux_supports_hardware_single_step): New function.
7929 (struct target_ops) <supports_software_single_step>: Initialize.
7930 * linux-low.h (struct linux_target_ops)
7931 <supports_hardware_single_step>: Initialize.
7932 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
7933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7934 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
7935 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
7936 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
7937 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7938 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
7939 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7940 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
7941 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
7942 Initialize.
7943 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
7944 (struct linux_target_ops) <tile_supports_hardware_single_step>:
7945 Initialize.
7946 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
7947 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7948 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
7949 New function.
7950 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7951 * target.h (struct target_ops): <supports_software_single_step>:
7952 New field.
7953 (target_supports_software_single_step): New macro.
7954
7955 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7956
7957 * linux-low.c (linux_wait_1): Fix pc advance condition.
7958 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
7959 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
7960
7961 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7962
7963 * linux-arm-low.c (arm_is_thumb_mode): New function.
7964 (arm_breakpoint_at): Use arm_is_thumb_mode.
7965 (arm_breakpoint_kind_from_current_state): New function.
7966 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
7967 Initialize.
7968 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
7969 (linux_breakpoint_kind_from_current_state): New function.
7970 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
7971 * linux-low.h (struct linux_target_ops)
7972 <breakpoint_kind_from_current_state>: New field.
7973 * target.h (struct target_ops): Likewise.
7974 (target_breakpoint_kind_from_current_state): New macro.
7975
7976 2015-11-30 Pedro Alves <palves@redhat.com>
7977
7978 * linux-low.c (linux_resume): Wake up the event loop before
7979 returning.
7980
7981 2015-11-30 Pedro Alves <palves@redhat.com>
7982
7983 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
7984 check.
7985 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
7986 to -1.
7987 * target.c (struct thread_search): New structure.
7988 (thread_search_callback): New function.
7989 (prev_general_thread): New global.
7990 (prepare_to_access_memory, done_accessing_memory): New functions.
7991 * target.h (prepare_to_access_memory, done_accessing_memory):
7992 Replace macros with function declarations.
7993
7994 2015-11-30 Pedro Alves <palves@redhat.com>
7995
7996 PR 14618
7997 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
7998 report TARGET_WAITKIND_NO_RESUMED.
7999 * remote-utils.c (prepare_resume_reply): Handle
8000 TARGET_WAITKIND_NO_RESUMED.
8001 * server.c (report_no_resumed): New global.
8002 (handle_query) <qSupported>: Handle "no-resumed+". Report
8003 "no-resumed+" support.
8004 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
8005 return error if the client doesn't support no-resumed events.
8006 (push_stop_notification): New function.
8007 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
8008 events if the client supports them.
8009
8010 2015-11-30 Pedro Alves <palves@redhat.com>
8011
8012 * linux-low.c (thread_still_has_status_pending_p): Don't check
8013 vCont;t here.
8014 (lwp_resumed): New function.
8015 (status_pending_p_callback): Return early if the LWP is not
8016 supposed to be resumed.
8017
8018 2015-11-30 Pedro Alves <palves@redhat.com>
8019
8020 * linux-low.c (handle_extended_wait): Assert that the LWP's
8021 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
8022 thread create events, leave the new child's status pending.
8023 (linux_low_filter_event): If GDB wants to hear about thread exit
8024 events, leave the LWP marked dead and don't delete it.
8025 (linux_wait_for_event_filtered): Don't check for thread exit.
8026 (filter_exit_event): New function.
8027 (linux_wait_1): Use it, when returning an exit event.
8028 (linux_resume_one_lwp_throw): Assert that the LWP's
8029 waitstatus is TARGET_WAITKIND_IGNORE.
8030 * remote-utils.c (prepare_resume_reply): Handle
8031 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
8032 * server.c (report_thread_events): New global.
8033 (handle_general_set): Handle QThreadEvents.
8034 (handle_query) <qSupported>: Handle and report QThreadEvents+;
8035 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
8036 TARGET_WAITKIND_THREAD_EXITED.
8037 * server.h (report_thread_events): Declare.
8038
8039 2015-11-30 Pedro Alves <palves@redhat.com>
8040
8041 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
8042 the thread's last_resume_kind was resume_stop.
8043
8044 2015-11-30 Pedro Alves <palves@redhat.com>
8045
8046 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
8047 before returning.
8048
8049 2015-11-30 Pedro Alves <palves@redhat.com>
8050
8051 * server.c (handle_v_requests): Handle vCtrlC.
8052
8053 2015-11-30 Pedro Alves <palves@redhat.com>
8054
8055 * gdbthread.h (find_any_thread_of_pid): Declare.
8056 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
8057 functions.
8058 * server.c (handle_query): If current_thread is NULL, look for
8059 another thread of the selected process.
8060
8061 2015-11-26 Daniel Colascione <dancol@dancol.org>
8062 Simon Marchi <simon.marchi@ericsson.com>
8063
8064 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
8065 * server.c (handle_qxfer_threads_worker): Refactor to include thread
8066 name in reply.
8067 * target.h (struct target_ops) <thread_name>: New field.
8068 (target_thread_name): New macro.
8069
8070 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8071
8072 * regcache.h (regcache_invalidate_pid): Add declaration.
8073 * regcache.c (regcache_invalidate_pid): New function, extracted
8074 from regcache_invalidate.
8075 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
8076 Add trivial documentation comment.
8077 * lynx-low.c: Use regcache_invalidate_pid instead of
8078 regcache_invalidate.
8079
8080 2015-11-23 Joel Brobecker <brobecker@adacore.com>
8081
8082 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
8083 and Elf64_auxv_t if the target is Android.
8084
8085 2015-11-22 Doug Evans <xdje42@gmail.com>
8086
8087 * target.h: #include <sys/types.h>.
8088
8089 2015-11-19 Pedro Alves <palves@redhat.com>
8090
8091 * linux-low.c (linux_process_qsupported): Change prototype.
8092 Adjust.
8093 * linux-low.h (struct linux_target_ops) <process_qsupported>:
8094 Change prototype.
8095 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
8096 and adjust to loop over all features.
8097 * server.c (handle_query) <qSupported>: Adjust to call
8098 target_process_qsupported once, passing it a vector of unprocessed
8099 features.
8100 * target.h (struct target_ops) <process_qsupported>: Change
8101 prototype.
8102 (target_process_qsupported): Adjust.
8103
8104 2015-11-19 Pedro Alves <palves@redhat.com>
8105
8106 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8107 mode.
8108 * configure: Regenerate.
8109
8110 2015-11-19 Pedro Alves <palves@redhat.com>
8111
8112 * configure: Regenerate.
8113
8114 2015-11-19 Yao Qi <yao.qi@linaro.org>
8115
8116 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8117 type to uint32_t.
8118
8119 2015-11-19 Yao Qi <yao.qi@linaro.org>
8120
8121 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8122 (struct aarch64_operand): Move enum out.
8123
8124 2015-11-19 Yao Qi <yao.qi@linaro.org>
8125
8126 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8127 struct user_fpsimd_state *.
8128 (aarch64_store_fpregset): Likewise.
8129
8130 2015-11-19 Yao Qi <yao.qi@linaro.org>
8131
8132 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8133 struct user_pt_regs *.
8134 (aarch64_store_gregset): Likewise.
8135
8136 2015-11-18 Pedro Alves <palves@redhat.com>
8137
8138 * Makefile.in (all_object_files): Add $IPA_OBJS.
8139
8140 2015-11-17 Pedro Alves <palves@redhat.com>
8141
8142 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8143 GDB_SIGNAL_0 and gdb_signal_to_string.
8144
8145 2015-11-17 Pedro Alves <palves@redhat.com>
8146
8147 * win32-low.c (handle_output_debug_string): Remove parameter.
8148 (win32_kill): Remove our_status local and adjust call to
8149 handle_output_debug_string.
8150 (get_child_debug_event): Adjust call to
8151 handle_output_debug_string.
8152
8153 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8154
8155 * linux-mips-low.c (mips_fill_gregset): Add cast.
8156 (mips_store_gregset): Likewise.
8157 (mips_fill_fpregset): Likewise.
8158 (mips_store_fpregset): Likewise.
8159
8160 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8161
8162 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8163 priv.
8164
8165 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8166
8167 * linux-mips-low.c (mips_linux_new_thread): Change type of
8168 watch_type to enum target_hw_bp_type.
8169
8170 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8171
8172 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8173 Change return type to arm_hwbp_type.
8174
8175 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8176
8177 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8178 (arm_store_gregset): Likewise.
8179 * linux-arm-low.c (arm_get_hwcap): Likewise.
8180 (arm_read_description): Likewise.
8181
8182 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8183
8184 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8185
8186 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8187
8188 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8189 (ppc_fill_vsxregset): Likewise.
8190 (ppc_store_vsxregset): Likewise.
8191 (ppc_fill_vrregset): Likewise.
8192 (ppc_store_vrregset): Likewise.
8193 (ppc_fill_evrregset): Likewise.
8194 (ppc_store_evrregset): Likewise.
8195
8196 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8197
8198 * linux-ppc-low.c (ppc_usrregs_info): Remove
8199 forward-declaration.
8200 (ppc_arch_setup): Move lower in file.
8201
8202 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8203
8204 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8205 (ps_pdwrite): Likewise.
8206
8207 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8208
8209 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8210 to after assert checks.
8211
8212 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8213
8214 * proc-service.c (ps_pdread): Add/adjust casts.
8215 (ps_pdwrite): Add/adjust casts.
8216
8217 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8218
8219 * server.c (handle_search_memory_1): Cast return value of
8220 memmem.
8221
8222 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8223
8224 * server.c (write_qxfer_response): Change type of data to
8225 gdb_byte *.
8226
8227 2015-10-29 Pedro Alves <palves@redhat.com>
8228
8229 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8230
8231 2015-10-29 Pedro Alves <palves@redhat.com>
8232
8233 * tracepoint.c (clear_installed_tracepoints): Add casts.
8234
8235 2015-10-29 Pedro Alves <palves@redhat.com>
8236
8237 * server.c (handle_v_cont, process_serial_event): Add enum
8238 gdb_signal casts to signal parsing code.
8239
8240 2015-10-29 Pedro Alves <palves@redhat.com>
8241
8242 * linux-low.h (NULL_REGSET): Define.
8243 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8244 * linux-arm-low.c (arm_regsets): Likewise.
8245 * linux-crisv32-low.c (cris_regsets): Likewise.
8246 * linux-m68k-low.c (m68k_regsets): Likewise.
8247 * linux-mips-low.c (mips_regsets): Likewise.
8248 * linux-nios2-low.c (nios2_regsets): Likewise.
8249 * linux-ppc-low.c (ppc_regsets): Likewise.
8250 * linux-s390-low.c (s390_regsets): Likewise.
8251 * linux-sh-low.c (sh_regsets): Likewise.
8252 * linux-sparc-low.c (sparc_regsets): Likewise.
8253 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8254 * linux-tile-low.c (tile_regsets): Likewise.
8255 * linux-x86-low.c (x86_regsets): Likewise.
8256 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8257
8258 2015-10-29 Pedro Alves <palves@redhat.com>
8259
8260 * linux-low.h (NULL_REGSET): Define.
8261 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8262 * linux-arm-low.c (arm_regsets): Likewise.
8263 * linux-crisv32-low.c (cris_regsets): Likewise.
8264 * linux-m68k-low.c (m68k_regsets): Likewise.
8265 * linux-mips-low.c (mips_regsets): Likewise.
8266 * linux-nios2-low.c (nios2_regsets): Likewise.
8267 * linux-ppc-low.c (ppc_regsets): Likewise.
8268 * linux-s390-low.c (s390_regsets): Likewise.
8269 * linux-sh-low.c (sh_regsets): Likewise.
8270 * linux-sparc-low.c (sparc_regsets): Likewise.
8271 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8272 * linux-tile-low.c (tile_regsets): Likewise.
8273 * linux-x86-low.c (x86_regsets): Likewise.
8274 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8275
8276 2015-10-26 Doug Evans <dje@google.com>
8277
8278 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8279
8280 2015-10-26 Doug Evans <dje@google.com>
8281
8282 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8283
8284 2015-10-26 Doug Evans <dje@google.com>
8285
8286 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8287 for debug_printf.
8288 (attach_thread, find_new_threads_callback): Ditto.
8289
8290 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8291
8292 * mem-break.h (set_breakpoint_data): Remove.
8293
8294 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8295
8296 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8297 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8298 (initialize_low): Remove set_breakpoint_data call.
8299 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8300 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8301 (initialize_low): Remove set_breakpoint_data call.
8302 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8303 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8304 (initialize_low): Remove set_breakpoint_data call.
8305
8306 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8307
8308 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8309 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8310 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8311 * target.h (target_breakpoint_kind_from_pc): New macro.
8312
8313 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8314
8315 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8316 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8317 the default breakpoint kind.
8318
8319 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8320
8321 * linux-arm-low.c (arm_supports_z_point_type): Add software
8322 breakpoint support.
8323
8324 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8325
8326 * linux-arm-low.c: Refactor breakpoint definitions.
8327 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8328 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8329
8330 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8331
8332 * Makefile.in: Add arm.c/o.
8333 * configure.srv: Likewise.
8334 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8335 (arm_breakpoint_kind_from_pc): New function.
8336 (arm_sw_breakpoint_from_kind): Return proper kind.
8337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8338
8339 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8340
8341 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8342 removal.
8343 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8344 (struct raw_breakpoint) <size>: Remove.
8345 (struct raw_breakpoint) <kind>: Add.
8346 (bp_size): New function.
8347 (bp_opcode): Likewise.
8348 (find_raw_breakpoint_at): Adjust for kind.
8349 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8350 (remove_memory_breakpoint): Adjust for kind call bp_size.
8351 (set_raw_breakpoint_at): Adjust for kind.
8352 (set_breakpoint): Likewise.
8353 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8354 (delete_raw_breakpoint): Adjust for kind.
8355 (delete_breakpoint): Likewise.
8356 (find_gdb_breakpoint): Likewise.
8357 (set_gdb_breakpoint_1): Likewise.
8358 (set_gdb_breakpoint): Likewise.
8359 (delete_gdb_breakpoint_1): Likewise.
8360 (delete_gdb_breakpoint): Likewise.
8361 (uninsert_raw_breakpoint): Likewise.
8362 (reinsert_raw_breakpoint): Likewise.
8363 (set_breakpoint_data): Remove.
8364 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8365 (check_mem_read): Adjust for kind call bp_size.
8366 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8367 (clone_one_breakpoint): Adjust for kind.
8368 * mem-break.h (set_gdb_breakpoint): Likewise.
8369 (delete_gdb_breakpoint): Likewise.
8370 * server.c (process_serial_event): Likewise.
8371
8372 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8373
8374 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8375 (struct linux_target_ops) <breakpoint>: Remove.
8376 (struct linux_target_ops) <breakpoint_len>: Remove.
8377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8379 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8380 (arm_sw_breakpoint_from_kind): New function.
8381 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8382 (struct linux_target_ops) <breakpoint>: Remove.
8383 (struct linux_target_ops) <breakpoint_len>: Remove.
8384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8386 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8387 (struct linux_target_ops) <breakpoint>: Remove.
8388 (struct linux_target_ops) <breakpoint_len>: Remove.
8389 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8390 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8391 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8392 (struct linux_target_ops) <breakpoint>: Remove.
8393 (struct linux_target_ops) <breakpoint_len>: Remove.
8394 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8395 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8396 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8397 and sw_breakpoint_from_kind to increment the pc.
8398 (linux_breakpoint_kind_from_pc): New function.
8399 (linux_sw_breakpoint_from_kind): New function.
8400 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8401 (initialize_low): Call breakpoint_kind_from_pc and
8402 sw_breakpoint_from_kind to replace breakpoint_data/len.
8403 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8404 New field.
8405 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8406 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8407 (struct linux_target_ops) <breakpoint>: Remove.
8408 (struct linux_target_ops) <breakpoint_len>: Remove.
8409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8411 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8412 (struct linux_target_ops) <breakpoint>: Remove.
8413 (struct linux_target_ops) <breakpoint_len>: Remove.
8414 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8415 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8416 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8417 (struct linux_target_ops) <breakpoint>: Remove.
8418 (struct linux_target_ops) <breakpoint_len>: Remove.
8419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8421 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8422 (struct linux_target_ops) <breakpoint>: Remove.
8423 (struct linux_target_ops) <breakpoint_len>: Remove.
8424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8426 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8427 (struct linux_target_ops) <breakpoint>: Remove.
8428 (struct linux_target_ops) <breakpoint_len>: Remove.
8429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8431 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8432 (struct linux_target_ops) <breakpoint>: Remove.
8433 (struct linux_target_ops) <breakpoint_len>: Remove.
8434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8436 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8437 (struct linux_target_ops) <breakpoint>: Remove.
8438 (struct linux_target_ops) <breakpoint_len>: Remove.
8439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8441 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8442 (struct linux_target_ops) <breakpoint>: Remove.
8443 (struct linux_target_ops) <breakpoint_len>: Remove.
8444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8446 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8447 (struct linux_target_ops) <breakpoint>: Remove.
8448 (struct linux_target_ops) <breakpoint_len>: Remove.
8449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8451 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8452 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8453 (struct linux_target_ops) <breakpoint>: Remove.
8454 (struct linux_target_ops) <breakpoint_len>: Remove.
8455 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8456 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8457 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8458 (struct linux_target_ops) <breakpoint>: Remove.
8459 (struct linux_target_ops) <breakpoint_len>: Remove.
8460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8462
8463 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8464
8465 * linux-cris-low.c (cris_get_pc): Remove void arg.
8466
8467 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8468
8469 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8470 variable name.
8471
8472 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8473
8474 * inferiors.c (thread_pid_matches_callback): New function.
8475 (find_thread_process): New function.
8476 (remove_thread): Reset current_thread.
8477 (remove_process): Assert threads have been removed first.
8478
8479 2015-10-15 Yao Qi <yao.qi@linaro.org>
8480
8481 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8482 if it is 3.
8483 (aarch64_remove_point): Likewise.
8484 * regcache.c (regcache_register_size): New function.
8485
8486 2015-10-12 Yao Qi <yao.qi@linaro.org>
8487
8488 * linux-aarch64-low.c: Update all callers as emit_load_store
8489 is renamed to aarch64_emit_load_store.
8490
8491 2015-10-12 Yao Qi <yao.qi@linaro.org>
8492
8493 * linux-aarch64-low.c: Update all callers of function renaming
8494 from emit_insn to aarch64_emit_insn.
8495
8496 2015-10-12 Yao Qi <yao.qi@linaro.org>
8497
8498 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8499 arch/aarch64-insn.h.
8500 (struct aarch64_memory_operand): Likewise.
8501 (ENCODE): Likewise.
8502 (emit_insn): Move to arch/aarch64-insn.c.
8503 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8504 (emit_load_store): Move to arch/aarch64-insn.c.
8505 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8506 (can_encode_int32): Remove.
8507
8508 2015-10-12 Yao Qi <yao.qi@linaro.org>
8509
8510 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8511 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8512 (aarch64_relocate_instruction): Likewise.
8513 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8514 (struct aarch64_insn_visitor): Likewise.
8515
8516 2015-10-12 Yao Qi <yao.qi@linaro.org>
8517
8518 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8519 (struct aarch64_insn_visitor): New.
8520 (struct aarch64_insn_relocation_data): New.
8521 (aarch64_ftrace_insn_reloc_b): New function.
8522 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8523 (aarch64_ftrace_insn_reloc_cb): Likewise.
8524 (aarch64_ftrace_insn_reloc_tb): Likewise.
8525 (aarch64_ftrace_insn_reloc_adr): Likewise.
8526 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8527 (aarch64_ftrace_insn_reloc_others): Likewise.
8528 (visitor): New.
8529 (aarch64_relocate_instruction): Use visitor.
8530
8531 2015-10-12 Yao Qi <yao.qi@linaro.org>
8532
8533 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8534 int. Add argument buf.
8535 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8536 aarch64_relocate_instruction.
8537
8538 2015-10-12 Yao Qi <yao.qi@linaro.org>
8539
8540 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8541 argument insn. Remove local variable insn. Don't call
8542 target_read_uint32.
8543 (aarch64_install_fast_tracepoint_jump_pad): Call
8544 target_read_uint32.
8545
8546 2015-09-30 Yao Qi <yao.qi@linaro.org>
8547
8548 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8549 (emit_load_store_pair): Likewise.
8550
8551 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8552
8553 * dll.c (match_dll): Add cast(s).
8554 (unloaded_dll): Likewise.
8555 * linux-low.c (second_thread_of_pid_p): Likewise.
8556 (delete_lwp_callback): Likewise.
8557 (count_events_callback): Likewise.
8558 (select_event_lwp_callback): Likewise.
8559 (linux_set_resume_request): Likewise.
8560 * server.c (accumulate_file_name_length): Likewise.
8561 (emit_dll_description): Likewise.
8562 (handle_qxfer_threads_worker): Likewise.
8563 (visit_actioned_threads): Likewise.
8564 * thread-db.c (any_thread_of): Likewise.
8565 * tracepoint.c (same_process_p): Likewise.
8566 (match_blocktype): Likewise.
8567 (build_traceframe_info_xml): Likewise.
8568
8569 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8570
8571 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
8572 assignment.
8573 (gdb_unparse_agent_expr): Likewise.
8574 * hostio.c (require_data): Likewise.
8575 (handle_pread): Likewise.
8576 * linux-low.c (disable_regset): Likewise.
8577 (fetch_register): Likewise.
8578 (store_register): Likewise.
8579 (get_dynamic): Likewise.
8580 (linux_qxfer_libraries_svr4): Likewise.
8581 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
8582 (set_fast_tracepoint_jump): Likewise.
8583 (uninsert_fast_tracepoint_jumps_at): Likewise.
8584 (reinsert_fast_tracepoint_jumps_at): Likewise.
8585 (validate_inserted_breakpoint): Likewise.
8586 (clone_agent_expr): Likewise.
8587 * regcache.c (init_register_cache): Likewise.
8588 * remote-utils.c (putpkt_binary_1): Likewise.
8589 (decode_M_packet): Likewise.
8590 (decode_X_packet): Likewise.
8591 (look_up_one_symbol): Likewise.
8592 (relocate_instruction): Likewise.
8593 (monitor_output): Likewise.
8594 * server.c (handle_search_memory): Likewise.
8595 (handle_qxfer_exec_file): Likewise.
8596 (handle_qxfer_libraries): Likewise.
8597 (handle_qxfer): Likewise.
8598 (handle_query): Likewise.
8599 (handle_v_cont): Likewise.
8600 (handle_v_run): Likewise.
8601 (captured_main): Likewise.
8602 * target.c (write_inferior_memory): Likewise.
8603 * thread-db.c (try_thread_db_load_from_dir): Likewise.
8604 * tracepoint.c (init_trace_buffer): Likewise.
8605 (add_tracepoint_action): Likewise.
8606 (add_traceframe): Likewise.
8607 (add_traceframe_block): Likewise.
8608 (cmd_qtdpsrc): Likewise.
8609 (cmd_qtdv): Likewise.
8610 (cmd_qtstatus): Likewise.
8611 (response_source): Likewise.
8612 (response_tsv): Likewise.
8613 (cmd_qtnotes): Likewise.
8614 (gdb_collect): Likewise.
8615 (initialize_tracepoint): Likewise.
8616
8617 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8618
8619 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
8620 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
8621 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
8622 <NOP>: New.
8623 (enum aarch64_condition_codes): New enum.
8624 (w0): New static global.
8625 (fp): Likewise.
8626 (lr): Likewise.
8627 (struct aarch64_memory_operand) <type>: New
8628 MEMORY_OPERAND_POSTINDEX type.
8629 (postindex_memory_operand): New helper function.
8630 (emit_ret): New function.
8631 (emit_load_store_pair): New function, factored out of emit_stp
8632 with support for MEMORY_OPERAND_POSTINDEX.
8633 (emit_stp): Rewrite using emit_load_store_pair.
8634 (emit_ldp): New function.
8635 (emit_load_store): Likewise.
8636 (emit_ldr): Mention post-index instruction in comment.
8637 (emit_ldrh): New function.
8638 (emit_ldrb): New function.
8639 (emit_ldrsw): Mention post-index instruction in comment.
8640 (emit_str): Likewise.
8641 (emit_subs): New function.
8642 (emit_cmp): Likewise.
8643 (emit_and): Likewise.
8644 (emit_orr): Likewise.
8645 (emit_orn): Likewise.
8646 (emit_eor): Likewise.
8647 (emit_mvn): Likewise.
8648 (emit_lslv): Likewise.
8649 (emit_lsrv): Likewise.
8650 (emit_asrv): Likewise.
8651 (emit_mul): Likewise.
8652 (emit_sbfm): Likewise.
8653 (emit_sbfx): Likewise.
8654 (emit_ubfm): Likewise.
8655 (emit_ubfx): Likewise.
8656 (emit_csinc): Likewise.
8657 (emit_cset): Likewise.
8658 (emit_nop): Likewise.
8659 (emit_ops_insns): New helper function.
8660 (emit_pop): Likewise.
8661 (emit_push): Likewise.
8662 (aarch64_emit_prologue): New function.
8663 (aarch64_emit_epilogue): Likewise.
8664 (aarch64_emit_add): Likewise.
8665 (aarch64_emit_sub): Likewise.
8666 (aarch64_emit_mul): Likewise.
8667 (aarch64_emit_lsh): Likewise.
8668 (aarch64_emit_rsh_signed): Likewise.
8669 (aarch64_emit_rsh_unsigned): Likewise.
8670 (aarch64_emit_ext): Likewise.
8671 (aarch64_emit_log_not): Likewise.
8672 (aarch64_emit_bit_and): Likewise.
8673 (aarch64_emit_bit_or): Likewise.
8674 (aarch64_emit_bit_xor): Likewise.
8675 (aarch64_emit_bit_not): Likewise.
8676 (aarch64_emit_equal): Likewise.
8677 (aarch64_emit_less_signed): Likewise.
8678 (aarch64_emit_less_unsigned): Likewise.
8679 (aarch64_emit_ref): Likewise.
8680 (aarch64_emit_if_goto): Likewise.
8681 (aarch64_emit_goto): Likewise.
8682 (aarch64_write_goto_address): Likewise.
8683 (aarch64_emit_const): Likewise.
8684 (aarch64_emit_call): Likewise.
8685 (aarch64_emit_reg): Likewise.
8686 (aarch64_emit_pop): Likewise.
8687 (aarch64_emit_stack_flush): Likewise.
8688 (aarch64_emit_zero_ext): Likewise.
8689 (aarch64_emit_swap): Likewise.
8690 (aarch64_emit_stack_adjust): Likewise.
8691 (aarch64_emit_int_call_1): Likewise.
8692 (aarch64_emit_void_call_2): Likewise.
8693 (aarch64_emit_eq_goto): Likewise.
8694 (aarch64_emit_ne_goto): Likewise.
8695 (aarch64_emit_lt_goto): Likewise.
8696 (aarch64_emit_le_goto): Likewise.
8697 (aarch64_emit_gt_goto): Likewise.
8698 (aarch64_emit_ge_got): Likewise.
8699 (aarch64_emit_ops_impl): New static global variable.
8700 (aarch64_emit_ops): New target function, return
8701 &aarch64_emit_ops_impl.
8702 (struct linux_target_ops): Install it.
8703
8704 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8705
8706 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
8707 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
8708 aarch64-ipa.o.
8709 * linux-aarch64-ipa.c: New file.
8710 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
8711 and endian.h.
8712 (aarch64_get_thread_area): New target method.
8713 (extract_signed_bitfield): New helper function.
8714 (aarch64_decode_ldr_literal): New function.
8715 (enum aarch64_opcodes): New enum.
8716 (struct aarch64_register): New struct.
8717 (struct aarch64_operand): New struct.
8718 (x0): New static global.
8719 (x1): Likewise.
8720 (x2): Likewise.
8721 (x3): Likewise.
8722 (x4): Likewise.
8723 (w2): Likewise.
8724 (ip0): Likewise.
8725 (sp): Likewise.
8726 (xzr): Likewise.
8727 (aarch64_register): New helper function.
8728 (register_operand): Likewise.
8729 (immediate_operand): Likewise.
8730 (struct aarch64_memory_operand): New struct.
8731 (offset_memory_operand): New helper function.
8732 (preindex_memory_operand): Likewise.
8733 (enum aarch64_system_control_registers): New enum.
8734 (ENCODE): New macro.
8735 (emit_insn): New helper function.
8736 (emit_b): New function.
8737 (emit_bcond): Likewise.
8738 (emit_cb): Likewise.
8739 (emit_tb): Likewise.
8740 (emit_blr): Likewise.
8741 (emit_stp): Likewise.
8742 (emit_ldp_q_offset): Likewise.
8743 (emit_stp_q_offset): Likewise.
8744 (emit_load_store): Likewise.
8745 (emit_ldr): Likewise.
8746 (emit_ldrsw): Likewise.
8747 (emit_str): Likewise.
8748 (emit_ldaxr): Likewise.
8749 (emit_stxr): Likewise.
8750 (emit_stlr): Likewise.
8751 (emit_data_processing_reg): Likewise.
8752 (emit_data_processing): Likewise.
8753 (emit_add): Likewise.
8754 (emit_sub): Likewise.
8755 (emit_mov): Likewise.
8756 (emit_movk): Likewise.
8757 (emit_mov_addr): Likewise.
8758 (emit_mrs): Likewise.
8759 (emit_msr): Likewise.
8760 (emit_sevl): Likewise.
8761 (emit_wfe): Likewise.
8762 (append_insns): Likewise.
8763 (can_encode_int32_in): New helper function.
8764 (aarch64_relocate_instruction): New function.
8765 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
8766 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
8767 (struct linux_target_ops): Install aarch64_get_thread_area,
8768 aarch64_install_fast_tracepoint_jump_pad and
8769 aarch64_get_min_fast_tracepoint_insn_len.
8770
8771 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8772
8773 * Makefile.in (aarch64-insn.o): New rule.
8774 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
8775
8776 2015-09-21 Yao Qi <yao.qi@linaro.org>
8777
8778 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
8779
8780 2015-09-21 Yao Qi <yao.qi@linaro.org>
8781
8782 * tracepoint.c (max_jump_pad_size): Remove.
8783
8784 2015-09-18 Yao Qi <yao.qi@linaro.org>
8785
8786 * linux-aarch64-low.c: Don't include sys/uio.h.
8787 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
8788
8789 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
8790
8791 * tracepoint.c (eval_result_type): Change prototype.
8792 (condition_true_at_tracepoint): Fix argument to compiled_cond.
8793
8794 2015-09-15 Pedro Alves <palves@redhat.com>
8795
8796 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
8797 Check whether to report exec events instead of checking whether
8798 multiprocess is enabled.
8799
8800 2015-09-15 Pedro Alves <palves@redhat.com>
8801
8802 PR remote/18965
8803 * remote-utils.c (prepare_resume_reply): Merge
8804 TARGET_WAITKIND_VFORK_DONE switch case with the
8805 TARGET_WAITKIND_FORKED case.
8806
8807 2015-09-15 Yao Qi <yao.qi@linaro.org>
8808
8809 * server.c (handle_query): Check string comparison using
8810 "else if" instead of "if".
8811
8812 2015-09-15 Yao Qi <yao.qi@linaro.org>
8813
8814 * server.c (vCont_supported): New global variable.
8815 (handle_query): Set vCont_supported to 1 if "vContSupported+"
8816 matches. Append ";vContSupported+" to own_buf.
8817 (handle_v_requests): Append ";s;S" to own_buf if target supports
8818 hardware single step or vCont_supported is false.
8819 (capture_main): Set vCont_supported to zero.
8820
8821 2015-09-15 Yao Qi <yao.qi@linaro.org>
8822
8823 * linux-low.c (linux_supports_conditional_breakpoints): Rename
8824 it to ...
8825 (linux_supports_hardware_single_step): ... New function.
8826 (linux_target_ops): Update.
8827 * lynx-low.c (lynx_target_ops): Set field
8828 supports_hardware_single_step to target_can_do_hardware_single_step.
8829 * nto-low.c (nto_target_ops): Likewise.
8830 * spu-low.c (spu_target_ops): Likewise.
8831 * win32-low.c (win32_target_ops): Likewise.
8832 * target.c (target_can_do_hardware_single_step): New function.
8833 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8834 Remove. <supports_hardware_single_step>: New field.
8835 (target_supports_conditional_breakpoints): Remove.
8836 (target_supports_hardware_single_step): New macro.
8837 (target_can_do_hardware_single_step): Declare.
8838 * server.c (handle_query): Use target_supports_hardware_single_step
8839 instead of target_supports_conditional_breakpoints.
8840
8841 2015-09-15 Yao Qi <yao.qi@linaro.org>
8842
8843 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
8844 function.
8845 (struct linux_target_ops the_low_target): Install
8846 aarch64_linux_siginfo_fixup.
8847
8848 2015-09-11 Don Breazeal <donb@codesourcery.com>
8849 Luis Machado <lgustavo@codesourcery.com>
8850
8851 * linux-low.c (linux_mourn): Static declaration.
8852 (linux_arch_setup): Move in front of
8853 handle_extended_wait.
8854 (linux_arch_setup_thread): New function.
8855 (handle_extended_wait): Handle exec events. Call
8856 linux_arch_setup_thread. Make event_lwp argument a
8857 pointer-to-a-pointer.
8858 (check_zombie_leaders): Do not check stopped threads.
8859 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
8860 (linux_low_filter_event): Add lwp and thread for exec'ing
8861 non-leader thread if leader thread has been deleted.
8862 Refactor code into linux_arch_setup_thread and call it.
8863 Pass child lwp pointer by reference to handle_extended_wait.
8864 (linux_wait_for_event_filtered): Update comment.
8865 (linux_wait_1): Prevent clobbering exec event status.
8866 (linux_supports_exec_events): New function.
8867 (linux_target_ops) <supports_exec_events>: Initialize new member.
8868 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
8869 new member.
8870 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
8871 * server.c (report_exec_events): New global variable.
8872 (handle_query): Handle qSupported query for exec-events feature.
8873 (captured_main): Initialize report_exec_events.
8874 * server.h (report_exec_events): Declare new global variable.
8875 * target.h (struct target_ops) <supports_exec_events>: New
8876 member.
8877 (target_supports_exec_events): New macro.
8878 * win32-low.c (win32_target_ops) <supports_exec_events>:
8879 Initialize new member.
8880
8881 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
8882
8883 * linux-low.c (linux_low_enable_btrace): Remove.
8884 (linux_target_ops): Replace linux_low_enable_btrace with
8885 linux_enable_btrace.
8886
8887 2015-09-03 Yao Qi <yao.qi@linaro.org>
8888
8889 * linux-aarch64-low.c (aarch64_insert_point): Call
8890 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
8891 returns true.
8892
8893 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8894
8895 * linux-low.c (check_stopped_by_breakpoint): Use
8896 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
8897
8898 2015-08-27 Pedro Alves <palves@redhat.com>
8899
8900 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
8901
8902 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
8903
8904 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
8905 the XNEW-family equivalent.
8906 (compile_bytecodes): Likewise.
8907 * dll.c (loaded_dll): Likewise.
8908 * event-loop.c (append_callback_event): Likewise.
8909 (create_file_handler): Likewise.
8910 (create_file_event): Likewise.
8911 * hostio.c (handle_open): Likewise.
8912 * inferiors.c (add_thread): Likewise.
8913 (add_process): Likewise.
8914 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
8915 * linux-arm-low.c (arm_new_process): Likewise.
8916 (arm_new_thread): Likewise.
8917 * linux-low.c (add_to_pid_list): Likewise.
8918 (linux_add_process): Likewise.
8919 (handle_extended_wait): Likewise.
8920 (add_lwp): Likewise.
8921 (enqueue_one_deferred_signal): Likewise.
8922 (enqueue_pending_signal): Likewise.
8923 (linux_resume_one_lwp_throw): Likewise.
8924 (linux_resume_one_thread): Likewise.
8925 (linux_read_memory): Likewise.
8926 (linux_write_memory): Likewise.
8927 * linux-mips-low.c (mips_linux_new_process): Likewise.
8928 (mips_linux_new_thread): Likewise.
8929 (mips_add_watchpoint): Likewise.
8930 * linux-x86-low.c (initialize_low_arch): Likewise.
8931 * lynx-low.c (lynx_add_process): Likewise.
8932 * mem-break.c (set_raw_breakpoint_at): Likewise.
8933 (set_breakpoint): Likewise.
8934 (add_condition_to_breakpoint): Likewise.
8935 (add_commands_to_breakpoint): Likewise.
8936 (clone_agent_expr): Likewise.
8937 (clone_one_breakpoint): Likewise.
8938 * regcache.c (new_register_cache): Likewise.
8939 * remote-utils.c (look_up_one_symbol): Likewise.
8940 * server.c (queue_stop_reply): Likewise.
8941 (start_inferior): Likewise.
8942 (queue_stop_reply_callback): Likewise.
8943 (handle_target_event): Likewise.
8944 * spu-low.c (fetch_ppc_memory): Likewise.
8945 (store_ppc_memory): Likewise.
8946 * target.c (set_target_ops): Likewise.
8947 * thread-db.c (thread_db_load_search): Likewise.
8948 (try_thread_db_load_1): Likewise.
8949 * tracepoint.c (add_tracepoint): Likewise.
8950 (add_tracepoint_action): Likewise.
8951 (create_trace_state_variable): Likewise.
8952 (cmd_qtdpsrc): Likewise.
8953 (cmd_qtro): Likewise.
8954 (add_while_stepping_state): Likewise.
8955 * win32-low.c (child_add_thread): Likewise.
8956 (get_image_name): Likewise.
8957
8958 2015-08-25 Yao Qi <yao.qi@linaro.org>
8959
8960 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
8961
8962 2015-08-25 Yao Qi <yao.qi@linaro.org>
8963
8964 * Makefile.in (aarch64-linux.o): New rule.
8965 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
8966 srv_tgtobj.
8967 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
8968 (aarch64_init_debug_reg_state): Make it extern.
8969 (aarch64_linux_prepare_to_resume): Remove.
8970
8971 2015-08-25 Yao Qi <yao.qi@linaro.org>
8972
8973 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
8974 lwp_arch_private_info and ptid_of_lwp.
8975
8976 2015-08-25 Yao Qi <yao.qi@linaro.org>
8977
8978 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
8979 Find proc_info by find_process_pid. All callers updated.
8980
8981 2015-08-25 Yao Qi <yao.qi@linaro.org>
8982
8983 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
8984 Remove.
8985 (debug_reg_change_callback): Remove.
8986 (aarch64_notify_debug_reg_change): Remove.
8987
8988 2015-08-25 Yao Qi <yao.qi@linaro.org>
8989
8990 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
8991 Call current_lwp_ptid.
8992
8993 2015-08-25 Yao Qi <yao.qi@linaro.org>
8994
8995 * linux-aarch64-low.c (debug_reg_change_callback): Use
8996 debug_printf.
8997
8998 2015-08-25 Yao Qi <yao.qi@linaro.org>
8999
9000 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
9001
9002 2015-08-25 Yao Qi <yao.qi@linaro.org>
9003
9004 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
9005
9006 2015-08-25 Yao Qi <yao.qi@linaro.org>
9007
9008 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
9009 the code.
9010
9011 2015-08-25 Yao Qi <yao.qi@linaro.org>
9012
9013 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
9014 Remove.
9015 (debug_reg_change_callback): Remove argument entry and add argument
9016 lwp. Remove local variable thread. Don't print thread id in the
9017 debugging output. Don't check whether pid of thread equals to pid.
9018 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
9019 iterate_over_lwps instead find_inferior.
9020
9021 2015-08-24 Pedro Alves <palves@redhat.com>
9022
9023 * inferiors.c (get_first_process): New function.
9024 * inferiors.h (get_first_process): New declaration.
9025 * remote-utils.c (read_ptid): Default to the first process in the
9026 list, instead of to the current thread's process.
9027
9028 2015-08-24 Pedro Alves <palves@redhat.com>
9029
9030 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
9031 * event-loop.c: Likewise.
9032 * remote-utils.c: Likewise.
9033 * tracepoint.c: Likewise.
9034
9035 2015-08-24 Pedro Alves <palves@redhat.com>
9036
9037 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
9038 ptid_get_lwp.
9039
9040 2015-08-21 Pedro Alves <palves@redhat.com>
9041
9042 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9043 instead of literal 1.
9044
9045 2015-08-21 Pedro Alves <palves@redhat.com>
9046
9047 * tdesc.c (default_description): Explicitly zero-initialize.
9048
9049 2015-08-21 Pedro Alves <palves@redhat.com>
9050
9051 PR gdb/18749
9052 * inferiors.c (remove_thread): Discard any pending stop reply for
9053 this thread.
9054 * server.c (remove_all_on_match_pid): Rename to ...
9055 (remove_all_on_match_ptid): ... this. Work with a filter ptid
9056 instead of a pid.
9057 (discard_queued_stop_replies): Change parameter to a ptid. Now
9058 extern.
9059 (handle_v_kill, kill_inferior_callback, captured_main)
9060 (process_serial_event): Adjust.
9061 * server.h (discard_queued_stop_replies): Declare.
9062
9063 2015-08-21 Pedro Alves <palves@redhat.com>
9064
9065 * linux-low.c (wait_for_sigstop): Always switch to no thread
9066 selected if the previously current thread dies.
9067 * lynx-low.c (lynx_request_interrupt): Use the first thread's
9068 process instead of the current thread's.
9069 * remote-utils.c (input_interrupt): Don't check if there's no
9070 current thread.
9071 * server.c (gdb_read_memory, gdb_write_memory): If setting the
9072 current thread to the general thread fails, error out.
9073 (handle_qxfer_auxv, handle_qxfer_libraries)
9074 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
9075 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
9076 (handle_query): Check if there's a thread selected instead of
9077 checking whether there's any thread in the thread list.
9078 (handle_qxfer_threads, handle_qxfer_btrace)
9079 (handle_qxfer_btrace_conf): Don't error out early if there's no
9080 thread in the thread list.
9081 (handle_v_cont, myresume): Don't set the current thread to the
9082 continue thread.
9083 (process_serial_event) <Hg handling>: Also set thread_id if the
9084 previous general thread is still alive.
9085 (process_serial_event) <g/G handling>: If setting the current
9086 thread to the general thread fails, error out.
9087 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
9088 thread's lwp instead of the current thread's.
9089 * target.c (set_desired_thread): If the desired thread was not
9090 found, leave the current thread pointing to NULL. Return an int
9091 (boolean) indicating success.
9092 * target.h (set_desired_thread): Change return type to int.
9093
9094 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
9095
9096 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
9097 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
9098 #includes.
9099 (ps_get_thread_area): New function.
9100
9101 2015-08-19 Gary Benson <gbenson@redhat.com>
9102
9103 * hostio.c (handle_pread): Do not attempt to read more data
9104 than hostio_reply_with_data can fit in a packet.
9105
9106 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9107
9108 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9109
9110 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9111
9112 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9113
9114 2015-08-06 Pedro Alves <palves@redhat.com>
9115
9116 * tracepoint.c (expr_eval_result): Now an int.
9117
9118 2015-08-06 Pedro Alves <palves@redhat.com>
9119
9120 * gdbthread.h (struct regcache): Forward declare.
9121 (struct thread_info) <regcache_data>: Now a struct regcache
9122 pointer.
9123 * inferiors.c (inferior_regcache_data)
9124 (set_inferior_regcache_data): Now work with struct regcache
9125 pointers.
9126 * inferiors.h (struct regcache): Forward declare.
9127 (inferior_regcache_data, set_inferior_regcache_data): Now work
9128 with struct regcache pointers.
9129 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9130 (free_register_cache_thread): Remove struct regcache pointer
9131 casts.
9132
9133 2015-08-06 Pedro Alves <palves@redhat.com>
9134
9135 * server.c (captured_main): On error, print the exception message
9136 to stderr, and if run_once is set, throw a quit.
9137
9138 2015-08-06 Pedro Alves <palves@redhat.com>
9139
9140 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9141 the current thread.
9142
9143 2015-08-06 Pedro Alves <palves@redhat.com>
9144
9145 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9146 reading beyond the passed in buffer length.
9147
9148 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9149
9150 * tracepoint.c (symbol_list) <required>: Remove.
9151
9152 2015-08-06 Pedro Alves <palves@redhat.com>
9153
9154 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9155 count if stopping and suspending threads.
9156 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9157 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9158 (linux_detach): Complete an ongoing step-over.
9159 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9160 throughout.
9161 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9162 (linux_wait_1): If passing a signal to the inferior after
9163 finishing a step-over, unsuspend and re-resume all lwps. If we
9164 see a single-step event but the thread should be continuing, don't
9165 pass the trap to gdb.
9166 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9167 internal_error instead of gdb_assert.
9168 (enqueue_pending_signal): New function.
9169 (check_ptrace_stopped_lwp_gone): Add debug output.
9170 (start_step_over): Use internal_error instead of gdb_assert.
9171 (complete_ongoing_step_over): New function.
9172 (linux_resume_one_thread): Don't resume a suspended thread.
9173 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9174 it stepping.
9175
9176 2015-08-06 Pedro Alves <palves@redhat.com>
9177
9178 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9179 (linux_thread_alive): Use lwp_is_marked_dead.
9180 (extended_event_reported): Delete.
9181 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9182 instead of extended_event_reported.
9183 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9184 as well.
9185 (lwp_is_marked_dead): New function.
9186 (lwp_running): Use lwp_is_marked_dead.
9187 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9188 comment.
9189
9190 2015-08-06 Pedro Alves <palves@redhat.com>
9191
9192 * linux-low.c (linux_wait_1): Move fork event output out of the
9193 !report_to_gdb check. Pass event_child->waitstatus to
9194 target_waitstatus_to_string instead of ourstatus.
9195
9196 2015-08-04 Yao Qi <yao.qi@linaro.org>
9197
9198 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9199 if current_thread is 32 bit.
9200
9201 2015-08-04 Yao Qi <yao.qi@linaro.org>
9202
9203 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9204 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9205 * server.c (extended_protocol): Remove "static".
9206 * server.h (extended_protocol): Declare it.
9207
9208 2015-08-04 Yao Qi <yao.qi@linaro.org>
9209
9210 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9211 both aarch64 and aarch32.
9212 (aarch64_set_pc): Likewise.
9213
9214 2015-08-04 Yao Qi <yao.qi@linaro.org>
9215
9216 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9217 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9218 arm-with-neon.xml to srv_xmlfiles.
9219 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9220 (is_64bit_tdesc): New function.
9221 (aarch64_linux_read_description): New function.
9222 (aarch64_arch_setup): Call aarch64_linux_read_description.
9223 (regs_info): Rename to regs_info_aarch64.
9224 (aarch64_regs_info): Return right regs_info.
9225 (initialize_low_arch): Call initialize_low_arch_aarch32.
9226
9227 2015-08-04 Yao Qi <yao.qi@linaro.org>
9228
9229 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9230 * linux-aarch32-low.c: New file.
9231 * linux-aarch32-low.h: New file.
9232 * linux-arm-low.c (arm_fill_gregset): Move it to
9233 linux-aarch32-low.c.
9234 (arm_store_gregset): Likewise.
9235 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9236 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9237 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9238 (regs_info): Rename to regs_info_arm.
9239 (arm_regs_info): Return regs_info_aarch32 if
9240 have_ptrace_getregset is 1 and target description is
9241 arm_with_neon or arm_with_vfpv3.
9242 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9243 Call initialize_low_arch_aarch32 instead.
9244
9245 2015-08-04 Yao Qi <yao.qi@linaro.org>
9246
9247 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9248 * linux-low.c: ... here.
9249 * linux-low.h (have_ptrace_getregset): Declare it.
9250
9251 2015-08-04 Pedro Alves <palves@redhat.com>
9252
9253 * thread-db.c (struct thread_db): Use new typedefs.
9254 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9255 CHK calls.
9256 (disable_thread_event_reporting): Cast result of dlsym to
9257 destination function pointer type.
9258 (thread_db_mourn): Use td_ta_delete_ftype.
9259
9260 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9261
9262 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9263 arch variant.
9264 (CDX_BREAKPOINT): Define for R2.
9265 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9266 (the_low_target): Add comments.
9267
9268 2015-07-30 Yao Qi <yao.qi@linaro.org>
9269
9270 * linux-arm-low.c (arm_hwcap): Remove it.
9271 (arm_read_description): New local variable arm_hwcap. Don't
9272 set arm_hwcap to zero.
9273
9274 2015-07-30 Yao Qi <yao.qi@linaro.org>
9275
9276 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9277 Use regcache->tdesc instead.
9278 (arm_store_wmmxregset): Likewise.
9279 (arm_fill_vfpregset): Likewise.
9280 (arm_store_vfpregset): Likewise.
9281
9282 2015-07-30 Yao Qi <yao.qi@linaro.org>
9283
9284 * linux-arm-low.c: Include arch/arm.h.
9285 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9286 (arm_store_gregset): Likewise.
9287
9288 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9289
9290 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9291 ptrace's 4th parameter.
9292
9293 2015-07-27 Yao Qi <yao.qi@linaro.org>
9294
9295 * configure.srv (case aarch64*-*-linux*): Don't set
9296 srv_linux_usrregs.
9297
9298 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9299
9300 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9301 sys/ptrace.h.
9302 * linux-arm-low.c: Likewise.
9303 * linux-cris-low.c: Likewise.
9304 * linux-crisv32-low.c: Likewise.
9305 * linux-low.c: Likewise.
9306 * linux-m68k-low.c: Likewise.
9307 * linux-mips-low.c: Likewise.
9308 * linux-nios2-low.c: Likewise.
9309 * linux-s390-low.c: Likewise.
9310 * linux-sparc-low.c: Likewise.
9311 * linux-tic6x-low.c: Likewise.
9312 * linux-tile-low.c: Likewise.
9313 * linux-x86-low.c: Likewise.
9314
9315 2015-07-24 Pedro Alves <palves@redhat.com>
9316
9317 * config.in: Regenerate.
9318 * configure: Regenerate.
9319
9320 2015-07-24 Pedro Alves <palves@redhat.com>
9321
9322 * acinclude.m4: Include ../ptrace.m4.
9323 * configure.ac: Call GDB_AC_PTRACE.
9324 * config.in, configure: Regenerate.
9325
9326 2015-07-24 Yao Qi <yao.qi@linaro.org>
9327
9328 * linux-low.c (linux_create_inferior): Remove setting to
9329 proc->priv->new_inferior.
9330 (linux_attach): Likewise.
9331 (linux_low_filter_event): Likewise.
9332 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9333
9334 2015-07-24 Yao Qi <yao.qi@linaro.org>
9335
9336 * linux-low.c (linux_arch_setup): New function.
9337 (linux_low_filter_event): If proc->tdesc is NULL and
9338 proc->attached is true, call the_low_target.arch_setup.
9339 Otherwise, keep status pending, and return.
9340 (linux_resume_one_lwp_throw): Don't call get_pc if
9341 thread->while_stepping isn't NULL. Don't call
9342 get_thread_regcache if proc->tdesc is NULL.
9343 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9344 (linux_target_ops): Install arch_setup.
9345 * server.c (start_inferior): Call the_target->arch_setup.
9346 * target.h (struct target_ops) <arch_setup>: New field.
9347 (target_arch_setup): New marco.
9348 * lynx-low.c (lynx_target_ops): Update.
9349 * nto-low.c (nto_target_ops): Update.
9350 * spu-low.c (spu_target_ops): Update.
9351 * win32-low.c (win32_target_ops): Update.
9352
9353 2015-07-24 Yao Qi <yao.qi@linaro.org>
9354
9355 * linux-low.c (linux_add_process): Don't set
9356 proc->priv->new_inferior.
9357 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9358 (linux_attach): Likewise.
9359
9360 2015-07-24 Yao Qi <yao.qi@linaro.org>
9361
9362 * server.c (start_inferior): Code refactor.
9363
9364 2015-07-24 Yao Qi <yao.qi@linaro.org>
9365
9366 * server.c (process_serial_event): Set general_thread.
9367
9368 2015-07-21 Yao Qi <yao.qi@linaro.org>
9369
9370 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9371 aarch64_linux_get_debug_reg_capacity.
9372
9373 2015-07-17 Yao Qi <yao.qi@linaro.org>
9374
9375 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9376 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9377 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9378 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9379 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9380 (AARCH64_HWP_ALIGNMENT): Likewise.
9381 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9382 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9383 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9384 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9385 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9386 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9387 (struct aarch64_debug_reg_state): Likewise.
9388 (struct arch_lwp_info): Likewise.
9389 (aarch64_align_watchpoint): Likewise.
9390 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9391 (aarch64_watchpoint_length): Likewise.
9392 (aarch64_point_encode_ctrl_reg): Likewise
9393 (aarch64_point_is_aligned): Likewise.
9394 (aarch64_align_watchpoint): Likewise.
9395 (aarch64_linux_set_debug_regs):
9396 (aarch64_dr_state_insert_one_point): Likewise.
9397 (aarch64_dr_state_remove_one_point): Likewise.
9398 (aarch64_handle_breakpoint): Likewise.
9399 (aarch64_handle_aligned_watchpoint): Likewise.
9400 (aarch64_handle_unaligned_watchpoint): Likewise.
9401 (aarch64_handle_watchpoint): Likewise.
9402
9403 2015-07-17 Yao Qi <yao.qi@linaro.org>
9404
9405 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9406 and don't aarch64_get_debug_reg_state. All callers update.
9407 (aarch64_handle_aligned_watchpoint): Likewise.
9408 (aarch64_handle_unaligned_watchpoint): Likewise.
9409 (aarch64_handle_watchpoint): Likewise.
9410 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9411 (aarch64_remove_point): Likewise.
9412
9413 2015-07-17 Yao Qi <yao.qi@linaro.org>
9414
9415 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9416 debug_printf.
9417 (aarch64_handle_unaligned_watchpoint): Likewise.
9418
9419 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9420
9421 Revert the previous 3 commits:
9422 Move gdb_regex* to common/
9423 Move linux_find_memory_regions_full & co.
9424 gdbserver build-id attribute generator
9425
9426 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9427 Jan Kratochvil <jan.kratochvil@redhat.com>
9428
9429 gdbserver build-id attribute generator.
9430 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9431 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9432 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9433 (find_phdr): New.
9434 (get_dynamic): Use find_pdhr to traverse program headers.
9435 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9436 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9437 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9438 (get_hex_build_id): New.
9439 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9440 to reply XML document.
9441
9442 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9443 Jan Kratochvil <jan.kratochvil@redhat.com>
9444
9445 * target.c: Include target/target-utils.h and fcntl.h.
9446 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9447 (target_fileio_read_stralloc): New functions.
9448
9449 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9450
9451 * Makefile.in (OBS): Add gdb_regex.o.
9452 (gdb_regex.o): New.
9453 * config.in: Rebuilt.
9454 * configure: Rebuilt.
9455
9456 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9457 Jan Kratochvil <jan.kratochvil@redhat.com>
9458
9459 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9460 * Makefile.in (OBS): Add target-utils.o.
9461 (linux-maps.o, target-utils.o): New.
9462 * configure.srv (srv_linux_obj): Add linux-maps.o.
9463
9464 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9465
9466 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9467 function, return 1.
9468 (the_low_target): Install it.
9469
9470 2015-07-14 Pedro Alves <palves@redhat.com>
9471
9472 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9473 Instead, ignore ECHILD, and throw an error for other errnos.
9474
9475 2015-07-10 Pedro Alves <palves@redhat.com>
9476
9477 * event-loop.c (struct callback_event) <data>: Change type to
9478 gdb_client_data instance instead of gdb_client_data pointer.
9479 (append_callback_event): Adjust.
9480
9481 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9482
9483 * linux-aarch64-low.c: Add comments for each linux_target_ops
9484 method. Remove comments already covered in target_ops and
9485 linux_target_ops definitions.
9486 (the_low_target): Add comments for each unimplemented method.
9487
9488 2015-07-09 Yao Qi <yao.qi@linaro.org>
9489
9490 * linux-aarch64-low.c (aarch64_regmap): Remove.
9491 (aarch64_usrregs_info): Remove.
9492 (regs_info): Set field usrregs to NULL.
9493
9494 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9495
9496 * linux-low.c: Include "rsp-low.h"
9497 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9498 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9499 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9500 (handle_btrace_enable_pt): New.
9501 (handle_btrace_general_set): Support "pt".
9502 (handle_btrace_conf_general_set): Support "pt:size".
9503
9504 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9505
9506 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9507 Z_PACKET_SW_BP.
9508
9509 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9510
9511 * linux-aarch64-low.c: Remove comment about endianness.
9512 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9513 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9514 memcmp.
9515
9516 2015-06-24 Gary Benson <gbenson@redhat.com>
9517
9518 * linux-i386-ipa.c (stdint.h): Do not include.
9519 * lynx-i386-low.c (stdint.h): Likewise.
9520 * lynx-ppc-low.c (stdint.h): Likewise.
9521 * mem-break.c (stdint.h): Likewise.
9522 * thread-db.c (stdint.h): Likewise.
9523 * tracepoint.c (stdint.h): Likewise.
9524 * win32-low.c (stdint.h): Likewise.
9525
9526 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9527
9528 * server.c (write_qxfer_response): Update call to
9529 remote_escape_output.
9530
9531 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9532 Jan Kratochvil <jan.kratochvil@redhat.com>
9533
9534 Merge multiple hex conversions.
9535 * gdbreplay.c (tohex): Rename to 'fromhex'.
9536 (logchar): Use fromhex.
9537
9538 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9539
9540 * server.c (handle_qxfer_libraries): Set `version' attribute for
9541 <library-list>.
9542
9543 2015-06-10 Gary Benson <gbenson@redhat.com>
9544
9545 * target.h (struct target_ops) <multifs_open>: New field.
9546 <multifs_unlink>: Likewise.
9547 <multifs_readlink>: Likewise.
9548 * linux-low.c (nat/linux-namespaces.h): New include.
9549 (linux_target_ops): Initialize the_target->multifs_open,
9550 the_target->multifs_unlink and the_target->multifs_readlink.
9551 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9552 * hostio.c (hostio_fs_pid): New static variable.
9553 (hostio_handle_new_gdb_connection): New function.
9554 (handle_setfs): Likewise.
9555 (handle_open): Use the_target->multifs_open as appropriate.
9556 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9557 (handle_readlink): Use the_target->multifs_readlink as
9558 appropriate.
9559 (handle_vFile): Handle vFile:setfs packets.
9560 * server.c (handle_query): Call hostio_handle_new_gdb_connection
9561 after target_handle_new_gdb_connection.
9562
9563 2015-06-10 Gary Benson <gbenson@redhat.com>
9564
9565 * configure.ac (AC_CHECK_FUNCS): Add setns.
9566 * config.in: Regenerate.
9567 * configure: Likewise.
9568 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
9569 (linux-namespaces.o): New rule.
9570 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9571
9572 2015-06-09 Gary Benson <gbenson@redhat.com>
9573
9574 * hostio.c (handle_open): Process mode argument with
9575 fileio_to_host_mode.
9576
9577 2015-06-01 Yao Qi <yao.qi@linaro.org>
9578
9579 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9580 * linux-x86-low.c: Likewise.
9581
9582 2015-05-28 Don Breazeal <donb@codesourcery.com>
9583
9584 * linux-low.c (handle_extended_wait): Initialize
9585 thread_info.last_resume_kind for new fork children.
9586
9587 2015-05-15 Pedro Alves <palves@redhat.com>
9588
9589 * target.h (target_handle_new_gdb_connection): Rewrite using if
9590 wrapped in do/while.
9591
9592 2015-05-14 Joel Brobecker <brobecker@adacore.com>
9593
9594 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9595 * configure, config.in: Regenerate.
9596 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
9597 Declare typedef.
9598
9599 2015-05-12 Don Breazeal <donb@codesourcery.com>
9600
9601 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
9602 PTRACE_EVENT_VFORK_DONE.
9603 (linux_low_ptrace_options, extended_event_reported): Add vfork
9604 events.
9605 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
9606 and "vforkdone" for RSP 'T' Stop Reply Packet.
9607 * server.h (report_vfork_events): Declare
9608 global variable.
9609
9610 2015-05-12 Don Breazeal <donb@codesourcery.com>
9611
9612 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
9613 (the_low_target) <new_fork>: Initialize new member.
9614 * linux-arm-low.c (arm_new_fork): New function.
9615 (the_low_target) <new_fork>: Initialize new member.
9616 * linux-low.c (handle_extended_wait): Call new target function
9617 new_fork.
9618 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
9619 * linux-mips-low.c (mips_add_watchpoint): New function
9620 extracted from mips_insert_point.
9621 (the_low_target) <new_fork>: Initialize new member.
9622 (mips_linux_new_fork): New function.
9623 (mips_insert_point): Call mips_add_watchpoint.
9624 * linux-x86-low.c (x86_linux_new_fork): New function.
9625 (the_low_target) <new_fork>: Initialize new member.
9626
9627 2015-05-12 Don Breazeal <donb@codesourcery.com>
9628
9629 * linux-low.c (handle_extended_wait): Implement return value,
9630 rename argument 'event_child' to 'event_lwp', handle
9631 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
9632 (linux_low_ptrace_options): New function.
9633 (linux_low_filter_event): Call linux_low_ptrace_options,
9634 use different argument fo linux_enable_event_reporting,
9635 use return value from handle_extended_wait.
9636 (extended_event_reported): New function.
9637 (linux_wait_1): Call extended_event_reported and set
9638 status to report fork events.
9639 (linux_write_memory): Add pid to debug message.
9640 (reset_lwp_ptrace_options_callback): New function.
9641 (linux_handle_new_gdb_connection): New function.
9642 (linux_target_ops): Initialize new structure member.
9643 * linux-low.h (struct lwp_info) <waitstatus>: New member.
9644 * lynx-low.c: Initialize new structure member.
9645 * remote-utils.c (prepare_resume_reply): Implement stop reason
9646 "fork" for "T" stop message.
9647 * server.c (handle_query): Call handle_new_gdb_connection.
9648 * server.h (report_fork_events): Declare global flag.
9649 * target.h (struct target_ops) <handle_new_gdb_connection>:
9650 New member.
9651 (target_handle_new_gdb_connection): New macro.
9652 * win32-low.c: Initialize new structure member.
9653
9654 2015-05-12 Don Breazeal <donb@codesourcery.com>
9655
9656 * mem-break.c (APPEND_TO_LIST): Define macro.
9657 (clone_agent_expr): New function.
9658 (clone_one_breakpoint): New function.
9659 (clone_all_breakpoints): New function.
9660 * mem-break.h: Declare new functions.
9661
9662 2015-05-12 Don Breazeal <donb@codesourcery.com>
9663
9664 * linux-low.c (linux_supports_fork_events): New function.
9665 (linux_supports_vfork_events): New function.
9666 (linux_target_ops): Initialize new structure members.
9667 (initialize_low): Call linux_check_ptrace_features.
9668 * lynx-low.c (lynx_target_ops): Initialize new structure
9669 members.
9670 * server.c (report_fork_events, report_vfork_events):
9671 New global flags.
9672 (handle_query): Add new features to qSupported packet and
9673 response.
9674 (captured_main): Initialize new global variables.
9675 * target.h (struct target_ops) <supports_fork_events>:
9676 New member.
9677 <supports_vfork_events>: New member.
9678 (target_supports_fork_events): New macro.
9679 (target_supports_vfork_events): New macro.
9680 * win32-low.c (win32_target_ops): Initialize new structure
9681 members.
9682
9683 2015-05-12 Gary Benson <gbenson@redhat.com>
9684
9685 * server.c (handle_qxfer_exec_file): Use current process
9686 if annex is empty.
9687
9688 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
9689
9690 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
9691 Remove HAVE_PTRACE_GETREGS conditionals.
9692 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
9693 instead of PTRACE_GETREGS and PTRACE_SETREGS.
9694
9695 2015-05-08 Yao Qi <yao.qi@linaro.org>
9696
9697 * linux-low.c (linux_supports_conditional_breakpoints): New
9698 function.
9699 (linux_target_ops): Install new target method.
9700 * lynx-low.c (lynx_target_ops): Install NULL hook for
9701 supports_conditional_breakpoints.
9702 * nto-low.c (nto_target_ops): Likewise.
9703 * spu-low.c (spu_target_ops): Likewise.
9704 * win32-low.c (win32_target_ops): Likewise.
9705 * server.c (handle_query): Check
9706 target_supports_conditional_breakpoints.
9707 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9708 New field.
9709 (target_supports_conditional_breakpoints): New macro.
9710
9711 2015-05-06 Pedro Alves <palves@redhat.com>
9712
9713 PR server/18081
9714 * server.c (start_inferior): If the process exits, mourn it.
9715
9716 2015-04-21 Gary Benson <gbenson@redhat.com>
9717
9718 * hostio.c (fileio_open_flags_to_host): Factored out to
9719 fileio_to_host_openflags in common/fileio.c. Single use
9720 updated.
9721
9722 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9723
9724 * linux-xtensa-low.c (xtensa_fill_gregset)
9725 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
9726 XCHAL_HAVE_LOOP.
9727
9728 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9729
9730 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
9731 (regs_info): Replace usrregs pointer with NULL.
9732
9733 2015-04-17 Gary Benson <gbenson@redhat.com>
9734
9735 * target.h (struct target_ops) <pid_to_exec_file>: New field.
9736 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
9737 * server.c (handle_qxfer_exec_file): New function.
9738 (qxfer_packets): Add exec-file entry.
9739 (handle_query): Report qXfer:exec-file:read as supported packet.
9740
9741 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
9742
9743 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
9744
9745 2015-04-09 Gary Benson <gbenson@redhat.com>
9746
9747 * hostio-errno.c (errno_to_fileio_error): Remove function.
9748 Update caller to use remote_fileio_to_fio_error.
9749
9750 2015-04-09 Yao Qi <yao.qi@linaro.org>
9751
9752 * linux-low.c (linux_insert_point): Call
9753 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
9754 (linux_remove_point): Call remove_memory_breakpoint if type is
9755 raw_bkpt_type_sw.
9756 * linux-x86-low.c (x86_insert_point): Don't call
9757 insert_memory_breakpoint.
9758 (x86_remove_point): Don't call remove_memory_breakpoint.
9759
9760 2015-04-01 Pedro Alves <palves@redhat.com>
9761 Cleber Rosa <crosa@redhat.com>
9762
9763 * server.c (gdbserver_usage): Reorganize and extend the usage
9764 message.
9765
9766 2015-03-24 Pedro Alves <palves@redhat.com>
9767
9768 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
9769 output. Also dump TRAP_TRACE.
9770 (linux_low_filter_event): In debug output, distinguish a
9771 resume_stop SIGSTOP from a delayed SIGSTOP.
9772
9773 2015-03-24 Gary Benson <gbenson@redhat.com>
9774
9775 * linux-x86-low.c (x86_linux_new_thread): Moved to
9776 nat/x86-linux.c.
9777 (x86_linux_prepare_to_resume): Likewise.
9778
9779 2015-03-24 Gary Benson <gbenson@redhat.com>
9780
9781 * Makefile.in (x86-linux-dregs.o): New rule.
9782 * configure.srv: Add x86-linux-dregs.o to relevant targets.
9783 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
9784 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
9785 (x86_linux_dr_get): Likewise.
9786 (x86_linux_dr_set): Likewise.
9787 (update_debug_registers_callback): Likewise.
9788 (x86_linux_dr_set_addr): Likewise.
9789 (x86_linux_dr_get_addr): Likewise.
9790 (x86_linux_dr_set_control): Likewise.
9791 (x86_linux_dr_get_control): Likewise.
9792 (x86_linux_dr_get_status): Likewise.
9793 (x86_linux_update_debug_registers): Likewise.
9794
9795 2015-03-24 Gary Benson <gbenson@redhat.com>
9796
9797 * linux-x86-low.c (x86_linux_update_debug_registers):
9798 New function, factored out from...
9799 (x86_linux_prepare_to_resume): ...this.
9800
9801 2015-03-24 Gary Benson <gbenson@redhat.com>
9802
9803 * linux-x86-low.c (x86_linux_dr_get): Update comments.
9804 (x86_linux_dr_set): Likewise.
9805 (update_debug_registers_callback): Likewise.
9806 (x86_linux_dr_set_addr): Likewise.
9807 (x86_linux_dr_get_addr): Likewise.
9808 (x86_linux_dr_set_control): Likewise.
9809 (x86_linux_dr_get_control): Likewise.
9810 (x86_linux_dr_get_status): Likewise.
9811 (x86_linux_prepare_to_resume): Likewise.
9812
9813 2015-03-24 Gary Benson <gbenson@redhat.com>
9814
9815 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
9816 Use perror_with_name. Pass string through gettext.
9817 (x86_linux_dr_set): Likewise.
9818
9819 2015-03-24 Gary Benson <gbenson@redhat.com>
9820
9821 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
9822 (x86_linux_dr_set_addr): ...this.
9823 (x86_dr_low_get_addr): Rename to...
9824 (x86_linux_dr_get_addr): ...this.
9825 (x86_dr_low_set_control): Rename to...
9826 (x86_linux_dr_set_control): ...this.
9827 (x86_dr_low_get_control): Rename to...
9828 (x86_linux_dr_get_control): ...this.
9829 (x86_dr_low_get_status): Rename to...
9830 (x86_linux_dr_get_status): ...this.
9831 (x86_dr_low): Update with new function names.
9832
9833 2015-03-24 Gary Benson <gbenson@redhat.com>
9834
9835 * Makefile.in (x86-linux.o): New rule.
9836 * configure.srv: Add x86-linux.o to relevant targets.
9837 * linux-low.c (lwp_set_arch_private_info): New function.
9838 (lwp_arch_private_info): Likewise.
9839 * linux-x86-low.c: Include nat/x86-linux.h.
9840 (arch_lwp_info): Removed structure.
9841 (update_debug_registers_callback):
9842 Use lwp_set_debug_registers_changed.
9843 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
9844 and lwp_set_debug_registers_changed.
9845 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
9846
9847 2015-03-24 Gary Benson <gbenson@redhat.com>
9848
9849 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
9850 * linux-arm-low.c (arm_new_thread): Likewise.
9851 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
9852 * linux-mips-low.c (mips_linux_new_thread): Likewise.
9853 * linux-x86-low.c (x86_linux_new_thread): Likewise.
9854 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
9855
9856 2015-03-24 Gary Benson <gbenson@redhat.com>
9857
9858 * linux-low.c (ptid_of_lwp): New function.
9859 (lwp_is_stopped): Likewise.
9860 (lwp_stop_reason): Likewise.
9861 * linux-x86-low.c (update_debug_registers_callback):
9862 Use lwp_is_stopped.
9863 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
9864 lwp_stop_reason.
9865
9866 2015-03-24 Gary Benson <gbenson@redhat.com>
9867
9868 * linux-low.h (linux_stop_lwp): Remove declaration.
9869
9870 2015-03-24 Gary Benson <gbenson@redhat.com>
9871
9872 * linux-low.h: Include nat/linux-nat.h.
9873 * linux-low.c (iterate_over_lwps_args): New structure.
9874 (iterate_over_lwps_filter): New function.
9875 (iterate_over_lwps): Likewise.
9876 * linux-x86-low.c (update_debug_registers_callback):
9877 Update signature to what iterate_over_lwps expects.
9878 Remove PID check that iterate_over_lwps now performs.
9879 (x86_dr_low_set_addr): Use iterate_over_lwps.
9880 (x86_dr_low_set_control): Likewise.
9881
9882 2015-03-24 Gary Benson <gbenson@redhat.com>
9883
9884 * linux-x86-low.c (x86_debug_reg_state): New function.
9885 (x86_linux_prepare_to_resume): Use the above.
9886
9887 2015-03-24 Gary Benson <gbenson@redhat.com>
9888
9889 * linux-low.c (current_lwp_ptid): New function.
9890 * linux-x86-low.c: Include nat/linux-nat.h.
9891 (x86_dr_low_get_addr): Use current_lwp_ptid.
9892 (x86_dr_low_get_control): Likewise.
9893 (x86_dr_low_get_status): Likewise.
9894
9895 2015-03-20 Pedro Alves <palves@redhat.com>
9896
9897 * tracepoint.c (cmd_qtstatus): Make "str" const.
9898
9899 2015-03-20 Pedro Alves <palves@redhat.com>
9900
9901 * server.c (handle_general_set): Make "req_str" const.
9902
9903 2015-03-19 Pedro Alves <palves@redhat.com>
9904
9905 * linux-low.c (linux_resume_one_lwp): Rename to ...
9906 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
9907 instead call perror_with_name.
9908 (check_ptrace_stopped_lwp_gone): New function.
9909 (linux_resume_one_lwp): Reimplement as wrapper around
9910 linux_resume_one_lwp_throw that swallows errors if the LWP is
9911 gone.
9912
9913 2015-03-19 Pedro Alves <palves@redhat.com>
9914
9915 * linux-low.c (count_events_callback, select_event_lwp_callback):
9916 No longer check whether the thread has resume_stop as last resume
9917 kind.
9918
9919 2015-03-19 Pedro Alves <palves@redhat.com>
9920
9921 * linux-low.c (count_events_callback, select_event_lwp_callback):
9922 Use the lwp's status_pending_p field, not the thread's.
9923
9924 2015-03-19 Pedro Alves <palves@redhat.com>
9925
9926 * linux-low.c (select_event_lwp_callback): Update comments to
9927 no longer mention SIGTRAP.
9928
9929 2015-03-18 Gary Benson <gbenson@redhat.com>
9930
9931 * server.c (handle_query): Do not report vFile:fstat as supported.
9932
9933 2015-03-11 Gary Benson <gbenson@redhat.com>
9934
9935 * hostio.c (sys/types.h): New include.
9936 (sys/stat.h): Likewise.
9937 (common-remote-fileio.h): Likewise.
9938 (handle_fstat): New function.
9939 (handle_vFile): Handle vFile:fstat packets.
9940
9941 2015-03-11 Gary Benson <gbenson@redhat.com>
9942
9943 * configure.ac (AC_CHECK_MEMBERS): Add checks for
9944 struct stat.st_blocks and struct stat.st_blksize.
9945 * configure: Regenerate.
9946 * config.in: Likewise.
9947 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
9948 (OBS): Add common-remote-fileio.o.
9949 (common-remote-fileio.o): New rule.
9950
9951 2015-03-09 Pedro Alves <palves@redhat.com>
9952
9953 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
9954 'struct sockaddr' pointer in 'accept' call.
9955
9956 2015-03-09 Pedro Alves <palves@redhat.com>
9957
9958 Revert:
9959 2015-03-07 Pedro Alves <palves@redhat.com>
9960 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9961 or <winsock2.h> here. Instead include "gdb_socket.h".
9962 (remote_open): Use union gdb_sockaddr_u.
9963 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9964 or <winsock2.h> here. Instead include "gdb_socket.h".
9965 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9966 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9967 or <sys/un.h>.
9968 (init_named_socket, gdb_agent_helper_thread): Use union
9969 gdb_sockaddr_u.
9970
9971 2015-03-07 Pedro Alves <palves@redhat.com>
9972
9973 * configure.ac (build_warnings): Move
9974 -Wdeclaration-after-statement to the C-specific set.
9975 * configure: Regenerate.
9976
9977 2015-03-07 Pedro Alves <palves@redhat.com>
9978
9979 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9980 or <winsock2.h> here. Instead include "gdb_socket.h".
9981 (remote_open): Use union gdb_sockaddr_u.
9982 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9983 or <winsock2.h> here. Instead include "gdb_socket.h".
9984 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9985 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9986 or <sys/un.h>.
9987 (init_named_socket, gdb_agent_helper_thread): Use union
9988 gdb_sockaddr_u.
9989
9990 2015-03-07 Pedro Alves <palves@redhat.com>
9991
9992 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
9993 instead.
9994
9995 2015-03-06 Yao Qi <yao.qi@linaro.org>
9996
9997 * linux-aarch64-low.c (aarch64_insert_point): Use
9998 show_debug_regs as a boolean.
9999 (aarch64_remove_point): Likewise.
10000
10001 2015-03-05 Pedro Alves <palves@redhat.com>
10002
10003 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10004 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10005 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
10006 * nto-low.c (nto_target_ops): Likewise.
10007 * spu-low.c (spu_target_ops): Likewise.
10008 * win32-low.c (win32_target_ops): Likewise.
10009
10010 2015-03-04 Pedro Alves <palves@redhat.com>
10011
10012 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
10013 Decide whether a breakpoint triggered based on the SIGTRAP's
10014 siginfo.si_code.
10015 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
10016 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
10017 (linux_low_filter_event): Check for breakpoints before checking
10018 watchpoints.
10019 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
10020 siginfo.si_code.
10021 (linux_stopped_by_sw_breakpoint)
10022 (linux_supports_stopped_by_sw_breakpoint)
10023 (linux_stopped_by_hw_breakpoint)
10024 (linux_supports_stopped_by_hw_breakpoint): New functions.
10025 (linux_target_ops): Install new target methods.
10026
10027 2015-03-04 Pedro Alves <palves@redhat.com>
10028
10029 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
10030 * server.c (swbreak_feature, hwbreak_feature): New globals.
10031 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
10032 (captured_main): Clear swbreak_feature and hwbreak_feature.
10033 * server.h (swbreak_feature, hwbreak_feature): Declare.
10034 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
10035 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
10036 supports_stopped_by_hw_breakpoint>: New fields.
10037 (target_supports_stopped_by_sw_breakpoint)
10038 (target_stopped_by_sw_breakpoint)
10039 (target_supports_stopped_by_hw_breakpoint)
10040 (target_stopped_by_hw_breakpoint): Declare.
10041
10042 2015-03-04 Pedro Alves <palves@redhat.com>
10043
10044 enum lwp_stop_reason -> enum target_stop_reason
10045 * linux-low.c (check_stopped_by_breakpoint): Adjust.
10046 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
10047 (linux_wait_1, stuck_in_jump_pad_callback)
10048 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
10049 (linux_stopped_by_watchpoint):
10050 * linux-low.h (enum lwp_stop_reason): Delete.
10051 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
10052 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10053
10054 2015-03-04 Yao Qi <yao.qi@linaro.org>
10055
10056 * Makefile.in (SFILES): Add linux-aarch64-low.c.
10057
10058 2015-03-03 Gary Benson <gbenson@redhat.com>
10059
10060 * hostio.c (handle_vFile): Fix prefix lengths.
10061
10062 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
10063
10064 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
10065 ptr_bits.
10066
10067 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
10068
10069 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
10070 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
10071 (clean): Add "rm -f" for above C files.
10072 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
10073 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
10074 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
10075 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
10076 * linux-s390-low.c (HWCAP_S390_VX): New macro.
10077 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
10078 (init_registers_s390x_vx_linux64)
10079 (init_registers_s390x_tevx_linux64)
10080 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
10081 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
10082 declarations.
10083 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
10084 (s390_store_vxrs_high): New functions.
10085 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
10086 NT_S390_VXRS_HIGH.
10087 (s390_arch_setup): Add logic for selecting one of the new target
10088 descriptions. Activate the new vector regsets if applicable.
10089 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
10090 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
10091 and init_registers_s390x_tevx_linux64.
10092
10093 2015-03-01 Pedro Alves <palves@redhat.com>
10094
10095 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
10096 parameter.
10097
10098 2015-02-27 Pedro Alves <palves@redhat.com>
10099
10100 * linux-x86-low.c (u_debugreg_offset): New function.
10101 (x86_linux_dr_get, x86_linux_dr_set): Use it.
10102
10103 2015-02-27 Pedro Alves <palves@redhat.com>
10104
10105 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10106 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10107 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10108 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10109 (ps_lsetfpregs, ps_getpid)
10110 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10111 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10112 (ps_lsetxregs, ps_plog): Declare.
10113
10114 2015-02-27 Pedro Alves <palves@redhat.com>
10115
10116 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10117 IP_AGENT_EXPORT_FUNC.
10118 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10119 IP_AGENT_EXPORT_FUNC.
10120 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10121 (IP_AGENT_EXPORT): Delete.
10122 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10123 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10124 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10125 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10126 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10127 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10128 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10129 (traceframe_read_count, traceframe_write_count)
10130 (traceframes_created, trace_state_variables, get_raw_reg)
10131 (get_trace_state_variable_value, set_trace_state_variable_value)
10132 (ust_loaded, helper_thread_id, cmd_buf): Use
10133 IPA_SYM_EXPORTED_NAME.
10134 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10135 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10136 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10137 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10138 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10139 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10140 EXTERN_C_PUSH/EXTERN_C_POP.
10141 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10142 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10143 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10144 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10145 (traceframe_write_count, traceframe_read_count)
10146 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10147 (about_to_request_buffer_space, get_trace_state_variable_value)
10148 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10149 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10150 EXTERN_C_PUSH/EXTERN_C_POP.
10151 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10152 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10153 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10154 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10155 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10156 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10157 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10158 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10159 Define.
10160 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10161 (IP_AGENT_EXPORT_VAR_DECL): Define.
10162 (tracing): Declare.
10163 (gdb_agent_get_raw_reg): Declare.
10164
10165 2015-02-27 Tom Tromey <tromey@redhat.com>
10166 Pedro Alves <palves@redhat.com>
10167
10168 Rename symbols whose names are reserved C++ keywords throughout.
10169
10170 2015-02-27 Pedro Alves <palves@redhat.com>
10171
10172 * Makefile.in (COMPILER): New, get it from autoconf.
10173 (CXX): Get from autoconf instead.
10174 (COMPILE.pre): Use COMPILER.
10175 (CC-LD): Rename to ...
10176 (CC_LD): ... this. Use COMPILER.
10177 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10178 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10179 * acinclude.m4: Include build-with-cxx.m4.
10180 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10181 Disable -Werror by default if building in C++ mode.
10182 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10183 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10184 the C++ compiler. Save/restore CXXFLAGS too.
10185 * configure: Regenerate.
10186
10187 2015-02-27 Pedro Alves <palves@redhat.com>
10188
10189 * acinclude.m4: Include libiberty.m4.
10190 * configure.ac: Call libiberty_INIT.
10191 * config.in, configure: Regenerate.
10192
10193 2015-02-26 Pedro Alves <palves@redhat.com>
10194
10195 * linux-low.c (linux_wait_1): When incrementing the PC past a
10196 program breakpoint always use the_low_target.breakpoint_len as
10197 increment, rather than the maximum between that and
10198 the_low_target.decr_pc_after_break.
10199
10200 2015-02-23 Pedro Alves <palves@redhat.com>
10201
10202 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10203 thread was doing a step-over; always adjust the PC if
10204 we stepped over a permanent breakpoint.
10205 (linux_wait_1): If we stepped over breakpoint that was on top of a
10206 permanent breakpoint, manually advance the PC past it.
10207
10208 2015-02-23 Pedro Alves <palves@redhat.com>
10209
10210 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10211 modes.
10212 (x86_fill_gregset, x86_store_gregset): Use it when handling
10213 $orig_eax.
10214
10215 2015-02-20 Pedro Alves <palves@redhat.com>
10216
10217 * thread-db.c: Include "nat/linux-procfs.h".
10218 (thread_db_init): Skip listing new threads if the kernel supports
10219 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10220
10221 2015-02-20 Pedro Alves <palves@redhat.com>
10222
10223 * linux-low.c (status_pending_p_callback): Use ptid_match.
10224
10225 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10226
10227 PR breakpoints/16812
10228 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10229 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10230 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10231
10232 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10233
10234 PR breakpoints/15956
10235 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10236
10237 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10238
10239 * linux-low.c (linux_low_btrace_conf): Print size.
10240 * server.c (handle_btrace_conf_general_set): New.
10241 (hanle_general_set): Call handle_btrace_conf_general_set.
10242 (handle_query): Report Qbtrace-conf:bts:size as supported.
10243
10244 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10245
10246 * linux-low.c (linux_low_enable_btrace): Update parameters.
10247 (linux_low_btrace_conf): New.
10248 (linux_target_ops)<to_btrace_conf>: Initialize.
10249 * server.c (current_btrace_conf): New.
10250 (handle_btrace_enable): Rename to ...
10251 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10252 to target_enable_btrace. Update comment. Update users.
10253 (handle_qxfer_btrace_conf): New.
10254 (qxfer_packets): Add btrace-conf entry.
10255 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10256 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10257 (target_ops)<read_btrace_conf>: New.
10258 (target_enable_btrace): Update parameters.
10259 (target_read_btrace_conf): New.
10260
10261 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10262
10263 * server.c (handle_btrace_general_set): Remove call to
10264 target_supports_btrace.
10265 (supported_btrace_packets): New.
10266 (handle_query): Call supported_btrace_packets.
10267 * target.h: include btrace-common.h.
10268 (btrace_target_info): Removed.
10269 (supports_btrace, target_supports_btrace): Update parameters.
10270
10271 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10272
10273 * Makefile.in (SFILES): Add common/btrace-common.c.
10274 (OBS): Add common/btrace-common.o.
10275 (btrace-common.o): Add build rules.
10276 * linux-low: Include btrace-common.h.
10277 (linux_low_read_btrace): Use struct btrace_data. Call
10278 btrace_data_init and btrace_data_fini.
10279
10280 2015-02-06 Pedro Alves <palves@redhat.com>
10281
10282 * thread-db.c (find_new_threads_callback): Add debug output.
10283
10284 2015-02-04 Pedro Alves <palves@redhat.com>
10285
10286 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10287 (resume_stopped_resumed_lwps): New function.
10288 (linux_wait_for_event_filtered): Use it.
10289
10290 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10291
10292 * Makefile.in (SFILES): Add linux-personality.c.
10293 (linux-personality.o): New rule.
10294 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10295 list of objects to be built.
10296 * linux-low.c: Include nat/linux-personality.h.
10297 (linux_create_inferior): Remove code to disable address space
10298 randomization (moved to ../nat/linux-personality.c). Create
10299 cleanup to disable address space randomization.
10300
10301 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10302
10303 * Makefile.in (posix-strerror.o): New rule.
10304 (mingw-strerror.o): Likewise.
10305 * configure: Regenerated.
10306 * configure.ac: Source file ../common/common.host. Initialize new
10307 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10308
10309 2015-01-14 Yao Qi <yao@codesourcery.com>
10310
10311 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10312 (ppc-linux.o): New rule.
10313 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10314 * configure.ac: AC_CHECK_FUNCS(getauxval).
10315 * config.in: Re-generated.
10316 * configure: Re-generated.
10317 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10318 ppc64_64bit_inferior_p
10319
10320 2015-01-14 Yao Qi <yao@codesourcery.com>
10321
10322 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10323 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10324 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10325 (PT_ORIG_R3, PT_TRAP): Likewise.
10326 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10327 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10328 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10329
10330 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10331
10332 * i387-fp.c (i387_cache_to_xsave): In look over
10333 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10334 zmmh_low_space field by use of zmmh_high_space.
10335
10336 2015-01-09 Pedro Alves <palves@redhat.com>
10337
10338 * linux-low.c (step_over_bkpt): Move higher up in the file.
10339 (handle_extended_wait): Don't store the stop_pc here.
10340 (get_stop_pc): Adjust comments and rename to ...
10341 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10342 stopped for a software breakpoint or hardware breakpoint.
10343 (thread_still_has_status_pending_p): New function.
10344 (status_pending_p_callback): Use
10345 thread_still_has_status_pending_p. If the event is no longer
10346 interesting, resume the LWP.
10347 (handle_tracepoints): Add assert.
10348 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10349 (wstatus_maybe_breakpoint): New function.
10350 (cancel_breakpoint): Delete function.
10351 (check_stopped_by_watchpoint): New function, factored out from
10352 linux_low_filter_event.
10353 (lp_status_maybe_breakpoint): Delete function.
10354 (linux_low_filter_event): Remove filter_ptid argument.
10355 Leave thread group exits pending here. Store the LWP's stop PC.
10356 Always leave events pending.
10357 (linux_wait_for_event_filtered): Pull all events out of the
10358 kernel, and leave them all pending.
10359 (count_events_callback, select_event_lwp_callback): Consider all
10360 events.
10361 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10362 (select_event_lwp): Only give preference to the stepping LWP in
10363 all-stop mode. Adjust comments.
10364 (ignore_event): New function.
10365 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10366 references to cancel_breakpoints. Adjust to renames. Also give
10367 equal priority to all LWPs that have had events in non-stop mode.
10368 If reporting a software breakpoint event, unadjust the LWP's PC.
10369 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10370 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10371 Adjust.
10372 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10373 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10374 (linux_stopped_by_watchpoint): Adjust.
10375 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10376 * linux-low.h (enum lwp_stop_reason): New.
10377 (struct lwp_info) <stop_pc>: Adjust comment.
10378 <stopped_by_watchpoint>: Delete field.
10379 <stop_reason>: New field.
10380 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10381 * mem-break.c (software_breakpoint_inserted_here)
10382 (hardware_breakpoint_inserted_here): New function.
10383 * mem-break.h (software_breakpoint_inserted_here)
10384 (hardware_breakpoint_inserted_here): Declare.
10385 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10386 (cancel_breakpoints): Delete.
10387 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10388 (upload_fast_traceframes): Remove references to
10389 cancel_breakpoints.
10390
10391 2015-01-09 Pedro Alves <palves@redhat.com>
10392
10393 * thread-db.c (find_new_threads_callback): Ignore thread if the
10394 kernel thread ID is -1.
10395
10396 2015-01-09 Pedro Alves <palves@redhat.com>
10397
10398 * linux-low.c (linux_attach_fail_reason_string): Move to
10399 nat/linux-ptrace.c, and rename.
10400 (linux_attach_lwp): Update comment.
10401 (attach_proc_task_lwp_callback): New function.
10402 (linux_attach): Adjust to rename and use
10403 linux_proc_attach_tgid_threads.
10404 (linux_attach_fail_reason_string): Delete declaration.
10405
10406 2015-01-01 Joel Brobecker <brobecker@adacore.com>
10407
10408 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10409 * server.c (gdbserver_version): Likewise.
10410
10411 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10412
10413 * remote-utils.c: Include ctype.h.
10414 (input_interrupt): Explicitly handle the case when the char
10415 received is the NUL byte. Improve the printing of non-ASCII
10416 characters.
10417
10418 2014-12-16 Joel Brobecker <brobecker@adacore.com>
10419
10420 * linux-low.c (linux_low_filter_event): Update call to
10421 linux_enable_event_reporting following the addition of
10422 a new parameter to that function.
10423
10424 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
10425
10426 PR server/17457
10427 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10428 (AARCH64_FPCR_REGNO): Likewise.
10429 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10430 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10431 (aarch64_store_fpregset): Likewise.
10432
10433 2014-12-15 Joel Brobecker <brobecker@adacore.com>
10434
10435 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10436 Remove FIXME comment about assumption about N.
10437
10438 2014-12-13 Joel Brobecker <brobecker@adacore.com>
10439
10440 * configure.ac: If large-file support is disabled in GDBserver,
10441 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10442 * configure: Regenerate.
10443
10444 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10445
10446 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10447 warning upon ENODATA from ptrace.
10448 * linux-s390-low.c (s390_store_tdb): New.
10449 (s390_regsets): Add regset for NT_S390_TDB.
10450
10451 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10452
10453 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10454 without a fill_function.
10455 * linux-s390-low.c (s390_fill_last_break): Remove.
10456 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10457 (s390_arch_setup): Use regset's size instead of fill_function for
10458 loop end condition.
10459
10460 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10461
10462 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10463 the regset's store function when ptrace returned an error.
10464 * regcache.c (get_thread_regcache): Invalidate register cache
10465 before fetching inferior's registers.
10466
10467 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10468
10469 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10470 while-loop as for-loop.
10471 (regsets_store_inferior_registers): Likewise.
10472
10473 2014-11-28 Yao Qi <yao@codesourcery.com>
10474
10475 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10476 * config.in, configure: Re-generate.
10477 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10478 is defined.
10479
10480 2014-11-21 Yao Qi <yao@codesourcery.com>
10481
10482 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10483 (AC_CHECK_HEADERS): Remove malloc.h.
10484 * configure: Re-generated.
10485 * config.in: Re-generated.
10486 * server.h: Don't include alloca.h and malloc.h.
10487 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10488 Don't include malloc.h.
10489
10490 2014-11-17 Joel Brobecker <brobecker@adacore.com>
10491
10492 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10493 corresponding ERRNO check in same block.
10494
10495 2014-11-12 Pedro Alves <palves@redhat.com>
10496
10497 * server.c (cont_thread): Update comment.
10498 (start_inferior, attach_inferior): No longer clear cont_thread.
10499 (handle_v_cont): No longer set cont_thread.
10500 (captured_main): Clear cont_thread each time a GDB connects.
10501
10502 2014-11-12 Pedro Alves <palves@redhat.com>
10503
10504 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10505 thread, and don't resume all threads if the Hc thread has exited.
10506
10507 2014-11-12 Pedro Alves <palves@redhat.com>
10508
10509 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10510 the process group instead of to a specific LWP.
10511
10512 2014-10-15 Pedro Alves <palves@redhat.com>
10513
10514 PR server/17487
10515 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10516 parameter.
10517 (arm_set_thread_context): Delete.
10518 (the_low_target): Adjust.
10519 * win32-i386-low.c (debug_registers_changed)
10520 (debug_registers_used): Delete.
10521 (update_debug_registers_callback): New function.
10522 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10523 needing to update their debug registers.
10524 (win32_get_current_dr): New function.
10525 (x86_dr_low_get_addr, x86_dr_low_get_control)
10526 (x86_dr_low_get_status): Fetch the debug register from the thread
10527 record's context.
10528 (i386_initial_stuff): Adjust.
10529 (i386_get_thread_context): Remove current_event parameter. Don't
10530 clear debug_registers_changed nor copy DR values to
10531 debug_reg_state.
10532 (i386_set_thread_context): Delete.
10533 (i386_prepare_to_resume): New function.
10534 (i386_thread_added): Mark the thread as needing to update irs
10535 debug registers.
10536 (the_low_target): Remove i386_set_thread_context and install
10537 i386_prepare_to_resume.
10538 * win32-low.c (win32_get_thread_context): Adjust.
10539 (win32_set_thread_context): Use SetThreadContext
10540 directly.
10541 (win32_prepare_to_resume): New function.
10542 (win32_require_context): New function, factored out from ...
10543 (thread_rec): ... this.
10544 (continue_one_thread): Call win32_prepare_to_resume on each thread
10545 we're about to continue.
10546 (win32_resume): Call win32_prepare_to_resume on the event thread.
10547 * win32-low.h (struct win32_thread_info)
10548 <debug_registers_changed>: New field.
10549 (struct win32_target_ops): Change prototype of set_thread_context,
10550 delete set_thread_context and add prepare_to_resume.
10551 (win32_require_context): New declaration.
10552
10553 2014-10-08 Gary Benson <gbenson@redhat.com>
10554
10555 * server.h: Do not include common-exceptions.h.
10556
10557 2014-10-08 Gary Benson <gbenson@redhat.com>
10558
10559 * server.h: Do not include cleanups.h.
10560
10561 2014-09-30 James Hogan <james.hogan@imgtec.com>
10562
10563 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
10564 mips64-dsp-linux.c.
10565
10566 2014-09-23 Yao Qi <yao@codesourcery.com>
10567
10568 * linux-low.c (lp_status_maybe_breakpoint): New function.
10569 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
10570 (count_events_callback): Likewise.
10571 (select_event_lwp_callback): Likewise.
10572 (cancel_breakpoints_callback): Likewise.
10573
10574 2014-09-19 Don Breazeal <donb@codesourcery.com>
10575
10576 * linux-low.c (handle_extended_wait): Call
10577 linux_ptrace_get_extended_event.
10578 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
10579 linux_is_extended_waitstatus.
10580
10581 2014-09-16 Joel Brobecker <brobecker@adacore.com>
10582
10583 * Makefile.in (CPPFLAGS): Define.
10584 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
10585 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
10586
10587 2014-09-16 Gary Benson <gbenson@redhat.com>
10588
10589 * inferiors.h (current_inferior): Renamed as...
10590 (current_thread): New variable. All uses updated.
10591 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
10592 (maybe_move_out_of_jump_pad): Likewise.
10593 (cancel_breakpoint): Likewise.
10594 (linux_low_filter_event): Likewise.
10595 (wait_for_sigstop): Likewise.
10596 (linux_resume_one_lwp): Likewise.
10597 (need_step_over_p): Likewise.
10598 (start_step_over): Likewise.
10599 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
10600 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
10601 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
10602 and save_inferior as saved_thread.
10603 * regcache.c (get_thread_regcache): Renamed saved_inferior as
10604 saved_thread.
10605 (regcache_invalidate_thread): Likewise.
10606 * remote-utils.c (prepare_resume_reply): Likewise.
10607 * thread-db.c (thread_db_get_tls_address): Likewise.
10608 (disable_thread_event_reporting): Likewise.
10609 (remove_thread_event_breakpoints): Likewise.
10610 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
10611 as saved_thread.
10612 * target.h (set_desired_inferior): Renamed as...
10613 (set_desired_thread): New declaration. All uses updated.
10614 * server.c (myresume): Updated comment to reference thread instead
10615 of inferior.
10616 (handle_serial_event): Likewise.
10617 (handle_target_event): Likewise.
10618
10619 2014-09-12 Tom Tromey <tromey@redhat.com>
10620 Gary Benson <gbenson@redhat.com>
10621
10622 * regcache.h: Include common-regcache.h.
10623 (regcache_read_pc): Don't declare.
10624 * regcache.c (get_thread_regcache_for_ptid): New function.
10625
10626 2014-09-11 Tom Tromey <tromey@redhat.com>
10627 Gary Benson <gbenson@redhat.com>
10628
10629 * symbol.c: New file.
10630 * Makefile.in (SFILES): Add symbol.c.
10631 (OBS): Add symbol.o.
10632
10633 2014-09-11 Gary Benson <gbenson@redhat.com>
10634
10635 * target.c (target_stop_ptid, target_continue_ptid): New
10636 functions.
10637
10638 2014-09-11 Tom Tromey <tromey@redhat.com>
10639 Gary Benson <gbenson@redhat.com>
10640
10641 * target.h: Include target/target.h.
10642 * target.c (target_read_memory, target_read_uint32)
10643 (target_write_memory): New functions.
10644
10645 2014-09-11 Gary Benson <gbenson@redhat.com>
10646
10647 * server.h (debug_hw_points): Don't declare.
10648 * server.c (debug_hw_points): Don't define. Replace all uses
10649 with show_debug_regs.
10650 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
10651 all uses with show_debug_regs.
10652
10653 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10654
10655 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
10656 endianness into account.
10657 (ppc_supply_ptrace_register): Likewise.
10658
10659 2014-09-03 James Hogan <james.hogan@imgtec.com>
10660
10661 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
10662 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
10663
10664 2014-09-03 Gary Benson <gbenson@redhat.com>
10665
10666 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
10667 ALL_DEBUG_ADDRESS_REGISTERS.
10668
10669 2014-09-02 Gary Benson <gbenson@redhat.com>
10670
10671 * i386-low.h: Renamed as...
10672 * x86-low.h: New file. All type, function and variable name
10673 prefixes changed from "i386_" to "x86_". All references updated.
10674 * i386-low.c: Renamed as...
10675 * x86-low.c: New file. All type, function and variable name
10676 prefixes changed from "i386_" to "x86_". All references updated.
10677
10678 2014-09-02 Gary Benson <gbenson@redhat.com>
10679
10680 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
10681 (x86_linux_new_thread): Likewise.
10682
10683 2014-08-29 Gary Benson <gbenson@redhat.com>
10684
10685 * server.h (setjmp.h): Do not include.
10686 (toplevel): Do not declare.
10687 (common-exceptions.h): Include.
10688 (cleanups.h): Likewise.
10689 * server.c (toplevel): Do not define.
10690 (exit_code): New static global.
10691 (detach_or_kill_for_exit_cleanup): New function.
10692 (main): New function. Original main renamed to...
10693 (captured_main): New function.
10694 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
10695
10696 2014-08-29 Gary Benson <gbenson@redhat.com>
10697
10698 * Makefile.in (SFILES): Add common/common-exceptions.c.
10699 (OBS): Add common-exceptions.o.
10700 (common-exceptions.o): New rule.
10701 * utils.c (prepare_to_throw_exception): New function.
10702
10703 2014-08-29 Gary Benson <gbenson@redhat.com>
10704
10705 * config.in: Regenerate.
10706 * configure: Likewise.
10707
10708 2014-08-29 Gary Benson <gbenson@redhat.com>
10709
10710 * Makefile.in (SFILES): Add common/cleanups.c.
10711 (OBS): cleanups.o.
10712 (cleanups.o): New rule.
10713
10714 2014-08-29 Gary Benson <gbenson@redhat.com>
10715
10716 * utils.c (internal_vwarning): New function.
10717
10718 2014-08-28 Gary Benson <gbenson@redhat.com>
10719
10720 * utils.h (fatal): Remove declaration.
10721 * utils.c (fatal): Remove function.
10722
10723 2014-08-28 Gary Benson <gbenson@redhat.com>
10724
10725 * tracepoint.c (gdb_agent_init): Replace fatal with
10726 perror_with_name.
10727 (initialize_tracepoint): Likewise.
10728
10729 2014-08-28 Gary Benson <gbenson@redhat.com>
10730
10731 * remote-utils.c (remote_prepare): Replace fatal with error.
10732
10733 2014-08-28 Gary Benson <gbenson@redhat.com>
10734
10735 * linux-low.c (linux_async): Replace fatal with warning.
10736 Tidy up and return.
10737 (linux_start_non_stop): Return -1 if linux_async failed.
10738
10739 2014-08-28 Gary Benson <gbenson@redhat.com>
10740
10741 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
10742 gdb_assert.
10743 (i386_dr_low_get_addr): Remove vague comment.
10744 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
10745 gdb_assert.
10746
10747 2014-08-28 Gary Benson <gbenson@redhat.com>
10748
10749 * inferiors.c (get_thread_process): Replace check with gdb_assert.
10750 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
10751 internal_error.
10752 (linux_resume_one_lwp): Likewise.
10753 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
10754 gdb_assert.
10755 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
10756 with internal_error.
10757 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
10758 (init_register_cache): Replace fatal with gdb_assert_not_reached.
10759 (find_register_by_name): Replace fatal with internal_error.
10760 (find_regno): Likewise.
10761 * tdesc.c (init_target_desc): Replace check with gdb_assert.
10762 * thread-db.c (thread_db_create_event): Likewise.
10763 (thread_db_load_search): Likewise.
10764 (try_thread_db_load_1): Likewise.
10765 * tracepoint.c (get_jump_space_head): Replace fatal with
10766 internal_error.
10767 (claim_trampoline_space): Likewise.
10768 (have_fast_tracepoint_trampoline_buffer): Likewise.
10769 (cmd_qtstart): Likewise.
10770 (stop_tracing): Likewise.
10771 (fast_tracepoint_collecting): Likewise.
10772 (target_malloc): Likewise.
10773 (download_tracepoint): Likewise.
10774 (download_trace_state_variables): Replace check with gdb_assert.
10775 (upload_fast_traceframes): Replace fatal with internal_error.
10776
10777 2014-08-19 Tom Tromey <tromey@redhat.com>
10778 Gary Benson <gbenson@redhat.com>
10779
10780 * Makefile.in (SFILES): Add common/common-debug.c.
10781 (OBS): Add common-debug.o.
10782 (common-debug.o): New rule.
10783 * debug.h (debug_printf): Don't declare.
10784 * debug.c (debug_printf): Renamed and rewritten as...
10785 (debug_vprintf): New function.
10786
10787 2014-08-19 Gary Benson <gbenson@redhat.com>
10788
10789 * utils.h: Do not include print-utils.h.
10790
10791 2014-08-19 Tom Tromey <tromey@redhat.com>
10792 Gary Benson <gbenson@redhat.com>
10793
10794 * server.h: Add static assertion.
10795 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
10796
10797 2014-08-19 Tom Tromey <tromey@redhat.com>
10798 Gary Benson <gbenson@redhat.com>
10799
10800 * Makefile.in (SFILES): Add common/errors.c.
10801 (OBS): Add errors.o.
10802 (IPA_OBS): Add errors-ipa.o.
10803 (errors.o): New rule.
10804 (errors-ipa.o): Likewise.
10805 * utils.h (perror_with_name, error, warning): Don't declare.
10806 * utils.c (warning): Renamed and rewritten as...
10807 (vwarning): New function.
10808 (error): Renamed and rewritten as...
10809 (verror): New function.
10810 (internal_error): Renamed and rewritten as...
10811 (internal_verror): New function.
10812
10813 2014-08-07 Gary Benson <gbenson@redhat.com>
10814
10815 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
10816 * configure: Regenerate.
10817 * config.in: Likewise.
10818 * server.h: Do not include errno.h.
10819 * event-loop.c: Likewise.
10820 * hostio-errno.c: Likewise.
10821 * linux-low.c: Likewise.
10822 * remote-utils.c: Likewise.
10823 * spu-low.c: Likewise.
10824 * utils.c: Likewise.
10825 * gdbreplay.c: Unconditionally include errno.h.
10826
10827 2014-08-07 Gary Benson <gbenson@redhat.com>
10828
10829 * server.h: Do not include string.h.
10830 * event-loop.c: Likewise.
10831 * linux-low.c: Likewise.
10832 * regcache.c: Likewise.
10833 * remote-utils.c: Likewise.
10834 * spu-low.c: Likewise.
10835 * utils.c: Likewise.
10836
10837 2014-08-07 Gary Benson <gbenson@redhat.com>
10838
10839 * server.h: Do not include gdb_assert.h.
10840
10841 2014-08-07 Gary Benson <gbenson@redhat.com>
10842
10843 * server.h: Do not include common-utils.h.
10844
10845 2014-08-07 Gary Benson <gbenson@redhat.com>
10846
10847 * server.h: Do not include ptid.h.
10848 * notif.h: Likewise.
10849
10850 2014-08-07 Gary Benson <gbenson@redhat.com>
10851
10852 * server.h: Do not include gdb_locale.h.
10853
10854 2014-08-07 Gary Benson <gbenson@redhat.com>
10855
10856 * server.h: Do not include gdb/signals.h.
10857 * win32-low.c: Likewise.
10858
10859 2014-08-07 Gary Benson <gbenson@redhat.com>
10860
10861 * server.h: Do not include pathmax.h.
10862
10863 2014-08-07 Gary Benson <gbenson@redhat.com>
10864
10865 * server.h: Do not include libiberty.h.
10866 * linux-bfin-low.c: Likewise.
10867
10868 2014-08-07 Gary Benson <gbenson@redhat.com>
10869
10870 * server.h: Do not include ansidecl.h.
10871
10872 2014-08-07 Gary Benson <gbenson@redhat.com>
10873
10874 * linux-x86-low.c: Do not include stddef.h.
10875 * lynx-ppc-low.c: Likewise.
10876 * tracepoint.c: Likewise.
10877
10878 2014-08-07 Gary Benson <gbenson@redhat.com>
10879
10880 * server.h: Do not include stdarg.h.
10881 * nto-low.c: Likewise.
10882
10883 2014-08-07 Gary Benson <gbenson@redhat.com>
10884
10885 * server.h: Do not include stdlib.h.
10886 * inferiors.c: Likewise.
10887 * linux-low.c: Likewise.
10888 * regcache.c: Likewise.
10889 * spu-low.c: Likewise.
10890 * tracepoint.c: Likewise.
10891 * utils.c: Likewise.
10892
10893 2014-08-07 Gary Benson <gbenson@redhat.com>
10894
10895 * server.h: Do not include stdio.h.
10896 * linux-low.c: Likewise.
10897 * remote-utils.c: Likewise.
10898 * spu-low.c: Likewise.
10899 * utils.c: Likewise.
10900 * wincecompat.c: Likewise.
10901
10902 2014-08-06 Gary Benson <gbenson@redhat.com>
10903
10904 * regcache.c (init_register_cache): Move conditionals inside if.
10905
10906 2014-08-06 Gary Benson <gbenson@redhat.com>
10907
10908 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
10909
10910 2014-07-31 Gary Benson <gbenson@redhat.com>
10911
10912 * ax.h: Do not include server.h.
10913 * gdbthread.h: Likewise.
10914 * lynx-low.h: Likewise.
10915 * notif.h: Likewise.
10916
10917 2014-07-30 Gary Benson <gbenson@redhat.com>
10918
10919 * server.h: Include common-defs.h.
10920 Do not include config.h or build-gnulib-gdbserver/config.h.
10921
10922 2014-07-30 Gary Benson <gbenson@redhat.com>
10923
10924 * hostio-errno.c: Move server.h to top of includes list.
10925 * inferiors.c: Likewise.
10926 * linux-x86-low.c: Likewise.
10927 * notif.c: Include server.h.
10928
10929 2014-07-24 Tom Tromey <tromey@redhat.com>
10930 Gary Benson <gbenson@redhat.com>
10931
10932 * server.h (CORE_ADDR): Now unsigned.
10933
10934 2014-07-16 Pedro Alves <palves@redhat.com>
10935
10936 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
10937
10938 2014-07-15 Pedro Alves <palves@redhat.com>
10939
10940 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
10941 copy.
10942
10943 2014-07-11 Pedro Alves <palves@redhat.com>
10944
10945 * linux-low.c (kill_wait_lwp): New function, based on
10946 kill_one_lwp_callback, but use my_waitpid directly.
10947 (kill_one_lwp_callback, linux_kill): Use it.
10948
10949 2014-06-23 Pedro Alves <palves@redhat.com>
10950
10951 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
10952 before setting DR0..DR3.
10953
10954 2014-06-20 Gary Benson <gbenson@redhat.com>
10955
10956 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
10957 * configure: Regenerated.
10958 * config.in: Likewise.
10959
10960 2014-06-20 Gary Benson <gbenson@redhat.com>
10961
10962 * Makefile.in (SFILES): Update locations for files moved
10963 from common to nat.
10964 (object file files): Reordered.
10965
10966 2014-06-20 Gary Benson <gbenson@redhat.com>
10967
10968 * i386-low.h (i386_dr_low_can_set_addr): Removed.
10969 (i386_dr_low_set_addr): Likewise.
10970 (i386_dr_low_get_addr): Likewise.
10971 (i386_dr_low_can_set_control): Likewise.
10972 (i386_dr_low_set_control): Likewise.
10973 (i386_dr_low_get_control): Likewise.
10974 (i386_dr_low_get_status): Likewise.
10975 (i386_get_debug_register_length): Likewise.
10976 * linux-x86-low.c (i386_dr_low_set_addr):
10977 Changed signature. Made static.
10978 (i386_dr_low_get_addr): Likewise.
10979 (i386_dr_low_set_control): Likewise.
10980 (i386_dr_low_get_control): Likewise.
10981 (i386_dr_low_get_status): Likewise.
10982 (i386_dr_low): New global variable.
10983 * win32-i386-low.c (i386_dr_low_set_addr):
10984 Changed signature. Made static.
10985 (i386_dr_low_get_addr): Likewise.
10986 (i386_dr_low_set_control): Likewise.
10987 (i386_dr_low_get_control): Likewise.
10988 (i386_dr_low_get_status): Likewise.
10989 (i386_dr_low): New global variable.
10990
10991 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
10992
10993 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
10994 * Makefile.in (AR, AR_FLAGS): Define.
10995 * configure: Regenerate.
10996
10997 2014-06-19 Gary Benson <gbenson@redhat.com>
10998
10999 * Makefile.in (i386-dregs.o): New rule.
11000 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
11001 * i386-low.c (target.h): Remove include.
11002 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
11003 (DR_CONTROL_SHIFT): Likewise.
11004 (DR_CONTROL_SIZE): Likewise.
11005 (DR_RW_EXECUTE): Likewise.
11006 (DR_RW_WRITE): Likewise.
11007 (DR_RW_READ): Likewise.
11008 (DR_RW_IORW): Likewise.
11009 (DR_LEN_1): Likewise.
11010 (DR_LEN_2): Likewise.
11011 (DR_LEN_4): Likewise.
11012 (DR_LEN_8): Likewise.
11013 (DR_LOCAL_ENABLE_SHIFT): Likewise.
11014 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
11015 (DR_ENABLE_SIZE): Likewise.
11016 (DR_LOCAL_SLOWDOWN): Likewise.
11017 (DR_GLOBAL_SLOWDOWN): Likewise.
11018 (DR_CONTROL_RESERVED): Likewise.
11019 (I386_DR_CONTROL_MASK): Likewise.
11020 (I386_DR_VACANT): Likewise.
11021 (I386_DR_LOCAL_ENABLE): Likewise.
11022 (I386_DR_GLOBAL_ENABLE): Likewise.
11023 (I386_DR_DISABLE): Likewise.
11024 (I386_DR_SET_RW_LEN): Likewise.
11025 (I386_DR_GET_RW_LEN): Likewise.
11026 (I386_DR_WATCH_HIT): Likewise.
11027 (i386_wp_op_t): Likewise.
11028 (i386_show_dr): Likewise.
11029 (i386_length_and_rw_bits): Likewise.
11030 (i386_insert_aligned_watchpoint): Likewise.
11031 (i386_remove_aligned_watchpoint): Likewise.
11032 (i386_handle_nonaligned_watchpoint): Likewise.
11033 i386_update_inferior_debug_regs(): Likewise.
11034 (i386_dr_insert_watchpoint): Likewise.
11035 (i386_dr_remove_watchpoint): Likewise.
11036 (i386_dr_region_ok_for_watchpoint): Likewise.
11037 (i386_dr_stopped_data_address): Likewise.
11038 (i386_dr_stopped_by_watchpoint): Likewise.
11039
11040 2014-06-19 Gary Benson <gbenson@redhat.com>
11041
11042 * i386-low.c (i386_dr_show): Renamed to
11043 i386_show_dr and made static. All uses updated.
11044 (i386_dr_length_and_rw_bits): Renamed to
11045 i386_length_and_rw_bits and made static.
11046 All uses updated.
11047 (i386_dr_insert_aligned_watchpoint): Renamed to
11048 i386_insert_aligned_watchpoint and made static.
11049 All uses updated.
11050 (i386_dr_remove_aligned_watchpoint): Renamed to
11051 i386_remove_aligned_watchpoint and made static.
11052 All uses updated.
11053 (i386_dr_update_inferior_debug_regs): Renamed to
11054 i386_update_inferior_debug_regs and made static.
11055 All uses updated.
11056
11057 2014-06-18 Gary Benson <gbenson@redhat.com>
11058
11059 * i386-low.h (i386_dr_low_can_set_addr): New macro.
11060 (i386_dr_low_can_set_control): Likewise.
11061 (i386_get_debug_register_length): Likewise.
11062 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
11063 (i386_dr_low_can_set_control): Likewise.
11064 (i386_get_debug_register_length): Likewise.
11065
11066 2014-06-17 Gary Benson <gbenson@redhat.com>
11067
11068 * i386-low.h (i386-dregs.h): New include.
11069 (DR_FIRSTADDR): Now in i386-dregs.h.
11070 (DR_LASTADDR): Likewise.
11071 (DR_NADDR): Likewise.
11072 (DR_STATUS): Likewise.
11073 (DR_CONTROL): Likewise.
11074 (i386_debug_reg_state): Likewise.
11075 (i386_dr_insert_watchpoint): Likewise.
11076 (i386_dr_remove_watchpoint): Likewise.
11077 (i386_dr_region_ok_for_watchpoint): Likewise.
11078 (i386_dr_stopped_data_address): Likewise.
11079 (i386_dr_stopped_by_watchpoint): Likewise.
11080 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
11081
11082 2014-06-18 Gary Benson <gbenson@redhat.com>
11083
11084 * i386-low.h (i386_low_insert_watchpoint): Renamed to
11085 i386_dr_insert_watchpoint.
11086 (i386_low_remove_watchpoint): Renamed to
11087 i386_dr_remove_watchpoint.
11088 (i386_low_region_ok_for_watchpoint): Renamed to
11089 i386_dr_region_ok_for_watchpoint.
11090 (i386_low_stopped_data_address): Renamed to
11091 i386_dr_stopped_data_address.
11092 (i386_low_stopped_by_watchpoint): Renamed to
11093 i386_dr_stopped_by_watchpoint.
11094 * i386-low.c (i386_show_dr): Renamed to
11095 i386_dr_show and made nonstatic. All uses updated.
11096 (i386_length_and_rw_bits): Renamed to
11097 i386_dr_length_and_rw_bits and made nonstatic.
11098 All uses updated.
11099 (i386_insert_aligned_watchpoint): Renamed to
11100 i386_dr_insert_aligned_watchpoint and made nonstatic.
11101 All uses updated.
11102 (i386_remove_aligned_watchpoint): Renamed to
11103 i386_dr_remove_aligned_watchpoint and made nonstatic.
11104 All uses updated.
11105 (i386_update_inferior_debug_regs): Renamed to
11106 i386_dr_update_inferior_debug_regs and made nonstatic.
11107 All uses updated.
11108 (i386_low_insert_watchpoint): Renamed to
11109 i386_dr_insert_watchpoint. All uses updated.
11110 (i386_low_remove_watchpoint): Renamed to
11111 i386_dr_remove_watchpoint. All uses updated.
11112 (i386_low_region_ok_for_watchpoint): Renamed to
11113 i386_dr_region_ok_for_watchpoint. All uses updated.
11114 (i386_low_stopped_data_address): Renamed to
11115 i386_dr_stopped_data_address. All uses updated.
11116 (i386_low_stopped_by_watchpoint): Renamed to
11117 i386_dr_stopped_by_watchpoint. All uses updated.
11118
11119 2014-06-18 Gary Benson <gbenson@redhat.com>
11120
11121 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11122 (i386_dr_low_can_set_control): Likewise.
11123 (i386_insert_aligned_watchpoint): New check.
11124
11125 2014-06-18 Gary Benson <gbenson@redhat.com>
11126
11127 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11128 Renamed to state.
11129
11130 2014-06-18 Gary Benson <gbenson@redhat.com>
11131
11132 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11133 instead of fatal and error.
11134 (i386_handle_nonaligned_watchpoint): Likewise.
11135
11136 2014-06-18 Gary Benson <gbenson@redhat.com>
11137
11138 * i386-low.c (i386_get_debug_register_length): New macro.
11139 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11140 (i386_show_dr): Use debug_printf instead of fprintf. Use
11141 phex to format values.
11142
11143 2014-06-18 Gary Benson <gbenson@redhat.com>
11144
11145 * i386-low.h: Comment changes.
11146 * i386-low.c: Likewise.
11147
11148 2014-06-18 Gary Benson <gbenson@redhat.com>
11149
11150 * i386-low.c: Whitespace changes.
11151
11152 2014-06-12 Tom Tromey <tromey@redhat.com>
11153
11154 * utils.c (freeargv): Remove.
11155
11156 2014-06-12 Tom Tromey <tromey@redhat.com>
11157
11158 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11159 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11160 (parse_debug_format_options): Likewise.
11161 (gdbserver_usage): Likewise.
11162 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11163 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11164 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11165 against libiberty.
11166 ($(LIBGNU)): Depend on libiberty.
11167 (all-lib): Recurse into all subdirs.
11168 (install-only): Invoke "install" target in subdirs.
11169 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11170 targets.
11171 * configure: Rebuild.
11172 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11173 for vasprintf, vsnprintf, or gettimeofday.
11174 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11175 srv_tgtobj.
11176
11177 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11178
11179 * development.sh: Delete.
11180 * Makefile.in (config.status): Adjust dependency on development.sh.
11181 * configure.ac: Adjust development.sh source call.
11182 * configure: Regenerate.
11183
11184 2014-06-02 Pedro Alves <palves@redhat.com>
11185
11186 * ax.c (gdb_free_agent_expr): New function.
11187 * ax.h (gdb_free_agent_expr): New declaration.
11188 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11189 list.
11190 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11191 static.
11192 (clear_breakpoint_conditions_and_commands): New function.
11193 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11194 (clear_breakpoint_conditions_and_commands): New declaration.
11195
11196 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11197
11198 * linux-aarch64-low.c (asm/ptrace.h): Include.
11199
11200 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11201
11202 Fix TLS access for -static -pthread.
11203 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11204 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11205 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11206
11207 2014-05-20 Pedro Alves <palves@redhat.com>
11208
11209 * linux-aarch64-low.c (aarch64_insert_point)
11210 (aarch64_remove_point): No longer check whether the type is
11211 supported here. Adjust to new interface.
11212 (the_low_target): Install aarch64_supports_z_point_type as
11213 supports_z_point_type method.
11214 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11215 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11216 instead of a Z packet char. Adjust.
11217 (arm_supports_z_point_type): New function.
11218 (arm_insert_point, arm_remove_point): Adjust to new interface.
11219 (the_low_target): Install arm_supports_z_point_type.
11220 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11221 (cris_insert_point, cris_remove_point): Adjust to new interface.
11222 Don't check whether the type is supported here.
11223 (the_low_target): Install cris_supports_z_point_type.
11224 * linux-low.c (linux_supports_z_point_type): New function.
11225 (linux_insert_point, linux_remove_point): Adjust to new interface.
11226 * linux-low.h (struct linux_target_ops) <insert_point,
11227 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11228 raw_breakpoint pointer parameter.
11229 <supports_z_point_type>: New method.
11230 * linux-mips-low.c (mips_supports_z_point_type): New function.
11231 (mips_insert_point, mips_remove_point): Adjust to new interface.
11232 Use mips_supports_z_point_type.
11233 (the_low_target): Install mips_supports_z_point_type.
11234 * linux-ppc-low.c (the_low_target): Install NULL as
11235 supports_z_point_type method.
11236 * linux-s390-low.c (the_low_target): Install NULL as
11237 supports_z_point_type method.
11238 * linux-sparc-low.c (the_low_target): Install NULL as
11239 supports_z_point_type method.
11240 * linux-x86-low.c (x86_supports_z_point_type): New function.
11241 (x86_insert_point): Adjust to new insert_point interface. Use
11242 insert_memory_breakpoint. Adjust to new
11243 i386_low_insert_watchpoint interface.
11244 (x86_remove_point): Adjust to remove_point interface. Use
11245 remove_memory_breakpoint. Adjust to new
11246 i386_low_remove_watchpoint interface.
11247 (the_low_target): Install x86_supports_z_point_type.
11248 * lynx-low.c (lynx_target_ops): Install NULL as
11249 supports_z_point_type callback.
11250 * nto-low.c (nto_supports_z_point_type): New.
11251 (nto_insert_point, nto_remove_point): Adjust to new interface.
11252 (nto_target_ops): Install nto_supports_z_point_type.
11253 * mem-break.c: Adjust intro comment.
11254 (struct raw_breakpoint) <raw_type, size>: New fields.
11255 <inserted>: Update comment.
11256 <shlib_disabled>: Delete field.
11257 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11258 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11259 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11260 (raw_bkpt_type_to_target_hw_bp_type): New function.
11261 (find_enabled_raw_code_breakpoint_at): New function.
11262 (find_raw_breakpoint_at): New type and size parameters. Use them.
11263 (insert_memory_breakpoint): New function, based off
11264 set_raw_breakpoint_at.
11265 (remove_memory_breakpoint): New function.
11266 (set_raw_breakpoint_at): Reimplement.
11267 (set_breakpoint): New, based on set_breakpoint_at.
11268 (set_breakpoint_at): Reimplement.
11269 (delete_raw_breakpoint): Go through the_target->remove_point
11270 instead of assuming memory breakpoints.
11271 (find_gdb_breakpoint_at): Delete.
11272 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11273 (find_gdb_breakpoint): New function.
11274 (set_gdb_breakpoint_at): Delete.
11275 (z_type_supported): New function.
11276 (set_gdb_breakpoint_1): New function, loosely based off
11277 set_gdb_breakpoint_at.
11278 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11279 (delete_gdb_breakpoint_at): Delete.
11280 (delete_gdb_breakpoint_1): New function, loosely based off
11281 delete_gdb_breakpoint_at.
11282 (delete_gdb_breakpoint): New function.
11283 (clear_gdb_breakpoint_conditions): Rename to ...
11284 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11285 breakpoint.
11286 (add_condition_to_breakpoint): Make static.
11287 (add_breakpoint_condition): Take a struct breakpoint pointer
11288 instead of an address. Adjust.
11289 (gdb_condition_true_at_breakpoint): Rename to ...
11290 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11291 z_type parameter.
11292 (gdb_condition_true_at_breakpoint): Reimplement.
11293 (add_breakpoint_commands): Take a struct breakpoint pointer
11294 instead of an address. Adjust.
11295 (gdb_no_commands_at_breakpoint): Rename to ...
11296 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11297 parameter. Return true if no breakpoint was found. Change debug
11298 output.
11299 (gdb_no_commands_at_breakpoint): Reimplement.
11300 (run_breakpoint_commands): Rename to ...
11301 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11302 and change return type to boolean.
11303 (run_breakpoint_commands): New function.
11304 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11305 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11306 breakpoint. Go through the_target->remove_point instead of
11307 assuming memory breakpoint.
11308 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11309 software and hardware breakpoints.
11310 (reinsert_raw_breakpoint): Go through the_target->insert_point
11311 instead of assuming memory breakpoint.
11312 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11313 software and hardware breakpoints.
11314 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11315 Check both software and hardware breakpoints.
11316 (validate_inserted_breakpoint): Assert the breakpoint is a
11317 software breakpoint. Set the inserted flag to -1 instead of
11318 setting shlib_disabled.
11319 (delete_disabled_breakpoints): Adjust.
11320 (validate_breakpoints): Only validate software breakpoints.
11321 Adjust to inserted flag change.
11322 (check_mem_read, check_mem_write): Skip breakpoint types other
11323 than software breakpoints. Adjust to inserted flag change.
11324 * mem-break.h (enum raw_bkpt_type): New enum.
11325 (raw_breakpoint, struct process_info): Forward declare.
11326 (Z_packet_to_target_hw_bp_type): Delete declaration.
11327 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11328 (set_gdb_breakpoint, delete_gdb_breakpoint)
11329 (clear_breakpoint_conditions): New declarations.
11330 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11331 (breakpoint_inserted_here): Update comment.
11332 (add_breakpoint_condition, add_breakpoint_commands): Replace
11333 address parameter with a breakpoint pointer parameter.
11334 (gdb_breakpoint_here): Update comment.
11335 (delete_gdb_breakpoint_at): Delete.
11336 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11337 * server.c (process_point_options): Take a struct breakpoint
11338 pointer instead of an address. Adjust.
11339 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11340 delete_gdb_breakpoint.
11341 * spu-low.c (spu_target_ops): Install NULL as
11342 supports_z_point_type method.
11343 * target.h: Include mem-break.h.
11344 (struct target_ops) <prepare_to_access_memory>: Update comment.
11345 <supports_z_point_type>: New field.
11346 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11347 instead of a char. Also take a raw breakpoint pointer.
11348 * win32-arm-low.c (the_low_target): Install NULL as
11349 supports_z_point_type.
11350 * win32-i386-low.c (i386_supports_z_point_type): New function.
11351 (i386_insert_point, i386_remove_point): Adjust to new interface.
11352 (the_low_target): Install i386_supports_z_point_type.
11353 * win32-low.c (win32_supports_z_point_type): New function.
11354 (win32_insert_point, win32_remove_point): Adjust to new interface.
11355 (win32_target_ops): Install win32_supports_z_point_type.
11356 * win32-low.h (struct win32_target_ops):
11357 <supports_z_point_type>: New method.
11358 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11359 instead of a char. Also take a raw breakpoint pointer.
11360
11361 2014-05-20 Pedro Alves <palves@redhat.com>
11362
11363 * mem-break.h: Include break-common.h.
11364 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11365 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11366 (Z_packet_to_target_hw_bp_type): New declaration.
11367 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11368 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11369 (Z_PACKET_ACCESS_WP): Delete macros.
11370 (Z_packet_to_hw_type): Delete function.
11371 * i386-low.h: Don't include break-common.h here.
11372 (Z_packet_to_hw_type): Delete declaration.
11373 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11374 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11375 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11376 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11377 * linux-aarch64-low.c: Don't include break-common.h here.
11378 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11379 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11380 (Z_packet_to_target_hw_bp_type): Delete function.
11381 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11382 function.
11383 (mips_insert_point, mips_remove_point): Use
11384 Z_packet_to_target_hw_bp_type.
11385
11386 2014-05-20 Pedro Alves <palves@redhat.com>
11387
11388 * linux-aarch64-low.c: Include break-common.h.
11389 (enum target_point_type): Delete.
11390 (Z_packet_to_point_type): Rename to ...
11391 (Z_packet_to_target_hw_bp_type): ... this, and return a
11392 target_hw_bp_type instead.
11393 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11394 instead of an enum target_point_type.
11395 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11396 breakpoint type.
11397 (aarch64_dr_state_insert_one_point)
11398 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11399 (aarch64_handle_aligned_watchpoint)
11400 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11401 Take an enum target_hw_bp_type instead of an enum
11402 target_point_type.
11403 (aarch64_supports_z_point_type): New function.
11404 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11405 use Z_packet_to_target_hw_bp_type.
11406
11407 2014-05-20 Joel Brobecker <brobecker@adacore.com>
11408
11409 * configure.ac: Only use -Werror by default when DEVELOPMENT
11410 is true.
11411 * configure: Regenerate.
11412
11413 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11414
11415 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11416 * linux-x86-low.c (X86_64_USER_REGS): New.
11417 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11418
11419 2014-04-28 Yao Qi <yao@codesourcery.com>
11420
11421 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11422 name.
11423
11424 2014-04-25 Pedro Alves <palves@redhat.com>
11425
11426 PR server/16255
11427 * linux-low.c (linux_attach_fail_reason_string): New function.
11428 (linux_attach_lwp): Delete.
11429 (linux_attach_lwp_1): Rename to ...
11430 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11431 argument. Remove "initial" parameter. Return int instead of
11432 void. Don't error or warn here.
11433 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11434 failure to attach to the tgid. Call warning when failing to
11435 attach to an lwp.
11436 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11437 argument. Remove "initial" parameter. Return int instead of
11438 void. Don't error or warn here.
11439 (linux_attach_fail_reason_string): New declaration.
11440 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11441 interface change. Use linux_attach_fail_reason_string.
11442
11443 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
11444 Walfred Tedeschi <walfred.tedeschi@intel.com>
11445
11446 * Makefile.in: Added rules to handle new files
11447 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11448 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11449 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11450 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11451 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11452 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11453 x32-avx512-linux.o.
11454 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11455 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11456 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11457 i386/x32-avx512.xml.
11458 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11459 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11460 i386/x32-avx512-linux.xml.
11461 * i387-fp.c (num_avx512_k_registers): New constant for number
11462 of K registers.
11463 (num_avx512_zmmh_low_registers): New constant for number of
11464 lower ZMM registers (0-15).
11465 (num_avx512_zmmh_high_registers): New constant for number of
11466 higher ZMM registers (16-31).
11467 (num_avx512_ymmh_registers): New contant for number of higher
11468 YMM registers (ymm16-31 added by avx521 on x86_64).
11469 (num_avx512_xmm_registers): New constant for number of higher
11470 XMM registers (xmm16-31 added by AVX512 on x86_64).
11471 (struct i387_xsave): Add space for AVX512 registers.
11472 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11473 Add code to handle AVX512 registers.
11474 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11475 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11476 prototypei from generated file.
11477 (tdesc_amd64_avx512_linux): Likewise.
11478 (init_registers_x32_avx512_linux): Likewise.
11479 (tdesc_x32_avx512_linux): Likewise.
11480 (init_registers_i386_avx512_linux): Likewise.
11481 (tdesc_i386_avx512_linux): Likewise.
11482 (x86_64_regmap): Add AVX512 registers.
11483 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11484 mask.
11485 (initialize_low_arch): Add code to initialize AVX512 registers.
11486
11487 2014-04-23 Pedro Alves <palves@redhat.com>
11488
11489 * mem-break.c (find_gdb_breakpoint_at): Make static.
11490 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11491
11492 2014-04-23 Pedro Alves <palves@redhat.com>
11493
11494 * i386-low.c: Don't include break-common.h here.
11495 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11496 prototype to take target_hw_bp_type as argument instead of a Z
11497 packet char.
11498 * i386-low.h: Include break-common.h here.
11499 (Z_packet_to_hw_type): Declare.
11500 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11501 prototypes.
11502 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11503 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11504 (x86_remove_point): Convert the packet number to a
11505 target_hw_bp_type before calling i386_low_remove_watchpoint.
11506 * win32-i386-low.c (i386_insert_point): Convert the packet number
11507 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11508 (i386_remove_point): Convert the packet number to a
11509 target_hw_bp_type before calling i386_low_remove_watchpoint.
11510
11511 2014-04-23 Pedro Alves <palves@redhat.com>
11512
11513 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11514
11515 2014-04-10 Pedro Alves <palves@redhat.com>
11516
11517 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11518 Check if the condition or command is NULL before checking if the
11519 breakpoint is known. On success, return true.
11520 * mem-break.h (add_breakpoint_condition): Document return.
11521 (add_breakpoint_commands): Add describing comment.
11522 * server.c (skip_to_semicolon): New function.
11523 (process_point_options): Use it.
11524
11525 2014-04-09 Pedro Alves <palves@redhat.com>
11526
11527 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11528 to lwpid_of.
11529
11530 2014-02-27 Pedro Alves <palves@redhat.com>
11531
11532 PR 12702
11533 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11534 macros.
11535 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11536 output.
11537 (last_thread_of_process_p): Take a PID argument instead of a
11538 thread pointer.
11539 (linux_wait_for_lwp): Delete.
11540 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11541 functions.
11542 (linux_low_filter_event): New function, party factored out from
11543 linux_wait_for_event.
11544 (linux_wait_for_event): Rename to ...
11545 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11546 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11547 sigsuspend. Check for zombie leaders.
11548 (linux_wait_for_event): Reimplement as wrapper around
11549 linux_wait_for_event_filtered.
11550 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11551 a normal or signal exit is seen, it's the whole process exiting.
11552 (wait_for_sigstop): No longer a for_each_inferior callback.
11553 Rewrite on top of linux_wait_for_event_filtered.
11554 (stop_all_lwps): Call wait_for_sigstop directly.
11555 * server.c (resume, handle_target_event): Handle
11556 TARGET_WAITKIND_NO_RESUMED.
11557
11558 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11559
11560 * win32-low.c (psapi_get_dll_name,
11561 * win32_CreateToolhelp32Snapshot): Delete.
11562 (win32_CreateToolhelp32Snapshot, win32_Module32First)
11563 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
11564 Delete.
11565 (handle_load_dll): Add function description.
11566 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
11567
11568 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11569
11570 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
11571 Add comment.
11572 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
11573 base address when calling win32_add_one_solib.
11574 (handle_load_dll): Delete local variable load_addr.
11575 Remove 0x1000 offset applied to DLL base address when calling
11576 win32_add_one_solib.
11577 (handle_unload_dll): Add comment.
11578
11579 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11580
11581 * win32-low.c (win32_add_all_dlls): Renames
11582 win32_ensure_ntdll_loaded. Rewrite function documentation.
11583 Adjust implementation to always load all DLLs.
11584 Add 0x1000 offset to DLL base address when calling
11585 win32_add_one_solib.
11586 (child_initialization_done): New static global.
11587 (do_initial_child_stuff): Set child_initialization_done to
11588 zero during child initialization, and 1 after. Replace call
11589 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
11590 Add comment.
11591 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
11592 (handle_unload_dll): Add function documentation.
11593 (get_child_debug_event): Ignore load and unload DLL events
11594 during child initialization.
11595
11596 2014-02-20 Doug Evans <dje@google.com>
11597
11598 Remove global all_lwps.
11599 * inferiors.h (ptid_of): Move here from linux-low.h.
11600 (pid_of, lwpid_of): Ditto.
11601 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
11602 parameter is a struct thread_info * now.
11603 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
11604 directly. Pass &all_threads to find_inferior instead of &all_lwps.
11605 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
11606 directly.
11607 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
11608 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
11609 * linux-arm-low.c (update_registers_callback): Update, "entry"
11610 parameter is a struct thread_info * now.
11611 Fetch lwpid from current_inferior directly.
11612 (arm_insert_point): Pass &all_threads to find_inferior instead of
11613 &all_lwps.
11614 (arm_remove_point): Ditto.
11615 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
11616 (arm_prepare_to_resume): Fetch pid from thread.
11617 (arm_read_description): Fetch lwpid from current_inferior directly.
11618 * linux-low.c (all_lwps): Delete.
11619 (delete_lwp): Delete call to remove_inferior.
11620 (handle_extended_wait): Fetch lwpid from thread.
11621 (add_lwp): Don't set lwp->entry.id. Remove call to
11622 add_inferior_to_list.
11623 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
11624 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
11625 (kill_one_lwp_callback): Ditto.
11626 (linux_kill): Don't dereference NULL pointer.
11627 Fetch ptid,lwpid from thread.
11628 (get_detach_signal): Fetch ptid from thread.
11629 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
11630 Simplify call to regcache_invalidate_thread.
11631 (delete_lwp_callback): Update, "entry" parameter is a
11632 struct thread_info * now. Fetch pid from thread.
11633 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
11634 (status_pending_p_callback): Update, "entry" parameter is a
11635 struct thread_info * now. Fetch ptid from thread.
11636 (find_lwp_pid): Update, "entry" parameter is a
11637 struct thread_info * now.
11638 (linux_wait_for_lwp): Fetch pid from thread.
11639 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
11640 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
11641 (enqueue_one_deferred_signal): Fetch lwpid from thread.
11642 (dequeue_one_deferred_signal): Ditto.
11643 (cancel_breakpoint): Fetch ptid from current_inferior.
11644 (linux_wait_for_event): Pass &all_threads to find_inferior,
11645 not &all_lwps. Fetch ptid, lwpid from thread.
11646 (count_events_callback): Update, "entry" parameter is a
11647 struct thread_info * now.
11648 (select_singlestep_lwp_callback): Ditto.
11649 (select_event_lwp_callback): Ditto.
11650 (cancel_breakpoints_callback): Ditto.
11651 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
11652 not &all_lwps.
11653 (select_event_lwp): Ditto. Fetch ptid from event_thread.
11654 (unsuspend_one_lwp): Update, "entry" parameter is a
11655 struct thread_info * now.
11656 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
11657 not &all_lwps.
11658 (linux_stabilize_threads): Ditto. And for for_each_inferior.
11659 Fetch lwpid from thread, not lwp.
11660 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
11661 Pass &all_threads to find_inferior, not &all_lwps.
11662 (send_sigstop): Fetch lwpid from thread, not lwp.
11663 (send_sigstop_callback): Update, "entry" parameter is a
11664 struct thread_info * now.
11665 (suspend_and_send_sigstop_callback): Ditto.
11666 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
11667 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
11668 struct thread_info * now.
11669 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
11670 from thread, lwp.
11671 (lwp_running): Update, "entry" parameter is a
11672 struct thread_info * now.
11673 (stop_all_lwps): Fetch ptid from thread.
11674 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
11675 (linux_resume_one_lwp): Fetch lwpid from thread.
11676 (linux_set_resume_request): Update, "entry" parameter is a
11677 struct thread_info * now. Fetch pid, lwpid from thread.
11678 (resume_status_pending_p): Update, "entry" parameter is a
11679 struct thread_info * now.
11680 (need_step_over_p): Ditto. Fetch lwpid from thread.
11681 (start_step_over): Fetch lwpid from thread.
11682 (linux_resume_one_thread): Update, "entry" parameter is a
11683 struct thread_info * now. Fetch lwpid from thread.
11684 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
11685 (proceed_one_lwp): Update, "entry" parameter is a
11686 struct thread_info * now. Fetch lwpid from thread.
11687 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
11688 struct thread_info * now.
11689 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
11690 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
11691 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
11692 directly.
11693 (regsets_store_inferior_registers): Ditto.
11694 (fetch_register, store_register): Ditto.
11695 (linux_read_memory, linux_write_memory): Ditto.
11696 (linux_request_interrupt): Ditto.
11697 (linux_read_auxv): Ditto.
11698 (linux_xfer_siginfo): Ditto.
11699 (linux_qxfer_spu): Ditto.
11700 (linux_qxfer_libraries_svr4): Ditto.
11701 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
11702 moved to inferiors.h.
11703 (get_lwp): Delete.
11704 (get_thread_lwp): Update.
11705 (struct lwp_info): Delete member "entry". Simplify comment for
11706 member "thread".
11707 (all_lwps): Delete.
11708 * linux-mips-low.c (mips_read_description): Fetch lwpid from
11709 current_inferior directly.
11710 (update_watch_registers_callback): Update, "entry" parameter is a
11711 struct thread_info * now. Fetch pid from thread.
11712 (mips_linux_prepare_to_resume): Fetch ptid from thread.
11713 (mips_insert_point): Fetch lwpid from current_inferior.
11714 Pass &all_threads to find_inferior, not &all_lwps.
11715 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
11716 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
11717 directly.
11718 (mips_stopped_data_address): Ditto.
11719 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
11720 directly.
11721 * linux-tile-low.c (tile_arch_setup): Ditto.
11722 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
11723 (update_debug_registers_callback): Update, "entry" parameter is a
11724 struct thread_info * now. Fetch pid from thread.
11725 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
11726 Pass &all_threads to find_inferior, not &all_lwps.
11727 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
11728 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
11729 Pass &all_threads to find_inferior, not &all_lwps.
11730 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
11731 (i386_dr_low_get_status): Ditto.
11732 (x86_linux_prepare_to_resume): Fetch ptid from thread.
11733 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
11734 (x86_linux_read_description): Ditto.
11735 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
11736
11737 2014-02-20 Doug Evans <dje@google.com>
11738
11739 * inferiors.c (get_first_inferior): Fix buglet.
11740
11741 2014-02-19 Doug Evans <dje@google.com>
11742
11743 * gdbthread.h (add_thread): Change result type to struct thread_info *.
11744 * inferiors.c (add_thread): Change result type to struct thread_info *.
11745 All callers updated.
11746 (add_lwp): Call add_thread here instead of in callers.
11747 All callers updated.
11748 * linux-low.h (get_lwp_thread): Rewrite.
11749 (struct lwp_info): New member "thread".
11750
11751 2014-02-19 Doug Evans <dje@google.com>
11752
11753 * linux-low.c (add_lwp): Change result to struct lwp_info *.
11754 All callers updated.
11755
11756 2014-02-19 Doug Evans <dje@google.com>
11757
11758 * inferiors.c (add_thread): Fix whitespace.
11759
11760 2014-02-19 Doug Evans <dje@google.com>
11761
11762 * dll.c (clear_dlls): Replace accessing list implemention details
11763 with API function.
11764 * gdbthread.h (get_first_thread): Declare.
11765 * inferiors.c (for_each_inferior_with_data): New function.
11766 (get_first_thread): New function.
11767 (find_thread_ptid): Simplify.
11768 (get_first_inferior): New function.
11769 (clear_list): Delete.
11770 (one_inferior_p): New function.
11771 (clear_inferior_list): New function.
11772 (clear_inferiors): Update.
11773 * inferiors.h (for_each_inferior_with_data): Declare.
11774 (clear_inferior_list): Declare.
11775 (one_inferior_p): Declare.
11776 (get_first_inferior): Declare.
11777 * linux-low.c (linux_wait_for_event): Replace accessing list
11778 implemention details with API function.
11779 * server.c (target_running): Ditto.
11780 (accumulate_file_name_length): New function.
11781 (emit_dll_description): New function.
11782 (handle_qxfer_libraries): Replace accessing list implemention
11783 details with API function.
11784 (handle_qxfer_threads_worker): New function.
11785 (handle_qxfer_threads_proper): Replace accessing list implemention
11786 details with API function.
11787 (handle_query): Ditto.
11788 (visit_actioned_threads_callback_ftype): New typedef.
11789 (visit_actioned_threads_data): New struct.
11790 (visit_actioned_threads): Rewrite to be find_inferior callback.
11791 (resume): Call find_inferior.
11792 (handle_status): Replace accessing list implemention
11793 details with API function.
11794 (process_serial_event): Replace accessing list implemention details
11795 with API function.
11796 * target.c (set_desired_inferior): Replace accessing list implemention
11797 details with API function.
11798 * tracepoint.c (same_process_p): New function.
11799 (gdb_agent_about_to_close): Replace accessing list implemention
11800 details with API function.
11801 * win32-low.c (child_delete_thread): Replace accessing list
11802 implemention details with API function.
11803 (match_dll_by_basename): New function.
11804 (dll_is_loaded_by_basename): New function.
11805 (win32_ensure_ntdll_loaded): Replace accessing list implemention
11806 details call to dll_is_loaded_by_basename.
11807
11808 2014-02-19 Doug Evans <dje@google.com>
11809
11810 * dll.h (struct dll_info): Add comment.
11811 * gdbthread.h (struct thread_info): Add comment.
11812 (current_ptid): Simplify.
11813 * inferiors.c (add_process): Update.
11814 (remove_process): Update.
11815 * inferiors.h (struct process_info): Rename member "head" to "entry".
11816 * linux-low.c (delete_lwp): Update.
11817 (add_lwp): Update.
11818 (last_thread_of_process_p): Update.
11819 (kill_one_lwp_callback, linux_kill): Update.
11820 (status_pending_p_callback): Update.
11821 (wait_for_sigstop): Update. Simplify read of ptid.
11822 (start_step_over): Update.
11823 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
11824 (get_lwp_thread): Update.
11825 (struct lwp_info): Rename member "head" to "entry".
11826 * regcache.h (inferior_list_entry): Delete.
11827 * server.c (kill_inferior_callback): Update.
11828 (detach_or_kill_inferior_callback): Update.
11829 (print_started_pid): Update.
11830 (print_attached_pid): Update.
11831 (process_serial_event): Simplify read of ptid.
11832 * thread-db.c (thread_db_create_event): Update.
11833 (thread_db_get_tls_address): Update.
11834 * win32-low.c (current_inferior_ptid): Simplify.
11835
11836 2014-02-19 Tom Tromey <tromey@redhat.com>
11837
11838 * target.h (struct target_ops) <supports_btrace>: Add target_ops
11839 argument.
11840 (target_supports_btrace): Update.
11841
11842 2014-02-14 Yao Qi <yao@codesourcery.com>
11843
11844 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
11845 (rsp-low-ipa.o): New target.
11846
11847 2014-02-12 Tom Tromey <tromey@redhat.com>
11848
11849 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
11850 convert_ascii_to_int.
11851 * regcache.c (registers_to_string): Likewise.
11852 * remote-utils.c (decode_M_packet): Likewise.
11853 * server.c (process_serial_event): Likewise.
11854
11855 2014-02-12 Tom Tromey <tromey@redhat.com>
11856
11857 * server.c (handle_query, handle_v_run): Use hex2bin, not
11858 unhexify.
11859 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
11860
11861 2014-02-12 Tom Tromey <tromey@redhat.com>
11862
11863 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
11864 convert_int_to_ascii.
11865 * regcache.c (registers_to_string, collect_register_as_string):
11866 Likewise.
11867 * remote-utils.c (look_up_one_symbol, relocate_instruction):
11868 Likewise.
11869 * server.c (process_serial_event): Likewise.
11870 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
11871 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
11872
11873 2014-02-12 Tom Tromey <tromey@redhat.com>
11874
11875 * remote-utils.c (look_up_one_symbol, monitor_output): Use
11876 bin2hex, not hexify.
11877 * tracepoint.c (cmd_qtstatus): Likewise.
11878
11879 2014-02-12 Tom Tromey <tromey@redhat.com>
11880
11881 * remote-utils.c (monitor_output): Pass explicit length to
11882 hexify.
11883
11884 2014-02-12 Tom Tromey <tromey@redhat.com>
11885
11886 * tracepoint.c: Include rsp-low.h.
11887 * server.c: Include rsp-low.h.
11888 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
11889 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
11890 declare.
11891 * remote-utils.c: Include rsp-low.h.
11892 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
11893 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
11894 (convert_int_to_ascii, convert_ascii_to_int): Move to
11895 common/rsp-low.c.
11896 * regcache.c: Include rsp-low.h.
11897 * ax.c: Include rsp-low.h.
11898 * Makefile.in (SFILES): Add common/rsp-low.c.
11899 (OBS): Add rsp-low.o.
11900 (rsp-low.o): New target.
11901
11902 2014-02-12 Tom Tromey <tromey@redhat.com>
11903
11904 * utils.h (pulongest, plongest, phex_nz): Don't declare.
11905 Include print-utils.h.
11906 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
11907 (plongest, thirty_two, phex_nz): Remove.
11908 * Makefile.in (SFILES): Add common/print-utils.c.
11909 (OBS): Add print-utils.o.
11910 (print-utils-ipa.o): New target.
11911 (print-utils.o): New target.
11912 (IPA_OBJS): Add print-utils-ipa.o.
11913
11914 2014-02-06 Tom Tromey <tromey@redhat.com>
11915
11916 * Makefile.in (SFILES): Fix indentation.
11917
11918 2014-02-05 Doug Evans <dje@google.com>
11919
11920 * linux-low.c (linux_wait_for_event): Improve comment.
11921 (linux_wait_1): Keep current_inferior in sync with event_child.
11922
11923 2014-01-22 Doug Evans <dje@google.com>
11924
11925 * gdbthread.h (gdb_id_to_thread): Delete, unused.
11926
11927 2014-01-22 Doug Evans <dje@google.com>
11928
11929 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
11930 * configure: Regenerate.
11931 * config.in: Regenerate.
11932 * Makefile.in (SFILES): Add debug.c.
11933 (OBS): Add debug.o.
11934 * debug.c: New file.
11935 * debug.h: New file.
11936 * linux-aarch64-low.c (*): Update all debugging printfs to use
11937 debug_printf instead of fprintf.
11938 * linux-arm-low.c (*): Ditto.
11939 * linux-cris-low.c (*): Ditto.
11940 * linux-crisv32-low.c (*): Ditto.
11941 * linux-m32r-low.c (*): Ditto.
11942 * linux-sparc-low.c (*): Ditto.
11943 * linux-x86.c (*): Ditto.
11944 * linux-low.c (*): Ditto.
11945 (linux_wait_1): Add calls to debug_enter, debug_exit.
11946 (linux_wait): Remove redundant debugging printf.
11947 (stop_all_lwps): Add calls to debug_enter, debug_exit.
11948 (linux_resume, unstop_all_lwps): Ditto.
11949 * mem-break.c (*): Update all debugging printfs to use
11950 debug_printf instead of fprintf.
11951 * remote-utils.c (*): Ditto.
11952 * thread-db.c (*): Ditto.
11953 * server.c #include <ctype.h>, "gdb_vecs.h".
11954 (debug_threads): Moved to debug.c.
11955 (*): Update all debugging printfs to use debug_printf instead of
11956 fprintf.
11957 (start_inferior): Replace call to fflush with call to debug_flush.
11958 (monitor_show_help): Mention set debug-format.
11959 (parse_debug_format_options): New function.
11960 (handle_monitor_command): Handle "monitor set debug-format".
11961 (gdbserver_usage): Mention --debug-format.
11962 (main): Parse --debug-format.
11963 * server.h (debug_threads): Declaration moved to debug.h.
11964 #include "debug.h".
11965 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
11966 trace_debug_1 that uses debug_printf.
11967 (tracepoint_look_up_symbols): Update all debugging printfs to use
11968 debug_printf instead of fprintf.
11969
11970 2014-01-20 Baruch Siach <baruch@tkos.co.il>
11971
11972 * linux-xtensa-low.c: Include asm/ptrace.h instead of
11973 sys/ptrace.h.
11974
11975 2014-01-17 Pedro Alves <palves@redhat.com>
11976
11977 PR build/16445
11978 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
11979 defined after including gdb_proc_service.h.
11980
11981 2014-01-16 Doug Evans <dje@google.com>
11982
11983 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
11984 (match_dll): Use it.
11985
11986 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
11987
11988 * target.h (target_ops) <read_btrace>: Change parameters and
11989 return type to allow error reporting.
11990 * server.c (handle_qxfer_btrace): Support delta reads. Pass
11991 trace reading errors on.
11992 * linux-low.c (linux_low_read_btrace): Pass trace reading
11993 errors on.
11994 (linux_low_disable_btrace): New.
11995
11996 2014-01-15 Doug Evans <dje@google.com>
11997
11998 * inferiors.c (thread_id_to_gdb_id): Delete.
11999 * inferiors.h (thread_id_to_gdb_id): Delete.
12000
12001 2014-01-13 Eli Zaretskii <eliz@gnu.org>
12002
12003 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
12004 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
12005 versions.
12006
12007 2014-01-08 Pedro Alves <palves@redhat.com>
12008
12009 * server.c (handle_status): Don't discard previous queued stop
12010 replies or thread's pending status here.
12011 (main) <disconnection>: Do it here instead.
12012
12013 2014-01-08 Pedro Alves <palves@redhat.com>
12014
12015 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
12016 * server.c (visit_actioned_threads, handle_pending_status): New
12017 function.
12018 (handle_v_cont): Factor out parts to ...
12019 (resume): ... this new function. If in all-stop, and a thread
12020 being resumed has a pending status, report it without actually
12021 resuming.
12022 (myresume): Adjust to use the new 'resume' function.
12023 (clear_pending_status_callback, set_pending_status_callback)
12024 (find_status_pending_thread_callback): New functions.
12025 (handle_status): Handle the case of multiple threads having
12026 interesting statuses to report. Report threads' real last signal
12027 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
12028 with an interesting thread to report the status for, instead of
12029 always reporting the status of the first thread.
12030
12031 2014-01-01 Joel Brobecker <brobecker@adacore.com>
12032
12033 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
12034 * gdbreplay.c (gdbreplay_version): Likewise.
12035
12036 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
12037
12038 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
12039 iov.iov_len with the real length in use.
12040
12041 2013-12-13 Joel Brobecker <brobecker@adacore.com>
12042
12043 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
12044 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
12045 for all targets that use win32-low.c.
12046 * win32-low.c (win32_ensure_ntdll_loaded): New function.
12047 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
12048
12049 2013-12-13 Pedro Alves <palves@redhat.com>
12050
12051 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
12052 if equal to TARGET_WAITKIND_LOADED.
12053 * win32-low.c (cached_status): New static global.
12054 (win32_wait): Add declaration.
12055 (do_initial_child_stuff): Flush all initial pending debug events
12056 up to the initial breakpoint.
12057 (win32_wait): If CACHED_STATUS was set, return that instead
12058 of doing a real wait. Remove the code resuming the execution
12059 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12060 during the initial phase. Also remove the code changing
12061 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
12062 TARGET_WAITKIND_STOPPED.
12063
12064 2013-12-11 Yao Qi <yao@codesourcery.com>
12065
12066 * notif.c (handle_notif_ack): Return 0 if no notification
12067 matches.
12068
12069 2013-11-20 Doug Evans <dje@google.com>
12070
12071 * linux-low.c (linux_set_resume_request): Fix comment.
12072
12073 2013-11-20 Doug Evans <dje@google.com>
12074
12075 * linux-low.c (resume_status_pending_p): Tweak comment.
12076
12077 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
12078
12079 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
12080 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
12081 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
12082 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
12083 (srv_amd64_regobj): Add amd64-mpx.o.
12084 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
12085 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
12086 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
12087 * i387-fp.c (num_pl_bnd_register) Added constant.
12088 (num_pl_bnd_cfg_registers) Added constant.
12089 (struct i387_xsave) Added reserved area and MPX fields.
12090 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
12091 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
12092 function.
12093 (tdesc_i386_mpx_linux): Add MPX amd64 target.
12094 (init_registers_amd64_mpx_linux): Declare new function.
12095 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
12096 (x86_64_regmap): Add MPX registers.
12097 (x86_linux_read_description): Add MPX case.
12098 (initialize_low_arch): Initialize MPX targets.
12099
12100 2013-11-18 Tom Tromey <tromey@redhat.com>
12101
12102 * configure: Rebuild.
12103 * configure.ac: Don't check for stdlib.h.
12104 * gdbreplay.c: Unconditionally include stdlib.h.
12105
12106 2013-11-18 Tom Tromey <tromey@redhat.com>
12107
12108 * config.in: Rebuild.
12109 * configure: Rebuild.
12110 * configure.ac: Don't use AC_HEADER_DIRENT.
12111
12112 2013-11-18 Tom Tromey <tromey@redhat.com>
12113
12114 * server.h: Don't check HAVE_STRING_H.
12115 * gdbreplay.c: Don't check HAVE_STRING_H.
12116 * configure: Rebuild.
12117
12118 2013-11-18 Tom Tromey <tromey@redhat.com>
12119
12120 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12121 LIBGNU.
12122
12123 2013-11-08 Tom Tromey <tromey@redhat.com>
12124
12125 * configure, config.in: Rebuild.
12126 * configure.ac: Remove unused configury.
12127
12128 2013-11-08 Tom Tromey <tromey@redhat.com>
12129
12130 * acinclude.m4: Include common.m4, codeset.m4.
12131 * configure, config.in: Rebuild.
12132 * configure.ac: Use GDB_AC_COMMON.
12133
12134 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12135
12136 * linux-s390-low.c (HWCAP_S390_TE): New define.
12137 (s390_arch_setup): Consider the TE field in the HWCAP for
12138 determining 'have_regset_tdb'.
12139
12140 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12141
12142 PR gdb/16014
12143 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12144 call to sizeof.
12145
12146 2013-10-02 Pedro Alves <palves@redhat.com>
12147
12148 * server.c (process_serial_event): Don't output "GDBserver
12149 exiting" if GDB is connected through stdio.
12150 * target.c (mywait): Likewise, be silent if GDB is connected
12151 through stdio.
12152
12153 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12154
12155 * lynx-low.c (lynx_add_threads_after_attach): New function.
12156 (lynx_attach): Remove call to add_thread. Add call to
12157 lynx_add_threads_after_attach instead.
12158
12159 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12160
12161 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12162 * config.in, configure: Regenerated.
12163
12164 2013-09-18 Yao Qi <yao@codesourcery.com>
12165
12166 PR server/15959
12167 * server.c (start_inferior): Clear 'resume_info'.
12168
12169 2013-09-16 Jiong Wang <jiwang@tilera.com>
12170
12171 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12172 for each register.
12173
12174 2013-09-16 Jiong Wang <jiwang@tilera.com>
12175
12176 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12177 linux-tile-low.o to srv_tgtobj.
12178
12179 2013-09-16 Will Newton <will.newton@linaro.org>
12180
12181 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12182 out regs.
12183
12184 2013-09-06 Pedro Alves <palves@redhat.com>
12185
12186 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12187 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12188 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12189 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12190 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12191 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12192
12193 2013-09-06 Pedro Alves <palves@redhat.com>
12194
12195 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12196 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12197
12198 2013-09-06 Pedro Alves <palves@redhat.com>
12199
12200 * linux-amd64-ipa.c: Include tracepoint.h.
12201 * linux-i386-ipa.c: Include tracepoint.h.
12202
12203 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12204
12205 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12206 (ps_get_thread_area): New function.
12207
12208 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12209
12210 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12211 (initialize_low_arch): Call init_registers_crisv32 rather than
12212 init_register_crisv32.
12213
12214 2013-09-05 Pedro Alves <palves@redhat.com>
12215
12216 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12217 to ...
12218 * hostio.h: ... this new file.
12219 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12220 win32-low.c: Include hostio.h.
12221
12222 2013-09-05 Pedro Alves <palves@redhat.com>
12223
12224 * server.h (gdb_client_data, handler_func, callback_handler_func)
12225 (delete_file_handler, add_file_handler, append_callback_event)
12226 (delete_callback_event, start_event_loop, initialize_event_loop):
12227 Move to event-loop.h and include it.
12228 * event-loop.h: New file.
12229
12230 2013-09-05 Pedro Alves <palves@redhat.com>
12231
12232 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12233 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12234 (loaded_dll, unloaded_dll): Move to ...
12235 * dll.h: ... this new file.
12236 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12237
12238 2013-09-05 Pedro Alves <palves@redhat.com>
12239
12240 * server.h (current_process, get_thread_process, all_processes)
12241 (add_inferior_to_list, for_each_inferior, current_inferior)
12242 (remove_inferior, add_process, remove_process, find_process_pid)
12243 (have_started_inferiors_p, have_attached_inferiors_p)
12244 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12245 (clear_inferiors, find_inferior, find_inferior_id)
12246 (inferior_target_data, set_inferior_target_data)
12247 (inferior_regcache_data, set_inferior_regcache_data): Move to
12248 inferiors.h, and include it.
12249 * inferiors.h: New file.
12250
12251 2013-09-05 Pedro Alves <palves@redhat.com>
12252
12253 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12254 Move ...
12255 * ax.h: ... here.
12256
12257 2013-09-05 Pedro Alves <palves@redhat.com>
12258
12259 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12260 tracepoint.h.
12261 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12262 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12263 (handle_tracepoint_general_set, handle_tracepoint_query)
12264 (tracepoint_finished_step, tracepoint_was_hit)
12265 (release_while_stepping_state_list, current_traceframe)
12266 (in_readonly_region, traceframe_read_mem)
12267 (fetch_traceframe_registers, traceframe_read_sdata)
12268 (traceframe_read_info, struct fast_tpoint_collect_status)
12269 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12270 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12271 (supply_fast_tracepoint_registers)
12272 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12273 (ipa_tdesc, claim_trampoline_space)
12274 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12275 (agent_mem_read, agent_get_trace_state_variable_value)
12276 (agent_set_trace_state_variable_value, agent_tsv_read)
12277 (agent_mem_read_string, get_raw_reg_func_addr)
12278 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12279 * tracepoint.h: ... this new file.
12280
12281 2013-09-05 Pedro Alves <palves@redhat.com>
12282
12283 * server.h (perror_with_name, error, fatal, warning, paddress)
12284 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12285 include it.
12286 * utils.h: New file.
12287
12288 2013-09-05 Pedro Alves <palves@redhat.com>
12289
12290 * server.h (remote_debug, noack_mode, transport_is_reliable)
12291 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12292 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12293 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12294 (write_enn, initialize_async_io, enable_async_io)
12295 (disable_async_io, check_remote_input_interrupt_request)
12296 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12297 (dead_thread_notify, prepare_resume_reply)
12298 (decode_address_to_semicolon, decode_address, decode_m_packet)
12299 (decode_M_packet, decode_X_packet, decode_xfer_write)
12300 (decode_search_memory_packet, unhexify, hexify)
12301 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12302 (look_up_one_symbol, relocate_instruction)
12303 (monitor_output): Move to remote-utils.h, and include it.
12304 * remote-utils.h: New file.
12305
12306 2013-09-05 Pedro Alves <palves@redhat.com>
12307
12308 * server.h (_): Delete.
12309
12310 2013-09-02 Pedro Alves <palves@redhat.com>
12311
12312 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12313 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12314 allocated.
12315 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12316
12317 2013-09-02 Pierre Muller <muller@sourceware.org>
12318
12319 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12320 or WriteProcessMemory complete successfully and handle
12321 ERROR_PARTIAL_COPY error.
12322
12323 2013-09-02 Pedro Alves <palves@redhat.com>
12324
12325 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12326 error instead of EIO.
12327
12328 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12329
12330 PR server/15604
12331 * linux-low.c: Include filestuff.h.
12332 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12333 * lynx-low.c: Include filestuff.h.
12334 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12335 * server.c: Include filestuff.h.
12336 (main): Call notice_open_fds.
12337 * spu-low.c: Include filestuff.h.
12338 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12339
12340 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12341
12342 * Makefile.in: Explain why ../target and ../nat are not
12343 listed as include file search paths.
12344 (linux-waitpid.o): New object file rule.
12345 * configure.srv (srv_native_linux_obj): New variable.
12346 Replace all occurrences of linux native object files with
12347 $srv_native_linux_obj.
12348 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12349 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12350 (linux_enable_event_reporting): Remove declaration.
12351 (my_waitpid): Moved to common/linux-waitpid.c.
12352 (linux_wait_for_event): Pass ptid when calling
12353 linux_enable_event_reporting.
12354 (linux_supports_tracefork_flag): Remove.
12355 (linux_enable_event_reporting): Likewise.
12356 (linux_tracefork_grandchild): Remove.
12357 (STACK_SIZE): Moved to common/linux-ptrace.c.
12358 (linux_tracefork_child): Remove.
12359 (linux_test_for_tracefork): Remove.
12360 (linux_look_up_symbols): Call linux_supports_traceclone.
12361 (initialize_low): Remove call to linux_test_for_tracefork.
12362 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12363 common/linux-ptrace.h.
12364 (PTRACE_TYPE_ARG4): Likewise.
12365 Include linux-ptrace.h.
12366
12367 2013-08-21 Pedro Alves <palves@redhat.com>
12368
12369 * config.in: Renegerate.
12370
12371 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
12372
12373 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12374 (SFILES): Remove $(srcdir)/common/target-common.c and
12375 add $(srcdir)/target/waitstatus.c.
12376 (OBS): Remove target-common.o and add waitstatus.o.
12377 (server_h): Remove $(srcdir)/../common/target-common.h and
12378 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12379 and $(srcdir)/../target/waitstatus.h.
12380 (target-common.o): Remove.
12381 (waitstatus.o): New target object file.
12382 * target.h: Do not include target-common.h and
12383 include target/resume.h, target/wait.h and
12384 target/waitstatus.h.
12385
12386 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
12387
12388 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12389 to PTRACE_TYPE_ARG3.
12390 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12391 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12392 PTRACE_TYPE_ARG4.
12393 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12394 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12395
12396 2013-07-27 Jie Zhang <jie@codesourcery.com>
12397 Daniel Jacobowitz <dan@codesourcery.com>
12398 Yao Qi <yao@codesourcery.com>
12399
12400 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12401 (mips-linux-watch.o): New rule.
12402 (mips_linux_watch_h): New variable.
12403 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12404 srv_tgtobj.
12405 * linux-mips-low.c: Include mips-linux-watch.h.
12406 (struct arch_process_info, struct arch_lwp_info): New.
12407 (update_watch_registers_callback): New function.
12408 (mips_linux_new_process, mips_linux_new_thread) New functions.
12409 (mips_linux_prepare_to_resume, mips_insert_point): New
12410 functions.
12411 (mips_remove_point, mips_stopped_by_watchpoint): New
12412 functions.
12413 (rsp_bp_type_to_target_hw_bp_type): New function.
12414 (mips_stopped_data_address): New function.
12415 (the_low_target): Add watchpoint support functions.
12416
12417 2013-07-27 Yao Qi <yao@codesourcery.com>
12418
12419 * i386-low.c: Include break-common.h.
12420 (enum target_hw_bp_type): Remove.
12421
12422 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
12423
12424 * Makefile.in (SFILES): /common/target-common.c.
12425 (OBS): Add target-common.o.
12426 (server_h): Add $(srcdir)/../common/target-common.h.
12427 (target-common.o): New target.
12428 * server.c (queue_stop_reply_callback): Free
12429 status string after use.
12430 * target.c (target_waitstatus_to_string): Remove.
12431 * target.h: Include target-common.h.
12432 (resume_kind): Likewise.
12433 (target_waitkind): Likewise.
12434 (target_waitstatus): Likewise.
12435 (TARGET_WNOHANG): Likewise.
12436
12437 2013-07-04 Yao Qi <yao@codesourcery.com>
12438
12439 * Makefile.in (host_alias): Use @host_noncanonical@.
12440 (target_alias): Use @target_noncanonical@.
12441 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12442 ACX_NONCANONICAL_HOST.
12443 * configure: Regenerated.
12444
12445 Revert:
12446 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12447
12448 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12449 * configure: Rebuild.
12450 * Makefile.in (version_host, version_target): Get from configure.
12451 (version.c): Use $(version_host) and $(version_target).
12452
12453 2013-07-03 Pedro Alves <palves@redhat.com>
12454
12455 * Makefile.in (config.status): Depend on development.sh.
12456 * acinclude.m4: Include libmcheck.m4.
12457 * configure: Regenerate.
12458
12459 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12460
12461 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12462 attribute inside the parentheses.
12463 (winapi_DebugSetProcessKillOnExit): Ditto.
12464 (winapi_DebugBreakProcess): Ditto.
12465 (winapi_GenerateConsoleCtrlEvent): Ditto.
12466
12467 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12468
12469 * notif.h (notif_event): Add a dummy member to avoid compiler
12470 errors.
12471
12472 2013-07-01 Pedro Alves <palves@redhat.com>
12473
12474 * hostio.c (HOSTIO_PATH_MAX): Define.
12475 (require_filename, handle_open, handle_unlink, handle_readlink):
12476 Use it.
12477
12478 2013-07-01 Pedro Alves <palves@redhat.com>
12479
12480 * server.h: Include "pathmax.h".
12481 * linux-low.c: Don't include sys/param.h.
12482 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12483 MAXPATHLEN.
12484 * win32-low.c: Don't include sys/param.h.
12485 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12486
12487 2013-07-01 Pedro Alves <palves@redhat.com>
12488
12489 * event-loop.c: Don't check HAVE_UNISTD_H before including
12490 <unistd.h>.
12491 * gdbreplay.c: Likewise.
12492 * remote-utils.c: Likewise.
12493 * server.c: Likewise.
12494 * configure.ac: Don't check for unistd.h.
12495 * configure: Regenerate.
12496
12497 2013-06-28 Tom Tromey <tromey@redhat.com>
12498
12499 * Makefile.in (version.c): Use version.in, not
12500 common/version.in.
12501
12502 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12503
12504 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12505 * configure: Rebuild.
12506 * Makefile.in (version_host, version_target): Get from configure.
12507 (version.c): Use $(version_host) and $(version_target).
12508
12509 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12510
12511 Fix trace-status to output user name without trailing colon.
12512 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12513
12514 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12515
12516 Fix trace-status to output proper start-time and stop-time.
12517 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12518 output start time and stop time in hex as gdb expects.
12519
12520 2013-06-26 Pedro Alves <pedro@codesourcery.com>
12521
12522 * tracepoint.c (build_traceframe_info_xml): Output trace state
12523 variables present in the trace buffer.
12524
12525 2013-06-24 Tom Tromey <tromey@redhat.com>
12526
12527 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12528 create-version.sh.
12529 (version.o): Remove.
12530 * gdbreplay.c: Include version.h.
12531 (version, host_name): Don't declare.
12532 * server.h: Include version.h.
12533 (version, host_name): Don't declare.
12534
12535 2013-06-12 Pedro Alves <palves@redhat.com>
12536
12537 * linux-x86-low.c (linux_is_elf64): Delete global.
12538 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12539 with local linux_pid_exe_is_elf_64_file use.
12540
12541 2013-06-11 Pedro Alves <palves@redhat.com>
12542
12543 * linux-low.c (regset_disabled, disable_regset): New functions.
12544 (regsets_fetch_inferior_registers)
12545 (regsets_store_inferior_registers): Use them.
12546 (initialize_regsets_info); Don't allocate the disabled_regsets
12547 array here.
12548 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12549 comment.
12550
12551 2013-06-11 Pedro Alves <palves@redhat.com>
12552
12553 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12554 xmalloc.
12555
12556 2013-06-11 Pedro Alves <palves@redhat.com>
12557
12558 * linux-x86-low.c (initialize_low_arch): Call
12559 init_registers_x32_avx_linux.
12560
12561 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
12562
12563 Fix compatibility with Android Bionic.
12564 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
12565 it is not empty.
12566
12567 2013-06-07 Pedro Alves <palves@redhat.com>
12568
12569 PR server/14823
12570 * Makefile.in (OBS): Add tdesc.o.
12571 (IPA_OBJS): Add tdesc-ipa.o.
12572 (tdesc-ipa.o): New rule.
12573 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
12574 interface.
12575 * linux-low.c (new_inferior): Delete.
12576 (disabled_regsets, num_regsets): Delete.
12577 (linux_add_process): Adjust to set the new per-process
12578 new_inferior flag.
12579 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
12580 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
12581 was a stop. When calling arch_setup, switch the current inferior
12582 to the thread that got an event.
12583 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
12584 (regsets_fetch_inferior_registers)
12585 (regsets_store_inferior_registers): New regsets_info parameter.
12586 Adjust to use it.
12587 (linux_register_in_regsets): New regs_info parameter. Adjust to
12588 use it.
12589 (register_addr, fetch_register, store_register): New usrregs_info
12590 parameter. Adjust to use it.
12591 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
12592 parameter regs_info. Adjust to use it.
12593 (linux_fetch_registers): Get the current inferior's regs_info, and
12594 adjust to use it.
12595 (linux_store_registers): Ditto.
12596 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
12597 (initialize_low): Don't initialize the target_regsets here. Call
12598 initialize_low_arch.
12599 * linux-low.h (target_regsets): Delete declaration.
12600 (struct regsets_info): New.
12601 (struct usrregs_info): New.
12602 (struct regs_info): New.
12603 (struct process_info_private) <new_inferior>: New field.
12604 (struct linux_target_ops): Delete the num_regs, regmap, and
12605 regset_bitmap fields. New field regs_info.
12606 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
12607 * i387-fp.c (num_xmm_registers): Delete.
12608 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
12609 calls to new interface.
12610 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
12611 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
12612 Infer the number of xmm registers from the regcache's target
12613 description.
12614 * i387-fp.h (num_xmm_registers): Delete.
12615 * inferiors.c (add_thread): Don't install the thread's regcache
12616 here.
12617 * proc-service.c (gregset_info): Fetch the current inferior's
12618 regs_info. Adjust to use it.
12619 * regcache.c: Include tdesc.h.
12620 (register_bytes, reg_defs, num_registers)
12621 (gdbserver_expedite_regs): Delete.
12622 (get_thread_regcache): If the thread doesn't have a regcache yet,
12623 create one, instead of aborting gdbserver.
12624 (regcache_invalidate_one): Rename to ...
12625 (regcache_invalidate_thread): ... this.
12626 (regcache_invalidate_one): New.
12627 (regcache_invalidate): Only invalidate registers of the current
12628 process.
12629 (init_register_cache): Add target_desc parameter, and use it.
12630 (new_register_cache): Ditto. Assert the target description has a
12631 non zero registers_size.
12632 (regcache_cpy): Add assertions. Adjust.
12633 (realloc_register_cache, set_register_cache): Delete.
12634 (registers_to_string, registers_from_string): Adjust.
12635 (find_register_by_name, find_regno, find_register_by_number)
12636 (register_cache_size): Add target_desc parameter, and use it.
12637 (free_register_cache_thread, free_register_cache_thread_one)
12638 (regcache_release, register_cache_size): New.
12639 (register_size): Add target_desc parameter, and use it.
12640 (register_data, supply_register, supply_register_zeroed)
12641 (supply_regblock, supply_register_by_name, collect_register)
12642 (collect_register_as_string, collect_register_by_name): Adjust.
12643 * regcache.h (struct target_desc): Forward declare.
12644 (struct regcache) <tdesc>: New field.
12645 (init_register_cache, new_register_cache): Add target_desc
12646 parameter.
12647 (regcache_invalidate_thread): Declare.
12648 (regcache_invalidate_one): Delete declaration.
12649 (regcache_release): Declare.
12650 (find_register_by_number, register_cache_size, register_size)
12651 (find_regno): Add target_desc parameter.
12652 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
12653 declarations.
12654 * remote-utils.c: Include tdesc.h.
12655 (outreg, prepare_resume_reply): Adjust.
12656 * server.c: Include tdesc.h.
12657 (gdbserver_xmltarget): Delete declaration.
12658 (get_features_xml, process_serial_event): Adjust.
12659 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
12660 declare.
12661 (struct process_info) <tdesc>: New field.
12662 (ipa_tdesc): Declare.
12663 * tdesc.c: New file.
12664 * tdesc.h: New file.
12665 * tracepoint.c: Include tdesc.h.
12666 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
12667 (get_context_regcache): Adjust to pass ipa_tdesc down.
12668 (do_action_at_tracepoint): Adjust to get the register cache size
12669 from the context regcache's description.
12670 (traceframe_walk_blocks): Adjust to get the register cache size
12671 from the current trace frame's description.
12672 (traceframe_get_pc): Adjust to get current trace frame's
12673 description and pass it down.
12674 (gdb_collect): Adjust to get the register cache size from the
12675 IPA's description.
12676 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
12677 (gdbserver_xmltarget): Delete.
12678 (initialize_low_tracepoint): Set the ipa's target description.
12679 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
12680 (initialize_low_tracepoint): Set the ipa's target description.
12681 * linux-x86-low.c: Include tdesc.h.
12682 [__x86_64__] (is_64bit_tdesc): New.
12683 (ps_get_thread_area, x86_get_thread_area): Use it.
12684 (i386_cannot_store_register): Rename to ...
12685 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
12686 (i386_cannot_fetch_register): Rename to ...
12687 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
12688 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
12689 to new interface.
12690 (target_regsets): Rename to ...
12691 (x86_regsets): ... this.
12692 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
12693 interface.
12694 (x86_siginfo_fixup): Use is_64bit_tdesc.
12695 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
12696 (tdesc_x32_avx_linux, tdesc_x32_linux)
12697 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
12698 Declare.
12699 (x86_linux_update_xmltarget): Delete.
12700 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
12701 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
12702 (AMD64_LINUX_USER64_CS): New.
12703 (x86_linux_read_description): New, based on
12704 x86_linux_update_xmltarget.
12705 (same_process_callback): New.
12706 (x86_arch_setup_process_callback): New.
12707 (x86_linux_update_xmltarget): New.
12708 (x86_regsets_info): New.
12709 (amd64_linux_regs_info): New.
12710 (i386_linux_usrregs_info): New.
12711 (i386_linux_regs_info): New.
12712 (x86_linux_regs_info): New.
12713 (x86_arch_setup): Reimplement.
12714 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
12715 (x86_emit_ops): Ditto.
12716 (the_low_target): Adjust. Install x86_linux_regs_info,
12717 x86_cannot_fetch_register, and x86_cannot_store_register.
12718 (initialize_low_arch): New.
12719 * linux-ia64-low.c (tdesc_ia64): Declare.
12720 (ia64_fetch_register): Adjust.
12721 (ia64_usrregs_info, regs_info): New globals.
12722 (ia64_regs_info): New function.
12723 (the_low_target): Adjust.
12724 (initialize_low_arch): New function.
12725 * linux-sparc-low.c (tdesc_sparc64): Declare.
12726 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
12727 Adjust.
12728 (sparc_arch_setup): New function.
12729 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
12730 (the_low_target): Adjust.
12731 (initialize_low_arch): New function.
12732 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
12733 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
12734 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
12735 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
12736 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
12737 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
12738 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
12739 (tdesc_powerpc_isa205_vsx64l): Declare.
12740 (ppc_cannot_store_register, ppc_collect_ptrace_register)
12741 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
12742 (ppc_set_pc, ppc_get_hwcap): Adjust.
12743 (ppc_usrregs_info): Forward declare.
12744 (!__powerpc64__) ppc_regmap_adjusted: New global.
12745 (ppc_arch_setup): Adjust to the current process'es target
12746 description.
12747 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
12748 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
12749 (ppc_store_evrregset): Adjust.
12750 (target_regsets): Rename to ...
12751 (ppc_regsets): ... this, and make static.
12752 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
12753 (ppc_regs_info): New function.
12754 (the_low_target): Adjust.
12755 (initialize_low_arch): New function.
12756 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
12757 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
12758 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
12759 (tdesc_s390x_linux64v2): Declare.
12760 (s390_collect_ptrace_register, s390_supply_ptrace_register)
12761 (s390_fill_gregset, s390_store_last_break): Adjust.
12762 (target_regsets): Rename to ...
12763 (s390_regsets): ... this, and make static.
12764 (s390_get_pc, s390_set_pc): Adjust.
12765 (s390_get_hwcap): New target_desc parameter, and use it.
12766 [__s390x__] (have_hwcap_s390_high_gprs): New global.
12767 (s390_arch_setup): Adjust to set the current process'es target
12768 description. Don't adjust the regmap.
12769 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
12770 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
12771 (regs_info_3264): New globals.
12772 (s390_regs_info): New function.
12773 (the_low_target): Adjust.
12774 (initialize_low_arch): New function.
12775 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
12776 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
12777 [__mips64] (init_registers_mips_linux)
12778 (init_registers_mips_dsp_linux): Delete defines.
12779 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
12780 (have_dsp): New global.
12781 (mips_read_description): New, based on mips_arch_setup.
12782 (mips_arch_setup): Reimplement.
12783 (get_usrregs_info): New function.
12784 (mips_cannot_fetch_register, mips_cannot_store_register)
12785 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
12786 (mips_fill_fpregset, mips_store_fpregset): Adjust.
12787 (target_regsets): Rename to ...
12788 (mips_regsets): ... this, and make static.
12789 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
12790 (dsp_regs_info, regs_info): New globals.
12791 (mips_regs_info): New function.
12792 (the_low_target): Adjust.
12793 (initialize_low_arch): New function.
12794 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
12795 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
12796 Declare.
12797 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
12798 (arm_read_description): New, with bits factored from
12799 arm_arch_setup.
12800 (arm_arch_setup): Reimplement.
12801 (target_regsets): Rename to ...
12802 (arm_regsets): ... this, and make static.
12803 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
12804 (arm_regs_info): New function.
12805 (the_low_target): Adjust.
12806 (initialize_low_arch): New function.
12807 * linux-m68k-low.c (tdesc_m68k): Declare.
12808 (target_regsets): Rename to ...
12809 (m68k_regsets): ... this, and make static.
12810 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
12811 (m68k_regs_info): New function.
12812 (m68k_arch_setup): New function.
12813 (the_low_target): Adjust.
12814 (initialize_low_arch): New function.
12815 * linux-sh-low.c (tdesc_sharch): Declare.
12816 (target_regsets): Rename to ...
12817 (sh_regsets): ... this, and make static.
12818 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
12819 (sh_regs_info, sh_arch_setup): New functions.
12820 (the_low_target): Adjust.
12821 (initialize_low_arch): New function.
12822 * linux-bfin-low.c (tdesc_bfin): Declare.
12823 (bfin_arch_setup): New function.
12824 (bfin_usrregs_info, regs_info): New globals.
12825 (bfin_regs_info): New function.
12826 (the_low_target): Adjust.
12827 (initialize_low_arch): New function.
12828 * linux-cris-low.c (tdesc_cris): Declare.
12829 (cris_arch_setup): New function.
12830 (cris_usrregs_info, regs_info): New globals.
12831 (cris_regs_info): New function.
12832 (the_low_target): Adjust.
12833 (initialize_low_arch): New function.
12834 * linux-cris-low.c (tdesc_crisv32): Declare.
12835 (cris_arch_setup): New function.
12836 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
12837 (cris_regs_info): New function.
12838 (the_low_target): Adjust.
12839 (initialize_low_arch): New function.
12840 * linux-m32r-low.c (tdesc_m32r): Declare.
12841 (m32r_arch_setup): New function.
12842 (m32r_usrregs_info, regs_info): New globals.
12843 (m32r_regs_info): Adjust.
12844 (initialize_low_arch): New function.
12845 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
12846 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
12847 (tic6x_usrregs_info): Forward declare.
12848 (tic6x_read_description): New function, based on ...
12849 (tic6x_arch_setup): ... this. Reimplement.
12850 (target_regsets): Rename to ...
12851 (tic6x_regsets): ... this, and make static.
12852 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
12853 (tic6x_regs_info): New function.
12854 (the_low_target): Adjust.
12855 (initialize_low_arch): New function.
12856 * linux-xtensa-low.c (tdesc_xtensa): Declare.
12857 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
12858 (target_regsets): Rename to ...
12859 (xtensa_regsets): ... this, and make static.
12860 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
12861 globals.
12862 (xtensa_arch_setup, xtensa_regs_info): New functions.
12863 (the_low_target): Adjust.
12864 (initialize_low_arch): New function.
12865 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
12866 (nios2_arch_setup): Set the current process'es tdesc.
12867 (target_regsets): Rename to ...
12868 (nios2_regsets): ... this.
12869 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
12870 (nios2_regs_info): New function.
12871 (the_low_target): Adjust.
12872 (initialize_low_arch): New function.
12873 * linux-aarch64-low.c (tdesc_aarch64): Declare.
12874 (aarch64_arch_setup): Set the current process'es tdesc.
12875 (target_regsets): Rename to ...
12876 (aarch64_regsets): ... this.
12877 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
12878 (aarch64_regs_info): New function.
12879 (the_low_target): Adjust.
12880 (initialize_low_arch): New function.
12881 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
12882 globals.
12883 (target_regsets): Rename to ...
12884 (tile_regsets): ... this.
12885 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
12886 (tile_regs_info): New function.
12887 (tile_arch_setup): Set the current process'es tdesc.
12888 (the_low_target): Adjust.
12889 (initialize_low_arch): New function.
12890 * spu-low.c (tdesc_spu): Declare.
12891 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
12892 * win32-arm-low.c (tdesc_arm): Declare.
12893 (arm_arch_setup): New function.
12894 (the_low_target): Install arm_arch_setup instead of
12895 init_registers_arm.
12896 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
12897 (init_windows_x86): Rename to ...
12898 (i386_arch_setup): ... this. Set `win32_tdesc'.
12899 (the_low_target): Adjust.
12900 * win32-low.c (win32_tdesc): New global.
12901 (child_add_thread): Don't create the thread cache here.
12902 (do_initial_child_stuff): Set the new process'es tdesc.
12903 * win32-low.h (struct target_desc): Forward declare.
12904 (win32_tdesc): Declare.
12905 * lynx-i386-low.c (tdesc_i386): Declare global.
12906 (lynx_i386_arch_setup): Set `lynx_tdesc'.
12907 * lynx-low.c (lynx_tdesc): New global.
12908 (lynx_add_process): Set the new process'es tdesc.
12909 * lynx-low.h (struct target_desc): Forward declare.
12910 (lynx_tdesc): Declare global.
12911 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
12912 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
12913 * nto-low.c (nto_tdesc): New global.
12914 (do_attach): Set the new process'es tdesc.
12915 * nto-low.h (struct target_desc): Forward declare.
12916 (nto_tdesc): Declare.
12917 * nto-x86-low.c (tdesc_i386): Declare.
12918 (nto_x86_arch_setup): Set `nto_tdesc'.
12919
12920 2013-06-04 Gary Benson <gbenson@redhat.com>
12921
12922 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
12923 to qSupported response when appropriate.
12924 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
12925 with nonzero-length annex.
12926 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
12927 arguments supplied in annex.
12928
12929 2013-05-31 Doug Evans <dje@google.com>
12930
12931 PR server/15594
12932 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
12933 64 bits in 64-cross-32 environment.
12934
12935 2013-05-28 Pedro Alves <palves@redhat.com>
12936
12937 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
12938 (aarch64-without-fpu.c): Delete rule.
12939 * configure.srv (aarch64*-*-linux*): Remove references to
12940 aarch64-without-fpu.o and aarch64-without-fpu.xml.
12941 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
12942 declaration.
12943
12944 2013-05-24 Pedro Alves <palves@redhat.com>
12945
12946 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
12947 instead of strchr/decode_address. Error if the range isn't split
12948 with a ','. Don't assume there's be a ':' in the action.
12949
12950 2013-05-23 Yao Qi <yao@codesourcery.com>
12951 Pedro Alves <palves@redhat.com>
12952
12953 * linux-low.c (lwp_in_step_range): New function.
12954 (linux_wait_1): If the thread was range stepping and stopped
12955 outside the stepping range, report the stop to GDB. Otherwise,
12956 continue stepping. Add range stepping debug output.
12957 (linux_set_resume_request): Copy the step range from the resume
12958 request to the lwp.
12959 (linux_supports_range_stepping): New.
12960 (linux_target_ops) <supports_range_stepping>: Set to
12961 linux_supports_range_stepping.
12962 * linux-low.h (struct linux_target_ops)
12963 <supports_range_stepping>: New field.
12964 (struct lwp_info) <step_range_start, step_range_end>: New fields.
12965 * linux-x86-low.c (x86_supports_range_stepping): New.
12966 (the_low_target) <supports_range_stepping>: Set to
12967 x86_supports_range_stepping.
12968 * server.c (handle_v_cont): Handle 'r' action.
12969 (handle_v_requests): Append ";r" if the target supports range
12970 stepping.
12971 * target.h (struct thread_resume) <step_range_start,
12972 step_range_end>: New fields.
12973 (struct target_ops) <supports_range_stepping>:
12974 New field.
12975 (target_supports_range_stepping): New macro.
12976
12977 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12978
12979 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
12980 confusion in comment.
12981
12982 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12983
12984 * lynx-low.c (struct process_info_private): New type.
12985 (lynx_add_process): New function.
12986 (lynx_create_inferior, lynx_attach): Replace calls to
12987 add_process by calls to lynx_add_process.
12988 (lynx_resume): If PTID is null, then try using
12989 current_process()->private->last_wait_event_ptid.
12990 Add comments.
12991 (lynx_clear_inferiors): Delete. The contents of that function
12992 has been inlined in lynx_mourn;
12993 (lynx_wait_1): Save the ptid in the process's private data.
12994 (lynx_mourn): Free the process' private data. Replace call
12995 to lynx_clear_inferiors by call to clear_inferiors.
12996
12997 2013-05-17 Yao Qi <yao@codesourcery.com>
12998
12999 * i386-low.c (i386_length_and_rw_bits): Move the comment to
13000 the right place.
13001
13002 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
13003
13004 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
13005 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
13006 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
13007 PT_TEXT_END_ADDR guards. Update comments.
13008 (linux_target_op) <read_offsets>: Conditionally define to
13009 linux_read_offsets if the target is UCLIBC and if it defines
13010 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
13011
13012 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
13013 Andrew Jenner <andrew@codesourcery.com>
13014
13015 * Makefile.in (SFILES): Add linux-nios2-low.c.
13016 (clean): Add action to delete nios2-linux.c.
13017 (nios2-linux.c): New rule.
13018 * configure.srv: Add nios2*-*-linux*.
13019 * linux-nios2-low.c: New.
13020
13021 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
13022
13023 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
13024
13025 2013-04-25 Hui Zhu <hui@codesourcery.com>
13026
13027 PR gdb/15186
13028 * ax.c (ax_printf): Add fflush.
13029
13030 2013-04-22 Tom Tromey <tromey@redhat.com>
13031
13032 * Makefile.in (SFILES): Add filestuff.c.
13033 (OBS): Add filestuff.o.
13034 (filestuff.o): New target.
13035 * config.in, configure: Rebuild.
13036 * configure.ac: Check for fdwalk, pipe2.
13037
13038 2013-04-17 Pedro Alves <palves@redhat.com>
13039
13040 * configure.ac (USE_THREAD_DB): Delete variable.
13041 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
13042 Don't AC_SUBST USE_THREAD_DB.
13043 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
13044 * config.in, configure: Regenerate.
13045
13046 2013-04-16 Pedro Alves <palves@redhat.com>
13047
13048 * linux-low.h (struct lwp_info) <thread_known>: Move under
13049 the USE_THREAD_DB #ifdef.
13050
13051 2013-04-16 Pedro Alves <palves@redhat.com>
13052
13053 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
13054 (linux-low.o): Delete rule.
13055 * linux-low.h: Always include "gdb_thread_db.h" instead of
13056 conditionally including thread_db.h.
13057 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13058 HAVE_THREAD_DB_H.
13059
13060 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13061
13062 * Makefile.in (install-only): Fix make install regression.
13063
13064 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
13065
13066 Convert man pages to texinfo, new gdbinit.5 texinfo page.
13067 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
13068 installation.
13069 * gdbserver.1: Remove.
13070
13071 2013-03-22 Pedro Alves <palves@redhat.com>
13072
13073 * linux-low.c (handle_extended_wait): Don't call
13074 linux_enable_event_reporting.
13075
13076 2013-03-15 Tony Theodore <tonyt@logyst.com>
13077
13078 PR build/9098:
13079 * Makefile.in (SHELL): Use @SHELL@.
13080
13081 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
13082
13083 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
13084 compiler warning.
13085
13086 2013-03-13 Joel Brobecker <brobecker@adacore.com>
13087
13088 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
13089 Remove extraneous NULL element.
13090
13091 2013-03-13 Yao Qi <yao@codesourcery.com>
13092
13093 * tracepoint.c (traceframe_read_tsv): Look for the last matched
13094 'V' block in trace frame.
13095
13096 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13097
13098 * target.h (struct target_ops): Add btrace ops.
13099 (target_supports_btrace): New macro.
13100 (target_enable_btrace): New macro.
13101 (target_disable_btrace): New macro.
13102 (target_read_btrace): New macro.
13103 * gdbthread.h (struct thread_info): Add btrace field.
13104 * server.c: Include btrace-common.h.
13105 (handle_btrace_general_set): New function.
13106 (handle_btrace_enable): New function.
13107 (handle_btrace_disable): New function.
13108 (handle_general_set): Call handle_btrace_general_set.
13109 (handle_qxfer_btrace): New function.
13110 (struct qxfer qxfer_packets[]): Add btrace entry.
13111 * inferiors.c (remove_thread): Disable btrace.
13112 * linux-low: Include linux-btrace.h.
13113 (linux_low_enable_btrace): New function.
13114 (linux_low_read_btrace): New function.
13115 (linux_target_ops): Add btrace ops.
13116 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13117 Add srv_linux_btrace=yes.
13118 (x86_64-*-linux*): Add linux-btrace.o.
13119 Add srv_linux_btrace=yes.
13120 * configure.ac: Define HAVE_LINUX_BTRACE.
13121 * config.in: Regenerated.
13122 * configure: Regenerated.
13123
13124 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13125
13126 * server.c (handle_qxfer): Preserve error message if -3 is
13127 returned.
13128 (qxfer): Document the -3 return value.
13129
13130 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13131
13132 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13133 (linux_btrace_h): New variable.
13134 (linux-btrace.o): New rule.
13135
13136 2013-03-08 Stan Shebs <stan@codesourcery.com>
13137 Hafiz Abid Qadeer <abidh@codesourcery.com>
13138
13139 * tracepoint.c (trace_buffer_size): New global.
13140 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13141 (init_trace_buffer): Change to one-argument function. Allocate
13142 trace buffer memory.
13143 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13144 handle QTBuffer:size packet.
13145 (cmd_bigqtbuffer_size): New function.
13146 (initialize_tracepoint): Call init_trace_buffer with
13147 DEFAULT_TRACE_BUFFER_SIZE.
13148 * server.c (handle_query): Add QTBuffer:size in the
13149 supported packets.
13150
13151 2013-03-07 Yao Qi <yao@codesourcery.com>
13152
13153 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13154 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13155 of -1.
13156 (cmd_qtsp): Adjust condition. Do post increment.
13157 Set cur_action and cur_step_action back to 0.
13158
13159 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13160
13161 PR server/15236
13162 * linux-low.c (linux_write_memory): Return early success if LEN is
13163 zero.
13164
13165 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13166
13167 * configure.srv: Add x86_64-*-cygwin* as target.
13168
13169 2013-02-28 Tom Tromey <tromey@redhat.com>
13170
13171 * configure.ac: Invoke AC_SYS_LARGEFILE.
13172 * configure, config.in: Rebuild.
13173
13174 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13175
13176 * win32-low.c: Throughout, fix format strings and casts of
13177 printf-like functions to avoid type related warnings on all
13178 platforms.
13179 (get_child_debug_event): Print dwDebugEventCode as hex since
13180 that's how it's usually documented.
13181
13182 2013-02-28 Yao Qi <yao@codesourcery.com>
13183
13184 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13185 pulongest.
13186
13187 2013-02-27 Jiong Wang <jiwang@tilera.com>
13188
13189 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13190 (reg-tilegx32.c): New rule.
13191 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13192 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13193 different register info initializer according to elf class.
13194 (init_registers_tilgx32): New function. The tilegx32 register info
13195 initializer.
13196 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13197 (tile_store_gregset): Likewise.
13198
13199 2013-02-27 Yao Qi <yao@codesourcery.com>
13200
13201 * server.c (process_point_options): Print debug message when
13202 debug_threads is true.
13203
13204 2013-02-26 Yao Qi <yao@codesourcery.com>
13205
13206 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13207
13208 2013-02-19 Pedro Alves <palves@redhat.com>
13209 Kai Tietz <ktietz@redhat.com>
13210
13211 PR gdb/15161
13212
13213 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13214 instead of strtoul to extract address from packet.
13215 (process_serial_event) <'z'>: Likewise.
13216
13217 2013-02-18 Yao Qi <yao@codesourcery.com>
13218
13219 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13220
13221 2013-02-14 Pedro Alves <palves@redhat.com>
13222
13223 Plug memory leak.
13224
13225 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13226 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13227
13228 2013-02-14 Pedro Alves <palves@redhat.com>
13229
13230 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13231
13232 2013-02-14 Pedro Alves <palves@redhat.com>
13233
13234 * tracepoint.c (save_string): Delete.
13235 (add_tracepoint_action): Use savestring instead of save_string.
13236
13237 2013-02-12 Pedro Alves <palves@redhat.com>
13238
13239 * linux-xtensa-low.c: Ditto.
13240 * xtensa-xtregs.c: Ditto.
13241
13242 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13243
13244 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13245 thread_db.
13246
13247 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13248
13249 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13250 aarch64_num_wp_regs and aarch64_num_bp_regs to
13251 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13252
13253 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13254
13255 * linux-aarch64-low.c (ps_get_thread_area): Replace
13256 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13257
13258 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13259 Marcus Shawcroft <marcus.shawcroft@arm.com>
13260 Nigel Stephens <nigel.stephens@arm.com>
13261 Yufeng Zhang <yufeng.zhang@arm.com>
13262
13263 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13264 (aarch64.c, aarch64-without-fpu.c): New targets.
13265 * configure.srv (aarch64*-*-linux*): New.
13266 * linux-aarch64-low.c: New file.
13267
13268 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13269
13270 * linux-low.c (handle_extended_wait, linux_create_inferior)
13271 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13272 (dequeue_one_deferred_signal, linux_resume_one_thread)
13273 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13274 (linux_tracefork_grandchild, linux_test_for_tracefork)
13275 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13276 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13277 where the argument is 0.
13278
13279 2013-01-25 Yao Qi <yao@codesourcery.com>
13280
13281 * event-loop.c: Include "queue.h".
13282 (gdb_event_p): New typedef.
13283 (struct gdb_event) <next_event>: Remove.
13284 (event_queue): Change to QUEUE(gdb_event_p).
13285 (async_queue_event): Remove.
13286 (gdb_event_xfree): New.
13287 (initialize_event_loop): New.
13288 (process_event): Use API from QUEUE.
13289 (wait_for_event): Likewise.
13290 * server.c (main): Call initialize_event_loop.
13291 * server.h (initialize_event_loop): Declare.
13292
13293 2013-01-18 Yao Qi <yao@codesourcery.com>
13294
13295 * ax.h (struct eval_agent_expr_context): New.
13296 (gdb_eval_agent_expr): Update declaration.
13297 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13298 TFRAME. Add new argument CTX.
13299 * server.h (struct eval_agent_expr_context): Declare.
13300 (agent_mem_read, agent_tsv_read): Update declaration.
13301 (agent_mem_read_string): Likewise.
13302 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13303 (add_traceframe_block): Add new argument TPOINT.
13304 Increase TPOINT->traceframe_usage.
13305 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13306 eval_tracepoint_agent_expr.
13307 (condition_true_at_tracepoint): Likewise.
13308 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13309 (agent_mem_read_string, agent_tsv_read): Likewise.
13310
13311 2013-01-16 Yao Qi <yao@codesourcery.com>
13312
13313 * linux-low.c (linux_resume_one_lwp): Don't check
13314 'lwp->bp_reinsert != 0'.
13315
13316 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13317 Pedro Alves <palves@redhat.com>
13318
13319 * lynx-low.c (ptrace_request_to_str): Define a temporary
13320 macro and use it to simplify this function's implementation.
13321
13322 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13323
13324 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13325 sets errno.
13326
13327 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13328
13329 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13330
13331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13332
13333 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13334
13335 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13336
13337 * lynx-low.c (lynx_resume): Use the resume_info parameter
13338 to determine the ptid for the lynx_ptrace call, unless
13339 it is equal to minus_one_ptid, in which case we use the
13340 ptid of the current_inferior.
13341 (lynx_wait_1): After having received a thread create/exit
13342 event, resume the inferior's execution using the signaling
13343 thread's ptid, rather than the old ptid.
13344
13345 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13346
13347 * lynx-low.c (lynx_resume): Delete variable ret.
13348
13349 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13350
13351 * gdbreplay.c (gdbreplay_version): Update copyright year.
13352 * server.c (gdbserver_version): Likewise.
13353
13354 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13355
13356 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13357 new thread.
13358
13359 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13360
13361 * lynx-low.c (ptrace_request_to_str): Add handling for
13362 PTRACE_GETTRACESIG.
13363
13364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13365
13366 * lynx-low.c (lynx_attach): Delete variable new_process.
13367
13368 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13369
13370 * lynx-low.c (lynx_create_inferior): Delete variable
13371 new_process.
13372
13373 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13374
13375 * lynx-low.c (ptrace_request_to_str): Do not handle
13376 PTRACE_GETTHREADLIST if this macro does not exist.
13377
13378 2012-12-15 Yao Qi <yao@codesourcery.com>
13379
13380 * Makefile.in (OBS): Add notif.o.
13381 * notif.c, notif.h: New.
13382 * server.c: Include "notif.h".
13383 (struct vstop_notif) <next>: Remove.
13384 <base>: New field.
13385 (queue_stop_reply): Update.
13386 (push_event, send_next_stop_reply): Remove.
13387 (discard_queued_stop_replies): Update.
13388 (notif_stop): New variable.
13389 (handle_v_stopped): Remove.
13390 (handle_v_requests): Don't call handle_v_stopped. Call
13391 handle_ack_notif instead.
13392 (queue_stop_reply_callback): Call notif_event_enque instead
13393 of queue_stop_reply.
13394 (handle_status): Don't call send_next_stop_reply, call
13395 notif_write_event instead.
13396 (kill_inferior_callback): Likewise.
13397 (detach_or_kill_inferior_callback): Likewise.
13398 (main): Call initialize_notif.
13399 (process_serial_event): Call QUEUE_is_empty.
13400 (handle_target_event): Call notif_push instead of push event.
13401 * server.h (push_event): Remove declaration.
13402
13403 2012-12-10 Tom Tromey <tromey@redhat.com>
13404
13405 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13406 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13407 macros.
13408 (.c.o): Rewrite.
13409 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13410 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13411 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13412 (amd64-linux-ipa.o, ax.o): Rewrite.
13413 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13414 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13415 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13416 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13417 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13418 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13419 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13420 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13421 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13422 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13423 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13424 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13425 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13426 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13427 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13428 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13429 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13430 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13431 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13432 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13433 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13434 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13435 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13436 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13437 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13438 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13439 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13440 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13441 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13442 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13443 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13444 (reg-tilegx.o): Remove.
13445 (all_object_files): New macro.
13446 Include .deps files.
13447 * aclocal.m4, configure: Rebuild.
13448 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13449 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13450 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13451
13452 2012-12-05 Tom Tromey <tromey@redhat.com>
13453
13454 PR gdb/14917:
13455 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13456
13457 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
13458
13459 * configure.ac: Check for linux/perf_event.h.
13460 * config.in: Regenerated.
13461 * configure: Regenerated.
13462
13463 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13464
13465 * hostio.c (handle_readlink): Decrease buffer size
13466 parameter passed to readlink by one byte.
13467
13468 2012-11-26 Yao Qi <yao@codesourcery.com>
13469
13470 * configure.ac (build_warnings): Append '-Wempty-body'.
13471 * configure: Regenerated.
13472 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13473 body.
13474
13475 2012-11-15 Pierre Muller <muller@sourceware.org>
13476
13477 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13478 * config.in: Regenerate.
13479 * configure: Regenerate.
13480 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13481 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13482 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13483 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13484 header.
13485 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13486 instead of <sys/wait.h> header.
13487 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13488
13489 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
13490
13491 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13492 (various make rules): Remove -DGDBSERVER
13493
13494 2012-11-09 Yao Qi <yao@codesourcery.com>
13495
13496 * spu-low.c (current_ptid): Move it to ..
13497 * gdbthread.h: ... here. New.
13498 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13499 * server.c (myresume, process_serial_event): Likewise.
13500 * thread-db.c (thread_db_find_new_threads): Likewise.
13501 * tracepoint.c (run_inferior_command): Likewise.
13502
13503 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
13504
13505 * server.c (handle_search_memory_1): Include access length in
13506 warning message.
13507
13508 2012-09-05 Michael Brandt <michael.brandt@axis.com>
13509
13510 * linux-crisv32-low.c: Fix compile errors.
13511
13512 2012-09-04 Yao Qi <yao@codesourcery.com>
13513
13514 * tracepoint.c (cmd_qtsv): Adjust debug message.
13515 Don't check CUR_TPOINT.
13516
13517 2012-08-28 Yao Qi <yao@codesourcery.com>
13518
13519 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13520 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13521 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13522 Remove declarations of xmalloc, xreallloc, xstrdup and
13523 freeargv.
13524 * Makefile.in (libiberty_h): New.
13525 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13526 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13527
13528 2012-08-23 Yao Qi <yao@codesourcery.com>
13529
13530 * server.h: Remove declaration of 'xsnprintf'.
13531
13532 2012-08-22 Keith Seitz <keiths@redhat.com>
13533
13534 * server.h: Include build-gnulib-gbserver/config.h.
13535 * gdbreplay.c: Likewise.
13536
13537 2012-08-08 Doug Evans <dje@google.com>
13538
13539 * Makefile.in (SFILES): Add gdb_vecs.c.
13540 (OBS): Add gdb_vecs.o.
13541 (gdb_vecs_h, host_defs_h): New variables.
13542 (thread-db.o): Add $(gdb_vecs_h) dependency.
13543 (gdb_vecs.o): New rule.
13544 * thread-db.c: #include "gdb_vecs.h".
13545 (thread_db_load_search): Use a vector to iterate over path elements.
13546 Handle text appearing after "$pdir".
13547
13548 * configure.ac: Add check for strstr.
13549 * config.in: Regenerate.
13550 * configure: Regenerate.
13551
13552 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13553
13554 * hostio.c (handle_pread): If pread fails, fall back to attempting
13555 lseek/read.
13556 (handle_pwrite): Likewise for pwrite.
13557
13558 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
13559
13560 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
13561 between unsupported TYPE and unimplementable ADDR/LEN combination.
13562 (arm_insert_point): Act on new return value.
13563
13564 2012-07-31 Pedro Alves <palves@redhat.com>
13565
13566 * server.c (process_point_options): Only skip tokens if we find
13567 one that is unrecognized. Don't treat 'X' specially while
13568 skipping unrecognized tokens.
13569
13570 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
13571
13572 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
13573 to 4-byte-align HW breakpoint addresses for Thumb.
13574
13575 2012-07-27 Yao Qi <yao@codesourcery.com>
13576
13577 PR remote/14161.
13578
13579 * server.h: Declare gdb_agent_about_to_close.
13580 * target.c (kill_inferior): Include "agent.h".
13581 New. Send command 'kill'.
13582 * target.h (kill_inferior): Removed macro.
13583 * tracepoint.c (gdb_agent_about_to_close): New.
13584 (gdb_agent_helper_thread): Handle command 'close'.
13585 Wait endlessly until the inferior stops.
13586 Install gdb_agent_remove_socket to atexit hook.
13587 (agent_socket_name): New static variable.
13588 (gdb_agent_socket_init): Replace local variable 'name' with
13589 'agent_socket_name'.
13590 (gdb_agent_remove_socket): New.
13591
13592 2012-07-27 Yao Qi <yao@codesourcery.com>
13593
13594 * server.c (process_point_options): Stop at 'X' when parsing.
13595
13596 2012-07-19 Michael Eager <eager@eagercon.com>
13597
13598 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
13599 to hw_execute.
13600 * linux-x86-low.c (x86_insert_point, x86_remove_point):
13601 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
13602 hardware breakpoint.
13603
13604 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13605
13606 * gdbserver/linux-low.c (initialize_low): Call
13607 linux_ptrace_init_warnings.
13608
13609 2012-07-02 Doug Evans <dje@google.com>
13610
13611 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
13612 pointer to int.
13613
13614 2012-07-02 Stan Shebs <stan@codesourcery.com>
13615
13616 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
13617 (ax.o): Add it to build rule.
13618 (ax-ipa.o): Ditto.
13619 (OBS): Add format.o.
13620 (IPA_OBS): Add format.o.
13621 * server.c (handle_query): Claim support for breakpoint commands.
13622 (process_point_options): Add command case.
13623 (process_serial_event): Leave running if there are printfs in
13624 effect.
13625 * mem-break.h (any_persistent_commands): Declare.
13626 (add_breakpoint_commands): Declare.
13627 (gdb_no_commands_at_breakpoint): Declare.
13628 (run_breakpoint_commands): Declare.
13629 * mem-break.c (struct point_command_list): New struct.
13630 (struct breakpoint): New field command_list.
13631 (any_persistent_commands): New function.
13632 (add_commands_to_breakpoint): New function.
13633 (add_breakpoint_commands): New function.
13634 (gdb_no_commands_at_breakpoint): New function.
13635 (run_breakpoint_commands): New function.
13636 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
13637 locally.
13638 * ax.c: Include format.h.
13639 (ax_printf): New function.
13640 (gdb_eval_agent_expr): Add printf opcode.
13641
13642 2012-06-13 Yao Qi <yao@codesourcery.com>
13643
13644 * server.c (start_inferior): Remove duplicated writes to fields
13645 'last_resume_kind' and 'last_status' of 'current_inferior'.
13646
13647 2012-06-12 Yao Qi <yao@codesourcery.com>
13648 Pedro Alves <palves@redhat.com>
13649
13650 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
13651 comment.
13652 * server.c (handle_v_cont): Extend comment.
13653
13654 2012-06-11 Yao Qi <yao@codesourcery.com>
13655
13656 * linux-low.c (linux_attach): Add 'static'.
13657
13658 2012-06-06 Yao Qi <yao@codesourcery.com>
13659
13660 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
13661
13662 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
13663
13664 Fix gcc -flto compilation warning.
13665 * server.c (main): Make variable multi_mode and attach volatile.
13666
13667 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13668
13669 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
13670 if the platform doesn't know about it.
13671
13672 2012-05-30 Jeff Kenton <jkenton@tilera.com>
13673
13674 * Makefile.in (SFILES): Add linux-tile-low.c.
13675 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
13676 * configure.srv: Handle tilegx-*-linux*.
13677 * linux-tile-low.c: New file.
13678
13679 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13680
13681 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
13682
13683 2012-05-24 Pedro Alves <palves@redhat.com>
13684
13685 PR gdb/7205
13686
13687 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
13688
13689 2012-05-24 Pedro Alves <palves@redhat.com>
13690
13691 PR gdb/7205
13692
13693 Replace target_signal with gdb_signal throughout.
13694
13695 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
13696
13697 * linux-low.c (linux_store_registers): Avoid the copying sequence
13698 when no data has been retrieved by ptrace.
13699
13700 2012-05-22 Will Deacon <will.deacon@arm.com>
13701
13702 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
13703 Include asm/ptrace.h.
13704 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
13705 already defined.
13706
13707 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
13708
13709 * linux-low.c (linux_store_registers): Don't re-retrieve data
13710 with ptrace that has already been obtained from /proc. Always
13711 copy any data retrieved with ptrace to the buffer supplied.
13712
13713 2012-05-11 Yao Qi <yao@codesourcery.com>
13714 Pedro Alves <palves@redhat.com>
13715
13716 * linux-low.c (enum stopping_threads_kind): New.
13717 (stopping_threads): Change type to `enum stopping_threads_kind'.
13718 (handle_extended_wait): If stopping and suspending threads, leave
13719 the new_lwp suspended too.
13720 (linux_wait_for_event): Adjust.
13721 (stop_all_lwps): Set `stopping_threads' to
13722 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
13723 whether we're suspending threads or just stopping them. Assert no
13724 recursion happens.
13725
13726 2012-04-29 Yao Qi <yao@codesourcery.com>
13727
13728 * server.h: Move some code to ...
13729 * gdbthread.h: ... here. New.
13730 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
13731 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
13732 (nto-low.o, win32-low.o): Likewise.
13733 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
13734 * regcache.c, remote-utils.c, server.c: Likewise.
13735 * target.c, tracepoint.c, win32-low.c: Likewise.
13736
13737 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13738
13739 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
13740 (PTRACE_ARG4_TYPE): Likewise.
13741 (PTRACE_XFER_TYPE): Likewise.
13742 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
13743 ptrace to PTRACE_ARG3_TYPE.
13744 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
13745 (PTRACE_ARG4_TYPE): Likewise.
13746 (PTRACE_XFER_TYPE): Likewise.
13747 (linux_detach_one_lwp): Cast fourth argument of
13748 ptrace to long then PTRACE_ARG4_TYPE.
13749 (regsets_fetch_inferior_registers): Cast third argument of
13750 ptrace to long then PTRACE_ARG3_TYPE.
13751 (regsets_store_inferior_registers): Likewise.
13752
13753 2012-04-20 Pedro Alves <palves@redhat.com>
13754
13755 * configure: Regenerate.
13756
13757 2012-04-19 Pedro Alves <palves@redhat.com>
13758
13759 * Makefile.in (GNULIB_BUILDDIR): New.
13760 (LIBGNU, INCGNU, GNULIB_H): Adjust.
13761 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
13762 (all, install-only, uninstall, clean-info, all-lib, clean): No
13763 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
13764 (maintainer-clean realclean distclean): Use subdir_do.
13765 (subdir_do): New.
13766 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
13767 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
13768 * acinclude.m4: Include acx_configure_dir.m4.
13769 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
13770 calls. Call AC_PROG_RANLIB. Configure gnulib using
13771 ACX_CONFIGURE_DIR.
13772 (GNULIB): New.
13773 (GNULIB_STDINT_H): Adjust.
13774 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
13775 * gdbreplay.c: Include build-gnulib/config.h.
13776 * server.h: Likewise.
13777 * aclocal.m4: Regenerate.
13778 * config.in: Regenerate.
13779 * configure: Regenerate.
13780
13781 2012-04-19 Pedro Alves <palves@redhat.com>
13782
13783 * Makefile.in (LIBGNU, INCGNU): Adjust.
13784 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
13785 (all, install-only, uninstall, clean-info, all-lib, clean)
13786 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
13787 * configure.ac: Adjust AC_OUTPUT output.
13788 * aclocal.m4: Regenerate.
13789 * configure: Regenerate.
13790
13791 2012-04-19 Pedro Alves <palves@redhat.com>
13792
13793 * Makefile.in (generated_files): New.
13794 (server_h): Remove the explicit dependency on config.h, and depend
13795 on $generated_files.
13796
13797 2012-04-19 Pedro Alves <palves@redhat.com>
13798
13799 * Makefile.in (INCGNU): Add -Ignulib.
13800
13801 2012-04-19 Pedro Alves <palves@redhat.com>
13802
13803 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
13804 (INCGNU): ... this, and spell out -I here.
13805 (GNULIB_LIB): Rename to ...
13806 (LIBGNU): ... this.
13807 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
13808
13809 2012-04-19 Pedro Alves <palves@redhat.com>
13810
13811 * config.in: Regenerate.
13812
13813 2012-04-19 Pedro Alves <palves@redhat.com>
13814
13815 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
13816 * server.h (memmem): Remove declaration.
13817 * config.in: Regenerate.
13818 * configure: Regenerate.
13819
13820 2012-04-19 Yao Qi <yao@codesourcery.com>
13821
13822 * Makefile.in (SFILES): Add common/vec.c.
13823 (OBS): Add vec.o.
13824 (vec.o): New rule.
13825
13826 2012-04-19 Yao Qi <yao@codesourcery.com>
13827
13828 * remote-utils.c (prepare_resume_reply): Replace with macro
13829 target_core_of_thread.
13830 * server.c (handle_qxfer_threads_proper): Likewise.
13831 * target.h (traget_core_of_thread): New macro.
13832
13833 2012-04-18 Pedro Alves <palves@redhat.com>
13834
13835 * aclocal.m4: Regenerate.
13836 * configure: Regenerate.
13837
13838 2012-04-16 Yao Qi <yao@codesourcery.com>
13839
13840 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
13841 duplicated on address.
13842
13843 2012-04-16 Yao Qi <yao@codesourcery.com>
13844
13845 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
13846 (struct tracepoint_action_ops) <send>: New field.
13847 (m_tracepoint_action_send, r_tracepoint_action_send): New.
13848 (agent_expr_send, x_tracepoint_action_send): New.
13849 (l_tracepoint_action_send): New.
13850 (cmd_qtdp): Download and install tracepoint
13851 according to `use_agent'.
13852 (run_inferior_command): Add one more parameter `len'.
13853 Update callers.
13854 (tracepoint_send_agent): New.
13855 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
13856
13857 2012-04-16 Yao Qi <yao@codesourcery.com>
13858
13859 * tracepoint.c (download_tracepoints): Moved to ...
13860 (cmd_qtstart): ... here.
13861
13862 2012-04-14 Yao Qi <yao@codesourcery.com>
13863
13864 * tracepoint.c: Include inttypes.h.
13865 (struct collect_memory_action): Use sized types.
13866 (struct tracepoint): Likewise.
13867 (cmd_qtdp, stop_tracing): Update print specifiers.
13868 (cmd_qtp, response_tracepoint): Likewise.
13869 (collect_data_at_tracepoint): Likewise.
13870 (collect_data_at_step): Likewise.
13871
13872 2012-04-14 Yao Qi <yao@codesourcery.com>
13873
13874 Import gnulib module inttypes.
13875 * aclocal.m4, config.in, configure: Regenerated.
13876
13877 2012-04-14 Yao Qi <yao@codesourcery.com>
13878
13879 * Makefile.in (maintainer-clean, realclean, distclean): Remove
13880 Makefile and config.status at last.
13881
13882 2012-04-13 Yao Qi <yao@codesourcery.com>
13883
13884 * tracepoint.c: Include stdint.h unconditionally.
13885
13886 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13887
13888 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
13889 on BFD_HAVE_SYS_PROCFS_TYPE.
13890 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
13891 * configure: Regenerate.
13892 * config.in: Likewise.
13893
13894 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
13895
13896 * Makefile.in (clean): Also remove x32.c x32-linux.c
13897 x32-avx.c x32-avx-linux.c.
13898 (x32.o): New target.
13899 (x32.c): Likewise.
13900 (x32-linux.o): Likewise.
13901 (x32-linux.c): Likewise.
13902 (x32-avx.o): Likewise.
13903 (x32-avx.c): Likewise.
13904 (x32-avx-linux.o): Likewise.
13905 (x32-avx-linux.c): Likewise.
13906
13907 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
13908 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
13909 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
13910 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
13911 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
13912 i386/x32-avx-linux.xml.
13913
13914 * linux-x86-low.c (init_registers_x32_linux): New prototype.
13915 (init_registers_x32_avx_linux): Likwise.
13916 (x86_linux_update_xmltarget): Call init_registers_x32_linux
13917 or init_registers_x32_avx_linux if linux_is_elf64 is false.
13918
13919 2012-04-13 Pedro Alves <palves@redhat.com>
13920
13921 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
13922 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
13923 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
13924 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
13925 the sub-make.
13926
13927 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
13928
13929 * linux-x86-low.c (compat_x32_clock_t): New.
13930 (compat_x32_siginfo_t): Likewise.
13931 (compat_x32_siginfo_from_siginfo): Likewise.
13932 (siginfo_from_compat_x32_siginfo): Likewise.
13933 (linux_is_elf64): Likewise.
13934 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
13935 and siginfo_from_compat_x32_siginfo for x32.
13936 (x86_arch_setup): Set linux_is_elf64.
13937
13938 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
13939
13940 PR gdb/13969
13941 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
13942 e_machine field.
13943 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
13944 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
13945 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
13946 compatible with process.
13947
13948 2012-04-12 Yao Qi <yao@codesourcery.com>
13949
13950 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
13951 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
13952 (install-only, install-info, clean): Handle sub dir gnulib.
13953 (all-lib, am--refresh): New targets.
13954 (memmem.o): Remove target.
13955 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
13956 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
13957 (AC_REPLACE_FUNCS): Remove memmem.
13958 Invoke gl_INIT and AM_INIT_AUTOMAKE.
13959 (AC_OUTPUT): Generate Makefile in gnulib/.
13960 * aclocal.m4, config.in, configure: Regenerated.
13961
13962 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
13963
13964 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
13965
13966 2012-04-05 Pedro Alves <palves@redhat.com>
13967
13968 -Werror=strict-aliasing
13969
13970 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
13971 pointer.
13972
13973 2012-04-04 Pedro Alves <palves@redhat.com>
13974
13975 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13976 (sparc_store_gregset_from_stack, sparc_store_gregset)
13977 (sparc_breakpoint_at): Fix formatting.
13978
13979 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13980
13981 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
13982 are available.
13983 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
13984 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
13985 * config.in: Regenerate.
13986 * configure: Likewise.
13987
13988 2012-03-29 Pedro Alves <palves@redhat.com>
13989
13990 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
13991 Correct ptrace arguments.
13992
13993 2012-03-28 Pedro Alves <palves@redhat.com>
13994
13995 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
13996 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
13997 (IA64_FR1_REGNUM): New defines.
13998 (ia64_fetch_register): New.
13999 (the_low_target): Install it.
14000 * linux-low.h (struct linux_target_ops) <fetch_register>: New
14001 field.
14002 * linux-low.c (linux_fetch_registers): Try the
14003 the_low_target.fetch_register hook first.
14004
14005 * linux-arm-low.c (the_low_target): Adjust.
14006 * linux-bfin-low.c (the_low_target): Adjust.
14007 * linux-cris-low.c (the_low_target): Adjust.
14008 * linux-crisv32-low.c (the_low_target): Adjust.
14009 * linux-m32r-low.c (the_low_target): Adjust.
14010 * linux-m68k-low.c (the_low_target): Adjust.
14011 * linux-mips-low.c (the_low_target): Adjust.
14012 * linux-ppc-low.c (the_low_target): Adjust.
14013 * linux-s390-low.c (the_low_target): Adjust.
14014 * linux-sh-low.c (the_low_target): Adjust.
14015 * linux-sparc-low.c (the_low_target): Adjust.
14016 * linux-tic6x-low.c (the_low_target): Adjust.
14017 * linux-x86-low.c (the_low_target): Adjust.
14018 * linux-xtensa-low.c (the_low_target): Adjust.
14019
14020 2012-03-26 Pedro Alves <palves@redhat.com>
14021
14022 * server.c (handle_qxfer_libraries): Don't bail early if
14023 the_target->qxfer_libraries_svr4 is not NULL.
14024
14025 2012-03-26 Pedro Alves <palves@redhat.com>
14026
14027 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
14028
14029 2012-03-23 Pedro Alves <palves@redhat.com>
14030
14031 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
14032 "library-list-svr4" element's start tag when the the DSO list is
14033 empty.
14034
14035 2012-03-23 Pedro Alves <palves@redhat.com>
14036
14037 * linux-low.c (read_one_ptr): Read the inferior's pointer through
14038 a variable whose type size is the same as the inferior's pointer
14039 size.
14040
14041 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
14042
14043 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
14044 struct siginfo.
14045 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
14046 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
14047 * linux-low.h: Include <signal.h>.
14048 (struct siginfo): Remove forward declaration.
14049 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
14050 struct siginfo.
14051
14052 2012-03-21 Mike Frysinger <vapier@gentoo.org>
14053
14054 * .gitignore: Ignore more files.
14055
14056 2012-03-19 Pedro Alves <palves@redhat.com>
14057 Jan Kratochvil <jan.kratochvil@redhat.com>
14058
14059 * server.c (cont_thread, general_thread): Add describing comments.
14060 (start_inferior): Clear `cont_thread'.
14061 (handle_v_cont): Don't set `cont_thread' if resuming all threads
14062 of a process.
14063
14064 2012-03-15 Yao Qi <yao@codesourcery.com>
14065
14066 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
14067 handling to ...
14068 (cmd_qtdp): ... here.
14069
14070 2012-03-15 Yao Qi <yao@codesourcery.com>
14071
14072 * tracepoint.c (struct tracepoint_action_ops): New.
14073 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
14074 (m_tracepoint_action_download): New.
14075 (r_tracepoint_action_download): New.
14076 (x_tracepoint_action_download): New.
14077 (l_tracepoint_action_download): New.
14078 (add_tracepoint_action): Install `action->ops' according type.
14079 (download_tracepoint_1): Move code `download' function pointer
14080 of various tracepoint_action_ops.
14081
14082 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14083
14084 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
14085 linux_ptrace_attach_warnings.
14086
14087 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
14088
14089 * Makefile.in (linux-ptrace.o): New.
14090 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
14091 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
14092 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
14093 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
14094 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
14095 of these targets.
14096 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
14097
14098 2012-03-08 Yao Qi <yao@codesourcery.com>
14099 Pedro Alves <palves@redhat.com>
14100
14101 Fix PR server/13392.
14102 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14103 offset of JMP insn.
14104 * tracepoint.c (remove_tracepoint): New.
14105 (cmd_qtdp): Call remove_tracepoint when failed to install.
14106
14107 2012-03-07 Pedro Alves <palves@redhat.com>
14108
14109 * linux-low.c (get_detach_signal): New.
14110 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14111 Pass on pending signals to PTRACE_DETACH. Check the result of the
14112 ptrace call.
14113 * server.c (program_signals, program_signals_p): New.
14114 (handle_general_set): Handle QProgramSignals.
14115 * server.h (program_signals, program_signals_p): Declare.
14116
14117 2012-03-05 Pedro Alves <palves@redhat.com>
14118 Jan Kratochvil <jan.kratochvil@redhat.com>
14119
14120 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14121 New comment why.
14122
14123 2012-03-03 Yao Qi <yao@codesourcery.com>
14124
14125 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14126 agent_look_up_symbols.
14127
14128 2012-03-03 Yao Qi <yao@codesourcery.com>
14129
14130 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14131 (linux-x86-low.o): Likewise.
14132 * server.h: Remove in_process_agent_loaded.
14133 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14134 common/agent.c.
14135 Update callers.
14136
14137 2012-03-03 Yao Qi <yao@codesourcery.com>
14138
14139 * tracepoint.c (gdb_agent_capability): New global.
14140 (in_process_agent_loaded_ust): Renamed to
14141 `in_process_agent_supports_ust'.
14142 Update callers.
14143 (in_process_agent_supports_ust): Call agent_capability_check.
14144 (clear_installed_tracepoints): Assert that agent supports
14145 agent.
14146
14147 2012-03-03 Yao Qi <yao@codesourcery.com>
14148
14149 * linux-low.c (linux_supports_agent): New.
14150 (linux_target_ops): Initialize field `supports_agent' with
14151 linux_supports_agent.
14152 * target.h (struct target_ops) <supports_agent>: New.
14153 (target_supports_agent): New macro.
14154 * server.c (handle_general_set): Handle packet 'QAgent'.
14155 (handle_query): Send `QAgent+'.
14156 * Makefile.in (server.o): Depends on agent.h.
14157
14158 2012-03-03 Yao Qi <yao@codesourcery.com>
14159
14160 * Makefile.in (OBS): Add agent.o.
14161 Add new rule for agent.o.
14162 Track dependence of tracepoint.c on agent.h.
14163 * tracepoint.c (run_inferior_command_1):
14164 (run_inferior_command): Call agent_run_command.
14165 (gdb_ust_connect_sync_socket): Deleted. Move it to
14166 common/agent.c.
14167 (resume_thread, stop_thread): Likewise.
14168 (gdb_ust_socket_init): Renamed to ...
14169 (gdb_agent_socket_init): ... New.
14170 (gdb_ust_thread): Renamed to ...
14171 (gdb_agent_helper_thread): ... New.
14172 (gdb_ust_init): Move some code to ...
14173 (gdb_agent_init): ... here. New.
14174 [HAVE_UST]: Call gdb_ust_init.
14175 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14176 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14177 * config.in, configure: Regenerated.
14178
14179 2012-03-02 Pedro Alves <palves@redhat.com>
14180
14181 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14182 * linux-low.c (struct simple_pid_list): New.
14183 (stopped_pids): New a struct simple_pid_list pointer.
14184 (add_to_pid_list, pull_pid_from_list): New.
14185 (handle_extended_wait): Don't assume the first signal new children
14186 report is SIGSTOP. Adjust call to pull_pid_from_list.
14187 (linux_wait_for_lwp): Adjust.
14188
14189 2012-03-02 Yao Qi <yao@codesourcery.com>
14190
14191 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14192 debug log.
14193
14194 2012-03-02 Yao Qi <yao@codesourcery.com>
14195
14196 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14197 `stop_pc' and `tpoint'. Update caller.
14198
14199 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14200
14201 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14202 * linux-low.c (use_linux_regsets): New macro.
14203 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14204 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14205 (linux_register_in_regsets): New function.
14206 (usr_fetch_inferior_registers): Skip registers covered by
14207 regsets.
14208 (usr_store_inferior_registers): Likewise.
14209 (usr_fetch_inferior_registers): New macro.
14210 (usr_store_inferior_registers): Likewise.
14211 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14212 (linux_store_registers): Likewise.
14213 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14214 prototype.
14215 (init_registers_mips64_dsp_linux): Likewise.
14216 (init_registers_mips_linux): New macro.
14217 (init_registers_mips_dsp_linux): Likewise.
14218 (mips_dsp_num_regs): Likewise.
14219 (DSP_BASE, DSP_CONTROL): New fallback macros.
14220 (mips_base_regs): New macro.
14221 (mips_regmap): Use it. Fix the size.
14222 (mips_dsp_regmap): New variable.
14223 (mips_dsp_regset_bitmap): Likewise.
14224 (mips_arch_setup): New function.
14225 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14226 than mips_regmap.
14227 (mips_cannot_store_register): Likewise.
14228 (the_low_target): Update .arch_setup, .num_regs and .regmap
14229 initializers. Add .regset_bitmap initializer.
14230 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14231 initializer.
14232 * linux-bfin-low.c (the_low_target): Likewise.
14233 * linux-cris-low.c (the_low_target): Likewise.
14234 * linux-crisv32-low.c (the_low_target): Likewise.
14235 * linux-ia64-low.c (the_low_target): Likewise.
14236 * linux-m32r-low.c (the_low_target): Likewise.
14237 * linux-m68k-low.c (the_low_target): Likewise.
14238 * linux-ppc-low.c (the_low_target): Likewise.
14239 * linux-s390-low.c (the_low_target): Likewise.
14240 * linux-sh-low.c (the_low_target): Likewise.
14241 * linux-sparc-low.c (the_low_target): Likewise.
14242 * linux-tic6x-low.c (the_low_target): Likewise.
14243 * linux-x86-low.c (the_low_target): Likewise.
14244 * linux-xtensa-low.c (the_low_target): Likewise.
14245 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14246 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14247 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14248 srv_xmlfiles.
14249 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14250 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14251
14252 2012-02-29 Yao Qi <yao@codesourcery.com>
14253 Pedro Alves <palves@redhat.com>
14254
14255 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14256 `step_over_finished' is true.
14257
14258 2012-02-27 Pedro Alves <palves@redhat.com>
14259
14260 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14261 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14262
14263 2012-02-27 Pedro Alves <palves@redhat.com>
14264
14265 PR server/9684
14266 * linux-low.c (pid_is_stopped): New.
14267 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14268
14269 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14270
14271 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14272 of conditions.
14273
14274 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14275
14276 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14277
14278 2012-02-24 Luis Machado <lgustavo@codesourcery>
14279
14280 * server.c (handle_query): Advertise support for target-side
14281 breakpoint condition evaluation.
14282 (process_point_options): New function.
14283 (process_serial_event): When inserting a breakpoint, check for
14284 a target-side condition that should be evaluated.
14285
14286 * mem-break.c: Include regcache.h and ax.h.
14287 (point_cond_list_t): New data structure.
14288 (breakpoint) <cond_list>: New field.
14289 (find_gdb_breakpoint_at): Make non-static.
14290 (delete_gdb_breakpoint_at): Clear any target-side
14291 conditions.
14292 (clear_gdb_breakpoint_conditions): New function.
14293 (add_condition_to_breakpoint): Likewise.
14294 (add_breakpoint_condition): Likewise.
14295 (gdb_condition_true_at_breakpoint): Likewise.
14296 (gdb_breakpoint_here): Return result directly instead
14297 of going through a local variable.
14298
14299 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14300 (clear_gdb_breakpoint_conditions): Likewise.
14301 (add_breakpoint_condition): Likewise.
14302 (gdb_condition_true_at_breakpoint): Likewise.
14303
14304 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14305 (need_step_over_p): Take target-side breakpoint condition into
14306 consideration.
14307
14308 2012-02-24 Luis Machado <lgustavo@codesourcery>
14309
14310 * server.h: Include tracepoint.h.
14311 (agent_mem_read, agent_get_trace_state_variable_value,
14312 agent_set_trace_state_variable_value,
14313 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14314 get_set_tsv_func_addr): New prototypes.
14315
14316 * ax.h: New include file.
14317 * ax.c: New source file.
14318
14319 * tracepoint.c: Include ax.h.
14320 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14321 agent_expr, eval_result_type): Move to ax.h.
14322 (parse_agent_expr): Rename to ...
14323 (gdb_parse_agent_expr): ... this, make it non-static and move
14324 to ax.h.
14325 (unparse_agent_expr) Rename to ...
14326 (gdb_unparse_agent_expr): ... this, make it non-static and move
14327 to ax.h.
14328 (eval_agent_expr): Rename to ...
14329 (eval_tracepoint_agent_expr): ... this.
14330 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14331 forward declarations.
14332 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14333 (agent_get_trace_state_variable_value): New function.
14334 (agent_set_trace_state_variable_value): New function.
14335 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14336 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14337 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14338 (condition_true_at_tracepoint): Likewise.
14339 (parse_agent_expr): Rename to ...
14340 (gdb_parse_agent_expr): ... this and move to ax.c.
14341 (unparse_agent_expr): Rename to ...
14342 (gdb_unparse_agent_expr): ... this and move to ax.c.
14343 (gdb_agent_op_name): Move to ax.c.
14344 (eval_agent_expr): Rename to ...
14345 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14346 and move to ax.c.
14347 (eval_tracepoint_agent_expr): New function.
14348 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14349 non-static.
14350 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14351 ax.c.
14352 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14353 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14354 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14355 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14356 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14357 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14358 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14359 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14360 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14361 (compile_bytecodes): Remove forward declaration.
14362 (is_goto_target): Move to ax.c.
14363 (compile_bytecodes): Move to ax.c and call
14364 agent_get_trace_state_variable_value (...) and
14365 agent_set_trace_state_variable_value (...).
14366
14367 * Makefile.in: Update ax.c and IPA dependencies.
14368
14369 2012-02-24 Pedro Alves <palves@redhat.com>
14370
14371 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14372 (cmd_bigqtbuffer_circular): ... this. Only handle
14373 'QTBuffer:circular:'.
14374 (handle_tracepoint_general_set): Adjust.
14375
14376 2012-02-16 Yao Qi <yao@codesourcery.com>
14377
14378 * inferiors.c: Move code to ...
14379 * dll.c: .... here. New.
14380 * server.h: Declare clear_dlls.
14381 * Makefile.in (SFILES): Add dll.c.
14382 (OBS): Add dll.o
14383 (dll.o): New rule.
14384
14385 2012-02-11 Yao Qi <yao@codesourcery.com>
14386
14387 * server.c: (handle_monitor_command): Add a new parameter
14388 `own_buf'.
14389 (handle_query): Update caller.
14390
14391 2012-02-09 Joel Brobecker <brobecker@adacore.com>
14392
14393 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14394 * configure, config.in: Regenerate.
14395 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14396 is not defined.
14397
14398 2012-02-02 Pedro Alves <palves@redhat.com>
14399
14400 Try SIGKILL first, then PTRACE_KILL.
14401 * linux-low.c (linux_kill_one_lwp): New.
14402 (linux_kill_one_lwp): Rename to ...
14403 (kill_one_lwp_callback): ... this. Use the new
14404 linux_kill_one_lwp.
14405
14406 2012-02-02 Pedro Alves <palves@redhat.com>
14407
14408 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14409 inferior.
14410
14411 2012-01-27 Pedro Alves <palves@redhat.com>
14412
14413 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14414 (elf_64_file_p): Make static.
14415 (linux_pid_exe_is_elf_64_file): New.
14416 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14417 Delete declarations.
14418 (linux_pid_exe_is_elf_64_file): Declare.
14419 * linux-x86-low.c (x86_arch_setup): Use
14420 linux_pid_exe_is_elf_64_file.
14421
14422 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14423
14424 * linux-low.c (linux_wait_for_event_1): Rename to ...
14425 (linux_wait_for_event): ... here and merge it with former
14426 linux_wait_for_event - new variable wait_ptid, use it.
14427 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14428
14429 2012-01-23 Pedro Alves <palves@redhat.com>
14430
14431 * server.c (main): Avoid yet another case of infinite loop while
14432 detaching/killing after a longjmp.
14433
14434 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14435
14436 Code cleanup.
14437 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14438
14439 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14440
14441 * hostio.c (handle_readlink): New function.
14442 (handle_vFile): Call it to handle "vFile:readlink" packets.
14443
14444 2012-01-20 Pedro Alves <palves@redhat.com>
14445 Ulrich Weigand <ulrich.weigand@linaro.org>
14446
14447 * server.c (handle_v_requests): Only support vAttach and vRun to
14448 start multiple processes when in extended protocol mode.
14449
14450 2012-01-17 Pedro Alves <palves@redhat.com>
14451
14452 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14453 memalign plus mprotect to allocate the scratch buffer.
14454
14455 2012-01-13 Pedro Alves <palves@redhat.com>
14456
14457 * server.c (attach_inferior): Clear `cont_thread'.
14458
14459 2012-01-13 Pedro Alves <palves@redhat.com>
14460
14461 * server.c (main): Avoid infinite loop while detaching/killing
14462 after a longjmp.
14463
14464 2012-01-09 Doug Evans <dje@google.com>
14465
14466 * server.c (start_inferior): Set last_ptid in --wrapper case.
14467
14468 2012-01-06 Yao Qi <yao@codesourcery.com>
14469
14470 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14471 defined.
14472 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14473
14474 2012-01-04 Yao Qi <yao@codesourcery.com>
14475
14476 * tracepoint.c (cmd_qtdp): Print debug message
14477 for static tracepoint.
14478
14479 2012-01-04 Yao Qi <yao@codesourcery.com>
14480
14481 * tracepoint.c (trace_vdebug): Differentiate debug message
14482 between gdbserver and IPA.
14483
14484 2012-01-03 Yao Qi <yao@codesourcery.com>
14485
14486 * tracepoint.c (tracepoint_was_hit): Don't collect for
14487 static tracepoint.
14488
14489 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14490
14491 * terminal.h: Reformat copyright header.
14492
14493 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14494
14495 * server.c (gdbserver_version): Update copyright year.
14496 * gdbreplay.c (gdbreplay_version): Likewise.
14497
14498 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14499
14500 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14501
14502 Revert:
14503 2011-12-18 Hui Zhu <teawater@gmail.com>
14504 * linux-low.c (linux_create_inferior): Save return value to ret.
14505
14506 2011-12-18 Hui Zhu <teawater@gmail.com>
14507
14508 * linux-low.c (linux_create_inferior): Save return value to ret.
14509
14510 2011-12-16 Doug Evans <dje@google.com>
14511
14512 * linux-low.c (linux_create_inferior): If stdio connection,
14513 redirect stdin from /dev/null, stdout to stderr.
14514 * remote-utils.c (remote_is_stdio): New static global.
14515 (remote_connection_is_stdio): New function.
14516 (remote_prepare): Handle stdio connection.
14517 (remote_open): Ditto.
14518 (remote_close): Don't close stdin for stdio connections.
14519 (read_prim,write_prim): New functions. Replace all calls to
14520 read/write to these.
14521 * server.c (main): Watch for "-" argument. Move call to
14522 remote_prepare before start_inferior.
14523 * server.h (STDIO_CONNECTION_NAME): New macro.
14524 (remote_connection_is_stdio): Declare.
14525
14526 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14527 in debugging output.
14528
14529 2011-12-15 Yao Qi <yao@codesourcery.com>
14530
14531 * tracepoint.c: Include sys/syscall.h.
14532 (gdb_ust_thread): Remove preprocessor conditional.
14533
14534 2011-12-14 Pedro Alves <pedro@codesourcery.com>
14535
14536 * linux-low.c (linux_detach_one_lwp): Call
14537 the_low_target.prepare_to_resume before detaching.
14538
14539 2011-12-14 Yao Qi <yao@codesourcery.com>
14540
14541 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14542 of write.
14543
14544 2011-12-14 Yao Qi <yao@codesourcery.com>
14545
14546 * i386-low.c (i386_low_stopped_data_address): Initialize local
14547 variable `control'.
14548
14549 2011-12-13 Pedro Alves <pedro@codesourcery.com>
14550
14551 PR remote/13492
14552
14553 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14554 DR_CONTROL unless necessary. Extend comments.
14555 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14556 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14557
14558 2011-12-13 Yao Qi <yao@codesourcery.com>
14559
14560 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14561 macros.
14562 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
14563
14564 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
14565
14566 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
14567 Print new debug message for such case.
14568
14569 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14570
14571 Fix overlapping memcpy.
14572 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
14573 the read_inferior_memory transfer.
14574 (delete_fast_tracepoint_jump): New variable buf. Use it for the
14575 write_inferior_memory transfer.
14576 (set_fast_tracepoint_jump): New variable buf. Use it for the
14577 read_inferior_memory and write_inferior_memory transfers.
14578 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
14579 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
14580 Use it for the write_inferior_memory transfer.
14581 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
14582 buffers.
14583
14584 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14585
14586 * linux-low.c (fetch_register, store_register): Make code
14587 consistent, fix formatting.
14588
14589 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14590
14591 * linux-low.c (usr_store_inferior_registers): Factor out code
14592 to handle individual registers into...
14593 (store_register): ... this new function.
14594
14595 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
14596
14597 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
14598 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
14599 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
14600 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
14601 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
14602 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
14603 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
14604 (srv_xmlfiles): Add new XML files.
14605
14606 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
14607 and <sys/uio.h>.
14608 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
14609 (init_registers_s390_linux32v1): Add prototype.
14610 (init_registers_s390_linux32v2): Likewise.
14611 (init_registers_s390_linux64v1): Likewise.
14612 (init_registers_s390_linux64v2): Likewise.
14613 (init_registers_s390x_linux64v1): Likewise.
14614 (init_registers_s390x_linux64v2): Likewise.
14615 (s390_num_regs): Increment to 52.
14616 (s390_regmap): Add orig_r2 register.
14617 (s390_num_regs_3264): Increment to 68.
14618 (s390_regmap_3264): Add orig_r2 register.
14619 (s390_collect_ptrace_register): Handle orig_r2 register.
14620 (s390_supply_ptrace_register): Likewise.
14621 (s390_fill_last_break): New function.
14622 (s390_store_last_break): Likewise.
14623 (s390_fill_system_call): New function.
14624 (s390_store_system_call): Likewise.
14625 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
14626 register sets.
14627 (s390_check_regset): New function.
14628 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
14629 NT_S390_SYSTEM_CALL regsets and use appropriate description.
14630 Update target_regsets for available register sets.
14631
14632 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
14633 Jan Kratochvil <jan.kratochvil@redhat.com>
14634
14635 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
14636 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
14637 New.
14638 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
14639 * linux-low.h (struct process_info_private): New member r_debug.
14640 * server.c (handle_qxfer_libraries): Call
14641 the_target->qxfer_libraries_svr4.
14642 (handle_qxfer_libraries_svr4): New function.
14643 (qxfer_packets): New entry "libraries-svr4".
14644 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
14645 * target.h (struct target_ops): New member qxfer_libraries_svr4.
14646 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
14647 PACKET_qXfer_libraries_svr4.
14648
14649 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
14650
14651 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
14652 PSW address/mask between 8-byte and 16-byte formats.
14653 (s390_supply_ptrace_register): Likewise.
14654 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
14655 basic addressing mode bit.
14656
14657 2011-11-24 Stan Shebs <stan@codesourcery.com>
14658
14659 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
14660
14661 2011-11-17 Stan Shebs <stan@codesourcery.com>
14662
14663 * tracepoint.c (struct tracepoint): New field traceframe_usage.
14664 (tracing_start_time): New global.
14665 (tracing_stop_time): New global.
14666 (tracing_user_name): New global.
14667 (tracing_notes): New global.
14668 (tracing_stop_note): New global.
14669 (cmd_qtstart): Set traceframe_usage, start_time.
14670 (stop_tracing): Set stop_time.
14671 (cmd_qtstatus): Report additional status.
14672 (cmd_qtp): New function.
14673 (handle_tracepoint_query): Call it.
14674 (cmd_qtnotes): New function.
14675 (handle_tracepoint_general_set): Call it.
14676 (get_timestamp): Rename from tsv_get_timestamp.
14677
14678 2011-11-14 Stan Shebs <stan@codesourcery.com>
14679 Kwok Cheung Yeung <kcy@codesourcery.com>
14680
14681 * linux-x86-low.c (small_jump_insn): New.
14682 (i386_install_fast_tracepoint_jump_pad): Add arguments for
14683 trampoline and error message, build a trampoline and issue a small
14684 jump instruction to it.
14685 (x86_install_fast_tracepoint_jump_pad): Add arguments for
14686 trampoline and error message.
14687 (x86_get_min_fast_tracepoint_insn_len): New.
14688 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
14689 * linux-low.h (struct linux_target_ops): Add arguments to
14690 install_fast_tracepoint_jump_pad operation, add new operation.
14691 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
14692 arguments.
14693 (linux_get_min_fast_tracepoint_insn_len): New function.
14694 (linux_target_op): Add new operation.
14695 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
14696 (gdb_trampoline_buffer_end): Ditto.
14697 (gdb_trampoline_buffer_error): Ditto.
14698 (struct ipa_sym_addresses): Add fields for new IPA variables.
14699 (symbol_list): Add entries for new IPA variables.
14700 (struct tracepoint): Add fields to hold the address range of the
14701 trampoline used by the tracepoint.
14702 (trampoline_buffer_head): New static variable.
14703 (trampoline_buffer_tail): Ditto.
14704 (claim_trampoline_space): New function.
14705 (have_fast_tracepoint_trampoline_buffer): New function.
14706 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
14707 structure.
14708 (install_fast_tracepoint): Ditto, also add error buffer argument.
14709 (cmd_qtminftpilen): New function.
14710 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
14711 (fast_tracepoint_from_trampoline_address): New function.
14712 (fast_tracepoint_collecting): Handle trampoline as part of jump
14713 pad space.
14714 (set_trampoline_buffer_space): New function.
14715 (initialize_tracepoint): Initialize new IPA variables.
14716 * target.h (struct target_ops): Add arguments to
14717 install_fast_tracepoint_jump_pad operation, add new
14718 get_min_fast_tracepoint_insn_len operation.
14719 (target_get_min_fast_tracepoint_insn_len): New.
14720 (install_fast_tracepoint_jump_pad): Add arguments.
14721 * server.h (IPA_BUFSIZ): Define.
14722 * linux-i386-ipa.c: Include extra header files.
14723 (initialize_fast_tracepoint_trampoline_buffer): New function.
14724 (initialize_low_tracepoint): Call it.
14725 * server.h (set_trampoline_buffer_space): Declare.
14726 (claim_trampoline_space): Ditto.
14727 (have_fast_tracepoint_trampoline_buffer): Ditto.
14728
14729 2011-11-14 Yao Qi <yao@codesourcery.com>
14730
14731 * server.c (handle_query): Handle InstallInTrace for qSupported.
14732 * tracepoint.c (add_tracepoint): Sort list.
14733 (install_tracepoint, download_tracepoint): New.
14734 (cmd_qtdp): Call them to install and download tracepoints.
14735 (sort_tracepoints): Removed.
14736 (cmd_qtstart): Update.
14737
14738 2011-11-14 Yao Qi <yao@codesourcery.com>
14739
14740 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
14741 * mem-break.h: Declare.
14742 * tracepoint.c (cmd_qtstart): Move some code to ...
14743 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
14744 New.
14745 (download_tracepoints): Move some code to ...
14746 (download_tracepoint_1): ... here. New.
14747
14748 2011-11-08 Yao Qi <yao@codesourcery.com>
14749
14750 * remote-utils.c (relocate_instruction): A comment fix.
14751
14752 2011-11-07 Joel Brobecker <brobecker@adacore.com>
14753
14754 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
14755 (i386_dr_low_get_control, i386_dr_low_get_status): Use
14756 dr_status_mirror and dr_control_mirror from debug_reg_state.
14757 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
14758 (i386_initial_stuff): Remove use of deleted globals.
14759 (i386_get_thread_context, i386_set_thread_context,
14760 i386_thread_added): Use dr_status_mirror and dr_control_mirror
14761 from debug_reg_state.
14762
14763 2011-11-05 Yao Qi <yao@codesourcery.com>
14764
14765 * tracepoint.c (gdb_collect): Loop over tracepoints of same
14766 address as TPOINT's.
14767
14768 2011-11-02 Stan Shebs <stan@codesourcery.com>
14769
14770 * tracepoint.c (agent_mem_read_string): New function.
14771 (eval_agent_expr): Call it for tracenz.
14772 * server.c (handle_query): Report support for tracenz.
14773
14774 2011-11-02 Yao Qi <yao@codesourcery.com>
14775
14776 * tracepoint.c (cmd_qtstart): Remove unused local variables.
14777
14778 2011-11-02 Yao Qi <yao@codesourcery.com>
14779
14780 * target.h: Fix a typo in comment.
14781
14782 2011-10-31 Pedro Alves <pedro@codesourcery.com>
14783
14784 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
14785 clobber the breakpoints' shadows with fast tracepoint jumps.
14786 * mem-break.h (check_mem_write): Add `myaddr' parameter.
14787 * target.c (write_inferior_memory): Also pass MYADDR down to
14788 check_mem_write.
14789
14790 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
14791
14792 * configure.ac: Check support for personality routine.
14793 * configure: Regenerate.
14794 * config.in: Likewise.
14795 * linux-low.c: Include <sys/personality.h>.
14796 Define ADDR_NO_RANDOMIZE if necessary.
14797 (linux_create_inferior): Disable address space randomization when
14798 forking inferior, if requested.
14799 (linux_supports_disable_randomization): New function.
14800 (linux_target_ops): Install it.
14801 * server.h (disable_randomization): Declare.
14802 * server.c (disable_randomization): New global variable.
14803 (handle_general_set): Handle QDisableRandomization.
14804 (handle_query): Likewise for qSupported.
14805 (main): Support --disable-randomization and --no-disable-randomization
14806 command line arguments.
14807 * target.h (struct target_ops): Add supports_disable_randomization.
14808 (target_supports_disable_randomization): New macro.
14809
14810 2011-09-29 Mike Frysinger <vapier@gentoo.org>
14811
14812 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
14813 ifdef check.
14814 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
14815 [!PT_GETDSBT] (target_loadmap): New definition.
14816 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
14817 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
14818 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
14819 and PT_GETDSBT to LINUX_LOADMAP.
14820 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
14821 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
14822
14823 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
14824
14825 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
14826 (arm_linux_hwbp_cap): New static variable.
14827 (arm_linux_get_hwbp_cap): Replace by ...
14828 (arm_linux_init_hwbp_cap): ... this new function.
14829 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
14830 (arm_linux_get_hw_watchpoint_count): Likewise.
14831 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14832 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
14833 (arm_prepare_to_resume): Use perror_with_name instead of error.
14834
14835 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
14836
14837 * linux-arm-low.c: Include <signal.h>.
14838 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
14839 (struct arm_linux_hwbp_cap): New data type.
14840 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
14841 (struct arm_linux_hw_breakpoint): New data type.
14842 (MAX_BPTS, MAX_WPTS): Define.
14843 (struct arch_process_info, struct arch_lwp_info): New data types.
14844 (arm_linux_get_hwbp_cap): New function.
14845 (arm_linux_get_hw_breakpoint_count): Likewise.
14846 (arm_linux_get_hw_watchpoint_count): Likewise.
14847 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14848 (arm_hwbp_control_initialize): Likewise.
14849 (arm_hwbp_control_is_enabled): Likewise.
14850 (arm_hwbp_control_is_initialized): Likewise.
14851 (arm_hwbp_control_disable): Likewise.
14852 (arm_linux_hw_breakpoint_equal): Likewise.
14853 (arm_linux_hw_point_initialize): Likewise.
14854 (struct update_registers_data): New data structure.
14855 (update_registers_callback: New function.
14856 (arm_insert_point): Likewise.
14857 (arm_remove_point): Likewise.
14858 (arm_stopped_by_watchpoint): Likewise.
14859 (arm_stopped_data_address): Likewise.
14860 (arm_new_process): Likewise.
14861 (arm_new_thread): Likewise.
14862 (arm_prepare_to_resume): Likewise.
14863 (the_low_target): Register arm_insert_point, arm_remove_point,
14864 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
14865 arm_new_thread, and arm_prepare_to_resume.
14866
14867 2011-09-15 Stan Shebs <stan@codesourcery.com>
14868
14869 * server.h (struct emit_ops): Add compare-goto fields.
14870 * tracepoint.c (gdb_agent_op_sizes): New table.
14871 (emit_eq_goto): New function.
14872 (emit_ne_goto): New function.
14873 (emit_lt_goto): New function.
14874 (emit_le_goto): New function.
14875 (emit_gt_goto): New function.
14876 (emit_ge_goto): New function.
14877 (is_goto_target): New function.
14878 (compile_bytecodes): Recognize special cases of compare-goto
14879 combinations and call specialized emitters for them.
14880 * linux-x86-low.c (amd64_emit_eq_goto): New function.
14881 (amd64_emit_ne_goto): New function.
14882 (amd64_emit_lt_goto): New function.
14883 (amd64_emit_le_goto): New function.
14884 (amd64_emit_gt_goto): New function.
14885 (amd64_emit_ge_goto): New function.
14886 (amd64_emit_ops): Add the new functions.
14887 (i386_emit_eq_goto): New function.
14888 (i386_emit_ne_goto): New function.
14889 (i386_emit_lt_goto): New function.
14890 (i386_emit_le_goto): New function.
14891 (i386_emit_gt_goto): New function.
14892 (i386_emit_ge_goto): New function.
14893 (i386_emit_ops): Add the new functions.
14894
14895 2011-09-08 Stan Shebs <stan@codesourcery.com>
14896
14897 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
14898 (i386_emit_epilogue): Restore %ebx.
14899
14900 2011-08-31 Jie Zhang <jzhang918@gmail.com>
14901
14902 * server.c (step_thread): Remove definition.
14903 (process_serial_event): Don't handle Hs.
14904 * server.h (step_thread): Remove declaration.
14905 * target.c (set_desired_inferior): Remove use of step_thread.
14906
14907 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
14908
14909 * linux-low.c: Include linux-procfs.h.
14910 (linux_attach_lwp_1): Update comments.
14911 (linux_attach): Scan for existing threads when attaching to a
14912 process that is the tgid.
14913 * Makefile.in: Update dependencies.
14914
14915 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
14916
14917 * configure.srv: Add linux-procfs.o dependencies.
14918
14919 2011-08-14 Yao Qi <yao@codesourcery.com>
14920
14921 * target.h (struct target_ops): Fix indent.
14922 * win32-low.c (win32_target_ops): Fix comment.
14923
14924 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
14925 Yao Qi <yao@codesourcery.com>
14926
14927 * Makefile.in (clean): Remove tic6x-*.c files.
14928 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
14929 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
14930 (tic6x-c64xp-linux.c): Likewise.
14931 * configure.srv: Add support for tic6x-*-uclinux.
14932 * linux-tic6x-low.c: New.
14933 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
14934
14935 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
14936 Yao Qi <yao@codesourcery.com>
14937
14938 * target.h (struct target_ops): Add read_loadmap.
14939 * linux-low.c (struct target_loadseg): New type.
14940 (struct target_loadmap): New type.
14941 (linux_read_loadmap): New function.
14942 (linux_target_ops): Add linux_read_loadmap.
14943 * server.c (handle_query): Support qXfer:fdpic:read packet.
14944 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
14945 to NULL.
14946
14947 2011-08-05 Eli Zaretskii <eliz@gnu.org>
14948
14949 * win32-low.c: Include <stdint.h>.
14950
14951 2011-07-22 Pedro Alves <pedro@codesourcery.com>
14952
14953 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
14954 to the inferior here.
14955 (i386_remove_aligned_watchpoint): Ditto.
14956 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
14957 fit part of the watchpoint in the debug registers.
14958 (i386_update_inferior_debug_regs): New.
14959 (i386_low_insert_watchpoint): Work on a local mirror of the debug
14960 registers, and only update the inferior on success.
14961 (i386_low_remove_watchpoint): Ditto.
14962
14963 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
14964
14965 * linux-low.c (compare_ints, unique, list_threads, show_process,
14966 linux_core_of_thread): Delete.
14967 (linux_target_ops): Change linux_core_of_thread to
14968 linux_common_core_of_thread.
14969 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
14970 * utils.c (malloc_failure): Change type of argument.
14971 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
14972 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
14973 common/linux-osdata.c, common/ptid.c and common/buffer.c.
14974 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
14975 (IPA_OBJS): Add common-utils-ipa.o.
14976 (ptid_h, linux_osdata_h): New macros.
14977 (server_h): Add common/common-utils.h, common/xml-utils.h,
14978 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
14979 common/ptid.h.
14980 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
14981 ptid.o, buffer.o): New rules.
14982 (linux-low.o): Add common/linux-osdata.h as a dependency.
14983 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
14984 * configure.ac: Add AC_HEADER_DIRENT check.
14985 * config.in: Regenerate.
14986 * configure: Regenerate.
14987 * remote-utils.c (xml_escape_text): Delete.
14988 (buffer_grow, buffer_free, buffer_init, buffer_finish,
14989 buffer_xml_printf): Move to common/buffer.c.
14990 * server.c (main): Remove call to initialize_inferiors.
14991 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
14992 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
14993 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
14994 internal_error, gdb_assert, gdb_assert_fail): Delete.
14995 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
14996 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
14997 common/buffer.h.
14998 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
14999 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
15000 initialize_inferiors): Delete.
15001
15002 2011-07-20 Pedro Alves <pedro@codesourcery.com>
15003
15004 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
15005 symbol error.
15006
15007 2011-05-31 Pedro Alves <pedro@codesourcery.com>
15008
15009 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
15010 assertion.
15011 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
15012
15013 2011-05-26 Yao Qi <yao@codesourcery.com>
15014
15015 * Makefile.in (thread-db.o): Track dependence to
15016 common/gdb_thread_db.h.
15017 * thread-db.c: include gdb_thread_db.h from right place.
15018
15019 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
15020
15021 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
15022 __FILE__ and __LINE__ to internal_error.
15023
15024 2011-05-13 Doug Evans <dje@google.com>
15025
15026 * thread-db.c (try_thread_db_load_from_sdir): New function.
15027 (try_thread_db_load_from_dir): New function.
15028 (thread_db_load_search): Handle $sdir, ignore $pdir.
15029 Remove trying of system directories if search of
15030 libthread-db-search-path fails, that is now done via $sdir.
15031
15032 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
15033
15034 * server.c (handle_query): Add EnableDisableTracepoints to the list
15035 of supported features.
15036 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15037 tracepoints.
15038 (cmd_qtenable_disable): New.
15039 (cmd_qtstart): Install tracepoints even if disabled.
15040 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
15041 receiving a QTEnable or QTDisable packet.
15042 (gdb_collect): Skip data collection if fast tracepoint is disabled.
15043 (ust_marker_to_static_tracepoint): Do not ignore disabled static
15044 tracepoints.
15045 (gdb_probe): Skip data collection if static tracepoint is disabled.
15046
15047 2011-05-10 Doug Evans <dje@google.com>
15048
15049 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
15050
15051 2011-05-04 Doug Evans <dje@google.com>
15052
15053 * linux-low.c (linux_join): Skip process lookup.
15054 * spu-low.c (spu_join): Ditto.
15055 * server.c (join_inferiors_callback): Delete.
15056 (process_serial_event): For 'D' packet (detach) call join_inferior
15057 directly.
15058
15059 2011-05-04 Joseph Myers <joseph@codesourcery.com>
15060
15061 * README: Don't mention xscale*-*-linux*.
15062 * configure.srv (xscale*-*-linux*): Don't handle target.
15063
15064 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
15065
15066 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
15067 casting pointers.
15068 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
15069 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
15070 (i386_emit_void_call_2): Likewise.
15071
15072 2011-04-26 Yao Qi <yao@codesourcery.com>
15073
15074 * linux-low.c: Move common macros to linux-ptrace.h.
15075 Include linux-ptrace.h.
15076 * Makefile.in (linux_ptrace_h): New.
15077 (linux-low.o): Depends on linux-ptrace.h.
15078
15079 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
15080
15081 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
15082 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
15083 (remote_prepare): New function with most of the TCP code from ...
15084 (remote_open): ... here. Detect PORT here unconditionally. Move also
15085 setting transport_is_reliable.
15086 * server.c (run_once): New variable.
15087 (gdbserver_usage): Document it.
15088 (main): Set run_once for `--once'. Call remote_prepare. Exit after
15089 the first run if RUN_ONCE.
15090 * server.h (run_once, remote_prepare): New declarations.
15091
15092 2011-04-19 Tom Tromey <tromey@redhat.com>
15093
15094 * win32-low.c (handle_load_dll): Remove duplicate "the".
15095
15096 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
15097
15098 Remove support for old Cygwin 1.5 versions.
15099 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
15100 function to avoid warning.
15101 (win32_add_one_solib): Use cygwin_conv_path function to avoid
15102 warning.
15103
15104 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15105
15106 * gdbserver/server.h (Macro _): Define it if not available.
15107
15108 2011-03-14 Michael Snyder <msnyder@vmware.com>
15109
15110 * hostio.c (handle_close): Remove unnecessary null test.
15111
15112 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15113
15114 * Makefile.in (maintainer-clean realclean distclean): Remove
15115 "make ... subdir_do" command.
15116
15117 2011-03-10 Michael Snyder <msnyder@vmware.com>
15118
15119 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15120
15121 * server.c (handle_v_run): Free alloced buffer on early return.
15122
15123 2011-03-09 Yao Qi <yao@codesourcery.com>
15124
15125 Revert:
15126 2011-03-04 Yao Qi <yao@codesourcery.com>
15127
15128 * Makefile.in: Remove GNU make feature --directory.
15129
15130 2011-03-05 Yao Qi <yao@codesourcery.com>
15131
15132 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15133 (subdir_do): New make target. Copied from gdb/Makefile.
15134 (maintainer-clean, realclean, distclean, clean): Call corresponding
15135 make targets in common/Makefile.
15136
15137 2011-02-11 Yao Qi <yao@codesourcery.com>
15138
15139 * configure.ac: Call AC_PROG_RANLIB.
15140 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15141 * configure: Regenerate.
15142
15143 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15144
15145 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15146
15147 2011-03-06 Yao Qi <yao@codesourcery.com>
15148
15149 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15150
15151 2011-03-05 Yao Qi <yao@codesourcery.com>
15152
15153 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15154 (subdir_do): New make target. Copied from gdb/Makefile.
15155 (maintainer-clean, realclean, distclean, clean): Call corresponding
15156 make targets in common/Makefile.
15157
15158 2011-03-04 Yao Qi <yao@codesourcery.com>
15159
15160 * Makefile.in: Remove GNU make feature --directory.
15161
15162 2011-03-04 Michael Snyder <msnyder@vmware.com>
15163
15164 * server.c (queue_stop_reply): Call xmalloc not malloc.
15165
15166 2011-03-02 Michael Snyder <msnyder@vmware.com>
15167
15168 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15169
15170 2011-02-28 Michael Snyder <msnyder@vmware.com>
15171
15172 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15173 (cmd_qtframe): Ditto.
15174 (cmd_qtbuffer): Ditto.
15175 (cmd_bigqtbuffer): Ditto.
15176
15177 * utils.c (decimal2str): Initialize 'width' to nine, then
15178 don't mess with it.
15179
15180 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15181
15182 * hostio.c (require_data): Free *data, not data.
15183
15184 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15185
15186 * hostio.c (require_data): Use free, not xfree.
15187
15188 2011-02-27 Michael Snyder <msnyder@vmware.com>
15189
15190 * server.c (handle_query): Discard unused value.
15191
15192 * hostio.c (require_data): Free malloc memory before returning
15193 error.
15194
15195 2011-02-26 Michael Snyder <msnyder@vmware.com>
15196
15197 * linux-low.c (list_threads): Call closedir for dirent.
15198
15199 2011-02-27 Michael Snyder <msnyder@vmware.com>
15200
15201 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15202 a case statement falls through.
15203
15204 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15205
15206 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15207 in comparison.
15208
15209 2011-02-26 Michael Snyder <msnyder@vmware.com>
15210
15211 * utils.c (decimal2str): Eliminate dead code and dead param.
15212 (pulongest): Drop dead param from call to decimal2str.
15213 (plongest): Ditto.
15214
15215 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15216
15217 Revert the following patch (not approved yet):
15218 2011-02-21 Hui Zhu <teawater@gmail.com>
15219 * tracepoint.c (tp_printf): New function.
15220 (eval_agent_expr): Handle gdb_agent_op_printf.
15221
15222 2011-02-21 Hui Zhu <teawater@gmail.com>
15223
15224 * tracepoint.c (tp_printf): New function.
15225 (eval_agent_expr): Handle gdb_agent_op_printf.
15226
15227 2011-02-18 Tom Tromey <tromey@redhat.com>
15228
15229 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15230 (tracepoint.o): Likewise.
15231 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15232 (gdb_agent_op_names): Likewise.
15233
15234 2011-02-18 Tom Tromey <tromey@redhat.com>
15235
15236 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15237 gdb_agent_op_rot>: New constants.
15238 (gdb_agent_op_names): Add pick and roll.
15239 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15240 cases.
15241
15242 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15243
15244 * aclocal.m4: Regenerated with aclocal-1.11.1.
15245
15246 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15247
15248 * server.c (handle_qxfer_traceframe_info): New.
15249 (qxfer_packets): Register "traceframe-info".
15250 (handle_query): Report support for qXfer:traceframe-info:read+.
15251 * tracepoint.c (match_blocktype): New.
15252 (traceframe_find_block_type): Rename to ...
15253 (traceframe_walk_blocks): ... this. Add callback filter argument,
15254 and use it.
15255 (traceframe_find_block_type): New, reimplemented on top of
15256 traceframe_walk_blocks.
15257 (build_traceframe_info_xml): New.
15258 (traceframe_read_info): New.
15259 * server.h (traceframe_read_info): Declare.
15260
15261 2011-02-11 Yao Qi <yao@codesourcery.com>
15262
15263 * configure.ac: Call AC_PROG_RANLIB.
15264 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15265 * configure: Regenerate.
15266
15267 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15268
15269 * server.c (gdb_read_memory): Change return semantics to allow
15270 partial transfers.
15271 (handle_search_memory_1): Adjust.
15272 (process_serial_event) <'m' packet>: Handle partial transfers.
15273 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15274
15275 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15276
15277 * regcache.c (init_register_cache): Initialize
15278 regcache->register_status.
15279 (free_register_cache): Release regcache->register_status.
15280 (regcache_cpy): Copy register_status.
15281 (registers_to_string): Print 'x's for unavailable registers.
15282 (supply_register): Mark the register's status valid or
15283 unavailable, depending on whether a buffer was passed in or not.
15284 (supply_register_zeroed): New.
15285 (supply_regblock): Mark the registers' status valid or
15286 unavailable, depending on whether a buffer was passed in or not.
15287 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15288 (struct regcache): New `register_status' field.
15289 (supply_register_zeroed): Declare.
15290 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15291 supply_register_zeroed, rather than passing a NULL buffer to
15292 supply_register.
15293 * tracepoint.c (fetch_traceframe_registers): Update comment.
15294
15295 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15296
15297 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15298 buffer explicit.
15299
15300 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15301
15302 * server.h (decode_xfer_write): Change prototype.
15303 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15304 and don't extract the annex here.
15305 * server.c (decode_xfer_read): Remove `annex' parameter,
15306 and don't extract the annex here.
15307 (decode_xfer): New.
15308 (struct qxfer): New.
15309 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15310 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15311 (handle_qxfer_statictrace): New functions, abstracted out from
15312 handle_query, and made to use the struct qxfer interface.
15313 (handle_threads_qxfer_proper): Rename to ...
15314 (handle_qxfer_threads_proper): ... this.
15315 (handle_threads_qxfer): Rename to ...
15316 (handle_qxfer_threads): ... this. Adjust.
15317 (qxfer_packets): New array.
15318 (handle_qxfer): New function.
15319 (handle_query): Use handle_qxfer.
15320
15321 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15322
15323 * gdbreplay.c: Shorten lines of >= 80 columns.
15324 * linux-low.c: Ditto.
15325 * linux-ppc-low.c: Ditto.
15326 * linux-s390-low.c: Ditto.
15327 * linux-sparc-low.c: Ditto.
15328 * linux-x86-low.c: Ditto.
15329 * linux-xtensa-low.c: Ditto.
15330 * mem-break.c: Ditto.
15331 * nto-low.c: Ditto.
15332 * regcache.h: Ditto.
15333 * remote-utils.c: Ditto.
15334 * server.c: Ditto.
15335 * server.h: Ditto.
15336 * thread-db.c: Ditto.
15337 * tracepoint.c: Ditto.
15338 * utils.c: Ditto.
15339 * win32-low.h: Ditto.
15340
15341 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15342
15343 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15344 update.
15345
15346 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15347
15348 * server.c (gdbserver_version): Update copyright year in version
15349 output.
15350 * gdbreplay.c (gdbreplay_version): Ditto.
15351
15352 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15353
15354 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15355 * linux-bfin-low.c: New file.
15356 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15357 PT_DATA_ADDR for BFIN targets.
15358 * Makefile.in (SFILES): Add linux-bfin-low.c.
15359 (clean): Remove reg-bfin.c.
15360 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15361 * README: Mention supported Blackfin targets.
15362
15363 2010-12-23 Mike Frysinger <vapier@gentoo.org>
15364
15365 * .gitignore: New file.
15366
15367 2010-11-16 Mike Frysinger <vapier@gentoo.org>
15368
15369 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15370
15371 2010-10-22 Jie Zhang <jie@codesourcery.com>
15372
15373 * Makefile.in: Add FLAGS_TO_PASS variable.
15374 (install): Remove dependency of install-only and recursively
15375 invoke make for install-only.
15376
15377 2010-10-04 Doug Evans <dje@google.com>
15378
15379 * Makefile.in (uninstall): Use $(DESTDIR).
15380
15381 2010-09-24 Pedro Alves <pedro@codesourcery.com>
15382
15383 PR gdb/11842
15384
15385 * linux-x86-low.c (compat_siginfo_from_siginfo)
15386 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15387 si_code is < 0. Check for si_code == SI_TIMER before checking for
15388 si_code < 0.
15389
15390 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15391
15392 * lynx-i386-low.c: New file.
15393 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15394
15395 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15396
15397 * lynx-low.c (ptrace_request_to_str): Remove handling for
15398 request values that have been removed in LynxOS 5.x.
15399
15400 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15401
15402 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15403 <ptrace.h>
15404
15405 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15406
15407 * configure.ac: Add --enable-inprocess-agent option.
15408 * configure: Rebuilt.
15409
15410 2010-09-06 Yao Qi <yao@codesourcery.com>
15411
15412 * linux-low.c (linux_kill): Remove unused variable.
15413 (linux_stabilize_threads): Likewise.
15414 * server.c (start_inferior): Likewise.
15415 (queue_stop_reply_callback): Likewise.
15416 * tracepoint.c (do_action_at_tracepoint): Likewise.
15417
15418 2010-09-06 Yao Qi <yao@codesourcery.com>
15419
15420 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15421 on return.
15422
15423 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15424
15425 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15426
15427 2010-09-06 Pedro Alves <pedro@codesourcery.com>
15428
15429 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15430 "$(IPA_DEPFILES)".
15431
15432 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15433
15434 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15435 gdbserver/lynx-ppc-low.c: New files.
15436 * Makefile.in (lynx_low_h): New variable.
15437 (lynx-low.o, lynx-ppc-low.o): New rules.
15438 * configure.ac: On LynxOS, link with -lnetinet.
15439 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15440 * configure: regenerate.
15441
15442 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15443
15444 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15445 * configure.ac: Add check for vasprintf and vsnprintf.
15446 * configure, config.in: Regenerate.
15447 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15448
15449 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15450
15451 * gdbreplay.c: Move include of alloca.h up, next to include of
15452 malloc.h.
15453 * server.h: Add include of malloc.h.
15454 * mem-break.c: Remove include of malloc.h.
15455 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15456
15457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15458
15459 * Makefile.in (memmem.o): Build with -Wno-error.
15460
15461 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15462
15463 * utils.c (xsnprintf): Make non-static.
15464 * server.h: Add xsnprintf declaration.
15465 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15466 replace calls to snprintf by calls to xsnprintf throughout.
15467
15468 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15469
15470 * configure.ac: Add configure check for alloca.
15471 * configure, config.in: Regenerate.
15472 * server.h: Include alloca.h if it exists.
15473 * gdbreplay.c: Include alloca.h if it exists.
15474
15475 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15476
15477 * linux-low.c (__SIGRTMIN): Define if not already defined.
15478 (linux_create_inferior): Check for __ANDROID__ rather than
15479 __SIGRTMIN.
15480 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15481 are already deferred.
15482 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15483 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15484 stopped and already has a pending signal to report.
15485 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15486 a pending signal to report or is moving out of a jump pad.
15487 (linux_init_signals): Check for __ANDROID__ rather than
15488 __SIGRTMIN.
15489
15490 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15491
15492 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15493 debug_threads check. Avoid a linear search when not doing debug
15494 output.
15495
15496 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15497
15498 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15499 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15500 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15501 (process_event): Change local fd's type to gdb_fildes_t.
15502 (create_file_handler): Adjust prototype.
15503 (delete_file_handler): Adjust prototype.
15504 (handle_file_event): Adjust prototype. Use pfildes.
15505 (create_file_event): Adjsut prototype.
15506 * remote-utils.c (remote_desc, listen_desc): Change type to
15507 gdb_fildes_t.
15508 * server.h: New gdb_fildes_t typedef.
15509 [USE_WIN32API]: Include winsock2.h.
15510 (delete_file_handler, add_file_handler): Adjust prototypes.
15511 (pfildes): Declare.
15512 * utils.c (pfildes): New.
15513
15514 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15515
15516 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15517 * configure: Regenerate.
15518
15519 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15520
15521 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15522 (linux_done_accessing_memory): ... this.
15523 (linux_target_ops): Adjust.
15524 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15525 * nto-low.c (nto_target_ops): Adjust comment.
15526 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15527 * spu-low.c (spu_target_ops): Adjust comment.
15528 * target.h (target_ops): Rename unprepare_to_access_memory field
15529 to done_accessing_memory.
15530 (unprepare_to_access_memory): Rename to ...
15531 (done_accessing_memory): ... this.
15532
15533 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15534
15535 * linux-low.c (linux_prepare_to_access_memory): New.
15536 (linux_unprepare_to_access_memory): New.
15537 (linux_target_ops): Install them.
15538 * server.c (read_memory): Rename to ...
15539 (gdb_read_memory): ... this. Use
15540 prepare_to_access_memory/prepare_to_access_memory.
15541 (write_memory): Rename to ...
15542 (gdb_write_memory): ... this. Use
15543 prepare_to_access_memory/prepare_to_access_memory.
15544 (handle_search_memory_1): Adjust.
15545 (process_serial_event): Adjust.
15546 * target.h (struct target_ops): New fields
15547 prepare_to_access_memory and unprepare_to_access_memory.
15548 (prepare_to_access_memory, unprepare_to_access_memory): New.
15549 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15550 prepare_to_access_memory/prepare_to_access_memory.
15551 * nto-low.c (nto_target_ops): Adjust.
15552 * spu-low.c (spu_target_ops): Adjust.
15553 * win32-low.c (win32_target_ops): Adjust.
15554
15555 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15556
15557 * Makefile.in (WARN_CFLAGS): Get it from configure.
15558 (WERROR_CFLAGS): New.
15559 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
15560 * configure.ac: Introduce --enable-werror, which adds -Werror to
15561 the compiler command line. Enabled by default. Disable with
15562 --disable-werror. Add -Wdeclaration-after-statement
15563 Wpointer-arith and -Wformat-nonliteral to warning flags.
15564 * configure: Regenerate.
15565
15566 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15567
15568 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
15569
15570 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15571
15572 * gdbreplay.c (remote_error): New.
15573 (gdbchar): New.
15574 (expect): Use gdbchar. Check for error reading from GDB.
15575 Clarify sync error output.
15576 (play): Check for errors writing to GDB.
15577 * linux-low.c (sigchld_handler): Really ignore `write' errors.
15578 * remote-utils.c (getpkt): Check for errors writing to the remote
15579 descriptor.
15580
15581 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15582
15583 * linux-low.c (linux_wait_1): Move non-debugging code out of
15584 `debug_threads' control.
15585
15586 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15587
15588 * linux-low.c (linux_wait_1): Don't set last_status here.
15589 * server.c (push_event, queue_stop_reply_callback): Assert we're
15590 not pushing a TARGET_WAITKIND_IGNORE event.
15591 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
15592 (myresume, handle_target_event): Set the thread's last_resume_kind
15593 and last_status from the target returned status.
15594
15595 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15596
15597 PR threads/10729
15598
15599 * linux-x86-low.c (update_debug_registers_callback): New.
15600 (i386_dr_low_set_addr): Use it.
15601 (i386_dr_low_get_addr): New.
15602 (i386_dr_low_set_control): Use update_debug_registers_callback.
15603 (i386_dr_low_get_control): New.
15604 (i386_dr_low_get_status): Adjust.
15605 * linux-low.c (linux_stop_lwp): New.
15606 * linux-low.h (linux_stop_lwp): Declare.
15607
15608 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
15609 argument instead of a i386_debug_reg_state.
15610 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
15611 a i386_debug_reg_state.
15612 (i386_insert_aligned_watchpoint): Adjust.
15613 (i386_remove_aligned_watchpoint): Adjust.
15614 (i386_low_stopped_data_address): Read the debug registers from the
15615 inferior instead of from the mirrors.
15616 * i386-low.h (struct i386_debug_reg_state): Extend comment.
15617 (i386_dr_low_get_addr): Declare.
15618 (i386_dr_low_get_control): Declare.
15619 (i386_dr_low_get_status): Change prototype.
15620
15621 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
15622 (i386_dr_low_get_addr): New.
15623 (i386_dr_low_get_control): New.
15624 (i386_dr_low_get_status): Adjust prototype. Return
15625 dr_status_mirror.
15626 (i386_initial_stuff): Clear dr_status_mirror and
15627 dr_control_mirror.
15628 (i386_get_thread_context): Adjust.
15629 (i386_set_thread_context): Adjust.
15630 (i386_thread_added): Adjust.
15631
15632 2010-08-24 Pedro Alves <pedro@codesourcery.com>
15633
15634 * linux-low.h (linux_thread_area): Delete declaration.
15635
15636 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
15637
15638 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
15639 after its termination.
15640
15641 2010-08-09 Pedro Alves <pedro@codesourcery.com>
15642
15643 * linux-low.c (gdb_wants_lwp_stopped): Delete.
15644 (gdb_wants_all_stopped): Delete.
15645 (linux_wait_1): Don't call them.
15646 * server.c (handle_v_cont): Tag all threads as want-stopped.
15647 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
15648 stopped as "client-wants-stopped".
15649
15650 2010-07-31 Pedro Alves <pedro@codesourcery.com>
15651
15652 * Makefile.in (signals_h): New.
15653 (server_h): Depend on it.
15654 (server.o): Don't depend on $(signals_def).
15655 (signals.o): Depend on $(signals_def).
15656
15657 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
15658
15659 * Makefile.in (signals_def): New.
15660 (server_h): Append include/gdb/signals.h and signals_def.
15661 (server.o): Append signals_def.
15662
15663 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15664
15665 * server.c (handle_target_event): Use target_signal_to_host for
15666 resume_info.sig initialization.
15667 * target.h (struct thread_resume) <sig>: New comment.
15668
15669 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
15670
15671 * server.c (handle_query): strcpy() the returned string from paddress()
15672 instead of sprintf().
15673 * utils.c (paddress): Return phex_nz().
15674
15675 2010-07-07 Joel Brobecker <brobecker@adacore.com>
15676
15677 * server.c (handle_v_cont): Call mourn_inferior if process
15678 just exited.
15679 (myresume): Likewise.
15680
15681 2010-07-01 Pedro Alves <pedro@codesourcery.com>
15682
15683 Static tracepoints, and integration with UST.
15684
15685 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
15686 * mem-break.c (uninsert_all_breakpoints)
15687 (reinsert_all_breakpoints): New.
15688 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
15689 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
15690 (gdb_agent_ust_loaded, helper_thread_id)
15691 (gdb_agent_helper_thread_id): New macros.
15692 (struct ipa_sym_addresses): Add addr_ust_loaded,
15693 addr_helper_thread_id, addr_cmd_buf.
15694 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
15695 (in_process_agent_loaded_ust): New.
15696 (write_e_ust_not_loaded): New.
15697 (maybe_write_ipa_ust_not_loaded): New.
15698 (struct collect_static_trace_data_action): New.
15699 (enum tracepoint_type) <static_tracepoint>: New.
15700 (struct tracepoint) <handle>: Mention static tracepoints.
15701 (struct static_tracepoint_ctx): New.
15702 (CMD_BUF_SIZE): New.
15703 (add_tracepoint_action): Handle static tracepoint actions.
15704 (unprobe_marker_at): New.
15705 (clear_installed_tracepoints): Handle static tracepoints.
15706 (cmd_qtdp): Handle static tracepoints.
15707 (probe_marker_at): New.
15708 (cmd_qtstart): Handle static tracepoints.
15709 (response_tracepoint): Handle static tracepoints.
15710 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
15711 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
15712 (get_context_regcache): Handle static tracepoints.
15713 (do_action_at_tracepoint): Handle static tracepoint actions.
15714 (traceframe_find_block_type): Handle static trace data blocks.
15715 (traceframe_read_sdata): New.
15716 (download_tracepoints): Download static tracepoint actions.
15717 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
15718 (GDB_PROBE_NAME): New.
15719 (ust_ops): New.
15720 (GET_UST_SYM): New.
15721 (USTF): New.
15722 (dlsym_ust): New.
15723 (ust_marker_to_static_tracepoint): New.
15724 (gdb_probe): New.
15725 (collect_ust_data_at_tracepoint): New.
15726 (gdb_ust_probe): New.
15727 (UNIX_PATH_MAX, SOCK_DIR): New.
15728 (gdb_ust_connect_sync_socket): New.
15729 (resume_thread, stop_thread): New.
15730 (run_inferior_command): New.
15731 (init_named_socket): New.
15732 (gdb_ust_socket_init): New.
15733 (cstr_to_hexstr): New.
15734 (next_st): New.
15735 (first_marker, next_marker): New.
15736 (response_ust_marker): New.
15737 (cmd_qtfstm, cmd_qtsstm): New.
15738 (unprobe_marker_at, probe_marker_at): New.
15739 (cmd_qtstmat, gdb_ust_thread): New.
15740 (gdb_ust_init): New.
15741 (initialize_tracepoint_ftlib): Call gdb_ust_init.
15742 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
15743 (ST_REGENTRY): New.
15744 (x86_64_st_collect_regmap): New.
15745 (X86_64_NUM_ST_COLLECT_GREGS): New.
15746 (AMD64_RIP_REGNUM): New.
15747 (supply_static_tracepoint_registers): New.
15748 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
15749 (ST_REGENTRY): New.
15750 (i386_st_collect_regmap): New.
15751 (i386_NUM_ST_COLLECT_GREGS): New.
15752 (supply_static_tracepoint_registers): New.
15753 * server.c (handle_query): Handle qXfer:statictrace:read.
15754 <qSupported>: Report support for StaticTracepoints, and
15755 qXfer:statictrace:read features.
15756 * server.h (traceframe_read_sdata)
15757 (supply_static_tracepoint_registers): Declare.
15758 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
15759 (unpack_varlen_hex): Include in IPA build.
15760 * Makefile.in (ustlibs, ustinc): New.
15761 (IPA_OBJS): Add remote-utils-ipa.o.
15762 ($(IPA_LIB)): Link -ldl and -lpthread.
15763 (UST_CFLAGS): New.
15764 (IPAGENT_CFLAGS): Add UST_CFLAGS.
15765 * config.in, configure: Regenerate.
15766
15767 2010-06-20 Ian Lance Taylor <iant@google.com>
15768 Pedro Alves <pedro@codesourcery.com>
15769
15770 * linux-x86-low.c (always_true): Delete.
15771 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
15772 trying to fool the compiler with always_true.
15773
15774 2010-06-20 Pedro Alves <pedro@codesourcery.com>
15775
15776 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
15777 conditions in gdbserver.
15778
15779 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
15780
15781 * spu-low.c (spu_read_memory): Wrap around local store limit.
15782 (spu_write_memory): Likewise.
15783
15784 2010-06-15 Pedro Alves <pedro@codesourcery.com>
15785
15786 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
15787 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
15788 LONGEST uses.
15789 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
15790 uses.
15791 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
15792 uses with LONGEST uses.
15793
15794 2010-06-14 Stan Shebs <stan@codesourcery.com>
15795 Pedro Alves <pedro@codesourcery.com>
15796
15797 Bytecode compiler.
15798
15799 * linux-x86-low.c: Include limits.h.
15800 (add_insns): New.
15801 (always_true): New.
15802 (EMIT_ASM): New.
15803 (EMIT_ASM32): New.
15804 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
15805 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
15806 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
15807 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
15808 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
15809 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
15810 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
15811 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
15812 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
15813 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
15814 (amd64_emit_void_call_2): New.
15815 (amd64_emit_ops): New.
15816 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
15817 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
15818 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
15819 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
15820 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
15821 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
15822 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
15823 (i386_emit_call, i386_emit_reg, i386_emit_pop)
15824 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
15825 (i386_emit_stack_adjust, i386_emit_int_call_1)
15826 (i386_emit_void_call_2): New.
15827 (i386_emit_ops): New.
15828 (x86_emit_ops): New.
15829 (the_low_target): Install x86_emit_ops.
15830 * server.h (struct emit_ops): New.
15831 (get_raw_reg_func_addr): Declare.
15832 (current_insn_ptr, emit_error): Declare.
15833 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
15834 (set_trace_state_variable_value): New defines.
15835 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
15836 addr_get_trace_state_variable_value and
15837 addr_set_trace_state_variable_value.
15838 (symbol_list): New fields for get_raw_reg,
15839 get_trace_state_variable_value and set_trace_state_variable_value.
15840 (condfn): New typedef.
15841 (struct tracepoint): New field `compiled_cond'.
15842 (do_action_at_tracepoint): Clear compiled_cond.
15843 (get_trace_state_variable_value, set_trace_state_variable_value):
15844 Export in the IPA.
15845 (condition_true_at_tracepoint): If there's a compiled condition,
15846 run that.
15847 (current_insn_ptr, emit_error): New globals.
15848 (struct bytecode_address): New.
15849 (get_raw_reg_func_addr): New.
15850 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
15851 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
15852 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
15853 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
15854 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
15855 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
15856 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
15857 (compile_tracepoint_condition, compile_bytecodes): New.
15858 * target.h (emit_ops): Forward declare.
15859 (struct target_ops): New field emit_ops.
15860 (target_emit_ops): New.
15861 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
15862 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
15863 * linux-low.c (linux_emit_ops): New.
15864 (linux_target_ops): Install it.
15865 * linux-low.h (struct linux_target_ops): New field emit_ops.
15866
15867 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
15868
15869 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
15870 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
15871
15872 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15873 Stan Shebs <stan@codesourcery.com>
15874
15875 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
15876 (all): Depend on $(extra_libraries).
15877 (install-only): Install the IPA.
15878 (IPA_OBJS, IPA_LIB): New.
15879 (clean): Remove the IPA lib.
15880 (IPAGENT_CFLAGS): New.
15881 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
15882 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
15883 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
15884 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
15885 * configure.ac: Check for atomic builtins support in the compiler.
15886 (IPA_DEPFILES, extra_libraries): Define.
15887 * configure.srv (ipa_obj): Add description.
15888 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
15889 (i[34567]86-*-linux*): Set ipa_obj.
15890 (x86_64-*-linux*): Set ipa_obj.
15891 * linux-low.c (stabilizing_threads): New.
15892 (supports_fast_tracepoints): New.
15893 (linux_detach): Stabilize threads before detaching.
15894 (handle_tracepoints): Handle internal tracing breakpoints. Assert
15895 the lwp is either not stabilizing, or is moving out of a jump pad.
15896 (linux_fast_tracepoint_collecting): New.
15897 (maybe_move_out_of_jump_pad): New.
15898 (enqueue_one_deferred_signal): New.
15899 (dequeue_one_deferred_signal): New.
15900 (linux_wait_for_event_1): If moving out of a jump pad, defer
15901 pending signals to later.
15902 (linux_stabilize_threads): New.
15903 (linux_wait_1): Check if threads need moving out of jump pads, and
15904 do it if so.
15905 (stuck_in_jump_pad_callback): New.
15906 (move_out_of_jump_pad_callback): New.
15907 (lwp_running): New.
15908 (linux_resume_one_lwp): Handle moving out of jump pads.
15909 (linux_set_resume_request): Dequeue deferred signals.
15910 (need_step_over_p): Also step over fast tracepoint jumps.
15911 (start_step_over): Also uninsert fast tracepoint jumps.
15912 (finish_step_over): Also reinsert fast tracepoint jumps.
15913 (linux_install_fast_tracepoint_jump): New.
15914 (linux_target_ops): Install linux_stabilize_threads and
15915 linux_install_fast_tracepoint_jump_pad.
15916 * linux-low.h (linux_target_ops) <get_thread_area,
15917 install_fast_tracepoint_jump_pad>: New fields.
15918 (struct lwp_info) <collecting_fast_tracepoint,
15919 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
15920 (linux_get_thread_area): Declare.
15921 * linux-x86-low.c (jump_insn): New.
15922 (x86_get_thread_area): New.
15923 (append_insns): New.
15924 (push_opcode): New.
15925 (amd64_install_fast_tracepoint_jump_pad): New.
15926 (i386_install_fast_tracepoint_jump_pad): New.
15927 (x86_install_fast_tracepoint_jump_pad): New.
15928 (the_low_target): Install x86_get_thread_area and
15929 x86_install_fast_tracepoint_jump_pad.
15930 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
15931 (struct fast_tracepoint_jump): New.
15932 (fast_tracepoint_jump_insn): New.
15933 (fast_tracepoint_jump_shadow): New.
15934 (find_fast_tracepoint_jump_at): New.
15935 (fast_tracepoint_jump_here): New.
15936 (delete_fast_tracepoint_jump): New.
15937 (set_fast_tracepoint_jump): New.
15938 (uninsert_fast_tracepoint_jumps_at): New.
15939 (reinsert_fast_tracepoint_jumps_at): New.
15940 (set_breakpoint_at): Use write_inferior_memory.
15941 (uninsert_raw_breakpoint): Use write_inferior_memory.
15942 (check_mem_read): Mask out fast tracepoint jumps.
15943 (check_mem_write): Mask out fast tracepoint jumps.
15944 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
15945 (set_fast_tracepoint_jump): Declare.
15946 (delete_fast_tracepoint_jump)
15947 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
15948 (reinsert_fast_tracepoint_jumps_at): Declare.
15949 * regcache.c: Don't compile many functions when building the
15950 in-process agent library.
15951 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
15952 the register buffer in the heap.
15953 (free_register_cache): If the register buffer isn't owned by the
15954 regcache, don't free it.
15955 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
15956 pre-existing register caches.
15957 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
15958 type.
15959 (convert_ascii_to_int): : Constify `from' parameter type.
15960 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
15961 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
15962 the needed buffer in-place.
15963 (relocate_instruction): New.
15964 * server.c (handle_query) <qSymbols>: If the target supports
15965 tracepoints, give it a chance of looking up symbols. Report
15966 support for fast tracepoints.
15967 (handle_status): Stabilize threads.
15968 (process_serial_event): Adjust.
15969 * server.h (struct fast_tracepoint_jump): Forward declare.
15970 (struct process_info) <fast_tracepoint_jumps>: New field.
15971 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
15972 (decode_X_packet, decode_M_packet): Adjust.
15973 (relocate_instruction): Declare.
15974 (in_process_agent_loaded): Declare.
15975 (tracepoint_look_up_symbols): Declare.
15976 (struct fast_tpoint_collect_status): Declare.
15977 (fast_tracepoint_collecting): Declare.
15978 (force_unlock_trace_buffer): Declare.
15979 (handle_tracepoint_bkpts): Declare.
15980 (initialize_low_tracepoint)
15981 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
15982 * target.h (struct target_ops) <stabilize_threads,
15983 install_fast_tracepoint_jump_pad>: New fields.
15984 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
15985 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
15986 [HAVE_STDINT_H]: Include stdint.h.
15987 (trace_debug_1): Rename to ...
15988 (trace_vdebug): ... this.
15989 (trace_debug): Rename to ...
15990 (trace_debug_1): ... this. Add `level' parameter.
15991 (trace_debug): New.
15992 (ATTR_USED, ATTR_NOINLINE): New.
15993 (IP_AGENT_EXPORT): New.
15994 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
15995 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
15996 (about_to_request_buffer_space, trace_buffer_is_full)
15997 (stopping_tracepoint, expr_eval_result, error_tracepoint)
15998 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
15999 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
16000 (traceframe_write_count, traceframes_created)
16001 (trace_state_variables)
16002 New renaming defines.
16003 (struct ipa_sym_addresses): New.
16004 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
16005 (symbol_list): New.
16006 (ipa_sym_addrs): New.
16007 (all_tracepoint_symbols_looked_up): New.
16008 (in_process_agent_loaded): New.
16009 (write_e_ipa_not_loaded): New.
16010 (maybe_write_ipa_not_loaded): New.
16011 (tracepoint_look_up_symbols): New.
16012 (debug_threads) [IN_PROCESS_AGENT]: New.
16013 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
16014 (UNKNOWN_SIDE_EFFECTS): New.
16015 (stop_tracing): New.
16016 (flush_trace_buffer): New.
16017 (stop_tracing_bkpt): New.
16018 (flush_trace_buffer_bkpt): New.
16019 (read_inferior_integer): New.
16020 (read_inferior_uinteger): New.
16021 (read_inferior_data_pointer): New.
16022 (write_inferior_data_pointer): New.
16023 (write_inferior_integer): New.
16024 (write_inferior_uinteger): New.
16025 (struct collect_static_trace_data_action): Delete.
16026 (enum tracepoint_type): New.
16027 (struct tracepoint) <type>: New field `type'.
16028 <actions_str, step_actions, step_actions_str>: Only include in
16029 GDBserver.
16030 <orig_size, obj_addr_on_target, adjusted_insn_addr>
16031 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
16032 (tracepoints): Use IP_AGENT_EXPORT.
16033 (last_tracepoint): Don't include in the IPA.
16034 (stopping_tracepoint): Use IP_AGENT_EXPORT.
16035 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
16036 (alloced_trace_state_variables): New.
16037 (trace_state_variables): Use IP_AGENT_EXPORT.
16038 (traceframe_t): Delete unused variable.
16039 (circular_trace_buffer): Don't include in the IPA.
16040 (trace_buffer_start): Delete.
16041 (struct trace_buffer_control): New.
16042 (trace_buffer_free): Delete.
16043 (struct ipa_trace_buffer_control): New.
16044 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
16045 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
16046 New.
16047 (trace_buffer_ctrl): New.
16048 (TRACE_BUFFER_CTRL_CURR): New.
16049 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
16050 Reimplement as macros.
16051 (trace_buffer_wrap): Delete.
16052 (traceframe_write_count, traceframe_read_count)
16053 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
16054 (struct tracepoint_hit_ctx) <type>: New field.
16055 (struct fast_tracepoint_ctx): New.
16056 (memory_barrier): New.
16057 (cmpxchg): New.
16058 (record_tracepoint_error): Update atomically in the IPA.
16059 (clear_inferior_trace_buffer): New.
16060 (about_to_request_buffer_space): New.
16061 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
16062 updating the same buffer.
16063 (add_tracepoint): Default the tracepoint's type to trap
16064 tracepoint, and orig_size to -1.
16065 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
16066 internal variables.
16067 (create_trace_state_variable): New parameter `gdb'. Handle it.
16068 (clear_installed_tracepoints): Clear fast tracepoint jumps.
16069 (cmd_qtdp): Handle fast tracepoints.
16070 (cmd_qtdv): Adjust.
16071 (max_jump_pad_size): New.
16072 (gdb_jump_pad_head): New.
16073 (get_jump_space_head): New.
16074 (claim_jump_space): New.
16075 (sort_tracepoints): New.
16076 (MAX_JUMP_SIZE): New.
16077 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
16078 IPA.
16079 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
16080 support. Upload fast traceframes, and delete internal IPA
16081 breakpoints.
16082 (stop_tracing_handler): New.
16083 (flush_trace_buffer_handler): New.
16084 (cmd_qtstop): Upload fast tracepoints.
16085 (response_tracepoint): Handle fast tracepoints.
16086 (tracepoint_finished_step): Upload fast traceframes. Set the
16087 tracepoint hit context's tracepoint type.
16088 (handle_tracepoint_bkpts): New.
16089 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
16090 type. Add comment about fast tracepoints.
16091 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
16092 non-existing action_str field.
16093 (get_context_regcache): Handle fast tracepoints.
16094 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
16095 to the regcache.
16096 (fast_tracepoint_from_jump_pad_address): New.
16097 (fast_tracepoint_from_ipa_tpoint_address): New.
16098 (collecting_t): New.
16099 (force_unlock_trace_buffer): New.
16100 (fast_tracepoint_collecting): New.
16101 (collecting): New.
16102 (gdb_collect): New.
16103 (write_inferior_data_ptr): New.
16104 (target_tp_heap): New.
16105 (target_malloc): New.
16106 (download_agent_expr): New.
16107 (UALIGN): New.
16108 (download_tracepoints): New.
16109 (download_trace_state_variables): New.
16110 (upload_fast_traceframes): New.
16111 (IPA_FIRST_TRACEFRAME): New.
16112 (IPA_NEXT_TRACEFRAME_1): New.
16113 (IPA_NEXT_TRACEFRAME): New.
16114 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16115 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16116 (gdb_jump_pad_buffer_end): New.
16117 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16118 (initialize_tracepoint): Adjust.
16119 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16120 buffer. Initialize the low module.
16121 * utils.c (PREFIX, TOOLNAME): New.
16122 (malloc_failure): Use PREFIX.
16123 (error): In the IPA, an error causes an exit.
16124 (fatal, warning): Use PREFIX.
16125 (internal_error): Use TOOLNAME.
16126 (NUMCELLS): Increase to 10.
16127 * configure, config.in: Regenerate.
16128
16129 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16130
16131 * server.c (handle_query) <qSupported>: Do two passes over the
16132 qSupported string to avoid nesting strtok.
16133
16134 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16135
16136 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16137 (CDEPS): New.
16138 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16139 -Wl,--dynamic-list.
16140 * configure: Regenerate.
16141 * proc-service.list: New.
16142
16143 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16144
16145 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16146 New comment.
16147
16148 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16149
16150 * gdbreplay.c (remote_open): Check error return from socket() call by
16151 its equality to -1 not by it being negative.
16152 * remote-utils.c (remote_open): Likewise.
16153
16154 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16155
16156 * config.h: Regenerate.
16157
16158 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16159
16160 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16161 doesn't provide PTRACE_GET_THREAD_AREA.
16162
16163 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16164
16165 * linux-m68k-low.c: Include <asm/ptrace.h>
16166 (ps_get_thread_area): Implement.
16167
16168 2010-05-03 Doug Evans <dje@google.com>
16169
16170 * event-loop.c (struct callback_event): New struct.
16171 (callback_list): New global.
16172 (append_callback_event, delete_callback_event): New functions.
16173 (process_callback): New function.
16174 (start_event_loop): Call it.
16175 * remote-utils.c (NOT_SCHEDULED): Define.
16176 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16177 moved out of readchar.
16178 (readchar): Rewrite. Call reschedule before returning.
16179 (reset_readchar): New function.
16180 (remote_close): Call it.
16181 (process_remaining, reschedule): New functions.
16182 * server.h (callback_handler_func): New typedef.
16183 (append_callback_event, delete_callback_event): Declare.
16184
16185 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16186
16187 * proc-service.c (ps_pglobal_lookup): Use
16188 thread_db_look_up_one_symbol.
16189 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16190 parameter. Use it instead of all_symbols_looked_up.
16191 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16192 field.
16193 (all_symbols_looked_up): Don't declare.
16194 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16195 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16196 field.
16197 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16198 Set all_symbols_looked_up here.
16199 (thread_db_look_up_one_symbol): New.
16200 (thread_db_get_tls_address): Adjust.
16201 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16202 thread_db object on the heap, and tentatively set it in the
16203 process structure.
16204 (thread_db_init): Don't set all_symbols_looked_up here.
16205 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16206
16207 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16208
16209 * linux-low.c (linux_kill, linux_detach): Adjust.
16210 (status_pending_p_callback): Remove redundant statement. Check
16211 for !TARGET_WAITIKIND_IGNORE, instead of
16212 TARGET_WAITKIND_STOPPED.
16213 (handle_tracepoints): Make sure LWP is locked. Adjust.
16214 (linux_wait_for_event_1): Adjust.
16215 (linux_cancel_breakpoints): New.
16216 (unsuspend_one_lwp): New.
16217 (unsuspend_all_lwps): New.
16218 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16219 (send_sigstop_callback): Change return type to int, add new
16220 `except' parameter and handle it.
16221 (suspend_and_send_sigstop_callback): New.
16222 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16223 pass them down. If SUSPEND, also increment the lwp's suspend
16224 count.
16225 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16226 (need_step_over_p): Don't consider suspended LWPs.
16227 (start_step_over): Adjust.
16228 (proceed_one_lwp): Change return type to int, add new `except'
16229 parameter and handle it.
16230 (unsuspend_and_proceed_one_lwp): New.
16231 (proceed_all_lwps): Use find_inferior instead of
16232 for_each_inferior.
16233 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16234 also decrement the suspend count of LWPs. Pass `except' down,
16235 instead of hacking its suspend count.
16236 (linux_pause_all): Add `freeze' parameter. Adjust.
16237 (linux_unpause_all): New.
16238 (linux_target_ops): Install linux_unpause_all.
16239 * server.c (handle_status): Adjust.
16240 * target.h (struct target_ops): New fields `unpause_all' and
16241 `cancel_breakpoints'. Add new parameter to `pause_all'.
16242 (pause_all): Add new `freeze' parameter.
16243 (unpause_all): New.
16244 (cancel_breakpoints): New.
16245 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16246 cancel breakpoints.
16247 (cmd_qtstart): Pause threads.
16248 (stop_tracing): Pause threads, and cancel breakpoints.
16249 * win32-low.c (win32_target_ops): Adjust.
16250
16251 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16252
16253 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16254 the inferior right away from here...
16255 (linux_wait_1): ... to here, and adjust to check the thread's
16256 last_resume_kind instead of the lwp's step or stop_expected flags.
16257
16258 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16259
16260 * README: Use consistent `GDB' and `GDBserver' spellings.
16261
16262 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16263
16264 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16265 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16266 (linux_detach_one_lwp): Assume the lwp is stopped.
16267 (any_thread_of): Delete.
16268 (linux_detach): Stop all lwps here. Don't blindly delete all
16269 breakpoints.
16270 (delete_lwp_callback): New.
16271 (linux_mourn): Delete all lwps of the process that is gone.
16272 (linux_wait_1): Don't delete the last lwp of the process here.
16273 * mem-break.h (mark_breakpoints_out): Declare.
16274 * mem-break.c (mark_breakpoints_out): New.
16275 (free_all_breakpoints): Use it.
16276 * server.c (handle_target_event): If the process is gone, mark
16277 breakpoints out.
16278 * thread-db.c (struct thread_db) <create_bp>: New field.
16279 (thread_db_enable_reporting): Fix prototype. Store a thread event
16280 breakpoint reference in the thread_db struct.
16281 (thread_db_load_search): Clear the thread_db object.
16282 (try_thread_db_load_1): Ditto.
16283 (switch_to_process): New.
16284 (disable_thread_event_reporting): Use it.
16285 (remove_thread_event_breakpoints): New.
16286 (thread_db_detach, thread_db_mourn): Use it.
16287
16288 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16289
16290 * linux-low.c (linux_enable_event_reporting): New.
16291 (linux_wait_for_event_1, handle_extended_wait): Use it.
16292
16293 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16294
16295 * linux-low.c (linux_kill_one_lwp, linux_kill)
16296 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16297 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16298 SIGSTOP even if the LWP is stopped.
16299 (send_sigstop_callback): New.
16300 (stop_all_lwps): Use send_sigstop_callback instead.
16301 (linux_resume_one_thread): Adjust.
16302 (proceed_one_lwp): Still proceed an LWP that the client has
16303 requested to stop, if we haven't reported it as stopped yet. Make
16304 sure that LWPs the client want stopped, have a pending SIGSTOP.
16305
16306 2010-04-26 Doug Evans <dje@google.com>
16307
16308 * server.c (handle_general_set): Make static.
16309
16310 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16311 Print received char after testing for error/eof instead of before.
16312 (input_interrupt): Tweak comment.
16313
16314 2010-04-23 Doug Evans <dje@google.com>
16315
16316 * server.c (start_inferior): Print inferior argv if --debug.
16317
16318 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16319
16320 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16321 * nto-x86-low.c: Include server.h
16322
16323 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16324
16325 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16326 be consistent with other sources of this directory.
16327 (init_registers_amd64): Correct name of source file of this function
16328 in the comment.
16329
16330 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16331
16332 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16333 64-bit executables.
16334
16335 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16336
16337 * win32-i386-low.c: Add 64-bit support.
16338 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16339 (init_registers_amd64): Declare.
16340 (mappings): Add 64-bit version of array.
16341 (init_windows_x86): New function.
16342 (the_low_target): Change init_arch field to init_windows_x86.
16343
16344 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16345
16346 * win32-low.c: Adapt to support also 64-bit architecture.
16347 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16348 (get_image_name): Use SIZE_T type for local variable `done'.
16349 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16350 (toolhelp_get_dll_name): Idem.
16351 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16352 Use uintptr_t typecast to avoid warning.
16353 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16354 (handle_exception): Use phex_nz to avoid warning.
16355 (win32_wait): Remove unused local variable `process'.
16356
16357 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16358
16359 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16360 `amd64-avx.o'.
16361
16362 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16363
16364 * configure.ac: Use `ws2_32' library for srv_mingw.
16365 * configure: Regenerate.
16366 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16367 * remote-utils.c: Likewise.
16368
16369 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16370
16371 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16372 if __x86_64__ is defined.
16373
16374 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16375
16376 * configure: Regenerate.
16377
16378 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16379
16380 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16381 * target.h (target_ops): New get_tib_address field.
16382 * win32-low.h (win32_thread_info): Add thread_local_base field.
16383 * win32-low.c (child_add_thread): Add tlb argument.
16384 Set thread_local_base field to TLB.
16385 (get_child_debug_event): Adapt to child_add_thread change.
16386 (win32_get_tib_address): New function.
16387 (win32_target_ops): Set get_tib_address field to
16388 win32_get_tib_address.
16389 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16390
16391 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16392
16393 * linux-low.c (linux_mourn): Also remove the process.
16394 * server.c (handle_target_event): Don't remove the process here.
16395 * nto-low.c (nto_mourn): New.
16396 (nto_target_ops): Install it.
16397 * spu-low.c (spu_mourn): New.
16398 (spu_target_ops): Install it.
16399 * win32-low.c (win32_mourn): New.
16400 (win32_target_ops): Install it.
16401
16402 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16403
16404 * server.h (buffer_xml_printf): Remove redundant `;'.
16405
16406 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16407
16408 * regcache.c (set_register_cache): Invalidate regcaches before
16409 changing the register cache layout.
16410 (regcache_invalidate_one): Allow a NULL regcache.
16411 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16412 regcaches before changing the register cache layout or the target
16413 regsets.
16414
16415 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16416
16417 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16418 variable warning on Linux/x86-64.
16419
16420 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16421
16422 GDBserver disconnected tracing support.
16423
16424 * linux-low.c (linux_remove_process): Delete.
16425 (add_lwp): Don't set last_resume_kind here.
16426 (linux_kill): Use `mourn'.
16427 (linux_detach): Use `thread_db_detach', and `mourn'.
16428 (linux_mourn): New.
16429 (linux_attach_lwp_1): Adjust comment.
16430 (linux_attach): last_resume_kind moved the thread_info; adjust.
16431 (status_pending_p_callback): Adjust.
16432 (linux_wait_for_event_1): Adjust.
16433 (count_events_callback, select_singlestep_lwp_callback)
16434 (select_event_lwp_callback, cancel_breakpoints_callback)
16435 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16436 (proceed_one_lwp): Adjust.
16437 (linux_async): Add debug output.
16438 (linux_thread_stopped): New.
16439 (linux_pause_all): New.
16440 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16441 linux_pause_all.
16442 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16443 (thread_db_free): Delete declaration.
16444 (thread_db_detach, thread_db_mourn): Declare.
16445 * thread-db.c (thread_db_init): Use thread_db_mourn.
16446 (thread_db_free): Delete, split in two.
16447 (disable_thread_event_reporting): New.
16448 (thread_db_detach): New.
16449 (thread_db_mourn): New.
16450
16451 * server.h (struct thread_info) <last_resume_kind>: New field.
16452 <attached>: Add comment.
16453 <gdb_detached>: New field.
16454 (handler_func): Change return type to int.
16455 (handle_serial_event, handle_target_event): Ditto.
16456 (gdb_connected): Declare.
16457 (tracing): Delete.
16458 (disconnected_tracing): Declare.
16459 (stop_tracing): Declare.
16460
16461 * server.c (handle_query) <qSupported>: Report support for
16462 disconnected tracing.
16463 (queue_stop_reply_callback): Account for running threads.
16464 (gdb_wants_thread_stopped): New.
16465 (gdb_wants_all_threads_stopped): New.
16466 (gdb_reattached_process): New.
16467 (handle_status): Clear the `gdb_detached' flag of all processes.
16468 In all-stop, stop all threads.
16469 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16470 (process_serial_event): If the remote connection breaks, or if an
16471 exit was forced with "monitor exit", force an event loop exit.
16472 Handle disconnected tracing on detach.
16473 (handle_serial_event): Adjust.
16474 (handle_target_event): If GDB isn't connected, forward events back
16475 to the inferior, unless the last process exited, in which case,
16476 exit gdbserver. Adjust interface.
16477
16478 * remote-utils.c (remote_open): Don't block in accept. Instead
16479 register an event loop source on the listen socket file
16480 descriptor. Refactor bits into ...
16481 (listen_desc): ... this new global.
16482 (gdb_connected): ... this new function.
16483 (enable_async_notification): ... this new function.
16484 (handle_accept_event): ... this new function.
16485 (remote_close): Clear remote_desc.
16486
16487 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16488
16489 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16490 New fields.
16491 (mourn_inferior): Define.
16492 (target_process_qsupported): Avoid the dangling else problem.
16493 (thread_stopped): Define.
16494 (pause_all): Define.
16495 (target_waitstatus_to_string): Declare.
16496 * target.c (target_waitstatus_to_string): New.
16497
16498 * tracepoint.c (tracing): Make extern.
16499 (disconnected_tracing): New.
16500 (stop_tracing): Make extern. Handle tracing stops due to GDB
16501 disconnecting.
16502 (cmd_qtdisconnected): New.
16503 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16504 (handle_tracepoint_general_set): Handle QTDisconnected.
16505
16506 * event-loop.c (event_handler_func): Change return type to int.
16507 (process_event): Bail out if the event handler wants the event
16508 loop to stop.
16509 (handle_file_event): Ditto.
16510 (start_event_loop): Bail out if the event handler wants the event
16511 loop to stop.
16512
16513 * nto-low.c (nto_target_ops): Adjust.
16514 * spu-low.c (spu_wait): Don't remove the process here.
16515 (spu_target_ops): Adjust.
16516 * win32-low.c (win32_wait): Don't remove the process here.
16517 (win32_target_ops): Adjust.
16518
16519 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16520
16521 * regcache.c (realloc_register_cache): Invalidate inferior's
16522 regcache before recreating it.
16523
16524 2010-04-09 Pedro Alves <pedro@codesourcery.com>
16525
16526 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16527
16528 2010-04-09 Stan Shebs <stan@codesourcery.com>
16529 Pedro Alves <pedro@codesourcery.com>
16530
16531 * server.h (LONGEST): New.
16532 (struct thread_info) <while_stepping>: New field.
16533 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16534 Declare.
16535 (initialize_tracepoint, handle_tracepoint_general_set)
16536 (handle_tracepoint_query, tracepoint_finished_step)
16537 (tracepoint_was_hit, release_while_stepping_state_list):
16538 (current_traceframe): Declare.
16539 * server.c (handle_general_set): Handle tracepoint packets.
16540 (read_memory): New.
16541 (write_memory): New.
16542 (handle_search_memory_1): Use read_memory.
16543 (handle_query): Report support for conditional tracepoints, trace
16544 state variables, and tracepoint sources. Handle tracepoint
16545 queries.
16546 (main): Initialize the tracepoints module.
16547 (process_serial_event): Handle traceframe reads/writes.
16548
16549 * linux-low.c (handle_tracepoints): New.
16550 (linux_wait_1): Call it.
16551 (linux_resume_one_lwp): Handle while-stepping.
16552 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16553 (linux_target_ops): Install them.
16554 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16555 New field.
16556 * linux-x86-low.c (x86_supports_tracepoints): New.
16557 (the_low_target). Install it.
16558
16559 * mem-break.h (delete_breakpoint): Declare.
16560 * mem-break.c (delete_breakpoint): Make external.
16561
16562 * target.h (struct target_ops): Add `supports_tracepoints',
16563 `read_pc', and `write_pc' fields.
16564 (target_supports_tracepoints): Define.
16565 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
16566 (phex_nz): New.
16567
16568 * regcache.h (struct regcache) <registers_owned>: New field.
16569 (init_register_cache, regcache_cpy): Declare.
16570 (regcache_read_pc, regcache_write_pc): Declare.
16571 (register_cache_size): Declare.
16572 (supply_regblock): Declare.
16573 * regcache.c (init_register_cache): New.
16574 (new_register_cache): Use it.
16575 (regcache_cpy): New.
16576 (register_cache_size): New.
16577 (supply_regblock): New.
16578 (regcache_read_pc, regcache_write_pc): New.
16579
16580 * tracepoint.c: New.
16581
16582 * Makefile.in (OBS): Add tracepoint.o.
16583 (tracepoint.o): New rule.
16584
16585 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
16586
16587 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
16588 (i386-mmx.o): New.
16589 (i386-mmx.c): Likewise.
16590 (i386-mmx-linux.o): Likewise.
16591 (i386-mmx-linux.c): Likewise.
16592
16593 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
16594 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
16595 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
16596 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
16597
16598 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
16599 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
16600 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
16601
16602 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
16603
16604 * Makefile.in (clean): Updated.
16605 (i386-avx.o): New.
16606 (i386-avx.c): Likewise.
16607 (i386-avx-linux.o): Likewise.
16608 (i386-avx-linux.c): Likewise.
16609 (amd64-avx.o): Likewise.
16610 (amd64-avx.c): Likewise.
16611 (amd64-avx-linux.o): Likewise.
16612 (amd64-avx-linux.c): Likewise.
16613
16614 * configure.srv (srv_i386_regobj): Add i386-avx.o.
16615 (srv_i386_linux_regobj): Add i386-avx-linux.o.
16616 (srv_amd64_regobj): Add amd64-avx.o.
16617 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
16618 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
16619 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
16620 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
16621 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
16622 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
16623 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
16624
16625 * i387-fp.c: Include "i386-xstate.h".
16626 (i387_xsave): New.
16627 (i387_cache_to_xsave): Likewise.
16628 (i387_xsave_to_cache): Likewise.
16629 (x86_xcr0): Likewise.
16630
16631 * i387-fp.h (i387_cache_to_xsave): Likewise.
16632 (i387_xsave_to_cache): Likewise.
16633 (x86_xcr0): Likewise.
16634
16635 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
16636 * linux-crisv32-low.c (target_regsets): Likewise.
16637 * linux-m68k-low.c (target_regsets): Likewise.
16638 * linux-mips-low.c (target_regsets): Likewise.
16639 * linux-ppc-low.c (target_regsets): Likewise.
16640 * linux-s390-low.c (target_regsets): Likewise.
16641 * linux-sh-low.c (target_regsets): Likewise.
16642 * linux-sparc-low.c (target_regsets): Likewise.
16643 * linux-xtensa-low.c (target_regsets): Likewise.
16644
16645 * linux-low.c: Include <sys/uio.h>.
16646 (regsets_fetch_inferior_registers): Support nt_type.
16647 (regsets_store_inferior_registers): Likewise.
16648 (linux_process_qsupported): New.
16649 (linux_target_ops): Add linux_process_qsupported.
16650
16651 * linux-low.h (regset_info): Add nt_type.
16652 (linux_target_ops): Add process_qsupported.
16653
16654 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
16655 and <sys/uio.h>.
16656 (init_registers_i386_avx_linux): New.
16657 (init_registers_amd64_avx_linux): Likewise.
16658 (xmltarget_i386_linux_no_xml): Likewise.
16659 (xmltarget_amd64_linux_no_xml): Likewise.
16660 (PTRACE_GETREGSET): Likewise.
16661 (PTRACE_SETREGSET): Likewise.
16662 (x86_fill_xstateregset): Likewise.
16663 (x86_store_xstateregset): Likewise.
16664 (use_xml): Likewise.
16665 (x86_linux_update_xmltarget): Likewise.
16666 (x86_linux_process_qsupported): Likewise.
16667 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
16668 (x86_arch_setup): Don't call init_registers_amd64_linux nor
16669 init_registers_i386_linux here. Call
16670 x86_linux_update_xmltarget.
16671 (the_low_target): Add x86_linux_process_qsupported.
16672
16673 * server.c (handle_query): Call target_process_qsupported.
16674
16675 * target.h (target_ops): Add process_qsupported.
16676 (target_process_qsupported): New.
16677
16678 2010-04-03 Pedro Alves <pedro@codesourcery.com>
16679
16680 * inferiors.c (add_thread): Set last_status kind to
16681 TARGET_WAITKIND_IGNORE.
16682 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
16683 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
16684 (linux_wait_1): Move `thread' local definition to block that uses
16685 it. Don't NULL initialize `event_child'.
16686 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
16687 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
16688 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
16689
16690 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16691
16692 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
16693 an extended waitstatus, or by a watchpoint.
16694 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
16695 thread was stepping or has been stopped by a watchpoint.
16696
16697 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16698
16699 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
16700 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
16701 of another, then delete the previous, and validate all
16702 breakpoints.
16703 (validate_inserted_breakpoint): New.
16704 (delete_disabled_breakpoints): New.
16705 (validate_breakpoints): New.
16706 (check_mem_read): Validate breakpoints before trusting their
16707 shadow. Delete disabled breakpoints.
16708 (check_mem_write): Validate breakpoints before trusting they
16709 should be inserted. Delete disabled breakpoints.
16710 * mem-break.h (validate_breakpoints):
16711 * server.c (handle_query): Validate breakpoints when we see a
16712 qSymbol query.
16713
16714 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16715
16716 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
16717 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
16718 if we could tell there's a GDB breakpoint at stop_pc.
16719 (need_step_over_p): Don't do a step over if we find a GDB
16720 breakpoint at the resume PC.
16721
16722 * mem-break.c (struct raw_breakpoint): New.
16723 (enum bkpt_type): New type `gdb_breakpoint'.
16724 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
16725 fields. New field `raw'.
16726 (find_raw_breakpoint_at): New.
16727 (set_raw_breakpoint_at): Handle refcounting. Create a raw
16728 breakpoint instead.
16729 (set_breakpoint_at): Adjust.
16730 (delete_raw_breakpoint): New.
16731 (release_breakpoint): New.
16732 (delete_breakpoint): Rename to...
16733 (delete_breakpoint_1): ... this. Add proc parameter. Use
16734 release_breakpoint. Return ENOENT.
16735 (delete_breakpoint): Reimplement.
16736 (find_breakpoint_at): Delete.
16737 (find_gdb_breakpoint_at): New.
16738 (delete_breakpoint_at): Delete.
16739 (set_gdb_breakpoint_at): New.
16740 (delete_gdb_breakpoint_at): New.
16741 (gdb_breakpoint_here): New.
16742 (set_reinsert_breakpoint): Use release_breakpoint.
16743 (uninsert_breakpoint): Rename to ...
16744 (uninsert_raw_breakpoint): ... this.
16745 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
16746 (reinsert_raw_breakpoint): Change parameter type to
16747 raw_breakpoint.
16748 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
16749 instead.
16750 (check_breakpoints): Adjust. Use release_breakpoint.
16751 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
16752 (breakpoint_inserted_here): Ditto.
16753 (check_mem_read): Adjust to iterate over raw breakpoints instead.
16754 Don't trust the breakpoint's shadow if it is not inserted.
16755 (check_mem_write): Adjust to iterate over raw breakpoints instead.
16756 (delete_all_breakpoints): Adjust.
16757 (free_all_breakpoints): Mark all breakpoints as uninserted, and
16758 use delete_breakpoint_1.
16759
16760 * mem-break.h (breakpoints_supported): Delete declaration.
16761 (set_gdb_breakpoint_at): Declare.
16762 (gdb_breakpoint_here): Declare.
16763 (delete_breakpoint_at): Delete.
16764 (delete_gdb_breakpoint_at): Declare.
16765
16766 * server.h (struct raw_breakpoint): Forward declare.
16767 (struct process_info): New field `raw_breakpoints'.
16768
16769 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
16770 breakpoints.
16771
16772 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16773
16774 * linux-low.c (status_pending_p_callback): Fix comment.
16775 (linux_wait_for_event_1): Move most of the internal breakpoint
16776 handling from here...
16777 (linux_wait_1): ... to here.
16778 (count_events_callback): New.
16779 (select_singlestep_lwp_callback): New.
16780 (select_event_lwp_callback): New.
16781 (cancel_breakpoints_callback): New.
16782 (select_event_lwp): New.
16783 (linux_wait_1): Simplify internal breakpoint handling. Give equal
16784 priority to all LWPs that have had events that should be reported
16785 to the client. Cancel breakpoints when about to reporting the
16786 event to the client, not while stopping lwps. No longer cancel
16787 finished single-steps here.
16788 (cancel_finished_single_step): Delete.
16789 (cancel_finished_single_steps): Delete.
16790
16791 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16792
16793 * mem-break.c (enum bkpt_type): New.
16794 (struct breakpoint): New field `type'.
16795 (set_breakpoint_at): Change return type to struct breakpoint
16796 pointer. Set type to `other_breakpoint' by default.
16797 (delete_breakpoint): Rewrite, supporting more than one breakpoint
16798 in the breakpoint list.
16799 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
16800 (reinsert_breakpoint): Rename to ...
16801 (reinsert_raw_breakpoint): ... this.
16802 (reinsert_breakpoints_at): Adjust.
16803 * mem-break.h (struct breakpoint): Declare.
16804 (set_breakpoint_at): Change return type to struct breakpoint
16805 pointer.
16806
16807 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16808
16809 * server.c (handle_query): Assign, not compare.
16810
16811 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16812
16813 Teach linux gdbserver to step-over-breakpoints.
16814
16815 * linux-low.c (can_hardware_single_step): New.
16816 (supports_breakpoints): New.
16817 (handle_extended_wait): If stopping threads, read the stop pc of
16818 the new cloned LWP.
16819 (get_pc): New.
16820 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
16821 low target doesn't support retrieving the PC.
16822 (add_lwp): Set last_resume_kind to resume_continue.
16823 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
16824 (linux_attach): Don't clear stop_expected. Set the lwp's
16825 last_resume_kind to resume_stop.
16826 (linux_detach_one_lwp): Don't check for removed breakpoints.
16827 (check_removed_breakpoint): Delete.
16828 (status_pending_p): Rename to ...
16829 (status_pending_p_callback): ... this. Don't check for removed
16830 breakpoints. Don't consider threads that are stopped from GDB's
16831 perspective.
16832 (linux_wait_for_lwp): Always read the stop_pc here.
16833 (cancel_breakpoint): New.
16834 (step_over_bkpt): New global.
16835 (linux_wait_for_event_1): Implement stepping over breakpoints.
16836 (gdb_wants_lwp_stopped): New.
16837 (gdb_wants_all_stopped): New.
16838 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
16839 single-step traps here. Store the thread's last reported target
16840 wait status.
16841 (send_sigstop): Don't clear stop_expected. Always set it,
16842 instead.
16843 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
16844 (cancel_finished_single_step): New.
16845 (cancel_finished_single_steps): New.
16846 (wait_for_sigstop): Don't cancel finished single-step traps here.
16847 (linux_resume_one_lwp): Don't check for removed breakpoints.
16848 Don't set `step' on non-hardware step archs.
16849 (linux_set_resume_request): Ignore resume_stop requests if already
16850 stopping or stopped. Set the lwp's last_resume_kind.
16851 (resume_status_pending_p): Don't check for removed breakpoints.
16852 (need_step_over_p): New.
16853 (start_step_over): New.
16854 (finish_step_over): New.
16855 (linux_resume_one_thread): Always queue a sigstop for resume_stop
16856 requests. Clear the thread's last reported target waitstatus.
16857 Don't use the `suspended' flag. Don't consider pending breakpoints.
16858 (linux_resume): Start a step-over if necessary.
16859 (proceed_one_lwp): New.
16860 (proceed_all_lwps): New.
16861 (unstop_all_lwps): New.
16862 * linux-low.h (struct lwp_info): Rewrite comment for the
16863 `suspended' flag. Add the `stop_pc' field. Delete the
16864 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
16865 Add `'last_resume_kind' and `need_step_over' fields.
16866 * inferiors.c (struct thread_info): Delete, moved elsewhere.
16867 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
16868 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
16869 (set_raw_breakpoint_at): New.
16870 (set_breakpoint_at): Rewrite to use it.
16871 (reinsert_breakpoint_handler): Delete.
16872 (set_reinsert_breakpoint): New.
16873 (reinsert_breakpoint_by_bp): Delete.
16874 (delete_reinsert_breakpoints): New.
16875 (uninsert_breakpoint): Rewrite.
16876 (uninsert_breakpoints_at): New.
16877 (reinsert_breakpoint): Rewrite.
16878 (reinsert_breakpoints_at): New.
16879 (check_breakpoints): Rewrite.
16880 (breakpoint_here): New.
16881 (breakpoint_inserted_here): New.
16882 (check_mem_read): Adjust.
16883 * mem-break.h (breakpoints_supported, breakpoint_here)
16884 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
16885 (reinsert_breakpoint_by_bp): Delete declaration.
16886 (delete_reinsert_breakpoints): Declare.
16887 (reinsert_breakpoint): Delete declaration.
16888 (reinsert_breakpoints_at): Declare.
16889 (uninsert_breakpoint): Delete declaration.
16890 (uninsert_breakpoints_at): Declare.
16891 (check_breakpoints): Adjust prototype.
16892 * server.h: Adjust include order.
16893 (struct thread_info): Declare here. Add a `last_status' field.
16894
16895 2010-03-23 Michael Snyder <msnyder@vmware.com>
16896
16897 * server.c (crc32): New function.
16898 (handle_query): Add handling for 'qCRC:' request.
16899
16900 2010-03-23 Pedro Alves <pedro@codesourcery.com>
16901
16902 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
16903 lwp had been stopped by a watchpoint.
16904
16905 2010-03-16 Pedro Alves <pedro@codesourcery.com>
16906
16907 * server.h (internal_error): Declare.
16908 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
16909 * utils.c (internal_error): New function.
16910
16911 2010-03-15 Andreas Schwab <schwab@redhat.com>
16912
16913 * configure.srv: Fix typo setting srv_regobj.
16914
16915 2010-03-15 Pedro Alves <pedro@codesourcery.com>
16916
16917 * linux-low.c (fetch_register): Avoid passing a non string literal
16918 format to `error'.
16919 (usr_store_inferior_registers): Ditto.
16920
16921 2010-03-14 Pedro Alves <pedro@codesourcery.com>
16922
16923 * linux-low.c (linux_write_memory): Bail out early if peeking
16924 memory failed.
16925
16926 2010-03-14 Pedro Alves <pedro@codesourcery.com>
16927
16928 * linux-low.h (struct lwp_info): New fields
16929 `stopped_by_watchpoint' and `stopped_data_address'.
16930 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
16931 here, and cache them in the lwp object.
16932 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
16933 directly.
16934 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
16935 field.
16936 (linux_stopped_by_watchpoint): Rewrite.
16937 (linux_stopped_data_address): Rewrite.
16938
16939 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
16940
16941 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
16942 switching the current inferior, not before.
16943
16944 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
16945
16946 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
16947 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
16948 i386-linux.c and amd64-linux.c.
16949 (reg-i386.o): Removed.
16950 (reg-i386.c): Likewise.
16951 (reg-i386-linux.o): Likewise.
16952 (reg-i386-linux.c): Likewise.
16953 (reg-x86-64.o): Likewise.
16954 (reg-x86-64.c): Likewise.
16955 (reg-x86-64-linux.o): Likewise.
16956 (reg-x86-64-linux.c): Likewise.
16957 (i386.o): New.
16958 (i386.c): Likewise.
16959 (i386-linux.o): Likewise.
16960 (i386-linux.c): Likewise.
16961 (amd64.o): Likewise.
16962 (amd64.c): Likewise.
16963 (amd64-linux.o): Likewise.
16964 (amd64-linux.c): Likewise.
16965
16966 * configure.srv (srv_i386_regobj): New.
16967 (srv_i386_linux_regobj): Likewise.
16968 (srv_amd64_regobj): Likewise.
16969 (srv_amd64_linux_regobj): Likewise.
16970 (srv_i386_32bit_xmlfiles): Likewise.
16971 (srv_i386_64bit_xmlfiles): Likewise.
16972 (srv_i386_xmlfiles): Likewise.
16973 (srv_amd64_xmlfiles): Likewise.
16974 (srv_i386_linux_xmlfiles): Likewise.
16975 (srv_amd64_linux_xmlfiles): Likewise.
16976 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
16977 srv_xmlfiles to $srv_i386_xmlfiles.
16978 (i[34567]86-*-mingw32ce*): Likewise.
16979 (i[34567]86-*-mingw*): Likewise.
16980 (i[34567]86-*-nto*): Likewise.
16981 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
16982 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
16983 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
16984 (x86_64-*-linux*): Likewise.
16985
16986 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
16987 (init_registers_amd64_linux): New.
16988 (x86_arch_setup): Replace init_registers_x86_64_linux with
16989 init_registers_amd64_linux.
16990
16991 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
16992
16993 * configure.ac: Check for libdl. If it is not available link against
16994 static libthread_db.
16995 * configure: Regenerate.
16996
16997 2010-02-22 Pedro Alves <pedro@codesourcery.com>
16998
16999 PR9605
17000
17001 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
17002 handing a read watchpoint.
17003 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
17004
17005 2010-02-12 Doug Evans <dje@google.com>
17006
17007 * linux-low.c (linux_supports_tracefork_flag): Document.
17008 (linux_look_up_symbols): Add comment.
17009
17010 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
17011
17012 * regcache.c (supply_register): Clear regcache if buf is NULL.
17013
17014 2010-02-02 Nicolas Roche <roche@sourceware.org>
17015 Joel Brobecker <brobecker@adacore.com>
17016
17017 * inferiors.c (find_inferior): Add function documentation.
17018 (unloaded_dll): Handle the case where the unloaded dll has not
17019 been previously registered in the dll list.
17020
17021 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17022
17023 * linux-arm-low.c (thumb_breakpoint_len): Delete.
17024 (thumb2_breakpoint): New.
17025 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
17026
17027 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17028
17029 * linux-low.c (get_stop_pc): Check for SIGTRAP.
17030 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
17031 breakpoints.
17032
17033 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17034
17035 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
17036
17037 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
17038
17039 * linux-s390-low.c (s390_collect_ptrace_register)
17040 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
17041
17042 2010-01-21 Doug Evans <dje@google.com>
17043
17044 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
17045 (PTRACE_ARG4_TYPE): New macro.
17046 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
17047 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
17048 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
17049 (usr_store_inferior_registers): Ditto.
17050 (linux_read_memory, linux_write_memory): Ditto.
17051 (linux_test_for_tracefork): Ditto.
17052
17053 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
17054 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
17055
17056 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17057
17058 * proc-service.c (ps_lgetregs): Don't refetch registers from the
17059 target.
17060
17061 2010-01-21 Pedro Alves <pedro@codesourcery.com>
17062
17063 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
17064 prototype to take a regcache. Adjust.
17065
17066 2010-01-20 Pedro Alves <pedro@codesourcery.com>
17067
17068 * regcache.h (struct thread_info): Forward declare.
17069 (struct regcache): New.
17070 (new_register_cache): Adjust prototype.
17071 (get_thread_regcache): Declare.
17072 (free_register_cache): Adjust prototype.
17073 (registers_to_string, registers_from_string): Ditto.
17074 (supply_register, supply_register_by_name, collect_register)
17075 (collect_register_as_string, collect_register_by_name): Ditto.
17076 * regcache.c (struct inferior_regcache_data): Delete.
17077 (get_regcache): Rename to ...
17078 (get_thread_regcache): ... this. Adjust. Switch inferior before
17079 fetching registers.
17080 (regcache_invalidate_one): Adjust.
17081 (regcache_invalidate): Fix prototype.
17082 (new_register_cache): Return the new register cache.
17083 (free_register_cache): Change prototype.
17084 (realloc_register_cache): Adjust.
17085 (registers_to_string): Change prototype to take a regcache. Adjust.
17086 (registers_from_string): Ditto.
17087 (register_data): Ditto.
17088 (supply_register): Ditto.
17089 (supply_register_by_name): Ditto.
17090 (collect_register): Ditto.
17091 (collect_register_as_string): Ditto.
17092 (collect_register_by_name): Ditto.
17093 * server.c (process_serial_event): Adjust.
17094 * linux-low.h (regset_fill_func, regset_store_func): Change
17095 prototype.
17096 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
17097 Change prototype.
17098 * linux-low.c (get_stop_pc): Adjust.
17099 (check_removed_breakpoint): Adjust.
17100 (linux_wait_for_event): Adjust.
17101 (linux_resume_one_lwp): Adjust.
17102 (fetch_register): Add regcache parameter. Adjust.
17103 (usr_store_inferior_registers): Ditto.
17104 (regsets_fetch_inferior_registers): Ditto.
17105 (regsets_store_inferior_registers): Ditto.
17106 (linux_fetch_registers, linux_store_registers): Ditto.
17107 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17108 regcache. Adjust.
17109 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17110 Ditto.
17111 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17112 prototype to take a regcache.
17113 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17114 * remote-utils.c (convert_ascii_to_int, outreg)
17115 (prepare_resume_reply): Change prototype to take a regcache.
17116 Adjust.
17117 * target.h (struct target_ops) <fetch_registers, store_registers>:
17118 Change prototype to take a regcache.
17119 (fetch_inferior_registers, store_inferior_registers): Change
17120 prototype to take a regcache. Adjust.
17121 * proc-service.c (ps_lgetregs): Adjust.
17122 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17123 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17124 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17125 take a regcache. Adjust.
17126 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17127 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17128 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17129 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17130 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17131 (cris_cannot_fetch_register):
17132 (cris_breakpoint_at): Change prototype to take a regcache.
17133 Adjust.
17134 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17135 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17136 to take a regcache. Adjust.
17137 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17138 Adjust.
17139 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17140 take a regcache. Adjust.
17141 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17142 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17143 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17144 * linux-mips-low.c (mips_get_pc):
17145 (mips_set_pc): Change prototype to take a regcache. Adjust.
17146 (mips_reinsert_addr): Adjust.
17147 (mips_collect_register): Change prototype to take a regcache.
17148 Adjust.
17149 (mips_supply_register):
17150 (mips_collect_register_32bit, mips_supply_register_32bit)
17151 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17152 (mips_store_fpregset): Ditto.
17153 * linux-ppc-low.c (ppc_supply_ptrace_register)
17154 (ppc_supply_ptrace_register): Ditto.
17155 (parse_spufs_run): Adjust.
17156 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17157 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17158 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17159 take a regcache. Adjust.
17160 * linux-s390-low.c (s390_collect_ptrace_register)
17161 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17162 (s390_set_pc): Change prototype to take a regcache. Adjust.
17163 (s390_arch_setup): Adjust.
17164 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17165 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17166 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17167 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17168 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17169 regcache. Adjust.
17170 (sparc_breakpoint_at): Adjust.
17171 * linux-xtensa-low.c (xtensa_fill_gregset):
17172 (xtensa_store_gregset):
17173 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17174 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17175 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17176 prototype to take a regcache. Adjust.
17177 * win32-arm-low.c (arm_fetch_inferior_register)
17178 (arm_store_inferior_register): Change prototype to take a
17179 regcache. Adjust.
17180 * win32-i386-low.c (i386_fetch_inferior_register)
17181 (i386_store_inferior_register): Change prototype to take a
17182 regcache. Adjust.
17183 * win32-low.c (child_fetch_inferior_registers)
17184 (child_store_inferior_registers): Change prototype to take a
17185 regcache. Adjust.
17186 (win32_wait): Adjust.
17187 (win32_fetch_inferior_registers): Change prototype to take a
17188 regcache. Adjust.
17189 (win32_store_inferior_registers): Adjust.
17190 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17191 store_inferior_register>: Change prototype to take a regcache.
17192
17193 2010-01-20 Doug Evans <dje@google.com>
17194
17195 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17196 #ifdef.
17197 (linux_wait_for_event1, linux_init_signals): Ditto.
17198 (W_STOPCODE): Provide definition if missing.
17199
17200 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17201
17202 * linux-low.c (linux_core_of_thread): New.
17203 (compare_ints, show_process, list_threads): New.
17204 (linux_qxfer_osdata): Report threads and cores.
17205 (linux_target_op): Register linux_core_of_thread.
17206 * remote-utils.c (prepare_resume_reply): Report the core.
17207 (buffer_xml_printf): Support %d specifier.
17208 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17209 New.
17210 (handle_query): Handle qXfer:threads. Announce availability
17211 thereof.
17212 * target.h (struct target_ops): New field core_of_thread.
17213
17214 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17215
17216 * Makefile.in (clean): Remove new generated files.
17217 (reg-s390.o, reg-s390.c): Remove rules.
17218 (reg-s390x.o, reg-s390x.c): Likewise.
17219 (s390-linux32.o, s390-linux32.c): Add rules.
17220 (s390-linux64.o, s390-linux64.c): Likewise.
17221 (s390x-linux64.o, s390x-linux64.c): Likewise.
17222 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17223 * linux-s390-low.c: Include <elf.h>.
17224 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17225 (init_registers_s390): Remove prototype.
17226 (init_registers_s390x): Likewise.
17227 (init_registers_s390_linux32): Add prototype.
17228 (init_registers_s390_linux64): Likewise.
17229 (init_registers_s390x_linux64): Likewise.
17230 (s390_num_regs_3264): New define.
17231 (s390_regmap_3264): New global variable.
17232 (s390_cannot_fetch_register): Remove obsolete check.
17233 (s390_cannot_store_register): Likewise.
17234 (s390_collect_ptrace_register): Handle upper/lower register halves.
17235 (s390_supply_ptrace_register): Likewise.
17236 (s390_fill_gregset): Update to register number changes.
17237 (s390_get_hwcap): New routine.
17238 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17239 Install appropriate regmap and register set.
17240
17241 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17242
17243 * server.c (gdbserver_version): Update copyright year to 2010.
17244 * gdbreplay.c (gdbreplay_version): Likewise.
17245
17246 2009-12-28 Doug Evans <dje@google.com>
17247
17248 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17249 elf/external.h. Include <elf.h> instead but only if necessary.
17250
17251 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17252
17253 * linux-low.c (linux_remove_process): Remove `detaching'
17254 parameter. Don't release/detach from thread_db here.
17255 (linux_kill): Release/detach from thread_db here, ...
17256 (linux_detach): ... and here, before actually detaching.
17257 (linux_wait_1): ... and here, when a process exits.
17258 * thread-db.c (any_thread_of): New.
17259 (thread_db_free): Switch the current inferior to a thread of the
17260 passed in process.
17261
17262 2009-12-21 Doug Evans <dje@google.com>
17263
17264 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17265
17266 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17267 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17268 warning ifndef __NR_tkill. Move setting of errno there too.
17269 Delete unnecessary resetting of errno after syscall.
17270 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17271
17272 * configure.ac: Check for dladdr.
17273 * config.in: Regenerate.
17274 * configure: Regenerate.
17275 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17276 (try_thread_db_load): Update.
17277
17278 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17279
17280 2009-12-18 Doug Evans <dje@google.com>
17281
17282 * event-loop.c: Include unistd.h if it exists.
17283
17284 * linux-low.c (my_waitpid): Move definition away from being in
17285 between linux_tracefork_child/linux_test_for_tracefork.
17286
17287 * gdb_proc_service.h (psaddr_t): Fix type.
17288 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17289 signature to match glibc.
17290
17291 2009-12-16 Doug Evans <dje@google.com>
17292
17293 * linux-low.c (linux_read_memory): Fix argument to read.
17294
17295 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17296
17297 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17298 events, don't leave current_inferior pointing at null.
17299
17300 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17301
17302 * win32-low.c (LOG): Delete.
17303 (OUTMSG): Output to stderr.
17304 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17305 on compile time LOG macro.
17306 (win32_wait): Fix debug output.
17307
17308 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17309
17310 * win32-low.c (win32_add_one_solib): If the dll name is
17311 "ntdll.dll", prepend the system directory to the dll path.
17312
17313 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17314
17315 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17316
17317 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17318 Vladimir Prus <vladimir@codesourcery.com>
17319
17320 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17321 * configure.ac: Check for __mcoldfire__ and set
17322 gdb_cv_m68k_is_coldfire.
17323 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17324 reg-cf.o and reg-m68k.o.
17325 * configure: Regenerated.
17326
17327 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17328
17329 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17330 Pass it to thread_db_free.
17331 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17332 proper `detaching' argument to linux_remove_process.
17333 * linux-low.h (thread_db_free): Add `detaching' parameter.
17334 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17335 to thread_db_free.
17336 (thread_db_free): Add `detaching' parameter. Only
17337 call td_ta_clear_event if detaching from process.
17338
17339 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17340
17341 * thread-db.c (thread_db_free): Fix typo.
17342
17343 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17344
17345 PR gdb/10838
17346 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17347
17348 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17349
17350 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17351 with an i686 compiler.
17352 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17353 needed.
17354 * configure: Rebuilt.
17355
17356 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17357
17358 PR gdb/10783
17359
17360 * server.c (handle_search_memory_1): Correct read_addr initialization
17361 in loop for searching subsequent chunks.
17362
17363 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17364
17365 * configure.ac: New --with-libthread-db option.
17366 * thread-db.c: Allow direct dependence on libthread_db.
17367 (thread_db_free): Adjust.
17368 * config.in: Regenerate.
17369 * configure: Likewise.
17370
17371 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17372
17373 PR gdb/10757
17374 * thread-db.c (attach_thread): New function.
17375 (maybe_attach_thread): Return success/failure.
17376 (find_new_threads_callback): Adjust.
17377 (thread_db_find_new_threads): Loop until no new threads.
17378
17379 2009-10-13 Pedro Alves <pedro@codesourcery.com>
17380
17381 * proc-service.c (ps_lgetregs): Formatting.
17382
17383 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17384
17385 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17386 * configure.ac: Adjust.
17387 * linux-low.h (struct process_info_private): Move members to struct
17388 thread_db.
17389 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17390 * linux-low.c (linux_remove_process): Adjust.
17391 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17392 * server.c (handle_query): Move code ...
17393 (handle_monitor_command): ... here. New function.
17394 * target.h (struct target_ops): New member.
17395 * thread-db.c (struct thread_db): New.
17396 (libthread_db_search_path): New variable.
17397 (thread_db_create_event, thread_db_enable_reporting)
17398 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17399 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17400 (try_thread_db_load_1, dladdr_to_soname): New functions.
17401 (try_thread_db_load, thread_db_load_search): New functions.
17402 (thread_db_init): Search for libthread_db.
17403 (thread_db_free): New function.
17404 (thread_db_handle_monitor_command): Likewise.
17405 * config.in: Regenerate.
17406 * configure: Regenerate.
17407
17408 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17409
17410 * spu-low.c (spu_kill): Wait for inferior to terminate.
17411 Call clear_inferiors.
17412 (spu_detach): Call clear_inferiors.
17413
17414 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17415
17416 * aclocal.m4: Regenerate.
17417 * config.in: Likewise.
17418 * configure: Likewise.
17419
17420 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17421
17422 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17423 (parse_spufs_run): New function.
17424 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17425 (ppc_breakpoint_at): Handle SPU breakpoints.
17426
17427 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17428
17429 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17430 (SPUFS_MAGIC): Define.
17431 (spu_enumerate_spu_ids): New function.
17432 (linux_qxfer_spu): New function.
17433 (linux_target_ops): Install linux_qxfer_spu.
17434
17435 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17436
17437 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17438 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17439 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17440 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17441 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17442 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17443 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17444 (init_registers_powerpc_cell32l): Add prototype.
17445 (init_registers_powerpc_cell64l): Likewise.
17446 (ppc_arch_setup): Detect Cell/B.E. architecture.
17447
17448 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17449
17450 * Makefile.in (datarootdir): New variable.
17451
17452 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17453
17454 * linux-low.c (linux_write_memory): Update debugging output.
17455 * Makefile.in (clean): Add new descriptions.
17456 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17457 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17458 * configure.srv: Add new files for arm*-*-linux*.
17459 * linux-arm-low.c: Add new declarations.
17460 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17461 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17462 (HWCAP_VFPv3D16): New.
17463 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17464 instead of __IWMMXT__.
17465 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17466 (arm_arch_setup): New.
17467 (target_regsets): Remove #ifdef. Add VFP regset.
17468 (the_low_target): Use arm_arch_setup.
17469
17470 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17471
17472 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17473 the main thread again.
17474
17475 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17476
17477 Adding Neutrino gdbserver.
17478 * configure: Regenerated.
17479 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17480 * configure.srv (i[34567]86-*-nto*): New target.
17481 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17482 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17483 (nto_comctrl) [__QNX__]: New function.
17484 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17485
17486 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
17487
17488 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17489 srv_tgtobj.
17490
17491 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17492 Pedro Alves <pedro@codesourcery.com>
17493
17494 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17495 don't support CONTEXT_EXTENDED_REGISTERS.
17496 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17497 (the_low_target): Install them.
17498 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17499 failing with ERROR_PIPE_NOT_CONNECTED.
17500
17501 2009-06-30 Doug Evans <dje@google.com>
17502 Pierre Muller <muller@ics.u-strasbg.fr>
17503
17504 Add h/w watchpoint support to x86-linux, win32-i386.
17505 * Makefile.in (SFILES): Add i386-low.c
17506 (i386_low_h): Define.
17507 (i386-low.o): Add dependencies.
17508 (linux-x86-low.o): Add i386-low.h dependency.
17509 (win32-i386-low.o): Ditto.
17510 * i386-low.c: New file.
17511 * i386-low.h: New file.
17512 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17513 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17514 * linux-low.c (linux_add_process): Initialize arch_private.
17515 (linux_remove_process): Free arch_private.
17516 (add_lwp): Initialize arch_private.
17517 (delete_lwp): Free arch_private.
17518 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17519 provided.
17520 * linux-low.h (process_info_private): New member arch_private.
17521 (lwp_info): New member arch_private.
17522 (linux_target_ops): New members new_process, new_thread,
17523 prepare_to_resume.
17524 (ptid_of): New macro.
17525 * linux-x86-low.c: Include stddef.h, i386-low.h.
17526 (arch_process_info): New struct.
17527 (arch_lwp_info): New struct.
17528 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17529 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17530 (i386_dr_low_get_status): New function.
17531 (x86_insert_point, x86_remove_point): New functions.
17532 (x86_stopped_by_watchpoint): New function.
17533 (x86_stopped_data_address): New function.
17534 (x86_linux_new_process, x86_linux_new_thread): New functions.
17535 (x86_linux_prepare_to_resume): New function.
17536 (the_low_target): Add entries for insert_point, remove_point,
17537 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17538 prepare_to_resume.
17539 * server.c (debug_hw_points): New global.
17540 (monitor_show_help): Document set debug-hw-points.
17541 (handle_query): Process "set debug-hw-points".
17542 * server.h (debug_hw_points): Declare.
17543 (paddress): Declare.
17544 * utils.c (NUMCELLS, CELLSIZE): New macros.
17545 (get_sell, xsnprintf, paddress): New functions.
17546 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17547 remove_point, stopped_by_watchpoint, stopped_data_address.
17548 * win32-i386-low.c: Include i386-low.h.
17549 (debug_reg_state): Replaces dr.
17550 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17551 (i386_dr_low_get_status): New function.
17552 (i386_insert_point, i386_remove_point): New functions.
17553 (i386_stopped_by_watchpoint): New function.
17554 (i386_stopped_data_address): New function.
17555 (i386_initial_stuff): Update.
17556 (get_thread_context,set_thread_context,i386_thread_added): Update.
17557 (the_low_target): Add entries for insert_point,
17558 remove_point, stopped_by_watchpoint, stopped_data_address.
17559 * win32-low.c (win32_insert_watchpoint): New function.
17560 (win32_remove_watchpoint): New function.
17561 (win32_stopped_by_watchpoint): New function.
17562 (win32_stopped_data_address): New function.
17563 (win32_target_ops): Add entries for insert_watchpoint,
17564 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
17565 * win32-low.h (win32_target_ops): New members insert_point,
17566 remove_point, stopped_by_watchpoint, stopped_data_address.
17567
17568 2009-06-25 Pedro Alves <pedro@codesourcery.com>
17569
17570 * server.c (process_serial_event): Re-return unsupported, not
17571 error, if the type isn't recognized. Re-allow supporting only
17572 insert or remove packets. Also call require_running for
17573 breakpoints. Add missing break statement to default case. Tidy.
17574 * target.h (struct target_ops): Rename insert_watchpoint to
17575 insert_point, and remove_watchpoint to remove_point.
17576
17577 * linux-low.h (struct linux_target_ops): Likewise.
17578 * linux-low.c (linux_insert_watchpoint): Rename to ...
17579 (linux_insert_point): ... this. Adjust.
17580 (linux_remove_watchpoint): Rename to ...
17581 (linux_remove_point): ... this. Adjust.
17582 (linux_target_ops): Adjust.
17583 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
17584 (cris_insert_point): ... this.
17585 (cris_remove_watchpoint): Rename to ...
17586 (cris_remove_point): ... this.
17587 (the_low_target): Adjust.
17588
17589 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
17590
17591 * server.c (handle_v_kill): Pass signal_pid to
17592 kill_inferior if multi_process is zero.
17593
17594 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
17595
17596 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
17597 * target.h (target_ops): Comment for *_watchpoint to make it clear
17598 the functions can get types '0' and '1'.
17599
17600 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
17601
17602 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
17603 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
17604 * regcache.c (get_regcache): Likewise.
17605 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
17606 * win32-low.c (child_fetch_inferior_registers): Remove check for
17607 regno 0.
17608
17609 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
17610 Pedro Alves <pedro@codesourcery.com>
17611
17612 * target.h (struct target_ops) <supports_multi_process>: New
17613 callback.
17614 (target_supports_multi_process): New.
17615 * server.c (handle_query): Even if GDB reports support, only
17616 enable multi-process if the target also supports it. Report
17617 multi-process support only if the target backend supports it.
17618 * linux-low.c (linux_supports_multi_process): New function.
17619 (linux_target_ops): Install it as target_supports_multi_process
17620 callback.
17621
17622 2009-05-24 Doug Evans <dje@google.com>
17623
17624 Global renaming of find_thread_pid to find_thread_ptid.
17625 * server.h (find_thread_ptid): Renamed from find_thread_pid.
17626 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
17627 All callers updated.
17628
17629 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
17630 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
17631 directly.
17632
17633 * linux-low.c (get_stop_pc): Print pc if debug_threads.
17634 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
17635 (linux_resume_one_lwp): Ditto.
17636
17637 2009-05-23 Doug Evans <dje@google.com>
17638
17639 * linux-low.c (linux_resume_one_lwp): Change type of first arg
17640 from struct inferior_list_entry * to struct lwp_info *.
17641 All callers updated.
17642
17643 2009-05-13 Doug Evans <dje@google.com>
17644
17645 * linux-x86-low.c: Don't include assert.h.
17646 (x86_siginfo_fixup): Use fatal, not assert.
17647 (x86_arch_setup): Fix comment.
17648
17649 2009-05-12 Doug Evans <dje@google.com>
17650
17651 Biarch support for i386/amd64 gdbserver.
17652 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
17653 Add linux-x86-low.c.
17654 (linux-i386-low.o, linux-x86-64-low.o): Delete.
17655 (linux-x86-low.o): Add.
17656 * linux-x86-64-low.c: Delete.
17657 * linux-i386-low.c: Delete.
17658 * linux-x86-low.c: New file.
17659 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
17660 linux-x86-low.o.
17661 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
17662 linux-x86-low.o.
17663 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
17664 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
17665 (linux_child_pid_to_exec_file): New function.
17666 (elf_64_header_p, elf_64_file_p): New functions.
17667 (siginfo_fixup): New function.
17668 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
17669 give target a chance to convert layout.
17670 * linux-low.h (linux_target_ops): New member siginfo_fixup.
17671 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
17672
17673 2009-05-07 Doug Evans <dje@google.com>
17674
17675 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
17676 (regsets_store_inferior_registers): Ditto.
17677
17678 2009-05-06 Pedro Alves <pedro@codesourcery.com>
17679
17680 PR server/10048
17681
17682 * linux-low.c (must_set_ptrace_flags): Delete.
17683 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
17684 of the global.
17685 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
17686 `lwp->must_set_ptrace_flags' instead.
17687 (linux_wait_for_event_1): Set ptrace options here.
17688 (linux_wait_1): ... not here.
17689
17690 2009-04-30 Doug Evans <dje@google.com>
17691
17692 * inferiors.c (started_inferior_callback): New function.
17693 (attached_inferior_callback): New function.
17694 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
17695 * server.c (print_started_pid, print_attached_pid): New functions.
17696 (detach_or_kill_for_exit): New function.
17697 (main): Call it instead of for_each_inferior (kill_inferior_callback).
17698 * server.h (have_started_inferiors_p): Declare.
17699 (have_attached_inferiors_p): Declare.
17700
17701 * inferiors.c (remove_process): Fix memory leak, free process.
17702 * linux-low.c (linux_remove_process): New function.
17703 (linux_kill): Call it instead of remove_process.
17704 (linux_detach, linux_wait_1): Ditto.
17705
17706 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
17707
17708 * configure.srv: Add x86 Windows CE target.
17709
17710 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17711
17712 * inferiors.c (get_thread_process): Make global.
17713 * server.h (get_thread_process): Add prototype.
17714 * thread-db.c (find_one_thread): Use get_thread_process
17715 instead of current_process.
17716 (thread_db_get_tls_address): Do not crash if called when
17717 thread layer is not yet initialized.
17718
17719 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17720
17721 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
17722 * spu-low.c (current_tid): Rename to ...
17723 (current_ptid): ... this.
17724 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
17725 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
17726 ptid_get_lwp (current_ptid) instead of current_tid.
17727 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
17728 instead of current_tid. Use find_process_pid to verify pid
17729 argument is valid. Pass proper argument to remove_process.
17730 (spu_thread_alive): Compare current_ptid instead of current_tid.
17731 (spu_resume): Likewise.
17732
17733 2009-04-02 Pedro Alves <pedro@codesourcery.com>
17734
17735 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
17736 variable.
17737
17738 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17739
17740 Implement the multiprocess extensions, and add linux multiprocess
17741 support.
17742
17743 * server.h (ULONGEST): Declare.
17744 (struct ptid, ptid_t): New.
17745 (minus_one_ptid, null_ptid): Declare.
17746 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17747 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
17748 (struct inferior_list_entry): Change `id' type from unsigned from
17749 to ptid_t.
17750 (struct sym_cache, struct breakpoint, struct
17751 process_info_private): Forward declare.
17752 (struct process_info): Declare.
17753 (current_process): Declare.
17754 (all_processes): Declare.
17755 (initialize_inferiors): Declare.
17756 (add_thread): Adjust to use ptid_t.
17757 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
17758 (add_process, remove_process, find_thread_pid): Declare.
17759 (find_inferior_id): Adjust to use ptid_t.
17760 (cont_thread, general_thread, step_thread): Change type to ptid_t.
17761 (multi_process): Declare.
17762 (push_event): Adjust to use ptid_t.
17763 (read_ptid, write_ptid): Declare.
17764 (prepare_resume_reply): Adjust to use ptid_t.
17765 (clear_symbol_cache): Declare.
17766 * inferiors.c (all_processes): New.
17767 (null_ptid, minus_one_ptid): New.
17768 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17769 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
17770 (add_thread): Change unsigned long to ptid. Remove gdb_id
17771 parameter. Adjust.
17772 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
17773 (gdb_id_to_thread): Rename to ...
17774 (find_thread_pid): ... this. Change unsigned long to ptid.
17775 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
17776 (loaded_dll, pull_pid_from_list): Adjust.
17777 (add_process, remove_process, find_process_pid)
17778 (get_thread_process, current_process, initialize_inferiors): New.
17779 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
17780 (struct target_waitstatus) <related_pid>: Ditto.
17781 (struct target_ops) <kill, detach>: Add `pid' argument. Change
17782 return type to int.
17783 (struct target_ops) <join>: Add `pid' argument.
17784 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
17785 (struct target_ops) <wait>: Add `ptid' field. Change return type
17786 to ptid.
17787 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
17788 (mywait): Add `ptid' argument. Change return type to ptid_t.
17789 (target_pid_to_str): Declare.
17790 * target.c (set_desired_inferior): Adjust to use ptids.
17791 (mywait): Add new `ptid' argument. Adjust.
17792 (target_pid_to_str): New.
17793 * mem-break.h (free_all_breakpoints): Declare.
17794 * mem-break.c (breakpoints): Delelete.
17795 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
17796 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
17797 to use per-process breakpoint list.
17798 (free_all_breakpoints): New.
17799 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
17800 (symbol_cache, all_symbols_looked_up): Delete.
17801 (hexchars): New.
17802 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
17803 read_ptid): New.
17804 (prepare_resume_reply): Change ptid argument's type from unsigned
17805 long to ptid_t. Adjust. Implement W;process and X;process.
17806 (free_sym_cache, clear_symbol_cache): New.
17807 (look_up_one_symbol): Adjust to per-process symbol cache. *
17808 * server.c (cont_thread, general_thread, step_thread): Change type
17809 to ptid_t.
17810 (attached): Delete.
17811 (multi_process): New.
17812 (last_ptid): Change type to ptid_t.
17813 (struct vstop_notif) <ptid>: Change type to ptid_t.
17814 (queue_stop_reply, push_event): Change `ptid' argument's type to
17815 ptid_t.
17816 (discard_queued_stop_replies): Add `pid' argument.
17817 (start_inferior): Adjust to use ptids. Adjust to mywait interface
17818 changes. Don't reference the `attached' global.
17819 (attach_inferior): Adjust to mywait interface changes.
17820 (handle_query): Adjust to use ptids. Parse GDB's qSupported
17821 features. Handle and report "multiprocess+". Handle
17822 "qAttached:PID".
17823 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
17824 changes.
17825 (handle_v_kill): New.
17826 (handle_v_stopped): Adjust to use target_pid_to_str.
17827 (handle_v_requests): Allow multiple attaches and runs when
17828 multiprocess extensions are in effect. Handle "vKill".
17829 (myresume): Adjust to use ptids.
17830 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
17831 (handle_status): Adjust to discard_queued_stop_replies interface
17832 change.
17833 (first_thread_of, kill_inferior_callback)
17834 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
17835 (main): Call initialize_inferiors. Adjust to use ptids, killing
17836 and detaching from all inferiors. Handle multiprocess packet
17837 variants.
17838 * linux-low.h: Include gdb_proc_service.h.
17839 (struct process_info_private): New.
17840 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
17841 <lwpid_of>: Use ptid_get_lwp.
17842 (get_lwp_thread): Adjust.
17843 (struct lwp_info): Add `dead' member.
17844 (find_lwp_pid): Declare.
17845 * linux-low.c (thread_db_active): Delete.
17846 (new_inferior): Adjust comment.
17847 (inferior_pid): Delete.
17848 (linux_add_process): New.
17849 (handle_extended_wait): Adjust.
17850 (add_lwp): Change unsigned long to ptid.
17851 (linux_create_inferior): Add process to processes table. Adjust
17852 to use ptids. Don't set new_inferior here.
17853 (linux_attach_lwp): Rename to ...
17854 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
17855 it. Adjust to use ptids.
17856 (linux_attach_lwp): New.
17857 (linux_attach): Add process to processes table. Don't set
17858 new_inferior here.
17859 (struct counter): New.
17860 (second_thread_of_pid_p, last_thread_of_process_p): New.
17861 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
17862 multiple processes.
17863 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
17864 processes. Remove process from process table.
17865 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
17866 to multiple processes.
17867 (any_thread_of): New.
17868 (linux_detach): Add `pid' argument, and handle it. Remove process
17869 from processes table.
17870 (linux_join): Add `pid' argument. Handle it.
17871 (linux_thread_alive): Change unsighed long argument to ptid_t.
17872 Consider dead lwps as not being alive.
17873 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
17874 threads we're not interested in.
17875 (same_lwp, find_lwp_pid): New.
17876 (linux_wait_for_lwp): Change `pid' argument's type from int to
17877 ptid_t. Adjust.
17878 (linux_wait_for_event): Rename to ...
17879 (linux_wait_for_event_1): ... this. Change `pid' argument's type
17880 from int to ptid_t. Adjust.
17881 (linux_wait_for_event): New.
17882 (linux_wait_1): Add `ptid' argument. Change return type to
17883 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
17884 that exit from the process table.
17885 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
17886 Adjust.
17887 (mark_lwp_dead): New.
17888 (wait_for_sigstop): Adjust to use ptids. If a process exits while
17889 stopping all threads, mark its main lwp as dead.
17890 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
17891 ptids.
17892 (fetch_register, usr_store_inferior_registers)
17893 (regsets_fetch_inferior_registers)
17894 (regsets_store_inferior_registers, linux_read_memory)
17895 (linux_write_memory): Inline `inferior_pid'.
17896 (linux_look_up_symbols): Adjust to use per-process
17897 `thread_db_active'.
17898 (linux_request_interrupt): Adjust to use ptids.
17899 (linux_read_auxv): Inline `inferior_pid'.
17900 (initialize_low): Don't reference thread_db_active.
17901 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
17902 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
17903 (ps_getpid): Return the pid of the current inferior.
17904 * thread-db.c (proc_handle, thread_agent): Delete.
17905 (thread_db_create_event, thread_db_enable_reporting): Adjust to
17906 per-process data.
17907 (find_one_thread): Change argument type to ptid_t. Adjust to
17908 per-process data.
17909 (maybe_attach_thread): Adjust to per-process data and ptids.
17910 (thread_db_find_new_threads): Ditto.
17911 (thread_db_init): Ditto.
17912 * spu-low.c (spu_create_inferior, spu_attach): Add process to
17913 processes table. Adjust to use ptids.
17914 (spu_kill, spu_detach): Adjust interface. Remove process from
17915 processes table.
17916 (spu_join, spu_thread_alive): Adjust interface.
17917 (spu_wait): Adjust interface. Remove process from processes
17918 table. Adjust to use ptids.
17919 * win32-low.c (current_inferior_tid): Delete.
17920 (current_inferior_ptid): New.
17921 (debug_event_ptid): New.
17922 (thread_rec): Take a ptid. Adjust.
17923 (child_add_thread): Add `pid' argument. Adjust to use ptids.
17924 (child_delete_thread): Ditto.
17925 (do_initial_child_stuff): Add `attached' argument. Add process to
17926 processes table.
17927 (child_fetch_inferior_registers, child_store_inferior_registers):
17928 Adjust.
17929 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
17930 (win32_attach): Pass 1 to do_initial_child_stuff.
17931 (win32_kill): Adjust interface. Remove process from processes
17932 table.
17933 (win32_detach): Ditto.
17934 (win32_join): Adjust interface.
17935 (win32_thread_alive): Take a ptid.
17936 (win32_resume): Adjust to use ptids.
17937 (get_child_debug_event): Ditto.
17938 (win32_wait): Adjust interface. Remove exiting process from
17939 processes table.
17940
17941 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17942
17943 Non-stop mode support.
17944
17945 * server.h (non_stop): Declare.
17946 (gdb_client_data, handler_func): Declare.
17947 (delete_file_handler, add_file_handler, start_event_loop):
17948 Declare.
17949 (handle_serial_event, handle_target_event, push_event)
17950 (putpkt_notif): Declare.
17951 * target.h (enum resume_kind): New.
17952 (struct thread_resume): Replace `step' field by `kind' field.
17953 (TARGET_WNOHANG): Define.
17954 (struct target_ops) <wait>: Add `options' argument.
17955 <supports_non_stop, async, start_non_stop>: New fields.
17956 (target_supports_non_stop, target_async): New.
17957 (start_non_stop): Declare.
17958 (mywait): Add `options' argument.
17959 * target.c (mywait): Add `options' argument. Print child exit
17960 notifications here.
17961 (start_non_stop): New.
17962 * server.c (non_stop, own_buf, mem_buf): New globals.
17963 (struct vstop_notif): New.
17964 (notif_queue): New global.
17965 (queue_stop_reply, push_event, discard_queued_stop_replies)
17966 (send_next_stop_reply): New.
17967 (start_inferior): Adjust to use resume_kind. Adjust to mywait
17968 interface changes.
17969 (attach_inferior): In non-stop mode, don't wait for the target
17970 here.
17971 (handle_general_set): Handle QNonStop.
17972 (handle_query): When handling qC, return the current general
17973 thread, instead of the first thread of the list.
17974 (handle_query): If the backend supports non-stop mode, include
17975 QNonStop+ in the qSupported query response.
17976 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
17977 and non-stop mode.
17978 (handle_v_attach, handle_v_run): Handle non-stop mode.
17979 (handle_v_stopped): New.
17980 (handle_v_requests): Report support for vCont;t. Handle vStopped.
17981 (myresume): Adjust to use resume_kind. Handle non-stop.
17982 (queue_stop_reply_callback): New.
17983 (handle_status): Handle non-stop mode.
17984 (main): Clear non_stop flag on reconnection. Use the event-loop.
17985 Refactor serial protocol handling from here ...
17986 (process_serial_event): ... to this new function. When GDB
17987 selects any thread, select one here. In non-stop mode, wait until
17988 GDB acks all pending events before exiting.
17989 (handle_serial_event, handle_target_event): New.
17990 * remote-utils.c (remote_open): Install remote_desc in the event
17991 loop.
17992 (remote_close): Remove remote_desc from the event loop.
17993 (putpkt_binary): Rename to...
17994 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
17995 (putpkt_binary): New as wrapper around putpkt_binary_1.
17996 (putpkt_notif): New.
17997 (prepare_resume_reply): In non-stop mode, don't change the
17998 general_thread.
17999 * event-loop.c: New.
18000 * Makefile.in (OBJ): Add event-loop.o.
18001 (event-loop.o): New rule.
18002
18003 * linux-low.h (pid_of): Moved here.
18004 (lwpid_of): New.
18005 (get_lwp_thread): Use lwpid_of.
18006 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
18007 * linux-low.c (pid_of): Delete.
18008 (inferior_pid): Use lwpid_of.
18009 (linux_event_pipe): New.
18010 (target_is_async_p): New.
18011 (delete_lwp): New.
18012 (handle_extended_wait): Use lwpid_of.
18013 (add_lwp): Don't set lwpid field.
18014 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
18015 (linux_kill_one_lwp): If killing a running lwp, stop it first.
18016 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
18017 (linux_detach_one_lwp): If detaching from a running lwp, stop it
18018 first. Adjust to linux_wait_for_event interface changes. Use
18019 lwpid_of.
18020 (linux_detach): Don't delete the main lwp here.
18021 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
18022 (status_pending_p): Don't consider explicitly suspended lwps.
18023 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
18024 pointer. Add OPTIONS argument. Change return type to int. Use
18025 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
18026 (linux_wait_for_event): Take an integer pid instead of a lwp_info
18027 pointer. Add status pointer argument. Return a pid instead of a
18028 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
18029 changes. In non-stop mode, don't switch to a random thread.
18030 (linux_wait): Rename to...
18031 (linux_wait_1): ... this. Add target_options argument, and handle
18032 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
18033 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
18034 clean exit and signal exit code. Don't stop all threads in
18035 non-stop mode. In all-stop mode, only stop all threads when
18036 reporting a stop to GDB. Handle explicit thread stop requests.
18037 (async_file_flush, async_file_mark): New.
18038 (linux_wait): New.
18039 (send_sigstop): Use lwpid_of.
18040 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
18041 interface changes. In non-stop mode, don't switch to a random
18042 thread.
18043 (linux_resume_one_lwp): Use lwpid_of.
18044 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
18045 (linux_resume_one_thread): ... this. Handle resume_stop. In
18046 non-stop mode, don't look for pending flag in all threads.
18047 (resume_status_pending_p): Don't consider explicitly suspended
18048 threads.
18049 (my_waitpid): Reimplement. Emulate __WALL.
18050 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18051 Use lwpid_of.
18052 (sigchld_handler, linux_supports_non_stop, linux_async)
18053 (linux_start_non_stop): New.
18054 (linux_target_ops): Register linux_supports_non_stop, linux_async
18055 and linux_start_non_stop.
18056 (initialize_low): Install SIGCHLD handler.
18057 * thread-db.c (thread_db_create_event, find_one_thread)
18058 (thread_db_get_tls_address): Use lwpid_of.
18059 * win32-low.c (win32_detach): Adjust to use resume_kind.
18060 (win32_wait): Add `options' argument.
18061 * spu-low.c (spu_resume): Adjust to use resume_kind.
18062 (spu_wait): Add `options' argument.
18063
18064 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18065
18066 Decouple target code from remote protocol.
18067
18068 * target.h (enum target_waitkind): New.
18069 (struct target_waitstatus): New.
18070 (struct target_ops) <wait>: Return an unsigned long. Take a
18071 target_waitstatus pointer instead of a char pointer.
18072 (mywait): Likewise.
18073 * target.c (mywait): Change prototype to return an unsigned long.
18074 Take a target_waitstatus pointer instead of a char pointer. Adjust.
18075 * server.h (thread_from_wait, old_thread_from_wait): Delete
18076 declarations.
18077 (prepare_resume_reply): Change prototype to take a
18078 target_waitstatus.
18079 * server.c (thread_from_wait, old_thread_from_wait): Delete.
18080 (last_status, last_ptid): New.
18081 (start_inferior): Remove "statusptr" argument. Adjust. Return a
18082 pid instead of a signal.
18083 (attach_inferior): Remove "status" and "signal" parameters.
18084 Adjust.
18085 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
18086 not as an address.
18087 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
18088 (handle_v_requests, myresume): Remove "status" and "signal"
18089 parameters. Adjust.
18090 (handle_status): New.
18091 (main): Delete local `status'. Adjust.
18092 * remote-utils.c: Include target.h.
18093 (prepare_resume_reply): Change prototype to take a
18094 target_waitstatus. Adjust.
18095
18096 * linux-low.c (linux_wait): Adjust to new target_ops->wait
18097 interface.
18098 * spu-low.c (spu_wait): Adjust.
18099 * win32-low.c (enum target_waitkind, struct target_waitstatus):
18100 Delete.
18101 (win32_wait): Adjust.
18102
18103 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18104
18105 * target.h (struct thread_resume): Delete leave_stopped member.
18106 (struct target_ops): Add a `n' argument to the `resume' callback.
18107 * server.c (start_inferior): Adjust.
18108 (handle_v_cont, myresume): Adjust.
18109 * linux-low.c (check_removed_breakpoint): Adjust to resume
18110 interface change, and to removed leave_stopped field.
18111 (resume_ptr): Delete.
18112 (struct thread_resume_array): New.
18113 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18114 resume interface change.
18115 (linux_continue_one_thread, linux_queue_one_thread)
18116 (resume_status_pending_p): Check if the resume field is NULL
18117 instead of checking the leave_stopped member.
18118 (linux_resume): Adjust to the target resume interface change.
18119 * spu-low.c (spu_resume): Adjust to the target resume interface
18120 change.
18121 * win32-low.c (win32_detach, win32_resume): Ditto.
18122
18123 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18124
18125 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18126 flag.
18127 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18128 pending.
18129 (linux_continue_one_thread): Only preserve the stepping flag if
18130 there's a pending breakpoint.
18131
18132 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18133
18134 * server.c (main): After the inferior having exited, call
18135 remote_close before exiting gdbserver.
18136
18137 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18138
18139 Fix size of FPSCR in Power 7 processors.
18140 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18141 (PPC_FEATURE_HAS_DFP): New #define.
18142 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18143 size of the FPSCR.
18144
18145 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18146
18147 * server.c (handle_query) Whitespace and formatting.
18148
18149 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18150
18151 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18152 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18153 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18154 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18155 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18156 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18157 Makefile.in, configure.ac: Fix whitespace throughout.
18158 * configure: Regenerate.
18159
18160 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18161
18162 * inferiors.c (find_inferior): Make it safe for the callback
18163 function to delete the currently iterated inferior.
18164
18165 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18166
18167 * Makefile.in (linuw_low_h): Move higher.
18168 (thread-db.o): Depend on $(linux_low_h).
18169
18170 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18171
18172 Rename "process" to "lwp" throughout.
18173
18174 * linux-low.c (all_processes): Rename to...
18175 (all_lwps): ... this.
18176 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18177 (add_process): Rename to ...
18178 (add_lwp): ... this. Adjust.
18179 (linux_create_inferior): Adjust.
18180 (linux_attach_lwp): Adjust.
18181 (linux_attach): Adjust.
18182 (linux_kill_one_process): Rename to ...
18183 (linux_kill_one_lwp): ... this. Adjust.
18184 (linux_kill): Adjust.
18185 (linux_detach_one_process): Rename to ...
18186 (linux_detach_one_lwp): ... this. Adjust.
18187 (linux_detach): Adjust.
18188 (check_removed_breakpoint): Adjust.
18189 (status_pending_p): Adjust.
18190 (linux_wait_for_process): Rename to ...
18191 (linux_wait_for_lwp): ... this. Adjust.
18192 (linux_wait_for_event): Adjust.
18193 (send_sigstop): Adjust.
18194 (wait_for_sigstop): Adjust.
18195 (stop_all_processes): Rename to ...
18196 (stop_all_lwps): ... this.
18197 (linux_resume_one_process): Rename to ...
18198 (linux_resume_one_lwp): ... this. Adjust.
18199 (linux_set_resume_request, linux_continue_one_thread)
18200 (linux_queue_one_thread, resume_status_pending_p)
18201 (usr_store_inferior_registers, regsets_store_inferior_registers)
18202 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18203 Adjust.
18204 * linux-low.h (get_process): Rename to ...
18205 (get_lwp): ... this. Adjust.
18206 (get_thread_process): Rename to ...
18207 (get_thread_lwp): ... this. Adjust.
18208 (get_process_thread): Rename to ...
18209 (get_lwp_thread): ... this. Adjust.
18210 (struct process_info): Rename to ...
18211 (struct lwp_info): ... this.
18212 (all_processes): Rename to ...
18213 (all_lwps): ... this.
18214 * proc-service.c (ps_lgetregs): Adjust.
18215 * thread-db.c (thread_db_create_event, find_one_thread)
18216 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18217
18218 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18219
18220 * server.c (handle_query): Handle "qAttached".
18221
18222 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18223
18224 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18225 GPLv3, update license URL.
18226
18227 2009-03-01 Doug Evans <dje@google.com>
18228
18229 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18230 (server_h): Add gdb_signals.h.
18231 (signals.o): Update.
18232 * server.h (target_signal_from_host,target_signal_to_host_p)
18233 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18234
18235 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18236
18237 * remote-utils.c (getpkt): Also generate remote-debug
18238 information if noack_mode is set.
18239
18240 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18241
18242 * server.c (handle_query): Report qXfer:siginfo:read and
18243 qXfer:siginfo:write as supported and handle them.
18244 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18245 * linux-low.c (linux_xfer_siginfo): New.
18246 (linux_target_ops): Set it.
18247
18248 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18249
18250 * server.c (gdbserver_usage): Mention --remote-debug.
18251 (main): Accept '--remote-debug' switch.
18252
18253 2009-01-18 Doug Evans <dje@google.com>
18254
18255 * regcache.c (new_register_cache): No need to check result of xcalloc.
18256 * server.c (handle_search_memory): Back out calls to xmalloc,
18257 result is checked and error is returned to user upon failure.
18258 (handle_query): Ditto. Add more checks for result of malloc.
18259 (handle_v_cont): Check result of malloc, report error back to
18260 user upon failure.
18261 (handle_v_run): Ditto. Call freeargv.
18262 * server.h (freeargv): Declare.
18263 * utils.c (freeargv): New fn.
18264
18265 2009-01-15 Doug Evans <dje@google.com>
18266
18267 * gdbreplay.c (perror_with_name): Make arg const char *.
18268 * server.h (target_signal_to_name): Make return type const char *.
18269 * thread-db.c (thread_db_err_str): Make return type const char *.
18270 * utils.c (perror_with_name): Make arg const char *.
18271
18272 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18273
18274 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18275 when handling a EXIT_PROCESS_DEBUG_EVENT.
18276
18277 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18278
18279 * gdbreplay.c (gdbreplay_version): Update copyright year.
18280 * server.c (gdbserver_version): Likewise.
18281
18282 2009-01-05 Doug Evans <dje@google.com>
18283
18284 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18285 (handle_extended_wait): Improve comment.
18286
18287 2008-12-13 Doug Evans <dje@google.com>
18288
18289 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18290 * server.h (ATTR_MALLOC): New macro.
18291 (xmalloc,xcalloc,xstrdup): Declare.
18292 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18293 * inferiors.c: Ditto.
18294 * linux-low.c: Ditto.
18295 * mem-break.c: Ditto.
18296 * regcache.c: Ditto.
18297 * remote-utils.c: Ditto.
18298 * server.c: Ditto.
18299 * target.c: Ditto.
18300 * win32-low.c: Ditto.
18301
18302 2008-12-12 Doug Evans <dje@google.com>
18303
18304 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18305 in debugging printf.
18306
18307 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18308
18309 2008-12-09 Doug Evans <dje@google.com>
18310
18311 * linux-low.h (struct process_info): Delete member tid, unused.
18312 * thread-db.c (find_one_thread): Update.
18313 (maybe_attach_thread): Update.
18314
18315 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18316
18317 * target.h (struct target_ops): Add qxfer_osdata member.
18318 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18319 and dirent.h.
18320 (linux_qxfer_osdata): New functions.
18321 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18322 callback.
18323 * server.c (handle_query): Handle "qXfer:osdata:read:".
18324 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18325 (buffer_xml_printf): New functions.
18326 * server.h (struct buffer): New.
18327 (buffer_grow_str, buffer_grow_str0): New macros.
18328 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18329 (buffer_xml_printf): Declare.
18330
18331 2008-11-24 Doug Evans <dje@google.com>
18332
18333 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18334
18335 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18336
18337 * server.c (handle_v_run): Always use the supplied argument list.
18338
18339 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18340
18341 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18342 (xtensa_regmap_table): Add entry for scompare1.
18343
18344 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18345
18346 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18347 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18348 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18349 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18350 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18351 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18352 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18353 XML target descriptions.
18354 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18355 when inferior is running on an ISA 2.05 or later processor. Add
18356 special case to return offset for full 64-bit slot of FPSCR when
18357 in 32-bits.
18358
18359 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18360
18361 * Makefile.in (SFILES, clean): Added sparc64 files.
18362 (reg-sparc64.o, reg-sparc64.c): New.
18363 * configure.srv (sparc*-*-linux*): New configuration.
18364 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18365 syscall arguments for SPARC.
18366 (regsets_store_inferior_registers): Likewise.
18367 * linux-sparc-low.c: New file.
18368
18369 2008-10-21 Doug Evans <dje@google.com>
18370
18371 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18372 (READLINE_DIR,READLINE_DEP): Delete.
18373 (INTERNAL_CFLAGS): Update.
18374 (LINTFLAGS): Update.
18375
18376 2008-10-10 Pedro Alves <pedro@codesourcery.com>
18377
18378 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18379 whole argv from the last run, not just argv[0].
18380
18381 2008-09-08 Pedro Alves <pedro@codesourcery.com>
18382
18383 * regcache.c (new_register_cache): Return NULL if the register
18384 cache size isn't known yet.
18385 (free_register_cache): Avoid dereferencing a NULL regcache.
18386
18387 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18388
18389 * configure.srv: Merge MIPS and MIPS64.
18390
18391 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18392
18393 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18394
18395 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
18396
18397 * Makefile.in: Add required vsx dependencies.
18398
18399 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18400 Declare init_registers_powerpc_vsx32l.
18401 Declare init_registers_powerpc_vsx64l.
18402 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18403 (ppc_arch_setup): Check for VSX in hwcap.
18404 (ppc_fill_vsxregset): New function.
18405 (ppc_store_vsxregset): New function.
18406 Add new VSX entry in regset_info target_regsets.
18407
18408 * configure.srv: Add new VSX dependencies.
18409
18410 2008-08-12 Pedro Alves <pedro@codesourcery.com>
18411
18412 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18413 (remote_open): Set or clear transport_is_reliable.
18414 (putpkt_binary): Don't expect acks in noack mode.
18415 (getpkt): Don't send ack/nac in noack mode.
18416 * server.c (handle_general_set): Handle QStartNoAckMode.
18417 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18418 qSupported.
18419 (main): Reset noack_mode on every connection.
18420 * server.h (noack_mode): Declare.
18421
18422 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18423
18424 * Makefile.in (GDBREPLAY_OBS): New variable.
18425 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18426
18427 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18428 Daniel Jacobowitz <dan@codesourcery.com>
18429
18430 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18431 (usr_store_inferior_registers): Likewise.
18432 (regsets_store_inferior_registers): Likewise.
18433
18434 2008-07-31 Rolf Jansen <rj@surtec.com>
18435 Pedro Alves <pedro@codesourcery.com>
18436
18437 * configure.ac: Check for memmem declaration.
18438 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18439 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18440 (disable_packet_qfThreadInfo): Unconditionally compile.
18441 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18442 * configure, config.in: Regenerate.
18443
18444 2008-07-28 Doug Kwan <dougkwan@google.com>
18445
18446 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18447 (linux_write_memory): Remove declaration of errno.
18448
18449 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18450
18451 * linux-low.c (handle_extended_wait): Do not use "status"
18452 variable uninitialized.
18453
18454 2008-07-07 Pedro Alves <pedro@codesourcery.com>
18455
18456 * server.c (handle_v_attach): Inhibit reporting dll changes.
18457
18458 2008-06-27 Pedro Alves <pedro@codesourcery.com>
18459
18460 * remote-utils.c (prepare_resume_reply): If requested, don't
18461 output "thread:TID" in the T stop reply.
18462
18463 * server.c (disable_packet_vCont, disable_packet_Tthread)
18464 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18465 (handle_query): If requested, disable support for qC, qfThreadInfo
18466 and qsThreadInfo.
18467 (handle_v_requests): If requested, disable support for vCont.
18468 (gdbserver_show_disableable): New.
18469 (main): Handle --disable-packet and --disable-packet=LIST.
18470
18471 * server.h (disable_packet_vCont, disable_packet_Tthread)
18472 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18473
18474 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18475
18476 * server.c (gdbserver_usage): Mention --version.
18477
18478 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18479
18480 * Makefile.in (gdbreplay.o): New rule.
18481
18482 2008-06-06 Joseph Myers <joseph@codesourcery.com>
18483
18484 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18485 message, not gdbserver.
18486
18487 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
18488 Nathan Sidwell <nathan@codesourcery.com>
18489 Joseph Myers <joseph@codesourcery.com>
18490
18491 * acinclude.m4: Include ../../config/acx.m4.
18492 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18493 * configure, config.in: Regenerate.
18494 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18495 * server.c (gdbserver_version): Print PKGVERSION.
18496 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18497 (main): Adjust gdbserver_usage calls.
18498 * gdbreplay.c (version, host_name): Add declarations.
18499 (gdbreplay_version, gdbreplay_usage): New.
18500 (main): Accept --version and --help options.
18501
18502 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18503
18504 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18505 (arm_breakpoint_at): Handle Thumb.
18506 (the_low_target): Add comment.
18507
18508 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18509
18510 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18511
18512 2008-05-09 Doug Evans <dje@google.com>
18513
18514 * server.h (decode_search_memory_packet): Declare.
18515 * remote-utils.c (decode_search_memory_packet): New fn.
18516 * server.c (handle_search_memory_1): New fn.
18517 (handle_search_memory): New fn.
18518 (handle_query): Process qSearch:memory packets.
18519
18520 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18521
18522 * regcache.c (registers_length): Remove.
18523 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18524 full register packet.
18525 * regcache.h (registers_length): Remove prototype.
18526 * server.h (PBUFSIZ): Define to 16384.
18527
18528 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18529
18530 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18531 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18532 powerpc-64l.o, and powerpc-altivec64l.o.
18533 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18534 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18535 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18536 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18537 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18538 to srv_xmlfiles.
18539
18540 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18541 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18542 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18543 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18544 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18545 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18546 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18547 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18548 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18549 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18550 (clean): Update.
18551
18552 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18553 (init_registers_powerpc_32l): ... this new prototype.
18554 (init_registers_powerpc_32): Remove, replace by ...
18555 (init_registers_powerpc_altivec32l): ... this new prototype.
18556 (init_registers_powerpc_e500): Remove, replace by ...
18557 (init_registers_powerpc_e500l): ... this new prototype.
18558 (init_registers_ppc64): Remove, replace by ...
18559 (init_registers_powerpc_64l): ... this new prototype.
18560 (init_registers_powerpc_64): Remove, replace by ...
18561 (init_registers_powerpc_altivec64l): ... this new prototype.
18562 (ppc_num_regs): Set to 73.
18563 (PT_ORIG_R3, PT_TRAP): Define if necessary.
18564 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
18565 (ppc_cannot_store_register): Handle orig_r3 and trap.
18566 (ppc_arch_setup): Update init_registers_... calls.
18567 (ppc_fill_gregset): Handle orig_r3 and trap.
18568
18569 * inferiors.c (clear_inferiors): Reset current_inferior.
18570
18571 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
18572
18573 * acinclude.m4: Add override.m4.
18574 * configure: Regenerate.
18575
18576 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18577
18578 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
18579 initial call to init_register_ppc64.
18580
18581 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18582
18583 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
18584 single powerpc*-*-linux* case.
18585 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
18586
18587 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
18588
18589 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
18590 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
18591 from reg_xmlfiles.
18592 * linux-ppc-low.c: Include <elf.h>.
18593 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
18594 (ppc_hwcap): New global variable.
18595 (ppc_regmap): Remove __SPE__ #ifdef sections.
18596 (ppc_regmap_e500): New global variable.
18597 (ppc_cannot_store_register): Update __SPE__ special case.
18598 (ppc_get_hwcap): New function.
18599 (ppc_arch_setup): Use it to determine whether inferior supports
18600 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
18601 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
18602 Do not access registers if target does not support AltiVec.
18603 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18604 Do not access registers if target does not support SPE.
18605 (target_regsets): Unconditionally include AltiVec and SPE regsets.
18606
18607 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
18608
18609 * linux-low.c (disabled_regsets, num_regsets): New.
18610 (use_regsets_p): Delete.
18611 (linux_wait_for_process): Clear disabled_regsets.
18612 (regsets_fetch_inferior_registers): Check and set it.
18613 (regsets_store_inferior_registers): Likewise.
18614 (linux_fetch_registers, linux_store_registers): Do not use
18615 use_regsets_p.
18616 (initialize_low): Allocate disabled_regsets.
18617
18618 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
18619
18620 * Makefile.in (LIBOBJS): New.
18621 (OBS): Use LIBOBJS.
18622 (memmem.o): New rule.
18623 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
18624 * configure: Regenerated.
18625
18626 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
18627
18628 * server.c (handle_query): Never return "unsupported" for
18629 qXfer:features:read queries.
18630
18631 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
18632
18633 * server.c (get_features_xml): Fix inverted condition.
18634 (handle_query): Always support qXfer:feature:read.
18635
18636 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
18637
18638 * server.c (wrapper_argv): New.
18639 (start_inferior): Handle wrapper_argv. If set, expect an extra
18640 trap.
18641 (gdbserver_usage): Document --wrapper.
18642 (main): Parse --wrapper.
18643
18644 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18645
18646 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
18647 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
18648 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
18649 (ppc_set_pc): Likewise.
18650 (ppc_arch_setup): New function.
18651 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
18652 of collect_register.
18653 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
18654
18655 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18656
18657 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
18658 instead of linux-ppc64-low.o.
18659 * linux-ppc64-low.c: Remove file.
18660 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
18661 (linux-ppc64-low.o): Remove rule.
18662
18663 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
18664 (init_registers_powerpc_64): Likewise.
18665 (ppc_regmap): Conditionally define depending on __powerpc64__.
18666 (ppc_cannot_store_register): Do not special-case "fpscr" when
18667 compiled on __powerpc64__.
18668 (ppc_collect_ptrace_register): New function.
18669 (ppc_supply_ptrace_register): New function.
18670 (ppc_breakpoint): Change type to "unsigned int".
18671 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
18672 (the_low_target): Conditionally provide initializers for the
18673 arch_setup member depending on __powerpc64__. Install
18674 collect_ptrace_register and supply_ptrace_register members.
18675
18676 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18677
18678 * regcache.h (gdbserver_xmltarget): Add extern declaration.
18679 * server.c (gdbserver_xmltarget): Define.
18680 (get_features_xml): Use it to replace "target.xml" and arch_string.
18681
18682 * configure.srv: Remove srv_xmltarget. Add XML files that were
18683 mentioned there to srv_xmlfiles instead. Remove conditional tests
18684 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
18685 srv_xmlfiles and srv_regobj to include all possible choices.
18686 * configure.ac (srv_xmltarget): Remove.
18687 (srv_xmlfiles): Do not add "target.xml".
18688 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
18689 checks for supplementary target information.
18690 * configure: Regenerate.
18691 * Makefile.in (XML_TARGET): Remove.
18692 (target.xml): Remove rule.
18693 (clean): Do not clean up target.xml.
18694 (.PRECIOUS): Do not mention target.xml.
18695
18696 * target.h (struct target_ops): Remove arch_string member.
18697 * linux-low.c (linux_arch_string): Remove.
18698 (linux_target_ops): Remove arch_string initializer.
18699 * linux-low.h (struct linux_target_ops): Remove arch_string member.
18700 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
18701 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
18702 * spu-low.c (spu_arch_string): Remove.
18703 (spu_target_ops): Remove arch_string initializer.
18704 * win32-low.c (win32_arch_string): Remove.
18705 (win32_target_ops): Remove arch_string initializer.
18706 * win32-low.h (struct win32_target_ops): Remove arch_string member.
18707 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
18708 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
18709
18710 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18711
18712 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
18713 by collect_ptrace_register and supply_ptrace_register hooks.
18714 * linux-low.c (fetch_register): Use supply_ptrace_register callback
18715 instead of checking for the_low_target.left_pad_xfer.
18716 (usr_store_inferior_registers): Use collect_ptrace_register callback
18717 instead of checking for the_low_target.left_pad_xfer.
18718
18719 * linux-s390-low.c (s390_collect_ptrace_register): New function.
18720 (s390_supply_ptrace_register): Likewise.
18721 (s390_fill_gregset): Call s390_collect_ptrace_register.
18722 (the_low_target): Update.
18723
18724 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
18725 (ppc_supply_ptrace_register): Likewise.
18726 (the_low_target): Update.
18727
18728 * linux-i386-low.c (the_low_target): Update.
18729 * linux-x86-64-low.c (the_low_target): Update.
18730
18731 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18732
18733 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
18734 reg-s390.o and reg-s390x.o.
18735
18736 * linux-low.c (new_inferior): New global variable.
18737 (linux_create_inferior, linux_attach): Set it.
18738 (linux_wait_for_process): Call the_low_target.arch_setup after the
18739 target has stopped for the first time.
18740 (initialize_low): Do not call the_low_target.arch_setup.
18741
18742 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
18743 (s390_set_pc): Likewise.
18744 (s390_arch_setup): New function.
18745 (the_low_target): Use s390_arch_setup as arch_setup routine.
18746
18747 * regcache.c (realloc_register_cache): New function.
18748 (set_register_cache): Call it for each existing regcache.
18749
18750 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18751
18752 * server.h (init_registers): Remove prototype.
18753
18754 * linux-low.h (struct linux_target_ops): Add arch_setup field.
18755 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
18756 instead of init_registers ().
18757 * linux-arm-low.c (init_registers_arm): Add prototype.
18758 (init_registers_arm_with_iwmmxt): Likewise.
18759 (the_low_target): Add initializer for arch_setup field.
18760 * linux-cris-low.c (init_registers_cris): Add prototype.
18761 (the_low_target): Add initializer for arch_setup field.
18762 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
18763 (the_low_target): Add initializer for arch_setup field.
18764 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
18765 (the_low_target): Add initializer for arch_setup field.
18766 * linux-ia64-low.c (init_registers_ia64): Add prototype.
18767 (the_low_target): Add initializer for arch_setup field.
18768 * linux-m32r-low.c (init_registers_m32r): Add prototype.
18769 (the_low_target): Add initializer for arch_setup field.
18770 * linux-m68k-low.c (init_registers_m68k): Add prototype.
18771 (the_low_target): Add initializer for arch_setup field.
18772 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
18773 (init_registers_mips64_linux): Likewise.
18774 (the_low_target): Add initializer for arch_setup field.
18775 * linux-ppc-low.c (init_registers_ppc): Add prototype.
18776 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
18777 (the_low_target): Add initializer for arch_setup field.
18778 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
18779 (init_registers_powerpc_64): Likewise.
18780 (the_low_target): Add initializer for arch_setup field.
18781 * linux-s390-low.c (init_registers_s390): Add prototype.
18782 (init_registers_s390x): Likewise.
18783 (the_low_target): Add initializer for arch_setup field.
18784 * linux-sh-low.c (init_registers_sh): Add prototype.
18785 (the_low_target): Add initializer for arch_setup field.
18786 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
18787 (the_low_target): Add initializer for arch_setup field.
18788 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
18789 (the_low_target): Add initializer for arch_setup field.
18790
18791 * win32-low.h (struct win32_target_ops): Add arch_setup field.
18792 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
18793 instead of init_registers ().
18794 * win32-arm-low.c (init_registers_arm): Add prototype.
18795 (the_low_target): Add initializer for arch_setup field.
18796 * win32-i386-low.c (init_registers_i386): Add prototype.
18797 (the_low_target): Add initializer for arch_setup field.
18798
18799 * spu-low.c (init_registers_spu): Add prototype.
18800 (initialize_low): Call initialie_registers_spu () instead of
18801 initialize_registers ().
18802
18803 2008-02-19 Pedro Alves <pedro@codesourcery.com>
18804
18805 * server.c (handle_v_requests): When handling the vRun and vAttach
18806 packets, if already debugging a process, don't kill it. Return an
18807 error instead.
18808
18809 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
18810
18811 * server.c (handle_query): Correct length check.
18812
18813 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
18814
18815 * win32-low.c (do_initial_child_stuff): Add process handle
18816 parameter. Set current_process_handle and current_process_id from the
18817 parameters. Clear globals.
18818 (win32_create_inferior): Don't set current_process_handle and
18819 current_process_id here. Instead pass them on the call to
18820 do_initial_child_stuff.
18821 (win32_attach): Likewise.
18822 (win32_clear_inferiors): New.
18823 (win32_kill): Don't close the current process handle or the
18824 current thread handle here. Instead call win32_clear_inferiors.
18825 (win32_detach): Don't open a new handle to the process. Call
18826 win32_clear_inferiors.
18827 (win32_join): Don't rely on current_process_handle; open a new
18828 handle using the process id.
18829 (win32_wait): Call win32_clear_inferiors when the inferior process
18830 has exited.
18831
18832 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
18833
18834 * server.c (monitor_show_help): Add "exit".
18835
18836 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
18837
18838 * Makefile.in (SFILES): Add linux-xtensa-low.c.
18839 (clean): Add reg-xtensa.c.
18840 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
18841 * configure.srv (xtensa*-*-linux*) New target.
18842 * linux-xtensa-low.c: New.
18843 * xtensa-xtregs.c: New.
18844
18845 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
18846
18847 * hostio.c: Don't include errno.h.
18848 (errno_to_fileio_errno): Move to hostio-errno.
18849 * hostio.c: (hostio_error): Remove the error parameter. Defer the
18850 error number outputting to the target->hostio_last_error callback.
18851 (hostio_packet_error): Use FILEIO_EINVAL directly.
18852 (handle_open, handle_pread, hostio_error, handle_unlink): Update
18853 calls to hostio_error.
18854 * hostio-errno.c: New.
18855 * server.h (hostio_last_error_from_errno): Declare.
18856 * target.h (target_ops): Add hostio_last_error member.
18857 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
18858 as hostio_last_error handler.
18859 * spu-low.c (spu_target_ops): Likewise.
18860 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
18861 (wince_hostio_last_error): New functions.
18862 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
18863 as hostio_last_error handler.
18864 (win32_target_ops) [!_WIN32_WCE]: Register
18865 hostio_last_error_from_errno as hostio_last_error handler.
18866 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
18867 (hostio-errno.o): New rule.
18868 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
18869 * configure.srv (srv_hostio_err_objs): New variable. Default to
18870 hostio-errno.o.
18871 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
18872 * configure: Regenerate.
18873
18874 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18875
18876 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
18877 (linux_kill, linux_detach): Clean up the process list.
18878 * remote-utils.c (remote_open): Improve port number parsing.
18879 (putpkt_binary, input_interrupt): Only send interrupts if the target
18880 is running.
18881 * server.c (extended_protocol): Make static.
18882 (attached): Define earlier.
18883 (exit_requested, response_needed, program_argv): New variables.
18884 (target_running): New.
18885 (start_inferior): Clear attached here.
18886 (attach_inferior): Set attached here.
18887 (require_running): Define.
18888 (handle_query): Use require_running and target_running. Implement
18889 "monitor exit".
18890 (handle_v_attach, handle_v_run): New.
18891 (handle_v_requests): Use require_running. Handle vAttach and vRun.
18892 (gdbserver_usage): Update.
18893 (main): Redo argument parsing. Handle --debug and --multi. Handle
18894 --attach along with other options or after the port. Save
18895 program_argv. Support no initial program. Resynchronize
18896 communication with GDB after an error. Handle "monitor exit".
18897 Use require_running and target_running. Always allow the extended
18898 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
18899 restart in extended mode.
18900 * README: Refer to the GDB manual. Update --attach usage.
18901
18902 2007-12-20 Andreas Schwab <schwab@suse.de>
18903
18904 * linux-low.c (STACK_SIZE): Define.
18905 (linux_tracefork_child): Use it. Use __clone2 on ia64.
18906 (linux_test_for_tracefork): Likewise.
18907
18908 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
18909
18910 * linux-low.c (linux_wait_for_event): Update messages. Do not
18911 reinsert auto-delete breakpoints.
18912 * mem-break.c (struct breakpoint): Change return type of handler to
18913 int.
18914 (set_breakpoint_at): Update handler type.
18915 (reinsert_breakpoint_handler): Return 1 instead of calling
18916 delete_breakpoint.
18917 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
18918 setting a new one.
18919 (check_breakpoints): Delete auto-delete breakpoints and return 2.
18920 * mem-break.h (set_breakpoint_at): Update handler type.
18921 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
18922 * win32-low.c (auto_delete_breakpoint): New.
18923 (get_child_debug_event): Use it.
18924
18925 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
18926
18927 * configure.ac: Check for pread and pwrite.
18928 * hostio.c (handle_pread): Fall back to lseek and read.
18929 (handle_pwrite): Fall back to lseek and write.
18930 * config.in, configure: Regenerated.
18931
18932 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
18933
18934 * server.c (myresume): Add own_buf argument.
18935 (main): Update calls.
18936
18937 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
18938
18939 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
18940 * remote-utils.c (remote_open): Do not call disable_async_io.
18941 (block_async_io): Delete.
18942 (unblock_async_io): Make static.
18943 (initialize_async_io): New.
18944 * server.c (handle_v_cont): Handle async I/O here.
18945 (myresume): Likewise. Move other common resume tasks here...
18946 (main): ... from here. Call initialize_async_io. Disable async
18947 I/O before the main loop.
18948 * server.h (initialize_async_io): Declare.
18949 (block_async_io, unblock_async_io): Delete prototypes.
18950 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
18951
18952 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
18953
18954 * remote-utils.c (readchar): Allow binary data in received messages.
18955
18956 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18957
18958 * win32-low.c (attaching): New global.
18959 (win32_create_inferior): Clear the `attaching' global.
18960 (win32_attach): Set the `attaching' global.
18961 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
18962 attaching. Only set a breakpoint at the entry point if not
18963 attaching.
18964
18965 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18966
18967 * server.c (main): Don't report dll events on the initial
18968 connection on attaches.
18969
18970 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18971
18972 * server.c (main): Relax numerical bases supported for the pid of
18973 the --attach command line argument.
18974
18975 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18976
18977 * win32-low.c (win32_attach): Call OpenProcess before
18978 DebugActiveProcess, not after. Add last error output to error
18979 call.
18980
18981 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18982
18983 * win32-low.c (win32_get_thread_context)
18984 (win32_set_thread_context): New functions.
18985 (thread_rec): Use win32_get_thread_context.
18986 (continue_one_thread, win32_resume): Use win32_set_thread_context.
18987 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
18988 field.
18989
18990 2007-12-03 Leo Zayas
18991 Pedro Alves <pedro_alves@portugalmail.pt>
18992
18993 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
18994 global variables.
18995 (child_add_thread): Minor cleanup.
18996 (child_continue): Resume artificially suspended threads before
18997 calling ContinueDebugEvent.
18998 (suspend_one_thread): New.
18999 (fake_breakpoint_event): New.
19000 (get_child_debug_event): Change return type to int. Check here if
19001 gdb sent an interrupt request. If a soft interrupt was requested,
19002 fake a breakpoint event. Return 0 if there is no event to handle,
19003 and 1 otherwise.
19004 (win32_wait): Don't check here if gdb sent an interrupt request.
19005 Ensure there is a valid event to handle.
19006 (win32_request_interrupt): Add soft interruption method as last
19007 resort.
19008
19009 2007-12-03 Leo Zayas
19010 Pedro Alves <pedro_alves@portugalmail.pt>
19011
19012 * win32-low.h (win32_thread_info): Add descriptions to the
19013 structure members. Replace `suspend_count' counter by a
19014 `suspended' flag.
19015 * win32-low.c (thread_rec): Update condition of when to get the
19016 context from the inferior. Rely on ContextFlags being set if it
19017 has already been retrieved. Only suspend the inferior thread if
19018 we haven't already. Warn if that fails.
19019 (continue_one_thread): s/suspend_count/suspended/. Only call
19020 ResumeThread once. Warn if that fails.
19021
19022 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19023
19024 * win32-low.c (win32_wait): Don't read from the inferior when it
19025 has already exited.
19026
19027 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
19028
19029 * Makefile.in (win32_low_h): New variable.
19030 (win32-low.o): Add dependency on $(win32_low_h).
19031 (win32-arm-low.o, win32-i386-low.o): New rules.
19032
19033 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19034
19035 * hostio.c: Correct copyright year.
19036
19037 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
19038
19039 * Makefile.in (OBS): Add hostio.o.
19040 (hostio.o): New rule.
19041 * server.h (handle_vFile): Declare.
19042 * hostio.c: New file.
19043 * server.c (handle_v_requests): Take packet_len and new_packet_len
19044 for binary packets. Call handle_vFile.
19045 (main): Update call to handle_v_requests.
19046
19047 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
19048
19049 * linux-low.c: Include <sched.h>.
19050
19051 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
19052
19053 * linux-low.c (linux_tracefork_grandchild): New.
19054 (linux_tracefork_child): Use clone.
19055 (linux_test_for_tracefork): Use clone; allocate and free a stack.
19056
19057 2007-10-31 Joel Brobecker <brobecker@adacore.com>
19058
19059 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
19060
19061 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
19062
19063 * linux-low.c (handle_extended_wait): Handle unexpected signals.
19064
19065 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
19066
19067 * inferiors.c (change_inferior_id): Delete.
19068 (add_pid_to_list, pull_pid_from_list): New.
19069 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
19070 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
19071 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
19072 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
19073 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
19074 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
19075 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
19076 (using_threads): Always set to 1.
19077 (handle_extended_wait): New.
19078 (add_process): Do not set TID.
19079 (linux_create_inferior): Set must_set_ptrace_flags.
19080 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
19081 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
19082 (linux_thread_alive): Rename TID argument to LWPID.
19083 (linux_wait_for_process): Handle unknown processes. Do not use TID.
19084 (linux_wait_for_event): Do not use TID or check using_threads. Update
19085 call to dead_thread_notify. Call handle_extended_wait.
19086 (linux_create_inferior): Use PTRACE_SETOPTIONS.
19087 (send_sigstop): Delete sigstop_sent.
19088 (wait_for_sigstop): Avoid TID.
19089 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
19090 (linux_test_for_tracefork): New.
19091 (linux_lookup_signals): Use thread_db_active and
19092 linux_supports_tracefork_flag.
19093 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
19094 * linux-low.h (get_process_thread): Avoid TID.
19095 (struct process_ifo): Move thread_known and tid to the end. Remove
19096 sigstop_sent.
19097 (linux_attach_lwp, thread_db_init): Update prototypes.
19098 * server.h (change_inferior_id): Delete prototype.
19099 (add_pid_to_list, pull_pid_from_list): New prototypes.
19100 * thread-db.c (thread_db_use_events): New.
19101 (find_first_thread): Rename to...
19102 (find_one_thread): ...this. Update callers and messages. Do not
19103 call fatal. Check thread_db_use_events. Do not call
19104 change_inferior_id or new_thread_notify.
19105 (maybe_attach_thread): Update. Do not call new_thread_notify.
19106 (thread_db_init): Set thread_db_use_events. Check use_events.
19107 * utils.c (fatal, warning): Correct message prefix.
19108
19109 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19110
19111 * Makefile.in (clean): Remove new files.
19112 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19113 (powerpc-64.o, powerpc-64.c): New rules.
19114 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19115 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19116 with SPE.
19117 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19118 SPE targets.
19119 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19120 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19121 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19122 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19123 (target_regsets): Add AltiVec and SPE register sets.
19124 * configure.ac: Check for AltiVec and SPE.
19125 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19126 (ppc_fill_vrregset, ppc_store_vrregset): New.
19127 (target_regsets): Add AltiVec register set.
19128 * configure: Regenerated.
19129
19130 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19131
19132 * linux-low.c (O_LARGEFILE): Define.
19133 (linux_read_memory): Use /proc/PID/mem.
19134 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19135 * configure, config.in: Regenerated.
19136
19137 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19138
19139 * linux-low.c (linux_wait_for_event): Do not pass signals while
19140 single-stepping.
19141
19142 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19143
19144 * win32-low.c (create_process): New.
19145 (win32_create_inferior): Use create_process instead of
19146 CreateProcess. If create_process failed retry appending an ".exe"
19147 suffix. Store the GetLastError result immediatelly after
19148 create_process calls and use it on the call to error.
19149
19150 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19151
19152 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19153
19154 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19155
19156 * configure.ac: Switch license to GPLv3.
19157
19158 2007-08-01 Michael Snyder <msnyder@access-company.com>
19159
19160 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19161
19162 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19163
19164 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19165 typedef.
19166 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19167 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19168 CloseToolhelp32Snapshot.
19169 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19170 CloseToolhelp32Snapshot.
19171
19172 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19173
19174 * server.c (main): Check for inferior exit before main loop.
19175
19176 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19177
19178 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19179 instead of on tmp_desc.
19180
19181 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19182 Daniel Jacobowitz <dan@codesourcery.com>
19183
19184 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19185 (add_thread): Minor cleanups.
19186 (clear_inferiors): Move lower in the file. Clear the DLL
19187 list.
19188 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19189 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19190 (xml_escape_text): New.
19191 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19192 for qSupported.
19193 (handle_v_cont): Report errors.
19194 (gdbserver_version): Update.
19195 (main): Correct size of own_buf. Do not report initial DLL events.
19196 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19197 (unloaded_dll, xml_escape_text): New.
19198 * win32-low.c (enum target_waitkind): Update comments.
19199 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19200 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19201 (win32_EnumProcessModules, win32_GetModuleInformation)
19202 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19203 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19204 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19205 (win32_Module32First, win32_Module32Next, load_toolhelp)
19206 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19207 (get_child_debug_event): Handle DLL events.
19208 (win32_wait): Likewise.
19209
19210 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19211
19212 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19213 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19214
19215 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19216
19217 * win32-low.c (handle_output_debug_string): Ignore event if not
19218 waiting.
19219
19220 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19221
19222 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19223
19224 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19225
19226 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19227
19228 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19229
19230 * inferiors.c (change_inferior_id): Add comment.
19231 * linux-low.c (check_removed_breakpoint): Add an early
19232 prototype. Improve debug output.
19233 (linux_attach): Doc update.
19234 (linux_detach_one_process, linux_detach): Clean up before releasing
19235 each process.
19236 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19237 * linux-low.h (struct process_info): Doc improvement.
19238 * mem-break.c (delete_all_breakpoints): New.
19239 * mem-break.h (delete_all_breakpoints): New prototype.
19240 * thread-db.c (find_first_thread): New.
19241 (thread_db_create_event): Call it instead of
19242 thread_db_find_new_threads. Clean up unused variables.
19243 (maybe_attach_thread): Remove first thread handling.
19244 (thread_db_find_new_threads): Use find_first_thread.
19245 (thread_db_get_tls_address): Likewise.
19246
19247 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19248
19249 * thread-db.c (thread_db_find_new_threads): Add prototype.
19250 (thread_db_create_event): Check for the main thread before adding
19251 a new thread.
19252 (maybe_attach_thread): Only enable event reporting if TID == 0.
19253 (thread_db_get_tls_address): Check for new threads.
19254
19255 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19256
19257 * linux-low.c (linux_create_inferior): Try execv before execvp.
19258 * spu-low.c (spu_create_inferior): Likewise.
19259
19260 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19261
19262 * linux-low.c (linux_create_inferior): Change execv to execvp.
19263 * spu-low.c (spu_create_inferior): Likewies.
19264
19265 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19266
19267 * Makefile.in (clean): Clean new files instead of deleted ones.
19268 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19269 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19270 rules.
19271 * configure.srv: Specify XML files and new regformats for MIPS and
19272 MIPS64 GNU/Linux.
19273 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19274 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19275 an entry for the restart register.
19276 (mips_cannot_fetch_register, mips_cannot_store_register)
19277 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19278 register names to match the XML descriptions.
19279 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19280 restart register instead of $0.
19281
19282 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19283 Markus Deuling <deuling@de.ibm.com>
19284
19285 * remote-utils.c (decode_xfer_write): New function.
19286 * server.h (decode_xfer_write): Add prototype.
19287 * server.c (handle_query): Add PACKET_LEN argument. Support
19288 qXfer:spu:read and qXfer:spu:write packets.
19289 (main): Pass packet_len to handle_query.
19290 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19291 * target.h (target_ops): Add qxfer_spu.
19292
19293 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19294
19295 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19296 accessing non-seekable spufs files.
19297
19298 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19299
19300 * server.c (handle_query): Add reply for qC packet.
19301
19302 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19303 Leo Zayas <lerele@champenstudios@com>
19304
19305 * server.h (check_remote_input_interrupt_request): New function.
19306 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19307 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19308 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19309 (check_remote_input_interrupt_request): New function.
19310 * server.h (check_remote_input_interrupt_request): Declare.
19311 * win32-low.c (winapi_DebugBreakProcess,
19312 winapi_GenerateConsoleCtrlEvent): New typedefs.
19313 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19314 to 250 ms.
19315 (win32_wait): Check for remote interrupt request
19316 with check_remote_input_interrupt_request.
19317 (win32_request_interrupt): New function.
19318 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19319
19320 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19321
19322 * win32-low.c (debug_registers_changed,
19323 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19324 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19325 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19326 (thread_rec): Get context using the low target.
19327 (child_add_thread): Call thread_added on the low target,
19328 which does the same thing.
19329 (regptr): Delete.
19330 (do_initial_child_stuff): Remove debug registers references.
19331 Set context using the low target. Resume threads after
19332 setting the contexts.
19333 (child_continue): Remove dead variable. Remove debug
19334 registers references.
19335 (child_fetch_inferior_registers): Go through the low target.
19336 (do_child_store_inferior_registers): Remove.
19337 (child_store_inferior_registers): Go through the low target.
19338 (win32_resume): Remove debug registers references.
19339 Set context using the low target.
19340 (handle_exception): Change return type to void. Don't record
19341 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19342 first chance exception.
19343 (get_child_debug_event): Change return type to void. Remove
19344 goto loop. Always return after waiting for debug event.
19345 (win32_wait): Convert to switch statement. Handle spurious
19346 events.
19347
19348 * win32-i386-low.c (debug_registers_changed,
19349 debug_registers_used): New.
19350 (initial_stuff): Rename to ...
19351 (i386_initial_stuff): ... this. Clear debug registers
19352 state variables.
19353 (store_debug_registers): Delete.
19354 (i386_get_thread_context): New.
19355 (load_debug_registers): Delete.
19356 (i386_set_thread_context): New.
19357 (i386_thread_added): New.
19358 (single_step): Rename to ...
19359 (i386_single_step): ... this.
19360 (do_fetch_inferior_registers): Rename to ...
19361 (i386_fetch_inferior_register): ... this.
19362 (i386_store_inferior_register): New.
19363 (the_low_target): Adapt to new interface.
19364
19365 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19366 (arm_get_thread_context): New.
19367 (arm_set_thread_context): New.
19368 (regptr): New.
19369 (do_fetch_inferior_registers): Rename to ...
19370 (arm_fetch_inferior_register): ... this.
19371 (arm_store_inferior_register): New.
19372 (arm_wince_breakpoint): Reimplement as unsigned long.
19373 (arm_wince_breakpoint_len): Define.
19374 (the_low_target): Adapt to new interface.
19375
19376 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19377 load_debug_registers. Add get_thread_context, set_thread_context,
19378 thread_added and store_inferior_register. Rename
19379 fetch_inferior_registers to fetch_inferior_register.
19380 (regptr): Remove declaration.
19381
19382 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19383
19384 * linux-low.c (linux_detach): Change return type to int. Return 0.
19385 * spu-low.c (spu_detach): Likewise.
19386
19387 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19388
19389 * target.h (target_ops): Change return type of detach to int.
19390 Add join.
19391 (join_inferior): New.
19392 * server.c (main): Don't skip detach support on mingw32.
19393 If the inferior doesn't support detaching return error.
19394 Call join_inferior instead of using waitpid.
19395 * linux-low.c (linux_join): New.
19396 (linux_target_op): Add linux_join.
19397 * spu-low.c (spu_join): New.
19398 (spu_target_ops): Add spu_join.
19399 * win32-low.c (win32_detach): Adapt to new interface.
19400 Reopen current_process_handle before detaching. Issue a child
19401 resume before detaching.
19402 (win32_join): New.
19403 (win32_target_op): Add win32_join.
19404
19405 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19406
19407 * win32-low.c (win32-attach): Fix return value.
19408 * target.h (target_ops): Describe ATTACH return values.
19409
19410 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19411
19412 * win32-low.c (GETPROCADDRESS): Define.
19413 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19414 (winapi_DebugSetProcessKillOnExit): Likewise.
19415 (win32_create_inferior): Force usage of ansi CreateProcessA.
19416 (win32_attach): Use GETPROCADDRESS.
19417 (win32_detach): Likewise.
19418
19419 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19420
19421 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19422
19423 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19424
19425 * win32-low.c: Commit leftover changes from 2007-03-29.
19426
19427 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19428
19429 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19430 fields short instead of int. Add explicit padding.
19431 (i387_cache_to_fsave): Remove unnecessary casts.
19432 (i387_fsave_to_cache): Doc fix.
19433 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19434
19435 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19436
19437 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19438 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19439
19440 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19441
19442 * configure.srv (arm*-*-mingw32ce*): Move near the other
19443 arm targets.
19444
19445 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19446
19447 * configure.ac: Add errno checking.
19448 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19449 sys/file.h and malloc.h.
19450 (AC_CHECK_DECLS): Add perror.
19451 (srv_mingwce): Handle.
19452 * configure.srv (i[34567]86-*-cygwin*): Add
19453 win32-i386-low.o to srv_tgtobj.
19454 (i[34567]86-*-mingw*): Likewise.
19455 (arm*-*-mingw32ce*): Add case.
19456 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19457 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19458 [__MINGW32CE__] (strerror): New function.
19459 [__MINGW32CE__] (errno): Define to GetLastError.
19460 [__MINGW32CE__] (COUNTOF): New macro.
19461 (remote_open): Remove extra close call.
19462 * mem-break.c (delete_breakpoint_at): New function.
19463 * mem-break.h (delete_breakpoint_at): Declare.
19464 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19465 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19466 [USE_WIN32API] (read, write): Add char* casts.
19467 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19468 * server.h: Include wincecompat.h on Windows CE.
19469 [HAVE_ERRNO_H]: Check.
19470 (perror): Declare if not declared.
19471 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19472 (perror_with_name): Remove errno declaration.
19473 * wincecompat.h: New.
19474 * wincecompat.c: New.
19475 * win32-low.h: New.
19476 * win32-arm-low.c: New.
19477 * win32-i386-low.c: New.
19478 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19479 (OUTMSG2): Make it safe.
19480 (_T): New macro.
19481 (COUNTOF): New macro.
19482 (NUM_REGS): Get it from the low target.
19483 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19484 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19485 (thread_rec): Let low target handle debug registers.
19486 (child_add_thread): Likewise.
19487 (child_init_thread_list): Likewise.
19488 (continue_one_thread): Likewise.
19489 (regptr): New.
19490 (do_child_fetch_inferior_registers): Move to ...
19491 * win32-i386-low.c: ... here, and rename to ...
19492 (do_fetch_inferior_registers): ... this.
19493 * win32-low.c (child_fetch_inferior_registers):
19494 Go through the low target.
19495 (do_child_store_inferior_registers): Use regptr.
19496 (strwinerror): New function.
19497 (win32_create_inferior): Handle Windows CE.
19498 Use strwinerror instead of strerror on Windows error
19499 codes. Add program to the error output.
19500 Don't close the main thread handle on Windows CE.
19501 (win32_attach): Use coredll.dll on Windows CE.
19502 (win32_kill): Close current process and current
19503 thread handles.
19504 (win32_detach): Use coredll.dll on Windows CE.
19505 (win32_resume): Let low target handle debug registers, and
19506 step request.
19507 (handle_exception): Add/Remove initial breakpoint. Avoid
19508 non-existant WSTOPSIG on Windows CE.
19509 (win32_read_inferior_memory): Cast to remove warning.
19510 (win32_arch_string): Go through the low target.
19511 (initialize_low): Call set_breakpoint_data with the low
19512 target's breakpoint.
19513 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19514 FOP_REGNUM, mappings): Move to ...
19515 * win32-i386-low.c: ... here.
19516 * win32-low.c (win32_thread_info): Move to ...
19517 * win32-low.h: ... here.
19518 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19519 win32-arm-low.c and wincecompat.c.
19520 (all:): Add $EXEEXT.
19521 (install-only:): Likewise.
19522 (gdbserver:): Likewise.
19523 (gdbreplay:): Likewise.
19524 * config.in: Regenerate.
19525 * configure: Regenerate.
19526
19527 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19528
19529 * win32-low.c: Rename typedef thread_info to
19530 win32_thread_info throughout.
19531
19532 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19533
19534 * win32-i386-low.c: Rename to ...
19535 * win32-low.c: ... this.
19536 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19537 * Makefile.in: Likewise.
19538
19539 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19540
19541 * remote-utils.c (monitor_output): Constify msg parameter.
19542 * server.h (monitor_output): Likewise.
19543 * win32-i386-low.c (handle_output_debug_string): New.
19544 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19545 handle_output_debug_string.
19546 (get_child_debug_event): Likewise.
19547
19548 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19549
19550 * server.c (main): Correct strtoul check.
19551
19552 2007-03-27 Jon Ringle <jon@ringle.org>
19553
19554 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19555
19556 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19557
19558 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
19559
19560 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
19561
19562 * terminal.h: Check HAVE_SGTTY_H.
19563
19564 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
19565
19566 * remote-utils.c (remote_open): Print out the assigned port number.
19567
19568 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
19569
19570 * remote-utils.c (monitor_output): New function.
19571 * server.c (debug_threads): Define here.
19572 (monitor_show_help): New function.
19573 (handle_query): Handle qRcmd.
19574 (main): Do not handle 'd' packet.
19575 * server.h (debug_threads, remote_debug, monitor_output): Declare.
19576 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
19577 of debug_threads.
19578
19579 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19580
19581 * Makefile.in (EXEEXT): New.
19582 (clean): Use $(EXEEXT).
19583
19584 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19585
19586 * target.h (target_ops): Rename send_signal to request_interrupt,
19587 and remove enum target_signal parameter.
19588 * linux-low.c (linux_request_interrupt): Rename from
19589 linux_send_signal, and always send SIGINT.
19590 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
19591 and always send SIGINT.
19592 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
19593 of send_signal.
19594 (input_interrupt): Likewise.
19595
19596 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19597
19598 * server.c (get_features_xml): Check if target implemented
19599 arch_string.
19600 * win32-i386-low.c (win32_arch_string): New.
19601 (win32_target_ops): Add win32_arch_string as arch_string member.
19602
19603 2007-02-22 Markus Deuling <deuling@de.ibm.com>
19604
19605 * spu-low.c (spu_arch_string): New.
19606 (spu_target_ops): Add spu_arch_string.
19607
19608 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
19609
19610 * remote-utils.c: Remove HAVE_TERMINAL_H check.
19611 * configure.ac: Do not check for terminal.h.
19612 * configure, config.in: Regenerated.
19613
19614 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19615
19616 * Makefile.in (OBS): Add $(XML_BUILTIN).
19617 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
19618 (clean): Update.
19619 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
19620 (arm-with-iwmmxt.c): New.
19621 * config.in, configure: Regenerate.
19622 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
19623 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
19624 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
19625 (arm*-*-linux*): Add iWMMXt and regset support.
19626 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
19627 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
19628 (arm_store_wmmxregset, target_regsets): New.
19629 * server.c (get_features_xml): Take annex argument. Check builtin
19630 XML documents.
19631 (handle_query): Handle multiple annexes.
19632
19633 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19634
19635 * remote-utils.c [USE_WIN32API] (read, write): Define.
19636 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
19637 write.
19638
19639 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
19640
19641 * linux-i386-low.c (the_low_target): Set arch_string.
19642 * linux-x86-64-low.c (the_low_target): Likewise.
19643 * linux-low.c (linux_arch_string): New.
19644 (linux_target_ops): Add it.
19645 * linux-low.h (struct linux_target_ops): Add arch_string.
19646 * server.c (write_qxfer_response): Use const void * for DATA.
19647 (get_features_xml): New.
19648 (handle_query): Handle qXfer:features:read. Report it for qSupported.
19649 * target.h (struct target_ops): Add arch_string method.
19650
19651 2007-01-03 Denis Pilat <denis.pilat@st.com>
19652 Daniel Jacobowitz <dan@codesourcery.com>
19653
19654 * linux-low.c (linux_kill): Handle being called with no threads.
19655 * win32-i386-low.c (win32_kill): Likewise.
19656 (get_child_debug_event): Clear current_process_handle.
19657
19658 2006-12-30 Denis PILAT <denis.pilat@st.com>
19659 Daniel Jacobowitz <dan@codesourcery.com>
19660
19661 * remote-utils.c (remote_open): Check the type of specified
19662 serial port devices before opening them.
19663 * server.c (main): Kill the inferior if an error occurs during
19664 the first remote_open.
19665
19666 2006-12-05 Markus Deuling <deuling@de.ibm.com>
19667
19668 * README: Update supported targets.
19669
19670 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
19671
19672 * Makefile.in (clean): Remove reg-mips64.c.
19673 (reg-mips64.c, reg-mips64.o): New rules.
19674 * configure.srv: Handle mips64. Include regset support for mips.
19675 * linux-mips-low.c (union mips_register): New.
19676 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
19677 (mips_breakpoint, mips_breakpoint_at): Use int.
19678 (mips_collect_register, mips_supply_register)
19679 (mips_collect_register_32bit, mips_supply_register_32bit)
19680 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
19681 (mips_store_fpregset, target_regsets): New.
19682 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
19683
19684 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
19685
19686 * configure.srv: Add target "spu*-*-*".
19687 * Makefile.in (clean): Remove reg-spu.c.
19688 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
19689 * spu-low.c: New file.
19690
19691 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19692
19693 * configure.ac: Correct td_thr_tls_get_addr test.
19694 * configure: Regenerated.
19695
19696 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19697
19698 * linux-low.c (linux_wait_for_event): Reformat. Use the
19699 pass_signals array.
19700 * remote-utils.c (decode_address_to_semicolon): New.
19701 * server.c (pass_signals, handle_general_set): New.
19702 (handle_query): Mention QPassSignals for qSupported.
19703 (main): Call handle_general_set.
19704 * server.h (pass_signals, decode_address_to_semicolon): New.
19705
19706 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
19707
19708 * server.c (handle_query): Correct error handling for read_auxv.
19709
19710 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
19711
19712 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
19713 and srv_linux_thread_db to yes.
19714 * linux-s390-low.c (s390_fill_gregset): New function.
19715 (target_regsets): Define data structure.
19716
19717 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
19718
19719 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
19720 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
19721 * config.in, configure: Regenerated.
19722 * inferiors.c (gdb_id_to_thread): New function.
19723 (gdb_id_to_thread_id): Use it.
19724 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
19725 * linux-low.h (struct process_info): Add th member.
19726 (thread_db_get_tls_address): New prototype.
19727 * remote-utils.c (decode_address): Make non-static.
19728 * server.c (handle_query): Handle qGetTLSAddr.
19729 * server.h (gdb_id_to_thread, decode_address): New prototypes.
19730 * target.h (struct target_ops): Add get_tls_address.
19731 * thread-db.c (maybe_attach_thread): Save the thread handle.
19732 (thread_db_get_tls_address): New.
19733
19734 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
19735
19736 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
19737 (linux_resume_one_process): Take a siginfo_t *. Update all
19738 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
19739 (struct pending_signals): Add a siginfo_t.
19740 (linux_wait_for_process): Always set last_status.
19741 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
19742 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
19743 * linux-low.h (struct process_info): Add last_status.
19744
19745 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
19746
19747 * remote-utils.c (try_rle): New function.
19748 (putpkt_binary): Use it.
19749
19750 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
19751
19752 * Makefile.in (clean): Clean reg-x86-64-linux.c.
19753 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
19754 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
19755 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
19756 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
19757 point registers.
19758
19759 2006-08-08 Richard Sandiford <richard@codesourcery.com>
19760
19761 * server.c (terminal_fd): New variable.
19762 (old_foreground_pgrp): Likewise.
19763 (restore_old_foreground_pgrp): New function.
19764 (start_inferior): Record the terminal file descriptor in terminal_fd
19765 and its original foreground group in old_foreground_pgrp. Register
19766 restore_old_foreground_pgrp with atexit().
19767
19768 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
19769
19770 * server.c (handle_query): Correct qPart to qXfer.
19771
19772 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
19773
19774 * configure.ac: Check for more headers which are missing on
19775 Windows. Automatically supply -lwsock32 and USE_WIN32API.
19776 * configure.srv: Add Cygwin and mingw32.
19777 * remote-utils.c: Don't include headers unconditionally which
19778 are missing on mingw32. Include <winsock.h> for mingw32.
19779 (remote_open): Adjust for mingw32 support. Flush
19780 standard error after writing to it.
19781 (remote_close, putpkt_binary, input_interrupt, block_async_io)
19782 (unblock_async_io, enable_async_io, disable_async_io)
19783 (readchar, getpkt): Update for Winsock support.
19784 (prepare_resume_reply): Expect a protocol signal number.
19785 * server.c: Disable <sys/wait.h> on mingw32.
19786 (start_inferior): Adjust for mingw32 support. Flush
19787 standard error after writing to it.
19788 (attach_inferior): Likewise. Use protocol signal
19789 numbers.
19790 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
19791 and names.
19792 * win32-i386-low.c: New file.
19793 * Makefile.in (XM_CLIBS): Set.
19794 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
19795 (win32-i386-low.o): New dependency rule.
19796 * linux-low.c (linux_wait): Use target signal numbers.
19797 * target.h (struct target_ops): Doc fix.
19798 * server.h (target_signal_to_name): New prototype.
19799 * gdbreplay.c: Don't include headers unconditionally which
19800 are missing on mingw32. Include <winsock.h> for mingw32.
19801 (remote_close, remote_open): Adjust for Winsock support.
19802 * configure, config.in: Regenerated.
19803
19804 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19805
19806 * server.c (decode_xfer_read, write_qxfer_response): New.
19807 (handle_query): Take a packet length argument. Handle
19808 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
19809 the qSupported response.
19810 (main): Update call to handle_query.
19811
19812 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
19813
19814 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
19815 (putpkt_binary): Renamed from putpkt and adjusted for binary
19816 data.
19817 (putpkt): New wrapper for putpkt_binary.
19818 (readchar): Don't mask off the high bit.
19819 (decode_X_packet): New function.
19820 * server.c (main): Call putpkt_binary if a handler sets the packet
19821 length. Save the length of the incoming packet. Handle 'X'.
19822 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
19823
19824 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
19825
19826 * server.c (handle_query): Handle qSupported.
19827
19828 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19829
19830 * remote-utils.c (all_symbols_looked_up): New variable.
19831 (look_up_one_symbol): Check it.
19832 * server.h (look_up_one_symbol): New declaration.
19833 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
19834
19835 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19836
19837 * Makefile.in (linux-arm-low.o): Update dependencies.
19838 * linux-arm-low.c: Include "gdb_proc_service.h".
19839 (PTRACE_GET_THREAD_AREA): Define.
19840 (ps_get_thread_area): New function.
19841
19842 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
19843
19844 * configure.srv (m68k*-*-uclinux*): New target.
19845 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
19846 (linux_resume_one_process): Remove extraneous cast.
19847 (linux_read_offsets): New.
19848 (linux_target_op): Add linux_read_offsets on mmuless systems.
19849 * server.c (handle_query): Add qOffsets logic.
19850 * target.h (struct target_ops): Add read_offsets.
19851
19852 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19853
19854 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
19855 (PTRACE_GET_THREAD_AREA): Define.
19856 (ps_get_thread_area): New function.
19857 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
19858 (linux-x86-64-low.o): Update.
19859
19860 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19861
19862 * configure.ac: Remove checks for prfpregset_t.
19863 * gdb_proc_service.h: New file.
19864 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
19865 new "gdb_proc_service.h".
19866 * proc-service.c: Likewise.
19867 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
19868 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
19869 * Makefile.in (gdb_proc_service_h): Updated.
19870 * configure, config.in: Regenerated.
19871
19872 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19873
19874 * remote-utils.c (prepare_resume_reply): Move declaration
19875 of gdb_id_from_wait to the top of the block.
19876
19877 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
19878
19879 * linux-low.c (regsets_store_inferior_registers): Read the regset
19880 from the target before filling it.
19881
19882 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19883
19884 * server.c (attach_inferior): Return SIGTRAP for a successful
19885 attach.
19886
19887 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
19888
19889 * Makefile.in (OBS): Add version.o.
19890 (STAGESTUFF): Delete.
19891 (version.o): Add dependencies.
19892 (version.c): Replace rule.
19893 (clean): Remove version.c.
19894 * server.c (gdbserver_version): New.
19895 (gdbserver_usage): Use printf.
19896 (main): Handle --version and --help.
19897 * server.h (version, host_name): Add declarations.
19898
19899 2005-12-23 Eli Zaretskii <eliz@gnu.org>
19900
19901 * linux-arm-low.c:
19902 * linux-arm-low.c:
19903 * inferiors.c:
19904 * i387-fp.h:
19905 * i387-fp.c:
19906 * gdbreplay.c:
19907 * regcache.c:
19908 * proc-service.c:
19909 * mem-break.h:
19910 * mem-break.c:
19911 * linux-x86-64-low.c:
19912 * linux-sh-low.c:
19913 * linux-s390-low.c:
19914 * linux-ppc64-low.c:
19915 * linux-ppc-low.c:
19916 * linux-mips-low.c:
19917 * linux-m68k-low.c:
19918 * linux-m32r-low.c:
19919 * linux-low.h:
19920 * linux-low.c:
19921 * linux-ia64-low.c:
19922 * linux-i386-low.c:
19923 * linux-crisv32-low.c:
19924 * thread-db.c:
19925 * terminal.h:
19926 * target.h:
19927 * target.c:
19928 * server.h:
19929 * server.c:
19930 * remote-utils.c:
19931 * regcache.h:
19932 * utils.c:
19933 * Makefile.in:
19934 * configure.ac:
19935 * gdbserver.1: Add (C) after Copyright. Update the FSF
19936 address.
19937
19938 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
19939
19940 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
19941 (arm_breakpoint_at): Recognize both breakpoints.
19942 (the_low_target): Use the correct breakpoint instruction.
19943
19944 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
19945
19946 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
19947 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
19948 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
19949 (the_low_target): Update.
19950
19951 2005-10-25 Andreas Schwab <schwab@suse.de>
19952
19953 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
19954
19955 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
19956 (ia64_num_regs): Reduce to 462.
19957
19958 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
19959
19960 * acinclude.m4: Correct quoting.
19961 * aclocal.m4: Regenerated.
19962
19963 Suggested by SZOKOVACS Robert <szo@ies.hu>:
19964 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
19965 (thread_db_init): Call thread_db_err_str.
19966 * configure.ac: Check for TD_VERSION.
19967 * config.in, configure: Regenerated.
19968
19969 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19970
19971 * server.h (error, fatal, warning): Add ATTR_FORMAT.
19972
19973 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19974
19975 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
19976 is not available. Define HAVE_PTRACE_GETREGS if it is.
19977 * config.in, configure: Regenerated.
19978 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
19979 * linux-i386-low.c, linux-m68k-low.c: Update to use
19980 HAVE_PTRACE_GETREGS.
19981 * linux-low.c (regsets_fetch_inferior_registers)
19982 (regsets_store_inferior_registers): Only return 0 if we processed
19983 GENERAL_REGS.
19984 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
19985 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
19986
19987 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19988
19989 * inferiors.c (struct thread_info): Add gdb_id.
19990 (add_thread): Add gdb_id argument.
19991 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
19992 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
19993 calls to add_thread.
19994 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
19995 * server.c (handle_query): Use thread_to_gdb_id.
19996 (handle_v_cont, main): Use gdb_id_to_thread_id.
19997 * server.h (add_thread): Update prototype.
19998 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
19999 prototypes.
20000
20001 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
20002
20003 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
20004 left-padded registers.
20005 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
20006 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
20007
20008 2005-07-01 Steve Ellcey <sje@cup.hp.com>
20009
20010 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
20011 * configure: Regenerate.
20012 * config.in: Regenerate.
20013 * server.h (NEED_DECLARATION_STRERROR):
20014 Replace with !HAVE_DECL_STRERROR.
20015
20016 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
20017
20018 * linux-low.c (linux_wait, linux_send_signal): Don't test
20019 an unsigned long variable for > 0 if it could be MAX_ULONG.
20020 * server.c (myresume): Likewise.
20021 * target.c (set_desired_inferior): Likewise.
20022
20023 2005-06-13 Mark Kettenis <kettenis@gnu.org>
20024
20025 * configure.ac: Simplify and improve check for socklen_t.
20026 * configure, config.in: Regenerate.
20027
20028 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
20029
20030 * acconfig.h: Remove.
20031 * configure.ac: Add a test for socklen_t. Use three-argument
20032 AC_DEFINE throughout.
20033 * config.in: Regenerated using autoheader 2.59.
20034 * configure: Regenerated.
20035
20036 * gdbreplay.c (socklen_t): Provide a default.
20037 (remote_open): Use socklen_t.
20038 * remote-utils.c (socklen_t): Provide a default.
20039 (remote_open): Use socklen_t.
20040 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
20041 unsigned char.
20042
20043 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
20044 char for buffers.
20045 * linux-low.c (linux_read_memory, linux_write_memory)
20046 (linux_read_auxv): Likewise.
20047 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
20048 (check_mem_write): Likewise.
20049 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
20050 Likewise.
20051 * regcache.c (struct inferior_rgcache_data, registers_to_string)
20052 (registers_from_string, register_data): Likewise.
20053 * server.c (handle_query, main): Likewise.
20054 * server.h (convert_ascii_to_int, convert_int_to_ascii)
20055 (decode_M_packet): Likewise.
20056 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
20057 * target.h (struct target_ops): Update read_memory, write_memory,
20058 and read_auxv.
20059 (read_inferior_memory, write_inferior_memory): Update.
20060 * linux-low.h (struct linux_target_ops): Change type of breakpoint
20061 to unsigned char *.
20062 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
20063 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
20064 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
20065 linux-s390-low.c, linux-sh-low.c: Update for changes in
20066 read_inferior_memory and the_low_target->breakpoint.
20067
20068 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
20069
20070 * Makefile.in (SFILES): Add linux-ppc64-low.c.
20071 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
20072 * configure.srv: Add powerpc64-*-linux*.
20073 * linux-ppc64-low.c: New file.
20074
20075 2005-05-23 Orjan Friberg <orjanf@axis.com>
20076
20077 * linux-cris-low.c: New file with support for CRIS.
20078 * linux-crisv32-low.c: Ditto for CRISv32.
20079 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
20080 (clean): Add reg-cris.c and reg-crisv32.c.
20081 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
20082 reg-crisv32.o, and reg-crisv32.c to make rules.
20083 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
20084 recognized targets.
20085
20086 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
20087
20088 * linux-low.c (fetch_register): Ensure buffer size is a multiple
20089 of sizeof (PTRACE_XFER_TYPE).
20090 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
20091
20092 2005-05-12 Orjan Friberg <orjanf@axis.com>
20093
20094 * target.h (struct target_ops): Add insert_watchpoint,
20095 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
20096 pointers for hardware watchpoint support.
20097 * linux-low.h (struct linux_target_ops): Ditto.
20098 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
20099 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
20100 to linux_target_ops.
20101 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
20102 reply packet.
20103 * server.c (main): Recognize 'Z' and 'z' packets.
20104
20105 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20106
20107 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20108 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20109 (the_low_target): Add new members.
20110
20111 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20112
20113 * proc-service.c (ps_lgetregs): Search all_processes instead of
20114 all_threads.
20115
20116 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20117
20118 * server.c (start_inferior): Change return type to int.
20119 (attach_inferior): Change sigptr to int *.
20120 (handle_v_cont, handle_v_requests): Change signal to int *.
20121 (main): Change signal to int.
20122
20123 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20124
20125 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20126 * configure.srv: Add m32r*-*-linux*.
20127 * linux-m32r-low.c: New file.
20128
20129 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20130
20131 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20132
20133 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20134
20135 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20136 Take unsigned long arguments for PIDs.
20137 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20138 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20139 (wait_for_sigstop, linux_resume_one_process)
20140 (regsets_fetch_inferior_registers, linux_send_signal)
20141 (linux_read_auxv): Likewise. Update the types of variables holding
20142 PIDs. Update format string specifiers.
20143 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20144 * remote-utils.c (prepare_resume_reply): Likewise.
20145 * server.c (cont_thread, general_thread, step_thread)
20146 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20147 unsigned long.
20148 (handle_query): Update format specifiers.
20149 (handle_v_cont, main): Use strtoul for thread IDs.
20150 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20151 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20152 (general_thread, step_thread, thread_from_wait)
20153 (old_thread_from_wait): Update.
20154 * target.h (struct thread_resume): Use unsigned long for THREAD.
20155 (struct target_ops): Use unsigned long for arguments to attach and
20156 thread_alive.
20157
20158 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20159
20160 * acinclude.m4: Include bfd/bfd.m4 directly.
20161 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20162 <agriffis@toolchain.org>.
20163 * aclocal.m4, configure: Regenerated.
20164
20165 2005-01-07 Andrew Cagney <cagney@gnu.org>
20166
20167 * configure.ac: Rename configure.in, require autoconf 2.59.
20168 * configure: Re-generate.
20169
20170 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20171
20172 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20173 LIBS when finished.
20174 * aclocal.m4: Regenerated.
20175 * configure: Regenerated.
20176
20177 2004-11-21 Andreas Schwab <schwab@suse.de>
20178
20179 * linux-m68k-low.c (m68k_num_gregs): Define.
20180 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20181 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20182 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20183 (m68k_breakpoint_at): New. Add to the_low_target.
20184
20185 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20186 srv_linux_thread_db to yes.
20187
20188 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20189
20190 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20191 (ARCH_SET_FS): Likewise.
20192 (ARCH_GET_FS): Likewise.
20193 (ARCH_GET_GS): Likewise.
20194
20195 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20196
20197 * linux-i386-low.c (ps_get_thread_area): New.
20198 * linux-x86-64-low.c (ps_get_thread_area): New.
20199 * linux-low.c: Include <sys/syscall.h>.
20200 (linux_kill_one_process): Don't kill the first thread here.
20201 (linux_kill): Kill the first thread here.
20202 (kill_lwp): New function.
20203 (send_sigstop, linux_send_signal): Use it.
20204 * proc-service.c: Clean up #ifdefs.
20205 (fpregset_info): Delete.
20206 (ps_lgetregs): Update and enable implementation.
20207 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20208 implementations.
20209 * remote-utils.c (struct sym_cache, symbol_cache): New.
20210 (input_interrupt): Print a clearer message.
20211 (async_io_enabled): New variable.
20212 (enable_async_io, disable_async_io): Use it. Update comments.
20213 (look_up_one_symbol): Use the symbol cache.
20214 * thread-db.c (thread_db_look_up_symbols): New function.
20215 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20216
20217 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20218
20219 * configure.in: Test for -rdynamic.
20220 * configure: Regenerated.
20221 * Makefile (INTERNAL_LDFLAGS): New.
20222 (gdbserver, gdbreplay): Use it.
20223
20224 2004-09-02 Andrew Cagney <cagney@gnu.org>
20225
20226 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20227
20228 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20229
20230 * linux-low.c (linux_wait): Clear all_processes list also.
20231
20232 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20233
20234 * linux-low.c: Include <errno.h>. Remove extern declaration of
20235 errno.
20236
20237 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20238
20239 * gdbreplay.c, server.h, utils.c: Update copyright years.
20240
20241 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20242
20243 * server.c (main): Print child status or termination signal from
20244 variable 'signal', not 'sig'.
20245
20246 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20247
20248 * linux-low.c (linux_read_memory): Change return type to
20249 int. Check for and return error from ptrace().
20250 * target.c (read_inferior_memory): Change return type to int. Pass
20251 back return status from the_target->read_memory().
20252 * target.h (struct target_ops): Adapt *read_memory() prototype.
20253 Update comment.
20254 (read_inferior_memory): Adapt prototype.
20255 * server.c (main): Return an error packet if
20256 read_inferior_memory() returns an error.
20257
20258 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20259
20260 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20261 Unify with other clean targets.
20262
20263 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20264
20265 * server.c (handle_v_cont): Call set_desired_inferior.
20266
20267 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20268
20269 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20270
20271 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20272
20273 * linux-low.c (linux_wait): Unblock async I/O.
20274 (linux_resume): Block and enable async I/O.
20275 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20276 * server.h (block_async_io, unblock_async_io): Add prototypes.
20277
20278 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20279
20280 * remote-utils.c (remote_open): Print a status notice after
20281 opening a TCP port.
20282 * server.c (attach_inferior): Print a status notice after
20283 attaching.
20284
20285 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20286
20287 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20288
20289 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20290
20291 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20292 error packet.
20293 * server.c, target.h: Update copyright years.
20294
20295 2004-02-25 Roland McGrath <roland@redhat.com>
20296
20297 * target.h (struct target_ops): New member `read_auxv'.
20298 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20299 * linux-low.c (linux_read_auxv): New function.
20300 (linux_target_ops): Initialize `read_auxv' member to that.
20301
20302 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20303
20304 Committed by Jim Blandy <jimb@redhat.com>.
20305
20306 * linux-s390-low.c (s390_num_regs): Update.
20307 (s390_regmap): Remove control registers. Use __s390x__ predefine
20308 instead of GPR_SIZE to distiguish s390 and s390x targets.
20309
20310 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20311
20312 * linux-low.c: Update copyright year.
20313 (check_removed_breakpoint): Clear pending_is_breakpoint.
20314 (linux_set_resume_request, linux_queue_one_thread)
20315 (resume_status_pending_p): New functions.
20316 (linux_continue_one_thread): Use process->resume.
20317 (linux_resume): Only resume threads if there are no pending events.
20318 * linux-low.h (struct process_info): Add resume request
20319 pointer.
20320
20321 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20322
20323 * regcache.c (new_register_cache): Clear the allocated register
20324 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20325
20326 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20327
20328 * linux-low.c (linux_resume): Take a struct thread_resume *
20329 argument.
20330 (linux_wait): Update call.
20331 (resume_ptr): New static variable.
20332 (linux_continue_one_thread): Renamed from
20333 linux_continue_one_process. Use resume_ptr.
20334 (linux_resume): Use linux_continue_one_thread.
20335 * server.c (handle_v_cont, handle_v_requests): New functions.
20336 (myresume): New function.
20337 (main): Handle 'v' case.
20338 * target.h (struct thread_resume): New type.
20339 (struct target_ops): Change argument of "resume" to struct
20340 thread_resume *.
20341 (myresume): Delete macro.
20342
20343 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20344
20345 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20346 (uninstall): Support DESTDIR.
20347
20348 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20349
20350 * configure.srv: Add xscale*linux copy of arm*linux entry.
20351
20352 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20353
20354 * linux-arm-low.c (arm_reinsert_addr): New function.
20355 (the_low_target): Add arm_reinsert_addr.
20356
20357 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20358
20359 * mem-break.c: Remove whitespace at end of file.
20360
20361 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20362
20363 * configure.in: Check whether we need to prototype strerror.
20364 * server.h: Optionally prototype strerror.
20365 * gdbreplay.c (perror_with_name): Use strerror.
20366 * linux-low.c (linux_attach_lwp): Use strerror.
20367 * utils.c (perror_with_name): Use strerror.
20368 * config.in, configure: Regenerated.
20369
20370 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20371
20372 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20373 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20374
20375 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
20376
20377 * Makefile.in (SFILES): Update.
20378 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20379 low-sun3.c: Remove files.
20380
20381 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
20382
20383 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20384 (linux_detach_one_process, linux_detach): New functions.
20385 (linux_target_ops): Add linux_detach.
20386 * server.c (main): Handle 'D' packet.
20387 * target.h (struct target_ops): Add "detach" member.
20388 (detach_inferior): Define.
20389
20390 2003-06-13 Mark Kettenis <kettenis@gnu.org>
20391
20392 From Kelley Cook <kelleycook@wideopenwest.com>:
20393 * configure.srv: Accept i[34567]86 variants.
20394
20395 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
20396
20397 * linux-low.c (linux_wait_for_event): Correct comment typos.
20398 (linux_resume_one_process): Call check_removed_breakpoint.
20399 (linux_send_signal): New function.
20400 (linux_target_ops): Add linux_send_signal.
20401 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20402 of kill.
20403 * target.h (struct target_ops): Add send_signal.
20404
20405 2003-05-29 Jim Blandy <jimb@redhat.com>
20406
20407 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20408 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20409 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20410 away part of the register's value.
20411
20412 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
20413
20414 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20415 (linux_wait_for_event, linux_init_signals): Likewise.
20416
20417 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
20418
20419 * configure.in: Check for stdlib.h.
20420 * configure: Regenerated.
20421 * config.in: Regenerated.
20422
20423 2003-01-04 Andreas Schwab <schwab@suse.de>
20424
20425 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20426
20427 2003-01-02 Andrew Cagney <ac131313@redhat.com>
20428
20429 * Makefile.in: Remove obsolete code.
20430
20431 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
20432
20433 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20434 defined(PT_FPR0_HI).
20435
20436 2002-11-17 Stuart Hughes <seh@zee2.com>
20437
20438 * linux-arm-low.c (arm_num_regs): Increase.
20439 (arm_regmap): Include status register.
20440
20441 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
20442
20443 * linux-low.c (register_addr): Remove incorrect -1 check.
20444
20445 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
20446
20447 * linux-low.c (linux_create_inferior): Call setpgid. Return
20448 the new PID.
20449 (unstopped_p, linux_signal_pid): Remove.
20450 (linux_target_ops): Remove linux_signal_pid.
20451 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20452 global instead of target method.
20453 * target.h (struct target_ops): Remove signal_pid. Update comment
20454 for create_inferior.
20455 * server.c (signal_pid): New variable.
20456 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
20457 gdbserver. Set the child to be the foreground process group.
20458 (attach_inferior): Set signal_pid.
20459
20460 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
20461
20462 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20463
20464 2002-08-20 Jim Blandy <jimb@redhat.com>
20465
20466 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20467 default for this.
20468
20469 2002-08-01 Andrew Cagney <cagney@redhat.com>
20470
20471 * Makefile.in: Make chill references obsolete.
20472
20473 2002-07-24 Kevin Buettner <kevinb@redhat.com>
20474
20475 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20476 * configure: Regenerate.
20477 * config.in: Regenerate.
20478
20479 2002-07-09 David O'Brien <obrien@FreeBSD.org>
20480
20481 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20482 (perror_with_name, remote_close, remote_open, expect, play): Static.
20483
20484 2002-07-04 Michal Ludvig <mludvig@suse.cz>
20485
20486 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
20487 byte offsets instead of an array of indexes.
20488 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20489
20490 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
20491
20492 * regcache.c: Add comment.
20493
20494 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
20495
20496 * thread-db.c: New file.
20497 * proc-service.c: New file.
20498 * acinclude.m4: New file.
20499 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20500 proc-service.o, and thread-db.o.
20501 (linux-low.o): Add USE_THREAD_DB.
20502 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20503 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20504 * aclocal.m4: Regenerated.
20505 * config.in: Regenerated.
20506 * configure: Regenerated.
20507 * configure.in: Check for proc_service.h, sys/procfs.h,
20508 thread_db.h, and linux/elf.h headrs.
20509 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20510 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20511 Check for -lthread_db and thread support.
20512 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20513 PowerPC, and SuperH.
20514 * i387-fp.c: Constify arguments.
20515 * i387-fp.h: Likewise.
20516 * inferiors.c: (struct thread_info): Renamed from
20517 `struct inferior_info'. Remove PID member. Use generic inferior
20518 list header. All uses updated.
20519 (inferiors, signal_pid): Removed.
20520 (all_threads): New variable.
20521 (get_thread): Define.
20522 (add_inferior_to_list): New function.
20523 (for_each_inferior): New function.
20524 (change_inferior_id): New function.
20525 (add_inferior): Removed.
20526 (remove_inferior): New function.
20527 (add_thread): New function.
20528 (free_one_thread): New function.
20529 (remove_thread): New function.
20530 (clear_inferiors): Use for_each_inferior and free_one_thread.
20531 (find_inferior): New function.
20532 (find_inferior_id): New function.
20533 (inferior_target_data): Update argument type.
20534 (set_inferior_target_data): Likewise.
20535 (inferior_regcache_data): Likewise.
20536 (set_inferior_regcache_data): Likewise.
20537 * linux-low.c (linux_bp_reinsert): Remove.
20538 (all_processes, stopping_threads, using_thrads)
20539 (struct pending_signals, debug_threads, pid_of): New.
20540 (inferior_pid): Replace with macro.
20541 (struct inferior_linux_data): Remove.
20542 (get_stop_pc, add_process): New functions.
20543 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20544 Use add_process and add_thread.
20545 (linux_attach_lwp): New function, based on old linux_attach. Use
20546 add_process and add_thread. Set stop_expected for new threads.
20547 (linux_attach): New function.
20548 (linux_kill_one_process): New function.
20549 (linux_kill): Kill all LWPs.
20550 (linux_thread_alive): Use find_inferior_id.
20551 (check_removed_breakpoints, status_pending_p): New functions.
20552 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20553 Update. Use WNOHANG. Wait for cloned processes also. Update process
20554 struct for the found process.
20555 (linux_wait_for_event): New function.
20556 (linux_wait): Use it. Support LWPs.
20557 (send_sigstop, wait_for_sigstop, stop_all_processes)
20558 (linux_resume_one_process, linux_continue_one_process): New functions.
20559 (linux_resume): Support LWPs.
20560 (REGISTER_RAW_SIZE): Remove.
20561 (fetch_register): Use register_size instead. Call supply_register.
20562 (usr_store_inferior_registers): Likewise. Call collect_register.
20563 Fix recursive case.
20564 (regsets_fetch_inferior_registers): Improve error message.
20565 (regsets_store_inferior_registers): Add debugging.
20566 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
20567 (unstopped_p, linux_signal_pid): New functions.
20568 (linux_target_ops): Add linux_signal_pid.
20569 (linux_init_signals): New function.
20570 (initialize_low): Call it. Initialize using_threads.
20571 * regcache.c (inferior_regcache_data): Add valid
20572 flag.
20573 (get_regcache): Fetch registers lazily. Add fetch argument
20574 and update all callers.
20575 (regcache_invalidate_one, regcache_invalidate): New
20576 functions.
20577 (new_register_cache): Renamed from create_register_cache.
20578 Return the new regcache.
20579 (free_register_cache): Change argument to a void *.
20580 (registers_to_string, registers_from_string): Call get_regcache
20581 with fetch flag set.
20582 (register_data): Make static. Pass fetch flag to get_regcache.
20583 (supply_register): Call get_regcache with fetch flag clear.
20584 (collect_register): Call get_regcache with fetch flag set.
20585 (collect_register_as_string): New function.
20586 * regcache.h: Update.
20587 * remote-utils.c (putpkt): Flush after debug output and use
20588 stderr.
20589 Handle input interrupts while waiting for an ACK.
20590 (input_interrupt): Use signal_pid method.
20591 (getpkt): Flush after debug output and use stderr.
20592 (outreg): Use collect_register_as_string.
20593 (new_thread_notify, dead_thread_notify): New functions.
20594 (prepare_resume_reply): Check using_threads. Set thread_from_wait
20595 and general_thread.
20596 (look_up_one_symbol): Flush after debug output.
20597 * server.c (step_thread, server_waiting): New variables.
20598 (start_inferior): Don't use signal_pid. Update call to mywait.
20599 (attach_inferior): Update call to mywait.
20600 (handle_query): Handle qfThreadInfo and qsThreadInfo.
20601 (main): Don't fetch/store registers explicitly. Use
20602 set_desired_inferior. Support proposed ``Hs'' packet. Update
20603 calls to mywait.
20604 * server.h: Update.
20605 (struct inferior_list, struct_inferior_list_entry): New.
20606 * target.c (set_desired_inferior): New.
20607 (write_inferior_memory): Constify.
20608 (mywait): New function.
20609 * target.h: Update.
20610 (struct target_ops): New signal_pid method.
20611 (mywait): Removed macro, added prototype.
20612
20613 * linux-low.h (regset_func): Removed.
20614 (regset_fill_func, regset_store_func): New.
20615 (enum regset_type): New.
20616 (struct regset_info): Add type field. Use new operation types.
20617 (struct linux_target_ops): stop_pc renamed to get_pc.
20618 Add decr_pc_after_break and breakpoint_at.
20619 (get_process, get_thread_proess, get_process_thread)
20620 (strut process_info, all_processes, linux_attach_lwp)
20621 (thread_db_init): New.
20622
20623 * linux-arm-low.c (arm_get_pc, arm_set_pc,
20624 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
20625 (the_low_target): Add new members.
20626 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
20627 (i386_store_fpxregset): Constify.
20628 (target_regsets): Add new kind identifier.
20629 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
20630 (i386_set_pc): Add debugging.
20631 (i386_breakpoint_at): New function.
20632 (the_low_target): Add new members.
20633 * linux-mips-low.c (mips_get_pc, mips_set_pc)
20634 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
20635 (mips_breakpoint_at): New.
20636 (the_low_target): Add new members.
20637 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
20638 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
20639 (the_low_target): Add new members.
20640 * linux-sh-low.c (sh_get_pc, sh_set_pc)
20641 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
20642 (the_low_target): Add new members.
20643 * linux-x86-64-low.c (target_regsets): Add new kind
20644 identifier.
20645
20646 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
20647
20648 From Martin Pool <mbp@samba.org>:
20649 * server.c (gdbserver_usage): New function.
20650 (main): Call it.
20651
20652 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
20653
20654 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
20655 stop_at -> stop_pc.
20656
20657 2002-05-04 Andrew Cagney <ac131313@redhat.com>
20658
20659 * Makefile.in: Remove obsolete code.
20660
20661 2002-04-24 Michal Ludvig <mludvig@suse.cz>
20662
20663 * linux-low.c (regsets_fetch_inferior_registers),
20664 (regsets_store_inferior_registers): Removed cast to int from
20665 ptrace() calls.
20666 * regcache.h: Added declaration of struct inferior_info.
20667
20668 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20669
20670 * inferiors.c (struct inferior_info): Add regcache_data.
20671 (add_inferior): Call create_register_cache.
20672 (clear_inferiors): Call free_register_cache.
20673 (inferior_regcache_data, set_inferior_regcache_data): New functions.
20674 * regcache.c (struct inferior_regcache_data): New.
20675 (registers): Remove.
20676 (get_regcache): New function.
20677 (create_register_cache, free_register_cache): New functions.
20678 (set_register_cache): Don't initialize the register cache here.
20679 (registers_to_string, registers_from_string, register_data): Call
20680 get_regcache.
20681 * regcache.h: Add prototypes.
20682 * server.h: Likewise.
20683
20684 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20685
20686 * mem-break.c: New file.
20687 * mem-break.h: New file.
20688 * Makefile.in: Add mem-break.o rule; update server.h
20689 dependencies.
20690 * inferiors.c (struct inferior_info): Add target_data
20691 member.
20692 (clear_inferiors): Free target_data member if set.
20693 (inferior_target_data, set_inferior_target_data): New functions.
20694 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
20695 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
20696 * linux-low.c (linux_bp_reinsert): New variable.
20697 (struct inferior_linux_data): New.
20698 (linux_create_inferior): Use set_inferior_target_data.
20699 (linux_attach): Likewise. Call add_inferior.
20700 (linux_wait_for_one_inferior): New function.
20701 (linux_wait): Call it.
20702 (linux_write_memory): Add const.
20703 (initialize_low): Call set_breakpoint_data.
20704 * linux-low.h (struct linux_target_ops): Add breakpoint
20705 handling members.
20706 * server.c (attach_inferior): Remove extra add_inferior
20707 call.
20708 * server.h: Include mem-break.h. Update inferior.c
20709 prototypes.
20710 * target.c (read_inferior_memory)
20711 (write_inferior_memory): New functions.
20712 * target.h (read_inferior_memory)
20713 (write_inferior_memory): Change macros to prototypes.
20714 (struct target_ops): Update comments. Add const to write_memory
20715 definition.
20716
20717 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
20718
20719 * linux-low.c (usr_store_inferior_registers): Support
20720 registers which are allowed to fail to store.
20721 * linux-low.h (linux_target_ops): Likewise.
20722 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
20723 (ppc_cannot_store_register): FPSCR may not be storable.
20724
20725 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20726
20727 * server.h: Include <string.h> if HAVE_STRING_H.
20728 * ChangeLog: Correct paths in last ChangeLog entry.
20729
20730 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20731
20732 * linux-low.h: Remove obsolete prototypes.
20733 (struct linux_target_ops): New.
20734 (extern the_low_target): New.
20735 * linux-low.c (num_regs, regmap): Remove declarations.
20736 (register_addr): Use the_low_target explicitly.
20737 (fetch_register): Likewise.
20738 (usr_fetch_inferior_registers): Likewise.
20739 (usr_store_inferior_registers): Likewise.
20740 * linux-arm-low.c (num_regs): Remove.
20741 (arm_num_regs): Define.
20742 (arm_regmap): Renamed from regmap, made static.
20743 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
20744 made static.
20745 (arm_cannot_store_register): Renamed from cannot_store_register,
20746 made static.
20747 (the_low_target): New.
20748 * linux-i386-low.c (num_regs): Remove.
20749 (i386_num_regs): Define.
20750 (i386_regmap): Renamed from regmap, made static.
20751 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
20752 made static.
20753 (i386_cannot_store_register): Renamed from cannot_store_register,
20754 made static.
20755 (the_low_target): New.
20756 * linux-ia64-low.c (num_regs): Remove.
20757 (ia64_num_regs): Define.
20758 (ia64_regmap): Renamed from regmap, made static.
20759 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
20760 made static.
20761 (ia64_cannot_store_register): Renamed from cannot_store_register,
20762 made static.
20763 (the_low_target): New.
20764 * linux-m68k-low.c (num_regs): Remove.
20765 (m68k_num_regs): Define.
20766 (m68k_regmap): Renamed from regmap, made static.
20767 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
20768 made static.
20769 (m68k_cannot_store_register): Renamed from cannot_store_register,
20770 made static.
20771 (the_low_target): New.
20772 * linux-mips-low.c (num_regs): Remove.
20773 (mips_num_regs): Define.
20774 (mips_regmap): Renamed from regmap, made static.
20775 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
20776 made static.
20777 (mips_cannot_store_register): Renamed from cannot_store_register,
20778 made static.
20779 (the_low_target): New.
20780 * linux-ppc-low.c (num_regs): Remove.
20781 (ppc_num_regs): Define.
20782 (ppc_regmap): Renamed from regmap, made static.
20783 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
20784 made static.
20785 (ppc_cannot_store_register): Renamed from cannot_store_register,
20786 made static.
20787 (the_low_target): New.
20788 * linux-s390-low.c (num_regs): Remove.
20789 (s390_num_regs): Define.
20790 (s390_regmap): Renamed from regmap, made static.
20791 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
20792 made static.
20793 (s390_cannot_store_register): Renamed from cannot_store_register,
20794 made static.
20795 (the_low_target): New.
20796 * linux-sh-low.c (num_regs): Remove.
20797 (sh_num_regs): Define.
20798 (sh_regmap): Renamed from regmap, made static.
20799 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
20800 made static.
20801 (sh_cannot_store_register): Renamed from cannot_store_register,
20802 made static.
20803 (the_low_target): New.
20804 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
20805 (the_low_target): New.
20806
20807 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20808
20809 * Makefile.in: Add stamp-h target.
20810 * configure.in: Create stamp-h.
20811 * configure: Regenerated.
20812
20813 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20814
20815 * inferiors.c: New file.
20816 * target.c: New file.
20817 * target.h: New file.
20818 * Makefile.in: Add target.o and inferiors.o. Update
20819 dependencies.
20820 * linux-low.c (inferior_pid): New static variable,
20821 moved from server.c.
20822 (linux_create_inferior): Renamed from create_inferior.
20823 Call add_inferior. Return 0 on success instead of a PID.
20824 (linux_attach): Renamed from myattach.
20825 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
20826 (linux_thread_alive): Renamed from mythread_alive.
20827 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
20828 child dies.
20829 (linux_resume): Renamed from myresume. Add missing ``return 0''.
20830 (regsets_store_inferior_registers): Correct error message.
20831 Add missing ``return 0''.
20832 (linux_fetch_registers): Renamed from fetch_inferior_registers.
20833 (linux_store_registers): Renamed from store_inferior_registers.
20834 (linux_read_memory): Renamed from read_inferior_memory.
20835 (linux_write_memory): Renamed from write_inferior_memory.
20836 (linux_target_ops): New structure.
20837 (initialize_low): Call set_target_ops ().
20838 * remote-utils.c (unhexify): New function.
20839 (hexify): New function.
20840 (input_interrupt): Send signals to ``signal_pid''.
20841 * server.c (inferior_pid): Remove.
20842 (start_inferior): Update create_inferior call.
20843 (attach_inferior): Call add_inferior.
20844 (handle_query): New function.
20845 (main): Call handle_query for `q' packets.
20846 * server.h: Include "target.h". Remove obsolete prototypes.
20847 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
20848
20849 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20850
20851 * Makefile.in: Add WARN_CFLAGS. Update configury
20852 dependencies.
20853 * configure.in: Check for <string.h>
20854 * configure: Regenerate.
20855 * config.in: Regenerate.
20856 * gdbreplay.c: Include needed system headers.
20857 (remote_open): Remove strchr prototype.
20858 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
20859 * regcache.c (supply_register): Change buf argument to const void *.
20860 (supply_register_by_name): Likewise.
20861 (collect_register): Change buf argument to void *.
20862 (collect_register_by_name): Likewise.
20863 * regcache.h: Add missing prototypes.
20864 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
20865 * server.c (handle_query): New function.
20866 (attached): New static variable, moved out of main.
20867 (main): Quiet longjmp clobber warnings.
20868 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
20869 * utils.c (error): Remove NORETURN.
20870 (fatal): Likewise.
This page took 0.679861 seconds and 3 git commands to generate.