gdbserver/linux-low: turn 'breakpoint_kind_from_{pc, current_state}' into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Remove the 'breakpoint_kind_from_pc' and
4 'breakpoint_kind_from_current_state' linux target ops, and let the
5 concrete linux target define them by overriding the ops of
6 process_stratum_target.
7
8 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
9 Remove.
10 (linux_process_target::breakpoint_kind_from_current_state): Remove.
11 * linux-low.h (struct linux_target_ops): Remove ops.
12 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
13 <breakpoint_kind_from_current_state>: Remove.
14 * linux-x86-low.cc (the_low_target): Remove the op fields.
15 * linux-bfin-low.cc (the_low_target): Ditto.
16 * linux-cris-low.cc (the_low_target): Ditto.
17 * linux-crisv32-low.cc (the_low_target): Ditto.
18 * linux-m32r-low.cc (the_low_target): Ditto.
19 * linux-m68k-low.cc (the_low_target): Ditto.
20 * linux-mips-low.cc (the_low_target): Ditto.
21 * linux-nios2-low.cc (the_low_target): Ditto.
22 * linux-ppc-low.cc (the_low_target): Ditto.
23 * linux-s390-low.cc (the_low_target): Ditto.
24 * linux-sh-low.cc (the_low_target): Ditto.
25 * linux-sparc-low.cc (the_low_target): Ditto.
26 * linux-tic6x-low.cc (the_low_target): Ditto.
27 * linux-tile-low.cc (the_low_target): Ditto.
28 * linux-xtensa-low.cc (the_low_target): Ditto.
29 * linux-aarch64-low.cc (class aarch64_target)
30 <breakpoint_kind_from_pc>
31 <breakpoint_kind_from_current_state>: Declare.
32 (aarch64_breakpoint_kind_from_pc): Turn into...
33 (aarch64_target::breakpoint_kind_from_pc): ...this.
34 (aarch64_breakpoint_kind_from_current_state): Turn into...
35 (aarch64_target::breakpoint_kind_from_current_state): ...this.
36 (the_low_target): Remove the op fields.
37 * linux-arm-low.cc (class arm_target):
38 <breakpoint_kind_from_pc>
39 <breakpoint_kind_from_current_state>: Declare.
40 (arm_target::breakpoint_kind_from_pc): Define.
41 (arm_target::breakpoint_kind_from_current_state): Define.
42 (the_low_target): Remove the op fields.
43 * linux-riscv-low.cc (class riscv_target):
44 <breakpoint_kind_from_pc>: Declare.
45 (riscv_breakpoint_kind_from_pc): Turn into...
46 (riscv_target::breakpoint_kind_from_pc): ...this.
47 (the_low_target): Remove the op fields.
48
49 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
50
51 Turn the 'get_pc' and 'set_pc' linux target ops into methods
52 of linux_process_target.
53
54 * linux-low.h (struct linux_target_ops): Remove the ops.
55 (class linux_process_target) <low_supports_breakpoints>
56 <low_get_pc>
57 <low_set_pc>: Declare.
58 * linux-low.cc (supports_breakpoints): Turn into...
59 (linux_process_target::low_supports_breakpoints): ...this.
60 (linux_process_target::low_get_pc): Define.
61 (linux_process_target::low_set_pc): Define.
62
63 Update the callers below.
64
65 (linux_process_target::get_pc)
66 (linux_process_target::save_stop_reason)
67 (linux_process_target::maybe_move_out_of_jump_pad)
68 (linux_process_target::wait_1)
69 (linux_process_target::resume_one_lwp_throw)
70 (linux_process_target::resume)
71 (linux_process_target::proceed_all_lwps)
72 (linux_process_target::read_pc)
73 (linux_process_target::write_pc)
74
75 * linux-x86-low.cc (class linux_process_target)
76 <low_supports_breakpoints>
77 <low_get_pc>
78 <low_set_pc>: Declare.
79 (x86_target::low_supports_breakpoints): Define.
80 (x86_get_pc): Turn into...
81 (x86_target::low_get_pc): ...this.
82 (x86_set_pc): Turn into...
83 (x86_target::low_set_pc): ...this.
84 (the_low_target): Remove the op fields.
85 * linux-arm-low.cc (class arm_target)
86 <low_supports_breakpoints>
87 <low_get_pc>
88 <low_set_pc>: Declare.
89 (arm_target::low_supports_breakpoints)
90 (arm_target::low_get_pc)
91 (arm_target::low_set_pc): Define.
92 (the_low_target): Remove the op fields.
93 * linux-bfin-low.cc (class bfin_target)
94 <low_supports_breakpoints>
95 <low_get_pc>
96 <low_set_pc>: Declare.
97 (bfin_target::low_supports_breakpoints)
98 (bfin_target::low_get_pc)
99 (bfin_target::low_set_pc): Define.
100 (the_low_target): Remove the op fields.
101 * linux-cris-low.cc (class cris_target)
102 <low_supports_breakpoints>
103 <low_get_pc>
104 <low_set_pc>: Declare.
105 (cris_target::low_supports_breakpoints)
106 (cris_target::low_get_pc)
107 (cris_target::low_set_pc): Define.
108 (the_low_target): Remove the op fields.
109 * linux-crisv32-low.cc (class crisv32_target)
110 <low_supports_breakpoints>
111 <low_get_pc>
112 <low_set_pc>: Declare.
113 (crisv32_target::low_supports_breakpoints)
114 (crisv32_target::low_get_pc)
115 (crisv32_target::low_set_pc): Define.
116 (the_low_target): Remove the op fields.
117 * linux-m32r-low.cc (class m32r_target)
118 <low_supports_breakpoints>
119 <low_get_pc>
120 <low_set_pc>: Declare.
121 (m32r_target::low_supports_breakpoints)
122 (m32r_target::low_get_pc)
123 (m32r_target::low_set_pc): Define.
124 (the_low_target): Remove the op fields.
125 * linux-m68k-low.cc (class m68k_target)
126 <low_supports_breakpoints>
127 <low_get_pc>
128 <low_set_pc>: Declare.
129 (m68k_target::low_supports_breakpoints)
130 (m68k_target::low_get_pc)
131 (m68k_target::low_set_pc): Define.
132 (the_low_target): Remove the op fields.
133 * linux-nios2-low.cc (class nios2_target)
134 <low_supports_breakpoints>
135 <low_get_pc>
136 <low_set_pc>: Declare.
137 (nios2_target::low_supports_breakpoints)
138 (nios2_target::low_get_pc)
139 (nios2_target::low_set_pc): Define.
140 (the_low_target): Remove the op fields.
141 * linux-sh-low.cc (class sh_target)
142 <low_supports_breakpoints>
143 <low_get_pc>
144 <low_set_pc>: Declare.
145 (sh_target::low_supports_breakpoints)
146 (sh_target::low_get_pc)
147 (sh_target::low_set_pc): Define.
148 (the_low_target): Remove the op fields.
149 * linux-xtensa-low.cc (class xtensa_target)
150 <low_supports_breakpoints>
151 <low_get_pc>
152 <low_set_pc>: Declare.
153 (xtensa_target::low_supports_breakpoints)
154 (xtensa_target::low_get_pc)
155 (xtensa_target::low_set_pc): Define.
156 (the_low_target): Remove the op fields.
157 * linux-sparc-low.cc (class sparc_target)
158 <low_supports_breakpoints>
159 <low_get_pc>: Declare.
160 (sparc_target::low_supports_breakpoints)
161 (sparc_target::low_get_pc): Define.
162 (the_low_target): Remove the op fields.
163 * linux-tile-low.cc (class tile_target)
164 <low_supports_breakpoints>
165 <low_get_pc>
166 <low_set_pc>: Declare.
167 (tile_target::low_supports_breakpoints)
168 (tile_target::low_get_pc)
169 (tile_target::low_set_pc): Define.
170 (the_low_target): Remove the op fields.
171 * linux-aarch64-low.cc (class aarch64_target)
172 <low_supports_breakpoints>
173 <low_get_pc>
174 <low_set_pc>: Declare.
175 (aarch64_target::low_supports_breakpoints): Define.
176 (aarch64_get_pc): Turn into...
177 (aarch64_target::low_get_pc): ...this.
178 (aarch64_set_pc): Turn into...
179 (aarch64_target::low_set_pc): ...this.
180 (the_low_target): Remove the op fields.
181 * linux-mips-low.cc (class mips_target)
182 <low_supports_breakpoints>
183 <low_get_pc>
184 <low_set_pc>: Declare.
185 (mips_target::low_supports_breakpoints): Define.
186 (mips_get_pc): Turn into...
187 (mips_target::low_get_pc): ...this.
188 (mips_set_pc): Turn into...
189 (mips_target::low_set_pc): ...this.
190 (the_low_target): Remove the op fields.
191 * linux-ppc-low.cc (class ppc_target)
192 <low_supports_breakpoints>
193 <low_get_pc>
194 <low_set_pc>: Declare.
195 (ppc_target::low_supports_breakpoints): Define.
196 (ppc_get_pc): Turn into...
197 (ppc_target::low_get_pc): ...this.
198 (ppc_set_pc): Turn into...
199 (ppc_target::low_set_pc): ...this.
200 (the_low_target): Remove the op fields.
201 * linux-riscv-low.cc (class riscv_target)
202 <low_supports_breakpoints>
203 <low_get_pc>
204 <low_set_pc>: Declare.
205 (riscv_target::low_supports_breakpoints): Define.
206 (riscv_get_pc): Turn into...
207 (riscv_target::low_get_pc): ...this.
208 (riscv_set_pc): Turn into...
209 (riscv_target::low_set_pc): ...this.
210 (the_low_target): Remove the op fields.
211 * linux-s390-low.cc (class s390_target)
212 <low_supports_breakpoints>
213 <low_get_pc>
214 <low_set_pc>: Declare.
215 (s390_target::low_supports_breakpoints): Define.
216 (s390_get_pc): Turn into...
217 (s390_target::low_get_pc): ...this.
218 (s390_set_pc): Turn into...
219 (s390_target::low_set_pc): ...this.
220 (the_low_target): Remove the op fields.
221 * linux-tic6x-low.cc (class tic6x_target)
222 <low_supports_breakpoints>
223 <low_get_pc>
224 <low_set_pc>: Declare.
225 (tic6x_target::low_supports_breakpoints): Define.
226 (tic6x_get_pc): Turn into...
227 (tic6x_target::low_get_pc): ...this.
228 (tic6x_set_pc): Turn into...
229 (tic6x_target::low_set_pc): ...this.
230 (the_low_target): Remove the op fields.
231
232 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
233
234 Turn some more static methods in linux-low into private methods
235 of linux_process_target.
236
237 * linux-low.cc (get_pc): Turn into...
238 (linux_process_target::get_pc): ...this.
239 (save_stop_reason): Turn into...
240 (linux_process_target::save_stop_reason): ...this.
241 (thread_still_has_status_pending_p): Turn into...
242 (linux_process_target::thread_still_has_status_pending): ...this.
243 (status_pending_p_callback): Turn into...
244 (linux_process_target::status_pending_p_callback): ...this.
245 (resume_stopped_resumed_lwps): Turn into...
246 (linux_process_target::resume_stopped_resumed_lwps): ...this.
247 (install_software_single_step_breakpoints): Turn into...
248 (linux_process_target::install_software_single_step_breakpoints):
249 ...this.
250 (single_step): Turn into...
251 (linux_process_target::single_step): ...this.
252 (linux_resume_one_lwp_throw): Turn into...
253 (linux_process_target::resume_one_lwp_throw): ...this.
254 (linux_resume_one_lwp): Turn into...
255 (linux_process_target::resume_one_lwp): ...this.
256 (resume_status_pending_p): Turn into...
257 (linux_process_target::resume_status_pending): ...this.
258 (need_step_over_p): Turn into...
259 (linux_process_target::thread_needs_step_over): ...this.
260 (linux_resume_one_thread): Turn into...
261 (linux_process_target::resume_one_thread): ...this.
262 (proceed_one_lwp): Turn into...
263 (linux_process_target::proceed_one_lwp): ...this.
264 (unsuspend_and_proceed_one_lwp): Turn into...
265 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
266
267 Update the calls/references to the above functions below.
268
269 (linux_process_target::handle_extended_wait)
270 (linux_process_target::filter_event)
271 (linux_process_target::wait_for_event_filtered)
272 (linux_process_target::wait_1)
273 (linux_process_target::move_out_of_jump_pad)
274 (linux_process_target::start_step_over)
275 (linux_process_target::resume)
276 (linux_process_target::proceed_all_lwps)
277 (regsets_store_inferior_registers)
278 (linux_process_target::store_register)
279
280 * linux-low.h (class linux_process_target)
281 <get_pc>
282 <save_stop_reason>
283 <thread_still_has_status_pending>
284 <status_pending_p_callback>
285 <resume_stopped_resumed_lwps>
286 <install_software_single_step_breakpoints>
287 <single_step>
288 <resume_one_lwp_throw>
289 <resume_one_lwp>
290 <resume_status_pending>
291 <thread_needs_step_over>
292 <resume_one_thread>
293 <proceed_one_lwp>
294 <unsuspend_and_proceed_one_lwp>: Declare.
295
296 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
297
298 Turn the 'fetch_register' linux target op into a method of
299 linux_process_target.
300
301 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
302 (class linux_process_target) <low_fetch_register>: Declare.
303 * linux-x86-low.cc (the_low_target)
304 * linux-aarch64-low.cc (the_low_target)
305 * linux-arm-low.cc (the_low_target)
306 * linux-bfin-low.cc (the_low_target)
307 * linux-cris-low.cc (the_low_target)
308 * linux-crisv32-low.cc (the_low_target)
309 * linux-m32r-low.cc (the_low_target)
310 * linux-m68k-low.cc (the_low_target)
311 * linux-nios2-low.cc (the_low_target)
312 * linux-ppc-low.cc (the_low_target)
313 * linux-s390-low.cc (the_low_target)
314 * linux-sh-low.cc (the_low_target)
315 * linux-sparc-low.cc (the_low_target)
316 * linux-tic6x-low.cc (the_low_target)
317 * linux-tile-low.cc (the_low_target)
318 * linux-xtensa-low.cc (the_low_target): Remove the op field.
319 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
320 Declare.
321 (ia64_fetch_register): Turn into...
322 (ia64_target::low_fetch_register): ...this.
323 (the_low_target): Remove the op field.
324 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
325 Declare.
326 (mips_fetch_register): Turn into...
327 (mips_target::low_fetch_register): ...this.
328 (the_low_target): Remove the op field.
329 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
330 Declare.
331 (riscv_fetch_register): Turn into...
332 (riscv_target::low_fetch_register): ...this.
333 (the_low_target): Remove the op field.
334
335 Update the callers below.
336
337 * linux-low.cc (linux_process_target::fetch_registers)
338 (linux_process_target::low_fetch_register)
339
340 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
341
342 Turn the 'cannot_fetch_register' and 'cannot_store_register'
343 linux target ops into methods of linux_process_target.
344
345 * linux-low.h (struct linux_target_ops): Remove the low target ops.
346 (class linux_process_target) <fetch_register>
347 <store_register>
348 <usr_fetch_inferior_registers>
349 <usr_store_inferior_registers>
350 <low_cannot_fetch_register>
351 <low_cannot_fetch_register> Declare.
352 * linux-low.cc (fetch_register): Turn into...
353 (linux_process_target::fetch_register): ...this.
354 (store_register): Turn into ...
355 (linux_process_target::store_register): ...this.
356 (usr_fetch_inferior_registers): Turn into...
357 (linux_process_target::usr_fetch_inferior_registers): ...this.
358 (usr_store_inferior_registers): Turn into...
359 (linux_process_target::usr_store_inferior_registers): ...this.
360 * linux-x86-low.cc (class x86_target)
361 <low_cannot_fetch_register>
362 <low_cannot_store_register>: Declare.
363 (x86_cannot_store_register): Turn into...
364 (x86_target::low_cannot_store_register): ...this.
365 (x86_cannot_fetch_register): Turn into...
366 (x86_target::low_cannot_fetch_register): ...this.
367 (the_low_target): Remove the target op fields.
368 * linux-aarch64-low.cc (class aarch64_target)
369 <low_cannot_fetch_register>
370 <low_cannot_store_register>: Declare.
371 (aarch64_target::low_cannot_fetch_register)
372 (aarch64_target::low_cannot_store_register): Define.
373 (the_low_target): Remove the op fields.
374 * linux-arm-low.cc (class arm_target)
375 <low_cannot_fetch_register>
376 <low_cannot_store_register>: Declare.
377 (arm_cannot_fetch_register): Turn into...
378 (arm_target::low_cannot_fetch_register): ...this.
379 (arm_cannot_store_register): Turn into...
380 (arm_target::low_cannot_store_register): ...this.
381 (the_low_target): Remove the op fields.
382 * linux-bfin-low.cc (class bfin_target)
383 <low_cannot_fetch_register>
384 <low_cannot_store_register>: Declare.
385 (bfin_cannot_fetch_register): Turn into...
386 (bfin_target::low_cannot_fetch_register): ...this.
387 (bfin_cannot_store_register): Turn into...
388 (bfin_target::low_cannot_store_register): ...this.
389 (the_low_target): Remove the op fields.
390 * linux-cris-low.cc (class cris_target)
391 <low_cannot_fetch_register>
392 <low_cannot_store_register>: Declare.
393 (cris_cannot_fetch_register): Turn into...
394 (cris_target::low_cannot_fetch_register): ...this.
395 (cris_cannot_store_register): Turn into...
396 (cris_target::low_cannot_store_register): ...this.
397 (the_low_target): Remove the op fields.
398 * linux-crisv32-low.cc (class crisv32_target)
399 <low_cannot_fetch_register>
400 <low_cannot_store_register>: Declare.
401 (crisv32_target::low_cannot_fetch_register)
402 (crisv32_target::low_cannot_store_register): Define.
403 (the_low_target): Remove the op fields.
404 * linux-ia64-low.cc (class ia64_target)
405 <low_cannot_fetch_register>
406 <low_cannot_store_register>: Declare.
407 (ia64_cannot_fetch_register): Turn into...
408 (ia64_target::low_cannot_fetch_register): ...this.
409 (ia64_cannot_store_register): Turn into...
410 (ia64_target::low_cannot_store_register): ...this.
411 (the_low_target): Remove the op fields.
412 * linux-m32r-low.cc (class m32r_target)
413 <low_cannot_fetch_register>
414 <low_cannot_store_register>: Declare.
415 (m32r_cannot_fetch_register): Turn into...
416 (m32r_target::low_cannot_fetch_register): ...this.
417 (m32r_cannot_store_register): Turn into...
418 (m32r_target::low_cannot_store_register): ...this.
419 (the_low_target): Remove the op fields.
420 * linux-m68k-low.cc (class m68k_target)
421 <low_cannot_fetch_register>
422 <low_cannot_store_register>: Declare.
423 (m68k_cannot_fetch_register): Turn into...
424 (m68k_target::low_cannot_fetch_register): ...this.
425 (m68k_cannot_store_register): Turn into...
426 (m68k_target::low_cannot_store_register): ...this.
427 (the_low_target): Remove the op fields.
428 * linux-mips-low.cc (class mips_target)
429 <low_cannot_fetch_register>
430 <low_cannot_store_register>: Declare.
431 (mips_cannot_fetch_register): Turn into...
432 (mips_target::low_cannot_fetch_register): ...this.
433 (mips_cannot_store_register): Turn into...
434 (mips_target::low_cannot_store_register): ...this.
435 (get_usrregs_info): Inline at the call sites in
436 low_cannot_fetch_register and low_cannot_store_register,
437 and remove.
438 (the_low_target): Remove the op fields.
439 * linux-nios2-low.cc (class nios2_target)
440 <low_cannot_fetch_register>
441 <low_cannot_store_register>: Declare.
442 (nios2_cannot_fetch_register): Turn into...
443 (nios2_target::low_cannot_fetch_register): ...this.
444 (nios2_cannot_store_register): Turn into...
445 (nios2_target::low_cannot_store_register): ...this.
446 (the_low_target): Remove the op fields.
447 * linux-ppc-low.cc (class ppc_target)
448 <low_cannot_fetch_register>
449 <low_cannot_store_register>: Declare.
450 (ppc_cannot_fetch_register): Turn into...
451 (ppc_target::low_cannot_fetch_register): ...this.
452 (ppc_cannot_store_register): Turn into...
453 (ppc_target::low_cannot_store_register): ...this.
454 (the_low_target): Remove the op fields.
455 * linux-riscv-low.cc (class riscv_target)
456 <low_cannot_fetch_register>
457 <low_cannot_store_register>: Declare.
458 (riscv_target::low_cannot_fetch_register)
459 (riscv_target::low_cannot_store_register): Define.
460 (the_low_target): Remove the op fields.
461 * linux-s390-low.cc (class s390_target)
462 <low_cannot_fetch_register>
463 <low_cannot_store_register>: Declare.
464 (s390_cannot_fetch_register): Turn into...
465 (s390_target::low_cannot_fetch_register): ...this.
466 (s390_cannot_store_register): Turn into...
467 (s390_target::low_cannot_store_register): ...this.
468 (the_low_target): Remove the op fields.
469 * linux-sh-low.cc (class sh_target)
470 <low_cannot_fetch_register>
471 <low_cannot_store_register>: Declare.
472 (sh_cannot_fetch_register): Turn into...
473 (sh_target::low_cannot_fetch_register): ...this.
474 (sh_cannot_store_register): Turn into...
475 (sh_target::low_cannot_store_register): ...this.
476 (the_low_target): Remove the op fields.
477 * linux-sparc-low.cc (class sparc_target)
478 <low_cannot_fetch_register>
479 <low_cannot_store_register>: Declare.
480 (sparc_cannot_fetch_register): Turn into...
481 (sparc_target::low_cannot_fetch_register): ...this.
482 (sparc_cannot_store_register): Turn into...
483 (sparc_target::low_cannot_store_register): ...this.
484 (the_low_target): Remove the op fields.
485 * linux-tic6x-low.cc (class tic6x_target)
486 <low_cannot_fetch_register>
487 <low_cannot_store_register>: Declare.
488 (tic6x_cannot_fetch_register): Turn into...
489 (tic6x_target::low_cannot_fetch_register): ...this.
490 (tic6x_cannot_store_register): Turn into...
491 (tic6x_target::low_cannot_store_register): ...this.
492 (the_low_target): Remove the op fields.
493 * linux-tile-low.cc (class tile_target)
494 <low_cannot_fetch_register>
495 <low_cannot_store_register>: Declare.
496 (tile_cannot_fetch_register): Turn into...
497 (tile_target::low_cannot_fetch_register): ...this.
498 (tile_cannot_store_register): Turn into...
499 (tile_target::low_cannot_store_register): ...this.
500 (the_low_target): Remove the op fields.
501 * linux-xtensa-low.cc (class xtensa_target)
502 <low_cannot_fetch_register>
503 <low_cannot_store_register>: Declare.
504 (xtensa_target::low_cannot_fetch_register)
505 (xtensa_target::low_cannot_store_register): Define.
506 (the_low_target): Remove the op fields.
507
508 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
509
510 Turn the 'regs_info' linux target op into a method of
511 linux_process_target.
512
513 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
514 (class linux_process_target) <get_regs_info>: Define.
515
516 Update the callers below.
517
518 * linux-low.cc (linux_process_target::fetch_registers)
519 (linux_process_target::store_registers)
520 * proc-service.cc (gregset_info)
521
522 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
523 (x86_linux_regs_info): Turn into ...
524 (x86_target::get_regs_info): ...this.
525 (the_low_target): Remove the op field.
526 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
527 Declare.
528 (aarch64_regs_info): Turn into ...
529 (aarch64_target::get_regs_info): ...this.
530 (the_low_target): Remove the op field.
531 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
532 (arm_regs_info): Turn into ...
533 (arm_target::get_regs_info): ...this.
534 (the_low_target): Remove the op field.
535 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
536 (bfin_regs_info): Turn into ...
537 (bfin_target::get_regs_info): ...this.
538 (the_low_target): Remove the op field.
539 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
540 (cris_regs_info): Turn into ...
541 (cris_target::get_regs_info): ...this.
542 (the_low_target): Remove the op field.
543 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
544 Declare.
545 (crisv32_regs_info): Turn into ...
546 (crisv32_target::get_regs_info): ...this.
547 (the_low_target): Remove the op field.
548 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
549 (ia64_regs_info): Turn into ...
550 (ia64_target::get_regs_info): ...this.
551 (the_low_target): Remove the op field.
552 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
553 (m32r_regs_info): Turn into ...
554 (m32r_target::get_regs_info): ...this.
555 (the_low_target): Remove the op field.
556 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
557 (m68k_regs_info): Turn into ...
558 (m68k_target::get_regs_info): ...this.
559 (the_low_target): Remove the op field.
560 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
561 (mips_regs_info): Turn into ...
562 (mips_target::get_regs_info): ...this.
563 (the_low_target): Remove the op field.
564 (get_usrregs_info): Update the call to the op.
565 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
566 (nios2_regs_info): Turn into ...
567 (nios2_target::get_regs_info): ...this.
568 (the_low_target): Remove the op field.
569 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
570 (ppc_regs_info): Turn into ...
571 (ppc_target::get_regs_info): ...this.
572 (the_low_target): Remove the op field.
573 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
574 (riscv_regs_info): Turn into ...
575 (riscv_target::get_regs_info): ...this.
576 (the_low_target): Remove the op field.
577 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
578 (s390_regs_info): Turn into ...
579 (s390_target::get_regs_info): ...this.
580 (the_low_target): Remove the op field.
581 (s390_collect_ptrace_register)
582 (s390_supply_ptrace_register)
583 (s390_fill_gregset): Update the call to the op.
584 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
585 (sh_regs_info): Turn into ...
586 (sh_target::get_regs_info): ...this.
587 (the_low_target): Remove the op field.
588 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
589 (sparc_regs_info): Turn into ...
590 (sparc_target::get_regs_info): ...this.
591 (the_low_target): Remove the op field.
592 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
593 (tic6x_regs_info): Turn into ...
594 (tic6x_target::get_regs_info): ...this.
595 (the_low_target): Remove the op field.
596 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
597 (tile_regs_info): Turn into ...
598 (tile_target::get_regs_info): ...this.
599 (the_low_target): Remove the op field.
600 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
601 Declare.
602 (xtensa_regs_info): Turn into ...
603 (xtensa_target::get_regs_info): ...this.
604 (the_low_target): Remove the op field.
605
606 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
607
608 Turn the 'arch_setup' linux target op into a method of
609 linux_process_target.
610
611 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
612 (class linux_process_target) <arch_setup_thread>
613 <low_arch_setup>: New declarations.
614 * linux-low.cc (linux_arch_setup): Delete.
615 (linux_arch_setup_thread): Turn into...
616 (linux_process_target::arch_setup_thread): ... this.
617
618 Update the callers below.
619
620 (linux_process_target::handle_extended_wait)
621 (linux_process_target::post_create_inferior)
622 (linux_process_target::filter_event)
623
624 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
625 declaration.
626 (x86_linux_update_xmltarget): Turn into...
627 (x86_target::update_xmltarget): ...this.
628 (x86_linux_process_qsupported): Update the call to
629 x86_linux_update_xmltarget.
630 (x86_arch_setup): Turn into ...
631 (x86_target::low_arch_setup): ...this.
632 (the_low_target): Remove the op field.
633 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
634 declaration.
635 (aarch64_arch_setup): Turn into ...
636 (aarch64_target::low_arch_setup): ...this.
637 (the_low_target): Remove the op field.
638 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
639 declaration.
640 (arm_arch_setup): Turn into ...
641 (arm_target::low_arch_setup): ...this.
642 (the_low_target): Remove the op field.
643 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
644 declaration.
645 (bfin_arch_setup): Turn into ...
646 (bfin_target::low_arch_setup): ...this.
647 (the_low_target): Remove the op field.
648 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
649 declaration.
650 (cris_arch_setup): Turn into ...
651 (cris_target::low_arch_setup): ...this.
652 (the_low_target): Remove the op field.
653 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
654 declaration.
655 (crisv32_arch_setup): Turn into ...
656 (crisv32_target::low_arch_setup): ...this.
657 (the_low_target): Remove the op field.
658 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
659 declaration.
660 (ia64_arch_setup): Turn into ...
661 (ia64_target::low_arch_setup): ...this.
662 (the_low_target): Remove the op field.
663 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
664 declaration.
665 (m32r_arch_setup): Turn into ...
666 (m32r_target::low_arch_setup): ...this.
667 (the_low_target): Remove the op field.
668 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
669 declaration.
670 (m68k_arch_setup): Turn into ...
671 (m68k_target::low_arch_setup): ...this.
672 (the_low_target): Remove the op field.
673 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
674 declaration.
675 (mips_arch_setup): Turn into ...
676 (mips_target::low_arch_setup): ...this.
677 (the_low_target): Remove the op field.
678 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
679 declaration.
680 (nios2_arch_setup): Turn into ...
681 (nios2_target::low_arch_setup): ...this.
682 (the_low_target): Remove the op field.
683 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
684 declaration.
685 (ppc_arch_setup): Turn into ...
686 (ppc_target::low_arch_setup): ...this.
687 (the_low_target): Remove the op field.
688 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
689 declaration.
690 (riscv_arch_setup): Turn into ...
691 (riscv_target::low_arch_setup): ...this.
692 (the_low_target): Remove the op field.
693 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
694 declaration.
695 (s390_arch_setup): Turn into ...
696 (s390_target::low_arch_setup): ...this.
697 (the_low_target): Remove the op field.
698 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
699 declaration.
700 (sh_arch_setup): Turn into ...
701 (sh_target::low_arch_setup): ...this.
702 (the_low_target): Remove the op field.
703 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
704 declaration.
705 (sparc_arch_setup): Turn into ...
706 (sparc_target::low_arch_setup): ...this.
707 (the_low_target): Remove the op field.
708 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
709 declaration.
710 (tic6x_arch_setup): Turn into ...
711 (tic6x_target::low_arch_setup): ...this.
712 (the_low_target): Remove the op field.
713 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
714 declaration.
715 (tile_arch_setup): Turn into ...
716 (tile_target::low_arch_setup): ...this.
717 (the_low_target): Remove the op field.
718 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
719 declaration.
720 (xtensa_arch_setup): Turn into ...
721 (xtensa_target::low_arch_setup): ...this.
722 (the_low_target): Remove the op field.
723
724 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
725
726 * linux-low.h (the_linux_target): New extern declaration.
727 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
728 'the_target'.
729 (the_linux_target): Remove.
730 * linux-x86-low.cc (class x86_target): New class.
731 (the_x86_target): New static object.
732 (the_linux_target): Define as pointer to the_x86_target.
733 * linux-aarch64-low.cc (class aarch64_target): New class.
734 (the_aarch64_target): New static object.
735 (the_linux_target): Define as pointer to the_aarch64_target.
736 * linux-arm-low.cc (class arm_target): New class.
737 (the_arm_target): New static object.
738 (the_linux_target): Define as pointer to the_arm_target.
739 * linux-bfin-low.cc (class bfin_target): New class.
740 (the_bfin_target): New static object.
741 (the_linux_target): Define as pointer to the_bfin_target.
742 * linux-cris-low.cc (class cris_target): New class.
743 (the_cris_target): New static object.
744 (the_linux_target): Define as pointer to the_cris_target.
745 * linux-crisv32-low.cc (class crisv32_target): New class.
746 (the_crisv32_target): New static object.
747 (the_linux_target): Define as pointer to the_crisv32_target.
748 * linux-ia64-low.cc (class ia64_target): New class.
749 (the_ia64_target): New static object.
750 (the_linux_target): Define as pointer to the_ia64_target.
751 * linux-m32r-low.cc (class m32r_target): New class.
752 (the_m32r_target): New static object.
753 (the_linux_target): Define as pointer to the_m32r_target.
754 * linux-m68k-low.cc (class m68k_target): New class.
755 (the_m68k_target): New static object.
756 (the_linux_target): Define as pointer to the_m68k_target.
757 * linux-mips-low.cc (class mips_target): New class.
758 (the_mips_target): New static object.
759 (the_linux_target): Define as pointer to the_mips_target.
760 * linux-nios2-low.cc (class nios2_target): New class.
761 (the_nios2_target): New static object.
762 (the_linux_target): Define as pointer to the_nios2_target.
763 * linux-ppc-low.cc (class ppc_target): New class.
764 (the_ppc_target): New static object.
765 (the_linux_target): Define as pointer to the_ppc_target.
766 * linux-riscv-low.cc (class riscv_target): New class.
767 (the_riscv_target): New static object.
768 (the_linux_target): Define as pointer to the_riscv_target.
769 * linux-s390-low.cc (class s390_target): New class.
770 (the_s390_target): New static object.
771 (the_linux_target): Define as pointer to the_s390_target.
772 * linux-sh-low.cc (class sh_target): New class.
773 (the_sh_target): New static object.
774 (the_linux_target): Define as pointer to the_sh_target.
775 * linux-sparc-low.cc (class sparc_target): New class.
776 (the_sparc_target): New static object.
777 (the_linux_target): Define as pointer to the_sparc_target.
778 * linux-tic6x-low.cc (class tic6x_target): New class.
779 (the_tic6x_target): New static object.
780 (the_linux_target): Define as pointer to the_tic6x_target.
781 * linux-tile-low.cc (class tile_target): New class.
782 (the_tile_target): New static object.
783 (the_linux_target): Define as pointer to the_tile_target.
784 * linux-xtensa-low.cc (class xtensa_target): New class.
785 (the_xtensa_target): New static object.
786 (the_linux_target): Define as pointer to the_xtensa_target.
787
788 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
789
790 Turn some static functions in linux-low.cc into private methods of
791 linux_process_target.
792
793 * linux-low.cc (handle_extended_wait): Turn into ...
794 (linux_process_target::handle_extended_wait): ...this. Call
795 'mourn' on 'this' object instead of 'the_target'.
796 (maybe_move_out_of_jump_pad): Turn into...
797 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
798 (linux_low_filter_event): Turn into...
799 (linux_process_target::filter_event): ...this.
800 (linux_wait_for_event_filtered): Turn into...
801 (linux_process_target::wait_for_event_filtered): ...this.
802 (linux_wait_for_event): Turn into...
803 (linux_process_target::wait_for_event): ...this.
804 (linux_wait_1): Turn into...
805 (linux_process_target::wait_1): ...this.
806 (wait_for_sigstop): Turn into...
807 (linux_process_target::wait_for_sigstop): ...this.
808 (move_out_of_jump_pad_callback): Turn into...
809 (linux_process_target::move_out_of_jump_pad): ...this.
810 (stop_all_lwps): Turn into...
811 (linux_process_target::stop_all_lwps): ...this.
812 (start_step_over): Turn into...
813 (linux_process_target::start_step_over): ...this.
814 (complete_ongoing_step_over): Turn into...
815 (linux_process_target::complete_ongoing_step_over): ...this.
816 (proceed_all_lwps): Turn into...
817 (linux_process_target::proceed_all_lwps): ...this.
818 (unstop_all_lwps): Turn into...
819 (linux_process_target::unstop_all_lwps): ...this.
820
821 * linux-low.h (class linux_process_target)
822 <handle_extended_wait>
823 <maybe_move_out_of_jump_pad>
824 filter_event>
825 <wait_for_event_filtered>
826 <wait_for_event>
827 <wait_1>
828 <wait_for_sigstop>
829 <move_out_of_jump_pad>
830 <stop_all_lwps>
831 <start_step_over>
832 <complete_ongoing_step_over>
833 <proceed_all_lwps>
834 <unstop_all_lwps>: Declare.
835
836 Update the callers below.
837
838 * linux-low.cc (linux_process_target::attach): Update.
839 (linux_process_target::stabilize_threads): Ditto.
840 (linux_process_target::wait): Ditto.
841
842 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
843
844 * linux-low.h (struct linux_target_ops): Update the comment for
845 'cannot_store_register' to return 0 or 1.
846 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
847 of 2.
848
849 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
850
851 * config.in: Re-generate.
852 * configure: Re-generate.
853
854 2020-03-17 Kamil Rytarowski <n54@gmx.com>
855
856 * regcache.cc (find_register_by_number): Update.
857 * tdesc.cc (init_target_desc): Likewise.
858 * tdesc.h (target_desc::reg_defs): Likewise.
859
860 2020-03-12 Tom Tromey <tom@tromey.com>
861
862 * configure: Rebuild.
863 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
864 (WIN32APILIBS): New subst.
865 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
866 gdbsupport files.
867 (gdbsupport/%.o): Remove target.
868 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
869 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
870 (WIN32APILIBS): New variable.
871 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
872 (gdbreplay$(EXEEXT)): Likewise.
873
874 2020-03-12 Tom Tromey <tom@tromey.com>
875
876 * config.in, configure: Rebuild.
877 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
878 * acinclude.m4: Include gettext-sister.m4.
879 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
880 variables.
881 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
882 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
883
884 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
885
886 * acinclude.m4: Update path to selftest.m4.
887
888 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
889
890 * configure.ac: Don't source bfd/development.sh, move
891 GDB_AC_COMMON higher.
892 * configure: Re-generate.
893
894 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
895
896 * configure: Re-generate.
897
898 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
899
900 * configure: Re-generate.
901
902 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
903
904 * .dir-locals.el: New file.
905
906 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
907
908 * .gitattributes: New file.
909
910 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
911
912 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
913 reply into an S reply.
914 * server.cc (disable_packet_T): New global.
915 (captured_main): Set new global when appropriate.
916 * server.h (disable_packet_T): Declare.
917
918 2020-02-21 Tom Tromey <tom@tromey.com>
919
920 * Makefile.in (mostlyclean): New target.
921
922 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
923
924 * target.h (struct process_stratum_target): Remove.
925 (class process_target): Rename to ...
926 (class process_stratum_target): ... this.
927 * linux-low.h (class linux_process_target): Derive from
928 'process_stratum_target'.
929 * linux-low.cc (linux_target_ops): Remove.
930 (initialize_low): Set the_target to the singleton instance of
931 linux_process_target.
932 * lynx-low.h (class lynx_process_target): Derive from
933 'process_stratum_target'.
934 * lynx-low.cc (lynx_target_ops): Remove.
935 (initialize_low): Set the_target to the singleton instance of
936 lynx_process_target.
937 * nto-low.h (class nto_process_target): Derive from
938 'process_stratum_target'.
939 * nto-low.cc (nto_target_ops): Remove.
940 (initialize_low): Set the_target to the singleton instance of
941 nto_process_target.
942 * win32-low.h (class win32_process_target): Derive from
943 'process_stratum_target'.
944 * win32-low.cc (win32_target_ops): Remove.
945 (initialize_low): Set the_target to the singleton instance of
946 win32_process_target.
947
948 Replace 'the_target->pt' with 'the_target' in the uses below.
949
950 * hostio.cc (hostio_error)
951 (handle_setfs)
952 (handle_open)
953 (handle_unlink)
954 (handle_readlink)
955 * linux-aarch32-low.cc (arm_breakpoint_at)
956 * linux-aarch64-low.cc (aarch64_breakpoint_at)
957 * linux-arm-low.cc (arm_sigreturn_next_pc)
958 (arm_get_hwcap)
959 (arm_get_syscall_trapinfo)
960 * linux-cris-low.cc (cris_breakpoint_at)
961 * linux-crisv32-low.cc (cris_breakpoint_at)
962 * linux-low.cc (handle_extended_wait)
963 (linux_wait_1)
964 (linux_read_memory)
965 (linux_process_target::breakpoint_kind_from_pc)
966 (linux_get_auxv)
967 * linux-m32r-low.cc (m32r_breakpoint_at)
968 * linux-mips-low.cc (mips_breakpoint_at)
969 * linux-nios2-low.cc (nios2_breakpoint_at)
970 * linux-ppc-low.cc (ppc_breakpoint_at)
971 * linux-s390-low.cc (s390_get_hwcap)
972 * linux-sh-low.cc (sh_breakpoint_at)
973 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
974 (sparc_store_gregset_from_stack)
975 (sparc_breakpoint_at)
976 * linux-tic6x-low.cc (tic6x_breakpoint_at)
977 * linux-tile-low.cc (tile_breakpoint_at)
978 * linux-x86-low.cc (x86_breakpoint_at)
979 * linux-xtensa-low.cc (xtensa_breakpoint_at)
980 * mem-break.cc (bp_size)
981 (bp_opcode)
982 (insert_memory_breakpoint)
983 (set_raw_breakpoint_at)
984 (delete_raw_breakpoint)
985 (z_type_supported)
986 (uninsert_raw_breakpoint)
987 (reinsert_raw_breakpoint)
988 (validate_inserted_breakpoint)
989 * regcache.cc (regcache_read_pc)
990 (regcache_write_pc)
991 * remote-utils.cc (putpkt_binary_1)
992 (input_interrupt)
993 (getpkt)
994 (prepare_resume_reply)
995 * server.cc (handle_general_set)
996 (handle_detach)
997 (handle_qxfer_auxv)
998 (handle_qxfer_exec_file)
999 (handle_qxfer_libraries_svr4)
1000 (handle_qxfer_osdata)
1001 (handle_qxfer_siginfo)
1002 (handle_qxfer_fdpic)
1003 (handle_query)
1004 (resume)
1005 (handle_v_requests)
1006 (queue_stop_reply_callback)
1007 (captured_main)
1008 * target.cc (prepare_to_access_memory)
1009 (done_accessing_memory)
1010 (read_inferior_memory)
1011 (target_write_memory)
1012 (target_stop_and_wait)
1013 (target_wait)
1014 (target_mourn_inferior)
1015 (target_continue_no_signal)
1016 (target_continue)
1017 (target_supports_multi_process)
1018 (kill_inferior)
1019 * target.h
1020 (target_create_inferior)
1021 (target_post_create_inferior)
1022 (myattach)
1023 (target_supports_fork_events)
1024 (target_supports_vfork_events)
1025 (target_supports_exec_events)
1026 (target_handle_new_gdb_connection)
1027 (detach_inferior)
1028 (mythread_alive)
1029 (fetch_inferior_registers)
1030 (store_inferior_registers)
1031 (join_inferior)
1032 (target_supports_non_stop)
1033 (target_async)
1034 (target_process_qsupported)
1035 (target_supports_catch_syscall)
1036 (target_get_ipa_tdesc_idx)
1037 (target_supports_tracepoints)
1038 (target_supports_fast_tracepoints)
1039 (target_get_min_fast_tracepoint_insn_len)
1040 (target_thread_stopped)
1041 (target_pause_all)
1042 (target_unpause_all)
1043 (target_stabilize_threads)
1044 (target_install_fast_tracepoint_jump_pad)
1045 (target_emit_ops)
1046 (target_supports_disable_randomization)
1047 (target_supports_agent)
1048 (target_enable_btrace)
1049 (target_disable_btrace)
1050 (target_read_btrace)
1051 (target_read_btrace_conf)
1052 (target_supports_range_stepping)
1053 (target_supports_stopped_by_sw_breakpoint)
1054 (target_stopped_by_sw_breakpoint)
1055 (target_supports_stopped_by_hw_breakpoint)
1056 (target_supports_hardware_single_step)
1057 (target_stopped_by_hw_breakpoint)
1058 (target_breakpoint_kind_from_pc)
1059 (target_breakpoint_kind_from_current_state)
1060 (target_supports_software_single_step)
1061 (target_core_of_thread)
1062 (target_thread_name)
1063 (target_thread_handle)
1064 * win32-low.cc (do_initial_child_stuff)
1065
1066 Rename target op default definitions listed below.
1067
1068 * target.cc (process_target::post_create_inferior): Rename as ...
1069 (process_stratum_target::post_create_inferior): ... this.
1070 (process_target::prepare_to_access_memory): Rename as ...
1071 (process_stratum_target::prepare_to_access_memory): ... this.
1072 (process_target::done_accessing_memory): Rename as ...
1073 (process_stratum_target::done_accessing_memory): ... this.
1074 (process_target::look_up_symbols): Rename as ...
1075 (process_stratum_target::look_up_symbols): ... this.
1076 (process_target::supports_read_auxv): Rename as ...
1077 (process_stratum_target::supports_read_auxv): ... this.
1078 (process_target::read_auxv): Rename as ...
1079 (process_stratum_target::read_auxv): ... this.
1080 (process_target::supports_z_point_type): Rename as ...
1081 (process_stratum_target::supports_z_point_type): ... this.
1082 (process_target::insert_point): Rename as ...
1083 (process_stratum_target::insert_point): ... this.
1084 (process_target::remove_point): Rename as ...
1085 (process_stratum_target::remove_point): ... this.
1086 (process_target::stopped_by_sw_breakpoint): Rename as ...
1087 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
1088 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
1089 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
1090 (process_target::stopped_by_hw_breakpoint): Rename as ...
1091 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
1092 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
1093 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
1094 (process_target::supports_hardware_single_step): Rename as ...
1095 (process_stratum_target::supports_hardware_single_step): ... this.
1096 (process_target::stopped_by_watchpoint): Rename as ...
1097 (process_stratum_target::stopped_by_watchpoint): ... this.
1098 (process_target::stopped_data_address): Rename as ...
1099 (process_stratum_target::stopped_data_address): ... this.
1100 (process_target::supports_read_offsets): Rename as ...
1101 (process_stratum_target::supports_read_offsets): ... this.
1102 (process_target::read_offsets): Rename as ...
1103 (process_stratum_target::read_offsets): ... this.
1104 (process_target::supports_get_tls_address): Rename as ...
1105 (process_stratum_target::supports_get_tls_address): ... this.
1106 (process_target::get_tls_address): Rename as ...
1107 (process_stratum_target::get_tls_address): ... this.
1108 (process_target::hostio_last_error): Rename as ...
1109 (process_stratum_target::hostio_last_error): ... this.
1110 (process_target::supports_qxfer_osdata): Rename as ...
1111 (process_stratum_target::supports_qxfer_osdata): ... this.
1112 (process_target::qxfer_osdata): Rename as ...
1113 (process_stratum_target::qxfer_osdata): ... this.
1114 (process_target::supports_qxfer_siginfo): Rename as ...
1115 (process_stratum_target::supports_qxfer_siginfo): ... this.
1116 (process_target::qxfer_siginfo): Rename as ...
1117 (process_stratum_target::qxfer_siginfo): ... this.
1118 (process_target::supports_non_stop): Rename as ...
1119 (process_stratum_target::supports_non_stop): ... this.
1120 (process_target::async): Rename as ...
1121 (process_stratum_target::async): ... this.
1122 (process_target::start_non_stop): Rename as ...
1123 (process_stratum_target::start_non_stop): ... this.
1124 (process_target::supports_multi_process): Rename as ...
1125 (process_stratum_target::supports_multi_process): ... this.
1126 (process_target::supports_fork_events): Rename as ...
1127 (process_stratum_target::supports_fork_events): ... this.
1128 (process_target::supports_vfork_events): Rename as ...
1129 (process_stratum_target::supports_vfork_events): ... this.
1130 (process_target::supports_exec_events): Rename as ...
1131 (process_stratum_target::supports_exec_events): ... this.
1132 (process_target::handle_new_gdb_connection): Rename as ...
1133 (process_stratum_target::handle_new_gdb_connection): ... this.
1134 (process_target::handle_monitor_command): Rename as ...
1135 (process_stratum_target::handle_monitor_command): ... this.
1136 (process_target::core_of_thread): Rename as ...
1137 (process_stratum_target::core_of_thread): ... this.
1138 (process_target::supports_read_loadmap): Rename as ...
1139 (process_stratum_target::supports_read_loadmap): ... this.
1140 (process_target::read_loadmap): Rename as ...
1141 (process_stratum_target::read_loadmap): ... this.
1142 (process_target::process_qsupported): Rename as ...
1143 (process_stratum_target::process_qsupported): ... this.
1144 (process_target::supports_tracepoints): Rename as ...
1145 (process_stratum_target::supports_tracepoints): ... this.
1146 (process_target::read_pc): Rename as ...
1147 (process_stratum_target::read_pc): ... this.
1148 (process_target::write_pc): Rename as ...
1149 (process_stratum_target::write_pc): ... this.
1150 (process_target::supports_thread_stopped): Rename as ...
1151 (process_stratum_target::supports_thread_stopped): ... this.
1152 (process_target::thread_stopped): Rename as ...
1153 (process_stratum_target::thread_stopped): ... this.
1154 (process_target::supports_get_tib_address): Rename as ...
1155 (process_stratum_target::supports_get_tib_address): ... this.
1156 (process_target::get_tib_address): Rename as ...
1157 (process_stratum_target::get_tib_address): ... this.
1158 (process_target::pause_all): Rename as ...
1159 (process_stratum_target::pause_all): ... this.
1160 (process_target::unpause_all): Rename as ...
1161 (process_stratum_target::unpause_all): ... this.
1162 (process_target::stabilize_threads): Rename as ...
1163 (process_stratum_target::stabilize_threads): ... this.
1164 (process_target::supports_fast_tracepoints): Rename as ...
1165 (process_stratum_target::supports_fast_tracepoints): ... this.
1166 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
1167 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
1168 (process_target::emit_ops): Rename as ...
1169 (process_stratum_target::emit_ops): ... this.
1170 (process_target::supports_disable_randomization): Rename as ...
1171 (process_stratum_target::supports_disable_randomization): ... this.
1172 (process_target::supports_qxfer_libraries_svr4): Rename as ...
1173 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
1174 (process_target::qxfer_libraries_svr4): Rename as ...
1175 (process_stratum_target::qxfer_libraries_svr4): ... this.
1176 (process_target::supports_agent): Rename as ...
1177 (process_stratum_target::supports_agent): ... this.
1178 (process_target::enable_btrace): Rename as ...
1179 (process_stratum_target::enable_btrace): ... this.
1180 (process_target::disable_btrace): Rename as ...
1181 (process_stratum_target::disable_btrace): ... this.
1182 (process_target::read_btrace): Rename as ...
1183 (process_stratum_target::read_btrace): ... this.
1184 (process_target::read_btrace_conf): Rename as ...
1185 (process_stratum_target::read_btrace_conf): ... this.
1186 (process_target::supports_range_stepping): Rename as ...
1187 (process_stratum_target::supports_range_stepping): ... this.
1188 (process_target::supports_pid_to_exec_file): Rename as ...
1189 (process_stratum_target::supports_pid_to_exec_file): ... this.
1190 (process_target::pid_to_exec_file): Rename as ...
1191 (process_stratum_target::pid_to_exec_file): ... this.
1192 (process_target::supports_multifs): Rename as ...
1193 (process_stratum_target::supports_multifs): ... this.
1194 (process_target::multifs_open): Rename as ...
1195 (process_stratum_target::multifs_open): ... this.
1196 (process_target::multifs_unlink): Rename as ...
1197 (process_stratum_target::multifs_unlink): ... this.
1198 (process_target::multifs_readlink): Rename as ...
1199 (process_stratum_target::multifs_readlink): ... this.
1200 (process_target::breakpoint_kind_from_pc): Rename as ...
1201 (process_stratum_target::breakpoint_kind_from_pc): ... this.
1202 (process_target::breakpoint_kind_from_current_state): Rename as ...
1203 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
1204 (process_target::thread_name): Rename as ...
1205 (process_stratum_target::thread_name): ... this.
1206 (process_target::thread_handle): Rename as ...
1207 (process_stratum_target::thread_handle): ... this.
1208 (process_target::supports_software_single_step): Rename as ...
1209 (process_stratum_target::supports_software_single_step): ... this.
1210 (process_target::supports_catch_syscall): Rename as ...
1211 (process_stratum_target::supports_catch_syscall): ... this.
1212 (process_target::get_ipa_tdesc_idx): Rename as ...
1213 (process_stratum_target::get_ipa_tdesc_idx): ... this.
1214
1215 2020-02-20 Pedro Alves <palves@redhat.com>
1216
1217 * target.cc (set_target_ops): Simply copy the given target pointer
1218 instead of creating a copy of the pointed object.
1219
1220 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1221
1222 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
1223 of process_target.
1224
1225 * target.h (struct process_stratum_target): Remove the target op.
1226 (class process_target): Add the target op.
1227 (target_get_ipa_tdesc_idx): Update the macro.
1228 * target.cc (process_target::get_ipa_tdesc_idx): Define.
1229
1230 Update the derived classes and callers below.
1231
1232 * linux-low.cc (linux_target_ops): Update.
1233 (linux_get_ipa_tdesc_idx): Turn into ...
1234 (linux_process_target::get_ipa_tdesc_idx): ... this.
1235 * linux-low.h (class linux_process_target): Update.
1236 * lynx-low.cc (lynx_target_ops): Update.
1237 * nto-low.cc (nto_target_ops): Update.
1238 * win32-low.cc (win32_target_ops): Update.
1239
1240 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1241
1242 Turn process_stratum_target's supports_catch_syscall op into a
1243 method of process_target.
1244
1245 * target.h (struct process_stratum_target): Remove the target op.
1246 (class process_target): Add the target op.
1247 (target_supports_catch_syscall): Update the macro.
1248 * target.cc (process_target::supports_catch_syscall): Define.
1249
1250 Update the derived classes and callers below.
1251
1252 * linux-low.cc (linux_target_ops): Update.
1253 (linux_supports_catch_syscall): Turn into ...
1254 (linux_process_target::supports_catch_syscall): ... this.
1255 * linux-low.h (class linux_process_target): Update.
1256 * lynx-low.cc (lynx_target_ops): Update.
1257 * nto-low.cc (nto_target_ops): Update.
1258 * win32-low.cc (win32_target_ops): Update.
1259
1260 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1261
1262 Turn process_stratum_target's supports_software_single_step op
1263 into a method of process_target.
1264
1265 * target.h (struct process_stratum_target): Remove the target op.
1266 (class process_target): Add the target op.
1267 (target_supports_software_single_step): Update the macro.
1268 * target.cc (process_target::supports_software_single_step): Define.
1269
1270 Update the derived classes and callers below.
1271
1272 * linux-low.cc (linux_target_ops): Update.
1273 (linux_supports_software_single_step): Turn into ...
1274 (linux_process_target::supports_software_single_step): ... this.
1275 * linux-low.h (class linux_process_target): Update.
1276 * lynx-low.cc (lynx_target_ops): Update.
1277 * nto-low.cc (nto_target_ops): Update.
1278 * win32-low.cc (win32_target_ops): Update.
1279
1280 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1281
1282 Turn process_stratum_target's thread_name and thread_handle ops
1283 into methods of process_target.
1284
1285 * target.h (struct process_stratum_target): Remove the target ops.
1286 (class process_target): Add the target ops.
1287 (target_thread_name): Update the macro.
1288 (target_thread_handle): Update the macro.
1289 * target.cc (process_target::thread_name): Define.
1290 (process_target::thread_handle): Define.
1291
1292 Update the derived classes and callers below.
1293
1294 * linux-low.cc (linux_target_ops): Update.
1295 (linux_process_target::thread_name): Define.
1296 (linux_process_target::thread_handle): Define.
1297 * linux-low.h (class linux_process_target): Update.
1298 * lynx-low.cc (lynx_target_ops): Update.
1299 * nto-low.cc (nto_target_ops): Update.
1300 * win32-low.cc (win32_target_ops): Update.
1301
1302 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1303
1304 Turn process_stratum_target's breakpoint_kind_from_pc,
1305 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
1306 ops into methods of process_target.
1307
1308 * target.h (struct process_stratum_target): Remove the target op.
1309 (class process_target): Add the target op.
1310 (target_breakpoint_kind_from_pc): Update the macro.
1311 (target_breakpoint_kind_from_current_state): Update the macro.
1312 (default_breakpoint_kind_from_pc): Remove declaration.
1313 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
1314 (process_target::breakpoint_kind_from_pc): ... this.
1315 (process_target::breakpoint_kind_from_current_state): Define.
1316
1317 Update the derived classes and callers below.
1318
1319 * mem-break.cc (bp_size): Update.
1320 (bp_opcode): Update.
1321 * linux-low.cc (linux_target_ops): Update.
1322 (linux_wait_1): Update.
1323 (linux_breakpoint_kind_from_pc): Turn into ...
1324 (linux_process_target::breakpoint_kind_from_pc): ... this.
1325 (linux_sw_breakpoint_from_kind): Turn into ...
1326 (linux_process_target::sw_breakpoint_from_kind): ... this.
1327 (linux_breakpoint_kind_from_current_state): Turn into ...
1328 (linux_process_target::breakpoint_kind_from_current_state): ... this.
1329 * linux-low.h (class linux_process_target): Update.
1330 * lynx-low.cc (lynx_target_ops): Update.
1331 (lynx_process_target::sw_breakpoint_from_kind): Define.
1332 * lynx-low.h (class lynx_process_target): Update.
1333 * nto-low.cc (nto_target_ops): Update.
1334 (nto_sw_breakpoint_from_kind): Turn into ...
1335 (nto_process_target::sw_breakpoint_from_kind): ... this.
1336 * nto-low.h (class nto_process_target): Update.
1337 * win32-low.cc (win32_target_ops): Update.
1338 (win32_sw_breakpoint_from_kind): Turn into ...
1339 (win32_process_target::sw_breakpoint_from_kind): ... this.
1340 * win32-low.h (class win32_process_target): Update.
1341
1342 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1343
1344 Turn process_stratum_target's multifs_open, multifs_readlink,
1345 multifs_unlink ops into methods of process_target.
1346
1347 * target.h (struct process_stratum_target): Remove the target ops.
1348 (class process_target): Add the target ops. Also add
1349 'supports_multifs'.
1350 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
1351 "sys/stat.h".
1352 (process_target::supports_multifs): Define.
1353 (process_target::multifs_open): Define.
1354 (process_target::multifs_readlink): Define.
1355 (process_target::multifs_unlink): Define.
1356
1357 Update the derived classes and callers below.
1358
1359 * hostio.cc (handle_setfs): Update.
1360 (handle_open): Update.
1361 (handle_unlink): Update.
1362 (handle_readlink): Update.
1363 * linux-low.cc (linux_target_ops): Update.
1364 (linux_process_target::supports_multifs): Define.
1365 (linux_process_target::multifs_open): Define.
1366 (linux_process_target::multifs_readlink): Define.
1367 (linux_process_target::multifs_unlink): Define.
1368 * linux-low.h (class linux_process_target): Update.
1369 * lynx-low.cc (lynx_target_ops): Update.
1370 * nto-low.cc (nto_target_ops): Update.
1371 * win32-low.cc (win32_target_ops): Update.
1372
1373 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1374
1375 Turn process_stratum_target's pid_to_exec_file op into a method
1376 of process_target.
1377
1378 * target.h (struct process_stratum_target): Remove the target op.
1379 (class process_target): Add the target op. Also add
1380 'supports_pid_to_exec_file'.
1381 * target.cc (process_target::pid_to_exec_file): Define.
1382 (process_target::supports_pid_to_exec_file): Define.
1383
1384 Update the derived classes and callers below.
1385
1386 * server.cc (handle_qxfer_exec_file): Update.
1387 (handle_query): Update.
1388 * linux-low.cc (linux_target_ops): Update.
1389 (linux_process_target::supports_pid_to_exec_file): Define.
1390 (linux_process_target::pid_to_exec_file): Define.
1391 * linux-low.h (class linux_process_target): Update.
1392 * lynx-low.cc (lynx_target_ops): Update.
1393 * nto-low.cc (nto_target_ops): Update.
1394 * win32-low.cc (win32_target_ops): Update.
1395
1396 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1397
1398 Turn process_stratum_target's supports_range_stepping op into a
1399 method of process_target.
1400
1401 * target.h (struct process_stratum_target): Remove the target op.
1402 (class process_target): Add the target op.
1403 (target_supports_range_stepping): Update the macro.
1404 * target.cc (process_target::supports_range_stepping): Define.
1405
1406 Update the derived classes and callers below.
1407
1408 * linux-low.cc (linux_target_ops): Update.
1409 (linux_supports_range_stepping): Turn into ...
1410 (linux_process_target::supports_range_stepping): ... this.
1411 * linux-low.h (class linux_process_target): Update.
1412 * lynx-low.cc (lynx_target_ops): Update.
1413 * nto-low.cc (nto_target_ops): Update.
1414 * win32-low.cc (win32_target_ops): Update.
1415
1416 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1417
1418 Turn process_stratum_target's btrace-related ops (enable_btrace,
1419 disable_btrace, read_btrace, read_btrace_conf) into methods of
1420 process_target.
1421
1422 * target.h (struct process_stratum_target): Remove the target ops.
1423 (class process_target): Add the target ops.
1424 (target_enable_btrace): Update.
1425 (target_disable_btrace): Update.
1426 (target_read_btrace): Update.
1427 (target_read_btrace_conf): Update.
1428 * target.cc (process_target::enable_btrace): Define.
1429 (process_target::disable_btrace): Define.
1430 (process_target::read_btrace): Define.
1431 (process_target::read_btrace_conf): Define.
1432
1433 Update the derived classes and callers below.
1434
1435 * linux-low.cc (linux_target_ops): Update.
1436 (linux_process_target:enable_btrace): Define as a wrapper around
1437 linux_enable_btrace.
1438 (linux_low_disable_btrace): Turn into ...
1439 (linux_process_target::disable_btrace): ... this.
1440 (linux_low_read_btrace): Turn into ...
1441 (linux_process_target::read_btrace): ... this.
1442 (linux_low_btrace_conf): Turn into ...
1443 (linux_process_target::read_btrace_conf): ... this.
1444 * linux-low.h (class linux_process_target): Update.
1445 * lynx-low.cc (lynx_target_ops): Update.
1446 * nto-low.cc (nto_target_ops): Update.
1447 * win32-low.cc (win32_target_ops): Update.
1448
1449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1450
1451 Turn process_stratum_target's supports_agent op into a method of
1452 process_target.
1453
1454 * target.h (struct process_stratum_target): Remove the target op.
1455 (class process_target): Add the target op.
1456 (target_supports_agent): Update the macro.
1457 * target.cc (process_target::supports_agent): Define.
1458
1459 Update the derived classes and callers below.
1460
1461 * linux-low.cc (linux_target_ops): Update.
1462 (linux_supports_agent): Turn into ...
1463 (linux_process_target::supports_agent): ... this.
1464 * linux-low.h (class linux_process_target): Update.
1465 * lynx-low.cc (lynx_target_ops): Update.
1466 * nto-low.cc (nto_target_ops): Update.
1467 * win32-low.cc (win32_target_ops): Update.
1468
1469 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1470
1471 Turn process_stratum_target's qxfer_libraries_svr4 op into a
1472 method of process_target.
1473
1474 * target.h (struct process_stratum_target): Remove the target op.
1475 (class process_target): Add the target op. Also add
1476 'supports_qxfer_libraries_svr4'.
1477 * target.cc (process_target::qxfer_libraries_svr4): Define.
1478 (process_target::supports_qxfer_libraries_svr4): Define.
1479
1480 Update the derived classes and callers below.
1481
1482 * server.cc (handle_qxfer_libraries_svr4): Update.
1483 (handle_query): Update.
1484 * linux-low.cc (linux_target_ops): Update.
1485 (linux_process_target::supports_qxfer_libraries_svr4): Define.
1486 (linux_qxfer_libraries_svr4): Turn into ...
1487 (linux_process_target::qxfer_libraries_svr4): ... this.
1488 * linux-low.h (class linux_process_target): Update.
1489 * lynx-low.cc (lynx_target_ops): Update.
1490 * nto-low.cc (nto_target_ops): Update.
1491 * win32-low.cc (win32_target_ops): Update.
1492
1493 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1494
1495 Turn process_stratum_target's supports_disable_randomization op
1496 into a method of process_target.
1497
1498 * target.h (struct process_stratum_target): Remove the target op.
1499 (class process_target): Add the target op.
1500 (target_supports_disable_randomization): Update the macro.
1501 * target.cc (process_target::supports_disable_randomization): Define.
1502
1503 Update the derived classes and callers below.
1504
1505 * linux-low.cc (linux_target_ops): Update.
1506 (linux_supports_disable_randomization): Turn into ...
1507 (linux_process_target::supports_disable_randomization): ... this.
1508 * linux-low.h (class linux_process_target): Update.
1509 * lynx-low.cc (lynx_target_ops): Update.
1510 * nto-low.cc (nto_target_ops): Update.
1511 * win32-low.cc (win32_target_ops): Update.
1512
1513 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1514
1515 Turn process_stratum_target's emit_ops op into a method of
1516 process_target.
1517
1518 * target.h (struct process_stratum_target): Remove the target op.
1519 (class process_target): Add the target op.
1520 (target_emit_ops): Update the macro.
1521 * target.cc (process_target::emit_ops): Define.
1522
1523 Update the derived classes and callers below.
1524
1525 * linux-low.cc (linux_target_ops): Update.
1526 (linux_emit_ops): Turn into ...
1527 (linux_process_target::emit_ops): ... this.
1528 * linux-low.h (class linux_process_target): Update.
1529 * lynx-low.cc (lynx_target_ops): Update.
1530 * nto-low.cc (nto_target_ops): Update.
1531 * win32-low.cc (win32_target_ops): Update.
1532
1533 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1534
1535 Turn process_stratum_target's install_fast_tracepoint_jump_pad
1536 and get_min_fast_tracepoint_insn_len ops into methods of
1537 process_target.
1538
1539 * target.h (struct process_stratum_target): Remove the target ops.
1540 (class process_target): Add the target ops. Also add
1541 'supports_fast_tracepoints'.
1542 (target_supports_fast_tracepoints): Update the macro.
1543 (target_get_min_fast_tracepoint_insn_len): Update the macro.
1544 (install_fast_tracepoint_jump_pad): Update and rename the macro
1545 to ...
1546 (target_install_fast_tracepoint_jump_pad): ... this.
1547 * target.cc (process_target::supports_fast_tracepoints): Define.
1548 (process_target::install_fast_tracepoint_jump_pad): Define.
1549 (process_target::get_min_fast_tracepoint_insn_len): Define.
1550
1551 Update the derived classes and callers below.
1552
1553 * tracepoint.cc (install_fast_tracepoint): Update.
1554 * linux-low.cc (linux_target_ops): Update.
1555 (linux_process_target::supports_fast_tracepoints): Define.
1556 (linux_install_fast_tracepoint_jump_pad): Turn into ...
1557 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
1558 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
1559 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
1560 * linux-low.h (class linux_process_target): Update.
1561 * lynx-low.cc (lynx_target_ops): Update.
1562 * nto-low.cc (nto_target_ops): Update.
1563 * win32-low.cc (win32_target_ops): Update.
1564
1565 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1566
1567 Turn process_stratum_target's stabilize_threads op into a
1568 method of process_target.
1569
1570 * target.h (struct process_stratum_target): Remove the target op.
1571 (class process_target): Add the target op.
1572 (target_stabilize_threads): Update the macro.
1573 * target.cc (process_target::stabilize_threads): Define.
1574
1575 Update the derived classes and callers below.
1576
1577 * server.cc (handle_status): Update.
1578 * tracepoint.cc (cmd_qtdp): Update.
1579 (cmd_qtstart): Update.
1580 * linux-low.cc (linux_target_ops): Update.
1581 (linux_stabilize_threads): Turn into ...
1582 (linux_process_target::stabilize_threads): ... this.
1583 (linux_wait_1): Update.
1584 * linux-low.h (class linux_process_target): Update.
1585 * lynx-low.cc (lynx_target_ops): Update.
1586 * nto-low.cc (nto_target_ops): Update.
1587 * win32-low.cc (win32_target_ops): Update.
1588
1589 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1590
1591 Turn process_stratum_target's pause_all and unpause_all ops
1592 into methods of process_target.
1593
1594 * target.h (struct process_stratum_target): Remove the target ops.
1595 (class process_target): Add the target ops.
1596 (pause_all): Update the macro and rename to...
1597 (target_pause_all): ... this.
1598 (unpause_all): Update the macro and rename to...
1599 (target_unpause_all): ... this.
1600 * target.cc (process_target::pause_all): Define.
1601 (process_target::unpause_all): Define.
1602
1603 Update the derived classes and callers below.
1604
1605 * server.cc (handle_status): Update.
1606 * tracepoint.cc (clear_installed_tracepoints): Update.
1607 (cmd_qtdp): Update.
1608 (cmd_qtstart): Update.
1609 (stop_tracing): Update.
1610 (cmd_qtstatus): Update.
1611 (upload_fast_traceframes): Update.
1612 (run_inferior_command): Update.
1613 * linux-low.cc (linux_target_ops): Update.
1614 (linux_pause_all): Turn into ...
1615 (linux_process_target::pause_all): ... this.
1616 (linux_unpause_all): Turn into ...
1617 (linux_process_target::unpause_all): ... this.
1618 (linux_process_target::prepare_to_access_memory): Update.
1619 (linux_process_target::done_accessing_memory): Update.
1620 * linux-low.h (class linux_process_target): Update.
1621 * lynx-low.cc (lynx_target_ops): Update.
1622 * nto-low.cc (nto_target_ops): Update.
1623 * win32-low.cc (win32_target_ops): Update.
1624
1625 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1626
1627 Turn process_stratum_target's get_tib_address op into a method of
1628 process_target.
1629
1630 * target.h (struct process_stratum_target): Remove the target op.
1631 (class process_target): Add the target op. Also add
1632 'supports_get_tib_address'.
1633 * target.cc (process_target::get_tib_address): Define.
1634 (process_target::supports_get_tib_address): Define.
1635
1636 Update the derived classes and callers below.
1637
1638 * server.cc (handle_query): Update.
1639 * linux-low.cc (win32_target_ops): Update.
1640 * lynx-low.cc (lynx_target_ops): Update.
1641 * nto-low.cc (nto_target_ops): Update.
1642 * win32-low.cc (win32_target_ops): Update.
1643 (win32_process_target::supports_get_tib_address): Define.
1644 (win32_get_tib_address): Turn into ...
1645 (win32_process_target::get_tib_address): ... this.
1646 * win32-low.h (class win32_process_target): Update.
1647
1648 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1649
1650 Turn process_stratum_target's thread_stopped op into a method of
1651 process_target.
1652
1653 * target.h (struct process_stratum_target): Remove the target op.
1654 (class process_target): Add the target op. Also add
1655 'supports_thread_stopped'.
1656 (target_thread_stopped): Update the macro.
1657 * target.cc (process_target::thread_stopped): Define.
1658 (process_target::supports_thread_stopped): Define.
1659 (prepare_to_access_memory): Update.
1660
1661 Update the derived classes and callers below.
1662
1663 * server.cc (queue_stop_reply_callback): Update.
1664 * linux-low.cc (linux_target_ops): Update.
1665 (linux_process_target::supports_thread_stopped): Define.
1666 (linux_thread_stopped): Turn into ...
1667 (linux_process_target::thread_stopped): ... this.
1668 * linux-low.h (class linux_process_target): Update.
1669 * lynx-low.cc (lynx_target_ops): Update.
1670 * nto-low.cc (nto_target_ops): Update.
1671 * win32-low.cc (win32_target_ops): Update.
1672
1673 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1674
1675 Turn process_stratum_target's read_pc and write_pc ops into
1676 methods of process_target.
1677
1678 * target.h (struct process_stratum_target): Remove the target ops.
1679 (class process_target): Add the target ops.
1680 * target.cc (process_target::read_pc): Define.
1681 (process_target::write_pc): Define.
1682
1683 Update the derived classes and callers below.
1684
1685 * regcache.cc (regcache_read_pc): Update.
1686 (regcache_write_pc): Update.
1687 * linux-low.cc (linux_target_ops): Update.
1688 (linux_read_pc): Turn into ...
1689 (linux_process_target::read_pc): ... this.
1690 (linux_write_pc): Turn into ...
1691 (linux_process_target::write_pc): ... this.
1692 * linux-low.h (class linux_process_target): Update.
1693 * lynx-low.cc (lynx_target_ops): Update.
1694 * nto-low.cc (nto_target_ops): Update.
1695 * win32-low.cc (win32_target_ops): Update.
1696
1697 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1698
1699 Turn process_stratum_target's supports_tracepoints op into a
1700 method of process_target.
1701
1702 * target.h (struct process_stratum_target): Remove the target op.
1703 (class process_target): Add the target op.
1704 (target_supports_tracepoints): Update the macro.
1705 * target.cc (process_target::supports_tracepoints): Define.
1706
1707 Update the derived classes and callers below.
1708
1709 * linux-low.cc (linux_target_ops): Update.
1710 (linux_supports_tracepoints): Turn into ...
1711 (linux_process_target::supports_tracepoints): ... this.
1712 * linux-low.h (class linux_process_target): Update.
1713 * lynx-low.cc (lynx_target_ops): Update.
1714 * nto-low.cc (nto_target_ops): Update.
1715 * win32-low.cc (win32_target_ops): Update.
1716
1717 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1718
1719 Turn process_stratum_target's process_qsupported op into a method
1720 of process_target.
1721
1722 * target.h (struct process_stratum_target): Remove the target op.
1723 (class process_target): Add the target op.
1724 (target_process_qsupported): Update the macro.
1725 * target.cc (process_target::process_qsupported): Define.
1726
1727 Update the derived classes and callers below.
1728
1729 * linux-low.cc (linux_target_ops): Update.
1730 (linux_process_qsupported): Turn into ...
1731 (linux_process_target::process_qsupported): ... this.
1732 * linux-low.h (class linux_process_target): Update.
1733 * lynx-low.cc (lynx_target_ops): Update.
1734 * nto-low.cc (nto_target_ops): Update.
1735 * win32-low.cc (win32_target_ops): Update.
1736
1737 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1738
1739 Turn process_stratum_target's read_loadmap op into a method of
1740 process_target.
1741
1742 * target.h (struct process_stratum_target): Remove the target op.
1743 (class process_target): Add the target op. Also add
1744 'supports_read_loadmap'.
1745 * target.cc (process_target::read_loadmap): Define.
1746 (process_target::supports_read_loadmap): Define.
1747
1748 Update the derived classes and callers below.
1749
1750 * server.cc (handle_qxfer_fdpic): Update.
1751 (handle_query): Update.
1752 * linux-low.cc (linux_target_ops): Update.
1753 (linux_process_target::supports_read_loadmap): Define.
1754 (linux_read_loadmap): Turn into ...
1755 (linux_process_target::read_loadmap): ... this.
1756 * linux-low.h (class linux_process_target): Update.
1757 * lynx-low.cc (lynx_target_ops): Update.
1758 * nto-low.cc (nto_target_ops): Update.
1759 * win32-low.cc (win32_target_ops): Update.
1760
1761 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1762
1763 Turn process_stratum_target's core_of_thread op into a method of
1764 process_target.
1765
1766 * target.h (struct process_stratum_target): Remove the target op.
1767 (class process_target): Add the target op.
1768 (target_core_of_thread): Update the macro.
1769 * target.cc (process_target::core_of_thread): Define.
1770
1771 Update the derived classes and callers below.
1772
1773 * linux-low.cc (linux_target_ops): Update.
1774 (linux_process_target::core_of_thread): Define.
1775 * linux-low.h (class linux_process_target): Update.
1776 * lynx-low.cc (lynx_target_ops): Update.
1777 * nto-low.cc (nto_target_ops): Update.
1778 * win32-low.cc (win32_target_ops): Update.
1779
1780 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1781
1782 Turn process_stratum_target's handle_monitor_command op into a
1783 method of process_target.
1784
1785 * target.h (struct process_stratum_target): Remove the target op.
1786 (class process_target): Add the target op.
1787 (target_handle_monitor_command): Update the macro.
1788 * target.cc (process_target::handle_monitor_command): Define.
1789
1790 Update the derived classes and callers below.
1791
1792 * server.cc (handle_query): Update.
1793 * linux-low.cc (linux_target_ops): Update.
1794 (linux_process_target::handle_monitor_command): Define.
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 handle_new_gdb_connection 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_handle_new_gdb_connection): Update the macro.
1808 * target.cc (process_target::handle_new_gdb_connection): Define.
1809
1810 Update the derived classes and callers below.
1811
1812 * linux-low.cc (linux_target_ops): Update.
1813 (linux_handle_new_gdb_connection): Turn into ...
1814 (linux_process_target::handle_new_gdb_connection): ... 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 supports_fork_events,
1823 supports_vfork_events, and supports_exec_events ops into methods
1824 of process_target.
1825
1826 * target.h (struct process_stratum_target): Remove the target ops.
1827 (class process_target): Add the target ops.
1828 (target_supports_fork_events): Update the macro.
1829 (target_supports_vfork_events): Update the macro.
1830 (target_supports_exec_events): Update the macro.
1831 * target.cc (process_target::supports_fork_events): Define.
1832 (process_target::supports_vfork_events): Define.
1833 (process_target::supports_exec_events): Define.
1834
1835 Update the derived classes and callers below.
1836
1837 * linux-low.cc (linux_target_ops): Update.
1838 (linux_supports_fork_events): Turn into ...
1839 (linux_process_target::supports_fork_events): ... this.
1840 (linux_supports_vfork_events): Turn into ...
1841 (linux_process_target::supports_vfork_events): ... this.
1842 (linux_supports_exec_events): Turn into ...
1843 (linux_process_target::supports_exec_events): ... this.
1844 * linux-low.h (class linux_process_target): Update.
1845 * lynx-low.cc (lynx_target_ops): Update.
1846 * nto-low.cc (nto_target_ops): Update.
1847 * win32-low.cc (win32_target_ops): Update.
1848
1849 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1850
1851 Turn process_stratum_target's supports_multi_process op into a
1852 method of process_target.
1853
1854 * target.h (struct process_stratum_target): Remove the target op.
1855 (class process_target): Add the target op.
1856 * target.cc (process_target::supports_multi_process): Define.
1857 (target_supports_multi_process): Update.
1858
1859 Update the derived classes and callers below.
1860
1861 * linux-low.cc (linux_target_ops): Update.
1862 (linux_supports_multi_process): Turn into ...
1863 (linux_process_target::supports_multi_process): ... this.
1864 * linux-low.h (class linux_process_target): Update.
1865 * lynx-low.cc (lynx_target_ops): Update.
1866 * nto-low.cc (nto_target_ops): Update.
1867 * win32-low.cc (win32_target_ops): Update.
1868
1869 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1870
1871 Turn process_stratum_target's supports_non_stop, async, and
1872 start_non_stop ops into methods of process_target.
1873
1874 * target.h (struct process_stratum_target): Remove the target ops.
1875 (class process_target): Add the target ops.
1876 (target_supports_non_stop): Update the macro.
1877 (target_async): Update the macro.
1878 (start_non_stop): Remove declaration.
1879 * target.cc (process_target::supports_non_stop): Define.
1880 (process_target::async): Define.
1881 (process_target::start_non_stop): Define.
1882 (start_non_stop): Remove.
1883
1884 Update the derived classes and callers below.
1885
1886 * server.cc (handle_qxfer_siginfo): Update.
1887 (handle_query): Update.
1888 * linux-low.cc (linux_target_ops): Update.
1889 (linux_supports_non_stop): Turn into ...
1890 (linux_process_target::supports_non_stop): ... this.
1891 (linux_async): Turn into ...
1892 (linux_process_target::async): ... this.
1893 (linux_start_non_stop): Turn into ...
1894 (linux_process_target::start_non_stop): ... this.
1895 * linux-low.h (class linux_process_target): Update.
1896 * lynx-low.cc (lynx_target_ops): Update.
1897 * nto-low.cc (nto_target_ops): Update.
1898 (nto_supports_non_stop): Remove; rely on the default behavior
1899 instead.
1900 * win32-low.cc (win32_target_ops): Update.
1901
1902 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1903
1904 Turn process_stratum_target's qxfer_siginfo op into a method of
1905 process_target.
1906
1907 * target.h (struct process_stratum_target): Remove the target op.
1908 (class process_target): Add the target op. Also add
1909 'supports_qxfer_siginfo'.
1910 * target.cc (process_target::qxfer_siginfo): Define.
1911 (process_target::supports_qxfer_siginfo): Define.
1912
1913 Update the derived classes and callers below.
1914
1915 * server.cc (handle_qxfer_siginfo): Update.
1916 (handle_query): Update.
1917 * linux-low.cc (linux_target_ops): Update.
1918 (linux_process_target::supports_qxfer_siginfo): Define.
1919 (linux_xfer_siginfo): Turn into ...
1920 (linux_process_target::qxfer_siginfo): ... this.
1921 * linux-low.h (class linux_process_target): Update.
1922 * lynx-low.cc (lynx_target_ops): Update.
1923 * nto-low.cc (nto_target_ops): Update.
1924 * win32-low.cc (win32_target_ops): Update.
1925
1926 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1927
1928 Turn process_stratum_target's qxfer_osdata op into a method of
1929 process_target.
1930
1931 * target.h (struct process_stratum_target): Remove the target op.
1932 (class process_target): Add the target op. Also add
1933 'supports_qxfer_osdata'.
1934 * target.cc (process_target::qxfer_osdata): Define.
1935 (process_target::supports_qxfer_osdata): Define.
1936
1937 Update the derived classes and callers below.
1938
1939 * server.cc (handle_qxfer_osdata): Update.
1940 (handle_query): Update.
1941 * linux-low.cc (linux_target_ops): Update.
1942 (linux_process_target::supports_qxfer_osdata): Define.
1943 (linux_qxfer_osdata): Turn into ...
1944 (linux_process_target::qxfer_osdata): ... this.
1945 * linux-low.h (class linux_process_target): Update.
1946 * lynx-low.cc (lynx_target_ops): Update.
1947 * nto-low.cc (nto_target_ops): Update.
1948 * win32-low.cc (win32_target_ops): Update.
1949
1950 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1951
1952 Turn process_stratum_target's hostio_last_error op into a
1953 method of process_target.
1954
1955 * target.h (struct process_stratum_target): Remove the target op.
1956 (class process_target): Add the target op.
1957 * target.cc: Add "hostio.h" to includes.
1958 (process_target::hostio_last_error): Define.
1959
1960 Update the derived classes and callers below.
1961
1962 * hostio.cc (hostio_error): Update.
1963 * linux-low.cc: Remove "hostio.h" from includes.
1964 (linux_target_ops): Update.
1965 * lynx-low.cc (lynx_target_ops): Update.
1966 * nto-low.cc (nto_target_ops): Update.
1967 * win32-low.h (class win32_process_target): Update.
1968 * win32-low.cc (win32_target_ops): Update.
1969 (wince_hostio_last_error): Turn into ...
1970 (win32_process_target::hostio_last_error): ... this.
1971
1972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1973
1974 Turn process_stratum_target's get_tls_address op into a method of
1975 process_target.
1976
1977 * target.h (struct process_stratum_target): Remove the target op.
1978 (class process_target): Add the target op. Also add
1979 'supports_get_tls_address'.
1980 * target.cc (process_target::get_tls_address): Define.
1981 (process_target::supports_get_tls_address): Define.
1982
1983 Update the derived classes and callers below.
1984
1985 * server.cc (handle_query): Update.
1986 * linux-low.cc (linux_target_ops): Update.
1987 (linux_process_target::supports_get_tls_address): Define.
1988 (linux_process_target::get_tls_address): Define.
1989 * linux-low.h (class linux_process_target): Update.
1990 * lynx-low.cc (lynx_target_ops): Update.
1991 * nto-low.cc (nto_target_ops): Update.
1992 * win32-low.cc (win32_target_ops): Update.
1993
1994 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1995
1996 Turn process_stratum_target's read_offsets op into a method of
1997 process_target.
1998
1999 * target.h (struct process_stratum_target): Remove the target op.
2000 (class process_target): Add the target op. Also add
2001 'supports_read_offsets'.
2002 * target.cc (process_target::read_offsets): Define.
2003 (process_target::supports_read_offsets): Define.
2004
2005 Update the derived classes and callers below.
2006
2007 * server.cc (handle_query): Update.
2008 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
2009 (linux_target_ops): Update.
2010 (linux_process_target::supports_read_offsets): Define.
2011 (linux_read_offsets): Turn into ...
2012 (linux_process_target::read_offsets): ... this.
2013 * linux-low.h (class linux_process_target): Update.
2014 * lynx-low.cc (lynx_target_ops): Update.
2015 * nto-low.cc (nto_target_ops): Update.
2016 * win32-low.cc (win32_target_ops): Update.
2017
2018 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2019
2020 Turn process_stratum_target's stopped_by_watchpoint and
2021 stopped_data_address ops into methods of process_target.
2022
2023 * target.h (struct process_stratum_target): Remove the target ops.
2024 (class process_target): Add the target ops.
2025 * target.cc (process_target::stopped_by_watchpoint): Define.
2026 (process_target::stopped_data_address): Define.
2027
2028 Update the derived classes and callers below.
2029
2030 * remote-utils.cc (prepare_resume_reply): Update.
2031 * linux-low.cc (linux_target_ops): Update.
2032 (linux_stopped_by_watchpoint): Turn into ...
2033 (linux_process_target::stopped_by_watchpoint): ... this.
2034 (linux_stopped_data_address): Turn into ...
2035 (linux_process_target::stopped_data_address): ... this.
2036 * linux-low.h (class linux_process_target): Update.
2037 * lynx-low.cc (lynx_target_ops): Update.
2038 * nto-low.cc (nto_target_ops): Update.
2039 (nto_stopped_by_watchpoint): Turn into ...
2040 (nto_process_target::stopped_by_watchpoint): ... this.
2041 (nto_stopped_data_address): Turn into ...
2042 (nto_process_target::stopped_data_address): ... this.
2043 * nto-low.h (class nto_process_target): Update.
2044 * win32-low.cc (win32_target_ops): Update.
2045 (win32_stopped_by_watchpoint): Turn into ...
2046 (win32_process_target::stopped_by_watchpoint): ... this.
2047 (win32_stopped_data_address): Turn into ...
2048 (win32_process_target::stopped_data_address): ... this.
2049 * win32-low.h (class win32_process_target): Update.
2050
2051 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2052
2053 Turn process_stratum_target's supports_hardware_single_step op into
2054 a method of process_target.
2055
2056 * target.h (struct process_stratum_target): Remove the target op.
2057 (class process_target): Add the target op.
2058 (target_supports_hardware_single_step): Update the macro.
2059 (target_can_do_hardware_single_step): Remove declaration.
2060 * target.cc (process_target::supports_hardware_single_step): Define.
2061 (target_can_do_hardware_single_step): Remove.
2062
2063 Update the derived classes and callers below.
2064
2065 * linux-low.h (class linux_process_target): Update.
2066 * linux-low.cc (linux_target_ops): Update.
2067 (linux_supports_hardware_single_step): Turn into ...
2068 (linux_process_target::supports_hardware_single_step): ... this.
2069 * lynx-low.h (class lynx_process_target): Update.
2070 * lynx-low.cc (lynx_target_ops): Update.
2071 (lynx_process_target::supports_hardware_single_step): Define.
2072 * nto-low.h (class nto_process_target): Update.
2073 * nto-low.cc (nto_target_ops): Update.
2074 (nto_process_target::supports_hardware_single_step): Define.
2075 * win32-low.h (class win32_process_target): Update.
2076 * win32-low.cc (win32_target_ops): Update.
2077 (win32_process_target::supports_hardware_single_step): Define.
2078
2079 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2080
2081 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
2082 ops into methods of process_target.
2083
2084 * target.h (struct process_stratum_target): Remove the target ops.
2085 (class process_target): Add the target ops.
2086 (target_stopped_by_hw_breakpoint): Update the macro.
2087 (target_supports_stopped_by_hw_breakpoint): Update the macro.
2088 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
2089 (process_target::supports_stopped_by_hw_breakpoint): Define.
2090
2091 Update the derived classes and callers below.
2092
2093 * linux-low.cc (linux_target_ops): Update.
2094 (linux_stopped_by_hw_breakpoint): Turn into ...
2095 (linux_process_target::stopped_by_hw_breakpoint): ... this.
2096 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
2097 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
2098 * linux-low.h (class linux_process_target): Update.
2099 * lynx-low.cc (lynx_target_ops): Update.
2100 * nto-low.cc (nto_target_ops): Update.
2101 * win32-low.cc (win32_target_ops): Update.
2102
2103 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2104
2105 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
2106 ops into methods of process_target.
2107
2108 * target.h (struct process_stratum_target): Remove the target ops.
2109 (class process_target): Add the target ops.
2110 (target_stopped_by_sw_breakpoint): Update the macro.
2111 (target_supports_stopped_by_sw_breakpoint): Update the macro.
2112 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
2113 (process_target::supports_stopped_by_sw_breakpoint): Define.
2114
2115 Update the derived classes and callers below.
2116
2117 * linux-low.cc (linux_target_ops): Update.
2118 (linux_stopped_by_sw_breakpoint): Turn into ...
2119 (linux_process_target::stopped_by_sw_breakpoint): ... this.
2120 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
2121 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
2122 * linux-low.h (class linux_process_target): Update.
2123 * lynx-low.cc (lynx_target_ops): Update.
2124 * nto-low.cc (nto_target_ops): Update.
2125 * win32-low.cc (win32_target_ops): Update.
2126
2127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2128
2129 Turn process_stratum_target's insert_point and remove_point ops
2130 into methods of process_target.
2131
2132 * target.h (struct process_stratum_target): Remove the target ops.
2133 (class process_target): Add the target ops.
2134 * target.cc (process_target::insert_point): Define.
2135 (process_target::remove_point): Define.
2136
2137 Update the derived classes and callers below.
2138
2139 * mem-break.cc (set_raw_breakpoint_at): Update.
2140 (delete_raw_breakpoint): Update.
2141 (uninsert_raw_breakpoint): Update.
2142 (reinsert_raw_breakpoint): Update.
2143 * linux-low.cc (linux_target_ops): Update.
2144 (linux_insert_point): Turn into ...
2145 (linux_process_target::insert_point): ... this.
2146 (linux_remove_point): Turn into ...
2147 (linux_process_target::remove_point): ... this.
2148 * linux-low.h (class linux_process_target): Update.
2149 * lynx-low.cc (lynx_target_ops): Update.
2150 * nto-low.cc (nto_target_ops): Update.
2151 (nto_insert_point): Turn into ...
2152 (nto_process_target::insert_point): ... this.
2153 (nto_remove_point): Turn into ...
2154 (nto_process_target::remove_point): ... this.
2155 * nto-low.h (class nto_process_target): Update.
2156 * win32-low.cc (win32_target_ops): Update.
2157 (win32_insert_point): Turn into ...
2158 (win32_process_target::insert_point): ... this.
2159 (win32_remove_point): Turn into ...
2160 (win32_process_target::remove_point): ... this.
2161 * win32-low.h (class win32_process_target): Update.
2162
2163 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2164
2165 Turn process_stratum_target's supports_z_point_type op into a
2166 method of process_target.
2167
2168 * target.h (struct process_stratum_target): Remove the target op.
2169 (class process_target): Add the target op.
2170 * target.cc (process_target::supports_z_point_type): Define.
2171
2172 Update the derived classes and callers below.
2173
2174 * mem-break.cc (z_type_supported): Update.
2175 * linux-low.cc (linux_target_ops): Update.
2176 (linux_supports_z_point_type): Turn into ...
2177 (linux_process_target::supports_z_point_type): ... this.
2178 * linux-low.h (class linux_process_target): Update.
2179 * lynx-low.cc (lynx_target_ops): Update.
2180 * nto-low.cc (nto_target_ops): Update.
2181 (nto_supports_z_point_type): Turn into ...
2182 (nto_process_target::supports_z_point_type): ... this.
2183 * nto-low.h (class nto_process_target): Update.
2184 * win32-low.cc (win32_target_ops): Update.
2185 (win32_supports_z_point_type): Turn into ...
2186 (win32_process_target::supports_z_point_type): ... this.
2187 * win32-low.h (class win32_process_target): Update.
2188
2189 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2190
2191 Turn process_stratum_target's read_auxv op into a method of
2192 process_target.
2193
2194 * target.h (class process_stratum_target): Remove the target op.
2195 (struct process_target): Add the target op. Also add
2196 'supports_read_auxv'.
2197 * target.cc (process_target::read_auxv): Define.
2198 (process_target::supports_read_auxv): Define.
2199
2200 Update the derived classes and callers below.
2201
2202 * server.cc (handle_qxfer_auxv): Update.
2203 (handle_query): Update.
2204 * linux-low.cc (linux_target_ops): Update.
2205 (linux_process_target::supports_read_auxv): Define.
2206 (linux_read_auxv): Turn into ...
2207 (linux_process_target::read_auxv): ... this.
2208 * linux-low.h (class linux_process_target): Update.
2209 * lynx-low.cc (lynx_target_ops): Update.
2210 * nto-low.cc (nto_target_ops): Update.
2211 (nto_process_target::supports_read_auxv): Define.
2212 (nto_read_auxv): Turn into ...
2213 (nto_process_target::read_auxv): ... this.
2214 * nto-low.h (class nto_process_target): Update.
2215 * win32-low.cc (win32_target_ops): Update.
2216
2217 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2218
2219 Turn process_stratum_target's request_interrupt op into a method of
2220 process_target.
2221
2222 * target.h (struct process_stratum_target): Remove the target op.
2223 (class process_target): Add the target op.
2224
2225 Update the derived classes and callers below.
2226
2227 * remote-utils.cc (putpkt_binary_1): Update.
2228 (input_interrupt): Update.
2229 (getpkt): Update.
2230 * server.cc (handle_v_requests): Update.
2231 * linux-low.cc (linux_target_ops): Update.
2232 (linux_request_interrupt): Turn into ...
2233 (linux_process_target::request_interrupt): ... this.
2234 * linux-low.h (class linux_process_target): Update.
2235 * lynx-low.cc (lynx_target_ops): Update.
2236 (lynx_request_interrupt): Turn into ...
2237 (lynx_process_target::request_interrupt): ... this.
2238 * lynx-low.h (class lynx_process_target): Update.
2239 * nto-low.cc (nto_target_ops): Update.
2240 (nto_request_interrupt): Turn into ...
2241 (nto_process_target::request_interrupt): ... this.
2242 * nto-low.h (class nto_process_target): Update.
2243 * win32-low.cc (win32_target_ops): Update.
2244 (win32_request_interrupt): Turn into ...
2245 (win32_process_target::request_interrupt): ... this.
2246 * win32-low.h (class win32_process_target): Update.
2247
2248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2249
2250 Turn process_stratum_target's look_up_symbols op into a method of
2251 process_target.
2252
2253 * target.h (struct process_stratum_target): Remove the target op.
2254 (class process_target): Add the target op.
2255 * target.cc (process_target::look_up_symbols): Define.
2256
2257 Update the derived classes and callers below.
2258
2259 * server.cc (handle_query): Update.
2260 * linux-low.cc (linux_target_ops): Update.
2261 (linux_look_up_symbols): Turn into ...
2262 (linux_process_target::look_up_symbols): ... this.
2263 * linux-low.h (class linux_process_target): Update.
2264 * lynx-low.cc (lynx_target_ops): Update.
2265 * nto-low.cc (nto_target_ops): Update.
2266 * win32-low.cc (win32_target_ops): Update.
2267
2268 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2269
2270 Turn process_stratum_target's read_memory and write_memory
2271 ops into methods of process_target.
2272
2273 * target.h (struct process_stratum_target): Remove the target ops.
2274 (class process_target): Add the target ops.
2275
2276 Update the derived classes and callers below.
2277
2278 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
2279 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
2280 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
2281 (arm_get_syscall_trapinfo): Update.
2282 * linux-cris-low.cc (cris_breakpoint_at): Update.
2283 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
2284 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
2285 * linux-mips-low.cc (mips_breakpoint_at): Update.
2286 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
2287 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
2288 * linux-sh-low.cc (sh_breakpoint_at): Update.
2289 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
2290 (sparc_store_gregset_from_stack): Update.
2291 (sparc_breakpoint_at): Update.
2292 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
2293 * linux-tile-low.cc (tile_breakpoint_at): Update.
2294 * linux-x86-low.cc (x86_breakpoint_at): Update.
2295 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
2296 * mem-brea.cc (insert_memory_breakpoint): Update.
2297 (validate_inserted_breakpoint): Update.
2298 * target.cc (read_inferior_memory): Update.
2299 (target_write_memory): Update.
2300 * linux-low.cc (linux_target_ops): Update.
2301 (linux_read_memory): Make a wrapper around the read_memory target
2302 op call.
2303 (linux_process_target::read_memory): Rename from linux_read_memory.
2304 (linux_write_memory): Turn into ...
2305 (linux_process_target::write_memory): ... this.
2306 * linux-low.h (class linux_process_target): Update.
2307 * lynx-low.cc (lynx_target_ops): Update.
2308 (lynx_read_memory): Turn into ...
2309 (lynx_process_target::read_memory): ... this.
2310 (lynx_write_memory): Turn into ...
2311 (lynx_process_target::write_memory): ... this.
2312 * lynx-low.h (class lynx_process_target): Update.
2313 * nto-low.cc (nto_target_ops): Update.
2314 (nto_read_memory): Turn into ...
2315 (nto_process_target::read_memory): ... this.
2316 (nto_write_memory): Turn into ...
2317 (nto_process_target::write_memory): ... this.
2318 * nto-low.h (class nto_process_target): Update.
2319 * win32-low.cc (win32_target_ops): Update.
2320 (win32_read_inferior_memory): Turn into ...
2321 (win32_process_target::read_memory): ... this.
2322 (win32_write_inferior_memory): Turn into ...
2323 (win32_process_target::write_memory): ... this.
2324 * win32-low.h (class win32_process_target): Update.
2325
2326 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2327
2328 Turn process_stratum_target's prepare_to_access_memory and
2329 done_accessing_memory ops into methods of process_target.
2330
2331 * target.h (struct process_stratum_target): Remove the target ops.
2332 (class process_target): Add the target ops.
2333 * target.cc (process_target::prepare_to_access_memory): Define.
2334 (process_target::done_accessing_memory): Define.
2335 (prepare_to_access_memory): Update.
2336 (done_accessing_memory): Update.
2337
2338 Update the derived classes and callers below.
2339
2340 * linux-low.cc (linux_target_ops): Update.
2341 (linux_prepare_to_access_memory): Turn into ...
2342 (linux_process_target::prepare_to_access_memory): ... this.
2343 (linux_done_accessing_memory): Turn into ...
2344 (linux_process_target::done_accessing_memory): ... this.
2345 * linux-low.h (class linux_process_target): Update.
2346 * lynx-low.cc (lynx_target_ops): Update.
2347 * nto-low.cc (nto_target_ops): Update.
2348 * win32-low.cc (win32_target_ops): Update.
2349
2350 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2351
2352 Turn process_stratum_target's fetch_registers and store_registers
2353 ops into methods of process_target.
2354
2355 * target.h (struct process_stratum_target): Remove the target ops.
2356 (class process_target): Add the target ops.
2357 (fetch_inferior_registers): Update the macro.
2358 (store_inferior_registers): Update the macro.
2359
2360 Update the derived classes and callers below.
2361
2362 * linux-low.cc (linux_target_ops): Update.
2363 (linux_fetch_registers): Turn into ...
2364 (linux_process_target::fetch_registers): ... this.
2365 (linux_store_registers): Turn into ...
2366 (linux_process_target::store_registers): ... this.
2367 * linux-low.h (class linux_process_target): Update.
2368 * lynx-low.cc (lynx_target_ops): Update.
2369 (lynx_fetch_registers): Turn into ...
2370 (lynx_process_target::fetch_registers): ... this.
2371 (lynx_store_registers): Turn into ...
2372 (lynx_process_target::store_registers): ... this.
2373 * lynx-low.h (class lynx_process_target): Update.
2374 * nto-low.cc (nto_target_ops): Update.
2375 (nto_fetch_registers): Turn into ...
2376 (nto_process_target::fetch_registers): ... this.
2377 (nto_store_registers): Turn into ...
2378 (nto_process_target::store_registers): ... this.
2379 * nto-low.h (class nto_process_target): Update.
2380 * win32-low.cc (win32_target_ops): Update.
2381 (win32_fetch_inferior_registers): Turn into ...
2382 (win32_process_target::fetch_registers): ... this.
2383 (win32_store_inferior_registers): Turn into ...
2384 (win32_process_target::store_registers): ... this.
2385 * win32-low.h (class win32_process_target): Update.
2386
2387 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2388
2389 Turn process_stratum_target's wait op into a method of
2390 process_target.
2391
2392 * target.h (struct process_stratum_target): Remove the target op.
2393 (class process_target): Add the target op.
2394
2395 Update the derived classes and callers below.
2396
2397 * target.cc (target_wait): Update.
2398 * linux-low.cc (linux_target_ops): Update.
2399 (linux_wait): Turn into ...
2400 (linux_process_target::wait): ... this.
2401 * linux-low.h (class linux_process_target): Update.
2402 * lynx-low.cc (lynx_target_ops): Update.
2403 (lynx_wait): Turn into ...
2404 (lynx_process_target::wait): ... this.
2405 * lynx-low.h (class lynx_process_target): Update.
2406 * nto-low.cc (nto_target_ops): Update.
2407 (nto_wait): Turn into ...
2408 (nto_process_target::wait): ... this.
2409 * nto-low.h (class nto_process_target): Update.
2410 * win32-low.cc (win32_target_ops): Update.
2411 (win32_wait): Turn into ...
2412 (win32_process_target::wait): ... this.
2413 (do_initial_child_stuff): Update.
2414 * win32-low.h (class win32_process_target): Update.
2415
2416 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2417
2418 Turn process_stratum_target's resume op into a method of
2419 process_target.
2420
2421 * target.h (struct process_stratum_target): Remove the target op.
2422 (class process_target): Add the target op.
2423
2424 Update the derived classes and callers below.
2425
2426 * server.cc (resume): Update.
2427 * target.cc (target_stop_and_wait): Update.
2428 (target_continue_no_signal): Update.
2429 (target_continue): Update.
2430 * linux-low.cc (linux_target_ops): Update.
2431 (linux_resume): Turn into ...
2432 (linux_process_target::resume): ... this.
2433 * linux-low.h (class linux_process_target): Update.
2434 * lynx-low.cc (lynx_target_ops): Update.
2435 (lynx_resume): Turn into ...
2436 (lynx_process_target::resume): ... this.
2437 * lynx-low.h (class lynx_process_target): Update.
2438 * nto-low.cc (nto_target_ops): Update.
2439 (nto_resume): Turn into ...
2440 (nto_process_target::resume): ... this.
2441 * nto-low.h (class nto_process_target): Update.
2442 * win32-low.cc (win32_target_ops): Update.
2443 (win32_resume): Turn into ...
2444 (win32_process_target::resume): ... this.
2445 (win32_process_target::detach): Update.
2446 (do_initial_child_stuff): Update.
2447 * win32-low.h (class win32_process_target): Update.
2448
2449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2450
2451 Turn process_stratum_target's thread_alive op into a method of
2452 process_target.
2453
2454 * target.h (struct process_stratum_target): Remove the target op.
2455 (class process_target): Add the target op.
2456 (mythread_alive): Update the macro.
2457
2458 Update the derived classes and callers below.
2459
2460 * linux-low.cc (linux_target_ops): Update.
2461 (linux_thread_alive): Turn into ...
2462 (linux_process_target::thread_alive): ... this.
2463 (wait_for_sigstop): Update.
2464 * linux-low.h (class linux_process_target): Update.
2465 * lynx-low.cc (lynx_target_ops): Update.
2466 (lynx_thread_alive): Turn into ...
2467 (lynx_process_target::thread_alive): ... this.
2468 * lynx-low.h (class lynx_process_target): Update.
2469 * nto-low.cc (nto_target_ops): Update.
2470 (nto_thread_alive): Turn into ...
2471 (nto_process_target::thread_alive): ... this.
2472 * nto-low.h (class nto_process_target): Update.
2473 * win32-low.cc (win32_target_ops): Update.
2474 (win32_thread_alive): Turn into ...
2475 (win32_process_target::thread_alive): ... this.
2476 * win32-low.h (class win32_process_target): Update.
2477
2478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2479
2480 Turn process_stratum_target's join op into a method of
2481 process_target.
2482
2483 * target.h (struct process_stratum_target): Remove the target op.
2484 (class process_target): Add the target op.
2485 (join_inferior): Update the macro.
2486
2487 Update the derived classes and callers below.
2488
2489 * linux-low.cc (linux_target_ops): Update.
2490 (linux_join): Turn into ...
2491 (linux_process_target::join): ... this.
2492 * linux-low.h (class linux_process_target): Update.
2493 * lynx-low.cc (lynx_target_ops): Update.
2494 (lynx_join): Turn into ...
2495 (lynx_process_target::join): ... this.
2496 * lynx-low.h (class lynx_process_target): Update.
2497 * nto-low.cc (nto_target_ops): Update.
2498 (nto_process_target::join): Define.
2499 * nto-low.h (class nto_process_target): Update.
2500 * win32-low.cc (win32_target_ops): Update.
2501 (win32_join): Turn into ...
2502 (win32_process_target::join): ... this.
2503 * win32-low.h (class win32_process_target): Update.
2504
2505 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2506
2507 Turn process_stratum_target's mourn op into a method of
2508 process_target.
2509
2510 * target.h (struct process_stratum_target): Remove the target op.
2511 (class process_target): Add the target op.
2512
2513 Update the derived classes and callers below.
2514
2515 * target.cc (target_mourn_inferior): Update.
2516 * linux-low.cc (linux_target_ops): Update.
2517 (linux_mourn): Turn into ...
2518 (linux_process_target::mourn): ... this.
2519 (handle_extended_wait): Update.
2520 (linux_process_target::kill): Update.
2521 (linux_process_target::detach): Update.
2522 * linux-low.h (class linux_process_target): Update.
2523 * lynx-low.cc (lynx_target_ops): Update.
2524 (lynx_mourn): Turn into ...
2525 (lynx_process_target::mourn): ... this.
2526 * lynx-low.h (class lynx_process_target): Update.
2527 * nto-low.cc (nto_target_ops): Update.
2528 (nto_mourn): Turn into ...
2529 (nto_process_target::mourn): ... this.
2530 * nto-low.h (class nto_process_target): Update.
2531 * win32-low.cc (win32_target_ops): Update.
2532 (win32_mourn): Turn into ...
2533 (win32_process_target::mourn): ... this.
2534 * win32-low.h (class win32_process_target): Update.
2535
2536 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2537
2538 Turn process_stratum_target's detach op into a method of
2539 process_target.
2540
2541 * target.h (struct process_stratum_target): Remove the target op.
2542 (class process_target): Add the target op.
2543 (detach_inferior): Update the macro.
2544
2545 Update the derived classes and callers below.
2546
2547 * linux-low.cc (linux_target_ops): Update.
2548 (linux_detach): Turn into ...
2549 (linux_process_target::detach): ... this.
2550 * linux-low.h (class linux_process_target): Update.
2551 * lynx-low.cc (lynx_target_ops): Update.
2552 (lynx_detach): Turn into ...
2553 (lynx_process_target::detach): ... this.
2554 * lynx-low.h (class lynx_process_target): Update.
2555 * nto-low.cc (nto_target_ops): Update.
2556 (nto_detach): Turn into ...
2557 (nto_process_target::detach): ... this.
2558 * nto-low.h (class nto_process_target): Update.
2559 * win32-low.cc (win32_target_ops): Update.
2560 (win32_detach): Turn into ...
2561 (win32_process_target::detach): ... this.
2562 * win32-low.h (class win32_process_target): Update.
2563
2564 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2565
2566 Turn process_stratum_target's kill op into a method of
2567 process_target.
2568
2569 * target.h (struct process_stratum_target): Remove the target op.
2570 (class process_target): Add the target op.
2571
2572 Update the derived classes and callers below.
2573
2574 * target.cc (kill_inferior): Update.
2575 * linux-low.cc (linux_target_ops): Update.
2576 (linux_kill): Turn into ...
2577 (linux_process_target::kill): ... this.
2578 * linux-low.h (class linux_process_target): Update.
2579 * lynx-low.cc (lynx_target_ops): Update.
2580 (lynx_kill): Turn into ...
2581 (lynx_process_target::kill): ... this.
2582 * lynx-low.h (class lynx_process_target): Update.
2583 * nto-low.cc (nto_target_ops): Update.
2584 (nto_kill): Turn into ...
2585 (nto_process_target::kill): ... this.
2586 * nto-low.h (class nto_process_target): Update.
2587 * win32-low.cc (win32_target_ops): Update.
2588 (win32_kill): Turn into ...
2589 (win32_process_target::kill): ... this.
2590 * win32-low.h (class win32_process_target): Update.
2591
2592 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2593
2594 Turn process_stratum_target's attach op into a method of
2595 process_target.
2596
2597 * target.h (struct process_stratum_target): Remove the target op.
2598 (class process_target): Add the target op.
2599 (myattach): Update the macro.
2600
2601 Update the derived classes and callers below.
2602
2603 * linux-low.cc (linux_target_ops): Update.
2604 (linux_attach): Turn into ...
2605 (linux_process_target::attach): ... this.
2606 * linux-low.h (class linux_process_target): Update.
2607 * lynx-low.cc (lynx_target_ops): Update.
2608 (lynx_attach): Turn into ...
2609 (lynx_process_target::attach): ... this.
2610 * lynx-low.h (class lynx_process_target): Update.
2611 * nto-low.cc (nto_target_ops): Update.
2612 (nto_attach): Turn into ...
2613 (nto_process_target::attach): ... this.
2614 * nto-low.h (class nto_process_target): Update.
2615 * win32-low.cc (win32_target_ops): Update.
2616 (win32_attach): Turn into ...
2617 (win32_process_target::attach): ... this.
2618 * win32-low.h (class win32_process_target): Update.
2619
2620 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2621
2622 Turn process_stratum_target's post_create_inferior op into a method
2623 of process_target.
2624
2625 * target.h (struct process_stratum_target): Remove the target op.
2626 (class process_target): Add the target op.
2627 (target_post_create_inferior): Update the macro.
2628 * target.cc (process_target::post_create_inferior): Define.
2629
2630 Update the derived classes and callers below.
2631
2632 * linux-low.cc (linux_target_ops): Update.
2633 (linux_post_create_inferior): Turn into ...
2634 (linux_process_target::post_create_inferior): ... this.
2635 * linux-low.h (class linux_process_target): Update.
2636 * lynx-low.cc (lynx_target_ops): Update.
2637 * nto-low.cc (nto_target_ops): Update.
2638 * win32-low.cc (win32_target_ops): Update.
2639
2640 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2641
2642 Turn process_stratum_target's create_inferior op into a method of
2643 process_target.
2644
2645 * target.h (struct process_stratum_target): Remove the target op.
2646 (class process_target): Add the target op.
2647 (create_inferior): Rename the macro to ...
2648 (target_create_inferior): ... this.
2649
2650 Update the derived classes and callers below.
2651
2652 * server.cc (handle_v_run): Update.
2653 (captured_main): Update.
2654 (process_serial_event): Update.
2655 * linux-low.cc (linux_target_ops): Update.
2656 (linux_create_inferior): Turn into ...
2657 (linux_process_target::create_inferior): ... this.
2658 * linux-low.h (class linux_process_target): Update.
2659 * lynx-low.cc (lynx_target_ops): Update.
2660 (lynx_create_inferior): Turn into ...
2661 (lynx_process_target::create_inferior): ... this.
2662 * lynx-low.h (class lynx_process_target): Update.
2663 * nto-low.cc (nto_target_ops): Update.
2664 (nto_create_inferior): Turn into ...
2665 (nto_process_target::create_inferior): ... this.
2666 * nto-low.h (class nto_process_target): Update.
2667 * win32-low.cc (win32_target_ops): Update.
2668 (win32_create_inferior): Turn into ...
2669 (win32_process_target::create_inferior): ... this.
2670 * win32-low.h (class win32_process_target): Update.
2671
2672 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2673
2674 * target.h (class process_target): New class definition.
2675 (struct process_stratum_target) <pt>: New field with type
2676 'process_target*'.
2677 * linux-low.h (class linux_process_target): Define as a derived
2678 class of 'process_target'.
2679 * linux-low.cc (linux_target_ops): Add a linux_process_target*
2680 as the 'pt' field.
2681 * lynx-low.h (class lynx_process_target): Define as a derived
2682 class of 'process_target'.
2683 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
2684 as the 'pt' field.
2685 * nto-low.h (class nto_process_target): Define as a derived
2686 class of 'process_target'.
2687 * nto-low.cc (nto_target_ops): Add an nto_process_target*
2688 as the 'pt' field.
2689 * win32-low.h (class win32_process_target): Define as a derived
2690 class of 'process_target'.
2691 * win32-low.cc (win32_target_ops): Add a win32_process_target*
2692 as the 'pt' field.
2693
2694 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
2695
2696 * configure: Regenerate.
2697
2698 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
2699 Andrew Burgess <andrew.burgess@embecosm.com>
2700
2701 * linux-riscv-low.cc: New file.
2702 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
2703 and nat/riscv-linux-tdesc.c.
2704 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
2705 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
2706 Define.
2707
2708 2020-02-14 Tom Tromey <tom@tromey.com>
2709
2710 * acinclude.m4: Don't include acx_configure_dir.m4.
2711 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
2712 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
2713 (all, install-only, uninstall, clean-info, clean)
2714 (maintainer-clean): Don't recurse.
2715 (subdir_do, all-lib): Remove.
2716 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
2717 (GNULIB_H): Remove.
2718 (generated_files): Update.
2719 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
2720 * configure: Rebuild.
2721 * configure.ac: Don't configure gnulib or libiberty.
2722 (GNULIB): Update.
2723
2724 2020-02-14 Eli Zaretskii <eliz@gnu.org>
2725
2726 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
2727 preparing the command line for CreateProcess.
2728 (win32_create_inferior): Reflect the program name in debugging
2729 output that shows the process and its command line.
2730
2731 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
2732
2733 * Makefile.in: Rename source files from .c to .cc.
2734 * %.c: Rename to %.cc.
2735 * configure.ac: Rename server.c to server.cc.
2736 * configure: Re-generate.
2737
2738 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
2739
2740 * Makefile.in: Rename gdbsupport source files from .c to .cc.
2741
2742 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
2743
2744 * win32-low.c (win32_create_inferior): Set signal_pid.
2745
2746 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
2747 Pedro Alves <palves@redhat.com>
2748
2749 Skip building gdbserver in a cross-configuration.
2750 * configure.srv: Set $gdbserver_host depending on whether $target
2751 is $host. Use $gdbserver_host instead of $host.
2752
2753 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2754
2755 * configure: Re-generate.
2756
2757 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2758
2759 * configure: Re-generate.
2760
2761 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
2762
2763 * acinclude.m4: Update warning.m4 path.
2764
2765 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
2766
2767 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
2768 (handle_exception): Set siginfo_er.
2769 (win32_xfer_siginfo): New function.
2770
2771 2020-02-07 Tom Tromey <tom@tromey.com>
2772 Pedro Alves <palves@redhat.com>
2773
2774 * README: Update build documentation.
2775 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
2776 host, not target.
2777 * configure.ac: Update paths.
2778 * configure: Rebuild.
2779 * acinclude.m4: Update paths.
2780 * Makefile.in: Update include paths.
2781 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
2782 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
2783 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
2784 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
2785 (%-generated.c): Update paths.
2786 * Move entire directory from ../gdb/gdbserver.
2787
2788 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
2789
2790 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
2791
2792 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2793
2794 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
2795 assignment instead of srv_linux_obj.
2796
2797 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
2798
2799 * server.c (handle_qxfer_libraries): Write segment-address with
2800 paddress.
2801
2802 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
2803
2804 * Makefile.in (install-strip): New target.
2805 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
2806 * aclocal.m4: Regenerate.
2807 * configure: Regenerate.
2808 * configure.ac: Add AM_PROG_INSTALL_STRIP.
2809
2810 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
2811
2812 * Makefile.in (SFILES): Adjust paths to point to real files.
2813 (OBS): Move waitstatus.o to target/waitstatus.o.
2814 (TAGS): Transform paths appropriately.
2815 (%.o): Rename to...
2816 (nat/%.o): ... this pattern rule.
2817 (%.o): Rename to...
2818 (target/%.o): ... this pattern rule.
2819 * configure.srv: Adjust paths throughout to include nat/ prefix
2820 with the revant files.
2821 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
2822 * configure: Regenerate.
2823
2824 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
2825
2826 * Makefile.in (TAGS): Remove config files from the recipe.
2827
2828 2020-01-14 Tom Tromey <tom@tromey.com>
2829
2830 * configure: Rebuild.
2831 * configure.ac: Remove any checks that were added to common.m4.
2832 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
2833 lib-link.m4.
2834
2835 2020-01-14 Tom Tromey <tom@tromey.com>
2836
2837 * server.h: Include config.h.
2838 * gdbreplay.c: Include config.h.
2839 * configure: Rebuild.
2840 * configure.ac: Don't source common.host.
2841 * acinclude.m4: Update path.
2842 * Makefile.in (INCSUPPORT): New variable.
2843 (INCLUDE_CFLAGS): Add INCSUPPORT.
2844 (SFILES): Update paths.
2845 (version-generated.c): Update path to create-version.sh.
2846 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
2847
2848 2020-01-14 Tom Tromey <tom@tromey.com>
2849
2850 * configure.ac (LIBS): Use WIN32APILIBS.
2851 (USE_WIN32API): Don't define.
2852 * configure: Rebuild.
2853
2854 2020-01-14 Tom Tromey <tom@tromey.com>
2855
2856 * configure: Rebuild.
2857
2858 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2859
2860 * Makefile.in (%-generated.c): Remove rule for files from
2861 regformats/i386.
2862
2863 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2864
2865 * configure: Re-generate.
2866
2867 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2868
2869 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
2870 Define to static.
2871 * tracepoint.c (stop_tracing, flush_trace_buffer,
2872 about_to_request_buffer_space, get_trace_state_variable_value,
2873 set_trace_state_variable_value, gdb_collect): Add declaration.
2874
2875 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2876
2877 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
2878 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
2879 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
2880 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
2881 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
2882 static.
2883
2884 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2885
2886 * inferiors.c: Include gdbsupport/common-inferior.h.
2887
2888 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2889
2890 * hostio-errno.c: Include hostio.h.
2891
2892 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2893
2894 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
2895 prerequisite.
2896
2897 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2898
2899 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
2900 * linux-arm-tdesc.h: Include arch/arm.h.
2901
2902 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2903
2904 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
2905
2906 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2907
2908 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2909 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2910
2911 2020-01-10 Pedro Alves <palves@redhat.com>
2912
2913 * fork-child.c (post_fork_inferior): Pass target down to
2914 startup_inferior.
2915 * inferiors.c (switch_to_thread): Add process_stratum_target
2916 parameter.
2917 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2918 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2919 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2920 * remote-utils.c (prepare_resume_reply): Pass the target to
2921 switch_to_thread.
2922 * target.c (the_target): Now a process_stratum_target.
2923 (done_accessing_memory): Pass the target to switch_to_thread.
2924 (set_target_ops): Ajust to use process_stratum_target.
2925 * target.h (struct target_ops): Rename to ...
2926 (struct process_stratum_target): ... this.
2927 (the_target, set_target_ops): Adjust.
2928 (prepare_to_access_memory): Adjust comment.
2929 * win32-low.c (child_xfer_memory): Adjust to use
2930 process_stratum_target.
2931 (win32_target_ops): Now a process_stratum_target.
2932
2933 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2934 Pedro Alves <palves@redhat.com>
2935
2936 * win32-low.c (get_child_debug_event): Extract the fatal exception
2937 from the exit status and convert to the equivalent Posix signal
2938 number.
2939 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2940 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2941
2942 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2943
2944 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2945
2946 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2947
2948 * server.c (gdbserver_version): Change copyright year to 2020.
2949 * gdbreplay.c (gdbreplay_version): Likewise.
2950
2951 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2952
2953 * configure: Regenerate.
2954 * configure.ac: Quote variable arguments of test.
2955
2956 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2957
2958 * Makefile.in: Fix build with GNU Make 3.81
2959
2960 2019-12-16 Tom Tromey <tromey@adacore.com>
2961
2962 * server.c (get_exec_file): Constify result.
2963
2964 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2965
2966 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2967 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2968 * config.in: Regenerate.
2969 * configure: Regenerate.
2970 * configure.ac: Don't check for strerror.
2971 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2972 Call safe_strerror instead of strerror.
2973 * server.h (strerror): Remove this now-unnecessary declaration.
2974 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2975 strerror.
2976 (gdb_agent_helper_thread): Likewise.
2977 * utils.c (perror_with_name): Likewise.
2978
2979 2019-11-26 Tom Tromey <tom@tromey.com>
2980
2981 * configure, config.in: Rebuild.
2982
2983 2019-11-26 Tom Tromey <tom@tromey.com>
2984
2985 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2986 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2987 gdb_sigmask.
2988 * configure, config.in: Rebuild.
2989
2990 2019-11-26 Tom Tromey <tom@tromey.com>
2991
2992 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2993 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2994 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2995 * acinclude.m4: Include ax_pthread.m4.
2996 * config.in, configure: Rebuild.
2997
2998 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2999
3000 * debug.c (debug_set_output): Call safe_strerror instead of
3001 strerror.
3002 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
3003 (linux_kill_one_lwp): Likewise.
3004 (linux_detach_one_lwp): Likewise.
3005 (linux_wait_for_event_filtered): Likewise.
3006 (store_register): Likewise.
3007 * lynx-low.c (lynx_attach): Likewise.
3008 * mem-break.c (insert_memory_breakpoint): Likewise.
3009 (remove_memory_breakpoint): Likewise.
3010 (delete_fast_tracepoint_jump): Likewise.
3011 (set_fast_tracepoint_jump): Likewise.
3012 (uninsert_fast_tracepoint_jumps_at): Likewise.
3013 (reinsert_fast_tracepoint_jumps_at): Likewise.
3014 * nto-low.c (nto_xfer_memory): Likewise.
3015 (nto_resume): Likewise.
3016
3017 2019-11-20 Luis Machado <luis.machado@linaro.org>
3018
3019 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
3020 instead of register count.
3021 * tdesc.c (tdesc_contains_feature): New function.
3022 * tdesc.h (tdesc_contains_feature): New prototype.
3023
3024 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3025
3026 * Makefile.in: Add safe-strerror.c.
3027 * configure: Regenerate.
3028 * configure.ac: Don't source common.host.
3029
3030 2019-11-15 Christian Biesinger <cbiesinger@google.com>
3031
3032 * config.in: Regenerate.
3033 * configure: Regenerate.
3034
3035 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
3036
3037 * ax.c (ax_printf): Handle size_t_arg.
3038
3039 2019-11-06 Christian Biesinger <cbiesinger@google.com>
3040
3041 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
3042 * mi/mi-main.c (output_cores): Likewise.
3043 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
3044 (linux_xfer_osdata_modules): Likewise.
3045 * remote.c (register_remote_support_xml): Likewise.
3046 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
3047 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
3048
3049 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3050
3051 * configure: Regenerate.
3052 * configure.ac: Remove check for strerror_r.
3053
3054 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3055
3056 * config.in: Regenerate.
3057 * configure: Regenerate.
3058 * configure.ac: Also check for strerror_r.
3059
3060 2019-10-31 Christian Biesinger <cbiesinger@google.com>
3061
3062 * ax.h (debug_agent): Remove duplicate declaration.
3063
3064 2019-10-26 Tom de Vries <tdevries@suse.de>
3065
3066 * linux-aarch64-low.c: Fix typos in comments.
3067 * linux-arm-low.c: Same.
3068 * linux-low.c: Same.
3069 * linux-ppc-low.c: Same.
3070 * proc-service.c: Same.
3071 * regcache.h: Same.
3072 * server.c: Same.
3073 * tracepoint.c: Same.
3074 * win32-low.c: Same.
3075
3076 2019-10-25 Tom Tromey <tromey@adacore.com>
3077
3078 * utils.c (xstrdup): Remove.
3079
3080 2019-10-23 Tom Tromey <tom@tromey.com>
3081
3082 * configure, config.in: Rebuild.
3083
3084 2019-10-23 Tom Tromey <tom@tromey.com>
3085
3086 * configure: Rebuild.
3087 * acinclude.m4: Use m4_include, not sinclude.
3088
3089 2019-10-17 Tom Tromey <tromey@adacore.com>
3090
3091 * configure: Rebuild.
3092 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
3093 in AC_CONFIG_FILES invocation.
3094 * Makefile.in (stamp-h, Makefile): Use new-style config.status
3095 invocation.
3096
3097 2019-10-16 Christian Biesinger <cbiesinger@google.com>
3098
3099 * server.c: Include xml-builtin.h.
3100 (get_xml_features): Don't declare xml_builtins here.
3101
3102 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3103
3104 * Makefile.in: Remove references to vec-ipa.o.
3105
3106 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
3107
3108 * Makefile.in: Remove references to vec.c.
3109
3110 2019-10-02 Christian Biesinger <cbiesinger@google.com>
3111
3112 * server.c (server_waiting): Change to bool.
3113 (extended_protocol): Likewise.
3114 (response_needed): Likewise.
3115 (exit_requested): Likewise.
3116 (run_once): Likewise.
3117 (report_no_resumed): Likewise.
3118 (non_stop): Likewise.
3119 (disable_packet_vCont): Likewise.
3120 (disable_packet_Tthread): Likewise.
3121 (disable_packet_qC): Likewise.
3122 (disable_packet_qfThreadInfo): Likewise.
3123 (handle_general_set): Update.
3124 (handle_detach): Update.
3125 (handle_monitor_command): Update.
3126 (handle_query): Update.
3127 (captured_main): Update.
3128 (process_serial_event): Update.
3129 * server.h (server_waiting): Change to bool.
3130 (disable_packet_vCont): Likewise.
3131 (disable_packet_Tthread): Likewise.
3132 (disable_packet_qC): Likewise.
3133 (disable_packet_qfThreadInfo): Likewise.
3134 (run_once): Likewise.
3135 (non_stop): Likewise.
3136 * target.c (target_stop_and_wait): Update.
3137
3138 2019-10-02 Tom Tromey <tromey@adacore.com>
3139
3140 * Makefile.in (SFILES): Add common-inferior.c.
3141 (OBS): Add common-inferior.o.
3142 * server.c (startup_with_shell): Don't define.
3143
3144 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
3145
3146 * linux-low.c (linux_low_read_btrace): Update for change to
3147 std::vector.
3148
3149 2019-09-20 Christian Biesinger <cbiesinger@google.com>
3150
3151 * debug.c (debug_threads): Remove comment in favor of the header.
3152 * debug.h (using_threads): Add declaration.
3153 (debug_threads): Add comment.
3154 * linux-aarch64-low.c: Include debug.h and remove declaration of
3155 debug_threads.
3156 * nto-low.c: Likewise.
3157 * remote-utils.c: Likewise.
3158 * thread-db.c: Likewise.
3159
3160 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3161
3162 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
3163 and powerpc-cell64l-ipa.o.
3164 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
3165 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
3166 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
3167 (spu*-*-*): Remove.
3168
3169 * spu-low.c: Remove file.
3170
3171 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
3172 (parse_spufs_run): Remove.
3173 (ppc_get_pc): Remove Cell/B.E. support.
3174 (ppc_set_pc): Likewise.
3175 (ppc_breakpoint_at): Likewise.
3176 (ppc_arch_setup): Likewise.
3177 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
3178 tdesc_powerpc_cell32l.
3179 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
3180 or init_registers_powerpc_cell32l.
3181 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
3182 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
3183 or init_registers_powerpc_cell32l.
3184 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
3185 (init_registers_powerpc_cell32l): Remove prototype.
3186 (init_registers_powerpc_cell64l): Likewise.
3187
3188 * target.h (struct target_ops): Remove qxfer_spu member.
3189 * server.c (handle_qxfer_spu): Remove.
3190 (qxfer_packets): Remove entry for "spu".
3191 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
3192 * linux-low.c (SPUFS_MAGIC): Remove.
3193 (spu_enumerate_spu_ids): Remove.
3194 (linux_qxfer_spu): Remove.
3195 (linux_target_ops): Remove qxfer_spu member.
3196 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
3197 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
3198 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
3199
3200 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
3201
3202 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
3203 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
3204 * config.in: Regenerate.
3205 * configure: Regenerate.
3206
3207 2019-08-15 Tom Tromey <tromey@adacore.com>
3208
3209 * target.c (target_write_memory): Use gdb::byte_vector.
3210
3211 2019-08-15 Tom Tromey <tromey@adacore.com>
3212
3213 * tracepoint.c (write_inferior_data_pointer)
3214 (write_inferior_integer, write_inferior_int8)
3215 (write_inferior_uinteger, m_tracepoint_action_download)
3216 (r_tracepoint_action_download, x_tracepoint_action_download)
3217 (l_tracepoint_action_download, clear_inferior_trace_buffer)
3218 (download_agent_expr, download_tracepoint_1)
3219 (download_trace_state_variables, upload_fast_traceframes): Update.
3220 * server.c (gdb_write_memory): Update.
3221 * remote-utils.c (relocate_instruction): Update.
3222 * proc-service.c (ps_pdwrite): Update.
3223 * mem-break.c (remove_memory_breakpoint)
3224 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
3225 (uninsert_fast_tracepoint_jumps_at)
3226 (reinsert_fast_tracepoint_jumps_at): Update.
3227 * linux-x86-low.c (append_insns)
3228 (i386_install_fast_tracepoint_jump_pad)
3229 (amd64_write_goto_address, i386_write_goto_address): Update.
3230 * linux-s390-low.c (append_insns, s390_write_goto_address):
3231 Update.
3232 * linux-ppc-low.c (ppc_relocate_instruction)
3233 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
3234 (ppc_write_goto_address): Update.
3235 * linux-aarch64-low.c (append_insns): Update.
3236 * target.h (struct target_ops): Update.
3237 (write_inferior_memory): Don't declare.
3238 * target.c (target_write_memory): Rename from
3239 write_inferior_memory. Remove old target_write_memory.
3240
3241 2019-08-15 Tom Tromey <tromey@adacore.com>
3242
3243 * target.c (write_inferior_memory): Use std::vector.
3244
3245 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
3246
3247 PR build/24886
3248 * configure.ac: Drop enable-libmcheck support.
3249 * configure, config.in: Rebuild.
3250 * acinclude.m4: Don't include it.
3251
3252 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3253
3254 * configure.srv: Remove Arm xml files.
3255
3256 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3257
3258 * configure.srv: Add new files. Remove xml generated files.
3259 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
3260 registers.
3261 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
3262 * linux-aarch32-tdesc.c: New file.
3263 * linux-aarch32-tdesc.h: New file.
3264 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
3265 * linux-arm-low.c (init_registers_arm, tdesc_arm)
3266 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
3267 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
3268 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
3269 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3270 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
3271 (arm_read_description): Call arm_linux_read_description.
3272 (initialize_low_arch): Don't init registers.
3273 * linux-arm-tdesc.c: New file.
3274 * linux-arm-tdesc.h: New file.
3275
3276 2019-07-10 Alan Hayward <alan.hayward@arm.com>
3277
3278 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
3279 Move counter inside for.
3280 (arm_read_description): Check ptrace earlier.
3281 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
3282
3283 2019-07-09 Tom Tromey <tom@tromey.com>
3284
3285 * configure: Rebuild.
3286 * configure.ac: Change common to gdbsupport.
3287 * acinclude.m4: Change common to gdbsupport.
3288 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
3289 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
3290 common to gdbsupport.
3291 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
3292 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
3293 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
3294 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
3295 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
3296 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
3297 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
3298 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
3299 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
3300 common to gdbsupport.
3301
3302 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3303
3304 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
3305 defines.
3306 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
3307
3308 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3309
3310 * configure.srv: Remove legacy xml.
3311 * linux-aarch64-low.c (initialize_low_arch): Remove
3312 initialize_low_tdesc call.
3313 * linux-aarch64-tdesc-selftest.c: Remove file.
3314 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
3315 * linux-x86-low.c (initialize_low_arch): Remove
3316 initialize_low_tdesc call.
3317 * linux-x86-tdesc-selftest.c: Remove file.
3318 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
3319
3320 2019-06-20 Tom de Vries <tdevries@suse.de>
3321
3322 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
3323 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
3324
3325 2019-06-19 Tom de Vries <tdevries@suse.de>
3326
3327 * debug.h (debug_write): Change return type to ssize_t.
3328 * debug.c (debug_write): Same.
3329
3330 2019-06-14 Tom Tromey <tom@tromey.com>
3331
3332 * configure.ac: Use new path to gnulib.
3333 * configure: Rebuild.
3334 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
3335 to gnulib.
3336
3337 2019-06-11 Tom Tromey <tom@tromey.com>
3338
3339 * Makefile.in (SFILES): Add alloc.c.
3340 (OBS): Add alloc.o.
3341 (IPA_OBJS): Add alloc-ipa.o.
3342 (alloc-ipa.o): New target.
3343 (%.o: ../%.c): New pattern rule.
3344
3345 2019-06-10 Tom Tromey <tromey@adacore.com>
3346
3347 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
3348 end warning with a newline.
3349 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
3350 newline.
3351 * thread-db.c (attach_thread): Don't end warning with a newline.
3352 (thread_db_notice_clone): Likewise.
3353 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
3354 newline.
3355 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
3356 end warning with a newline.
3357
3358 2019-06-04 Pedro Alves <palves@redhat.com>
3359
3360 * server.c (captured_main): Use make_unique_xstrdup.
3361
3362 2019-06-02 Tom Tromey <tom@tromey.com>
3363
3364 * gdbreplay.c (fromhex): Remove.
3365 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
3366
3367 2019-05-29 Tom Tromey <tromey@adacore.com>
3368
3369 * configure: Rebuild.
3370
3371 2019-05-06 Kevin Buettner <kevinb@redhat.com>
3372
3373 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
3374 sign extension code on 32-bit builds.
3375
3376 2019-05-03 Eli Zaretskii <eliz@gnu.org>
3377
3378 * remote-utils.c:
3379 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
3380
3381 2019-04-19 Tom Tromey <tom@tromey.com>
3382
3383 * server.c (struct vstop_notif): Derive from notif_event.
3384 <base>: Remove.
3385 (queue_stop_reply): Update.
3386 (remove_all_on_match_ptid): Change type. Rewrite.
3387 (discard_queued_stop_replies): Rewrite.
3388 (in_queued_stop_replies_ptid): Change type.
3389 (in_queued_stop_replies): Rewrite.
3390 (notif_stop): Update.
3391 (queue_stop_reply_callback): Update.
3392 (captured_main): Don't call initialize_notif.
3393 (push_stop_notification): Update.
3394 * notif.c (notif_write_event, handle_notif_ack)
3395 (notif_event_enque, notif_push): Update.
3396 (notif_event_xfree, initialize_notif): Remove.
3397 * notif.h (struct notif_event): Include <list>, not
3398 "common/queue.h".
3399 (struct notif_server) <queue>: Now a std::list.
3400 (notif_event_p): Remove typedef.
3401 (initialize_notif): Don't declare.
3402 (struct notif_event): Add virtual destructor.
3403
3404 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3405
3406 * ax.c (ax_vdebug): Call debug_printf.
3407 * debug.c (debug_write): New function.
3408 * debug.h (debug_write): New declaration.
3409 * linux-low.c (sigchld_handler): Call debug_write.
3410
3411 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3412
3413 * debug.c (debug_set_output): New function.
3414 (debug_vprintf): Send output to debug_file.
3415 (debug_flush): Likewise.
3416 * debug.h (debug_set_output): New declaration.
3417 * server.c (handle_monitor_command): Add debug-file option.
3418 (captured_main): Likewise.
3419
3420 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3421
3422 * debug.c (remote_debug): Add definition.
3423 * debug.h (remote_debug): Add declaration.
3424 * hostio.c (remote_debug): Remove declaration.
3425 * remote-utils.c (struct ui_file): Likewise.
3426 (remote_debug): Likewise.
3427 * remote-utils.h (remote_debug): Likewise,
3428 * server.c (remote_debug): Remove definition.
3429
3430 2019-04-10 Kevin Buettner <kevinb@redhat.com>
3431
3432 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
3433 when using a 64-bit gdbserver.
3434
3435 2019-04-09 Tom Tromey <tromey@adacore.com>
3436
3437 * linux-low.c (select_event_lwp): Use find_thread_in_random.
3438
3439 2019-04-08 Tom Tromey <tom@tromey.com>
3440
3441 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
3442 throw.
3443 (linux_resume_one_lwp): Likewise.
3444
3445 2019-04-08 Tom Tromey <tom@tromey.com>
3446
3447 * gdbreplay.c: Update.
3448 * linux-low.c: Update.
3449 * server.c: Update.
3450
3451 2019-04-08 Tom Tromey <tom@tromey.com>
3452
3453 * server.c: Use C++ exception handling.
3454 * linux-low.c: Use C++ exception handling.
3455 * gdbreplay.c: Use C++ exception handling.
3456
3457 2019-04-08 Tom Tromey <tom@tromey.com>
3458
3459 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
3460 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
3461 (captured_main, main): Update.
3462 * gdbreplay.c (main): Update.
3463
3464 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3465
3466 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
3467 value in argument pointer, return 1 if the entry is found and 0
3468 otherwise. Move comment.
3469 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
3470 * linux-low.h (linux_get_auxv): Declare.
3471 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
3472
3473 2019-04-05 Tom Tromey <tromey@adacore.com>
3474
3475 * server.c (gdbserver_usage): Use upper-case for metasyntactic
3476 variables.
3477
3478 2019-03-28 Alan Hayward <alan.hayward@arm.com>
3479
3480 * linux-low.c (AT_HWCAP2): Add define if not already included.
3481
3482 2019-03-26 Alan Hayward <alan.hayward@arm.com>
3483
3484 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
3485 (aarch64_arch_setup): Call linux_get_hwcap.
3486 * linux-arm-low.c (arm_get_hwcap): Remove function.
3487 (arm_read_description): Call linux_get_hwcap.
3488 * linux-low.c (linux_get_auxv): New function.
3489 (linux_get_hwcap): Likewise.
3490 (linux_get_hwcap2): Likewise.
3491 * linux-low.h (linux_get_hwcap): New declaration.
3492 (linux_get_hwcap2): Likewise.
3493 * linux-ppc-low.c (ppc_get_auxv): Remove function.
3494 (ppc_arch_setup): Call linux_get_hwcap.
3495 * linux-s390-low.c (s390_get_hwcap): Remove function.
3496 (s390_arch_setup): Call linux_get_hwcap.
3497
3498 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3499 Jiong Wang <jiong.wang@arm.com>
3500
3501 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
3502 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
3503 to fail.
3504 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
3505
3506 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3507 Jiong Wang <jiong.wang@arm.com>
3508
3509 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
3510 (aarch64_get_hwcap): New function.
3511 (aarch64_arch_setup): Read APIA hwcap.
3512
3513 2019-03-22 Alan Hayward <alan.hayward@arm.com>
3514 Jiong Wang <jiong.wang@arm.com>
3515
3516 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
3517 (initialize_low_tracepoint): Likewise.
3518 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
3519 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
3520 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
3521 (aarch64_linux_read_description): Likewise.
3522 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
3523
3524 2019-03-12 John Baldwin <jhb@FreeBSD.org>
3525
3526 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
3527 i386_create_target_description for 'segments' parameter.
3528 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
3529 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3530 * win32-i386-low.c (i386_arch_setup): Likewise.
3531
3532 2019-03-12 Tom Tromey <tromey@adacore.com>
3533
3534 * linux-low.c (iterate_over_lwps): Update.
3535
3536 2019-03-06 Tom Tromey <tom@tromey.com>
3537
3538 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
3539 (captured_main): Use SCOPE_EXIT.
3540
3541 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
3542
3543 * configure.srv: Use '$enable_unittest' instead of '$development'
3544 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
3545 case.
3546
3547 2019-02-27 Tom Tromey <tromey@adacore.com>
3548
3549 * gdbreplay.c (logchar): Handle \r\n.
3550
3551 2019-02-07 Alan Hayward <alan.hayward@arm.com>
3552
3553 * linux-low.c (linux_attach): Add process before lwp.
3554 * server.c (attach_inferior): Check if already attached.
3555
3556 2019-02-07 Tom Tromey <tom@tromey.com>
3557
3558 * x86-tdesc.h: Rename include guard.
3559 * x86-low.h: Add include guard.
3560 * wincecompat.h: Rename include guard.
3561 * win32-low.h: Add include guard.
3562 * utils.h: Rename include guard.
3563 * tracepoint.h: Rename include guard.
3564 * tdesc.h: Rename include guard.
3565 * target.h: Rename include guard.
3566 * server.h: Rename include guard.
3567 * remote-utils.h: Rename include guard.
3568 * regcache.h: Rename include guard.
3569 * nto-low.h: Rename include guard.
3570 * notif.h: Add include guard.
3571 * mem-break.h: Rename include guard.
3572 * lynx-low.h: Add include guard.
3573 * linux-x86-tdesc.h: Add include guard.
3574 * linux-s390-tdesc.h: Add include guard.
3575 * linux-ppc-tdesc-init.h: Add include guard.
3576 * linux-low.h: Add include guard.
3577 * linux-aarch64-tdesc.h: Add include guard.
3578 * linux-aarch32-low.h: Add include guard.
3579 * inferiors.h: Rename include guard.
3580 * i387-fp.h: Rename include guard.
3581 * hostio.h: Rename include guard.
3582 * gdbthread.h: Rename include guard.
3583 * gdb_proc_service.h: Rename include guard.
3584 * event-loop.h: Rename include guard.
3585 * dll.h: Rename include guard.
3586 * debug.h: Rename include guard.
3587 * ax.h: Rename include guard.
3588
3589 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
3590
3591 PR gdb/23985
3592 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
3593 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
3594
3595 2019-01-25 Tom Tromey <tom@tromey.com>
3596
3597 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
3598
3599 2019-01-25 Tom Tromey <tom@tromey.com>
3600
3601 * win32-low.c: Fix common/ includes.
3602 * win32-i386-low.c: Fix common/ includes.
3603 * tracepoint.c: Fix common/ includes.
3604 * thread-db.c: Fix common/ includes.
3605 * target.h: Fix common/ includes.
3606 * symbol.c: Fix common/ includes.
3607 * spu-low.c: Fix common/ includes.
3608 * server.h: Fix common/ includes.
3609 * server.c: Fix common/ includes.
3610 * remote-utils.c: Fix common/ includes.
3611 * regcache.h: Fix common/ includes.
3612 * regcache.c: Fix common/ includes.
3613 * nto-x86-low.c: Fix common/ includes.
3614 * notif.h: Fix common/ includes.
3615 * mem-break.h: Fix common/ includes.
3616 * lynx-low.c: Fix common/ includes.
3617 * lynx-i386-low.c: Fix common/ includes.
3618 * linux-x86-tdesc-selftest.c: Fix common/ includes.
3619 * linux-x86-low.c: Fix common/ includes.
3620 * linux-low.c: Fix common/ includes.
3621 * inferiors.h: Fix common/ includes.
3622 * i387-fp.c: Fix common/ includes.
3623 * hostio.c: Fix common/ includes.
3624 * hostio-errno.c: Fix common/ includes.
3625 * gdbthread.h: Fix common/ includes.
3626 * gdbreplay.c: Fix common/ includes.
3627 * fork-child.c: Fix common/ includes.
3628 * event-loop.c: Fix common/ includes.
3629 * ax.c:
3630 (enum gdb_agent_op): Fix common/ includes.
3631
3632 2019-01-21 Tom Tromey <tom@tromey.com>
3633
3634 * tracepoint.c: Fix includes.
3635 * remote-utils.c: Fix includes.
3636 * linux-x86-low.c: Fix includes.
3637
3638 2019-01-01 Joel Brobecker <brobecker@adacore.com>
3639
3640 * gdbreplay.c (gdbreplay_version): Update copyright year in
3641 version message.
3642 * server.c (gdbserver_version): Likewise.
3643
3644 2018-12-05 Alan Hayward <alan.hayward@arm.com>
3645
3646 * linux-low.c (add_lwp): Switch ordering.
3647
3648 2018-11-29 Tom Tromey <tom@tromey.com>
3649
3650 * win32-low.c (win32_join): Take pid, not process.
3651 * target.h (struct target_ops) <join>: Change argument type.
3652 (join_inferior): Change argument name.
3653 * spu-low.c (spu_join): Take pid, not process.
3654 * server.c (handle_detach): Preserve pid before destroying
3655 process.
3656 * lynx-low.c (lynx_join): Take pid, not process.
3657 * linux-low.c (linux_join): Take pid, not process.
3658
3659 2018-11-23 Alan Hayward <alan.hayward@arm.com>
3660
3661 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
3662 (aarch64_cannot_fetch_register): Likewise.
3663 (struct linux_target_ops): Update references.
3664
3665 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3666
3667 * linux-ppc-low.c: Include nat/linux-ptrace.h.
3668
3669 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3670
3671 * configure.srv (ipa_ppc_linux_regobj): Add
3672 powerpc-isa207-htm-vsx32l-ipa.o and
3673 powerpc-isa207-htm-vsx64l-ipa.o.
3674 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
3675 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
3676 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
3677 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
3678 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
3679 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
3680 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
3681 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
3682 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3683 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
3684 (init_registers_powerpc_isa207_htm_vsx32l)
3685 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
3686 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
3687 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
3688 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
3689 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
3690 (ppc_store_tm_ctarregset): New functions.
3691 (ppc_regsets): Add entries for HTM regsets.
3692 (ppc_arch_setup): Set htm in features struct when needed. Set
3693 sizes for the HTM regsets.
3694 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
3695 (initialize_low_arch): Call
3696 init_registers_powerpc_isa207_htm_vsx32l and
3697 init_registers_powerpc_isa207_htm_vsx64l.
3698 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3699 PPC_TDESC_ISA207_HTM_VSX.
3700 (initialize_low_tracepoint): Call
3701 init_registers_powerpc_isa207_htm_vsx32l and
3702 init_registers_powerpc_isa207_htm_vsx64l.
3703
3704 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3705
3706 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
3707 rs6000/power-linux-pmu.xml to srv_xmlfiles.
3708 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
3709 (ppc_store_pmuregset): New functions.
3710 (ppc_regsets): Add entries for ebb and pmu regsets.
3711 (ppc_arch_setup): Set isa207 in features struct if the ebb and
3712 pmu regsets are available. Set sizes for these regsets.
3713
3714 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3715
3716 * configure.srv (ipa_ppc_linux_regobj): Add
3717 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
3718 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
3719 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
3720 rs6000/powerpc-isa207-vsx32l.xml, and
3721 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
3722 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3723 <PPC_TDESC_ISA207_VSX>: New enum value.
3724 (init_registers_powerpc_isa207_vsx32l): Declare.
3725 (init_registers_powerpc_isa207_vsx64l): Declare.
3726 * linux-ppc-low.c (ppc_fill_tarregset): New function.
3727 (ppc_store_tarregset): New function.
3728 (ppc_regsets): Add entry for the TAR regset.
3729 (ppc_arch_setup): Set isa207 in features struct when needed. Set
3730 size for the TAR regsets.
3731 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
3732 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
3733 and init_registers_powerpc_isa207_vsx64l.
3734 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
3735 (initialize_low_tracepoint): Call
3736 init_registers_powerpc_isa207_vsx32l and
3737 init_registers_powerpc_isa207_vsx64l.
3738
3739 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3740 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3741
3742 * configure.srv (ipa_ppc_linux_regobj): Add
3743 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
3744 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
3745 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
3746 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
3747 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
3748 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
3749 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
3750 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
3751 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
3752 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
3753 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
3754 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
3755 (ppc_hwcap): Add comment.
3756 (ppc_hwcap2): New global.
3757 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
3758 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
3759 (ppc_regsets): Add entries for the DSCR and PPR regsets.
3760 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
3761 when needed. Set sizes for the the DSCR and PPR regsets.
3762 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
3763 (initialize_low_arch): Call
3764 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3765 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3766 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
3767 PPC_TDESC_ISA205_PPR_DSCR_VSX.
3768 (initialize_low_tracepoint): Call
3769 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
3770 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
3771
3772 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3773
3774 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
3775
3776 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
3777 Simon Marchi <simark@simark.ca>
3778
3779 * acinclude.m4: Include "../selftest.m4".
3780 * configure: Regenerate.
3781 * configure.ac: Use "GDB_AC_SELFTEST".
3782 * configure.srv: Use "$enable_unittests" instead of
3783 "$development" when checking whether unit tests have been
3784 enabled.
3785 * server.c (captured_main): Update message informing that
3786 selftests have been disabled.
3787
3788 2018-10-04 Tom Tromey <tom@tromey.com>
3789
3790 * configure: Rebuild.
3791
3792 2018-10-04 Tom Tromey <tom@tromey.com>
3793
3794 * server.c (handle_status): Rename inner "thread".
3795 (process_serial_event): Declare "res" in 'm' case.
3796 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
3797 (iterate_over_lwps): Rename inner "thread".
3798 (linux_qxfer_libraries_svr4): Rename inner "len".
3799 * gdbthread.h (find_thread_in_random): Rename inner "thread".
3800
3801 2018-10-01 Gary Benson <gbenson@redhat.com>
3802
3803 * gdb_proc_service.h: Moved common code to
3804 common/gdb_proc_service.h.
3805
3806 2018-10-01 Gary Benson <gbenson@redhat.com>
3807
3808 * gdb_proc_service.h: Synchronize comments and whitespace with
3809 GDB's version of this file.
3810
3811 2018-09-25 Tom Tromey <tom@tromey.com>
3812
3813 * configure: Rebuild.
3814 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
3815
3816 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3817
3818 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
3819 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
3820 ($(IPA_LIB)): Sort IPA_OBJS.
3821
3822 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3823
3824 * Makefile.in: Remove references to $(ADD_DEPS).
3825
3826 2018-09-16 Tom Tromey <tom@tromey.com>
3827
3828 * remote-utils.c (remote_open): Use GNU style for metasyntactic
3829 variables.
3830 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
3831 variables.
3832
3833 2018-09-05 Tom Tromey <tom@tromey.com>
3834
3835 * configure: Rebuild.
3836
3837 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3838
3839 PR build/23399
3840 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
3841
3842 2018-08-27 Tom Tromey <tom@tromey.com>
3843
3844 PR build/23087:
3845 * configure: Rebuild.
3846
3847 2018-08-27 Tom Tromey <tom@tromey.com>
3848
3849 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
3850 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
3851 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
3852 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
3853 (s390x_emit_stack_adjust): Add casts to unsigned char.
3854
3855 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
3856
3857 PR gdb/23374
3858 PR gdb/23375
3859 * server.h (struct client_state) <disable_randomization>:
3860 Initialize to 1.
3861
3862 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3863
3864 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
3865 variable.
3866 (mips_supply_ptrace_register): Likewise.
3867
3868 2018-07-22 Tom Tromey <tom@tromey.com>
3869
3870 * configure: Rebuild.
3871
3872 2018-07-22 Tom Tromey <tom@tromey.com>
3873
3874 * win32-low.c (win32_create_inferior): Remove unused variables.
3875 * gdbreplay.c (remote_open): Remove unused variable.
3876 * remote-utils.c (remote_prepare): Remove unused variable.
3877 * x86-tdesc.h (X86_TDESC_H): Define.
3878 (amd64_expedite_regs): Define conditionally.
3879 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
3880 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
3881 * remote-utils.c (readchar): Remove unused variable.
3882
3883 2018-07-13 Pedro Alves <palves@redhat.com>
3884
3885 * linux-low.c (linux_kill): Change parameter to process_info
3886 pointer instead of pid. Adjust.
3887 * lynx-low.c (lynx_kill): Likewise.
3888 * nto-low.c (nto_kill): Likewise.
3889 * spu-low.c (spu_kill): Likewise.
3890 * win32-low.c (win32_kill): Likewise.
3891 * server.c (handle_v_kill, kill_inferior_callback)
3892 (detach_or_kill_for_exit): Adjust.
3893 * target.c (kill_inferior): Change parameter to process_info
3894 pointer instead of pid. Adjust.
3895 * target.h (struct target_ops) <kill>: Change parameter to
3896 process_info pointer instead of pid. Adjust all implementations
3897 and callers.
3898 (kill_inferior): Likewise.
3899
3900 2018-07-13 Pedro Alves <palves@redhat.com>
3901
3902 * linux-low.c (linux_detach, linux_join): Change parameter to
3903 process_info pointer instead of pid. Adjust.
3904 * lynx-low.c (lynx_detach, lynx_join): Likewise.
3905 * nto-low.c (nto_detach): Likewise.
3906 * spu-low.c (spu_detach, spu_join): Likewise.
3907 * win32-low.c (win32_detach, win32_join): Likewise.
3908 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3909 * target.h (struct target_ops) <detach, join>: Change parameter to
3910 process_info pointer instead of pid. Adjust all implementations
3911 and callers.
3912 (detach_inferior, join_inferior): Rename 'pid' parameter to
3913 'proc'.
3914
3915 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3916 Jan Kratochvil <jan.kratochvil@redhat.com>
3917 Paul Fertser <fercerpav@gmail.com>
3918 Tsutomu Seki <sekiriki@gmail.com>
3919
3920 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3921 (OBS): Add 'common/netstuff.o'.
3922 (GDBREPLAY_OBS): Likewise.
3923 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3924 (remote_open): Implement support for IPv6
3925 connections.
3926 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3927 and 'wspiapi.h'.
3928 (handle_accept_event): Accept connections from IPv6 sources.
3929 (remote_prepare): Handle IPv6-style hostnames; implement
3930 support for IPv6 connections.
3931 (remote_open): Implement support for printing connections from
3932 IPv6 sources.
3933
3934 2018-07-11 Pedro Alves <palves@redhat.com>
3935
3936 PR gdb/23377
3937 * mem-break.c (any_persistent_commands): Add process_info
3938 parameter and use it instead of relying on the current process.
3939 Change return type to bool.
3940 * mem-break.h (any_persistent_commands): Add process_info
3941 parameter and change return type to bool.
3942 * server.c (handle_detach): Remove require_running_or_return call.
3943 Look up the process_info for the process we're about to detach.
3944 If not found, return back error to GDB. Adjust
3945 any_persistent_commands call to pass down a process pointer.
3946
3947 2018-07-11 Pedro Alves <palves@redhat.com>
3948
3949 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3950 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3951 instead of collect_register_by_name.
3952 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3953 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3954
3955 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3956 Pedro Alves <palves@redhat.com>
3957
3958 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3959
3960 2018-07-03 Tom Tromey <tom@tromey.com>
3961
3962 * linux-low.c: Update.
3963 * lynx-low.c: Update.
3964 * mem-break.c: Update.
3965 * nto-low.c: Update.
3966 * remote-utils.c: Update.
3967 * server.c: Update.
3968 * spu-low.c: Update.
3969 * target.c: Update.
3970 * win32-low.c: Update.
3971
3972 2018-07-03 Tom Tromey <tom@tromey.com>
3973
3974 * server.c: Update.
3975
3976 2018-07-03 Tom Tromey <tom@tromey.com>
3977
3978 * linux-low.c: Update.
3979
3980 2018-07-03 Tom Tromey <tom@tromey.com>
3981
3982 * target.c: Update.
3983
3984 2018-07-03 Tom Tromey <tom@tromey.com>
3985
3986 * linux-low.c: Update.
3987 * linux-mips-low.c: Update.
3988 * lynx-low.c: Update.
3989 * nto-low.c: Update.
3990 * remote-utils.c: Update.
3991 * server.c: Update.
3992 * spu-low.c: Update.
3993 * target.c: Update.
3994 * thread-db.c: Update.
3995
3996 2018-07-03 Tom Tromey <tom@tromey.com>
3997
3998 * linux-low.c: Update.
3999 * linux-mips-low.c: Update.
4000 * lynx-low.c: Update.
4001 * mem-break.c: Update.
4002 * nto-low.c: Update.
4003 * remote-utils.c: Update.
4004 * server.c: Update.
4005 * spu-low.c: Update.
4006 * target.c: Update.
4007 * tracepoint.c: Update.
4008
4009 2018-07-03 Tom Tromey <tom@tromey.com>
4010
4011 * linux-low.c: Update.
4012 * linux-ppc-low.c: Update.
4013 * linux-x86-low.c: Update.
4014 * proc-service.c: Update.
4015 * server.c: Update.
4016 * spu-low.c: Update.
4017 * thread-db.c: Update.
4018 * win32-low.c: Update.
4019
4020 2018-07-03 Tom Tromey <tom@tromey.com>
4021
4022 * linux-low.c: Update.
4023 * lynx-low.c: Update.
4024 * nto-low.c: Update.
4025 * remote-utils.c: Update.
4026 * spu-low.c: Update.
4027 * thread-db.c: Update.
4028 * win32-low.c: Update.
4029
4030 2018-06-29 Joel Brobecker <brobecker@adacore.com>
4031
4032 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
4033 parameter in call to 'amd64_create_target_description'.
4034
4035 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4036
4037 * x86-tdesc.h: Remove executable permission flag.
4038
4039 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4040
4041 * configure.ac: Remove AC_PREREQ, add missing quoting.
4042 * configure: Re-generate.
4043 * config.in: Re-generate.
4044 * aclocal.m4: Re-generate.
4045
4046 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
4047
4048 * tracepoint.h (current_traceframe): Remove declaration.
4049
4050 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4051
4052 * linux-aarch64-low.c (is_sve_tdesc): New function.
4053 (aarch64_sve_regs_copy_to_regcache): Likewise.
4054 (aarch64_sve_regs_copy_from_regcache): Likewise.
4055 (aarch64_regs_info): Add SVE checks.
4056 (initialize_low_arch): Initialize SVE.
4057
4058 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4059
4060 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
4061
4062 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4063
4064 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
4065 (initialize_low_tracepoint): Likewise
4066 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
4067 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
4068 param.
4069 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
4070 checks.
4071 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
4072
4073 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4074
4075 * server.h (PBUFSIZ): Increase size
4076
4077 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4078
4079 * regcache.c (regcache::raw_compare): New function.
4080 * regcache.h (regcache::raw_compare): New declaration.
4081
4082 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4083
4084 * regcache.c (new_register_cache): Use new.
4085 (free_register_cache): Use delete.
4086 (register_data): Use const.
4087 (supply_register): Move body inside regcache.
4088 (regcache::raw_supply): New override function.
4089 (collect_register): Move body inside regcache.
4090 (regcache::raw_collect): New override function.
4091 (regcache::get_register_status): New override function.
4092 * regcache.h (struct regcache): Inherit from reg_buffer_common.
4093
4094 2018-06-09 Tom Tromey <tom@tromey.com>
4095
4096 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
4097 declare queue.
4098 (event_queue): Use std::queue.
4099 (gdb_event_xfree): Remove.
4100 (initialize_event_loop, process_event, wait_for_event): Update.
4101
4102 2018-06-08 Stan Cox <scox@redhat.com>
4103
4104 * win32-low.c (win32_create_inferior): last_ptid and last_status
4105 moved to client_state.
4106
4107 2018-06-08 Pedro Alves <palves@redhat.com>
4108
4109 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
4110 common/common-exceptions.o, common/common-utils.o,
4111 common/errors.o, common/print-utils.o and utils.o.
4112 * gdbreplay.c: Include "common-defs.h" instead of the two
4113 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
4114 string.h or alloca.h.
4115 (perror_with_name): Delete.
4116 (remote_open): Use xstrdup instead of strdup.
4117 (main): Rename to ...
4118 (captured_main): ... this.
4119 (main): New.
4120
4121 2018-06-08 Tom Tromey <tom@tromey.com>
4122
4123 * linux-low.c (linux_low_read_btrace): Update.
4124
4125 2018-06-04 Stan Cox <scox@redhat.com>
4126
4127 * server.h (struct client_state): New.
4128 * server.c (cont_thread, general_thread, multi_process)
4129 (report_fork_events, report_vfork_events, report_exec_events)
4130 (report_thread_events, swbreak_feature, hwbreak_feature)
4131 (vCont_supported, disable_randomization, pass_signals)
4132 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
4133 Moved to client_state.
4134 * remote-utils.c (remote_debug, noack_mode)
4135 (transport_is_reliable): Moved to client_state.
4136 * tracepoint.c (current_traceframe): Moved to client_state.
4137
4138 Update all callers.
4139 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
4140 linux-low.c, remote-utils.h, target.c: Use client_state.
4141
4142 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4143
4144 * configure.srv: Add new c/h file.
4145
4146 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4147
4148 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
4149 null VQ.
4150
4151 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4152
4153 * gdb.arch/mips-fpregset-core.exp: New test.
4154 * gdb.arch/mips-fpregset-core.c: New test source.
4155
4156 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
4157
4158 PR server/23198
4159 * hostio.c (require_int): Do not report overflow for integers
4160 between 0xfffffff and 0x7fffffff.
4161
4162 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4163
4164 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
4165 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
4166 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
4167 functions.
4168 (the_low_target): Wire them.
4169
4170 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4171
4172 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
4173 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
4174 mode. Call collect_register_by_name with vscr using
4175 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
4176 (ppc_store_vrregset): Add and set vscr_offset variable as in
4177 ppc_fill_vrregset. Call supply_register_by_name with vscr using
4178 vscr_offset.
4179
4180 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4181
4182 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4183 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
4184 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
4185
4186 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4187
4188 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
4189 (ppc_store_vsxregset): Likewise.
4190 (ppc_fill_vrregset): Likewise.
4191 (ppc_store_vrregset): Likewise.
4192 (ppc_fill_evrregset): Likewise.
4193 (ppc_store_evrregset): Likewise.
4194 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
4195 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
4196 needed.
4197
4198 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4199
4200 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
4201 wordsize of the inferior. Call ppc_linux_target_wordsize.
4202
4203 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4204
4205 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
4206 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
4207 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
4208 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4209 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4210 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4211 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4212 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4213 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4214 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4215 (tdesc_powerpc_e500l): Remove.
4216 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
4217 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
4218 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
4219 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
4220 linux-ppc-tdesc.h.
4221 (ppc_arch_setup): Remove target description matching code. Fill a
4222 ppc_linux_features struct and call ppc_linux_match_description
4223 with it.
4224
4225 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4226
4227 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
4228 width of the requested register exceeds the width of the
4229 `ptrace' data type.
4230 (mips_cannot_store_register): Likewise.
4231
4232 2018-05-21 Maciej W. Rozycki <macro@mips.com>
4233
4234 * linux-mips-low.c (mips_fetch_register): New function. Update
4235 preceding comment.
4236 (mips_store_gregset): Supply 0 rather than $restart for $zero.
4237 (the_low_target): Wire `mips_fetch_register'.
4238
4239 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4240
4241 * lynx-i386-low.c (LYNXOS_178): New macro.
4242 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
4243 the layout on LynxOS-178.
4244 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
4245 handle floating point registers that are not supported by
4246 LynxOS-178.
4247
4248 2018-05-10 Tom Tromey <tom@tromey.com>
4249
4250 * configure: Rebuild.
4251
4252 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4253
4254 PR server/23158:
4255 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
4256 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
4257 Use it to set the expedite_regs field in the given tdesc.
4258 * x86-tdesc.h: New file.
4259 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
4260 Adjust following the addition of the new expedite_regs parameter
4261 to init_target_desc.
4262 * linux-tic6x-low.c (tic6x_read_description): Likewise.
4263 * linux-x86-tdesc.c: #include "x86-tdesc.h".
4264 (i386_linux_read_description, amd64_linux_read_description):
4265 Adjust following the addition of the new expedite_regs parameter
4266 to init_target_desc.
4267 * lynx-i386-low.c: #include "x86-tdesc.h".
4268 (lynx_i386_arch_setup): Adjust following the addition of the new
4269 expedite_regs parameter to init_target_desc.
4270 * nto-x86-low.c: #include "x86-tdesc.h".
4271 (nto_x86_arch_setup): Adjust following the addition of the new
4272 expedite_regs parameter to init_target_desc.
4273 * win32-i386-low.c: #include "x86-tdesc.h".
4274 (i386_arch_setup): Adjust following the addition of the new
4275 expedite_regs parameter to init_target_desc.
4276
4277 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4278
4279 PR server/23158:
4280 * win32-low.c (win32_create_inferior): Add call to my_wait
4281 setting last_status global.
4282
4283 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4284
4285 PR server/23158:
4286 * win32-low.c (create_process): Only call gdb_tilde_expand if
4287 inferior_cwd is not NULL.
4288
4289 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4290
4291 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
4292 registers to the cache if their values have changed.
4293 (i387_xsave_to_cache): Provide default values for x87 control
4294 registers when these features are available, but disabled.
4295 * regcache.c (supply_register_by_name_zeroed): New function.
4296 * regcache.h (supply_register_by_name_zeroed): Declare new
4297 function.
4298
4299 2018-05-07 Tom Tromey <tom@tromey.com>
4300
4301 * configure: Rebuild.
4302
4303 2018-05-04 Tom Tromey <tom@tromey.com>
4304
4305 * configure: Rebuild.
4306
4307 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4308 Pedro Alves <palves@redhat.com>
4309
4310 * linux-aarch64-low.c (aarch64_stopped_data_address):
4311 Likewise.
4312
4313 2018-04-27 Tom Tromey <tom@tromey.com>
4314
4315 * configure: Rebuild.
4316
4317 2018-04-23 Tom Tromey <tom@tromey.com>
4318
4319 * configure: Rebuild.
4320
4321 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
4322
4323 * Makefile.in (depcomp): Add "..".
4324 (all_deps_files): New and use it.
4325
4326 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4327
4328 * configure.srv (aarch64*-*-linux*): Don't include xml.
4329 (i[34567]86-*-cygwin*): Likewise.
4330 (i[34567]86-*-linux*): Likewise.
4331 (i[34567]86-*-lynxos*): Likewise.
4332 (i[34567]86-*-mingw32ce*): Likewise.
4333 (i[34567]86-*-mingw*): Likewise.
4334 (i[34567]86-*-nto*): Likewise.
4335 (tic6x-*-uclinux): Likewise.
4336 (x86_64-*-linux*): Likewise.
4337 (x86_64-*-mingw*): Likewise.
4338 (x86_64-*-cygwin*): Likewise.
4339
4340 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4341
4342 * tdesc.c: Remove xml parameter.
4343
4344 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4345
4346 * server.c (get_features_xml): Remove cast.
4347 * tdesc.c (void target_desc::accept): Fill in function.
4348 (tdesc_get_features_xml): Remove old xml creation.
4349 (print_xml_feature::visit_pre): Add xml vistor.
4350 * tdesc.h (struct target_desc): Make xmltarget mutable.
4351 (tdesc_get_features_xml): Remove declaration.
4352
4353 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4354
4355 * tdesc.c (tdesc_architecture_name): Add new function.
4356 (tdesc_osabi_name): Likewise.
4357 (tdesc_get_features_xml): Use new functions.
4358
4359 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4360
4361 * tdesc.c (tdesc_create_flags): Remove.
4362 (tdesc_add_flag): Likewise.
4363 (tdesc_named_type): Likewise.
4364 (tdesc_create_union): Likewise.
4365 (tdesc_create_struct): Likewise.
4366 (tdesc_create_vector): Likewise.
4367 (tdesc_add_bitfield): Likewise.
4368 (tdesc_add_field): Likewise.
4369 (tdesc_set_struct_size): Likewise.
4370
4371 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4372
4373 * tdesc.c (~target_desc): Remove implictly deleted items.
4374 (init_target_desc): Iterate all features.
4375 (tdesc_get_features_xml): Use vector.
4376 (tdesc_create_feature): Create feature.
4377 * tdesc.h (tdesc_feature) Remove
4378 (target_desc): Add features.
4379
4380 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4381
4382 * Makefile.in: Add common/tdesc.c
4383 * tdesc.c (init_target_desc): init all reg_defs from register
4384 vector.
4385 (tdesc_create_reg): Create tdesc_reg.
4386 * tdesc.h (tdesc_feature): Add register vector.
4387
4388 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
4389
4390 * tdesc.h (struct target_desc) <features>: Change type to
4391 std::vector<std::string>.
4392 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
4393 changes.
4394 (tdesc_get_features_xml): Likewise.
4395 (tdesc_create_feature): Likewise.
4396
4397 2018-03-26 Alan Hayward <alan.hayward@arm.com>
4398
4399 * regcache.c (find_register_by_number): Return a ref.
4400 (find_regno): Use references.
4401 (register_size): Likewise.
4402 (register_data): Likewise.
4403 * tdesc.c (target_desc::~target_desc): Remove free calls.
4404 (target_desc::operator==): Use std::vector compare.
4405 (init_target_desc): Use reference.
4406 (tdesc_create_reg): Use reg constructors.
4407 * tdesc.h (struct target_desc): Replace pointer with object.
4408
4409 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4410
4411 * regcache.c (find_register_by_number): Make static.
4412 (find_regno): Use find_register_by_number
4413 * regcache.h (struct reg): Remove declaration.
4414
4415 2018-03-23 Alan Hayward <alan.hayward@arm.com>
4416
4417 * tdesc.c (target_desc::~target_desc): Move to here.
4418 (target_desc::operator==): Likewise.
4419 * tdesc.h (target_desc::~target_desc): Move from here.
4420 (target_desc::operator==): Likewise.
4421
4422 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
4423
4424 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
4425
4426 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4427
4428 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
4429 S390_TDESC_GS.
4430 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
4431 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
4432 and init_registers_s390_gs_linux64.
4433
4434 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4435
4436 * linux-s390-low.c (s390_fill_gs): Remove function.
4437 (s390_fill_gsbc): Remove function.
4438 (s390_regsets): Set fill functions for the guarded storage regsets
4439 to NULL.
4440
4441 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4442
4443 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4444 the word size. Add comment.
4445 (s390_get_wordsize): New function.
4446 (s390_arch_setup): No longer select a temporary tdesc to fetch the
4447 pswm with it. Instead, use s390_get_wordsize to determine the
4448 word size first and derive the correct tdesc from that directly.
4449
4450 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
4451
4452 * Makefile.in: Include silent-rules.mk.
4453 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
4454 (COMPILE): Add ECHO_CXX.
4455 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4456 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
4457 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
4458 (version-generated.c): Add ECHO_GEN.
4459 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
4460 (IPAGENT_COMPILE): Add ECHO_CXX.
4461 (%-generated.c): Add ECHO_REGDAT.
4462
4463 2018-03-14 Tom Tromey <tom@tromey.com>
4464
4465 PR cli/14977:
4466 * ax.c (ax_printf): Special case for NULL.
4467
4468 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4469
4470 * linux-low.c (linux_qxfer_libraries_svr4): Use
4471 xml_escape_text_append.
4472
4473 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
4474
4475 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
4476
4477 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4478
4479 * server.c (handle_general_set): Remove unnecessary xstrdup.
4480
4481 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4482
4483 * server.c (parse_debug_format_options): Adjust to
4484 delim_string_to_char_ptr_vec changes.
4485 * thread-db.c (thread_db_load_search): Adjust to
4486 dirnames_to_char_ptr_vec changes.
4487
4488 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
4489
4490 * target.h (target_enable_btrace, target_disable_btrace)
4491 (target_read_btrace, target_read_btrace_conf): Turn macro into
4492 inline function. Throw error if target method is not defined.
4493 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
4494 check for btrace target method. Be prepared to handle exceptions
4495 from btrace target methods.
4496
4497 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4498
4499 * server.c (captured_main): Change order of error message printed
4500 when the current working directory cannot be found.
4501
4502 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4503
4504 * server.c: Include "filenames.h" and "pathstuff.h".
4505 (program_name): Delete variable.
4506 (program_path): New anonymous class.
4507 (get_exec_wrapper): Use "program_path" instead of
4508 "program_name".
4509 (handle_v_run): Likewise.
4510 (captured_main): Likewise.
4511 (process_serial_event): Likewise.
4512
4513 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4514
4515 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
4516 (OBJS): Add "pathstuff.o".
4517 * server.c (current_directory): New global variable.
4518 (captured_main): Initialize "current_directory".
4519
4520 2018-02-26 Alan Hayward <alan.hayward@arm.com>
4521
4522 * tdesc.c: Use common/tdesc.h.
4523 * tdesc.h: Likewise.
4524
4525 2018-02-20 Alan Hayward <alan.hayward@arm.com>
4526 Simon Marchi <simon.marchi@ericsson.com>
4527
4528 * Makefile.in: Switch order of make rules.
4529
4530 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4531
4532 * Makefile.in: Add common directory in build.
4533 * configure.ac: Add common reference.
4534 * configure: Regenerate.
4535
4536 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4537
4538 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
4539 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
4540 * spu-low.c (spu_target_ops): Likewise.
4541 * win32-low.c (win32_target_ops): Likewise.
4542 * server.c (supported_btrace_packets): Report packets unconditionally.
4543 * target.h (target_ops) <supports_btrace>: Remove.
4544 (target_supports_btrace): Remove.
4545
4546 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4547
4548 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
4549 (handle_btrace_disable): Change return type to void. Use exceptions
4550 to report errors.
4551 (handle_btrace_general_set): Catch exception and copy message to
4552 return message.
4553
4554 2018-02-08 Tom Tromey <tom@tromey.com>
4555
4556 * linux-low.c (install_software_single_step_breakpoints): Use
4557 make_scoped_restore.
4558 * inferiors.c (make_cleanup_restore_current_thread): Remove.
4559 (do_restore_current_thread_cleanup): Remove.
4560 * gdbthread.h (make_cleanup_restore_current_thread): Don't
4561 declare.
4562
4563 2018-02-08 Tom Tromey <tom@tromey.com>
4564
4565 * mem-break.c (set_raw_breakpoint_at): Use
4566 gdb::unique_xmalloc_ptr.
4567
4568 2018-01-30 Pedro Alves <palves@redhat.com>
4569
4570 PR gdb/13211
4571 * target.c (target_terminal::terminal_state): Rename to ...
4572 (target_terminal::m_terminal_state): ... this.
4573
4574 2018-01-19 James Clarke <jrtc27@jrtc27.com>
4575
4576 * linux-low.c (handle_extended_wait): Surround call to
4577 thread_db_notice_clone with #ifdef USE_THREAD_DB.
4578
4579 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
4580
4581 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
4582 linux_ptrace_attach_fail_reason_string now returning an
4583 std::string.
4584 (linux_attach): Likewise.
4585 * thread-db.c (attach_thread): Likewise.
4586
4587 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
4588
4589 PR gdb/21559
4590 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
4591 checking for fs_base/gs_base fields in struct user_regs_struct.
4592 * configure: Regenerate.
4593
4594 2018-01-16 Yao Qi <yao.qi@linaro.org>
4595
4596 PR gdb/18749
4597 * linux-low.c (fetch_register): Call supply_register instead of
4598 error.
4599
4600 2018-01-08 Yao Qi <yao.qi@linaro.org>
4601 Simon Marchi <simon.marchi@ericsson.com>
4602
4603 * Makefile.in (OBS): Remove selftest.o.
4604 * configure.ac: Set srv_selftest_objs if $development is true.
4605 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
4606 * configure: Re-generated.
4607 * server.c (captured_main): Wrap variable selftest_filter with
4608 GDB_SELF_TEST.
4609
4610 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4611
4612 * server.c (parse_debug_format_options): Return std::string.
4613 (handle_monitor_command, captured_main): Adjust.
4614
4615 2018-01-05 Pedro Alves <palves@redhat.com>
4616
4617 PR gdb/18653
4618 * server.c (captured_main): Pass quiet=false to
4619 save_original_signals_state.
4620
4621 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4622
4623 * gdbreplay.c (gdbreplay_version): Update copyright year in
4624 version message.
4625 * server.c (gdbserver_version): Likewise.
4626
4627 2017-12-08 Tom Tromey <tom@tromey.com>
4628
4629 * ax.c (ax_printf): Update.
4630
4631 2017-12-07 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
4634 aarch64_linux_read_description.
4635 * linux-amd64-ipa.c (idx2mask): New array.
4636 (get_ipa_tdesc): Move idx2mask out.
4637 (initialize_low_tracepoint): Initialize target descriptions.
4638 * linux-i386-ipa.c (idx2mask): New array.
4639 (get_ipa_tdesc): Move idx2mask out.
4640 (initialize_low_tracepoint): Initialize target descriptions.
4641
4642 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
4643
4644 * tdesc.c (struct tdesc_type): Change return type.
4645 (tdesc_add_flag): Change parameter type.
4646 (tdesc_add_bitfield): Likewise.
4647 (tdesc_add_field): Likewise.
4648 (tdesc_set_struct_size): Likewise.
4649
4650 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
4651
4652 * regcache.c (registers_to_string): Remove unused variable.
4653
4654 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4655
4656 * inferiors.c (for_each_inferior_with_data): Remove.
4657 * inferiors.h (for_each_inferior_with_data): Remove.
4658 * server.c (handle_qxfer_threads_worker): Change parameter type.
4659 (handle_qxfer_threads_proper): Use for_each_thread.
4660
4661 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4662
4663 * inferiors.c (for_each_inferior): Remove.
4664 (clear_inferiors): Use for_each_thread.
4665 * inferiors.h (for_each_inferior): Remove.
4666 * linux-low.c (linux_wait_for_event_filtered): Use
4667 for_each_thread.
4668 (linux_stabilize_threads): Likewise.
4669 * regcache.c (regcache_release): Likewise.
4670 * server.c (gdb_wants_all_threads_stopped): Likewise.
4671 (clear_pending_status_callback): Remove.
4672 (handle_status): Use for_each_thread.
4673 (captured_main): Likewise.
4674 * win32-low.c (child_init_thread_list): Likewise.
4675 (win32_clear_inferiors): Likewise.
4676 (fake_breakpoint_event): Likewise.
4677
4678 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4679
4680 * inferiors.h (find_inferior): Remove.
4681 * inferiors.c (find_inferior): Remove.
4682
4683 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4684
4685 * linux-low.c (resume_status_pending_p): Update comment.
4686 (need_step_over_p): Update comment.
4687
4688 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4689
4690 * linux-low.c (proceed_one_lwp): Return void, change parameter
4691 type.
4692 (unsuspend_and_proceed_one_lwp): Likewise.
4693 (proceed_all_lwps): Use for_each_thread.
4694 (unstop_all_lwps): Likewise.
4695
4696 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4697
4698 * linux-low.c (linux_resume_one_thread): Return void, take
4699 parameter directly.
4700 (linux_resume): Use for_each_thread.
4701
4702 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4703
4704 * linux-low.c (send_sigstop_callback): Return void, change
4705 parameter type. Rename to...
4706 (send_sigstop): ... this.
4707 (suspend_and_send_sigstop_callback): Return void, change parameter
4708 type. Rename to...
4709 (suspend_and_send_sigstop): ... this.
4710 (stop_all_lwps): Use for_each_thread.
4711
4712 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4713
4714 * linux-low.c (lwp_running): Return bool, remove unused
4715 argument.
4716 (linux_stabilize_threads): Use find_thread.
4717
4718 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4719
4720 * linux-low.c (select_singlestep_lwp_callback): Remove.
4721 (count_events_callback): Remove.
4722 (select_event_lwp_callback): Remove.
4723 (select_event_lwp): Use find_thread/for_each_thread.
4724
4725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4726
4727 * linux-low.c (not_stopped_callback): Return bool, take filter
4728 argument directly.
4729 (linux_wait_for_event_filtered): Use find_thread.
4730 (linux_wait_1): Likewise.
4731
4732 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4733
4734 * linux-low.c (same_lwp): Remove.
4735 (find_lwp_pid): Use find_thread.
4736
4737 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4738
4739 * linux-low.c (delete_lwp_callback): Remove.
4740 (linux_mourn): Use for_each_thread.
4741
4742 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4743
4744 * linux-low.c (linux_detach_lwp_callback): Return void, remove
4745 args parameter, don't check for pid.
4746 (linux_detach): Use for_each_thread.
4747
4748 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4749
4750 * linux-low.c (struct counter): Remove.
4751 (second_thread_of_pid_p): Remove.
4752 (last_thread_of_process_p): Use find_thread.
4753
4754 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4755
4756 * inferiors.c (find_inferior_in_random): Remove.
4757 * inferiors.h (find_inferior_in_random): Remove.
4758 * linux-low.c (status_pending_p_callback): Return bool, accept
4759 parameter ptid directly.
4760 (linux_wait_for_event_filtered): Use find_thread_in_random.
4761 (linux_wait_1): Likewise.
4762
4763 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4764
4765 * inferiors.c (find_inferior_id): Remove.
4766 (find_thread_ptid): Move implemention from find_inferior_id to
4767 here.
4768 * inferiors.h (find_inferior_id): Remove.
4769 * server.c (handle_status): Use find_thread_ptid.
4770 (process_serial_event): Likewise.
4771 * thread-db.c (find_one_thread): Likewise.
4772 (thread_db_thread_handle): Likewise.
4773 * win32-low.c (thread_rec): Likewise.
4774 (child_delete_thread): Likewise.
4775 (win32_thread_alive): Likewise.
4776 (get_child_debug_event): Likewise.
4777
4778 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4779
4780 * linux-mips-low.c (update_watch_registers_callback): Return
4781 void, remove pid_p parameter, don't check for pid.
4782 (mips_insert_point, mips_remove_point): Use for_each_thread.
4783
4784 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4785
4786 * lynx.low (lynx_delete_thread_callback): Remove.
4787 (lynx_mourn): Use for_each_thread.
4788
4789 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
4790
4791 * regcache.c (regcache_invalidate_one): Remove.
4792 (regcache_invalidate_pid): use for_each_thread.
4793
4794 2017-11-26 Tom Tromey <tom@tromey.com>
4795
4796 * linux-low.c (linux_create_inferior): Update.
4797
4798 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
4799
4800 * spu-low.c (spu_create_inferior): Fix typo in argument name.
4801
4802 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4803
4804 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
4805 * linux-aarch64-low.c (initialize_low_arch): Call init func.
4806 * linux-aarch64-tdesc-selftest.c: New file.
4807 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
4808
4809 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4810
4811 * configure.srv: Add new file.
4812 * linux-aarch64-low.c (initialize_low_arch): Call init func.
4813 * linux-aarch64-tdesc-selftest.c: New file.
4814 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
4815
4816 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4817
4818 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
4819 * linux-aarch64-low.c (initialize_low_arch): Remove init.
4820 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
4821
4822 2017-11-24 Alan Hayward <alan.hayward@arm.com>
4823
4824 * configure.srv: Add new files.
4825 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
4826 aarch64_linux_read_description.
4827 * linux-aarch64-low.c (aarch64_linux_read_description):
4828 Merge with aarch64_arch_setup.
4829 (aarch64_arch_setup): Call aarch64_linux_read_description.
4830 * linux-aarch64-tdesc.c: New file.
4831 * linux-aarch64-tdesc.h: New file.
4832
4833 2017-11-24 Yao Qi <yao.qi@linaro.org>
4834
4835 * configure.srv: Set $srv_regobj for tic6x-linux.
4836 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
4837 (tic6x_read_description): Move some code to tic6x_arch_setup.
4838 (tic6x_tdesc_test): New function.
4839 (initialize_low_arch): Call selftests::register_test.
4840
4841 2017-11-22 Yao Qi <yao.qi@linaro.org>
4842
4843 * remote-utils.c (prepare_resume_reply): Use memcpy.
4844
4845 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4846
4847 * linux-low.c (kill_one_lwp_callback): Return void, take
4848 argument directly, don't filter on pid.
4849 (linux_kill): Use for_each_thread.
4850
4851 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4852
4853 * linux-low.c (need_step_over_p): Return bool, remove dummy
4854 argument.
4855 (linux_resume, proceed_all_lwps): Use find_thread.
4856
4857 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4858
4859 * linux-low.c (resume_status_pending_p): Return bool, remove
4860 flag_p argument.
4861 (linux_resume): Use find_thread.
4862
4863 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4864
4865 * linux-low.c (struct thread_resume_array): Remove.
4866 (linux_set_resume_request): Return void, take arguments
4867 directly.
4868 (linux_resume): Use for_each_thread.
4869
4870 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4871
4872 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
4873 return bool, remove data argument.
4874 (linux_stabilize_threads): Use find_thread.
4875
4876 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4877
4878 * linux-low.c (unsuspend_one_lwp): Remove.
4879 (unsuspend_all_lwps): Use for_each_thread, inline code from
4880 unsuspend_one_lwp.
4881
4882 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4883
4884 * gdbthread.h (find_thread): Add overload with ptid_t filter.
4885 * linux-low.c (struct iterate_over_lwps_args): Remove.
4886 (iterate_over_lwps_filter): Remove.
4887 (iterate_over_lwps): Use find_thread.
4888
4889 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4890
4891 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
4892 (linux_handle_new_gdb_connection): Use for_each_thread, inline
4893 code from reset_lwp_ptrace_options_callback.
4894
4895 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4896
4897 * linux-arm-low.c (struct update_registers_data): Remove.
4898 (update_registers_callback): Return void, take arguments
4899 directly, don't check thread's pid.
4900 (arm_insert_point, arm_remove_point): Use for_each_thread.
4901
4902 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4903
4904 * win32-low.c (continue_one_thread): Return void, take argument
4905 directly.
4906 (child_continue): Use for_each_thread.
4907
4908 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4909
4910 * win32-i386-low.c (update_debug_registers_callback): Rename
4911 to ...
4912 (update_debug_registers): ... this, return void, remove pid_p arg.
4913 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4914
4915 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4916
4917 * inferiors.h (struct process_info): Add constructor, initialize
4918 fields..
4919 <syscalls_to_catch>: Change type to std::vector<int>.
4920 * inferiors.c (add_process): Allocate process_info with new.
4921 (remove_process): Free process_info with delete.
4922 * linux-low.c (handle_extended_wait): Adjust.
4923 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4924 * server.c (handle_general_set): Adjust.
4925
4926 2017-11-16 Pedro Alves <palves@redhat.com>
4927
4928 * remote-utils.c (remote_close): Block SIGIO signals instead of
4929 uninstalling the SIGIO handler.
4930
4931 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4932
4933 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4934
4935 2017-11-16 Yao Qi <yao.qi@linaro.org>
4936
4937 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4938 (tic6x_store_gregset): Likewise.
4939 (tic6x_usrregs_info): Move it up.
4940
4941 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4942
4943 * Makefile.in: Update arch rules.
4944 * configure.srv: Explicitly mark arch/ files.
4945
4946 2017-11-13 Andreas Schwab <schwab@suse.de>
4947
4948 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4949 function.
4950 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4951
4952 2017-11-06 Pedro Alves <palves@redhat.com>
4953
4954 * config.in, configure: Regenerate.
4955
4956 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4957
4958 * target.c (struct thread_search): Remove.
4959 (thread_search_callback): Remove.
4960 (prepare_to_access_memory): Use for_each_thread instead of
4961 find_inferior. Inline code from thread_search_callback.
4962
4963 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4964
4965 * server.c (struct visit_actioned_threads_data): Remove.
4966 (visit_actioned_threads): Change prototype to take arguments
4967 directly.
4968 (resume): Use find_thread instead of find_inferior.
4969
4970 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4971
4972 * server.c (queue_stop_reply_callback): Change prototype, return
4973 void.
4974 (find_status_pending_thread_callback): Remove.
4975 (handle_status): Replace find_inferior with find_thread and
4976 for_each_thread.
4977
4978 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4979
4980 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4981 with REGNO.
4982 (aarch64_store_gregset): Likewise.
4983 (aarch64_fill_fpregset): Likewise.
4984 (aarch64_store_fpregset): Likewise.
4985
4986 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4987
4988 * gdbthread.h (find_thread, for_each_thread): New functions.
4989 * inferiors.c (thread_of_pid): Remove.
4990 (find_any_thread_of_pid): Use find_thread.
4991 * linux-low.c (num_lwps): Use for_each_thread.
4992
4993 2017-10-17 Yao Qi <yao.qi@linaro.org>
4994
4995 * Makefile.in: Remove one rule.
4996 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4997
4998 2017-10-17 Yao Qi <yao.qi@linaro.org>
4999
5000 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
5001 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
5002
5003 2017-10-17 Yao Qi <yao.qi@linaro.org>
5004
5005 * configure.srv: Rename arm.o with arch/arm.o.
5006
5007 2017-10-17 Yao Qi <yao.qi@linaro.org>
5008
5009 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
5010 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5011 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
5012 (arch-i386.o, arch-amd64.o): Remove rules.
5013 (arch/%.o): New rule.
5014 Update POSTCOMPILE and COMPILE.pre.
5015 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5016 * configure: Re-generated.
5017 * configure.srv: Replace arch-i386.o with arch/i386.o.
5018 Replace arch-amd64.o with arch/amd64.o.
5019
5020 2017-10-16 Yao Qi <yao.qi@linaro.org>
5021
5022 * configure: Regenerated.
5023
5024 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5025
5026 * inferiors.h: (struct inferior_list): Remove.
5027 (struct inferior_list_entry); Remove.
5028 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
5029 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
5030 get_first_inferior): Remove.
5031 (for_each_inferior, for_each_inferior_with_data, find_inferior,
5032 find_inferior_id, find_inferior_in_random): Change signature.
5033 * inferiors.c (all_threads): Change type to
5034 std::list<thread_info *>.
5035 (get_thread): Remove macro.
5036 (find_inferior, find_inferior_id): Change signature, implement
5037 using find_thread.
5038 (find_inferior_in_random): Change signature, implement using
5039 find_thread_in_random.
5040 (for_each_inferior, for_each_inferior_with_data): Change
5041 signature, implement using for_each_thread.
5042 (add_inferior_to_list, remove_inferior): Remove.
5043 (add_thread, get_first_thread, thread_of_pid,
5044 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
5045 (get_first_inferior, one_inferior_p, clear_inferior_list):
5046 Remove.
5047 (clear_inferiors, get_thread_process): Update.
5048 * gdbthread.h: Include <list>.
5049 (struct thread_info) <entry>: Remove field.
5050 <id>: New field.
5051 (all_threads): Change type to std::list<thread_info *>.
5052 (get_first_inferior): Add doc.
5053 (find_thread, for_each_thread, find_thread_in_random): New
5054 functions.
5055 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
5056 * linux-arm-low.c (update_registers_callback): Update.
5057 * linux-low.c (second_thread_of_pid_p): Update.
5058 (kill_one_lwp_callback, linux_detach_lwp_callback,
5059 delete_lwp_callback, status_pending_p_callback, same_lwp,
5060 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
5061 iterate_over_lwps, not_stopped_callback,
5062 resume_stopped_resumed_lwps, count_events_callback,
5063 select_singlestep_lwp_callback, select_event_lwp_callback,
5064 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
5065 suspend_and_send_sigstop_callback, wait_for_sigstop,
5066 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
5067 lwp_running, linux_set_resume_request, resume_status_pending_p,
5068 need_step_over_p, start_step_over, linux_resume_one_thread,
5069 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
5070 reset_lwp_ptrace_options_callback): Update.
5071 * linux-mips-low.c (update_watch_registers_callback): Update.
5072 * regcache.c (regcache_invalidate_one, regcache_invalidate):
5073 Update.
5074 (free_register_cache_thread_one): Remove.
5075 (regcache_release): Update.
5076 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
5077 handle_qxfer_threads_worker): Update.
5078 (handle_query): Update, use list iterator.
5079 (visit_actioned_threads, handle_pending_status,
5080 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
5081 clear_pending_status_callback, set_pending_status_callback,
5082 find_status_pending_thread_callback, handle_status,
5083 process_serial_event): Update.
5084 * target.c (thread_search_callback): Update.
5085 * thread-db.c (thread_db_get_tls_address): Update.
5086 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
5087 Update.
5088 * win32-i386-low.c (update_debug_registers_callback): Update.
5089 * win32-low.c (delete_thread_info, child_delete_thread,
5090 continue_one_thread, suspend_one_thread,
5091 get_child_debug_event): Adjust.
5092
5093 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5094
5095 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
5096 * inferiors.h: Include <list>.
5097 (struct process_info) <entry>: Remove field.
5098 <pid>: New field.
5099 (pid_of): Change macro to function.
5100 (ptid_of, lwpid_of): Remove macro.
5101 (all_processes): Change type to std::list<process_info *>.
5102 (ALL_PROCESSES): Remove macro.
5103 (for_each_process, find_process): New function.
5104 * inferiors.c (all_processes): Change type to
5105 std::list<process_info *>.
5106 (find_thread_process): Adjust.
5107 (add_process): Likewise.
5108 (remove_process): Likewise.
5109 (find_process_pid): Likewise.
5110 (get_first_process): Likewise.
5111 (started_inferior_callback): Remove.
5112 (have_started_inferiors_p): Adjust.
5113 (attached_inferior_callback): Remove.
5114 (have_attached_inferiors_p): Adjust.
5115 * linux-low.c (check_zombie_leaders): Likewise.
5116 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
5117 (x86_linux_update_xmltarget): Adjust.
5118 * server.c (handle_query): Likewise.
5119 (gdb_reattached_process): Remove.
5120 (handle_status): Adjust.
5121 (kill_inferior_callback): Likewise.
5122 (detach_or_kill_inferior): Remove.
5123 (print_started_pid): Likewise.
5124 (print_attached_pid): Likewise.
5125 (detach_or_kill_for_exit): Update.
5126 (process_serial_event): Likewise.
5127 * linux-arm-low.c (arm_new_fork): Likewise.
5128
5129 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5130
5131 * dll.h: Include <list>.
5132 (struct dll_info): Add constructor.
5133 <entry>: Remove field.
5134 (all_dlls): Change type to std::list<dll_info>.
5135 * dll.c: Include <algorithm>.
5136 (get_dll): Remove macro.
5137 (all_dlls): Change type to std::list<dll_info *>.
5138 (free_one_dll): Remove.
5139 (match_dll): Likewise.
5140 (loaded_dll): Adjust.
5141 (unloaded_dll): Adjust to all_dlls type change, use
5142 std::find_if. Inline code from match_dll.
5143 (clear_dlls): Adjust to all_dlls type change.
5144 * server.c (emit_dll_description): Remove.
5145 (handle_qxfer_libraries): Adjust to all_dlls type change,
5146 integrate emit_dll_description's functionality.
5147
5148 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5149
5150 * linux-low.h (struct linux_target_ops) <delete_process>: New
5151 field.
5152 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
5153 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
5154 (struct linux_target_ops): Add delete_process callback.
5155 * linux-arm-low.c (arm_delete_process): New.
5156 (struct linux_target_ops): Add delete_process callback.
5157 * linux-bfin-low.c (struct linux_target_ops): Likewise.
5158 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
5159 * linux-m32r-low.c (struct linux_target_ops): Likewise.
5160 * linux-mips-low.c (mips_linux_delete_process): New.
5161 (struct linux_target_ops): Add delete_process callback.
5162 * linux-ppc-low.c (struct linux_target_ops): Likewise.
5163 * linux-s390-low.c (struct linux_target_ops): Likewise.
5164 * linux-sh-low.c (struct linux_target_ops): Likewise.
5165 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
5166 * linux-tile-low.c (struct linux_target_ops): Likewise.
5167 * linux-x86-low.c (x86_linux_delete_process): New.
5168 (struct linux_target_ops): Add delete_process callback.
5169 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
5170
5171 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5172
5173 * linux-aarch64-low.c (the_low_target): Add thread delete
5174 callback.
5175 * linux-arm-low.c (arm_delete_thread): New function.
5176 (the_low_target): Add thread delete callback.
5177 * linux-bfin-low.c (the_low_target): Likewise.
5178 * linux-crisv32-low.c (the_low_target): Likewise.
5179 * linux-low.c (delete_lwp): Invoke delete_thread callback if
5180 set.
5181 * linux-low.h (struct linux_target_ops) <delete_thread>: New
5182 field.
5183 * linux-m32r-low.c (the_low_target): Add thread delete callback.
5184 * linux-mips-low.c (mips_linux_delete_thread): New function.
5185 (the_low_target): Add thread delete callback.
5186 * linux-ppc-low.c (the_low_target): Likewise.
5187 * linux-s390-low.c (the_low_target): Likewise.
5188 * linux-sh-low.c (the_low_target): Likewise.
5189 * linux-tic6x-low.c (the_low_target): Likewise.
5190 * linux-tile-low.c (the_low_target): Likewise.
5191 * linux-x86-low.c (the_low_target): Likewise.
5192 * linux-xtensa-low.c (the_low_target): Likewise.
5193
5194 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
5195
5196 * win32-low.c: Include "common-inferior.h".
5197
5198 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5199
5200 * inferiors.c (set_inferior_cwd): New function.
5201 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5202 (handle_query): Inform that QSetWorkingDir is supported.
5203 * win32-low.c (create_process): Pass the inferior's cwd to
5204 CreateProcess.
5205
5206 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5207
5208 * inferiors.c (current_inferior_cwd): New global variable.
5209 (get_inferior_cwd): New function.
5210 * inferiors.h (struct process_info) <cwd>: New field.
5211
5212 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5213
5214 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
5215 (OBS): Add gdb_tilde_expand.o.
5216
5217 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
5218
5219 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
5220 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5221
5222 2017-09-29 Pedro Alves <palves@redhat.com>
5223
5224 * ax.c (gdb_parse_agent_expr): Constify.
5225 * ax.h (gdb_parse_agent_expr): Constify.
5226 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5227 Constify.
5228 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
5229 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
5230 * remote-utils.h (read_ptid): Constify.
5231 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
5232 (process_point_options, process_serial_event): Constify.
5233 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
5234 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
5235 (cmd_qtbuffer): Constify.
5236
5237 2017-09-29 Pedro Alves <palves@redhat.com>
5238
5239 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
5240 fails.
5241
5242 2017-09-29 Pedro Alves <palves@redhat.com>
5243
5244 * linux-low.c (handle_extended_wait): Pass parent thread instead
5245 of process to thread_db_notice_clone.
5246 * linux-low.h (thread_db_notice_clone): Replace parent process
5247 parameter with parent thread parameter.
5248 * thread-db.c (find_one_thread): Add comment.
5249 (thread_db_notice_clone): Replace parent process parameter with
5250 parent thread parameter. Temporarily switch to the parent thread.
5251
5252 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
5253
5254 * gdbthread.h: Include "common-gdbthread.h".
5255 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
5256 "if" when validating the ptid.
5257 * remote-utils.c: Include "gdbthread.h".
5258 (prepare_resume_reply): Use "switch_to_thread".
5259 * target.c (done_accessing_memory): Likewise.
5260
5261 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5262
5263 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
5264 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5265 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
5266 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
5267 s390x-gs-linux64-ipa.o to ipa_obj.
5268 * linux-s390-low.c (HWCAP_S390_GS): New define.
5269 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
5270 New functions.
5271 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
5272 (s390_arch_setup): Check for guarded-storage support and choose
5273 appropriate tdesc.
5274 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
5275 init_registers_s390x_gs_linux64.
5276 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
5277 enum value.
5278 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
5279 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
5280
5281 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
5282
5283 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
5284
5285 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5286
5287 * linux-low.h (struct lwp_info): Add new field, thread_handle.
5288 (thread_db_thread_handle): Declare.
5289 * linux-low.c (linux_target_ops): Initialize thread_handle.
5290 * server.c (handle_qxfer_threads_worker): Add support for
5291 "handle" attribute.
5292 * target.h (struct target_ops): Add new function pointer,
5293 thread_handle.
5294 (target_thread_handle): Define.
5295 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
5296 field in lwp.
5297 (thread_db_thread_handle): New function.
5298
5299 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5300
5301 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
5302 * linux-low.h (thread_db_notice_clone): Declare.
5303 * thread-db.c (thread_db_notice_clone): New function.
5304
5305 2017-09-21 Pedro Alves <palves@redhat.com>
5306
5307 * server.c (gdb_read_memory, handle_status, process_serial_event)
5308 (handle_serial_event, handle_target_event): Adjust to
5309 set_desired_thread prototype change.
5310 * target.c (set_desired_thread): Remove 'use_general' parameter
5311 and adjust.
5312 * target.h (set_desired_thread): Remove 'use_general' parameter.
5313
5314 2017-09-20 Tom Tromey <tom@tromey.com>
5315
5316 * target.c (target_terminal::terminal_state): Define.
5317 (target_terminal::init): Rename from target_terminal_init.
5318 (target_terminal::inferior): Rename from
5319 target_terminal_inferior.
5320 (target_terminal::ours): Rename from target_terminal_ours.
5321 (target_terminal::ours_for_output, target_terminal::info): New.
5322
5323 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5324
5325 * server.c (accumulate_file_name_length): Remove.
5326 (emit_dll_description): Adjust to std::string change.
5327 (handle_qxfer_libraries): Use std::string to hold document.
5328
5329 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5330
5331 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
5332 return type of xml_escape_text.
5333 * server.c (emit_dll_description): Likewise.
5334
5335 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5336
5337 * server.c (captured_main): Accept argument for --selftest.
5338 Update run_tests call.
5339 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
5340 when registering selftests.
5341
5342 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
5343
5344 * regcache.c (get_thread_regcache): Update code to use "std::vector"
5345 instead of "VEC" for "target_desc.reg_defs".
5346 (regcache_cpy): Likewise.
5347 (registers_to_string): Likewise.
5348 (registers_from_string): Likewise.
5349 (find_regno): Likewise.
5350 (supply_regblock): Likewise.
5351 (regcache_raw_read_unsigned): Likewise.
5352 * tdesc.c (init_target_desc): Likewise.
5353 (tdesc_create_reg): Likewise.
5354 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
5355 (struct target_desc) <reg_defs>: Convert to "std::vector".
5356 (target_desc): Do not initialize "reg_defs".
5357 (~target_desc): Update code to use "std::vector" instead of "VEC"
5358 for "target_desc.reg_defs".
5359 (operator==): Likewise.
5360
5361 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5362
5363 * inferiors.h (thread_to_gdb_id): Remove.
5364 * inferiors.c (thread_to_gdb_id): Remove.
5365 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
5366 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
5367 lynx_store_registers, lynx_read_memory, lynx_write_memory):
5368 Likewise.
5369 * nto-low.c (nto_fetch_registers, nto_store_registers,
5370 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
5371
5372 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5373
5374 * inferiors.h (gdb_id_to_thread_id): Remove.
5375 * inferiors.c (gdb_id_to_thread_id): Remove.
5376 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
5377 removal. Move pid declaration closer to where it's used.
5378
5379 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5380
5381 * server.c (handle_detach): New function.
5382 (process_serial_event): Move code out, call handle_detach.
5383
5384 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5385
5386 * server.c (require_running): Rename to ...
5387 (require_running_or_return): ... this ...
5388 (require_running_or_break): ... and this.
5389 (handle_query, process_serial_event): Adjust.
5390
5391 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5392
5393 * linux-low.c (linux_set_resume_request): Remove unused
5394 variables.
5395
5396 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5397
5398 * server.c (first_thread_of): Remove.
5399 (process_serial_event): Replace usage of first_thread_of with
5400 find_any_thread_of_pid.
5401 * tracepoint.c (same_process_p): Remove.
5402 (gdb_agent_about_to_close): Replace usage of same_process_p with
5403 find_any_thread_of_pid.
5404 * linux-x86-low.c (same_process_callback): Remove.
5405 (x86_arch_setup_process_callback): Replace usage of
5406 same_process_callback with find_any_thread_of_pid.
5407 * thread-db.c (any_thread_of): Remove.
5408 (switch_to_process): Replace usage of any_thread_of with
5409 find_any_thread_of_pid.
5410 * inferiors.c (thread_pid_matches_callback): Remove.
5411 (find_thread_process): Adjust to use find_any_thread_of_pid.
5412
5413 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5414
5415 * regcache.c (get_thread_regcache): Guard calls to "memset"
5416 with "!VEC_empty".
5417
5418 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
5419
5420 * linux-low.c (handle_extended_wait): Use
5421 "allocate_target_description" instead of "XNEW".
5422 * linux-x86-low.c (initialize_low_arch): Likewise.
5423
5424 2017-09-05 Yao Qi <yao.qi@linaro.org>
5425
5426 * configure.srv (srv_i386_regobj): Remove.
5427 (srv_amd64_regobj): Remove.
5428 (srv_regobj): Set it to "" for x86 non-linux targets.
5429 * linux-x86-tdesc.c (i386_linux_read_description):
5430 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
5431 (init_registers_i386): Remove the declaration.
5432 (tdesc_i386): Remove the declaration.
5433 (lynx_i386_arch_setup): Call i386_create_target_description.
5434 * nto-x86-low.c: Likewise.
5435 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
5436 [!__x86_64__]: include arch/i386.h.
5437 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
5438
5439 2017-09-05 Yao Qi <yao.qi@linaro.org>
5440
5441 * configure.srv (srv_amd64_linux_xmlfiles): Remove
5442 i386/amd64-XXX-linux from it.
5443
5444 2017-09-05 Yao Qi <yao.qi@linaro.org>
5445
5446 * configure.srv: Empty srv_amd64_linux_regobj if $development is
5447 false.
5448 (ipa_amd64_linux_regobj): Remove.
5449 (ipa_x32_linux_regobj): Remove.
5450
5451 2017-09-05 Yao Qi <yao.qi@linaro.org>
5452
5453 * Makefile.in (arch-amd64.o): New rule.
5454 * configure.srv: Append arch-amd64.o.
5455 * linux-amd64-ipa.c: Include common/x86-xstate.h.
5456 (get_ipa_tdesc): Call amd64_linux_read_description.
5457 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
5458 and init_registers_amd64_XXX.
5459 * linux-x86-low.c (x86_linux_read_description): Call
5460 amd64_linux_read_description.
5461 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
5462 (initialize_low_arch): Don't call init_registers_x32_XXX and
5463 init_registers_amd64_XXX.
5464 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
5465 and tdesc_amd64_XXX.
5466 [__x86_64__] (amd64_tdesc_test): New function.
5467 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
5468 and init_registers_amd64_XXX.
5469 * linux-x86-tdesc.c: Include arch/amd64.h.
5470 (xcr0_to_tdesc_idx): New function.
5471 (i386_linux_read_description): New function.
5472 (amd64_get_ipa_tdesc_idx): New function.
5473 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
5474 (amd64_get_ipa_tdesc): Declare.
5475
5476 2017-09-05 Yao Qi <yao.qi@linaro.org>
5477
5478 * configure.srv (srv_i386_linux_xmlfiles): Remove
5479 i386/i386-XXX-linux.xml from it.
5480
5481 2017-09-05 Yao Qi <yao.qi@linaro.org>
5482
5483 * configure.srv: Set srv_i386_linux_regobj empty if $development
5484 is false.
5485 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
5486 initialize_low_tdesc.
5487 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
5488 with #if initialize_low_tdesc.
5489 * linux-x86-tdesc-selftest.c: New file.
5490 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
5491
5492 2017-09-05 Yao Qi <yao.qi@linaro.org>
5493
5494 * Makefile.in (arch-i386.o): New rule.
5495 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
5496 (x86_64-*-linux*): Likewise.
5497 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
5498 include arch/i386.h.
5499 (i386_linux_read_description): Remove code and call
5500 i386_create_target_description.
5501 * tdesc.c (allocate_target_description): New function.
5502 * tdesc.h (set_tdesc_architecture): Remove declaration.
5503 (set_tdesc_osabi): Likewise.
5504
5505 2017-09-05 Yao Qi <yao.qi@linaro.org>
5506
5507 * linux-x86-tdesc.c: Don't include <inttypes.h>.
5508 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5509 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
5510 .xmltarget.
5511 * server.c (get_features_xml): Call tdesc_get_features_xml.
5512 * tdesc.c (set_tdesc_architecture): New function.
5513 (set_tdesc_osabi): New function.
5514 (tdesc_get_features_xml): New function.
5515 (tdesc_create_feature): Add an argument.
5516 * tdesc.h (struct target_desc) <features>: New field.
5517 <arch, osabi>: New field.
5518 (~target_desc): xfree features, arch, and osabi.
5519 (target_desc::oerator==): Don't compare .xmltarget.
5520 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
5521 (set_tdesc_osabi): Likewise.
5522 (tdesc_get_features_xml): Likewise.
5523
5524 2017-09-05 Yao Qi <yao.qi@linaro.org>
5525
5526 * linux-x86-tdesc.c: Include selftest.h.
5527 (i386_tdesc_test): New function.
5528 (initialize_low_tdesc): Call selftests::register_test.
5529 * tdesc.h: Include regdef.h.
5530 (target_desc): Override operator == and !=.
5531
5532 2017-09-05 Yao Qi <yao.qi@linaro.org>
5533
5534 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
5535 (ipa_obj): Likewise.
5536 * linux-i386-ipa.c: Include common/x86-xstate.h
5537 (get_ipa_tdesc): Call i386_linux_read_description.
5538 (initialize_low_tracepoint): Don't call init_registers_XXX
5539 functions, call initialize_low_tdesc instead.
5540 * linux-x86-low.c (x86_linux_read_description): Call
5541 i386_linux_read_description.
5542 (initialize_low_arch): Don't call init_registers_i386_XXX
5543 functions, call initialize_low_tdesc.
5544 * linux-x86-tdesc.c: New file.
5545 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
5546 (i386_get_ipa_tdesc_idx): Declare.
5547 (i386_get_ipa_tdesc): Declare.
5548 (initialize_low_tdesc): Declare.
5549
5550 2017-09-05 Yao Qi <yao.qi@linaro.org>
5551
5552 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
5553 instead of 0.
5554
5555 2017-09-05 Yao Qi <yao.qi@linaro.org>
5556
5557 * Makefile.in (IPA_OBJS): Add vec-ipa.o
5558 * regcache.c (get_thread_regcache): Use VEC_length.
5559 (init_register_cache): Likewise.
5560 (regcache_cpy): Likewise.
5561 (registers_to_string): Iterate reg_defs via VEC_iterate.
5562 (find_regno): Likewise.
5563 (find_register_by_number): Use VEC_index.
5564 (register_size): Call find_register_by_number.
5565 (register_data): Call find_register_by_number.
5566 (supply_regblock): Use VEC_length.
5567 (regcache_raw_read_unsigned): Likewise.
5568 * tdesc.c (init_target_desc): Iterate reg_defs via
5569 VEC_iterate.
5570 (default_description): Update initializer.
5571 (copy_target_description): Don't update field num_registers.
5572 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
5573 <num_registers>: Remove.
5574
5575 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5576
5577 * Makefile.in (.SECONDARY): Define target.
5578
5579 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5580
5581 * linux-low.c (linux_wait_1): Adjust.
5582 * server.c (queue_stop_reply_callback): Adjust.
5583
5584 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5585
5586 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
5587 QEnvironmentUnset and QEnvironmentReset packets.
5588 (handle_query): Inform remote that QEnvironmentHexEncoded,
5589 QEnvironmentUnset and QEnvironmentReset are supported.
5590
5591 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
5592
5593 * inferiors.h (inferior_target_data): Rename to ...
5594 (thread_target_data): ... this.
5595 (inferior_regcache_data): Rename to ...
5596 (thread_regcache_data): ... this.
5597 (set_inferior_regcache_data): Rename to ...
5598 (set_thread_regcache_data): ... this.
5599 * inferiors.c (inferior_target_data): Rename to ...
5600 (thread_target_data): ... this.
5601 (inferior_regcache_data): Rename to ...
5602 (thread_regcache_data): ... this.
5603 (set_inferior_regcache_data): Rename to ...
5604 (set_thread_regcache_data): ... this.
5605 (free_one_thread): Update.
5606 * linux-low.h (get_thread_lwp): Update.
5607 * regcache.c (get_thread_regcache): Update.
5608 (regcache_invalidate_thread): Update.
5609 (free_register_cache_thread): Update.
5610 * win32-i386-low.c (update_debug_registers_callback): Update.
5611 (win32_get_current_dr): Update.
5612 * win32-low.c (thread_rec): Update.
5613 (delete_thread_info): Update.
5614 (continue_one_thread): Update.
5615 (suspend_one_thread): Update.
5616
5617 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
5618
5619 * inferiors.c (set_inferior_target_data): Remove.
5620 * inferiors.h (set_inferior_target_data): Remove.
5621
5622 2017-08-18 Yao Qi <yao.qi@linaro.org>
5623
5624 * Makefile.in (OBS): Add selftest.o.
5625 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
5626 * configure, config.in: Re-generated.
5627 * server.c: Include common/sefltest.h.
5628 (captured_main): Handle option --selftest.
5629
5630 2017-08-09 Yao Qi <yao.qi@linaro.org>
5631
5632 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
5633 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
5634 i386-avx-mpx.o and i386-mmx.o.
5635 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
5636 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
5637 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
5638 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
5639 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
5640 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
5641 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
5642 i386/amd64-avx-mpx.xml.
5643
5644 2017-08-09 Yao Qi <yao.qi@linaro.org>
5645
5646 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
5647 and x32-avx-avx512.o.
5648 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
5649 i386/x32-avx-avx512.xml.
5650
5651 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
5652
5653 * tracepoint.h (enum class fast_tpoint_collect_result): New
5654 enumeration.
5655 (fast_tracepoint_collecting): Change return type to
5656 fast_tpoint_collect_result.
5657 * tracepoint.c (fast_tracepoint_collecting): Likewise.
5658 * linux-low.h: Include tracepoint.h.
5659 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
5660 fast_tpoint_collect_result.
5661 * linux-low.c (handle_tracepoints): Adjust.
5662 (linux_fast_tracepoint_collecting): Change return type to
5663 fast_tpoint_collect_result.
5664 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
5665 linux_wait_1, stuck_in_jump_pad_callback,
5666 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
5667 proceed_one_lwp): Adjust to type change.
5668
5669 2017-07-10 Yao Qi <yao.qi@linaro.org>
5670
5671 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
5672
5673 2017-06-29 Yao Qi <yao.qi@linaro.org>
5674
5675 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
5676 Remove.
5677 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
5678
5679 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
5680
5681 * Makefile.in (IPA_OBJS): Sort and format one item per line.
5682
5683 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5684
5685 * linux-low.c (linux_create_inferior): Adjust code to access the
5686 environment information via 'gdb_environ' class.
5687 * lynx-low.c (lynx_create_inferior): Likewise.
5688 * server.c (our_environ): Make it an instance of 'gdb_environ'.
5689 (get_environ): Return a pointer to 'our_environ'.
5690 (captured_main): Initialize 'our_environ'.
5691 * server.h (get_environ): Adjust prototype.
5692 * spu-low.c (spu_create_inferior): Adjust code to access the
5693 environment information via 'gdb_environ' class.
5694
5695 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5696
5697 * linux-low.c (linux_read_memory, linux_write_memory): Remove
5698 usage of "register" keyword.
5699
5700 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5701
5702 * configure: Re-generate.
5703
5704 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * configure: Re-generate.
5707
5708 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5709
5710 * Makefile.in (COMPILE.pre): Add "-x c++".
5711
5712 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
5713
5714 * fork-child.c: Conditionally include <signal.h>.
5715
5716 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5717
5718 * server.c (handle_general_set): Handle new packet
5719 "QStartupWithShell".
5720 (handle_query): Add "QStartupWithShell" to the list of supported
5721 packets.
5722 (gdbserver_usage): Add help text explaining the
5723 new "--startup-with-shell" and "--no-startup-with-shell" CLI
5724 options.
5725 (captured_main): Recognize and act upon the presence of the new
5726 CLI options.
5727
5728 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5729 Pedro Alves <palves@redhat.com>
5730
5731 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
5732 * configure: Regenerate.
5733 * configure.srv (srv_linux_obj): Add "fork-child.o" and
5734 "fork-inferior.o".
5735 (i[34567]86-*-lynxos*): Likewise.
5736 (spu*-*-*): Likewise.
5737 * fork-child.c: New file.
5738 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
5739 and "environ.h".
5740 (linux_ptrace_fun): New function.
5741 (linux_create_inferior): Adjust function prototype to reflect
5742 change on "target.h". Adjust function code to use
5743 "fork_inferior".
5744 (linux_request_interrupt): Delete "signal_pid".
5745 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5746 (lynx_ptrace_fun): New function.
5747 (lynx_create_inferior): Adjust function prototype to reflect
5748 change on "target.h". Adjust function code to use
5749 "fork_inferior".
5750 * nto-low.c (nto_create_inferior): Adjust function prototype and
5751 code to reflect change on "target.h". Update comments.
5752 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
5753 "common-terminal.h" and "environ.h".
5754 (terminal_fd): Moved to fork-child.c.
5755 (old_foreground_pgrp): Likewise.
5756 (restore_old_foreground_pgrp): Likewise.
5757 (last_status): Make it global.
5758 (last_ptid): Likewise.
5759 (our_environ): New variable.
5760 (startup_with_shell): Likewise.
5761 (program_name): Likewise.
5762 (program_argv): Rename to...
5763 (program_args): ...this.
5764 (wrapper_argv): New variable.
5765 (start_inferior): Delete function.
5766 (get_exec_wrapper): New function.
5767 (get_exec_file): Likewise.
5768 (get_environ): Likewise.
5769 (prefork_hook): Likewise.
5770 (post_fork_inferior): Likewise.
5771 (postfork_hook): Likewise.
5772 (postfork_child_hook): Likewise.
5773 (handle_v_run): Update code to deal with arguments coming from the
5774 remote host. Update calls from "start_inferior" to
5775 "create_inferior".
5776 (captured_main): Likewise. Initialize environment variable. Call
5777 "have_job_control".
5778 * server.h (post_fork_inferior): New prototype.
5779 (get_environ): Likewise.
5780 (last_status): Declare.
5781 (last_ptid): Likewise.
5782 (signal_pid): Likewise.
5783 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
5784 (spu_ptrace_fun): New function.
5785 (spu_create_inferior): Adjust function prototype to reflect change
5786 on "target.h". Adjust function code to use "fork_inferior".
5787 * target.c (target_terminal_init): New function.
5788 (target_terminal_inferior): Likewise.
5789 (target_terminal_ours): Likewise.
5790 * target.h: Include <vector>.
5791 (struct target_ops) <create_inferior>: Update prototype.
5792 (create_inferior): Update macro.
5793 * utils.c (gdb_flush_out_err): New function.
5794 * win32-low.c (win32_create_inferior): Adjust function prototype
5795 and code to reflect change on "target.h".
5796
5797 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5798
5799 * inferiors.c (switch_to_thread): New function.
5800
5801 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5802
5803 * Makefile.in (SFILE): Add "common/job-control.c".
5804 (OBS): Add "job-control.o".
5805
5806 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5807
5808 * Makefile: Remove "@host_makefile_frag@".
5809
5810 2017-05-05 Pedro Alves <palves@redhat.com>
5811
5812 * configure: Regenerate.
5813
5814 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
5815
5816 * configure: Regenerate.
5817
5818 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5819
5820 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
5821 software_single_step change of return type to
5822 std::vector<CORE_ADDR>.
5823 * linux-low.c (install_software_single_step_breakpoints):
5824 Likewise.
5825 * linux-low.h (install_software_single_step_breakpoints):
5826 Likewise.
5827
5828 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5829
5830 * remote-utils.c: Include "gdb_termios.h" instead of
5831 "terminal.h".
5832 * terminal.h: Delete file.
5833
5834 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
5835
5836 * server.c: Include <vector>.
5837 <program_argv, wrapper_argv>: Convert to std::vector.
5838 (start_inferior): Rewrite function to use C++.
5839 (handle_v_run): Likewise. Update code that calculates the argv
5840 based on the vRun packet; use C++.
5841 (captured_main): Likewise.
5842
5843 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
5844
5845 * server.c (handle_v_cont): Initialize thread_resume::thread
5846 with null_ptid.
5847
5848 2017-04-05 Pedro Alves <palves@redhat.com>
5849
5850 * configure: Regenerate.
5851
5852 2017-04-05 Pedro Alves <palves@redhat.com>
5853
5854 * gdbreplay.c (sync_error): Constify.
5855 * linux-x86-low.c (push_opcode): Constify.
5856
5857 2017-04-05 Pedro Alves <palves@redhat.com>
5858
5859 * win32-low.c (get_child_debug_event)
5860 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
5861 Report TARGET_WAITKIND_SPURIOUS instead.
5862
5863 2017-04-05 Pedro Alves <palves@redhat.com>
5864
5865 * remote-utils.c (remote_prepare, remote_open): Constify.
5866 * remote-utils.h (remote_prepare, remote_open): Constify.
5867 * server.c (captured_main): Constify 'port' handling.
5868
5869 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
5870
5871 * Makefile.in (clean): Clear .deps.
5872
5873 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
5874
5875 * .gitignore: Remove generated files, replace with wildcard.
5876 * (clean): Replace removal of generated files with wildcard.
5877 (version.c): Replace with...
5878 (version-generated.c): ...this.
5879 (xml-builtin.c): Replace with...
5880 (xml-builtin-generated.c): ...this.
5881 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
5882 (%.c: *regformats*): Replace with...
5883 (%-generated.c: *regformats*): ...this.
5884
5885 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5886
5887 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
5888 (xtensa_fill_gregset): Call collect_register_by_name for
5889 threadptr register.
5890 (xtensa_store_gregset): Call supply_register_by_name for
5891 threadptr register.
5892
5893 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5894
5895 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
5896 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
5897 (xtensa_store_gregset): Call supply_register for all registers in
5898 a0_regnum..a0_regnum + C0_NREGS range.
5899
5900 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5901
5902 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
5903 (ax-ipa.o: ax.c): Remove.
5904 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
5905 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
5906 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
5907 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
5908 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5909
5910 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5911
5912 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5913 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5914 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5915 (errors-ipa.o: ../common/errors.c): Remove.
5916 (format-ipa.o: ../common/format.c): Remove.
5917 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5918
5919 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5920
5921 * Makefile.in (%-ipa.o: %.c): New rule.
5922 (tracepoint-ipa.o: tracepoint.c): Remove.
5923 (utils-ipa.o: utils.c): Remove.
5924 (remote-utils-ipa.o: remote-utils.c): Remove.
5925 (regcache-ipa.o: regcache.c): Remove.
5926 (i386-linux-ipa.o: i386-linux.c): Remove.
5927 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5928 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5929 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5930 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5931 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5932 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5933 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5934 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5935 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5936 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5937 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5938 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5939 (aarch64-ipa.o: aarch64.c): Remove.
5940 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5941 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5942 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5943 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5944 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5945 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5946 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5947 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5948 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5949 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5950 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5951 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5952 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5953 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5954 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5955 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5956 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5957 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5958 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5959 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5960 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5961 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5962 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5963 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5964 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5965 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5966 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5967 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5968 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5969 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5970 (tdesc-ipa.o: tdesc.c): Remove.
5971 (x32-linux-ipa.o: x32-linux.c): Remove.
5972 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5973 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5974
5975 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5976
5977 * Makefile.in (%.o: ../arch/%.c): New rule.
5978 (arm.o: ../arch/arm.c): Remove.
5979 (arm-linux.o: ../arch/arm-linux.c): Remove.
5980 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5981 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5982
5983 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5984
5985 * Makefile.in (%.o: ../nat/%.c): New rule.
5986 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5987 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5988 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5989 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5990 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5991 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5992 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5993 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5994 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5995 (linux-personality.o: ../nat/linux-personality.c): Remove.
5996 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5997 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5998 (x86-linux.o: ../nat/x86-linux.c): Remove.
5999 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
6000 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
6001
6002 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6003
6004 * Makefile.in (%.o: ../common/%.c): New rule.
6005 (signals.o: ../common/signals.c): Remove.
6006 (print-utils.o: ../common/print-utils.c): Remove.
6007 (rsp-low.o: ../common/rsp-low.c): Remove.
6008 (common-utils.o: ../common/common-utils.c): Remove.
6009 (posix-strerror.o: ../common/posix-strerror.c): Remove.
6010 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
6011 (vec.o: ../common/vec.c): Remove.
6012 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
6013 (xml-utils.o: ../common/xml-utils.c): Remove.
6014 (ptid.o: ../common/ptid.c): Remove.
6015 (buffer.o: ../common/buffer.c): Remove.
6016 (format.o: ../common/format.c): Remove.
6017 (filestuff.o: ../common/filestuff.c): Remove.
6018 (agent.o: ../common/agent.c): Remove.
6019 (errors.o: ../common/errors.c): Remove.
6020 (environ.o: ../common/environ.c): Remove.
6021 (common-debug.o: ../common/common-debug.c): Remove.
6022 (cleanups.o: ../common/cleanups.c): Remove.
6023 (common-exceptions.o: ../common/common-exceptions.c): Remove.
6024 (fileio.o: ../common/fileio.c): Remove.
6025 (common-regcache.o: ../common/common-regcache.c): Remove.
6026 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
6027 (new-op.o: ../common/new-op.c): Remove.
6028 (btrace-common.o: ../common/btrace-common.c): Remove.
6029
6030 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6031
6032 * Makefile.in (%.o: ../target/%.c): New rule.
6033 (waitstatus.o: ../target/waitstatus.c): Remove.
6034
6035 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6036
6037 * Makefile.in
6038 (%.c: ../regformats/%.dat,
6039 (%.c: ../regformats/arm/%.dat,
6040 (%.c: ../regformats/i386/%.dat,
6041 (%.c: ../regformats/rs6000/%.dat): New rules.
6042 (aarch64.c): Remove.
6043 (reg-arm.c): Remove.
6044 (arm-with-iwmmxt.c): Remove.
6045 (arm-with-vfpv2.c): Remove.
6046 (arm-with-vfpv3.c): Remove.
6047 (arm-with-neon.c): Remove.
6048 (reg-bfin.c): Remove.
6049 (reg-cris.c): Remove.
6050 (reg-crisv32.c): Remove.
6051 (i386.c): Remove.
6052 (i386-linux.c): Remove.
6053 (i386-avx.c): Remove.
6054 (i386-avx-linux.c): Remove.
6055 (i386-avx-avx512.c): Remove.
6056 (i386-avx-avx512-linux.c): Remove.
6057 (i386-mpx.c): Remove.
6058 (i386-mpx-linux.c): Remove.
6059 (i386-avx-mpx-avx512-pku.c): Remove.
6060 (i386-avx-mpx-avx512-pku-linux.c): Remove.
6061 (i386-avx-mpx.c): Remove.
6062 (i386-avx-mpx-linux.c): Remove.
6063 (i386-mmx.c): Remove.
6064 (i386-mmx-linux.c): Remove.
6065 (reg-ia64.c): Remove.
6066 (reg-m32r.c): Remove.
6067 (reg-m68k.c): Remove.
6068 (reg-cf.c): Remove.
6069 (mips-linux.c): Remove.
6070 (mips-dsp-linux.c): Remove.
6071 (mips64-linux.c): Remove.
6072 (mips64-dsp-linux.c): Remove.
6073 (nios2-linux.c): Remove.
6074 (powerpc-32.c): Remove.
6075 (powerpc-32l.c): Remove.
6076 (powerpc-altivec32l.c): Remove.
6077 (powerpc-cell32l.c): Remove.
6078 (powerpc-vsx32l.c): Remove.
6079 (powerpc-isa205-32l.c): Remove.
6080 (powerpc-isa205-altivec32l.c): Remove.
6081 (powerpc-isa205-vsx32l.c): Remove.
6082 (powerpc-e500l.c): Remove.
6083 (powerpc-64l.c): Remove.
6084 (powerpc-altivec64l.c): Remove.
6085 (powerpc-cell64l.c): Remove.
6086 (powerpc-vsx64l.c): Remove.
6087 (powerpc-isa205-64l.c): Remove.
6088 (powerpc-isa205-altivec64l.c): Remove.
6089 (powerpc-isa205-vsx64l.c): Remove.
6090 (s390-linux32.c): Remove.
6091 (s390-linux32v1.c): Remove.
6092 (s390-linux32v2.c): Remove.
6093 (s390-linux64.c): Remove.
6094 (s390-linux64v1.c): Remove.
6095 (s390-linux64v2.c): Remove.
6096 (s390-te-linux64.c): Remove.
6097 (s390-vx-linux64.c): Remove.
6098 (s390-tevx-linux64.c): Remove.
6099 (s390x-linux64.c): Remove.
6100 (s390x-linux64v1.c): Remove.
6101 (s390x-linux64v2.c): Remove.
6102 (s390x-te-linux64.c): Remove.
6103 (s390x-vx-linux64.c): Remove.
6104 (s390x-tevx-linux64.c): Remove.
6105 (tic6x-c64xp-linux.c): Remove.
6106 (tic6x-c64x-linux.c): Remove.
6107 (tic6x-c62x-linux.c): Remove.
6108 (reg-sh.c): Remove.
6109 (reg-sparc64.c): Remove.
6110 (reg-spu.c): Remove.
6111 (amd64.c): Remove.
6112 (amd64-linux.c): Remove.
6113 (amd64-avx.c): Remove.
6114 (amd64-avx-linux.c): Remove.
6115 (amd64-avx-avx512.c): Remove.
6116 (amd64-avx-avx512-linux.c): Remove.
6117 (amd64-mpx.c): Remove.
6118 (amd64-mpx-linux.c): Remove.
6119 (amd64-avx-mpx-avx512-pku.c): Remove.
6120 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
6121 (amd64-avx-mpx.c): Remove.
6122 (amd64-avx-mpx-linux.c): Remove.
6123 (x32.c): Remove.
6124 (x32-linux.c): Remove.
6125 (x32-avx.c): Remove.
6126 (x32-avx-linux.c): Remove.
6127 (x32-avx-avx512.c): Remove.
6128 (x32-avx-avx512-linux.c): Remove.
6129 (reg-xtensa.c): Remove.
6130 (reg-tilegx.c): Remove.
6131 (reg-tilegx32.c): Remove.
6132
6133 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6134
6135 * Makefile.in (SFILES): Add "common/environ.c".
6136 (OBJS): Add "common/environ.h".
6137
6138 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
6139
6140 * configure.ac: Check if the fs_base and gs_base members of
6141 `struct user_regs_struct' exist.
6142 * config.in: Regenerated.
6143 * configure: Likewise.
6144
6145 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
6146
6147 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
6148 target_read_memory.
6149 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
6150 (get_next_pcs_syscall_next_pc): Likewise.
6151
6152 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
6153
6154 * win32-i386-low.c: Fix incorrect reference to a couple source files.
6155 * nto-x86-low.c: Likewise.
6156
6157 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
6158
6159 * Makefile.in: Include disable-implicit-rules.mk.
6160
6161 2016-11-23 Pedro Alves <palves@redhat.com>
6162
6163 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
6164 (debug_vprintf): Use std::chrono::steady_clock instead of
6165 gettimeofday. Use '.' instead of ':'.
6166 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
6167 (get_timestamp): Use std::chrono::steady_clock instead of
6168 gettimeofday.
6169
6170 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6171
6172 * Makefile.in: Fix whitespace formatting.
6173
6174 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
6175
6176 * Makefile.in (SFILES, OBS): Flatten list and order
6177 alphabetically.
6178
6179 2016-11-23 Pedro Alves <palves@redhat.com>
6180
6181 * event-loop.c (handle_file_event): Use warning.
6182 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
6183 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6184 Use warning.
6185
6186 2016-11-23 Pedro Alves <palves@redhat.com>
6187
6188 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
6189 output.
6190 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
6191 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
6192 debug_printf and debug_flush for debug output.
6193 * server.c (handle_general_set): Likewise.
6194 * thread-db.c (try_thread_db_load): Use debug_printf for debug
6195 output.
6196
6197 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6198
6199 * Makefile.in (.c.o): Replace rule with ...
6200 (%.o: %.c): ... this one.
6201
6202 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6203
6204 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
6205 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
6206 make.
6207 * configure.ac: Remove checks for the make program.
6208 * configure: Re-generate.
6209
6210 2016-10-28 Pedro Alves <palves@redhat.com>
6211
6212 * Makefile.in (CXX_DIALECT): Get from configure.
6213 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
6214 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
6215 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
6216 * config.in: Regenerate.
6217 * configure: Regenerate.
6218
6219 2016-10-27 Yao Qi <yao.qi@linaro.org>
6220
6221 * linux-low.c (linux_supports_range_stepping): Return true if
6222 can_software_single_step return true.
6223
6224 2016-10-27 Yao Qi <yao.qi@linaro.org>
6225
6226 * inferiors.c (find_inferior_in_random): New function.
6227 * inferiors.h (find_inferior_in_random): Declare.
6228 * linux-low.c (linux_wait_for_event_filtered): Call
6229 find_inferior_in_random instead of find_inferior.
6230
6231 2016-10-27 Yao Qi <yao.qi@linaro.org>
6232
6233 * linux-low.c (linux_wait_1): If single-step breakpoints are
6234 inserted, remove them.
6235
6236 2016-10-26 Pedro Alves <palves@redhat.com>
6237
6238 * linux-low.c (handle_extended_wait): Link parent/child fork
6239 threads.
6240 (linux_wait_1): Unlink them.
6241 (linux_set_resume_request): Ignore resume requests for
6242 already-resumed and unhandled fork child threads.
6243 * linux-low.h (struct lwp_info) <fork_relative>: New field.
6244 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
6245 New functions.
6246 (handle_v_requests) <vCont>: Don't call require_running.
6247 * server.h (in_queued_stop_replies): New declaration.
6248
6249 2016-10-24 Yao Qi <yao.qi@linaro.org>
6250
6251 PR server/20733
6252 * linux-aarch64-low.c (append_insns): Cast the return value to
6253 'uint32_t *'.
6254
6255 2016-10-10 Yao Qi <yao.qi@linaro.org>
6256
6257 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
6258
6259 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
6260
6261 * target.c (target_supports_multi_process): New function, moved
6262 from...
6263 * target.h (target_supports_multi_process): ... here. Remove
6264 macro.
6265
6266 2016-10-05 Tom Tromey <tom@tromey.com>
6267
6268 PR remote/20655:
6269 * tracepoint.c (handle_tracepoint_bkpts): Check
6270 ipa_error_tracepoint, not ipa_stopping_tracepoint.
6271
6272 2016-10-05 Yao Qi <yao.qi@linaro.org>
6273
6274 * configure.srv: Update the path of arm-*.xml files.
6275
6276 2016-10-05 Terry Guo <terry.guo@arm.com>
6277 Yao Qi <yao.qi@linaro.org>
6278
6279 * Makefile.in: Adjust the path of rules.
6280 * configure.srv: Update the path of xml files.
6281 * regformats/arm-with-iwmmxt.dat: Regenerated.
6282 * regformats/arm-with-neon.dat: Likewise.
6283 * regformats/arm-with-vfpv2.dat: Likewise.
6284 * regformats/arm-with-vfpv3.dat Likewise.
6285
6286 2016-09-30 Yao Qi <yao.qi@linaro.org>
6287
6288 PR gdbserver/20627
6289 * target.c (target_stop_and_wait): Don't call
6290 target_continue_no_signal, use resume_stop instead.
6291
6292 2016-09-26 Yao Qi <yao.qi@linaro.org>
6293
6294 * linux-low.c (linux_wait_1): Call debug_exit.
6295
6296 2016-09-23 Pedro Alves <palves@redhat.com>
6297
6298 * Makefile.in (SFILES): Add common/new-op.c.
6299 (OBS): Add common/new-op.o.
6300 (new-op.o): New rule.
6301
6302 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
6303
6304 * .gitinore: Ignore more files.
6305
6306 2016-09-21 Yao Qi <yao.qi@linaro.org>
6307
6308 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
6309 23.
6310
6311 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
6312
6313 * server.c (start_inferior): Call target_mourn_inferior instead of
6314 mourn_inferior; pass ptid_t argument to it.
6315 (resume): Likewise.
6316 (handle_target_event): Likewise.
6317 * target.c (target_mourn_inferior): New function.
6318 * target.h (mourn_inferior): Delete macro.
6319
6320 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6321
6322 * linux-low.c (lwp_is_stepping): New function.
6323
6324 2016-09-06 Carl Love <cel@us.ibm.com>
6325
6326 * server.c (start_inferior): Fixed comment, requested comment change
6327 didn't get updated correctly. Removed reference to ptrace () call as
6328 it is only true on Linux systems.
6329
6330 2016-09-06 Carl Love <cel@us.ibm.com>
6331
6332 * server.c (start_inferior): Do not call
6333 function target_post_create_inferior () if the
6334 inferior process has already exited.
6335
6336 2016-09-05 Pedro Alves <palves@redhat.com>
6337
6338 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
6339 (COMPILE.pre, CC_LD): Use CXX directly.
6340 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
6341 * acinclude.m4: Don't include build-with-cxx.m4.
6342 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
6343 * configure: Regenerate.
6344
6345 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
6346
6347 PR gdb/19495
6348 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
6349 call writing data to own_buf.
6350
6351 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6352
6353 * target.c (mywait): Call target_wait instead of
6354 the_target->wait.
6355 (target_wait): New function.
6356
6357 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
6358
6359 * server.c (start_inferior): New variable 'ptid'. Replace calls
6360 to the_target->resume by target_continue{,_no_signal}, depending
6361 on the case.
6362 * target.c (target_stop_and_wait): Call target_continue_no_signal
6363 instead of the_target->resume.
6364 (target_continue): New function.
6365
6366 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
6367
6368 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
6369
6370 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
6371
6372 PR server/20491
6373 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
6374 ps_prochandle.
6375 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
6376 * linux-arm-low.c (ps_get_thread_area): Likewise.
6377 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
6378 * linux-m68k-low.c (ps_get_thread_area): Likewise.
6379 * linux-mips-low.c (ps_get_thread_area): Likewise.
6380 * linux-nios2-low.c (ps_get_thread_area): Likewise.
6381 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
6382 * linux-x86-low.c (ps_get_thread_area): Likewise.
6383 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
6384
6385 2016-08-19 Pedro Alves <palves@redhat.com>
6386
6387 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
6388
6389 2016-08-19 Pedro Alves <palves@redhat.com>
6390
6391 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
6392 comment. Use memcpy instead of casting through unsigned long.
6393
6394 2016-08-19 Pedro Alves <palves@redhat.com>
6395
6396 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
6397 allocating around 0x80000000.
6398
6399 2016-08-19 Pedro Alves <palves@redhat.com>
6400
6401 PR gdb/20415
6402 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
6403 (x32-avx512-linux-ipa.o): New rules.
6404 * configure.ac (x86_64-*-linux*): New x32 check.
6405 * configure.srv (ipa_x32_linux_regobj): New.
6406 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
6407 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
6408 descriptions.
6409 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
6410 descriptions.
6411 * configure: Regenerate.
6412
6413 2016-08-09 Pedro Alves <palves@redhat.com>
6414
6415 PR gdb/18653
6416 * Makefile.in (OBS): Add signals-state-save-restore.o.
6417 (signals-state-save-restore.o): New rule.
6418 * config.in: Regenerate.
6419 * configure: Regenerate.
6420 * linux-low.c: Include "signals-state-save-restore.h".
6421 (linux_create_inferior): Call
6422 restore_original_signals_state.
6423 * server.c: Include "dispositions-save-restore.h".
6424 (captured_main): Call save_original_signals_state.
6425
6426 2016-08-05 Pedro Alves <palves@redhat.com>
6427
6428 * configure: Regenerate.
6429
6430 2016-08-04 Yao Qi <yao.qi@linaro.org>
6431
6432 * linux-low.c (regsets_fetch_inferior_registers): Check
6433 errno is ESRCH or not.
6434
6435 2016-08-02 Yao Qi <yao.qi@linaro.org>
6436
6437 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
6438 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
6439 (thread_db_load_search): Update.
6440 (try_thread_db_load_1): Don't look for td_ta_event_addr,
6441 td_ta_set_event and td_ta_event_getmsg.
6442
6443 2016-07-26 Pedro Alves <palves@redhat.com>
6444
6445 PR server/20414
6446 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
6447 of unsigned long for 64-bit registers and use uint32_t instead of
6448 unsigned int for 32-bit registers.
6449
6450 2016-07-26 Pedro Alves <palves@redhat.com>
6451
6452 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
6453 to 'ptrace'.
6454
6455 2016-07-21 Tom Tromey <tom@tromey.com>
6456
6457 * configure: Rebuild.
6458
6459 2016-07-21 Yao Qi <yao.qi@linaro.org>
6460
6461 * mem-break.c (find_gdb_breakpoint): Cast bp to
6462 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
6463
6464 2016-07-21 Yao Qi <yao.qi@linaro.org>
6465
6466 * server.c (handle_v_requests): Support s and S actions
6467 if target_supports_software_single_step return true.
6468
6469 2016-07-21 Yao Qi <yao.qi@linaro.org>
6470
6471 * linux-low.c (resume_stopped_resumed_lwps): If resume request
6472 is resume_step, call maybe_hw_step.
6473 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
6474 and unstop them.
6475 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
6476 breakpoints or not.
6477 (proceed_one_lwp): If resume request is resume_step, install
6478 reinsert breakpoints and call maybe_hw_step.
6479
6480 2016-07-21 Yao Qi <yao.qi@linaro.org>
6481
6482 * linux-low.c (proceed_one_lwp): Declare.
6483 (linux_resume_one_thread): Remove local variable 'step'.
6484 Lift code enqueue signal. Call proceed_one_lwp instead of
6485 linux_resume_one_lwp.
6486
6487 2016-07-21 Yao Qi <yao.qi@linaro.org>
6488
6489 * linux-low.c (linux_resume_one_thread): Call
6490 enqueue_pending_signal.
6491
6492 2016-07-21 Yao Qi <yao.qi@linaro.org>
6493
6494 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
6495 * inferiors.c (do_restore_current_thread_cleanup): New function.
6496 (make_cleanup_restore_current_thread): Likewise.
6497 * linux-low.c (install_software_single_step_breakpoints): Call
6498 make_cleanup_restore_current_thread. Switch current_thread to
6499 thread.
6500
6501 2016-07-21 Yao Qi <yao.qi@linaro.org>
6502
6503 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
6504 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
6505 (clone_one_breakpoint): Likewise.
6506 (delete_reinsert_breakpoints): Change parameter to thread.
6507 Callers updated.
6508 (has_reinsert_breakpoints): Likewise.
6509 (uninsert_reinsert_breakpoints): Likewise.
6510 (reinsert_reinsert_breakpoints): Likewise.
6511 * mem-break.h (set_reinsert_breakpoint): Update declaration.
6512 (delete_reinsert_breakpoints): Likewise.
6513 (reinsert_reinsert_breakpoints): Likewise.
6514 (uninsert_reinsert_breakpoints): Likewise.
6515 (has_reinsert_breakpoints): Likewise.
6516
6517 2016-07-21 Yao Qi <yao.qi@linaro.org>
6518
6519 * inferiors.c (get_thread_process): Make parameter const.
6520 * inferiors.h (get_thread_process): Update declaration.
6521 * mem-break.c (clone_all_breakpoints): Remove all parameters.
6522 Add new parameters child_thread and parent_thread. Callers
6523 updated.
6524 * mem-break.h (clone_all_breakpoints): Update declaration.
6525
6526 2016-07-21 Yao Qi <yao.qi@linaro.org>
6527
6528 * mem-break.c (struct breakpoint) <cond_list>: Remove.
6529 <command_list, handler>: Remove.
6530 (struct gdb_breakpoint): New.
6531 (struct other_breakpoint): New.
6532 (struct reinsert_breakpoint): New.
6533 (is_gdb_breakpoint): New function.
6534 (any_persistent_commands): Update command_list if
6535 is_gdb_breakpoint returns true.
6536 (set_breakpoint): Create breakpoints according to their types.
6537 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
6538 (set_gdb_breakpoint_1): Likewise.
6539 (set_gdb_breakpoint): Likewise.
6540 (clear_breakpoint_conditions): Change parameter type to
6541 'struct gdb_breakpoint *'.
6542 (clear_breakpoint_commands): Likewise.
6543 (clear_breakpoint_conditions_and_commands): Likewise.
6544 (add_condition_to_breakpoint): Likewise.
6545 (add_breakpoint_condition): Likewise.
6546 (add_commands_to_breakpoint): Likewise.
6547 (check_breakpoints): Check other_breakpoint.
6548 (clone_one_breakpoint): Clone breakpopint according to its type.
6549 * mem-break.h (struct gdb_breakpoint): Declare.
6550 (set_gdb_breakpoint): Update declaration.
6551 (clear_breakpoint_conditions_and_commands): Likewise.
6552 (add_breakpoint_condition): Likewise.
6553 (add_breakpoint_commands): Likewise.
6554 * server.c (process_point_options): Change parameter type to
6555 'struct gdb_breakpoint *'.
6556
6557 2016-07-21 Yao Qi <yao.qi@linaro.org>
6558
6559 * mem-break.c (set_breakpoint_at): Rename it to ...
6560 (set_breakpoint_type_at): ... it.
6561 (set_breakpoint_at): Call set_breakpoint_type_at.
6562 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
6563 * mem-break.h (set_breakpoint_at): Update comments.
6564
6565 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
6566
6567 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
6568 to buf parameter.
6569 (nios2_store_gregset): Likewise.
6570
6571 2016-07-01 Pedro Alves <palves@redhat.com>
6572 Antoine Tremblay <antoine.tremblay@ericsson.com>
6573
6574 * linux-low.c: Change interface to take the target lwp_info
6575 pointer directly and return void. Handle detaching from a zombie
6576 thread.
6577 (linux_detach_lwp_callback): New function.
6578 (linux_detach): Detach from the leader thread after detaching from
6579 the clone threads.
6580
6581 2016-06-28 Yao Qi <yao.qi@linaro.org>
6582
6583 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
6584 for variable new_offset.
6585 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6586 (aarch64_ftrace_insn_reloc_cb): Likewise.
6587 (aarch64_ftrace_insn_reloc_tb): Likewise.
6588 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
6589 PRIx64 instead of PRIx32.
6590
6591 2016-06-28 Yao Qi <yao.qi@linaro.org>
6592
6593 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
6594 (the_low_target): Install arm_get_syscall_trapinfo.
6595
6596 2016-06-28 Yao Qi <yao.qi@linaro.org>
6597
6598 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
6599 function.
6600 (the_low_target): Install aarch64_get_syscall_trapinfo.
6601
6602 2016-06-28 Yao Qi <yao.qi@linaro.org>
6603
6604 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
6605 Callers updated.
6606 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
6607 Remove parameter sysno.
6608 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
6609 sysret.
6610
6611 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6612
6613 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
6614 (s390_emit_ne_goto): Likewise.
6615 (s390_emit_lt_goto): Likewise.
6616 (s390_emit_le_goto): Likewise.
6617 (s390_emit_gt_goto): Likewise.
6618 (s390_emit_ge_goto): Likewise.
6619 (s390x_emit_eq_goto): Likewise.
6620 (s390x_emit_ne_goto): Likewise.
6621 (s390x_emit_lt_goto): Likewise.
6622 (s390x_emit_le_goto): Likewise.
6623 (s390x_emit_gt_goto): Likewise.
6624 (s390x_emit_ge_goto): Likewise.
6625 (s390_emit_ops_impl): Mark variable static.
6626 (s390x_emit_ops): Likewise.
6627
6628 2016-06-17 Yao Qi <yao.qi@linaro.org>
6629
6630 * linux-low.c (handle_extended_wait): Call
6631 uninsert_reinsert_breakpoints for the parent process. Remove
6632 reinsert breakpoints from the child process. Reinsert them to
6633 the parent process when vfork is done.
6634 * mem-break.c (uninsert_reinsert_breakpoints): New function.
6635 (reinsert_reinsert_breakpoints): New function.
6636 * mem-break.h (uninsert_reinsert_breakpoints): Declare
6637 (reinsert_reinsert_breakpoints): Declare.
6638
6639 2016-06-17 Yao Qi <yao.qi@linaro.org>
6640
6641 * linux-low.c (handle_extended_wait): If the parent is doing
6642 step-over, remove the reinsert breakpoints from the forked child.
6643
6644 2016-06-17 Yao Qi <yao.qi@linaro.org>
6645
6646 * linux-low.c (unsuspend_all_lwps): Declare.
6647 (linux_low_filter_event): If thread exited, call finish_step_over.
6648 If step-over is finished, unsuspend other threads.
6649
6650 2016-06-17 Yao Qi <yao.qi@linaro.org>
6651
6652 * linux-low.c (linux_resume_one_lwp_throw): Assert
6653 has_reinsert_breakpoints returns false.
6654 * mem-break.c (delete_disabled_breakpoints): Assert
6655 bp type isn't reinsert_breakpoint.
6656
6657 2016-06-17 Yao Qi <yao.qi@linaro.org>
6658
6659 * linux-low.c (maybe_hw_step): New function.
6660 (linux_resume_one_lwp_throw): Call maybe_hw_step.
6661 (finish_step_over): Switch current_thread to lwp temporarily,
6662 and assert has_reinsert_breakpoints returns true.
6663 (proceed_one_lwp): Call maybe_hw_step.
6664 * mem-break.c (has_reinsert_breakpoints): New function.
6665 * mem-break.h (has_reinsert_breakpoints): Declare.
6666
6667 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
6668
6669 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
6670
6671 2016-05-17 Yao Qi <yao.qi@linaro.org>
6672
6673 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
6674 instead of find_inferior.
6675
6676 2016-05-05 Yao Qi <yao.qi@linaro.org>
6677
6678 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
6679 Initialize res to zero.
6680
6681 2016-05-05 Yao Qi <yao.qi@linaro.org>
6682
6683 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
6684 to uint32_t.
6685
6686 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6687
6688 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
6689 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
6690 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
6691
6692 2016-04-28 Par Olsson <par.olsson@windriver.com>
6693 Simon Marchi <simon.marchi@ericsson.com>
6694
6695 * tracepoint.c (write_inferior_int8): New function.
6696 (cmd_qtenable_disable): Write enable flag using
6697 write_inferior_int8.
6698
6699 2016-04-25 Yao Qi <yao.qi@linaro.org>
6700
6701 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
6702 (need_step_over_p): Return zero if the LWP has pending signals
6703 can be delivered on software single step target.
6704
6705 2016-04-25 Yao Qi <yao.qi@linaro.org>
6706
6707 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
6708 return instead of error.
6709
6710 2016-04-22 Yao Qi <yao.qi@linaro.org>
6711
6712 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
6713 to 23.
6714
6715 2016-04-22 Yao Qi <yao.qi@linaro.org>
6716
6717 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
6718 signal when stepping over breakpoint with software single
6719 step.
6720
6721 2016-04-21 Pedro Alves <palves@redhat.com>
6722
6723 * linux-s390-low.c (s390_collect_ptrace_register)
6724 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
6725 add casts.
6726 (s390_check_regset): Use void * instead of gdb_byte *.
6727
6728 2016-04-20 Pedro Alves <palves@redhat.com>
6729
6730 * configure: Renegerate.
6731
6732 2016-04-20 Yao Qi <yao.qi@linaro.org>
6733
6734 * linux-aarch32-low.c: Include "arch/arm-linux.h".
6735 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
6736 number 16.
6737 (arm_store_gregset): Likewise.
6738
6739 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
6740
6741 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
6742 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
6743 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
6744 (amd64-avx-mpx-linux.c): New rules.
6745 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
6746 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
6747 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
6748 (srv_amd64_regobj): Add amd64-avx-mpx.o.
6749 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
6750 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
6751 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
6752 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
6753 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
6754 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
6755 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
6756 * linux-x86-low.c (x86_linux_read_description): Add case for
6757 X86_XSTATE_AVX_MPX_MASK.
6758 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
6759 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
6760 init_registers_i386_avx_mpx_linux.
6761 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6762 (initialize_low_tracepoint): Call
6763 init_registers_i386_avx_mpx_linux.
6764 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
6765 (initialize_low_tracepoint): Call
6766 init_registers_amd64_avx_mpx_linux.
6767 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
6768 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
6769 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
6770 declarations.
6771
6772 2016-04-18 Pedro Alves <palves@redhat.com>
6773
6774 * configure: Regenerate.
6775
6776 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
6777
6778 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
6779 (aarch64_emit_sub): Likewise.
6780
6781 2016-04-12 Pedro Alves <palves@redhat.com>
6782
6783 * utils.c (prepare_to_throw_exception): Delete.
6784
6785 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
6786
6787 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
6788
6789 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
6790
6791 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
6792
6793 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
6794
6795 * linux-aarch64-ipa.c: Add <elf.h> include.
6796 * linux-ppc-ipa.c: Add <elf.h> include.
6797 * linux-s390-ipa.c: Add <elf.h> include.
6798
6799 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6800
6801 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
6802 (get_raw_reg_ptr): Likewise.
6803 (get_trace_state_variable_value_ptr): Likewise.
6804 (set_trace_state_variable_value_ptr): Likewise.
6805 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
6806 char *.
6807
6808 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
6809 Marcin Kościelnicki <koriakin@0x04.net>
6810
6811 PR/17221
6812 * linux-ppc-low.c (emit_insns): New function.
6813 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
6814 (ppc_emit_prologue): New function.
6815 (ppc_emit_epilogue): New function.
6816 (ppc_emit_add): New function.
6817 (ppc_emit_sub): New function.
6818 (ppc_emit_mul): New function.
6819 (ppc_emit_lsh): New function.
6820 (ppc_emit_rsh_signed): New function.
6821 (ppc_emit_rsh_unsigned): New function.
6822 (ppc_emit_ext): New function.
6823 (ppc_emit_zero_ext): New function.
6824 (ppc_emit_log_not): New function.
6825 (ppc_emit_bit_and): New function.
6826 (ppc_emit_bit_or): New function.
6827 (ppc_emit_bit_xor): New function.
6828 (ppc_emit_bit_not): New function.
6829 (ppc_emit_equal): New function.
6830 (ppc_emit_less_signed): New function.
6831 (ppc_emit_less_unsigned): New function.
6832 (ppc_emit_ref): New function.
6833 (ppc_emit_const): New function.
6834 (ppc_emit_reg): New function.
6835 (ppc_emit_pop): New function.
6836 (ppc_emit_stack_flush): New function.
6837 (ppc_emit_swap): New function.
6838 (ppc_emit_stack_adjust): New function.
6839 (ppc_emit_call): New function.
6840 (ppc_emit_int_call_1): New function.
6841 (ppc_emit_void_call_2): New function.
6842 (ppc_emit_if_goto): New function.
6843 (ppc_emit_goto): New function.
6844 (ppc_emit_eq_goto): New function.
6845 (ppc_emit_ne_goto): New function.
6846 (ppc_emit_lt_goto): New function.
6847 (ppc_emit_le_goto): New function.
6848 (ppc_emit_gt_goto): New function.
6849 (ppc_emit_ge_goto): New function.
6850 (ppc_write_goto_address): New function.
6851 (ppc_emit_ops_impl): New static variable.
6852 (ppc64v1_emit_prologue): New function.
6853 (ppc64v2_emit_prologue): New function.
6854 (ppc64_emit_epilogue): New function.
6855 (ppc64_emit_add): New function.
6856 (ppc64_emit_sub): New function.
6857 (ppc64_emit_mul): New function.
6858 (ppc64_emit_lsh): New function.
6859 (ppc64_emit_rsh_signed): New function.
6860 (ppc64_emit_rsh_unsigned): New function.
6861 (ppc64_emit_ext): New function.
6862 (ppc64_emit_zero_ext): New function.
6863 (ppc64_emit_log_not): New function.
6864 (ppc64_emit_bit_and): New function.
6865 (ppc64_emit_bit_or): New function.
6866 (ppc64_emit_bit_xor): New function.
6867 (ppc64_emit_bit_not): New function.
6868 (ppc64_emit_equal): New function.
6869 (ppc64_emit_less_signed): New function.
6870 (ppc64_emit_less_unsigned): New function.
6871 (ppc64_emit_ref): New function.
6872 (ppc64_emit_const): New function.
6873 (ppc64v1_emit_reg): New function.
6874 (ppc64v2_emit_reg): New function.
6875 (ppc64_emit_pop): New function.
6876 (ppc64_emit_stack_flush): New function.
6877 (ppc64_emit_swap): New function.
6878 (ppc64v1_emit_call): New function.
6879 (ppc64v2_emit_call): New function.
6880 (ppc64v1_emit_int_call_1): New function.
6881 (ppc64v2_emit_int_call_1): New function.
6882 (ppc64v1_emit_void_call_2): New function.
6883 (ppc64v2_emit_void_call_2): New function.
6884 (ppc64_emit_if_goto): New function.
6885 (ppc64_emit_eq_goto): New function.
6886 (ppc64_emit_ne_goto): New function.
6887 (ppc64_emit_lt_goto): New function.
6888 (ppc64_emit_le_goto): New function.
6889 (ppc64_emit_gt_goto): New function.
6890 (ppc64_emit_ge_goto): New function.
6891 (ppc64v1_emit_ops_impl): New static variable.
6892 (ppc64v2_emit_ops_impl): New static variable.
6893 (ppc_emit_ops): New function.
6894 (linux_low_target): Wire in ppc_emit_ops.
6895
6896 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
6897 Marcin Kościelnicki <koriakin@0x04.net>
6898
6899 PR/17221
6900 * Makefile.in: Add powerpc-*-ipa.o
6901 * configure.srv: Add ipa_obj for powerpc*-linux.
6902 * linux-ppc-ipa.c: New file.
6903 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
6904 includes.
6905 (PPC_FIELD): New macro.
6906 (PPC_SEXT): New macro.
6907 (PPC_OP6): New macro.
6908 (PPC_BO): New macro.
6909 (PPC_LI): New macro.
6910 (PPC_BD): New macro.
6911 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6912 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6913 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6914 (ppc_get_thread_area): New function.
6915 (is_elfv2_inferior): New function.
6916 (gen_ds_form): New function.
6917 (GEN_STD): New macro.
6918 (GEN_STDU): New macro.
6919 (GEN_LD): New macro.
6920 (GEN_LDU): New macro.
6921 (gen_d_form): New function.
6922 (GEN_ADDI): New macro.
6923 (GEN_ADDIS): New macro.
6924 (GEN_LI): New macro.
6925 (GEN_LIS): New macro.
6926 (GEN_ORI): New macro.
6927 (GEN_ORIS): New macro.
6928 (GEN_LWZ): New macro.
6929 (GEN_STW): New macro.
6930 (GEN_STWU): New macro.
6931 (gen_xfx_form): New function.
6932 (GEN_MFSPR): New macro.
6933 (GEN_MTSPR): New macro.
6934 (GEN_MFCR): New macro.
6935 (GEN_MTCR): New macro.
6936 (GEN_SYNC): New macro.
6937 (GEN_LWSYNC): New macro.
6938 (gen_x_form): New function.
6939 (GEN_OR): New macro.
6940 (GEN_MR): New macro.
6941 (GEN_LWARX): New macro.
6942 (GEN_STWCX): New macro.
6943 (GEN_CMPW): New macro.
6944 (gen_md_form): New function.
6945 (GEN_RLDICL): New macro.
6946 (GEN_RLDICR): New macro.
6947 (gen_i_form): New function.
6948 (GEN_B): New macro.
6949 (GEN_BL): New macro.
6950 (gen_b_form): New function.
6951 (GEN_BNE): New macro.
6952 (GEN_LOAD): New macro.
6953 (GEN_STORE): New macro.
6954 (gen_limm): New function.
6955 (gen_atomic_xchg): New function.
6956 (gen_call): New function.
6957 (ppc_relocate_instruction): New function.
6958 (ppc_install_fast_tracepoint_jump_pad): New function.
6959 (ppc_get_min_fast_tracepoint_insn_len): New function.
6960 (ppc_get_ipa_tdesc_idx): New function.
6961 (the_low_target): Wire in the new functions.
6962 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6963 tdescs.
6964 * linux-ppc-tdesc.h: New file.
6965
6966 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6967
6968 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6969 (alloc_jump_pad_buffer): New function.
6970 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6971 (alloc_jump_pad_buffer): New function.
6972 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6973 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6974 (alloc_jump_pad_buffer): New function.
6975 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6976 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6977 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6978 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6979
6980 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6981
6982 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6983 * linux-amd64-ipa.c: Likewise.
6984 * linux-i386-ipa.c: Likewise.
6985 * linux-s390-ipa.c: Likewise.
6986 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6987 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6988 set_trace_state_variable_value_ptr.
6989 (struct ipa_sym_addresses): Likewise.
6990 (symbol_list): Likewise.
6991 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6992 accessing gdb_collect directly.
6993 (gdb_collect_ptr_type): New typedef.
6994 (get_raw_reg_ptr_type): New typedef.
6995 (get_trace_state_variable_value_ptr_type): New typedef.
6996 (set_trace_state_variable_value_ptr_type): New typedef.
6997 (gdb_collect_ptr): New global.
6998 (get_raw_reg_ptr): New global.
6999 (get_trace_state_variable_value_ptr): New global.
7000 (set_trace_state_variable_value_ptr): New global.
7001 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
7002 accessing get_raw_reg directly.
7003 (get_get_tsv_func_addr): Likewise for
7004 get_trace_state_variable_value_ptr.
7005 (get_set_tsv_func_addr): Likewise for
7006 set_trace_state_variable_value_ptr.
7007 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
7008
7009 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
7010
7011 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
7012
7013 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
7014
7015 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
7016 packets.
7017 (relocate_instruction): Remove own_buf.
7018 * server.c (own_buf): Make global.
7019 (handle_v_requests): Make global.
7020 * server.h (own_buf): New declaration.
7021 (handle_v_requests): New prototype.
7022
7023 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7024
7025 PR 18377
7026 * linux-s390-low.c (add_insns): New function.
7027 (s390_emit_prologue): New function.
7028 (s390_emit_epilogue): New function.
7029 (s390_emit_add): New function.
7030 (s390_emit_sub): New function.
7031 (s390_emit_mul): New function.
7032 (s390_emit_lsh): New function.
7033 (s390_emit_rsh_signed): New function.
7034 (s390_emit_rsh_unsigned): New function.
7035 (s390_emit_ext): New function.
7036 (s390_emit_log_not): New function.
7037 (s390_emit_bit_and): New function.
7038 (s390_emit_bit_or): New function.
7039 (s390_emit_bit_xor): New function.
7040 (s390_emit_bit_not): New function.
7041 (s390_emit_equal): New function.
7042 (s390_emit_less_signed): New function.
7043 (s390_emit_less_unsigned): New function.
7044 (s390_emit_ref): New function.
7045 (s390_emit_if_goto): New function.
7046 (s390_emit_goto): New function.
7047 (s390_write_goto_address): New function.
7048 (s390_emit_litpool): New function.
7049 (s390_emit_const): New function.
7050 (s390_emit_call): New function.
7051 (s390_emit_reg): New function.
7052 (s390_emit_pop): New function.
7053 (s390_emit_stack_flush): New function.
7054 (s390_emit_zero_ext): New function.
7055 (s390_emit_swap): New function.
7056 (s390_emit_stack_adjust): New function.
7057 (s390_emit_set_r2): New function.
7058 (s390_emit_int_call_1): New function.
7059 (s390_emit_void_call_2): New function.
7060 (s390_emit_eq_goto): New function.
7061 (s390_emit_ne_goto): New function.
7062 (s390_emit_lt_goto): New function.
7063 (s390_emit_le_goto): New function.
7064 (s390_emit_gt_goto): New function.
7065 (s390_emit_ge_goto): New function.
7066 (s390x_emit_prologue): New function.
7067 (s390x_emit_epilogue): New function.
7068 (s390x_emit_add): New function.
7069 (s390x_emit_sub): New function.
7070 (s390x_emit_mul): New function.
7071 (s390x_emit_lsh): New function.
7072 (s390x_emit_rsh_signed): New function.
7073 (s390x_emit_rsh_unsigned): New function.
7074 (s390x_emit_ext): New function.
7075 (s390x_emit_log_not): New function.
7076 (s390x_emit_bit_and): New function.
7077 (s390x_emit_bit_or): New function.
7078 (s390x_emit_bit_xor): New function.
7079 (s390x_emit_bit_not): New function.
7080 (s390x_emit_equal): New function.
7081 (s390x_emit_less_signed): New function.
7082 (s390x_emit_less_unsigned): New function.
7083 (s390x_emit_ref): New function.
7084 (s390x_emit_if_goto): New function.
7085 (s390x_emit_const): New function.
7086 (s390x_emit_call): New function.
7087 (s390x_emit_reg): New function.
7088 (s390x_emit_pop): New function.
7089 (s390x_emit_stack_flush): New function.
7090 (s390x_emit_zero_ext): New function.
7091 (s390x_emit_swap): New function.
7092 (s390x_emit_stack_adjust): New function.
7093 (s390x_emit_int_call_1): New function.
7094 (s390x_emit_void_call_2): New function.
7095 (s390x_emit_eq_goto): New function.
7096 (s390x_emit_ne_goto): New function.
7097 (s390x_emit_lt_goto): New function.
7098 (s390x_emit_le_goto): New function.
7099 (s390x_emit_gt_goto): New function.
7100 (s390x_emit_ge_goto): New function.
7101 (s390_emit_ops): New function.
7102 (struct linux_target_ops): Fill in emit_ops hook.
7103
7104 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7105
7106 PR 18377
7107 * Makefile.in: Add s390 IPA files.
7108 * configure.srv: Build IPA for s390.
7109 * linux-s390-ipa.c: New file.
7110 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
7111 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
7112 (tdesc_s390_linux32): Likewise.
7113 (init_registers_s390_linux32v1): Likewise.
7114 (tdesc_s390_linux32v1): Likewise.
7115 (init_registers_s390_linux32v2): Likewise.
7116 (tdesc_s390_linux32v2): Likewise.
7117 (init_registers_s390_linux64): Likewise.
7118 (tdesc_s390_linux64): Likewise.
7119 (init_registers_s390_linux64v1): Likewise.
7120 (tdesc_s390_linux64v1): Likewise.
7121 (init_registers_s390_linux64v2): Likewise.
7122 (tdesc_s390_linux64v2): Likewise.
7123 (init_registers_s390_te_linux64): Likewise.
7124 (tdesc_s390_te_linux64): Likewise.
7125 (init_registers_s390_vx_linux64): Likewise.
7126 (tdesc_s390_vx_linux64): Likewise.
7127 (init_registers_s390_tevx_linux64): Likewise.
7128 (tdesc_s390_tevx_linux64): Likewise.
7129 (init_registers_s390x_linux64): Likewise.
7130 (tdesc_s390x_linux64): Likewise.
7131 (init_registers_s390x_linux64v1): Likewise.
7132 (tdesc_s390x_linux64v1): Likewise.
7133 (init_registers_s390x_linux64v2): Likewise.
7134 (tdesc_s390x_linux64v2): Likewise.
7135 (init_registers_s390x_te_linux64): Likewise.
7136 (tdesc_s390x_te_linux64): Likewise.
7137 (init_registers_s390x_vx_linux64): Likewise.
7138 (tdesc_s390x_vx_linux64): Likewise.
7139 (init_registers_s390x_tevx_linux64): Likewise.
7140 (tdesc_s390x_tevx_linux64): Likewise.
7141 (have_hwcap_s390_vx): New static variable.
7142 (s390_arch_setup): Fill have_hwcap_s390_vx.
7143 (s390_get_thread_area): New function.
7144 (s390_ft_entry_gpr_esa): New const.
7145 (s390_ft_entry_gpr_zarch): New const.
7146 (s390_ft_entry_misc): New const.
7147 (s390_ft_entry_fr): New const.
7148 (s390_ft_entry_vr): New const.
7149 (s390_ft_main_31): New const.
7150 (s390_ft_main_64): New const.
7151 (s390_ft_exit_fr): New const.
7152 (s390_ft_exit_vr): New const.
7153 (s390_ft_exit_misc): New const.
7154 (s390_ft_exit_gpr_esa): New const.
7155 (s390_ft_exit_gpr_zarch): New const.
7156 (append_insns): New function.
7157 (s390_relocate_instruction): New function.
7158 (s390_install_fast_tracepoint_jump_pad): New function.
7159 (s390_get_min_fast_tracepoint_insn_len): New function.
7160 (s390_get_ipa_tdesc_idx): New function.
7161 (struct linux_target_ops): Wire in the above functions.
7162 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
7163 * linux-s390-tdesc.h: New file.
7164
7165 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
7166
7167 * linux-s390-low.c (s390_supports_tracepoints): New function.
7168 (struct linux_target_ops): Fill supports_tracepoints hook.
7169
7170 2016-03-18 Yao Qi <yao.qi@linaro.org>
7171
7172 * linux-low.c (lwp_signal_can_be_delivered): New function.
7173 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
7174
7175 2016-03-18 Yao Qi <yao.qi@linaro.org>
7176
7177 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
7178 0 if signal is enqueued. Remove 'signal' from one debugging
7179 message. Move one debugging message to some lines below.
7180 Remove code setting 'signal' to 0.
7181
7182 2016-03-18 Yao Qi <yao.qi@linaro.org>
7183
7184 * linux-low.c (linux_low_filter_event): Remove redundant
7185 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
7186
7187 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
7188
7189 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
7190 (struct linux_target_ops): Wire in the above.
7191
7192 2016-03-03 Yao Qi <yao.qi@linaro.org>
7193
7194 * linux-low.c: Update comments to start_step_over.
7195
7196 2016-03-03 Yao Qi <yao.qi@linaro.org>
7197
7198 PR server/19736
7199 * linux-low.c (handle_extended_wait): Set child suspended
7200 if event_lwp->bp_reinsert isn't zero.
7201
7202 2016-03-02 Yao Qi <yao.qi@linaro.org>
7203
7204 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
7205 enqueue_pending_signal.
7206
7207 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
7208
7209 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
7210 is actually loaded.
7211
7212 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7213
7214 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
7215 (s390_regmap_3264) [!__s390x__]: New global.
7216 (s390_collect_ptrace_register): Skip map entries containing -1.
7217 (s390_supply_ptrace_register): Ditto.
7218 (s390_fill_gprs_high): New function.
7219 (s390_store_gprs_high): New function.
7220 (s390_regsets): Add NT_S390_HIGH_GPRS.
7221 (s390_get_hwcap): Enable on 31-bit.
7222 (have_hwcap_s390_high_gprs): Enable on 31-bit.
7223 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
7224 Detect NT_S390_HIGH_GPRS.
7225 (s390_usrregs_info_3264): Enable on 31-bit.
7226 (s390_regs_info): Enable regs_info_3264 on 31-bit.
7227 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
7228
7229 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
7230
7231 PR gdb/13808
7232 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
7233 * configure.srv: Ditto.
7234 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
7235 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
7236 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
7237 (init_registers_amd64_linux): Remove prototype.
7238 (tdesc_amd64_linux): Remove declaration.
7239 (get_ipa_tdesc): New function.
7240 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7241 initialize remaining tdescs.
7242 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
7243 (init_registers_i386_linux): Remove prototype.
7244 (tdesc_i386_linux): Remove declaration.
7245 (get_ipa_tdesc): New function.
7246 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
7247 initialize remaining tdescs.
7248 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
7249 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
7250 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
7251 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
7252 (x86_get_ipa_tdesc_idx): New function.
7253 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
7254 * linux-x86-tdesc.h: New file.
7255 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
7256 (target_get_ipa_tdesc_idx): New macro.
7257 * tracepoint.c (ipa_tdesc_idx): New macro.
7258 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
7259 (symbol_list): Add ipa_tdesc_idx.
7260 (cmd_qtstart): Write ipa_tdesc_idx in the target.
7261 (ipa_tdesc): Remove.
7262 (ipa_tdesc_idx): New variable.
7263 (get_context_regcache): Use get_ipa_tdesc.
7264 (gdb_collect): Ditto.
7265 (gdb_probe): Ditto.
7266 * tracepoint.h (get_ipa_tdesc): New prototype.
7267 (ipa_tdesc): Remove.
7268
7269 2016-02-24 Pedro Alves <palves@redhat.com>
7270
7271 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
7272 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
7273 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
7274 Factor out common code between the USE_SIGTRAP_SIGINFO and
7275 !USE_SIGTRAP_SIGINFO blocks.
7276 (linux_low_filter_event): Call save_stop_reason instead of
7277 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
7278 Update comments.
7279 (linux_wait_1): Update comments.
7280
7281 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
7282
7283 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
7284 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
7285 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
7286 ppc_insert_point, ppc_remove_point.
7287
7288 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
7289
7290 * linux-s390-low.c (s390_supports_z_point_type): New function.
7291 (struct linux_target_ops): Wire s390_supports_z_point_type in.
7292
7293 2016-02-16 Yao Qi <yao.qi@linaro.org>
7294
7295 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
7296 PC. Get pc from regcache_read_pc.
7297
7298 2016-02-12 Yao Qi <yao.qi@linaro.org>
7299
7300 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
7301 or linux_get_pc_32bit.
7302 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
7303
7304 2016-02-12 Yao Qi <yao.qi@linaro.org>
7305
7306 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
7307 arm_linux_get_next_pcs_fixup.
7308
7309 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
7310
7311 * tracepoint.c (x_tracepoint_action_download): Change
7312 write_inferior_data_ptr to write_inferior_data_pointer.
7313 (cmd_qtstart): Likewise.
7314 (write_inferior_data_ptr): Remove.
7315 (download_agent_expr): Change write_inferior_data_ptr to
7316 write_inferior_data_pointer.
7317 (download_tracepoint_1): Likewise.
7318 (download_tracepoint): Likewise.
7319 (download_trace_state_variables): Likewise.
7320
7321 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
7322 Marcin Kościelnicki <koriakin@0x04.net>
7323
7324 * tracepoint.c (struct tracepoint_action_ops): Remove.
7325 (struct tracepoint_action): Remove ops.
7326 (m_tracepoint_action_download, r_tracepoint_action_download)
7327 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
7328 size and offset accordingly.
7329 (m_tracepoint_action_ops, r_tracepoint_action_ops)
7330 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
7331 (tracepoint_action_send, tracepoint_action_download): New functions.
7332 Helpers for trace action handlers.
7333 (add_tracepoint_action): Remove setup actions ops.
7334 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
7335
7336 2016-02-10 Yao Qi <yao.qi@linaro.org>
7337
7338 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
7339
7340 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7341
7342 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
7343 to AC_OUTPUT.
7344 * configure: Regenerate.
7345
7346 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
7347
7348 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
7349 void * to gdb_byte *.
7350 * linux-low.c (siginfo_fixup): Likewise.
7351 (linux_xfer_siginfo): Likewise.
7352 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
7353 Likewise.
7354 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7355
7356 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
7357
7358 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
7359 to srv_tgtobj.
7360 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
7361 to srv_tgtobj.
7362 * linux-x86-low.c [__x86_64__]: Include
7363 "nat/amd64-linux-siginfo.h".
7364 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
7365 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
7366 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
7367 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
7368 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
7369 (cpt_si_fd, si_timerid, si_overrun): Move from
7370 nat/amd64-linux-siginfo.c.
7371 * Makefile.in (amd64-linux-siginfo.o:): New rule.
7372
7373 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
7374
7375 * server.c (skip_to_semicolon): Remove.
7376 (process_point_options): Use strchrnul instead of
7377 skip_to_semicolon.
7378
7379 2016-01-26 Yao Qi <yao.qi@linaro.org>
7380
7381 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
7382 * linux-low.c (install_software_single_step_breakpoints): Don't
7383 call regcache_read_pc.
7384 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
7385 argument pc.
7386
7387 2016-01-26 Yao Qi <yao.qi@linaro.org>
7388
7389 * linux-low.c (install_software_single_step_breakpoints): Call
7390 regcache_read_pc instead of get_pc.
7391
7392 2016-01-26 Yao Qi <yao.qi@linaro.org>
7393
7394 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
7395 (unblock_async_io): Rename to ...
7396 (block_unblock_async_io): ... it. New function.
7397 (enable_async_io): Don't install SIGIO handler. Unblock it
7398 instead.
7399 (disable_async_io): Don't ignore SIGIO. Block it instead.
7400 (initialize_async_io): Install SIGIO handler. Don't call
7401 unblock_async_io.
7402
7403 2016-01-26 Yao Qi <yao.qi@linaro.org>
7404
7405 * remote-utils.c (getpkt): If the buffer isn't empty, and the
7406 first character is '\003', call *the_target->request_interrupt.
7407
7408 2016-01-25 Yao Qi <yao.qi@linaro.org>
7409
7410 * remote-utils.c (new_thread_notify): Remove.
7411 (dead_thread_notify): Likewise.
7412 * remote-utils.h (new_thread_notify): Remove declaration.
7413 (dead_thread_notify): Likewise.
7414
7415 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
7416
7417 * gdb.trace/pending.exp: Fix expected message on continue.
7418
7419 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
7420
7421 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
7422 it works properly on big-endian machines where sizeof (CORE_ADDR)
7423 != sizeof (void *).
7424
7425 2016-01-21 Pedro Alves <palves@redhat.com>
7426
7427 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
7428 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
7429 * configure: Regenerate.
7430
7431 2016-01-21 Yao Qi <yao.qi@linaro.org>
7432
7433 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
7434 is_thumb and set it according to CPSR saved on the stack.
7435 (get_next_pcs_syscall_next_pc): Pass is_thumb to
7436 arm_sigreturn_next_pc.
7437
7438 2016-01-18 Yao Qi <yao.qi@linaro.org>
7439
7440 * linux-low.c (linux_set_pc_64bit): New function.
7441 (linux_get_pc_64bit): New function.
7442 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
7443 Declare.
7444 * linux-sparc-low.c (debug_threads): Remove declaration.
7445 (sparc_get_pc): Remove.
7446 (the_low_target): Use linux_get_pc_64bit instead of
7447 sparc_get_pc.
7448 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
7449 (the_low_target): Use linux_get_pc_64bit and
7450 linux_set_pc_64bit.
7451
7452 2016-01-18 Yao Qi <yao.qi@linaro.org>
7453
7454 * linux-arm-low.c (debug_threads): Remove declaration.
7455 (arm_get_pc, arm_set_pc): Remove.
7456 (the_low_target): Use linux_get_pc_32bit and
7457 linux_set_pc_32bit.
7458 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
7459 (the_low_target): Use linux_get_pc_32bit and
7460 linux_set_pc_32bit.
7461 * linux-cris-low.c (debug_threads): Remove declaration.
7462 (cris_get_pc, cris_set_pc,): Remove.
7463 (the_low_target): Use linux_get_pc_32bit and
7464 linux_set_pc_32bit.
7465 * linux-crisv32-low.c (debug_threads): Remove declaration.
7466 (cris_get_pc, cris_set_pc): Remove.
7467 (the_low_target): Use linux_get_pc_32bit and
7468 linux_set_pc_32bit.
7469 * linux-low.c: Include inttypes.h.
7470 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
7471 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
7472 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
7473 (the_low_target): Use linux_get_pc_32bit and
7474 linux_set_pc_32bit.
7475 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
7476 (the_low_target): Use linux_get_pc_32bit and
7477 linux_set_pc_32bit.
7478 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
7479 (the_low_target): Use linux_get_pc_32bit and
7480 linux_set_pc_32bit.
7481 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
7482 (the_low_target): Use linux_get_pc_32bit and
7483 linux_set_pc_32bit.
7484 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
7485 (the_low_target): Use linux_get_pc_32bit and
7486 linux_set_pc_32bit.
7487
7488 2016-01-18 Gary Benson <gbenson@redhat.com>
7489
7490 * configure.ac (AC_FUNC_FORK): New check.
7491 * config.in: Regenerate.
7492 * configure: Likewise.
7493
7494 2016-01-14 Yao Qi <yao.qi@linaro.org>
7495
7496 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
7497 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
7498 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
7499 arm_get_next_pcs_ctor.
7500
7501 2016-01-12 Josh Stone <jistone@redhat.com>
7502 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7503
7504 * inferiors.h: Include "gdb_vecs.h".
7505 (struct process_info): Add syscalls_to_catch.
7506 * inferiors.c (remove_process): Free syscalls_to_catch.
7507 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
7508 syscall_return stops.
7509 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
7510 * server.c (handle_general_set): Handle QCatchSyscalls.
7511 (handle_query): Report support for QCatchSyscalls.
7512 * target.h (struct target_ops): Add supports_catch_syscall.
7513 (target_supports_catch_syscall): New macro.
7514 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
7515 (struct lwp_info): Add syscall_state.
7516 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
7517 Maintain syscall_state and syscalls_to_catch across exec.
7518 (get_syscall_trapinfo): New function, proxy to the_low_target.
7519 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
7520 (linux_low_filter_event): Toggle syscall_state entry/return for
7521 syscall traps, and set it ignored for all others.
7522 (gdb_catching_syscalls_p): New function.
7523 (gdb_catch_this_syscall_p): New function.
7524 (linux_wait_1): Handle SYSCALL_SIGTRAP.
7525 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
7526 (linux_supports_catch_syscall): New function.
7527 (linux_target_ops): Install it.
7528 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
7529 (the_low_target): Install it.
7530
7531 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7532
7533 * acinclude.m4: Include new ../warning.m4 file.
7534 * configure: Regenerated.
7535 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
7536
7537 2016-01-12 Mike Frysinger <vapier@gentoo.org>
7538
7539 * ax.c (is_goto_target): Mark static.
7540 * linux-low.c (register_addr): Likewise.
7541 (linux_fetch_registers, linux_store_registers): Likewise.
7542 * mem-break.c (any_persistent_commands): Fix old prototype.
7543 (add_commands_to_breakpoint): Mark static.
7544 * regcache.c (find_register_by_name): Delete unused func.
7545 * remote-utils.c (hex_or_minus_one): Mark static.
7546 * server.c (monitor_show_help): Mark static.
7547 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
7548 handle_v_requests): Likewise.
7549
7550 2016-01-12 Pedro Alves <palves@redhat.com>
7551
7552 Remove use of the registered trademark symbol throughout.
7553
7554 2016-01-08 Yao Qi <yao.qi@linaro.org>
7555
7556 * remote-utils.c (getpkt): If c is '\003', call target hook
7557 request_interrupt.
7558
7559 2016-01-06 Yao Qi <yao.qi@linaro.org>
7560
7561 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
7562 linux-aarch32-low.c.
7563 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7564 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7565 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7566 (thumb2_breakpoint): Declare.
7567 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
7568 linux-aarch32-low.h.
7569 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7570 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
7571 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7572
7573 2016-01-01 Joel Brobecker <brobecker@adacore.com>
7574
7575 * gdbreplay.c (gdbreplay_version): Change copyright year in
7576 version message.
7577 * server.c (gdbserver_version): Likewise.
7578
7579 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
7580
7581 * server.c (crc32_table): Delete.
7582 (crc32): Use libiberty's xcrc32 function.
7583
7584 2015-12-22 Joel Brobecker <brobecker@adacore.com>
7585
7586 * lynx-low.c (lynx_delete_thread_callback): New function.
7587 (lynx_mourn): Properly delete our process and all of its
7588 threads. Remove call to clear_inferiors.
7589
7590 2015-12-22 Joel Brobecker <brobecker@adacore.com>
7591
7592 * target.c (thread_search_callback): Add check that
7593 the thread_stopped target callback is not NULL before
7594 calling it.
7595
7596 2015-12-21 Yao Qi <yao.qi@linaro.org>
7597
7598 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
7599 arm breakpoint.
7600
7601 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7602
7603 * server.c (handle_query): Call target_supports_software_single_step.
7604
7605 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7606
7607 * linux-low.c (single_step): New function.
7608 (linux_resume_one_lwp_throw): Call single_step.
7609 (start_step_over): Likewise.
7610
7611 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7612
7613 * Makefile.in (SFILES): Append arch/arm-linux.c,
7614 arch/arm-get-next-pcs.c.
7615 (arm-linux.o): New rule.
7616 (arm-get-next-pcs.o): New rule.
7617 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
7618 arm-linux.o.
7619 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
7620 to linux-aarch32-low.c.
7621 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7622 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7623 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7624 (thumb2_breakpoint_len): Likewise.
7625 (arm_is_thumb_mode): Make non-static.
7626 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
7627 from linux-aarch32-low.c.
7628 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7629 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7630 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7631 (thumb2_breakpoint_len): Likewise.
7632 (arm_is_thumb_mode): New declaration.
7633 * linux-arm-low.c: Include arch/arm-linux.h
7634 aarch/arm-get-next-pcs.h, sys/syscall.h.
7635 (get_next_pcs_ops): New struct.
7636 (get_next_pcs_addr_bits_remove): New function.
7637 (get_next_pcs_is_thumb): New function.
7638 (get_next_pcs_read_memory_unsigned_integer): Likewise.
7639 (arm_sigreturn_next_pc): Likewise.
7640 (get_next_pcs_syscall_next_pc): Likewise.
7641 (arm_gdbserver_get_next_pcs): Likewise.
7642 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
7643 Initialize.
7644 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
7645 * server.h: Include gdb_vecs.h.
7646
7647 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7648
7649 * Makefile.in (SFILES): Append common/common-regcache.c.
7650 (OBS): Append common-regcache.o.
7651 (common-regcache.o): New rule.
7652 * regcache.c (init_register_cache): Initialize cache to
7653 REG_UNAVAILABLE.
7654 (regcache_raw_read_unsigned): New function.
7655 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
7656 register_status enum.
7657
7658 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7659
7660 * linux-aarch64-low.c (the_low_targets): Rename
7661 breakpoint_reinsert_addr to get_next_pcs.
7662 * linux-arm-low.c (the_low_targets): Likewise.
7663 * linux-bfin-low.c (the_low_targets): Likewise.
7664 * linux-cris-low.c (the_low_targets): Likewise.
7665 * linux-crisv32-low.c (the_low_targets): Likewise.
7666 * linux-low.c (can_software_single_step): Likewise.
7667 (install_software_single_step_breakpoints): New function.
7668 (start_step_over): Use install_software_single_step_breakpoints.
7669 * linux-low.h: New CORE_ADDR vector.
7670 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
7671 get_next_pcs.
7672 * linux-mips-low.c (the_low_targets): Likewise.
7673 * linux-nios2-low.c (the_low_targets): Likewise.
7674 * linux-sparc-low.c (the_low_targets): Likewise.
7675
7676 2015-12-17 Pedro Alves <palves@redhat.com>
7677
7678 * linux-low.c (linux_kill_one_lwp): Remove references to
7679 LinuxThreads.
7680 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
7681 to 'kill'.
7682 (linux_init_signals): Delete.
7683 (initialize_low): Adjust.
7684 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
7685
7686 2015-12-16 Pedro Alves <palves@redhat.com>
7687
7688 * configure.ac (compiler warning flags): When testing a
7689 -Wno-foo option, check whether -Wfoo works instead.
7690 * configure: Regenerate.
7691
7692 2015-12-11 Don Breazeal <donb@codesourcery.com>
7693
7694 * server.c (process_serial_event): Don't exit from gdbserver
7695 in remote mode if there are still active inferiors.
7696
7697 2015-12-11 Yao Qi <yao.qi@linaro.org>
7698
7699 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
7700 arm_breakpoint_at if the process is 32-bit.
7701
7702 2015-12-11 Yao Qi <yao.qi@linaro.org>
7703
7704 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
7705 arm breakpoint.
7706
7707 2015-12-07 Yao Qi <yao.qi@linaro.org>
7708
7709 * configure.srv: Append arm.o to srv_tgtobj for
7710 aarch64*-*-linux* target.
7711 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
7712 from linux-arm-low.c.
7713 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
7714 (arm_breakpoint_len, thumb_breakpoint): Likewise.
7715 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
7716 (thumb2_breakpoint_len): Likewise.
7717 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
7718 (arm_breakpoint_kinds): Likewise.
7719 (arm_breakpoint_kind_from_pc): Likewise.
7720 (arm_sw_breakpoint_from_kind): Likewise.
7721 (arm_breakpoint_kind_from_current_state): Likewise.
7722 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
7723 (arm_sw_breakpoint_from_kind): Declare.
7724 (arm_breakpoint_kind_from_current_state): Declare.
7725 (arm_breakpoint_at): Declare.
7726 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
7727 arm_sw_breakpoint_from_kind if process is 32-bit.
7728 (aarch64_breakpoint_kind_from_pc): New function.
7729 (aarch64_breakpoint_kind_from_current_state): New function.
7730 (the_low_target): Initialize fields breakpoint_kind_from_pc
7731 and breakpoint_kind_from_current_state.
7732 * linux-arm-low.c (arm_breakpoint_kinds): Move to
7733 linux-aarch32-low.c.
7734 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
7735 (arm_breakpoint, arm_breakpoint_len): Likewise.
7736 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
7737 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
7738 (arm_is_thumb_mode): Likewise.
7739 (arm_breakpoint_at): Likewise.
7740 (arm_breakpoint_kind_from_pc): Likewise.
7741 (arm_sw_breakpoint_from_kind): Likewise.
7742 (arm_breakpoint_kind_from_current_state): Likewise.
7743
7744 Revert:
7745 2015-08-04 Yao Qi <yao.qi@linaro.org>
7746
7747 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7748 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7749 * server.c (extended_protocol): Remove "static".
7750 * server.h (extended_protocol): Declare it.
7751
7752 2015-12-04 Josh Stone <jistone@redhat.com>
7753
7754 * target.h (struct target_ops) <arch_setup>: Rename to ...
7755 (struct target_ops) <post_create_inferior>: ... this.
7756 (target_arch_setup): Rename to ...
7757 (target_post_create_inferior): ... this, calling post_create_inferior.
7758 * server.c (start_inferior): Update target_arch_setup calls to
7759 target_post_create_inferior.
7760 * linux-low.c (linux_low_ptrace_options): Forward declare.
7761 (linux_arch_setup): Update its comment for general use.
7762 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
7763 (struct linux_target_ops): Use linux_post_create_inferior.
7764 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
7765 to post_create_inferior.
7766 * nto-low.c (struct nto_target_ops): Likewise.
7767 * spu-low.c (struct spu_target_ops): Likewise.
7768 * win32-low.c (struct win32_target_ops): Likewise.
7769
7770 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
7771
7772 * linux-arm-low.c: Remove duplicate arch/arm.h include.
7773
7774 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7775
7776 * linux-arm-low.c (arm_reinsert_addr): Remove function.
7777 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
7778 * linux-cris-low.c (cris_reinsert_addr> Remove function.
7779 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7780 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
7781 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7782 * linux-mips-low.c (mips_reinsert_addr): Remove function.
7783 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7784 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
7785 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7786 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
7787 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
7788
7789 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7790
7791 * linux-low.c (linux_look_up_symbols): Don't call
7792 linux_supports_traceclone.
7793 * linux-low.h (thread_db_init): Remove use_events argument.
7794 * thread-db.c (thread_db_use_event): Remove global variable.
7795 (struct thread_db) <td_thr_event_enable_p>: Remove field.
7796 (struct thread_db) <td_create_bp>: Remove field.
7797 (thread_db_create_event): Remove function.
7798 (thread_db_enable_reporting): Likewise.
7799 (find_one_thread): Don't check for thread_db_use_events.
7800 (attach_thread): Likewise.
7801 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
7802 (try_thread_db_load_1): Don't check for thread_db_use_events.
7803 (thread_db_init): Remove use_events argument and thread events
7804 handling.
7805 (remove_thread_event_breakpoints): Remove function.
7806 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
7807
7808 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7809
7810 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
7811 New function.
7812 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7813 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
7814 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7815 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
7816 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
7817 Initialize.
7818 * linux-crisv32-low.c (cris_supports_hardware_single_step):
7819 New function.
7820 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7821 * linux-low.c (can_hardware_single_step): Use
7822 supports_hardware_single_step.
7823 (can_software_single_step): New function.
7824 (start_step_over): Call can_software_single_step.
7825 (linux_supports_hardware_single_step): New function.
7826 (struct target_ops) <supports_software_single_step>: Initialize.
7827 * linux-low.h (struct linux_target_ops)
7828 <supports_hardware_single_step>: Initialize.
7829 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
7830 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7831 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
7832 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
7833 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
7834 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7835 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
7836 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7837 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
7838 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
7839 Initialize.
7840 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
7841 (struct linux_target_ops) <tile_supports_hardware_single_step>:
7842 Initialize.
7843 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
7844 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7845 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
7846 New function.
7847 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7848 * target.h (struct target_ops): <supports_software_single_step>:
7849 New field.
7850 (target_supports_software_single_step): New macro.
7851
7852 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7853
7854 * linux-low.c (linux_wait_1): Fix pc advance condition.
7855 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
7856 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
7857
7858 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7859
7860 * linux-arm-low.c (arm_is_thumb_mode): New function.
7861 (arm_breakpoint_at): Use arm_is_thumb_mode.
7862 (arm_breakpoint_kind_from_current_state): New function.
7863 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
7864 Initialize.
7865 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
7866 (linux_breakpoint_kind_from_current_state): New function.
7867 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
7868 * linux-low.h (struct linux_target_ops)
7869 <breakpoint_kind_from_current_state>: New field.
7870 * target.h (struct target_ops): Likewise.
7871 (target_breakpoint_kind_from_current_state): New macro.
7872
7873 2015-11-30 Pedro Alves <palves@redhat.com>
7874
7875 * linux-low.c (linux_resume): Wake up the event loop before
7876 returning.
7877
7878 2015-11-30 Pedro Alves <palves@redhat.com>
7879
7880 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
7881 check.
7882 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
7883 to -1.
7884 * target.c (struct thread_search): New structure.
7885 (thread_search_callback): New function.
7886 (prev_general_thread): New global.
7887 (prepare_to_access_memory, done_accessing_memory): New functions.
7888 * target.h (prepare_to_access_memory, done_accessing_memory):
7889 Replace macros with function declarations.
7890
7891 2015-11-30 Pedro Alves <palves@redhat.com>
7892
7893 PR 14618
7894 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
7895 report TARGET_WAITKIND_NO_RESUMED.
7896 * remote-utils.c (prepare_resume_reply): Handle
7897 TARGET_WAITKIND_NO_RESUMED.
7898 * server.c (report_no_resumed): New global.
7899 (handle_query) <qSupported>: Handle "no-resumed+". Report
7900 "no-resumed+" support.
7901 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
7902 return error if the client doesn't support no-resumed events.
7903 (push_stop_notification): New function.
7904 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
7905 events if the client supports them.
7906
7907 2015-11-30 Pedro Alves <palves@redhat.com>
7908
7909 * linux-low.c (thread_still_has_status_pending_p): Don't check
7910 vCont;t here.
7911 (lwp_resumed): New function.
7912 (status_pending_p_callback): Return early if the LWP is not
7913 supposed to be resumed.
7914
7915 2015-11-30 Pedro Alves <palves@redhat.com>
7916
7917 * linux-low.c (handle_extended_wait): Assert that the LWP's
7918 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7919 thread create events, leave the new child's status pending.
7920 (linux_low_filter_event): If GDB wants to hear about thread exit
7921 events, leave the LWP marked dead and don't delete it.
7922 (linux_wait_for_event_filtered): Don't check for thread exit.
7923 (filter_exit_event): New function.
7924 (linux_wait_1): Use it, when returning an exit event.
7925 (linux_resume_one_lwp_throw): Assert that the LWP's
7926 waitstatus is TARGET_WAITKIND_IGNORE.
7927 * remote-utils.c (prepare_resume_reply): Handle
7928 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7929 * server.c (report_thread_events): New global.
7930 (handle_general_set): Handle QThreadEvents.
7931 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7932 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7933 TARGET_WAITKIND_THREAD_EXITED.
7934 * server.h (report_thread_events): Declare.
7935
7936 2015-11-30 Pedro Alves <palves@redhat.com>
7937
7938 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7939 the thread's last_resume_kind was resume_stop.
7940
7941 2015-11-30 Pedro Alves <palves@redhat.com>
7942
7943 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7944 before returning.
7945
7946 2015-11-30 Pedro Alves <palves@redhat.com>
7947
7948 * server.c (handle_v_requests): Handle vCtrlC.
7949
7950 2015-11-30 Pedro Alves <palves@redhat.com>
7951
7952 * gdbthread.h (find_any_thread_of_pid): Declare.
7953 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7954 functions.
7955 * server.c (handle_query): If current_thread is NULL, look for
7956 another thread of the selected process.
7957
7958 2015-11-26 Daniel Colascione <dancol@dancol.org>
7959 Simon Marchi <simon.marchi@ericsson.com>
7960
7961 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7962 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7963 name in reply.
7964 * target.h (struct target_ops) <thread_name>: New field.
7965 (target_thread_name): New macro.
7966
7967 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7968
7969 * regcache.h (regcache_invalidate_pid): Add declaration.
7970 * regcache.c (regcache_invalidate_pid): New function, extracted
7971 from regcache_invalidate.
7972 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7973 Add trivial documentation comment.
7974 * lynx-low.c: Use regcache_invalidate_pid instead of
7975 regcache_invalidate.
7976
7977 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7978
7979 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7980 and Elf64_auxv_t if the target is Android.
7981
7982 2015-11-22 Doug Evans <xdje42@gmail.com>
7983
7984 * target.h: #include <sys/types.h>.
7985
7986 2015-11-19 Pedro Alves <palves@redhat.com>
7987
7988 * linux-low.c (linux_process_qsupported): Change prototype.
7989 Adjust.
7990 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7991 Change prototype.
7992 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7993 and adjust to loop over all features.
7994 * server.c (handle_query) <qSupported>: Adjust to call
7995 target_process_qsupported once, passing it a vector of unprocessed
7996 features.
7997 * target.h (struct target_ops) <process_qsupported>: Change
7998 prototype.
7999 (target_process_qsupported): Adjust.
8000
8001 2015-11-19 Pedro Alves <palves@redhat.com>
8002
8003 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
8004 mode.
8005 * configure: Regenerate.
8006
8007 2015-11-19 Pedro Alves <palves@redhat.com>
8008
8009 * configure: Regenerate.
8010
8011 2015-11-19 Yao Qi <yao.qi@linaro.org>
8012
8013 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
8014 type to uint32_t.
8015
8016 2015-11-19 Yao Qi <yao.qi@linaro.org>
8017
8018 * linux-aarch64-low.c (enum aarch64_operand_type): New.
8019 (struct aarch64_operand): Move enum out.
8020
8021 2015-11-19 Yao Qi <yao.qi@linaro.org>
8022
8023 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
8024 struct user_fpsimd_state *.
8025 (aarch64_store_fpregset): Likewise.
8026
8027 2015-11-19 Yao Qi <yao.qi@linaro.org>
8028
8029 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
8030 struct user_pt_regs *.
8031 (aarch64_store_gregset): Likewise.
8032
8033 2015-11-18 Pedro Alves <palves@redhat.com>
8034
8035 * Makefile.in (all_object_files): Add $IPA_OBJS.
8036
8037 2015-11-17 Pedro Alves <palves@redhat.com>
8038
8039 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8040 GDB_SIGNAL_0 and gdb_signal_to_string.
8041
8042 2015-11-17 Pedro Alves <palves@redhat.com>
8043
8044 * win32-low.c (handle_output_debug_string): Remove parameter.
8045 (win32_kill): Remove our_status local and adjust call to
8046 handle_output_debug_string.
8047 (get_child_debug_event): Adjust call to
8048 handle_output_debug_string.
8049
8050 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8051
8052 * linux-mips-low.c (mips_fill_gregset): Add cast.
8053 (mips_store_gregset): Likewise.
8054 (mips_fill_fpregset): Likewise.
8055 (mips_store_fpregset): Likewise.
8056
8057 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8058
8059 * linux-mips-low.c (mips_add_watchpoint): Rename private to
8060 priv.
8061
8062 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8063
8064 * linux-mips-low.c (mips_linux_new_thread): Change type of
8065 watch_type to enum target_hw_bp_type.
8066
8067 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8068
8069 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
8070 Change return type to arm_hwbp_type.
8071
8072 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8073
8074 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
8075 (arm_store_gregset): Likewise.
8076 * linux-arm-low.c (arm_get_hwcap): Likewise.
8077 (arm_read_description): Likewise.
8078
8079 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8080
8081 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
8082
8083 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8084
8085 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8086 (ppc_fill_vsxregset): Likewise.
8087 (ppc_store_vsxregset): Likewise.
8088 (ppc_fill_vrregset): Likewise.
8089 (ppc_store_vrregset): Likewise.
8090 (ppc_fill_evrregset): Likewise.
8091 (ppc_store_evrregset): Likewise.
8092
8093 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
8094
8095 * linux-ppc-low.c (ppc_usrregs_info): Remove
8096 forward-declaration.
8097 (ppc_arch_setup): Move lower in file.
8098
8099 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8100
8101 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
8102 (ps_pdwrite): Likewise.
8103
8104 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
8105
8106 * linux-arm-low.c (arm_new_thread): Move pointer dereference
8107 to after assert checks.
8108
8109 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
8110
8111 * proc-service.c (ps_pdread): Add/adjust casts.
8112 (ps_pdwrite): Add/adjust casts.
8113
8114 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8115
8116 * server.c (handle_search_memory_1): Cast return value of
8117 memmem.
8118
8119 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
8120
8121 * server.c (write_qxfer_response): Change type of data to
8122 gdb_byte *.
8123
8124 2015-10-29 Pedro Alves <palves@redhat.com>
8125
8126 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
8127
8128 2015-10-29 Pedro Alves <palves@redhat.com>
8129
8130 * tracepoint.c (clear_installed_tracepoints): Add casts.
8131
8132 2015-10-29 Pedro Alves <palves@redhat.com>
8133
8134 * server.c (handle_v_cont, process_serial_event): Add enum
8135 gdb_signal casts to signal parsing code.
8136
8137 2015-10-29 Pedro Alves <palves@redhat.com>
8138
8139 * linux-low.h (NULL_REGSET): Define.
8140 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8141 * linux-arm-low.c (arm_regsets): Likewise.
8142 * linux-crisv32-low.c (cris_regsets): Likewise.
8143 * linux-m68k-low.c (m68k_regsets): Likewise.
8144 * linux-mips-low.c (mips_regsets): Likewise.
8145 * linux-nios2-low.c (nios2_regsets): Likewise.
8146 * linux-ppc-low.c (ppc_regsets): Likewise.
8147 * linux-s390-low.c (s390_regsets): Likewise.
8148 * linux-sh-low.c (sh_regsets): Likewise.
8149 * linux-sparc-low.c (sparc_regsets): Likewise.
8150 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8151 * linux-tile-low.c (tile_regsets): Likewise.
8152 * linux-x86-low.c (x86_regsets): Likewise.
8153 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8154
8155 2015-10-29 Pedro Alves <palves@redhat.com>
8156
8157 * linux-low.h (NULL_REGSET): Define.
8158 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
8159 * linux-arm-low.c (arm_regsets): Likewise.
8160 * linux-crisv32-low.c (cris_regsets): Likewise.
8161 * linux-m68k-low.c (m68k_regsets): Likewise.
8162 * linux-mips-low.c (mips_regsets): Likewise.
8163 * linux-nios2-low.c (nios2_regsets): Likewise.
8164 * linux-ppc-low.c (ppc_regsets): Likewise.
8165 * linux-s390-low.c (s390_regsets): Likewise.
8166 * linux-sh-low.c (sh_regsets): Likewise.
8167 * linux-sparc-low.c (sparc_regsets): Likewise.
8168 * linux-tic6x-low.c (tic6x_regsets): Likewise.
8169 * linux-tile-low.c (tile_regsets): Likewise.
8170 * linux-x86-low.c (x86_regsets): Likewise.
8171 * linux-xtensa-low.c (xtensa_regsets): Likewise.
8172
8173 2015-10-26 Doug Evans <dje@google.com>
8174
8175 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
8176
8177 2015-10-26 Doug Evans <dje@google.com>
8178
8179 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
8180
8181 2015-10-26 Doug Evans <dje@google.com>
8182
8183 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
8184 for debug_printf.
8185 (attach_thread, find_new_threads_callback): Ditto.
8186
8187 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8188
8189 * mem-break.h (set_breakpoint_data): Remove.
8190
8191 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8192
8193 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
8194 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8195 (initialize_low): Remove set_breakpoint_data call.
8196 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
8197 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
8198 (initialize_low): Remove set_breakpoint_data call.
8199 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
8200 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
8201 (initialize_low): Remove set_breakpoint_data call.
8202
8203 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
8204
8205 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
8206 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
8207 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
8208 * target.h (target_breakpoint_kind_from_pc): New macro.
8209
8210 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
8211
8212 * linux-low.c (default_breakpoint_kind_from_pc): New function.
8213 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
8214 the default breakpoint kind.
8215
8216 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8217
8218 * linux-arm-low.c (arm_supports_z_point_type): Add software
8219 breakpoint support.
8220
8221 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8222
8223 * linux-arm-low.c: Refactor breakpoint definitions.
8224 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
8225 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
8226
8227 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8228
8229 * Makefile.in: Add arm.c/o.
8230 * configure.srv: Likewise.
8231 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
8232 (arm_breakpoint_kind_from_pc): New function.
8233 (arm_sw_breakpoint_from_kind): Return proper kind.
8234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
8235
8236 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8237
8238 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
8239 removal.
8240 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
8241 (struct raw_breakpoint) <size>: Remove.
8242 (struct raw_breakpoint) <kind>: Add.
8243 (bp_size): New function.
8244 (bp_opcode): Likewise.
8245 (find_raw_breakpoint_at): Adjust for kind.
8246 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
8247 (remove_memory_breakpoint): Adjust for kind call bp_size.
8248 (set_raw_breakpoint_at): Adjust for kind.
8249 (set_breakpoint): Likewise.
8250 (set_breakpoint_at): Call breakpoint_kind_from_pc.
8251 (delete_raw_breakpoint): Adjust for kind.
8252 (delete_breakpoint): Likewise.
8253 (find_gdb_breakpoint): Likewise.
8254 (set_gdb_breakpoint_1): Likewise.
8255 (set_gdb_breakpoint): Likewise.
8256 (delete_gdb_breakpoint_1): Likewise.
8257 (delete_gdb_breakpoint): Likewise.
8258 (uninsert_raw_breakpoint): Likewise.
8259 (reinsert_raw_breakpoint): Likewise.
8260 (set_breakpoint_data): Remove.
8261 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
8262 (check_mem_read): Adjust for kind call bp_size.
8263 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
8264 (clone_one_breakpoint): Adjust for kind.
8265 * mem-break.h (set_gdb_breakpoint): Likewise.
8266 (delete_gdb_breakpoint): Likewise.
8267 * server.c (process_serial_event): Likewise.
8268
8269 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8270
8271 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
8272 (struct linux_target_ops) <breakpoint>: Remove.
8273 (struct linux_target_ops) <breakpoint_len>: Remove.
8274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8276 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
8277 (arm_sw_breakpoint_from_kind): New function.
8278 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
8279 (struct linux_target_ops) <breakpoint>: Remove.
8280 (struct linux_target_ops) <breakpoint_len>: Remove.
8281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8283 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
8284 (struct linux_target_ops) <breakpoint>: Remove.
8285 (struct linux_target_ops) <breakpoint_len>: Remove.
8286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8288 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
8289 (struct linux_target_ops) <breakpoint>: Remove.
8290 (struct linux_target_ops) <breakpoint_len>: Remove.
8291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8293 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
8294 and sw_breakpoint_from_kind to increment the pc.
8295 (linux_breakpoint_kind_from_pc): New function.
8296 (linux_sw_breakpoint_from_kind): New function.
8297 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
8298 (initialize_low): Call breakpoint_kind_from_pc and
8299 sw_breakpoint_from_kind to replace breakpoint_data/len.
8300 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
8301 New field.
8302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
8303 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
8304 (struct linux_target_ops) <breakpoint>: Remove.
8305 (struct linux_target_ops) <breakpoint_len>: Remove.
8306 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8307 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8308 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
8309 (struct linux_target_ops) <breakpoint>: Remove.
8310 (struct linux_target_ops) <breakpoint_len>: Remove.
8311 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8312 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8313 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
8314 (struct linux_target_ops) <breakpoint>: Remove.
8315 (struct linux_target_ops) <breakpoint_len>: Remove.
8316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8318 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
8319 (struct linux_target_ops) <breakpoint>: Remove.
8320 (struct linux_target_ops) <breakpoint_len>: Remove.
8321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8323 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
8324 (struct linux_target_ops) <breakpoint>: Remove.
8325 (struct linux_target_ops) <breakpoint_len>: Remove.
8326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8328 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
8329 (struct linux_target_ops) <breakpoint>: Remove.
8330 (struct linux_target_ops) <breakpoint_len>: Remove.
8331 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8332 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8333 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
8334 (struct linux_target_ops) <breakpoint>: Remove.
8335 (struct linux_target_ops) <breakpoint_len>: Remove.
8336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8338 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
8339 (struct linux_target_ops) <breakpoint>: Remove.
8340 (struct linux_target_ops) <breakpoint_len>: Remove.
8341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8343 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
8344 (struct linux_target_ops) <breakpoint>: Remove.
8345 (struct linux_target_ops) <breakpoint_len>: Remove.
8346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8348 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
8349 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
8350 (struct linux_target_ops) <breakpoint>: Remove.
8351 (struct linux_target_ops) <breakpoint_len>: Remove.
8352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8354 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
8355 (struct linux_target_ops) <breakpoint>: Remove.
8356 (struct linux_target_ops) <breakpoint_len>: Remove.
8357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
8358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
8359
8360 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
8361
8362 * linux-cris-low.c (cris_get_pc): Remove void arg.
8363
8364 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8365
8366 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
8367 variable name.
8368
8369 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
8370
8371 * inferiors.c (thread_pid_matches_callback): New function.
8372 (find_thread_process): New function.
8373 (remove_thread): Reset current_thread.
8374 (remove_process): Assert threads have been removed first.
8375
8376 2015-10-15 Yao Qi <yao.qi@linaro.org>
8377
8378 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
8379 if it is 3.
8380 (aarch64_remove_point): Likewise.
8381 * regcache.c (regcache_register_size): New function.
8382
8383 2015-10-12 Yao Qi <yao.qi@linaro.org>
8384
8385 * linux-aarch64-low.c: Update all callers as emit_load_store
8386 is renamed to aarch64_emit_load_store.
8387
8388 2015-10-12 Yao Qi <yao.qi@linaro.org>
8389
8390 * linux-aarch64-low.c: Update all callers of function renaming
8391 from emit_insn to aarch64_emit_insn.
8392
8393 2015-10-12 Yao Qi <yao.qi@linaro.org>
8394
8395 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
8396 arch/aarch64-insn.h.
8397 (struct aarch64_memory_operand): Likewise.
8398 (ENCODE): Likewise.
8399 (emit_insn): Move to arch/aarch64-insn.c.
8400 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
8401 (emit_load_store): Move to arch/aarch64-insn.c.
8402 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
8403 (can_encode_int32): Remove.
8404
8405 2015-10-12 Yao Qi <yao.qi@linaro.org>
8406
8407 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
8408 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
8409 (aarch64_relocate_instruction): Likewise.
8410 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
8411 (struct aarch64_insn_visitor): Likewise.
8412
8413 2015-10-12 Yao Qi <yao.qi@linaro.org>
8414
8415 * linux-aarch64-low.c (struct aarch64_insn_data): New.
8416 (struct aarch64_insn_visitor): New.
8417 (struct aarch64_insn_relocation_data): New.
8418 (aarch64_ftrace_insn_reloc_b): New function.
8419 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8420 (aarch64_ftrace_insn_reloc_cb): Likewise.
8421 (aarch64_ftrace_insn_reloc_tb): Likewise.
8422 (aarch64_ftrace_insn_reloc_adr): Likewise.
8423 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
8424 (aarch64_ftrace_insn_reloc_others): Likewise.
8425 (visitor): New.
8426 (aarch64_relocate_instruction): Use visitor.
8427
8428 2015-10-12 Yao Qi <yao.qi@linaro.org>
8429
8430 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
8431 int. Add argument buf.
8432 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
8433 aarch64_relocate_instruction.
8434
8435 2015-10-12 Yao Qi <yao.qi@linaro.org>
8436
8437 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
8438 argument insn. Remove local variable insn. Don't call
8439 target_read_uint32.
8440 (aarch64_install_fast_tracepoint_jump_pad): Call
8441 target_read_uint32.
8442
8443 2015-09-30 Yao Qi <yao.qi@linaro.org>
8444
8445 * linux-aarch64-low.c (emit_movk): Shorten a long line.
8446 (emit_load_store_pair): Likewise.
8447
8448 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8449
8450 * dll.c (match_dll): Add cast(s).
8451 (unloaded_dll): Likewise.
8452 * linux-low.c (second_thread_of_pid_p): Likewise.
8453 (delete_lwp_callback): Likewise.
8454 (count_events_callback): Likewise.
8455 (select_event_lwp_callback): Likewise.
8456 (linux_set_resume_request): Likewise.
8457 * server.c (accumulate_file_name_length): Likewise.
8458 (emit_dll_description): Likewise.
8459 (handle_qxfer_threads_worker): Likewise.
8460 (visit_actioned_threads): Likewise.
8461 * thread-db.c (any_thread_of): Likewise.
8462 * tracepoint.c (same_process_p): Likewise.
8463 (match_blocktype): Likewise.
8464 (build_traceframe_info_xml): Likewise.
8465
8466 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
8467
8468 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
8469 assignment.
8470 (gdb_unparse_agent_expr): Likewise.
8471 * hostio.c (require_data): Likewise.
8472 (handle_pread): Likewise.
8473 * linux-low.c (disable_regset): Likewise.
8474 (fetch_register): Likewise.
8475 (store_register): Likewise.
8476 (get_dynamic): Likewise.
8477 (linux_qxfer_libraries_svr4): Likewise.
8478 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
8479 (set_fast_tracepoint_jump): Likewise.
8480 (uninsert_fast_tracepoint_jumps_at): Likewise.
8481 (reinsert_fast_tracepoint_jumps_at): Likewise.
8482 (validate_inserted_breakpoint): Likewise.
8483 (clone_agent_expr): Likewise.
8484 * regcache.c (init_register_cache): Likewise.
8485 * remote-utils.c (putpkt_binary_1): Likewise.
8486 (decode_M_packet): Likewise.
8487 (decode_X_packet): Likewise.
8488 (look_up_one_symbol): Likewise.
8489 (relocate_instruction): Likewise.
8490 (monitor_output): Likewise.
8491 * server.c (handle_search_memory): Likewise.
8492 (handle_qxfer_exec_file): Likewise.
8493 (handle_qxfer_libraries): Likewise.
8494 (handle_qxfer): Likewise.
8495 (handle_query): Likewise.
8496 (handle_v_cont): Likewise.
8497 (handle_v_run): Likewise.
8498 (captured_main): Likewise.
8499 * target.c (write_inferior_memory): Likewise.
8500 * thread-db.c (try_thread_db_load_from_dir): Likewise.
8501 * tracepoint.c (init_trace_buffer): Likewise.
8502 (add_tracepoint_action): Likewise.
8503 (add_traceframe): Likewise.
8504 (add_traceframe_block): Likewise.
8505 (cmd_qtdpsrc): Likewise.
8506 (cmd_qtdv): Likewise.
8507 (cmd_qtstatus): Likewise.
8508 (response_source): Likewise.
8509 (response_tsv): Likewise.
8510 (cmd_qtnotes): Likewise.
8511 (gdb_collect): Likewise.
8512 (initialize_tracepoint): Likewise.
8513
8514 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8515
8516 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
8517 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
8518 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
8519 <NOP>: New.
8520 (enum aarch64_condition_codes): New enum.
8521 (w0): New static global.
8522 (fp): Likewise.
8523 (lr): Likewise.
8524 (struct aarch64_memory_operand) <type>: New
8525 MEMORY_OPERAND_POSTINDEX type.
8526 (postindex_memory_operand): New helper function.
8527 (emit_ret): New function.
8528 (emit_load_store_pair): New function, factored out of emit_stp
8529 with support for MEMORY_OPERAND_POSTINDEX.
8530 (emit_stp): Rewrite using emit_load_store_pair.
8531 (emit_ldp): New function.
8532 (emit_load_store): Likewise.
8533 (emit_ldr): Mention post-index instruction in comment.
8534 (emit_ldrh): New function.
8535 (emit_ldrb): New function.
8536 (emit_ldrsw): Mention post-index instruction in comment.
8537 (emit_str): Likewise.
8538 (emit_subs): New function.
8539 (emit_cmp): Likewise.
8540 (emit_and): Likewise.
8541 (emit_orr): Likewise.
8542 (emit_orn): Likewise.
8543 (emit_eor): Likewise.
8544 (emit_mvn): Likewise.
8545 (emit_lslv): Likewise.
8546 (emit_lsrv): Likewise.
8547 (emit_asrv): Likewise.
8548 (emit_mul): Likewise.
8549 (emit_sbfm): Likewise.
8550 (emit_sbfx): Likewise.
8551 (emit_ubfm): Likewise.
8552 (emit_ubfx): Likewise.
8553 (emit_csinc): Likewise.
8554 (emit_cset): Likewise.
8555 (emit_nop): Likewise.
8556 (emit_ops_insns): New helper function.
8557 (emit_pop): Likewise.
8558 (emit_push): Likewise.
8559 (aarch64_emit_prologue): New function.
8560 (aarch64_emit_epilogue): Likewise.
8561 (aarch64_emit_add): Likewise.
8562 (aarch64_emit_sub): Likewise.
8563 (aarch64_emit_mul): Likewise.
8564 (aarch64_emit_lsh): Likewise.
8565 (aarch64_emit_rsh_signed): Likewise.
8566 (aarch64_emit_rsh_unsigned): Likewise.
8567 (aarch64_emit_ext): Likewise.
8568 (aarch64_emit_log_not): Likewise.
8569 (aarch64_emit_bit_and): Likewise.
8570 (aarch64_emit_bit_or): Likewise.
8571 (aarch64_emit_bit_xor): Likewise.
8572 (aarch64_emit_bit_not): Likewise.
8573 (aarch64_emit_equal): Likewise.
8574 (aarch64_emit_less_signed): Likewise.
8575 (aarch64_emit_less_unsigned): Likewise.
8576 (aarch64_emit_ref): Likewise.
8577 (aarch64_emit_if_goto): Likewise.
8578 (aarch64_emit_goto): Likewise.
8579 (aarch64_write_goto_address): Likewise.
8580 (aarch64_emit_const): Likewise.
8581 (aarch64_emit_call): Likewise.
8582 (aarch64_emit_reg): Likewise.
8583 (aarch64_emit_pop): Likewise.
8584 (aarch64_emit_stack_flush): Likewise.
8585 (aarch64_emit_zero_ext): Likewise.
8586 (aarch64_emit_swap): Likewise.
8587 (aarch64_emit_stack_adjust): Likewise.
8588 (aarch64_emit_int_call_1): Likewise.
8589 (aarch64_emit_void_call_2): Likewise.
8590 (aarch64_emit_eq_goto): Likewise.
8591 (aarch64_emit_ne_goto): Likewise.
8592 (aarch64_emit_lt_goto): Likewise.
8593 (aarch64_emit_le_goto): Likewise.
8594 (aarch64_emit_gt_goto): Likewise.
8595 (aarch64_emit_ge_got): Likewise.
8596 (aarch64_emit_ops_impl): New static global variable.
8597 (aarch64_emit_ops): New target function, return
8598 &aarch64_emit_ops_impl.
8599 (struct linux_target_ops): Install it.
8600
8601 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8602
8603 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
8604 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
8605 aarch64-ipa.o.
8606 * linux-aarch64-ipa.c: New file.
8607 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
8608 and endian.h.
8609 (aarch64_get_thread_area): New target method.
8610 (extract_signed_bitfield): New helper function.
8611 (aarch64_decode_ldr_literal): New function.
8612 (enum aarch64_opcodes): New enum.
8613 (struct aarch64_register): New struct.
8614 (struct aarch64_operand): New struct.
8615 (x0): New static global.
8616 (x1): Likewise.
8617 (x2): Likewise.
8618 (x3): Likewise.
8619 (x4): Likewise.
8620 (w2): Likewise.
8621 (ip0): Likewise.
8622 (sp): Likewise.
8623 (xzr): Likewise.
8624 (aarch64_register): New helper function.
8625 (register_operand): Likewise.
8626 (immediate_operand): Likewise.
8627 (struct aarch64_memory_operand): New struct.
8628 (offset_memory_operand): New helper function.
8629 (preindex_memory_operand): Likewise.
8630 (enum aarch64_system_control_registers): New enum.
8631 (ENCODE): New macro.
8632 (emit_insn): New helper function.
8633 (emit_b): New function.
8634 (emit_bcond): Likewise.
8635 (emit_cb): Likewise.
8636 (emit_tb): Likewise.
8637 (emit_blr): Likewise.
8638 (emit_stp): Likewise.
8639 (emit_ldp_q_offset): Likewise.
8640 (emit_stp_q_offset): Likewise.
8641 (emit_load_store): Likewise.
8642 (emit_ldr): Likewise.
8643 (emit_ldrsw): Likewise.
8644 (emit_str): Likewise.
8645 (emit_ldaxr): Likewise.
8646 (emit_stxr): Likewise.
8647 (emit_stlr): Likewise.
8648 (emit_data_processing_reg): Likewise.
8649 (emit_data_processing): Likewise.
8650 (emit_add): Likewise.
8651 (emit_sub): Likewise.
8652 (emit_mov): Likewise.
8653 (emit_movk): Likewise.
8654 (emit_mov_addr): Likewise.
8655 (emit_mrs): Likewise.
8656 (emit_msr): Likewise.
8657 (emit_sevl): Likewise.
8658 (emit_wfe): Likewise.
8659 (append_insns): Likewise.
8660 (can_encode_int32_in): New helper function.
8661 (aarch64_relocate_instruction): New function.
8662 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
8663 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
8664 (struct linux_target_ops): Install aarch64_get_thread_area,
8665 aarch64_install_fast_tracepoint_jump_pad and
8666 aarch64_get_min_fast_tracepoint_insn_len.
8667
8668 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
8669
8670 * Makefile.in (aarch64-insn.o): New rule.
8671 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
8672
8673 2015-09-21 Yao Qi <yao.qi@linaro.org>
8674
8675 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
8676
8677 2015-09-21 Yao Qi <yao.qi@linaro.org>
8678
8679 * tracepoint.c (max_jump_pad_size): Remove.
8680
8681 2015-09-18 Yao Qi <yao.qi@linaro.org>
8682
8683 * linux-aarch64-low.c: Don't include sys/uio.h.
8684 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
8685
8686 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
8687
8688 * tracepoint.c (eval_result_type): Change prototype.
8689 (condition_true_at_tracepoint): Fix argument to compiled_cond.
8690
8691 2015-09-15 Pedro Alves <palves@redhat.com>
8692
8693 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
8694 Check whether to report exec events instead of checking whether
8695 multiprocess is enabled.
8696
8697 2015-09-15 Pedro Alves <palves@redhat.com>
8698
8699 PR remote/18965
8700 * remote-utils.c (prepare_resume_reply): Merge
8701 TARGET_WAITKIND_VFORK_DONE switch case with the
8702 TARGET_WAITKIND_FORKED case.
8703
8704 2015-09-15 Yao Qi <yao.qi@linaro.org>
8705
8706 * server.c (handle_query): Check string comparison using
8707 "else if" instead of "if".
8708
8709 2015-09-15 Yao Qi <yao.qi@linaro.org>
8710
8711 * server.c (vCont_supported): New global variable.
8712 (handle_query): Set vCont_supported to 1 if "vContSupported+"
8713 matches. Append ";vContSupported+" to own_buf.
8714 (handle_v_requests): Append ";s;S" to own_buf if target supports
8715 hardware single step or vCont_supported is false.
8716 (capture_main): Set vCont_supported to zero.
8717
8718 2015-09-15 Yao Qi <yao.qi@linaro.org>
8719
8720 * linux-low.c (linux_supports_conditional_breakpoints): Rename
8721 it to ...
8722 (linux_supports_hardware_single_step): ... New function.
8723 (linux_target_ops): Update.
8724 * lynx-low.c (lynx_target_ops): Set field
8725 supports_hardware_single_step to target_can_do_hardware_single_step.
8726 * nto-low.c (nto_target_ops): Likewise.
8727 * spu-low.c (spu_target_ops): Likewise.
8728 * win32-low.c (win32_target_ops): Likewise.
8729 * target.c (target_can_do_hardware_single_step): New function.
8730 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8731 Remove. <supports_hardware_single_step>: New field.
8732 (target_supports_conditional_breakpoints): Remove.
8733 (target_supports_hardware_single_step): New macro.
8734 (target_can_do_hardware_single_step): Declare.
8735 * server.c (handle_query): Use target_supports_hardware_single_step
8736 instead of target_supports_conditional_breakpoints.
8737
8738 2015-09-15 Yao Qi <yao.qi@linaro.org>
8739
8740 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
8741 function.
8742 (struct linux_target_ops the_low_target): Install
8743 aarch64_linux_siginfo_fixup.
8744
8745 2015-09-11 Don Breazeal <donb@codesourcery.com>
8746 Luis Machado <lgustavo@codesourcery.com>
8747
8748 * linux-low.c (linux_mourn): Static declaration.
8749 (linux_arch_setup): Move in front of
8750 handle_extended_wait.
8751 (linux_arch_setup_thread): New function.
8752 (handle_extended_wait): Handle exec events. Call
8753 linux_arch_setup_thread. Make event_lwp argument a
8754 pointer-to-a-pointer.
8755 (check_zombie_leaders): Do not check stopped threads.
8756 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
8757 (linux_low_filter_event): Add lwp and thread for exec'ing
8758 non-leader thread if leader thread has been deleted.
8759 Refactor code into linux_arch_setup_thread and call it.
8760 Pass child lwp pointer by reference to handle_extended_wait.
8761 (linux_wait_for_event_filtered): Update comment.
8762 (linux_wait_1): Prevent clobbering exec event status.
8763 (linux_supports_exec_events): New function.
8764 (linux_target_ops) <supports_exec_events>: Initialize new member.
8765 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
8766 new member.
8767 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
8768 * server.c (report_exec_events): New global variable.
8769 (handle_query): Handle qSupported query for exec-events feature.
8770 (captured_main): Initialize report_exec_events.
8771 * server.h (report_exec_events): Declare new global variable.
8772 * target.h (struct target_ops) <supports_exec_events>: New
8773 member.
8774 (target_supports_exec_events): New macro.
8775 * win32-low.c (win32_target_ops) <supports_exec_events>:
8776 Initialize new member.
8777
8778 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
8779
8780 * linux-low.c (linux_low_enable_btrace): Remove.
8781 (linux_target_ops): Replace linux_low_enable_btrace with
8782 linux_enable_btrace.
8783
8784 2015-09-03 Yao Qi <yao.qi@linaro.org>
8785
8786 * linux-aarch64-low.c (aarch64_insert_point): Call
8787 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
8788 returns true.
8789
8790 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8791
8792 * linux-low.c (check_stopped_by_breakpoint): Use
8793 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
8794
8795 2015-08-27 Pedro Alves <palves@redhat.com>
8796
8797 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
8798
8799 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
8800
8801 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
8802 the XNEW-family equivalent.
8803 (compile_bytecodes): Likewise.
8804 * dll.c (loaded_dll): Likewise.
8805 * event-loop.c (append_callback_event): Likewise.
8806 (create_file_handler): Likewise.
8807 (create_file_event): Likewise.
8808 * hostio.c (handle_open): Likewise.
8809 * inferiors.c (add_thread): Likewise.
8810 (add_process): Likewise.
8811 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
8812 * linux-arm-low.c (arm_new_process): Likewise.
8813 (arm_new_thread): Likewise.
8814 * linux-low.c (add_to_pid_list): Likewise.
8815 (linux_add_process): Likewise.
8816 (handle_extended_wait): Likewise.
8817 (add_lwp): Likewise.
8818 (enqueue_one_deferred_signal): Likewise.
8819 (enqueue_pending_signal): Likewise.
8820 (linux_resume_one_lwp_throw): Likewise.
8821 (linux_resume_one_thread): Likewise.
8822 (linux_read_memory): Likewise.
8823 (linux_write_memory): Likewise.
8824 * linux-mips-low.c (mips_linux_new_process): Likewise.
8825 (mips_linux_new_thread): Likewise.
8826 (mips_add_watchpoint): Likewise.
8827 * linux-x86-low.c (initialize_low_arch): Likewise.
8828 * lynx-low.c (lynx_add_process): Likewise.
8829 * mem-break.c (set_raw_breakpoint_at): Likewise.
8830 (set_breakpoint): Likewise.
8831 (add_condition_to_breakpoint): Likewise.
8832 (add_commands_to_breakpoint): Likewise.
8833 (clone_agent_expr): Likewise.
8834 (clone_one_breakpoint): Likewise.
8835 * regcache.c (new_register_cache): Likewise.
8836 * remote-utils.c (look_up_one_symbol): Likewise.
8837 * server.c (queue_stop_reply): Likewise.
8838 (start_inferior): Likewise.
8839 (queue_stop_reply_callback): Likewise.
8840 (handle_target_event): Likewise.
8841 * spu-low.c (fetch_ppc_memory): Likewise.
8842 (store_ppc_memory): Likewise.
8843 * target.c (set_target_ops): Likewise.
8844 * thread-db.c (thread_db_load_search): Likewise.
8845 (try_thread_db_load_1): Likewise.
8846 * tracepoint.c (add_tracepoint): Likewise.
8847 (add_tracepoint_action): Likewise.
8848 (create_trace_state_variable): Likewise.
8849 (cmd_qtdpsrc): Likewise.
8850 (cmd_qtro): Likewise.
8851 (add_while_stepping_state): Likewise.
8852 * win32-low.c (child_add_thread): Likewise.
8853 (get_image_name): Likewise.
8854
8855 2015-08-25 Yao Qi <yao.qi@linaro.org>
8856
8857 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
8858
8859 2015-08-25 Yao Qi <yao.qi@linaro.org>
8860
8861 * Makefile.in (aarch64-linux.o): New rule.
8862 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
8863 srv_tgtobj.
8864 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
8865 (aarch64_init_debug_reg_state): Make it extern.
8866 (aarch64_linux_prepare_to_resume): Remove.
8867
8868 2015-08-25 Yao Qi <yao.qi@linaro.org>
8869
8870 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
8871 lwp_arch_private_info and ptid_of_lwp.
8872
8873 2015-08-25 Yao Qi <yao.qi@linaro.org>
8874
8875 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
8876 Find proc_info by find_process_pid. All callers updated.
8877
8878 2015-08-25 Yao Qi <yao.qi@linaro.org>
8879
8880 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
8881 Remove.
8882 (debug_reg_change_callback): Remove.
8883 (aarch64_notify_debug_reg_change): Remove.
8884
8885 2015-08-25 Yao Qi <yao.qi@linaro.org>
8886
8887 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
8888 Call current_lwp_ptid.
8889
8890 2015-08-25 Yao Qi <yao.qi@linaro.org>
8891
8892 * linux-aarch64-low.c (debug_reg_change_callback): Use
8893 debug_printf.
8894
8895 2015-08-25 Yao Qi <yao.qi@linaro.org>
8896
8897 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
8898
8899 2015-08-25 Yao Qi <yao.qi@linaro.org>
8900
8901 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
8902
8903 2015-08-25 Yao Qi <yao.qi@linaro.org>
8904
8905 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8906 the code.
8907
8908 2015-08-25 Yao Qi <yao.qi@linaro.org>
8909
8910 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8911 Remove.
8912 (debug_reg_change_callback): Remove argument entry and add argument
8913 lwp. Remove local variable thread. Don't print thread id in the
8914 debugging output. Don't check whether pid of thread equals to pid.
8915 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8916 iterate_over_lwps instead find_inferior.
8917
8918 2015-08-24 Pedro Alves <palves@redhat.com>
8919
8920 * inferiors.c (get_first_process): New function.
8921 * inferiors.h (get_first_process): New declaration.
8922 * remote-utils.c (read_ptid): Default to the first process in the
8923 list, instead of to the current thread's process.
8924
8925 2015-08-24 Pedro Alves <palves@redhat.com>
8926
8927 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8928 * event-loop.c: Likewise.
8929 * remote-utils.c: Likewise.
8930 * tracepoint.c: Likewise.
8931
8932 2015-08-24 Pedro Alves <palves@redhat.com>
8933
8934 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8935 ptid_get_lwp.
8936
8937 2015-08-21 Pedro Alves <palves@redhat.com>
8938
8939 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8940 instead of literal 1.
8941
8942 2015-08-21 Pedro Alves <palves@redhat.com>
8943
8944 * tdesc.c (default_description): Explicitly zero-initialize.
8945
8946 2015-08-21 Pedro Alves <palves@redhat.com>
8947
8948 PR gdb/18749
8949 * inferiors.c (remove_thread): Discard any pending stop reply for
8950 this thread.
8951 * server.c (remove_all_on_match_pid): Rename to ...
8952 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8953 instead of a pid.
8954 (discard_queued_stop_replies): Change parameter to a ptid. Now
8955 extern.
8956 (handle_v_kill, kill_inferior_callback, captured_main)
8957 (process_serial_event): Adjust.
8958 * server.h (discard_queued_stop_replies): Declare.
8959
8960 2015-08-21 Pedro Alves <palves@redhat.com>
8961
8962 * linux-low.c (wait_for_sigstop): Always switch to no thread
8963 selected if the previously current thread dies.
8964 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8965 process instead of the current thread's.
8966 * remote-utils.c (input_interrupt): Don't check if there's no
8967 current thread.
8968 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8969 current thread to the general thread fails, error out.
8970 (handle_qxfer_auxv, handle_qxfer_libraries)
8971 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8972 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8973 (handle_query): Check if there's a thread selected instead of
8974 checking whether there's any thread in the thread list.
8975 (handle_qxfer_threads, handle_qxfer_btrace)
8976 (handle_qxfer_btrace_conf): Don't error out early if there's no
8977 thread in the thread list.
8978 (handle_v_cont, myresume): Don't set the current thread to the
8979 continue thread.
8980 (process_serial_event) <Hg handling>: Also set thread_id if the
8981 previous general thread is still alive.
8982 (process_serial_event) <g/G handling>: If setting the current
8983 thread to the general thread fails, error out.
8984 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8985 thread's lwp instead of the current thread's.
8986 * target.c (set_desired_thread): If the desired thread was not
8987 found, leave the current thread pointing to NULL. Return an int
8988 (boolean) indicating success.
8989 * target.h (set_desired_thread): Change return type to int.
8990
8991 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8992
8993 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8994 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8995 #includes.
8996 (ps_get_thread_area): New function.
8997
8998 2015-08-19 Gary Benson <gbenson@redhat.com>
8999
9000 * hostio.c (handle_pread): Do not attempt to read more data
9001 than hostio_reply_with_data can fit in a packet.
9002
9003 2015-08-18 Joel Brobecker <brobecker@adacore.com>
9004
9005 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9006
9007 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
9008
9009 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
9010
9011 2015-08-06 Pedro Alves <palves@redhat.com>
9012
9013 * tracepoint.c (expr_eval_result): Now an int.
9014
9015 2015-08-06 Pedro Alves <palves@redhat.com>
9016
9017 * gdbthread.h (struct regcache): Forward declare.
9018 (struct thread_info) <regcache_data>: Now a struct regcache
9019 pointer.
9020 * inferiors.c (inferior_regcache_data)
9021 (set_inferior_regcache_data): Now work with struct regcache
9022 pointers.
9023 * inferiors.h (struct regcache): Forward declare.
9024 (inferior_regcache_data, set_inferior_regcache_data): Now work
9025 with struct regcache pointers.
9026 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
9027 (free_register_cache_thread): Remove struct regcache pointer
9028 casts.
9029
9030 2015-08-06 Pedro Alves <palves@redhat.com>
9031
9032 * server.c (captured_main): On error, print the exception message
9033 to stderr, and if run_once is set, throw a quit.
9034
9035 2015-08-06 Pedro Alves <palves@redhat.com>
9036
9037 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
9038 the current thread.
9039
9040 2015-08-06 Pedro Alves <palves@redhat.com>
9041
9042 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
9043 reading beyond the passed in buffer length.
9044
9045 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
9046
9047 * tracepoint.c (symbol_list) <required>: Remove.
9048
9049 2015-08-06 Pedro Alves <palves@redhat.com>
9050
9051 * linux-low.c (handle_extended_wait): Set the fork child's suspend
9052 count if stopping and suspending threads.
9053 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
9054 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
9055 (linux_detach): Complete an ongoing step-over.
9056 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
9057 throughout.
9058 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
9059 (linux_wait_1): If passing a signal to the inferior after
9060 finishing a step-over, unsuspend and re-resume all lwps. If we
9061 see a single-step event but the thread should be continuing, don't
9062 pass the trap to gdb.
9063 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
9064 internal_error instead of gdb_assert.
9065 (enqueue_pending_signal): New function.
9066 (check_ptrace_stopped_lwp_gone): Add debug output.
9067 (start_step_over): Use internal_error instead of gdb_assert.
9068 (complete_ongoing_step_over): New function.
9069 (linux_resume_one_thread): Don't resume a suspended thread.
9070 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
9071 it stepping.
9072
9073 2015-08-06 Pedro Alves <palves@redhat.com>
9074
9075 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
9076 (linux_thread_alive): Use lwp_is_marked_dead.
9077 (extended_event_reported): Delete.
9078 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
9079 instead of extended_event_reported.
9080 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9081 as well.
9082 (lwp_is_marked_dead): New function.
9083 (lwp_running): Use lwp_is_marked_dead.
9084 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
9085 comment.
9086
9087 2015-08-06 Pedro Alves <palves@redhat.com>
9088
9089 * linux-low.c (linux_wait_1): Move fork event output out of the
9090 !report_to_gdb check. Pass event_child->waitstatus to
9091 target_waitstatus_to_string instead of ourstatus.
9092
9093 2015-08-04 Yao Qi <yao.qi@linaro.org>
9094
9095 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
9096 if current_thread is 32 bit.
9097
9098 2015-08-04 Yao Qi <yao.qi@linaro.org>
9099
9100 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9101 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9102 * server.c (extended_protocol): Remove "static".
9103 * server.h (extended_protocol): Declare it.
9104
9105 2015-08-04 Yao Qi <yao.qi@linaro.org>
9106
9107 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
9108 both aarch64 and aarch32.
9109 (aarch64_set_pc): Likewise.
9110
9111 2015-08-04 Yao Qi <yao.qi@linaro.org>
9112
9113 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
9114 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
9115 arm-with-neon.xml to srv_xmlfiles.
9116 * linux-aarch64-low.c: Include linux-aarch32-low.h.
9117 (is_64bit_tdesc): New function.
9118 (aarch64_linux_read_description): New function.
9119 (aarch64_arch_setup): Call aarch64_linux_read_description.
9120 (regs_info): Rename to regs_info_aarch64.
9121 (aarch64_regs_info): Return right regs_info.
9122 (initialize_low_arch): Call initialize_low_arch_aarch32.
9123
9124 2015-08-04 Yao Qi <yao.qi@linaro.org>
9125
9126 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
9127 * linux-aarch32-low.c: New file.
9128 * linux-aarch32-low.h: New file.
9129 * linux-arm-low.c (arm_fill_gregset): Move it to
9130 linux-aarch32-low.c.
9131 (arm_store_gregset): Likewise.
9132 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
9133 (arm_store_vfpregset): Call arm_store_vfpregset_num.
9134 (arm_arch_setup): Check if PTRACE_GETREGSET works.
9135 (regs_info): Rename to regs_info_arm.
9136 (arm_regs_info): Return regs_info_aarch32 if
9137 have_ptrace_getregset is 1 and target description is
9138 arm_with_neon or arm_with_vfpv3.
9139 (initialize_low_arch): Don't call init_registers_arm_with_neon.
9140 Call initialize_low_arch_aarch32 instead.
9141
9142 2015-08-04 Yao Qi <yao.qi@linaro.org>
9143
9144 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
9145 * linux-low.c: ... here.
9146 * linux-low.h (have_ptrace_getregset): Declare it.
9147
9148 2015-08-04 Pedro Alves <palves@redhat.com>
9149
9150 * thread-db.c (struct thread_db): Use new typedefs.
9151 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
9152 CHK calls.
9153 (disable_thread_event_reporting): Cast result of dlsym to
9154 destination function pointer type.
9155 (thread_db_mourn): Use td_ta_delete_ftype.
9156
9157 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
9158
9159 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
9160 arch variant.
9161 (CDX_BREAKPOINT): Define for R2.
9162 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
9163 (the_low_target): Add comments.
9164
9165 2015-07-30 Yao Qi <yao.qi@linaro.org>
9166
9167 * linux-arm-low.c (arm_hwcap): Remove it.
9168 (arm_read_description): New local variable arm_hwcap. Don't
9169 set arm_hwcap to zero.
9170
9171 2015-07-30 Yao Qi <yao.qi@linaro.org>
9172
9173 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
9174 Use regcache->tdesc instead.
9175 (arm_store_wmmxregset): Likewise.
9176 (arm_fill_vfpregset): Likewise.
9177 (arm_store_vfpregset): Likewise.
9178
9179 2015-07-30 Yao Qi <yao.qi@linaro.org>
9180
9181 * linux-arm-low.c: Include arch/arm.h.
9182 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
9183 (arm_store_gregset): Likewise.
9184
9185 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
9186
9187 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
9188 ptrace's 4th parameter.
9189
9190 2015-07-27 Yao Qi <yao.qi@linaro.org>
9191
9192 * configure.srv (case aarch64*-*-linux*): Don't set
9193 srv_linux_usrregs.
9194
9195 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
9196
9197 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
9198 sys/ptrace.h.
9199 * linux-arm-low.c: Likewise.
9200 * linux-cris-low.c: Likewise.
9201 * linux-crisv32-low.c: Likewise.
9202 * linux-low.c: Likewise.
9203 * linux-m68k-low.c: Likewise.
9204 * linux-mips-low.c: Likewise.
9205 * linux-nios2-low.c: Likewise.
9206 * linux-s390-low.c: Likewise.
9207 * linux-sparc-low.c: Likewise.
9208 * linux-tic6x-low.c: Likewise.
9209 * linux-tile-low.c: Likewise.
9210 * linux-x86-low.c: Likewise.
9211
9212 2015-07-24 Pedro Alves <palves@redhat.com>
9213
9214 * config.in: Regenerate.
9215 * configure: Regenerate.
9216
9217 2015-07-24 Pedro Alves <palves@redhat.com>
9218
9219 * acinclude.m4: Include ../ptrace.m4.
9220 * configure.ac: Call GDB_AC_PTRACE.
9221 * config.in, configure: Regenerate.
9222
9223 2015-07-24 Yao Qi <yao.qi@linaro.org>
9224
9225 * linux-low.c (linux_create_inferior): Remove setting to
9226 proc->priv->new_inferior.
9227 (linux_attach): Likewise.
9228 (linux_low_filter_event): Likewise.
9229 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
9230
9231 2015-07-24 Yao Qi <yao.qi@linaro.org>
9232
9233 * linux-low.c (linux_arch_setup): New function.
9234 (linux_low_filter_event): If proc->tdesc is NULL and
9235 proc->attached is true, call the_low_target.arch_setup.
9236 Otherwise, keep status pending, and return.
9237 (linux_resume_one_lwp_throw): Don't call get_pc if
9238 thread->while_stepping isn't NULL. Don't call
9239 get_thread_regcache if proc->tdesc is NULL.
9240 (need_step_over_p): Return 0 if proc->tdesc is NULL.
9241 (linux_target_ops): Install arch_setup.
9242 * server.c (start_inferior): Call the_target->arch_setup.
9243 * target.h (struct target_ops) <arch_setup>: New field.
9244 (target_arch_setup): New marco.
9245 * lynx-low.c (lynx_target_ops): Update.
9246 * nto-low.c (nto_target_ops): Update.
9247 * spu-low.c (spu_target_ops): Update.
9248 * win32-low.c (win32_target_ops): Update.
9249
9250 2015-07-24 Yao Qi <yao.qi@linaro.org>
9251
9252 * linux-low.c (linux_add_process): Don't set
9253 proc->priv->new_inferior.
9254 (linux_create_inferior): Set proc->priv->new_inferior to 1.
9255 (linux_attach): Likewise.
9256
9257 2015-07-24 Yao Qi <yao.qi@linaro.org>
9258
9259 * server.c (start_inferior): Code refactor.
9260
9261 2015-07-24 Yao Qi <yao.qi@linaro.org>
9262
9263 * server.c (process_serial_event): Set general_thread.
9264
9265 2015-07-21 Yao Qi <yao.qi@linaro.org>
9266
9267 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
9268 aarch64_linux_get_debug_reg_capacity.
9269
9270 2015-07-17 Yao Qi <yao.qi@linaro.org>
9271
9272 * Makefile.in (aarch64-linux-hw-point.o): New rule.
9273 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
9274 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
9275 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
9276 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
9277 (AARCH64_HWP_ALIGNMENT): Likewise.
9278 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
9279 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
9280 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
9281 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
9282 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
9283 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
9284 (struct aarch64_debug_reg_state): Likewise.
9285 (struct arch_lwp_info): Likewise.
9286 (aarch64_align_watchpoint): Likewise.
9287 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
9288 (aarch64_watchpoint_length): Likewise.
9289 (aarch64_point_encode_ctrl_reg): Likewise
9290 (aarch64_point_is_aligned): Likewise.
9291 (aarch64_align_watchpoint): Likewise.
9292 (aarch64_linux_set_debug_regs):
9293 (aarch64_dr_state_insert_one_point): Likewise.
9294 (aarch64_dr_state_remove_one_point): Likewise.
9295 (aarch64_handle_breakpoint): Likewise.
9296 (aarch64_handle_aligned_watchpoint): Likewise.
9297 (aarch64_handle_unaligned_watchpoint): Likewise.
9298 (aarch64_handle_watchpoint): Likewise.
9299
9300 2015-07-17 Yao Qi <yao.qi@linaro.org>
9301
9302 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
9303 and don't aarch64_get_debug_reg_state. All callers update.
9304 (aarch64_handle_aligned_watchpoint): Likewise.
9305 (aarch64_handle_unaligned_watchpoint): Likewise.
9306 (aarch64_handle_watchpoint): Likewise.
9307 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
9308 (aarch64_remove_point): Likewise.
9309
9310 2015-07-17 Yao Qi <yao.qi@linaro.org>
9311
9312 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
9313 debug_printf.
9314 (aarch64_handle_unaligned_watchpoint): Likewise.
9315
9316 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9317
9318 Revert the previous 3 commits:
9319 Move gdb_regex* to common/
9320 Move linux_find_memory_regions_full & co.
9321 gdbserver build-id attribute generator
9322
9323 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9324 Jan Kratochvil <jan.kratochvil@redhat.com>
9325
9326 gdbserver build-id attribute generator.
9327 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
9328 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
9329 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
9330 (find_phdr): New.
9331 (get_dynamic): Use find_pdhr to traverse program headers.
9332 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
9333 (compare_mapping_entry_range, struct find_memory_region_callback_data)
9334 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
9335 (get_hex_build_id): New.
9336 (linux_qxfer_libraries_svr4): Add optional build-id attribute
9337 to reply XML document.
9338
9339 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9340 Jan Kratochvil <jan.kratochvil@redhat.com>
9341
9342 * target.c: Include target/target-utils.h and fcntl.h.
9343 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
9344 (target_fileio_read_stralloc): New functions.
9345
9346 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9347
9348 * Makefile.in (OBS): Add gdb_regex.o.
9349 (gdb_regex.o): New.
9350 * config.in: Rebuilt.
9351 * configure: Rebuilt.
9352
9353 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
9354 Jan Kratochvil <jan.kratochvil@redhat.com>
9355
9356 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
9357 * Makefile.in (OBS): Add target-utils.o.
9358 (linux-maps.o, target-utils.o): New.
9359 * configure.srv (srv_linux_obj): Add linux-maps.o.
9360
9361 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
9362
9363 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
9364 function, return 1.
9365 (the_low_target): Install it.
9366
9367 2015-07-14 Pedro Alves <palves@redhat.com>
9368
9369 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
9370 Instead, ignore ECHILD, and throw an error for other errnos.
9371
9372 2015-07-10 Pedro Alves <palves@redhat.com>
9373
9374 * event-loop.c (struct callback_event) <data>: Change type to
9375 gdb_client_data instance instead of gdb_client_data pointer.
9376 (append_callback_event): Adjust.
9377
9378 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
9379
9380 * linux-aarch64-low.c: Add comments for each linux_target_ops
9381 method. Remove comments already covered in target_ops and
9382 linux_target_ops definitions.
9383 (the_low_target): Add comments for each unimplemented method.
9384
9385 2015-07-09 Yao Qi <yao.qi@linaro.org>
9386
9387 * linux-aarch64-low.c (aarch64_regmap): Remove.
9388 (aarch64_usrregs_info): Remove.
9389 (regs_info): Set field usrregs to NULL.
9390
9391 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
9392
9393 * linux-low.c: Include "rsp-low.h"
9394 (linux_low_encode_pt_config, linux_low_encode_raw): New.
9395 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
9396 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
9397 (handle_btrace_enable_pt): New.
9398 (handle_btrace_general_set): Support "pt".
9399 (handle_btrace_conf_general_set): Support "pt:size".
9400
9401 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9402
9403 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
9404 Z_PACKET_SW_BP.
9405
9406 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
9407
9408 * linux-aarch64-low.c: Remove comment about endianness.
9409 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
9410 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
9411 memcmp.
9412
9413 2015-06-24 Gary Benson <gbenson@redhat.com>
9414
9415 * linux-i386-ipa.c (stdint.h): Do not include.
9416 * lynx-i386-low.c (stdint.h): Likewise.
9417 * lynx-ppc-low.c (stdint.h): Likewise.
9418 * mem-break.c (stdint.h): Likewise.
9419 * thread-db.c (stdint.h): Likewise.
9420 * tracepoint.c (stdint.h): Likewise.
9421 * win32-low.c (stdint.h): Likewise.
9422
9423 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
9424
9425 * server.c (write_qxfer_response): Update call to
9426 remote_escape_output.
9427
9428 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
9429 Jan Kratochvil <jan.kratochvil@redhat.com>
9430
9431 Merge multiple hex conversions.
9432 * gdbreplay.c (tohex): Rename to 'fromhex'.
9433 (logchar): Use fromhex.
9434
9435 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
9436
9437 * server.c (handle_qxfer_libraries): Set `version' attribute for
9438 <library-list>.
9439
9440 2015-06-10 Gary Benson <gbenson@redhat.com>
9441
9442 * target.h (struct target_ops) <multifs_open>: New field.
9443 <multifs_unlink>: Likewise.
9444 <multifs_readlink>: Likewise.
9445 * linux-low.c (nat/linux-namespaces.h): New include.
9446 (linux_target_ops): Initialize the_target->multifs_open,
9447 the_target->multifs_unlink and the_target->multifs_readlink.
9448 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
9449 * hostio.c (hostio_fs_pid): New static variable.
9450 (hostio_handle_new_gdb_connection): New function.
9451 (handle_setfs): Likewise.
9452 (handle_open): Use the_target->multifs_open as appropriate.
9453 (handle_unlink): Use the_target->multifs_unlink as appropriate.
9454 (handle_readlink): Use the_target->multifs_readlink as
9455 appropriate.
9456 (handle_vFile): Handle vFile:setfs packets.
9457 * server.c (handle_query): Call hostio_handle_new_gdb_connection
9458 after target_handle_new_gdb_connection.
9459
9460 2015-06-10 Gary Benson <gbenson@redhat.com>
9461
9462 * configure.ac (AC_CHECK_FUNCS): Add setns.
9463 * config.in: Regenerate.
9464 * configure: Likewise.
9465 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
9466 (linux-namespaces.o): New rule.
9467 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9468
9469 2015-06-09 Gary Benson <gbenson@redhat.com>
9470
9471 * hostio.c (handle_open): Process mode argument with
9472 fileio_to_host_mode.
9473
9474 2015-06-01 Yao Qi <yao.qi@linaro.org>
9475
9476 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9477 * linux-x86-low.c: Likewise.
9478
9479 2015-05-28 Don Breazeal <donb@codesourcery.com>
9480
9481 * linux-low.c (handle_extended_wait): Initialize
9482 thread_info.last_resume_kind for new fork children.
9483
9484 2015-05-15 Pedro Alves <palves@redhat.com>
9485
9486 * target.h (target_handle_new_gdb_connection): Rewrite using if
9487 wrapped in do/while.
9488
9489 2015-05-14 Joel Brobecker <brobecker@adacore.com>
9490
9491 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
9492 * configure, config.in: Regenerate.
9493 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
9494 Declare typedef.
9495
9496 2015-05-12 Don Breazeal <donb@codesourcery.com>
9497
9498 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
9499 PTRACE_EVENT_VFORK_DONE.
9500 (linux_low_ptrace_options, extended_event_reported): Add vfork
9501 events.
9502 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
9503 and "vforkdone" for RSP 'T' Stop Reply Packet.
9504 * server.h (report_vfork_events): Declare
9505 global variable.
9506
9507 2015-05-12 Don Breazeal <donb@codesourcery.com>
9508
9509 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
9510 (the_low_target) <new_fork>: Initialize new member.
9511 * linux-arm-low.c (arm_new_fork): New function.
9512 (the_low_target) <new_fork>: Initialize new member.
9513 * linux-low.c (handle_extended_wait): Call new target function
9514 new_fork.
9515 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
9516 * linux-mips-low.c (mips_add_watchpoint): New function
9517 extracted from mips_insert_point.
9518 (the_low_target) <new_fork>: Initialize new member.
9519 (mips_linux_new_fork): New function.
9520 (mips_insert_point): Call mips_add_watchpoint.
9521 * linux-x86-low.c (x86_linux_new_fork): New function.
9522 (the_low_target) <new_fork>: Initialize new member.
9523
9524 2015-05-12 Don Breazeal <donb@codesourcery.com>
9525
9526 * linux-low.c (handle_extended_wait): Implement return value,
9527 rename argument 'event_child' to 'event_lwp', handle
9528 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
9529 (linux_low_ptrace_options): New function.
9530 (linux_low_filter_event): Call linux_low_ptrace_options,
9531 use different argument fo linux_enable_event_reporting,
9532 use return value from handle_extended_wait.
9533 (extended_event_reported): New function.
9534 (linux_wait_1): Call extended_event_reported and set
9535 status to report fork events.
9536 (linux_write_memory): Add pid to debug message.
9537 (reset_lwp_ptrace_options_callback): New function.
9538 (linux_handle_new_gdb_connection): New function.
9539 (linux_target_ops): Initialize new structure member.
9540 * linux-low.h (struct lwp_info) <waitstatus>: New member.
9541 * lynx-low.c: Initialize new structure member.
9542 * remote-utils.c (prepare_resume_reply): Implement stop reason
9543 "fork" for "T" stop message.
9544 * server.c (handle_query): Call handle_new_gdb_connection.
9545 * server.h (report_fork_events): Declare global flag.
9546 * target.h (struct target_ops) <handle_new_gdb_connection>:
9547 New member.
9548 (target_handle_new_gdb_connection): New macro.
9549 * win32-low.c: Initialize new structure member.
9550
9551 2015-05-12 Don Breazeal <donb@codesourcery.com>
9552
9553 * mem-break.c (APPEND_TO_LIST): Define macro.
9554 (clone_agent_expr): New function.
9555 (clone_one_breakpoint): New function.
9556 (clone_all_breakpoints): New function.
9557 * mem-break.h: Declare new functions.
9558
9559 2015-05-12 Don Breazeal <donb@codesourcery.com>
9560
9561 * linux-low.c (linux_supports_fork_events): New function.
9562 (linux_supports_vfork_events): New function.
9563 (linux_target_ops): Initialize new structure members.
9564 (initialize_low): Call linux_check_ptrace_features.
9565 * lynx-low.c (lynx_target_ops): Initialize new structure
9566 members.
9567 * server.c (report_fork_events, report_vfork_events):
9568 New global flags.
9569 (handle_query): Add new features to qSupported packet and
9570 response.
9571 (captured_main): Initialize new global variables.
9572 * target.h (struct target_ops) <supports_fork_events>:
9573 New member.
9574 <supports_vfork_events>: New member.
9575 (target_supports_fork_events): New macro.
9576 (target_supports_vfork_events): New macro.
9577 * win32-low.c (win32_target_ops): Initialize new structure
9578 members.
9579
9580 2015-05-12 Gary Benson <gbenson@redhat.com>
9581
9582 * server.c (handle_qxfer_exec_file): Use current process
9583 if annex is empty.
9584
9585 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
9586
9587 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
9588 Remove HAVE_PTRACE_GETREGS conditionals.
9589 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
9590 instead of PTRACE_GETREGS and PTRACE_SETREGS.
9591
9592 2015-05-08 Yao Qi <yao.qi@linaro.org>
9593
9594 * linux-low.c (linux_supports_conditional_breakpoints): New
9595 function.
9596 (linux_target_ops): Install new target method.
9597 * lynx-low.c (lynx_target_ops): Install NULL hook for
9598 supports_conditional_breakpoints.
9599 * nto-low.c (nto_target_ops): Likewise.
9600 * spu-low.c (spu_target_ops): Likewise.
9601 * win32-low.c (win32_target_ops): Likewise.
9602 * server.c (handle_query): Check
9603 target_supports_conditional_breakpoints.
9604 * target.h (struct target_ops) <supports_conditional_breakpoints>:
9605 New field.
9606 (target_supports_conditional_breakpoints): New macro.
9607
9608 2015-05-06 Pedro Alves <palves@redhat.com>
9609
9610 PR server/18081
9611 * server.c (start_inferior): If the process exits, mourn it.
9612
9613 2015-04-21 Gary Benson <gbenson@redhat.com>
9614
9615 * hostio.c (fileio_open_flags_to_host): Factored out to
9616 fileio_to_host_openflags in common/fileio.c. Single use
9617 updated.
9618
9619 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9620
9621 * linux-xtensa-low.c (xtensa_fill_gregset)
9622 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
9623 XCHAL_HAVE_LOOP.
9624
9625 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
9626
9627 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
9628 (regs_info): Replace usrregs pointer with NULL.
9629
9630 2015-04-17 Gary Benson <gbenson@redhat.com>
9631
9632 * target.h (struct target_ops) <pid_to_exec_file>: New field.
9633 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
9634 * server.c (handle_qxfer_exec_file): New function.
9635 (qxfer_packets): Add exec-file entry.
9636 (handle_query): Report qXfer:exec-file:read as supported packet.
9637
9638 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
9639
9640 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
9641
9642 2015-04-09 Gary Benson <gbenson@redhat.com>
9643
9644 * hostio-errno.c (errno_to_fileio_error): Remove function.
9645 Update caller to use remote_fileio_to_fio_error.
9646
9647 2015-04-09 Yao Qi <yao.qi@linaro.org>
9648
9649 * linux-low.c (linux_insert_point): Call
9650 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
9651 (linux_remove_point): Call remove_memory_breakpoint if type is
9652 raw_bkpt_type_sw.
9653 * linux-x86-low.c (x86_insert_point): Don't call
9654 insert_memory_breakpoint.
9655 (x86_remove_point): Don't call remove_memory_breakpoint.
9656
9657 2015-04-01 Pedro Alves <palves@redhat.com>
9658 Cleber Rosa <crosa@redhat.com>
9659
9660 * server.c (gdbserver_usage): Reorganize and extend the usage
9661 message.
9662
9663 2015-03-24 Pedro Alves <palves@redhat.com>
9664
9665 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
9666 output. Also dump TRAP_TRACE.
9667 (linux_low_filter_event): In debug output, distinguish a
9668 resume_stop SIGSTOP from a delayed SIGSTOP.
9669
9670 2015-03-24 Gary Benson <gbenson@redhat.com>
9671
9672 * linux-x86-low.c (x86_linux_new_thread): Moved to
9673 nat/x86-linux.c.
9674 (x86_linux_prepare_to_resume): Likewise.
9675
9676 2015-03-24 Gary Benson <gbenson@redhat.com>
9677
9678 * Makefile.in (x86-linux-dregs.o): New rule.
9679 * configure.srv: Add x86-linux-dregs.o to relevant targets.
9680 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
9681 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
9682 (x86_linux_dr_get): Likewise.
9683 (x86_linux_dr_set): Likewise.
9684 (update_debug_registers_callback): Likewise.
9685 (x86_linux_dr_set_addr): Likewise.
9686 (x86_linux_dr_get_addr): Likewise.
9687 (x86_linux_dr_set_control): Likewise.
9688 (x86_linux_dr_get_control): Likewise.
9689 (x86_linux_dr_get_status): Likewise.
9690 (x86_linux_update_debug_registers): Likewise.
9691
9692 2015-03-24 Gary Benson <gbenson@redhat.com>
9693
9694 * linux-x86-low.c (x86_linux_update_debug_registers):
9695 New function, factored out from...
9696 (x86_linux_prepare_to_resume): ...this.
9697
9698 2015-03-24 Gary Benson <gbenson@redhat.com>
9699
9700 * linux-x86-low.c (x86_linux_dr_get): Update comments.
9701 (x86_linux_dr_set): Likewise.
9702 (update_debug_registers_callback): Likewise.
9703 (x86_linux_dr_set_addr): Likewise.
9704 (x86_linux_dr_get_addr): Likewise.
9705 (x86_linux_dr_set_control): Likewise.
9706 (x86_linux_dr_get_control): Likewise.
9707 (x86_linux_dr_get_status): Likewise.
9708 (x86_linux_prepare_to_resume): Likewise.
9709
9710 2015-03-24 Gary Benson <gbenson@redhat.com>
9711
9712 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
9713 Use perror_with_name. Pass string through gettext.
9714 (x86_linux_dr_set): Likewise.
9715
9716 2015-03-24 Gary Benson <gbenson@redhat.com>
9717
9718 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
9719 (x86_linux_dr_set_addr): ...this.
9720 (x86_dr_low_get_addr): Rename to...
9721 (x86_linux_dr_get_addr): ...this.
9722 (x86_dr_low_set_control): Rename to...
9723 (x86_linux_dr_set_control): ...this.
9724 (x86_dr_low_get_control): Rename to...
9725 (x86_linux_dr_get_control): ...this.
9726 (x86_dr_low_get_status): Rename to...
9727 (x86_linux_dr_get_status): ...this.
9728 (x86_dr_low): Update with new function names.
9729
9730 2015-03-24 Gary Benson <gbenson@redhat.com>
9731
9732 * Makefile.in (x86-linux.o): New rule.
9733 * configure.srv: Add x86-linux.o to relevant targets.
9734 * linux-low.c (lwp_set_arch_private_info): New function.
9735 (lwp_arch_private_info): Likewise.
9736 * linux-x86-low.c: Include nat/x86-linux.h.
9737 (arch_lwp_info): Removed structure.
9738 (update_debug_registers_callback):
9739 Use lwp_set_debug_registers_changed.
9740 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
9741 and lwp_set_debug_registers_changed.
9742 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
9743
9744 2015-03-24 Gary Benson <gbenson@redhat.com>
9745
9746 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
9747 * linux-arm-low.c (arm_new_thread): Likewise.
9748 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
9749 * linux-mips-low.c (mips_linux_new_thread): Likewise.
9750 * linux-x86-low.c (x86_linux_new_thread): Likewise.
9751 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
9752
9753 2015-03-24 Gary Benson <gbenson@redhat.com>
9754
9755 * linux-low.c (ptid_of_lwp): New function.
9756 (lwp_is_stopped): Likewise.
9757 (lwp_stop_reason): Likewise.
9758 * linux-x86-low.c (update_debug_registers_callback):
9759 Use lwp_is_stopped.
9760 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
9761 lwp_stop_reason.
9762
9763 2015-03-24 Gary Benson <gbenson@redhat.com>
9764
9765 * linux-low.h (linux_stop_lwp): Remove declaration.
9766
9767 2015-03-24 Gary Benson <gbenson@redhat.com>
9768
9769 * linux-low.h: Include nat/linux-nat.h.
9770 * linux-low.c (iterate_over_lwps_args): New structure.
9771 (iterate_over_lwps_filter): New function.
9772 (iterate_over_lwps): Likewise.
9773 * linux-x86-low.c (update_debug_registers_callback):
9774 Update signature to what iterate_over_lwps expects.
9775 Remove PID check that iterate_over_lwps now performs.
9776 (x86_dr_low_set_addr): Use iterate_over_lwps.
9777 (x86_dr_low_set_control): Likewise.
9778
9779 2015-03-24 Gary Benson <gbenson@redhat.com>
9780
9781 * linux-x86-low.c (x86_debug_reg_state): New function.
9782 (x86_linux_prepare_to_resume): Use the above.
9783
9784 2015-03-24 Gary Benson <gbenson@redhat.com>
9785
9786 * linux-low.c (current_lwp_ptid): New function.
9787 * linux-x86-low.c: Include nat/linux-nat.h.
9788 (x86_dr_low_get_addr): Use current_lwp_ptid.
9789 (x86_dr_low_get_control): Likewise.
9790 (x86_dr_low_get_status): Likewise.
9791
9792 2015-03-20 Pedro Alves <palves@redhat.com>
9793
9794 * tracepoint.c (cmd_qtstatus): Make "str" const.
9795
9796 2015-03-20 Pedro Alves <palves@redhat.com>
9797
9798 * server.c (handle_general_set): Make "req_str" const.
9799
9800 2015-03-19 Pedro Alves <palves@redhat.com>
9801
9802 * linux-low.c (linux_resume_one_lwp): Rename to ...
9803 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
9804 instead call perror_with_name.
9805 (check_ptrace_stopped_lwp_gone): New function.
9806 (linux_resume_one_lwp): Reimplement as wrapper around
9807 linux_resume_one_lwp_throw that swallows errors if the LWP is
9808 gone.
9809
9810 2015-03-19 Pedro Alves <palves@redhat.com>
9811
9812 * linux-low.c (count_events_callback, select_event_lwp_callback):
9813 No longer check whether the thread has resume_stop as last resume
9814 kind.
9815
9816 2015-03-19 Pedro Alves <palves@redhat.com>
9817
9818 * linux-low.c (count_events_callback, select_event_lwp_callback):
9819 Use the lwp's status_pending_p field, not the thread's.
9820
9821 2015-03-19 Pedro Alves <palves@redhat.com>
9822
9823 * linux-low.c (select_event_lwp_callback): Update comments to
9824 no longer mention SIGTRAP.
9825
9826 2015-03-18 Gary Benson <gbenson@redhat.com>
9827
9828 * server.c (handle_query): Do not report vFile:fstat as supported.
9829
9830 2015-03-11 Gary Benson <gbenson@redhat.com>
9831
9832 * hostio.c (sys/types.h): New include.
9833 (sys/stat.h): Likewise.
9834 (common-remote-fileio.h): Likewise.
9835 (handle_fstat): New function.
9836 (handle_vFile): Handle vFile:fstat packets.
9837
9838 2015-03-11 Gary Benson <gbenson@redhat.com>
9839
9840 * configure.ac (AC_CHECK_MEMBERS): Add checks for
9841 struct stat.st_blocks and struct stat.st_blksize.
9842 * configure: Regenerate.
9843 * config.in: Likewise.
9844 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
9845 (OBS): Add common-remote-fileio.o.
9846 (common-remote-fileio.o): New rule.
9847
9848 2015-03-09 Pedro Alves <palves@redhat.com>
9849
9850 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
9851 'struct sockaddr' pointer in 'accept' call.
9852
9853 2015-03-09 Pedro Alves <palves@redhat.com>
9854
9855 Revert:
9856 2015-03-07 Pedro Alves <palves@redhat.com>
9857 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9858 or <winsock2.h> here. Instead include "gdb_socket.h".
9859 (remote_open): Use union gdb_sockaddr_u.
9860 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9861 or <winsock2.h> here. Instead include "gdb_socket.h".
9862 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9863 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9864 or <sys/un.h>.
9865 (init_named_socket, gdb_agent_helper_thread): Use union
9866 gdb_sockaddr_u.
9867
9868 2015-03-07 Pedro Alves <palves@redhat.com>
9869
9870 * configure.ac (build_warnings): Move
9871 -Wdeclaration-after-statement to the C-specific set.
9872 * configure: Regenerate.
9873
9874 2015-03-07 Pedro Alves <palves@redhat.com>
9875
9876 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9877 or <winsock2.h> here. Instead include "gdb_socket.h".
9878 (remote_open): Use union gdb_sockaddr_u.
9879 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9880 or <winsock2.h> here. Instead include "gdb_socket.h".
9881 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9882 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9883 or <sys/un.h>.
9884 (init_named_socket, gdb_agent_helper_thread): Use union
9885 gdb_sockaddr_u.
9886
9887 2015-03-07 Pedro Alves <palves@redhat.com>
9888
9889 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
9890 instead.
9891
9892 2015-03-06 Yao Qi <yao.qi@linaro.org>
9893
9894 * linux-aarch64-low.c (aarch64_insert_point): Use
9895 show_debug_regs as a boolean.
9896 (aarch64_remove_point): Likewise.
9897
9898 2015-03-05 Pedro Alves <palves@redhat.com>
9899
9900 * lynx-low.c (lynx_target_ops): Install NULL hooks for
9901 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9902 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
9903 * nto-low.c (nto_target_ops): Likewise.
9904 * spu-low.c (spu_target_ops): Likewise.
9905 * win32-low.c (win32_target_ops): Likewise.
9906
9907 2015-03-04 Pedro Alves <palves@redhat.com>
9908
9909 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9910 Decide whether a breakpoint triggered based on the SIGTRAP's
9911 siginfo.si_code.
9912 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9913 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9914 (linux_low_filter_event): Check for breakpoints before checking
9915 watchpoints.
9916 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9917 siginfo.si_code.
9918 (linux_stopped_by_sw_breakpoint)
9919 (linux_supports_stopped_by_sw_breakpoint)
9920 (linux_stopped_by_hw_breakpoint)
9921 (linux_supports_stopped_by_hw_breakpoint): New functions.
9922 (linux_target_ops): Install new target methods.
9923
9924 2015-03-04 Pedro Alves <palves@redhat.com>
9925
9926 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9927 * server.c (swbreak_feature, hwbreak_feature): New globals.
9928 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9929 (captured_main): Clear swbreak_feature and hwbreak_feature.
9930 * server.h (swbreak_feature, hwbreak_feature): Declare.
9931 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9932 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9933 supports_stopped_by_hw_breakpoint>: New fields.
9934 (target_supports_stopped_by_sw_breakpoint)
9935 (target_stopped_by_sw_breakpoint)
9936 (target_supports_stopped_by_hw_breakpoint)
9937 (target_stopped_by_hw_breakpoint): Declare.
9938
9939 2015-03-04 Pedro Alves <palves@redhat.com>
9940
9941 enum lwp_stop_reason -> enum target_stop_reason
9942 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9943 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9944 (linux_wait_1, stuck_in_jump_pad_callback)
9945 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9946 (linux_stopped_by_watchpoint):
9947 * linux-low.h (enum lwp_stop_reason): Delete.
9948 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9949 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9950
9951 2015-03-04 Yao Qi <yao.qi@linaro.org>
9952
9953 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9954
9955 2015-03-03 Gary Benson <gbenson@redhat.com>
9956
9957 * hostio.c (handle_vFile): Fix prefix lengths.
9958
9959 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9960
9961 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9962 ptr_bits.
9963
9964 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9965
9966 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9967 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9968 (clean): Add "rm -f" for above C files.
9969 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9970 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9971 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9972 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9973 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9974 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9975 (init_registers_s390x_vx_linux64)
9976 (init_registers_s390x_tevx_linux64)
9977 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9978 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9979 declarations.
9980 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9981 (s390_store_vxrs_high): New functions.
9982 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9983 NT_S390_VXRS_HIGH.
9984 (s390_arch_setup): Add logic for selecting one of the new target
9985 descriptions. Activate the new vector regsets if applicable.
9986 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9987 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9988 and init_registers_s390x_tevx_linux64.
9989
9990 2015-03-01 Pedro Alves <palves@redhat.com>
9991
9992 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9993 parameter.
9994
9995 2015-02-27 Pedro Alves <palves@redhat.com>
9996
9997 * linux-x86-low.c (u_debugreg_offset): New function.
9998 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9999
10000 2015-02-27 Pedro Alves <palves@redhat.com>
10001
10002 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
10003 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
10004 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
10005 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
10006 (ps_lsetfpregs, ps_getpid)
10007 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
10008 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
10009 (ps_lsetxregs, ps_plog): Declare.
10010
10011 2015-02-27 Pedro Alves <palves@redhat.com>
10012
10013 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
10014 IP_AGENT_EXPORT_FUNC.
10015 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
10016 IP_AGENT_EXPORT_FUNC.
10017 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
10018 (IP_AGENT_EXPORT): Delete.
10019 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10020 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10021 (gdb_trampoline_buffer_error, collecting, gdb_collect)
10022 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
10023 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
10024 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
10025 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
10026 (traceframe_read_count, traceframe_write_count)
10027 (traceframes_created, trace_state_variables, get_raw_reg)
10028 (get_trace_state_variable_value, set_trace_state_variable_value)
10029 (ust_loaded, helper_thread_id, cmd_buf): Use
10030 IPA_SYM_EXPORTED_NAME.
10031 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
10032 (tracepoints) Use IP_AGENT_EXPORT_VAR.
10033 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
10034 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10035 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
10036 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
10037 EXTERN_C_PUSH/EXTERN_C_POP.
10038 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
10039 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
10040 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10041 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
10042 (traceframe_write_count, traceframe_read_count)
10043 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
10044 (about_to_request_buffer_space, get_trace_state_variable_value)
10045 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
10046 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
10047 EXTERN_C_PUSH/EXTERN_C_POP.
10048 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
10049 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
10050 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
10051 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
10052 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10053 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
10054 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
10055 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
10056 Define.
10057 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
10058 (IP_AGENT_EXPORT_VAR_DECL): Define.
10059 (tracing): Declare.
10060 (gdb_agent_get_raw_reg): Declare.
10061
10062 2015-02-27 Tom Tromey <tromey@redhat.com>
10063 Pedro Alves <palves@redhat.com>
10064
10065 Rename symbols whose names are reserved C++ keywords throughout.
10066
10067 2015-02-27 Pedro Alves <palves@redhat.com>
10068
10069 * Makefile.in (COMPILER): New, get it from autoconf.
10070 (CXX): Get from autoconf instead.
10071 (COMPILE.pre): Use COMPILER.
10072 (CC-LD): Rename to ...
10073 (CC_LD): ... this. Use COMPILER.
10074 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
10075 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10076 * acinclude.m4: Include build-with-cxx.m4.
10077 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
10078 Disable -Werror by default if building in C++ mode.
10079 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
10080 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
10081 the C++ compiler. Save/restore CXXFLAGS too.
10082 * configure: Regenerate.
10083
10084 2015-02-27 Pedro Alves <palves@redhat.com>
10085
10086 * acinclude.m4: Include libiberty.m4.
10087 * configure.ac: Call libiberty_INIT.
10088 * config.in, configure: Regenerate.
10089
10090 2015-02-26 Pedro Alves <palves@redhat.com>
10091
10092 * linux-low.c (linux_wait_1): When incrementing the PC past a
10093 program breakpoint always use the_low_target.breakpoint_len as
10094 increment, rather than the maximum between that and
10095 the_low_target.decr_pc_after_break.
10096
10097 2015-02-23 Pedro Alves <palves@redhat.com>
10098
10099 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
10100 thread was doing a step-over; always adjust the PC if
10101 we stepped over a permanent breakpoint.
10102 (linux_wait_1): If we stepped over breakpoint that was on top of a
10103 permanent breakpoint, manually advance the PC past it.
10104
10105 2015-02-23 Pedro Alves <palves@redhat.com>
10106
10107 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
10108 modes.
10109 (x86_fill_gregset, x86_store_gregset): Use it when handling
10110 $orig_eax.
10111
10112 2015-02-20 Pedro Alves <palves@redhat.com>
10113
10114 * thread-db.c: Include "nat/linux-procfs.h".
10115 (thread_db_init): Skip listing new threads if the kernel supports
10116 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
10117
10118 2015-02-20 Pedro Alves <palves@redhat.com>
10119
10120 * linux-low.c (status_pending_p_callback): Use ptid_match.
10121
10122 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
10123
10124 PR breakpoints/16812
10125 * linux-low.c (wstatus_maybe_breakpoint): Remove.
10126 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
10127 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
10128
10129 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
10130
10131 PR breakpoints/15956
10132 * tracepoint.c (cmd_qtinit): Add check for current_thread.
10133
10134 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10135
10136 * linux-low.c (linux_low_btrace_conf): Print size.
10137 * server.c (handle_btrace_conf_general_set): New.
10138 (hanle_general_set): Call handle_btrace_conf_general_set.
10139 (handle_query): Report Qbtrace-conf:bts:size as supported.
10140
10141 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10142
10143 * linux-low.c (linux_low_enable_btrace): Update parameters.
10144 (linux_low_btrace_conf): New.
10145 (linux_target_ops)<to_btrace_conf>: Initialize.
10146 * server.c (current_btrace_conf): New.
10147 (handle_btrace_enable): Rename to ...
10148 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
10149 to target_enable_btrace. Update comment. Update users.
10150 (handle_qxfer_btrace_conf): New.
10151 (qxfer_packets): Add btrace-conf entry.
10152 (handle_query): Report qXfer:btrace-conf:read as supported packet.
10153 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
10154 (target_ops)<read_btrace_conf>: New.
10155 (target_enable_btrace): Update parameters.
10156 (target_read_btrace_conf): New.
10157
10158 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10159
10160 * server.c (handle_btrace_general_set): Remove call to
10161 target_supports_btrace.
10162 (supported_btrace_packets): New.
10163 (handle_query): Call supported_btrace_packets.
10164 * target.h: include btrace-common.h.
10165 (btrace_target_info): Removed.
10166 (supports_btrace, target_supports_btrace): Update parameters.
10167
10168 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
10169
10170 * Makefile.in (SFILES): Add common/btrace-common.c.
10171 (OBS): Add common/btrace-common.o.
10172 (btrace-common.o): Add build rules.
10173 * linux-low: Include btrace-common.h.
10174 (linux_low_read_btrace): Use struct btrace_data. Call
10175 btrace_data_init and btrace_data_fini.
10176
10177 2015-02-06 Pedro Alves <palves@redhat.com>
10178
10179 * thread-db.c (find_new_threads_callback): Add debug output.
10180
10181 2015-02-04 Pedro Alves <palves@redhat.com>
10182
10183 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
10184 (resume_stopped_resumed_lwps): New function.
10185 (linux_wait_for_event_filtered): Use it.
10186
10187 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10188
10189 * Makefile.in (SFILES): Add linux-personality.c.
10190 (linux-personality.o): New rule.
10191 * configure.srv (srv_linux_obj): Add linux-personality.o to the
10192 list of objects to be built.
10193 * linux-low.c: Include nat/linux-personality.h.
10194 (linux_create_inferior): Remove code to disable address space
10195 randomization (moved to ../nat/linux-personality.c). Create
10196 cleanup to disable address space randomization.
10197
10198 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
10199
10200 * Makefile.in (posix-strerror.o): New rule.
10201 (mingw-strerror.o): Likewise.
10202 * configure: Regenerated.
10203 * configure.ac: Source file ../common/common.host. Initialize new
10204 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
10205
10206 2015-01-14 Yao Qi <yao@codesourcery.com>
10207
10208 * Makefile.in (SFILES): Add nat/ppc-linux.c.
10209 (ppc-linux.o): New rule.
10210 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
10211 * configure.ac: AC_CHECK_FUNCS(getauxval).
10212 * config.in: Re-generated.
10213 * configure: Re-generated.
10214 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
10215 ppc64_64bit_inferior_p
10216
10217 2015-01-14 Yao Qi <yao@codesourcery.com>
10218
10219 * linux-ppc-low.c: Include "nat/ppc-linux.h".
10220 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
10221 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
10222 (PT_ORIG_R3, PT_TRAP): Likewise.
10223 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
10224 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
10225 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
10226
10227 2015-01-10 Joel Brobecker <brobecker@adacore.com>
10228
10229 * i387-fp.c (i387_cache_to_xsave): In look over
10230 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
10231 zmmh_low_space field by use of zmmh_high_space.
10232
10233 2015-01-09 Pedro Alves <palves@redhat.com>
10234
10235 * linux-low.c (step_over_bkpt): Move higher up in the file.
10236 (handle_extended_wait): Don't store the stop_pc here.
10237 (get_stop_pc): Adjust comments and rename to ...
10238 (check_stopped_by_breakpoint): ... this. Record whether the LWP
10239 stopped for a software breakpoint or hardware breakpoint.
10240 (thread_still_has_status_pending_p): New function.
10241 (status_pending_p_callback): Use
10242 thread_still_has_status_pending_p. If the event is no longer
10243 interesting, resume the LWP.
10244 (handle_tracepoints): Add assert.
10245 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
10246 (wstatus_maybe_breakpoint): New function.
10247 (cancel_breakpoint): Delete function.
10248 (check_stopped_by_watchpoint): New function, factored out from
10249 linux_low_filter_event.
10250 (lp_status_maybe_breakpoint): Delete function.
10251 (linux_low_filter_event): Remove filter_ptid argument.
10252 Leave thread group exits pending here. Store the LWP's stop PC.
10253 Always leave events pending.
10254 (linux_wait_for_event_filtered): Pull all events out of the
10255 kernel, and leave them all pending.
10256 (count_events_callback, select_event_lwp_callback): Consider all
10257 events.
10258 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
10259 (select_event_lwp): Only give preference to the stepping LWP in
10260 all-stop mode. Adjust comments.
10261 (ignore_event): New function.
10262 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
10263 references to cancel_breakpoints. Adjust to renames. Also give
10264 equal priority to all LWPs that have had events in non-stop mode.
10265 If reporting a software breakpoint event, unadjust the LWP's PC.
10266 (linux_wait): If linux_wait_1 returned an ignored event, retry.
10267 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
10268 Adjust.
10269 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
10270 (resume_status_pending_p): Use thread_still_has_status_pending_p.
10271 (linux_stopped_by_watchpoint): Adjust.
10272 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
10273 * linux-low.h (enum lwp_stop_reason): New.
10274 (struct lwp_info) <stop_pc>: Adjust comment.
10275 <stopped_by_watchpoint>: Delete field.
10276 <stop_reason>: New field.
10277 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
10278 * mem-break.c (software_breakpoint_inserted_here)
10279 (hardware_breakpoint_inserted_here): New function.
10280 * mem-break.h (software_breakpoint_inserted_here)
10281 (hardware_breakpoint_inserted_here): Declare.
10282 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
10283 (cancel_breakpoints): Delete.
10284 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
10285 (upload_fast_traceframes): Remove references to
10286 cancel_breakpoints.
10287
10288 2015-01-09 Pedro Alves <palves@redhat.com>
10289
10290 * thread-db.c (find_new_threads_callback): Ignore thread if the
10291 kernel thread ID is -1.
10292
10293 2015-01-09 Pedro Alves <palves@redhat.com>
10294
10295 * linux-low.c (linux_attach_fail_reason_string): Move to
10296 nat/linux-ptrace.c, and rename.
10297 (linux_attach_lwp): Update comment.
10298 (attach_proc_task_lwp_callback): New function.
10299 (linux_attach): Adjust to rename and use
10300 linux_proc_attach_tgid_threads.
10301 (linux_attach_fail_reason_string): Delete declaration.
10302
10303 2015-01-01 Joel Brobecker <brobecker@adacore.com>
10304
10305 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
10306 * server.c (gdbserver_version): Likewise.
10307
10308 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
10309
10310 * remote-utils.c: Include ctype.h.
10311 (input_interrupt): Explicitly handle the case when the char
10312 received is the NUL byte. Improve the printing of non-ASCII
10313 characters.
10314
10315 2014-12-16 Joel Brobecker <brobecker@adacore.com>
10316
10317 * linux-low.c (linux_low_filter_event): Update call to
10318 linux_enable_event_reporting following the addition of
10319 a new parameter to that function.
10320
10321 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
10322
10323 PR server/17457
10324 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
10325 (AARCH64_FPCR_REGNO): Likewise.
10326 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
10327 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
10328 (aarch64_store_fpregset): Likewise.
10329
10330 2014-12-15 Joel Brobecker <brobecker@adacore.com>
10331
10332 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
10333 Remove FIXME comment about assumption about N.
10334
10335 2014-12-13 Joel Brobecker <brobecker@adacore.com>
10336
10337 * configure.ac: If large-file support is disabled in GDBserver,
10338 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10339 * configure: Regenerate.
10340
10341 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10342
10343 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
10344 warning upon ENODATA from ptrace.
10345 * linux-s390-low.c (s390_store_tdb): New.
10346 (s390_regsets): Add regset for NT_S390_TDB.
10347
10348 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10349
10350 * linux-low.c (regsets_store_inferior_registers): Skip regsets
10351 without a fill_function.
10352 * linux-s390-low.c (s390_fill_last_break): Remove.
10353 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
10354 (s390_arch_setup): Use regset's size instead of fill_function for
10355 loop end condition.
10356
10357 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10358
10359 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
10360 the regset's store function when ptrace returned an error.
10361 * regcache.c (get_thread_regcache): Invalidate register cache
10362 before fetching inferior's registers.
10363
10364 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10365
10366 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
10367 while-loop as for-loop.
10368 (regsets_store_inferior_registers): Likewise.
10369
10370 2014-11-28 Yao Qi <yao@codesourcery.com>
10371
10372 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10373 * config.in, configure: Re-generate.
10374 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
10375 is defined.
10376
10377 2014-11-21 Yao Qi <yao@codesourcery.com>
10378
10379 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
10380 (AC_CHECK_HEADERS): Remove malloc.h.
10381 * configure: Re-generated.
10382 * config.in: Re-generated.
10383 * server.h: Don't include alloca.h and malloc.h.
10384 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
10385 Don't include malloc.h.
10386
10387 2014-11-17 Joel Brobecker <brobecker@adacore.com>
10388
10389 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
10390 corresponding ERRNO check in same block.
10391
10392 2014-11-12 Pedro Alves <palves@redhat.com>
10393
10394 * server.c (cont_thread): Update comment.
10395 (start_inferior, attach_inferior): No longer clear cont_thread.
10396 (handle_v_cont): No longer set cont_thread.
10397 (captured_main): Clear cont_thread each time a GDB connects.
10398
10399 2014-11-12 Pedro Alves <palves@redhat.com>
10400
10401 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
10402 thread, and don't resume all threads if the Hc thread has exited.
10403
10404 2014-11-12 Pedro Alves <palves@redhat.com>
10405
10406 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
10407 the process group instead of to a specific LWP.
10408
10409 2014-10-15 Pedro Alves <palves@redhat.com>
10410
10411 PR server/17487
10412 * win32-arm-low.c (arm_set_thread_context): Remove current_event
10413 parameter.
10414 (arm_set_thread_context): Delete.
10415 (the_low_target): Adjust.
10416 * win32-i386-low.c (debug_registers_changed)
10417 (debug_registers_used): Delete.
10418 (update_debug_registers_callback): New function.
10419 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
10420 needing to update their debug registers.
10421 (win32_get_current_dr): New function.
10422 (x86_dr_low_get_addr, x86_dr_low_get_control)
10423 (x86_dr_low_get_status): Fetch the debug register from the thread
10424 record's context.
10425 (i386_initial_stuff): Adjust.
10426 (i386_get_thread_context): Remove current_event parameter. Don't
10427 clear debug_registers_changed nor copy DR values to
10428 debug_reg_state.
10429 (i386_set_thread_context): Delete.
10430 (i386_prepare_to_resume): New function.
10431 (i386_thread_added): Mark the thread as needing to update irs
10432 debug registers.
10433 (the_low_target): Remove i386_set_thread_context and install
10434 i386_prepare_to_resume.
10435 * win32-low.c (win32_get_thread_context): Adjust.
10436 (win32_set_thread_context): Use SetThreadContext
10437 directly.
10438 (win32_prepare_to_resume): New function.
10439 (win32_require_context): New function, factored out from ...
10440 (thread_rec): ... this.
10441 (continue_one_thread): Call win32_prepare_to_resume on each thread
10442 we're about to continue.
10443 (win32_resume): Call win32_prepare_to_resume on the event thread.
10444 * win32-low.h (struct win32_thread_info)
10445 <debug_registers_changed>: New field.
10446 (struct win32_target_ops): Change prototype of set_thread_context,
10447 delete set_thread_context and add prepare_to_resume.
10448 (win32_require_context): New declaration.
10449
10450 2014-10-08 Gary Benson <gbenson@redhat.com>
10451
10452 * server.h: Do not include common-exceptions.h.
10453
10454 2014-10-08 Gary Benson <gbenson@redhat.com>
10455
10456 * server.h: Do not include cleanups.h.
10457
10458 2014-09-30 James Hogan <james.hogan@imgtec.com>
10459
10460 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
10461 mips64-dsp-linux.c.
10462
10463 2014-09-23 Yao Qi <yao@codesourcery.com>
10464
10465 * linux-low.c (lp_status_maybe_breakpoint): New function.
10466 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
10467 (count_events_callback): Likewise.
10468 (select_event_lwp_callback): Likewise.
10469 (cancel_breakpoints_callback): Likewise.
10470
10471 2014-09-19 Don Breazeal <donb@codesourcery.com>
10472
10473 * linux-low.c (handle_extended_wait): Call
10474 linux_ptrace_get_extended_event.
10475 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
10476 linux_is_extended_waitstatus.
10477
10478 2014-09-16 Joel Brobecker <brobecker@adacore.com>
10479
10480 * Makefile.in (CPPFLAGS): Define.
10481 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
10482 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
10483
10484 2014-09-16 Gary Benson <gbenson@redhat.com>
10485
10486 * inferiors.h (current_inferior): Renamed as...
10487 (current_thread): New variable. All uses updated.
10488 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
10489 (maybe_move_out_of_jump_pad): Likewise.
10490 (cancel_breakpoint): Likewise.
10491 (linux_low_filter_event): Likewise.
10492 (wait_for_sigstop): Likewise.
10493 (linux_resume_one_lwp): Likewise.
10494 (need_step_over_p): Likewise.
10495 (start_step_over): Likewise.
10496 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
10497 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
10498 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
10499 and save_inferior as saved_thread.
10500 * regcache.c (get_thread_regcache): Renamed saved_inferior as
10501 saved_thread.
10502 (regcache_invalidate_thread): Likewise.
10503 * remote-utils.c (prepare_resume_reply): Likewise.
10504 * thread-db.c (thread_db_get_tls_address): Likewise.
10505 (disable_thread_event_reporting): Likewise.
10506 (remove_thread_event_breakpoints): Likewise.
10507 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
10508 as saved_thread.
10509 * target.h (set_desired_inferior): Renamed as...
10510 (set_desired_thread): New declaration. All uses updated.
10511 * server.c (myresume): Updated comment to reference thread instead
10512 of inferior.
10513 (handle_serial_event): Likewise.
10514 (handle_target_event): Likewise.
10515
10516 2014-09-12 Tom Tromey <tromey@redhat.com>
10517 Gary Benson <gbenson@redhat.com>
10518
10519 * regcache.h: Include common-regcache.h.
10520 (regcache_read_pc): Don't declare.
10521 * regcache.c (get_thread_regcache_for_ptid): New function.
10522
10523 2014-09-11 Tom Tromey <tromey@redhat.com>
10524 Gary Benson <gbenson@redhat.com>
10525
10526 * symbol.c: New file.
10527 * Makefile.in (SFILES): Add symbol.c.
10528 (OBS): Add symbol.o.
10529
10530 2014-09-11 Gary Benson <gbenson@redhat.com>
10531
10532 * target.c (target_stop_ptid, target_continue_ptid): New
10533 functions.
10534
10535 2014-09-11 Tom Tromey <tromey@redhat.com>
10536 Gary Benson <gbenson@redhat.com>
10537
10538 * target.h: Include target/target.h.
10539 * target.c (target_read_memory, target_read_uint32)
10540 (target_write_memory): New functions.
10541
10542 2014-09-11 Gary Benson <gbenson@redhat.com>
10543
10544 * server.h (debug_hw_points): Don't declare.
10545 * server.c (debug_hw_points): Don't define. Replace all uses
10546 with show_debug_regs.
10547 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
10548 all uses with show_debug_regs.
10549
10550 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10551
10552 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
10553 endianness into account.
10554 (ppc_supply_ptrace_register): Likewise.
10555
10556 2014-09-03 James Hogan <james.hogan@imgtec.com>
10557
10558 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
10559 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
10560
10561 2014-09-03 Gary Benson <gbenson@redhat.com>
10562
10563 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
10564 ALL_DEBUG_ADDRESS_REGISTERS.
10565
10566 2014-09-02 Gary Benson <gbenson@redhat.com>
10567
10568 * i386-low.h: Renamed as...
10569 * x86-low.h: New file. All type, function and variable name
10570 prefixes changed from "i386_" to "x86_". All references updated.
10571 * i386-low.c: Renamed as...
10572 * x86-low.c: New file. All type, function and variable name
10573 prefixes changed from "i386_" to "x86_". All references updated.
10574
10575 2014-09-02 Gary Benson <gbenson@redhat.com>
10576
10577 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
10578 (x86_linux_new_thread): Likewise.
10579
10580 2014-08-29 Gary Benson <gbenson@redhat.com>
10581
10582 * server.h (setjmp.h): Do not include.
10583 (toplevel): Do not declare.
10584 (common-exceptions.h): Include.
10585 (cleanups.h): Likewise.
10586 * server.c (toplevel): Do not define.
10587 (exit_code): New static global.
10588 (detach_or_kill_for_exit_cleanup): New function.
10589 (main): New function. Original main renamed to...
10590 (captured_main): New function.
10591 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
10592
10593 2014-08-29 Gary Benson <gbenson@redhat.com>
10594
10595 * Makefile.in (SFILES): Add common/common-exceptions.c.
10596 (OBS): Add common-exceptions.o.
10597 (common-exceptions.o): New rule.
10598 * utils.c (prepare_to_throw_exception): New function.
10599
10600 2014-08-29 Gary Benson <gbenson@redhat.com>
10601
10602 * config.in: Regenerate.
10603 * configure: Likewise.
10604
10605 2014-08-29 Gary Benson <gbenson@redhat.com>
10606
10607 * Makefile.in (SFILES): Add common/cleanups.c.
10608 (OBS): cleanups.o.
10609 (cleanups.o): New rule.
10610
10611 2014-08-29 Gary Benson <gbenson@redhat.com>
10612
10613 * utils.c (internal_vwarning): New function.
10614
10615 2014-08-28 Gary Benson <gbenson@redhat.com>
10616
10617 * utils.h (fatal): Remove declaration.
10618 * utils.c (fatal): Remove function.
10619
10620 2014-08-28 Gary Benson <gbenson@redhat.com>
10621
10622 * tracepoint.c (gdb_agent_init): Replace fatal with
10623 perror_with_name.
10624 (initialize_tracepoint): Likewise.
10625
10626 2014-08-28 Gary Benson <gbenson@redhat.com>
10627
10628 * remote-utils.c (remote_prepare): Replace fatal with error.
10629
10630 2014-08-28 Gary Benson <gbenson@redhat.com>
10631
10632 * linux-low.c (linux_async): Replace fatal with warning.
10633 Tidy up and return.
10634 (linux_start_non_stop): Return -1 if linux_async failed.
10635
10636 2014-08-28 Gary Benson <gbenson@redhat.com>
10637
10638 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
10639 gdb_assert.
10640 (i386_dr_low_get_addr): Remove vague comment.
10641 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
10642 gdb_assert.
10643
10644 2014-08-28 Gary Benson <gbenson@redhat.com>
10645
10646 * inferiors.c (get_thread_process): Replace check with gdb_assert.
10647 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
10648 internal_error.
10649 (linux_resume_one_lwp): Likewise.
10650 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
10651 gdb_assert.
10652 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
10653 with internal_error.
10654 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
10655 (init_register_cache): Replace fatal with gdb_assert_not_reached.
10656 (find_register_by_name): Replace fatal with internal_error.
10657 (find_regno): Likewise.
10658 * tdesc.c (init_target_desc): Replace check with gdb_assert.
10659 * thread-db.c (thread_db_create_event): Likewise.
10660 (thread_db_load_search): Likewise.
10661 (try_thread_db_load_1): Likewise.
10662 * tracepoint.c (get_jump_space_head): Replace fatal with
10663 internal_error.
10664 (claim_trampoline_space): Likewise.
10665 (have_fast_tracepoint_trampoline_buffer): Likewise.
10666 (cmd_qtstart): Likewise.
10667 (stop_tracing): Likewise.
10668 (fast_tracepoint_collecting): Likewise.
10669 (target_malloc): Likewise.
10670 (download_tracepoint): Likewise.
10671 (download_trace_state_variables): Replace check with gdb_assert.
10672 (upload_fast_traceframes): Replace fatal with internal_error.
10673
10674 2014-08-19 Tom Tromey <tromey@redhat.com>
10675 Gary Benson <gbenson@redhat.com>
10676
10677 * Makefile.in (SFILES): Add common/common-debug.c.
10678 (OBS): Add common-debug.o.
10679 (common-debug.o): New rule.
10680 * debug.h (debug_printf): Don't declare.
10681 * debug.c (debug_printf): Renamed and rewritten as...
10682 (debug_vprintf): New function.
10683
10684 2014-08-19 Gary Benson <gbenson@redhat.com>
10685
10686 * utils.h: Do not include print-utils.h.
10687
10688 2014-08-19 Tom Tromey <tromey@redhat.com>
10689 Gary Benson <gbenson@redhat.com>
10690
10691 * server.h: Add static assertion.
10692 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
10693
10694 2014-08-19 Tom Tromey <tromey@redhat.com>
10695 Gary Benson <gbenson@redhat.com>
10696
10697 * Makefile.in (SFILES): Add common/errors.c.
10698 (OBS): Add errors.o.
10699 (IPA_OBS): Add errors-ipa.o.
10700 (errors.o): New rule.
10701 (errors-ipa.o): Likewise.
10702 * utils.h (perror_with_name, error, warning): Don't declare.
10703 * utils.c (warning): Renamed and rewritten as...
10704 (vwarning): New function.
10705 (error): Renamed and rewritten as...
10706 (verror): New function.
10707 (internal_error): Renamed and rewritten as...
10708 (internal_verror): New function.
10709
10710 2014-08-07 Gary Benson <gbenson@redhat.com>
10711
10712 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
10713 * configure: Regenerate.
10714 * config.in: Likewise.
10715 * server.h: Do not include errno.h.
10716 * event-loop.c: Likewise.
10717 * hostio-errno.c: Likewise.
10718 * linux-low.c: Likewise.
10719 * remote-utils.c: Likewise.
10720 * spu-low.c: Likewise.
10721 * utils.c: Likewise.
10722 * gdbreplay.c: Unconditionally include errno.h.
10723
10724 2014-08-07 Gary Benson <gbenson@redhat.com>
10725
10726 * server.h: Do not include string.h.
10727 * event-loop.c: Likewise.
10728 * linux-low.c: Likewise.
10729 * regcache.c: Likewise.
10730 * remote-utils.c: Likewise.
10731 * spu-low.c: Likewise.
10732 * utils.c: Likewise.
10733
10734 2014-08-07 Gary Benson <gbenson@redhat.com>
10735
10736 * server.h: Do not include gdb_assert.h.
10737
10738 2014-08-07 Gary Benson <gbenson@redhat.com>
10739
10740 * server.h: Do not include common-utils.h.
10741
10742 2014-08-07 Gary Benson <gbenson@redhat.com>
10743
10744 * server.h: Do not include ptid.h.
10745 * notif.h: Likewise.
10746
10747 2014-08-07 Gary Benson <gbenson@redhat.com>
10748
10749 * server.h: Do not include gdb_locale.h.
10750
10751 2014-08-07 Gary Benson <gbenson@redhat.com>
10752
10753 * server.h: Do not include gdb/signals.h.
10754 * win32-low.c: Likewise.
10755
10756 2014-08-07 Gary Benson <gbenson@redhat.com>
10757
10758 * server.h: Do not include pathmax.h.
10759
10760 2014-08-07 Gary Benson <gbenson@redhat.com>
10761
10762 * server.h: Do not include libiberty.h.
10763 * linux-bfin-low.c: Likewise.
10764
10765 2014-08-07 Gary Benson <gbenson@redhat.com>
10766
10767 * server.h: Do not include ansidecl.h.
10768
10769 2014-08-07 Gary Benson <gbenson@redhat.com>
10770
10771 * linux-x86-low.c: Do not include stddef.h.
10772 * lynx-ppc-low.c: Likewise.
10773 * tracepoint.c: Likewise.
10774
10775 2014-08-07 Gary Benson <gbenson@redhat.com>
10776
10777 * server.h: Do not include stdarg.h.
10778 * nto-low.c: Likewise.
10779
10780 2014-08-07 Gary Benson <gbenson@redhat.com>
10781
10782 * server.h: Do not include stdlib.h.
10783 * inferiors.c: Likewise.
10784 * linux-low.c: Likewise.
10785 * regcache.c: Likewise.
10786 * spu-low.c: Likewise.
10787 * tracepoint.c: Likewise.
10788 * utils.c: Likewise.
10789
10790 2014-08-07 Gary Benson <gbenson@redhat.com>
10791
10792 * server.h: Do not include stdio.h.
10793 * linux-low.c: Likewise.
10794 * remote-utils.c: Likewise.
10795 * spu-low.c: Likewise.
10796 * utils.c: Likewise.
10797 * wincecompat.c: Likewise.
10798
10799 2014-08-06 Gary Benson <gbenson@redhat.com>
10800
10801 * regcache.c (init_register_cache): Move conditionals inside if.
10802
10803 2014-08-06 Gary Benson <gbenson@redhat.com>
10804
10805 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
10806
10807 2014-07-31 Gary Benson <gbenson@redhat.com>
10808
10809 * ax.h: Do not include server.h.
10810 * gdbthread.h: Likewise.
10811 * lynx-low.h: Likewise.
10812 * notif.h: Likewise.
10813
10814 2014-07-30 Gary Benson <gbenson@redhat.com>
10815
10816 * server.h: Include common-defs.h.
10817 Do not include config.h or build-gnulib-gdbserver/config.h.
10818
10819 2014-07-30 Gary Benson <gbenson@redhat.com>
10820
10821 * hostio-errno.c: Move server.h to top of includes list.
10822 * inferiors.c: Likewise.
10823 * linux-x86-low.c: Likewise.
10824 * notif.c: Include server.h.
10825
10826 2014-07-24 Tom Tromey <tromey@redhat.com>
10827 Gary Benson <gbenson@redhat.com>
10828
10829 * server.h (CORE_ADDR): Now unsigned.
10830
10831 2014-07-16 Pedro Alves <palves@redhat.com>
10832
10833 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
10834
10835 2014-07-15 Pedro Alves <palves@redhat.com>
10836
10837 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
10838 copy.
10839
10840 2014-07-11 Pedro Alves <palves@redhat.com>
10841
10842 * linux-low.c (kill_wait_lwp): New function, based on
10843 kill_one_lwp_callback, but use my_waitpid directly.
10844 (kill_one_lwp_callback, linux_kill): Use it.
10845
10846 2014-06-23 Pedro Alves <palves@redhat.com>
10847
10848 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
10849 before setting DR0..DR3.
10850
10851 2014-06-20 Gary Benson <gbenson@redhat.com>
10852
10853 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
10854 * configure: Regenerated.
10855 * config.in: Likewise.
10856
10857 2014-06-20 Gary Benson <gbenson@redhat.com>
10858
10859 * Makefile.in (SFILES): Update locations for files moved
10860 from common to nat.
10861 (object file files): Reordered.
10862
10863 2014-06-20 Gary Benson <gbenson@redhat.com>
10864
10865 * i386-low.h (i386_dr_low_can_set_addr): Removed.
10866 (i386_dr_low_set_addr): Likewise.
10867 (i386_dr_low_get_addr): Likewise.
10868 (i386_dr_low_can_set_control): Likewise.
10869 (i386_dr_low_set_control): Likewise.
10870 (i386_dr_low_get_control): Likewise.
10871 (i386_dr_low_get_status): Likewise.
10872 (i386_get_debug_register_length): Likewise.
10873 * linux-x86-low.c (i386_dr_low_set_addr):
10874 Changed signature. Made static.
10875 (i386_dr_low_get_addr): Likewise.
10876 (i386_dr_low_set_control): Likewise.
10877 (i386_dr_low_get_control): Likewise.
10878 (i386_dr_low_get_status): Likewise.
10879 (i386_dr_low): New global variable.
10880 * win32-i386-low.c (i386_dr_low_set_addr):
10881 Changed signature. Made static.
10882 (i386_dr_low_get_addr): Likewise.
10883 (i386_dr_low_set_control): Likewise.
10884 (i386_dr_low_get_control): Likewise.
10885 (i386_dr_low_get_status): Likewise.
10886 (i386_dr_low): New global variable.
10887
10888 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
10889
10890 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
10891 * Makefile.in (AR, AR_FLAGS): Define.
10892 * configure: Regenerate.
10893
10894 2014-06-19 Gary Benson <gbenson@redhat.com>
10895
10896 * Makefile.in (i386-dregs.o): New rule.
10897 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
10898 * i386-low.c (target.h): Remove include.
10899 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
10900 (DR_CONTROL_SHIFT): Likewise.
10901 (DR_CONTROL_SIZE): Likewise.
10902 (DR_RW_EXECUTE): Likewise.
10903 (DR_RW_WRITE): Likewise.
10904 (DR_RW_READ): Likewise.
10905 (DR_RW_IORW): Likewise.
10906 (DR_LEN_1): Likewise.
10907 (DR_LEN_2): Likewise.
10908 (DR_LEN_4): Likewise.
10909 (DR_LEN_8): Likewise.
10910 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10911 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10912 (DR_ENABLE_SIZE): Likewise.
10913 (DR_LOCAL_SLOWDOWN): Likewise.
10914 (DR_GLOBAL_SLOWDOWN): Likewise.
10915 (DR_CONTROL_RESERVED): Likewise.
10916 (I386_DR_CONTROL_MASK): Likewise.
10917 (I386_DR_VACANT): Likewise.
10918 (I386_DR_LOCAL_ENABLE): Likewise.
10919 (I386_DR_GLOBAL_ENABLE): Likewise.
10920 (I386_DR_DISABLE): Likewise.
10921 (I386_DR_SET_RW_LEN): Likewise.
10922 (I386_DR_GET_RW_LEN): Likewise.
10923 (I386_DR_WATCH_HIT): Likewise.
10924 (i386_wp_op_t): Likewise.
10925 (i386_show_dr): Likewise.
10926 (i386_length_and_rw_bits): Likewise.
10927 (i386_insert_aligned_watchpoint): Likewise.
10928 (i386_remove_aligned_watchpoint): Likewise.
10929 (i386_handle_nonaligned_watchpoint): Likewise.
10930 i386_update_inferior_debug_regs(): Likewise.
10931 (i386_dr_insert_watchpoint): Likewise.
10932 (i386_dr_remove_watchpoint): Likewise.
10933 (i386_dr_region_ok_for_watchpoint): Likewise.
10934 (i386_dr_stopped_data_address): Likewise.
10935 (i386_dr_stopped_by_watchpoint): Likewise.
10936
10937 2014-06-19 Gary Benson <gbenson@redhat.com>
10938
10939 * i386-low.c (i386_dr_show): Renamed to
10940 i386_show_dr and made static. All uses updated.
10941 (i386_dr_length_and_rw_bits): Renamed to
10942 i386_length_and_rw_bits and made static.
10943 All uses updated.
10944 (i386_dr_insert_aligned_watchpoint): Renamed to
10945 i386_insert_aligned_watchpoint and made static.
10946 All uses updated.
10947 (i386_dr_remove_aligned_watchpoint): Renamed to
10948 i386_remove_aligned_watchpoint and made static.
10949 All uses updated.
10950 (i386_dr_update_inferior_debug_regs): Renamed to
10951 i386_update_inferior_debug_regs and made static.
10952 All uses updated.
10953
10954 2014-06-18 Gary Benson <gbenson@redhat.com>
10955
10956 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10957 (i386_dr_low_can_set_control): Likewise.
10958 (i386_get_debug_register_length): Likewise.
10959 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10960 (i386_dr_low_can_set_control): Likewise.
10961 (i386_get_debug_register_length): Likewise.
10962
10963 2014-06-17 Gary Benson <gbenson@redhat.com>
10964
10965 * i386-low.h (i386-dregs.h): New include.
10966 (DR_FIRSTADDR): Now in i386-dregs.h.
10967 (DR_LASTADDR): Likewise.
10968 (DR_NADDR): Likewise.
10969 (DR_STATUS): Likewise.
10970 (DR_CONTROL): Likewise.
10971 (i386_debug_reg_state): Likewise.
10972 (i386_dr_insert_watchpoint): Likewise.
10973 (i386_dr_remove_watchpoint): Likewise.
10974 (i386_dr_region_ok_for_watchpoint): Likewise.
10975 (i386_dr_stopped_data_address): Likewise.
10976 (i386_dr_stopped_by_watchpoint): Likewise.
10977 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10978
10979 2014-06-18 Gary Benson <gbenson@redhat.com>
10980
10981 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10982 i386_dr_insert_watchpoint.
10983 (i386_low_remove_watchpoint): Renamed to
10984 i386_dr_remove_watchpoint.
10985 (i386_low_region_ok_for_watchpoint): Renamed to
10986 i386_dr_region_ok_for_watchpoint.
10987 (i386_low_stopped_data_address): Renamed to
10988 i386_dr_stopped_data_address.
10989 (i386_low_stopped_by_watchpoint): Renamed to
10990 i386_dr_stopped_by_watchpoint.
10991 * i386-low.c (i386_show_dr): Renamed to
10992 i386_dr_show and made nonstatic. All uses updated.
10993 (i386_length_and_rw_bits): Renamed to
10994 i386_dr_length_and_rw_bits and made nonstatic.
10995 All uses updated.
10996 (i386_insert_aligned_watchpoint): Renamed to
10997 i386_dr_insert_aligned_watchpoint and made nonstatic.
10998 All uses updated.
10999 (i386_remove_aligned_watchpoint): Renamed to
11000 i386_dr_remove_aligned_watchpoint and made nonstatic.
11001 All uses updated.
11002 (i386_update_inferior_debug_regs): Renamed to
11003 i386_dr_update_inferior_debug_regs and made nonstatic.
11004 All uses updated.
11005 (i386_low_insert_watchpoint): Renamed to
11006 i386_dr_insert_watchpoint. All uses updated.
11007 (i386_low_remove_watchpoint): Renamed to
11008 i386_dr_remove_watchpoint. All uses updated.
11009 (i386_low_region_ok_for_watchpoint): Renamed to
11010 i386_dr_region_ok_for_watchpoint. All uses updated.
11011 (i386_low_stopped_data_address): Renamed to
11012 i386_dr_stopped_data_address. All uses updated.
11013 (i386_low_stopped_by_watchpoint): Renamed to
11014 i386_dr_stopped_by_watchpoint. All uses updated.
11015
11016 2014-06-18 Gary Benson <gbenson@redhat.com>
11017
11018 * i386-low.c (i386_dr_low_can_set_addr): New macro.
11019 (i386_dr_low_can_set_control): Likewise.
11020 (i386_insert_aligned_watchpoint): New check.
11021
11022 2014-06-18 Gary Benson <gbenson@redhat.com>
11023
11024 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
11025 Renamed to state.
11026
11027 2014-06-18 Gary Benson <gbenson@redhat.com>
11028
11029 * i386-low.c (i386_length_and_rw_bits): Use internal_error
11030 instead of fatal and error.
11031 (i386_handle_nonaligned_watchpoint): Likewise.
11032
11033 2014-06-18 Gary Benson <gbenson@redhat.com>
11034
11035 * i386-low.c (i386_get_debug_register_length): New macro.
11036 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
11037 (i386_show_dr): Use debug_printf instead of fprintf. Use
11038 phex to format values.
11039
11040 2014-06-18 Gary Benson <gbenson@redhat.com>
11041
11042 * i386-low.h: Comment changes.
11043 * i386-low.c: Likewise.
11044
11045 2014-06-18 Gary Benson <gbenson@redhat.com>
11046
11047 * i386-low.c: Whitespace changes.
11048
11049 2014-06-12 Tom Tromey <tromey@redhat.com>
11050
11051 * utils.c (freeargv): Remove.
11052
11053 2014-06-12 Tom Tromey <tromey@redhat.com>
11054
11055 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
11056 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
11057 (parse_debug_format_options): Likewise.
11058 (gdbserver_usage): Likewise.
11059 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
11060 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
11061 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
11062 against libiberty.
11063 ($(LIBGNU)): Depend on libiberty.
11064 (all-lib): Recurse into all subdirs.
11065 (install-only): Invoke "install" target in subdirs.
11066 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
11067 targets.
11068 * configure: Rebuild.
11069 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
11070 for vasprintf, vsnprintf, or gettimeofday.
11071 * configure.srv: Don't add safe-ctype.o or lbasename.o to
11072 srv_tgtobj.
11073
11074 2014-06-05 Joel Brobecker <brobecker@adacore.com>
11075
11076 * development.sh: Delete.
11077 * Makefile.in (config.status): Adjust dependency on development.sh.
11078 * configure.ac: Adjust development.sh source call.
11079 * configure: Regenerate.
11080
11081 2014-06-02 Pedro Alves <palves@redhat.com>
11082
11083 * ax.c (gdb_free_agent_expr): New function.
11084 * ax.h (gdb_free_agent_expr): New declaration.
11085 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
11086 list.
11087 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
11088 static.
11089 (clear_breakpoint_conditions_and_commands): New function.
11090 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
11091 (clear_breakpoint_conditions_and_commands): New declaration.
11092
11093 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11094
11095 * linux-aarch64-low.c (asm/ptrace.h): Include.
11096
11097 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11098
11099 Fix TLS access for -static -pthread.
11100 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
11101 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
11102 (thread_db_load_search, try_thread_db_load_1): Initialize it.
11103
11104 2014-05-20 Pedro Alves <palves@redhat.com>
11105
11106 * linux-aarch64-low.c (aarch64_insert_point)
11107 (aarch64_remove_point): No longer check whether the type is
11108 supported here. Adjust to new interface.
11109 (the_low_target): Install aarch64_supports_z_point_type as
11110 supports_z_point_type method.
11111 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
11112 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
11113 instead of a Z packet char. Adjust.
11114 (arm_supports_z_point_type): New function.
11115 (arm_insert_point, arm_remove_point): Adjust to new interface.
11116 (the_low_target): Install arm_supports_z_point_type.
11117 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
11118 (cris_insert_point, cris_remove_point): Adjust to new interface.
11119 Don't check whether the type is supported here.
11120 (the_low_target): Install cris_supports_z_point_type.
11121 * linux-low.c (linux_supports_z_point_type): New function.
11122 (linux_insert_point, linux_remove_point): Adjust to new interface.
11123 * linux-low.h (struct linux_target_ops) <insert_point,
11124 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
11125 raw_breakpoint pointer parameter.
11126 <supports_z_point_type>: New method.
11127 * linux-mips-low.c (mips_supports_z_point_type): New function.
11128 (mips_insert_point, mips_remove_point): Adjust to new interface.
11129 Use mips_supports_z_point_type.
11130 (the_low_target): Install mips_supports_z_point_type.
11131 * linux-ppc-low.c (the_low_target): Install NULL as
11132 supports_z_point_type method.
11133 * linux-s390-low.c (the_low_target): Install NULL as
11134 supports_z_point_type method.
11135 * linux-sparc-low.c (the_low_target): Install NULL as
11136 supports_z_point_type method.
11137 * linux-x86-low.c (x86_supports_z_point_type): New function.
11138 (x86_insert_point): Adjust to new insert_point interface. Use
11139 insert_memory_breakpoint. Adjust to new
11140 i386_low_insert_watchpoint interface.
11141 (x86_remove_point): Adjust to remove_point interface. Use
11142 remove_memory_breakpoint. Adjust to new
11143 i386_low_remove_watchpoint interface.
11144 (the_low_target): Install x86_supports_z_point_type.
11145 * lynx-low.c (lynx_target_ops): Install NULL as
11146 supports_z_point_type callback.
11147 * nto-low.c (nto_supports_z_point_type): New.
11148 (nto_insert_point, nto_remove_point): Adjust to new interface.
11149 (nto_target_ops): Install nto_supports_z_point_type.
11150 * mem-break.c: Adjust intro comment.
11151 (struct raw_breakpoint) <raw_type, size>: New fields.
11152 <inserted>: Update comment.
11153 <shlib_disabled>: Delete field.
11154 (enum bkpt_type) <gdb_breakpoint>: Delete value.
11155 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
11156 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
11157 (raw_bkpt_type_to_target_hw_bp_type): New function.
11158 (find_enabled_raw_code_breakpoint_at): New function.
11159 (find_raw_breakpoint_at): New type and size parameters. Use them.
11160 (insert_memory_breakpoint): New function, based off
11161 set_raw_breakpoint_at.
11162 (remove_memory_breakpoint): New function.
11163 (set_raw_breakpoint_at): Reimplement.
11164 (set_breakpoint): New, based on set_breakpoint_at.
11165 (set_breakpoint_at): Reimplement.
11166 (delete_raw_breakpoint): Go through the_target->remove_point
11167 instead of assuming memory breakpoints.
11168 (find_gdb_breakpoint_at): Delete.
11169 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
11170 (find_gdb_breakpoint): New function.
11171 (set_gdb_breakpoint_at): Delete.
11172 (z_type_supported): New function.
11173 (set_gdb_breakpoint_1): New function, loosely based off
11174 set_gdb_breakpoint_at.
11175 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
11176 (delete_gdb_breakpoint_at): Delete.
11177 (delete_gdb_breakpoint_1): New function, loosely based off
11178 delete_gdb_breakpoint_at.
11179 (delete_gdb_breakpoint): New function.
11180 (clear_gdb_breakpoint_conditions): Rename to ...
11181 (clear_breakpoint_conditions): ... this. Don't handle a NULL
11182 breakpoint.
11183 (add_condition_to_breakpoint): Make static.
11184 (add_breakpoint_condition): Take a struct breakpoint pointer
11185 instead of an address. Adjust.
11186 (gdb_condition_true_at_breakpoint): Rename to ...
11187 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
11188 z_type parameter.
11189 (gdb_condition_true_at_breakpoint): Reimplement.
11190 (add_breakpoint_commands): Take a struct breakpoint pointer
11191 instead of an address. Adjust.
11192 (gdb_no_commands_at_breakpoint): Rename to ...
11193 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
11194 parameter. Return true if no breakpoint was found. Change debug
11195 output.
11196 (gdb_no_commands_at_breakpoint): Reimplement.
11197 (run_breakpoint_commands): Rename to ...
11198 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
11199 and change return type to boolean.
11200 (run_breakpoint_commands): New function.
11201 (gdb_breakpoint_here): Also check for Z1 breakpoints.
11202 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
11203 breakpoint. Go through the_target->remove_point instead of
11204 assuming memory breakpoint.
11205 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
11206 software and hardware breakpoints.
11207 (reinsert_raw_breakpoint): Go through the_target->insert_point
11208 instead of assuming memory breakpoint.
11209 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
11210 software and hardware breakpoints.
11211 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
11212 Check both software and hardware breakpoints.
11213 (validate_inserted_breakpoint): Assert the breakpoint is a
11214 software breakpoint. Set the inserted flag to -1 instead of
11215 setting shlib_disabled.
11216 (delete_disabled_breakpoints): Adjust.
11217 (validate_breakpoints): Only validate software breakpoints.
11218 Adjust to inserted flag change.
11219 (check_mem_read, check_mem_write): Skip breakpoint types other
11220 than software breakpoints. Adjust to inserted flag change.
11221 * mem-break.h (enum raw_bkpt_type): New enum.
11222 (raw_breakpoint, struct process_info): Forward declare.
11223 (Z_packet_to_target_hw_bp_type): Delete declaration.
11224 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
11225 (set_gdb_breakpoint, delete_gdb_breakpoint)
11226 (clear_breakpoint_conditions): New declarations.
11227 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
11228 (breakpoint_inserted_here): Update comment.
11229 (add_breakpoint_condition, add_breakpoint_commands): Replace
11230 address parameter with a breakpoint pointer parameter.
11231 (gdb_breakpoint_here): Update comment.
11232 (delete_gdb_breakpoint_at): Delete.
11233 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
11234 * server.c (process_point_options): Take a struct breakpoint
11235 pointer instead of an address. Adjust.
11236 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
11237 delete_gdb_breakpoint.
11238 * spu-low.c (spu_target_ops): Install NULL as
11239 supports_z_point_type method.
11240 * target.h: Include mem-break.h.
11241 (struct target_ops) <prepare_to_access_memory>: Update comment.
11242 <supports_z_point_type>: New field.
11243 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11244 instead of a char. Also take a raw breakpoint pointer.
11245 * win32-arm-low.c (the_low_target): Install NULL as
11246 supports_z_point_type.
11247 * win32-i386-low.c (i386_supports_z_point_type): New function.
11248 (i386_insert_point, i386_remove_point): Adjust to new interface.
11249 (the_low_target): Install i386_supports_z_point_type.
11250 * win32-low.c (win32_supports_z_point_type): New function.
11251 (win32_insert_point, win32_remove_point): Adjust to new interface.
11252 (win32_target_ops): Install win32_supports_z_point_type.
11253 * win32-low.h (struct win32_target_ops):
11254 <supports_z_point_type>: New method.
11255 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
11256 instead of a char. Also take a raw breakpoint pointer.
11257
11258 2014-05-20 Pedro Alves <palves@redhat.com>
11259
11260 * mem-break.h: Include break-common.h.
11261 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11262 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
11263 (Z_packet_to_target_hw_bp_type): New declaration.
11264 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
11265 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
11266 (Z_PACKET_ACCESS_WP): Delete macros.
11267 (Z_packet_to_hw_type): Delete function.
11268 * i386-low.h: Don't include break-common.h here.
11269 (Z_packet_to_hw_type): Delete declaration.
11270 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
11271 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11272 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
11273 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
11274 * linux-aarch64-low.c: Don't include break-common.h here.
11275 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
11276 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
11277 (Z_packet_to_target_hw_bp_type): Delete function.
11278 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
11279 function.
11280 (mips_insert_point, mips_remove_point): Use
11281 Z_packet_to_target_hw_bp_type.
11282
11283 2014-05-20 Pedro Alves <palves@redhat.com>
11284
11285 * linux-aarch64-low.c: Include break-common.h.
11286 (enum target_point_type): Delete.
11287 (Z_packet_to_point_type): Rename to ...
11288 (Z_packet_to_target_hw_bp_type): ... this, and return a
11289 target_hw_bp_type instead.
11290 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
11291 instead of an enum target_point_type.
11292 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
11293 breakpoint type.
11294 (aarch64_dr_state_insert_one_point)
11295 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
11296 (aarch64_handle_aligned_watchpoint)
11297 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
11298 Take an enum target_hw_bp_type instead of an enum
11299 target_point_type.
11300 (aarch64_supports_z_point_type): New function.
11301 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
11302 use Z_packet_to_target_hw_bp_type.
11303
11304 2014-05-20 Joel Brobecker <brobecker@adacore.com>
11305
11306 * configure.ac: Only use -Werror by default when DEVELOPMENT
11307 is true.
11308 * configure: Regenerate.
11309
11310 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
11311
11312 Fix gdbserver qGetTLSAddr for x86_64 -m32.
11313 * linux-x86-low.c (X86_64_USER_REGS): New.
11314 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
11315
11316 2014-04-28 Yao Qi <yao@codesourcery.com>
11317
11318 * Makefile.in (i386-avx512.c): Fix the typo of generated file
11319 name.
11320
11321 2014-04-25 Pedro Alves <palves@redhat.com>
11322
11323 PR server/16255
11324 * linux-low.c (linux_attach_fail_reason_string): New function.
11325 (linux_attach_lwp): Delete.
11326 (linux_attach_lwp_1): Rename to ...
11327 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
11328 argument. Remove "initial" parameter. Return int instead of
11329 void. Don't error or warn here.
11330 (linux_attach): Adjust to call linux_attach_lwp. Call error on
11331 failure to attach to the tgid. Call warning when failing to
11332 attach to an lwp.
11333 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
11334 argument. Remove "initial" parameter. Return int instead of
11335 void. Don't error or warn here.
11336 (linux_attach_fail_reason_string): New declaration.
11337 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
11338 interface change. Use linux_attach_fail_reason_string.
11339
11340 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
11341 Walfred Tedeschi <walfred.tedeschi@intel.com>
11342
11343 * Makefile.in: Added rules to handle new files
11344 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
11345 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
11346 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
11347 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
11348 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
11349 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
11350 x32-avx512-linux.o.
11351 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
11352 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
11353 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
11354 i386/x32-avx512.xml.
11355 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
11356 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
11357 i386/x32-avx512-linux.xml.
11358 * i387-fp.c (num_avx512_k_registers): New constant for number
11359 of K registers.
11360 (num_avx512_zmmh_low_registers): New constant for number of
11361 lower ZMM registers (0-15).
11362 (num_avx512_zmmh_high_registers): New constant for number of
11363 higher ZMM registers (16-31).
11364 (num_avx512_ymmh_registers): New contant for number of higher
11365 YMM registers (ymm16-31 added by avx521 on x86_64).
11366 (num_avx512_xmm_registers): New constant for number of higher
11367 XMM registers (xmm16-31 added by AVX512 on x86_64).
11368 (struct i387_xsave): Add space for AVX512 registers.
11369 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
11370 Add code to handle AVX512 registers.
11371 (i387_xsave_to_cache): Add code to handle AVX512 registers.
11372 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
11373 prototypei from generated file.
11374 (tdesc_amd64_avx512_linux): Likewise.
11375 (init_registers_x32_avx512_linux): Likewise.
11376 (tdesc_x32_avx512_linux): Likewise.
11377 (init_registers_i386_avx512_linux): Likewise.
11378 (tdesc_i386_avx512_linux): Likewise.
11379 (x86_64_regmap): Add AVX512 registers.
11380 (x86_linux_read_description): Add code to handle AVX512 XSTATE
11381 mask.
11382 (initialize_low_arch): Add code to initialize AVX512 registers.
11383
11384 2014-04-23 Pedro Alves <palves@redhat.com>
11385
11386 * mem-break.c (find_gdb_breakpoint_at): Make static.
11387 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
11388
11389 2014-04-23 Pedro Alves <palves@redhat.com>
11390
11391 * i386-low.c: Don't include break-common.h here.
11392 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11393 prototype to take target_hw_bp_type as argument instead of a Z
11394 packet char.
11395 * i386-low.h: Include break-common.h here.
11396 (Z_packet_to_hw_type): Declare.
11397 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
11398 prototypes.
11399 * linux-x86-low.c (x86_insert_point): Convert the packet number to
11400 a target_hw_bp_type before calling i386_low_insert_watchpoint.
11401 (x86_remove_point): Convert the packet number to a
11402 target_hw_bp_type before calling i386_low_remove_watchpoint.
11403 * win32-i386-low.c (i386_insert_point): Convert the packet number
11404 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
11405 (i386_remove_point): Convert the packet number to a
11406 target_hw_bp_type before calling i386_low_remove_watchpoint.
11407
11408 2014-04-23 Pedro Alves <palves@redhat.com>
11409
11410 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
11411
11412 2014-04-10 Pedro Alves <palves@redhat.com>
11413
11414 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11415 Check if the condition or command is NULL before checking if the
11416 breakpoint is known. On success, return true.
11417 * mem-break.h (add_breakpoint_condition): Document return.
11418 (add_breakpoint_commands): Add describing comment.
11419 * server.c (skip_to_semicolon): New function.
11420 (process_point_options): Use it.
11421
11422 2014-04-09 Pedro Alves <palves@redhat.com>
11423
11424 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
11425 to lwpid_of.
11426
11427 2014-02-27 Pedro Alves <palves@redhat.com>
11428
11429 PR 12702
11430 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
11431 macros.
11432 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
11433 output.
11434 (last_thread_of_process_p): Take a PID argument instead of a
11435 thread pointer.
11436 (linux_wait_for_lwp): Delete.
11437 (num_lwps, check_zombie_leaders, not_stopped_callback): New
11438 functions.
11439 (linux_low_filter_event): New function, party factored out from
11440 linux_wait_for_event.
11441 (linux_wait_for_event): Rename to ...
11442 (linux_wait_for_event_filtered): ... this. Add new filter ptid
11443 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
11444 sigsuspend. Check for zombie leaders.
11445 (linux_wait_for_event): Reimplement as wrapper around
11446 linux_wait_for_event_filtered.
11447 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
11448 a normal or signal exit is seen, it's the whole process exiting.
11449 (wait_for_sigstop): No longer a for_each_inferior callback.
11450 Rewrite on top of linux_wait_for_event_filtered.
11451 (stop_all_lwps): Call wait_for_sigstop directly.
11452 * server.c (resume, handle_target_event): Handle
11453 TARGET_WAITKIND_NO_RESUMED.
11454
11455 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11456
11457 * win32-low.c (psapi_get_dll_name,
11458 * win32_CreateToolhelp32Snapshot): Delete.
11459 (win32_CreateToolhelp32Snapshot, win32_Module32First)
11460 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
11461 Delete.
11462 (handle_load_dll): Add function description.
11463 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
11464
11465 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11466
11467 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
11468 Add comment.
11469 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
11470 base address when calling win32_add_one_solib.
11471 (handle_load_dll): Delete local variable load_addr.
11472 Remove 0x1000 offset applied to DLL base address when calling
11473 win32_add_one_solib.
11474 (handle_unload_dll): Add comment.
11475
11476 2014-02-26 Joel Brobecker <brobecker@adacore.com>
11477
11478 * win32-low.c (win32_add_all_dlls): Renames
11479 win32_ensure_ntdll_loaded. Rewrite function documentation.
11480 Adjust implementation to always load all DLLs.
11481 Add 0x1000 offset to DLL base address when calling
11482 win32_add_one_solib.
11483 (child_initialization_done): New static global.
11484 (do_initial_child_stuff): Set child_initialization_done to
11485 zero during child initialization, and 1 after. Replace call
11486 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
11487 Add comment.
11488 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
11489 (handle_unload_dll): Add function documentation.
11490 (get_child_debug_event): Ignore load and unload DLL events
11491 during child initialization.
11492
11493 2014-02-20 Doug Evans <dje@google.com>
11494
11495 Remove global all_lwps.
11496 * inferiors.h (ptid_of): Move here from linux-low.h.
11497 (pid_of, lwpid_of): Ditto.
11498 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
11499 parameter is a struct thread_info * now.
11500 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
11501 directly. Pass &all_threads to find_inferior instead of &all_lwps.
11502 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
11503 directly.
11504 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
11505 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
11506 * linux-arm-low.c (update_registers_callback): Update, "entry"
11507 parameter is a struct thread_info * now.
11508 Fetch lwpid from current_inferior directly.
11509 (arm_insert_point): Pass &all_threads to find_inferior instead of
11510 &all_lwps.
11511 (arm_remove_point): Ditto.
11512 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
11513 (arm_prepare_to_resume): Fetch pid from thread.
11514 (arm_read_description): Fetch lwpid from current_inferior directly.
11515 * linux-low.c (all_lwps): Delete.
11516 (delete_lwp): Delete call to remove_inferior.
11517 (handle_extended_wait): Fetch lwpid from thread.
11518 (add_lwp): Don't set lwp->entry.id. Remove call to
11519 add_inferior_to_list.
11520 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
11521 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
11522 (kill_one_lwp_callback): Ditto.
11523 (linux_kill): Don't dereference NULL pointer.
11524 Fetch ptid,lwpid from thread.
11525 (get_detach_signal): Fetch ptid from thread.
11526 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
11527 Simplify call to regcache_invalidate_thread.
11528 (delete_lwp_callback): Update, "entry" parameter is a
11529 struct thread_info * now. Fetch pid from thread.
11530 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
11531 (status_pending_p_callback): Update, "entry" parameter is a
11532 struct thread_info * now. Fetch ptid from thread.
11533 (find_lwp_pid): Update, "entry" parameter is a
11534 struct thread_info * now.
11535 (linux_wait_for_lwp): Fetch pid from thread.
11536 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
11537 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
11538 (enqueue_one_deferred_signal): Fetch lwpid from thread.
11539 (dequeue_one_deferred_signal): Ditto.
11540 (cancel_breakpoint): Fetch ptid from current_inferior.
11541 (linux_wait_for_event): Pass &all_threads to find_inferior,
11542 not &all_lwps. Fetch ptid, lwpid from thread.
11543 (count_events_callback): Update, "entry" parameter is a
11544 struct thread_info * now.
11545 (select_singlestep_lwp_callback): Ditto.
11546 (select_event_lwp_callback): Ditto.
11547 (cancel_breakpoints_callback): Ditto.
11548 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
11549 not &all_lwps.
11550 (select_event_lwp): Ditto. Fetch ptid from event_thread.
11551 (unsuspend_one_lwp): Update, "entry" parameter is a
11552 struct thread_info * now.
11553 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
11554 not &all_lwps.
11555 (linux_stabilize_threads): Ditto. And for for_each_inferior.
11556 Fetch lwpid from thread, not lwp.
11557 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
11558 Pass &all_threads to find_inferior, not &all_lwps.
11559 (send_sigstop): Fetch lwpid from thread, not lwp.
11560 (send_sigstop_callback): Update, "entry" parameter is a
11561 struct thread_info * now.
11562 (suspend_and_send_sigstop_callback): Ditto.
11563 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
11564 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
11565 struct thread_info * now.
11566 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
11567 from thread, lwp.
11568 (lwp_running): Update, "entry" parameter is a
11569 struct thread_info * now.
11570 (stop_all_lwps): Fetch ptid from thread.
11571 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
11572 (linux_resume_one_lwp): Fetch lwpid from thread.
11573 (linux_set_resume_request): Update, "entry" parameter is a
11574 struct thread_info * now. Fetch pid, lwpid from thread.
11575 (resume_status_pending_p): Update, "entry" parameter is a
11576 struct thread_info * now.
11577 (need_step_over_p): Ditto. Fetch lwpid from thread.
11578 (start_step_over): Fetch lwpid from thread.
11579 (linux_resume_one_thread): Update, "entry" parameter is a
11580 struct thread_info * now. Fetch lwpid from thread.
11581 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
11582 (proceed_one_lwp): Update, "entry" parameter is a
11583 struct thread_info * now. Fetch lwpid from thread.
11584 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
11585 struct thread_info * now.
11586 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
11587 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
11588 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
11589 directly.
11590 (regsets_store_inferior_registers): Ditto.
11591 (fetch_register, store_register): Ditto.
11592 (linux_read_memory, linux_write_memory): Ditto.
11593 (linux_request_interrupt): Ditto.
11594 (linux_read_auxv): Ditto.
11595 (linux_xfer_siginfo): Ditto.
11596 (linux_qxfer_spu): Ditto.
11597 (linux_qxfer_libraries_svr4): Ditto.
11598 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
11599 moved to inferiors.h.
11600 (get_lwp): Delete.
11601 (get_thread_lwp): Update.
11602 (struct lwp_info): Delete member "entry". Simplify comment for
11603 member "thread".
11604 (all_lwps): Delete.
11605 * linux-mips-low.c (mips_read_description): Fetch lwpid from
11606 current_inferior directly.
11607 (update_watch_registers_callback): Update, "entry" parameter is a
11608 struct thread_info * now. Fetch pid from thread.
11609 (mips_linux_prepare_to_resume): Fetch ptid from thread.
11610 (mips_insert_point): Fetch lwpid from current_inferior.
11611 Pass &all_threads to find_inferior, not &all_lwps.
11612 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
11613 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
11614 directly.
11615 (mips_stopped_data_address): Ditto.
11616 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
11617 directly.
11618 * linux-tile-low.c (tile_arch_setup): Ditto.
11619 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
11620 (update_debug_registers_callback): Update, "entry" parameter is a
11621 struct thread_info * now. Fetch pid from thread.
11622 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
11623 Pass &all_threads to find_inferior, not &all_lwps.
11624 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
11625 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
11626 Pass &all_threads to find_inferior, not &all_lwps.
11627 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
11628 (i386_dr_low_get_status): Ditto.
11629 (x86_linux_prepare_to_resume): Fetch ptid from thread.
11630 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
11631 (x86_linux_read_description): Ditto.
11632 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
11633
11634 2014-02-20 Doug Evans <dje@google.com>
11635
11636 * inferiors.c (get_first_inferior): Fix buglet.
11637
11638 2014-02-19 Doug Evans <dje@google.com>
11639
11640 * gdbthread.h (add_thread): Change result type to struct thread_info *.
11641 * inferiors.c (add_thread): Change result type to struct thread_info *.
11642 All callers updated.
11643 (add_lwp): Call add_thread here instead of in callers.
11644 All callers updated.
11645 * linux-low.h (get_lwp_thread): Rewrite.
11646 (struct lwp_info): New member "thread".
11647
11648 2014-02-19 Doug Evans <dje@google.com>
11649
11650 * linux-low.c (add_lwp): Change result to struct lwp_info *.
11651 All callers updated.
11652
11653 2014-02-19 Doug Evans <dje@google.com>
11654
11655 * inferiors.c (add_thread): Fix whitespace.
11656
11657 2014-02-19 Doug Evans <dje@google.com>
11658
11659 * dll.c (clear_dlls): Replace accessing list implemention details
11660 with API function.
11661 * gdbthread.h (get_first_thread): Declare.
11662 * inferiors.c (for_each_inferior_with_data): New function.
11663 (get_first_thread): New function.
11664 (find_thread_ptid): Simplify.
11665 (get_first_inferior): New function.
11666 (clear_list): Delete.
11667 (one_inferior_p): New function.
11668 (clear_inferior_list): New function.
11669 (clear_inferiors): Update.
11670 * inferiors.h (for_each_inferior_with_data): Declare.
11671 (clear_inferior_list): Declare.
11672 (one_inferior_p): Declare.
11673 (get_first_inferior): Declare.
11674 * linux-low.c (linux_wait_for_event): Replace accessing list
11675 implemention details with API function.
11676 * server.c (target_running): Ditto.
11677 (accumulate_file_name_length): New function.
11678 (emit_dll_description): New function.
11679 (handle_qxfer_libraries): Replace accessing list implemention
11680 details with API function.
11681 (handle_qxfer_threads_worker): New function.
11682 (handle_qxfer_threads_proper): Replace accessing list implemention
11683 details with API function.
11684 (handle_query): Ditto.
11685 (visit_actioned_threads_callback_ftype): New typedef.
11686 (visit_actioned_threads_data): New struct.
11687 (visit_actioned_threads): Rewrite to be find_inferior callback.
11688 (resume): Call find_inferior.
11689 (handle_status): Replace accessing list implemention
11690 details with API function.
11691 (process_serial_event): Replace accessing list implemention details
11692 with API function.
11693 * target.c (set_desired_inferior): Replace accessing list implemention
11694 details with API function.
11695 * tracepoint.c (same_process_p): New function.
11696 (gdb_agent_about_to_close): Replace accessing list implemention
11697 details with API function.
11698 * win32-low.c (child_delete_thread): Replace accessing list
11699 implemention details with API function.
11700 (match_dll_by_basename): New function.
11701 (dll_is_loaded_by_basename): New function.
11702 (win32_ensure_ntdll_loaded): Replace accessing list implemention
11703 details call to dll_is_loaded_by_basename.
11704
11705 2014-02-19 Doug Evans <dje@google.com>
11706
11707 * dll.h (struct dll_info): Add comment.
11708 * gdbthread.h (struct thread_info): Add comment.
11709 (current_ptid): Simplify.
11710 * inferiors.c (add_process): Update.
11711 (remove_process): Update.
11712 * inferiors.h (struct process_info): Rename member "head" to "entry".
11713 * linux-low.c (delete_lwp): Update.
11714 (add_lwp): Update.
11715 (last_thread_of_process_p): Update.
11716 (kill_one_lwp_callback, linux_kill): Update.
11717 (status_pending_p_callback): Update.
11718 (wait_for_sigstop): Update. Simplify read of ptid.
11719 (start_step_over): Update.
11720 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
11721 (get_lwp_thread): Update.
11722 (struct lwp_info): Rename member "head" to "entry".
11723 * regcache.h (inferior_list_entry): Delete.
11724 * server.c (kill_inferior_callback): Update.
11725 (detach_or_kill_inferior_callback): Update.
11726 (print_started_pid): Update.
11727 (print_attached_pid): Update.
11728 (process_serial_event): Simplify read of ptid.
11729 * thread-db.c (thread_db_create_event): Update.
11730 (thread_db_get_tls_address): Update.
11731 * win32-low.c (current_inferior_ptid): Simplify.
11732
11733 2014-02-19 Tom Tromey <tromey@redhat.com>
11734
11735 * target.h (struct target_ops) <supports_btrace>: Add target_ops
11736 argument.
11737 (target_supports_btrace): Update.
11738
11739 2014-02-14 Yao Qi <yao@codesourcery.com>
11740
11741 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
11742 (rsp-low-ipa.o): New target.
11743
11744 2014-02-12 Tom Tromey <tromey@redhat.com>
11745
11746 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
11747 convert_ascii_to_int.
11748 * regcache.c (registers_to_string): Likewise.
11749 * remote-utils.c (decode_M_packet): Likewise.
11750 * server.c (process_serial_event): Likewise.
11751
11752 2014-02-12 Tom Tromey <tromey@redhat.com>
11753
11754 * server.c (handle_query, handle_v_run): Use hex2bin, not
11755 unhexify.
11756 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
11757
11758 2014-02-12 Tom Tromey <tromey@redhat.com>
11759
11760 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
11761 convert_int_to_ascii.
11762 * regcache.c (registers_to_string, collect_register_as_string):
11763 Likewise.
11764 * remote-utils.c (look_up_one_symbol, relocate_instruction):
11765 Likewise.
11766 * server.c (process_serial_event): Likewise.
11767 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
11768 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
11769
11770 2014-02-12 Tom Tromey <tromey@redhat.com>
11771
11772 * remote-utils.c (look_up_one_symbol, monitor_output): Use
11773 bin2hex, not hexify.
11774 * tracepoint.c (cmd_qtstatus): Likewise.
11775
11776 2014-02-12 Tom Tromey <tromey@redhat.com>
11777
11778 * remote-utils.c (monitor_output): Pass explicit length to
11779 hexify.
11780
11781 2014-02-12 Tom Tromey <tromey@redhat.com>
11782
11783 * tracepoint.c: Include rsp-low.h.
11784 * server.c: Include rsp-low.h.
11785 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
11786 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
11787 declare.
11788 * remote-utils.c: Include rsp-low.h.
11789 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
11790 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
11791 (convert_int_to_ascii, convert_ascii_to_int): Move to
11792 common/rsp-low.c.
11793 * regcache.c: Include rsp-low.h.
11794 * ax.c: Include rsp-low.h.
11795 * Makefile.in (SFILES): Add common/rsp-low.c.
11796 (OBS): Add rsp-low.o.
11797 (rsp-low.o): New target.
11798
11799 2014-02-12 Tom Tromey <tromey@redhat.com>
11800
11801 * utils.h (pulongest, plongest, phex_nz): Don't declare.
11802 Include print-utils.h.
11803 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
11804 (plongest, thirty_two, phex_nz): Remove.
11805 * Makefile.in (SFILES): Add common/print-utils.c.
11806 (OBS): Add print-utils.o.
11807 (print-utils-ipa.o): New target.
11808 (print-utils.o): New target.
11809 (IPA_OBJS): Add print-utils-ipa.o.
11810
11811 2014-02-06 Tom Tromey <tromey@redhat.com>
11812
11813 * Makefile.in (SFILES): Fix indentation.
11814
11815 2014-02-05 Doug Evans <dje@google.com>
11816
11817 * linux-low.c (linux_wait_for_event): Improve comment.
11818 (linux_wait_1): Keep current_inferior in sync with event_child.
11819
11820 2014-01-22 Doug Evans <dje@google.com>
11821
11822 * gdbthread.h (gdb_id_to_thread): Delete, unused.
11823
11824 2014-01-22 Doug Evans <dje@google.com>
11825
11826 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
11827 * configure: Regenerate.
11828 * config.in: Regenerate.
11829 * Makefile.in (SFILES): Add debug.c.
11830 (OBS): Add debug.o.
11831 * debug.c: New file.
11832 * debug.h: New file.
11833 * linux-aarch64-low.c (*): Update all debugging printfs to use
11834 debug_printf instead of fprintf.
11835 * linux-arm-low.c (*): Ditto.
11836 * linux-cris-low.c (*): Ditto.
11837 * linux-crisv32-low.c (*): Ditto.
11838 * linux-m32r-low.c (*): Ditto.
11839 * linux-sparc-low.c (*): Ditto.
11840 * linux-x86.c (*): Ditto.
11841 * linux-low.c (*): Ditto.
11842 (linux_wait_1): Add calls to debug_enter, debug_exit.
11843 (linux_wait): Remove redundant debugging printf.
11844 (stop_all_lwps): Add calls to debug_enter, debug_exit.
11845 (linux_resume, unstop_all_lwps): Ditto.
11846 * mem-break.c (*): Update all debugging printfs to use
11847 debug_printf instead of fprintf.
11848 * remote-utils.c (*): Ditto.
11849 * thread-db.c (*): Ditto.
11850 * server.c #include <ctype.h>, "gdb_vecs.h".
11851 (debug_threads): Moved to debug.c.
11852 (*): Update all debugging printfs to use debug_printf instead of
11853 fprintf.
11854 (start_inferior): Replace call to fflush with call to debug_flush.
11855 (monitor_show_help): Mention set debug-format.
11856 (parse_debug_format_options): New function.
11857 (handle_monitor_command): Handle "monitor set debug-format".
11858 (gdbserver_usage): Mention --debug-format.
11859 (main): Parse --debug-format.
11860 * server.h (debug_threads): Declaration moved to debug.h.
11861 #include "debug.h".
11862 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
11863 trace_debug_1 that uses debug_printf.
11864 (tracepoint_look_up_symbols): Update all debugging printfs to use
11865 debug_printf instead of fprintf.
11866
11867 2014-01-20 Baruch Siach <baruch@tkos.co.il>
11868
11869 * linux-xtensa-low.c: Include asm/ptrace.h instead of
11870 sys/ptrace.h.
11871
11872 2014-01-17 Pedro Alves <palves@redhat.com>
11873
11874 PR build/16445
11875 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
11876 defined after including gdb_proc_service.h.
11877
11878 2014-01-16 Doug Evans <dje@google.com>
11879
11880 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
11881 (match_dll): Use it.
11882
11883 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
11884
11885 * target.h (target_ops) <read_btrace>: Change parameters and
11886 return type to allow error reporting.
11887 * server.c (handle_qxfer_btrace): Support delta reads. Pass
11888 trace reading errors on.
11889 * linux-low.c (linux_low_read_btrace): Pass trace reading
11890 errors on.
11891 (linux_low_disable_btrace): New.
11892
11893 2014-01-15 Doug Evans <dje@google.com>
11894
11895 * inferiors.c (thread_id_to_gdb_id): Delete.
11896 * inferiors.h (thread_id_to_gdb_id): Delete.
11897
11898 2014-01-13 Eli Zaretskii <eliz@gnu.org>
11899
11900 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
11901 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
11902 versions.
11903
11904 2014-01-08 Pedro Alves <palves@redhat.com>
11905
11906 * server.c (handle_status): Don't discard previous queued stop
11907 replies or thread's pending status here.
11908 (main) <disconnection>: Do it here instead.
11909
11910 2014-01-08 Pedro Alves <palves@redhat.com>
11911
11912 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11913 * server.c (visit_actioned_threads, handle_pending_status): New
11914 function.
11915 (handle_v_cont): Factor out parts to ...
11916 (resume): ... this new function. If in all-stop, and a thread
11917 being resumed has a pending status, report it without actually
11918 resuming.
11919 (myresume): Adjust to use the new 'resume' function.
11920 (clear_pending_status_callback, set_pending_status_callback)
11921 (find_status_pending_thread_callback): New functions.
11922 (handle_status): Handle the case of multiple threads having
11923 interesting statuses to report. Report threads' real last signal
11924 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11925 with an interesting thread to report the status for, instead of
11926 always reporting the status of the first thread.
11927
11928 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11929
11930 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11931 * gdbreplay.c (gdbreplay_version): Likewise.
11932
11933 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11934
11935 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11936 iov.iov_len with the real length in use.
11937
11938 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11939
11940 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11941 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11942 for all targets that use win32-low.c.
11943 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11944 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11945
11946 2013-12-13 Pedro Alves <palves@redhat.com>
11947
11948 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11949 if equal to TARGET_WAITKIND_LOADED.
11950 * win32-low.c (cached_status): New static global.
11951 (win32_wait): Add declaration.
11952 (do_initial_child_stuff): Flush all initial pending debug events
11953 up to the initial breakpoint.
11954 (win32_wait): If CACHED_STATUS was set, return that instead
11955 of doing a real wait. Remove the code resuming the execution
11956 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11957 during the initial phase. Also remove the code changing
11958 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11959 TARGET_WAITKIND_STOPPED.
11960
11961 2013-12-11 Yao Qi <yao@codesourcery.com>
11962
11963 * notif.c (handle_notif_ack): Return 0 if no notification
11964 matches.
11965
11966 2013-11-20 Doug Evans <dje@google.com>
11967
11968 * linux-low.c (linux_set_resume_request): Fix comment.
11969
11970 2013-11-20 Doug Evans <dje@google.com>
11971
11972 * linux-low.c (resume_status_pending_p): Tweak comment.
11973
11974 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11975
11976 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11977 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11978 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11979 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11980 (srv_amd64_regobj): Add amd64-mpx.o.
11981 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11982 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11983 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11984 * i387-fp.c (num_pl_bnd_register) Added constant.
11985 (num_pl_bnd_cfg_registers) Added constant.
11986 (struct i387_xsave) Added reserved area and MPX fields.
11987 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11988 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11989 function.
11990 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11991 (init_registers_amd64_mpx_linux): Declare new function.
11992 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11993 (x86_64_regmap): Add MPX registers.
11994 (x86_linux_read_description): Add MPX case.
11995 (initialize_low_arch): Initialize MPX targets.
11996
11997 2013-11-18 Tom Tromey <tromey@redhat.com>
11998
11999 * configure: Rebuild.
12000 * configure.ac: Don't check for stdlib.h.
12001 * gdbreplay.c: Unconditionally include stdlib.h.
12002
12003 2013-11-18 Tom Tromey <tromey@redhat.com>
12004
12005 * config.in: Rebuild.
12006 * configure: Rebuild.
12007 * configure.ac: Don't use AC_HEADER_DIRENT.
12008
12009 2013-11-18 Tom Tromey <tromey@redhat.com>
12010
12011 * server.h: Don't check HAVE_STRING_H.
12012 * gdbreplay.c: Don't check HAVE_STRING_H.
12013 * configure: Rebuild.
12014
12015 2013-11-18 Tom Tromey <tromey@redhat.com>
12016
12017 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
12018 LIBGNU.
12019
12020 2013-11-08 Tom Tromey <tromey@redhat.com>
12021
12022 * configure, config.in: Rebuild.
12023 * configure.ac: Remove unused configury.
12024
12025 2013-11-08 Tom Tromey <tromey@redhat.com>
12026
12027 * acinclude.m4: Include common.m4, codeset.m4.
12028 * configure, config.in: Rebuild.
12029 * configure.ac: Use GDB_AC_COMMON.
12030
12031 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
12032
12033 * linux-s390-low.c (HWCAP_S390_TE): New define.
12034 (s390_arch_setup): Consider the TE field in the HWCAP for
12035 determining 'have_regset_tdb'.
12036
12037 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
12038
12039 PR gdb/16014
12040 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
12041 call to sizeof.
12042
12043 2013-10-02 Pedro Alves <palves@redhat.com>
12044
12045 * server.c (process_serial_event): Don't output "GDBserver
12046 exiting" if GDB is connected through stdio.
12047 * target.c (mywait): Likewise, be silent if GDB is connected
12048 through stdio.
12049
12050 2013-10-01 Joel Brobecker <brobecker@adacore.com>
12051
12052 * lynx-low.c (lynx_add_threads_after_attach): New function.
12053 (lynx_attach): Remove call to add_thread. Add call to
12054 lynx_add_threads_after_attach instead.
12055
12056 2013-09-28 Mike Frysinger <vapier@gentoo.org>
12057
12058 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
12059 * config.in, configure: Regenerated.
12060
12061 2013-09-18 Yao Qi <yao@codesourcery.com>
12062
12063 PR server/15959
12064 * server.c (start_inferior): Clear 'resume_info'.
12065
12066 2013-09-16 Jiong Wang <jiwang@tilera.com>
12067
12068 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
12069 for each register.
12070
12071 2013-09-16 Jiong Wang <jiwang@tilera.com>
12072
12073 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
12074 linux-tile-low.o to srv_tgtobj.
12075
12076 2013-09-16 Will Newton <will.newton@linaro.org>
12077
12078 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
12079 out regs.
12080
12081 2013-09-06 Pedro Alves <palves@redhat.com>
12082
12083 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
12084 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
12085 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
12086 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
12087 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
12088 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
12089
12090 2013-09-06 Pedro Alves <palves@redhat.com>
12091
12092 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
12093 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
12094
12095 2013-09-06 Pedro Alves <palves@redhat.com>
12096
12097 * linux-amd64-ipa.c: Include tracepoint.h.
12098 * linux-i386-ipa.c: Include tracepoint.h.
12099
12100 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12101
12102 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
12103 (ps_get_thread_area): New function.
12104
12105 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
12106
12107 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
12108 (initialize_low_arch): Call init_registers_crisv32 rather than
12109 init_register_crisv32.
12110
12111 2013-09-05 Pedro Alves <palves@redhat.com>
12112
12113 * server.h (handle_vFile, hostio_last_error_from_errno): Move
12114 to ...
12115 * hostio.h: ... this new file.
12116 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
12117 win32-low.c: Include hostio.h.
12118
12119 2013-09-05 Pedro Alves <palves@redhat.com>
12120
12121 * server.h (gdb_client_data, handler_func, callback_handler_func)
12122 (delete_file_handler, add_file_handler, append_callback_event)
12123 (delete_callback_event, start_event_loop, initialize_event_loop):
12124 Move to event-loop.h and include it.
12125 * event-loop.h: New file.
12126
12127 2013-09-05 Pedro Alves <palves@redhat.com>
12128
12129 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12130 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
12131 (loaded_dll, unloaded_dll): Move to ...
12132 * dll.h: ... this new file.
12133 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
12134
12135 2013-09-05 Pedro Alves <palves@redhat.com>
12136
12137 * server.h (current_process, get_thread_process, all_processes)
12138 (add_inferior_to_list, for_each_inferior, current_inferior)
12139 (remove_inferior, add_process, remove_process, find_process_pid)
12140 (have_started_inferiors_p, have_attached_inferiors_p)
12141 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
12142 (clear_inferiors, find_inferior, find_inferior_id)
12143 (inferior_target_data, set_inferior_target_data)
12144 (inferior_regcache_data, set_inferior_regcache_data): Move to
12145 inferiors.h, and include it.
12146 * inferiors.h: New file.
12147
12148 2013-09-05 Pedro Alves <palves@redhat.com>
12149
12150 * server.h (struct emit_ops, current_insn_ptr, emit_error):
12151 Move ...
12152 * ax.h: ... here.
12153
12154 2013-09-05 Pedro Alves <palves@redhat.com>
12155
12156 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
12157 tracepoint.h.
12158 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
12159 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
12160 (handle_tracepoint_general_set, handle_tracepoint_query)
12161 (tracepoint_finished_step, tracepoint_was_hit)
12162 (release_while_stepping_state_list, current_traceframe)
12163 (in_readonly_region, traceframe_read_mem)
12164 (fetch_traceframe_registers, traceframe_read_sdata)
12165 (traceframe_read_info, struct fast_tpoint_collect_status)
12166 (fast_tracepoint_collecting, force_unlock_trace_buffer)
12167 (handle_tracepoit_bkpts, initialize_low_tracepoint)
12168 (supply_fast_tracepoint_registers)
12169 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
12170 (ipa_tdesc, claim_trampoline_space)
12171 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
12172 (agent_mem_read, agent_get_trace_state_variable_value)
12173 (agent_set_trace_state_variable_value, agent_tsv_read)
12174 (agent_mem_read_string, get_raw_reg_func_addr)
12175 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
12176 * tracepoint.h: ... this new file.
12177
12178 2013-09-05 Pedro Alves <palves@redhat.com>
12179
12180 * server.h (perror_with_name, error, fatal, warning, paddress)
12181 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
12182 include it.
12183 * utils.h: New file.
12184
12185 2013-09-05 Pedro Alves <palves@redhat.com>
12186
12187 * server.h (remote_debug, noack_mode, transport_is_reliable)
12188 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12189 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
12190 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
12191 (write_enn, initialize_async_io, enable_async_io)
12192 (disable_async_io, check_remote_input_interrupt_request)
12193 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
12194 (dead_thread_notify, prepare_resume_reply)
12195 (decode_address_to_semicolon, decode_address, decode_m_packet)
12196 (decode_M_packet, decode_X_packet, decode_xfer_write)
12197 (decode_search_memory_packet, unhexify, hexify)
12198 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
12199 (look_up_one_symbol, relocate_instruction)
12200 (monitor_output): Move to remote-utils.h, and include it.
12201 * remote-utils.h: New file.
12202
12203 2013-09-05 Pedro Alves <palves@redhat.com>
12204
12205 * server.h (_): Delete.
12206
12207 2013-09-02 Pedro Alves <palves@redhat.com>
12208
12209 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
12210 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
12211 allocated.
12212 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
12213
12214 2013-09-02 Pierre Muller <muller@sourceware.org>
12215
12216 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
12217 or WriteProcessMemory complete successfully and handle
12218 ERROR_PARTIAL_COPY error.
12219
12220 2013-09-02 Pedro Alves <palves@redhat.com>
12221
12222 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12223 error instead of EIO.
12224
12225 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12226
12227 PR server/15604
12228 * linux-low.c: Include filestuff.h.
12229 (linux_create_inferior) <pid == 0>: Call close_most_fds.
12230 * lynx-low.c: Include filestuff.h.
12231 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
12232 * server.c: Include filestuff.h.
12233 (main): Call notice_open_fds.
12234 * spu-low.c: Include filestuff.h.
12235 (spu_create_inferior) <pid == 0>: Call close_most_fds.
12236
12237 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
12238
12239 * Makefile.in: Explain why ../target and ../nat are not
12240 listed as include file search paths.
12241 (linux-waitpid.o): New object file rule.
12242 * configure.srv (srv_native_linux_obj): New variable.
12243 Replace all occurrences of linux native object files with
12244 $srv_native_linux_obj.
12245 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
12246 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
12247 (linux_enable_event_reporting): Remove declaration.
12248 (my_waitpid): Moved to common/linux-waitpid.c.
12249 (linux_wait_for_event): Pass ptid when calling
12250 linux_enable_event_reporting.
12251 (linux_supports_tracefork_flag): Remove.
12252 (linux_enable_event_reporting): Likewise.
12253 (linux_tracefork_grandchild): Remove.
12254 (STACK_SIZE): Moved to common/linux-ptrace.c.
12255 (linux_tracefork_child): Remove.
12256 (linux_test_for_tracefork): Remove.
12257 (linux_look_up_symbols): Call linux_supports_traceclone.
12258 (initialize_low): Remove call to linux_test_for_tracefork.
12259 * linux-low.h (PTRACE_TYPE_ARG3): Move to
12260 common/linux-ptrace.h.
12261 (PTRACE_TYPE_ARG4): Likewise.
12262 Include linux-ptrace.h.
12263
12264 2013-08-21 Pedro Alves <palves@redhat.com>
12265
12266 * config.in: Renegerate.
12267
12268 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
12269
12270 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
12271 (SFILES): Remove $(srcdir)/common/target-common.c and
12272 add $(srcdir)/target/waitstatus.c.
12273 (OBS): Remove target-common.o and add waitstatus.o.
12274 (server_h): Remove $(srcdir)/../common/target-common.h and
12275 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
12276 and $(srcdir)/../target/waitstatus.h.
12277 (target-common.o): Remove.
12278 (waitstatus.o): New target object file.
12279 * target.h: Do not include target-common.h and
12280 include target/resume.h, target/wait.h and
12281 target/waitstatus.h.
12282
12283 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
12284
12285 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12286 to PTRACE_TYPE_ARG3.
12287 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
12288 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
12289 PTRACE_TYPE_ARG4.
12290 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
12291 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
12292
12293 2013-07-27 Jie Zhang <jie@codesourcery.com>
12294 Daniel Jacobowitz <dan@codesourcery.com>
12295 Yao Qi <yao@codesourcery.com>
12296
12297 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
12298 (mips-linux-watch.o): New rule.
12299 (mips_linux_watch_h): New variable.
12300 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
12301 srv_tgtobj.
12302 * linux-mips-low.c: Include mips-linux-watch.h.
12303 (struct arch_process_info, struct arch_lwp_info): New.
12304 (update_watch_registers_callback): New function.
12305 (mips_linux_new_process, mips_linux_new_thread) New functions.
12306 (mips_linux_prepare_to_resume, mips_insert_point): New
12307 functions.
12308 (mips_remove_point, mips_stopped_by_watchpoint): New
12309 functions.
12310 (rsp_bp_type_to_target_hw_bp_type): New function.
12311 (mips_stopped_data_address): New function.
12312 (the_low_target): Add watchpoint support functions.
12313
12314 2013-07-27 Yao Qi <yao@codesourcery.com>
12315
12316 * i386-low.c: Include break-common.h.
12317 (enum target_hw_bp_type): Remove.
12318
12319 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
12320
12321 * Makefile.in (SFILES): /common/target-common.c.
12322 (OBS): Add target-common.o.
12323 (server_h): Add $(srcdir)/../common/target-common.h.
12324 (target-common.o): New target.
12325 * server.c (queue_stop_reply_callback): Free
12326 status string after use.
12327 * target.c (target_waitstatus_to_string): Remove.
12328 * target.h: Include target-common.h.
12329 (resume_kind): Likewise.
12330 (target_waitkind): Likewise.
12331 (target_waitstatus): Likewise.
12332 (TARGET_WNOHANG): Likewise.
12333
12334 2013-07-04 Yao Qi <yao@codesourcery.com>
12335
12336 * Makefile.in (host_alias): Use @host_noncanonical@.
12337 (target_alias): Use @target_noncanonical@.
12338 * configure.ac: Use ACX_NONCANONICAL_TARGET and
12339 ACX_NONCANONICAL_HOST.
12340 * configure: Regenerated.
12341
12342 Revert:
12343 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12344
12345 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12346 * configure: Rebuild.
12347 * Makefile.in (version_host, version_target): Get from configure.
12348 (version.c): Use $(version_host) and $(version_target).
12349
12350 2013-07-03 Pedro Alves <palves@redhat.com>
12351
12352 * Makefile.in (config.status): Depend on development.sh.
12353 * acinclude.m4: Include libmcheck.m4.
12354 * configure: Regenerate.
12355
12356 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12357
12358 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
12359 attribute inside the parentheses.
12360 (winapi_DebugSetProcessKillOnExit): Ditto.
12361 (winapi_DebugBreakProcess): Ditto.
12362 (winapi_GenerateConsoleCtrlEvent): Ditto.
12363
12364 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
12365
12366 * notif.h (notif_event): Add a dummy member to avoid compiler
12367 errors.
12368
12369 2013-07-01 Pedro Alves <palves@redhat.com>
12370
12371 * hostio.c (HOSTIO_PATH_MAX): Define.
12372 (require_filename, handle_open, handle_unlink, handle_readlink):
12373 Use it.
12374
12375 2013-07-01 Pedro Alves <palves@redhat.com>
12376
12377 * server.h: Include "pathmax.h".
12378 * linux-low.c: Don't include sys/param.h.
12379 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
12380 MAXPATHLEN.
12381 * win32-low.c: Don't include sys/param.h.
12382 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
12383
12384 2013-07-01 Pedro Alves <palves@redhat.com>
12385
12386 * event-loop.c: Don't check HAVE_UNISTD_H before including
12387 <unistd.h>.
12388 * gdbreplay.c: Likewise.
12389 * remote-utils.c: Likewise.
12390 * server.c: Likewise.
12391 * configure.ac: Don't check for unistd.h.
12392 * configure: Regenerate.
12393
12394 2013-06-28 Tom Tromey <tromey@redhat.com>
12395
12396 * Makefile.in (version.c): Use version.in, not
12397 common/version.in.
12398
12399 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
12400
12401 * configure.ac (version_host, version_target): Set and AC_SUBST them.
12402 * configure: Rebuild.
12403 * Makefile.in (version_host, version_target): Get from configure.
12404 (version.c): Use $(version_host) and $(version_target).
12405
12406 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12407
12408 Fix trace-status to output user name without trailing colon.
12409 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
12410
12411 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
12412
12413 Fix trace-status to output proper start-time and stop-time.
12414 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
12415 output start time and stop time in hex as gdb expects.
12416
12417 2013-06-26 Pedro Alves <pedro@codesourcery.com>
12418
12419 * tracepoint.c (build_traceframe_info_xml): Output trace state
12420 variables present in the trace buffer.
12421
12422 2013-06-24 Tom Tromey <tromey@redhat.com>
12423
12424 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
12425 create-version.sh.
12426 (version.o): Remove.
12427 * gdbreplay.c: Include version.h.
12428 (version, host_name): Don't declare.
12429 * server.h: Include version.h.
12430 (version, host_name): Don't declare.
12431
12432 2013-06-12 Pedro Alves <palves@redhat.com>
12433
12434 * linux-x86-low.c (linux_is_elf64): Delete global.
12435 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
12436 with local linux_pid_exe_is_elf_64_file use.
12437
12438 2013-06-11 Pedro Alves <palves@redhat.com>
12439
12440 * linux-low.c (regset_disabled, disable_regset): New functions.
12441 (regsets_fetch_inferior_registers)
12442 (regsets_store_inferior_registers): Use them.
12443 (initialize_regsets_info); Don't allocate the disabled_regsets
12444 array here.
12445 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
12446 comment.
12447
12448 2013-06-11 Pedro Alves <palves@redhat.com>
12449
12450 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
12451 xmalloc.
12452
12453 2013-06-11 Pedro Alves <palves@redhat.com>
12454
12455 * linux-x86-low.c (initialize_low_arch): Call
12456 init_registers_x32_avx_linux.
12457
12458 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
12459
12460 Fix compatibility with Android Bionic.
12461 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
12462 it is not empty.
12463
12464 2013-06-07 Pedro Alves <palves@redhat.com>
12465
12466 PR server/14823
12467 * Makefile.in (OBS): Add tdesc.o.
12468 (IPA_OBJS): Add tdesc-ipa.o.
12469 (tdesc-ipa.o): New rule.
12470 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
12471 interface.
12472 * linux-low.c (new_inferior): Delete.
12473 (disabled_regsets, num_regsets): Delete.
12474 (linux_add_process): Adjust to set the new per-process
12475 new_inferior flag.
12476 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
12477 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
12478 was a stop. When calling arch_setup, switch the current inferior
12479 to the thread that got an event.
12480 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
12481 (regsets_fetch_inferior_registers)
12482 (regsets_store_inferior_registers): New regsets_info parameter.
12483 Adjust to use it.
12484 (linux_register_in_regsets): New regs_info parameter. Adjust to
12485 use it.
12486 (register_addr, fetch_register, store_register): New usrregs_info
12487 parameter. Adjust to use it.
12488 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
12489 parameter regs_info. Adjust to use it.
12490 (linux_fetch_registers): Get the current inferior's regs_info, and
12491 adjust to use it.
12492 (linux_store_registers): Ditto.
12493 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
12494 (initialize_low): Don't initialize the target_regsets here. Call
12495 initialize_low_arch.
12496 * linux-low.h (target_regsets): Delete declaration.
12497 (struct regsets_info): New.
12498 (struct usrregs_info): New.
12499 (struct regs_info): New.
12500 (struct process_info_private) <new_inferior>: New field.
12501 (struct linux_target_ops): Delete the num_regs, regmap, and
12502 regset_bitmap fields. New field regs_info.
12503 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
12504 * i387-fp.c (num_xmm_registers): Delete.
12505 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
12506 calls to new interface.
12507 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
12508 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
12509 Infer the number of xmm registers from the regcache's target
12510 description.
12511 * i387-fp.h (num_xmm_registers): Delete.
12512 * inferiors.c (add_thread): Don't install the thread's regcache
12513 here.
12514 * proc-service.c (gregset_info): Fetch the current inferior's
12515 regs_info. Adjust to use it.
12516 * regcache.c: Include tdesc.h.
12517 (register_bytes, reg_defs, num_registers)
12518 (gdbserver_expedite_regs): Delete.
12519 (get_thread_regcache): If the thread doesn't have a regcache yet,
12520 create one, instead of aborting gdbserver.
12521 (regcache_invalidate_one): Rename to ...
12522 (regcache_invalidate_thread): ... this.
12523 (regcache_invalidate_one): New.
12524 (regcache_invalidate): Only invalidate registers of the current
12525 process.
12526 (init_register_cache): Add target_desc parameter, and use it.
12527 (new_register_cache): Ditto. Assert the target description has a
12528 non zero registers_size.
12529 (regcache_cpy): Add assertions. Adjust.
12530 (realloc_register_cache, set_register_cache): Delete.
12531 (registers_to_string, registers_from_string): Adjust.
12532 (find_register_by_name, find_regno, find_register_by_number)
12533 (register_cache_size): Add target_desc parameter, and use it.
12534 (free_register_cache_thread, free_register_cache_thread_one)
12535 (regcache_release, register_cache_size): New.
12536 (register_size): Add target_desc parameter, and use it.
12537 (register_data, supply_register, supply_register_zeroed)
12538 (supply_regblock, supply_register_by_name, collect_register)
12539 (collect_register_as_string, collect_register_by_name): Adjust.
12540 * regcache.h (struct target_desc): Forward declare.
12541 (struct regcache) <tdesc>: New field.
12542 (init_register_cache, new_register_cache): Add target_desc
12543 parameter.
12544 (regcache_invalidate_thread): Declare.
12545 (regcache_invalidate_one): Delete declaration.
12546 (regcache_release): Declare.
12547 (find_register_by_number, register_cache_size, register_size)
12548 (find_regno): Add target_desc parameter.
12549 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
12550 declarations.
12551 * remote-utils.c: Include tdesc.h.
12552 (outreg, prepare_resume_reply): Adjust.
12553 * server.c: Include tdesc.h.
12554 (gdbserver_xmltarget): Delete declaration.
12555 (get_features_xml, process_serial_event): Adjust.
12556 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
12557 declare.
12558 (struct process_info) <tdesc>: New field.
12559 (ipa_tdesc): Declare.
12560 * tdesc.c: New file.
12561 * tdesc.h: New file.
12562 * tracepoint.c: Include tdesc.h.
12563 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
12564 (get_context_regcache): Adjust to pass ipa_tdesc down.
12565 (do_action_at_tracepoint): Adjust to get the register cache size
12566 from the context regcache's description.
12567 (traceframe_walk_blocks): Adjust to get the register cache size
12568 from the current trace frame's description.
12569 (traceframe_get_pc): Adjust to get current trace frame's
12570 description and pass it down.
12571 (gdb_collect): Adjust to get the register cache size from the
12572 IPA's description.
12573 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
12574 (gdbserver_xmltarget): Delete.
12575 (initialize_low_tracepoint): Set the ipa's target description.
12576 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
12577 (initialize_low_tracepoint): Set the ipa's target description.
12578 * linux-x86-low.c: Include tdesc.h.
12579 [__x86_64__] (is_64bit_tdesc): New.
12580 (ps_get_thread_area, x86_get_thread_area): Use it.
12581 (i386_cannot_store_register): Rename to ...
12582 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
12583 (i386_cannot_fetch_register): Rename to ...
12584 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
12585 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
12586 to new interface.
12587 (target_regsets): Rename to ...
12588 (x86_regsets): ... this.
12589 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
12590 interface.
12591 (x86_siginfo_fixup): Use is_64bit_tdesc.
12592 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
12593 (tdesc_x32_avx_linux, tdesc_x32_linux)
12594 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
12595 Declare.
12596 (x86_linux_update_xmltarget): Delete.
12597 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
12598 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
12599 (AMD64_LINUX_USER64_CS): New.
12600 (x86_linux_read_description): New, based on
12601 x86_linux_update_xmltarget.
12602 (same_process_callback): New.
12603 (x86_arch_setup_process_callback): New.
12604 (x86_linux_update_xmltarget): New.
12605 (x86_regsets_info): New.
12606 (amd64_linux_regs_info): New.
12607 (i386_linux_usrregs_info): New.
12608 (i386_linux_regs_info): New.
12609 (x86_linux_regs_info): New.
12610 (x86_arch_setup): Reimplement.
12611 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
12612 (x86_emit_ops): Ditto.
12613 (the_low_target): Adjust. Install x86_linux_regs_info,
12614 x86_cannot_fetch_register, and x86_cannot_store_register.
12615 (initialize_low_arch): New.
12616 * linux-ia64-low.c (tdesc_ia64): Declare.
12617 (ia64_fetch_register): Adjust.
12618 (ia64_usrregs_info, regs_info): New globals.
12619 (ia64_regs_info): New function.
12620 (the_low_target): Adjust.
12621 (initialize_low_arch): New function.
12622 * linux-sparc-low.c (tdesc_sparc64): Declare.
12623 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
12624 Adjust.
12625 (sparc_arch_setup): New function.
12626 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
12627 (the_low_target): Adjust.
12628 (initialize_low_arch): New function.
12629 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
12630 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
12631 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
12632 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
12633 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
12634 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
12635 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
12636 (tdesc_powerpc_isa205_vsx64l): Declare.
12637 (ppc_cannot_store_register, ppc_collect_ptrace_register)
12638 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
12639 (ppc_set_pc, ppc_get_hwcap): Adjust.
12640 (ppc_usrregs_info): Forward declare.
12641 (!__powerpc64__) ppc_regmap_adjusted: New global.
12642 (ppc_arch_setup): Adjust to the current process'es target
12643 description.
12644 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
12645 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
12646 (ppc_store_evrregset): Adjust.
12647 (target_regsets): Rename to ...
12648 (ppc_regsets): ... this, and make static.
12649 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
12650 (ppc_regs_info): New function.
12651 (the_low_target): Adjust.
12652 (initialize_low_arch): New function.
12653 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
12654 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
12655 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
12656 (tdesc_s390x_linux64v2): Declare.
12657 (s390_collect_ptrace_register, s390_supply_ptrace_register)
12658 (s390_fill_gregset, s390_store_last_break): Adjust.
12659 (target_regsets): Rename to ...
12660 (s390_regsets): ... this, and make static.
12661 (s390_get_pc, s390_set_pc): Adjust.
12662 (s390_get_hwcap): New target_desc parameter, and use it.
12663 [__s390x__] (have_hwcap_s390_high_gprs): New global.
12664 (s390_arch_setup): Adjust to set the current process'es target
12665 description. Don't adjust the regmap.
12666 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
12667 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
12668 (regs_info_3264): New globals.
12669 (s390_regs_info): New function.
12670 (the_low_target): Adjust.
12671 (initialize_low_arch): New function.
12672 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
12673 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
12674 [__mips64] (init_registers_mips_linux)
12675 (init_registers_mips_dsp_linux): Delete defines.
12676 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
12677 (have_dsp): New global.
12678 (mips_read_description): New, based on mips_arch_setup.
12679 (mips_arch_setup): Reimplement.
12680 (get_usrregs_info): New function.
12681 (mips_cannot_fetch_register, mips_cannot_store_register)
12682 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
12683 (mips_fill_fpregset, mips_store_fpregset): Adjust.
12684 (target_regsets): Rename to ...
12685 (mips_regsets): ... this, and make static.
12686 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
12687 (dsp_regs_info, regs_info): New globals.
12688 (mips_regs_info): New function.
12689 (the_low_target): Adjust.
12690 (initialize_low_arch): New function.
12691 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
12692 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
12693 Declare.
12694 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
12695 (arm_read_description): New, with bits factored from
12696 arm_arch_setup.
12697 (arm_arch_setup): Reimplement.
12698 (target_regsets): Rename to ...
12699 (arm_regsets): ... this, and make static.
12700 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
12701 (arm_regs_info): New function.
12702 (the_low_target): Adjust.
12703 (initialize_low_arch): New function.
12704 * linux-m68k-low.c (tdesc_m68k): Declare.
12705 (target_regsets): Rename to ...
12706 (m68k_regsets): ... this, and make static.
12707 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
12708 (m68k_regs_info): New function.
12709 (m68k_arch_setup): New function.
12710 (the_low_target): Adjust.
12711 (initialize_low_arch): New function.
12712 * linux-sh-low.c (tdesc_sharch): Declare.
12713 (target_regsets): Rename to ...
12714 (sh_regsets): ... this, and make static.
12715 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
12716 (sh_regs_info, sh_arch_setup): New functions.
12717 (the_low_target): Adjust.
12718 (initialize_low_arch): New function.
12719 * linux-bfin-low.c (tdesc_bfin): Declare.
12720 (bfin_arch_setup): New function.
12721 (bfin_usrregs_info, regs_info): New globals.
12722 (bfin_regs_info): New function.
12723 (the_low_target): Adjust.
12724 (initialize_low_arch): New function.
12725 * linux-cris-low.c (tdesc_cris): Declare.
12726 (cris_arch_setup): New function.
12727 (cris_usrregs_info, regs_info): New globals.
12728 (cris_regs_info): New function.
12729 (the_low_target): Adjust.
12730 (initialize_low_arch): New function.
12731 * linux-cris-low.c (tdesc_crisv32): Declare.
12732 (cris_arch_setup): New function.
12733 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
12734 (cris_regs_info): New function.
12735 (the_low_target): Adjust.
12736 (initialize_low_arch): New function.
12737 * linux-m32r-low.c (tdesc_m32r): Declare.
12738 (m32r_arch_setup): New function.
12739 (m32r_usrregs_info, regs_info): New globals.
12740 (m32r_regs_info): Adjust.
12741 (initialize_low_arch): New function.
12742 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
12743 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
12744 (tic6x_usrregs_info): Forward declare.
12745 (tic6x_read_description): New function, based on ...
12746 (tic6x_arch_setup): ... this. Reimplement.
12747 (target_regsets): Rename to ...
12748 (tic6x_regsets): ... this, and make static.
12749 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
12750 (tic6x_regs_info): New function.
12751 (the_low_target): Adjust.
12752 (initialize_low_arch): New function.
12753 * linux-xtensa-low.c (tdesc_xtensa): Declare.
12754 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
12755 (target_regsets): Rename to ...
12756 (xtensa_regsets): ... this, and make static.
12757 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
12758 globals.
12759 (xtensa_arch_setup, xtensa_regs_info): New functions.
12760 (the_low_target): Adjust.
12761 (initialize_low_arch): New function.
12762 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
12763 (nios2_arch_setup): Set the current process'es tdesc.
12764 (target_regsets): Rename to ...
12765 (nios2_regsets): ... this.
12766 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
12767 (nios2_regs_info): New function.
12768 (the_low_target): Adjust.
12769 (initialize_low_arch): New function.
12770 * linux-aarch64-low.c (tdesc_aarch64): Declare.
12771 (aarch64_arch_setup): Set the current process'es tdesc.
12772 (target_regsets): Rename to ...
12773 (aarch64_regsets): ... this.
12774 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
12775 (aarch64_regs_info): New function.
12776 (the_low_target): Adjust.
12777 (initialize_low_arch): New function.
12778 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
12779 globals.
12780 (target_regsets): Rename to ...
12781 (tile_regsets): ... this.
12782 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
12783 (tile_regs_info): New function.
12784 (tile_arch_setup): Set the current process'es tdesc.
12785 (the_low_target): Adjust.
12786 (initialize_low_arch): New function.
12787 * spu-low.c (tdesc_spu): Declare.
12788 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
12789 * win32-arm-low.c (tdesc_arm): Declare.
12790 (arm_arch_setup): New function.
12791 (the_low_target): Install arm_arch_setup instead of
12792 init_registers_arm.
12793 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
12794 (init_windows_x86): Rename to ...
12795 (i386_arch_setup): ... this. Set `win32_tdesc'.
12796 (the_low_target): Adjust.
12797 * win32-low.c (win32_tdesc): New global.
12798 (child_add_thread): Don't create the thread cache here.
12799 (do_initial_child_stuff): Set the new process'es tdesc.
12800 * win32-low.h (struct target_desc): Forward declare.
12801 (win32_tdesc): Declare.
12802 * lynx-i386-low.c (tdesc_i386): Declare global.
12803 (lynx_i386_arch_setup): Set `lynx_tdesc'.
12804 * lynx-low.c (lynx_tdesc): New global.
12805 (lynx_add_process): Set the new process'es tdesc.
12806 * lynx-low.h (struct target_desc): Forward declare.
12807 (lynx_tdesc): Declare global.
12808 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
12809 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
12810 * nto-low.c (nto_tdesc): New global.
12811 (do_attach): Set the new process'es tdesc.
12812 * nto-low.h (struct target_desc): Forward declare.
12813 (nto_tdesc): Declare.
12814 * nto-x86-low.c (tdesc_i386): Declare.
12815 (nto_x86_arch_setup): Set `nto_tdesc'.
12816
12817 2013-06-04 Gary Benson <gbenson@redhat.com>
12818
12819 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
12820 to qSupported response when appropriate.
12821 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
12822 with nonzero-length annex.
12823 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
12824 arguments supplied in annex.
12825
12826 2013-05-31 Doug Evans <dje@google.com>
12827
12828 PR server/15594
12829 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
12830 64 bits in 64-cross-32 environment.
12831
12832 2013-05-28 Pedro Alves <palves@redhat.com>
12833
12834 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
12835 (aarch64-without-fpu.c): Delete rule.
12836 * configure.srv (aarch64*-*-linux*): Remove references to
12837 aarch64-without-fpu.o and aarch64-without-fpu.xml.
12838 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
12839 declaration.
12840
12841 2013-05-24 Pedro Alves <palves@redhat.com>
12842
12843 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
12844 instead of strchr/decode_address. Error if the range isn't split
12845 with a ','. Don't assume there's be a ':' in the action.
12846
12847 2013-05-23 Yao Qi <yao@codesourcery.com>
12848 Pedro Alves <palves@redhat.com>
12849
12850 * linux-low.c (lwp_in_step_range): New function.
12851 (linux_wait_1): If the thread was range stepping and stopped
12852 outside the stepping range, report the stop to GDB. Otherwise,
12853 continue stepping. Add range stepping debug output.
12854 (linux_set_resume_request): Copy the step range from the resume
12855 request to the lwp.
12856 (linux_supports_range_stepping): New.
12857 (linux_target_ops) <supports_range_stepping>: Set to
12858 linux_supports_range_stepping.
12859 * linux-low.h (struct linux_target_ops)
12860 <supports_range_stepping>: New field.
12861 (struct lwp_info) <step_range_start, step_range_end>: New fields.
12862 * linux-x86-low.c (x86_supports_range_stepping): New.
12863 (the_low_target) <supports_range_stepping>: Set to
12864 x86_supports_range_stepping.
12865 * server.c (handle_v_cont): Handle 'r' action.
12866 (handle_v_requests): Append ";r" if the target supports range
12867 stepping.
12868 * target.h (struct thread_resume) <step_range_start,
12869 step_range_end>: New fields.
12870 (struct target_ops) <supports_range_stepping>:
12871 New field.
12872 (target_supports_range_stepping): New macro.
12873
12874 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12875
12876 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
12877 confusion in comment.
12878
12879 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12880
12881 * lynx-low.c (struct process_info_private): New type.
12882 (lynx_add_process): New function.
12883 (lynx_create_inferior, lynx_attach): Replace calls to
12884 add_process by calls to lynx_add_process.
12885 (lynx_resume): If PTID is null, then try using
12886 current_process()->private->last_wait_event_ptid.
12887 Add comments.
12888 (lynx_clear_inferiors): Delete. The contents of that function
12889 has been inlined in lynx_mourn;
12890 (lynx_wait_1): Save the ptid in the process's private data.
12891 (lynx_mourn): Free the process' private data. Replace call
12892 to lynx_clear_inferiors by call to clear_inferiors.
12893
12894 2013-05-17 Yao Qi <yao@codesourcery.com>
12895
12896 * i386-low.c (i386_length_and_rw_bits): Move the comment to
12897 the right place.
12898
12899 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
12900
12901 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
12902 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
12903 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
12904 PT_TEXT_END_ADDR guards. Update comments.
12905 (linux_target_op) <read_offsets>: Conditionally define to
12906 linux_read_offsets if the target is UCLIBC and if it defines
12907 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
12908
12909 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12910 Andrew Jenner <andrew@codesourcery.com>
12911
12912 * Makefile.in (SFILES): Add linux-nios2-low.c.
12913 (clean): Add action to delete nios2-linux.c.
12914 (nios2-linux.c): New rule.
12915 * configure.srv: Add nios2*-*-linux*.
12916 * linux-nios2-low.c: New.
12917
12918 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12919
12920 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12921
12922 2013-04-25 Hui Zhu <hui@codesourcery.com>
12923
12924 PR gdb/15186
12925 * ax.c (ax_printf): Add fflush.
12926
12927 2013-04-22 Tom Tromey <tromey@redhat.com>
12928
12929 * Makefile.in (SFILES): Add filestuff.c.
12930 (OBS): Add filestuff.o.
12931 (filestuff.o): New target.
12932 * config.in, configure: Rebuild.
12933 * configure.ac: Check for fdwalk, pipe2.
12934
12935 2013-04-17 Pedro Alves <palves@redhat.com>
12936
12937 * configure.ac (USE_THREAD_DB): Delete variable.
12938 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12939 Don't AC_SUBST USE_THREAD_DB.
12940 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12941 * config.in, configure: Regenerate.
12942
12943 2013-04-16 Pedro Alves <palves@redhat.com>
12944
12945 * linux-low.h (struct lwp_info) <thread_known>: Move under
12946 the USE_THREAD_DB #ifdef.
12947
12948 2013-04-16 Pedro Alves <palves@redhat.com>
12949
12950 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12951 (linux-low.o): Delete rule.
12952 * linux-low.h: Always include "gdb_thread_db.h" instead of
12953 conditionally including thread_db.h.
12954 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12955 HAVE_THREAD_DB_H.
12956
12957 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12958
12959 * Makefile.in (install-only): Fix make install regression.
12960
12961 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12962
12963 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12964 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12965 installation.
12966 * gdbserver.1: Remove.
12967
12968 2013-03-22 Pedro Alves <palves@redhat.com>
12969
12970 * linux-low.c (handle_extended_wait): Don't call
12971 linux_enable_event_reporting.
12972
12973 2013-03-15 Tony Theodore <tonyt@logyst.com>
12974
12975 PR build/9098:
12976 * Makefile.in (SHELL): Use @SHELL@.
12977
12978 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12979
12980 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12981 compiler warning.
12982
12983 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12984
12985 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12986 Remove extraneous NULL element.
12987
12988 2013-03-13 Yao Qi <yao@codesourcery.com>
12989
12990 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12991 'V' block in trace frame.
12992
12993 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12994
12995 * target.h (struct target_ops): Add btrace ops.
12996 (target_supports_btrace): New macro.
12997 (target_enable_btrace): New macro.
12998 (target_disable_btrace): New macro.
12999 (target_read_btrace): New macro.
13000 * gdbthread.h (struct thread_info): Add btrace field.
13001 * server.c: Include btrace-common.h.
13002 (handle_btrace_general_set): New function.
13003 (handle_btrace_enable): New function.
13004 (handle_btrace_disable): New function.
13005 (handle_general_set): Call handle_btrace_general_set.
13006 (handle_qxfer_btrace): New function.
13007 (struct qxfer qxfer_packets[]): Add btrace entry.
13008 * inferiors.c (remove_thread): Disable btrace.
13009 * linux-low: Include linux-btrace.h.
13010 (linux_low_enable_btrace): New function.
13011 (linux_low_read_btrace): New function.
13012 (linux_target_ops): Add btrace ops.
13013 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
13014 Add srv_linux_btrace=yes.
13015 (x86_64-*-linux*): Add linux-btrace.o.
13016 Add srv_linux_btrace=yes.
13017 * configure.ac: Define HAVE_LINUX_BTRACE.
13018 * config.in: Regenerated.
13019 * configure: Regenerated.
13020
13021 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13022
13023 * server.c (handle_qxfer): Preserve error message if -3 is
13024 returned.
13025 (qxfer): Document the -3 return value.
13026
13027 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
13028
13029 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
13030 (linux_btrace_h): New variable.
13031 (linux-btrace.o): New rule.
13032
13033 2013-03-08 Stan Shebs <stan@codesourcery.com>
13034 Hafiz Abid Qadeer <abidh@codesourcery.com>
13035
13036 * tracepoint.c (trace_buffer_size): New global.
13037 (DEFAULT_TRACE_BUFFER_SIZE): New define.
13038 (init_trace_buffer): Change to one-argument function. Allocate
13039 trace buffer memory.
13040 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
13041 handle QTBuffer:size packet.
13042 (cmd_bigqtbuffer_size): New function.
13043 (initialize_tracepoint): Call init_trace_buffer with
13044 DEFAULT_TRACE_BUFFER_SIZE.
13045 * server.c (handle_query): Add QTBuffer:size in the
13046 supported packets.
13047
13048 2013-03-07 Yao Qi <yao@codesourcery.com>
13049
13050 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
13051 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
13052 of -1.
13053 (cmd_qtsp): Adjust condition. Do post increment.
13054 Set cur_action and cur_step_action back to 0.
13055
13056 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
13057
13058 PR server/15236
13059 * linux-low.c (linux_write_memory): Return early success if LEN is
13060 zero.
13061
13062 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
13063
13064 * configure.srv: Add x86_64-*-cygwin* as target.
13065
13066 2013-02-28 Tom Tromey <tromey@redhat.com>
13067
13068 * configure.ac: Invoke AC_SYS_LARGEFILE.
13069 * configure, config.in: Rebuild.
13070
13071 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
13072
13073 * win32-low.c: Throughout, fix format strings and casts of
13074 printf-like functions to avoid type related warnings on all
13075 platforms.
13076 (get_child_debug_event): Print dwDebugEventCode as hex since
13077 that's how it's usually documented.
13078
13079 2013-02-28 Yao Qi <yao@codesourcery.com>
13080
13081 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
13082 pulongest.
13083
13084 2013-02-27 Jiong Wang <jiwang@tilera.com>
13085
13086 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
13087 (reg-tilegx32.c): New rule.
13088 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
13089 * linux-tile-low.c (tile_arch_setup): New function. Invoke
13090 different register info initializer according to elf class.
13091 (init_registers_tilgx32): New function. The tilegx32 register info
13092 initializer.
13093 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
13094 (tile_store_gregset): Likewise.
13095
13096 2013-02-27 Yao Qi <yao@codesourcery.com>
13097
13098 * server.c (process_point_options): Print debug message when
13099 debug_threads is true.
13100
13101 2013-02-26 Yao Qi <yao@codesourcery.com>
13102
13103 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
13104
13105 2013-02-19 Pedro Alves <palves@redhat.com>
13106 Kai Tietz <ktietz@redhat.com>
13107
13108 PR gdb/15161
13109
13110 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
13111 instead of strtoul to extract address from packet.
13112 (process_serial_event) <'z'>: Likewise.
13113
13114 2013-02-18 Yao Qi <yao@codesourcery.com>
13115
13116 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
13117
13118 2013-02-14 Pedro Alves <palves@redhat.com>
13119
13120 Plug memory leak.
13121
13122 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
13123 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
13124
13125 2013-02-14 Pedro Alves <palves@redhat.com>
13126
13127 * tracepoint.c (cmd_qtdpsrc): Use savestring.
13128
13129 2013-02-14 Pedro Alves <palves@redhat.com>
13130
13131 * tracepoint.c (save_string): Delete.
13132 (add_tracepoint_action): Use savestring instead of save_string.
13133
13134 2013-02-12 Pedro Alves <palves@redhat.com>
13135
13136 * linux-xtensa-low.c: Ditto.
13137 * xtensa-xtregs.c: Ditto.
13138
13139 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
13140
13141 * thread-db.c (thread_db_get_tls_address): NULL pointer check
13142 thread_db.
13143
13144 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13145
13146 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
13147 aarch64_num_wp_regs and aarch64_num_bp_regs to
13148 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
13149
13150 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
13151
13152 * linux-aarch64-low.c (ps_get_thread_area): Replace
13153 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
13154
13155 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
13156 Marcus Shawcroft <marcus.shawcroft@arm.com>
13157 Nigel Stephens <nigel.stephens@arm.com>
13158 Yufeng Zhang <yufeng.zhang@arm.com>
13159
13160 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
13161 (aarch64.c, aarch64-without-fpu.c): New targets.
13162 * configure.srv (aarch64*-*-linux*): New.
13163 * linux-aarch64-low.c: New file.
13164
13165 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
13166
13167 * linux-low.c (handle_extended_wait, linux_create_inferior)
13168 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
13169 (dequeue_one_deferred_signal, linux_resume_one_thread)
13170 (fetch_register, linux_write_memory, linux_enable_event_reporting)
13171 (linux_tracefork_grandchild, linux_test_for_tracefork)
13172 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
13173 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
13174 where the argument is 0.
13175
13176 2013-01-25 Yao Qi <yao@codesourcery.com>
13177
13178 * event-loop.c: Include "queue.h".
13179 (gdb_event_p): New typedef.
13180 (struct gdb_event) <next_event>: Remove.
13181 (event_queue): Change to QUEUE(gdb_event_p).
13182 (async_queue_event): Remove.
13183 (gdb_event_xfree): New.
13184 (initialize_event_loop): New.
13185 (process_event): Use API from QUEUE.
13186 (wait_for_event): Likewise.
13187 * server.c (main): Call initialize_event_loop.
13188 * server.h (initialize_event_loop): Declare.
13189
13190 2013-01-18 Yao Qi <yao@codesourcery.com>
13191
13192 * ax.h (struct eval_agent_expr_context): New.
13193 (gdb_eval_agent_expr): Update declaration.
13194 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
13195 TFRAME. Add new argument CTX.
13196 * server.h (struct eval_agent_expr_context): Declare.
13197 (agent_mem_read, agent_tsv_read): Update declaration.
13198 (agent_mem_read_string): Likewise.
13199 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
13200 (add_traceframe_block): Add new argument TPOINT.
13201 Increase TPOINT->traceframe_usage.
13202 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
13203 eval_tracepoint_agent_expr.
13204 (condition_true_at_tracepoint): Likewise.
13205 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
13206 (agent_mem_read_string, agent_tsv_read): Likewise.
13207
13208 2013-01-16 Yao Qi <yao@codesourcery.com>
13209
13210 * linux-low.c (linux_resume_one_lwp): Don't check
13211 'lwp->bp_reinsert != 0'.
13212
13213 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13214 Pedro Alves <palves@redhat.com>
13215
13216 * lynx-low.c (ptrace_request_to_str): Define a temporary
13217 macro and use it to simplify this function's implementation.
13218
13219 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13220
13221 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
13222 sets errno.
13223
13224 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13225
13226 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
13227
13228 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13229
13230 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
13231
13232 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13233
13234 * lynx-low.c (lynx_resume): Use the resume_info parameter
13235 to determine the ptid for the lynx_ptrace call, unless
13236 it is equal to minus_one_ptid, in which case we use the
13237 ptid of the current_inferior.
13238 (lynx_wait_1): After having received a thread create/exit
13239 event, resume the inferior's execution using the signaling
13240 thread's ptid, rather than the old ptid.
13241
13242 2013-01-07 Joel Brobecker <brobecker@adacore.com>
13243
13244 * lynx-low.c (lynx_resume): Delete variable ret.
13245
13246 2013-01-01 Joel Brobecker <brobecker@adacore.com>
13247
13248 * gdbreplay.c (gdbreplay_version): Update copyright year.
13249 * server.c (gdbserver_version): Likewise.
13250
13251 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13252
13253 * lynx-low.c (lynx_wait_1): Add debug trace before adding
13254 new thread.
13255
13256 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13257
13258 * lynx-low.c (ptrace_request_to_str): Add handling for
13259 PTRACE_GETTRACESIG.
13260
13261 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13262
13263 * lynx-low.c (lynx_attach): Delete variable new_process.
13264
13265 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13266
13267 * lynx-low.c (lynx_create_inferior): Delete variable
13268 new_process.
13269
13270 2012-12-17 Joel Brobecker <brobecker@adacore.com>
13271
13272 * lynx-low.c (ptrace_request_to_str): Do not handle
13273 PTRACE_GETTHREADLIST if this macro does not exist.
13274
13275 2012-12-15 Yao Qi <yao@codesourcery.com>
13276
13277 * Makefile.in (OBS): Add notif.o.
13278 * notif.c, notif.h: New.
13279 * server.c: Include "notif.h".
13280 (struct vstop_notif) <next>: Remove.
13281 <base>: New field.
13282 (queue_stop_reply): Update.
13283 (push_event, send_next_stop_reply): Remove.
13284 (discard_queued_stop_replies): Update.
13285 (notif_stop): New variable.
13286 (handle_v_stopped): Remove.
13287 (handle_v_requests): Don't call handle_v_stopped. Call
13288 handle_ack_notif instead.
13289 (queue_stop_reply_callback): Call notif_event_enque instead
13290 of queue_stop_reply.
13291 (handle_status): Don't call send_next_stop_reply, call
13292 notif_write_event instead.
13293 (kill_inferior_callback): Likewise.
13294 (detach_or_kill_inferior_callback): Likewise.
13295 (main): Call initialize_notif.
13296 (process_serial_event): Call QUEUE_is_empty.
13297 (handle_target_event): Call notif_push instead of push event.
13298 * server.h (push_event): Remove declaration.
13299
13300 2012-12-10 Tom Tromey <tromey@redhat.com>
13301
13302 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
13303 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
13304 macros.
13305 (.c.o): Rewrite.
13306 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
13307 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
13308 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
13309 (amd64-linux-ipa.o, ax.o): Rewrite.
13310 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
13311 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
13312 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
13313 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
13314 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
13315 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
13316 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
13317 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
13318 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
13319 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
13320 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
13321 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
13322 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
13323 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
13324 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
13325 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
13326 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
13327 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
13328 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
13329 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
13330 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
13331 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
13332 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
13333 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
13334 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
13335 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
13336 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
13337 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
13338 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
13339 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
13340 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
13341 (reg-tilegx.o): Remove.
13342 (all_object_files): New macro.
13343 Include .deps files.
13344 * aclocal.m4, configure: Rebuild.
13345 * acinclude.m4: Include depstand.m4, lead-dot.m4.
13346 * configure.ac: Invoke ZW_CREATE_DEPDIR,
13347 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
13348
13349 2012-12-05 Tom Tromey <tromey@redhat.com>
13350
13351 PR gdb/14917:
13352 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
13353
13354 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
13355
13356 * configure.ac: Check for linux/perf_event.h.
13357 * config.in: Regenerated.
13358 * configure: Regenerated.
13359
13360 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
13361
13362 * hostio.c (handle_readlink): Decrease buffer size
13363 parameter passed to readlink by one byte.
13364
13365 2012-11-26 Yao Qi <yao@codesourcery.com>
13366
13367 * configure.ac (build_warnings): Append '-Wempty-body'.
13368 * configure: Regenerated.
13369 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
13370 body.
13371
13372 2012-11-15 Pierre Muller <muller@sourceware.org>
13373
13374 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
13375 * config.in: Regenerate.
13376 * configure: Regenerate.
13377 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
13378 Use "gdb_wait.h" header instead of <sys/wait.h> header.
13379 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13380 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
13381 header.
13382 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
13383 instead of <sys/wait.h> header.
13384 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
13385
13386 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
13387
13388 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
13389 (various make rules): Remove -DGDBSERVER
13390
13391 2012-11-09 Yao Qi <yao@codesourcery.com>
13392
13393 * spu-low.c (current_ptid): Move it to ..
13394 * gdbthread.h: ... here. New.
13395 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
13396 * server.c (myresume, process_serial_event): Likewise.
13397 * thread-db.c (thread_db_find_new_threads): Likewise.
13398 * tracepoint.c (run_inferior_command): Likewise.
13399
13400 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
13401
13402 * server.c (handle_search_memory_1): Include access length in
13403 warning message.
13404
13405 2012-09-05 Michael Brandt <michael.brandt@axis.com>
13406
13407 * linux-crisv32-low.c: Fix compile errors.
13408
13409 2012-09-04 Yao Qi <yao@codesourcery.com>
13410
13411 * tracepoint.c (cmd_qtsv): Adjust debug message.
13412 Don't check CUR_TPOINT.
13413
13414 2012-08-28 Yao Qi <yao@codesourcery.com>
13415
13416 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
13417 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
13418 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
13419 Remove declarations of xmalloc, xreallloc, xstrdup and
13420 freeargv.
13421 * Makefile.in (libiberty_h): New.
13422 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
13423 (linux-bfin-low.o): Append dependency 'libiberty.h'.
13424
13425 2012-08-23 Yao Qi <yao@codesourcery.com>
13426
13427 * server.h: Remove declaration of 'xsnprintf'.
13428
13429 2012-08-22 Keith Seitz <keiths@redhat.com>
13430
13431 * server.h: Include build-gnulib-gbserver/config.h.
13432 * gdbreplay.c: Likewise.
13433
13434 2012-08-08 Doug Evans <dje@google.com>
13435
13436 * Makefile.in (SFILES): Add gdb_vecs.c.
13437 (OBS): Add gdb_vecs.o.
13438 (gdb_vecs_h, host_defs_h): New variables.
13439 (thread-db.o): Add $(gdb_vecs_h) dependency.
13440 (gdb_vecs.o): New rule.
13441 * thread-db.c: #include "gdb_vecs.h".
13442 (thread_db_load_search): Use a vector to iterate over path elements.
13443 Handle text appearing after "$pdir".
13444
13445 * configure.ac: Add check for strstr.
13446 * config.in: Regenerate.
13447 * configure: Regenerate.
13448
13449 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
13450
13451 * hostio.c (handle_pread): If pread fails, fall back to attempting
13452 lseek/read.
13453 (handle_pwrite): Likewise for pwrite.
13454
13455 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
13456
13457 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
13458 between unsupported TYPE and unimplementable ADDR/LEN combination.
13459 (arm_insert_point): Act on new return value.
13460
13461 2012-07-31 Pedro Alves <palves@redhat.com>
13462
13463 * server.c (process_point_options): Only skip tokens if we find
13464 one that is unrecognized. Don't treat 'X' specially while
13465 skipping unrecognized tokens.
13466
13467 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
13468
13469 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
13470 to 4-byte-align HW breakpoint addresses for Thumb.
13471
13472 2012-07-27 Yao Qi <yao@codesourcery.com>
13473
13474 PR remote/14161.
13475
13476 * server.h: Declare gdb_agent_about_to_close.
13477 * target.c (kill_inferior): Include "agent.h".
13478 New. Send command 'kill'.
13479 * target.h (kill_inferior): Removed macro.
13480 * tracepoint.c (gdb_agent_about_to_close): New.
13481 (gdb_agent_helper_thread): Handle command 'close'.
13482 Wait endlessly until the inferior stops.
13483 Install gdb_agent_remove_socket to atexit hook.
13484 (agent_socket_name): New static variable.
13485 (gdb_agent_socket_init): Replace local variable 'name' with
13486 'agent_socket_name'.
13487 (gdb_agent_remove_socket): New.
13488
13489 2012-07-27 Yao Qi <yao@codesourcery.com>
13490
13491 * server.c (process_point_options): Stop at 'X' when parsing.
13492
13493 2012-07-19 Michael Eager <eager@eagercon.com>
13494
13495 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
13496 to hw_execute.
13497 * linux-x86-low.c (x86_insert_point, x86_remove_point):
13498 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
13499 hardware breakpoint.
13500
13501 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13502
13503 * gdbserver/linux-low.c (initialize_low): Call
13504 linux_ptrace_init_warnings.
13505
13506 2012-07-02 Doug Evans <dje@google.com>
13507
13508 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
13509 pointer to int.
13510
13511 2012-07-02 Stan Shebs <stan@codesourcery.com>
13512
13513 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
13514 (ax.o): Add it to build rule.
13515 (ax-ipa.o): Ditto.
13516 (OBS): Add format.o.
13517 (IPA_OBS): Add format.o.
13518 * server.c (handle_query): Claim support for breakpoint commands.
13519 (process_point_options): Add command case.
13520 (process_serial_event): Leave running if there are printfs in
13521 effect.
13522 * mem-break.h (any_persistent_commands): Declare.
13523 (add_breakpoint_commands): Declare.
13524 (gdb_no_commands_at_breakpoint): Declare.
13525 (run_breakpoint_commands): Declare.
13526 * mem-break.c (struct point_command_list): New struct.
13527 (struct breakpoint): New field command_list.
13528 (any_persistent_commands): New function.
13529 (add_commands_to_breakpoint): New function.
13530 (add_breakpoint_commands): New function.
13531 (gdb_no_commands_at_breakpoint): New function.
13532 (run_breakpoint_commands): New function.
13533 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
13534 locally.
13535 * ax.c: Include format.h.
13536 (ax_printf): New function.
13537 (gdb_eval_agent_expr): Add printf opcode.
13538
13539 2012-06-13 Yao Qi <yao@codesourcery.com>
13540
13541 * server.c (start_inferior): Remove duplicated writes to fields
13542 'last_resume_kind' and 'last_status' of 'current_inferior'.
13543
13544 2012-06-12 Yao Qi <yao@codesourcery.com>
13545 Pedro Alves <palves@redhat.com>
13546
13547 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
13548 comment.
13549 * server.c (handle_v_cont): Extend comment.
13550
13551 2012-06-11 Yao Qi <yao@codesourcery.com>
13552
13553 * linux-low.c (linux_attach): Add 'static'.
13554
13555 2012-06-06 Yao Qi <yao@codesourcery.com>
13556
13557 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
13558
13559 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
13560
13561 Fix gcc -flto compilation warning.
13562 * server.c (main): Make variable multi_mode and attach volatile.
13563
13564 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13565
13566 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
13567 if the platform doesn't know about it.
13568
13569 2012-05-30 Jeff Kenton <jkenton@tilera.com>
13570
13571 * Makefile.in (SFILES): Add linux-tile-low.c.
13572 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
13573 * configure.srv: Handle tilegx-*-linux*.
13574 * linux-tile-low.c: New file.
13575
13576 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13577
13578 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
13579
13580 2012-05-24 Pedro Alves <palves@redhat.com>
13581
13582 PR gdb/7205
13583
13584 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
13585
13586 2012-05-24 Pedro Alves <palves@redhat.com>
13587
13588 PR gdb/7205
13589
13590 Replace target_signal with gdb_signal throughout.
13591
13592 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
13593
13594 * linux-low.c (linux_store_registers): Avoid the copying sequence
13595 when no data has been retrieved by ptrace.
13596
13597 2012-05-22 Will Deacon <will.deacon@arm.com>
13598
13599 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
13600 Include asm/ptrace.h.
13601 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
13602 already defined.
13603
13604 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
13605
13606 * linux-low.c (linux_store_registers): Don't re-retrieve data
13607 with ptrace that has already been obtained from /proc. Always
13608 copy any data retrieved with ptrace to the buffer supplied.
13609
13610 2012-05-11 Yao Qi <yao@codesourcery.com>
13611 Pedro Alves <palves@redhat.com>
13612
13613 * linux-low.c (enum stopping_threads_kind): New.
13614 (stopping_threads): Change type to `enum stopping_threads_kind'.
13615 (handle_extended_wait): If stopping and suspending threads, leave
13616 the new_lwp suspended too.
13617 (linux_wait_for_event): Adjust.
13618 (stop_all_lwps): Set `stopping_threads' to
13619 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
13620 whether we're suspending threads or just stopping them. Assert no
13621 recursion happens.
13622
13623 2012-04-29 Yao Qi <yao@codesourcery.com>
13624
13625 * server.h: Move some code to ...
13626 * gdbthread.h: ... here. New.
13627 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
13628 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
13629 (nto-low.o, win32-low.o): Likewise.
13630 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
13631 * regcache.c, remote-utils.c, server.c: Likewise.
13632 * target.c, tracepoint.c, win32-low.c: Likewise.
13633
13634 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13635
13636 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
13637 (PTRACE_ARG4_TYPE): Likewise.
13638 (PTRACE_XFER_TYPE): Likewise.
13639 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
13640 ptrace to PTRACE_ARG3_TYPE.
13641 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
13642 (PTRACE_ARG4_TYPE): Likewise.
13643 (PTRACE_XFER_TYPE): Likewise.
13644 (linux_detach_one_lwp): Cast fourth argument of
13645 ptrace to long then PTRACE_ARG4_TYPE.
13646 (regsets_fetch_inferior_registers): Cast third argument of
13647 ptrace to long then PTRACE_ARG3_TYPE.
13648 (regsets_store_inferior_registers): Likewise.
13649
13650 2012-04-20 Pedro Alves <palves@redhat.com>
13651
13652 * configure: Regenerate.
13653
13654 2012-04-19 Pedro Alves <palves@redhat.com>
13655
13656 * Makefile.in (GNULIB_BUILDDIR): New.
13657 (LIBGNU, INCGNU, GNULIB_H): Adjust.
13658 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
13659 (all, install-only, uninstall, clean-info, all-lib, clean): No
13660 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
13661 (maintainer-clean realclean distclean): Use subdir_do.
13662 (subdir_do): New.
13663 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
13664 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
13665 * acinclude.m4: Include acx_configure_dir.m4.
13666 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
13667 calls. Call AC_PROG_RANLIB. Configure gnulib using
13668 ACX_CONFIGURE_DIR.
13669 (GNULIB): New.
13670 (GNULIB_STDINT_H): Adjust.
13671 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
13672 * gdbreplay.c: Include build-gnulib/config.h.
13673 * server.h: Likewise.
13674 * aclocal.m4: Regenerate.
13675 * config.in: Regenerate.
13676 * configure: Regenerate.
13677
13678 2012-04-19 Pedro Alves <palves@redhat.com>
13679
13680 * Makefile.in (LIBGNU, INCGNU): Adjust.
13681 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
13682 (all, install-only, uninstall, clean-info, all-lib, clean)
13683 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
13684 * configure.ac: Adjust AC_OUTPUT output.
13685 * aclocal.m4: Regenerate.
13686 * configure: Regenerate.
13687
13688 2012-04-19 Pedro Alves <palves@redhat.com>
13689
13690 * Makefile.in (generated_files): New.
13691 (server_h): Remove the explicit dependency on config.h, and depend
13692 on $generated_files.
13693
13694 2012-04-19 Pedro Alves <palves@redhat.com>
13695
13696 * Makefile.in (INCGNU): Add -Ignulib.
13697
13698 2012-04-19 Pedro Alves <palves@redhat.com>
13699
13700 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
13701 (INCGNU): ... this, and spell out -I here.
13702 (GNULIB_LIB): Rename to ...
13703 (LIBGNU): ... this.
13704 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
13705
13706 2012-04-19 Pedro Alves <palves@redhat.com>
13707
13708 * config.in: Regenerate.
13709
13710 2012-04-19 Pedro Alves <palves@redhat.com>
13711
13712 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
13713 * server.h (memmem): Remove declaration.
13714 * config.in: Regenerate.
13715 * configure: Regenerate.
13716
13717 2012-04-19 Yao Qi <yao@codesourcery.com>
13718
13719 * Makefile.in (SFILES): Add common/vec.c.
13720 (OBS): Add vec.o.
13721 (vec.o): New rule.
13722
13723 2012-04-19 Yao Qi <yao@codesourcery.com>
13724
13725 * remote-utils.c (prepare_resume_reply): Replace with macro
13726 target_core_of_thread.
13727 * server.c (handle_qxfer_threads_proper): Likewise.
13728 * target.h (traget_core_of_thread): New macro.
13729
13730 2012-04-18 Pedro Alves <palves@redhat.com>
13731
13732 * aclocal.m4: Regenerate.
13733 * configure: Regenerate.
13734
13735 2012-04-16 Yao Qi <yao@codesourcery.com>
13736
13737 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
13738 duplicated on address.
13739
13740 2012-04-16 Yao Qi <yao@codesourcery.com>
13741
13742 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
13743 (struct tracepoint_action_ops) <send>: New field.
13744 (m_tracepoint_action_send, r_tracepoint_action_send): New.
13745 (agent_expr_send, x_tracepoint_action_send): New.
13746 (l_tracepoint_action_send): New.
13747 (cmd_qtdp): Download and install tracepoint
13748 according to `use_agent'.
13749 (run_inferior_command): Add one more parameter `len'.
13750 Update callers.
13751 (tracepoint_send_agent): New.
13752 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
13753
13754 2012-04-16 Yao Qi <yao@codesourcery.com>
13755
13756 * tracepoint.c (download_tracepoints): Moved to ...
13757 (cmd_qtstart): ... here.
13758
13759 2012-04-14 Yao Qi <yao@codesourcery.com>
13760
13761 * tracepoint.c: Include inttypes.h.
13762 (struct collect_memory_action): Use sized types.
13763 (struct tracepoint): Likewise.
13764 (cmd_qtdp, stop_tracing): Update print specifiers.
13765 (cmd_qtp, response_tracepoint): Likewise.
13766 (collect_data_at_tracepoint): Likewise.
13767 (collect_data_at_step): Likewise.
13768
13769 2012-04-14 Yao Qi <yao@codesourcery.com>
13770
13771 Import gnulib module inttypes.
13772 * aclocal.m4, config.in, configure: Regenerated.
13773
13774 2012-04-14 Yao Qi <yao@codesourcery.com>
13775
13776 * Makefile.in (maintainer-clean, realclean, distclean): Remove
13777 Makefile and config.status at last.
13778
13779 2012-04-13 Yao Qi <yao@codesourcery.com>
13780
13781 * tracepoint.c: Include stdint.h unconditionally.
13782
13783 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13784
13785 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
13786 on BFD_HAVE_SYS_PROCFS_TYPE.
13787 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
13788 * configure: Regenerate.
13789 * config.in: Likewise.
13790
13791 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
13792
13793 * Makefile.in (clean): Also remove x32.c x32-linux.c
13794 x32-avx.c x32-avx-linux.c.
13795 (x32.o): New target.
13796 (x32.c): Likewise.
13797 (x32-linux.o): Likewise.
13798 (x32-linux.c): Likewise.
13799 (x32-avx.o): Likewise.
13800 (x32-avx.c): Likewise.
13801 (x32-avx-linux.o): Likewise.
13802 (x32-avx-linux.c): Likewise.
13803
13804 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
13805 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
13806 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
13807 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
13808 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
13809 i386/x32-avx-linux.xml.
13810
13811 * linux-x86-low.c (init_registers_x32_linux): New prototype.
13812 (init_registers_x32_avx_linux): Likwise.
13813 (x86_linux_update_xmltarget): Call init_registers_x32_linux
13814 or init_registers_x32_avx_linux if linux_is_elf64 is false.
13815
13816 2012-04-13 Pedro Alves <palves@redhat.com>
13817
13818 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
13819 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
13820 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
13821 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
13822 the sub-make.
13823
13824 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
13825
13826 * linux-x86-low.c (compat_x32_clock_t): New.
13827 (compat_x32_siginfo_t): Likewise.
13828 (compat_x32_siginfo_from_siginfo): Likewise.
13829 (siginfo_from_compat_x32_siginfo): Likewise.
13830 (linux_is_elf64): Likewise.
13831 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
13832 and siginfo_from_compat_x32_siginfo for x32.
13833 (x86_arch_setup): Set linux_is_elf64.
13834
13835 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
13836
13837 PR gdb/13969
13838 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
13839 e_machine field.
13840 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
13841 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
13842 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
13843 compatible with process.
13844
13845 2012-04-12 Yao Qi <yao@codesourcery.com>
13846
13847 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
13848 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
13849 (install-only, install-info, clean): Handle sub dir gnulib.
13850 (all-lib, am--refresh): New targets.
13851 (memmem.o): Remove target.
13852 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
13853 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
13854 (AC_REPLACE_FUNCS): Remove memmem.
13855 Invoke gl_INIT and AM_INIT_AUTOMAKE.
13856 (AC_OUTPUT): Generate Makefile in gnulib/.
13857 * aclocal.m4, config.in, configure: Regenerated.
13858
13859 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
13860
13861 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
13862
13863 2012-04-05 Pedro Alves <palves@redhat.com>
13864
13865 -Werror=strict-aliasing
13866
13867 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
13868 pointer.
13869
13870 2012-04-04 Pedro Alves <palves@redhat.com>
13871
13872 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13873 (sparc_store_gregset_from_stack, sparc_store_gregset)
13874 (sparc_breakpoint_at): Fix formatting.
13875
13876 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13877
13878 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
13879 are available.
13880 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
13881 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
13882 * config.in: Regenerate.
13883 * configure: Likewise.
13884
13885 2012-03-29 Pedro Alves <palves@redhat.com>
13886
13887 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
13888 Correct ptrace arguments.
13889
13890 2012-03-28 Pedro Alves <palves@redhat.com>
13891
13892 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
13893 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
13894 (IA64_FR1_REGNUM): New defines.
13895 (ia64_fetch_register): New.
13896 (the_low_target): Install it.
13897 * linux-low.h (struct linux_target_ops) <fetch_register>: New
13898 field.
13899 * linux-low.c (linux_fetch_registers): Try the
13900 the_low_target.fetch_register hook first.
13901
13902 * linux-arm-low.c (the_low_target): Adjust.
13903 * linux-bfin-low.c (the_low_target): Adjust.
13904 * linux-cris-low.c (the_low_target): Adjust.
13905 * linux-crisv32-low.c (the_low_target): Adjust.
13906 * linux-m32r-low.c (the_low_target): Adjust.
13907 * linux-m68k-low.c (the_low_target): Adjust.
13908 * linux-mips-low.c (the_low_target): Adjust.
13909 * linux-ppc-low.c (the_low_target): Adjust.
13910 * linux-s390-low.c (the_low_target): Adjust.
13911 * linux-sh-low.c (the_low_target): Adjust.
13912 * linux-sparc-low.c (the_low_target): Adjust.
13913 * linux-tic6x-low.c (the_low_target): Adjust.
13914 * linux-x86-low.c (the_low_target): Adjust.
13915 * linux-xtensa-low.c (the_low_target): Adjust.
13916
13917 2012-03-26 Pedro Alves <palves@redhat.com>
13918
13919 * server.c (handle_qxfer_libraries): Don't bail early if
13920 the_target->qxfer_libraries_svr4 is not NULL.
13921
13922 2012-03-26 Pedro Alves <palves@redhat.com>
13923
13924 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13925
13926 2012-03-23 Pedro Alves <palves@redhat.com>
13927
13928 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13929 "library-list-svr4" element's start tag when the the DSO list is
13930 empty.
13931
13932 2012-03-23 Pedro Alves <palves@redhat.com>
13933
13934 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13935 a variable whose type size is the same as the inferior's pointer
13936 size.
13937
13938 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13939
13940 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13941 struct siginfo.
13942 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13943 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13944 * linux-low.h: Include <signal.h>.
13945 (struct siginfo): Remove forward declaration.
13946 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13947 struct siginfo.
13948
13949 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13950
13951 * .gitignore: Ignore more files.
13952
13953 2012-03-19 Pedro Alves <palves@redhat.com>
13954 Jan Kratochvil <jan.kratochvil@redhat.com>
13955
13956 * server.c (cont_thread, general_thread): Add describing comments.
13957 (start_inferior): Clear `cont_thread'.
13958 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13959 of a process.
13960
13961 2012-03-15 Yao Qi <yao@codesourcery.com>
13962
13963 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13964 handling to ...
13965 (cmd_qtdp): ... here.
13966
13967 2012-03-15 Yao Qi <yao@codesourcery.com>
13968
13969 * tracepoint.c (struct tracepoint_action_ops): New.
13970 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13971 (m_tracepoint_action_download): New.
13972 (r_tracepoint_action_download): New.
13973 (x_tracepoint_action_download): New.
13974 (l_tracepoint_action_download): New.
13975 (add_tracepoint_action): Install `action->ops' according type.
13976 (download_tracepoint_1): Move code `download' function pointer
13977 of various tracepoint_action_ops.
13978
13979 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13980
13981 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13982 linux_ptrace_attach_warnings.
13983
13984 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13985
13986 * Makefile.in (linux-ptrace.o): New.
13987 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13988 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13989 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13990 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13991 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13992 of these targets.
13993 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13994
13995 2012-03-08 Yao Qi <yao@codesourcery.com>
13996 Pedro Alves <palves@redhat.com>
13997
13998 Fix PR server/13392.
13999 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
14000 offset of JMP insn.
14001 * tracepoint.c (remove_tracepoint): New.
14002 (cmd_qtdp): Call remove_tracepoint when failed to install.
14003
14004 2012-03-07 Pedro Alves <palves@redhat.com>
14005
14006 * linux-low.c (get_detach_signal): New.
14007 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
14008 Pass on pending signals to PTRACE_DETACH. Check the result of the
14009 ptrace call.
14010 * server.c (program_signals, program_signals_p): New.
14011 (handle_general_set): Handle QProgramSignals.
14012 * server.h (program_signals, program_signals_p): Declare.
14013
14014 2012-03-05 Pedro Alves <palves@redhat.com>
14015 Jan Kratochvil <jan.kratochvil@redhat.com>
14016
14017 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
14018 New comment why.
14019
14020 2012-03-03 Yao Qi <yao@codesourcery.com>
14021
14022 * tracepoint.c (tracepoint_look_up_symbols): Update call to
14023 agent_look_up_symbols.
14024
14025 2012-03-03 Yao Qi <yao@codesourcery.com>
14026
14027 * Makefile.in (linux-low.o): Keep dependence on agent.h.
14028 (linux-x86-low.o): Likewise.
14029 * server.h: Remove in_process_agent_loaded.
14030 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
14031 common/agent.c.
14032 Update callers.
14033
14034 2012-03-03 Yao Qi <yao@codesourcery.com>
14035
14036 * tracepoint.c (gdb_agent_capability): New global.
14037 (in_process_agent_loaded_ust): Renamed to
14038 `in_process_agent_supports_ust'.
14039 Update callers.
14040 (in_process_agent_supports_ust): Call agent_capability_check.
14041 (clear_installed_tracepoints): Assert that agent supports
14042 agent.
14043
14044 2012-03-03 Yao Qi <yao@codesourcery.com>
14045
14046 * linux-low.c (linux_supports_agent): New.
14047 (linux_target_ops): Initialize field `supports_agent' with
14048 linux_supports_agent.
14049 * target.h (struct target_ops) <supports_agent>: New.
14050 (target_supports_agent): New macro.
14051 * server.c (handle_general_set): Handle packet 'QAgent'.
14052 (handle_query): Send `QAgent+'.
14053 * Makefile.in (server.o): Depends on agent.h.
14054
14055 2012-03-03 Yao Qi <yao@codesourcery.com>
14056
14057 * Makefile.in (OBS): Add agent.o.
14058 Add new rule for agent.o.
14059 Track dependence of tracepoint.c on agent.h.
14060 * tracepoint.c (run_inferior_command_1):
14061 (run_inferior_command): Call agent_run_command.
14062 (gdb_ust_connect_sync_socket): Deleted. Move it to
14063 common/agent.c.
14064 (resume_thread, stop_thread): Likewise.
14065 (gdb_ust_socket_init): Renamed to ...
14066 (gdb_agent_socket_init): ... New.
14067 (gdb_ust_thread): Renamed to ...
14068 (gdb_agent_helper_thread): ... New.
14069 (gdb_ust_init): Move some code to ...
14070 (gdb_agent_init): ... here. New.
14071 [HAVE_UST]: Call gdb_ust_init.
14072 (initialize_tracepoint_ftlib): Call gdb_agent_init.
14073 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
14074 * config.in, configure: Regenerated.
14075
14076 2012-03-02 Pedro Alves <palves@redhat.com>
14077
14078 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
14079 * linux-low.c (struct simple_pid_list): New.
14080 (stopped_pids): New a struct simple_pid_list pointer.
14081 (add_to_pid_list, pull_pid_from_list): New.
14082 (handle_extended_wait): Don't assume the first signal new children
14083 report is SIGSTOP. Adjust call to pull_pid_from_list.
14084 (linux_wait_for_lwp): Adjust.
14085
14086 2012-03-02 Yao Qi <yao@codesourcery.com>
14087
14088 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
14089 debug log.
14090
14091 2012-03-02 Yao Qi <yao@codesourcery.com>
14092
14093 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
14094 `stop_pc' and `tpoint'. Update caller.
14095
14096 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
14097
14098 * linux-low.h (linux_target_ops): Add regset_bitmap member.
14099 * linux-low.c (use_linux_regsets): New macro.
14100 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
14101 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
14102 (linux_register_in_regsets): New function.
14103 (usr_fetch_inferior_registers): Skip registers covered by
14104 regsets.
14105 (usr_store_inferior_registers): Likewise.
14106 (usr_fetch_inferior_registers): New macro.
14107 (usr_store_inferior_registers): Likewise.
14108 (linux_fetch_registers): Handle mixed regset/non-regset targets.
14109 (linux_store_registers): Likewise.
14110 * linux-mips-low.c (init_registers_mips_dsp_linux): New
14111 prototype.
14112 (init_registers_mips64_dsp_linux): Likewise.
14113 (init_registers_mips_linux): New macro.
14114 (init_registers_mips_dsp_linux): Likewise.
14115 (mips_dsp_num_regs): Likewise.
14116 (DSP_BASE, DSP_CONTROL): New fallback macros.
14117 (mips_base_regs): New macro.
14118 (mips_regmap): Use it. Fix the size.
14119 (mips_dsp_regmap): New variable.
14120 (mips_dsp_regset_bitmap): Likewise.
14121 (mips_arch_setup): New function.
14122 (mips_cannot_fetch_register): Use the_low_target.regmap rather
14123 than mips_regmap.
14124 (mips_cannot_store_register): Likewise.
14125 (the_low_target): Update .arch_setup, .num_regs and .regmap
14126 initializers. Add .regset_bitmap initializer.
14127 * linux-arm-low.c (the_low_target): Add .regset_bitmap
14128 initializer.
14129 * linux-bfin-low.c (the_low_target): Likewise.
14130 * linux-cris-low.c (the_low_target): Likewise.
14131 * linux-crisv32-low.c (the_low_target): Likewise.
14132 * linux-ia64-low.c (the_low_target): Likewise.
14133 * linux-m32r-low.c (the_low_target): Likewise.
14134 * linux-m68k-low.c (the_low_target): Likewise.
14135 * linux-ppc-low.c (the_low_target): Likewise.
14136 * linux-s390-low.c (the_low_target): Likewise.
14137 * linux-sh-low.c (the_low_target): Likewise.
14138 * linux-sparc-low.c (the_low_target): Likewise.
14139 * linux-tic6x-low.c (the_low_target): Likewise.
14140 * linux-x86-low.c (the_low_target): Likewise.
14141 * linux-xtensa-low.c (the_low_target): Likewise.
14142 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
14143 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
14144 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
14145 srv_xmlfiles.
14146 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
14147 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
14148
14149 2012-02-29 Yao Qi <yao@codesourcery.com>
14150 Pedro Alves <palves@redhat.com>
14151
14152 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
14153 `step_over_finished' is true.
14154
14155 2012-02-27 Pedro Alves <palves@redhat.com>
14156
14157 * linux-low.c (pid_is_stopped): Delete, moved to common/.
14158 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
14159
14160 2012-02-27 Pedro Alves <palves@redhat.com>
14161
14162 PR server/9684
14163 * linux-low.c (pid_is_stopped): New.
14164 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
14165
14166 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
14167
14168 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
14169 of conditions.
14170
14171 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
14172
14173 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
14174
14175 2012-02-24 Luis Machado <lgustavo@codesourcery>
14176
14177 * server.c (handle_query): Advertise support for target-side
14178 breakpoint condition evaluation.
14179 (process_point_options): New function.
14180 (process_serial_event): When inserting a breakpoint, check for
14181 a target-side condition that should be evaluated.
14182
14183 * mem-break.c: Include regcache.h and ax.h.
14184 (point_cond_list_t): New data structure.
14185 (breakpoint) <cond_list>: New field.
14186 (find_gdb_breakpoint_at): Make non-static.
14187 (delete_gdb_breakpoint_at): Clear any target-side
14188 conditions.
14189 (clear_gdb_breakpoint_conditions): New function.
14190 (add_condition_to_breakpoint): Likewise.
14191 (add_breakpoint_condition): Likewise.
14192 (gdb_condition_true_at_breakpoint): Likewise.
14193 (gdb_breakpoint_here): Return result directly instead
14194 of going through a local variable.
14195
14196 * mem-break.h (find_gdb_breakpoint_at): New prototype.
14197 (clear_gdb_breakpoint_conditions): Likewise.
14198 (add_breakpoint_condition): Likewise.
14199 (gdb_condition_true_at_breakpoint): Likewise.
14200
14201 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
14202 (need_step_over_p): Take target-side breakpoint condition into
14203 consideration.
14204
14205 2012-02-24 Luis Machado <lgustavo@codesourcery>
14206
14207 * server.h: Include tracepoint.h.
14208 (agent_mem_read, agent_get_trace_state_variable_value,
14209 agent_set_trace_state_variable_value,
14210 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
14211 get_set_tsv_func_addr): New prototypes.
14212
14213 * ax.h: New include file.
14214 * ax.c: New source file.
14215
14216 * tracepoint.c: Include ax.h.
14217 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
14218 agent_expr, eval_result_type): Move to ax.h.
14219 (parse_agent_expr): Rename to ...
14220 (gdb_parse_agent_expr): ... this, make it non-static and move
14221 to ax.h.
14222 (unparse_agent_expr) Rename to ...
14223 (gdb_unparse_agent_expr): ... this, make it non-static and move
14224 to ax.h.
14225 (eval_agent_expr): Rename to ...
14226 (eval_tracepoint_agent_expr): ... this.
14227 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
14228 forward declarations.
14229 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
14230 (agent_get_trace_state_variable_value): New function.
14231 (agent_set_trace_state_variable_value): New function.
14232 (cmd_qtdp): Call gdb_parse_agent_expr (...).
14233 (response_tracepoint): Call gdb_unparse_agent_expr (...).
14234 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
14235 (condition_true_at_tracepoint): Likewise.
14236 (parse_agent_expr): Rename to ...
14237 (gdb_parse_agent_expr): ... this and move to ax.c.
14238 (unparse_agent_expr): Rename to ...
14239 (gdb_unparse_agent_expr): ... this and move to ax.c.
14240 (gdb_agent_op_name): Move to ax.c.
14241 (eval_agent_expr): Rename to ...
14242 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
14243 and move to ax.c.
14244 (eval_tracepoint_agent_expr): New function.
14245 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
14246 non-static.
14247 (current_insn_ptr, emit_error, struct bytecode_address): Move to
14248 ax.c.
14249 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
14250 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
14251 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
14252 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
14253 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
14254 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
14255 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
14256 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
14257 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
14258 (compile_bytecodes): Remove forward declaration.
14259 (is_goto_target): Move to ax.c.
14260 (compile_bytecodes): Move to ax.c and call
14261 agent_get_trace_state_variable_value (...) and
14262 agent_set_trace_state_variable_value (...).
14263
14264 * Makefile.in: Update ax.c and IPA dependencies.
14265
14266 2012-02-24 Pedro Alves <palves@redhat.com>
14267
14268 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
14269 (cmd_bigqtbuffer_circular): ... this. Only handle
14270 'QTBuffer:circular:'.
14271 (handle_tracepoint_general_set): Adjust.
14272
14273 2012-02-16 Yao Qi <yao@codesourcery.com>
14274
14275 * inferiors.c: Move code to ...
14276 * dll.c: .... here. New.
14277 * server.h: Declare clear_dlls.
14278 * Makefile.in (SFILES): Add dll.c.
14279 (OBS): Add dll.o
14280 (dll.o): New rule.
14281
14282 2012-02-11 Yao Qi <yao@codesourcery.com>
14283
14284 * server.c: (handle_monitor_command): Add a new parameter
14285 `own_buf'.
14286 (handle_query): Update caller.
14287
14288 2012-02-09 Joel Brobecker <brobecker@adacore.com>
14289
14290 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
14291 * configure, config.in: Regenerate.
14292 * hostio.c: Provide an alternate implementation if HAVE_READLINK
14293 is not defined.
14294
14295 2012-02-02 Pedro Alves <palves@redhat.com>
14296
14297 Try SIGKILL first, then PTRACE_KILL.
14298 * linux-low.c (linux_kill_one_lwp): New.
14299 (linux_kill_one_lwp): Rename to ...
14300 (kill_one_lwp_callback): ... this. Use the new
14301 linux_kill_one_lwp.
14302
14303 2012-02-02 Pedro Alves <palves@redhat.com>
14304
14305 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
14306 inferior.
14307
14308 2012-01-27 Pedro Alves <palves@redhat.com>
14309
14310 * linux-low.c (linux_child_pid_to_exec_file): Delete.
14311 (elf_64_file_p): Make static.
14312 (linux_pid_exe_is_elf_64_file): New.
14313 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
14314 Delete declarations.
14315 (linux_pid_exe_is_elf_64_file): Declare.
14316 * linux-x86-low.c (x86_arch_setup): Use
14317 linux_pid_exe_is_elf_64_file.
14318
14319 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14320
14321 * linux-low.c (linux_wait_for_event_1): Rename to ...
14322 (linux_wait_for_event): ... here and merge it with former
14323 linux_wait_for_event - new variable wait_ptid, use it.
14324 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
14325
14326 2012-01-23 Pedro Alves <palves@redhat.com>
14327
14328 * server.c (main): Avoid yet another case of infinite loop while
14329 detaching/killing after a longjmp.
14330
14331 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14332
14333 Code cleanup.
14334 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
14335
14336 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
14337
14338 * hostio.c (handle_readlink): New function.
14339 (handle_vFile): Call it to handle "vFile:readlink" packets.
14340
14341 2012-01-20 Pedro Alves <palves@redhat.com>
14342 Ulrich Weigand <ulrich.weigand@linaro.org>
14343
14344 * server.c (handle_v_requests): Only support vAttach and vRun to
14345 start multiple processes when in extended protocol mode.
14346
14347 2012-01-17 Pedro Alves <palves@redhat.com>
14348
14349 * tracepoint.c (initialize_tracepoint): Use mmap instead of
14350 memalign plus mprotect to allocate the scratch buffer.
14351
14352 2012-01-13 Pedro Alves <palves@redhat.com>
14353
14354 * server.c (attach_inferior): Clear `cont_thread'.
14355
14356 2012-01-13 Pedro Alves <palves@redhat.com>
14357
14358 * server.c (main): Avoid infinite loop while detaching/killing
14359 after a longjmp.
14360
14361 2012-01-09 Doug Evans <dje@google.com>
14362
14363 * server.c (start_inferior): Set last_ptid in --wrapper case.
14364
14365 2012-01-06 Yao Qi <yao@codesourcery.com>
14366
14367 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
14368 defined.
14369 [IN_PROCESS_AGENT] (debug_agent): New global variable.
14370
14371 2012-01-04 Yao Qi <yao@codesourcery.com>
14372
14373 * tracepoint.c (cmd_qtdp): Print debug message
14374 for static tracepoint.
14375
14376 2012-01-04 Yao Qi <yao@codesourcery.com>
14377
14378 * tracepoint.c (trace_vdebug): Differentiate debug message
14379 between gdbserver and IPA.
14380
14381 2012-01-03 Yao Qi <yao@codesourcery.com>
14382
14383 * tracepoint.c (tracepoint_was_hit): Don't collect for
14384 static tracepoint.
14385
14386 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14387
14388 * terminal.h: Reformat copyright header.
14389
14390 2012-01-02 Joel Brobecker <brobecker@adacore.com>
14391
14392 * server.c (gdbserver_version): Update copyright year.
14393 * gdbreplay.c (gdbreplay_version): Likewise.
14394
14395 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
14396
14397 * linux-low.c (linux_create_inferior): Put empty if clause for write.
14398
14399 Revert:
14400 2011-12-18 Hui Zhu <teawater@gmail.com>
14401 * linux-low.c (linux_create_inferior): Save return value to ret.
14402
14403 2011-12-18 Hui Zhu <teawater@gmail.com>
14404
14405 * linux-low.c (linux_create_inferior): Save return value to ret.
14406
14407 2011-12-16 Doug Evans <dje@google.com>
14408
14409 * linux-low.c (linux_create_inferior): If stdio connection,
14410 redirect stdin from /dev/null, stdout to stderr.
14411 * remote-utils.c (remote_is_stdio): New static global.
14412 (remote_connection_is_stdio): New function.
14413 (remote_prepare): Handle stdio connection.
14414 (remote_open): Ditto.
14415 (remote_close): Don't close stdin for stdio connections.
14416 (read_prim,write_prim): New functions. Replace all calls to
14417 read/write to these.
14418 * server.c (main): Watch for "-" argument. Move call to
14419 remote_prepare before start_inferior.
14420 * server.h (STDIO_CONNECTION_NAME): New macro.
14421 (remote_connection_is_stdio): Declare.
14422
14423 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
14424 in debugging output.
14425
14426 2011-12-15 Yao Qi <yao@codesourcery.com>
14427
14428 * tracepoint.c: Include sys/syscall.h.
14429 (gdb_ust_thread): Remove preprocessor conditional.
14430
14431 2011-12-14 Pedro Alves <pedro@codesourcery.com>
14432
14433 * linux-low.c (linux_detach_one_lwp): Call
14434 the_low_target.prepare_to_resume before detaching.
14435
14436 2011-12-14 Yao Qi <yao@codesourcery.com>
14437
14438 * tracepoint.c (gdb_ust_thread): Don't ignore return value
14439 of write.
14440
14441 2011-12-14 Yao Qi <yao@codesourcery.com>
14442
14443 * i386-low.c (i386_low_stopped_data_address): Initialize local
14444 variable `control'.
14445
14446 2011-12-13 Pedro Alves <pedro@codesourcery.com>
14447
14448 PR remote/13492
14449
14450 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
14451 DR_CONTROL unless necessary. Extend comments.
14452 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
14453 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
14454
14455 2011-12-13 Yao Qi <yao@codesourcery.com>
14456
14457 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
14458 macros.
14459 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
14460
14461 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
14462
14463 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
14464 Print new debug message for such case.
14465
14466 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14467
14468 Fix overlapping memcpy.
14469 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
14470 the read_inferior_memory transfer.
14471 (delete_fast_tracepoint_jump): New variable buf. Use it for the
14472 write_inferior_memory transfer.
14473 (set_fast_tracepoint_jump): New variable buf. Use it for the
14474 read_inferior_memory and write_inferior_memory transfers.
14475 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
14476 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
14477 Use it for the write_inferior_memory transfer.
14478 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
14479 buffers.
14480
14481 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14482
14483 * linux-low.c (fetch_register, store_register): Make code
14484 consistent, fix formatting.
14485
14486 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
14487
14488 * linux-low.c (usr_store_inferior_registers): Factor out code
14489 to handle individual registers into...
14490 (store_register): ... this new function.
14491
14492 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
14493
14494 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
14495 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
14496 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
14497 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
14498 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
14499 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
14500 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
14501 (srv_xmlfiles): Add new XML files.
14502
14503 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
14504 and <sys/uio.h>.
14505 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
14506 (init_registers_s390_linux32v1): Add prototype.
14507 (init_registers_s390_linux32v2): Likewise.
14508 (init_registers_s390_linux64v1): Likewise.
14509 (init_registers_s390_linux64v2): Likewise.
14510 (init_registers_s390x_linux64v1): Likewise.
14511 (init_registers_s390x_linux64v2): Likewise.
14512 (s390_num_regs): Increment to 52.
14513 (s390_regmap): Add orig_r2 register.
14514 (s390_num_regs_3264): Increment to 68.
14515 (s390_regmap_3264): Add orig_r2 register.
14516 (s390_collect_ptrace_register): Handle orig_r2 register.
14517 (s390_supply_ptrace_register): Likewise.
14518 (s390_fill_last_break): New function.
14519 (s390_store_last_break): Likewise.
14520 (s390_fill_system_call): New function.
14521 (s390_store_system_call): Likewise.
14522 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
14523 register sets.
14524 (s390_check_regset): New function.
14525 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
14526 NT_S390_SYSTEM_CALL regsets and use appropriate description.
14527 Update target_regsets for available register sets.
14528
14529 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
14530 Jan Kratochvil <jan.kratochvil@redhat.com>
14531
14532 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
14533 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
14534 New.
14535 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
14536 * linux-low.h (struct process_info_private): New member r_debug.
14537 * server.c (handle_qxfer_libraries): Call
14538 the_target->qxfer_libraries_svr4.
14539 (handle_qxfer_libraries_svr4): New function.
14540 (qxfer_packets): New entry "libraries-svr4".
14541 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
14542 * target.h (struct target_ops): New member qxfer_libraries_svr4.
14543 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
14544 PACKET_qXfer_libraries_svr4.
14545
14546 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
14547
14548 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
14549 PSW address/mask between 8-byte and 16-byte formats.
14550 (s390_supply_ptrace_register): Likewise.
14551 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
14552 basic addressing mode bit.
14553
14554 2011-11-24 Stan Shebs <stan@codesourcery.com>
14555
14556 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
14557
14558 2011-11-17 Stan Shebs <stan@codesourcery.com>
14559
14560 * tracepoint.c (struct tracepoint): New field traceframe_usage.
14561 (tracing_start_time): New global.
14562 (tracing_stop_time): New global.
14563 (tracing_user_name): New global.
14564 (tracing_notes): New global.
14565 (tracing_stop_note): New global.
14566 (cmd_qtstart): Set traceframe_usage, start_time.
14567 (stop_tracing): Set stop_time.
14568 (cmd_qtstatus): Report additional status.
14569 (cmd_qtp): New function.
14570 (handle_tracepoint_query): Call it.
14571 (cmd_qtnotes): New function.
14572 (handle_tracepoint_general_set): Call it.
14573 (get_timestamp): Rename from tsv_get_timestamp.
14574
14575 2011-11-14 Stan Shebs <stan@codesourcery.com>
14576 Kwok Cheung Yeung <kcy@codesourcery.com>
14577
14578 * linux-x86-low.c (small_jump_insn): New.
14579 (i386_install_fast_tracepoint_jump_pad): Add arguments for
14580 trampoline and error message, build a trampoline and issue a small
14581 jump instruction to it.
14582 (x86_install_fast_tracepoint_jump_pad): Add arguments for
14583 trampoline and error message.
14584 (x86_get_min_fast_tracepoint_insn_len): New.
14585 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
14586 * linux-low.h (struct linux_target_ops): Add arguments to
14587 install_fast_tracepoint_jump_pad operation, add new operation.
14588 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
14589 arguments.
14590 (linux_get_min_fast_tracepoint_insn_len): New function.
14591 (linux_target_op): Add new operation.
14592 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
14593 (gdb_trampoline_buffer_end): Ditto.
14594 (gdb_trampoline_buffer_error): Ditto.
14595 (struct ipa_sym_addresses): Add fields for new IPA variables.
14596 (symbol_list): Add entries for new IPA variables.
14597 (struct tracepoint): Add fields to hold the address range of the
14598 trampoline used by the tracepoint.
14599 (trampoline_buffer_head): New static variable.
14600 (trampoline_buffer_tail): Ditto.
14601 (claim_trampoline_space): New function.
14602 (have_fast_tracepoint_trampoline_buffer): New function.
14603 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
14604 structure.
14605 (install_fast_tracepoint): Ditto, also add error buffer argument.
14606 (cmd_qtminftpilen): New function.
14607 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
14608 (fast_tracepoint_from_trampoline_address): New function.
14609 (fast_tracepoint_collecting): Handle trampoline as part of jump
14610 pad space.
14611 (set_trampoline_buffer_space): New function.
14612 (initialize_tracepoint): Initialize new IPA variables.
14613 * target.h (struct target_ops): Add arguments to
14614 install_fast_tracepoint_jump_pad operation, add new
14615 get_min_fast_tracepoint_insn_len operation.
14616 (target_get_min_fast_tracepoint_insn_len): New.
14617 (install_fast_tracepoint_jump_pad): Add arguments.
14618 * server.h (IPA_BUFSIZ): Define.
14619 * linux-i386-ipa.c: Include extra header files.
14620 (initialize_fast_tracepoint_trampoline_buffer): New function.
14621 (initialize_low_tracepoint): Call it.
14622 * server.h (set_trampoline_buffer_space): Declare.
14623 (claim_trampoline_space): Ditto.
14624 (have_fast_tracepoint_trampoline_buffer): Ditto.
14625
14626 2011-11-14 Yao Qi <yao@codesourcery.com>
14627
14628 * server.c (handle_query): Handle InstallInTrace for qSupported.
14629 * tracepoint.c (add_tracepoint): Sort list.
14630 (install_tracepoint, download_tracepoint): New.
14631 (cmd_qtdp): Call them to install and download tracepoints.
14632 (sort_tracepoints): Removed.
14633 (cmd_qtstart): Update.
14634
14635 2011-11-14 Yao Qi <yao@codesourcery.com>
14636
14637 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
14638 * mem-break.h: Declare.
14639 * tracepoint.c (cmd_qtstart): Move some code to ...
14640 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
14641 New.
14642 (download_tracepoints): Move some code to ...
14643 (download_tracepoint_1): ... here. New.
14644
14645 2011-11-08 Yao Qi <yao@codesourcery.com>
14646
14647 * remote-utils.c (relocate_instruction): A comment fix.
14648
14649 2011-11-07 Joel Brobecker <brobecker@adacore.com>
14650
14651 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
14652 (i386_dr_low_get_control, i386_dr_low_get_status): Use
14653 dr_status_mirror and dr_control_mirror from debug_reg_state.
14654 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
14655 (i386_initial_stuff): Remove use of deleted globals.
14656 (i386_get_thread_context, i386_set_thread_context,
14657 i386_thread_added): Use dr_status_mirror and dr_control_mirror
14658 from debug_reg_state.
14659
14660 2011-11-05 Yao Qi <yao@codesourcery.com>
14661
14662 * tracepoint.c (gdb_collect): Loop over tracepoints of same
14663 address as TPOINT's.
14664
14665 2011-11-02 Stan Shebs <stan@codesourcery.com>
14666
14667 * tracepoint.c (agent_mem_read_string): New function.
14668 (eval_agent_expr): Call it for tracenz.
14669 * server.c (handle_query): Report support for tracenz.
14670
14671 2011-11-02 Yao Qi <yao@codesourcery.com>
14672
14673 * tracepoint.c (cmd_qtstart): Remove unused local variables.
14674
14675 2011-11-02 Yao Qi <yao@codesourcery.com>
14676
14677 * target.h: Fix a typo in comment.
14678
14679 2011-10-31 Pedro Alves <pedro@codesourcery.com>
14680
14681 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
14682 clobber the breakpoints' shadows with fast tracepoint jumps.
14683 * mem-break.h (check_mem_write): Add `myaddr' parameter.
14684 * target.c (write_inferior_memory): Also pass MYADDR down to
14685 check_mem_write.
14686
14687 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
14688
14689 * configure.ac: Check support for personality routine.
14690 * configure: Regenerate.
14691 * config.in: Likewise.
14692 * linux-low.c: Include <sys/personality.h>.
14693 Define ADDR_NO_RANDOMIZE if necessary.
14694 (linux_create_inferior): Disable address space randomization when
14695 forking inferior, if requested.
14696 (linux_supports_disable_randomization): New function.
14697 (linux_target_ops): Install it.
14698 * server.h (disable_randomization): Declare.
14699 * server.c (disable_randomization): New global variable.
14700 (handle_general_set): Handle QDisableRandomization.
14701 (handle_query): Likewise for qSupported.
14702 (main): Support --disable-randomization and --no-disable-randomization
14703 command line arguments.
14704 * target.h (struct target_ops): Add supports_disable_randomization.
14705 (target_supports_disable_randomization): New macro.
14706
14707 2011-09-29 Mike Frysinger <vapier@gentoo.org>
14708
14709 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
14710 ifdef check.
14711 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
14712 [!PT_GETDSBT] (target_loadmap): New definition.
14713 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
14714 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
14715 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
14716 and PT_GETDSBT to LINUX_LOADMAP.
14717 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
14718 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
14719
14720 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
14721
14722 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
14723 (arm_linux_hwbp_cap): New static variable.
14724 (arm_linux_get_hwbp_cap): Replace by ...
14725 (arm_linux_init_hwbp_cap): ... this new function.
14726 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
14727 (arm_linux_get_hw_watchpoint_count): Likewise.
14728 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14729 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
14730 (arm_prepare_to_resume): Use perror_with_name instead of error.
14731
14732 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
14733
14734 * linux-arm-low.c: Include <signal.h>.
14735 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
14736 (struct arm_linux_hwbp_cap): New data type.
14737 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
14738 (struct arm_linux_hw_breakpoint): New data type.
14739 (MAX_BPTS, MAX_WPTS): Define.
14740 (struct arch_process_info, struct arch_lwp_info): New data types.
14741 (arm_linux_get_hwbp_cap): New function.
14742 (arm_linux_get_hw_breakpoint_count): Likewise.
14743 (arm_linux_get_hw_watchpoint_count): Likewise.
14744 (arm_linux_get_hw_watchpoint_max_length): Likewise.
14745 (arm_hwbp_control_initialize): Likewise.
14746 (arm_hwbp_control_is_enabled): Likewise.
14747 (arm_hwbp_control_is_initialized): Likewise.
14748 (arm_hwbp_control_disable): Likewise.
14749 (arm_linux_hw_breakpoint_equal): Likewise.
14750 (arm_linux_hw_point_initialize): Likewise.
14751 (struct update_registers_data): New data structure.
14752 (update_registers_callback: New function.
14753 (arm_insert_point): Likewise.
14754 (arm_remove_point): Likewise.
14755 (arm_stopped_by_watchpoint): Likewise.
14756 (arm_stopped_data_address): Likewise.
14757 (arm_new_process): Likewise.
14758 (arm_new_thread): Likewise.
14759 (arm_prepare_to_resume): Likewise.
14760 (the_low_target): Register arm_insert_point, arm_remove_point,
14761 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
14762 arm_new_thread, and arm_prepare_to_resume.
14763
14764 2011-09-15 Stan Shebs <stan@codesourcery.com>
14765
14766 * server.h (struct emit_ops): Add compare-goto fields.
14767 * tracepoint.c (gdb_agent_op_sizes): New table.
14768 (emit_eq_goto): New function.
14769 (emit_ne_goto): New function.
14770 (emit_lt_goto): New function.
14771 (emit_le_goto): New function.
14772 (emit_gt_goto): New function.
14773 (emit_ge_goto): New function.
14774 (is_goto_target): New function.
14775 (compile_bytecodes): Recognize special cases of compare-goto
14776 combinations and call specialized emitters for them.
14777 * linux-x86-low.c (amd64_emit_eq_goto): New function.
14778 (amd64_emit_ne_goto): New function.
14779 (amd64_emit_lt_goto): New function.
14780 (amd64_emit_le_goto): New function.
14781 (amd64_emit_gt_goto): New function.
14782 (amd64_emit_ge_goto): New function.
14783 (amd64_emit_ops): Add the new functions.
14784 (i386_emit_eq_goto): New function.
14785 (i386_emit_ne_goto): New function.
14786 (i386_emit_lt_goto): New function.
14787 (i386_emit_le_goto): New function.
14788 (i386_emit_gt_goto): New function.
14789 (i386_emit_ge_goto): New function.
14790 (i386_emit_ops): Add the new functions.
14791
14792 2011-09-08 Stan Shebs <stan@codesourcery.com>
14793
14794 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
14795 (i386_emit_epilogue): Restore %ebx.
14796
14797 2011-08-31 Jie Zhang <jzhang918@gmail.com>
14798
14799 * server.c (step_thread): Remove definition.
14800 (process_serial_event): Don't handle Hs.
14801 * server.h (step_thread): Remove declaration.
14802 * target.c (set_desired_inferior): Remove use of step_thread.
14803
14804 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
14805
14806 * linux-low.c: Include linux-procfs.h.
14807 (linux_attach_lwp_1): Update comments.
14808 (linux_attach): Scan for existing threads when attaching to a
14809 process that is the tgid.
14810 * Makefile.in: Update dependencies.
14811
14812 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
14813
14814 * configure.srv: Add linux-procfs.o dependencies.
14815
14816 2011-08-14 Yao Qi <yao@codesourcery.com>
14817
14818 * target.h (struct target_ops): Fix indent.
14819 * win32-low.c (win32_target_ops): Fix comment.
14820
14821 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
14822 Yao Qi <yao@codesourcery.com>
14823
14824 * Makefile.in (clean): Remove tic6x-*.c files.
14825 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
14826 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
14827 (tic6x-c64xp-linux.c): Likewise.
14828 * configure.srv: Add support for tic6x-*-uclinux.
14829 * linux-tic6x-low.c: New.
14830 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
14831
14832 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
14833 Yao Qi <yao@codesourcery.com>
14834
14835 * target.h (struct target_ops): Add read_loadmap.
14836 * linux-low.c (struct target_loadseg): New type.
14837 (struct target_loadmap): New type.
14838 (linux_read_loadmap): New function.
14839 (linux_target_ops): Add linux_read_loadmap.
14840 * server.c (handle_query): Support qXfer:fdpic:read packet.
14841 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
14842 to NULL.
14843
14844 2011-08-05 Eli Zaretskii <eliz@gnu.org>
14845
14846 * win32-low.c: Include <stdint.h>.
14847
14848 2011-07-22 Pedro Alves <pedro@codesourcery.com>
14849
14850 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
14851 to the inferior here.
14852 (i386_remove_aligned_watchpoint): Ditto.
14853 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
14854 fit part of the watchpoint in the debug registers.
14855 (i386_update_inferior_debug_regs): New.
14856 (i386_low_insert_watchpoint): Work on a local mirror of the debug
14857 registers, and only update the inferior on success.
14858 (i386_low_remove_watchpoint): Ditto.
14859
14860 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
14861
14862 * linux-low.c (compare_ints, unique, list_threads, show_process,
14863 linux_core_of_thread): Delete.
14864 (linux_target_ops): Change linux_core_of_thread to
14865 linux_common_core_of_thread.
14866 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
14867 * utils.c (malloc_failure): Change type of argument.
14868 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
14869 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
14870 common/linux-osdata.c, common/ptid.c and common/buffer.c.
14871 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
14872 (IPA_OBJS): Add common-utils-ipa.o.
14873 (ptid_h, linux_osdata_h): New macros.
14874 (server_h): Add common/common-utils.h, common/xml-utils.h,
14875 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
14876 common/ptid.h.
14877 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
14878 ptid.o, buffer.o): New rules.
14879 (linux-low.o): Add common/linux-osdata.h as a dependency.
14880 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
14881 * configure.ac: Add AC_HEADER_DIRENT check.
14882 * config.in: Regenerate.
14883 * configure: Regenerate.
14884 * remote-utils.c (xml_escape_text): Delete.
14885 (buffer_grow, buffer_free, buffer_init, buffer_finish,
14886 buffer_xml_printf): Move to common/buffer.c.
14887 * server.c (main): Remove call to initialize_inferiors.
14888 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
14889 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
14890 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
14891 internal_error, gdb_assert, gdb_assert_fail): Delete.
14892 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
14893 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
14894 common/buffer.h.
14895 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
14896 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
14897 initialize_inferiors): Delete.
14898
14899 2011-07-20 Pedro Alves <pedro@codesourcery.com>
14900
14901 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
14902 symbol error.
14903
14904 2011-05-31 Pedro Alves <pedro@codesourcery.com>
14905
14906 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
14907 assertion.
14908 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14909
14910 2011-05-26 Yao Qi <yao@codesourcery.com>
14911
14912 * Makefile.in (thread-db.o): Track dependence to
14913 common/gdb_thread_db.h.
14914 * thread-db.c: include gdb_thread_db.h from right place.
14915
14916 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14917
14918 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14919 __FILE__ and __LINE__ to internal_error.
14920
14921 2011-05-13 Doug Evans <dje@google.com>
14922
14923 * thread-db.c (try_thread_db_load_from_sdir): New function.
14924 (try_thread_db_load_from_dir): New function.
14925 (thread_db_load_search): Handle $sdir, ignore $pdir.
14926 Remove trying of system directories if search of
14927 libthread-db-search-path fails, that is now done via $sdir.
14928
14929 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14930
14931 * server.c (handle_query): Add EnableDisableTracepoints to the list
14932 of supported features.
14933 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14934 tracepoints.
14935 (cmd_qtenable_disable): New.
14936 (cmd_qtstart): Install tracepoints even if disabled.
14937 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14938 receiving a QTEnable or QTDisable packet.
14939 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14940 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14941 tracepoints.
14942 (gdb_probe): Skip data collection if static tracepoint is disabled.
14943
14944 2011-05-10 Doug Evans <dje@google.com>
14945
14946 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14947
14948 2011-05-04 Doug Evans <dje@google.com>
14949
14950 * linux-low.c (linux_join): Skip process lookup.
14951 * spu-low.c (spu_join): Ditto.
14952 * server.c (join_inferiors_callback): Delete.
14953 (process_serial_event): For 'D' packet (detach) call join_inferior
14954 directly.
14955
14956 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14957
14958 * README: Don't mention xscale*-*-linux*.
14959 * configure.srv (xscale*-*-linux*): Don't handle target.
14960
14961 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14962
14963 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14964 casting pointers.
14965 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14966 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14967 (i386_emit_void_call_2): Likewise.
14968
14969 2011-04-26 Yao Qi <yao@codesourcery.com>
14970
14971 * linux-low.c: Move common macros to linux-ptrace.h.
14972 Include linux-ptrace.h.
14973 * Makefile.in (linux_ptrace_h): New.
14974 (linux-low.o): Depends on linux-ptrace.h.
14975
14976 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14977
14978 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14979 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14980 (remote_prepare): New function with most of the TCP code from ...
14981 (remote_open): ... here. Detect PORT here unconditionally. Move also
14982 setting transport_is_reliable.
14983 * server.c (run_once): New variable.
14984 (gdbserver_usage): Document it.
14985 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14986 the first run if RUN_ONCE.
14987 * server.h (run_once, remote_prepare): New declarations.
14988
14989 2011-04-19 Tom Tromey <tromey@redhat.com>
14990
14991 * win32-low.c (handle_load_dll): Remove duplicate "the".
14992
14993 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14994
14995 Remove support for old Cygwin 1.5 versions.
14996 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14997 function to avoid warning.
14998 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14999 warning.
15000
15001 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
15002
15003 * gdbserver/server.h (Macro _): Define it if not available.
15004
15005 2011-03-14 Michael Snyder <msnyder@vmware.com>
15006
15007 * hostio.c (handle_close): Remove unnecessary null test.
15008
15009 2011-03-10 Joel Brobecker <brobecker@adacore.com>
15010
15011 * Makefile.in (maintainer-clean realclean distclean): Remove
15012 "make ... subdir_do" command.
15013
15014 2011-03-10 Michael Snyder <msnyder@vmware.com>
15015
15016 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
15017
15018 * server.c (handle_v_run): Free alloced buffer on early return.
15019
15020 2011-03-09 Yao Qi <yao@codesourcery.com>
15021
15022 Revert:
15023 2011-03-04 Yao Qi <yao@codesourcery.com>
15024
15025 * Makefile.in: Remove GNU make feature --directory.
15026
15027 2011-03-05 Yao Qi <yao@codesourcery.com>
15028
15029 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15030 (subdir_do): New make target. Copied from gdb/Makefile.
15031 (maintainer-clean, realclean, distclean, clean): Call corresponding
15032 make targets in common/Makefile.
15033
15034 2011-02-11 Yao Qi <yao@codesourcery.com>
15035
15036 * configure.ac: Call AC_PROG_RANLIB.
15037 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15038 * configure: Regenerate.
15039
15040 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15041
15042 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
15043
15044 2011-03-06 Yao Qi <yao@codesourcery.com>
15045
15046 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
15047
15048 2011-03-05 Yao Qi <yao@codesourcery.com>
15049
15050 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
15051 (subdir_do): New make target. Copied from gdb/Makefile.
15052 (maintainer-clean, realclean, distclean, clean): Call corresponding
15053 make targets in common/Makefile.
15054
15055 2011-03-04 Yao Qi <yao@codesourcery.com>
15056
15057 * Makefile.in: Remove GNU make feature --directory.
15058
15059 2011-03-04 Michael Snyder <msnyder@vmware.com>
15060
15061 * server.c (queue_stop_reply): Call xmalloc not malloc.
15062
15063 2011-03-02 Michael Snyder <msnyder@vmware.com>
15064
15065 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
15066
15067 2011-02-28 Michael Snyder <msnyder@vmware.com>
15068
15069 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
15070 (cmd_qtframe): Ditto.
15071 (cmd_qtbuffer): Ditto.
15072 (cmd_bigqtbuffer): Ditto.
15073
15074 * utils.c (decimal2str): Initialize 'width' to nine, then
15075 don't mess with it.
15076
15077 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15078
15079 * hostio.c (require_data): Free *data, not data.
15080
15081 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15082
15083 * hostio.c (require_data): Use free, not xfree.
15084
15085 2011-02-27 Michael Snyder <msnyder@vmware.com>
15086
15087 * server.c (handle_query): Discard unused value.
15088
15089 * hostio.c (require_data): Free malloc memory before returning
15090 error.
15091
15092 2011-02-26 Michael Snyder <msnyder@vmware.com>
15093
15094 * linux-low.c (list_threads): Call closedir for dirent.
15095
15096 2011-02-27 Michael Snyder <msnyder@vmware.com>
15097
15098 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
15099 a case statement falls through.
15100
15101 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
15102
15103 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
15104 in comparison.
15105
15106 2011-02-26 Michael Snyder <msnyder@vmware.com>
15107
15108 * utils.c (decimal2str): Eliminate dead code and dead param.
15109 (pulongest): Drop dead param from call to decimal2str.
15110 (plongest): Ditto.
15111
15112 2011-02-24 Joel Brobecker <brobecker@adacore.com>
15113
15114 Revert the following patch (not approved yet):
15115 2011-02-21 Hui Zhu <teawater@gmail.com>
15116 * tracepoint.c (tp_printf): New function.
15117 (eval_agent_expr): Handle gdb_agent_op_printf.
15118
15119 2011-02-21 Hui Zhu <teawater@gmail.com>
15120
15121 * tracepoint.c (tp_printf): New function.
15122 (eval_agent_expr): Handle gdb_agent_op_printf.
15123
15124 2011-02-18 Tom Tromey <tromey@redhat.com>
15125
15126 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
15127 (tracepoint.o): Likewise.
15128 * tracepoint.c (enum gdb_agent_op): Use ax.def.
15129 (gdb_agent_op_names): Likewise.
15130
15131 2011-02-18 Tom Tromey <tromey@redhat.com>
15132
15133 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
15134 gdb_agent_op_rot>: New constants.
15135 (gdb_agent_op_names): Add pick and roll.
15136 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
15137 cases.
15138
15139 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15140
15141 * aclocal.m4: Regenerated with aclocal-1.11.1.
15142
15143 2011-02-14 Pedro Alves <pedro@codesourcery.com>
15144
15145 * server.c (handle_qxfer_traceframe_info): New.
15146 (qxfer_packets): Register "traceframe-info".
15147 (handle_query): Report support for qXfer:traceframe-info:read+.
15148 * tracepoint.c (match_blocktype): New.
15149 (traceframe_find_block_type): Rename to ...
15150 (traceframe_walk_blocks): ... this. Add callback filter argument,
15151 and use it.
15152 (traceframe_find_block_type): New, reimplemented on top of
15153 traceframe_walk_blocks.
15154 (build_traceframe_info_xml): New.
15155 (traceframe_read_info): New.
15156 * server.h (traceframe_read_info): Declare.
15157
15158 2011-02-11 Yao Qi <yao@codesourcery.com>
15159
15160 * configure.ac: Call AC_PROG_RANLIB.
15161 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
15162 * configure: Regenerate.
15163
15164 2011-02-07 Pedro Alves <pedro@codesourcery.com>
15165
15166 * server.c (gdb_read_memory): Change return semantics to allow
15167 partial transfers.
15168 (handle_search_memory_1): Adjust.
15169 (process_serial_event) <'m' packet>: Handle partial transfers.
15170 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
15171
15172 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15173
15174 * regcache.c (init_register_cache): Initialize
15175 regcache->register_status.
15176 (free_register_cache): Release regcache->register_status.
15177 (regcache_cpy): Copy register_status.
15178 (registers_to_string): Print 'x's for unavailable registers.
15179 (supply_register): Mark the register's status valid or
15180 unavailable, depending on whether a buffer was passed in or not.
15181 (supply_register_zeroed): New.
15182 (supply_regblock): Mark the registers' status valid or
15183 unavailable, depending on whether a buffer was passed in or not.
15184 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
15185 (struct regcache): New `register_status' field.
15186 (supply_register_zeroed): Declare.
15187 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
15188 supply_register_zeroed, rather than passing a NULL buffer to
15189 supply_register.
15190 * tracepoint.c (fetch_traceframe_registers): Update comment.
15191
15192 2011-01-28 Pedro Alves <pedro@codesourcery.com>
15193
15194 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
15195 buffer explicit.
15196
15197 2011-01-25 Pedro Alves <pedro@codesourcery.com>
15198
15199 * server.h (decode_xfer_write): Change prototype.
15200 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
15201 and don't extract the annex here.
15202 * server.c (decode_xfer_read): Remove `annex' parameter,
15203 and don't extract the annex here.
15204 (decode_xfer): New.
15205 (struct qxfer): New.
15206 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
15207 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
15208 (handle_qxfer_statictrace): New functions, abstracted out from
15209 handle_query, and made to use the struct qxfer interface.
15210 (handle_threads_qxfer_proper): Rename to ...
15211 (handle_qxfer_threads_proper): ... this.
15212 (handle_threads_qxfer): Rename to ...
15213 (handle_qxfer_threads): ... this. Adjust.
15214 (qxfer_packets): New array.
15215 (handle_qxfer): New function.
15216 (handle_query): Use handle_qxfer.
15217
15218 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
15219
15220 * gdbreplay.c: Shorten lines of >= 80 columns.
15221 * linux-low.c: Ditto.
15222 * linux-ppc-low.c: Ditto.
15223 * linux-s390-low.c: Ditto.
15224 * linux-sparc-low.c: Ditto.
15225 * linux-x86-low.c: Ditto.
15226 * linux-xtensa-low.c: Ditto.
15227 * mem-break.c: Ditto.
15228 * nto-low.c: Ditto.
15229 * regcache.h: Ditto.
15230 * remote-utils.c: Ditto.
15231 * server.c: Ditto.
15232 * server.h: Ditto.
15233 * thread-db.c: Ditto.
15234 * tracepoint.c: Ditto.
15235 * utils.c: Ditto.
15236 * win32-low.h: Ditto.
15237
15238 2011-01-05 Joel Brobecker <brobecker@adacore.com>
15239
15240 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
15241 update.
15242
15243 2011-01-01 Joel Brobecker <brobecker@adacore.com>
15244
15245 * server.c (gdbserver_version): Update copyright year in version
15246 output.
15247 * gdbreplay.c (gdbreplay_version): Ditto.
15248
15249 2010-12-29 Jie Zhang <jie.zhang@analog.com>
15250
15251 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
15252 * linux-bfin-low.c: New file.
15253 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
15254 PT_DATA_ADDR for BFIN targets.
15255 * Makefile.in (SFILES): Add linux-bfin-low.c.
15256 (clean): Remove reg-bfin.c.
15257 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
15258 * README: Mention supported Blackfin targets.
15259
15260 2010-12-23 Mike Frysinger <vapier@gentoo.org>
15261
15262 * .gitignore: New file.
15263
15264 2010-11-16 Mike Frysinger <vapier@gentoo.org>
15265
15266 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
15267
15268 2010-10-22 Jie Zhang <jie@codesourcery.com>
15269
15270 * Makefile.in: Add FLAGS_TO_PASS variable.
15271 (install): Remove dependency of install-only and recursively
15272 invoke make for install-only.
15273
15274 2010-10-04 Doug Evans <dje@google.com>
15275
15276 * Makefile.in (uninstall): Use $(DESTDIR).
15277
15278 2010-09-24 Pedro Alves <pedro@codesourcery.com>
15279
15280 PR gdb/11842
15281
15282 * linux-x86-low.c (compat_siginfo_from_siginfo)
15283 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
15284 si_code is < 0. Check for si_code == SI_TIMER before checking for
15285 si_code < 0.
15286
15287 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15288
15289 * lynx-i386-low.c: New file.
15290 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
15291
15292 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15293
15294 * lynx-low.c (ptrace_request_to_str): Remove handling for
15295 request values that have been removed in LynxOS 5.x.
15296
15297 2010-09-13 Joel Brobecker <brobecker@adacore.com>
15298
15299 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
15300 <ptrace.h>
15301
15302 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
15303
15304 * configure.ac: Add --enable-inprocess-agent option.
15305 * configure: Rebuilt.
15306
15307 2010-09-06 Yao Qi <yao@codesourcery.com>
15308
15309 * linux-low.c (linux_kill): Remove unused variable.
15310 (linux_stabilize_threads): Likewise.
15311 * server.c (start_inferior): Likewise.
15312 (queue_stop_reply_callback): Likewise.
15313 * tracepoint.c (do_action_at_tracepoint): Likewise.
15314
15315 2010-09-06 Yao Qi <yao@codesourcery.com>
15316
15317 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
15318 on return.
15319
15320 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15321
15322 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
15323
15324 2010-09-06 Pedro Alves <pedro@codesourcery.com>
15325
15326 * Makefile.in (install-only): Replace $IPA_DEPFILES with
15327 "$(IPA_DEPFILES)".
15328
15329 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15330
15331 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
15332 gdbserver/lynx-ppc-low.c: New files.
15333 * Makefile.in (lynx_low_h): New variable.
15334 (lynx-low.o, lynx-ppc-low.o): New rules.
15335 * configure.ac: On LynxOS, link with -lnetinet.
15336 * configure.srv: Add handling of powerpc-*-lynxos* targets.
15337 * configure: regenerate.
15338
15339 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15340
15341 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
15342 * configure.ac: Add check for vasprintf and vsnprintf.
15343 * configure, config.in: Regenerate.
15344 * server.h (vasprintf, vsnprintf): Add conditional declarations.
15345
15346 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15347
15348 * gdbreplay.c: Move include of alloca.h up, next to include of
15349 malloc.h.
15350 * server.h: Add include of malloc.h.
15351 * mem-break.c: Remove include of malloc.h.
15352 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
15353
15354 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15355
15356 * Makefile.in (memmem.o): Build with -Wno-error.
15357
15358 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15359
15360 * utils.c (xsnprintf): Make non-static.
15361 * server.h: Add xsnprintf declaration.
15362 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
15363 replace calls to snprintf by calls to xsnprintf throughout.
15364
15365 2010-09-01 Joel Brobecker <brobecker@adacore.com>
15366
15367 * configure.ac: Add configure check for alloca.
15368 * configure, config.in: Regenerate.
15369 * server.h: Include alloca.h if it exists.
15370 * gdbreplay.c: Include alloca.h if it exists.
15371
15372 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15373
15374 * linux-low.c (__SIGRTMIN): Define if not already defined.
15375 (linux_create_inferior): Check for __ANDROID__ rather than
15376 __SIGRTMIN.
15377 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
15378 are already deferred.
15379 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
15380 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
15381 stopped and already has a pending signal to report.
15382 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
15383 a pending signal to report or is moving out of a jump pad.
15384 (linux_init_signals): Check for __ANDROID__ rather than
15385 __SIGRTMIN.
15386
15387 2010-08-28 Pedro Alves <pedro@codesourcery.com>
15388
15389 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
15390 debug_threads check. Avoid a linear search when not doing debug
15391 output.
15392
15393 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15394
15395 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
15396 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
15397 (struct file_handler) <fd>: Change type to gdb_fildes_t.
15398 (process_event): Change local fd's type to gdb_fildes_t.
15399 (create_file_handler): Adjust prototype.
15400 (delete_file_handler): Adjust prototype.
15401 (handle_file_event): Adjust prototype. Use pfildes.
15402 (create_file_event): Adjsut prototype.
15403 * remote-utils.c (remote_desc, listen_desc): Change type to
15404 gdb_fildes_t.
15405 * server.h: New gdb_fildes_t typedef.
15406 [USE_WIN32API]: Include winsock2.h.
15407 (delete_file_handler, add_file_handler): Adjust prototypes.
15408 (pfildes): Declare.
15409 * utils.c (pfildes): New.
15410
15411 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15412
15413 * configure.ac (build_warnings): Add -Wno-char-subscripts.
15414 * configure: Regenerate.
15415
15416 2010-08-27 Pedro Alves <pedro@codesourcery.com>
15417
15418 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
15419 (linux_done_accessing_memory): ... this.
15420 (linux_target_ops): Adjust.
15421 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
15422 * nto-low.c (nto_target_ops): Adjust comment.
15423 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
15424 * spu-low.c (spu_target_ops): Adjust comment.
15425 * target.h (target_ops): Rename unprepare_to_access_memory field
15426 to done_accessing_memory.
15427 (unprepare_to_access_memory): Rename to ...
15428 (done_accessing_memory): ... this.
15429
15430 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15431
15432 * linux-low.c (linux_prepare_to_access_memory): New.
15433 (linux_unprepare_to_access_memory): New.
15434 (linux_target_ops): Install them.
15435 * server.c (read_memory): Rename to ...
15436 (gdb_read_memory): ... this. Use
15437 prepare_to_access_memory/prepare_to_access_memory.
15438 (write_memory): Rename to ...
15439 (gdb_write_memory): ... this. Use
15440 prepare_to_access_memory/prepare_to_access_memory.
15441 (handle_search_memory_1): Adjust.
15442 (process_serial_event): Adjust.
15443 * target.h (struct target_ops): New fields
15444 prepare_to_access_memory and unprepare_to_access_memory.
15445 (prepare_to_access_memory, unprepare_to_access_memory): New.
15446 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
15447 prepare_to_access_memory/prepare_to_access_memory.
15448 * nto-low.c (nto_target_ops): Adjust.
15449 * spu-low.c (spu_target_ops): Adjust.
15450 * win32-low.c (win32_target_ops): Adjust.
15451
15452 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15453
15454 * Makefile.in (WARN_CFLAGS): Get it from configure.
15455 (WERROR_CFLAGS): New.
15456 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
15457 * configure.ac: Introduce --enable-werror, which adds -Werror to
15458 the compiler command line. Enabled by default. Disable with
15459 --disable-werror. Add -Wdeclaration-after-statement
15460 Wpointer-arith and -Wformat-nonliteral to warning flags.
15461 * configure: Regenerate.
15462
15463 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15464
15465 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
15466
15467 2010-08-26 Pedro Alves <pedro@codesourcery.com>
15468
15469 * gdbreplay.c (remote_error): New.
15470 (gdbchar): New.
15471 (expect): Use gdbchar. Check for error reading from GDB.
15472 Clarify sync error output.
15473 (play): Check for errors writing to GDB.
15474 * linux-low.c (sigchld_handler): Really ignore `write' errors.
15475 * remote-utils.c (getpkt): Check for errors writing to the remote
15476 descriptor.
15477
15478 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15479
15480 * linux-low.c (linux_wait_1): Move non-debugging code out of
15481 `debug_threads' control.
15482
15483 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15484
15485 * linux-low.c (linux_wait_1): Don't set last_status here.
15486 * server.c (push_event, queue_stop_reply_callback): Assert we're
15487 not pushing a TARGET_WAITKIND_IGNORE event.
15488 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
15489 (myresume, handle_target_event): Set the thread's last_resume_kind
15490 and last_status from the target returned status.
15491
15492 2010-08-25 Pedro Alves <pedro@codesourcery.com>
15493
15494 PR threads/10729
15495
15496 * linux-x86-low.c (update_debug_registers_callback): New.
15497 (i386_dr_low_set_addr): Use it.
15498 (i386_dr_low_get_addr): New.
15499 (i386_dr_low_set_control): Use update_debug_registers_callback.
15500 (i386_dr_low_get_control): New.
15501 (i386_dr_low_get_status): Adjust.
15502 * linux-low.c (linux_stop_lwp): New.
15503 * linux-low.h (linux_stop_lwp): Declare.
15504
15505 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
15506 argument instead of a i386_debug_reg_state.
15507 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
15508 a i386_debug_reg_state.
15509 (i386_insert_aligned_watchpoint): Adjust.
15510 (i386_remove_aligned_watchpoint): Adjust.
15511 (i386_low_stopped_data_address): Read the debug registers from the
15512 inferior instead of from the mirrors.
15513 * i386-low.h (struct i386_debug_reg_state): Extend comment.
15514 (i386_dr_low_get_addr): Declare.
15515 (i386_dr_low_get_control): Declare.
15516 (i386_dr_low_get_status): Change prototype.
15517
15518 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
15519 (i386_dr_low_get_addr): New.
15520 (i386_dr_low_get_control): New.
15521 (i386_dr_low_get_status): Adjust prototype. Return
15522 dr_status_mirror.
15523 (i386_initial_stuff): Clear dr_status_mirror and
15524 dr_control_mirror.
15525 (i386_get_thread_context): Adjust.
15526 (i386_set_thread_context): Adjust.
15527 (i386_thread_added): Adjust.
15528
15529 2010-08-24 Pedro Alves <pedro@codesourcery.com>
15530
15531 * linux-low.h (linux_thread_area): Delete declaration.
15532
15533 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
15534
15535 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
15536 after its termination.
15537
15538 2010-08-09 Pedro Alves <pedro@codesourcery.com>
15539
15540 * linux-low.c (gdb_wants_lwp_stopped): Delete.
15541 (gdb_wants_all_stopped): Delete.
15542 (linux_wait_1): Don't call them.
15543 * server.c (handle_v_cont): Tag all threads as want-stopped.
15544 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
15545 stopped as "client-wants-stopped".
15546
15547 2010-07-31 Pedro Alves <pedro@codesourcery.com>
15548
15549 * Makefile.in (signals_h): New.
15550 (server_h): Depend on it.
15551 (server.o): Don't depend on $(signals_def).
15552 (signals.o): Depend on $(signals_def).
15553
15554 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
15555
15556 * Makefile.in (signals_def): New.
15557 (server_h): Append include/gdb/signals.h and signals_def.
15558 (server.o): Append signals_def.
15559
15560 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15561
15562 * server.c (handle_target_event): Use target_signal_to_host for
15563 resume_info.sig initialization.
15564 * target.h (struct thread_resume) <sig>: New comment.
15565
15566 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
15567
15568 * server.c (handle_query): strcpy() the returned string from paddress()
15569 instead of sprintf().
15570 * utils.c (paddress): Return phex_nz().
15571
15572 2010-07-07 Joel Brobecker <brobecker@adacore.com>
15573
15574 * server.c (handle_v_cont): Call mourn_inferior if process
15575 just exited.
15576 (myresume): Likewise.
15577
15578 2010-07-01 Pedro Alves <pedro@codesourcery.com>
15579
15580 Static tracepoints, and integration with UST.
15581
15582 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
15583 * mem-break.c (uninsert_all_breakpoints)
15584 (reinsert_all_breakpoints): New.
15585 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
15586 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
15587 (gdb_agent_ust_loaded, helper_thread_id)
15588 (gdb_agent_helper_thread_id): New macros.
15589 (struct ipa_sym_addresses): Add addr_ust_loaded,
15590 addr_helper_thread_id, addr_cmd_buf.
15591 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
15592 (in_process_agent_loaded_ust): New.
15593 (write_e_ust_not_loaded): New.
15594 (maybe_write_ipa_ust_not_loaded): New.
15595 (struct collect_static_trace_data_action): New.
15596 (enum tracepoint_type) <static_tracepoint>: New.
15597 (struct tracepoint) <handle>: Mention static tracepoints.
15598 (struct static_tracepoint_ctx): New.
15599 (CMD_BUF_SIZE): New.
15600 (add_tracepoint_action): Handle static tracepoint actions.
15601 (unprobe_marker_at): New.
15602 (clear_installed_tracepoints): Handle static tracepoints.
15603 (cmd_qtdp): Handle static tracepoints.
15604 (probe_marker_at): New.
15605 (cmd_qtstart): Handle static tracepoints.
15606 (response_tracepoint): Handle static tracepoints.
15607 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
15608 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
15609 (get_context_regcache): Handle static tracepoints.
15610 (do_action_at_tracepoint): Handle static tracepoint actions.
15611 (traceframe_find_block_type): Handle static trace data blocks.
15612 (traceframe_read_sdata): New.
15613 (download_tracepoints): Download static tracepoint actions.
15614 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
15615 (GDB_PROBE_NAME): New.
15616 (ust_ops): New.
15617 (GET_UST_SYM): New.
15618 (USTF): New.
15619 (dlsym_ust): New.
15620 (ust_marker_to_static_tracepoint): New.
15621 (gdb_probe): New.
15622 (collect_ust_data_at_tracepoint): New.
15623 (gdb_ust_probe): New.
15624 (UNIX_PATH_MAX, SOCK_DIR): New.
15625 (gdb_ust_connect_sync_socket): New.
15626 (resume_thread, stop_thread): New.
15627 (run_inferior_command): New.
15628 (init_named_socket): New.
15629 (gdb_ust_socket_init): New.
15630 (cstr_to_hexstr): New.
15631 (next_st): New.
15632 (first_marker, next_marker): New.
15633 (response_ust_marker): New.
15634 (cmd_qtfstm, cmd_qtsstm): New.
15635 (unprobe_marker_at, probe_marker_at): New.
15636 (cmd_qtstmat, gdb_ust_thread): New.
15637 (gdb_ust_init): New.
15638 (initialize_tracepoint_ftlib): Call gdb_ust_init.
15639 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
15640 (ST_REGENTRY): New.
15641 (x86_64_st_collect_regmap): New.
15642 (X86_64_NUM_ST_COLLECT_GREGS): New.
15643 (AMD64_RIP_REGNUM): New.
15644 (supply_static_tracepoint_registers): New.
15645 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
15646 (ST_REGENTRY): New.
15647 (i386_st_collect_regmap): New.
15648 (i386_NUM_ST_COLLECT_GREGS): New.
15649 (supply_static_tracepoint_registers): New.
15650 * server.c (handle_query): Handle qXfer:statictrace:read.
15651 <qSupported>: Report support for StaticTracepoints, and
15652 qXfer:statictrace:read features.
15653 * server.h (traceframe_read_sdata)
15654 (supply_static_tracepoint_registers): Declare.
15655 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
15656 (unpack_varlen_hex): Include in IPA build.
15657 * Makefile.in (ustlibs, ustinc): New.
15658 (IPA_OBJS): Add remote-utils-ipa.o.
15659 ($(IPA_LIB)): Link -ldl and -lpthread.
15660 (UST_CFLAGS): New.
15661 (IPAGENT_CFLAGS): Add UST_CFLAGS.
15662 * config.in, configure: Regenerate.
15663
15664 2010-06-20 Ian Lance Taylor <iant@google.com>
15665 Pedro Alves <pedro@codesourcery.com>
15666
15667 * linux-x86-low.c (always_true): Delete.
15668 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
15669 trying to fool the compiler with always_true.
15670
15671 2010-06-20 Pedro Alves <pedro@codesourcery.com>
15672
15673 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
15674 conditions in gdbserver.
15675
15676 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
15677
15678 * spu-low.c (spu_read_memory): Wrap around local store limit.
15679 (spu_write_memory): Likewise.
15680
15681 2010-06-15 Pedro Alves <pedro@codesourcery.com>
15682
15683 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
15684 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
15685 LONGEST uses.
15686 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
15687 uses.
15688 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
15689 uses with LONGEST uses.
15690
15691 2010-06-14 Stan Shebs <stan@codesourcery.com>
15692 Pedro Alves <pedro@codesourcery.com>
15693
15694 Bytecode compiler.
15695
15696 * linux-x86-low.c: Include limits.h.
15697 (add_insns): New.
15698 (always_true): New.
15699 (EMIT_ASM): New.
15700 (EMIT_ASM32): New.
15701 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
15702 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
15703 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
15704 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
15705 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
15706 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
15707 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
15708 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
15709 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
15710 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
15711 (amd64_emit_void_call_2): New.
15712 (amd64_emit_ops): New.
15713 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
15714 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
15715 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
15716 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
15717 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
15718 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
15719 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
15720 (i386_emit_call, i386_emit_reg, i386_emit_pop)
15721 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
15722 (i386_emit_stack_adjust, i386_emit_int_call_1)
15723 (i386_emit_void_call_2): New.
15724 (i386_emit_ops): New.
15725 (x86_emit_ops): New.
15726 (the_low_target): Install x86_emit_ops.
15727 * server.h (struct emit_ops): New.
15728 (get_raw_reg_func_addr): Declare.
15729 (current_insn_ptr, emit_error): Declare.
15730 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
15731 (set_trace_state_variable_value): New defines.
15732 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
15733 addr_get_trace_state_variable_value and
15734 addr_set_trace_state_variable_value.
15735 (symbol_list): New fields for get_raw_reg,
15736 get_trace_state_variable_value and set_trace_state_variable_value.
15737 (condfn): New typedef.
15738 (struct tracepoint): New field `compiled_cond'.
15739 (do_action_at_tracepoint): Clear compiled_cond.
15740 (get_trace_state_variable_value, set_trace_state_variable_value):
15741 Export in the IPA.
15742 (condition_true_at_tracepoint): If there's a compiled condition,
15743 run that.
15744 (current_insn_ptr, emit_error): New globals.
15745 (struct bytecode_address): New.
15746 (get_raw_reg_func_addr): New.
15747 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
15748 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
15749 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
15750 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
15751 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
15752 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
15753 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
15754 (compile_tracepoint_condition, compile_bytecodes): New.
15755 * target.h (emit_ops): Forward declare.
15756 (struct target_ops): New field emit_ops.
15757 (target_emit_ops): New.
15758 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
15759 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
15760 * linux-low.c (linux_emit_ops): New.
15761 (linux_target_ops): Install it.
15762 * linux-low.h (struct linux_target_ops): New field emit_ops.
15763
15764 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
15765
15766 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
15767 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
15768
15769 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15770 Stan Shebs <stan@codesourcery.com>
15771
15772 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
15773 (all): Depend on $(extra_libraries).
15774 (install-only): Install the IPA.
15775 (IPA_OBJS, IPA_LIB): New.
15776 (clean): Remove the IPA lib.
15777 (IPAGENT_CFLAGS): New.
15778 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
15779 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
15780 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
15781 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
15782 * configure.ac: Check for atomic builtins support in the compiler.
15783 (IPA_DEPFILES, extra_libraries): Define.
15784 * configure.srv (ipa_obj): Add description.
15785 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
15786 (i[34567]86-*-linux*): Set ipa_obj.
15787 (x86_64-*-linux*): Set ipa_obj.
15788 * linux-low.c (stabilizing_threads): New.
15789 (supports_fast_tracepoints): New.
15790 (linux_detach): Stabilize threads before detaching.
15791 (handle_tracepoints): Handle internal tracing breakpoints. Assert
15792 the lwp is either not stabilizing, or is moving out of a jump pad.
15793 (linux_fast_tracepoint_collecting): New.
15794 (maybe_move_out_of_jump_pad): New.
15795 (enqueue_one_deferred_signal): New.
15796 (dequeue_one_deferred_signal): New.
15797 (linux_wait_for_event_1): If moving out of a jump pad, defer
15798 pending signals to later.
15799 (linux_stabilize_threads): New.
15800 (linux_wait_1): Check if threads need moving out of jump pads, and
15801 do it if so.
15802 (stuck_in_jump_pad_callback): New.
15803 (move_out_of_jump_pad_callback): New.
15804 (lwp_running): New.
15805 (linux_resume_one_lwp): Handle moving out of jump pads.
15806 (linux_set_resume_request): Dequeue deferred signals.
15807 (need_step_over_p): Also step over fast tracepoint jumps.
15808 (start_step_over): Also uninsert fast tracepoint jumps.
15809 (finish_step_over): Also reinsert fast tracepoint jumps.
15810 (linux_install_fast_tracepoint_jump): New.
15811 (linux_target_ops): Install linux_stabilize_threads and
15812 linux_install_fast_tracepoint_jump_pad.
15813 * linux-low.h (linux_target_ops) <get_thread_area,
15814 install_fast_tracepoint_jump_pad>: New fields.
15815 (struct lwp_info) <collecting_fast_tracepoint,
15816 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
15817 (linux_get_thread_area): Declare.
15818 * linux-x86-low.c (jump_insn): New.
15819 (x86_get_thread_area): New.
15820 (append_insns): New.
15821 (push_opcode): New.
15822 (amd64_install_fast_tracepoint_jump_pad): New.
15823 (i386_install_fast_tracepoint_jump_pad): New.
15824 (x86_install_fast_tracepoint_jump_pad): New.
15825 (the_low_target): Install x86_get_thread_area and
15826 x86_install_fast_tracepoint_jump_pad.
15827 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
15828 (struct fast_tracepoint_jump): New.
15829 (fast_tracepoint_jump_insn): New.
15830 (fast_tracepoint_jump_shadow): New.
15831 (find_fast_tracepoint_jump_at): New.
15832 (fast_tracepoint_jump_here): New.
15833 (delete_fast_tracepoint_jump): New.
15834 (set_fast_tracepoint_jump): New.
15835 (uninsert_fast_tracepoint_jumps_at): New.
15836 (reinsert_fast_tracepoint_jumps_at): New.
15837 (set_breakpoint_at): Use write_inferior_memory.
15838 (uninsert_raw_breakpoint): Use write_inferior_memory.
15839 (check_mem_read): Mask out fast tracepoint jumps.
15840 (check_mem_write): Mask out fast tracepoint jumps.
15841 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
15842 (set_fast_tracepoint_jump): Declare.
15843 (delete_fast_tracepoint_jump)
15844 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
15845 (reinsert_fast_tracepoint_jumps_at): Declare.
15846 * regcache.c: Don't compile many functions when building the
15847 in-process agent library.
15848 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
15849 the register buffer in the heap.
15850 (free_register_cache): If the register buffer isn't owned by the
15851 regcache, don't free it.
15852 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
15853 pre-existing register caches.
15854 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
15855 type.
15856 (convert_ascii_to_int): : Constify `from' parameter type.
15857 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
15858 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
15859 the needed buffer in-place.
15860 (relocate_instruction): New.
15861 * server.c (handle_query) <qSymbols>: If the target supports
15862 tracepoints, give it a chance of looking up symbols. Report
15863 support for fast tracepoints.
15864 (handle_status): Stabilize threads.
15865 (process_serial_event): Adjust.
15866 * server.h (struct fast_tracepoint_jump): Forward declare.
15867 (struct process_info) <fast_tracepoint_jumps>: New field.
15868 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
15869 (decode_X_packet, decode_M_packet): Adjust.
15870 (relocate_instruction): Declare.
15871 (in_process_agent_loaded): Declare.
15872 (tracepoint_look_up_symbols): Declare.
15873 (struct fast_tpoint_collect_status): Declare.
15874 (fast_tracepoint_collecting): Declare.
15875 (force_unlock_trace_buffer): Declare.
15876 (handle_tracepoint_bkpts): Declare.
15877 (initialize_low_tracepoint)
15878 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
15879 * target.h (struct target_ops) <stabilize_threads,
15880 install_fast_tracepoint_jump_pad>: New fields.
15881 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
15882 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
15883 [HAVE_STDINT_H]: Include stdint.h.
15884 (trace_debug_1): Rename to ...
15885 (trace_vdebug): ... this.
15886 (trace_debug): Rename to ...
15887 (trace_debug_1): ... this. Add `level' parameter.
15888 (trace_debug): New.
15889 (ATTR_USED, ATTR_NOINLINE): New.
15890 (IP_AGENT_EXPORT): New.
15891 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
15892 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
15893 (about_to_request_buffer_space, trace_buffer_is_full)
15894 (stopping_tracepoint, expr_eval_result, error_tracepoint)
15895 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
15896 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
15897 (traceframe_write_count, traceframes_created)
15898 (trace_state_variables)
15899 New renaming defines.
15900 (struct ipa_sym_addresses): New.
15901 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
15902 (symbol_list): New.
15903 (ipa_sym_addrs): New.
15904 (all_tracepoint_symbols_looked_up): New.
15905 (in_process_agent_loaded): New.
15906 (write_e_ipa_not_loaded): New.
15907 (maybe_write_ipa_not_loaded): New.
15908 (tracepoint_look_up_symbols): New.
15909 (debug_threads) [IN_PROCESS_AGENT]: New.
15910 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15911 (UNKNOWN_SIDE_EFFECTS): New.
15912 (stop_tracing): New.
15913 (flush_trace_buffer): New.
15914 (stop_tracing_bkpt): New.
15915 (flush_trace_buffer_bkpt): New.
15916 (read_inferior_integer): New.
15917 (read_inferior_uinteger): New.
15918 (read_inferior_data_pointer): New.
15919 (write_inferior_data_pointer): New.
15920 (write_inferior_integer): New.
15921 (write_inferior_uinteger): New.
15922 (struct collect_static_trace_data_action): Delete.
15923 (enum tracepoint_type): New.
15924 (struct tracepoint) <type>: New field `type'.
15925 <actions_str, step_actions, step_actions_str>: Only include in
15926 GDBserver.
15927 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15928 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15929 (tracepoints): Use IP_AGENT_EXPORT.
15930 (last_tracepoint): Don't include in the IPA.
15931 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15932 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15933 (alloced_trace_state_variables): New.
15934 (trace_state_variables): Use IP_AGENT_EXPORT.
15935 (traceframe_t): Delete unused variable.
15936 (circular_trace_buffer): Don't include in the IPA.
15937 (trace_buffer_start): Delete.
15938 (struct trace_buffer_control): New.
15939 (trace_buffer_free): Delete.
15940 (struct ipa_trace_buffer_control): New.
15941 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15942 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15943 New.
15944 (trace_buffer_ctrl): New.
15945 (TRACE_BUFFER_CTRL_CURR): New.
15946 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15947 Reimplement as macros.
15948 (trace_buffer_wrap): Delete.
15949 (traceframe_write_count, traceframe_read_count)
15950 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15951 (struct tracepoint_hit_ctx) <type>: New field.
15952 (struct fast_tracepoint_ctx): New.
15953 (memory_barrier): New.
15954 (cmpxchg): New.
15955 (record_tracepoint_error): Update atomically in the IPA.
15956 (clear_inferior_trace_buffer): New.
15957 (about_to_request_buffer_space): New.
15958 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15959 updating the same buffer.
15960 (add_tracepoint): Default the tracepoint's type to trap
15961 tracepoint, and orig_size to -1.
15962 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15963 internal variables.
15964 (create_trace_state_variable): New parameter `gdb'. Handle it.
15965 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15966 (cmd_qtdp): Handle fast tracepoints.
15967 (cmd_qtdv): Adjust.
15968 (max_jump_pad_size): New.
15969 (gdb_jump_pad_head): New.
15970 (get_jump_space_head): New.
15971 (claim_jump_space): New.
15972 (sort_tracepoints): New.
15973 (MAX_JUMP_SIZE): New.
15974 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15975 IPA.
15976 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15977 support. Upload fast traceframes, and delete internal IPA
15978 breakpoints.
15979 (stop_tracing_handler): New.
15980 (flush_trace_buffer_handler): New.
15981 (cmd_qtstop): Upload fast tracepoints.
15982 (response_tracepoint): Handle fast tracepoints.
15983 (tracepoint_finished_step): Upload fast traceframes. Set the
15984 tracepoint hit context's tracepoint type.
15985 (handle_tracepoint_bkpts): New.
15986 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15987 type. Add comment about fast tracepoints.
15988 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15989 non-existing action_str field.
15990 (get_context_regcache): Handle fast tracepoints.
15991 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15992 to the regcache.
15993 (fast_tracepoint_from_jump_pad_address): New.
15994 (fast_tracepoint_from_ipa_tpoint_address): New.
15995 (collecting_t): New.
15996 (force_unlock_trace_buffer): New.
15997 (fast_tracepoint_collecting): New.
15998 (collecting): New.
15999 (gdb_collect): New.
16000 (write_inferior_data_ptr): New.
16001 (target_tp_heap): New.
16002 (target_malloc): New.
16003 (download_agent_expr): New.
16004 (UALIGN): New.
16005 (download_tracepoints): New.
16006 (download_trace_state_variables): New.
16007 (upload_fast_traceframes): New.
16008 (IPA_FIRST_TRACEFRAME): New.
16009 (IPA_NEXT_TRACEFRAME_1): New.
16010 (IPA_NEXT_TRACEFRAME): New.
16011 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
16012 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
16013 (gdb_jump_pad_buffer_end): New.
16014 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
16015 (initialize_tracepoint): Adjust.
16016 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
16017 buffer. Initialize the low module.
16018 * utils.c (PREFIX, TOOLNAME): New.
16019 (malloc_failure): Use PREFIX.
16020 (error): In the IPA, an error causes an exit.
16021 (fatal, warning): Use PREFIX.
16022 (internal_error): Use TOOLNAME.
16023 (NUMCELLS): Increase to 10.
16024 * configure, config.in: Regenerate.
16025
16026 2010-06-01 Pedro Alves <pedro@codesourcery.com>
16027
16028 * server.c (handle_query) <qSupported>: Do two passes over the
16029 qSupported string to avoid nesting strtok.
16030
16031 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16032
16033 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
16034 (CDEPS): New.
16035 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
16036 -Wl,--dynamic-list.
16037 * configure: Regenerate.
16038 * proc-service.list: New.
16039
16040 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16041
16042 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
16043 New comment.
16044
16045 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
16046
16047 * gdbreplay.c (remote_open): Check error return from socket() call by
16048 its equality to -1 not by it being negative.
16049 * remote-utils.c (remote_open): Likewise.
16050
16051 2010-05-23 Pedro Alves <pedro@codesourcery.com>
16052
16053 * config.h: Regenerate.
16054
16055 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16056
16057 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
16058 doesn't provide PTRACE_GET_THREAD_AREA.
16059
16060 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
16061
16062 * linux-m68k-low.c: Include <asm/ptrace.h>
16063 (ps_get_thread_area): Implement.
16064
16065 2010-05-03 Doug Evans <dje@google.com>
16066
16067 * event-loop.c (struct callback_event): New struct.
16068 (callback_list): New global.
16069 (append_callback_event, delete_callback_event): New functions.
16070 (process_callback): New function.
16071 (start_event_loop): Call it.
16072 * remote-utils.c (NOT_SCHEDULED): Define.
16073 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
16074 moved out of readchar.
16075 (readchar): Rewrite. Call reschedule before returning.
16076 (reset_readchar): New function.
16077 (remote_close): Call it.
16078 (process_remaining, reschedule): New functions.
16079 * server.h (callback_handler_func): New typedef.
16080 (append_callback_event, delete_callback_event): Declare.
16081
16082 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16083
16084 * proc-service.c (ps_pglobal_lookup): Use
16085 thread_db_look_up_one_symbol.
16086 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
16087 parameter. Use it instead of all_symbols_looked_up.
16088 * server.h (struct process_info) <all_symbols_looked_up>: Delete
16089 field.
16090 (all_symbols_looked_up): Don't declare.
16091 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
16092 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
16093 field.
16094 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
16095 Set all_symbols_looked_up here.
16096 (thread_db_look_up_one_symbol): New.
16097 (thread_db_get_tls_address): Adjust.
16098 (thread_db_load_search, try_thread_db_load_1): Always allocate the
16099 thread_db object on the heap, and tentatively set it in the
16100 process structure.
16101 (thread_db_init): Don't set all_symbols_looked_up here.
16102 * linux-low.h (thread_db_look_up_one_symbol): Declare.
16103
16104 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16105
16106 * linux-low.c (linux_kill, linux_detach): Adjust.
16107 (status_pending_p_callback): Remove redundant statement. Check
16108 for !TARGET_WAITIKIND_IGNORE, instead of
16109 TARGET_WAITKIND_STOPPED.
16110 (handle_tracepoints): Make sure LWP is locked. Adjust.
16111 (linux_wait_for_event_1): Adjust.
16112 (linux_cancel_breakpoints): New.
16113 (unsuspend_one_lwp): New.
16114 (unsuspend_all_lwps): New.
16115 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
16116 (send_sigstop_callback): Change return type to int, add new
16117 `except' parameter and handle it.
16118 (suspend_and_send_sigstop_callback): New.
16119 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
16120 pass them down. If SUSPEND, also increment the lwp's suspend
16121 count.
16122 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
16123 (need_step_over_p): Don't consider suspended LWPs.
16124 (start_step_over): Adjust.
16125 (proceed_one_lwp): Change return type to int, add new `except'
16126 parameter and handle it.
16127 (unsuspend_and_proceed_one_lwp): New.
16128 (proceed_all_lwps): Use find_inferior instead of
16129 for_each_inferior.
16130 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
16131 also decrement the suspend count of LWPs. Pass `except' down,
16132 instead of hacking its suspend count.
16133 (linux_pause_all): Add `freeze' parameter. Adjust.
16134 (linux_unpause_all): New.
16135 (linux_target_ops): Install linux_unpause_all.
16136 * server.c (handle_status): Adjust.
16137 * target.h (struct target_ops): New fields `unpause_all' and
16138 `cancel_breakpoints'. Add new parameter to `pause_all'.
16139 (pause_all): Add new `freeze' parameter.
16140 (unpause_all): New.
16141 (cancel_breakpoints): New.
16142 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
16143 cancel breakpoints.
16144 (cmd_qtstart): Pause threads.
16145 (stop_tracing): Pause threads, and cancel breakpoints.
16146 * win32-low.c (win32_target_ops): Adjust.
16147
16148 2010-05-03 Pedro Alves <pedro@codesourcery.com>
16149
16150 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
16151 the inferior right away from here...
16152 (linux_wait_1): ... to here, and adjust to check the thread's
16153 last_resume_kind instead of the lwp's step or stop_expected flags.
16154
16155 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16156
16157 * README: Use consistent `GDB' and `GDBserver' spellings.
16158
16159 2010-05-02 Pedro Alves <pedro@codesourcery.com>
16160
16161 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
16162 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
16163 (linux_detach_one_lwp): Assume the lwp is stopped.
16164 (any_thread_of): Delete.
16165 (linux_detach): Stop all lwps here. Don't blindly delete all
16166 breakpoints.
16167 (delete_lwp_callback): New.
16168 (linux_mourn): Delete all lwps of the process that is gone.
16169 (linux_wait_1): Don't delete the last lwp of the process here.
16170 * mem-break.h (mark_breakpoints_out): Declare.
16171 * mem-break.c (mark_breakpoints_out): New.
16172 (free_all_breakpoints): Use it.
16173 * server.c (handle_target_event): If the process is gone, mark
16174 breakpoints out.
16175 * thread-db.c (struct thread_db) <create_bp>: New field.
16176 (thread_db_enable_reporting): Fix prototype. Store a thread event
16177 breakpoint reference in the thread_db struct.
16178 (thread_db_load_search): Clear the thread_db object.
16179 (try_thread_db_load_1): Ditto.
16180 (switch_to_process): New.
16181 (disable_thread_event_reporting): Use it.
16182 (remove_thread_event_breakpoints): New.
16183 (thread_db_detach, thread_db_mourn): Use it.
16184
16185 2010-05-01 Pedro Alves <pedro@codesourcery.com>
16186
16187 * linux-low.c (linux_enable_event_reporting): New.
16188 (linux_wait_for_event_1, handle_extended_wait): Use it.
16189
16190 2010-04-30 Pedro Alves <pedro@codesourcery.com>
16191
16192 * linux-low.c (linux_kill_one_lwp, linux_kill)
16193 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
16194 (send_sigstop): Take an lwp_info as parameter instead. Queue a
16195 SIGSTOP even if the LWP is stopped.
16196 (send_sigstop_callback): New.
16197 (stop_all_lwps): Use send_sigstop_callback instead.
16198 (linux_resume_one_thread): Adjust.
16199 (proceed_one_lwp): Still proceed an LWP that the client has
16200 requested to stop, if we haven't reported it as stopped yet. Make
16201 sure that LWPs the client want stopped, have a pending SIGSTOP.
16202
16203 2010-04-26 Doug Evans <dje@google.com>
16204
16205 * server.c (handle_general_set): Make static.
16206
16207 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
16208 Print received char after testing for error/eof instead of before.
16209 (input_interrupt): Tweak comment.
16210
16211 2010-04-23 Doug Evans <dje@google.com>
16212
16213 * server.c (start_inferior): Print inferior argv if --debug.
16214
16215 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
16216
16217 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
16218 * nto-x86-low.c: Include server.h
16219
16220 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
16221
16222 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
16223 be consistent with other sources of this directory.
16224 (init_registers_amd64): Correct name of source file of this function
16225 in the comment.
16226
16227 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16228
16229 * configure.srv (x86_64-*-mingw*): New configuration for Windows
16230 64-bit executables.
16231
16232 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16233
16234 * win32-i386-low.c: Add 64-bit support.
16235 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
16236 (init_registers_amd64): Declare.
16237 (mappings): Add 64-bit version of array.
16238 (init_windows_x86): New function.
16239 (the_low_target): Change init_arch field to init_windows_x86.
16240
16241 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16242
16243 * win32-low.c: Adapt to support also 64-bit architecture.
16244 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
16245 (get_image_name): Use SIZE_T type for local variable `done'.
16246 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
16247 (toolhelp_get_dll_name): Idem.
16248 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
16249 Use uintptr_t typecast to avoid warning.
16250 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
16251 (handle_exception): Use phex_nz to avoid warning.
16252 (win32_wait): Remove unused local variable `process'.
16253
16254 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
16255
16256 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
16257 `amd64-avx.o'.
16258
16259 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
16260
16261 * configure.ac: Use `ws2_32' library for srv_mingw.
16262 * configure: Regenerate.
16263 * gdbreplay.c: Include winsock2.h instead of winsock.h.
16264 * remote-utils.c: Likewise.
16265
16266 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
16267
16268 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
16269 if __x86_64__ is defined.
16270
16271 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16272
16273 * configure: Regenerate.
16274
16275 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
16276
16277 * server.c (handle_query): Handle 'qGetTIBAddr' query.
16278 * target.h (target_ops): New get_tib_address field.
16279 * win32-low.h (win32_thread_info): Add thread_local_base field.
16280 * win32-low.c (child_add_thread): Add tlb argument.
16281 Set thread_local_base field to TLB.
16282 (get_child_debug_event): Adapt to child_add_thread change.
16283 (win32_get_tib_address): New function.
16284 (win32_target_ops): Set get_tib_address field to
16285 win32_get_tib_address.
16286 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
16287
16288 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16289
16290 * linux-low.c (linux_mourn): Also remove the process.
16291 * server.c (handle_target_event): Don't remove the process here.
16292 * nto-low.c (nto_mourn): New.
16293 (nto_target_ops): Install it.
16294 * spu-low.c (spu_mourn): New.
16295 (spu_target_ops): Install it.
16296 * win32-low.c (win32_mourn): New.
16297 (win32_target_ops): Install it.
16298
16299 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16300
16301 * server.h (buffer_xml_printf): Remove redundant `;'.
16302
16303 2010-04-12 Pedro Alves <pedro@codesourcery.com>
16304
16305 * regcache.c (set_register_cache): Invalidate regcaches before
16306 changing the register cache layout.
16307 (regcache_invalidate_one): Allow a NULL regcache.
16308 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
16309 regcaches before changing the register cache layout or the target
16310 regsets.
16311
16312 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16313
16314 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
16315 variable warning on Linux/x86-64.
16316
16317 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16318
16319 GDBserver disconnected tracing support.
16320
16321 * linux-low.c (linux_remove_process): Delete.
16322 (add_lwp): Don't set last_resume_kind here.
16323 (linux_kill): Use `mourn'.
16324 (linux_detach): Use `thread_db_detach', and `mourn'.
16325 (linux_mourn): New.
16326 (linux_attach_lwp_1): Adjust comment.
16327 (linux_attach): last_resume_kind moved the thread_info; adjust.
16328 (status_pending_p_callback): Adjust.
16329 (linux_wait_for_event_1): Adjust.
16330 (count_events_callback, select_singlestep_lwp_callback)
16331 (select_event_lwp_callback, cancel_breakpoints_callback)
16332 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
16333 (proceed_one_lwp): Adjust.
16334 (linux_async): Add debug output.
16335 (linux_thread_stopped): New.
16336 (linux_pause_all): New.
16337 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
16338 linux_pause_all.
16339 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
16340 (thread_db_free): Delete declaration.
16341 (thread_db_detach, thread_db_mourn): Declare.
16342 * thread-db.c (thread_db_init): Use thread_db_mourn.
16343 (thread_db_free): Delete, split in two.
16344 (disable_thread_event_reporting): New.
16345 (thread_db_detach): New.
16346 (thread_db_mourn): New.
16347
16348 * server.h (struct thread_info) <last_resume_kind>: New field.
16349 <attached>: Add comment.
16350 <gdb_detached>: New field.
16351 (handler_func): Change return type to int.
16352 (handle_serial_event, handle_target_event): Ditto.
16353 (gdb_connected): Declare.
16354 (tracing): Delete.
16355 (disconnected_tracing): Declare.
16356 (stop_tracing): Declare.
16357
16358 * server.c (handle_query) <qSupported>: Report support for
16359 disconnected tracing.
16360 (queue_stop_reply_callback): Account for running threads.
16361 (gdb_wants_thread_stopped): New.
16362 (gdb_wants_all_threads_stopped): New.
16363 (gdb_reattached_process): New.
16364 (handle_status): Clear the `gdb_detached' flag of all processes.
16365 In all-stop, stop all threads.
16366 (main): Be sure to leave tfind mode. Handle disconnected tracing.
16367 (process_serial_event): If the remote connection breaks, or if an
16368 exit was forced with "monitor exit", force an event loop exit.
16369 Handle disconnected tracing on detach.
16370 (handle_serial_event): Adjust.
16371 (handle_target_event): If GDB isn't connected, forward events back
16372 to the inferior, unless the last process exited, in which case,
16373 exit gdbserver. Adjust interface.
16374
16375 * remote-utils.c (remote_open): Don't block in accept. Instead
16376 register an event loop source on the listen socket file
16377 descriptor. Refactor bits into ...
16378 (listen_desc): ... this new global.
16379 (gdb_connected): ... this new function.
16380 (enable_async_notification): ... this new function.
16381 (handle_accept_event): ... this new function.
16382 (remote_close): Clear remote_desc.
16383
16384 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
16385
16386 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
16387 New fields.
16388 (mourn_inferior): Define.
16389 (target_process_qsupported): Avoid the dangling else problem.
16390 (thread_stopped): Define.
16391 (pause_all): Define.
16392 (target_waitstatus_to_string): Declare.
16393 * target.c (target_waitstatus_to_string): New.
16394
16395 * tracepoint.c (tracing): Make extern.
16396 (disconnected_tracing): New.
16397 (stop_tracing): Make extern. Handle tracing stops due to GDB
16398 disconnecting.
16399 (cmd_qtdisconnected): New.
16400 (cmd_qtstatus): Report disconnected tracing status in trace reply.
16401 (handle_tracepoint_general_set): Handle QTDisconnected.
16402
16403 * event-loop.c (event_handler_func): Change return type to int.
16404 (process_event): Bail out if the event handler wants the event
16405 loop to stop.
16406 (handle_file_event): Ditto.
16407 (start_event_loop): Bail out if the event handler wants the event
16408 loop to stop.
16409
16410 * nto-low.c (nto_target_ops): Adjust.
16411 * spu-low.c (spu_wait): Don't remove the process here.
16412 (spu_target_ops): Adjust.
16413 * win32-low.c (win32_wait): Don't remove the process here.
16414 (win32_target_ops): Adjust.
16415
16416 2010-04-11 Pedro Alves <pedro@codesourcery.com>
16417
16418 * regcache.c (realloc_register_cache): Invalidate inferior's
16419 regcache before recreating it.
16420
16421 2010-04-09 Pedro Alves <pedro@codesourcery.com>
16422
16423 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
16424
16425 2010-04-09 Stan Shebs <stan@codesourcery.com>
16426 Pedro Alves <pedro@codesourcery.com>
16427
16428 * server.h (LONGEST): New.
16429 (struct thread_info) <while_stepping>: New field.
16430 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
16431 Declare.
16432 (initialize_tracepoint, handle_tracepoint_general_set)
16433 (handle_tracepoint_query, tracepoint_finished_step)
16434 (tracepoint_was_hit, release_while_stepping_state_list):
16435 (current_traceframe): Declare.
16436 * server.c (handle_general_set): Handle tracepoint packets.
16437 (read_memory): New.
16438 (write_memory): New.
16439 (handle_search_memory_1): Use read_memory.
16440 (handle_query): Report support for conditional tracepoints, trace
16441 state variables, and tracepoint sources. Handle tracepoint
16442 queries.
16443 (main): Initialize the tracepoints module.
16444 (process_serial_event): Handle traceframe reads/writes.
16445
16446 * linux-low.c (handle_tracepoints): New.
16447 (linux_wait_1): Call it.
16448 (linux_resume_one_lwp): Handle while-stepping.
16449 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
16450 (linux_target_ops): Install them.
16451 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
16452 New field.
16453 * linux-x86-low.c (x86_supports_tracepoints): New.
16454 (the_low_target). Install it.
16455
16456 * mem-break.h (delete_breakpoint): Declare.
16457 * mem-break.c (delete_breakpoint): Make external.
16458
16459 * target.h (struct target_ops): Add `supports_tracepoints',
16460 `read_pc', and `write_pc' fields.
16461 (target_supports_tracepoints): Define.
16462 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
16463 (phex_nz): New.
16464
16465 * regcache.h (struct regcache) <registers_owned>: New field.
16466 (init_register_cache, regcache_cpy): Declare.
16467 (regcache_read_pc, regcache_write_pc): Declare.
16468 (register_cache_size): Declare.
16469 (supply_regblock): Declare.
16470 * regcache.c (init_register_cache): New.
16471 (new_register_cache): Use it.
16472 (regcache_cpy): New.
16473 (register_cache_size): New.
16474 (supply_regblock): New.
16475 (regcache_read_pc, regcache_write_pc): New.
16476
16477 * tracepoint.c: New.
16478
16479 * Makefile.in (OBS): Add tracepoint.o.
16480 (tracepoint.o): New rule.
16481
16482 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
16483
16484 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
16485 (i386-mmx.o): New.
16486 (i386-mmx.c): Likewise.
16487 (i386-mmx-linux.o): Likewise.
16488 (i386-mmx-linux.c): Likewise.
16489
16490 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
16491 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
16492 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
16493 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
16494
16495 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
16496 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
16497 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
16498
16499 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
16500
16501 * Makefile.in (clean): Updated.
16502 (i386-avx.o): New.
16503 (i386-avx.c): Likewise.
16504 (i386-avx-linux.o): Likewise.
16505 (i386-avx-linux.c): Likewise.
16506 (amd64-avx.o): Likewise.
16507 (amd64-avx.c): Likewise.
16508 (amd64-avx-linux.o): Likewise.
16509 (amd64-avx-linux.c): Likewise.
16510
16511 * configure.srv (srv_i386_regobj): Add i386-avx.o.
16512 (srv_i386_linux_regobj): Add i386-avx-linux.o.
16513 (srv_amd64_regobj): Add amd64-avx.o.
16514 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
16515 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
16516 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
16517 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
16518 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
16519 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
16520 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
16521
16522 * i387-fp.c: Include "i386-xstate.h".
16523 (i387_xsave): New.
16524 (i387_cache_to_xsave): Likewise.
16525 (i387_xsave_to_cache): Likewise.
16526 (x86_xcr0): Likewise.
16527
16528 * i387-fp.h (i387_cache_to_xsave): Likewise.
16529 (i387_xsave_to_cache): Likewise.
16530 (x86_xcr0): Likewise.
16531
16532 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
16533 * linux-crisv32-low.c (target_regsets): Likewise.
16534 * linux-m68k-low.c (target_regsets): Likewise.
16535 * linux-mips-low.c (target_regsets): Likewise.
16536 * linux-ppc-low.c (target_regsets): Likewise.
16537 * linux-s390-low.c (target_regsets): Likewise.
16538 * linux-sh-low.c (target_regsets): Likewise.
16539 * linux-sparc-low.c (target_regsets): Likewise.
16540 * linux-xtensa-low.c (target_regsets): Likewise.
16541
16542 * linux-low.c: Include <sys/uio.h>.
16543 (regsets_fetch_inferior_registers): Support nt_type.
16544 (regsets_store_inferior_registers): Likewise.
16545 (linux_process_qsupported): New.
16546 (linux_target_ops): Add linux_process_qsupported.
16547
16548 * linux-low.h (regset_info): Add nt_type.
16549 (linux_target_ops): Add process_qsupported.
16550
16551 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
16552 and <sys/uio.h>.
16553 (init_registers_i386_avx_linux): New.
16554 (init_registers_amd64_avx_linux): Likewise.
16555 (xmltarget_i386_linux_no_xml): Likewise.
16556 (xmltarget_amd64_linux_no_xml): Likewise.
16557 (PTRACE_GETREGSET): Likewise.
16558 (PTRACE_SETREGSET): Likewise.
16559 (x86_fill_xstateregset): Likewise.
16560 (x86_store_xstateregset): Likewise.
16561 (use_xml): Likewise.
16562 (x86_linux_update_xmltarget): Likewise.
16563 (x86_linux_process_qsupported): Likewise.
16564 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
16565 (x86_arch_setup): Don't call init_registers_amd64_linux nor
16566 init_registers_i386_linux here. Call
16567 x86_linux_update_xmltarget.
16568 (the_low_target): Add x86_linux_process_qsupported.
16569
16570 * server.c (handle_query): Call target_process_qsupported.
16571
16572 * target.h (target_ops): Add process_qsupported.
16573 (target_process_qsupported): New.
16574
16575 2010-04-03 Pedro Alves <pedro@codesourcery.com>
16576
16577 * inferiors.c (add_thread): Set last_status kind to
16578 TARGET_WAITKIND_IGNORE.
16579 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
16580 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
16581 (linux_wait_1): Move `thread' local definition to block that uses
16582 it. Don't NULL initialize `event_child'.
16583 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
16584 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
16585 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
16586
16587 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16588
16589 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
16590 an extended waitstatus, or by a watchpoint.
16591 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
16592 thread was stepping or has been stopped by a watchpoint.
16593
16594 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16595
16596 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
16597 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
16598 of another, then delete the previous, and validate all
16599 breakpoints.
16600 (validate_inserted_breakpoint): New.
16601 (delete_disabled_breakpoints): New.
16602 (validate_breakpoints): New.
16603 (check_mem_read): Validate breakpoints before trusting their
16604 shadow. Delete disabled breakpoints.
16605 (check_mem_write): Validate breakpoints before trusting they
16606 should be inserted. Delete disabled breakpoints.
16607 * mem-break.h (validate_breakpoints):
16608 * server.c (handle_query): Validate breakpoints when we see a
16609 qSymbol query.
16610
16611 2010-04-01 Pedro Alves <pedro@codesourcery.com>
16612
16613 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
16614 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
16615 if we could tell there's a GDB breakpoint at stop_pc.
16616 (need_step_over_p): Don't do a step over if we find a GDB
16617 breakpoint at the resume PC.
16618
16619 * mem-break.c (struct raw_breakpoint): New.
16620 (enum bkpt_type): New type `gdb_breakpoint'.
16621 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
16622 fields. New field `raw'.
16623 (find_raw_breakpoint_at): New.
16624 (set_raw_breakpoint_at): Handle refcounting. Create a raw
16625 breakpoint instead.
16626 (set_breakpoint_at): Adjust.
16627 (delete_raw_breakpoint): New.
16628 (release_breakpoint): New.
16629 (delete_breakpoint): Rename to...
16630 (delete_breakpoint_1): ... this. Add proc parameter. Use
16631 release_breakpoint. Return ENOENT.
16632 (delete_breakpoint): Reimplement.
16633 (find_breakpoint_at): Delete.
16634 (find_gdb_breakpoint_at): New.
16635 (delete_breakpoint_at): Delete.
16636 (set_gdb_breakpoint_at): New.
16637 (delete_gdb_breakpoint_at): New.
16638 (gdb_breakpoint_here): New.
16639 (set_reinsert_breakpoint): Use release_breakpoint.
16640 (uninsert_breakpoint): Rename to ...
16641 (uninsert_raw_breakpoint): ... this.
16642 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
16643 (reinsert_raw_breakpoint): Change parameter type to
16644 raw_breakpoint.
16645 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
16646 instead.
16647 (check_breakpoints): Adjust. Use release_breakpoint.
16648 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
16649 (breakpoint_inserted_here): Ditto.
16650 (check_mem_read): Adjust to iterate over raw breakpoints instead.
16651 Don't trust the breakpoint's shadow if it is not inserted.
16652 (check_mem_write): Adjust to iterate over raw breakpoints instead.
16653 (delete_all_breakpoints): Adjust.
16654 (free_all_breakpoints): Mark all breakpoints as uninserted, and
16655 use delete_breakpoint_1.
16656
16657 * mem-break.h (breakpoints_supported): Delete declaration.
16658 (set_gdb_breakpoint_at): Declare.
16659 (gdb_breakpoint_here): Declare.
16660 (delete_breakpoint_at): Delete.
16661 (delete_gdb_breakpoint_at): Declare.
16662
16663 * server.h (struct raw_breakpoint): Forward declare.
16664 (struct process_info): New field `raw_breakpoints'.
16665
16666 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
16667 breakpoints.
16668
16669 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16670
16671 * linux-low.c (status_pending_p_callback): Fix comment.
16672 (linux_wait_for_event_1): Move most of the internal breakpoint
16673 handling from here...
16674 (linux_wait_1): ... to here.
16675 (count_events_callback): New.
16676 (select_singlestep_lwp_callback): New.
16677 (select_event_lwp_callback): New.
16678 (cancel_breakpoints_callback): New.
16679 (select_event_lwp): New.
16680 (linux_wait_1): Simplify internal breakpoint handling. Give equal
16681 priority to all LWPs that have had events that should be reported
16682 to the client. Cancel breakpoints when about to reporting the
16683 event to the client, not while stopping lwps. No longer cancel
16684 finished single-steps here.
16685 (cancel_finished_single_step): Delete.
16686 (cancel_finished_single_steps): Delete.
16687
16688 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16689
16690 * mem-break.c (enum bkpt_type): New.
16691 (struct breakpoint): New field `type'.
16692 (set_breakpoint_at): Change return type to struct breakpoint
16693 pointer. Set type to `other_breakpoint' by default.
16694 (delete_breakpoint): Rewrite, supporting more than one breakpoint
16695 in the breakpoint list.
16696 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
16697 (reinsert_breakpoint): Rename to ...
16698 (reinsert_raw_breakpoint): ... this.
16699 (reinsert_breakpoints_at): Adjust.
16700 * mem-break.h (struct breakpoint): Declare.
16701 (set_breakpoint_at): Change return type to struct breakpoint
16702 pointer.
16703
16704 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16705
16706 * server.c (handle_query): Assign, not compare.
16707
16708 2010-03-24 Pedro Alves <pedro@codesourcery.com>
16709
16710 Teach linux gdbserver to step-over-breakpoints.
16711
16712 * linux-low.c (can_hardware_single_step): New.
16713 (supports_breakpoints): New.
16714 (handle_extended_wait): If stopping threads, read the stop pc of
16715 the new cloned LWP.
16716 (get_pc): New.
16717 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
16718 low target doesn't support retrieving the PC.
16719 (add_lwp): Set last_resume_kind to resume_continue.
16720 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
16721 (linux_attach): Don't clear stop_expected. Set the lwp's
16722 last_resume_kind to resume_stop.
16723 (linux_detach_one_lwp): Don't check for removed breakpoints.
16724 (check_removed_breakpoint): Delete.
16725 (status_pending_p): Rename to ...
16726 (status_pending_p_callback): ... this. Don't check for removed
16727 breakpoints. Don't consider threads that are stopped from GDB's
16728 perspective.
16729 (linux_wait_for_lwp): Always read the stop_pc here.
16730 (cancel_breakpoint): New.
16731 (step_over_bkpt): New global.
16732 (linux_wait_for_event_1): Implement stepping over breakpoints.
16733 (gdb_wants_lwp_stopped): New.
16734 (gdb_wants_all_stopped): New.
16735 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
16736 single-step traps here. Store the thread's last reported target
16737 wait status.
16738 (send_sigstop): Don't clear stop_expected. Always set it,
16739 instead.
16740 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
16741 (cancel_finished_single_step): New.
16742 (cancel_finished_single_steps): New.
16743 (wait_for_sigstop): Don't cancel finished single-step traps here.
16744 (linux_resume_one_lwp): Don't check for removed breakpoints.
16745 Don't set `step' on non-hardware step archs.
16746 (linux_set_resume_request): Ignore resume_stop requests if already
16747 stopping or stopped. Set the lwp's last_resume_kind.
16748 (resume_status_pending_p): Don't check for removed breakpoints.
16749 (need_step_over_p): New.
16750 (start_step_over): New.
16751 (finish_step_over): New.
16752 (linux_resume_one_thread): Always queue a sigstop for resume_stop
16753 requests. Clear the thread's last reported target waitstatus.
16754 Don't use the `suspended' flag. Don't consider pending breakpoints.
16755 (linux_resume): Start a step-over if necessary.
16756 (proceed_one_lwp): New.
16757 (proceed_all_lwps): New.
16758 (unstop_all_lwps): New.
16759 * linux-low.h (struct lwp_info): Rewrite comment for the
16760 `suspended' flag. Add the `stop_pc' field. Delete the
16761 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
16762 Add `'last_resume_kind' and `need_step_over' fields.
16763 * inferiors.c (struct thread_info): Delete, moved elsewhere.
16764 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
16765 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
16766 (set_raw_breakpoint_at): New.
16767 (set_breakpoint_at): Rewrite to use it.
16768 (reinsert_breakpoint_handler): Delete.
16769 (set_reinsert_breakpoint): New.
16770 (reinsert_breakpoint_by_bp): Delete.
16771 (delete_reinsert_breakpoints): New.
16772 (uninsert_breakpoint): Rewrite.
16773 (uninsert_breakpoints_at): New.
16774 (reinsert_breakpoint): Rewrite.
16775 (reinsert_breakpoints_at): New.
16776 (check_breakpoints): Rewrite.
16777 (breakpoint_here): New.
16778 (breakpoint_inserted_here): New.
16779 (check_mem_read): Adjust.
16780 * mem-break.h (breakpoints_supported, breakpoint_here)
16781 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
16782 (reinsert_breakpoint_by_bp): Delete declaration.
16783 (delete_reinsert_breakpoints): Declare.
16784 (reinsert_breakpoint): Delete declaration.
16785 (reinsert_breakpoints_at): Declare.
16786 (uninsert_breakpoint): Delete declaration.
16787 (uninsert_breakpoints_at): Declare.
16788 (check_breakpoints): Adjust prototype.
16789 * server.h: Adjust include order.
16790 (struct thread_info): Declare here. Add a `last_status' field.
16791
16792 2010-03-23 Michael Snyder <msnyder@vmware.com>
16793
16794 * server.c (crc32): New function.
16795 (handle_query): Add handling for 'qCRC:' request.
16796
16797 2010-03-23 Pedro Alves <pedro@codesourcery.com>
16798
16799 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
16800 lwp had been stopped by a watchpoint.
16801
16802 2010-03-16 Pedro Alves <pedro@codesourcery.com>
16803
16804 * server.h (internal_error): Declare.
16805 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
16806 * utils.c (internal_error): New function.
16807
16808 2010-03-15 Andreas Schwab <schwab@redhat.com>
16809
16810 * configure.srv: Fix typo setting srv_regobj.
16811
16812 2010-03-15 Pedro Alves <pedro@codesourcery.com>
16813
16814 * linux-low.c (fetch_register): Avoid passing a non string literal
16815 format to `error'.
16816 (usr_store_inferior_registers): Ditto.
16817
16818 2010-03-14 Pedro Alves <pedro@codesourcery.com>
16819
16820 * linux-low.c (linux_write_memory): Bail out early if peeking
16821 memory failed.
16822
16823 2010-03-14 Pedro Alves <pedro@codesourcery.com>
16824
16825 * linux-low.h (struct lwp_info): New fields
16826 `stopped_by_watchpoint' and `stopped_data_address'.
16827 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
16828 here, and cache them in the lwp object.
16829 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
16830 directly.
16831 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
16832 field.
16833 (linux_stopped_by_watchpoint): Rewrite.
16834 (linux_stopped_data_address): Rewrite.
16835
16836 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
16837
16838 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
16839 switching the current inferior, not before.
16840
16841 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
16842
16843 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
16844 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
16845 i386-linux.c and amd64-linux.c.
16846 (reg-i386.o): Removed.
16847 (reg-i386.c): Likewise.
16848 (reg-i386-linux.o): Likewise.
16849 (reg-i386-linux.c): Likewise.
16850 (reg-x86-64.o): Likewise.
16851 (reg-x86-64.c): Likewise.
16852 (reg-x86-64-linux.o): Likewise.
16853 (reg-x86-64-linux.c): Likewise.
16854 (i386.o): New.
16855 (i386.c): Likewise.
16856 (i386-linux.o): Likewise.
16857 (i386-linux.c): Likewise.
16858 (amd64.o): Likewise.
16859 (amd64.c): Likewise.
16860 (amd64-linux.o): Likewise.
16861 (amd64-linux.c): Likewise.
16862
16863 * configure.srv (srv_i386_regobj): New.
16864 (srv_i386_linux_regobj): Likewise.
16865 (srv_amd64_regobj): Likewise.
16866 (srv_amd64_linux_regobj): Likewise.
16867 (srv_i386_32bit_xmlfiles): Likewise.
16868 (srv_i386_64bit_xmlfiles): Likewise.
16869 (srv_i386_xmlfiles): Likewise.
16870 (srv_amd64_xmlfiles): Likewise.
16871 (srv_i386_linux_xmlfiles): Likewise.
16872 (srv_amd64_linux_xmlfiles): Likewise.
16873 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
16874 srv_xmlfiles to $srv_i386_xmlfiles.
16875 (i[34567]86-*-mingw32ce*): Likewise.
16876 (i[34567]86-*-mingw*): Likewise.
16877 (i[34567]86-*-nto*): Likewise.
16878 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
16879 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
16880 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
16881 (x86_64-*-linux*): Likewise.
16882
16883 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
16884 (init_registers_amd64_linux): New.
16885 (x86_arch_setup): Replace init_registers_x86_64_linux with
16886 init_registers_amd64_linux.
16887
16888 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
16889
16890 * configure.ac: Check for libdl. If it is not available link against
16891 static libthread_db.
16892 * configure: Regenerate.
16893
16894 2010-02-22 Pedro Alves <pedro@codesourcery.com>
16895
16896 PR9605
16897
16898 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
16899 handing a read watchpoint.
16900 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
16901
16902 2010-02-12 Doug Evans <dje@google.com>
16903
16904 * linux-low.c (linux_supports_tracefork_flag): Document.
16905 (linux_look_up_symbols): Add comment.
16906
16907 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
16908
16909 * regcache.c (supply_register): Clear regcache if buf is NULL.
16910
16911 2010-02-02 Nicolas Roche <roche@sourceware.org>
16912 Joel Brobecker <brobecker@adacore.com>
16913
16914 * inferiors.c (find_inferior): Add function documentation.
16915 (unloaded_dll): Handle the case where the unloaded dll has not
16916 been previously registered in the dll list.
16917
16918 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16919
16920 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16921 (thumb2_breakpoint): New.
16922 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16923
16924 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16925
16926 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16927 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16928 breakpoints.
16929
16930 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16931
16932 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16933
16934 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16935
16936 * linux-s390-low.c (s390_collect_ptrace_register)
16937 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16938
16939 2010-01-21 Doug Evans <dje@google.com>
16940
16941 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16942 (PTRACE_ARG4_TYPE): New macro.
16943 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16944 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16945 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16946 (usr_store_inferior_registers): Ditto.
16947 (linux_read_memory, linux_write_memory): Ditto.
16948 (linux_test_for_tracefork): Ditto.
16949
16950 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16951 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16952
16953 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16954
16955 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16956 target.
16957
16958 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16959
16960 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16961 prototype to take a regcache. Adjust.
16962
16963 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16964
16965 * regcache.h (struct thread_info): Forward declare.
16966 (struct regcache): New.
16967 (new_register_cache): Adjust prototype.
16968 (get_thread_regcache): Declare.
16969 (free_register_cache): Adjust prototype.
16970 (registers_to_string, registers_from_string): Ditto.
16971 (supply_register, supply_register_by_name, collect_register)
16972 (collect_register_as_string, collect_register_by_name): Ditto.
16973 * regcache.c (struct inferior_regcache_data): Delete.
16974 (get_regcache): Rename to ...
16975 (get_thread_regcache): ... this. Adjust. Switch inferior before
16976 fetching registers.
16977 (regcache_invalidate_one): Adjust.
16978 (regcache_invalidate): Fix prototype.
16979 (new_register_cache): Return the new register cache.
16980 (free_register_cache): Change prototype.
16981 (realloc_register_cache): Adjust.
16982 (registers_to_string): Change prototype to take a regcache. Adjust.
16983 (registers_from_string): Ditto.
16984 (register_data): Ditto.
16985 (supply_register): Ditto.
16986 (supply_register_by_name): Ditto.
16987 (collect_register): Ditto.
16988 (collect_register_as_string): Ditto.
16989 (collect_register_by_name): Ditto.
16990 * server.c (process_serial_event): Adjust.
16991 * linux-low.h (regset_fill_func, regset_store_func): Change
16992 prototype.
16993 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16994 Change prototype.
16995 * linux-low.c (get_stop_pc): Adjust.
16996 (check_removed_breakpoint): Adjust.
16997 (linux_wait_for_event): Adjust.
16998 (linux_resume_one_lwp): Adjust.
16999 (fetch_register): Add regcache parameter. Adjust.
17000 (usr_store_inferior_registers): Ditto.
17001 (regsets_fetch_inferior_registers): Ditto.
17002 (regsets_store_inferior_registers): Ditto.
17003 (linux_fetch_registers, linux_store_registers): Ditto.
17004 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
17005 regcache. Adjust.
17006 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
17007 Ditto.
17008 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
17009 prototype to take a regcache.
17010 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
17011 * remote-utils.c (convert_ascii_to_int, outreg)
17012 (prepare_resume_reply): Change prototype to take a regcache.
17013 Adjust.
17014 * target.h (struct target_ops) <fetch_registers, store_registers>:
17015 Change prototype to take a regcache.
17016 (fetch_inferior_registers, store_inferior_registers): Change
17017 prototype to take a regcache. Adjust.
17018 * proc-service.c (ps_lgetregs): Adjust.
17019 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
17020 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
17021 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
17022 take a regcache. Adjust.
17023 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
17024 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
17025 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
17026 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
17027 * linux-cris-low.c (cris_get_pc, cris_set_pc)
17028 (cris_cannot_fetch_register):
17029 (cris_breakpoint_at): Change prototype to take a regcache.
17030 Adjust.
17031 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
17032 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
17033 to take a regcache. Adjust.
17034 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
17035 Adjust.
17036 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
17037 take a regcache. Adjust.
17038 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
17039 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
17040 (m68k_set_pc): Change prototype to take a regcache. Adjust.
17041 * linux-mips-low.c (mips_get_pc):
17042 (mips_set_pc): Change prototype to take a regcache. Adjust.
17043 (mips_reinsert_addr): Adjust.
17044 (mips_collect_register): Change prototype to take a regcache.
17045 Adjust.
17046 (mips_supply_register):
17047 (mips_collect_register_32bit, mips_supply_register_32bit)
17048 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17049 (mips_store_fpregset): Ditto.
17050 * linux-ppc-low.c (ppc_supply_ptrace_register)
17051 (ppc_supply_ptrace_register): Ditto.
17052 (parse_spufs_run): Adjust.
17053 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
17054 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
17055 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
17056 take a regcache. Adjust.
17057 * linux-s390-low.c (s390_collect_ptrace_register)
17058 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
17059 (s390_set_pc): Change prototype to take a regcache. Adjust.
17060 (s390_arch_setup): Adjust.
17061 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
17062 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
17063 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
17064 (sparc_fill_gregset, sparc_store_gregset_from_stack)
17065 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
17066 regcache. Adjust.
17067 (sparc_breakpoint_at): Adjust.
17068 * linux-xtensa-low.c (xtensa_fill_gregset):
17069 (xtensa_store_gregset):
17070 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
17071 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
17072 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
17073 prototype to take a regcache. Adjust.
17074 * win32-arm-low.c (arm_fetch_inferior_register)
17075 (arm_store_inferior_register): Change prototype to take a
17076 regcache. Adjust.
17077 * win32-i386-low.c (i386_fetch_inferior_register)
17078 (i386_store_inferior_register): Change prototype to take a
17079 regcache. Adjust.
17080 * win32-low.c (child_fetch_inferior_registers)
17081 (child_store_inferior_registers): Change prototype to take a
17082 regcache. Adjust.
17083 (win32_wait): Adjust.
17084 (win32_fetch_inferior_registers): Change prototype to take a
17085 regcache. Adjust.
17086 (win32_store_inferior_registers): Adjust.
17087 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
17088 store_inferior_register>: Change prototype to take a regcache.
17089
17090 2010-01-20 Doug Evans <dje@google.com>
17091
17092 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
17093 #ifdef.
17094 (linux_wait_for_event1, linux_init_signals): Ditto.
17095 (W_STOPCODE): Provide definition if missing.
17096
17097 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
17098
17099 * linux-low.c (linux_core_of_thread): New.
17100 (compare_ints, show_process, list_threads): New.
17101 (linux_qxfer_osdata): Report threads and cores.
17102 (linux_target_op): Register linux_core_of_thread.
17103 * remote-utils.c (prepare_resume_reply): Report the core.
17104 (buffer_xml_printf): Support %d specifier.
17105 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
17106 New.
17107 (handle_query): Handle qXfer:threads. Announce availability
17108 thereof.
17109 * target.h (struct target_ops): New field core_of_thread.
17110
17111 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
17112
17113 * Makefile.in (clean): Remove new generated files.
17114 (reg-s390.o, reg-s390.c): Remove rules.
17115 (reg-s390x.o, reg-s390x.c): Likewise.
17116 (s390-linux32.o, s390-linux32.c): Add rules.
17117 (s390-linux64.o, s390-linux64.c): Likewise.
17118 (s390x-linux64.o, s390x-linux64.c): Likewise.
17119 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
17120 * linux-s390-low.c: Include <elf.h>.
17121 (HWCAP_S390_HIGH_GPRS): Define if undefined.
17122 (init_registers_s390): Remove prototype.
17123 (init_registers_s390x): Likewise.
17124 (init_registers_s390_linux32): Add prototype.
17125 (init_registers_s390_linux64): Likewise.
17126 (init_registers_s390x_linux64): Likewise.
17127 (s390_num_regs_3264): New define.
17128 (s390_regmap_3264): New global variable.
17129 (s390_cannot_fetch_register): Remove obsolete check.
17130 (s390_cannot_store_register): Likewise.
17131 (s390_collect_ptrace_register): Handle upper/lower register halves.
17132 (s390_supply_ptrace_register): Likewise.
17133 (s390_fill_gregset): Update to register number changes.
17134 (s390_get_hwcap): New routine.
17135 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
17136 Install appropriate regmap and register set.
17137
17138 2010-01-01 Joel Brobecker <brobecker@adacore.com>
17139
17140 * server.c (gdbserver_version): Update copyright year to 2010.
17141 * gdbreplay.c (gdbreplay_version): Likewise.
17142
17143 2009-12-28 Doug Evans <dje@google.com>
17144
17145 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
17146 elf/external.h. Include <elf.h> instead but only if necessary.
17147
17148 2009-12-28 Pedro Alves <pedro@codesourcery.com>
17149
17150 * linux-low.c (linux_remove_process): Remove `detaching'
17151 parameter. Don't release/detach from thread_db here.
17152 (linux_kill): Release/detach from thread_db here, ...
17153 (linux_detach): ... and here, before actually detaching.
17154 (linux_wait_1): ... and here, when a process exits.
17155 * thread-db.c (any_thread_of): New.
17156 (thread_db_free): Switch the current inferior to a thread of the
17157 passed in process.
17158
17159 2009-12-21 Doug Evans <dje@google.com>
17160
17161 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
17162
17163 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
17164 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
17165 warning ifndef __NR_tkill. Move setting of errno there too.
17166 Delete unnecessary resetting of errno after syscall.
17167 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
17168
17169 * configure.ac: Check for dladdr.
17170 * config.in: Regenerate.
17171 * configure: Regenerate.
17172 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
17173 (try_thread_db_load): Update.
17174
17175 * linux-low.c (my_waitpid): Delete unnecessary prototype.
17176
17177 2009-12-18 Doug Evans <dje@google.com>
17178
17179 * event-loop.c: Include unistd.h if it exists.
17180
17181 * linux-low.c (my_waitpid): Move definition away from being in
17182 between linux_tracefork_child/linux_test_for_tracefork.
17183
17184 * gdb_proc_service.h (psaddr_t): Fix type.
17185 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
17186 signature to match glibc.
17187
17188 2009-12-16 Doug Evans <dje@google.com>
17189
17190 * linux-low.c (linux_read_memory): Fix argument to read.
17191
17192 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17193
17194 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
17195 events, don't leave current_inferior pointing at null.
17196
17197 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17198
17199 * win32-low.c (LOG): Delete.
17200 (OUTMSG): Output to stderr.
17201 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
17202 on compile time LOG macro.
17203 (win32_wait): Fix debug output.
17204
17205 2009-11-26 Pedro Alves <pedro@codesourcery.com>
17206
17207 * win32-low.c (win32_add_one_solib): If the dll name is
17208 "ntdll.dll", prepend the system directory to the dll path.
17209
17210 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
17211
17212 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
17213
17214 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
17215 Vladimir Prus <vladimir@codesourcery.com>
17216
17217 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
17218 * configure.ac: Check for __mcoldfire__ and set
17219 gdb_cv_m68k_is_coldfire.
17220 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
17221 reg-cf.o and reg-m68k.o.
17222 * configure: Regenerated.
17223
17224 2009-11-16 Pedro Alves <pedro@codesourcery.com>
17225
17226 * linux-low.c (linux_remove_process): Add `detaching' parameter.
17227 Pass it to thread_db_free.
17228 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
17229 proper `detaching' argument to linux_remove_process.
17230 * linux-low.h (thread_db_free): Add `detaching' parameter.
17231 * thread-db.c (thread_db_init): Pass false as `detaching' argument
17232 to thread_db_free.
17233 (thread_db_free): Add `detaching' parameter. Only
17234 call td_ta_clear_event if detaching from process.
17235
17236 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
17237
17238 * thread-db.c (thread_db_free): Fix typo.
17239
17240 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
17241
17242 PR gdb/10838
17243 * thread-db.c (thread_db_free): Call td_ta_clear_event.
17244
17245 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
17246
17247 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
17248 with an i686 compiler.
17249 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
17250 needed.
17251 * configure: Rebuilt.
17252
17253 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
17254
17255 PR gdb/10783
17256
17257 * server.c (handle_search_memory_1): Correct read_addr initialization
17258 in loop for searching subsequent chunks.
17259
17260 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
17261
17262 * configure.ac: New --with-libthread-db option.
17263 * thread-db.c: Allow direct dependence on libthread_db.
17264 (thread_db_free): Adjust.
17265 * config.in: Regenerate.
17266 * configure: Likewise.
17267
17268 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
17269
17270 PR gdb/10757
17271 * thread-db.c (attach_thread): New function.
17272 (maybe_attach_thread): Return success/failure.
17273 (find_new_threads_callback): Adjust.
17274 (thread_db_find_new_threads): Loop until no new threads.
17275
17276 2009-10-13 Pedro Alves <pedro@codesourcery.com>
17277
17278 * proc-service.c (ps_lgetregs): Formatting.
17279
17280 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
17281
17282 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
17283 * configure.ac: Adjust.
17284 * linux-low.h (struct process_info_private): Move members to struct
17285 thread_db.
17286 (thread_db_free, thread_db_handle_monitor_command): New prototype.
17287 * linux-low.c (linux_remove_process): Adjust.
17288 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
17289 * server.c (handle_query): Move code ...
17290 (handle_monitor_command): ... here. New function.
17291 * target.h (struct target_ops): New member.
17292 * thread-db.c (struct thread_db): New.
17293 (libthread_db_search_path): New variable.
17294 (thread_db_create_event, thread_db_enable_reporting)
17295 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
17296 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
17297 (try_thread_db_load_1, dladdr_to_soname): New functions.
17298 (try_thread_db_load, thread_db_load_search): New functions.
17299 (thread_db_init): Search for libthread_db.
17300 (thread_db_free): New function.
17301 (thread_db_handle_monitor_command): Likewise.
17302 * config.in: Regenerate.
17303 * configure: Regenerate.
17304
17305 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
17306
17307 * spu-low.c (spu_kill): Wait for inferior to terminate.
17308 Call clear_inferiors.
17309 (spu_detach): Call clear_inferiors.
17310
17311 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17312
17313 * aclocal.m4: Regenerate.
17314 * config.in: Likewise.
17315 * configure: Likewise.
17316
17317 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17318
17319 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
17320 (parse_spufs_run): New function.
17321 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
17322 (ppc_breakpoint_at): Handle SPU breakpoints.
17323
17324 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17325
17326 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
17327 (SPUFS_MAGIC): Define.
17328 (spu_enumerate_spu_ids): New function.
17329 (linux_qxfer_spu): New function.
17330 (linux_target_ops): Install linux_qxfer_spu.
17331
17332 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
17333
17334 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
17335 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
17336 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
17337 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
17338 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
17339 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
17340 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
17341 (init_registers_powerpc_cell32l): Add prototype.
17342 (init_registers_powerpc_cell64l): Likewise.
17343 (ppc_arch_setup): Detect Cell/B.E. architecture.
17344
17345 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17346
17347 * Makefile.in (datarootdir): New variable.
17348
17349 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17350
17351 * linux-low.c (linux_write_memory): Update debugging output.
17352 * Makefile.in (clean): Add new descriptions.
17353 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
17354 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
17355 * configure.srv: Add new files for arm*-*-linux*.
17356 * linux-arm-low.c: Add new declarations.
17357 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
17358 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
17359 (HWCAP_VFPv3D16): New.
17360 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
17361 instead of __IWMMXT__.
17362 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
17363 (arm_arch_setup): New.
17364 (target_regsets): Remove #ifdef. Add VFP regset.
17365 (the_low_target): Use arm_arch_setup.
17366
17367 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
17368
17369 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
17370 the main thread again.
17371
17372 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
17373
17374 Adding Neutrino gdbserver.
17375 * configure: Regenerated.
17376 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
17377 * configure.srv (i[34567]86-*-nto*): New target.
17378 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
17379 * remote-utils.c [__QNX__]: Include sys/iomgr.h
17380 (nto_comctrl) [__QNX__]: New function.
17381 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
17382
17383 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
17384
17385 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
17386 srv_tgtobj.
17387
17388 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
17389 Pedro Alves <pedro@codesourcery.com>
17390
17391 * win32-i386-low.c (i386_get_thread_context): Handle systems that
17392 don't support CONTEXT_EXTENDED_REGISTERS.
17393 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
17394 (the_low_target): Install them.
17395 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
17396 failing with ERROR_PIPE_NOT_CONNECTED.
17397
17398 2009-06-30 Doug Evans <dje@google.com>
17399 Pierre Muller <muller@ics.u-strasbg.fr>
17400
17401 Add h/w watchpoint support to x86-linux, win32-i386.
17402 * Makefile.in (SFILES): Add i386-low.c
17403 (i386_low_h): Define.
17404 (i386-low.o): Add dependencies.
17405 (linux-x86-low.o): Add i386-low.h dependency.
17406 (win32-i386-low.o): Ditto.
17407 * i386-low.c: New file.
17408 * i386-low.h: New file.
17409 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
17410 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
17411 * linux-low.c (linux_add_process): Initialize arch_private.
17412 (linux_remove_process): Free arch_private.
17413 (add_lwp): Initialize arch_private.
17414 (delete_lwp): Free arch_private.
17415 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
17416 provided.
17417 * linux-low.h (process_info_private): New member arch_private.
17418 (lwp_info): New member arch_private.
17419 (linux_target_ops): New members new_process, new_thread,
17420 prepare_to_resume.
17421 (ptid_of): New macro.
17422 * linux-x86-low.c: Include stddef.h, i386-low.h.
17423 (arch_process_info): New struct.
17424 (arch_lwp_info): New struct.
17425 (x86_linux_dr_get, x86_linux_dr_set): New functions.
17426 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17427 (i386_dr_low_get_status): New function.
17428 (x86_insert_point, x86_remove_point): New functions.
17429 (x86_stopped_by_watchpoint): New function.
17430 (x86_stopped_data_address): New function.
17431 (x86_linux_new_process, x86_linux_new_thread): New functions.
17432 (x86_linux_prepare_to_resume): New function.
17433 (the_low_target): Add entries for insert_point, remove_point,
17434 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
17435 prepare_to_resume.
17436 * server.c (debug_hw_points): New global.
17437 (monitor_show_help): Document set debug-hw-points.
17438 (handle_query): Process "set debug-hw-points".
17439 * server.h (debug_hw_points): Declare.
17440 (paddress): Declare.
17441 * utils.c (NUMCELLS, CELLSIZE): New macros.
17442 (get_sell, xsnprintf, paddress): New functions.
17443 * win32-arm-low.c (the_low_target): Add entries for insert_point,
17444 remove_point, stopped_by_watchpoint, stopped_data_address.
17445 * win32-i386-low.c: Include i386-low.h.
17446 (debug_reg_state): Replaces dr.
17447 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
17448 (i386_dr_low_get_status): New function.
17449 (i386_insert_point, i386_remove_point): New functions.
17450 (i386_stopped_by_watchpoint): New function.
17451 (i386_stopped_data_address): New function.
17452 (i386_initial_stuff): Update.
17453 (get_thread_context,set_thread_context,i386_thread_added): Update.
17454 (the_low_target): Add entries for insert_point,
17455 remove_point, stopped_by_watchpoint, stopped_data_address.
17456 * win32-low.c (win32_insert_watchpoint): New function.
17457 (win32_remove_watchpoint): New function.
17458 (win32_stopped_by_watchpoint): New function.
17459 (win32_stopped_data_address): New function.
17460 (win32_target_ops): Add entries for insert_watchpoint,
17461 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
17462 * win32-low.h (win32_target_ops): New members insert_point,
17463 remove_point, stopped_by_watchpoint, stopped_data_address.
17464
17465 2009-06-25 Pedro Alves <pedro@codesourcery.com>
17466
17467 * server.c (process_serial_event): Re-return unsupported, not
17468 error, if the type isn't recognized. Re-allow supporting only
17469 insert or remove packets. Also call require_running for
17470 breakpoints. Add missing break statement to default case. Tidy.
17471 * target.h (struct target_ops): Rename insert_watchpoint to
17472 insert_point, and remove_watchpoint to remove_point.
17473
17474 * linux-low.h (struct linux_target_ops): Likewise.
17475 * linux-low.c (linux_insert_watchpoint): Rename to ...
17476 (linux_insert_point): ... this. Adjust.
17477 (linux_remove_watchpoint): Rename to ...
17478 (linux_remove_point): ... this. Adjust.
17479 (linux_target_ops): Adjust.
17480 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
17481 (cris_insert_point): ... this.
17482 (cris_remove_watchpoint): Rename to ...
17483 (cris_remove_point): ... this.
17484 (the_low_target): Adjust.
17485
17486 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
17487
17488 * server.c (handle_v_kill): Pass signal_pid to
17489 kill_inferior if multi_process is zero.
17490
17491 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
17492
17493 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
17494 * target.h (target_ops): Comment for *_watchpoint to make it clear
17495 the functions can get types '0' and '1'.
17496
17497 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
17498
17499 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
17500 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
17501 * regcache.c (get_regcache): Likewise.
17502 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
17503 * win32-low.c (child_fetch_inferior_registers): Remove check for
17504 regno 0.
17505
17506 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
17507 Pedro Alves <pedro@codesourcery.com>
17508
17509 * target.h (struct target_ops) <supports_multi_process>: New
17510 callback.
17511 (target_supports_multi_process): New.
17512 * server.c (handle_query): Even if GDB reports support, only
17513 enable multi-process if the target also supports it. Report
17514 multi-process support only if the target backend supports it.
17515 * linux-low.c (linux_supports_multi_process): New function.
17516 (linux_target_ops): Install it as target_supports_multi_process
17517 callback.
17518
17519 2009-05-24 Doug Evans <dje@google.com>
17520
17521 Global renaming of find_thread_pid to find_thread_ptid.
17522 * server.h (find_thread_ptid): Renamed from find_thread_pid.
17523 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
17524 All callers updated.
17525
17526 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
17527 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
17528 directly.
17529
17530 * linux-low.c (get_stop_pc): Print pc if debug_threads.
17531 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
17532 (linux_resume_one_lwp): Ditto.
17533
17534 2009-05-23 Doug Evans <dje@google.com>
17535
17536 * linux-low.c (linux_resume_one_lwp): Change type of first arg
17537 from struct inferior_list_entry * to struct lwp_info *.
17538 All callers updated.
17539
17540 2009-05-13 Doug Evans <dje@google.com>
17541
17542 * linux-x86-low.c: Don't include assert.h.
17543 (x86_siginfo_fixup): Use fatal, not assert.
17544 (x86_arch_setup): Fix comment.
17545
17546 2009-05-12 Doug Evans <dje@google.com>
17547
17548 Biarch support for i386/amd64 gdbserver.
17549 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
17550 Add linux-x86-low.c.
17551 (linux-i386-low.o, linux-x86-64-low.o): Delete.
17552 (linux-x86-low.o): Add.
17553 * linux-x86-64-low.c: Delete.
17554 * linux-i386-low.c: Delete.
17555 * linux-x86-low.c: New file.
17556 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
17557 linux-x86-low.o.
17558 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
17559 linux-x86-low.o.
17560 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
17561 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
17562 (linux_child_pid_to_exec_file): New function.
17563 (elf_64_header_p, elf_64_file_p): New functions.
17564 (siginfo_fixup): New function.
17565 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
17566 give target a chance to convert layout.
17567 * linux-low.h (linux_target_ops): New member siginfo_fixup.
17568 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
17569
17570 2009-05-07 Doug Evans <dje@google.com>
17571
17572 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
17573 (regsets_store_inferior_registers): Ditto.
17574
17575 2009-05-06 Pedro Alves <pedro@codesourcery.com>
17576
17577 PR server/10048
17578
17579 * linux-low.c (must_set_ptrace_flags): Delete.
17580 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
17581 of the global.
17582 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
17583 `lwp->must_set_ptrace_flags' instead.
17584 (linux_wait_for_event_1): Set ptrace options here.
17585 (linux_wait_1): ... not here.
17586
17587 2009-04-30 Doug Evans <dje@google.com>
17588
17589 * inferiors.c (started_inferior_callback): New function.
17590 (attached_inferior_callback): New function.
17591 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
17592 * server.c (print_started_pid, print_attached_pid): New functions.
17593 (detach_or_kill_for_exit): New function.
17594 (main): Call it instead of for_each_inferior (kill_inferior_callback).
17595 * server.h (have_started_inferiors_p): Declare.
17596 (have_attached_inferiors_p): Declare.
17597
17598 * inferiors.c (remove_process): Fix memory leak, free process.
17599 * linux-low.c (linux_remove_process): New function.
17600 (linux_kill): Call it instead of remove_process.
17601 (linux_detach, linux_wait_1): Ditto.
17602
17603 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
17604
17605 * configure.srv: Add x86 Windows CE target.
17606
17607 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17608
17609 * inferiors.c (get_thread_process): Make global.
17610 * server.h (get_thread_process): Add prototype.
17611 * thread-db.c (find_one_thread): Use get_thread_process
17612 instead of current_process.
17613 (thread_db_get_tls_address): Do not crash if called when
17614 thread layer is not yet initialized.
17615
17616 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
17617
17618 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
17619 * spu-low.c (current_tid): Rename to ...
17620 (current_ptid): ... this.
17621 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
17622 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
17623 ptid_get_lwp (current_ptid) instead of current_tid.
17624 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
17625 instead of current_tid. Use find_process_pid to verify pid
17626 argument is valid. Pass proper argument to remove_process.
17627 (spu_thread_alive): Compare current_ptid instead of current_tid.
17628 (spu_resume): Likewise.
17629
17630 2009-04-02 Pedro Alves <pedro@codesourcery.com>
17631
17632 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
17633 variable.
17634
17635 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17636
17637 Implement the multiprocess extensions, and add linux multiprocess
17638 support.
17639
17640 * server.h (ULONGEST): Declare.
17641 (struct ptid, ptid_t): New.
17642 (minus_one_ptid, null_ptid): Declare.
17643 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17644 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
17645 (struct inferior_list_entry): Change `id' type from unsigned from
17646 to ptid_t.
17647 (struct sym_cache, struct breakpoint, struct
17648 process_info_private): Forward declare.
17649 (struct process_info): Declare.
17650 (current_process): Declare.
17651 (all_processes): Declare.
17652 (initialize_inferiors): Declare.
17653 (add_thread): Adjust to use ptid_t.
17654 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
17655 (add_process, remove_process, find_thread_pid): Declare.
17656 (find_inferior_id): Adjust to use ptid_t.
17657 (cont_thread, general_thread, step_thread): Change type to ptid_t.
17658 (multi_process): Declare.
17659 (push_event): Adjust to use ptid_t.
17660 (read_ptid, write_ptid): Declare.
17661 (prepare_resume_reply): Adjust to use ptid_t.
17662 (clear_symbol_cache): Declare.
17663 * inferiors.c (all_processes): New.
17664 (null_ptid, minus_one_ptid): New.
17665 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
17666 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
17667 (add_thread): Change unsigned long to ptid. Remove gdb_id
17668 parameter. Adjust.
17669 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
17670 (gdb_id_to_thread): Rename to ...
17671 (find_thread_pid): ... this. Change unsigned long to ptid.
17672 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
17673 (loaded_dll, pull_pid_from_list): Adjust.
17674 (add_process, remove_process, find_process_pid)
17675 (get_thread_process, current_process, initialize_inferiors): New.
17676 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
17677 (struct target_waitstatus) <related_pid>: Ditto.
17678 (struct target_ops) <kill, detach>: Add `pid' argument. Change
17679 return type to int.
17680 (struct target_ops) <join>: Add `pid' argument.
17681 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
17682 (struct target_ops) <wait>: Add `ptid' field. Change return type
17683 to ptid.
17684 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
17685 (mywait): Add `ptid' argument. Change return type to ptid_t.
17686 (target_pid_to_str): Declare.
17687 * target.c (set_desired_inferior): Adjust to use ptids.
17688 (mywait): Add new `ptid' argument. Adjust.
17689 (target_pid_to_str): New.
17690 * mem-break.h (free_all_breakpoints): Declare.
17691 * mem-break.c (breakpoints): Delelete.
17692 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
17693 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
17694 to use per-process breakpoint list.
17695 (free_all_breakpoints): New.
17696 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
17697 (symbol_cache, all_symbols_looked_up): Delete.
17698 (hexchars): New.
17699 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
17700 read_ptid): New.
17701 (prepare_resume_reply): Change ptid argument's type from unsigned
17702 long to ptid_t. Adjust. Implement W;process and X;process.
17703 (free_sym_cache, clear_symbol_cache): New.
17704 (look_up_one_symbol): Adjust to per-process symbol cache. *
17705 * server.c (cont_thread, general_thread, step_thread): Change type
17706 to ptid_t.
17707 (attached): Delete.
17708 (multi_process): New.
17709 (last_ptid): Change type to ptid_t.
17710 (struct vstop_notif) <ptid>: Change type to ptid_t.
17711 (queue_stop_reply, push_event): Change `ptid' argument's type to
17712 ptid_t.
17713 (discard_queued_stop_replies): Add `pid' argument.
17714 (start_inferior): Adjust to use ptids. Adjust to mywait interface
17715 changes. Don't reference the `attached' global.
17716 (attach_inferior): Adjust to mywait interface changes.
17717 (handle_query): Adjust to use ptids. Parse GDB's qSupported
17718 features. Handle and report "multiprocess+". Handle
17719 "qAttached:PID".
17720 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
17721 changes.
17722 (handle_v_kill): New.
17723 (handle_v_stopped): Adjust to use target_pid_to_str.
17724 (handle_v_requests): Allow multiple attaches and runs when
17725 multiprocess extensions are in effect. Handle "vKill".
17726 (myresume): Adjust to use ptids.
17727 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
17728 (handle_status): Adjust to discard_queued_stop_replies interface
17729 change.
17730 (first_thread_of, kill_inferior_callback)
17731 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
17732 (main): Call initialize_inferiors. Adjust to use ptids, killing
17733 and detaching from all inferiors. Handle multiprocess packet
17734 variants.
17735 * linux-low.h: Include gdb_proc_service.h.
17736 (struct process_info_private): New.
17737 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
17738 <lwpid_of>: Use ptid_get_lwp.
17739 (get_lwp_thread): Adjust.
17740 (struct lwp_info): Add `dead' member.
17741 (find_lwp_pid): Declare.
17742 * linux-low.c (thread_db_active): Delete.
17743 (new_inferior): Adjust comment.
17744 (inferior_pid): Delete.
17745 (linux_add_process): New.
17746 (handle_extended_wait): Adjust.
17747 (add_lwp): Change unsigned long to ptid.
17748 (linux_create_inferior): Add process to processes table. Adjust
17749 to use ptids. Don't set new_inferior here.
17750 (linux_attach_lwp): Rename to ...
17751 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
17752 it. Adjust to use ptids.
17753 (linux_attach_lwp): New.
17754 (linux_attach): Add process to processes table. Don't set
17755 new_inferior here.
17756 (struct counter): New.
17757 (second_thread_of_pid_p, last_thread_of_process_p): New.
17758 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
17759 multiple processes.
17760 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
17761 processes. Remove process from process table.
17762 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
17763 to multiple processes.
17764 (any_thread_of): New.
17765 (linux_detach): Add `pid' argument, and handle it. Remove process
17766 from processes table.
17767 (linux_join): Add `pid' argument. Handle it.
17768 (linux_thread_alive): Change unsighed long argument to ptid_t.
17769 Consider dead lwps as not being alive.
17770 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
17771 threads we're not interested in.
17772 (same_lwp, find_lwp_pid): New.
17773 (linux_wait_for_lwp): Change `pid' argument's type from int to
17774 ptid_t. Adjust.
17775 (linux_wait_for_event): Rename to ...
17776 (linux_wait_for_event_1): ... this. Change `pid' argument's type
17777 from int to ptid_t. Adjust.
17778 (linux_wait_for_event): New.
17779 (linux_wait_1): Add `ptid' argument. Change return type to
17780 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
17781 that exit from the process table.
17782 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
17783 Adjust.
17784 (mark_lwp_dead): New.
17785 (wait_for_sigstop): Adjust to use ptids. If a process exits while
17786 stopping all threads, mark its main lwp as dead.
17787 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
17788 ptids.
17789 (fetch_register, usr_store_inferior_registers)
17790 (regsets_fetch_inferior_registers)
17791 (regsets_store_inferior_registers, linux_read_memory)
17792 (linux_write_memory): Inline `inferior_pid'.
17793 (linux_look_up_symbols): Adjust to use per-process
17794 `thread_db_active'.
17795 (linux_request_interrupt): Adjust to use ptids.
17796 (linux_read_auxv): Inline `inferior_pid'.
17797 (initialize_low): Don't reference thread_db_active.
17798 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
17799 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
17800 (ps_getpid): Return the pid of the current inferior.
17801 * thread-db.c (proc_handle, thread_agent): Delete.
17802 (thread_db_create_event, thread_db_enable_reporting): Adjust to
17803 per-process data.
17804 (find_one_thread): Change argument type to ptid_t. Adjust to
17805 per-process data.
17806 (maybe_attach_thread): Adjust to per-process data and ptids.
17807 (thread_db_find_new_threads): Ditto.
17808 (thread_db_init): Ditto.
17809 * spu-low.c (spu_create_inferior, spu_attach): Add process to
17810 processes table. Adjust to use ptids.
17811 (spu_kill, spu_detach): Adjust interface. Remove process from
17812 processes table.
17813 (spu_join, spu_thread_alive): Adjust interface.
17814 (spu_wait): Adjust interface. Remove process from processes
17815 table. Adjust to use ptids.
17816 * win32-low.c (current_inferior_tid): Delete.
17817 (current_inferior_ptid): New.
17818 (debug_event_ptid): New.
17819 (thread_rec): Take a ptid. Adjust.
17820 (child_add_thread): Add `pid' argument. Adjust to use ptids.
17821 (child_delete_thread): Ditto.
17822 (do_initial_child_stuff): Add `attached' argument. Add process to
17823 processes table.
17824 (child_fetch_inferior_registers, child_store_inferior_registers):
17825 Adjust.
17826 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
17827 (win32_attach): Pass 1 to do_initial_child_stuff.
17828 (win32_kill): Adjust interface. Remove process from processes
17829 table.
17830 (win32_detach): Ditto.
17831 (win32_join): Adjust interface.
17832 (win32_thread_alive): Take a ptid.
17833 (win32_resume): Adjust to use ptids.
17834 (get_child_debug_event): Ditto.
17835 (win32_wait): Adjust interface. Remove exiting process from
17836 processes table.
17837
17838 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17839
17840 Non-stop mode support.
17841
17842 * server.h (non_stop): Declare.
17843 (gdb_client_data, handler_func): Declare.
17844 (delete_file_handler, add_file_handler, start_event_loop):
17845 Declare.
17846 (handle_serial_event, handle_target_event, push_event)
17847 (putpkt_notif): Declare.
17848 * target.h (enum resume_kind): New.
17849 (struct thread_resume): Replace `step' field by `kind' field.
17850 (TARGET_WNOHANG): Define.
17851 (struct target_ops) <wait>: Add `options' argument.
17852 <supports_non_stop, async, start_non_stop>: New fields.
17853 (target_supports_non_stop, target_async): New.
17854 (start_non_stop): Declare.
17855 (mywait): Add `options' argument.
17856 * target.c (mywait): Add `options' argument. Print child exit
17857 notifications here.
17858 (start_non_stop): New.
17859 * server.c (non_stop, own_buf, mem_buf): New globals.
17860 (struct vstop_notif): New.
17861 (notif_queue): New global.
17862 (queue_stop_reply, push_event, discard_queued_stop_replies)
17863 (send_next_stop_reply): New.
17864 (start_inferior): Adjust to use resume_kind. Adjust to mywait
17865 interface changes.
17866 (attach_inferior): In non-stop mode, don't wait for the target
17867 here.
17868 (handle_general_set): Handle QNonStop.
17869 (handle_query): When handling qC, return the current general
17870 thread, instead of the first thread of the list.
17871 (handle_query): If the backend supports non-stop mode, include
17872 QNonStop+ in the qSupported query response.
17873 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
17874 and non-stop mode.
17875 (handle_v_attach, handle_v_run): Handle non-stop mode.
17876 (handle_v_stopped): New.
17877 (handle_v_requests): Report support for vCont;t. Handle vStopped.
17878 (myresume): Adjust to use resume_kind. Handle non-stop.
17879 (queue_stop_reply_callback): New.
17880 (handle_status): Handle non-stop mode.
17881 (main): Clear non_stop flag on reconnection. Use the event-loop.
17882 Refactor serial protocol handling from here ...
17883 (process_serial_event): ... to this new function. When GDB
17884 selects any thread, select one here. In non-stop mode, wait until
17885 GDB acks all pending events before exiting.
17886 (handle_serial_event, handle_target_event): New.
17887 * remote-utils.c (remote_open): Install remote_desc in the event
17888 loop.
17889 (remote_close): Remove remote_desc from the event loop.
17890 (putpkt_binary): Rename to...
17891 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
17892 (putpkt_binary): New as wrapper around putpkt_binary_1.
17893 (putpkt_notif): New.
17894 (prepare_resume_reply): In non-stop mode, don't change the
17895 general_thread.
17896 * event-loop.c: New.
17897 * Makefile.in (OBJ): Add event-loop.o.
17898 (event-loop.o): New rule.
17899
17900 * linux-low.h (pid_of): Moved here.
17901 (lwpid_of): New.
17902 (get_lwp_thread): Use lwpid_of.
17903 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
17904 * linux-low.c (pid_of): Delete.
17905 (inferior_pid): Use lwpid_of.
17906 (linux_event_pipe): New.
17907 (target_is_async_p): New.
17908 (delete_lwp): New.
17909 (handle_extended_wait): Use lwpid_of.
17910 (add_lwp): Don't set lwpid field.
17911 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17912 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17913 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17914 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17915 first. Adjust to linux_wait_for_event interface changes. Use
17916 lwpid_of.
17917 (linux_detach): Don't delete the main lwp here.
17918 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17919 (status_pending_p): Don't consider explicitly suspended lwps.
17920 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17921 pointer. Add OPTIONS argument. Change return type to int. Use
17922 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17923 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17924 pointer. Add status pointer argument. Return a pid instead of a
17925 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17926 changes. In non-stop mode, don't switch to a random thread.
17927 (linux_wait): Rename to...
17928 (linux_wait_1): ... this. Add target_options argument, and handle
17929 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17930 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17931 clean exit and signal exit code. Don't stop all threads in
17932 non-stop mode. In all-stop mode, only stop all threads when
17933 reporting a stop to GDB. Handle explicit thread stop requests.
17934 (async_file_flush, async_file_mark): New.
17935 (linux_wait): New.
17936 (send_sigstop): Use lwpid_of.
17937 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17938 interface changes. In non-stop mode, don't switch to a random
17939 thread.
17940 (linux_resume_one_lwp): Use lwpid_of.
17941 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17942 (linux_resume_one_thread): ... this. Handle resume_stop. In
17943 non-stop mode, don't look for pending flag in all threads.
17944 (resume_status_pending_p): Don't consider explicitly suspended
17945 threads.
17946 (my_waitpid): Reimplement. Emulate __WALL.
17947 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17948 Use lwpid_of.
17949 (sigchld_handler, linux_supports_non_stop, linux_async)
17950 (linux_start_non_stop): New.
17951 (linux_target_ops): Register linux_supports_non_stop, linux_async
17952 and linux_start_non_stop.
17953 (initialize_low): Install SIGCHLD handler.
17954 * thread-db.c (thread_db_create_event, find_one_thread)
17955 (thread_db_get_tls_address): Use lwpid_of.
17956 * win32-low.c (win32_detach): Adjust to use resume_kind.
17957 (win32_wait): Add `options' argument.
17958 * spu-low.c (spu_resume): Adjust to use resume_kind.
17959 (spu_wait): Add `options' argument.
17960
17961 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17962
17963 Decouple target code from remote protocol.
17964
17965 * target.h (enum target_waitkind): New.
17966 (struct target_waitstatus): New.
17967 (struct target_ops) <wait>: Return an unsigned long. Take a
17968 target_waitstatus pointer instead of a char pointer.
17969 (mywait): Likewise.
17970 * target.c (mywait): Change prototype to return an unsigned long.
17971 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17972 * server.h (thread_from_wait, old_thread_from_wait): Delete
17973 declarations.
17974 (prepare_resume_reply): Change prototype to take a
17975 target_waitstatus.
17976 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17977 (last_status, last_ptid): New.
17978 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17979 pid instead of a signal.
17980 (attach_inferior): Remove "status" and "signal" parameters.
17981 Adjust.
17982 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17983 not as an address.
17984 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17985 (handle_v_requests, myresume): Remove "status" and "signal"
17986 parameters. Adjust.
17987 (handle_status): New.
17988 (main): Delete local `status'. Adjust.
17989 * remote-utils.c: Include target.h.
17990 (prepare_resume_reply): Change prototype to take a
17991 target_waitstatus. Adjust.
17992
17993 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17994 interface.
17995 * spu-low.c (spu_wait): Adjust.
17996 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17997 Delete.
17998 (win32_wait): Adjust.
17999
18000 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18001
18002 * target.h (struct thread_resume): Delete leave_stopped member.
18003 (struct target_ops): Add a `n' argument to the `resume' callback.
18004 * server.c (start_inferior): Adjust.
18005 (handle_v_cont, myresume): Adjust.
18006 * linux-low.c (check_removed_breakpoint): Adjust to resume
18007 interface change, and to removed leave_stopped field.
18008 (resume_ptr): Delete.
18009 (struct thread_resume_array): New.
18010 (linux_set_resume_request): Add new `arg' parameter. Adjust to
18011 resume interface change.
18012 (linux_continue_one_thread, linux_queue_one_thread)
18013 (resume_status_pending_p): Check if the resume field is NULL
18014 instead of checking the leave_stopped member.
18015 (linux_resume): Adjust to the target resume interface change.
18016 * spu-low.c (spu_resume): Adjust to the target resume interface
18017 change.
18018 * win32-low.c (win32_detach, win32_resume): Ditto.
18019
18020 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18021
18022 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
18023 flag.
18024 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
18025 pending.
18026 (linux_continue_one_thread): Only preserve the stepping flag if
18027 there's a pending breakpoint.
18028
18029 2009-03-31 Pedro Alves <pedro@codesourcery.com>
18030
18031 * server.c (main): After the inferior having exited, call
18032 remote_close before exiting gdbserver.
18033
18034 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
18035
18036 Fix size of FPSCR in Power 7 processors.
18037 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
18038 (PPC_FEATURE_HAS_DFP): New #define.
18039 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
18040 size of the FPSCR.
18041
18042 2009-03-23 Pedro Alves <pedro@codesourcery.com>
18043
18044 * server.c (handle_query) Whitespace and formatting.
18045
18046 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18047
18048 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
18049 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
18050 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
18051 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
18052 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
18053 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
18054 Makefile.in, configure.ac: Fix whitespace throughout.
18055 * configure: Regenerate.
18056
18057 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18058
18059 * inferiors.c (find_inferior): Make it safe for the callback
18060 function to delete the currently iterated inferior.
18061
18062 2009-03-22 Pedro Alves <pedro@codesourcery.com>
18063
18064 * Makefile.in (linuw_low_h): Move higher.
18065 (thread-db.o): Depend on $(linux_low_h).
18066
18067 2009-03-17 Pedro Alves <pedro@codesourcery.com>
18068
18069 Rename "process" to "lwp" throughout.
18070
18071 * linux-low.c (all_processes): Rename to...
18072 (all_lwps): ... this.
18073 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
18074 (add_process): Rename to ...
18075 (add_lwp): ... this. Adjust.
18076 (linux_create_inferior): Adjust.
18077 (linux_attach_lwp): Adjust.
18078 (linux_attach): Adjust.
18079 (linux_kill_one_process): Rename to ...
18080 (linux_kill_one_lwp): ... this. Adjust.
18081 (linux_kill): Adjust.
18082 (linux_detach_one_process): Rename to ...
18083 (linux_detach_one_lwp): ... this. Adjust.
18084 (linux_detach): Adjust.
18085 (check_removed_breakpoint): Adjust.
18086 (status_pending_p): Adjust.
18087 (linux_wait_for_process): Rename to ...
18088 (linux_wait_for_lwp): ... this. Adjust.
18089 (linux_wait_for_event): Adjust.
18090 (send_sigstop): Adjust.
18091 (wait_for_sigstop): Adjust.
18092 (stop_all_processes): Rename to ...
18093 (stop_all_lwps): ... this.
18094 (linux_resume_one_process): Rename to ...
18095 (linux_resume_one_lwp): ... this. Adjust.
18096 (linux_set_resume_request, linux_continue_one_thread)
18097 (linux_queue_one_thread, resume_status_pending_p)
18098 (usr_store_inferior_registers, regsets_store_inferior_registers)
18099 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
18100 Adjust.
18101 * linux-low.h (get_process): Rename to ...
18102 (get_lwp): ... this. Adjust.
18103 (get_thread_process): Rename to ...
18104 (get_thread_lwp): ... this. Adjust.
18105 (get_process_thread): Rename to ...
18106 (get_lwp_thread): ... this. Adjust.
18107 (struct process_info): Rename to ...
18108 (struct lwp_info): ... this.
18109 (all_processes): Rename to ...
18110 (all_lwps): ... this.
18111 * proc-service.c (ps_lgetregs): Adjust.
18112 * thread-db.c (thread_db_create_event, find_one_thread)
18113 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
18114
18115 2009-03-14 Pedro Alves <pedro@codesourcery.com>
18116
18117 * server.c (handle_query): Handle "qAttached".
18118
18119 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
18120
18121 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
18122 GPLv3, update license URL.
18123
18124 2009-03-01 Doug Evans <dje@google.com>
18125
18126 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
18127 (server_h): Add gdb_signals.h.
18128 (signals.o): Update.
18129 * server.h (target_signal_from_host,target_signal_to_host_p)
18130 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
18131
18132 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
18133
18134 * remote-utils.c (getpkt): Also generate remote-debug
18135 information if noack_mode is set.
18136
18137 2009-02-06 Pedro Alves <pedro@codesourcery.com>
18138
18139 * server.c (handle_query): Report qXfer:siginfo:read and
18140 qXfer:siginfo:write as supported and handle them.
18141 * target.h (struct target_ops) <qxfer_siginfo>: New field.
18142 * linux-low.c (linux_xfer_siginfo): New.
18143 (linux_target_ops): Set it.
18144
18145 2009-01-26 Pedro Alves <pedro@codesourcery.com>
18146
18147 * server.c (gdbserver_usage): Mention --remote-debug.
18148 (main): Accept '--remote-debug' switch.
18149
18150 2009-01-18 Doug Evans <dje@google.com>
18151
18152 * regcache.c (new_register_cache): No need to check result of xcalloc.
18153 * server.c (handle_search_memory): Back out calls to xmalloc,
18154 result is checked and error is returned to user upon failure.
18155 (handle_query): Ditto. Add more checks for result of malloc.
18156 (handle_v_cont): Check result of malloc, report error back to
18157 user upon failure.
18158 (handle_v_run): Ditto. Call freeargv.
18159 * server.h (freeargv): Declare.
18160 * utils.c (freeargv): New fn.
18161
18162 2009-01-15 Doug Evans <dje@google.com>
18163
18164 * gdbreplay.c (perror_with_name): Make arg const char *.
18165 * server.h (target_signal_to_name): Make return type const char *.
18166 * thread-db.c (thread_db_err_str): Make return type const char *.
18167 * utils.c (perror_with_name): Make arg const char *.
18168
18169 2009-01-14 Pedro Alves <pedro@codesourcery.com>
18170
18171 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
18172 when handling a EXIT_PROCESS_DEBUG_EVENT.
18173
18174 2009-01-06 Joel Brobecker <brobecker@adacore.com>
18175
18176 * gdbreplay.c (gdbreplay_version): Update copyright year.
18177 * server.c (gdbserver_version): Likewise.
18178
18179 2009-01-05 Doug Evans <dje@google.com>
18180
18181 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
18182 (handle_extended_wait): Improve comment.
18183
18184 2008-12-13 Doug Evans <dje@google.com>
18185
18186 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
18187 * server.h (ATTR_MALLOC): New macro.
18188 (xmalloc,xcalloc,xstrdup): Declare.
18189 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
18190 * inferiors.c: Ditto.
18191 * linux-low.c: Ditto.
18192 * mem-break.c: Ditto.
18193 * regcache.c: Ditto.
18194 * remote-utils.c: Ditto.
18195 * server.c: Ditto.
18196 * target.c: Ditto.
18197 * win32-low.c: Ditto.
18198
18199 2008-12-12 Doug Evans <dje@google.com>
18200
18201 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
18202 in debugging printf.
18203
18204 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
18205
18206 2008-12-09 Doug Evans <dje@google.com>
18207
18208 * linux-low.h (struct process_info): Delete member tid, unused.
18209 * thread-db.c (find_one_thread): Update.
18210 (maybe_attach_thread): Update.
18211
18212 2008-12-02 Pedro Alves <pedro@codesourcery.com>
18213
18214 * target.h (struct target_ops): Add qxfer_osdata member.
18215 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
18216 and dirent.h.
18217 (linux_qxfer_osdata): New functions.
18218 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
18219 callback.
18220 * server.c (handle_query): Handle "qXfer:osdata:read:".
18221 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
18222 (buffer_xml_printf): New functions.
18223 * server.h (struct buffer): New.
18224 (buffer_grow_str, buffer_grow_str0): New macros.
18225 (buffer_grow, buffer_free, buffer_init, buffer_finish)
18226 (buffer_xml_printf): Declare.
18227
18228 2008-11-24 Doug Evans <dje@google.com>
18229
18230 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
18231
18232 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
18233
18234 * server.c (handle_v_run): Always use the supplied argument list.
18235
18236 2008-11-19 Bob Wilson <bob.wilson@acm.org>
18237
18238 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
18239 (xtensa_regmap_table): Add entry for scompare1.
18240
18241 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
18242
18243 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
18244 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
18245 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
18246 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
18247 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
18248 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
18249 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
18250 XML target descriptions.
18251 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
18252 when inferior is running on an ISA 2.05 or later processor. Add
18253 special case to return offset for full 64-bit slot of FPSCR when
18254 in 32-bits.
18255
18256 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
18257
18258 * Makefile.in (SFILES, clean): Added sparc64 files.
18259 (reg-sparc64.o, reg-sparc64.c): New.
18260 * configure.srv (sparc*-*-linux*): New configuration.
18261 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
18262 syscall arguments for SPARC.
18263 (regsets_store_inferior_registers): Likewise.
18264 * linux-sparc-low.c: New file.
18265
18266 2008-10-21 Doug Evans <dje@google.com>
18267
18268 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
18269 (READLINE_DIR,READLINE_DEP): Delete.
18270 (INTERNAL_CFLAGS): Update.
18271 (LINTFLAGS): Update.
18272
18273 2008-10-10 Pedro Alves <pedro@codesourcery.com>
18274
18275 * server.c (handle_v_run): If GDB didn't specify an argv, use the
18276 whole argv from the last run, not just argv[0].
18277
18278 2008-09-08 Pedro Alves <pedro@codesourcery.com>
18279
18280 * regcache.c (new_register_cache): Return NULL if the register
18281 cache size isn't known yet.
18282 (free_register_cache): Avoid dereferencing a NULL regcache.
18283
18284 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18285
18286 * configure.srv: Merge MIPS and MIPS64.
18287
18288 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
18289
18290 * Makefile.in (uninstall): Apply $(EXEEXT) too.
18291
18292 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
18293
18294 * Makefile.in: Add required vsx dependencies.
18295
18296 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
18297 Declare init_registers_powerpc_vsx32l.
18298 Declare init_registers_powerpc_vsx64l.
18299 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
18300 (ppc_arch_setup): Check for VSX in hwcap.
18301 (ppc_fill_vsxregset): New function.
18302 (ppc_store_vsxregset): New function.
18303 Add new VSX entry in regset_info target_regsets.
18304
18305 * configure.srv: Add new VSX dependencies.
18306
18307 2008-08-12 Pedro Alves <pedro@codesourcery.com>
18308
18309 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
18310 (remote_open): Set or clear transport_is_reliable.
18311 (putpkt_binary): Don't expect acks in noack mode.
18312 (getpkt): Don't send ack/nac in noack mode.
18313 * server.c (handle_general_set): Handle QStartNoAckMode.
18314 (handle_query): If connected by tcp pass QStartNoAckMode+ in
18315 qSupported.
18316 (main): Reset noack_mode on every connection.
18317 * server.h (noack_mode): Declare.
18318
18319 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18320
18321 * Makefile.in (GDBREPLAY_OBS): New variable.
18322 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
18323
18324 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
18325 Daniel Jacobowitz <dan@codesourcery.com>
18326
18327 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
18328 (usr_store_inferior_registers): Likewise.
18329 (regsets_store_inferior_registers): Likewise.
18330
18331 2008-07-31 Rolf Jansen <rj@surtec.com>
18332 Pedro Alves <pedro@codesourcery.com>
18333
18334 * configure.ac: Check for memmem declaration.
18335 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18336 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
18337 (disable_packet_qfThreadInfo): Unconditionally compile.
18338 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
18339 * configure, config.in: Regenerate.
18340
18341 2008-07-28 Doug Kwan <dougkwan@google.com>
18342
18343 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
18344 (linux_write_memory): Remove declaration of errno.
18345
18346 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
18347
18348 * linux-low.c (handle_extended_wait): Do not use "status"
18349 variable uninitialized.
18350
18351 2008-07-07 Pedro Alves <pedro@codesourcery.com>
18352
18353 * server.c (handle_v_attach): Inhibit reporting dll changes.
18354
18355 2008-06-27 Pedro Alves <pedro@codesourcery.com>
18356
18357 * remote-utils.c (prepare_resume_reply): If requested, don't
18358 output "thread:TID" in the T stop reply.
18359
18360 * server.c (disable_packet_vCont, disable_packet_Tthread)
18361 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
18362 (handle_query): If requested, disable support for qC, qfThreadInfo
18363 and qsThreadInfo.
18364 (handle_v_requests): If requested, disable support for vCont.
18365 (gdbserver_show_disableable): New.
18366 (main): Handle --disable-packet and --disable-packet=LIST.
18367
18368 * server.h (disable_packet_vCont, disable_packet_Tthread)
18369 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
18370
18371 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
18372
18373 * server.c (gdbserver_usage): Mention --version.
18374
18375 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
18376
18377 * Makefile.in (gdbreplay.o): New rule.
18378
18379 2008-06-06 Joseph Myers <joseph@codesourcery.com>
18380
18381 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
18382 message, not gdbserver.
18383
18384 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
18385 Nathan Sidwell <nathan@codesourcery.com>
18386 Joseph Myers <joseph@codesourcery.com>
18387
18388 * acinclude.m4: Include ../../config/acx.m4.
18389 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
18390 * configure, config.in: Regenerate.
18391 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
18392 * server.c (gdbserver_version): Print PKGVERSION.
18393 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
18394 (main): Adjust gdbserver_usage calls.
18395 * gdbreplay.c (version, host_name): Add declarations.
18396 (gdbreplay_version, gdbreplay_usage): New.
18397 (main): Accept --version and --help options.
18398
18399 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
18400
18401 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
18402 (arm_breakpoint_at): Handle Thumb.
18403 (the_low_target): Add comment.
18404
18405 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
18406
18407 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
18408
18409 2008-05-09 Doug Evans <dje@google.com>
18410
18411 * server.h (decode_search_memory_packet): Declare.
18412 * remote-utils.c (decode_search_memory_packet): New fn.
18413 * server.c (handle_search_memory_1): New fn.
18414 (handle_search_memory): New fn.
18415 (handle_query): Process qSearch:memory packets.
18416
18417 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
18418
18419 * regcache.c (registers_length): Remove.
18420 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
18421 full register packet.
18422 * regcache.h (registers_length): Remove prototype.
18423 * server.h (PBUFSIZ): Define to 16384.
18424
18425 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
18426
18427 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
18428 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
18429 powerpc-64l.o, and powerpc-altivec64l.o.
18430 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
18431 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
18432 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
18433 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
18434 rs6000/power-linux.xml, and rs6000/power64-linux.xml
18435 to srv_xmlfiles.
18436
18437 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
18438 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
18439 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
18440 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
18441 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
18442 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
18443 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
18444 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
18445 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
18446 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
18447 (clean): Update.
18448
18449 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
18450 (init_registers_powerpc_32l): ... this new prototype.
18451 (init_registers_powerpc_32): Remove, replace by ...
18452 (init_registers_powerpc_altivec32l): ... this new prototype.
18453 (init_registers_powerpc_e500): Remove, replace by ...
18454 (init_registers_powerpc_e500l): ... this new prototype.
18455 (init_registers_ppc64): Remove, replace by ...
18456 (init_registers_powerpc_64l): ... this new prototype.
18457 (init_registers_powerpc_64): Remove, replace by ...
18458 (init_registers_powerpc_altivec64l): ... this new prototype.
18459 (ppc_num_regs): Set to 73.
18460 (PT_ORIG_R3, PT_TRAP): Define if necessary.
18461 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
18462 (ppc_cannot_store_register): Handle orig_r3 and trap.
18463 (ppc_arch_setup): Update init_registers_... calls.
18464 (ppc_fill_gregset): Handle orig_r3 and trap.
18465
18466 * inferiors.c (clear_inferiors): Reset current_inferior.
18467
18468 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
18469
18470 * acinclude.m4: Add override.m4.
18471 * configure: Regenerate.
18472
18473 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18474
18475 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
18476 initial call to init_register_ppc64.
18477
18478 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
18479
18480 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
18481 single powerpc*-*-linux* case.
18482 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
18483
18484 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
18485
18486 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
18487 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
18488 from reg_xmlfiles.
18489 * linux-ppc-low.c: Include <elf.h>.
18490 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
18491 (ppc_hwcap): New global variable.
18492 (ppc_regmap): Remove __SPE__ #ifdef sections.
18493 (ppc_regmap_e500): New global variable.
18494 (ppc_cannot_store_register): Update __SPE__ special case.
18495 (ppc_get_hwcap): New function.
18496 (ppc_arch_setup): Use it to determine whether inferior supports
18497 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
18498 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
18499 Do not access registers if target does not support AltiVec.
18500 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
18501 Do not access registers if target does not support SPE.
18502 (target_regsets): Unconditionally include AltiVec and SPE regsets.
18503
18504 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
18505
18506 * linux-low.c (disabled_regsets, num_regsets): New.
18507 (use_regsets_p): Delete.
18508 (linux_wait_for_process): Clear disabled_regsets.
18509 (regsets_fetch_inferior_registers): Check and set it.
18510 (regsets_store_inferior_registers): Likewise.
18511 (linux_fetch_registers, linux_store_registers): Do not use
18512 use_regsets_p.
18513 (initialize_low): Allocate disabled_regsets.
18514
18515 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
18516
18517 * Makefile.in (LIBOBJS): New.
18518 (OBS): Use LIBOBJS.
18519 (memmem.o): New rule.
18520 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
18521 * configure: Regenerated.
18522
18523 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
18524
18525 * server.c (handle_query): Never return "unsupported" for
18526 qXfer:features:read queries.
18527
18528 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
18529
18530 * server.c (get_features_xml): Fix inverted condition.
18531 (handle_query): Always support qXfer:feature:read.
18532
18533 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
18534
18535 * server.c (wrapper_argv): New.
18536 (start_inferior): Handle wrapper_argv. If set, expect an extra
18537 trap.
18538 (gdbserver_usage): Document --wrapper.
18539 (main): Parse --wrapper.
18540
18541 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18542
18543 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
18544 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
18545 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
18546 (ppc_set_pc): Likewise.
18547 (ppc_arch_setup): New function.
18548 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
18549 of collect_register.
18550 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
18551
18552 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18553
18554 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
18555 instead of linux-ppc64-low.o.
18556 * linux-ppc64-low.c: Remove file.
18557 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
18558 (linux-ppc64-low.o): Remove rule.
18559
18560 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
18561 (init_registers_powerpc_64): Likewise.
18562 (ppc_regmap): Conditionally define depending on __powerpc64__.
18563 (ppc_cannot_store_register): Do not special-case "fpscr" when
18564 compiled on __powerpc64__.
18565 (ppc_collect_ptrace_register): New function.
18566 (ppc_supply_ptrace_register): New function.
18567 (ppc_breakpoint): Change type to "unsigned int".
18568 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
18569 (the_low_target): Conditionally provide initializers for the
18570 arch_setup member depending on __powerpc64__. Install
18571 collect_ptrace_register and supply_ptrace_register members.
18572
18573 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
18574
18575 * regcache.h (gdbserver_xmltarget): Add extern declaration.
18576 * server.c (gdbserver_xmltarget): Define.
18577 (get_features_xml): Use it to replace "target.xml" and arch_string.
18578
18579 * configure.srv: Remove srv_xmltarget. Add XML files that were
18580 mentioned there to srv_xmlfiles instead. Remove conditional tests
18581 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
18582 srv_xmlfiles and srv_regobj to include all possible choices.
18583 * configure.ac (srv_xmltarget): Remove.
18584 (srv_xmlfiles): Do not add "target.xml".
18585 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
18586 checks for supplementary target information.
18587 * configure: Regenerate.
18588 * Makefile.in (XML_TARGET): Remove.
18589 (target.xml): Remove rule.
18590 (clean): Do not clean up target.xml.
18591 (.PRECIOUS): Do not mention target.xml.
18592
18593 * target.h (struct target_ops): Remove arch_string member.
18594 * linux-low.c (linux_arch_string): Remove.
18595 (linux_target_ops): Remove arch_string initializer.
18596 * linux-low.h (struct linux_target_ops): Remove arch_string member.
18597 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
18598 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
18599 * spu-low.c (spu_arch_string): Remove.
18600 (spu_target_ops): Remove arch_string initializer.
18601 * win32-low.c (win32_arch_string): Remove.
18602 (win32_target_ops): Remove arch_string initializer.
18603 * win32-low.h (struct win32_target_ops): Remove arch_string member.
18604 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
18605 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
18606
18607 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18608
18609 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
18610 by collect_ptrace_register and supply_ptrace_register hooks.
18611 * linux-low.c (fetch_register): Use supply_ptrace_register callback
18612 instead of checking for the_low_target.left_pad_xfer.
18613 (usr_store_inferior_registers): Use collect_ptrace_register callback
18614 instead of checking for the_low_target.left_pad_xfer.
18615
18616 * linux-s390-low.c (s390_collect_ptrace_register): New function.
18617 (s390_supply_ptrace_register): Likewise.
18618 (s390_fill_gregset): Call s390_collect_ptrace_register.
18619 (the_low_target): Update.
18620
18621 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
18622 (ppc_supply_ptrace_register): Likewise.
18623 (the_low_target): Update.
18624
18625 * linux-i386-low.c (the_low_target): Update.
18626 * linux-x86-64-low.c (the_low_target): Update.
18627
18628 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18629
18630 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
18631 reg-s390.o and reg-s390x.o.
18632
18633 * linux-low.c (new_inferior): New global variable.
18634 (linux_create_inferior, linux_attach): Set it.
18635 (linux_wait_for_process): Call the_low_target.arch_setup after the
18636 target has stopped for the first time.
18637 (initialize_low): Do not call the_low_target.arch_setup.
18638
18639 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
18640 (s390_set_pc): Likewise.
18641 (s390_arch_setup): New function.
18642 (the_low_target): Use s390_arch_setup as arch_setup routine.
18643
18644 * regcache.c (realloc_register_cache): New function.
18645 (set_register_cache): Call it for each existing regcache.
18646
18647 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
18648
18649 * server.h (init_registers): Remove prototype.
18650
18651 * linux-low.h (struct linux_target_ops): Add arch_setup field.
18652 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
18653 instead of init_registers ().
18654 * linux-arm-low.c (init_registers_arm): Add prototype.
18655 (init_registers_arm_with_iwmmxt): Likewise.
18656 (the_low_target): Add initializer for arch_setup field.
18657 * linux-cris-low.c (init_registers_cris): Add prototype.
18658 (the_low_target): Add initializer for arch_setup field.
18659 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
18660 (the_low_target): Add initializer for arch_setup field.
18661 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
18662 (the_low_target): Add initializer for arch_setup field.
18663 * linux-ia64-low.c (init_registers_ia64): Add prototype.
18664 (the_low_target): Add initializer for arch_setup field.
18665 * linux-m32r-low.c (init_registers_m32r): Add prototype.
18666 (the_low_target): Add initializer for arch_setup field.
18667 * linux-m68k-low.c (init_registers_m68k): Add prototype.
18668 (the_low_target): Add initializer for arch_setup field.
18669 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
18670 (init_registers_mips64_linux): Likewise.
18671 (the_low_target): Add initializer for arch_setup field.
18672 * linux-ppc-low.c (init_registers_ppc): Add prototype.
18673 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
18674 (the_low_target): Add initializer for arch_setup field.
18675 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
18676 (init_registers_powerpc_64): Likewise.
18677 (the_low_target): Add initializer for arch_setup field.
18678 * linux-s390-low.c (init_registers_s390): Add prototype.
18679 (init_registers_s390x): Likewise.
18680 (the_low_target): Add initializer for arch_setup field.
18681 * linux-sh-low.c (init_registers_sh): Add prototype.
18682 (the_low_target): Add initializer for arch_setup field.
18683 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
18684 (the_low_target): Add initializer for arch_setup field.
18685 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
18686 (the_low_target): Add initializer for arch_setup field.
18687
18688 * win32-low.h (struct win32_target_ops): Add arch_setup field.
18689 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
18690 instead of init_registers ().
18691 * win32-arm-low.c (init_registers_arm): Add prototype.
18692 (the_low_target): Add initializer for arch_setup field.
18693 * win32-i386-low.c (init_registers_i386): Add prototype.
18694 (the_low_target): Add initializer for arch_setup field.
18695
18696 * spu-low.c (init_registers_spu): Add prototype.
18697 (initialize_low): Call initialie_registers_spu () instead of
18698 initialize_registers ().
18699
18700 2008-02-19 Pedro Alves <pedro@codesourcery.com>
18701
18702 * server.c (handle_v_requests): When handling the vRun and vAttach
18703 packets, if already debugging a process, don't kill it. Return an
18704 error instead.
18705
18706 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
18707
18708 * server.c (handle_query): Correct length check.
18709
18710 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
18711
18712 * win32-low.c (do_initial_child_stuff): Add process handle
18713 parameter. Set current_process_handle and current_process_id from the
18714 parameters. Clear globals.
18715 (win32_create_inferior): Don't set current_process_handle and
18716 current_process_id here. Instead pass them on the call to
18717 do_initial_child_stuff.
18718 (win32_attach): Likewise.
18719 (win32_clear_inferiors): New.
18720 (win32_kill): Don't close the current process handle or the
18721 current thread handle here. Instead call win32_clear_inferiors.
18722 (win32_detach): Don't open a new handle to the process. Call
18723 win32_clear_inferiors.
18724 (win32_join): Don't rely on current_process_handle; open a new
18725 handle using the process id.
18726 (win32_wait): Call win32_clear_inferiors when the inferior process
18727 has exited.
18728
18729 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
18730
18731 * server.c (monitor_show_help): Add "exit".
18732
18733 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
18734
18735 * Makefile.in (SFILES): Add linux-xtensa-low.c.
18736 (clean): Add reg-xtensa.c.
18737 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
18738 * configure.srv (xtensa*-*-linux*) New target.
18739 * linux-xtensa-low.c: New.
18740 * xtensa-xtregs.c: New.
18741
18742 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
18743
18744 * hostio.c: Don't include errno.h.
18745 (errno_to_fileio_errno): Move to hostio-errno.
18746 * hostio.c: (hostio_error): Remove the error parameter. Defer the
18747 error number outputting to the target->hostio_last_error callback.
18748 (hostio_packet_error): Use FILEIO_EINVAL directly.
18749 (handle_open, handle_pread, hostio_error, handle_unlink): Update
18750 calls to hostio_error.
18751 * hostio-errno.c: New.
18752 * server.h (hostio_last_error_from_errno): Declare.
18753 * target.h (target_ops): Add hostio_last_error member.
18754 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
18755 as hostio_last_error handler.
18756 * spu-low.c (spu_target_ops): Likewise.
18757 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
18758 (wince_hostio_last_error): New functions.
18759 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
18760 as hostio_last_error handler.
18761 (win32_target_ops) [!_WIN32_WCE]: Register
18762 hostio_last_error_from_errno as hostio_last_error handler.
18763 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
18764 (hostio-errno.o): New rule.
18765 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
18766 * configure.srv (srv_hostio_err_objs): New variable. Default to
18767 hostio-errno.o.
18768 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
18769 * configure: Regenerate.
18770
18771 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18772
18773 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
18774 (linux_kill, linux_detach): Clean up the process list.
18775 * remote-utils.c (remote_open): Improve port number parsing.
18776 (putpkt_binary, input_interrupt): Only send interrupts if the target
18777 is running.
18778 * server.c (extended_protocol): Make static.
18779 (attached): Define earlier.
18780 (exit_requested, response_needed, program_argv): New variables.
18781 (target_running): New.
18782 (start_inferior): Clear attached here.
18783 (attach_inferior): Set attached here.
18784 (require_running): Define.
18785 (handle_query): Use require_running and target_running. Implement
18786 "monitor exit".
18787 (handle_v_attach, handle_v_run): New.
18788 (handle_v_requests): Use require_running. Handle vAttach and vRun.
18789 (gdbserver_usage): Update.
18790 (main): Redo argument parsing. Handle --debug and --multi. Handle
18791 --attach along with other options or after the port. Save
18792 program_argv. Support no initial program. Resynchronize
18793 communication with GDB after an error. Handle "monitor exit".
18794 Use require_running and target_running. Always allow the extended
18795 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
18796 restart in extended mode.
18797 * README: Refer to the GDB manual. Update --attach usage.
18798
18799 2007-12-20 Andreas Schwab <schwab@suse.de>
18800
18801 * linux-low.c (STACK_SIZE): Define.
18802 (linux_tracefork_child): Use it. Use __clone2 on ia64.
18803 (linux_test_for_tracefork): Likewise.
18804
18805 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
18806
18807 * linux-low.c (linux_wait_for_event): Update messages. Do not
18808 reinsert auto-delete breakpoints.
18809 * mem-break.c (struct breakpoint): Change return type of handler to
18810 int.
18811 (set_breakpoint_at): Update handler type.
18812 (reinsert_breakpoint_handler): Return 1 instead of calling
18813 delete_breakpoint.
18814 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
18815 setting a new one.
18816 (check_breakpoints): Delete auto-delete breakpoints and return 2.
18817 * mem-break.h (set_breakpoint_at): Update handler type.
18818 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
18819 * win32-low.c (auto_delete_breakpoint): New.
18820 (get_child_debug_event): Use it.
18821
18822 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
18823
18824 * configure.ac: Check for pread and pwrite.
18825 * hostio.c (handle_pread): Fall back to lseek and read.
18826 (handle_pwrite): Fall back to lseek and write.
18827 * config.in, configure: Regenerated.
18828
18829 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
18830
18831 * server.c (myresume): Add own_buf argument.
18832 (main): Update calls.
18833
18834 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
18835
18836 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
18837 * remote-utils.c (remote_open): Do not call disable_async_io.
18838 (block_async_io): Delete.
18839 (unblock_async_io): Make static.
18840 (initialize_async_io): New.
18841 * server.c (handle_v_cont): Handle async I/O here.
18842 (myresume): Likewise. Move other common resume tasks here...
18843 (main): ... from here. Call initialize_async_io. Disable async
18844 I/O before the main loop.
18845 * server.h (initialize_async_io): Declare.
18846 (block_async_io, unblock_async_io): Delete prototypes.
18847 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
18848
18849 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
18850
18851 * remote-utils.c (readchar): Allow binary data in received messages.
18852
18853 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18854
18855 * win32-low.c (attaching): New global.
18856 (win32_create_inferior): Clear the `attaching' global.
18857 (win32_attach): Set the `attaching' global.
18858 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
18859 attaching. Only set a breakpoint at the entry point if not
18860 attaching.
18861
18862 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18863
18864 * server.c (main): Don't report dll events on the initial
18865 connection on attaches.
18866
18867 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18868
18869 * server.c (main): Relax numerical bases supported for the pid of
18870 the --attach command line argument.
18871
18872 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18873
18874 * win32-low.c (win32_attach): Call OpenProcess before
18875 DebugActiveProcess, not after. Add last error output to error
18876 call.
18877
18878 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18879
18880 * win32-low.c (win32_get_thread_context)
18881 (win32_set_thread_context): New functions.
18882 (thread_rec): Use win32_get_thread_context.
18883 (continue_one_thread, win32_resume): Use win32_set_thread_context.
18884 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
18885 field.
18886
18887 2007-12-03 Leo Zayas
18888 Pedro Alves <pedro_alves@portugalmail.pt>
18889
18890 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
18891 global variables.
18892 (child_add_thread): Minor cleanup.
18893 (child_continue): Resume artificially suspended threads before
18894 calling ContinueDebugEvent.
18895 (suspend_one_thread): New.
18896 (fake_breakpoint_event): New.
18897 (get_child_debug_event): Change return type to int. Check here if
18898 gdb sent an interrupt request. If a soft interrupt was requested,
18899 fake a breakpoint event. Return 0 if there is no event to handle,
18900 and 1 otherwise.
18901 (win32_wait): Don't check here if gdb sent an interrupt request.
18902 Ensure there is a valid event to handle.
18903 (win32_request_interrupt): Add soft interruption method as last
18904 resort.
18905
18906 2007-12-03 Leo Zayas
18907 Pedro Alves <pedro_alves@portugalmail.pt>
18908
18909 * win32-low.h (win32_thread_info): Add descriptions to the
18910 structure members. Replace `suspend_count' counter by a
18911 `suspended' flag.
18912 * win32-low.c (thread_rec): Update condition of when to get the
18913 context from the inferior. Rely on ContextFlags being set if it
18914 has already been retrieved. Only suspend the inferior thread if
18915 we haven't already. Warn if that fails.
18916 (continue_one_thread): s/suspend_count/suspended/. Only call
18917 ResumeThread once. Warn if that fails.
18918
18919 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18920
18921 * win32-low.c (win32_wait): Don't read from the inferior when it
18922 has already exited.
18923
18924 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18925
18926 * Makefile.in (win32_low_h): New variable.
18927 (win32-low.o): Add dependency on $(win32_low_h).
18928 (win32-arm-low.o, win32-i386-low.o): New rules.
18929
18930 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18931
18932 * hostio.c: Correct copyright year.
18933
18934 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18935
18936 * Makefile.in (OBS): Add hostio.o.
18937 (hostio.o): New rule.
18938 * server.h (handle_vFile): Declare.
18939 * hostio.c: New file.
18940 * server.c (handle_v_requests): Take packet_len and new_packet_len
18941 for binary packets. Call handle_vFile.
18942 (main): Update call to handle_v_requests.
18943
18944 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18945
18946 * linux-low.c: Include <sched.h>.
18947
18948 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18949
18950 * linux-low.c (linux_tracefork_grandchild): New.
18951 (linux_tracefork_child): Use clone.
18952 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18953
18954 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18955
18956 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18957
18958 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18959
18960 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18961
18962 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18963
18964 * inferiors.c (change_inferior_id): Delete.
18965 (add_pid_to_list, pull_pid_from_list): New.
18966 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18967 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18968 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18969 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18970 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18971 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18972 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18973 (using_threads): Always set to 1.
18974 (handle_extended_wait): New.
18975 (add_process): Do not set TID.
18976 (linux_create_inferior): Set must_set_ptrace_flags.
18977 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18978 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18979 (linux_thread_alive): Rename TID argument to LWPID.
18980 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18981 (linux_wait_for_event): Do not use TID or check using_threads. Update
18982 call to dead_thread_notify. Call handle_extended_wait.
18983 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18984 (send_sigstop): Delete sigstop_sent.
18985 (wait_for_sigstop): Avoid TID.
18986 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18987 (linux_test_for_tracefork): New.
18988 (linux_lookup_signals): Use thread_db_active and
18989 linux_supports_tracefork_flag.
18990 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18991 * linux-low.h (get_process_thread): Avoid TID.
18992 (struct process_ifo): Move thread_known and tid to the end. Remove
18993 sigstop_sent.
18994 (linux_attach_lwp, thread_db_init): Update prototypes.
18995 * server.h (change_inferior_id): Delete prototype.
18996 (add_pid_to_list, pull_pid_from_list): New prototypes.
18997 * thread-db.c (thread_db_use_events): New.
18998 (find_first_thread): Rename to...
18999 (find_one_thread): ...this. Update callers and messages. Do not
19000 call fatal. Check thread_db_use_events. Do not call
19001 change_inferior_id or new_thread_notify.
19002 (maybe_attach_thread): Update. Do not call new_thread_notify.
19003 (thread_db_init): Set thread_db_use_events. Check use_events.
19004 * utils.c (fatal, warning): Correct message prefix.
19005
19006 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
19007
19008 * Makefile.in (clean): Remove new files.
19009 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
19010 (powerpc-64.o, powerpc-64.c): New rules.
19011 * configure.srv: Use alternate register sets for powerpc64-*-linux*
19012 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
19013 with SPE.
19014 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
19015 SPE targets.
19016 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
19017 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
19018 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
19019 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
19020 (target_regsets): Add AltiVec and SPE register sets.
19021 * configure.ac: Check for AltiVec and SPE.
19022 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
19023 (ppc_fill_vrregset, ppc_store_vrregset): New.
19024 (target_regsets): Add AltiVec register set.
19025 * configure: Regenerated.
19026
19027 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
19028
19029 * linux-low.c (O_LARGEFILE): Define.
19030 (linux_read_memory): Use /proc/PID/mem.
19031 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
19032 * configure, config.in: Regenerated.
19033
19034 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19035
19036 * linux-low.c (linux_wait_for_event): Do not pass signals while
19037 single-stepping.
19038
19039 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19040
19041 * win32-low.c (create_process): New.
19042 (win32_create_inferior): Use create_process instead of
19043 CreateProcess. If create_process failed retry appending an ".exe"
19044 suffix. Store the GetLastError result immediatelly after
19045 create_process calls and use it on the call to error.
19046
19047 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
19048
19049 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
19050
19051 2007-08-23 Joel Brobecker <brobecker@adacore.com>
19052
19053 * configure.ac: Switch license to GPLv3.
19054
19055 2007-08-01 Michael Snyder <msnyder@access-company.com>
19056
19057 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
19058
19059 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
19060
19061 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
19062 typedef.
19063 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
19064 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
19065 CloseToolhelp32Snapshot.
19066 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
19067 CloseToolhelp32Snapshot.
19068
19069 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
19070
19071 * server.c (main): Check for inferior exit before main loop.
19072
19073 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
19074
19075 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
19076 instead of on tmp_desc.
19077
19078 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
19079 Daniel Jacobowitz <dan@codesourcery.com>
19080
19081 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
19082 (add_thread): Minor cleanups.
19083 (clear_inferiors): Move lower in the file. Clear the DLL
19084 list.
19085 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
19086 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
19087 (xml_escape_text): New.
19088 * server.c (handle_query): Handle qXfer:libraries:read. Report it
19089 for qSupported.
19090 (handle_v_cont): Report errors.
19091 (gdbserver_version): Update.
19092 (main): Correct size of own_buf. Do not report initial DLL events.
19093 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
19094 (unloaded_dll, xml_escape_text): New.
19095 * win32-low.c (enum target_waitkind): Update comments.
19096 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
19097 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
19098 (win32_EnumProcessModules, win32_GetModuleInformation)
19099 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
19100 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
19101 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
19102 (win32_Module32First, win32_Module32Next, load_toolhelp)
19103 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
19104 (get_child_debug_event): Handle DLL events.
19105 (win32_wait): Likewise.
19106
19107 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19108
19109 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
19110 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
19111
19112 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19113
19114 * win32-low.c (handle_output_debug_string): Ignore event if not
19115 waiting.
19116
19117 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
19118
19119 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
19120
19121 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
19122
19123 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
19124
19125 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
19126
19127 * inferiors.c (change_inferior_id): Add comment.
19128 * linux-low.c (check_removed_breakpoint): Add an early
19129 prototype. Improve debug output.
19130 (linux_attach): Doc update.
19131 (linux_detach_one_process, linux_detach): Clean up before releasing
19132 each process.
19133 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
19134 * linux-low.h (struct process_info): Doc improvement.
19135 * mem-break.c (delete_all_breakpoints): New.
19136 * mem-break.h (delete_all_breakpoints): New prototype.
19137 * thread-db.c (find_first_thread): New.
19138 (thread_db_create_event): Call it instead of
19139 thread_db_find_new_threads. Clean up unused variables.
19140 (maybe_attach_thread): Remove first thread handling.
19141 (thread_db_find_new_threads): Use find_first_thread.
19142 (thread_db_get_tls_address): Likewise.
19143
19144 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
19145
19146 * thread-db.c (thread_db_find_new_threads): Add prototype.
19147 (thread_db_create_event): Check for the main thread before adding
19148 a new thread.
19149 (maybe_attach_thread): Only enable event reporting if TID == 0.
19150 (thread_db_get_tls_address): Check for new threads.
19151
19152 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
19153
19154 * linux-low.c (linux_create_inferior): Try execv before execvp.
19155 * spu-low.c (spu_create_inferior): Likewise.
19156
19157 2007-06-13 Mike Frysinger <vapier@gentoo.org>
19158
19159 * linux-low.c (linux_create_inferior): Change execv to execvp.
19160 * spu-low.c (spu_create_inferior): Likewies.
19161
19162 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
19163
19164 * Makefile.in (clean): Clean new files instead of deleted ones.
19165 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
19166 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
19167 rules.
19168 * configure.srv: Specify XML files and new regformats for MIPS and
19169 MIPS64 GNU/Linux.
19170 * linux-mips-low.c (mips_num_regs): Set to only used registers.
19171 (mips_regmap): Do not fetch $0. Remove unused registers. Add
19172 an entry for the restart register.
19173 (mips_cannot_fetch_register, mips_cannot_store_register)
19174 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
19175 register names to match the XML descriptions.
19176 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
19177 restart register instead of $0.
19178
19179 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19180 Markus Deuling <deuling@de.ibm.com>
19181
19182 * remote-utils.c (decode_xfer_write): New function.
19183 * server.h (decode_xfer_write): Add prototype.
19184 * server.c (handle_query): Add PACKET_LEN argument. Support
19185 qXfer:spu:read and qXfer:spu:write packets.
19186 (main): Pass packet_len to handle_query.
19187 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
19188 * target.h (target_ops): Add qxfer_spu.
19189
19190 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
19191
19192 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
19193 accessing non-seekable spufs files.
19194
19195 2007-05-16 Markus Deuling <deuling@de.ibm.com>
19196
19197 * server.c (handle_query): Add reply for qC packet.
19198
19199 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19200 Leo Zayas <lerele@champenstudios@com>
19201
19202 * server.h (check_remote_input_interrupt_request): New function.
19203 * remote_utils.c (INVALID_DESCRIPTOR): New define.
19204 (remote_desc): Initialize with INVALID_DESCRIPTOR.
19205 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
19206 (check_remote_input_interrupt_request): New function.
19207 * server.h (check_remote_input_interrupt_request): Declare.
19208 * win32-low.c (winapi_DebugBreakProcess,
19209 winapi_GenerateConsoleCtrlEvent): New typedefs.
19210 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
19211 to 250 ms.
19212 (win32_wait): Check for remote interrupt request
19213 with check_remote_input_interrupt_request.
19214 (win32_request_interrupt): New function.
19215 (win32_target_op): Set request_interrupt to win32_request_interrupt.
19216
19217 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19218
19219 * win32-low.c (debug_registers_changed,
19220 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
19221 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
19222 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
19223 (thread_rec): Get context using the low target.
19224 (child_add_thread): Call thread_added on the low target,
19225 which does the same thing.
19226 (regptr): Delete.
19227 (do_initial_child_stuff): Remove debug registers references.
19228 Set context using the low target. Resume threads after
19229 setting the contexts.
19230 (child_continue): Remove dead variable. Remove debug
19231 registers references.
19232 (child_fetch_inferior_registers): Go through the low target.
19233 (do_child_store_inferior_registers): Remove.
19234 (child_store_inferior_registers): Go through the low target.
19235 (win32_resume): Remove debug registers references.
19236 Set context using the low target.
19237 (handle_exception): Change return type to void. Don't record
19238 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
19239 first chance exception.
19240 (get_child_debug_event): Change return type to void. Remove
19241 goto loop. Always return after waiting for debug event.
19242 (win32_wait): Convert to switch statement. Handle spurious
19243 events.
19244
19245 * win32-i386-low.c (debug_registers_changed,
19246 debug_registers_used): New.
19247 (initial_stuff): Rename to ...
19248 (i386_initial_stuff): ... this. Clear debug registers
19249 state variables.
19250 (store_debug_registers): Delete.
19251 (i386_get_thread_context): New.
19252 (load_debug_registers): Delete.
19253 (i386_set_thread_context): New.
19254 (i386_thread_added): New.
19255 (single_step): Rename to ...
19256 (i386_single_step): ... this.
19257 (do_fetch_inferior_registers): Rename to ...
19258 (i386_fetch_inferior_register): ... this.
19259 (i386_store_inferior_register): New.
19260 (the_low_target): Adapt to new interface.
19261
19262 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
19263 (arm_get_thread_context): New.
19264 (arm_set_thread_context): New.
19265 (regptr): New.
19266 (do_fetch_inferior_registers): Rename to ...
19267 (arm_fetch_inferior_register): ... this.
19268 (arm_store_inferior_register): New.
19269 (arm_wince_breakpoint): Reimplement as unsigned long.
19270 (arm_wince_breakpoint_len): Define.
19271 (the_low_target): Adapt to new interface.
19272
19273 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
19274 load_debug_registers. Add get_thread_context, set_thread_context,
19275 thread_added and store_inferior_register. Rename
19276 fetch_inferior_registers to fetch_inferior_register.
19277 (regptr): Remove declaration.
19278
19279 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19280
19281 * linux-low.c (linux_detach): Change return type to int. Return 0.
19282 * spu-low.c (spu_detach): Likewise.
19283
19284 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19285
19286 * target.h (target_ops): Change return type of detach to int.
19287 Add join.
19288 (join_inferior): New.
19289 * server.c (main): Don't skip detach support on mingw32.
19290 If the inferior doesn't support detaching return error.
19291 Call join_inferior instead of using waitpid.
19292 * linux-low.c (linux_join): New.
19293 (linux_target_op): Add linux_join.
19294 * spu-low.c (spu_join): New.
19295 (spu_target_ops): Add spu_join.
19296 * win32-low.c (win32_detach): Adapt to new interface.
19297 Reopen current_process_handle before detaching. Issue a child
19298 resume before detaching.
19299 (win32_join): New.
19300 (win32_target_op): Add win32_join.
19301
19302 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19303
19304 * win32-low.c (win32-attach): Fix return value.
19305 * target.h (target_ops): Describe ATTACH return values.
19306
19307 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19308
19309 * win32-low.c (GETPROCADDRESS): Define.
19310 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
19311 (winapi_DebugSetProcessKillOnExit): Likewise.
19312 (win32_create_inferior): Force usage of ansi CreateProcessA.
19313 (win32_attach): Use GETPROCADDRESS.
19314 (win32_detach): Likewise.
19315
19316 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
19317
19318 * win32-low.c (win32_wait): Don't use WSTOPSIG.
19319
19320 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
19321
19322 * win32-low.c: Commit leftover changes from 2007-03-29.
19323
19324 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19325
19326 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
19327 fields short instead of int. Add explicit padding.
19328 (i387_cache_to_fsave): Remove unnecessary casts.
19329 (i387_fsave_to_cache): Doc fix.
19330 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
19331
19332 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
19333
19334 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
19335 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
19336
19337 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19338
19339 * configure.srv (arm*-*-mingw32ce*): Move near the other
19340 arm targets.
19341
19342 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
19343
19344 * configure.ac: Add errno checking.
19345 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
19346 sys/file.h and malloc.h.
19347 (AC_CHECK_DECLS): Add perror.
19348 (srv_mingwce): Handle.
19349 * configure.srv (i[34567]86-*-cygwin*): Add
19350 win32-i386-low.o to srv_tgtobj.
19351 (i[34567]86-*-mingw*): Likewise.
19352 (arm*-*-mingw32ce*): Add case.
19353 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19354 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
19355 [__MINGW32CE__] (strerror): New function.
19356 [__MINGW32CE__] (errno): Define to GetLastError.
19357 [__MINGW32CE__] (COUNTOF): New macro.
19358 (remote_open): Remove extra close call.
19359 * mem-break.c (delete_breakpoint_at): New function.
19360 * mem-break.h (delete_breakpoint_at): Declare.
19361 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
19362 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
19363 [USE_WIN32API] (read, write): Add char* casts.
19364 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
19365 * server.h: Include wincecompat.h on Windows CE.
19366 [HAVE_ERRNO_H]: Check.
19367 (perror): Declare if not declared.
19368 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
19369 (perror_with_name): Remove errno declaration.
19370 * wincecompat.h: New.
19371 * wincecompat.c: New.
19372 * win32-low.h: New.
19373 * win32-arm-low.c: New.
19374 * win32-i386-low.c: New.
19375 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
19376 (OUTMSG2): Make it safe.
19377 (_T): New macro.
19378 (COUNTOF): New macro.
19379 (NUM_REGS): Get it from the low target.
19380 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
19381 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
19382 (thread_rec): Let low target handle debug registers.
19383 (child_add_thread): Likewise.
19384 (child_init_thread_list): Likewise.
19385 (continue_one_thread): Likewise.
19386 (regptr): New.
19387 (do_child_fetch_inferior_registers): Move to ...
19388 * win32-i386-low.c: ... here, and rename to ...
19389 (do_fetch_inferior_registers): ... this.
19390 * win32-low.c (child_fetch_inferior_registers):
19391 Go through the low target.
19392 (do_child_store_inferior_registers): Use regptr.
19393 (strwinerror): New function.
19394 (win32_create_inferior): Handle Windows CE.
19395 Use strwinerror instead of strerror on Windows error
19396 codes. Add program to the error output.
19397 Don't close the main thread handle on Windows CE.
19398 (win32_attach): Use coredll.dll on Windows CE.
19399 (win32_kill): Close current process and current
19400 thread handles.
19401 (win32_detach): Use coredll.dll on Windows CE.
19402 (win32_resume): Let low target handle debug registers, and
19403 step request.
19404 (handle_exception): Add/Remove initial breakpoint. Avoid
19405 non-existant WSTOPSIG on Windows CE.
19406 (win32_read_inferior_memory): Cast to remove warning.
19407 (win32_arch_string): Go through the low target.
19408 (initialize_low): Call set_breakpoint_data with the low
19409 target's breakpoint.
19410 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
19411 FOP_REGNUM, mappings): Move to ...
19412 * win32-i386-low.c: ... here.
19413 * win32-low.c (win32_thread_info): Move to ...
19414 * win32-low.h: ... here.
19415 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
19416 win32-arm-low.c and wincecompat.c.
19417 (all:): Add $EXEEXT.
19418 (install-only:): Likewise.
19419 (gdbserver:): Likewise.
19420 (gdbreplay:): Likewise.
19421 * config.in: Regenerate.
19422 * configure: Regenerate.
19423
19424 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19425
19426 * win32-low.c: Rename typedef thread_info to
19427 win32_thread_info throughout.
19428
19429 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
19430
19431 * win32-i386-low.c: Rename to ...
19432 * win32-low.c: ... this.
19433 * configure.srv: Replace win32-i386-low.o with win32-low.o.
19434 * Makefile.in: Likewise.
19435
19436 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
19437
19438 * remote-utils.c (monitor_output): Constify msg parameter.
19439 * server.h (monitor_output): Likewise.
19440 * win32-i386-low.c (handle_output_debug_string): New.
19441 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
19442 handle_output_debug_string.
19443 (get_child_debug_event): Likewise.
19444
19445 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
19446
19447 * server.c (main): Correct strtoul check.
19448
19449 2007-03-27 Jon Ringle <jon@ringle.org>
19450
19451 * linux-low.c: Check __ARCH_HAS_MMU__ also.
19452
19453 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
19454
19455 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
19456
19457 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
19458
19459 * terminal.h: Check HAVE_SGTTY_H.
19460
19461 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
19462
19463 * remote-utils.c (remote_open): Print out the assigned port number.
19464
19465 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
19466
19467 * remote-utils.c (monitor_output): New function.
19468 * server.c (debug_threads): Define here.
19469 (monitor_show_help): New function.
19470 (handle_query): Handle qRcmd.
19471 (main): Do not handle 'd' packet.
19472 * server.h (debug_threads, remote_debug, monitor_output): Declare.
19473 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
19474 of debug_threads.
19475
19476 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19477
19478 * Makefile.in (EXEEXT): New.
19479 (clean): Use $(EXEEXT).
19480
19481 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19482
19483 * target.h (target_ops): Rename send_signal to request_interrupt,
19484 and remove enum target_signal parameter.
19485 * linux-low.c (linux_request_interrupt): Rename from
19486 linux_send_signal, and always send SIGINT.
19487 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
19488 and always send SIGINT.
19489 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
19490 of send_signal.
19491 (input_interrupt): Likewise.
19492
19493 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
19494
19495 * server.c (get_features_xml): Check if target implemented
19496 arch_string.
19497 * win32-i386-low.c (win32_arch_string): New.
19498 (win32_target_ops): Add win32_arch_string as arch_string member.
19499
19500 2007-02-22 Markus Deuling <deuling@de.ibm.com>
19501
19502 * spu-low.c (spu_arch_string): New.
19503 (spu_target_ops): Add spu_arch_string.
19504
19505 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
19506
19507 * remote-utils.c: Remove HAVE_TERMINAL_H check.
19508 * configure.ac: Do not check for terminal.h.
19509 * configure, config.in: Regenerated.
19510
19511 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19512
19513 * Makefile.in (OBS): Add $(XML_BUILTIN).
19514 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
19515 (clean): Update.
19516 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
19517 (arm-with-iwmmxt.c): New.
19518 * config.in, configure: Regenerate.
19519 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
19520 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
19521 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
19522 (arm*-*-linux*): Add iWMMXt and regset support.
19523 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
19524 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
19525 (arm_store_wmmxregset, target_regsets): New.
19526 * server.c (get_features_xml): Take annex argument. Check builtin
19527 XML documents.
19528 (handle_query): Handle multiple annexes.
19529
19530 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19531
19532 * remote-utils.c [USE_WIN32API] (read, write): Define.
19533 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
19534 write.
19535
19536 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
19537
19538 * linux-i386-low.c (the_low_target): Set arch_string.
19539 * linux-x86-64-low.c (the_low_target): Likewise.
19540 * linux-low.c (linux_arch_string): New.
19541 (linux_target_ops): Add it.
19542 * linux-low.h (struct linux_target_ops): Add arch_string.
19543 * server.c (write_qxfer_response): Use const void * for DATA.
19544 (get_features_xml): New.
19545 (handle_query): Handle qXfer:features:read. Report it for qSupported.
19546 * target.h (struct target_ops): Add arch_string method.
19547
19548 2007-01-03 Denis Pilat <denis.pilat@st.com>
19549 Daniel Jacobowitz <dan@codesourcery.com>
19550
19551 * linux-low.c (linux_kill): Handle being called with no threads.
19552 * win32-i386-low.c (win32_kill): Likewise.
19553 (get_child_debug_event): Clear current_process_handle.
19554
19555 2006-12-30 Denis PILAT <denis.pilat@st.com>
19556 Daniel Jacobowitz <dan@codesourcery.com>
19557
19558 * remote-utils.c (remote_open): Check the type of specified
19559 serial port devices before opening them.
19560 * server.c (main): Kill the inferior if an error occurs during
19561 the first remote_open.
19562
19563 2006-12-05 Markus Deuling <deuling@de.ibm.com>
19564
19565 * README: Update supported targets.
19566
19567 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
19568
19569 * Makefile.in (clean): Remove reg-mips64.c.
19570 (reg-mips64.c, reg-mips64.o): New rules.
19571 * configure.srv: Handle mips64. Include regset support for mips.
19572 * linux-mips-low.c (union mips_register): New.
19573 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
19574 (mips_breakpoint, mips_breakpoint_at): Use int.
19575 (mips_collect_register, mips_supply_register)
19576 (mips_collect_register_32bit, mips_supply_register_32bit)
19577 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
19578 (mips_store_fpregset, target_regsets): New.
19579 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
19580
19581 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
19582
19583 * configure.srv: Add target "spu*-*-*".
19584 * Makefile.in (clean): Remove reg-spu.c.
19585 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
19586 * spu-low.c: New file.
19587
19588 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19589
19590 * configure.ac: Correct td_thr_tls_get_addr test.
19591 * configure: Regenerated.
19592
19593 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
19594
19595 * linux-low.c (linux_wait_for_event): Reformat. Use the
19596 pass_signals array.
19597 * remote-utils.c (decode_address_to_semicolon): New.
19598 * server.c (pass_signals, handle_general_set): New.
19599 (handle_query): Mention QPassSignals for qSupported.
19600 (main): Call handle_general_set.
19601 * server.h (pass_signals, decode_address_to_semicolon): New.
19602
19603 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
19604
19605 * server.c (handle_query): Correct error handling for read_auxv.
19606
19607 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
19608
19609 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
19610 and srv_linux_thread_db to yes.
19611 * linux-s390-low.c (s390_fill_gregset): New function.
19612 (target_regsets): Define data structure.
19613
19614 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
19615
19616 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
19617 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
19618 * config.in, configure: Regenerated.
19619 * inferiors.c (gdb_id_to_thread): New function.
19620 (gdb_id_to_thread_id): Use it.
19621 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
19622 * linux-low.h (struct process_info): Add th member.
19623 (thread_db_get_tls_address): New prototype.
19624 * remote-utils.c (decode_address): Make non-static.
19625 * server.c (handle_query): Handle qGetTLSAddr.
19626 * server.h (gdb_id_to_thread, decode_address): New prototypes.
19627 * target.h (struct target_ops): Add get_tls_address.
19628 * thread-db.c (maybe_attach_thread): Save the thread handle.
19629 (thread_db_get_tls_address): New.
19630
19631 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
19632
19633 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
19634 (linux_resume_one_process): Take a siginfo_t *. Update all
19635 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
19636 (struct pending_signals): Add a siginfo_t.
19637 (linux_wait_for_process): Always set last_status.
19638 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
19639 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
19640 * linux-low.h (struct process_info): Add last_status.
19641
19642 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
19643
19644 * remote-utils.c (try_rle): New function.
19645 (putpkt_binary): Use it.
19646
19647 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
19648
19649 * Makefile.in (clean): Clean reg-x86-64-linux.c.
19650 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
19651 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
19652 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
19653 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
19654 point registers.
19655
19656 2006-08-08 Richard Sandiford <richard@codesourcery.com>
19657
19658 * server.c (terminal_fd): New variable.
19659 (old_foreground_pgrp): Likewise.
19660 (restore_old_foreground_pgrp): New function.
19661 (start_inferior): Record the terminal file descriptor in terminal_fd
19662 and its original foreground group in old_foreground_pgrp. Register
19663 restore_old_foreground_pgrp with atexit().
19664
19665 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
19666
19667 * server.c (handle_query): Correct qPart to qXfer.
19668
19669 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
19670
19671 * configure.ac: Check for more headers which are missing on
19672 Windows. Automatically supply -lwsock32 and USE_WIN32API.
19673 * configure.srv: Add Cygwin and mingw32.
19674 * remote-utils.c: Don't include headers unconditionally which
19675 are missing on mingw32. Include <winsock.h> for mingw32.
19676 (remote_open): Adjust for mingw32 support. Flush
19677 standard error after writing to it.
19678 (remote_close, putpkt_binary, input_interrupt, block_async_io)
19679 (unblock_async_io, enable_async_io, disable_async_io)
19680 (readchar, getpkt): Update for Winsock support.
19681 (prepare_resume_reply): Expect a protocol signal number.
19682 * server.c: Disable <sys/wait.h> on mingw32.
19683 (start_inferior): Adjust for mingw32 support. Flush
19684 standard error after writing to it.
19685 (attach_inferior): Likewise. Use protocol signal
19686 numbers.
19687 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
19688 and names.
19689 * win32-i386-low.c: New file.
19690 * Makefile.in (XM_CLIBS): Set.
19691 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
19692 (win32-i386-low.o): New dependency rule.
19693 * linux-low.c (linux_wait): Use target signal numbers.
19694 * target.h (struct target_ops): Doc fix.
19695 * server.h (target_signal_to_name): New prototype.
19696 * gdbreplay.c: Don't include headers unconditionally which
19697 are missing on mingw32. Include <winsock.h> for mingw32.
19698 (remote_close, remote_open): Adjust for Winsock support.
19699 * configure, config.in: Regenerated.
19700
19701 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
19702
19703 * server.c (decode_xfer_read, write_qxfer_response): New.
19704 (handle_query): Take a packet length argument. Handle
19705 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
19706 the qSupported response.
19707 (main): Update call to handle_query.
19708
19709 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
19710
19711 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
19712 (putpkt_binary): Renamed from putpkt and adjusted for binary
19713 data.
19714 (putpkt): New wrapper for putpkt_binary.
19715 (readchar): Don't mask off the high bit.
19716 (decode_X_packet): New function.
19717 * server.c (main): Call putpkt_binary if a handler sets the packet
19718 length. Save the length of the incoming packet. Handle 'X'.
19719 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
19720
19721 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
19722
19723 * server.c (handle_query): Handle qSupported.
19724
19725 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19726
19727 * remote-utils.c (all_symbols_looked_up): New variable.
19728 (look_up_one_symbol): Check it.
19729 * server.h (look_up_one_symbol): New declaration.
19730 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
19731
19732 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
19733
19734 * Makefile.in (linux-arm-low.o): Update dependencies.
19735 * linux-arm-low.c: Include "gdb_proc_service.h".
19736 (PTRACE_GET_THREAD_AREA): Define.
19737 (ps_get_thread_area): New function.
19738
19739 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
19740
19741 * configure.srv (m68k*-*-uclinux*): New target.
19742 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
19743 (linux_resume_one_process): Remove extraneous cast.
19744 (linux_read_offsets): New.
19745 (linux_target_op): Add linux_read_offsets on mmuless systems.
19746 * server.c (handle_query): Add qOffsets logic.
19747 * target.h (struct target_ops): Add read_offsets.
19748
19749 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19750
19751 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
19752 (PTRACE_GET_THREAD_AREA): Define.
19753 (ps_get_thread_area): New function.
19754 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
19755 (linux-x86-64-low.o): Update.
19756
19757 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
19758
19759 * configure.ac: Remove checks for prfpregset_t.
19760 * gdb_proc_service.h: New file.
19761 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
19762 new "gdb_proc_service.h".
19763 * proc-service.c: Likewise.
19764 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
19765 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
19766 * Makefile.in (gdb_proc_service_h): Updated.
19767 * configure, config.in: Regenerated.
19768
19769 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19770
19771 * remote-utils.c (prepare_resume_reply): Move declaration
19772 of gdb_id_from_wait to the top of the block.
19773
19774 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
19775
19776 * linux-low.c (regsets_store_inferior_registers): Read the regset
19777 from the target before filling it.
19778
19779 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
19780
19781 * server.c (attach_inferior): Return SIGTRAP for a successful
19782 attach.
19783
19784 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
19785
19786 * Makefile.in (OBS): Add version.o.
19787 (STAGESTUFF): Delete.
19788 (version.o): Add dependencies.
19789 (version.c): Replace rule.
19790 (clean): Remove version.c.
19791 * server.c (gdbserver_version): New.
19792 (gdbserver_usage): Use printf.
19793 (main): Handle --version and --help.
19794 * server.h (version, host_name): Add declarations.
19795
19796 2005-12-23 Eli Zaretskii <eliz@gnu.org>
19797
19798 * linux-arm-low.c:
19799 * linux-arm-low.c:
19800 * inferiors.c:
19801 * i387-fp.h:
19802 * i387-fp.c:
19803 * gdbreplay.c:
19804 * regcache.c:
19805 * proc-service.c:
19806 * mem-break.h:
19807 * mem-break.c:
19808 * linux-x86-64-low.c:
19809 * linux-sh-low.c:
19810 * linux-s390-low.c:
19811 * linux-ppc64-low.c:
19812 * linux-ppc-low.c:
19813 * linux-mips-low.c:
19814 * linux-m68k-low.c:
19815 * linux-m32r-low.c:
19816 * linux-low.h:
19817 * linux-low.c:
19818 * linux-ia64-low.c:
19819 * linux-i386-low.c:
19820 * linux-crisv32-low.c:
19821 * thread-db.c:
19822 * terminal.h:
19823 * target.h:
19824 * target.c:
19825 * server.h:
19826 * server.c:
19827 * remote-utils.c:
19828 * regcache.h:
19829 * utils.c:
19830 * Makefile.in:
19831 * configure.ac:
19832 * gdbserver.1: Add (C) after Copyright. Update the FSF
19833 address.
19834
19835 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
19836
19837 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
19838 (arm_breakpoint_at): Recognize both breakpoints.
19839 (the_low_target): Use the correct breakpoint instruction.
19840
19841 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
19842
19843 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
19844 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
19845 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
19846 (the_low_target): Update.
19847
19848 2005-10-25 Andreas Schwab <schwab@suse.de>
19849
19850 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
19851
19852 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
19853 (ia64_num_regs): Reduce to 462.
19854
19855 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
19856
19857 * acinclude.m4: Correct quoting.
19858 * aclocal.m4: Regenerated.
19859
19860 Suggested by SZOKOVACS Robert <szo@ies.hu>:
19861 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
19862 (thread_db_init): Call thread_db_err_str.
19863 * configure.ac: Check for TD_VERSION.
19864 * config.in, configure: Regenerated.
19865
19866 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19867
19868 * server.h (error, fatal, warning): Add ATTR_FORMAT.
19869
19870 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19871
19872 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
19873 is not available. Define HAVE_PTRACE_GETREGS if it is.
19874 * config.in, configure: Regenerated.
19875 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
19876 * linux-i386-low.c, linux-m68k-low.c: Update to use
19877 HAVE_PTRACE_GETREGS.
19878 * linux-low.c (regsets_fetch_inferior_registers)
19879 (regsets_store_inferior_registers): Only return 0 if we processed
19880 GENERAL_REGS.
19881 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
19882 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
19883
19884 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19885
19886 * inferiors.c (struct thread_info): Add gdb_id.
19887 (add_thread): Add gdb_id argument.
19888 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
19889 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
19890 calls to add_thread.
19891 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
19892 * server.c (handle_query): Use thread_to_gdb_id.
19893 (handle_v_cont, main): Use gdb_id_to_thread_id.
19894 * server.h (add_thread): Update prototype.
19895 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
19896 prototypes.
19897
19898 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19899
19900 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
19901 left-padded registers.
19902 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
19903 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
19904
19905 2005-07-01 Steve Ellcey <sje@cup.hp.com>
19906
19907 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
19908 * configure: Regenerate.
19909 * config.in: Regenerate.
19910 * server.h (NEED_DECLARATION_STRERROR):
19911 Replace with !HAVE_DECL_STRERROR.
19912
19913 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19914
19915 * linux-low.c (linux_wait, linux_send_signal): Don't test
19916 an unsigned long variable for > 0 if it could be MAX_ULONG.
19917 * server.c (myresume): Likewise.
19918 * target.c (set_desired_inferior): Likewise.
19919
19920 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19921
19922 * configure.ac: Simplify and improve check for socklen_t.
19923 * configure, config.in: Regenerate.
19924
19925 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19926
19927 * acconfig.h: Remove.
19928 * configure.ac: Add a test for socklen_t. Use three-argument
19929 AC_DEFINE throughout.
19930 * config.in: Regenerated using autoheader 2.59.
19931 * configure: Regenerated.
19932
19933 * gdbreplay.c (socklen_t): Provide a default.
19934 (remote_open): Use socklen_t.
19935 * remote-utils.c (socklen_t): Provide a default.
19936 (remote_open): Use socklen_t.
19937 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19938 unsigned char.
19939
19940 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19941 char for buffers.
19942 * linux-low.c (linux_read_memory, linux_write_memory)
19943 (linux_read_auxv): Likewise.
19944 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19945 (check_mem_write): Likewise.
19946 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19947 Likewise.
19948 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19949 (registers_from_string, register_data): Likewise.
19950 * server.c (handle_query, main): Likewise.
19951 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19952 (decode_M_packet): Likewise.
19953 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19954 * target.h (struct target_ops): Update read_memory, write_memory,
19955 and read_auxv.
19956 (read_inferior_memory, write_inferior_memory): Update.
19957 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19958 to unsigned char *.
19959 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19960 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19961 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19962 linux-s390-low.c, linux-sh-low.c: Update for changes in
19963 read_inferior_memory and the_low_target->breakpoint.
19964
19965 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19966
19967 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19968 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19969 * configure.srv: Add powerpc64-*-linux*.
19970 * linux-ppc64-low.c: New file.
19971
19972 2005-05-23 Orjan Friberg <orjanf@axis.com>
19973
19974 * linux-cris-low.c: New file with support for CRIS.
19975 * linux-crisv32-low.c: Ditto for CRISv32.
19976 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19977 (clean): Add reg-cris.c and reg-crisv32.c.
19978 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19979 reg-crisv32.o, and reg-crisv32.c to make rules.
19980 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19981 recognized targets.
19982
19983 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19984
19985 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19986 of sizeof (PTRACE_XFER_TYPE).
19987 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19988
19989 2005-05-12 Orjan Friberg <orjanf@axis.com>
19990
19991 * target.h (struct target_ops): Add insert_watchpoint,
19992 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19993 pointers for hardware watchpoint support.
19994 * linux-low.h (struct linux_target_ops): Ditto.
19995 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19996 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19997 to linux_target_ops.
19998 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19999 reply packet.
20000 * server.c (main): Recognize 'Z' and 'z' packets.
20001
20002 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
20003
20004 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
20005 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
20006 (the_low_target): Add new members.
20007
20008 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20009
20010 * proc-service.c (ps_lgetregs): Search all_processes instead of
20011 all_threads.
20012
20013 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
20014
20015 * server.c (start_inferior): Change return type to int.
20016 (attach_inferior): Change sigptr to int *.
20017 (handle_v_cont, handle_v_requests): Change signal to int *.
20018 (main): Change signal to int.
20019
20020 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
20021
20022 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
20023 * configure.srv: Add m32r*-*-linux*.
20024 * linux-m32r-low.c: New file.
20025
20026 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
20027
20028 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
20029
20030 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
20031
20032 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
20033 Take unsigned long arguments for PIDs.
20034 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
20035 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
20036 (wait_for_sigstop, linux_resume_one_process)
20037 (regsets_fetch_inferior_registers, linux_send_signal)
20038 (linux_read_auxv): Likewise. Update the types of variables holding
20039 PIDs. Update format string specifiers.
20040 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
20041 * remote-utils.c (prepare_resume_reply): Likewise.
20042 * server.c (cont_thread, general_thread, step_thread)
20043 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
20044 unsigned long.
20045 (handle_query): Update format specifiers.
20046 (handle_v_cont, main): Use strtoul for thread IDs.
20047 * server.h (struct inferior_list_entry): Use unsigned long for ID.
20048 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
20049 (general_thread, step_thread, thread_from_wait)
20050 (old_thread_from_wait): Update.
20051 * target.h (struct thread_resume): Use unsigned long for THREAD.
20052 (struct target_ops): Use unsigned long for arguments to attach and
20053 thread_alive.
20054
20055 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
20056
20057 * acinclude.m4: Include bfd/bfd.m4 directly.
20058 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
20059 <agriffis@toolchain.org>.
20060 * aclocal.m4, configure: Regenerated.
20061
20062 2005-01-07 Andrew Cagney <cagney@gnu.org>
20063
20064 * configure.ac: Rename configure.in, require autoconf 2.59.
20065 * configure: Re-generate.
20066
20067 2004-12-08 Daniel Jacobowitz <dan@debian.org>
20068
20069 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
20070 LIBS when finished.
20071 * aclocal.m4: Regenerated.
20072 * configure: Regenerated.
20073
20074 2004-11-21 Andreas Schwab <schwab@suse.de>
20075
20076 * linux-m68k-low.c (m68k_num_gregs): Define.
20077 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
20078 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
20079 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
20080 (m68k_breakpoint_at): New. Add to the_low_target.
20081
20082 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
20083 srv_linux_thread_db to yes.
20084
20085 2004-10-20 Joel Brobecker <brobecker@gnat.com>
20086
20087 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
20088 (ARCH_SET_FS): Likewise.
20089 (ARCH_GET_FS): Likewise.
20090 (ARCH_GET_GS): Likewise.
20091
20092 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20093
20094 * linux-i386-low.c (ps_get_thread_area): New.
20095 * linux-x86-64-low.c (ps_get_thread_area): New.
20096 * linux-low.c: Include <sys/syscall.h>.
20097 (linux_kill_one_process): Don't kill the first thread here.
20098 (linux_kill): Kill the first thread here.
20099 (kill_lwp): New function.
20100 (send_sigstop, linux_send_signal): Use it.
20101 * proc-service.c: Clean up #ifdefs.
20102 (fpregset_info): Delete.
20103 (ps_lgetregs): Update and enable implementation.
20104 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
20105 implementations.
20106 * remote-utils.c (struct sym_cache, symbol_cache): New.
20107 (input_interrupt): Print a clearer message.
20108 (async_io_enabled): New variable.
20109 (enable_async_io, disable_async_io): Use it. Update comments.
20110 (look_up_one_symbol): Use the symbol cache.
20111 * thread-db.c (thread_db_look_up_symbols): New function.
20112 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
20113
20114 2004-10-16 Daniel Jacobowitz <dan@debian.org>
20115
20116 * configure.in: Test for -rdynamic.
20117 * configure: Regenerated.
20118 * Makefile (INTERNAL_LDFLAGS): New.
20119 (gdbserver, gdbreplay): Use it.
20120
20121 2004-09-02 Andrew Cagney <cagney@gnu.org>
20122
20123 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
20124
20125 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
20126
20127 * linux-low.c (linux_wait): Clear all_processes list also.
20128
20129 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20130
20131 * linux-low.c: Include <errno.h>. Remove extern declaration of
20132 errno.
20133
20134 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
20135
20136 * gdbreplay.c, server.h, utils.c: Update copyright years.
20137
20138 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20139
20140 * server.c (main): Print child status or termination signal from
20141 variable 'signal', not 'sig'.
20142
20143 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
20144
20145 * linux-low.c (linux_read_memory): Change return type to
20146 int. Check for and return error from ptrace().
20147 * target.c (read_inferior_memory): Change return type to int. Pass
20148 back return status from the_target->read_memory().
20149 * target.h (struct target_ops): Adapt *read_memory() prototype.
20150 Update comment.
20151 (read_inferior_memory): Adapt prototype.
20152 * server.c (main): Return an error packet if
20153 read_inferior_memory() returns an error.
20154
20155 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
20156
20157 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
20158 Unify with other clean targets.
20159
20160 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20161
20162 * server.c (handle_v_cont): Call set_desired_inferior.
20163
20164 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20165
20166 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
20167
20168 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20169
20170 * linux-low.c (linux_wait): Unblock async I/O.
20171 (linux_resume): Block and enable async I/O.
20172 * remote-utils.c (block_async_io, unblock_async_io): New functions.
20173 * server.h (block_async_io, unblock_async_io): Add prototypes.
20174
20175 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20176
20177 * remote-utils.c (remote_open): Print a status notice after
20178 opening a TCP port.
20179 * server.c (attach_inferior): Print a status notice after
20180 attaching.
20181
20182 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
20183
20184 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
20185
20186 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
20187
20188 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
20189 error packet.
20190 * server.c, target.h: Update copyright years.
20191
20192 2004-02-25 Roland McGrath <roland@redhat.com>
20193
20194 * target.h (struct target_ops): New member `read_auxv'.
20195 * server.c (handle_query): Handle qPart:auxv:read: query using that.
20196 * linux-low.c (linux_read_auxv): New function.
20197 (linux_target_ops): Initialize `read_auxv' member to that.
20198
20199 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
20200
20201 Committed by Jim Blandy <jimb@redhat.com>.
20202
20203 * linux-s390-low.c (s390_num_regs): Update.
20204 (s390_regmap): Remove control registers. Use __s390x__ predefine
20205 instead of GPR_SIZE to distiguish s390 and s390x targets.
20206
20207 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
20208
20209 * linux-low.c: Update copyright year.
20210 (check_removed_breakpoint): Clear pending_is_breakpoint.
20211 (linux_set_resume_request, linux_queue_one_thread)
20212 (resume_status_pending_p): New functions.
20213 (linux_continue_one_thread): Use process->resume.
20214 (linux_resume): Only resume threads if there are no pending events.
20215 * linux-low.h (struct process_info): Add resume request
20216 pointer.
20217
20218 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
20219
20220 * regcache.c (new_register_cache): Clear the allocated register
20221 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
20222
20223 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
20224
20225 * linux-low.c (linux_resume): Take a struct thread_resume *
20226 argument.
20227 (linux_wait): Update call.
20228 (resume_ptr): New static variable.
20229 (linux_continue_one_thread): Renamed from
20230 linux_continue_one_process. Use resume_ptr.
20231 (linux_resume): Use linux_continue_one_thread.
20232 * server.c (handle_v_cont, handle_v_requests): New functions.
20233 (myresume): New function.
20234 (main): Handle 'v' case.
20235 * target.h (struct thread_resume): New type.
20236 (struct target_ops): Change argument of "resume" to struct
20237 thread_resume *.
20238 (myresume): Delete macro.
20239
20240 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
20241
20242 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
20243 (uninstall): Support DESTDIR.
20244
20245 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
20246
20247 * configure.srv: Add xscale*linux copy of arm*linux entry.
20248
20249 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
20250
20251 * linux-arm-low.c (arm_reinsert_addr): New function.
20252 (the_low_target): Add arm_reinsert_addr.
20253
20254 2003-07-08 Mark Kettenis <kettenis@gnu.org>
20255
20256 * mem-break.c: Remove whitespace at end of file.
20257
20258 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20259
20260 * configure.in: Check whether we need to prototype strerror.
20261 * server.h: Optionally prototype strerror.
20262 * gdbreplay.c (perror_with_name): Use strerror.
20263 * linux-low.c (linux_attach_lwp): Use strerror.
20264 * utils.c (perror_with_name): Use strerror.
20265 * config.in, configure: Regenerated.
20266
20267 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
20268
20269 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
20270 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
20271
20272 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
20273
20274 * Makefile.in (SFILES): Update.
20275 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
20276 low-sun3.c: Remove files.
20277
20278 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
20279
20280 * linux-low.c: Move comment to linux_thread_alive where it belonged.
20281 (linux_detach_one_process, linux_detach): New functions.
20282 (linux_target_ops): Add linux_detach.
20283 * server.c (main): Handle 'D' packet.
20284 * target.h (struct target_ops): Add "detach" member.
20285 (detach_inferior): Define.
20286
20287 2003-06-13 Mark Kettenis <kettenis@gnu.org>
20288
20289 From Kelley Cook <kelleycook@wideopenwest.com>:
20290 * configure.srv: Accept i[34567]86 variants.
20291
20292 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
20293
20294 * linux-low.c (linux_wait_for_event): Correct comment typos.
20295 (linux_resume_one_process): Call check_removed_breakpoint.
20296 (linux_send_signal): New function.
20297 (linux_target_ops): Add linux_send_signal.
20298 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
20299 of kill.
20300 * target.h (struct target_ops): Add send_signal.
20301
20302 2003-05-29 Jim Blandy <jimb@redhat.com>
20303
20304 * linux-low.c (usr_store_inferior_registers): Transfer buf in
20305 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
20306 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
20307 away part of the register's value.
20308
20309 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
20310
20311 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
20312 (linux_wait_for_event, linux_init_signals): Likewise.
20313
20314 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
20315
20316 * configure.in: Check for stdlib.h.
20317 * configure: Regenerated.
20318 * config.in: Regenerated.
20319
20320 2003-01-04 Andreas Schwab <schwab@suse.de>
20321
20322 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
20323
20324 2003-01-02 Andrew Cagney <ac131313@redhat.com>
20325
20326 * Makefile.in: Remove obsolete code.
20327
20328 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
20329
20330 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
20331 defined(PT_FPR0_HI).
20332
20333 2002-11-17 Stuart Hughes <seh@zee2.com>
20334
20335 * linux-arm-low.c (arm_num_regs): Increase.
20336 (arm_regmap): Include status register.
20337
20338 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
20339
20340 * linux-low.c (register_addr): Remove incorrect -1 check.
20341
20342 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
20343
20344 * linux-low.c (linux_create_inferior): Call setpgid. Return
20345 the new PID.
20346 (unstopped_p, linux_signal_pid): Remove.
20347 (linux_target_ops): Remove linux_signal_pid.
20348 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
20349 global instead of target method.
20350 * target.h (struct target_ops): Remove signal_pid. Update comment
20351 for create_inferior.
20352 * server.c (signal_pid): New variable.
20353 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
20354 gdbserver. Set the child to be the foreground process group.
20355 (attach_inferior): Set signal_pid.
20356
20357 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
20358
20359 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
20360
20361 2002-08-20 Jim Blandy <jimb@redhat.com>
20362
20363 * Makefile.in (LDFLAGS): Allow the configure script to establish a
20364 default for this.
20365
20366 2002-08-01 Andrew Cagney <cagney@redhat.com>
20367
20368 * Makefile.in: Make chill references obsolete.
20369
20370 2002-07-24 Kevin Buettner <kevinb@redhat.com>
20371
20372 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
20373 * configure: Regenerate.
20374 * config.in: Regenerate.
20375
20376 2002-07-09 David O'Brien <obrien@FreeBSD.org>
20377
20378 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
20379 (perror_with_name, remote_close, remote_open, expect, play): Static.
20380
20381 2002-07-04 Michal Ludvig <mludvig@suse.cz>
20382
20383 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
20384 byte offsets instead of an array of indexes.
20385 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
20386
20387 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
20388
20389 * regcache.c: Add comment.
20390
20391 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
20392
20393 * thread-db.c: New file.
20394 * proc-service.c: New file.
20395 * acinclude.m4: New file.
20396 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
20397 proc-service.o, and thread-db.o.
20398 (linux-low.o): Add USE_THREAD_DB.
20399 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
20400 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
20401 * aclocal.m4: Regenerated.
20402 * config.in: Regenerated.
20403 * configure: Regenerated.
20404 * configure.in: Check for proc_service.h, sys/procfs.h,
20405 thread_db.h, and linux/elf.h headrs.
20406 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
20407 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
20408 Check for -lthread_db and thread support.
20409 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
20410 PowerPC, and SuperH.
20411 * i387-fp.c: Constify arguments.
20412 * i387-fp.h: Likewise.
20413 * inferiors.c: (struct thread_info): Renamed from
20414 `struct inferior_info'. Remove PID member. Use generic inferior
20415 list header. All uses updated.
20416 (inferiors, signal_pid): Removed.
20417 (all_threads): New variable.
20418 (get_thread): Define.
20419 (add_inferior_to_list): New function.
20420 (for_each_inferior): New function.
20421 (change_inferior_id): New function.
20422 (add_inferior): Removed.
20423 (remove_inferior): New function.
20424 (add_thread): New function.
20425 (free_one_thread): New function.
20426 (remove_thread): New function.
20427 (clear_inferiors): Use for_each_inferior and free_one_thread.
20428 (find_inferior): New function.
20429 (find_inferior_id): New function.
20430 (inferior_target_data): Update argument type.
20431 (set_inferior_target_data): Likewise.
20432 (inferior_regcache_data): Likewise.
20433 (set_inferior_regcache_data): Likewise.
20434 * linux-low.c (linux_bp_reinsert): Remove.
20435 (all_processes, stopping_threads, using_thrads)
20436 (struct pending_signals, debug_threads, pid_of): New.
20437 (inferior_pid): Replace with macro.
20438 (struct inferior_linux_data): Remove.
20439 (get_stop_pc, add_process): New functions.
20440 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
20441 Use add_process and add_thread.
20442 (linux_attach_lwp): New function, based on old linux_attach. Use
20443 add_process and add_thread. Set stop_expected for new threads.
20444 (linux_attach): New function.
20445 (linux_kill_one_process): New function.
20446 (linux_kill): Kill all LWPs.
20447 (linux_thread_alive): Use find_inferior_id.
20448 (check_removed_breakpoints, status_pending_p): New functions.
20449 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
20450 Update. Use WNOHANG. Wait for cloned processes also. Update process
20451 struct for the found process.
20452 (linux_wait_for_event): New function.
20453 (linux_wait): Use it. Support LWPs.
20454 (send_sigstop, wait_for_sigstop, stop_all_processes)
20455 (linux_resume_one_process, linux_continue_one_process): New functions.
20456 (linux_resume): Support LWPs.
20457 (REGISTER_RAW_SIZE): Remove.
20458 (fetch_register): Use register_size instead. Call supply_register.
20459 (usr_store_inferior_registers): Likewise. Call collect_register.
20460 Fix recursive case.
20461 (regsets_fetch_inferior_registers): Improve error message.
20462 (regsets_store_inferior_registers): Add debugging.
20463 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
20464 (unstopped_p, linux_signal_pid): New functions.
20465 (linux_target_ops): Add linux_signal_pid.
20466 (linux_init_signals): New function.
20467 (initialize_low): Call it. Initialize using_threads.
20468 * regcache.c (inferior_regcache_data): Add valid
20469 flag.
20470 (get_regcache): Fetch registers lazily. Add fetch argument
20471 and update all callers.
20472 (regcache_invalidate_one, regcache_invalidate): New
20473 functions.
20474 (new_register_cache): Renamed from create_register_cache.
20475 Return the new regcache.
20476 (free_register_cache): Change argument to a void *.
20477 (registers_to_string, registers_from_string): Call get_regcache
20478 with fetch flag set.
20479 (register_data): Make static. Pass fetch flag to get_regcache.
20480 (supply_register): Call get_regcache with fetch flag clear.
20481 (collect_register): Call get_regcache with fetch flag set.
20482 (collect_register_as_string): New function.
20483 * regcache.h: Update.
20484 * remote-utils.c (putpkt): Flush after debug output and use
20485 stderr.
20486 Handle input interrupts while waiting for an ACK.
20487 (input_interrupt): Use signal_pid method.
20488 (getpkt): Flush after debug output and use stderr.
20489 (outreg): Use collect_register_as_string.
20490 (new_thread_notify, dead_thread_notify): New functions.
20491 (prepare_resume_reply): Check using_threads. Set thread_from_wait
20492 and general_thread.
20493 (look_up_one_symbol): Flush after debug output.
20494 * server.c (step_thread, server_waiting): New variables.
20495 (start_inferior): Don't use signal_pid. Update call to mywait.
20496 (attach_inferior): Update call to mywait.
20497 (handle_query): Handle qfThreadInfo and qsThreadInfo.
20498 (main): Don't fetch/store registers explicitly. Use
20499 set_desired_inferior. Support proposed ``Hs'' packet. Update
20500 calls to mywait.
20501 * server.h: Update.
20502 (struct inferior_list, struct_inferior_list_entry): New.
20503 * target.c (set_desired_inferior): New.
20504 (write_inferior_memory): Constify.
20505 (mywait): New function.
20506 * target.h: Update.
20507 (struct target_ops): New signal_pid method.
20508 (mywait): Removed macro, added prototype.
20509
20510 * linux-low.h (regset_func): Removed.
20511 (regset_fill_func, regset_store_func): New.
20512 (enum regset_type): New.
20513 (struct regset_info): Add type field. Use new operation types.
20514 (struct linux_target_ops): stop_pc renamed to get_pc.
20515 Add decr_pc_after_break and breakpoint_at.
20516 (get_process, get_thread_proess, get_process_thread)
20517 (strut process_info, all_processes, linux_attach_lwp)
20518 (thread_db_init): New.
20519
20520 * linux-arm-low.c (arm_get_pc, arm_set_pc,
20521 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
20522 (the_low_target): Add new members.
20523 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
20524 (i386_store_fpxregset): Constify.
20525 (target_regsets): Add new kind identifier.
20526 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
20527 (i386_set_pc): Add debugging.
20528 (i386_breakpoint_at): New function.
20529 (the_low_target): Add new members.
20530 * linux-mips-low.c (mips_get_pc, mips_set_pc)
20531 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
20532 (mips_breakpoint_at): New.
20533 (the_low_target): Add new members.
20534 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
20535 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
20536 (the_low_target): Add new members.
20537 * linux-sh-low.c (sh_get_pc, sh_set_pc)
20538 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
20539 (the_low_target): Add new members.
20540 * linux-x86-64-low.c (target_regsets): Add new kind
20541 identifier.
20542
20543 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
20544
20545 From Martin Pool <mbp@samba.org>:
20546 * server.c (gdbserver_usage): New function.
20547 (main): Call it.
20548
20549 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
20550
20551 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
20552 stop_at -> stop_pc.
20553
20554 2002-05-04 Andrew Cagney <ac131313@redhat.com>
20555
20556 * Makefile.in: Remove obsolete code.
20557
20558 2002-04-24 Michal Ludvig <mludvig@suse.cz>
20559
20560 * linux-low.c (regsets_fetch_inferior_registers),
20561 (regsets_store_inferior_registers): Removed cast to int from
20562 ptrace() calls.
20563 * regcache.h: Added declaration of struct inferior_info.
20564
20565 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20566
20567 * inferiors.c (struct inferior_info): Add regcache_data.
20568 (add_inferior): Call create_register_cache.
20569 (clear_inferiors): Call free_register_cache.
20570 (inferior_regcache_data, set_inferior_regcache_data): New functions.
20571 * regcache.c (struct inferior_regcache_data): New.
20572 (registers): Remove.
20573 (get_regcache): New function.
20574 (create_register_cache, free_register_cache): New functions.
20575 (set_register_cache): Don't initialize the register cache here.
20576 (registers_to_string, registers_from_string, register_data): Call
20577 get_regcache.
20578 * regcache.h: Add prototypes.
20579 * server.h: Likewise.
20580
20581 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
20582
20583 * mem-break.c: New file.
20584 * mem-break.h: New file.
20585 * Makefile.in: Add mem-break.o rule; update server.h
20586 dependencies.
20587 * inferiors.c (struct inferior_info): Add target_data
20588 member.
20589 (clear_inferiors): Free target_data member if set.
20590 (inferior_target_data, set_inferior_target_data): New functions.
20591 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
20592 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
20593 * linux-low.c (linux_bp_reinsert): New variable.
20594 (struct inferior_linux_data): New.
20595 (linux_create_inferior): Use set_inferior_target_data.
20596 (linux_attach): Likewise. Call add_inferior.
20597 (linux_wait_for_one_inferior): New function.
20598 (linux_wait): Call it.
20599 (linux_write_memory): Add const.
20600 (initialize_low): Call set_breakpoint_data.
20601 * linux-low.h (struct linux_target_ops): Add breakpoint
20602 handling members.
20603 * server.c (attach_inferior): Remove extra add_inferior
20604 call.
20605 * server.h: Include mem-break.h. Update inferior.c
20606 prototypes.
20607 * target.c (read_inferior_memory)
20608 (write_inferior_memory): New functions.
20609 * target.h (read_inferior_memory)
20610 (write_inferior_memory): Change macros to prototypes.
20611 (struct target_ops): Update comments. Add const to write_memory
20612 definition.
20613
20614 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
20615
20616 * linux-low.c (usr_store_inferior_registers): Support
20617 registers which are allowed to fail to store.
20618 * linux-low.h (linux_target_ops): Likewise.
20619 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
20620 (ppc_cannot_store_register): FPSCR may not be storable.
20621
20622 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20623
20624 * server.h: Include <string.h> if HAVE_STRING_H.
20625 * ChangeLog: Correct paths in last ChangeLog entry.
20626
20627 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20628
20629 * linux-low.h: Remove obsolete prototypes.
20630 (struct linux_target_ops): New.
20631 (extern the_low_target): New.
20632 * linux-low.c (num_regs, regmap): Remove declarations.
20633 (register_addr): Use the_low_target explicitly.
20634 (fetch_register): Likewise.
20635 (usr_fetch_inferior_registers): Likewise.
20636 (usr_store_inferior_registers): Likewise.
20637 * linux-arm-low.c (num_regs): Remove.
20638 (arm_num_regs): Define.
20639 (arm_regmap): Renamed from regmap, made static.
20640 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
20641 made static.
20642 (arm_cannot_store_register): Renamed from cannot_store_register,
20643 made static.
20644 (the_low_target): New.
20645 * linux-i386-low.c (num_regs): Remove.
20646 (i386_num_regs): Define.
20647 (i386_regmap): Renamed from regmap, made static.
20648 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
20649 made static.
20650 (i386_cannot_store_register): Renamed from cannot_store_register,
20651 made static.
20652 (the_low_target): New.
20653 * linux-ia64-low.c (num_regs): Remove.
20654 (ia64_num_regs): Define.
20655 (ia64_regmap): Renamed from regmap, made static.
20656 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
20657 made static.
20658 (ia64_cannot_store_register): Renamed from cannot_store_register,
20659 made static.
20660 (the_low_target): New.
20661 * linux-m68k-low.c (num_regs): Remove.
20662 (m68k_num_regs): Define.
20663 (m68k_regmap): Renamed from regmap, made static.
20664 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
20665 made static.
20666 (m68k_cannot_store_register): Renamed from cannot_store_register,
20667 made static.
20668 (the_low_target): New.
20669 * linux-mips-low.c (num_regs): Remove.
20670 (mips_num_regs): Define.
20671 (mips_regmap): Renamed from regmap, made static.
20672 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
20673 made static.
20674 (mips_cannot_store_register): Renamed from cannot_store_register,
20675 made static.
20676 (the_low_target): New.
20677 * linux-ppc-low.c (num_regs): Remove.
20678 (ppc_num_regs): Define.
20679 (ppc_regmap): Renamed from regmap, made static.
20680 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
20681 made static.
20682 (ppc_cannot_store_register): Renamed from cannot_store_register,
20683 made static.
20684 (the_low_target): New.
20685 * linux-s390-low.c (num_regs): Remove.
20686 (s390_num_regs): Define.
20687 (s390_regmap): Renamed from regmap, made static.
20688 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
20689 made static.
20690 (s390_cannot_store_register): Renamed from cannot_store_register,
20691 made static.
20692 (the_low_target): New.
20693 * linux-sh-low.c (num_regs): Remove.
20694 (sh_num_regs): Define.
20695 (sh_regmap): Renamed from regmap, made static.
20696 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
20697 made static.
20698 (sh_cannot_store_register): Renamed from cannot_store_register,
20699 made static.
20700 (the_low_target): New.
20701 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
20702 (the_low_target): New.
20703
20704 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20705
20706 * Makefile.in: Add stamp-h target.
20707 * configure.in: Create stamp-h.
20708 * configure: Regenerated.
20709
20710 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20711
20712 * inferiors.c: New file.
20713 * target.c: New file.
20714 * target.h: New file.
20715 * Makefile.in: Add target.o and inferiors.o. Update
20716 dependencies.
20717 * linux-low.c (inferior_pid): New static variable,
20718 moved from server.c.
20719 (linux_create_inferior): Renamed from create_inferior.
20720 Call add_inferior. Return 0 on success instead of a PID.
20721 (linux_attach): Renamed from myattach.
20722 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
20723 (linux_thread_alive): Renamed from mythread_alive.
20724 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
20725 child dies.
20726 (linux_resume): Renamed from myresume. Add missing ``return 0''.
20727 (regsets_store_inferior_registers): Correct error message.
20728 Add missing ``return 0''.
20729 (linux_fetch_registers): Renamed from fetch_inferior_registers.
20730 (linux_store_registers): Renamed from store_inferior_registers.
20731 (linux_read_memory): Renamed from read_inferior_memory.
20732 (linux_write_memory): Renamed from write_inferior_memory.
20733 (linux_target_ops): New structure.
20734 (initialize_low): Call set_target_ops ().
20735 * remote-utils.c (unhexify): New function.
20736 (hexify): New function.
20737 (input_interrupt): Send signals to ``signal_pid''.
20738 * server.c (inferior_pid): Remove.
20739 (start_inferior): Update create_inferior call.
20740 (attach_inferior): Call add_inferior.
20741 (handle_query): New function.
20742 (main): Call handle_query for `q' packets.
20743 * server.h: Include "target.h". Remove obsolete prototypes.
20744 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
20745
20746 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
20747
20748 * Makefile.in: Add WARN_CFLAGS. Update configury
20749 dependencies.
20750 * configure.in: Check for <string.h>
20751 * configure: Regenerate.
20752 * config.in: Regenerate.
20753 * gdbreplay.c: Include needed system headers.
20754 (remote_open): Remove strchr prototype.
20755 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
20756 * regcache.c (supply_register): Change buf argument to const void *.
20757 (supply_register_by_name): Likewise.
20758 (collect_register): Change buf argument to void *.
20759 (collect_register_by_name): Likewise.
20760 * regcache.h: Add missing prototypes.
20761 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
20762 * server.c (handle_query): New function.
20763 (attached): New static variable, moved out of main.
20764 (main): Quiet longjmp clobber warnings.
20765 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
20766 * utils.c (error): Remove NORETURN.
20767 (fatal): Likewise.
This page took 0.515413 seconds and 4 git commands to generate.