1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
4 ops into methods of process_target.
6 * target.h (struct process_stratum_target): Remove the target ops.
7 (class process_target): Add the target ops.
8 (target_stopped_by_hw_breakpoint): Update the macro.
9 (target_supports_stopped_by_hw_breakpoint): Update the macro.
10 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
11 (process_target::supports_stopped_by_hw_breakpoint): Define.
13 Update the derived classes and callers below.
15 * linux-low.cc (linux_target_ops): Update.
16 (linux_stopped_by_hw_breakpoint): Turn into ...
17 (linux_process_target::stopped_by_hw_breakpoint): ... this.
18 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
19 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 * win32-low.cc (win32_target_ops): Update.
25 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
27 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
28 ops into methods of process_target.
30 * target.h (struct process_stratum_target): Remove the target ops.
31 (class process_target): Add the target ops.
32 (target_stopped_by_sw_breakpoint): Update the macro.
33 (target_supports_stopped_by_sw_breakpoint): Update the macro.
34 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
35 (process_target::supports_stopped_by_sw_breakpoint): Define.
37 Update the derived classes and callers below.
39 * linux-low.cc (linux_target_ops): Update.
40 (linux_stopped_by_sw_breakpoint): Turn into ...
41 (linux_process_target::stopped_by_sw_breakpoint): ... this.
42 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
43 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
44 * linux-low.h (class linux_process_target): Update.
45 * lynx-low.cc (lynx_target_ops): Update.
46 * nto-low.cc (nto_target_ops): Update.
47 * win32-low.cc (win32_target_ops): Update.
49 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
51 Turn process_stratum_target's insert_point and remove_point ops
52 into methods of process_target.
54 * target.h (struct process_stratum_target): Remove the target ops.
55 (class process_target): Add the target ops.
56 * target.cc (process_target::insert_point): Define.
57 (process_target::remove_point): Define.
59 Update the derived classes and callers below.
61 * mem-break.cc (set_raw_breakpoint_at): Update.
62 (delete_raw_breakpoint): Update.
63 (uninsert_raw_breakpoint): Update.
64 (reinsert_raw_breakpoint): Update.
65 * linux-low.cc (linux_target_ops): Update.
66 (linux_insert_point): Turn into ...
67 (linux_process_target::insert_point): ... this.
68 (linux_remove_point): Turn into ...
69 (linux_process_target::remove_point): ... this.
70 * linux-low.h (class linux_process_target): Update.
71 * lynx-low.cc (lynx_target_ops): Update.
72 * nto-low.cc (nto_target_ops): Update.
73 (nto_insert_point): Turn into ...
74 (nto_process_target::insert_point): ... this.
75 (nto_remove_point): Turn into ...
76 (nto_process_target::remove_point): ... this.
77 * nto-low.h (class nto_process_target): Update.
78 * win32-low.cc (win32_target_ops): Update.
79 (win32_insert_point): Turn into ...
80 (win32_process_target::insert_point): ... this.
81 (win32_remove_point): Turn into ...
82 (win32_process_target::remove_point): ... this.
83 * win32-low.h (class win32_process_target): Update.
85 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
87 Turn process_stratum_target's supports_z_point_type op into a
88 method of process_target.
90 * target.h (struct process_stratum_target): Remove the target op.
91 (class process_target): Add the target op.
92 * target.cc (process_target::supports_z_point_type): Define.
94 Update the derived classes and callers below.
96 * mem-break.cc (z_type_supported): Update.
97 * linux-low.cc (linux_target_ops): Update.
98 (linux_supports_z_point_type): Turn into ...
99 (linux_process_target::supports_z_point_type): ... this.
100 * linux-low.h (class linux_process_target): Update.
101 * lynx-low.cc (lynx_target_ops): Update.
102 * nto-low.cc (nto_target_ops): Update.
103 (nto_supports_z_point_type): Turn into ...
104 (nto_process_target::supports_z_point_type): ... this.
105 * nto-low.h (class nto_process_target): Update.
106 * win32-low.cc (win32_target_ops): Update.
107 (win32_supports_z_point_type): Turn into ...
108 (win32_process_target::supports_z_point_type): ... this.
109 * win32-low.h (class win32_process_target): Update.
111 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
113 Turn process_stratum_target's read_auxv op into a method of
116 * target.h (class process_stratum_target): Remove the target op.
117 (struct process_target): Add the target op. Also add
118 'supports_read_auxv'.
119 * target.cc (process_target::read_auxv): Define.
120 (process_target::supports_read_auxv): Define.
122 Update the derived classes and callers below.
124 * server.cc (handle_qxfer_auxv): Update.
125 (handle_query): Update.
126 * linux-low.cc (linux_target_ops): Update.
127 (linux_process_target::supports_read_auxv): Define.
128 (linux_read_auxv): Turn into ...
129 (linux_process_target::read_auxv): ... this.
130 * linux-low.h (class linux_process_target): Update.
131 * lynx-low.cc (lynx_target_ops): Update.
132 * nto-low.cc (nto_target_ops): Update.
133 (nto_process_target::supports_read_auxv): Define.
134 (nto_read_auxv): Turn into ...
135 (nto_process_target::read_auxv): ... this.
136 * nto-low.h (class nto_process_target): Update.
137 * win32-low.cc (win32_target_ops): Update.
139 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
141 Turn process_stratum_target's request_interrupt op into a method of
144 * target.h (struct process_stratum_target): Remove the target op.
145 (class process_target): Add the target op.
147 Update the derived classes and callers below.
149 * remote-utils.cc (putpkt_binary_1): Update.
150 (input_interrupt): Update.
152 * server.cc (handle_v_requests): Update.
153 * linux-low.cc (linux_target_ops): Update.
154 (linux_request_interrupt): Turn into ...
155 (linux_process_target::request_interrupt): ... this.
156 * linux-low.h (class linux_process_target): Update.
157 * lynx-low.cc (lynx_target_ops): Update.
158 (lynx_request_interrupt): Turn into ...
159 (lynx_process_target::request_interrupt): ... this.
160 * lynx-low.h (class lynx_process_target): Update.
161 * nto-low.cc (nto_target_ops): Update.
162 (nto_request_interrupt): Turn into ...
163 (nto_process_target::request_interrupt): ... this.
164 * nto-low.h (class nto_process_target): Update.
165 * win32-low.cc (win32_target_ops): Update.
166 (win32_request_interrupt): Turn into ...
167 (win32_process_target::request_interrupt): ... this.
168 * win32-low.h (class win32_process_target): Update.
170 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
172 Turn process_stratum_target's look_up_symbols op into a method of
175 * target.h (struct process_stratum_target): Remove the target op.
176 (class process_target): Add the target op.
177 * target.cc (process_target::look_up_symbols): Define.
179 Update the derived classes and callers below.
181 * server.cc (handle_query): Update.
182 * linux-low.cc (linux_target_ops): Update.
183 (linux_look_up_symbols): Turn into ...
184 (linux_process_target::look_up_symbols): ... this.
185 * linux-low.h (class linux_process_target): Update.
186 * lynx-low.cc (lynx_target_ops): Update.
187 * nto-low.cc (nto_target_ops): Update.
188 * win32-low.cc (win32_target_ops): Update.
190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
192 Turn process_stratum_target's read_memory and write_memory
193 ops into methods of process_target.
195 * target.h (struct process_stratum_target): Remove the target ops.
196 (class process_target): Add the target ops.
198 Update the derived classes and callers below.
200 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
201 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
202 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
203 (arm_get_syscall_trapinfo): Update.
204 * linux-cris-low.cc (cris_breakpoint_at): Update.
205 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
206 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
207 * linux-mips-low.cc (mips_breakpoint_at): Update.
208 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
209 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
210 * linux-sh-low.cc (sh_breakpoint_at): Update.
211 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
212 (sparc_store_gregset_from_stack): Update.
213 (sparc_breakpoint_at): Update.
214 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
215 * linux-tile-low.cc (tile_breakpoint_at): Update.
216 * linux-x86-low.cc (x86_breakpoint_at): Update.
217 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
218 * mem-brea.cc (insert_memory_breakpoint): Update.
219 (validate_inserted_breakpoint): Update.
220 * target.cc (read_inferior_memory): Update.
221 (target_write_memory): Update.
222 * linux-low.cc (linux_target_ops): Update.
223 (linux_read_memory): Make a wrapper around the read_memory target
225 (linux_process_target::read_memory): Rename from linux_read_memory.
226 (linux_write_memory): Turn into ...
227 (linux_process_target::write_memory): ... this.
228 * linux-low.h (class linux_process_target): Update.
229 * lynx-low.cc (lynx_target_ops): Update.
230 (lynx_read_memory): Turn into ...
231 (lynx_process_target::read_memory): ... this.
232 (lynx_write_memory): Turn into ...
233 (lynx_process_target::write_memory): ... this.
234 * lynx-low.h (class lynx_process_target): Update.
235 * nto-low.cc (nto_target_ops): Update.
236 (nto_read_memory): Turn into ...
237 (nto_process_target::read_memory): ... this.
238 (nto_write_memory): Turn into ...
239 (nto_process_target::write_memory): ... this.
240 * nto-low.h (class nto_process_target): Update.
241 * win32-low.cc (win32_target_ops): Update.
242 (win32_read_inferior_memory): Turn into ...
243 (win32_process_target::read_memory): ... this.
244 (win32_write_inferior_memory): Turn into ...
245 (win32_process_target::write_memory): ... this.
246 * win32-low.h (class win32_process_target): Update.
248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
250 Turn process_stratum_target's prepare_to_access_memory and
251 done_accessing_memory ops into methods of process_target.
253 * target.h (struct process_stratum_target): Remove the target ops.
254 (class process_target): Add the target ops.
255 * target.cc (process_target::prepare_to_access_memory): Define.
256 (process_target::done_accessing_memory): Define.
257 (prepare_to_access_memory): Update.
258 (done_accessing_memory): Update.
260 Update the derived classes and callers below.
262 * linux-low.cc (linux_target_ops): Update.
263 (linux_prepare_to_access_memory): Turn into ...
264 (linux_process_target::prepare_to_access_memory): ... this.
265 (linux_done_accessing_memory): Turn into ...
266 (linux_process_target::done_accessing_memory): ... this.
267 * linux-low.h (class linux_process_target): Update.
268 * lynx-low.cc (lynx_target_ops): Update.
269 * nto-low.cc (nto_target_ops): Update.
270 * win32-low.cc (win32_target_ops): Update.
272 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
274 Turn process_stratum_target's fetch_registers and store_registers
275 ops into methods of process_target.
277 * target.h (struct process_stratum_target): Remove the target ops.
278 (class process_target): Add the target ops.
279 (fetch_inferior_registers): Update the macro.
280 (store_inferior_registers): Update the macro.
282 Update the derived classes and callers below.
284 * linux-low.cc (linux_target_ops): Update.
285 (linux_fetch_registers): Turn into ...
286 (linux_process_target::fetch_registers): ... this.
287 (linux_store_registers): Turn into ...
288 (linux_process_target::store_registers): ... this.
289 * linux-low.h (class linux_process_target): Update.
290 * lynx-low.cc (lynx_target_ops): Update.
291 (lynx_fetch_registers): Turn into ...
292 (lynx_process_target::fetch_registers): ... this.
293 (lynx_store_registers): Turn into ...
294 (lynx_process_target::store_registers): ... this.
295 * lynx-low.h (class lynx_process_target): Update.
296 * nto-low.cc (nto_target_ops): Update.
297 (nto_fetch_registers): Turn into ...
298 (nto_process_target::fetch_registers): ... this.
299 (nto_store_registers): Turn into ...
300 (nto_process_target::store_registers): ... this.
301 * nto-low.h (class nto_process_target): Update.
302 * win32-low.cc (win32_target_ops): Update.
303 (win32_fetch_inferior_registers): Turn into ...
304 (win32_process_target::fetch_registers): ... this.
305 (win32_store_inferior_registers): Turn into ...
306 (win32_process_target::store_registers): ... this.
307 * win32-low.h (class win32_process_target): Update.
309 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
311 Turn process_stratum_target's wait op into a method of
314 * target.h (struct process_stratum_target): Remove the target op.
315 (class process_target): Add the target op.
317 Update the derived classes and callers below.
319 * target.cc (target_wait): Update.
320 * linux-low.cc (linux_target_ops): Update.
321 (linux_wait): Turn into ...
322 (linux_process_target::wait): ... this.
323 * linux-low.h (class linux_process_target): Update.
324 * lynx-low.cc (lynx_target_ops): Update.
325 (lynx_wait): Turn into ...
326 (lynx_process_target::wait): ... this.
327 * lynx-low.h (class lynx_process_target): Update.
328 * nto-low.cc (nto_target_ops): Update.
329 (nto_wait): Turn into ...
330 (nto_process_target::wait): ... this.
331 * nto-low.h (class nto_process_target): Update.
332 * win32-low.cc (win32_target_ops): Update.
333 (win32_wait): Turn into ...
334 (win32_process_target::wait): ... this.
335 (do_initial_child_stuff): Update.
336 * win32-low.h (class win32_process_target): Update.
338 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
340 Turn process_stratum_target's resume op into a method of
343 * target.h (struct process_stratum_target): Remove the target op.
344 (class process_target): Add the target op.
346 Update the derived classes and callers below.
348 * server.cc (resume): Update.
349 * target.cc (target_stop_and_wait): Update.
350 (target_continue_no_signal): Update.
351 (target_continue): Update.
352 * linux-low.cc (linux_target_ops): Update.
353 (linux_resume): Turn into ...
354 (linux_process_target::resume): ... this.
355 * linux-low.h (class linux_process_target): Update.
356 * lynx-low.cc (lynx_target_ops): Update.
357 (lynx_resume): Turn into ...
358 (lynx_process_target::resume): ... this.
359 * lynx-low.h (class lynx_process_target): Update.
360 * nto-low.cc (nto_target_ops): Update.
361 (nto_resume): Turn into ...
362 (nto_process_target::resume): ... this.
363 * nto-low.h (class nto_process_target): Update.
364 * win32-low.cc (win32_target_ops): Update.
365 (win32_resume): Turn into ...
366 (win32_process_target::resume): ... this.
367 (win32_process_target::detach): Update.
368 (do_initial_child_stuff): Update.
369 * win32-low.h (class win32_process_target): Update.
371 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
373 Turn process_stratum_target's thread_alive op into a method of
376 * target.h (struct process_stratum_target): Remove the target op.
377 (class process_target): Add the target op.
378 (mythread_alive): Update the macro.
380 Update the derived classes and callers below.
382 * linux-low.cc (linux_target_ops): Update.
383 (linux_thread_alive): Turn into ...
384 (linux_process_target::thread_alive): ... this.
385 (wait_for_sigstop): Update.
386 * linux-low.h (class linux_process_target): Update.
387 * lynx-low.cc (lynx_target_ops): Update.
388 (lynx_thread_alive): Turn into ...
389 (lynx_process_target::thread_alive): ... this.
390 * lynx-low.h (class lynx_process_target): Update.
391 * nto-low.cc (nto_target_ops): Update.
392 (nto_thread_alive): Turn into ...
393 (nto_process_target::thread_alive): ... this.
394 * nto-low.h (class nto_process_target): Update.
395 * win32-low.cc (win32_target_ops): Update.
396 (win32_thread_alive): Turn into ...
397 (win32_process_target::thread_alive): ... this.
398 * win32-low.h (class win32_process_target): Update.
400 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
402 Turn process_stratum_target's join op into a method of
405 * target.h (struct process_stratum_target): Remove the target op.
406 (class process_target): Add the target op.
407 (join_inferior): Update the macro.
409 Update the derived classes and callers below.
411 * linux-low.cc (linux_target_ops): Update.
412 (linux_join): Turn into ...
413 (linux_process_target::join): ... this.
414 * linux-low.h (class linux_process_target): Update.
415 * lynx-low.cc (lynx_target_ops): Update.
416 (lynx_join): Turn into ...
417 (lynx_process_target::join): ... this.
418 * lynx-low.h (class lynx_process_target): Update.
419 * nto-low.cc (nto_target_ops): Update.
420 (nto_process_target::join): Define.
421 * nto-low.h (class nto_process_target): Update.
422 * win32-low.cc (win32_target_ops): Update.
423 (win32_join): Turn into ...
424 (win32_process_target::join): ... this.
425 * win32-low.h (class win32_process_target): Update.
427 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
429 Turn process_stratum_target's mourn op into a method of
432 * target.h (struct process_stratum_target): Remove the target op.
433 (class process_target): Add the target op.
435 Update the derived classes and callers below.
437 * target.cc (target_mourn_inferior): Update.
438 * linux-low.cc (linux_target_ops): Update.
439 (linux_mourn): Turn into ...
440 (linux_process_target::mourn): ... this.
441 (handle_extended_wait): Update.
442 (linux_process_target::kill): Update.
443 (linux_process_target::detach): Update.
444 * linux-low.h (class linux_process_target): Update.
445 * lynx-low.cc (lynx_target_ops): Update.
446 (lynx_mourn): Turn into ...
447 (lynx_process_target::mourn): ... this.
448 * lynx-low.h (class lynx_process_target): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 (nto_mourn): Turn into ...
451 (nto_process_target::mourn): ... this.
452 * nto-low.h (class nto_process_target): Update.
453 * win32-low.cc (win32_target_ops): Update.
454 (win32_mourn): Turn into ...
455 (win32_process_target::mourn): ... this.
456 * win32-low.h (class win32_process_target): Update.
458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
460 Turn process_stratum_target's detach op into a method of
463 * target.h (struct process_stratum_target): Remove the target op.
464 (class process_target): Add the target op.
465 (detach_inferior): Update the macro.
467 Update the derived classes and callers below.
469 * linux-low.cc (linux_target_ops): Update.
470 (linux_detach): Turn into ...
471 (linux_process_target::detach): ... this.
472 * linux-low.h (class linux_process_target): Update.
473 * lynx-low.cc (lynx_target_ops): Update.
474 (lynx_detach): Turn into ...
475 (lynx_process_target::detach): ... this.
476 * lynx-low.h (class lynx_process_target): Update.
477 * nto-low.cc (nto_target_ops): Update.
478 (nto_detach): Turn into ...
479 (nto_process_target::detach): ... this.
480 * nto-low.h (class nto_process_target): Update.
481 * win32-low.cc (win32_target_ops): Update.
482 (win32_detach): Turn into ...
483 (win32_process_target::detach): ... this.
484 * win32-low.h (class win32_process_target): Update.
486 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
488 Turn process_stratum_target's kill op into a method of
491 * target.h (struct process_stratum_target): Remove the target op.
492 (class process_target): Add the target op.
494 Update the derived classes and callers below.
496 * target.cc (kill_inferior): Update.
497 * linux-low.cc (linux_target_ops): Update.
498 (linux_kill): Turn into ...
499 (linux_process_target::kill): ... this.
500 * linux-low.h (class linux_process_target): Update.
501 * lynx-low.cc (lynx_target_ops): Update.
502 (lynx_kill): Turn into ...
503 (lynx_process_target::kill): ... this.
504 * lynx-low.h (class lynx_process_target): Update.
505 * nto-low.cc (nto_target_ops): Update.
506 (nto_kill): Turn into ...
507 (nto_process_target::kill): ... this.
508 * nto-low.h (class nto_process_target): Update.
509 * win32-low.cc (win32_target_ops): Update.
510 (win32_kill): Turn into ...
511 (win32_process_target::kill): ... this.
512 * win32-low.h (class win32_process_target): Update.
514 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
516 Turn process_stratum_target's attach op into a method of
519 * target.h (struct process_stratum_target): Remove the target op.
520 (class process_target): Add the target op.
521 (myattach): Update the macro.
523 Update the derived classes and callers below.
525 * linux-low.cc (linux_target_ops): Update.
526 (linux_attach): Turn into ...
527 (linux_process_target::attach): ... this.
528 * linux-low.h (class linux_process_target): Update.
529 * lynx-low.cc (lynx_target_ops): Update.
530 (lynx_attach): Turn into ...
531 (lynx_process_target::attach): ... this.
532 * lynx-low.h (class lynx_process_target): Update.
533 * nto-low.cc (nto_target_ops): Update.
534 (nto_attach): Turn into ...
535 (nto_process_target::attach): ... this.
536 * nto-low.h (class nto_process_target): Update.
537 * win32-low.cc (win32_target_ops): Update.
538 (win32_attach): Turn into ...
539 (win32_process_target::attach): ... this.
540 * win32-low.h (class win32_process_target): Update.
542 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
544 Turn process_stratum_target's post_create_inferior op into a method
547 * target.h (struct process_stratum_target): Remove the target op.
548 (class process_target): Add the target op.
549 (target_post_create_inferior): Update the macro.
550 * target.cc (process_target::post_create_inferior): Define.
552 Update the derived classes and callers below.
554 * linux-low.cc (linux_target_ops): Update.
555 (linux_post_create_inferior): Turn into ...
556 (linux_process_target::post_create_inferior): ... this.
557 * linux-low.h (class linux_process_target): Update.
558 * lynx-low.cc (lynx_target_ops): Update.
559 * nto-low.cc (nto_target_ops): Update.
560 * win32-low.cc (win32_target_ops): Update.
562 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
564 Turn process_stratum_target's create_inferior op into a method of
567 * target.h (struct process_stratum_target): Remove the target op.
568 (class process_target): Add the target op.
569 (create_inferior): Rename the macro to ...
570 (target_create_inferior): ... this.
572 Update the derived classes and callers below.
574 * server.cc (handle_v_run): Update.
575 (captured_main): Update.
576 (process_serial_event): Update.
577 * linux-low.cc (linux_target_ops): Update.
578 (linux_create_inferior): Turn into ...
579 (linux_process_target::create_inferior): ... this.
580 * linux-low.h (class linux_process_target): Update.
581 * lynx-low.cc (lynx_target_ops): Update.
582 (lynx_create_inferior): Turn into ...
583 (lynx_process_target::create_inferior): ... this.
584 * lynx-low.h (class lynx_process_target): Update.
585 * nto-low.cc (nto_target_ops): Update.
586 (nto_create_inferior): Turn into ...
587 (nto_process_target::create_inferior): ... this.
588 * nto-low.h (class nto_process_target): Update.
589 * win32-low.cc (win32_target_ops): Update.
590 (win32_create_inferior): Turn into ...
591 (win32_process_target::create_inferior): ... this.
592 * win32-low.h (class win32_process_target): Update.
594 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
596 * target.h (class process_target): New class definition.
597 (struct process_stratum_target) <pt>: New field with type
599 * linux-low.h (class linux_process_target): Define as a derived
600 class of 'process_target'.
601 * linux-low.cc (linux_target_ops): Add a linux_process_target*
603 * lynx-low.h (class lynx_process_target): Define as a derived
604 class of 'process_target'.
605 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
607 * nto-low.h (class nto_process_target): Define as a derived
608 class of 'process_target'.
609 * nto-low.cc (nto_target_ops): Add an nto_process_target*
611 * win32-low.h (class win32_process_target): Define as a derived
612 class of 'process_target'.
613 * win32-low.cc (win32_target_ops): Add a win32_process_target*
616 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
618 * configure: Regenerate.
620 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
621 Andrew Burgess <andrew.burgess@embecosm.com>
623 * linux-riscv-low.cc: New file.
624 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
625 and nat/riscv-linux-tdesc.c.
626 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
627 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
630 2020-02-14 Tom Tromey <tom@tromey.com>
632 * acinclude.m4: Don't include acx_configure_dir.m4.
633 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
634 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
635 (all, install-only, uninstall, clean-info, clean)
636 (maintainer-clean): Don't recurse.
637 (subdir_do, all-lib): Remove.
638 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
640 (generated_files): Update.
641 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
642 * configure: Rebuild.
643 * configure.ac: Don't configure gnulib or libiberty.
646 2020-02-14 Eli Zaretskii <eliz@gnu.org>
648 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
649 preparing the command line for CreateProcess.
650 (win32_create_inferior): Reflect the program name in debugging
651 output that shows the process and its command line.
653 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
655 * Makefile.in: Rename source files from .c to .cc.
656 * %.c: Rename to %.cc.
657 * configure.ac: Rename server.c to server.cc.
658 * configure: Re-generate.
660 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
662 * Makefile.in: Rename gdbsupport source files from .c to .cc.
664 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
666 * win32-low.c (win32_create_inferior): Set signal_pid.
668 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
669 Pedro Alves <palves@redhat.com>
671 Skip building gdbserver in a cross-configuration.
672 * configure.srv: Set $gdbserver_host depending on whether $target
673 is $host. Use $gdbserver_host instead of $host.
675 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
677 * configure: Re-generate.
679 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
681 * configure: Re-generate.
683 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
685 * acinclude.m4: Update warning.m4 path.
687 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
689 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
690 (handle_exception): Set siginfo_er.
691 (win32_xfer_siginfo): New function.
693 2020-02-07 Tom Tromey <tom@tromey.com>
694 Pedro Alves <palves@redhat.com>
696 * README: Update build documentation.
697 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
699 * configure.ac: Update paths.
700 * configure: Rebuild.
701 * acinclude.m4: Update paths.
702 * Makefile.in: Update include paths.
703 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
704 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
705 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
706 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
707 (%-generated.c): Update paths.
708 * Move entire directory from ../gdb/gdbserver.
710 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
712 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
714 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
716 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
717 assignment instead of srv_linux_obj.
719 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
721 * server.c (handle_qxfer_libraries): Write segment-address with
724 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
726 * Makefile.in (install-strip): New target.
727 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
728 * aclocal.m4: Regenerate.
729 * configure: Regenerate.
730 * configure.ac: Add AM_PROG_INSTALL_STRIP.
732 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
734 * Makefile.in (SFILES): Adjust paths to point to real files.
735 (OBS): Move waitstatus.o to target/waitstatus.o.
736 (TAGS): Transform paths appropriately.
738 (nat/%.o): ... this pattern rule.
740 (target/%.o): ... this pattern rule.
741 * configure.srv: Adjust paths throughout to include nat/ prefix
742 with the revant files.
743 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
744 * configure: Regenerate.
746 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
748 * Makefile.in (TAGS): Remove config files from the recipe.
750 2020-01-14 Tom Tromey <tom@tromey.com>
752 * configure: Rebuild.
753 * configure.ac: Remove any checks that were added to common.m4.
754 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
757 2020-01-14 Tom Tromey <tom@tromey.com>
759 * server.h: Include config.h.
760 * gdbreplay.c: Include config.h.
761 * configure: Rebuild.
762 * configure.ac: Don't source common.host.
763 * acinclude.m4: Update path.
764 * Makefile.in (INCSUPPORT): New variable.
765 (INCLUDE_CFLAGS): Add INCSUPPORT.
766 (SFILES): Update paths.
767 (version-generated.c): Update path to create-version.sh.
768 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
770 2020-01-14 Tom Tromey <tom@tromey.com>
772 * configure.ac (LIBS): Use WIN32APILIBS.
773 (USE_WIN32API): Don't define.
774 * configure: Rebuild.
776 2020-01-14 Tom Tromey <tom@tromey.com>
778 * configure: Rebuild.
780 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
782 * Makefile.in (%-generated.c): Remove rule for files from
785 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
787 * configure: Re-generate.
789 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
791 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
793 * tracepoint.c (stop_tracing, flush_trace_buffer,
794 about_to_request_buffer_space, get_trace_state_variable_value,
795 set_trace_state_variable_value, gdb_collect): Add declaration.
797 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
799 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
800 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
801 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
802 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
803 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
806 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
808 * inferiors.c: Include gdbsupport/common-inferior.h.
810 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
812 * hostio-errno.c: Include hostio.h.
814 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
816 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
819 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
821 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
822 * linux-arm-tdesc.h: Include arch/arm.h.
824 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
826 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
828 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
830 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
831 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
833 2020-01-10 Pedro Alves <palves@redhat.com>
835 * fork-child.c (post_fork_inferior): Pass target down to
837 * inferiors.c (switch_to_thread): Add process_stratum_target
839 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
840 * nto-low.c (nto_target_ops): Now a process_stratum_target.
841 * linux-low.c (linux_target_ops): Now a process_stratum_target.
842 * remote-utils.c (prepare_resume_reply): Pass the target to
844 * target.c (the_target): Now a process_stratum_target.
845 (done_accessing_memory): Pass the target to switch_to_thread.
846 (set_target_ops): Ajust to use process_stratum_target.
847 * target.h (struct target_ops): Rename to ...
848 (struct process_stratum_target): ... this.
849 (the_target, set_target_ops): Adjust.
850 (prepare_to_access_memory): Adjust comment.
851 * win32-low.c (child_xfer_memory): Adjust to use
852 process_stratum_target.
853 (win32_target_ops): Now a process_stratum_target.
855 2020-01-06 Eli Zaretskii <eliz@gnu.org>
856 Pedro Alves <palves@redhat.com>
858 * win32-low.c (get_child_debug_event): Extract the fatal exception
859 from the exit status and convert to the equivalent Posix signal
861 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
862 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
864 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
866 * Makefile.in: Use INSTALL_PROGRAM_ENV.
868 2020-01-01 Joel Brobecker <brobecker@adacore.com>
870 * server.c (gdbserver_version): Change copyright year to 2020.
871 * gdbreplay.c (gdbreplay_version): Likewise.
873 2019-12-19 Christian Biesinger <cbiesinger@google.com>
875 * configure: Regenerate.
876 * configure.ac: Quote variable arguments of test.
878 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
880 * Makefile.in: Fix build with GNU Make 3.81
882 2019-12-16 Tom Tromey <tromey@adacore.com>
884 * server.c (get_exec_file): Constify result.
886 2019-12-10 Christian Biesinger <cbiesinger@google.com>
888 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
889 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
890 * config.in: Regenerate.
891 * configure: Regenerate.
892 * configure.ac: Don't check for strerror.
893 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
894 Call safe_strerror instead of strerror.
895 * server.h (strerror): Remove this now-unnecessary declaration.
896 * tracepoint.c (init_named_socket): Call safe_strerror instead of
898 (gdb_agent_helper_thread): Likewise.
899 * utils.c (perror_with_name): Likewise.
901 2019-11-26 Tom Tromey <tom@tromey.com>
903 * configure, config.in: Rebuild.
905 2019-11-26 Tom Tromey <tom@tromey.com>
907 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
908 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
910 * configure, config.in: Rebuild.
912 2019-11-26 Tom Tromey <tom@tromey.com>
914 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
915 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
916 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
917 * acinclude.m4: Include ax_pthread.m4.
918 * config.in, configure: Rebuild.
920 2019-11-26 Christian Biesinger <cbiesinger@google.com>
922 * debug.c (debug_set_output): Call safe_strerror instead of
924 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
925 (linux_kill_one_lwp): Likewise.
926 (linux_detach_one_lwp): Likewise.
927 (linux_wait_for_event_filtered): Likewise.
928 (store_register): Likewise.
929 * lynx-low.c (lynx_attach): Likewise.
930 * mem-break.c (insert_memory_breakpoint): Likewise.
931 (remove_memory_breakpoint): Likewise.
932 (delete_fast_tracepoint_jump): Likewise.
933 (set_fast_tracepoint_jump): Likewise.
934 (uninsert_fast_tracepoint_jumps_at): Likewise.
935 (reinsert_fast_tracepoint_jumps_at): Likewise.
936 * nto-low.c (nto_xfer_memory): Likewise.
937 (nto_resume): Likewise.
939 2019-11-20 Luis Machado <luis.machado@linaro.org>
941 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
942 instead of register count.
943 * tdesc.c (tdesc_contains_feature): New function.
944 * tdesc.h (tdesc_contains_feature): New prototype.
946 2019-11-15 Christian Biesinger <cbiesinger@google.com>
948 * Makefile.in: Add safe-strerror.c.
949 * configure: Regenerate.
950 * configure.ac: Don't source common.host.
952 2019-11-15 Christian Biesinger <cbiesinger@google.com>
954 * config.in: Regenerate.
955 * configure: Regenerate.
957 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
959 * ax.c (ax_printf): Handle size_t_arg.
961 2019-11-06 Christian Biesinger <cbiesinger@google.com>
963 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
964 * mi/mi-main.c (output_cores): Likewise.
965 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
966 (linux_xfer_osdata_modules): Likewise.
967 * remote.c (register_remote_support_xml): Likewise.
968 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
969 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
971 2019-11-01 Christian Biesinger <cbiesinger@google.com>
973 * configure: Regenerate.
974 * configure.ac: Remove check for strerror_r.
976 2019-10-31 Christian Biesinger <cbiesinger@google.com>
978 * config.in: Regenerate.
979 * configure: Regenerate.
980 * configure.ac: Also check for strerror_r.
982 2019-10-31 Christian Biesinger <cbiesinger@google.com>
984 * ax.h (debug_agent): Remove duplicate declaration.
986 2019-10-26 Tom de Vries <tdevries@suse.de>
988 * linux-aarch64-low.c: Fix typos in comments.
989 * linux-arm-low.c: Same.
991 * linux-ppc-low.c: Same.
992 * proc-service.c: Same.
995 * tracepoint.c: Same.
998 2019-10-25 Tom Tromey <tromey@adacore.com>
1000 * utils.c (xstrdup): Remove.
1002 2019-10-23 Tom Tromey <tom@tromey.com>
1004 * configure, config.in: Rebuild.
1006 2019-10-23 Tom Tromey <tom@tromey.com>
1008 * configure: Rebuild.
1009 * acinclude.m4: Use m4_include, not sinclude.
1011 2019-10-17 Tom Tromey <tromey@adacore.com>
1013 * configure: Rebuild.
1014 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1015 in AC_CONFIG_FILES invocation.
1016 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1019 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1021 * server.c: Include xml-builtin.h.
1022 (get_xml_features): Don't declare xml_builtins here.
1024 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1026 * Makefile.in: Remove references to vec-ipa.o.
1028 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1030 * Makefile.in: Remove references to vec.c.
1032 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1034 * server.c (server_waiting): Change to bool.
1035 (extended_protocol): Likewise.
1036 (response_needed): Likewise.
1037 (exit_requested): Likewise.
1038 (run_once): Likewise.
1039 (report_no_resumed): Likewise.
1040 (non_stop): Likewise.
1041 (disable_packet_vCont): Likewise.
1042 (disable_packet_Tthread): Likewise.
1043 (disable_packet_qC): Likewise.
1044 (disable_packet_qfThreadInfo): Likewise.
1045 (handle_general_set): Update.
1046 (handle_detach): Update.
1047 (handle_monitor_command): Update.
1048 (handle_query): Update.
1049 (captured_main): Update.
1050 (process_serial_event): Update.
1051 * server.h (server_waiting): Change to bool.
1052 (disable_packet_vCont): Likewise.
1053 (disable_packet_Tthread): Likewise.
1054 (disable_packet_qC): Likewise.
1055 (disable_packet_qfThreadInfo): Likewise.
1056 (run_once): Likewise.
1057 (non_stop): Likewise.
1058 * target.c (target_stop_and_wait): Update.
1060 2019-10-02 Tom Tromey <tromey@adacore.com>
1062 * Makefile.in (SFILES): Add common-inferior.c.
1063 (OBS): Add common-inferior.o.
1064 * server.c (startup_with_shell): Don't define.
1066 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1068 * linux-low.c (linux_low_read_btrace): Update for change to
1071 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1073 * debug.c (debug_threads): Remove comment in favor of the header.
1074 * debug.h (using_threads): Add declaration.
1075 (debug_threads): Add comment.
1076 * linux-aarch64-low.c: Include debug.h and remove declaration of
1078 * nto-low.c: Likewise.
1079 * remote-utils.c: Likewise.
1080 * thread-db.c: Likewise.
1082 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1084 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1085 and powerpc-cell64l-ipa.o.
1086 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1087 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1088 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1091 * spu-low.c: Remove file.
1093 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1094 (parse_spufs_run): Remove.
1095 (ppc_get_pc): Remove Cell/B.E. support.
1096 (ppc_set_pc): Likewise.
1097 (ppc_breakpoint_at): Likewise.
1098 (ppc_arch_setup): Likewise.
1099 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1100 tdesc_powerpc_cell32l.
1101 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1102 or init_registers_powerpc_cell32l.
1103 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1104 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1105 or init_registers_powerpc_cell32l.
1106 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1107 (init_registers_powerpc_cell32l): Remove prototype.
1108 (init_registers_powerpc_cell64l): Likewise.
1110 * target.h (struct target_ops): Remove qxfer_spu member.
1111 * server.c (handle_qxfer_spu): Remove.
1112 (qxfer_packets): Remove entry for "spu".
1113 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1114 * linux-low.c (SPUFS_MAGIC): Remove.
1115 (spu_enumerate_spu_ids): Remove.
1116 (linux_qxfer_spu): Remove.
1117 (linux_target_ops): Remove qxfer_spu member.
1118 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1119 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1120 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1122 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1124 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1125 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1126 * config.in: Regenerate.
1127 * configure: Regenerate.
1129 2019-08-15 Tom Tromey <tromey@adacore.com>
1131 * target.c (target_write_memory): Use gdb::byte_vector.
1133 2019-08-15 Tom Tromey <tromey@adacore.com>
1135 * tracepoint.c (write_inferior_data_pointer)
1136 (write_inferior_integer, write_inferior_int8)
1137 (write_inferior_uinteger, m_tracepoint_action_download)
1138 (r_tracepoint_action_download, x_tracepoint_action_download)
1139 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1140 (download_agent_expr, download_tracepoint_1)
1141 (download_trace_state_variables, upload_fast_traceframes): Update.
1142 * server.c (gdb_write_memory): Update.
1143 * remote-utils.c (relocate_instruction): Update.
1144 * proc-service.c (ps_pdwrite): Update.
1145 * mem-break.c (remove_memory_breakpoint)
1146 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1147 (uninsert_fast_tracepoint_jumps_at)
1148 (reinsert_fast_tracepoint_jumps_at): Update.
1149 * linux-x86-low.c (append_insns)
1150 (i386_install_fast_tracepoint_jump_pad)
1151 (amd64_write_goto_address, i386_write_goto_address): Update.
1152 * linux-s390-low.c (append_insns, s390_write_goto_address):
1154 * linux-ppc-low.c (ppc_relocate_instruction)
1155 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1156 (ppc_write_goto_address): Update.
1157 * linux-aarch64-low.c (append_insns): Update.
1158 * target.h (struct target_ops): Update.
1159 (write_inferior_memory): Don't declare.
1160 * target.c (target_write_memory): Rename from
1161 write_inferior_memory. Remove old target_write_memory.
1163 2019-08-15 Tom Tromey <tromey@adacore.com>
1165 * target.c (write_inferior_memory): Use std::vector.
1167 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1170 * configure.ac: Drop enable-libmcheck support.
1171 * configure, config.in: Rebuild.
1172 * acinclude.m4: Don't include it.
1174 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1176 * configure.srv: Remove Arm xml files.
1178 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1180 * configure.srv: Add new files. Remove xml generated files.
1181 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1183 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1184 * linux-aarch32-tdesc.c: New file.
1185 * linux-aarch32-tdesc.h: New file.
1186 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1187 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1188 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1189 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1190 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1191 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1192 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1193 (arm_read_description): Call arm_linux_read_description.
1194 (initialize_low_arch): Don't init registers.
1195 * linux-arm-tdesc.c: New file.
1196 * linux-arm-tdesc.h: New file.
1198 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1200 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1201 Move counter inside for.
1202 (arm_read_description): Check ptrace earlier.
1203 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1205 2019-07-09 Tom Tromey <tom@tromey.com>
1207 * configure: Rebuild.
1208 * configure.ac: Change common to gdbsupport.
1209 * acinclude.m4: Change common to gdbsupport.
1210 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1211 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1212 common to gdbsupport.
1213 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1214 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1215 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1216 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1217 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1218 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1219 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1220 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1221 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1222 common to gdbsupport.
1224 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1226 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1228 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1230 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1232 * configure.srv: Remove legacy xml.
1233 * linux-aarch64-low.c (initialize_low_arch): Remove
1234 initialize_low_tdesc call.
1235 * linux-aarch64-tdesc-selftest.c: Remove file.
1236 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1237 * linux-x86-low.c (initialize_low_arch): Remove
1238 initialize_low_tdesc call.
1239 * linux-x86-tdesc-selftest.c: Remove file.
1240 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1242 2019-06-20 Tom de Vries <tdevries@suse.de>
1244 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1245 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1247 2019-06-19 Tom de Vries <tdevries@suse.de>
1249 * debug.h (debug_write): Change return type to ssize_t.
1250 * debug.c (debug_write): Same.
1252 2019-06-14 Tom Tromey <tom@tromey.com>
1254 * configure.ac: Use new path to gnulib.
1255 * configure: Rebuild.
1256 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1259 2019-06-11 Tom Tromey <tom@tromey.com>
1261 * Makefile.in (SFILES): Add alloc.c.
1263 (IPA_OBJS): Add alloc-ipa.o.
1264 (alloc-ipa.o): New target.
1265 (%.o: ../%.c): New pattern rule.
1267 2019-06-10 Tom Tromey <tromey@adacore.com>
1269 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1270 end warning with a newline.
1271 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1273 * thread-db.c (attach_thread): Don't end warning with a newline.
1274 (thread_db_notice_clone): Likewise.
1275 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1277 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1278 end warning with a newline.
1280 2019-06-04 Pedro Alves <palves@redhat.com>
1282 * server.c (captured_main): Use make_unique_xstrdup.
1284 2019-06-02 Tom Tromey <tom@tromey.com>
1286 * gdbreplay.c (fromhex): Remove.
1287 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1289 2019-05-29 Tom Tromey <tromey@adacore.com>
1291 * configure: Rebuild.
1293 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1295 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1296 sign extension code on 32-bit builds.
1298 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1301 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1303 2019-04-19 Tom Tromey <tom@tromey.com>
1305 * server.c (struct vstop_notif): Derive from notif_event.
1307 (queue_stop_reply): Update.
1308 (remove_all_on_match_ptid): Change type. Rewrite.
1309 (discard_queued_stop_replies): Rewrite.
1310 (in_queued_stop_replies_ptid): Change type.
1311 (in_queued_stop_replies): Rewrite.
1312 (notif_stop): Update.
1313 (queue_stop_reply_callback): Update.
1314 (captured_main): Don't call initialize_notif.
1315 (push_stop_notification): Update.
1316 * notif.c (notif_write_event, handle_notif_ack)
1317 (notif_event_enque, notif_push): Update.
1318 (notif_event_xfree, initialize_notif): Remove.
1319 * notif.h (struct notif_event): Include <list>, not
1321 (struct notif_server) <queue>: Now a std::list.
1322 (notif_event_p): Remove typedef.
1323 (initialize_notif): Don't declare.
1324 (struct notif_event): Add virtual destructor.
1326 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1328 * ax.c (ax_vdebug): Call debug_printf.
1329 * debug.c (debug_write): New function.
1330 * debug.h (debug_write): New declaration.
1331 * linux-low.c (sigchld_handler): Call debug_write.
1333 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1335 * debug.c (debug_set_output): New function.
1336 (debug_vprintf): Send output to debug_file.
1337 (debug_flush): Likewise.
1338 * debug.h (debug_set_output): New declaration.
1339 * server.c (handle_monitor_command): Add debug-file option.
1340 (captured_main): Likewise.
1342 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1344 * debug.c (remote_debug): Add definition.
1345 * debug.h (remote_debug): Add declaration.
1346 * hostio.c (remote_debug): Remove declaration.
1347 * remote-utils.c (struct ui_file): Likewise.
1348 (remote_debug): Likewise.
1349 * remote-utils.h (remote_debug): Likewise,
1350 * server.c (remote_debug): Remove definition.
1352 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1354 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1355 when using a 64-bit gdbserver.
1357 2019-04-09 Tom Tromey <tromey@adacore.com>
1359 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1361 2019-04-08 Tom Tromey <tom@tromey.com>
1363 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1365 (linux_resume_one_lwp): Likewise.
1367 2019-04-08 Tom Tromey <tom@tromey.com>
1369 * gdbreplay.c: Update.
1370 * linux-low.c: Update.
1373 2019-04-08 Tom Tromey <tom@tromey.com>
1375 * server.c: Use C++ exception handling.
1376 * linux-low.c: Use C++ exception handling.
1377 * gdbreplay.c: Use C++ exception handling.
1379 2019-04-08 Tom Tromey <tom@tromey.com>
1381 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1382 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1383 (captured_main, main): Update.
1384 * gdbreplay.c (main): Update.
1386 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1388 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1389 value in argument pointer, return 1 if the entry is found and 0
1390 otherwise. Move comment.
1391 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1392 * linux-low.h (linux_get_auxv): Declare.
1393 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1395 2019-04-05 Tom Tromey <tromey@adacore.com>
1397 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1400 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1402 * linux-low.c (AT_HWCAP2): Add define if not already included.
1404 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1406 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1407 (aarch64_arch_setup): Call linux_get_hwcap.
1408 * linux-arm-low.c (arm_get_hwcap): Remove function.
1409 (arm_read_description): Call linux_get_hwcap.
1410 * linux-low.c (linux_get_auxv): New function.
1411 (linux_get_hwcap): Likewise.
1412 (linux_get_hwcap2): Likewise.
1413 * linux-low.h (linux_get_hwcap): New declaration.
1414 (linux_get_hwcap2): Likewise.
1415 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1416 (ppc_arch_setup): Call linux_get_hwcap.
1417 * linux-s390-low.c (s390_get_hwcap): Remove function.
1418 (s390_arch_setup): Call linux_get_hwcap.
1420 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1421 Jiong Wang <jiong.wang@arm.com>
1423 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1424 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1426 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1428 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1429 Jiong Wang <jiong.wang@arm.com>
1431 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1432 (aarch64_get_hwcap): New function.
1433 (aarch64_arch_setup): Read APIA hwcap.
1435 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1436 Jiong Wang <jiong.wang@arm.com>
1438 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1439 (initialize_low_tracepoint): Likewise.
1440 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1441 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1442 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1443 (aarch64_linux_read_description): Likewise.
1444 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1446 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1448 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1449 i386_create_target_description for 'segments' parameter.
1450 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1451 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1452 * win32-i386-low.c (i386_arch_setup): Likewise.
1454 2019-03-12 Tom Tromey <tromey@adacore.com>
1456 * linux-low.c (iterate_over_lwps): Update.
1458 2019-03-06 Tom Tromey <tom@tromey.com>
1460 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1461 (captured_main): Use SCOPE_EXIT.
1463 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1465 * configure.srv: Use '$enable_unittest' instead of '$development'
1466 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1469 2019-02-27 Tom Tromey <tromey@adacore.com>
1471 * gdbreplay.c (logchar): Handle \r\n.
1473 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1475 * linux-low.c (linux_attach): Add process before lwp.
1476 * server.c (attach_inferior): Check if already attached.
1478 2019-02-07 Tom Tromey <tom@tromey.com>
1480 * x86-tdesc.h: Rename include guard.
1481 * x86-low.h: Add include guard.
1482 * wincecompat.h: Rename include guard.
1483 * win32-low.h: Add include guard.
1484 * utils.h: Rename include guard.
1485 * tracepoint.h: Rename include guard.
1486 * tdesc.h: Rename include guard.
1487 * target.h: Rename include guard.
1488 * server.h: Rename include guard.
1489 * remote-utils.h: Rename include guard.
1490 * regcache.h: Rename include guard.
1491 * nto-low.h: Rename include guard.
1492 * notif.h: Add include guard.
1493 * mem-break.h: Rename include guard.
1494 * lynx-low.h: Add include guard.
1495 * linux-x86-tdesc.h: Add include guard.
1496 * linux-s390-tdesc.h: Add include guard.
1497 * linux-ppc-tdesc-init.h: Add include guard.
1498 * linux-low.h: Add include guard.
1499 * linux-aarch64-tdesc.h: Add include guard.
1500 * linux-aarch32-low.h: Add include guard.
1501 * inferiors.h: Rename include guard.
1502 * i387-fp.h: Rename include guard.
1503 * hostio.h: Rename include guard.
1504 * gdbthread.h: Rename include guard.
1505 * gdb_proc_service.h: Rename include guard.
1506 * event-loop.h: Rename include guard.
1507 * dll.h: Rename include guard.
1508 * debug.h: Rename include guard.
1509 * ax.h: Rename include guard.
1511 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1514 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1515 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1517 2019-01-25 Tom Tromey <tom@tromey.com>
1519 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1521 2019-01-25 Tom Tromey <tom@tromey.com>
1523 * win32-low.c: Fix common/ includes.
1524 * win32-i386-low.c: Fix common/ includes.
1525 * tracepoint.c: Fix common/ includes.
1526 * thread-db.c: Fix common/ includes.
1527 * target.h: Fix common/ includes.
1528 * symbol.c: Fix common/ includes.
1529 * spu-low.c: Fix common/ includes.
1530 * server.h: Fix common/ includes.
1531 * server.c: Fix common/ includes.
1532 * remote-utils.c: Fix common/ includes.
1533 * regcache.h: Fix common/ includes.
1534 * regcache.c: Fix common/ includes.
1535 * nto-x86-low.c: Fix common/ includes.
1536 * notif.h: Fix common/ includes.
1537 * mem-break.h: Fix common/ includes.
1538 * lynx-low.c: Fix common/ includes.
1539 * lynx-i386-low.c: Fix common/ includes.
1540 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1541 * linux-x86-low.c: Fix common/ includes.
1542 * linux-low.c: Fix common/ includes.
1543 * inferiors.h: Fix common/ includes.
1544 * i387-fp.c: Fix common/ includes.
1545 * hostio.c: Fix common/ includes.
1546 * hostio-errno.c: Fix common/ includes.
1547 * gdbthread.h: Fix common/ includes.
1548 * gdbreplay.c: Fix common/ includes.
1549 * fork-child.c: Fix common/ includes.
1550 * event-loop.c: Fix common/ includes.
1552 (enum gdb_agent_op): Fix common/ includes.
1554 2019-01-21 Tom Tromey <tom@tromey.com>
1556 * tracepoint.c: Fix includes.
1557 * remote-utils.c: Fix includes.
1558 * linux-x86-low.c: Fix includes.
1560 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1562 * gdbreplay.c (gdbreplay_version): Update copyright year in
1564 * server.c (gdbserver_version): Likewise.
1566 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1568 * linux-low.c (add_lwp): Switch ordering.
1570 2018-11-29 Tom Tromey <tom@tromey.com>
1572 * win32-low.c (win32_join): Take pid, not process.
1573 * target.h (struct target_ops) <join>: Change argument type.
1574 (join_inferior): Change argument name.
1575 * spu-low.c (spu_join): Take pid, not process.
1576 * server.c (handle_detach): Preserve pid before destroying
1578 * lynx-low.c (lynx_join): Take pid, not process.
1579 * linux-low.c (linux_join): Take pid, not process.
1581 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1583 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1584 (aarch64_cannot_fetch_register): Likewise.
1585 (struct linux_target_ops): Update references.
1587 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1589 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1591 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1593 * configure.srv (ipa_ppc_linux_regobj): Add
1594 powerpc-isa207-htm-vsx32l-ipa.o and
1595 powerpc-isa207-htm-vsx64l-ipa.o.
1596 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1597 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1598 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1599 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1600 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1601 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1602 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1603 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1604 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1605 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1606 (init_registers_powerpc_isa207_htm_vsx32l)
1607 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1608 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1609 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1610 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1611 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1612 (ppc_store_tm_ctarregset): New functions.
1613 (ppc_regsets): Add entries for HTM regsets.
1614 (ppc_arch_setup): Set htm in features struct when needed. Set
1615 sizes for the HTM regsets.
1616 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1617 (initialize_low_arch): Call
1618 init_registers_powerpc_isa207_htm_vsx32l and
1619 init_registers_powerpc_isa207_htm_vsx64l.
1620 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1621 PPC_TDESC_ISA207_HTM_VSX.
1622 (initialize_low_tracepoint): Call
1623 init_registers_powerpc_isa207_htm_vsx32l and
1624 init_registers_powerpc_isa207_htm_vsx64l.
1626 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1628 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1629 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1630 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1631 (ppc_store_pmuregset): New functions.
1632 (ppc_regsets): Add entries for ebb and pmu regsets.
1633 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1634 pmu regsets are available. Set sizes for these regsets.
1636 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1638 * configure.srv (ipa_ppc_linux_regobj): Add
1639 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1640 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1641 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1642 rs6000/powerpc-isa207-vsx32l.xml, and
1643 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1644 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1645 <PPC_TDESC_ISA207_VSX>: New enum value.
1646 (init_registers_powerpc_isa207_vsx32l): Declare.
1647 (init_registers_powerpc_isa207_vsx64l): Declare.
1648 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1649 (ppc_store_tarregset): New function.
1650 (ppc_regsets): Add entry for the TAR regset.
1651 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1652 size for the TAR regsets.
1653 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1654 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1655 and init_registers_powerpc_isa207_vsx64l.
1656 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1657 (initialize_low_tracepoint): Call
1658 init_registers_powerpc_isa207_vsx32l and
1659 init_registers_powerpc_isa207_vsx64l.
1661 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1662 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1664 * configure.srv (ipa_ppc_linux_regobj): Add
1665 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1666 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1667 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1668 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1669 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1670 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1671 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1672 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1673 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1674 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1675 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1676 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1677 (ppc_hwcap): Add comment.
1678 (ppc_hwcap2): New global.
1679 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1680 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1681 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1682 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1683 when needed. Set sizes for the the DSCR and PPR regsets.
1684 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1685 (initialize_low_arch): Call
1686 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1687 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1688 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1689 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1690 (initialize_low_tracepoint): Call
1691 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1692 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1694 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1696 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1698 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1699 Simon Marchi <simark@simark.ca>
1701 * acinclude.m4: Include "../selftest.m4".
1702 * configure: Regenerate.
1703 * configure.ac: Use "GDB_AC_SELFTEST".
1704 * configure.srv: Use "$enable_unittests" instead of
1705 "$development" when checking whether unit tests have been
1707 * server.c (captured_main): Update message informing that
1708 selftests have been disabled.
1710 2018-10-04 Tom Tromey <tom@tromey.com>
1712 * configure: Rebuild.
1714 2018-10-04 Tom Tromey <tom@tromey.com>
1716 * server.c (handle_status): Rename inner "thread".
1717 (process_serial_event): Declare "res" in 'm' case.
1718 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1719 (iterate_over_lwps): Rename inner "thread".
1720 (linux_qxfer_libraries_svr4): Rename inner "len".
1721 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1723 2018-10-01 Gary Benson <gbenson@redhat.com>
1725 * gdb_proc_service.h: Moved common code to
1726 common/gdb_proc_service.h.
1728 2018-10-01 Gary Benson <gbenson@redhat.com>
1730 * gdb_proc_service.h: Synchronize comments and whitespace with
1731 GDB's version of this file.
1733 2018-09-25 Tom Tromey <tom@tromey.com>
1735 * configure: Rebuild.
1736 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1738 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1740 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1741 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1742 ($(IPA_LIB)): Sort IPA_OBJS.
1744 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1746 * Makefile.in: Remove references to $(ADD_DEPS).
1748 2018-09-16 Tom Tromey <tom@tromey.com>
1750 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1752 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1755 2018-09-05 Tom Tromey <tom@tromey.com>
1757 * configure: Rebuild.
1759 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1762 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1764 2018-08-27 Tom Tromey <tom@tromey.com>
1767 * configure: Rebuild.
1769 2018-08-27 Tom Tromey <tom@tromey.com>
1771 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1772 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1773 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1774 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1775 (s390x_emit_stack_adjust): Add casts to unsigned char.
1777 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1781 * server.h (struct client_state) <disable_randomization>:
1784 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1786 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1788 (mips_supply_ptrace_register): Likewise.
1790 2018-07-22 Tom Tromey <tom@tromey.com>
1792 * configure: Rebuild.
1794 2018-07-22 Tom Tromey <tom@tromey.com>
1796 * win32-low.c (win32_create_inferior): Remove unused variables.
1797 * gdbreplay.c (remote_open): Remove unused variable.
1798 * remote-utils.c (remote_prepare): Remove unused variable.
1799 * x86-tdesc.h (X86_TDESC_H): Define.
1800 (amd64_expedite_regs): Define conditionally.
1801 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1802 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1803 * remote-utils.c (readchar): Remove unused variable.
1805 2018-07-13 Pedro Alves <palves@redhat.com>
1807 * linux-low.c (linux_kill): Change parameter to process_info
1808 pointer instead of pid. Adjust.
1809 * lynx-low.c (lynx_kill): Likewise.
1810 * nto-low.c (nto_kill): Likewise.
1811 * spu-low.c (spu_kill): Likewise.
1812 * win32-low.c (win32_kill): Likewise.
1813 * server.c (handle_v_kill, kill_inferior_callback)
1814 (detach_or_kill_for_exit): Adjust.
1815 * target.c (kill_inferior): Change parameter to process_info
1816 pointer instead of pid. Adjust.
1817 * target.h (struct target_ops) <kill>: Change parameter to
1818 process_info pointer instead of pid. Adjust all implementations
1820 (kill_inferior): Likewise.
1822 2018-07-13 Pedro Alves <palves@redhat.com>
1824 * linux-low.c (linux_detach, linux_join): Change parameter to
1825 process_info pointer instead of pid. Adjust.
1826 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1827 * nto-low.c (nto_detach): Likewise.
1828 * spu-low.c (spu_detach, spu_join): Likewise.
1829 * win32-low.c (win32_detach, win32_join): Likewise.
1830 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1831 * target.h (struct target_ops) <detach, join>: Change parameter to
1832 process_info pointer instead of pid. Adjust all implementations
1834 (detach_inferior, join_inferior): Rename 'pid' parameter to
1837 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1838 Jan Kratochvil <jan.kratochvil@redhat.com>
1839 Paul Fertser <fercerpav@gmail.com>
1840 Tsutomu Seki <sekiriki@gmail.com>
1842 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1843 (OBS): Add 'common/netstuff.o'.
1844 (GDBREPLAY_OBS): Likewise.
1845 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1846 (remote_open): Implement support for IPv6
1848 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1850 (handle_accept_event): Accept connections from IPv6 sources.
1851 (remote_prepare): Handle IPv6-style hostnames; implement
1852 support for IPv6 connections.
1853 (remote_open): Implement support for printing connections from
1856 2018-07-11 Pedro Alves <palves@redhat.com>
1859 * mem-break.c (any_persistent_commands): Add process_info
1860 parameter and use it instead of relying on the current process.
1861 Change return type to bool.
1862 * mem-break.h (any_persistent_commands): Add process_info
1863 parameter and change return type to bool.
1864 * server.c (handle_detach): Remove require_running_or_return call.
1865 Look up the process_info for the process we're about to detach.
1866 If not found, return back error to GDB. Adjust
1867 any_persistent_commands call to pass down a process pointer.
1869 2018-07-11 Pedro Alves <palves@redhat.com>
1871 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1872 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1873 instead of collect_register_by_name.
1874 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1875 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1877 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1878 Pedro Alves <palves@redhat.com>
1880 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1882 2018-07-03 Tom Tromey <tom@tromey.com>
1884 * linux-low.c: Update.
1885 * lynx-low.c: Update.
1886 * mem-break.c: Update.
1887 * nto-low.c: Update.
1888 * remote-utils.c: Update.
1890 * spu-low.c: Update.
1892 * win32-low.c: Update.
1894 2018-07-03 Tom Tromey <tom@tromey.com>
1898 2018-07-03 Tom Tromey <tom@tromey.com>
1900 * linux-low.c: Update.
1902 2018-07-03 Tom Tromey <tom@tromey.com>
1906 2018-07-03 Tom Tromey <tom@tromey.com>
1908 * linux-low.c: Update.
1909 * linux-mips-low.c: Update.
1910 * lynx-low.c: Update.
1911 * nto-low.c: Update.
1912 * remote-utils.c: Update.
1914 * spu-low.c: Update.
1916 * thread-db.c: Update.
1918 2018-07-03 Tom Tromey <tom@tromey.com>
1920 * linux-low.c: Update.
1921 * linux-mips-low.c: Update.
1922 * lynx-low.c: Update.
1923 * mem-break.c: Update.
1924 * nto-low.c: Update.
1925 * remote-utils.c: Update.
1927 * spu-low.c: Update.
1929 * tracepoint.c: Update.
1931 2018-07-03 Tom Tromey <tom@tromey.com>
1933 * linux-low.c: Update.
1934 * linux-ppc-low.c: Update.
1935 * linux-x86-low.c: Update.
1936 * proc-service.c: Update.
1938 * spu-low.c: Update.
1939 * thread-db.c: Update.
1940 * win32-low.c: Update.
1942 2018-07-03 Tom Tromey <tom@tromey.com>
1944 * linux-low.c: Update.
1945 * lynx-low.c: Update.
1946 * nto-low.c: Update.
1947 * remote-utils.c: Update.
1948 * spu-low.c: Update.
1949 * thread-db.c: Update.
1950 * win32-low.c: Update.
1952 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1954 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1955 parameter in call to 'amd64_create_target_description'.
1957 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1959 * x86-tdesc.h: Remove executable permission flag.
1961 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1963 * configure.ac: Remove AC_PREREQ, add missing quoting.
1964 * configure: Re-generate.
1965 * config.in: Re-generate.
1966 * aclocal.m4: Re-generate.
1968 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1970 * tracepoint.h (current_traceframe): Remove declaration.
1972 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1974 * linux-aarch64-low.c (is_sve_tdesc): New function.
1975 (aarch64_sve_regs_copy_to_regcache): Likewise.
1976 (aarch64_sve_regs_copy_from_regcache): Likewise.
1977 (aarch64_regs_info): Add SVE checks.
1978 (initialize_low_arch): Initialize SVE.
1980 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1982 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1984 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1986 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1987 (initialize_low_tracepoint): Likewise
1988 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1989 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1991 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1993 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1995 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1997 * server.h (PBUFSIZ): Increase size
1999 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2001 * regcache.c (regcache::raw_compare): New function.
2002 * regcache.h (regcache::raw_compare): New declaration.
2004 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2006 * regcache.c (new_register_cache): Use new.
2007 (free_register_cache): Use delete.
2008 (register_data): Use const.
2009 (supply_register): Move body inside regcache.
2010 (regcache::raw_supply): New override function.
2011 (collect_register): Move body inside regcache.
2012 (regcache::raw_collect): New override function.
2013 (regcache::get_register_status): New override function.
2014 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2016 2018-06-09 Tom Tromey <tom@tromey.com>
2018 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2020 (event_queue): Use std::queue.
2021 (gdb_event_xfree): Remove.
2022 (initialize_event_loop, process_event, wait_for_event): Update.
2024 2018-06-08 Stan Cox <scox@redhat.com>
2026 * win32-low.c (win32_create_inferior): last_ptid and last_status
2027 moved to client_state.
2029 2018-06-08 Pedro Alves <palves@redhat.com>
2031 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2032 common/common-exceptions.o, common/common-utils.o,
2033 common/errors.o, common/print-utils.o and utils.o.
2034 * gdbreplay.c: Include "common-defs.h" instead of the two
2035 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2036 string.h or alloca.h.
2037 (perror_with_name): Delete.
2038 (remote_open): Use xstrdup instead of strdup.
2039 (main): Rename to ...
2040 (captured_main): ... this.
2043 2018-06-08 Tom Tromey <tom@tromey.com>
2045 * linux-low.c (linux_low_read_btrace): Update.
2047 2018-06-04 Stan Cox <scox@redhat.com>
2049 * server.h (struct client_state): New.
2050 * server.c (cont_thread, general_thread, multi_process)
2051 (report_fork_events, report_vfork_events, report_exec_events)
2052 (report_thread_events, swbreak_feature, hwbreak_feature)
2053 (vCont_supported, disable_randomization, pass_signals)
2054 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2055 Moved to client_state.
2056 * remote-utils.c (remote_debug, noack_mode)
2057 (transport_is_reliable): Moved to client_state.
2058 * tracepoint.c (current_traceframe): Moved to client_state.
2061 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2062 linux-low.c, remote-utils.h, target.c: Use client_state.
2064 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2066 * configure.srv: Add new c/h file.
2068 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2070 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2073 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2075 * gdb.arch/mips-fpregset-core.exp: New test.
2076 * gdb.arch/mips-fpregset-core.c: New test source.
2078 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2081 * hostio.c (require_int): Do not report overflow for integers
2082 between 0xfffffff and 0x7fffffff.
2084 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2086 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2087 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2088 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2090 (the_low_target): Wire them.
2092 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2094 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2095 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2096 mode. Call collect_register_by_name with vscr using
2097 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2098 (ppc_store_vrregset): Add and set vscr_offset variable as in
2099 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2104 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2105 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2106 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2108 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2110 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2111 (ppc_store_vsxregset): Likewise.
2112 (ppc_fill_vrregset): Likewise.
2113 (ppc_store_vrregset): Likewise.
2114 (ppc_fill_evrregset): Likewise.
2115 (ppc_store_evrregset): Likewise.
2116 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2117 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2120 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2122 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2123 wordsize of the inferior. Call ppc_linux_target_wordsize.
2125 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2127 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2128 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2129 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2130 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2131 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2132 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2133 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2134 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2135 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2136 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2137 (tdesc_powerpc_e500l): Remove.
2138 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2139 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2140 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2141 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2143 (ppc_arch_setup): Remove target description matching code. Fill a
2144 ppc_linux_features struct and call ppc_linux_match_description
2147 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2149 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2150 width of the requested register exceeds the width of the
2152 (mips_cannot_store_register): Likewise.
2154 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2156 * linux-mips-low.c (mips_fetch_register): New function. Update
2158 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2159 (the_low_target): Wire `mips_fetch_register'.
2161 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2163 * lynx-i386-low.c (LYNXOS_178): New macro.
2164 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2165 the layout on LynxOS-178.
2166 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2167 handle floating point registers that are not supported by
2170 2018-05-10 Tom Tromey <tom@tromey.com>
2172 * configure: Rebuild.
2174 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2177 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2178 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2179 Use it to set the expedite_regs field in the given tdesc.
2180 * x86-tdesc.h: New file.
2181 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2182 Adjust following the addition of the new expedite_regs parameter
2183 to init_target_desc.
2184 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2185 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2186 (i386_linux_read_description, amd64_linux_read_description):
2187 Adjust following the addition of the new expedite_regs parameter
2188 to init_target_desc.
2189 * lynx-i386-low.c: #include "x86-tdesc.h".
2190 (lynx_i386_arch_setup): Adjust following the addition of the new
2191 expedite_regs parameter to init_target_desc.
2192 * nto-x86-low.c: #include "x86-tdesc.h".
2193 (nto_x86_arch_setup): Adjust following the addition of the new
2194 expedite_regs parameter to init_target_desc.
2195 * win32-i386-low.c: #include "x86-tdesc.h".
2196 (i386_arch_setup): Adjust following the addition of the new
2197 expedite_regs parameter to init_target_desc.
2199 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2202 * win32-low.c (win32_create_inferior): Add call to my_wait
2203 setting last_status global.
2205 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2208 * win32-low.c (create_process): Only call gdb_tilde_expand if
2209 inferior_cwd is not NULL.
2211 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2213 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2214 registers to the cache if their values have changed.
2215 (i387_xsave_to_cache): Provide default values for x87 control
2216 registers when these features are available, but disabled.
2217 * regcache.c (supply_register_by_name_zeroed): New function.
2218 * regcache.h (supply_register_by_name_zeroed): Declare new
2221 2018-05-07 Tom Tromey <tom@tromey.com>
2223 * configure: Rebuild.
2225 2018-05-04 Tom Tromey <tom@tromey.com>
2227 * configure: Rebuild.
2229 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2230 Pedro Alves <palves@redhat.com>
2232 * linux-aarch64-low.c (aarch64_stopped_data_address):
2235 2018-04-27 Tom Tromey <tom@tromey.com>
2237 * configure: Rebuild.
2239 2018-04-23 Tom Tromey <tom@tromey.com>
2241 * configure: Rebuild.
2243 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2245 * Makefile.in (depcomp): Add "..".
2246 (all_deps_files): New and use it.
2248 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2250 * configure.srv (aarch64*-*-linux*): Don't include xml.
2251 (i[34567]86-*-cygwin*): Likewise.
2252 (i[34567]86-*-linux*): Likewise.
2253 (i[34567]86-*-lynxos*): Likewise.
2254 (i[34567]86-*-mingw32ce*): Likewise.
2255 (i[34567]86-*-mingw*): Likewise.
2256 (i[34567]86-*-nto*): Likewise.
2257 (tic6x-*-uclinux): Likewise.
2258 (x86_64-*-linux*): Likewise.
2259 (x86_64-*-mingw*): Likewise.
2260 (x86_64-*-cygwin*): Likewise.
2262 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2264 * tdesc.c: Remove xml parameter.
2266 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2268 * server.c (get_features_xml): Remove cast.
2269 * tdesc.c (void target_desc::accept): Fill in function.
2270 (tdesc_get_features_xml): Remove old xml creation.
2271 (print_xml_feature::visit_pre): Add xml vistor.
2272 * tdesc.h (struct target_desc): Make xmltarget mutable.
2273 (tdesc_get_features_xml): Remove declaration.
2275 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2277 * tdesc.c (tdesc_architecture_name): Add new function.
2278 (tdesc_osabi_name): Likewise.
2279 (tdesc_get_features_xml): Use new functions.
2281 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2283 * tdesc.c (tdesc_create_flags): Remove.
2284 (tdesc_add_flag): Likewise.
2285 (tdesc_named_type): Likewise.
2286 (tdesc_create_union): Likewise.
2287 (tdesc_create_struct): Likewise.
2288 (tdesc_create_vector): Likewise.
2289 (tdesc_add_bitfield): Likewise.
2290 (tdesc_add_field): Likewise.
2291 (tdesc_set_struct_size): Likewise.
2293 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2295 * tdesc.c (~target_desc): Remove implictly deleted items.
2296 (init_target_desc): Iterate all features.
2297 (tdesc_get_features_xml): Use vector.
2298 (tdesc_create_feature): Create feature.
2299 * tdesc.h (tdesc_feature) Remove
2300 (target_desc): Add features.
2302 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2304 * Makefile.in: Add common/tdesc.c
2305 * tdesc.c (init_target_desc): init all reg_defs from register
2307 (tdesc_create_reg): Create tdesc_reg.
2308 * tdesc.h (tdesc_feature): Add register vector.
2310 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2312 * tdesc.h (struct target_desc) <features>: Change type to
2313 std::vector<std::string>.
2314 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2316 (tdesc_get_features_xml): Likewise.
2317 (tdesc_create_feature): Likewise.
2319 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2321 * regcache.c (find_register_by_number): Return a ref.
2322 (find_regno): Use references.
2323 (register_size): Likewise.
2324 (register_data): Likewise.
2325 * tdesc.c (target_desc::~target_desc): Remove free calls.
2326 (target_desc::operator==): Use std::vector compare.
2327 (init_target_desc): Use reference.
2328 (tdesc_create_reg): Use reg constructors.
2329 * tdesc.h (struct target_desc): Replace pointer with object.
2331 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2333 * regcache.c (find_register_by_number): Make static.
2334 (find_regno): Use find_register_by_number
2335 * regcache.h (struct reg): Remove declaration.
2337 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2339 * tdesc.c (target_desc::~target_desc): Move to here.
2340 (target_desc::operator==): Likewise.
2341 * tdesc.h (target_desc::~target_desc): Move from here.
2342 (target_desc::operator==): Likewise.
2344 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2346 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2348 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2350 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2352 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2353 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2354 and init_registers_s390_gs_linux64.
2356 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2358 * linux-s390-low.c (s390_fill_gs): Remove function.
2359 (s390_fill_gsbc): Remove function.
2360 (s390_regsets): Set fill functions for the guarded storage regsets
2363 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2365 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2366 the word size. Add comment.
2367 (s390_get_wordsize): New function.
2368 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2369 pswm with it. Instead, use s390_get_wordsize to determine the
2370 word size first and derive the correct tdesc from that directly.
2372 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2374 * Makefile.in: Include silent-rules.mk.
2375 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2376 (COMPILE): Add ECHO_CXX.
2377 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2378 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2379 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2380 (version-generated.c): Add ECHO_GEN.
2381 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2382 (IPAGENT_COMPILE): Add ECHO_CXX.
2383 (%-generated.c): Add ECHO_REGDAT.
2385 2018-03-14 Tom Tromey <tom@tromey.com>
2388 * ax.c (ax_printf): Special case for NULL.
2390 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2392 * linux-low.c (linux_qxfer_libraries_svr4): Use
2393 xml_escape_text_append.
2395 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2397 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2399 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2401 * server.c (handle_general_set): Remove unnecessary xstrdup.
2403 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2405 * server.c (parse_debug_format_options): Adjust to
2406 delim_string_to_char_ptr_vec changes.
2407 * thread-db.c (thread_db_load_search): Adjust to
2408 dirnames_to_char_ptr_vec changes.
2410 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2412 * target.h (target_enable_btrace, target_disable_btrace)
2413 (target_read_btrace, target_read_btrace_conf): Turn macro into
2414 inline function. Throw error if target method is not defined.
2415 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2416 check for btrace target method. Be prepared to handle exceptions
2417 from btrace target methods.
2419 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2421 * server.c (captured_main): Change order of error message printed
2422 when the current working directory cannot be found.
2424 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2426 * server.c: Include "filenames.h" and "pathstuff.h".
2427 (program_name): Delete variable.
2428 (program_path): New anonymous class.
2429 (get_exec_wrapper): Use "program_path" instead of
2431 (handle_v_run): Likewise.
2432 (captured_main): Likewise.
2433 (process_serial_event): Likewise.
2435 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2437 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2438 (OBJS): Add "pathstuff.o".
2439 * server.c (current_directory): New global variable.
2440 (captured_main): Initialize "current_directory".
2442 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2444 * tdesc.c: Use common/tdesc.h.
2445 * tdesc.h: Likewise.
2447 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2448 Simon Marchi <simon.marchi@ericsson.com>
2450 * Makefile.in: Switch order of make rules.
2452 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2454 * Makefile.in: Add common directory in build.
2455 * configure.ac: Add common reference.
2456 * configure: Regenerate.
2458 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2460 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2461 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2462 * spu-low.c (spu_target_ops): Likewise.
2463 * win32-low.c (win32_target_ops): Likewise.
2464 * server.c (supported_btrace_packets): Report packets unconditionally.
2465 * target.h (target_ops) <supports_btrace>: Remove.
2466 (target_supports_btrace): Remove.
2468 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2470 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2471 (handle_btrace_disable): Change return type to void. Use exceptions
2473 (handle_btrace_general_set): Catch exception and copy message to
2476 2018-02-08 Tom Tromey <tom@tromey.com>
2478 * linux-low.c (install_software_single_step_breakpoints): Use
2479 make_scoped_restore.
2480 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2481 (do_restore_current_thread_cleanup): Remove.
2482 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2485 2018-02-08 Tom Tromey <tom@tromey.com>
2487 * mem-break.c (set_raw_breakpoint_at): Use
2488 gdb::unique_xmalloc_ptr.
2490 2018-01-30 Pedro Alves <palves@redhat.com>
2493 * target.c (target_terminal::terminal_state): Rename to ...
2494 (target_terminal::m_terminal_state): ... this.
2496 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2498 * linux-low.c (handle_extended_wait): Surround call to
2499 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2501 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2503 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2504 linux_ptrace_attach_fail_reason_string now returning an
2506 (linux_attach): Likewise.
2507 * thread-db.c (attach_thread): Likewise.
2509 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2512 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2513 checking for fs_base/gs_base fields in struct user_regs_struct.
2514 * configure: Regenerate.
2516 2018-01-16 Yao Qi <yao.qi@linaro.org>
2519 * linux-low.c (fetch_register): Call supply_register instead of
2522 2018-01-08 Yao Qi <yao.qi@linaro.org>
2523 Simon Marchi <simon.marchi@ericsson.com>
2525 * Makefile.in (OBS): Remove selftest.o.
2526 * configure.ac: Set srv_selftest_objs if $development is true.
2527 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2528 * configure: Re-generated.
2529 * server.c (captured_main): Wrap variable selftest_filter with
2532 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2534 * server.c (parse_debug_format_options): Return std::string.
2535 (handle_monitor_command, captured_main): Adjust.
2537 2018-01-05 Pedro Alves <palves@redhat.com>
2540 * server.c (captured_main): Pass quiet=false to
2541 save_original_signals_state.
2543 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2545 * gdbreplay.c (gdbreplay_version): Update copyright year in
2547 * server.c (gdbserver_version): Likewise.
2549 2017-12-08 Tom Tromey <tom@tromey.com>
2551 * ax.c (ax_printf): Update.
2553 2017-12-07 Yao Qi <yao.qi@linaro.org>
2555 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2556 aarch64_linux_read_description.
2557 * linux-amd64-ipa.c (idx2mask): New array.
2558 (get_ipa_tdesc): Move idx2mask out.
2559 (initialize_low_tracepoint): Initialize target descriptions.
2560 * linux-i386-ipa.c (idx2mask): New array.
2561 (get_ipa_tdesc): Move idx2mask out.
2562 (initialize_low_tracepoint): Initialize target descriptions.
2564 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2566 * tdesc.c (struct tdesc_type): Change return type.
2567 (tdesc_add_flag): Change parameter type.
2568 (tdesc_add_bitfield): Likewise.
2569 (tdesc_add_field): Likewise.
2570 (tdesc_set_struct_size): Likewise.
2572 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2574 * regcache.c (registers_to_string): Remove unused variable.
2576 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2578 * inferiors.c (for_each_inferior_with_data): Remove.
2579 * inferiors.h (for_each_inferior_with_data): Remove.
2580 * server.c (handle_qxfer_threads_worker): Change parameter type.
2581 (handle_qxfer_threads_proper): Use for_each_thread.
2583 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2585 * inferiors.c (for_each_inferior): Remove.
2586 (clear_inferiors): Use for_each_thread.
2587 * inferiors.h (for_each_inferior): Remove.
2588 * linux-low.c (linux_wait_for_event_filtered): Use
2590 (linux_stabilize_threads): Likewise.
2591 * regcache.c (regcache_release): Likewise.
2592 * server.c (gdb_wants_all_threads_stopped): Likewise.
2593 (clear_pending_status_callback): Remove.
2594 (handle_status): Use for_each_thread.
2595 (captured_main): Likewise.
2596 * win32-low.c (child_init_thread_list): Likewise.
2597 (win32_clear_inferiors): Likewise.
2598 (fake_breakpoint_event): Likewise.
2600 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2602 * inferiors.h (find_inferior): Remove.
2603 * inferiors.c (find_inferior): Remove.
2605 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2607 * linux-low.c (resume_status_pending_p): Update comment.
2608 (need_step_over_p): Update comment.
2610 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2612 * linux-low.c (proceed_one_lwp): Return void, change parameter
2614 (unsuspend_and_proceed_one_lwp): Likewise.
2615 (proceed_all_lwps): Use for_each_thread.
2616 (unstop_all_lwps): Likewise.
2618 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2620 * linux-low.c (linux_resume_one_thread): Return void, take
2622 (linux_resume): Use for_each_thread.
2624 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2626 * linux-low.c (send_sigstop_callback): Return void, change
2627 parameter type. Rename to...
2628 (send_sigstop): ... this.
2629 (suspend_and_send_sigstop_callback): Return void, change parameter
2631 (suspend_and_send_sigstop): ... this.
2632 (stop_all_lwps): Use for_each_thread.
2634 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2636 * linux-low.c (lwp_running): Return bool, remove unused
2638 (linux_stabilize_threads): Use find_thread.
2640 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2642 * linux-low.c (select_singlestep_lwp_callback): Remove.
2643 (count_events_callback): Remove.
2644 (select_event_lwp_callback): Remove.
2645 (select_event_lwp): Use find_thread/for_each_thread.
2647 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2649 * linux-low.c (not_stopped_callback): Return bool, take filter
2651 (linux_wait_for_event_filtered): Use find_thread.
2652 (linux_wait_1): Likewise.
2654 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2656 * linux-low.c (same_lwp): Remove.
2657 (find_lwp_pid): Use find_thread.
2659 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2661 * linux-low.c (delete_lwp_callback): Remove.
2662 (linux_mourn): Use for_each_thread.
2664 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2666 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2667 args parameter, don't check for pid.
2668 (linux_detach): Use for_each_thread.
2670 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2672 * linux-low.c (struct counter): Remove.
2673 (second_thread_of_pid_p): Remove.
2674 (last_thread_of_process_p): Use find_thread.
2676 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2678 * inferiors.c (find_inferior_in_random): Remove.
2679 * inferiors.h (find_inferior_in_random): Remove.
2680 * linux-low.c (status_pending_p_callback): Return bool, accept
2681 parameter ptid directly.
2682 (linux_wait_for_event_filtered): Use find_thread_in_random.
2683 (linux_wait_1): Likewise.
2685 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2687 * inferiors.c (find_inferior_id): Remove.
2688 (find_thread_ptid): Move implemention from find_inferior_id to
2690 * inferiors.h (find_inferior_id): Remove.
2691 * server.c (handle_status): Use find_thread_ptid.
2692 (process_serial_event): Likewise.
2693 * thread-db.c (find_one_thread): Likewise.
2694 (thread_db_thread_handle): Likewise.
2695 * win32-low.c (thread_rec): Likewise.
2696 (child_delete_thread): Likewise.
2697 (win32_thread_alive): Likewise.
2698 (get_child_debug_event): Likewise.
2700 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2702 * linux-mips-low.c (update_watch_registers_callback): Return
2703 void, remove pid_p parameter, don't check for pid.
2704 (mips_insert_point, mips_remove_point): Use for_each_thread.
2706 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2708 * lynx.low (lynx_delete_thread_callback): Remove.
2709 (lynx_mourn): Use for_each_thread.
2711 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2713 * regcache.c (regcache_invalidate_one): Remove.
2714 (regcache_invalidate_pid): use for_each_thread.
2716 2017-11-26 Tom Tromey <tom@tromey.com>
2718 * linux-low.c (linux_create_inferior): Update.
2720 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2722 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2724 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2726 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2727 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2728 * linux-aarch64-tdesc-selftest.c: New file.
2729 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2731 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2733 * configure.srv: Add new file.
2734 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2735 * linux-aarch64-tdesc-selftest.c: New file.
2736 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2738 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2740 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2741 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2742 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2744 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2746 * configure.srv: Add new files.
2747 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2748 aarch64_linux_read_description.
2749 * linux-aarch64-low.c (aarch64_linux_read_description):
2750 Merge with aarch64_arch_setup.
2751 (aarch64_arch_setup): Call aarch64_linux_read_description.
2752 * linux-aarch64-tdesc.c: New file.
2753 * linux-aarch64-tdesc.h: New file.
2755 2017-11-24 Yao Qi <yao.qi@linaro.org>
2757 * configure.srv: Set $srv_regobj for tic6x-linux.
2758 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2759 (tic6x_read_description): Move some code to tic6x_arch_setup.
2760 (tic6x_tdesc_test): New function.
2761 (initialize_low_arch): Call selftests::register_test.
2763 2017-11-22 Yao Qi <yao.qi@linaro.org>
2765 * remote-utils.c (prepare_resume_reply): Use memcpy.
2767 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2769 * linux-low.c (kill_one_lwp_callback): Return void, take
2770 argument directly, don't filter on pid.
2771 (linux_kill): Use for_each_thread.
2773 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2775 * linux-low.c (need_step_over_p): Return bool, remove dummy
2777 (linux_resume, proceed_all_lwps): Use find_thread.
2779 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2781 * linux-low.c (resume_status_pending_p): Return bool, remove
2783 (linux_resume): Use find_thread.
2785 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2787 * linux-low.c (struct thread_resume_array): Remove.
2788 (linux_set_resume_request): Return void, take arguments
2790 (linux_resume): Use for_each_thread.
2792 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2794 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2795 return bool, remove data argument.
2796 (linux_stabilize_threads): Use find_thread.
2798 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2800 * linux-low.c (unsuspend_one_lwp): Remove.
2801 (unsuspend_all_lwps): Use for_each_thread, inline code from
2804 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2806 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2807 * linux-low.c (struct iterate_over_lwps_args): Remove.
2808 (iterate_over_lwps_filter): Remove.
2809 (iterate_over_lwps): Use find_thread.
2811 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2813 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2814 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2815 code from reset_lwp_ptrace_options_callback.
2817 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2819 * linux-arm-low.c (struct update_registers_data): Remove.
2820 (update_registers_callback): Return void, take arguments
2821 directly, don't check thread's pid.
2822 (arm_insert_point, arm_remove_point): Use for_each_thread.
2824 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2826 * win32-low.c (continue_one_thread): Return void, take argument
2828 (child_continue): Use for_each_thread.
2830 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2832 * win32-i386-low.c (update_debug_registers_callback): Rename
2834 (update_debug_registers): ... this, return void, remove pid_p arg.
2835 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2837 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2839 * inferiors.h (struct process_info): Add constructor, initialize
2841 <syscalls_to_catch>: Change type to std::vector<int>.
2842 * inferiors.c (add_process): Allocate process_info with new.
2843 (remove_process): Free process_info with delete.
2844 * linux-low.c (handle_extended_wait): Adjust.
2845 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2846 * server.c (handle_general_set): Adjust.
2848 2017-11-16 Pedro Alves <palves@redhat.com>
2850 * remote-utils.c (remote_close): Block SIGIO signals instead of
2851 uninstalling the SIGIO handler.
2853 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2855 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2857 2017-11-16 Yao Qi <yao.qi@linaro.org>
2859 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2860 (tic6x_store_gregset): Likewise.
2861 (tic6x_usrregs_info): Move it up.
2863 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2865 * Makefile.in: Update arch rules.
2866 * configure.srv: Explicitly mark arch/ files.
2868 2017-11-13 Andreas Schwab <schwab@suse.de>
2870 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2872 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2874 2017-11-06 Pedro Alves <palves@redhat.com>
2876 * config.in, configure: Regenerate.
2878 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2880 * target.c (struct thread_search): Remove.
2881 (thread_search_callback): Remove.
2882 (prepare_to_access_memory): Use for_each_thread instead of
2883 find_inferior. Inline code from thread_search_callback.
2885 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2887 * server.c (struct visit_actioned_threads_data): Remove.
2888 (visit_actioned_threads): Change prototype to take arguments
2890 (resume): Use find_thread instead of find_inferior.
2892 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2894 * server.c (queue_stop_reply_callback): Change prototype, return
2896 (find_status_pending_thread_callback): Remove.
2897 (handle_status): Replace find_inferior with find_thread and
2900 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2902 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2904 (aarch64_store_gregset): Likewise.
2905 (aarch64_fill_fpregset): Likewise.
2906 (aarch64_store_fpregset): Likewise.
2908 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2910 * gdbthread.h (find_thread, for_each_thread): New functions.
2911 * inferiors.c (thread_of_pid): Remove.
2912 (find_any_thread_of_pid): Use find_thread.
2913 * linux-low.c (num_lwps): Use for_each_thread.
2915 2017-10-17 Yao Qi <yao.qi@linaro.org>
2917 * Makefile.in: Remove one rule.
2918 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2920 2017-10-17 Yao Qi <yao.qi@linaro.org>
2922 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2923 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2925 2017-10-17 Yao Qi <yao.qi@linaro.org>
2927 * configure.srv: Rename arm.o with arch/arm.o.
2929 2017-10-17 Yao Qi <yao.qi@linaro.org>
2931 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2932 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2933 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2934 (arch-i386.o, arch-amd64.o): Remove rules.
2935 (arch/%.o): New rule.
2936 Update POSTCOMPILE and COMPILE.pre.
2937 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2938 * configure: Re-generated.
2939 * configure.srv: Replace arch-i386.o with arch/i386.o.
2940 Replace arch-amd64.o with arch/amd64.o.
2942 2017-10-16 Yao Qi <yao.qi@linaro.org>
2944 * configure: Regenerated.
2946 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2948 * inferiors.h: (struct inferior_list): Remove.
2949 (struct inferior_list_entry); Remove.
2950 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2951 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2952 get_first_inferior): Remove.
2953 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2954 find_inferior_id, find_inferior_in_random): Change signature.
2955 * inferiors.c (all_threads): Change type to
2956 std::list<thread_info *>.
2957 (get_thread): Remove macro.
2958 (find_inferior, find_inferior_id): Change signature, implement
2960 (find_inferior_in_random): Change signature, implement using
2961 find_thread_in_random.
2962 (for_each_inferior, for_each_inferior_with_data): Change
2963 signature, implement using for_each_thread.
2964 (add_inferior_to_list, remove_inferior): Remove.
2965 (add_thread, get_first_thread, thread_of_pid,
2966 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2967 (get_first_inferior, one_inferior_p, clear_inferior_list):
2969 (clear_inferiors, get_thread_process): Update.
2970 * gdbthread.h: Include <list>.
2971 (struct thread_info) <entry>: Remove field.
2973 (all_threads): Change type to std::list<thread_info *>.
2974 (get_first_inferior): Add doc.
2975 (find_thread, for_each_thread, find_thread_in_random): New
2977 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2978 * linux-arm-low.c (update_registers_callback): Update.
2979 * linux-low.c (second_thread_of_pid_p): Update.
2980 (kill_one_lwp_callback, linux_detach_lwp_callback,
2981 delete_lwp_callback, status_pending_p_callback, same_lwp,
2982 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2983 iterate_over_lwps, not_stopped_callback,
2984 resume_stopped_resumed_lwps, count_events_callback,
2985 select_singlestep_lwp_callback, select_event_lwp_callback,
2986 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2987 suspend_and_send_sigstop_callback, wait_for_sigstop,
2988 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2989 lwp_running, linux_set_resume_request, resume_status_pending_p,
2990 need_step_over_p, start_step_over, linux_resume_one_thread,
2991 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2992 reset_lwp_ptrace_options_callback): Update.
2993 * linux-mips-low.c (update_watch_registers_callback): Update.
2994 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2996 (free_register_cache_thread_one): Remove.
2997 (regcache_release): Update.
2998 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2999 handle_qxfer_threads_worker): Update.
3000 (handle_query): Update, use list iterator.
3001 (visit_actioned_threads, handle_pending_status,
3002 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3003 clear_pending_status_callback, set_pending_status_callback,
3004 find_status_pending_thread_callback, handle_status,
3005 process_serial_event): Update.
3006 * target.c (thread_search_callback): Update.
3007 * thread-db.c (thread_db_get_tls_address): Update.
3008 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3010 * win32-i386-low.c (update_debug_registers_callback): Update.
3011 * win32-low.c (delete_thread_info, child_delete_thread,
3012 continue_one_thread, suspend_one_thread,
3013 get_child_debug_event): Adjust.
3015 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3017 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3018 * inferiors.h: Include <list>.
3019 (struct process_info) <entry>: Remove field.
3021 (pid_of): Change macro to function.
3022 (ptid_of, lwpid_of): Remove macro.
3023 (all_processes): Change type to std::list<process_info *>.
3024 (ALL_PROCESSES): Remove macro.
3025 (for_each_process, find_process): New function.
3026 * inferiors.c (all_processes): Change type to
3027 std::list<process_info *>.
3028 (find_thread_process): Adjust.
3029 (add_process): Likewise.
3030 (remove_process): Likewise.
3031 (find_process_pid): Likewise.
3032 (get_first_process): Likewise.
3033 (started_inferior_callback): Remove.
3034 (have_started_inferiors_p): Adjust.
3035 (attached_inferior_callback): Remove.
3036 (have_attached_inferiors_p): Adjust.
3037 * linux-low.c (check_zombie_leaders): Likewise.
3038 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3039 (x86_linux_update_xmltarget): Adjust.
3040 * server.c (handle_query): Likewise.
3041 (gdb_reattached_process): Remove.
3042 (handle_status): Adjust.
3043 (kill_inferior_callback): Likewise.
3044 (detach_or_kill_inferior): Remove.
3045 (print_started_pid): Likewise.
3046 (print_attached_pid): Likewise.
3047 (detach_or_kill_for_exit): Update.
3048 (process_serial_event): Likewise.
3049 * linux-arm-low.c (arm_new_fork): Likewise.
3051 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3053 * dll.h: Include <list>.
3054 (struct dll_info): Add constructor.
3055 <entry>: Remove field.
3056 (all_dlls): Change type to std::list<dll_info>.
3057 * dll.c: Include <algorithm>.
3058 (get_dll): Remove macro.
3059 (all_dlls): Change type to std::list<dll_info *>.
3060 (free_one_dll): Remove.
3061 (match_dll): Likewise.
3062 (loaded_dll): Adjust.
3063 (unloaded_dll): Adjust to all_dlls type change, use
3064 std::find_if. Inline code from match_dll.
3065 (clear_dlls): Adjust to all_dlls type change.
3066 * server.c (emit_dll_description): Remove.
3067 (handle_qxfer_libraries): Adjust to all_dlls type change,
3068 integrate emit_dll_description's functionality.
3070 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3072 * linux-low.h (struct linux_target_ops) <delete_process>: New
3074 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3075 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3076 (struct linux_target_ops): Add delete_process callback.
3077 * linux-arm-low.c (arm_delete_process): New.
3078 (struct linux_target_ops): Add delete_process callback.
3079 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3080 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3081 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3082 * linux-mips-low.c (mips_linux_delete_process): New.
3083 (struct linux_target_ops): Add delete_process callback.
3084 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3085 * linux-s390-low.c (struct linux_target_ops): Likewise.
3086 * linux-sh-low.c (struct linux_target_ops): Likewise.
3087 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3088 * linux-tile-low.c (struct linux_target_ops): Likewise.
3089 * linux-x86-low.c (x86_linux_delete_process): New.
3090 (struct linux_target_ops): Add delete_process callback.
3091 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3093 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3095 * linux-aarch64-low.c (the_low_target): Add thread delete
3097 * linux-arm-low.c (arm_delete_thread): New function.
3098 (the_low_target): Add thread delete callback.
3099 * linux-bfin-low.c (the_low_target): Likewise.
3100 * linux-crisv32-low.c (the_low_target): Likewise.
3101 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3103 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3105 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3106 * linux-mips-low.c (mips_linux_delete_thread): New function.
3107 (the_low_target): Add thread delete callback.
3108 * linux-ppc-low.c (the_low_target): Likewise.
3109 * linux-s390-low.c (the_low_target): Likewise.
3110 * linux-sh-low.c (the_low_target): Likewise.
3111 * linux-tic6x-low.c (the_low_target): Likewise.
3112 * linux-tile-low.c (the_low_target): Likewise.
3113 * linux-x86-low.c (the_low_target): Likewise.
3114 * linux-xtensa-low.c (the_low_target): Likewise.
3116 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3118 * win32-low.c: Include "common-inferior.h".
3120 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3122 * inferiors.c (set_inferior_cwd): New function.
3123 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3124 (handle_query): Inform that QSetWorkingDir is supported.
3125 * win32-low.c (create_process): Pass the inferior's cwd to
3128 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3130 * inferiors.c (current_inferior_cwd): New global variable.
3131 (get_inferior_cwd): New function.
3132 * inferiors.h (struct process_info) <cwd>: New field.
3134 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3136 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3137 (OBS): Add gdb_tilde_expand.o.
3139 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3141 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3142 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3144 2017-09-29 Pedro Alves <palves@redhat.com>
3146 * ax.c (gdb_parse_agent_expr): Constify.
3147 * ax.h (gdb_parse_agent_expr): Constify.
3148 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3150 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3151 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3152 * remote-utils.h (read_ptid): Constify.
3153 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3154 (process_point_options, process_serial_event): Constify.
3155 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3156 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3157 (cmd_qtbuffer): Constify.
3159 2017-09-29 Pedro Alves <palves@redhat.com>
3161 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3164 2017-09-29 Pedro Alves <palves@redhat.com>
3166 * linux-low.c (handle_extended_wait): Pass parent thread instead
3167 of process to thread_db_notice_clone.
3168 * linux-low.h (thread_db_notice_clone): Replace parent process
3169 parameter with parent thread parameter.
3170 * thread-db.c (find_one_thread): Add comment.
3171 (thread_db_notice_clone): Replace parent process parameter with
3172 parent thread parameter. Temporarily switch to the parent thread.
3174 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3176 * gdbthread.h: Include "common-gdbthread.h".
3177 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3178 "if" when validating the ptid.
3179 * remote-utils.c: Include "gdbthread.h".
3180 (prepare_resume_reply): Use "switch_to_thread".
3181 * target.c (done_accessing_memory): Likewise.
3183 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3185 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3186 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3187 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3188 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3189 s390x-gs-linux64-ipa.o to ipa_obj.
3190 * linux-s390-low.c (HWCAP_S390_GS): New define.
3191 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3193 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3194 (s390_arch_setup): Check for guarded-storage support and choose
3196 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3197 init_registers_s390x_gs_linux64.
3198 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3200 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3201 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3203 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3205 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3207 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3209 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3210 (thread_db_thread_handle): Declare.
3211 * linux-low.c (linux_target_ops): Initialize thread_handle.
3212 * server.c (handle_qxfer_threads_worker): Add support for
3214 * target.h (struct target_ops): Add new function pointer,
3216 (target_thread_handle): Define.
3217 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3219 (thread_db_thread_handle): New function.
3221 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3223 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3224 * linux-low.h (thread_db_notice_clone): Declare.
3225 * thread-db.c (thread_db_notice_clone): New function.
3227 2017-09-21 Pedro Alves <palves@redhat.com>
3229 * server.c (gdb_read_memory, handle_status, process_serial_event)
3230 (handle_serial_event, handle_target_event): Adjust to
3231 set_desired_thread prototype change.
3232 * target.c (set_desired_thread): Remove 'use_general' parameter
3234 * target.h (set_desired_thread): Remove 'use_general' parameter.
3236 2017-09-20 Tom Tromey <tom@tromey.com>
3238 * target.c (target_terminal::terminal_state): Define.
3239 (target_terminal::init): Rename from target_terminal_init.
3240 (target_terminal::inferior): Rename from
3241 target_terminal_inferior.
3242 (target_terminal::ours): Rename from target_terminal_ours.
3243 (target_terminal::ours_for_output, target_terminal::info): New.
3245 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3247 * server.c (accumulate_file_name_length): Remove.
3248 (emit_dll_description): Adjust to std::string change.
3249 (handle_qxfer_libraries): Use std::string to hold document.
3251 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3253 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3254 return type of xml_escape_text.
3255 * server.c (emit_dll_description): Likewise.
3257 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3259 * server.c (captured_main): Accept argument for --selftest.
3260 Update run_tests call.
3261 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3262 when registering selftests.
3264 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3266 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3267 instead of "VEC" for "target_desc.reg_defs".
3268 (regcache_cpy): Likewise.
3269 (registers_to_string): Likewise.
3270 (registers_from_string): Likewise.
3271 (find_regno): Likewise.
3272 (supply_regblock): Likewise.
3273 (regcache_raw_read_unsigned): Likewise.
3274 * tdesc.c (init_target_desc): Likewise.
3275 (tdesc_create_reg): Likewise.
3276 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3277 (struct target_desc) <reg_defs>: Convert to "std::vector".
3278 (target_desc): Do not initialize "reg_defs".
3279 (~target_desc): Update code to use "std::vector" instead of "VEC"
3280 for "target_desc.reg_defs".
3281 (operator==): Likewise.
3283 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3285 * inferiors.h (thread_to_gdb_id): Remove.
3286 * inferiors.c (thread_to_gdb_id): Remove.
3287 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3288 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3289 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3291 * nto-low.c (nto_fetch_registers, nto_store_registers,
3292 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3294 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3296 * inferiors.h (gdb_id_to_thread_id): Remove.
3297 * inferiors.c (gdb_id_to_thread_id): Remove.
3298 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3299 removal. Move pid declaration closer to where it's used.
3301 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3303 * server.c (handle_detach): New function.
3304 (process_serial_event): Move code out, call handle_detach.
3306 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3308 * server.c (require_running): Rename to ...
3309 (require_running_or_return): ... this ...
3310 (require_running_or_break): ... and this.
3311 (handle_query, process_serial_event): Adjust.
3313 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3315 * linux-low.c (linux_set_resume_request): Remove unused
3318 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3320 * server.c (first_thread_of): Remove.
3321 (process_serial_event): Replace usage of first_thread_of with
3322 find_any_thread_of_pid.
3323 * tracepoint.c (same_process_p): Remove.
3324 (gdb_agent_about_to_close): Replace usage of same_process_p with
3325 find_any_thread_of_pid.
3326 * linux-x86-low.c (same_process_callback): Remove.
3327 (x86_arch_setup_process_callback): Replace usage of
3328 same_process_callback with find_any_thread_of_pid.
3329 * thread-db.c (any_thread_of): Remove.
3330 (switch_to_process): Replace usage of any_thread_of with
3331 find_any_thread_of_pid.
3332 * inferiors.c (thread_pid_matches_callback): Remove.
3333 (find_thread_process): Adjust to use find_any_thread_of_pid.
3335 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3337 * regcache.c (get_thread_regcache): Guard calls to "memset"
3340 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3342 * linux-low.c (handle_extended_wait): Use
3343 "allocate_target_description" instead of "XNEW".
3344 * linux-x86-low.c (initialize_low_arch): Likewise.
3346 2017-09-05 Yao Qi <yao.qi@linaro.org>
3348 * configure.srv (srv_i386_regobj): Remove.
3349 (srv_amd64_regobj): Remove.
3350 (srv_regobj): Set it to "" for x86 non-linux targets.
3351 * linux-x86-tdesc.c (i386_linux_read_description):
3352 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3353 (init_registers_i386): Remove the declaration.
3354 (tdesc_i386): Remove the declaration.
3355 (lynx_i386_arch_setup): Call i386_create_target_description.
3356 * nto-x86-low.c: Likewise.
3357 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3358 [!__x86_64__]: include arch/i386.h.
3359 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3361 2017-09-05 Yao Qi <yao.qi@linaro.org>
3363 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3364 i386/amd64-XXX-linux from it.
3366 2017-09-05 Yao Qi <yao.qi@linaro.org>
3368 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3370 (ipa_amd64_linux_regobj): Remove.
3371 (ipa_x32_linux_regobj): Remove.
3373 2017-09-05 Yao Qi <yao.qi@linaro.org>
3375 * Makefile.in (arch-amd64.o): New rule.
3376 * configure.srv: Append arch-amd64.o.
3377 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3378 (get_ipa_tdesc): Call amd64_linux_read_description.
3379 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3380 and init_registers_amd64_XXX.
3381 * linux-x86-low.c (x86_linux_read_description): Call
3382 amd64_linux_read_description.
3383 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3384 (initialize_low_arch): Don't call init_registers_x32_XXX and
3385 init_registers_amd64_XXX.
3386 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3387 and tdesc_amd64_XXX.
3388 [__x86_64__] (amd64_tdesc_test): New function.
3389 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3390 and init_registers_amd64_XXX.
3391 * linux-x86-tdesc.c: Include arch/amd64.h.
3392 (xcr0_to_tdesc_idx): New function.
3393 (i386_linux_read_description): New function.
3394 (amd64_get_ipa_tdesc_idx): New function.
3395 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3396 (amd64_get_ipa_tdesc): Declare.
3398 2017-09-05 Yao Qi <yao.qi@linaro.org>
3400 * configure.srv (srv_i386_linux_xmlfiles): Remove
3401 i386/i386-XXX-linux.xml from it.
3403 2017-09-05 Yao Qi <yao.qi@linaro.org>
3405 * configure.srv: Set srv_i386_linux_regobj empty if $development
3407 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3408 initialize_low_tdesc.
3409 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3410 with #if initialize_low_tdesc.
3411 * linux-x86-tdesc-selftest.c: New file.
3412 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3414 2017-09-05 Yao Qi <yao.qi@linaro.org>
3416 * Makefile.in (arch-i386.o): New rule.
3417 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3418 (x86_64-*-linux*): Likewise.
3419 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3420 include arch/i386.h.
3421 (i386_linux_read_description): Remove code and call
3422 i386_create_target_description.
3423 * tdesc.c (allocate_target_description): New function.
3424 * tdesc.h (set_tdesc_architecture): Remove declaration.
3425 (set_tdesc_osabi): Likewise.
3427 2017-09-05 Yao Qi <yao.qi@linaro.org>
3429 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3430 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3431 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3433 * server.c (get_features_xml): Call tdesc_get_features_xml.
3434 * tdesc.c (set_tdesc_architecture): New function.
3435 (set_tdesc_osabi): New function.
3436 (tdesc_get_features_xml): New function.
3437 (tdesc_create_feature): Add an argument.
3438 * tdesc.h (struct target_desc) <features>: New field.
3439 <arch, osabi>: New field.
3440 (~target_desc): xfree features, arch, and osabi.
3441 (target_desc::oerator==): Don't compare .xmltarget.
3442 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3443 (set_tdesc_osabi): Likewise.
3444 (tdesc_get_features_xml): Likewise.
3446 2017-09-05 Yao Qi <yao.qi@linaro.org>
3448 * linux-x86-tdesc.c: Include selftest.h.
3449 (i386_tdesc_test): New function.
3450 (initialize_low_tdesc): Call selftests::register_test.
3451 * tdesc.h: Include regdef.h.
3452 (target_desc): Override operator == and !=.
3454 2017-09-05 Yao Qi <yao.qi@linaro.org>
3456 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3457 (ipa_obj): Likewise.
3458 * linux-i386-ipa.c: Include common/x86-xstate.h
3459 (get_ipa_tdesc): Call i386_linux_read_description.
3460 (initialize_low_tracepoint): Don't call init_registers_XXX
3461 functions, call initialize_low_tdesc instead.
3462 * linux-x86-low.c (x86_linux_read_description): Call
3463 i386_linux_read_description.
3464 (initialize_low_arch): Don't call init_registers_i386_XXX
3465 functions, call initialize_low_tdesc.
3466 * linux-x86-tdesc.c: New file.
3467 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3468 (i386_get_ipa_tdesc_idx): Declare.
3469 (i386_get_ipa_tdesc): Declare.
3470 (initialize_low_tdesc): Declare.
3472 2017-09-05 Yao Qi <yao.qi@linaro.org>
3474 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3477 2017-09-05 Yao Qi <yao.qi@linaro.org>
3479 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3480 * regcache.c (get_thread_regcache): Use VEC_length.
3481 (init_register_cache): Likewise.
3482 (regcache_cpy): Likewise.
3483 (registers_to_string): Iterate reg_defs via VEC_iterate.
3484 (find_regno): Likewise.
3485 (find_register_by_number): Use VEC_index.
3486 (register_size): Call find_register_by_number.
3487 (register_data): Call find_register_by_number.
3488 (supply_regblock): Use VEC_length.
3489 (regcache_raw_read_unsigned): Likewise.
3490 * tdesc.c (init_target_desc): Iterate reg_defs via
3492 (default_description): Update initializer.
3493 (copy_target_description): Don't update field num_registers.
3494 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3495 <num_registers>: Remove.
3497 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3499 * Makefile.in (.SECONDARY): Define target.
3501 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3503 * linux-low.c (linux_wait_1): Adjust.
3504 * server.c (queue_stop_reply_callback): Adjust.
3506 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3508 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3509 QEnvironmentUnset and QEnvironmentReset packets.
3510 (handle_query): Inform remote that QEnvironmentHexEncoded,
3511 QEnvironmentUnset and QEnvironmentReset are supported.
3513 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3515 * inferiors.h (inferior_target_data): Rename to ...
3516 (thread_target_data): ... this.
3517 (inferior_regcache_data): Rename to ...
3518 (thread_regcache_data): ... this.
3519 (set_inferior_regcache_data): Rename to ...
3520 (set_thread_regcache_data): ... this.
3521 * inferiors.c (inferior_target_data): Rename to ...
3522 (thread_target_data): ... this.
3523 (inferior_regcache_data): Rename to ...
3524 (thread_regcache_data): ... this.
3525 (set_inferior_regcache_data): Rename to ...
3526 (set_thread_regcache_data): ... this.
3527 (free_one_thread): Update.
3528 * linux-low.h (get_thread_lwp): Update.
3529 * regcache.c (get_thread_regcache): Update.
3530 (regcache_invalidate_thread): Update.
3531 (free_register_cache_thread): Update.
3532 * win32-i386-low.c (update_debug_registers_callback): Update.
3533 (win32_get_current_dr): Update.
3534 * win32-low.c (thread_rec): Update.
3535 (delete_thread_info): Update.
3536 (continue_one_thread): Update.
3537 (suspend_one_thread): Update.
3539 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3541 * inferiors.c (set_inferior_target_data): Remove.
3542 * inferiors.h (set_inferior_target_data): Remove.
3544 2017-08-18 Yao Qi <yao.qi@linaro.org>
3546 * Makefile.in (OBS): Add selftest.o.
3547 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3548 * configure, config.in: Re-generated.
3549 * server.c: Include common/sefltest.h.
3550 (captured_main): Handle option --selftest.
3552 2017-08-09 Yao Qi <yao.qi@linaro.org>
3554 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3555 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3556 i386-avx-mpx.o and i386-mmx.o.
3557 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3558 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3559 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3560 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3561 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3562 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3563 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3564 i386/amd64-avx-mpx.xml.
3566 2017-08-09 Yao Qi <yao.qi@linaro.org>
3568 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3569 and x32-avx-avx512.o.
3570 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3571 i386/x32-avx-avx512.xml.
3573 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3575 * tracepoint.h (enum class fast_tpoint_collect_result): New
3577 (fast_tracepoint_collecting): Change return type to
3578 fast_tpoint_collect_result.
3579 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3580 * linux-low.h: Include tracepoint.h.
3581 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3582 fast_tpoint_collect_result.
3583 * linux-low.c (handle_tracepoints): Adjust.
3584 (linux_fast_tracepoint_collecting): Change return type to
3585 fast_tpoint_collect_result.
3586 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3587 linux_wait_1, stuck_in_jump_pad_callback,
3588 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3589 proceed_one_lwp): Adjust to type change.
3591 2017-07-10 Yao Qi <yao.qi@linaro.org>
3593 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3595 2017-06-29 Yao Qi <yao.qi@linaro.org>
3597 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3599 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3601 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3603 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3605 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3607 * linux-low.c (linux_create_inferior): Adjust code to access the
3608 environment information via 'gdb_environ' class.
3609 * lynx-low.c (lynx_create_inferior): Likewise.
3610 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3611 (get_environ): Return a pointer to 'our_environ'.
3612 (captured_main): Initialize 'our_environ'.
3613 * server.h (get_environ): Adjust prototype.
3614 * spu-low.c (spu_create_inferior): Adjust code to access the
3615 environment information via 'gdb_environ' class.
3617 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3619 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3620 usage of "register" keyword.
3622 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3624 * configure: Re-generate.
3626 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3628 * configure: Re-generate.
3630 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3632 * Makefile.in (COMPILE.pre): Add "-x c++".
3634 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3636 * fork-child.c: Conditionally include <signal.h>.
3638 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3640 * server.c (handle_general_set): Handle new packet
3641 "QStartupWithShell".
3642 (handle_query): Add "QStartupWithShell" to the list of supported
3644 (gdbserver_usage): Add help text explaining the
3645 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3647 (captured_main): Recognize and act upon the presence of the new
3650 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3651 Pedro Alves <palves@redhat.com>
3653 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3654 * configure: Regenerate.
3655 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3657 (i[34567]86-*-lynxos*): Likewise.
3658 (spu*-*-*): Likewise.
3659 * fork-child.c: New file.
3660 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3662 (linux_ptrace_fun): New function.
3663 (linux_create_inferior): Adjust function prototype to reflect
3664 change on "target.h". Adjust function code to use
3666 (linux_request_interrupt): Delete "signal_pid".
3667 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3668 (lynx_ptrace_fun): New function.
3669 (lynx_create_inferior): Adjust function prototype to reflect
3670 change on "target.h". Adjust function code to use
3672 * nto-low.c (nto_create_inferior): Adjust function prototype and
3673 code to reflect change on "target.h". Update comments.
3674 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3675 "common-terminal.h" and "environ.h".
3676 (terminal_fd): Moved to fork-child.c.
3677 (old_foreground_pgrp): Likewise.
3678 (restore_old_foreground_pgrp): Likewise.
3679 (last_status): Make it global.
3680 (last_ptid): Likewise.
3681 (our_environ): New variable.
3682 (startup_with_shell): Likewise.
3683 (program_name): Likewise.
3684 (program_argv): Rename to...
3685 (program_args): ...this.
3686 (wrapper_argv): New variable.
3687 (start_inferior): Delete function.
3688 (get_exec_wrapper): New function.
3689 (get_exec_file): Likewise.
3690 (get_environ): Likewise.
3691 (prefork_hook): Likewise.
3692 (post_fork_inferior): Likewise.
3693 (postfork_hook): Likewise.
3694 (postfork_child_hook): Likewise.
3695 (handle_v_run): Update code to deal with arguments coming from the
3696 remote host. Update calls from "start_inferior" to
3698 (captured_main): Likewise. Initialize environment variable. Call
3700 * server.h (post_fork_inferior): New prototype.
3701 (get_environ): Likewise.
3702 (last_status): Declare.
3703 (last_ptid): Likewise.
3704 (signal_pid): Likewise.
3705 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3706 (spu_ptrace_fun): New function.
3707 (spu_create_inferior): Adjust function prototype to reflect change
3708 on "target.h". Adjust function code to use "fork_inferior".
3709 * target.c (target_terminal_init): New function.
3710 (target_terminal_inferior): Likewise.
3711 (target_terminal_ours): Likewise.
3712 * target.h: Include <vector>.
3713 (struct target_ops) <create_inferior>: Update prototype.
3714 (create_inferior): Update macro.
3715 * utils.c (gdb_flush_out_err): New function.
3716 * win32-low.c (win32_create_inferior): Adjust function prototype
3717 and code to reflect change on "target.h".
3719 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3721 * inferiors.c (switch_to_thread): New function.
3723 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3725 * Makefile.in (SFILE): Add "common/job-control.c".
3726 (OBS): Add "job-control.o".
3728 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3730 * Makefile: Remove "@host_makefile_frag@".
3732 2017-05-05 Pedro Alves <palves@redhat.com>
3734 * configure: Regenerate.
3736 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3738 * configure: Regenerate.
3740 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3742 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3743 software_single_step change of return type to
3744 std::vector<CORE_ADDR>.
3745 * linux-low.c (install_software_single_step_breakpoints):
3747 * linux-low.h (install_software_single_step_breakpoints):
3750 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3752 * remote-utils.c: Include "gdb_termios.h" instead of
3754 * terminal.h: Delete file.
3756 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3758 * server.c: Include <vector>.
3759 <program_argv, wrapper_argv>: Convert to std::vector.
3760 (start_inferior): Rewrite function to use C++.
3761 (handle_v_run): Likewise. Update code that calculates the argv
3762 based on the vRun packet; use C++.
3763 (captured_main): Likewise.
3765 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3767 * server.c (handle_v_cont): Initialize thread_resume::thread
3770 2017-04-05 Pedro Alves <palves@redhat.com>
3772 * configure: Regenerate.
3774 2017-04-05 Pedro Alves <palves@redhat.com>
3776 * gdbreplay.c (sync_error): Constify.
3777 * linux-x86-low.c (push_opcode): Constify.
3779 2017-04-05 Pedro Alves <palves@redhat.com>
3781 * win32-low.c (get_child_debug_event)
3782 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3783 Report TARGET_WAITKIND_SPURIOUS instead.
3785 2017-04-05 Pedro Alves <palves@redhat.com>
3787 * remote-utils.c (remote_prepare, remote_open): Constify.
3788 * remote-utils.h (remote_prepare, remote_open): Constify.
3789 * server.c (captured_main): Constify 'port' handling.
3791 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3793 * Makefile.in (clean): Clear .deps.
3795 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3797 * .gitignore: Remove generated files, replace with wildcard.
3798 * (clean): Replace removal of generated files with wildcard.
3799 (version.c): Replace with...
3800 (version-generated.c): ...this.
3801 (xml-builtin.c): Replace with...
3802 (xml-builtin-generated.c): ...this.
3803 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3804 (%.c: *regformats*): Replace with...
3805 (%-generated.c: *regformats*): ...this.
3807 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3809 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3810 (xtensa_fill_gregset): Call collect_register_by_name for
3812 (xtensa_store_gregset): Call supply_register_by_name for
3815 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3817 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3818 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3819 (xtensa_store_gregset): Call supply_register for all registers in
3820 a0_regnum..a0_regnum + C0_NREGS range.
3822 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3824 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3825 (ax-ipa.o: ax.c): Remove.
3826 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3827 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3828 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3829 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3830 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3832 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3834 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3835 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3836 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3837 (errors-ipa.o: ../common/errors.c): Remove.
3838 (format-ipa.o: ../common/format.c): Remove.
3839 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3841 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3843 * Makefile.in (%-ipa.o: %.c): New rule.
3844 (tracepoint-ipa.o: tracepoint.c): Remove.
3845 (utils-ipa.o: utils.c): Remove.
3846 (remote-utils-ipa.o: remote-utils.c): Remove.
3847 (regcache-ipa.o: regcache.c): Remove.
3848 (i386-linux-ipa.o: i386-linux.c): Remove.
3849 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3850 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3851 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3852 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3853 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3854 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3855 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3856 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3857 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3858 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3859 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3860 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3861 (aarch64-ipa.o: aarch64.c): Remove.
3862 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3863 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3864 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3865 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3866 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3867 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3868 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3869 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3870 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3871 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3872 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3873 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3874 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3875 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3876 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3877 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3878 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3879 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3880 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3881 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3882 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3883 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3884 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3885 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3886 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3887 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3888 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3889 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3890 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3891 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3892 (tdesc-ipa.o: tdesc.c): Remove.
3893 (x32-linux-ipa.o: x32-linux.c): Remove.
3894 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3895 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3897 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3899 * Makefile.in (%.o: ../arch/%.c): New rule.
3900 (arm.o: ../arch/arm.c): Remove.
3901 (arm-linux.o: ../arch/arm-linux.c): Remove.
3902 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3903 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3905 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3907 * Makefile.in (%.o: ../nat/%.c): New rule.
3908 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3909 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3910 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3911 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3912 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3913 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3914 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3915 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3916 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3917 (linux-personality.o: ../nat/linux-personality.c): Remove.
3918 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3919 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3920 (x86-linux.o: ../nat/x86-linux.c): Remove.
3921 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3922 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3924 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3926 * Makefile.in (%.o: ../common/%.c): New rule.
3927 (signals.o: ../common/signals.c): Remove.
3928 (print-utils.o: ../common/print-utils.c): Remove.
3929 (rsp-low.o: ../common/rsp-low.c): Remove.
3930 (common-utils.o: ../common/common-utils.c): Remove.
3931 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3932 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3933 (vec.o: ../common/vec.c): Remove.
3934 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3935 (xml-utils.o: ../common/xml-utils.c): Remove.
3936 (ptid.o: ../common/ptid.c): Remove.
3937 (buffer.o: ../common/buffer.c): Remove.
3938 (format.o: ../common/format.c): Remove.
3939 (filestuff.o: ../common/filestuff.c): Remove.
3940 (agent.o: ../common/agent.c): Remove.
3941 (errors.o: ../common/errors.c): Remove.
3942 (environ.o: ../common/environ.c): Remove.
3943 (common-debug.o: ../common/common-debug.c): Remove.
3944 (cleanups.o: ../common/cleanups.c): Remove.
3945 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3946 (fileio.o: ../common/fileio.c): Remove.
3947 (common-regcache.o: ../common/common-regcache.c): Remove.
3948 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3949 (new-op.o: ../common/new-op.c): Remove.
3950 (btrace-common.o: ../common/btrace-common.c): Remove.
3952 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3954 * Makefile.in (%.o: ../target/%.c): New rule.
3955 (waitstatus.o: ../target/waitstatus.c): Remove.
3957 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3960 (%.c: ../regformats/%.dat,
3961 (%.c: ../regformats/arm/%.dat,
3962 (%.c: ../regformats/i386/%.dat,
3963 (%.c: ../regformats/rs6000/%.dat): New rules.
3964 (aarch64.c): Remove.
3965 (reg-arm.c): Remove.
3966 (arm-with-iwmmxt.c): Remove.
3967 (arm-with-vfpv2.c): Remove.
3968 (arm-with-vfpv3.c): Remove.
3969 (arm-with-neon.c): Remove.
3970 (reg-bfin.c): Remove.
3971 (reg-cris.c): Remove.
3972 (reg-crisv32.c): Remove.
3974 (i386-linux.c): Remove.
3975 (i386-avx.c): Remove.
3976 (i386-avx-linux.c): Remove.
3977 (i386-avx-avx512.c): Remove.
3978 (i386-avx-avx512-linux.c): Remove.
3979 (i386-mpx.c): Remove.
3980 (i386-mpx-linux.c): Remove.
3981 (i386-avx-mpx-avx512-pku.c): Remove.
3982 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3983 (i386-avx-mpx.c): Remove.
3984 (i386-avx-mpx-linux.c): Remove.
3985 (i386-mmx.c): Remove.
3986 (i386-mmx-linux.c): Remove.
3987 (reg-ia64.c): Remove.
3988 (reg-m32r.c): Remove.
3989 (reg-m68k.c): Remove.
3991 (mips-linux.c): Remove.
3992 (mips-dsp-linux.c): Remove.
3993 (mips64-linux.c): Remove.
3994 (mips64-dsp-linux.c): Remove.
3995 (nios2-linux.c): Remove.
3996 (powerpc-32.c): Remove.
3997 (powerpc-32l.c): Remove.
3998 (powerpc-altivec32l.c): Remove.
3999 (powerpc-cell32l.c): Remove.
4000 (powerpc-vsx32l.c): Remove.
4001 (powerpc-isa205-32l.c): Remove.
4002 (powerpc-isa205-altivec32l.c): Remove.
4003 (powerpc-isa205-vsx32l.c): Remove.
4004 (powerpc-e500l.c): Remove.
4005 (powerpc-64l.c): Remove.
4006 (powerpc-altivec64l.c): Remove.
4007 (powerpc-cell64l.c): Remove.
4008 (powerpc-vsx64l.c): Remove.
4009 (powerpc-isa205-64l.c): Remove.
4010 (powerpc-isa205-altivec64l.c): Remove.
4011 (powerpc-isa205-vsx64l.c): Remove.
4012 (s390-linux32.c): Remove.
4013 (s390-linux32v1.c): Remove.
4014 (s390-linux32v2.c): Remove.
4015 (s390-linux64.c): Remove.
4016 (s390-linux64v1.c): Remove.
4017 (s390-linux64v2.c): Remove.
4018 (s390-te-linux64.c): Remove.
4019 (s390-vx-linux64.c): Remove.
4020 (s390-tevx-linux64.c): Remove.
4021 (s390x-linux64.c): Remove.
4022 (s390x-linux64v1.c): Remove.
4023 (s390x-linux64v2.c): Remove.
4024 (s390x-te-linux64.c): Remove.
4025 (s390x-vx-linux64.c): Remove.
4026 (s390x-tevx-linux64.c): Remove.
4027 (tic6x-c64xp-linux.c): Remove.
4028 (tic6x-c64x-linux.c): Remove.
4029 (tic6x-c62x-linux.c): Remove.
4031 (reg-sparc64.c): Remove.
4032 (reg-spu.c): Remove.
4034 (amd64-linux.c): Remove.
4035 (amd64-avx.c): Remove.
4036 (amd64-avx-linux.c): Remove.
4037 (amd64-avx-avx512.c): Remove.
4038 (amd64-avx-avx512-linux.c): Remove.
4039 (amd64-mpx.c): Remove.
4040 (amd64-mpx-linux.c): Remove.
4041 (amd64-avx-mpx-avx512-pku.c): Remove.
4042 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4043 (amd64-avx-mpx.c): Remove.
4044 (amd64-avx-mpx-linux.c): Remove.
4046 (x32-linux.c): Remove.
4047 (x32-avx.c): Remove.
4048 (x32-avx-linux.c): Remove.
4049 (x32-avx-avx512.c): Remove.
4050 (x32-avx-avx512-linux.c): Remove.
4051 (reg-xtensa.c): Remove.
4052 (reg-tilegx.c): Remove.
4053 (reg-tilegx32.c): Remove.
4055 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4057 * Makefile.in (SFILES): Add "common/environ.c".
4058 (OBJS): Add "common/environ.h".
4060 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4062 * configure.ac: Check if the fs_base and gs_base members of
4063 `struct user_regs_struct' exist.
4064 * config.in: Regenerated.
4065 * configure: Likewise.
4067 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4069 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4071 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4072 (get_next_pcs_syscall_next_pc): Likewise.
4074 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4076 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4077 * nto-x86-low.c: Likewise.
4079 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4081 * Makefile.in: Include disable-implicit-rules.mk.
4083 2016-11-23 Pedro Alves <palves@redhat.com>
4085 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4086 (debug_vprintf): Use std::chrono::steady_clock instead of
4087 gettimeofday. Use '.' instead of ':'.
4088 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4089 (get_timestamp): Use std::chrono::steady_clock instead of
4092 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4094 * Makefile.in: Fix whitespace formatting.
4096 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4098 * Makefile.in (SFILES, OBS): Flatten list and order
4101 2016-11-23 Pedro Alves <palves@redhat.com>
4103 * event-loop.c (handle_file_event): Use warning.
4104 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4105 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4108 2016-11-23 Pedro Alves <palves@redhat.com>
4110 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4112 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4113 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4114 debug_printf and debug_flush for debug output.
4115 * server.c (handle_general_set): Likewise.
4116 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4119 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4121 * Makefile.in (.c.o): Replace rule with ...
4122 (%.o: %.c): ... this one.
4124 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4126 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4127 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4129 * configure.ac: Remove checks for the make program.
4130 * configure: Re-generate.
4132 2016-10-28 Pedro Alves <palves@redhat.com>
4134 * Makefile.in (CXX_DIALECT): Get from configure.
4135 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4136 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4137 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4138 * config.in: Regenerate.
4139 * configure: Regenerate.
4141 2016-10-27 Yao Qi <yao.qi@linaro.org>
4143 * linux-low.c (linux_supports_range_stepping): Return true if
4144 can_software_single_step return true.
4146 2016-10-27 Yao Qi <yao.qi@linaro.org>
4148 * inferiors.c (find_inferior_in_random): New function.
4149 * inferiors.h (find_inferior_in_random): Declare.
4150 * linux-low.c (linux_wait_for_event_filtered): Call
4151 find_inferior_in_random instead of find_inferior.
4153 2016-10-27 Yao Qi <yao.qi@linaro.org>
4155 * linux-low.c (linux_wait_1): If single-step breakpoints are
4156 inserted, remove them.
4158 2016-10-26 Pedro Alves <palves@redhat.com>
4160 * linux-low.c (handle_extended_wait): Link parent/child fork
4162 (linux_wait_1): Unlink them.
4163 (linux_set_resume_request): Ignore resume requests for
4164 already-resumed and unhandled fork child threads.
4165 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4166 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4168 (handle_v_requests) <vCont>: Don't call require_running.
4169 * server.h (in_queued_stop_replies): New declaration.
4171 2016-10-24 Yao Qi <yao.qi@linaro.org>
4174 * linux-aarch64-low.c (append_insns): Cast the return value to
4177 2016-10-10 Yao Qi <yao.qi@linaro.org>
4179 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4181 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4183 * target.c (target_supports_multi_process): New function, moved
4185 * target.h (target_supports_multi_process): ... here. Remove
4188 2016-10-05 Tom Tromey <tom@tromey.com>
4191 * tracepoint.c (handle_tracepoint_bkpts): Check
4192 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4194 2016-10-05 Yao Qi <yao.qi@linaro.org>
4196 * configure.srv: Update the path of arm-*.xml files.
4198 2016-10-05 Terry Guo <terry.guo@arm.com>
4199 Yao Qi <yao.qi@linaro.org>
4201 * Makefile.in: Adjust the path of rules.
4202 * configure.srv: Update the path of xml files.
4203 * regformats/arm-with-iwmmxt.dat: Regenerated.
4204 * regformats/arm-with-neon.dat: Likewise.
4205 * regformats/arm-with-vfpv2.dat: Likewise.
4206 * regformats/arm-with-vfpv3.dat Likewise.
4208 2016-09-30 Yao Qi <yao.qi@linaro.org>
4211 * target.c (target_stop_and_wait): Don't call
4212 target_continue_no_signal, use resume_stop instead.
4214 2016-09-26 Yao Qi <yao.qi@linaro.org>
4216 * linux-low.c (linux_wait_1): Call debug_exit.
4218 2016-09-23 Pedro Alves <palves@redhat.com>
4220 * Makefile.in (SFILES): Add common/new-op.c.
4221 (OBS): Add common/new-op.o.
4222 (new-op.o): New rule.
4224 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4226 * .gitinore: Ignore more files.
4228 2016-09-21 Yao Qi <yao.qi@linaro.org>
4230 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4233 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4235 * server.c (start_inferior): Call target_mourn_inferior instead of
4236 mourn_inferior; pass ptid_t argument to it.
4238 (handle_target_event): Likewise.
4239 * target.c (target_mourn_inferior): New function.
4240 * target.h (mourn_inferior): Delete macro.
4242 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4244 * linux-low.c (lwp_is_stepping): New function.
4246 2016-09-06 Carl Love <cel@us.ibm.com>
4248 * server.c (start_inferior): Fixed comment, requested comment change
4249 didn't get updated correctly. Removed reference to ptrace () call as
4250 it is only true on Linux systems.
4252 2016-09-06 Carl Love <cel@us.ibm.com>
4254 * server.c (start_inferior): Do not call
4255 function target_post_create_inferior () if the
4256 inferior process has already exited.
4258 2016-09-05 Pedro Alves <palves@redhat.com>
4260 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4261 (COMPILE.pre, CC_LD): Use CXX directly.
4262 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4263 * acinclude.m4: Don't include build-with-cxx.m4.
4264 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4265 * configure: Regenerate.
4267 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4270 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4271 call writing data to own_buf.
4273 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4275 * target.c (mywait): Call target_wait instead of
4277 (target_wait): New function.
4279 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4281 * server.c (start_inferior): New variable 'ptid'. Replace calls
4282 to the_target->resume by target_continue{,_no_signal}, depending
4284 * target.c (target_stop_and_wait): Call target_continue_no_signal
4285 instead of the_target->resume.
4286 (target_continue): New function.
4288 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4290 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4292 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4295 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4297 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4298 * linux-arm-low.c (ps_get_thread_area): Likewise.
4299 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4300 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4301 * linux-mips-low.c (ps_get_thread_area): Likewise.
4302 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4303 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4304 * linux-x86-low.c (ps_get_thread_area): Likewise.
4305 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4307 2016-08-19 Pedro Alves <palves@redhat.com>
4309 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4311 2016-08-19 Pedro Alves <palves@redhat.com>
4313 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4314 comment. Use memcpy instead of casting through unsigned long.
4316 2016-08-19 Pedro Alves <palves@redhat.com>
4318 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4319 allocating around 0x80000000.
4321 2016-08-19 Pedro Alves <palves@redhat.com>
4324 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4325 (x32-avx512-linux-ipa.o): New rules.
4326 * configure.ac (x86_64-*-linux*): New x32 check.
4327 * configure.srv (ipa_x32_linux_regobj): New.
4328 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4329 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4331 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4333 * configure: Regenerate.
4335 2016-08-09 Pedro Alves <palves@redhat.com>
4338 * Makefile.in (OBS): Add signals-state-save-restore.o.
4339 (signals-state-save-restore.o): New rule.
4340 * config.in: Regenerate.
4341 * configure: Regenerate.
4342 * linux-low.c: Include "signals-state-save-restore.h".
4343 (linux_create_inferior): Call
4344 restore_original_signals_state.
4345 * server.c: Include "dispositions-save-restore.h".
4346 (captured_main): Call save_original_signals_state.
4348 2016-08-05 Pedro Alves <palves@redhat.com>
4350 * configure: Regenerate.
4352 2016-08-04 Yao Qi <yao.qi@linaro.org>
4354 * linux-low.c (regsets_fetch_inferior_registers): Check
4355 errno is ESRCH or not.
4357 2016-08-02 Yao Qi <yao.qi@linaro.org>
4359 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4360 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4361 (thread_db_load_search): Update.
4362 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4363 td_ta_set_event and td_ta_event_getmsg.
4365 2016-07-26 Pedro Alves <palves@redhat.com>
4368 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4369 of unsigned long for 64-bit registers and use uint32_t instead of
4370 unsigned int for 32-bit registers.
4372 2016-07-26 Pedro Alves <palves@redhat.com>
4374 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4377 2016-07-21 Tom Tromey <tom@tromey.com>
4379 * configure: Rebuild.
4381 2016-07-21 Yao Qi <yao.qi@linaro.org>
4383 * mem-break.c (find_gdb_breakpoint): Cast bp to
4384 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4386 2016-07-21 Yao Qi <yao.qi@linaro.org>
4388 * server.c (handle_v_requests): Support s and S actions
4389 if target_supports_software_single_step return true.
4391 2016-07-21 Yao Qi <yao.qi@linaro.org>
4393 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4394 is resume_step, call maybe_hw_step.
4395 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4397 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4399 (proceed_one_lwp): If resume request is resume_step, install
4400 reinsert breakpoints and call maybe_hw_step.
4402 2016-07-21 Yao Qi <yao.qi@linaro.org>
4404 * linux-low.c (proceed_one_lwp): Declare.
4405 (linux_resume_one_thread): Remove local variable 'step'.
4406 Lift code enqueue signal. Call proceed_one_lwp instead of
4407 linux_resume_one_lwp.
4409 2016-07-21 Yao Qi <yao.qi@linaro.org>
4411 * linux-low.c (linux_resume_one_thread): Call
4412 enqueue_pending_signal.
4414 2016-07-21 Yao Qi <yao.qi@linaro.org>
4416 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4417 * inferiors.c (do_restore_current_thread_cleanup): New function.
4418 (make_cleanup_restore_current_thread): Likewise.
4419 * linux-low.c (install_software_single_step_breakpoints): Call
4420 make_cleanup_restore_current_thread. Switch current_thread to
4423 2016-07-21 Yao Qi <yao.qi@linaro.org>
4425 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4426 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4427 (clone_one_breakpoint): Likewise.
4428 (delete_reinsert_breakpoints): Change parameter to thread.
4430 (has_reinsert_breakpoints): Likewise.
4431 (uninsert_reinsert_breakpoints): Likewise.
4432 (reinsert_reinsert_breakpoints): Likewise.
4433 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4434 (delete_reinsert_breakpoints): Likewise.
4435 (reinsert_reinsert_breakpoints): Likewise.
4436 (uninsert_reinsert_breakpoints): Likewise.
4437 (has_reinsert_breakpoints): Likewise.
4439 2016-07-21 Yao Qi <yao.qi@linaro.org>
4441 * inferiors.c (get_thread_process): Make parameter const.
4442 * inferiors.h (get_thread_process): Update declaration.
4443 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4444 Add new parameters child_thread and parent_thread. Callers
4446 * mem-break.h (clone_all_breakpoints): Update declaration.
4448 2016-07-21 Yao Qi <yao.qi@linaro.org>
4450 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4451 <command_list, handler>: Remove.
4452 (struct gdb_breakpoint): New.
4453 (struct other_breakpoint): New.
4454 (struct reinsert_breakpoint): New.
4455 (is_gdb_breakpoint): New function.
4456 (any_persistent_commands): Update command_list if
4457 is_gdb_breakpoint returns true.
4458 (set_breakpoint): Create breakpoints according to their types.
4459 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4460 (set_gdb_breakpoint_1): Likewise.
4461 (set_gdb_breakpoint): Likewise.
4462 (clear_breakpoint_conditions): Change parameter type to
4463 'struct gdb_breakpoint *'.
4464 (clear_breakpoint_commands): Likewise.
4465 (clear_breakpoint_conditions_and_commands): Likewise.
4466 (add_condition_to_breakpoint): Likewise.
4467 (add_breakpoint_condition): Likewise.
4468 (add_commands_to_breakpoint): Likewise.
4469 (check_breakpoints): Check other_breakpoint.
4470 (clone_one_breakpoint): Clone breakpopint according to its type.
4471 * mem-break.h (struct gdb_breakpoint): Declare.
4472 (set_gdb_breakpoint): Update declaration.
4473 (clear_breakpoint_conditions_and_commands): Likewise.
4474 (add_breakpoint_condition): Likewise.
4475 (add_breakpoint_commands): Likewise.
4476 * server.c (process_point_options): Change parameter type to
4477 'struct gdb_breakpoint *'.
4479 2016-07-21 Yao Qi <yao.qi@linaro.org>
4481 * mem-break.c (set_breakpoint_at): Rename it to ...
4482 (set_breakpoint_type_at): ... it.
4483 (set_breakpoint_at): Call set_breakpoint_type_at.
4484 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4485 * mem-break.h (set_breakpoint_at): Update comments.
4487 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4489 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4491 (nios2_store_gregset): Likewise.
4493 2016-07-01 Pedro Alves <palves@redhat.com>
4494 Antoine Tremblay <antoine.tremblay@ericsson.com>
4496 * linux-low.c: Change interface to take the target lwp_info
4497 pointer directly and return void. Handle detaching from a zombie
4499 (linux_detach_lwp_callback): New function.
4500 (linux_detach): Detach from the leader thread after detaching from
4503 2016-06-28 Yao Qi <yao.qi@linaro.org>
4505 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4506 for variable new_offset.
4507 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4508 (aarch64_ftrace_insn_reloc_cb): Likewise.
4509 (aarch64_ftrace_insn_reloc_tb): Likewise.
4510 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4511 PRIx64 instead of PRIx32.
4513 2016-06-28 Yao Qi <yao.qi@linaro.org>
4515 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4516 (the_low_target): Install arm_get_syscall_trapinfo.
4518 2016-06-28 Yao Qi <yao.qi@linaro.org>
4520 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4522 (the_low_target): Install aarch64_get_syscall_trapinfo.
4524 2016-06-28 Yao Qi <yao.qi@linaro.org>
4526 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4528 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4529 Remove parameter sysno.
4530 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4533 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4535 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4536 (s390_emit_ne_goto): Likewise.
4537 (s390_emit_lt_goto): Likewise.
4538 (s390_emit_le_goto): Likewise.
4539 (s390_emit_gt_goto): Likewise.
4540 (s390_emit_ge_goto): Likewise.
4541 (s390x_emit_eq_goto): Likewise.
4542 (s390x_emit_ne_goto): Likewise.
4543 (s390x_emit_lt_goto): Likewise.
4544 (s390x_emit_le_goto): Likewise.
4545 (s390x_emit_gt_goto): Likewise.
4546 (s390x_emit_ge_goto): Likewise.
4547 (s390_emit_ops_impl): Mark variable static.
4548 (s390x_emit_ops): Likewise.
4550 2016-06-17 Yao Qi <yao.qi@linaro.org>
4552 * linux-low.c (handle_extended_wait): Call
4553 uninsert_reinsert_breakpoints for the parent process. Remove
4554 reinsert breakpoints from the child process. Reinsert them to
4555 the parent process when vfork is done.
4556 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4557 (reinsert_reinsert_breakpoints): New function.
4558 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4559 (reinsert_reinsert_breakpoints): Declare.
4561 2016-06-17 Yao Qi <yao.qi@linaro.org>
4563 * linux-low.c (handle_extended_wait): If the parent is doing
4564 step-over, remove the reinsert breakpoints from the forked child.
4566 2016-06-17 Yao Qi <yao.qi@linaro.org>
4568 * linux-low.c (unsuspend_all_lwps): Declare.
4569 (linux_low_filter_event): If thread exited, call finish_step_over.
4570 If step-over is finished, unsuspend other threads.
4572 2016-06-17 Yao Qi <yao.qi@linaro.org>
4574 * linux-low.c (linux_resume_one_lwp_throw): Assert
4575 has_reinsert_breakpoints returns false.
4576 * mem-break.c (delete_disabled_breakpoints): Assert
4577 bp type isn't reinsert_breakpoint.
4579 2016-06-17 Yao Qi <yao.qi@linaro.org>
4581 * linux-low.c (maybe_hw_step): New function.
4582 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4583 (finish_step_over): Switch current_thread to lwp temporarily,
4584 and assert has_reinsert_breakpoints returns true.
4585 (proceed_one_lwp): Call maybe_hw_step.
4586 * mem-break.c (has_reinsert_breakpoints): New function.
4587 * mem-break.h (has_reinsert_breakpoints): Declare.
4589 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4591 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4593 2016-05-17 Yao Qi <yao.qi@linaro.org>
4595 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4596 instead of find_inferior.
4598 2016-05-05 Yao Qi <yao.qi@linaro.org>
4600 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4601 Initialize res to zero.
4603 2016-05-05 Yao Qi <yao.qi@linaro.org>
4605 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4608 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4610 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4611 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4612 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4614 2016-04-28 Par Olsson <par.olsson@windriver.com>
4615 Simon Marchi <simon.marchi@ericsson.com>
4617 * tracepoint.c (write_inferior_int8): New function.
4618 (cmd_qtenable_disable): Write enable flag using
4619 write_inferior_int8.
4621 2016-04-25 Yao Qi <yao.qi@linaro.org>
4623 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4624 (need_step_over_p): Return zero if the LWP has pending signals
4625 can be delivered on software single step target.
4627 2016-04-25 Yao Qi <yao.qi@linaro.org>
4629 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4630 return instead of error.
4632 2016-04-22 Yao Qi <yao.qi@linaro.org>
4634 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4637 2016-04-22 Yao Qi <yao.qi@linaro.org>
4639 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4640 signal when stepping over breakpoint with software single
4643 2016-04-21 Pedro Alves <palves@redhat.com>
4645 * linux-s390-low.c (s390_collect_ptrace_register)
4646 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4648 (s390_check_regset): Use void * instead of gdb_byte *.
4650 2016-04-20 Pedro Alves <palves@redhat.com>
4652 * configure: Renegerate.
4654 2016-04-20 Yao Qi <yao.qi@linaro.org>
4656 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4657 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4659 (arm_store_gregset): Likewise.
4661 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4663 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4664 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4665 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4666 (amd64-avx-mpx-linux.c): New rules.
4667 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4668 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4669 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4670 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4671 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4672 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4673 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4674 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4675 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4676 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4677 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4678 * linux-x86-low.c (x86_linux_read_description): Add case for
4679 X86_XSTATE_AVX_MPX_MASK.
4680 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4681 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4682 init_registers_i386_avx_mpx_linux.
4683 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4684 (initialize_low_tracepoint): Call
4685 init_registers_i386_avx_mpx_linux.
4686 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4687 (initialize_low_tracepoint): Call
4688 init_registers_amd64_avx_mpx_linux.
4689 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4690 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4691 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4694 2016-04-18 Pedro Alves <palves@redhat.com>
4696 * configure: Regenerate.
4698 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4700 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4701 (aarch64_emit_sub): Likewise.
4703 2016-04-12 Pedro Alves <palves@redhat.com>
4705 * utils.c (prepare_to_throw_exception): Delete.
4707 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4709 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4711 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4713 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4715 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4717 * linux-aarch64-ipa.c: Add <elf.h> include.
4718 * linux-ppc-ipa.c: Add <elf.h> include.
4719 * linux-s390-ipa.c: Add <elf.h> include.
4721 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4723 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4724 (get_raw_reg_ptr): Likewise.
4725 (get_trace_state_variable_value_ptr): Likewise.
4726 (set_trace_state_variable_value_ptr): Likewise.
4727 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4730 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4731 Marcin Kościelnicki <koriakin@0x04.net>
4734 * linux-ppc-low.c (emit_insns): New function.
4735 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4736 (ppc_emit_prologue): New function.
4737 (ppc_emit_epilogue): New function.
4738 (ppc_emit_add): New function.
4739 (ppc_emit_sub): New function.
4740 (ppc_emit_mul): New function.
4741 (ppc_emit_lsh): New function.
4742 (ppc_emit_rsh_signed): New function.
4743 (ppc_emit_rsh_unsigned): New function.
4744 (ppc_emit_ext): New function.
4745 (ppc_emit_zero_ext): New function.
4746 (ppc_emit_log_not): New function.
4747 (ppc_emit_bit_and): New function.
4748 (ppc_emit_bit_or): New function.
4749 (ppc_emit_bit_xor): New function.
4750 (ppc_emit_bit_not): New function.
4751 (ppc_emit_equal): New function.
4752 (ppc_emit_less_signed): New function.
4753 (ppc_emit_less_unsigned): New function.
4754 (ppc_emit_ref): New function.
4755 (ppc_emit_const): New function.
4756 (ppc_emit_reg): New function.
4757 (ppc_emit_pop): New function.
4758 (ppc_emit_stack_flush): New function.
4759 (ppc_emit_swap): New function.
4760 (ppc_emit_stack_adjust): New function.
4761 (ppc_emit_call): New function.
4762 (ppc_emit_int_call_1): New function.
4763 (ppc_emit_void_call_2): New function.
4764 (ppc_emit_if_goto): New function.
4765 (ppc_emit_goto): New function.
4766 (ppc_emit_eq_goto): New function.
4767 (ppc_emit_ne_goto): New function.
4768 (ppc_emit_lt_goto): New function.
4769 (ppc_emit_le_goto): New function.
4770 (ppc_emit_gt_goto): New function.
4771 (ppc_emit_ge_goto): New function.
4772 (ppc_write_goto_address): New function.
4773 (ppc_emit_ops_impl): New static variable.
4774 (ppc64v1_emit_prologue): New function.
4775 (ppc64v2_emit_prologue): New function.
4776 (ppc64_emit_epilogue): New function.
4777 (ppc64_emit_add): New function.
4778 (ppc64_emit_sub): New function.
4779 (ppc64_emit_mul): New function.
4780 (ppc64_emit_lsh): New function.
4781 (ppc64_emit_rsh_signed): New function.
4782 (ppc64_emit_rsh_unsigned): New function.
4783 (ppc64_emit_ext): New function.
4784 (ppc64_emit_zero_ext): New function.
4785 (ppc64_emit_log_not): New function.
4786 (ppc64_emit_bit_and): New function.
4787 (ppc64_emit_bit_or): New function.
4788 (ppc64_emit_bit_xor): New function.
4789 (ppc64_emit_bit_not): New function.
4790 (ppc64_emit_equal): New function.
4791 (ppc64_emit_less_signed): New function.
4792 (ppc64_emit_less_unsigned): New function.
4793 (ppc64_emit_ref): New function.
4794 (ppc64_emit_const): New function.
4795 (ppc64v1_emit_reg): New function.
4796 (ppc64v2_emit_reg): New function.
4797 (ppc64_emit_pop): New function.
4798 (ppc64_emit_stack_flush): New function.
4799 (ppc64_emit_swap): New function.
4800 (ppc64v1_emit_call): New function.
4801 (ppc64v2_emit_call): New function.
4802 (ppc64v1_emit_int_call_1): New function.
4803 (ppc64v2_emit_int_call_1): New function.
4804 (ppc64v1_emit_void_call_2): New function.
4805 (ppc64v2_emit_void_call_2): New function.
4806 (ppc64_emit_if_goto): New function.
4807 (ppc64_emit_eq_goto): New function.
4808 (ppc64_emit_ne_goto): New function.
4809 (ppc64_emit_lt_goto): New function.
4810 (ppc64_emit_le_goto): New function.
4811 (ppc64_emit_gt_goto): New function.
4812 (ppc64_emit_ge_goto): New function.
4813 (ppc64v1_emit_ops_impl): New static variable.
4814 (ppc64v2_emit_ops_impl): New static variable.
4815 (ppc_emit_ops): New function.
4816 (linux_low_target): Wire in ppc_emit_ops.
4818 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4819 Marcin Kościelnicki <koriakin@0x04.net>
4822 * Makefile.in: Add powerpc-*-ipa.o
4823 * configure.srv: Add ipa_obj for powerpc*-linux.
4824 * linux-ppc-ipa.c: New file.
4825 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4827 (PPC_FIELD): New macro.
4828 (PPC_SEXT): New macro.
4829 (PPC_OP6): New macro.
4830 (PPC_BO): New macro.
4831 (PPC_LI): New macro.
4832 (PPC_BD): New macro.
4833 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4834 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4835 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4836 (ppc_get_thread_area): New function.
4837 (is_elfv2_inferior): New function.
4838 (gen_ds_form): New function.
4839 (GEN_STD): New macro.
4840 (GEN_STDU): New macro.
4841 (GEN_LD): New macro.
4842 (GEN_LDU): New macro.
4843 (gen_d_form): New function.
4844 (GEN_ADDI): New macro.
4845 (GEN_ADDIS): New macro.
4846 (GEN_LI): New macro.
4847 (GEN_LIS): New macro.
4848 (GEN_ORI): New macro.
4849 (GEN_ORIS): New macro.
4850 (GEN_LWZ): New macro.
4851 (GEN_STW): New macro.
4852 (GEN_STWU): New macro.
4853 (gen_xfx_form): New function.
4854 (GEN_MFSPR): New macro.
4855 (GEN_MTSPR): New macro.
4856 (GEN_MFCR): New macro.
4857 (GEN_MTCR): New macro.
4858 (GEN_SYNC): New macro.
4859 (GEN_LWSYNC): New macro.
4860 (gen_x_form): New function.
4861 (GEN_OR): New macro.
4862 (GEN_MR): New macro.
4863 (GEN_LWARX): New macro.
4864 (GEN_STWCX): New macro.
4865 (GEN_CMPW): New macro.
4866 (gen_md_form): New function.
4867 (GEN_RLDICL): New macro.
4868 (GEN_RLDICR): New macro.
4869 (gen_i_form): New function.
4871 (GEN_BL): New macro.
4872 (gen_b_form): New function.
4873 (GEN_BNE): New macro.
4874 (GEN_LOAD): New macro.
4875 (GEN_STORE): New macro.
4876 (gen_limm): New function.
4877 (gen_atomic_xchg): New function.
4878 (gen_call): New function.
4879 (ppc_relocate_instruction): New function.
4880 (ppc_install_fast_tracepoint_jump_pad): New function.
4881 (ppc_get_min_fast_tracepoint_insn_len): New function.
4882 (ppc_get_ipa_tdesc_idx): New function.
4883 (the_low_target): Wire in the new functions.
4884 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4886 * linux-ppc-tdesc.h: New file.
4888 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4890 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4891 (alloc_jump_pad_buffer): New function.
4892 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4893 (alloc_jump_pad_buffer): New function.
4894 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4895 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4896 (alloc_jump_pad_buffer): New function.
4897 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4898 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4899 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4900 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4902 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4904 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4905 * linux-amd64-ipa.c: Likewise.
4906 * linux-i386-ipa.c: Likewise.
4907 * linux-s390-ipa.c: Likewise.
4908 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4909 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4910 set_trace_state_variable_value_ptr.
4911 (struct ipa_sym_addresses): Likewise.
4912 (symbol_list): Likewise.
4913 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4914 accessing gdb_collect directly.
4915 (gdb_collect_ptr_type): New typedef.
4916 (get_raw_reg_ptr_type): New typedef.
4917 (get_trace_state_variable_value_ptr_type): New typedef.
4918 (set_trace_state_variable_value_ptr_type): New typedef.
4919 (gdb_collect_ptr): New global.
4920 (get_raw_reg_ptr): New global.
4921 (get_trace_state_variable_value_ptr): New global.
4922 (set_trace_state_variable_value_ptr): New global.
4923 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4924 accessing get_raw_reg directly.
4925 (get_get_tsv_func_addr): Likewise for
4926 get_trace_state_variable_value_ptr.
4927 (get_set_tsv_func_addr): Likewise for
4928 set_trace_state_variable_value_ptr.
4929 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4931 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4933 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4935 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4937 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4939 (relocate_instruction): Remove own_buf.
4940 * server.c (own_buf): Make global.
4941 (handle_v_requests): Make global.
4942 * server.h (own_buf): New declaration.
4943 (handle_v_requests): New prototype.
4945 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4948 * linux-s390-low.c (add_insns): New function.
4949 (s390_emit_prologue): New function.
4950 (s390_emit_epilogue): New function.
4951 (s390_emit_add): New function.
4952 (s390_emit_sub): New function.
4953 (s390_emit_mul): New function.
4954 (s390_emit_lsh): New function.
4955 (s390_emit_rsh_signed): New function.
4956 (s390_emit_rsh_unsigned): New function.
4957 (s390_emit_ext): New function.
4958 (s390_emit_log_not): New function.
4959 (s390_emit_bit_and): New function.
4960 (s390_emit_bit_or): New function.
4961 (s390_emit_bit_xor): New function.
4962 (s390_emit_bit_not): New function.
4963 (s390_emit_equal): New function.
4964 (s390_emit_less_signed): New function.
4965 (s390_emit_less_unsigned): New function.
4966 (s390_emit_ref): New function.
4967 (s390_emit_if_goto): New function.
4968 (s390_emit_goto): New function.
4969 (s390_write_goto_address): New function.
4970 (s390_emit_litpool): New function.
4971 (s390_emit_const): New function.
4972 (s390_emit_call): New function.
4973 (s390_emit_reg): New function.
4974 (s390_emit_pop): New function.
4975 (s390_emit_stack_flush): New function.
4976 (s390_emit_zero_ext): New function.
4977 (s390_emit_swap): New function.
4978 (s390_emit_stack_adjust): New function.
4979 (s390_emit_set_r2): New function.
4980 (s390_emit_int_call_1): New function.
4981 (s390_emit_void_call_2): New function.
4982 (s390_emit_eq_goto): New function.
4983 (s390_emit_ne_goto): New function.
4984 (s390_emit_lt_goto): New function.
4985 (s390_emit_le_goto): New function.
4986 (s390_emit_gt_goto): New function.
4987 (s390_emit_ge_goto): New function.
4988 (s390x_emit_prologue): New function.
4989 (s390x_emit_epilogue): New function.
4990 (s390x_emit_add): New function.
4991 (s390x_emit_sub): New function.
4992 (s390x_emit_mul): New function.
4993 (s390x_emit_lsh): New function.
4994 (s390x_emit_rsh_signed): New function.
4995 (s390x_emit_rsh_unsigned): New function.
4996 (s390x_emit_ext): New function.
4997 (s390x_emit_log_not): New function.
4998 (s390x_emit_bit_and): New function.
4999 (s390x_emit_bit_or): New function.
5000 (s390x_emit_bit_xor): New function.
5001 (s390x_emit_bit_not): New function.
5002 (s390x_emit_equal): New function.
5003 (s390x_emit_less_signed): New function.
5004 (s390x_emit_less_unsigned): New function.
5005 (s390x_emit_ref): New function.
5006 (s390x_emit_if_goto): New function.
5007 (s390x_emit_const): New function.
5008 (s390x_emit_call): New function.
5009 (s390x_emit_reg): New function.
5010 (s390x_emit_pop): New function.
5011 (s390x_emit_stack_flush): New function.
5012 (s390x_emit_zero_ext): New function.
5013 (s390x_emit_swap): New function.
5014 (s390x_emit_stack_adjust): New function.
5015 (s390x_emit_int_call_1): New function.
5016 (s390x_emit_void_call_2): New function.
5017 (s390x_emit_eq_goto): New function.
5018 (s390x_emit_ne_goto): New function.
5019 (s390x_emit_lt_goto): New function.
5020 (s390x_emit_le_goto): New function.
5021 (s390x_emit_gt_goto): New function.
5022 (s390x_emit_ge_goto): New function.
5023 (s390_emit_ops): New function.
5024 (struct linux_target_ops): Fill in emit_ops hook.
5026 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5029 * Makefile.in: Add s390 IPA files.
5030 * configure.srv: Build IPA for s390.
5031 * linux-s390-ipa.c: New file.
5032 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5033 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5034 (tdesc_s390_linux32): Likewise.
5035 (init_registers_s390_linux32v1): Likewise.
5036 (tdesc_s390_linux32v1): Likewise.
5037 (init_registers_s390_linux32v2): Likewise.
5038 (tdesc_s390_linux32v2): Likewise.
5039 (init_registers_s390_linux64): Likewise.
5040 (tdesc_s390_linux64): Likewise.
5041 (init_registers_s390_linux64v1): Likewise.
5042 (tdesc_s390_linux64v1): Likewise.
5043 (init_registers_s390_linux64v2): Likewise.
5044 (tdesc_s390_linux64v2): Likewise.
5045 (init_registers_s390_te_linux64): Likewise.
5046 (tdesc_s390_te_linux64): Likewise.
5047 (init_registers_s390_vx_linux64): Likewise.
5048 (tdesc_s390_vx_linux64): Likewise.
5049 (init_registers_s390_tevx_linux64): Likewise.
5050 (tdesc_s390_tevx_linux64): Likewise.
5051 (init_registers_s390x_linux64): Likewise.
5052 (tdesc_s390x_linux64): Likewise.
5053 (init_registers_s390x_linux64v1): Likewise.
5054 (tdesc_s390x_linux64v1): Likewise.
5055 (init_registers_s390x_linux64v2): Likewise.
5056 (tdesc_s390x_linux64v2): Likewise.
5057 (init_registers_s390x_te_linux64): Likewise.
5058 (tdesc_s390x_te_linux64): Likewise.
5059 (init_registers_s390x_vx_linux64): Likewise.
5060 (tdesc_s390x_vx_linux64): Likewise.
5061 (init_registers_s390x_tevx_linux64): Likewise.
5062 (tdesc_s390x_tevx_linux64): Likewise.
5063 (have_hwcap_s390_vx): New static variable.
5064 (s390_arch_setup): Fill have_hwcap_s390_vx.
5065 (s390_get_thread_area): New function.
5066 (s390_ft_entry_gpr_esa): New const.
5067 (s390_ft_entry_gpr_zarch): New const.
5068 (s390_ft_entry_misc): New const.
5069 (s390_ft_entry_fr): New const.
5070 (s390_ft_entry_vr): New const.
5071 (s390_ft_main_31): New const.
5072 (s390_ft_main_64): New const.
5073 (s390_ft_exit_fr): New const.
5074 (s390_ft_exit_vr): New const.
5075 (s390_ft_exit_misc): New const.
5076 (s390_ft_exit_gpr_esa): New const.
5077 (s390_ft_exit_gpr_zarch): New const.
5078 (append_insns): New function.
5079 (s390_relocate_instruction): New function.
5080 (s390_install_fast_tracepoint_jump_pad): New function.
5081 (s390_get_min_fast_tracepoint_insn_len): New function.
5082 (s390_get_ipa_tdesc_idx): New function.
5083 (struct linux_target_ops): Wire in the above functions.
5084 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5085 * linux-s390-tdesc.h: New file.
5087 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5089 * linux-s390-low.c (s390_supports_tracepoints): New function.
5090 (struct linux_target_ops): Fill supports_tracepoints hook.
5092 2016-03-18 Yao Qi <yao.qi@linaro.org>
5094 * linux-low.c (lwp_signal_can_be_delivered): New function.
5095 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5097 2016-03-18 Yao Qi <yao.qi@linaro.org>
5099 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5100 0 if signal is enqueued. Remove 'signal' from one debugging
5101 message. Move one debugging message to some lines below.
5102 Remove code setting 'signal' to 0.
5104 2016-03-18 Yao Qi <yao.qi@linaro.org>
5106 * linux-low.c (linux_low_filter_event): Remove redundant
5107 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5109 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5111 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5112 (struct linux_target_ops): Wire in the above.
5114 2016-03-03 Yao Qi <yao.qi@linaro.org>
5116 * linux-low.c: Update comments to start_step_over.
5118 2016-03-03 Yao Qi <yao.qi@linaro.org>
5121 * linux-low.c (handle_extended_wait): Set child suspended
5122 if event_lwp->bp_reinsert isn't zero.
5124 2016-03-02 Yao Qi <yao.qi@linaro.org>
5126 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5127 enqueue_pending_signal.
5129 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5131 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5134 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5136 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5137 (s390_regmap_3264) [!__s390x__]: New global.
5138 (s390_collect_ptrace_register): Skip map entries containing -1.
5139 (s390_supply_ptrace_register): Ditto.
5140 (s390_fill_gprs_high): New function.
5141 (s390_store_gprs_high): New function.
5142 (s390_regsets): Add NT_S390_HIGH_GPRS.
5143 (s390_get_hwcap): Enable on 31-bit.
5144 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5145 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5146 Detect NT_S390_HIGH_GPRS.
5147 (s390_usrregs_info_3264): Enable on 31-bit.
5148 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5149 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5151 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5154 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5155 * configure.srv: Ditto.
5156 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5157 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5158 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5159 (init_registers_amd64_linux): Remove prototype.
5160 (tdesc_amd64_linux): Remove declaration.
5161 (get_ipa_tdesc): New function.
5162 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5163 initialize remaining tdescs.
5164 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5165 (init_registers_i386_linux): Remove prototype.
5166 (tdesc_i386_linux): Remove declaration.
5167 (get_ipa_tdesc): New function.
5168 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5169 initialize remaining tdescs.
5170 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5171 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5172 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5173 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5174 (x86_get_ipa_tdesc_idx): New function.
5175 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5176 * linux-x86-tdesc.h: New file.
5177 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5178 (target_get_ipa_tdesc_idx): New macro.
5179 * tracepoint.c (ipa_tdesc_idx): New macro.
5180 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5181 (symbol_list): Add ipa_tdesc_idx.
5182 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5183 (ipa_tdesc): Remove.
5184 (ipa_tdesc_idx): New variable.
5185 (get_context_regcache): Use get_ipa_tdesc.
5186 (gdb_collect): Ditto.
5188 * tracepoint.h (get_ipa_tdesc): New prototype.
5189 (ipa_tdesc): Remove.
5191 2016-02-24 Pedro Alves <palves@redhat.com>
5193 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5194 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5195 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5196 Factor out common code between the USE_SIGTRAP_SIGINFO and
5197 !USE_SIGTRAP_SIGINFO blocks.
5198 (linux_low_filter_event): Call save_stop_reason instead of
5199 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5201 (linux_wait_1): Update comments.
5203 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5205 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5206 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5207 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5208 ppc_insert_point, ppc_remove_point.
5210 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5212 * linux-s390-low.c (s390_supports_z_point_type): New function.
5213 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5215 2016-02-16 Yao Qi <yao.qi@linaro.org>
5217 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5218 PC. Get pc from regcache_read_pc.
5220 2016-02-12 Yao Qi <yao.qi@linaro.org>
5222 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5223 or linux_get_pc_32bit.
5224 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5226 2016-02-12 Yao Qi <yao.qi@linaro.org>
5228 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5229 arm_linux_get_next_pcs_fixup.
5231 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5233 * tracepoint.c (x_tracepoint_action_download): Change
5234 write_inferior_data_ptr to write_inferior_data_pointer.
5235 (cmd_qtstart): Likewise.
5236 (write_inferior_data_ptr): Remove.
5237 (download_agent_expr): Change write_inferior_data_ptr to
5238 write_inferior_data_pointer.
5239 (download_tracepoint_1): Likewise.
5240 (download_tracepoint): Likewise.
5241 (download_trace_state_variables): Likewise.
5243 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5244 Marcin Kościelnicki <koriakin@0x04.net>
5246 * tracepoint.c (struct tracepoint_action_ops): Remove.
5247 (struct tracepoint_action): Remove ops.
5248 (m_tracepoint_action_download, r_tracepoint_action_download)
5249 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5250 size and offset accordingly.
5251 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5252 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5253 (tracepoint_action_send, tracepoint_action_download): New functions.
5254 Helpers for trace action handlers.
5255 (add_tracepoint_action): Remove setup actions ops.
5256 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5258 2016-02-10 Yao Qi <yao.qi@linaro.org>
5260 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5262 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5264 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5266 * configure: Regenerate.
5268 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5270 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5271 void * to gdb_byte *.
5272 * linux-low.c (siginfo_fixup): Likewise.
5273 (linux_xfer_siginfo): Likewise.
5274 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5276 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5278 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5280 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5282 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5284 * linux-x86-low.c [__x86_64__]: Include
5285 "nat/amd64-linux-siginfo.h".
5286 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5287 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5288 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5289 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5290 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5291 (cpt_si_fd, si_timerid, si_overrun): Move from
5292 nat/amd64-linux-siginfo.c.
5293 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5295 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5297 * server.c (skip_to_semicolon): Remove.
5298 (process_point_options): Use strchrnul instead of
5301 2016-01-26 Yao Qi <yao.qi@linaro.org>
5303 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5304 * linux-low.c (install_software_single_step_breakpoints): Don't
5305 call regcache_read_pc.
5306 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5309 2016-01-26 Yao Qi <yao.qi@linaro.org>
5311 * linux-low.c (install_software_single_step_breakpoints): Call
5312 regcache_read_pc instead of get_pc.
5314 2016-01-26 Yao Qi <yao.qi@linaro.org>
5316 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5317 (unblock_async_io): Rename to ...
5318 (block_unblock_async_io): ... it. New function.
5319 (enable_async_io): Don't install SIGIO handler. Unblock it
5321 (disable_async_io): Don't ignore SIGIO. Block it instead.
5322 (initialize_async_io): Install SIGIO handler. Don't call
5325 2016-01-26 Yao Qi <yao.qi@linaro.org>
5327 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5328 first character is '\003', call *the_target->request_interrupt.
5330 2016-01-25 Yao Qi <yao.qi@linaro.org>
5332 * remote-utils.c (new_thread_notify): Remove.
5333 (dead_thread_notify): Likewise.
5334 * remote-utils.h (new_thread_notify): Remove declaration.
5335 (dead_thread_notify): Likewise.
5337 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5339 * gdb.trace/pending.exp: Fix expected message on continue.
5341 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5343 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5344 it works properly on big-endian machines where sizeof (CORE_ADDR)
5347 2016-01-21 Pedro Alves <palves@redhat.com>
5349 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5350 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5351 * configure: Regenerate.
5353 2016-01-21 Yao Qi <yao.qi@linaro.org>
5355 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5356 is_thumb and set it according to CPSR saved on the stack.
5357 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5358 arm_sigreturn_next_pc.
5360 2016-01-18 Yao Qi <yao.qi@linaro.org>
5362 * linux-low.c (linux_set_pc_64bit): New function.
5363 (linux_get_pc_64bit): New function.
5364 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5366 * linux-sparc-low.c (debug_threads): Remove declaration.
5367 (sparc_get_pc): Remove.
5368 (the_low_target): Use linux_get_pc_64bit instead of
5370 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5371 (the_low_target): Use linux_get_pc_64bit and
5374 2016-01-18 Yao Qi <yao.qi@linaro.org>
5376 * linux-arm-low.c (debug_threads): Remove declaration.
5377 (arm_get_pc, arm_set_pc): Remove.
5378 (the_low_target): Use linux_get_pc_32bit and
5380 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5381 (the_low_target): Use linux_get_pc_32bit and
5383 * linux-cris-low.c (debug_threads): Remove declaration.
5384 (cris_get_pc, cris_set_pc,): Remove.
5385 (the_low_target): Use linux_get_pc_32bit and
5387 * linux-crisv32-low.c (debug_threads): Remove declaration.
5388 (cris_get_pc, cris_set_pc): Remove.
5389 (the_low_target): Use linux_get_pc_32bit and
5391 * linux-low.c: Include inttypes.h.
5392 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5393 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5394 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5395 (the_low_target): Use linux_get_pc_32bit and
5397 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5398 (the_low_target): Use linux_get_pc_32bit and
5400 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5401 (the_low_target): Use linux_get_pc_32bit and
5403 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5404 (the_low_target): Use linux_get_pc_32bit and
5406 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5407 (the_low_target): Use linux_get_pc_32bit and
5410 2016-01-18 Gary Benson <gbenson@redhat.com>
5412 * configure.ac (AC_FUNC_FORK): New check.
5413 * config.in: Regenerate.
5414 * configure: Likewise.
5416 2016-01-14 Yao Qi <yao.qi@linaro.org>
5418 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5419 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5420 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5421 arm_get_next_pcs_ctor.
5423 2016-01-12 Josh Stone <jistone@redhat.com>
5424 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5426 * inferiors.h: Include "gdb_vecs.h".
5427 (struct process_info): Add syscalls_to_catch.
5428 * inferiors.c (remove_process): Free syscalls_to_catch.
5429 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5430 syscall_return stops.
5431 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5432 * server.c (handle_general_set): Handle QCatchSyscalls.
5433 (handle_query): Report support for QCatchSyscalls.
5434 * target.h (struct target_ops): Add supports_catch_syscall.
5435 (target_supports_catch_syscall): New macro.
5436 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5437 (struct lwp_info): Add syscall_state.
5438 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5439 Maintain syscall_state and syscalls_to_catch across exec.
5440 (get_syscall_trapinfo): New function, proxy to the_low_target.
5441 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5442 (linux_low_filter_event): Toggle syscall_state entry/return for
5443 syscall traps, and set it ignored for all others.
5444 (gdb_catching_syscalls_p): New function.
5445 (gdb_catch_this_syscall_p): New function.
5446 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5447 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5448 (linux_supports_catch_syscall): New function.
5449 (linux_target_ops): Install it.
5450 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5451 (the_low_target): Install it.
5453 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5455 * acinclude.m4: Include new ../warning.m4 file.
5456 * configure: Regenerated.
5457 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5459 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5461 * ax.c (is_goto_target): Mark static.
5462 * linux-low.c (register_addr): Likewise.
5463 (linux_fetch_registers, linux_store_registers): Likewise.
5464 * mem-break.c (any_persistent_commands): Fix old prototype.
5465 (add_commands_to_breakpoint): Mark static.
5466 * regcache.c (find_register_by_name): Delete unused func.
5467 * remote-utils.c (hex_or_minus_one): Mark static.
5468 * server.c (monitor_show_help): Mark static.
5469 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5470 handle_v_requests): Likewise.
5472 2016-01-12 Pedro Alves <palves@redhat.com>
5474 Remove use of the registered trademark symbol throughout.
5476 2016-01-08 Yao Qi <yao.qi@linaro.org>
5478 * remote-utils.c (getpkt): If c is '\003', call target hook
5481 2016-01-06 Yao Qi <yao.qi@linaro.org>
5483 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5484 linux-aarch32-low.c.
5485 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5486 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5487 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5488 (thumb2_breakpoint): Declare.
5489 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5490 linux-aarch32-low.h.
5491 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5492 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5493 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5495 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5497 * gdbreplay.c (gdbreplay_version): Change copyright year in
5499 * server.c (gdbserver_version): Likewise.
5501 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5503 * server.c (crc32_table): Delete.
5504 (crc32): Use libiberty's xcrc32 function.
5506 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5508 * lynx-low.c (lynx_delete_thread_callback): New function.
5509 (lynx_mourn): Properly delete our process and all of its
5510 threads. Remove call to clear_inferiors.
5512 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5514 * target.c (thread_search_callback): Add check that
5515 the thread_stopped target callback is not NULL before
5518 2015-12-21 Yao Qi <yao.qi@linaro.org>
5520 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5523 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5525 * server.c (handle_query): Call target_supports_software_single_step.
5527 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5529 * linux-low.c (single_step): New function.
5530 (linux_resume_one_lwp_throw): Call single_step.
5531 (start_step_over): Likewise.
5533 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5535 * Makefile.in (SFILES): Append arch/arm-linux.c,
5536 arch/arm-get-next-pcs.c.
5537 (arm-linux.o): New rule.
5538 (arm-get-next-pcs.o): New rule.
5539 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5541 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5542 to linux-aarch32-low.c.
5543 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5544 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5545 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5546 (thumb2_breakpoint_len): Likewise.
5547 (arm_is_thumb_mode): Make non-static.
5548 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5549 from linux-aarch32-low.c.
5550 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5551 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5552 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5553 (thumb2_breakpoint_len): Likewise.
5554 (arm_is_thumb_mode): New declaration.
5555 * linux-arm-low.c: Include arch/arm-linux.h
5556 aarch/arm-get-next-pcs.h, sys/syscall.h.
5557 (get_next_pcs_ops): New struct.
5558 (get_next_pcs_addr_bits_remove): New function.
5559 (get_next_pcs_is_thumb): New function.
5560 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5561 (arm_sigreturn_next_pc): Likewise.
5562 (get_next_pcs_syscall_next_pc): Likewise.
5563 (arm_gdbserver_get_next_pcs): Likewise.
5564 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5566 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5567 * server.h: Include gdb_vecs.h.
5569 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5571 * Makefile.in (SFILES): Append common/common-regcache.c.
5572 (OBS): Append common-regcache.o.
5573 (common-regcache.o): New rule.
5574 * regcache.c (init_register_cache): Initialize cache to
5576 (regcache_raw_read_unsigned): New function.
5577 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5578 register_status enum.
5580 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5582 * linux-aarch64-low.c (the_low_targets): Rename
5583 breakpoint_reinsert_addr to get_next_pcs.
5584 * linux-arm-low.c (the_low_targets): Likewise.
5585 * linux-bfin-low.c (the_low_targets): Likewise.
5586 * linux-cris-low.c (the_low_targets): Likewise.
5587 * linux-crisv32-low.c (the_low_targets): Likewise.
5588 * linux-low.c (can_software_single_step): Likewise.
5589 (install_software_single_step_breakpoints): New function.
5590 (start_step_over): Use install_software_single_step_breakpoints.
5591 * linux-low.h: New CORE_ADDR vector.
5592 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5594 * linux-mips-low.c (the_low_targets): Likewise.
5595 * linux-nios2-low.c (the_low_targets): Likewise.
5596 * linux-sparc-low.c (the_low_targets): Likewise.
5598 2015-12-17 Pedro Alves <palves@redhat.com>
5600 * linux-low.c (linux_kill_one_lwp): Remove references to
5602 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5604 (linux_init_signals): Delete.
5605 (initialize_low): Adjust.
5606 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5608 2015-12-16 Pedro Alves <palves@redhat.com>
5610 * configure.ac (compiler warning flags): When testing a
5611 -Wno-foo option, check whether -Wfoo works instead.
5612 * configure: Regenerate.
5614 2015-12-11 Don Breazeal <donb@codesourcery.com>
5616 * server.c (process_serial_event): Don't exit from gdbserver
5617 in remote mode if there are still active inferiors.
5619 2015-12-11 Yao Qi <yao.qi@linaro.org>
5621 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5622 arm_breakpoint_at if the process is 32-bit.
5624 2015-12-11 Yao Qi <yao.qi@linaro.org>
5626 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5629 2015-12-07 Yao Qi <yao.qi@linaro.org>
5631 * configure.srv: Append arm.o to srv_tgtobj for
5632 aarch64*-*-linux* target.
5633 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5634 from linux-arm-low.c.
5635 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5636 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5637 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5638 (thumb2_breakpoint_len): Likewise.
5639 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5640 (arm_breakpoint_kinds): Likewise.
5641 (arm_breakpoint_kind_from_pc): Likewise.
5642 (arm_sw_breakpoint_from_kind): Likewise.
5643 (arm_breakpoint_kind_from_current_state): Likewise.
5644 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5645 (arm_sw_breakpoint_from_kind): Declare.
5646 (arm_breakpoint_kind_from_current_state): Declare.
5647 (arm_breakpoint_at): Declare.
5648 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5649 arm_sw_breakpoint_from_kind if process is 32-bit.
5650 (aarch64_breakpoint_kind_from_pc): New function.
5651 (aarch64_breakpoint_kind_from_current_state): New function.
5652 (the_low_target): Initialize fields breakpoint_kind_from_pc
5653 and breakpoint_kind_from_current_state.
5654 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5655 linux-aarch32-low.c.
5656 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5657 (arm_breakpoint, arm_breakpoint_len): Likewise.
5658 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5659 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5660 (arm_is_thumb_mode): Likewise.
5661 (arm_breakpoint_at): Likewise.
5662 (arm_breakpoint_kind_from_pc): Likewise.
5663 (arm_sw_breakpoint_from_kind): Likewise.
5664 (arm_breakpoint_kind_from_current_state): Likewise.
5667 2015-08-04 Yao Qi <yao.qi@linaro.org>
5669 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5670 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5671 * server.c (extended_protocol): Remove "static".
5672 * server.h (extended_protocol): Declare it.
5674 2015-12-04 Josh Stone <jistone@redhat.com>
5676 * target.h (struct target_ops) <arch_setup>: Rename to ...
5677 (struct target_ops) <post_create_inferior>: ... this.
5678 (target_arch_setup): Rename to ...
5679 (target_post_create_inferior): ... this, calling post_create_inferior.
5680 * server.c (start_inferior): Update target_arch_setup calls to
5681 target_post_create_inferior.
5682 * linux-low.c (linux_low_ptrace_options): Forward declare.
5683 (linux_arch_setup): Update its comment for general use.
5684 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5685 (struct linux_target_ops): Use linux_post_create_inferior.
5686 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5687 to post_create_inferior.
5688 * nto-low.c (struct nto_target_ops): Likewise.
5689 * spu-low.c (struct spu_target_ops): Likewise.
5690 * win32-low.c (struct win32_target_ops): Likewise.
5692 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5694 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5696 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5698 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5699 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5700 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5701 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5702 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5703 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5704 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5705 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5706 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5707 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5708 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5709 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5711 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5713 * linux-low.c (linux_look_up_symbols): Don't call
5714 linux_supports_traceclone.
5715 * linux-low.h (thread_db_init): Remove use_events argument.
5716 * thread-db.c (thread_db_use_event): Remove global variable.
5717 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5718 (struct thread_db) <td_create_bp>: Remove field.
5719 (thread_db_create_event): Remove function.
5720 (thread_db_enable_reporting): Likewise.
5721 (find_one_thread): Don't check for thread_db_use_events.
5722 (attach_thread): Likewise.
5723 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5724 (try_thread_db_load_1): Don't check for thread_db_use_events.
5725 (thread_db_init): Remove use_events argument and thread events
5727 (remove_thread_event_breakpoints): Remove function.
5728 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5730 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5732 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5734 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5735 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5736 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5737 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5738 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5740 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5742 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5743 * linux-low.c (can_hardware_single_step): Use
5744 supports_hardware_single_step.
5745 (can_software_single_step): New function.
5746 (start_step_over): Call can_software_single_step.
5747 (linux_supports_hardware_single_step): New function.
5748 (struct target_ops) <supports_software_single_step>: Initialize.
5749 * linux-low.h (struct linux_target_ops)
5750 <supports_hardware_single_step>: Initialize.
5751 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5752 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5753 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5754 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5755 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5756 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5757 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5758 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5759 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5760 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5762 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5763 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5765 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5766 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5767 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5769 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5770 * target.h (struct target_ops): <supports_software_single_step>:
5772 (target_supports_software_single_step): New macro.
5774 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5776 * linux-low.c (linux_wait_1): Fix pc advance condition.
5777 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5778 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5780 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5782 * linux-arm-low.c (arm_is_thumb_mode): New function.
5783 (arm_breakpoint_at): Use arm_is_thumb_mode.
5784 (arm_breakpoint_kind_from_current_state): New function.
5785 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5787 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5788 (linux_breakpoint_kind_from_current_state): New function.
5789 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5790 * linux-low.h (struct linux_target_ops)
5791 <breakpoint_kind_from_current_state>: New field.
5792 * target.h (struct target_ops): Likewise.
5793 (target_breakpoint_kind_from_current_state): New macro.
5795 2015-11-30 Pedro Alves <palves@redhat.com>
5797 * linux-low.c (linux_resume): Wake up the event loop before
5800 2015-11-30 Pedro Alves <palves@redhat.com>
5802 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5804 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5806 * target.c (struct thread_search): New structure.
5807 (thread_search_callback): New function.
5808 (prev_general_thread): New global.
5809 (prepare_to_access_memory, done_accessing_memory): New functions.
5810 * target.h (prepare_to_access_memory, done_accessing_memory):
5811 Replace macros with function declarations.
5813 2015-11-30 Pedro Alves <palves@redhat.com>
5816 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5817 report TARGET_WAITKIND_NO_RESUMED.
5818 * remote-utils.c (prepare_resume_reply): Handle
5819 TARGET_WAITKIND_NO_RESUMED.
5820 * server.c (report_no_resumed): New global.
5821 (handle_query) <qSupported>: Handle "no-resumed+". Report
5822 "no-resumed+" support.
5823 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5824 return error if the client doesn't support no-resumed events.
5825 (push_stop_notification): New function.
5826 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5827 events if the client supports them.
5829 2015-11-30 Pedro Alves <palves@redhat.com>
5831 * linux-low.c (thread_still_has_status_pending_p): Don't check
5833 (lwp_resumed): New function.
5834 (status_pending_p_callback): Return early if the LWP is not
5835 supposed to be resumed.
5837 2015-11-30 Pedro Alves <palves@redhat.com>
5839 * linux-low.c (handle_extended_wait): Assert that the LWP's
5840 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5841 thread create events, leave the new child's status pending.
5842 (linux_low_filter_event): If GDB wants to hear about thread exit
5843 events, leave the LWP marked dead and don't delete it.
5844 (linux_wait_for_event_filtered): Don't check for thread exit.
5845 (filter_exit_event): New function.
5846 (linux_wait_1): Use it, when returning an exit event.
5847 (linux_resume_one_lwp_throw): Assert that the LWP's
5848 waitstatus is TARGET_WAITKIND_IGNORE.
5849 * remote-utils.c (prepare_resume_reply): Handle
5850 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5851 * server.c (report_thread_events): New global.
5852 (handle_general_set): Handle QThreadEvents.
5853 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5854 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5855 TARGET_WAITKIND_THREAD_EXITED.
5856 * server.h (report_thread_events): Declare.
5858 2015-11-30 Pedro Alves <palves@redhat.com>
5860 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5861 the thread's last_resume_kind was resume_stop.
5863 2015-11-30 Pedro Alves <palves@redhat.com>
5865 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5868 2015-11-30 Pedro Alves <palves@redhat.com>
5870 * server.c (handle_v_requests): Handle vCtrlC.
5872 2015-11-30 Pedro Alves <palves@redhat.com>
5874 * gdbthread.h (find_any_thread_of_pid): Declare.
5875 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5877 * server.c (handle_query): If current_thread is NULL, look for
5878 another thread of the selected process.
5880 2015-11-26 Daniel Colascione <dancol@dancol.org>
5881 Simon Marchi <simon.marchi@ericsson.com>
5883 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5884 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5886 * target.h (struct target_ops) <thread_name>: New field.
5887 (target_thread_name): New macro.
5889 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5891 * regcache.h (regcache_invalidate_pid): Add declaration.
5892 * regcache.c (regcache_invalidate_pid): New function, extracted
5893 from regcache_invalidate.
5894 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5895 Add trivial documentation comment.
5896 * lynx-low.c: Use regcache_invalidate_pid instead of
5897 regcache_invalidate.
5899 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5901 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5902 and Elf64_auxv_t if the target is Android.
5904 2015-11-22 Doug Evans <xdje42@gmail.com>
5906 * target.h: #include <sys/types.h>.
5908 2015-11-19 Pedro Alves <palves@redhat.com>
5910 * linux-low.c (linux_process_qsupported): Change prototype.
5912 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5914 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5915 and adjust to loop over all features.
5916 * server.c (handle_query) <qSupported>: Adjust to call
5917 target_process_qsupported once, passing it a vector of unprocessed
5919 * target.h (struct target_ops) <process_qsupported>: Change
5921 (target_process_qsupported): Adjust.
5923 2015-11-19 Pedro Alves <palves@redhat.com>
5925 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5927 * configure: Regenerate.
5929 2015-11-19 Pedro Alves <palves@redhat.com>
5931 * configure: Regenerate.
5933 2015-11-19 Yao Qi <yao.qi@linaro.org>
5935 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5938 2015-11-19 Yao Qi <yao.qi@linaro.org>
5940 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5941 (struct aarch64_operand): Move enum out.
5943 2015-11-19 Yao Qi <yao.qi@linaro.org>
5945 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5946 struct user_fpsimd_state *.
5947 (aarch64_store_fpregset): Likewise.
5949 2015-11-19 Yao Qi <yao.qi@linaro.org>
5951 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5952 struct user_pt_regs *.
5953 (aarch64_store_gregset): Likewise.
5955 2015-11-18 Pedro Alves <palves@redhat.com>
5957 * Makefile.in (all_object_files): Add $IPA_OBJS.
5959 2015-11-17 Pedro Alves <palves@redhat.com>
5961 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5962 GDB_SIGNAL_0 and gdb_signal_to_string.
5964 2015-11-17 Pedro Alves <palves@redhat.com>
5966 * win32-low.c (handle_output_debug_string): Remove parameter.
5967 (win32_kill): Remove our_status local and adjust call to
5968 handle_output_debug_string.
5969 (get_child_debug_event): Adjust call to
5970 handle_output_debug_string.
5972 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5974 * linux-mips-low.c (mips_fill_gregset): Add cast.
5975 (mips_store_gregset): Likewise.
5976 (mips_fill_fpregset): Likewise.
5977 (mips_store_fpregset): Likewise.
5979 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5981 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5984 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5986 * linux-mips-low.c (mips_linux_new_thread): Change type of
5987 watch_type to enum target_hw_bp_type.
5989 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5991 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5992 Change return type to arm_hwbp_type.
5994 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5996 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5997 (arm_store_gregset): Likewise.
5998 * linux-arm-low.c (arm_get_hwcap): Likewise.
5999 (arm_read_description): Likewise.
6001 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6003 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6005 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6007 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6008 (ppc_fill_vsxregset): Likewise.
6009 (ppc_store_vsxregset): Likewise.
6010 (ppc_fill_vrregset): Likewise.
6011 (ppc_store_vrregset): Likewise.
6012 (ppc_fill_evrregset): Likewise.
6013 (ppc_store_evrregset): Likewise.
6015 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6017 * linux-ppc-low.c (ppc_usrregs_info): Remove
6018 forward-declaration.
6019 (ppc_arch_setup): Move lower in file.
6021 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6023 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6024 (ps_pdwrite): Likewise.
6026 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6028 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6029 to after assert checks.
6031 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6033 * proc-service.c (ps_pdread): Add/adjust casts.
6034 (ps_pdwrite): Add/adjust casts.
6036 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6038 * server.c (handle_search_memory_1): Cast return value of
6041 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6043 * server.c (write_qxfer_response): Change type of data to
6046 2015-10-29 Pedro Alves <palves@redhat.com>
6048 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6050 2015-10-29 Pedro Alves <palves@redhat.com>
6052 * tracepoint.c (clear_installed_tracepoints): Add casts.
6054 2015-10-29 Pedro Alves <palves@redhat.com>
6056 * server.c (handle_v_cont, process_serial_event): Add enum
6057 gdb_signal casts to signal parsing code.
6059 2015-10-29 Pedro Alves <palves@redhat.com>
6061 * linux-low.h (NULL_REGSET): Define.
6062 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6063 * linux-arm-low.c (arm_regsets): Likewise.
6064 * linux-crisv32-low.c (cris_regsets): Likewise.
6065 * linux-m68k-low.c (m68k_regsets): Likewise.
6066 * linux-mips-low.c (mips_regsets): Likewise.
6067 * linux-nios2-low.c (nios2_regsets): Likewise.
6068 * linux-ppc-low.c (ppc_regsets): Likewise.
6069 * linux-s390-low.c (s390_regsets): Likewise.
6070 * linux-sh-low.c (sh_regsets): Likewise.
6071 * linux-sparc-low.c (sparc_regsets): Likewise.
6072 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6073 * linux-tile-low.c (tile_regsets): Likewise.
6074 * linux-x86-low.c (x86_regsets): Likewise.
6075 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6077 2015-10-29 Pedro Alves <palves@redhat.com>
6079 * linux-low.h (NULL_REGSET): Define.
6080 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6081 * linux-arm-low.c (arm_regsets): Likewise.
6082 * linux-crisv32-low.c (cris_regsets): Likewise.
6083 * linux-m68k-low.c (m68k_regsets): Likewise.
6084 * linux-mips-low.c (mips_regsets): Likewise.
6085 * linux-nios2-low.c (nios2_regsets): Likewise.
6086 * linux-ppc-low.c (ppc_regsets): Likewise.
6087 * linux-s390-low.c (s390_regsets): Likewise.
6088 * linux-sh-low.c (sh_regsets): Likewise.
6089 * linux-sparc-low.c (sparc_regsets): Likewise.
6090 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6091 * linux-tile-low.c (tile_regsets): Likewise.
6092 * linux-x86-low.c (x86_regsets): Likewise.
6093 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6095 2015-10-26 Doug Evans <dje@google.com>
6097 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6099 2015-10-26 Doug Evans <dje@google.com>
6101 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6103 2015-10-26 Doug Evans <dje@google.com>
6105 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6107 (attach_thread, find_new_threads_callback): Ditto.
6109 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6111 * mem-break.h (set_breakpoint_data): Remove.
6113 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6115 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6116 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6117 (initialize_low): Remove set_breakpoint_data call.
6118 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6119 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6120 (initialize_low): Remove set_breakpoint_data call.
6121 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6122 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6123 (initialize_low): Remove set_breakpoint_data call.
6125 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6127 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6128 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6129 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6130 * target.h (target_breakpoint_kind_from_pc): New macro.
6132 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6134 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6135 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6136 the default breakpoint kind.
6138 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6140 * linux-arm-low.c (arm_supports_z_point_type): Add software
6143 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6145 * linux-arm-low.c: Refactor breakpoint definitions.
6146 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6147 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6149 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6151 * Makefile.in: Add arm.c/o.
6152 * configure.srv: Likewise.
6153 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6154 (arm_breakpoint_kind_from_pc): New function.
6155 (arm_sw_breakpoint_from_kind): Return proper kind.
6156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6158 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6160 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6162 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6163 (struct raw_breakpoint) <size>: Remove.
6164 (struct raw_breakpoint) <kind>: Add.
6165 (bp_size): New function.
6166 (bp_opcode): Likewise.
6167 (find_raw_breakpoint_at): Adjust for kind.
6168 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6169 (remove_memory_breakpoint): Adjust for kind call bp_size.
6170 (set_raw_breakpoint_at): Adjust for kind.
6171 (set_breakpoint): Likewise.
6172 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6173 (delete_raw_breakpoint): Adjust for kind.
6174 (delete_breakpoint): Likewise.
6175 (find_gdb_breakpoint): Likewise.
6176 (set_gdb_breakpoint_1): Likewise.
6177 (set_gdb_breakpoint): Likewise.
6178 (delete_gdb_breakpoint_1): Likewise.
6179 (delete_gdb_breakpoint): Likewise.
6180 (uninsert_raw_breakpoint): Likewise.
6181 (reinsert_raw_breakpoint): Likewise.
6182 (set_breakpoint_data): Remove.
6183 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6184 (check_mem_read): Adjust for kind call bp_size.
6185 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6186 (clone_one_breakpoint): Adjust for kind.
6187 * mem-break.h (set_gdb_breakpoint): Likewise.
6188 (delete_gdb_breakpoint): Likewise.
6189 * server.c (process_serial_event): Likewise.
6191 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6193 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6194 (struct linux_target_ops) <breakpoint>: Remove.
6195 (struct linux_target_ops) <breakpoint_len>: Remove.
6196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6198 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6199 (arm_sw_breakpoint_from_kind): New function.
6200 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6201 (struct linux_target_ops) <breakpoint>: Remove.
6202 (struct linux_target_ops) <breakpoint_len>: Remove.
6203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6205 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6206 (struct linux_target_ops) <breakpoint>: Remove.
6207 (struct linux_target_ops) <breakpoint_len>: Remove.
6208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6210 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6211 (struct linux_target_ops) <breakpoint>: Remove.
6212 (struct linux_target_ops) <breakpoint_len>: Remove.
6213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6215 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6216 and sw_breakpoint_from_kind to increment the pc.
6217 (linux_breakpoint_kind_from_pc): New function.
6218 (linux_sw_breakpoint_from_kind): New function.
6219 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6220 (initialize_low): Call breakpoint_kind_from_pc and
6221 sw_breakpoint_from_kind to replace breakpoint_data/len.
6222 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6225 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6226 (struct linux_target_ops) <breakpoint>: Remove.
6227 (struct linux_target_ops) <breakpoint_len>: Remove.
6228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6230 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6231 (struct linux_target_ops) <breakpoint>: Remove.
6232 (struct linux_target_ops) <breakpoint_len>: Remove.
6233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6235 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6236 (struct linux_target_ops) <breakpoint>: Remove.
6237 (struct linux_target_ops) <breakpoint_len>: Remove.
6238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6240 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6241 (struct linux_target_ops) <breakpoint>: Remove.
6242 (struct linux_target_ops) <breakpoint_len>: Remove.
6243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6245 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6246 (struct linux_target_ops) <breakpoint>: Remove.
6247 (struct linux_target_ops) <breakpoint_len>: Remove.
6248 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6250 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6251 (struct linux_target_ops) <breakpoint>: Remove.
6252 (struct linux_target_ops) <breakpoint_len>: Remove.
6253 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6254 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6255 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6256 (struct linux_target_ops) <breakpoint>: Remove.
6257 (struct linux_target_ops) <breakpoint_len>: Remove.
6258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6260 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6261 (struct linux_target_ops) <breakpoint>: Remove.
6262 (struct linux_target_ops) <breakpoint_len>: Remove.
6263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6265 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6266 (struct linux_target_ops) <breakpoint>: Remove.
6267 (struct linux_target_ops) <breakpoint_len>: Remove.
6268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6270 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6271 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6272 (struct linux_target_ops) <breakpoint>: Remove.
6273 (struct linux_target_ops) <breakpoint_len>: Remove.
6274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6276 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6277 (struct linux_target_ops) <breakpoint>: Remove.
6278 (struct linux_target_ops) <breakpoint_len>: Remove.
6279 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6280 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6282 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6284 * linux-cris-low.c (cris_get_pc): Remove void arg.
6286 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6288 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6291 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6293 * inferiors.c (thread_pid_matches_callback): New function.
6294 (find_thread_process): New function.
6295 (remove_thread): Reset current_thread.
6296 (remove_process): Assert threads have been removed first.
6298 2015-10-15 Yao Qi <yao.qi@linaro.org>
6300 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6302 (aarch64_remove_point): Likewise.
6303 * regcache.c (regcache_register_size): New function.
6305 2015-10-12 Yao Qi <yao.qi@linaro.org>
6307 * linux-aarch64-low.c: Update all callers as emit_load_store
6308 is renamed to aarch64_emit_load_store.
6310 2015-10-12 Yao Qi <yao.qi@linaro.org>
6312 * linux-aarch64-low.c: Update all callers of function renaming
6313 from emit_insn to aarch64_emit_insn.
6315 2015-10-12 Yao Qi <yao.qi@linaro.org>
6317 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6318 arch/aarch64-insn.h.
6319 (struct aarch64_memory_operand): Likewise.
6321 (emit_insn): Move to arch/aarch64-insn.c.
6322 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6323 (emit_load_store): Move to arch/aarch64-insn.c.
6324 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6325 (can_encode_int32): Remove.
6327 2015-10-12 Yao Qi <yao.qi@linaro.org>
6329 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6330 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6331 (aarch64_relocate_instruction): Likewise.
6332 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6333 (struct aarch64_insn_visitor): Likewise.
6335 2015-10-12 Yao Qi <yao.qi@linaro.org>
6337 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6338 (struct aarch64_insn_visitor): New.
6339 (struct aarch64_insn_relocation_data): New.
6340 (aarch64_ftrace_insn_reloc_b): New function.
6341 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6342 (aarch64_ftrace_insn_reloc_cb): Likewise.
6343 (aarch64_ftrace_insn_reloc_tb): Likewise.
6344 (aarch64_ftrace_insn_reloc_adr): Likewise.
6345 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6346 (aarch64_ftrace_insn_reloc_others): Likewise.
6348 (aarch64_relocate_instruction): Use visitor.
6350 2015-10-12 Yao Qi <yao.qi@linaro.org>
6352 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6353 int. Add argument buf.
6354 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6355 aarch64_relocate_instruction.
6357 2015-10-12 Yao Qi <yao.qi@linaro.org>
6359 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6360 argument insn. Remove local variable insn. Don't call
6362 (aarch64_install_fast_tracepoint_jump_pad): Call
6365 2015-09-30 Yao Qi <yao.qi@linaro.org>
6367 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6368 (emit_load_store_pair): Likewise.
6370 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6372 * dll.c (match_dll): Add cast(s).
6373 (unloaded_dll): Likewise.
6374 * linux-low.c (second_thread_of_pid_p): Likewise.
6375 (delete_lwp_callback): Likewise.
6376 (count_events_callback): Likewise.
6377 (select_event_lwp_callback): Likewise.
6378 (linux_set_resume_request): Likewise.
6379 * server.c (accumulate_file_name_length): Likewise.
6380 (emit_dll_description): Likewise.
6381 (handle_qxfer_threads_worker): Likewise.
6382 (visit_actioned_threads): Likewise.
6383 * thread-db.c (any_thread_of): Likewise.
6384 * tracepoint.c (same_process_p): Likewise.
6385 (match_blocktype): Likewise.
6386 (build_traceframe_info_xml): Likewise.
6388 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6390 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6392 (gdb_unparse_agent_expr): Likewise.
6393 * hostio.c (require_data): Likewise.
6394 (handle_pread): Likewise.
6395 * linux-low.c (disable_regset): Likewise.
6396 (fetch_register): Likewise.
6397 (store_register): Likewise.
6398 (get_dynamic): Likewise.
6399 (linux_qxfer_libraries_svr4): Likewise.
6400 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6401 (set_fast_tracepoint_jump): Likewise.
6402 (uninsert_fast_tracepoint_jumps_at): Likewise.
6403 (reinsert_fast_tracepoint_jumps_at): Likewise.
6404 (validate_inserted_breakpoint): Likewise.
6405 (clone_agent_expr): Likewise.
6406 * regcache.c (init_register_cache): Likewise.
6407 * remote-utils.c (putpkt_binary_1): Likewise.
6408 (decode_M_packet): Likewise.
6409 (decode_X_packet): Likewise.
6410 (look_up_one_symbol): Likewise.
6411 (relocate_instruction): Likewise.
6412 (monitor_output): Likewise.
6413 * server.c (handle_search_memory): Likewise.
6414 (handle_qxfer_exec_file): Likewise.
6415 (handle_qxfer_libraries): Likewise.
6416 (handle_qxfer): Likewise.
6417 (handle_query): Likewise.
6418 (handle_v_cont): Likewise.
6419 (handle_v_run): Likewise.
6420 (captured_main): Likewise.
6421 * target.c (write_inferior_memory): Likewise.
6422 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6423 * tracepoint.c (init_trace_buffer): Likewise.
6424 (add_tracepoint_action): Likewise.
6425 (add_traceframe): Likewise.
6426 (add_traceframe_block): Likewise.
6427 (cmd_qtdpsrc): Likewise.
6428 (cmd_qtdv): Likewise.
6429 (cmd_qtstatus): Likewise.
6430 (response_source): Likewise.
6431 (response_tsv): Likewise.
6432 (cmd_qtnotes): Likewise.
6433 (gdb_collect): Likewise.
6434 (initialize_tracepoint): Likewise.
6436 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6438 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6439 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6440 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6442 (enum aarch64_condition_codes): New enum.
6443 (w0): New static global.
6446 (struct aarch64_memory_operand) <type>: New
6447 MEMORY_OPERAND_POSTINDEX type.
6448 (postindex_memory_operand): New helper function.
6449 (emit_ret): New function.
6450 (emit_load_store_pair): New function, factored out of emit_stp
6451 with support for MEMORY_OPERAND_POSTINDEX.
6452 (emit_stp): Rewrite using emit_load_store_pair.
6453 (emit_ldp): New function.
6454 (emit_load_store): Likewise.
6455 (emit_ldr): Mention post-index instruction in comment.
6456 (emit_ldrh): New function.
6457 (emit_ldrb): New function.
6458 (emit_ldrsw): Mention post-index instruction in comment.
6459 (emit_str): Likewise.
6460 (emit_subs): New function.
6461 (emit_cmp): Likewise.
6462 (emit_and): Likewise.
6463 (emit_orr): Likewise.
6464 (emit_orn): Likewise.
6465 (emit_eor): Likewise.
6466 (emit_mvn): Likewise.
6467 (emit_lslv): Likewise.
6468 (emit_lsrv): Likewise.
6469 (emit_asrv): Likewise.
6470 (emit_mul): Likewise.
6471 (emit_sbfm): Likewise.
6472 (emit_sbfx): Likewise.
6473 (emit_ubfm): Likewise.
6474 (emit_ubfx): Likewise.
6475 (emit_csinc): Likewise.
6476 (emit_cset): Likewise.
6477 (emit_nop): Likewise.
6478 (emit_ops_insns): New helper function.
6479 (emit_pop): Likewise.
6480 (emit_push): Likewise.
6481 (aarch64_emit_prologue): New function.
6482 (aarch64_emit_epilogue): Likewise.
6483 (aarch64_emit_add): Likewise.
6484 (aarch64_emit_sub): Likewise.
6485 (aarch64_emit_mul): Likewise.
6486 (aarch64_emit_lsh): Likewise.
6487 (aarch64_emit_rsh_signed): Likewise.
6488 (aarch64_emit_rsh_unsigned): Likewise.
6489 (aarch64_emit_ext): Likewise.
6490 (aarch64_emit_log_not): Likewise.
6491 (aarch64_emit_bit_and): Likewise.
6492 (aarch64_emit_bit_or): Likewise.
6493 (aarch64_emit_bit_xor): Likewise.
6494 (aarch64_emit_bit_not): Likewise.
6495 (aarch64_emit_equal): Likewise.
6496 (aarch64_emit_less_signed): Likewise.
6497 (aarch64_emit_less_unsigned): Likewise.
6498 (aarch64_emit_ref): Likewise.
6499 (aarch64_emit_if_goto): Likewise.
6500 (aarch64_emit_goto): Likewise.
6501 (aarch64_write_goto_address): Likewise.
6502 (aarch64_emit_const): Likewise.
6503 (aarch64_emit_call): Likewise.
6504 (aarch64_emit_reg): Likewise.
6505 (aarch64_emit_pop): Likewise.
6506 (aarch64_emit_stack_flush): Likewise.
6507 (aarch64_emit_zero_ext): Likewise.
6508 (aarch64_emit_swap): Likewise.
6509 (aarch64_emit_stack_adjust): Likewise.
6510 (aarch64_emit_int_call_1): Likewise.
6511 (aarch64_emit_void_call_2): Likewise.
6512 (aarch64_emit_eq_goto): Likewise.
6513 (aarch64_emit_ne_goto): Likewise.
6514 (aarch64_emit_lt_goto): Likewise.
6515 (aarch64_emit_le_goto): Likewise.
6516 (aarch64_emit_gt_goto): Likewise.
6517 (aarch64_emit_ge_got): Likewise.
6518 (aarch64_emit_ops_impl): New static global variable.
6519 (aarch64_emit_ops): New target function, return
6520 &aarch64_emit_ops_impl.
6521 (struct linux_target_ops): Install it.
6523 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6525 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6526 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6528 * linux-aarch64-ipa.c: New file.
6529 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6531 (aarch64_get_thread_area): New target method.
6532 (extract_signed_bitfield): New helper function.
6533 (aarch64_decode_ldr_literal): New function.
6534 (enum aarch64_opcodes): New enum.
6535 (struct aarch64_register): New struct.
6536 (struct aarch64_operand): New struct.
6537 (x0): New static global.
6546 (aarch64_register): New helper function.
6547 (register_operand): Likewise.
6548 (immediate_operand): Likewise.
6549 (struct aarch64_memory_operand): New struct.
6550 (offset_memory_operand): New helper function.
6551 (preindex_memory_operand): Likewise.
6552 (enum aarch64_system_control_registers): New enum.
6553 (ENCODE): New macro.
6554 (emit_insn): New helper function.
6555 (emit_b): New function.
6556 (emit_bcond): Likewise.
6557 (emit_cb): Likewise.
6558 (emit_tb): Likewise.
6559 (emit_blr): Likewise.
6560 (emit_stp): Likewise.
6561 (emit_ldp_q_offset): Likewise.
6562 (emit_stp_q_offset): Likewise.
6563 (emit_load_store): Likewise.
6564 (emit_ldr): Likewise.
6565 (emit_ldrsw): Likewise.
6566 (emit_str): Likewise.
6567 (emit_ldaxr): Likewise.
6568 (emit_stxr): Likewise.
6569 (emit_stlr): Likewise.
6570 (emit_data_processing_reg): Likewise.
6571 (emit_data_processing): Likewise.
6572 (emit_add): Likewise.
6573 (emit_sub): Likewise.
6574 (emit_mov): Likewise.
6575 (emit_movk): Likewise.
6576 (emit_mov_addr): Likewise.
6577 (emit_mrs): Likewise.
6578 (emit_msr): Likewise.
6579 (emit_sevl): Likewise.
6580 (emit_wfe): Likewise.
6581 (append_insns): Likewise.
6582 (can_encode_int32_in): New helper function.
6583 (aarch64_relocate_instruction): New function.
6584 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6585 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6586 (struct linux_target_ops): Install aarch64_get_thread_area,
6587 aarch64_install_fast_tracepoint_jump_pad and
6588 aarch64_get_min_fast_tracepoint_insn_len.
6590 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6592 * Makefile.in (aarch64-insn.o): New rule.
6593 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6595 2015-09-21 Yao Qi <yao.qi@linaro.org>
6597 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6599 2015-09-21 Yao Qi <yao.qi@linaro.org>
6601 * tracepoint.c (max_jump_pad_size): Remove.
6603 2015-09-18 Yao Qi <yao.qi@linaro.org>
6605 * linux-aarch64-low.c: Don't include sys/uio.h.
6606 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6608 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6610 * tracepoint.c (eval_result_type): Change prototype.
6611 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6613 2015-09-15 Pedro Alves <palves@redhat.com>
6615 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6616 Check whether to report exec events instead of checking whether
6617 multiprocess is enabled.
6619 2015-09-15 Pedro Alves <palves@redhat.com>
6622 * remote-utils.c (prepare_resume_reply): Merge
6623 TARGET_WAITKIND_VFORK_DONE switch case with the
6624 TARGET_WAITKIND_FORKED case.
6626 2015-09-15 Yao Qi <yao.qi@linaro.org>
6628 * server.c (handle_query): Check string comparison using
6629 "else if" instead of "if".
6631 2015-09-15 Yao Qi <yao.qi@linaro.org>
6633 * server.c (vCont_supported): New global variable.
6634 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6635 matches. Append ";vContSupported+" to own_buf.
6636 (handle_v_requests): Append ";s;S" to own_buf if target supports
6637 hardware single step or vCont_supported is false.
6638 (capture_main): Set vCont_supported to zero.
6640 2015-09-15 Yao Qi <yao.qi@linaro.org>
6642 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6644 (linux_supports_hardware_single_step): ... New function.
6645 (linux_target_ops): Update.
6646 * lynx-low.c (lynx_target_ops): Set field
6647 supports_hardware_single_step to target_can_do_hardware_single_step.
6648 * nto-low.c (nto_target_ops): Likewise.
6649 * spu-low.c (spu_target_ops): Likewise.
6650 * win32-low.c (win32_target_ops): Likewise.
6651 * target.c (target_can_do_hardware_single_step): New function.
6652 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6653 Remove. <supports_hardware_single_step>: New field.
6654 (target_supports_conditional_breakpoints): Remove.
6655 (target_supports_hardware_single_step): New macro.
6656 (target_can_do_hardware_single_step): Declare.
6657 * server.c (handle_query): Use target_supports_hardware_single_step
6658 instead of target_supports_conditional_breakpoints.
6660 2015-09-15 Yao Qi <yao.qi@linaro.org>
6662 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6664 (struct linux_target_ops the_low_target): Install
6665 aarch64_linux_siginfo_fixup.
6667 2015-09-11 Don Breazeal <donb@codesourcery.com>
6668 Luis Machado <lgustavo@codesourcery.com>
6670 * linux-low.c (linux_mourn): Static declaration.
6671 (linux_arch_setup): Move in front of
6672 handle_extended_wait.
6673 (linux_arch_setup_thread): New function.
6674 (handle_extended_wait): Handle exec events. Call
6675 linux_arch_setup_thread. Make event_lwp argument a
6676 pointer-to-a-pointer.
6677 (check_zombie_leaders): Do not check stopped threads.
6678 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6679 (linux_low_filter_event): Add lwp and thread for exec'ing
6680 non-leader thread if leader thread has been deleted.
6681 Refactor code into linux_arch_setup_thread and call it.
6682 Pass child lwp pointer by reference to handle_extended_wait.
6683 (linux_wait_for_event_filtered): Update comment.
6684 (linux_wait_1): Prevent clobbering exec event status.
6685 (linux_supports_exec_events): New function.
6686 (linux_target_ops) <supports_exec_events>: Initialize new member.
6687 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6689 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6690 * server.c (report_exec_events): New global variable.
6691 (handle_query): Handle qSupported query for exec-events feature.
6692 (captured_main): Initialize report_exec_events.
6693 * server.h (report_exec_events): Declare new global variable.
6694 * target.h (struct target_ops) <supports_exec_events>: New
6696 (target_supports_exec_events): New macro.
6697 * win32-low.c (win32_target_ops) <supports_exec_events>:
6698 Initialize new member.
6700 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6702 * linux-low.c (linux_low_enable_btrace): Remove.
6703 (linux_target_ops): Replace linux_low_enable_btrace with
6704 linux_enable_btrace.
6706 2015-09-03 Yao Qi <yao.qi@linaro.org>
6708 * linux-aarch64-low.c (aarch64_insert_point): Call
6709 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6712 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6714 * linux-low.c (check_stopped_by_breakpoint): Use
6715 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6717 2015-08-27 Pedro Alves <palves@redhat.com>
6719 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6721 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6723 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6724 the XNEW-family equivalent.
6725 (compile_bytecodes): Likewise.
6726 * dll.c (loaded_dll): Likewise.
6727 * event-loop.c (append_callback_event): Likewise.
6728 (create_file_handler): Likewise.
6729 (create_file_event): Likewise.
6730 * hostio.c (handle_open): Likewise.
6731 * inferiors.c (add_thread): Likewise.
6732 (add_process): Likewise.
6733 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6734 * linux-arm-low.c (arm_new_process): Likewise.
6735 (arm_new_thread): Likewise.
6736 * linux-low.c (add_to_pid_list): Likewise.
6737 (linux_add_process): Likewise.
6738 (handle_extended_wait): Likewise.
6739 (add_lwp): Likewise.
6740 (enqueue_one_deferred_signal): Likewise.
6741 (enqueue_pending_signal): Likewise.
6742 (linux_resume_one_lwp_throw): Likewise.
6743 (linux_resume_one_thread): Likewise.
6744 (linux_read_memory): Likewise.
6745 (linux_write_memory): Likewise.
6746 * linux-mips-low.c (mips_linux_new_process): Likewise.
6747 (mips_linux_new_thread): Likewise.
6748 (mips_add_watchpoint): Likewise.
6749 * linux-x86-low.c (initialize_low_arch): Likewise.
6750 * lynx-low.c (lynx_add_process): Likewise.
6751 * mem-break.c (set_raw_breakpoint_at): Likewise.
6752 (set_breakpoint): Likewise.
6753 (add_condition_to_breakpoint): Likewise.
6754 (add_commands_to_breakpoint): Likewise.
6755 (clone_agent_expr): Likewise.
6756 (clone_one_breakpoint): Likewise.
6757 * regcache.c (new_register_cache): Likewise.
6758 * remote-utils.c (look_up_one_symbol): Likewise.
6759 * server.c (queue_stop_reply): Likewise.
6760 (start_inferior): Likewise.
6761 (queue_stop_reply_callback): Likewise.
6762 (handle_target_event): Likewise.
6763 * spu-low.c (fetch_ppc_memory): Likewise.
6764 (store_ppc_memory): Likewise.
6765 * target.c (set_target_ops): Likewise.
6766 * thread-db.c (thread_db_load_search): Likewise.
6767 (try_thread_db_load_1): Likewise.
6768 * tracepoint.c (add_tracepoint): Likewise.
6769 (add_tracepoint_action): Likewise.
6770 (create_trace_state_variable): Likewise.
6771 (cmd_qtdpsrc): Likewise.
6772 (cmd_qtro): Likewise.
6773 (add_while_stepping_state): Likewise.
6774 * win32-low.c (child_add_thread): Likewise.
6775 (get_image_name): Likewise.
6777 2015-08-25 Yao Qi <yao.qi@linaro.org>
6779 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6781 2015-08-25 Yao Qi <yao.qi@linaro.org>
6783 * Makefile.in (aarch64-linux.o): New rule.
6784 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6786 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6787 (aarch64_init_debug_reg_state): Make it extern.
6788 (aarch64_linux_prepare_to_resume): Remove.
6790 2015-08-25 Yao Qi <yao.qi@linaro.org>
6792 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6793 lwp_arch_private_info and ptid_of_lwp.
6795 2015-08-25 Yao Qi <yao.qi@linaro.org>
6797 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6798 Find proc_info by find_process_pid. All callers updated.
6800 2015-08-25 Yao Qi <yao.qi@linaro.org>
6802 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6804 (debug_reg_change_callback): Remove.
6805 (aarch64_notify_debug_reg_change): Remove.
6807 2015-08-25 Yao Qi <yao.qi@linaro.org>
6809 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6810 Call current_lwp_ptid.
6812 2015-08-25 Yao Qi <yao.qi@linaro.org>
6814 * linux-aarch64-low.c (debug_reg_change_callback): Use
6817 2015-08-25 Yao Qi <yao.qi@linaro.org>
6819 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6821 2015-08-25 Yao Qi <yao.qi@linaro.org>
6823 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6825 2015-08-25 Yao Qi <yao.qi@linaro.org>
6827 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6830 2015-08-25 Yao Qi <yao.qi@linaro.org>
6832 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6834 (debug_reg_change_callback): Remove argument entry and add argument
6835 lwp. Remove local variable thread. Don't print thread id in the
6836 debugging output. Don't check whether pid of thread equals to pid.
6837 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6838 iterate_over_lwps instead find_inferior.
6840 2015-08-24 Pedro Alves <palves@redhat.com>
6842 * inferiors.c (get_first_process): New function.
6843 * inferiors.h (get_first_process): New declaration.
6844 * remote-utils.c (read_ptid): Default to the first process in the
6845 list, instead of to the current thread's process.
6847 2015-08-24 Pedro Alves <palves@redhat.com>
6849 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6850 * event-loop.c: Likewise.
6851 * remote-utils.c: Likewise.
6852 * tracepoint.c: Likewise.
6854 2015-08-24 Pedro Alves <palves@redhat.com>
6856 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6859 2015-08-21 Pedro Alves <palves@redhat.com>
6861 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6862 instead of literal 1.
6864 2015-08-21 Pedro Alves <palves@redhat.com>
6866 * tdesc.c (default_description): Explicitly zero-initialize.
6868 2015-08-21 Pedro Alves <palves@redhat.com>
6871 * inferiors.c (remove_thread): Discard any pending stop reply for
6873 * server.c (remove_all_on_match_pid): Rename to ...
6874 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6876 (discard_queued_stop_replies): Change parameter to a ptid. Now
6878 (handle_v_kill, kill_inferior_callback, captured_main)
6879 (process_serial_event): Adjust.
6880 * server.h (discard_queued_stop_replies): Declare.
6882 2015-08-21 Pedro Alves <palves@redhat.com>
6884 * linux-low.c (wait_for_sigstop): Always switch to no thread
6885 selected if the previously current thread dies.
6886 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6887 process instead of the current thread's.
6888 * remote-utils.c (input_interrupt): Don't check if there's no
6890 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6891 current thread to the general thread fails, error out.
6892 (handle_qxfer_auxv, handle_qxfer_libraries)
6893 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6894 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6895 (handle_query): Check if there's a thread selected instead of
6896 checking whether there's any thread in the thread list.
6897 (handle_qxfer_threads, handle_qxfer_btrace)
6898 (handle_qxfer_btrace_conf): Don't error out early if there's no
6899 thread in the thread list.
6900 (handle_v_cont, myresume): Don't set the current thread to the
6902 (process_serial_event) <Hg handling>: Also set thread_id if the
6903 previous general thread is still alive.
6904 (process_serial_event) <g/G handling>: If setting the current
6905 thread to the general thread fails, error out.
6906 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6907 thread's lwp instead of the current thread's.
6908 * target.c (set_desired_thread): If the desired thread was not
6909 found, leave the current thread pointing to NULL. Return an int
6910 (boolean) indicating success.
6911 * target.h (set_desired_thread): Change return type to int.
6913 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6915 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6916 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6918 (ps_get_thread_area): New function.
6920 2015-08-19 Gary Benson <gbenson@redhat.com>
6922 * hostio.c (handle_pread): Do not attempt to read more data
6923 than hostio_reply_with_data can fit in a packet.
6925 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6927 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6929 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6931 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6933 2015-08-06 Pedro Alves <palves@redhat.com>
6935 * tracepoint.c (expr_eval_result): Now an int.
6937 2015-08-06 Pedro Alves <palves@redhat.com>
6939 * gdbthread.h (struct regcache): Forward declare.
6940 (struct thread_info) <regcache_data>: Now a struct regcache
6942 * inferiors.c (inferior_regcache_data)
6943 (set_inferior_regcache_data): Now work with struct regcache
6945 * inferiors.h (struct regcache): Forward declare.
6946 (inferior_regcache_data, set_inferior_regcache_data): Now work
6947 with struct regcache pointers.
6948 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6949 (free_register_cache_thread): Remove struct regcache pointer
6952 2015-08-06 Pedro Alves <palves@redhat.com>
6954 * server.c (captured_main): On error, print the exception message
6955 to stderr, and if run_once is set, throw a quit.
6957 2015-08-06 Pedro Alves <palves@redhat.com>
6959 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6962 2015-08-06 Pedro Alves <palves@redhat.com>
6964 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6965 reading beyond the passed in buffer length.
6967 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6969 * tracepoint.c (symbol_list) <required>: Remove.
6971 2015-08-06 Pedro Alves <palves@redhat.com>
6973 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6974 count if stopping and suspending threads.
6975 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6976 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6977 (linux_detach): Complete an ongoing step-over.
6978 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6980 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6981 (linux_wait_1): If passing a signal to the inferior after
6982 finishing a step-over, unsuspend and re-resume all lwps. If we
6983 see a single-step event but the thread should be continuing, don't
6984 pass the trap to gdb.
6985 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6986 internal_error instead of gdb_assert.
6987 (enqueue_pending_signal): New function.
6988 (check_ptrace_stopped_lwp_gone): Add debug output.
6989 (start_step_over): Use internal_error instead of gdb_assert.
6990 (complete_ongoing_step_over): New function.
6991 (linux_resume_one_thread): Don't resume a suspended thread.
6992 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6995 2015-08-06 Pedro Alves <palves@redhat.com>
6997 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6998 (linux_thread_alive): Use lwp_is_marked_dead.
6999 (extended_event_reported): Delete.
7000 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7001 instead of extended_event_reported.
7002 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7004 (lwp_is_marked_dead): New function.
7005 (lwp_running): Use lwp_is_marked_dead.
7006 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7009 2015-08-06 Pedro Alves <palves@redhat.com>
7011 * linux-low.c (linux_wait_1): Move fork event output out of the
7012 !report_to_gdb check. Pass event_child->waitstatus to
7013 target_waitstatus_to_string instead of ourstatus.
7015 2015-08-04 Yao Qi <yao.qi@linaro.org>
7017 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7018 if current_thread is 32 bit.
7020 2015-08-04 Yao Qi <yao.qi@linaro.org>
7022 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7023 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7024 * server.c (extended_protocol): Remove "static".
7025 * server.h (extended_protocol): Declare it.
7027 2015-08-04 Yao Qi <yao.qi@linaro.org>
7029 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7030 both aarch64 and aarch32.
7031 (aarch64_set_pc): Likewise.
7033 2015-08-04 Yao Qi <yao.qi@linaro.org>
7035 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7036 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7037 arm-with-neon.xml to srv_xmlfiles.
7038 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7039 (is_64bit_tdesc): New function.
7040 (aarch64_linux_read_description): New function.
7041 (aarch64_arch_setup): Call aarch64_linux_read_description.
7042 (regs_info): Rename to regs_info_aarch64.
7043 (aarch64_regs_info): Return right regs_info.
7044 (initialize_low_arch): Call initialize_low_arch_aarch32.
7046 2015-08-04 Yao Qi <yao.qi@linaro.org>
7048 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7049 * linux-aarch32-low.c: New file.
7050 * linux-aarch32-low.h: New file.
7051 * linux-arm-low.c (arm_fill_gregset): Move it to
7052 linux-aarch32-low.c.
7053 (arm_store_gregset): Likewise.
7054 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7055 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7056 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7057 (regs_info): Rename to regs_info_arm.
7058 (arm_regs_info): Return regs_info_aarch32 if
7059 have_ptrace_getregset is 1 and target description is
7060 arm_with_neon or arm_with_vfpv3.
7061 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7062 Call initialize_low_arch_aarch32 instead.
7064 2015-08-04 Yao Qi <yao.qi@linaro.org>
7066 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7067 * linux-low.c: ... here.
7068 * linux-low.h (have_ptrace_getregset): Declare it.
7070 2015-08-04 Pedro Alves <palves@redhat.com>
7072 * thread-db.c (struct thread_db): Use new typedefs.
7073 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7075 (disable_thread_event_reporting): Cast result of dlsym to
7076 destination function pointer type.
7077 (thread_db_mourn): Use td_ta_delete_ftype.
7079 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7081 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7083 (CDX_BREAKPOINT): Define for R2.
7084 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7085 (the_low_target): Add comments.
7087 2015-07-30 Yao Qi <yao.qi@linaro.org>
7089 * linux-arm-low.c (arm_hwcap): Remove it.
7090 (arm_read_description): New local variable arm_hwcap. Don't
7091 set arm_hwcap to zero.
7093 2015-07-30 Yao Qi <yao.qi@linaro.org>
7095 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7096 Use regcache->tdesc instead.
7097 (arm_store_wmmxregset): Likewise.
7098 (arm_fill_vfpregset): Likewise.
7099 (arm_store_vfpregset): Likewise.
7101 2015-07-30 Yao Qi <yao.qi@linaro.org>
7103 * linux-arm-low.c: Include arch/arm.h.
7104 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7105 (arm_store_gregset): Likewise.
7107 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7109 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7110 ptrace's 4th parameter.
7112 2015-07-27 Yao Qi <yao.qi@linaro.org>
7114 * configure.srv (case aarch64*-*-linux*): Don't set
7117 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7119 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7121 * linux-arm-low.c: Likewise.
7122 * linux-cris-low.c: Likewise.
7123 * linux-crisv32-low.c: Likewise.
7124 * linux-low.c: Likewise.
7125 * linux-m68k-low.c: Likewise.
7126 * linux-mips-low.c: Likewise.
7127 * linux-nios2-low.c: Likewise.
7128 * linux-s390-low.c: Likewise.
7129 * linux-sparc-low.c: Likewise.
7130 * linux-tic6x-low.c: Likewise.
7131 * linux-tile-low.c: Likewise.
7132 * linux-x86-low.c: Likewise.
7134 2015-07-24 Pedro Alves <palves@redhat.com>
7136 * config.in: Regenerate.
7137 * configure: Regenerate.
7139 2015-07-24 Pedro Alves <palves@redhat.com>
7141 * acinclude.m4: Include ../ptrace.m4.
7142 * configure.ac: Call GDB_AC_PTRACE.
7143 * config.in, configure: Regenerate.
7145 2015-07-24 Yao Qi <yao.qi@linaro.org>
7147 * linux-low.c (linux_create_inferior): Remove setting to
7148 proc->priv->new_inferior.
7149 (linux_attach): Likewise.
7150 (linux_low_filter_event): Likewise.
7151 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7153 2015-07-24 Yao Qi <yao.qi@linaro.org>
7155 * linux-low.c (linux_arch_setup): New function.
7156 (linux_low_filter_event): If proc->tdesc is NULL and
7157 proc->attached is true, call the_low_target.arch_setup.
7158 Otherwise, keep status pending, and return.
7159 (linux_resume_one_lwp_throw): Don't call get_pc if
7160 thread->while_stepping isn't NULL. Don't call
7161 get_thread_regcache if proc->tdesc is NULL.
7162 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7163 (linux_target_ops): Install arch_setup.
7164 * server.c (start_inferior): Call the_target->arch_setup.
7165 * target.h (struct target_ops) <arch_setup>: New field.
7166 (target_arch_setup): New marco.
7167 * lynx-low.c (lynx_target_ops): Update.
7168 * nto-low.c (nto_target_ops): Update.
7169 * spu-low.c (spu_target_ops): Update.
7170 * win32-low.c (win32_target_ops): Update.
7172 2015-07-24 Yao Qi <yao.qi@linaro.org>
7174 * linux-low.c (linux_add_process): Don't set
7175 proc->priv->new_inferior.
7176 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7177 (linux_attach): Likewise.
7179 2015-07-24 Yao Qi <yao.qi@linaro.org>
7181 * server.c (start_inferior): Code refactor.
7183 2015-07-24 Yao Qi <yao.qi@linaro.org>
7185 * server.c (process_serial_event): Set general_thread.
7187 2015-07-21 Yao Qi <yao.qi@linaro.org>
7189 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7190 aarch64_linux_get_debug_reg_capacity.
7192 2015-07-17 Yao Qi <yao.qi@linaro.org>
7194 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7195 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7196 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7197 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7198 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7199 (AARCH64_HWP_ALIGNMENT): Likewise.
7200 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7201 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7202 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7203 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7204 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7205 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7206 (struct aarch64_debug_reg_state): Likewise.
7207 (struct arch_lwp_info): Likewise.
7208 (aarch64_align_watchpoint): Likewise.
7209 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7210 (aarch64_watchpoint_length): Likewise.
7211 (aarch64_point_encode_ctrl_reg): Likewise
7212 (aarch64_point_is_aligned): Likewise.
7213 (aarch64_align_watchpoint): Likewise.
7214 (aarch64_linux_set_debug_regs):
7215 (aarch64_dr_state_insert_one_point): Likewise.
7216 (aarch64_dr_state_remove_one_point): Likewise.
7217 (aarch64_handle_breakpoint): Likewise.
7218 (aarch64_handle_aligned_watchpoint): Likewise.
7219 (aarch64_handle_unaligned_watchpoint): Likewise.
7220 (aarch64_handle_watchpoint): Likewise.
7222 2015-07-17 Yao Qi <yao.qi@linaro.org>
7224 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7225 and don't aarch64_get_debug_reg_state. All callers update.
7226 (aarch64_handle_aligned_watchpoint): Likewise.
7227 (aarch64_handle_unaligned_watchpoint): Likewise.
7228 (aarch64_handle_watchpoint): Likewise.
7229 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7230 (aarch64_remove_point): Likewise.
7232 2015-07-17 Yao Qi <yao.qi@linaro.org>
7234 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7236 (aarch64_handle_unaligned_watchpoint): Likewise.
7238 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7240 Revert the previous 3 commits:
7241 Move gdb_regex* to common/
7242 Move linux_find_memory_regions_full & co.
7243 gdbserver build-id attribute generator
7245 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7246 Jan Kratochvil <jan.kratochvil@redhat.com>
7248 gdbserver build-id attribute generator.
7249 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7250 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7251 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7253 (get_dynamic): Use find_pdhr to traverse program headers.
7254 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7255 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7256 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7257 (get_hex_build_id): New.
7258 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7259 to reply XML document.
7261 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7262 Jan Kratochvil <jan.kratochvil@redhat.com>
7264 * target.c: Include target/target-utils.h and fcntl.h.
7265 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7266 (target_fileio_read_stralloc): New functions.
7268 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7270 * Makefile.in (OBS): Add gdb_regex.o.
7272 * config.in: Rebuilt.
7273 * configure: Rebuilt.
7275 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7276 Jan Kratochvil <jan.kratochvil@redhat.com>
7278 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7279 * Makefile.in (OBS): Add target-utils.o.
7280 (linux-maps.o, target-utils.o): New.
7281 * configure.srv (srv_linux_obj): Add linux-maps.o.
7283 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7285 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7287 (the_low_target): Install it.
7289 2015-07-14 Pedro Alves <palves@redhat.com>
7291 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7292 Instead, ignore ECHILD, and throw an error for other errnos.
7294 2015-07-10 Pedro Alves <palves@redhat.com>
7296 * event-loop.c (struct callback_event) <data>: Change type to
7297 gdb_client_data instance instead of gdb_client_data pointer.
7298 (append_callback_event): Adjust.
7300 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7302 * linux-aarch64-low.c: Add comments for each linux_target_ops
7303 method. Remove comments already covered in target_ops and
7304 linux_target_ops definitions.
7305 (the_low_target): Add comments for each unimplemented method.
7307 2015-07-09 Yao Qi <yao.qi@linaro.org>
7309 * linux-aarch64-low.c (aarch64_regmap): Remove.
7310 (aarch64_usrregs_info): Remove.
7311 (regs_info): Set field usrregs to NULL.
7313 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7315 * linux-low.c: Include "rsp-low.h"
7316 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7317 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7318 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7319 (handle_btrace_enable_pt): New.
7320 (handle_btrace_general_set): Support "pt".
7321 (handle_btrace_conf_general_set): Support "pt:size".
7323 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7325 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7328 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7330 * linux-aarch64-low.c: Remove comment about endianness.
7331 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7332 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7335 2015-06-24 Gary Benson <gbenson@redhat.com>
7337 * linux-i386-ipa.c (stdint.h): Do not include.
7338 * lynx-i386-low.c (stdint.h): Likewise.
7339 * lynx-ppc-low.c (stdint.h): Likewise.
7340 * mem-break.c (stdint.h): Likewise.
7341 * thread-db.c (stdint.h): Likewise.
7342 * tracepoint.c (stdint.h): Likewise.
7343 * win32-low.c (stdint.h): Likewise.
7345 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7347 * server.c (write_qxfer_response): Update call to
7348 remote_escape_output.
7350 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7351 Jan Kratochvil <jan.kratochvil@redhat.com>
7353 Merge multiple hex conversions.
7354 * gdbreplay.c (tohex): Rename to 'fromhex'.
7355 (logchar): Use fromhex.
7357 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7359 * server.c (handle_qxfer_libraries): Set `version' attribute for
7362 2015-06-10 Gary Benson <gbenson@redhat.com>
7364 * target.h (struct target_ops) <multifs_open>: New field.
7365 <multifs_unlink>: Likewise.
7366 <multifs_readlink>: Likewise.
7367 * linux-low.c (nat/linux-namespaces.h): New include.
7368 (linux_target_ops): Initialize the_target->multifs_open,
7369 the_target->multifs_unlink and the_target->multifs_readlink.
7370 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7371 * hostio.c (hostio_fs_pid): New static variable.
7372 (hostio_handle_new_gdb_connection): New function.
7373 (handle_setfs): Likewise.
7374 (handle_open): Use the_target->multifs_open as appropriate.
7375 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7376 (handle_readlink): Use the_target->multifs_readlink as
7378 (handle_vFile): Handle vFile:setfs packets.
7379 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7380 after target_handle_new_gdb_connection.
7382 2015-06-10 Gary Benson <gbenson@redhat.com>
7384 * configure.ac (AC_CHECK_FUNCS): Add setns.
7385 * config.in: Regenerate.
7386 * configure: Likewise.
7387 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7388 (linux-namespaces.o): New rule.
7389 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7391 2015-06-09 Gary Benson <gbenson@redhat.com>
7393 * hostio.c (handle_open): Process mode argument with
7394 fileio_to_host_mode.
7396 2015-06-01 Yao Qi <yao.qi@linaro.org>
7398 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7399 * linux-x86-low.c: Likewise.
7401 2015-05-28 Don Breazeal <donb@codesourcery.com>
7403 * linux-low.c (handle_extended_wait): Initialize
7404 thread_info.last_resume_kind for new fork children.
7406 2015-05-15 Pedro Alves <palves@redhat.com>
7408 * target.h (target_handle_new_gdb_connection): Rewrite using if
7409 wrapped in do/while.
7411 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7413 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7414 * configure, config.in: Regenerate.
7415 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7418 2015-05-12 Don Breazeal <donb@codesourcery.com>
7420 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7421 PTRACE_EVENT_VFORK_DONE.
7422 (linux_low_ptrace_options, extended_event_reported): Add vfork
7424 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7425 and "vforkdone" for RSP 'T' Stop Reply Packet.
7426 * server.h (report_vfork_events): Declare
7429 2015-05-12 Don Breazeal <donb@codesourcery.com>
7431 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7432 (the_low_target) <new_fork>: Initialize new member.
7433 * linux-arm-low.c (arm_new_fork): New function.
7434 (the_low_target) <new_fork>: Initialize new member.
7435 * linux-low.c (handle_extended_wait): Call new target function
7437 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7438 * linux-mips-low.c (mips_add_watchpoint): New function
7439 extracted from mips_insert_point.
7440 (the_low_target) <new_fork>: Initialize new member.
7441 (mips_linux_new_fork): New function.
7442 (mips_insert_point): Call mips_add_watchpoint.
7443 * linux-x86-low.c (x86_linux_new_fork): New function.
7444 (the_low_target) <new_fork>: Initialize new member.
7446 2015-05-12 Don Breazeal <donb@codesourcery.com>
7448 * linux-low.c (handle_extended_wait): Implement return value,
7449 rename argument 'event_child' to 'event_lwp', handle
7450 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7451 (linux_low_ptrace_options): New function.
7452 (linux_low_filter_event): Call linux_low_ptrace_options,
7453 use different argument fo linux_enable_event_reporting,
7454 use return value from handle_extended_wait.
7455 (extended_event_reported): New function.
7456 (linux_wait_1): Call extended_event_reported and set
7457 status to report fork events.
7458 (linux_write_memory): Add pid to debug message.
7459 (reset_lwp_ptrace_options_callback): New function.
7460 (linux_handle_new_gdb_connection): New function.
7461 (linux_target_ops): Initialize new structure member.
7462 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7463 * lynx-low.c: Initialize new structure member.
7464 * remote-utils.c (prepare_resume_reply): Implement stop reason
7465 "fork" for "T" stop message.
7466 * server.c (handle_query): Call handle_new_gdb_connection.
7467 * server.h (report_fork_events): Declare global flag.
7468 * target.h (struct target_ops) <handle_new_gdb_connection>:
7470 (target_handle_new_gdb_connection): New macro.
7471 * win32-low.c: Initialize new structure member.
7473 2015-05-12 Don Breazeal <donb@codesourcery.com>
7475 * mem-break.c (APPEND_TO_LIST): Define macro.
7476 (clone_agent_expr): New function.
7477 (clone_one_breakpoint): New function.
7478 (clone_all_breakpoints): New function.
7479 * mem-break.h: Declare new functions.
7481 2015-05-12 Don Breazeal <donb@codesourcery.com>
7483 * linux-low.c (linux_supports_fork_events): New function.
7484 (linux_supports_vfork_events): New function.
7485 (linux_target_ops): Initialize new structure members.
7486 (initialize_low): Call linux_check_ptrace_features.
7487 * lynx-low.c (lynx_target_ops): Initialize new structure
7489 * server.c (report_fork_events, report_vfork_events):
7491 (handle_query): Add new features to qSupported packet and
7493 (captured_main): Initialize new global variables.
7494 * target.h (struct target_ops) <supports_fork_events>:
7496 <supports_vfork_events>: New member.
7497 (target_supports_fork_events): New macro.
7498 (target_supports_vfork_events): New macro.
7499 * win32-low.c (win32_target_ops): Initialize new structure
7502 2015-05-12 Gary Benson <gbenson@redhat.com>
7504 * server.c (handle_qxfer_exec_file): Use current process
7507 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7509 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7510 Remove HAVE_PTRACE_GETREGS conditionals.
7511 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7512 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7514 2015-05-08 Yao Qi <yao.qi@linaro.org>
7516 * linux-low.c (linux_supports_conditional_breakpoints): New
7518 (linux_target_ops): Install new target method.
7519 * lynx-low.c (lynx_target_ops): Install NULL hook for
7520 supports_conditional_breakpoints.
7521 * nto-low.c (nto_target_ops): Likewise.
7522 * spu-low.c (spu_target_ops): Likewise.
7523 * win32-low.c (win32_target_ops): Likewise.
7524 * server.c (handle_query): Check
7525 target_supports_conditional_breakpoints.
7526 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7528 (target_supports_conditional_breakpoints): New macro.
7530 2015-05-06 Pedro Alves <palves@redhat.com>
7533 * server.c (start_inferior): If the process exits, mourn it.
7535 2015-04-21 Gary Benson <gbenson@redhat.com>
7537 * hostio.c (fileio_open_flags_to_host): Factored out to
7538 fileio_to_host_openflags in common/fileio.c. Single use
7541 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7543 * linux-xtensa-low.c (xtensa_fill_gregset)
7544 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7547 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7549 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7550 (regs_info): Replace usrregs pointer with NULL.
7552 2015-04-17 Gary Benson <gbenson@redhat.com>
7554 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7555 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7556 * server.c (handle_qxfer_exec_file): New function.
7557 (qxfer_packets): Add exec-file entry.
7558 (handle_query): Report qXfer:exec-file:read as supported packet.
7560 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7562 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7564 2015-04-09 Gary Benson <gbenson@redhat.com>
7566 * hostio-errno.c (errno_to_fileio_error): Remove function.
7567 Update caller to use remote_fileio_to_fio_error.
7569 2015-04-09 Yao Qi <yao.qi@linaro.org>
7571 * linux-low.c (linux_insert_point): Call
7572 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7573 (linux_remove_point): Call remove_memory_breakpoint if type is
7575 * linux-x86-low.c (x86_insert_point): Don't call
7576 insert_memory_breakpoint.
7577 (x86_remove_point): Don't call remove_memory_breakpoint.
7579 2015-04-01 Pedro Alves <palves@redhat.com>
7580 Cleber Rosa <crosa@redhat.com>
7582 * server.c (gdbserver_usage): Reorganize and extend the usage
7585 2015-03-24 Pedro Alves <palves@redhat.com>
7587 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7588 output. Also dump TRAP_TRACE.
7589 (linux_low_filter_event): In debug output, distinguish a
7590 resume_stop SIGSTOP from a delayed SIGSTOP.
7592 2015-03-24 Gary Benson <gbenson@redhat.com>
7594 * linux-x86-low.c (x86_linux_new_thread): Moved to
7596 (x86_linux_prepare_to_resume): Likewise.
7598 2015-03-24 Gary Benson <gbenson@redhat.com>
7600 * Makefile.in (x86-linux-dregs.o): New rule.
7601 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7602 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7603 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7604 (x86_linux_dr_get): Likewise.
7605 (x86_linux_dr_set): Likewise.
7606 (update_debug_registers_callback): Likewise.
7607 (x86_linux_dr_set_addr): Likewise.
7608 (x86_linux_dr_get_addr): Likewise.
7609 (x86_linux_dr_set_control): Likewise.
7610 (x86_linux_dr_get_control): Likewise.
7611 (x86_linux_dr_get_status): Likewise.
7612 (x86_linux_update_debug_registers): Likewise.
7614 2015-03-24 Gary Benson <gbenson@redhat.com>
7616 * linux-x86-low.c (x86_linux_update_debug_registers):
7617 New function, factored out from...
7618 (x86_linux_prepare_to_resume): ...this.
7620 2015-03-24 Gary Benson <gbenson@redhat.com>
7622 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7623 (x86_linux_dr_set): Likewise.
7624 (update_debug_registers_callback): Likewise.
7625 (x86_linux_dr_set_addr): Likewise.
7626 (x86_linux_dr_get_addr): Likewise.
7627 (x86_linux_dr_set_control): Likewise.
7628 (x86_linux_dr_get_control): Likewise.
7629 (x86_linux_dr_get_status): Likewise.
7630 (x86_linux_prepare_to_resume): Likewise.
7632 2015-03-24 Gary Benson <gbenson@redhat.com>
7634 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7635 Use perror_with_name. Pass string through gettext.
7636 (x86_linux_dr_set): Likewise.
7638 2015-03-24 Gary Benson <gbenson@redhat.com>
7640 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7641 (x86_linux_dr_set_addr): ...this.
7642 (x86_dr_low_get_addr): Rename to...
7643 (x86_linux_dr_get_addr): ...this.
7644 (x86_dr_low_set_control): Rename to...
7645 (x86_linux_dr_set_control): ...this.
7646 (x86_dr_low_get_control): Rename to...
7647 (x86_linux_dr_get_control): ...this.
7648 (x86_dr_low_get_status): Rename to...
7649 (x86_linux_dr_get_status): ...this.
7650 (x86_dr_low): Update with new function names.
7652 2015-03-24 Gary Benson <gbenson@redhat.com>
7654 * Makefile.in (x86-linux.o): New rule.
7655 * configure.srv: Add x86-linux.o to relevant targets.
7656 * linux-low.c (lwp_set_arch_private_info): New function.
7657 (lwp_arch_private_info): Likewise.
7658 * linux-x86-low.c: Include nat/x86-linux.h.
7659 (arch_lwp_info): Removed structure.
7660 (update_debug_registers_callback):
7661 Use lwp_set_debug_registers_changed.
7662 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7663 and lwp_set_debug_registers_changed.
7664 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7666 2015-03-24 Gary Benson <gbenson@redhat.com>
7668 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7669 * linux-arm-low.c (arm_new_thread): Likewise.
7670 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7671 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7672 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7673 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7675 2015-03-24 Gary Benson <gbenson@redhat.com>
7677 * linux-low.c (ptid_of_lwp): New function.
7678 (lwp_is_stopped): Likewise.
7679 (lwp_stop_reason): Likewise.
7680 * linux-x86-low.c (update_debug_registers_callback):
7682 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7685 2015-03-24 Gary Benson <gbenson@redhat.com>
7687 * linux-low.h (linux_stop_lwp): Remove declaration.
7689 2015-03-24 Gary Benson <gbenson@redhat.com>
7691 * linux-low.h: Include nat/linux-nat.h.
7692 * linux-low.c (iterate_over_lwps_args): New structure.
7693 (iterate_over_lwps_filter): New function.
7694 (iterate_over_lwps): Likewise.
7695 * linux-x86-low.c (update_debug_registers_callback):
7696 Update signature to what iterate_over_lwps expects.
7697 Remove PID check that iterate_over_lwps now performs.
7698 (x86_dr_low_set_addr): Use iterate_over_lwps.
7699 (x86_dr_low_set_control): Likewise.
7701 2015-03-24 Gary Benson <gbenson@redhat.com>
7703 * linux-x86-low.c (x86_debug_reg_state): New function.
7704 (x86_linux_prepare_to_resume): Use the above.
7706 2015-03-24 Gary Benson <gbenson@redhat.com>
7708 * linux-low.c (current_lwp_ptid): New function.
7709 * linux-x86-low.c: Include nat/linux-nat.h.
7710 (x86_dr_low_get_addr): Use current_lwp_ptid.
7711 (x86_dr_low_get_control): Likewise.
7712 (x86_dr_low_get_status): Likewise.
7714 2015-03-20 Pedro Alves <palves@redhat.com>
7716 * tracepoint.c (cmd_qtstatus): Make "str" const.
7718 2015-03-20 Pedro Alves <palves@redhat.com>
7720 * server.c (handle_general_set): Make "req_str" const.
7722 2015-03-19 Pedro Alves <palves@redhat.com>
7724 * linux-low.c (linux_resume_one_lwp): Rename to ...
7725 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7726 instead call perror_with_name.
7727 (check_ptrace_stopped_lwp_gone): New function.
7728 (linux_resume_one_lwp): Reimplement as wrapper around
7729 linux_resume_one_lwp_throw that swallows errors if the LWP is
7732 2015-03-19 Pedro Alves <palves@redhat.com>
7734 * linux-low.c (count_events_callback, select_event_lwp_callback):
7735 No longer check whether the thread has resume_stop as last resume
7738 2015-03-19 Pedro Alves <palves@redhat.com>
7740 * linux-low.c (count_events_callback, select_event_lwp_callback):
7741 Use the lwp's status_pending_p field, not the thread's.
7743 2015-03-19 Pedro Alves <palves@redhat.com>
7745 * linux-low.c (select_event_lwp_callback): Update comments to
7746 no longer mention SIGTRAP.
7748 2015-03-18 Gary Benson <gbenson@redhat.com>
7750 * server.c (handle_query): Do not report vFile:fstat as supported.
7752 2015-03-11 Gary Benson <gbenson@redhat.com>
7754 * hostio.c (sys/types.h): New include.
7755 (sys/stat.h): Likewise.
7756 (common-remote-fileio.h): Likewise.
7757 (handle_fstat): New function.
7758 (handle_vFile): Handle vFile:fstat packets.
7760 2015-03-11 Gary Benson <gbenson@redhat.com>
7762 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7763 struct stat.st_blocks and struct stat.st_blksize.
7764 * configure: Regenerate.
7765 * config.in: Likewise.
7766 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7767 (OBS): Add common-remote-fileio.o.
7768 (common-remote-fileio.o): New rule.
7770 2015-03-09 Pedro Alves <palves@redhat.com>
7772 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7773 'struct sockaddr' pointer in 'accept' call.
7775 2015-03-09 Pedro Alves <palves@redhat.com>
7778 2015-03-07 Pedro Alves <palves@redhat.com>
7779 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7780 or <winsock2.h> here. Instead include "gdb_socket.h".
7781 (remote_open): Use union gdb_sockaddr_u.
7782 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7783 or <winsock2.h> here. Instead include "gdb_socket.h".
7784 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7785 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7787 (init_named_socket, gdb_agent_helper_thread): Use union
7790 2015-03-07 Pedro Alves <palves@redhat.com>
7792 * configure.ac (build_warnings): Move
7793 -Wdeclaration-after-statement to the C-specific set.
7794 * configure: Regenerate.
7796 2015-03-07 Pedro Alves <palves@redhat.com>
7798 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7799 or <winsock2.h> here. Instead include "gdb_socket.h".
7800 (remote_open): Use union gdb_sockaddr_u.
7801 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7802 or <winsock2.h> here. Instead include "gdb_socket.h".
7803 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7804 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7806 (init_named_socket, gdb_agent_helper_thread): Use union
7809 2015-03-07 Pedro Alves <palves@redhat.com>
7811 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7814 2015-03-06 Yao Qi <yao.qi@linaro.org>
7816 * linux-aarch64-low.c (aarch64_insert_point): Use
7817 show_debug_regs as a boolean.
7818 (aarch64_remove_point): Likewise.
7820 2015-03-05 Pedro Alves <palves@redhat.com>
7822 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7823 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7824 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7825 * nto-low.c (nto_target_ops): Likewise.
7826 * spu-low.c (spu_target_ops): Likewise.
7827 * win32-low.c (win32_target_ops): Likewise.
7829 2015-03-04 Pedro Alves <palves@redhat.com>
7831 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7832 Decide whether a breakpoint triggered based on the SIGTRAP's
7834 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7835 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7836 (linux_low_filter_event): Check for breakpoints before checking
7838 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7840 (linux_stopped_by_sw_breakpoint)
7841 (linux_supports_stopped_by_sw_breakpoint)
7842 (linux_stopped_by_hw_breakpoint)
7843 (linux_supports_stopped_by_hw_breakpoint): New functions.
7844 (linux_target_ops): Install new target methods.
7846 2015-03-04 Pedro Alves <palves@redhat.com>
7848 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7849 * server.c (swbreak_feature, hwbreak_feature): New globals.
7850 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7851 (captured_main): Clear swbreak_feature and hwbreak_feature.
7852 * server.h (swbreak_feature, hwbreak_feature): Declare.
7853 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7854 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7855 supports_stopped_by_hw_breakpoint>: New fields.
7856 (target_supports_stopped_by_sw_breakpoint)
7857 (target_stopped_by_sw_breakpoint)
7858 (target_supports_stopped_by_hw_breakpoint)
7859 (target_stopped_by_hw_breakpoint): Declare.
7861 2015-03-04 Pedro Alves <palves@redhat.com>
7863 enum lwp_stop_reason -> enum target_stop_reason
7864 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7865 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7866 (linux_wait_1, stuck_in_jump_pad_callback)
7867 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7868 (linux_stopped_by_watchpoint):
7869 * linux-low.h (enum lwp_stop_reason): Delete.
7870 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7871 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7873 2015-03-04 Yao Qi <yao.qi@linaro.org>
7875 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7877 2015-03-03 Gary Benson <gbenson@redhat.com>
7879 * hostio.c (handle_vFile): Fix prefix lengths.
7881 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7883 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7886 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7888 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7889 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7890 (clean): Add "rm -f" for above C files.
7891 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7892 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7893 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7894 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7895 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7896 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7897 (init_registers_s390x_vx_linux64)
7898 (init_registers_s390x_tevx_linux64)
7899 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7900 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7902 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7903 (s390_store_vxrs_high): New functions.
7904 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7906 (s390_arch_setup): Add logic for selecting one of the new target
7907 descriptions. Activate the new vector regsets if applicable.
7908 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7909 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7910 and init_registers_s390x_tevx_linux64.
7912 2015-03-01 Pedro Alves <palves@redhat.com>
7914 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7917 2015-02-27 Pedro Alves <palves@redhat.com>
7919 * linux-x86-low.c (u_debugreg_offset): New function.
7920 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7922 2015-02-27 Pedro Alves <palves@redhat.com>
7924 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7925 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7926 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7927 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7928 (ps_lsetfpregs, ps_getpid)
7929 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7930 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7931 (ps_lsetxregs, ps_plog): Declare.
7933 2015-02-27 Pedro Alves <palves@redhat.com>
7935 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7936 IP_AGENT_EXPORT_FUNC.
7937 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7938 IP_AGENT_EXPORT_FUNC.
7939 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7940 (IP_AGENT_EXPORT): Delete.
7941 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7942 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7943 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7944 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7945 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7946 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7947 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7948 (traceframe_read_count, traceframe_write_count)
7949 (traceframes_created, trace_state_variables, get_raw_reg)
7950 (get_trace_state_variable_value, set_trace_state_variable_value)
7951 (ust_loaded, helper_thread_id, cmd_buf): Use
7952 IPA_SYM_EXPORTED_NAME.
7953 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7954 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7955 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7956 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7957 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7958 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7959 EXTERN_C_PUSH/EXTERN_C_POP.
7960 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7961 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7962 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7963 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7964 (traceframe_write_count, traceframe_read_count)
7965 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7966 (about_to_request_buffer_space, get_trace_state_variable_value)
7967 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7968 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7969 EXTERN_C_PUSH/EXTERN_C_POP.
7970 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7971 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7972 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7973 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7974 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7975 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7976 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7977 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7979 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7980 (IP_AGENT_EXPORT_VAR_DECL): Define.
7982 (gdb_agent_get_raw_reg): Declare.
7984 2015-02-27 Tom Tromey <tromey@redhat.com>
7985 Pedro Alves <palves@redhat.com>
7987 Rename symbols whose names are reserved C++ keywords throughout.
7989 2015-02-27 Pedro Alves <palves@redhat.com>
7991 * Makefile.in (COMPILER): New, get it from autoconf.
7992 (CXX): Get from autoconf instead.
7993 (COMPILE.pre): Use COMPILER.
7994 (CC-LD): Rename to ...
7995 (CC_LD): ... this. Use COMPILER.
7996 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7997 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7998 * acinclude.m4: Include build-with-cxx.m4.
7999 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8000 Disable -Werror by default if building in C++ mode.
8001 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8002 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8003 the C++ compiler. Save/restore CXXFLAGS too.
8004 * configure: Regenerate.
8006 2015-02-27 Pedro Alves <palves@redhat.com>
8008 * acinclude.m4: Include libiberty.m4.
8009 * configure.ac: Call libiberty_INIT.
8010 * config.in, configure: Regenerate.
8012 2015-02-26 Pedro Alves <palves@redhat.com>
8014 * linux-low.c (linux_wait_1): When incrementing the PC past a
8015 program breakpoint always use the_low_target.breakpoint_len as
8016 increment, rather than the maximum between that and
8017 the_low_target.decr_pc_after_break.
8019 2015-02-23 Pedro Alves <palves@redhat.com>
8021 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8022 thread was doing a step-over; always adjust the PC if
8023 we stepped over a permanent breakpoint.
8024 (linux_wait_1): If we stepped over breakpoint that was on top of a
8025 permanent breakpoint, manually advance the PC past it.
8027 2015-02-23 Pedro Alves <palves@redhat.com>
8029 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8031 (x86_fill_gregset, x86_store_gregset): Use it when handling
8034 2015-02-20 Pedro Alves <palves@redhat.com>
8036 * thread-db.c: Include "nat/linux-procfs.h".
8037 (thread_db_init): Skip listing new threads if the kernel supports
8038 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8040 2015-02-20 Pedro Alves <palves@redhat.com>
8042 * linux-low.c (status_pending_p_callback): Use ptid_match.
8044 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8046 PR breakpoints/16812
8047 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8048 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8049 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8051 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8053 PR breakpoints/15956
8054 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8056 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8058 * linux-low.c (linux_low_btrace_conf): Print size.
8059 * server.c (handle_btrace_conf_general_set): New.
8060 (hanle_general_set): Call handle_btrace_conf_general_set.
8061 (handle_query): Report Qbtrace-conf:bts:size as supported.
8063 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8065 * linux-low.c (linux_low_enable_btrace): Update parameters.
8066 (linux_low_btrace_conf): New.
8067 (linux_target_ops)<to_btrace_conf>: Initialize.
8068 * server.c (current_btrace_conf): New.
8069 (handle_btrace_enable): Rename to ...
8070 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8071 to target_enable_btrace. Update comment. Update users.
8072 (handle_qxfer_btrace_conf): New.
8073 (qxfer_packets): Add btrace-conf entry.
8074 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8075 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8076 (target_ops)<read_btrace_conf>: New.
8077 (target_enable_btrace): Update parameters.
8078 (target_read_btrace_conf): New.
8080 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8082 * server.c (handle_btrace_general_set): Remove call to
8083 target_supports_btrace.
8084 (supported_btrace_packets): New.
8085 (handle_query): Call supported_btrace_packets.
8086 * target.h: include btrace-common.h.
8087 (btrace_target_info): Removed.
8088 (supports_btrace, target_supports_btrace): Update parameters.
8090 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8092 * Makefile.in (SFILES): Add common/btrace-common.c.
8093 (OBS): Add common/btrace-common.o.
8094 (btrace-common.o): Add build rules.
8095 * linux-low: Include btrace-common.h.
8096 (linux_low_read_btrace): Use struct btrace_data. Call
8097 btrace_data_init and btrace_data_fini.
8099 2015-02-06 Pedro Alves <palves@redhat.com>
8101 * thread-db.c (find_new_threads_callback): Add debug output.
8103 2015-02-04 Pedro Alves <palves@redhat.com>
8105 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8106 (resume_stopped_resumed_lwps): New function.
8107 (linux_wait_for_event_filtered): Use it.
8109 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8111 * Makefile.in (SFILES): Add linux-personality.c.
8112 (linux-personality.o): New rule.
8113 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8114 list of objects to be built.
8115 * linux-low.c: Include nat/linux-personality.h.
8116 (linux_create_inferior): Remove code to disable address space
8117 randomization (moved to ../nat/linux-personality.c). Create
8118 cleanup to disable address space randomization.
8120 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8122 * Makefile.in (posix-strerror.o): New rule.
8123 (mingw-strerror.o): Likewise.
8124 * configure: Regenerated.
8125 * configure.ac: Source file ../common/common.host. Initialize new
8126 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8128 2015-01-14 Yao Qi <yao@codesourcery.com>
8130 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8131 (ppc-linux.o): New rule.
8132 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8133 * configure.ac: AC_CHECK_FUNCS(getauxval).
8134 * config.in: Re-generated.
8135 * configure: Re-generated.
8136 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8137 ppc64_64bit_inferior_p
8139 2015-01-14 Yao Qi <yao@codesourcery.com>
8141 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8142 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8143 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8144 (PT_ORIG_R3, PT_TRAP): Likewise.
8145 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8146 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8147 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8149 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8151 * i387-fp.c (i387_cache_to_xsave): In look over
8152 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8153 zmmh_low_space field by use of zmmh_high_space.
8155 2015-01-09 Pedro Alves <palves@redhat.com>
8157 * linux-low.c (step_over_bkpt): Move higher up in the file.
8158 (handle_extended_wait): Don't store the stop_pc here.
8159 (get_stop_pc): Adjust comments and rename to ...
8160 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8161 stopped for a software breakpoint or hardware breakpoint.
8162 (thread_still_has_status_pending_p): New function.
8163 (status_pending_p_callback): Use
8164 thread_still_has_status_pending_p. If the event is no longer
8165 interesting, resume the LWP.
8166 (handle_tracepoints): Add assert.
8167 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8168 (wstatus_maybe_breakpoint): New function.
8169 (cancel_breakpoint): Delete function.
8170 (check_stopped_by_watchpoint): New function, factored out from
8171 linux_low_filter_event.
8172 (lp_status_maybe_breakpoint): Delete function.
8173 (linux_low_filter_event): Remove filter_ptid argument.
8174 Leave thread group exits pending here. Store the LWP's stop PC.
8175 Always leave events pending.
8176 (linux_wait_for_event_filtered): Pull all events out of the
8177 kernel, and leave them all pending.
8178 (count_events_callback, select_event_lwp_callback): Consider all
8180 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8181 (select_event_lwp): Only give preference to the stepping LWP in
8182 all-stop mode. Adjust comments.
8183 (ignore_event): New function.
8184 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8185 references to cancel_breakpoints. Adjust to renames. Also give
8186 equal priority to all LWPs that have had events in non-stop mode.
8187 If reporting a software breakpoint event, unadjust the LWP's PC.
8188 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8189 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8191 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8192 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8193 (linux_stopped_by_watchpoint): Adjust.
8194 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8195 * linux-low.h (enum lwp_stop_reason): New.
8196 (struct lwp_info) <stop_pc>: Adjust comment.
8197 <stopped_by_watchpoint>: Delete field.
8198 <stop_reason>: New field.
8199 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8200 * mem-break.c (software_breakpoint_inserted_here)
8201 (hardware_breakpoint_inserted_here): New function.
8202 * mem-break.h (software_breakpoint_inserted_here)
8203 (hardware_breakpoint_inserted_here): Declare.
8204 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8205 (cancel_breakpoints): Delete.
8206 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8207 (upload_fast_traceframes): Remove references to
8210 2015-01-09 Pedro Alves <palves@redhat.com>
8212 * thread-db.c (find_new_threads_callback): Ignore thread if the
8213 kernel thread ID is -1.
8215 2015-01-09 Pedro Alves <palves@redhat.com>
8217 * linux-low.c (linux_attach_fail_reason_string): Move to
8218 nat/linux-ptrace.c, and rename.
8219 (linux_attach_lwp): Update comment.
8220 (attach_proc_task_lwp_callback): New function.
8221 (linux_attach): Adjust to rename and use
8222 linux_proc_attach_tgid_threads.
8223 (linux_attach_fail_reason_string): Delete declaration.
8225 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8227 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8228 * server.c (gdbserver_version): Likewise.
8230 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8232 * remote-utils.c: Include ctype.h.
8233 (input_interrupt): Explicitly handle the case when the char
8234 received is the NUL byte. Improve the printing of non-ASCII
8237 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8239 * linux-low.c (linux_low_filter_event): Update call to
8240 linux_enable_event_reporting following the addition of
8241 a new parameter to that function.
8243 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8246 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8247 (AARCH64_FPCR_REGNO): Likewise.
8248 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8249 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8250 (aarch64_store_fpregset): Likewise.
8252 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8254 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8255 Remove FIXME comment about assumption about N.
8257 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8259 * configure.ac: If large-file support is disabled in GDBserver,
8260 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8261 * configure: Regenerate.
8263 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8265 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8266 warning upon ENODATA from ptrace.
8267 * linux-s390-low.c (s390_store_tdb): New.
8268 (s390_regsets): Add regset for NT_S390_TDB.
8270 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8272 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8273 without a fill_function.
8274 * linux-s390-low.c (s390_fill_last_break): Remove.
8275 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8276 (s390_arch_setup): Use regset's size instead of fill_function for
8279 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8281 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8282 the regset's store function when ptrace returned an error.
8283 * regcache.c (get_thread_regcache): Invalidate register cache
8284 before fetching inferior's registers.
8286 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8288 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8289 while-loop as for-loop.
8290 (regsets_store_inferior_registers): Likewise.
8292 2014-11-28 Yao Qi <yao@codesourcery.com>
8294 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8295 * config.in, configure: Re-generate.
8296 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8299 2014-11-21 Yao Qi <yao@codesourcery.com>
8301 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8302 (AC_CHECK_HEADERS): Remove malloc.h.
8303 * configure: Re-generated.
8304 * config.in: Re-generated.
8305 * server.h: Don't include alloca.h and malloc.h.
8306 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8307 Don't include malloc.h.
8309 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8311 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8312 corresponding ERRNO check in same block.
8314 2014-11-12 Pedro Alves <palves@redhat.com>
8316 * server.c (cont_thread): Update comment.
8317 (start_inferior, attach_inferior): No longer clear cont_thread.
8318 (handle_v_cont): No longer set cont_thread.
8319 (captured_main): Clear cont_thread each time a GDB connects.
8321 2014-11-12 Pedro Alves <palves@redhat.com>
8323 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8324 thread, and don't resume all threads if the Hc thread has exited.
8326 2014-11-12 Pedro Alves <palves@redhat.com>
8328 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8329 the process group instead of to a specific LWP.
8331 2014-10-15 Pedro Alves <palves@redhat.com>
8334 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8336 (arm_set_thread_context): Delete.
8337 (the_low_target): Adjust.
8338 * win32-i386-low.c (debug_registers_changed)
8339 (debug_registers_used): Delete.
8340 (update_debug_registers_callback): New function.
8341 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8342 needing to update their debug registers.
8343 (win32_get_current_dr): New function.
8344 (x86_dr_low_get_addr, x86_dr_low_get_control)
8345 (x86_dr_low_get_status): Fetch the debug register from the thread
8347 (i386_initial_stuff): Adjust.
8348 (i386_get_thread_context): Remove current_event parameter. Don't
8349 clear debug_registers_changed nor copy DR values to
8351 (i386_set_thread_context): Delete.
8352 (i386_prepare_to_resume): New function.
8353 (i386_thread_added): Mark the thread as needing to update irs
8355 (the_low_target): Remove i386_set_thread_context and install
8356 i386_prepare_to_resume.
8357 * win32-low.c (win32_get_thread_context): Adjust.
8358 (win32_set_thread_context): Use SetThreadContext
8360 (win32_prepare_to_resume): New function.
8361 (win32_require_context): New function, factored out from ...
8362 (thread_rec): ... this.
8363 (continue_one_thread): Call win32_prepare_to_resume on each thread
8364 we're about to continue.
8365 (win32_resume): Call win32_prepare_to_resume on the event thread.
8366 * win32-low.h (struct win32_thread_info)
8367 <debug_registers_changed>: New field.
8368 (struct win32_target_ops): Change prototype of set_thread_context,
8369 delete set_thread_context and add prepare_to_resume.
8370 (win32_require_context): New declaration.
8372 2014-10-08 Gary Benson <gbenson@redhat.com>
8374 * server.h: Do not include common-exceptions.h.
8376 2014-10-08 Gary Benson <gbenson@redhat.com>
8378 * server.h: Do not include cleanups.h.
8380 2014-09-30 James Hogan <james.hogan@imgtec.com>
8382 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8385 2014-09-23 Yao Qi <yao@codesourcery.com>
8387 * linux-low.c (lp_status_maybe_breakpoint): New function.
8388 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8389 (count_events_callback): Likewise.
8390 (select_event_lwp_callback): Likewise.
8391 (cancel_breakpoints_callback): Likewise.
8393 2014-09-19 Don Breazeal <donb@codesourcery.com>
8395 * linux-low.c (handle_extended_wait): Call
8396 linux_ptrace_get_extended_event.
8397 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8398 linux_is_extended_waitstatus.
8400 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8402 * Makefile.in (CPPFLAGS): Define.
8403 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8404 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8406 2014-09-16 Gary Benson <gbenson@redhat.com>
8408 * inferiors.h (current_inferior): Renamed as...
8409 (current_thread): New variable. All uses updated.
8410 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8411 (maybe_move_out_of_jump_pad): Likewise.
8412 (cancel_breakpoint): Likewise.
8413 (linux_low_filter_event): Likewise.
8414 (wait_for_sigstop): Likewise.
8415 (linux_resume_one_lwp): Likewise.
8416 (need_step_over_p): Likewise.
8417 (start_step_over): Likewise.
8418 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8419 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8420 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8421 and save_inferior as saved_thread.
8422 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8424 (regcache_invalidate_thread): Likewise.
8425 * remote-utils.c (prepare_resume_reply): Likewise.
8426 * thread-db.c (thread_db_get_tls_address): Likewise.
8427 (disable_thread_event_reporting): Likewise.
8428 (remove_thread_event_breakpoints): Likewise.
8429 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8431 * target.h (set_desired_inferior): Renamed as...
8432 (set_desired_thread): New declaration. All uses updated.
8433 * server.c (myresume): Updated comment to reference thread instead
8435 (handle_serial_event): Likewise.
8436 (handle_target_event): Likewise.
8438 2014-09-12 Tom Tromey <tromey@redhat.com>
8439 Gary Benson <gbenson@redhat.com>
8441 * regcache.h: Include common-regcache.h.
8442 (regcache_read_pc): Don't declare.
8443 * regcache.c (get_thread_regcache_for_ptid): New function.
8445 2014-09-11 Tom Tromey <tromey@redhat.com>
8446 Gary Benson <gbenson@redhat.com>
8448 * symbol.c: New file.
8449 * Makefile.in (SFILES): Add symbol.c.
8450 (OBS): Add symbol.o.
8452 2014-09-11 Gary Benson <gbenson@redhat.com>
8454 * target.c (target_stop_ptid, target_continue_ptid): New
8457 2014-09-11 Tom Tromey <tromey@redhat.com>
8458 Gary Benson <gbenson@redhat.com>
8460 * target.h: Include target/target.h.
8461 * target.c (target_read_memory, target_read_uint32)
8462 (target_write_memory): New functions.
8464 2014-09-11 Gary Benson <gbenson@redhat.com>
8466 * server.h (debug_hw_points): Don't declare.
8467 * server.c (debug_hw_points): Don't define. Replace all uses
8468 with show_debug_regs.
8469 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8470 all uses with show_debug_regs.
8472 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8474 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8475 endianness into account.
8476 (ppc_supply_ptrace_register): Likewise.
8478 2014-09-03 James Hogan <james.hogan@imgtec.com>
8480 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8481 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8483 2014-09-03 Gary Benson <gbenson@redhat.com>
8485 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8486 ALL_DEBUG_ADDRESS_REGISTERS.
8488 2014-09-02 Gary Benson <gbenson@redhat.com>
8490 * i386-low.h: Renamed as...
8491 * x86-low.h: New file. All type, function and variable name
8492 prefixes changed from "i386_" to "x86_". All references updated.
8493 * i386-low.c: Renamed as...
8494 * x86-low.c: New file. All type, function and variable name
8495 prefixes changed from "i386_" to "x86_". All references updated.
8497 2014-09-02 Gary Benson <gbenson@redhat.com>
8499 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8500 (x86_linux_new_thread): Likewise.
8502 2014-08-29 Gary Benson <gbenson@redhat.com>
8504 * server.h (setjmp.h): Do not include.
8505 (toplevel): Do not declare.
8506 (common-exceptions.h): Include.
8507 (cleanups.h): Likewise.
8508 * server.c (toplevel): Do not define.
8509 (exit_code): New static global.
8510 (detach_or_kill_for_exit_cleanup): New function.
8511 (main): New function. Original main renamed to...
8512 (captured_main): New function.
8513 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8515 2014-08-29 Gary Benson <gbenson@redhat.com>
8517 * Makefile.in (SFILES): Add common/common-exceptions.c.
8518 (OBS): Add common-exceptions.o.
8519 (common-exceptions.o): New rule.
8520 * utils.c (prepare_to_throw_exception): New function.
8522 2014-08-29 Gary Benson <gbenson@redhat.com>
8524 * config.in: Regenerate.
8525 * configure: Likewise.
8527 2014-08-29 Gary Benson <gbenson@redhat.com>
8529 * Makefile.in (SFILES): Add common/cleanups.c.
8531 (cleanups.o): New rule.
8533 2014-08-29 Gary Benson <gbenson@redhat.com>
8535 * utils.c (internal_vwarning): New function.
8537 2014-08-28 Gary Benson <gbenson@redhat.com>
8539 * utils.h (fatal): Remove declaration.
8540 * utils.c (fatal): Remove function.
8542 2014-08-28 Gary Benson <gbenson@redhat.com>
8544 * tracepoint.c (gdb_agent_init): Replace fatal with
8546 (initialize_tracepoint): Likewise.
8548 2014-08-28 Gary Benson <gbenson@redhat.com>
8550 * remote-utils.c (remote_prepare): Replace fatal with error.
8552 2014-08-28 Gary Benson <gbenson@redhat.com>
8554 * linux-low.c (linux_async): Replace fatal with warning.
8556 (linux_start_non_stop): Return -1 if linux_async failed.
8558 2014-08-28 Gary Benson <gbenson@redhat.com>
8560 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8562 (i386_dr_low_get_addr): Remove vague comment.
8563 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8566 2014-08-28 Gary Benson <gbenson@redhat.com>
8568 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8569 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8571 (linux_resume_one_lwp): Likewise.
8572 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8574 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8575 with internal_error.
8576 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8577 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8578 (find_register_by_name): Replace fatal with internal_error.
8579 (find_regno): Likewise.
8580 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8581 * thread-db.c (thread_db_create_event): Likewise.
8582 (thread_db_load_search): Likewise.
8583 (try_thread_db_load_1): Likewise.
8584 * tracepoint.c (get_jump_space_head): Replace fatal with
8586 (claim_trampoline_space): Likewise.
8587 (have_fast_tracepoint_trampoline_buffer): Likewise.
8588 (cmd_qtstart): Likewise.
8589 (stop_tracing): Likewise.
8590 (fast_tracepoint_collecting): Likewise.
8591 (target_malloc): Likewise.
8592 (download_tracepoint): Likewise.
8593 (download_trace_state_variables): Replace check with gdb_assert.
8594 (upload_fast_traceframes): Replace fatal with internal_error.
8596 2014-08-19 Tom Tromey <tromey@redhat.com>
8597 Gary Benson <gbenson@redhat.com>
8599 * Makefile.in (SFILES): Add common/common-debug.c.
8600 (OBS): Add common-debug.o.
8601 (common-debug.o): New rule.
8602 * debug.h (debug_printf): Don't declare.
8603 * debug.c (debug_printf): Renamed and rewritten as...
8604 (debug_vprintf): New function.
8606 2014-08-19 Gary Benson <gbenson@redhat.com>
8608 * utils.h: Do not include print-utils.h.
8610 2014-08-19 Tom Tromey <tromey@redhat.com>
8611 Gary Benson <gbenson@redhat.com>
8613 * server.h: Add static assertion.
8614 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8616 2014-08-19 Tom Tromey <tromey@redhat.com>
8617 Gary Benson <gbenson@redhat.com>
8619 * Makefile.in (SFILES): Add common/errors.c.
8620 (OBS): Add errors.o.
8621 (IPA_OBS): Add errors-ipa.o.
8622 (errors.o): New rule.
8623 (errors-ipa.o): Likewise.
8624 * utils.h (perror_with_name, error, warning): Don't declare.
8625 * utils.c (warning): Renamed and rewritten as...
8626 (vwarning): New function.
8627 (error): Renamed and rewritten as...
8628 (verror): New function.
8629 (internal_error): Renamed and rewritten as...
8630 (internal_verror): New function.
8632 2014-08-07 Gary Benson <gbenson@redhat.com>
8634 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8635 * configure: Regenerate.
8636 * config.in: Likewise.
8637 * server.h: Do not include errno.h.
8638 * event-loop.c: Likewise.
8639 * hostio-errno.c: Likewise.
8640 * linux-low.c: Likewise.
8641 * remote-utils.c: Likewise.
8642 * spu-low.c: Likewise.
8643 * utils.c: Likewise.
8644 * gdbreplay.c: Unconditionally include errno.h.
8646 2014-08-07 Gary Benson <gbenson@redhat.com>
8648 * server.h: Do not include string.h.
8649 * event-loop.c: Likewise.
8650 * linux-low.c: Likewise.
8651 * regcache.c: Likewise.
8652 * remote-utils.c: Likewise.
8653 * spu-low.c: Likewise.
8654 * utils.c: Likewise.
8656 2014-08-07 Gary Benson <gbenson@redhat.com>
8658 * server.h: Do not include gdb_assert.h.
8660 2014-08-07 Gary Benson <gbenson@redhat.com>
8662 * server.h: Do not include common-utils.h.
8664 2014-08-07 Gary Benson <gbenson@redhat.com>
8666 * server.h: Do not include ptid.h.
8667 * notif.h: Likewise.
8669 2014-08-07 Gary Benson <gbenson@redhat.com>
8671 * server.h: Do not include gdb_locale.h.
8673 2014-08-07 Gary Benson <gbenson@redhat.com>
8675 * server.h: Do not include gdb/signals.h.
8676 * win32-low.c: Likewise.
8678 2014-08-07 Gary Benson <gbenson@redhat.com>
8680 * server.h: Do not include pathmax.h.
8682 2014-08-07 Gary Benson <gbenson@redhat.com>
8684 * server.h: Do not include libiberty.h.
8685 * linux-bfin-low.c: Likewise.
8687 2014-08-07 Gary Benson <gbenson@redhat.com>
8689 * server.h: Do not include ansidecl.h.
8691 2014-08-07 Gary Benson <gbenson@redhat.com>
8693 * linux-x86-low.c: Do not include stddef.h.
8694 * lynx-ppc-low.c: Likewise.
8695 * tracepoint.c: Likewise.
8697 2014-08-07 Gary Benson <gbenson@redhat.com>
8699 * server.h: Do not include stdarg.h.
8700 * nto-low.c: Likewise.
8702 2014-08-07 Gary Benson <gbenson@redhat.com>
8704 * server.h: Do not include stdlib.h.
8705 * inferiors.c: Likewise.
8706 * linux-low.c: Likewise.
8707 * regcache.c: Likewise.
8708 * spu-low.c: Likewise.
8709 * tracepoint.c: Likewise.
8710 * utils.c: Likewise.
8712 2014-08-07 Gary Benson <gbenson@redhat.com>
8714 * server.h: Do not include stdio.h.
8715 * linux-low.c: Likewise.
8716 * remote-utils.c: Likewise.
8717 * spu-low.c: Likewise.
8718 * utils.c: Likewise.
8719 * wincecompat.c: Likewise.
8721 2014-08-06 Gary Benson <gbenson@redhat.com>
8723 * regcache.c (init_register_cache): Move conditionals inside if.
8725 2014-08-06 Gary Benson <gbenson@redhat.com>
8727 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8729 2014-07-31 Gary Benson <gbenson@redhat.com>
8731 * ax.h: Do not include server.h.
8732 * gdbthread.h: Likewise.
8733 * lynx-low.h: Likewise.
8734 * notif.h: Likewise.
8736 2014-07-30 Gary Benson <gbenson@redhat.com>
8738 * server.h: Include common-defs.h.
8739 Do not include config.h or build-gnulib-gdbserver/config.h.
8741 2014-07-30 Gary Benson <gbenson@redhat.com>
8743 * hostio-errno.c: Move server.h to top of includes list.
8744 * inferiors.c: Likewise.
8745 * linux-x86-low.c: Likewise.
8746 * notif.c: Include server.h.
8748 2014-07-24 Tom Tromey <tromey@redhat.com>
8749 Gary Benson <gbenson@redhat.com>
8751 * server.h (CORE_ADDR): Now unsigned.
8753 2014-07-16 Pedro Alves <palves@redhat.com>
8755 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8757 2014-07-15 Pedro Alves <palves@redhat.com>
8759 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8762 2014-07-11 Pedro Alves <palves@redhat.com>
8764 * linux-low.c (kill_wait_lwp): New function, based on
8765 kill_one_lwp_callback, but use my_waitpid directly.
8766 (kill_one_lwp_callback, linux_kill): Use it.
8768 2014-06-23 Pedro Alves <palves@redhat.com>
8770 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8771 before setting DR0..DR3.
8773 2014-06-20 Gary Benson <gbenson@redhat.com>
8775 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8776 * configure: Regenerated.
8777 * config.in: Likewise.
8779 2014-06-20 Gary Benson <gbenson@redhat.com>
8781 * Makefile.in (SFILES): Update locations for files moved
8783 (object file files): Reordered.
8785 2014-06-20 Gary Benson <gbenson@redhat.com>
8787 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8788 (i386_dr_low_set_addr): Likewise.
8789 (i386_dr_low_get_addr): Likewise.
8790 (i386_dr_low_can_set_control): Likewise.
8791 (i386_dr_low_set_control): Likewise.
8792 (i386_dr_low_get_control): Likewise.
8793 (i386_dr_low_get_status): Likewise.
8794 (i386_get_debug_register_length): Likewise.
8795 * linux-x86-low.c (i386_dr_low_set_addr):
8796 Changed signature. Made static.
8797 (i386_dr_low_get_addr): Likewise.
8798 (i386_dr_low_set_control): Likewise.
8799 (i386_dr_low_get_control): Likewise.
8800 (i386_dr_low_get_status): Likewise.
8801 (i386_dr_low): New global variable.
8802 * win32-i386-low.c (i386_dr_low_set_addr):
8803 Changed signature. Made static.
8804 (i386_dr_low_get_addr): Likewise.
8805 (i386_dr_low_set_control): Likewise.
8806 (i386_dr_low_get_control): Likewise.
8807 (i386_dr_low_get_status): Likewise.
8808 (i386_dr_low): New global variable.
8810 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8812 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8813 * Makefile.in (AR, AR_FLAGS): Define.
8814 * configure: Regenerate.
8816 2014-06-19 Gary Benson <gbenson@redhat.com>
8818 * Makefile.in (i386-dregs.o): New rule.
8819 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8820 * i386-low.c (target.h): Remove include.
8821 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8822 (DR_CONTROL_SHIFT): Likewise.
8823 (DR_CONTROL_SIZE): Likewise.
8824 (DR_RW_EXECUTE): Likewise.
8825 (DR_RW_WRITE): Likewise.
8826 (DR_RW_READ): Likewise.
8827 (DR_RW_IORW): Likewise.
8828 (DR_LEN_1): Likewise.
8829 (DR_LEN_2): Likewise.
8830 (DR_LEN_4): Likewise.
8831 (DR_LEN_8): Likewise.
8832 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8833 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8834 (DR_ENABLE_SIZE): Likewise.
8835 (DR_LOCAL_SLOWDOWN): Likewise.
8836 (DR_GLOBAL_SLOWDOWN): Likewise.
8837 (DR_CONTROL_RESERVED): Likewise.
8838 (I386_DR_CONTROL_MASK): Likewise.
8839 (I386_DR_VACANT): Likewise.
8840 (I386_DR_LOCAL_ENABLE): Likewise.
8841 (I386_DR_GLOBAL_ENABLE): Likewise.
8842 (I386_DR_DISABLE): Likewise.
8843 (I386_DR_SET_RW_LEN): Likewise.
8844 (I386_DR_GET_RW_LEN): Likewise.
8845 (I386_DR_WATCH_HIT): Likewise.
8846 (i386_wp_op_t): Likewise.
8847 (i386_show_dr): Likewise.
8848 (i386_length_and_rw_bits): Likewise.
8849 (i386_insert_aligned_watchpoint): Likewise.
8850 (i386_remove_aligned_watchpoint): Likewise.
8851 (i386_handle_nonaligned_watchpoint): Likewise.
8852 i386_update_inferior_debug_regs(): Likewise.
8853 (i386_dr_insert_watchpoint): Likewise.
8854 (i386_dr_remove_watchpoint): Likewise.
8855 (i386_dr_region_ok_for_watchpoint): Likewise.
8856 (i386_dr_stopped_data_address): Likewise.
8857 (i386_dr_stopped_by_watchpoint): Likewise.
8859 2014-06-19 Gary Benson <gbenson@redhat.com>
8861 * i386-low.c (i386_dr_show): Renamed to
8862 i386_show_dr and made static. All uses updated.
8863 (i386_dr_length_and_rw_bits): Renamed to
8864 i386_length_and_rw_bits and made static.
8866 (i386_dr_insert_aligned_watchpoint): Renamed to
8867 i386_insert_aligned_watchpoint and made static.
8869 (i386_dr_remove_aligned_watchpoint): Renamed to
8870 i386_remove_aligned_watchpoint and made static.
8872 (i386_dr_update_inferior_debug_regs): Renamed to
8873 i386_update_inferior_debug_regs and made static.
8876 2014-06-18 Gary Benson <gbenson@redhat.com>
8878 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8879 (i386_dr_low_can_set_control): Likewise.
8880 (i386_get_debug_register_length): Likewise.
8881 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8882 (i386_dr_low_can_set_control): Likewise.
8883 (i386_get_debug_register_length): Likewise.
8885 2014-06-17 Gary Benson <gbenson@redhat.com>
8887 * i386-low.h (i386-dregs.h): New include.
8888 (DR_FIRSTADDR): Now in i386-dregs.h.
8889 (DR_LASTADDR): Likewise.
8890 (DR_NADDR): Likewise.
8891 (DR_STATUS): Likewise.
8892 (DR_CONTROL): Likewise.
8893 (i386_debug_reg_state): Likewise.
8894 (i386_dr_insert_watchpoint): Likewise.
8895 (i386_dr_remove_watchpoint): Likewise.
8896 (i386_dr_region_ok_for_watchpoint): Likewise.
8897 (i386_dr_stopped_data_address): Likewise.
8898 (i386_dr_stopped_by_watchpoint): Likewise.
8899 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8901 2014-06-18 Gary Benson <gbenson@redhat.com>
8903 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8904 i386_dr_insert_watchpoint.
8905 (i386_low_remove_watchpoint): Renamed to
8906 i386_dr_remove_watchpoint.
8907 (i386_low_region_ok_for_watchpoint): Renamed to
8908 i386_dr_region_ok_for_watchpoint.
8909 (i386_low_stopped_data_address): Renamed to
8910 i386_dr_stopped_data_address.
8911 (i386_low_stopped_by_watchpoint): Renamed to
8912 i386_dr_stopped_by_watchpoint.
8913 * i386-low.c (i386_show_dr): Renamed to
8914 i386_dr_show and made nonstatic. All uses updated.
8915 (i386_length_and_rw_bits): Renamed to
8916 i386_dr_length_and_rw_bits and made nonstatic.
8918 (i386_insert_aligned_watchpoint): Renamed to
8919 i386_dr_insert_aligned_watchpoint and made nonstatic.
8921 (i386_remove_aligned_watchpoint): Renamed to
8922 i386_dr_remove_aligned_watchpoint and made nonstatic.
8924 (i386_update_inferior_debug_regs): Renamed to
8925 i386_dr_update_inferior_debug_regs and made nonstatic.
8927 (i386_low_insert_watchpoint): Renamed to
8928 i386_dr_insert_watchpoint. All uses updated.
8929 (i386_low_remove_watchpoint): Renamed to
8930 i386_dr_remove_watchpoint. All uses updated.
8931 (i386_low_region_ok_for_watchpoint): Renamed to
8932 i386_dr_region_ok_for_watchpoint. All uses updated.
8933 (i386_low_stopped_data_address): Renamed to
8934 i386_dr_stopped_data_address. All uses updated.
8935 (i386_low_stopped_by_watchpoint): Renamed to
8936 i386_dr_stopped_by_watchpoint. All uses updated.
8938 2014-06-18 Gary Benson <gbenson@redhat.com>
8940 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8941 (i386_dr_low_can_set_control): Likewise.
8942 (i386_insert_aligned_watchpoint): New check.
8944 2014-06-18 Gary Benson <gbenson@redhat.com>
8946 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8949 2014-06-18 Gary Benson <gbenson@redhat.com>
8951 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8952 instead of fatal and error.
8953 (i386_handle_nonaligned_watchpoint): Likewise.
8955 2014-06-18 Gary Benson <gbenson@redhat.com>
8957 * i386-low.c (i386_get_debug_register_length): New macro.
8958 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8959 (i386_show_dr): Use debug_printf instead of fprintf. Use
8960 phex to format values.
8962 2014-06-18 Gary Benson <gbenson@redhat.com>
8964 * i386-low.h: Comment changes.
8965 * i386-low.c: Likewise.
8967 2014-06-18 Gary Benson <gbenson@redhat.com>
8969 * i386-low.c: Whitespace changes.
8971 2014-06-12 Tom Tromey <tromey@redhat.com>
8973 * utils.c (freeargv): Remove.
8975 2014-06-12 Tom Tromey <tromey@redhat.com>
8977 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8978 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8979 (parse_debug_format_options): Likewise.
8980 (gdbserver_usage): Likewise.
8981 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8982 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8983 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8985 ($(LIBGNU)): Depend on libiberty.
8986 (all-lib): Recurse into all subdirs.
8987 (install-only): Invoke "install" target in subdirs.
8988 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8990 * configure: Rebuild.
8991 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8992 for vasprintf, vsnprintf, or gettimeofday.
8993 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8996 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8998 * development.sh: Delete.
8999 * Makefile.in (config.status): Adjust dependency on development.sh.
9000 * configure.ac: Adjust development.sh source call.
9001 * configure: Regenerate.
9003 2014-06-02 Pedro Alves <palves@redhat.com>
9005 * ax.c (gdb_free_agent_expr): New function.
9006 * ax.h (gdb_free_agent_expr): New declaration.
9007 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9009 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9011 (clear_breakpoint_conditions_and_commands): New function.
9012 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9013 (clear_breakpoint_conditions_and_commands): New declaration.
9015 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9017 * linux-aarch64-low.c (asm/ptrace.h): Include.
9019 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9021 Fix TLS access for -static -pthread.
9022 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9023 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9024 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9026 2014-05-20 Pedro Alves <palves@redhat.com>
9028 * linux-aarch64-low.c (aarch64_insert_point)
9029 (aarch64_remove_point): No longer check whether the type is
9030 supported here. Adjust to new interface.
9031 (the_low_target): Install aarch64_supports_z_point_type as
9032 supports_z_point_type method.
9033 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9034 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9035 instead of a Z packet char. Adjust.
9036 (arm_supports_z_point_type): New function.
9037 (arm_insert_point, arm_remove_point): Adjust to new interface.
9038 (the_low_target): Install arm_supports_z_point_type.
9039 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9040 (cris_insert_point, cris_remove_point): Adjust to new interface.
9041 Don't check whether the type is supported here.
9042 (the_low_target): Install cris_supports_z_point_type.
9043 * linux-low.c (linux_supports_z_point_type): New function.
9044 (linux_insert_point, linux_remove_point): Adjust to new interface.
9045 * linux-low.h (struct linux_target_ops) <insert_point,
9046 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9047 raw_breakpoint pointer parameter.
9048 <supports_z_point_type>: New method.
9049 * linux-mips-low.c (mips_supports_z_point_type): New function.
9050 (mips_insert_point, mips_remove_point): Adjust to new interface.
9051 Use mips_supports_z_point_type.
9052 (the_low_target): Install mips_supports_z_point_type.
9053 * linux-ppc-low.c (the_low_target): Install NULL as
9054 supports_z_point_type method.
9055 * linux-s390-low.c (the_low_target): Install NULL as
9056 supports_z_point_type method.
9057 * linux-sparc-low.c (the_low_target): Install NULL as
9058 supports_z_point_type method.
9059 * linux-x86-low.c (x86_supports_z_point_type): New function.
9060 (x86_insert_point): Adjust to new insert_point interface. Use
9061 insert_memory_breakpoint. Adjust to new
9062 i386_low_insert_watchpoint interface.
9063 (x86_remove_point): Adjust to remove_point interface. Use
9064 remove_memory_breakpoint. Adjust to new
9065 i386_low_remove_watchpoint interface.
9066 (the_low_target): Install x86_supports_z_point_type.
9067 * lynx-low.c (lynx_target_ops): Install NULL as
9068 supports_z_point_type callback.
9069 * nto-low.c (nto_supports_z_point_type): New.
9070 (nto_insert_point, nto_remove_point): Adjust to new interface.
9071 (nto_target_ops): Install nto_supports_z_point_type.
9072 * mem-break.c: Adjust intro comment.
9073 (struct raw_breakpoint) <raw_type, size>: New fields.
9074 <inserted>: Update comment.
9075 <shlib_disabled>: Delete field.
9076 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9077 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9078 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9079 (raw_bkpt_type_to_target_hw_bp_type): New function.
9080 (find_enabled_raw_code_breakpoint_at): New function.
9081 (find_raw_breakpoint_at): New type and size parameters. Use them.
9082 (insert_memory_breakpoint): New function, based off
9083 set_raw_breakpoint_at.
9084 (remove_memory_breakpoint): New function.
9085 (set_raw_breakpoint_at): Reimplement.
9086 (set_breakpoint): New, based on set_breakpoint_at.
9087 (set_breakpoint_at): Reimplement.
9088 (delete_raw_breakpoint): Go through the_target->remove_point
9089 instead of assuming memory breakpoints.
9090 (find_gdb_breakpoint_at): Delete.
9091 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9092 (find_gdb_breakpoint): New function.
9093 (set_gdb_breakpoint_at): Delete.
9094 (z_type_supported): New function.
9095 (set_gdb_breakpoint_1): New function, loosely based off
9096 set_gdb_breakpoint_at.
9097 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9098 (delete_gdb_breakpoint_at): Delete.
9099 (delete_gdb_breakpoint_1): New function, loosely based off
9100 delete_gdb_breakpoint_at.
9101 (delete_gdb_breakpoint): New function.
9102 (clear_gdb_breakpoint_conditions): Rename to ...
9103 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9105 (add_condition_to_breakpoint): Make static.
9106 (add_breakpoint_condition): Take a struct breakpoint pointer
9107 instead of an address. Adjust.
9108 (gdb_condition_true_at_breakpoint): Rename to ...
9109 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9111 (gdb_condition_true_at_breakpoint): Reimplement.
9112 (add_breakpoint_commands): Take a struct breakpoint pointer
9113 instead of an address. Adjust.
9114 (gdb_no_commands_at_breakpoint): Rename to ...
9115 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9116 parameter. Return true if no breakpoint was found. Change debug
9118 (gdb_no_commands_at_breakpoint): Reimplement.
9119 (run_breakpoint_commands): Rename to ...
9120 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9121 and change return type to boolean.
9122 (run_breakpoint_commands): New function.
9123 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9124 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9125 breakpoint. Go through the_target->remove_point instead of
9126 assuming memory breakpoint.
9127 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9128 software and hardware breakpoints.
9129 (reinsert_raw_breakpoint): Go through the_target->insert_point
9130 instead of assuming memory breakpoint.
9131 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9132 software and hardware breakpoints.
9133 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9134 Check both software and hardware breakpoints.
9135 (validate_inserted_breakpoint): Assert the breakpoint is a
9136 software breakpoint. Set the inserted flag to -1 instead of
9137 setting shlib_disabled.
9138 (delete_disabled_breakpoints): Adjust.
9139 (validate_breakpoints): Only validate software breakpoints.
9140 Adjust to inserted flag change.
9141 (check_mem_read, check_mem_write): Skip breakpoint types other
9142 than software breakpoints. Adjust to inserted flag change.
9143 * mem-break.h (enum raw_bkpt_type): New enum.
9144 (raw_breakpoint, struct process_info): Forward declare.
9145 (Z_packet_to_target_hw_bp_type): Delete declaration.
9146 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9147 (set_gdb_breakpoint, delete_gdb_breakpoint)
9148 (clear_breakpoint_conditions): New declarations.
9149 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9150 (breakpoint_inserted_here): Update comment.
9151 (add_breakpoint_condition, add_breakpoint_commands): Replace
9152 address parameter with a breakpoint pointer parameter.
9153 (gdb_breakpoint_here): Update comment.
9154 (delete_gdb_breakpoint_at): Delete.
9155 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9156 * server.c (process_point_options): Take a struct breakpoint
9157 pointer instead of an address. Adjust.
9158 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9159 delete_gdb_breakpoint.
9160 * spu-low.c (spu_target_ops): Install NULL as
9161 supports_z_point_type method.
9162 * target.h: Include mem-break.h.
9163 (struct target_ops) <prepare_to_access_memory>: Update comment.
9164 <supports_z_point_type>: New field.
9165 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9166 instead of a char. Also take a raw breakpoint pointer.
9167 * win32-arm-low.c (the_low_target): Install NULL as
9168 supports_z_point_type.
9169 * win32-i386-low.c (i386_supports_z_point_type): New function.
9170 (i386_insert_point, i386_remove_point): Adjust to new interface.
9171 (the_low_target): Install i386_supports_z_point_type.
9172 * win32-low.c (win32_supports_z_point_type): New function.
9173 (win32_insert_point, win32_remove_point): Adjust to new interface.
9174 (win32_target_ops): Install win32_supports_z_point_type.
9175 * win32-low.h (struct win32_target_ops):
9176 <supports_z_point_type>: New method.
9177 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9178 instead of a char. Also take a raw breakpoint pointer.
9180 2014-05-20 Pedro Alves <palves@redhat.com>
9182 * mem-break.h: Include break-common.h.
9183 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9184 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9185 (Z_packet_to_target_hw_bp_type): New declaration.
9186 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9187 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9188 (Z_PACKET_ACCESS_WP): Delete macros.
9189 (Z_packet_to_hw_type): Delete function.
9190 * i386-low.h: Don't include break-common.h here.
9191 (Z_packet_to_hw_type): Delete declaration.
9192 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9193 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9194 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9195 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9196 * linux-aarch64-low.c: Don't include break-common.h here.
9197 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9198 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9199 (Z_packet_to_target_hw_bp_type): Delete function.
9200 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9202 (mips_insert_point, mips_remove_point): Use
9203 Z_packet_to_target_hw_bp_type.
9205 2014-05-20 Pedro Alves <palves@redhat.com>
9207 * linux-aarch64-low.c: Include break-common.h.
9208 (enum target_point_type): Delete.
9209 (Z_packet_to_point_type): Rename to ...
9210 (Z_packet_to_target_hw_bp_type): ... this, and return a
9211 target_hw_bp_type instead.
9212 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9213 instead of an enum target_point_type.
9214 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9216 (aarch64_dr_state_insert_one_point)
9217 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9218 (aarch64_handle_aligned_watchpoint)
9219 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9220 Take an enum target_hw_bp_type instead of an enum
9222 (aarch64_supports_z_point_type): New function.
9223 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9224 use Z_packet_to_target_hw_bp_type.
9226 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9228 * configure.ac: Only use -Werror by default when DEVELOPMENT
9230 * configure: Regenerate.
9232 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9234 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9235 * linux-x86-low.c (X86_64_USER_REGS): New.
9236 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9238 2014-04-28 Yao Qi <yao@codesourcery.com>
9240 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9243 2014-04-25 Pedro Alves <palves@redhat.com>
9246 * linux-low.c (linux_attach_fail_reason_string): New function.
9247 (linux_attach_lwp): Delete.
9248 (linux_attach_lwp_1): Rename to ...
9249 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9250 argument. Remove "initial" parameter. Return int instead of
9251 void. Don't error or warn here.
9252 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9253 failure to attach to the tgid. Call warning when failing to
9255 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9256 argument. Remove "initial" parameter. Return int instead of
9257 void. Don't error or warn here.
9258 (linux_attach_fail_reason_string): New declaration.
9259 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9260 interface change. Use linux_attach_fail_reason_string.
9262 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9263 Walfred Tedeschi <walfred.tedeschi@intel.com>
9265 * Makefile.in: Added rules to handle new files
9266 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9267 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9268 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9269 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9270 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9271 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9273 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9274 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9275 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9276 i386/x32-avx512.xml.
9277 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9278 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9279 i386/x32-avx512-linux.xml.
9280 * i387-fp.c (num_avx512_k_registers): New constant for number
9282 (num_avx512_zmmh_low_registers): New constant for number of
9283 lower ZMM registers (0-15).
9284 (num_avx512_zmmh_high_registers): New constant for number of
9285 higher ZMM registers (16-31).
9286 (num_avx512_ymmh_registers): New contant for number of higher
9287 YMM registers (ymm16-31 added by avx521 on x86_64).
9288 (num_avx512_xmm_registers): New constant for number of higher
9289 XMM registers (xmm16-31 added by AVX512 on x86_64).
9290 (struct i387_xsave): Add space for AVX512 registers.
9291 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9292 Add code to handle AVX512 registers.
9293 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9294 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9295 prototypei from generated file.
9296 (tdesc_amd64_avx512_linux): Likewise.
9297 (init_registers_x32_avx512_linux): Likewise.
9298 (tdesc_x32_avx512_linux): Likewise.
9299 (init_registers_i386_avx512_linux): Likewise.
9300 (tdesc_i386_avx512_linux): Likewise.
9301 (x86_64_regmap): Add AVX512 registers.
9302 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9304 (initialize_low_arch): Add code to initialize AVX512 registers.
9306 2014-04-23 Pedro Alves <palves@redhat.com>
9308 * mem-break.c (find_gdb_breakpoint_at): Make static.
9309 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9311 2014-04-23 Pedro Alves <palves@redhat.com>
9313 * i386-low.c: Don't include break-common.h here.
9314 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9315 prototype to take target_hw_bp_type as argument instead of a Z
9317 * i386-low.h: Include break-common.h here.
9318 (Z_packet_to_hw_type): Declare.
9319 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9321 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9322 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9323 (x86_remove_point): Convert the packet number to a
9324 target_hw_bp_type before calling i386_low_remove_watchpoint.
9325 * win32-i386-low.c (i386_insert_point): Convert the packet number
9326 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9327 (i386_remove_point): Convert the packet number to a
9328 target_hw_bp_type before calling i386_low_remove_watchpoint.
9330 2014-04-23 Pedro Alves <palves@redhat.com>
9332 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9334 2014-04-10 Pedro Alves <palves@redhat.com>
9336 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9337 Check if the condition or command is NULL before checking if the
9338 breakpoint is known. On success, return true.
9339 * mem-break.h (add_breakpoint_condition): Document return.
9340 (add_breakpoint_commands): Add describing comment.
9341 * server.c (skip_to_semicolon): New function.
9342 (process_point_options): Use it.
9344 2014-04-09 Pedro Alves <palves@redhat.com>
9346 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9349 2014-02-27 Pedro Alves <palves@redhat.com>
9352 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9354 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9356 (last_thread_of_process_p): Take a PID argument instead of a
9358 (linux_wait_for_lwp): Delete.
9359 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9361 (linux_low_filter_event): New function, party factored out from
9362 linux_wait_for_event.
9363 (linux_wait_for_event): Rename to ...
9364 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9365 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9366 sigsuspend. Check for zombie leaders.
9367 (linux_wait_for_event): Reimplement as wrapper around
9368 linux_wait_for_event_filtered.
9369 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9370 a normal or signal exit is seen, it's the whole process exiting.
9371 (wait_for_sigstop): No longer a for_each_inferior callback.
9372 Rewrite on top of linux_wait_for_event_filtered.
9373 (stop_all_lwps): Call wait_for_sigstop directly.
9374 * server.c (resume, handle_target_event): Handle
9375 TARGET_WAITKIND_NO_RESUMED.
9377 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9379 * win32-low.c (psapi_get_dll_name,
9380 * win32_CreateToolhelp32Snapshot): Delete.
9381 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9382 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9384 (handle_load_dll): Add function description.
9385 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9387 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9389 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9391 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9392 base address when calling win32_add_one_solib.
9393 (handle_load_dll): Delete local variable load_addr.
9394 Remove 0x1000 offset applied to DLL base address when calling
9395 win32_add_one_solib.
9396 (handle_unload_dll): Add comment.
9398 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9400 * win32-low.c (win32_add_all_dlls): Renames
9401 win32_ensure_ntdll_loaded. Rewrite function documentation.
9402 Adjust implementation to always load all DLLs.
9403 Add 0x1000 offset to DLL base address when calling
9404 win32_add_one_solib.
9405 (child_initialization_done): New static global.
9406 (do_initial_child_stuff): Set child_initialization_done to
9407 zero during child initialization, and 1 after. Replace call
9408 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9410 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9411 (handle_unload_dll): Add function documentation.
9412 (get_child_debug_event): Ignore load and unload DLL events
9413 during child initialization.
9415 2014-02-20 Doug Evans <dje@google.com>
9417 Remove global all_lwps.
9418 * inferiors.h (ptid_of): Move here from linux-low.h.
9419 (pid_of, lwpid_of): Ditto.
9420 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9421 parameter is a struct thread_info * now.
9422 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9423 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9424 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9426 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9427 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9428 * linux-arm-low.c (update_registers_callback): Update, "entry"
9429 parameter is a struct thread_info * now.
9430 Fetch lwpid from current_inferior directly.
9431 (arm_insert_point): Pass &all_threads to find_inferior instead of
9433 (arm_remove_point): Ditto.
9434 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9435 (arm_prepare_to_resume): Fetch pid from thread.
9436 (arm_read_description): Fetch lwpid from current_inferior directly.
9437 * linux-low.c (all_lwps): Delete.
9438 (delete_lwp): Delete call to remove_inferior.
9439 (handle_extended_wait): Fetch lwpid from thread.
9440 (add_lwp): Don't set lwp->entry.id. Remove call to
9441 add_inferior_to_list.
9442 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9443 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9444 (kill_one_lwp_callback): Ditto.
9445 (linux_kill): Don't dereference NULL pointer.
9446 Fetch ptid,lwpid from thread.
9447 (get_detach_signal): Fetch ptid from thread.
9448 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9449 Simplify call to regcache_invalidate_thread.
9450 (delete_lwp_callback): Update, "entry" parameter is a
9451 struct thread_info * now. Fetch pid from thread.
9452 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9453 (status_pending_p_callback): Update, "entry" parameter is a
9454 struct thread_info * now. Fetch ptid from thread.
9455 (find_lwp_pid): Update, "entry" parameter is a
9456 struct thread_info * now.
9457 (linux_wait_for_lwp): Fetch pid from thread.
9458 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9459 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9460 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9461 (dequeue_one_deferred_signal): Ditto.
9462 (cancel_breakpoint): Fetch ptid from current_inferior.
9463 (linux_wait_for_event): Pass &all_threads to find_inferior,
9464 not &all_lwps. Fetch ptid, lwpid from thread.
9465 (count_events_callback): Update, "entry" parameter is a
9466 struct thread_info * now.
9467 (select_singlestep_lwp_callback): Ditto.
9468 (select_event_lwp_callback): Ditto.
9469 (cancel_breakpoints_callback): Ditto.
9470 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9472 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9473 (unsuspend_one_lwp): Update, "entry" parameter is a
9474 struct thread_info * now.
9475 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9477 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9478 Fetch lwpid from thread, not lwp.
9479 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9480 Pass &all_threads to find_inferior, not &all_lwps.
9481 (send_sigstop): Fetch lwpid from thread, not lwp.
9482 (send_sigstop_callback): Update, "entry" parameter is a
9483 struct thread_info * now.
9484 (suspend_and_send_sigstop_callback): Ditto.
9485 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9486 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9487 struct thread_info * now.
9488 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9490 (lwp_running): Update, "entry" parameter is a
9491 struct thread_info * now.
9492 (stop_all_lwps): Fetch ptid from thread.
9493 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9494 (linux_resume_one_lwp): Fetch lwpid from thread.
9495 (linux_set_resume_request): Update, "entry" parameter is a
9496 struct thread_info * now. Fetch pid, lwpid from thread.
9497 (resume_status_pending_p): Update, "entry" parameter is a
9498 struct thread_info * now.
9499 (need_step_over_p): Ditto. Fetch lwpid from thread.
9500 (start_step_over): Fetch lwpid from thread.
9501 (linux_resume_one_thread): Update, "entry" parameter is a
9502 struct thread_info * now. Fetch lwpid from thread.
9503 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9504 (proceed_one_lwp): Update, "entry" parameter is a
9505 struct thread_info * now. Fetch lwpid from thread.
9506 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9507 struct thread_info * now.
9508 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9509 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9510 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9512 (regsets_store_inferior_registers): Ditto.
9513 (fetch_register, store_register): Ditto.
9514 (linux_read_memory, linux_write_memory): Ditto.
9515 (linux_request_interrupt): Ditto.
9516 (linux_read_auxv): Ditto.
9517 (linux_xfer_siginfo): Ditto.
9518 (linux_qxfer_spu): Ditto.
9519 (linux_qxfer_libraries_svr4): Ditto.
9520 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9521 moved to inferiors.h.
9523 (get_thread_lwp): Update.
9524 (struct lwp_info): Delete member "entry". Simplify comment for
9527 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9528 current_inferior directly.
9529 (update_watch_registers_callback): Update, "entry" parameter is a
9530 struct thread_info * now. Fetch pid from thread.
9531 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9532 (mips_insert_point): Fetch lwpid from current_inferior.
9533 Pass &all_threads to find_inferior, not &all_lwps.
9534 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9535 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9537 (mips_stopped_data_address): Ditto.
9538 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9540 * linux-tile-low.c (tile_arch_setup): Ditto.
9541 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9542 (update_debug_registers_callback): Update, "entry" parameter is a
9543 struct thread_info * now. Fetch pid from thread.
9544 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9545 Pass &all_threads to find_inferior, not &all_lwps.
9546 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9547 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9548 Pass &all_threads to find_inferior, not &all_lwps.
9549 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9550 (i386_dr_low_get_status): Ditto.
9551 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9552 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9553 (x86_linux_read_description): Ditto.
9554 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9556 2014-02-20 Doug Evans <dje@google.com>
9558 * inferiors.c (get_first_inferior): Fix buglet.
9560 2014-02-19 Doug Evans <dje@google.com>
9562 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9563 * inferiors.c (add_thread): Change result type to struct thread_info *.
9564 All callers updated.
9565 (add_lwp): Call add_thread here instead of in callers.
9566 All callers updated.
9567 * linux-low.h (get_lwp_thread): Rewrite.
9568 (struct lwp_info): New member "thread".
9570 2014-02-19 Doug Evans <dje@google.com>
9572 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9573 All callers updated.
9575 2014-02-19 Doug Evans <dje@google.com>
9577 * inferiors.c (add_thread): Fix whitespace.
9579 2014-02-19 Doug Evans <dje@google.com>
9581 * dll.c (clear_dlls): Replace accessing list implemention details
9583 * gdbthread.h (get_first_thread): Declare.
9584 * inferiors.c (for_each_inferior_with_data): New function.
9585 (get_first_thread): New function.
9586 (find_thread_ptid): Simplify.
9587 (get_first_inferior): New function.
9588 (clear_list): Delete.
9589 (one_inferior_p): New function.
9590 (clear_inferior_list): New function.
9591 (clear_inferiors): Update.
9592 * inferiors.h (for_each_inferior_with_data): Declare.
9593 (clear_inferior_list): Declare.
9594 (one_inferior_p): Declare.
9595 (get_first_inferior): Declare.
9596 * linux-low.c (linux_wait_for_event): Replace accessing list
9597 implemention details with API function.
9598 * server.c (target_running): Ditto.
9599 (accumulate_file_name_length): New function.
9600 (emit_dll_description): New function.
9601 (handle_qxfer_libraries): Replace accessing list implemention
9602 details with API function.
9603 (handle_qxfer_threads_worker): New function.
9604 (handle_qxfer_threads_proper): Replace accessing list implemention
9605 details with API function.
9606 (handle_query): Ditto.
9607 (visit_actioned_threads_callback_ftype): New typedef.
9608 (visit_actioned_threads_data): New struct.
9609 (visit_actioned_threads): Rewrite to be find_inferior callback.
9610 (resume): Call find_inferior.
9611 (handle_status): Replace accessing list implemention
9612 details with API function.
9613 (process_serial_event): Replace accessing list implemention details
9615 * target.c (set_desired_inferior): Replace accessing list implemention
9616 details with API function.
9617 * tracepoint.c (same_process_p): New function.
9618 (gdb_agent_about_to_close): Replace accessing list implemention
9619 details with API function.
9620 * win32-low.c (child_delete_thread): Replace accessing list
9621 implemention details with API function.
9622 (match_dll_by_basename): New function.
9623 (dll_is_loaded_by_basename): New function.
9624 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9625 details call to dll_is_loaded_by_basename.
9627 2014-02-19 Doug Evans <dje@google.com>
9629 * dll.h (struct dll_info): Add comment.
9630 * gdbthread.h (struct thread_info): Add comment.
9631 (current_ptid): Simplify.
9632 * inferiors.c (add_process): Update.
9633 (remove_process): Update.
9634 * inferiors.h (struct process_info): Rename member "head" to "entry".
9635 * linux-low.c (delete_lwp): Update.
9637 (last_thread_of_process_p): Update.
9638 (kill_one_lwp_callback, linux_kill): Update.
9639 (status_pending_p_callback): Update.
9640 (wait_for_sigstop): Update. Simplify read of ptid.
9641 (start_step_over): Update.
9642 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9643 (get_lwp_thread): Update.
9644 (struct lwp_info): Rename member "head" to "entry".
9645 * regcache.h (inferior_list_entry): Delete.
9646 * server.c (kill_inferior_callback): Update.
9647 (detach_or_kill_inferior_callback): Update.
9648 (print_started_pid): Update.
9649 (print_attached_pid): Update.
9650 (process_serial_event): Simplify read of ptid.
9651 * thread-db.c (thread_db_create_event): Update.
9652 (thread_db_get_tls_address): Update.
9653 * win32-low.c (current_inferior_ptid): Simplify.
9655 2014-02-19 Tom Tromey <tromey@redhat.com>
9657 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9659 (target_supports_btrace): Update.
9661 2014-02-14 Yao Qi <yao@codesourcery.com>
9663 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9664 (rsp-low-ipa.o): New target.
9666 2014-02-12 Tom Tromey <tromey@redhat.com>
9668 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9669 convert_ascii_to_int.
9670 * regcache.c (registers_to_string): Likewise.
9671 * remote-utils.c (decode_M_packet): Likewise.
9672 * server.c (process_serial_event): Likewise.
9674 2014-02-12 Tom Tromey <tromey@redhat.com>
9676 * server.c (handle_query, handle_v_run): Use hex2bin, not
9678 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9680 2014-02-12 Tom Tromey <tromey@redhat.com>
9682 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9683 convert_int_to_ascii.
9684 * regcache.c (registers_to_string, collect_register_as_string):
9686 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9688 * server.c (process_serial_event): Likewise.
9689 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9690 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9692 2014-02-12 Tom Tromey <tromey@redhat.com>
9694 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9695 bin2hex, not hexify.
9696 * tracepoint.c (cmd_qtstatus): Likewise.
9698 2014-02-12 Tom Tromey <tromey@redhat.com>
9700 * remote-utils.c (monitor_output): Pass explicit length to
9703 2014-02-12 Tom Tromey <tromey@redhat.com>
9705 * tracepoint.c: Include rsp-low.h.
9706 * server.c: Include rsp-low.h.
9707 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9708 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9710 * remote-utils.c: Include rsp-low.h.
9711 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9712 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9713 (convert_int_to_ascii, convert_ascii_to_int): Move to
9715 * regcache.c: Include rsp-low.h.
9716 * ax.c: Include rsp-low.h.
9717 * Makefile.in (SFILES): Add common/rsp-low.c.
9718 (OBS): Add rsp-low.o.
9719 (rsp-low.o): New target.
9721 2014-02-12 Tom Tromey <tromey@redhat.com>
9723 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9724 Include print-utils.h.
9725 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9726 (plongest, thirty_two, phex_nz): Remove.
9727 * Makefile.in (SFILES): Add common/print-utils.c.
9728 (OBS): Add print-utils.o.
9729 (print-utils-ipa.o): New target.
9730 (print-utils.o): New target.
9731 (IPA_OBJS): Add print-utils-ipa.o.
9733 2014-02-06 Tom Tromey <tromey@redhat.com>
9735 * Makefile.in (SFILES): Fix indentation.
9737 2014-02-05 Doug Evans <dje@google.com>
9739 * linux-low.c (linux_wait_for_event): Improve comment.
9740 (linux_wait_1): Keep current_inferior in sync with event_child.
9742 2014-01-22 Doug Evans <dje@google.com>
9744 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9746 2014-01-22 Doug Evans <dje@google.com>
9748 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9749 * configure: Regenerate.
9750 * config.in: Regenerate.
9751 * Makefile.in (SFILES): Add debug.c.
9753 * debug.c: New file.
9754 * debug.h: New file.
9755 * linux-aarch64-low.c (*): Update all debugging printfs to use
9756 debug_printf instead of fprintf.
9757 * linux-arm-low.c (*): Ditto.
9758 * linux-cris-low.c (*): Ditto.
9759 * linux-crisv32-low.c (*): Ditto.
9760 * linux-m32r-low.c (*): Ditto.
9761 * linux-sparc-low.c (*): Ditto.
9762 * linux-x86.c (*): Ditto.
9763 * linux-low.c (*): Ditto.
9764 (linux_wait_1): Add calls to debug_enter, debug_exit.
9765 (linux_wait): Remove redundant debugging printf.
9766 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9767 (linux_resume, unstop_all_lwps): Ditto.
9768 * mem-break.c (*): Update all debugging printfs to use
9769 debug_printf instead of fprintf.
9770 * remote-utils.c (*): Ditto.
9771 * thread-db.c (*): Ditto.
9772 * server.c #include <ctype.h>, "gdb_vecs.h".
9773 (debug_threads): Moved to debug.c.
9774 (*): Update all debugging printfs to use debug_printf instead of
9776 (start_inferior): Replace call to fflush with call to debug_flush.
9777 (monitor_show_help): Mention set debug-format.
9778 (parse_debug_format_options): New function.
9779 (handle_monitor_command): Handle "monitor set debug-format".
9780 (gdbserver_usage): Mention --debug-format.
9781 (main): Parse --debug-format.
9782 * server.h (debug_threads): Declaration moved to debug.h.
9784 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9785 trace_debug_1 that uses debug_printf.
9786 (tracepoint_look_up_symbols): Update all debugging printfs to use
9787 debug_printf instead of fprintf.
9789 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9791 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9794 2014-01-17 Pedro Alves <palves@redhat.com>
9797 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9798 defined after including gdb_proc_service.h.
9800 2014-01-16 Doug Evans <dje@google.com>
9802 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9803 (match_dll): Use it.
9805 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9807 * target.h (target_ops) <read_btrace>: Change parameters and
9808 return type to allow error reporting.
9809 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9810 trace reading errors on.
9811 * linux-low.c (linux_low_read_btrace): Pass trace reading
9813 (linux_low_disable_btrace): New.
9815 2014-01-15 Doug Evans <dje@google.com>
9817 * inferiors.c (thread_id_to_gdb_id): Delete.
9818 * inferiors.h (thread_id_to_gdb_id): Delete.
9820 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9822 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9823 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9826 2014-01-08 Pedro Alves <palves@redhat.com>
9828 * server.c (handle_status): Don't discard previous queued stop
9829 replies or thread's pending status here.
9830 (main) <disconnection>: Do it here instead.
9832 2014-01-08 Pedro Alves <palves@redhat.com>
9834 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9835 * server.c (visit_actioned_threads, handle_pending_status): New
9837 (handle_v_cont): Factor out parts to ...
9838 (resume): ... this new function. If in all-stop, and a thread
9839 being resumed has a pending status, report it without actually
9841 (myresume): Adjust to use the new 'resume' function.
9842 (clear_pending_status_callback, set_pending_status_callback)
9843 (find_status_pending_thread_callback): New functions.
9844 (handle_status): Handle the case of multiple threads having
9845 interesting statuses to report. Report threads' real last signal
9846 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9847 with an interesting thread to report the status for, instead of
9848 always reporting the status of the first thread.
9850 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9852 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9853 * gdbreplay.c (gdbreplay_version): Likewise.
9855 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9857 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9858 iov.iov_len with the real length in use.
9860 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9862 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9863 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9864 for all targets that use win32-low.c.
9865 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9866 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9868 2013-12-13 Pedro Alves <palves@redhat.com>
9870 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9871 if equal to TARGET_WAITKIND_LOADED.
9872 * win32-low.c (cached_status): New static global.
9873 (win32_wait): Add declaration.
9874 (do_initial_child_stuff): Flush all initial pending debug events
9875 up to the initial breakpoint.
9876 (win32_wait): If CACHED_STATUS was set, return that instead
9877 of doing a real wait. Remove the code resuming the execution
9878 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9879 during the initial phase. Also remove the code changing
9880 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9881 TARGET_WAITKIND_STOPPED.
9883 2013-12-11 Yao Qi <yao@codesourcery.com>
9885 * notif.c (handle_notif_ack): Return 0 if no notification
9888 2013-11-20 Doug Evans <dje@google.com>
9890 * linux-low.c (linux_set_resume_request): Fix comment.
9892 2013-11-20 Doug Evans <dje@google.com>
9894 * linux-low.c (resume_status_pending_p): Tweak comment.
9896 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9898 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9899 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9900 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9901 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9902 (srv_amd64_regobj): Add amd64-mpx.o.
9903 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9904 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9905 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9906 * i387-fp.c (num_pl_bnd_register) Added constant.
9907 (num_pl_bnd_cfg_registers) Added constant.
9908 (struct i387_xsave) Added reserved area and MPX fields.
9909 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9910 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9912 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9913 (init_registers_amd64_mpx_linux): Declare new function.
9914 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9915 (x86_64_regmap): Add MPX registers.
9916 (x86_linux_read_description): Add MPX case.
9917 (initialize_low_arch): Initialize MPX targets.
9919 2013-11-18 Tom Tromey <tromey@redhat.com>
9921 * configure: Rebuild.
9922 * configure.ac: Don't check for stdlib.h.
9923 * gdbreplay.c: Unconditionally include stdlib.h.
9925 2013-11-18 Tom Tromey <tromey@redhat.com>
9927 * config.in: Rebuild.
9928 * configure: Rebuild.
9929 * configure.ac: Don't use AC_HEADER_DIRENT.
9931 2013-11-18 Tom Tromey <tromey@redhat.com>
9933 * server.h: Don't check HAVE_STRING_H.
9934 * gdbreplay.c: Don't check HAVE_STRING_H.
9935 * configure: Rebuild.
9937 2013-11-18 Tom Tromey <tromey@redhat.com>
9939 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9942 2013-11-08 Tom Tromey <tromey@redhat.com>
9944 * configure, config.in: Rebuild.
9945 * configure.ac: Remove unused configury.
9947 2013-11-08 Tom Tromey <tromey@redhat.com>
9949 * acinclude.m4: Include common.m4, codeset.m4.
9950 * configure, config.in: Rebuild.
9951 * configure.ac: Use GDB_AC_COMMON.
9953 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9955 * linux-s390-low.c (HWCAP_S390_TE): New define.
9956 (s390_arch_setup): Consider the TE field in the HWCAP for
9957 determining 'have_regset_tdb'.
9959 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9962 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9965 2013-10-02 Pedro Alves <palves@redhat.com>
9967 * server.c (process_serial_event): Don't output "GDBserver
9968 exiting" if GDB is connected through stdio.
9969 * target.c (mywait): Likewise, be silent if GDB is connected
9972 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9974 * lynx-low.c (lynx_add_threads_after_attach): New function.
9975 (lynx_attach): Remove call to add_thread. Add call to
9976 lynx_add_threads_after_attach instead.
9978 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9980 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9981 * config.in, configure: Regenerated.
9983 2013-09-18 Yao Qi <yao@codesourcery.com>
9986 * server.c (start_inferior): Clear 'resume_info'.
9988 2013-09-16 Jiong Wang <jiwang@tilera.com>
9990 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9993 2013-09-16 Jiong Wang <jiwang@tilera.com>
9995 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9996 linux-tile-low.o to srv_tgtobj.
9998 2013-09-16 Will Newton <will.newton@linaro.org>
10000 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10003 2013-09-06 Pedro Alves <palves@redhat.com>
10005 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10006 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10007 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10008 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10009 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10010 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10012 2013-09-06 Pedro Alves <palves@redhat.com>
10014 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10015 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10017 2013-09-06 Pedro Alves <palves@redhat.com>
10019 * linux-amd64-ipa.c: Include tracepoint.h.
10020 * linux-i386-ipa.c: Include tracepoint.h.
10022 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10024 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10025 (ps_get_thread_area): New function.
10027 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10029 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10030 (initialize_low_arch): Call init_registers_crisv32 rather than
10031 init_register_crisv32.
10033 2013-09-05 Pedro Alves <palves@redhat.com>
10035 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10037 * hostio.h: ... this new file.
10038 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10039 win32-low.c: Include hostio.h.
10041 2013-09-05 Pedro Alves <palves@redhat.com>
10043 * server.h (gdb_client_data, handler_func, callback_handler_func)
10044 (delete_file_handler, add_file_handler, append_callback_event)
10045 (delete_callback_event, start_event_loop, initialize_event_loop):
10046 Move to event-loop.h and include it.
10047 * event-loop.h: New file.
10049 2013-09-05 Pedro Alves <palves@redhat.com>
10051 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10052 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10053 (loaded_dll, unloaded_dll): Move to ...
10054 * dll.h: ... this new file.
10055 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10057 2013-09-05 Pedro Alves <palves@redhat.com>
10059 * server.h (current_process, get_thread_process, all_processes)
10060 (add_inferior_to_list, for_each_inferior, current_inferior)
10061 (remove_inferior, add_process, remove_process, find_process_pid)
10062 (have_started_inferiors_p, have_attached_inferiors_p)
10063 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10064 (clear_inferiors, find_inferior, find_inferior_id)
10065 (inferior_target_data, set_inferior_target_data)
10066 (inferior_regcache_data, set_inferior_regcache_data): Move to
10067 inferiors.h, and include it.
10068 * inferiors.h: New file.
10070 2013-09-05 Pedro Alves <palves@redhat.com>
10072 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10076 2013-09-05 Pedro Alves <palves@redhat.com>
10078 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10080 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10081 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10082 (handle_tracepoint_general_set, handle_tracepoint_query)
10083 (tracepoint_finished_step, tracepoint_was_hit)
10084 (release_while_stepping_state_list, current_traceframe)
10085 (in_readonly_region, traceframe_read_mem)
10086 (fetch_traceframe_registers, traceframe_read_sdata)
10087 (traceframe_read_info, struct fast_tpoint_collect_status)
10088 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10089 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10090 (supply_fast_tracepoint_registers)
10091 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10092 (ipa_tdesc, claim_trampoline_space)
10093 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10094 (agent_mem_read, agent_get_trace_state_variable_value)
10095 (agent_set_trace_state_variable_value, agent_tsv_read)
10096 (agent_mem_read_string, get_raw_reg_func_addr)
10097 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10098 * tracepoint.h: ... this new file.
10100 2013-09-05 Pedro Alves <palves@redhat.com>
10102 * server.h (perror_with_name, error, fatal, warning, paddress)
10103 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10105 * utils.h: New file.
10107 2013-09-05 Pedro Alves <palves@redhat.com>
10109 * server.h (remote_debug, noack_mode, transport_is_reliable)
10110 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10111 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10112 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10113 (write_enn, initialize_async_io, enable_async_io)
10114 (disable_async_io, check_remote_input_interrupt_request)
10115 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10116 (dead_thread_notify, prepare_resume_reply)
10117 (decode_address_to_semicolon, decode_address, decode_m_packet)
10118 (decode_M_packet, decode_X_packet, decode_xfer_write)
10119 (decode_search_memory_packet, unhexify, hexify)
10120 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10121 (look_up_one_symbol, relocate_instruction)
10122 (monitor_output): Move to remote-utils.h, and include it.
10123 * remote-utils.h: New file.
10125 2013-09-05 Pedro Alves <palves@redhat.com>
10127 * server.h (_): Delete.
10129 2013-09-02 Pedro Alves <palves@redhat.com>
10131 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10132 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10134 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10136 2013-09-02 Pierre Muller <muller@sourceware.org>
10138 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10139 or WriteProcessMemory complete successfully and handle
10140 ERROR_PARTIAL_COPY error.
10142 2013-09-02 Pedro Alves <palves@redhat.com>
10144 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10145 error instead of EIO.
10147 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10150 * linux-low.c: Include filestuff.h.
10151 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10152 * lynx-low.c: Include filestuff.h.
10153 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10154 * server.c: Include filestuff.h.
10155 (main): Call notice_open_fds.
10156 * spu-low.c: Include filestuff.h.
10157 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10159 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10161 * Makefile.in: Explain why ../target and ../nat are not
10162 listed as include file search paths.
10163 (linux-waitpid.o): New object file rule.
10164 * configure.srv (srv_native_linux_obj): New variable.
10165 Replace all occurrences of linux native object files with
10166 $srv_native_linux_obj.
10167 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10168 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10169 (linux_enable_event_reporting): Remove declaration.
10170 (my_waitpid): Moved to common/linux-waitpid.c.
10171 (linux_wait_for_event): Pass ptid when calling
10172 linux_enable_event_reporting.
10173 (linux_supports_tracefork_flag): Remove.
10174 (linux_enable_event_reporting): Likewise.
10175 (linux_tracefork_grandchild): Remove.
10176 (STACK_SIZE): Moved to common/linux-ptrace.c.
10177 (linux_tracefork_child): Remove.
10178 (linux_test_for_tracefork): Remove.
10179 (linux_look_up_symbols): Call linux_supports_traceclone.
10180 (initialize_low): Remove call to linux_test_for_tracefork.
10181 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10182 common/linux-ptrace.h.
10183 (PTRACE_TYPE_ARG4): Likewise.
10184 Include linux-ptrace.h.
10186 2013-08-21 Pedro Alves <palves@redhat.com>
10188 * config.in: Renegerate.
10190 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10192 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10193 (SFILES): Remove $(srcdir)/common/target-common.c and
10194 add $(srcdir)/target/waitstatus.c.
10195 (OBS): Remove target-common.o and add waitstatus.o.
10196 (server_h): Remove $(srcdir)/../common/target-common.h and
10197 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10198 and $(srcdir)/../target/waitstatus.h.
10199 (target-common.o): Remove.
10200 (waitstatus.o): New target object file.
10201 * target.h: Do not include target-common.h and
10202 include target/resume.h, target/wait.h and
10203 target/waitstatus.h.
10205 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10207 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10208 to PTRACE_TYPE_ARG3.
10209 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10210 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10212 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10213 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10215 2013-07-27 Jie Zhang <jie@codesourcery.com>
10216 Daniel Jacobowitz <dan@codesourcery.com>
10217 Yao Qi <yao@codesourcery.com>
10219 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10220 (mips-linux-watch.o): New rule.
10221 (mips_linux_watch_h): New variable.
10222 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10224 * linux-mips-low.c: Include mips-linux-watch.h.
10225 (struct arch_process_info, struct arch_lwp_info): New.
10226 (update_watch_registers_callback): New function.
10227 (mips_linux_new_process, mips_linux_new_thread) New functions.
10228 (mips_linux_prepare_to_resume, mips_insert_point): New
10230 (mips_remove_point, mips_stopped_by_watchpoint): New
10232 (rsp_bp_type_to_target_hw_bp_type): New function.
10233 (mips_stopped_data_address): New function.
10234 (the_low_target): Add watchpoint support functions.
10236 2013-07-27 Yao Qi <yao@codesourcery.com>
10238 * i386-low.c: Include break-common.h.
10239 (enum target_hw_bp_type): Remove.
10241 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10243 * Makefile.in (SFILES): /common/target-common.c.
10244 (OBS): Add target-common.o.
10245 (server_h): Add $(srcdir)/../common/target-common.h.
10246 (target-common.o): New target.
10247 * server.c (queue_stop_reply_callback): Free
10248 status string after use.
10249 * target.c (target_waitstatus_to_string): Remove.
10250 * target.h: Include target-common.h.
10251 (resume_kind): Likewise.
10252 (target_waitkind): Likewise.
10253 (target_waitstatus): Likewise.
10254 (TARGET_WNOHANG): Likewise.
10256 2013-07-04 Yao Qi <yao@codesourcery.com>
10258 * Makefile.in (host_alias): Use @host_noncanonical@.
10259 (target_alias): Use @target_noncanonical@.
10260 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10261 ACX_NONCANONICAL_HOST.
10262 * configure: Regenerated.
10265 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10267 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10268 * configure: Rebuild.
10269 * Makefile.in (version_host, version_target): Get from configure.
10270 (version.c): Use $(version_host) and $(version_target).
10272 2013-07-03 Pedro Alves <palves@redhat.com>
10274 * Makefile.in (config.status): Depend on development.sh.
10275 * acinclude.m4: Include libmcheck.m4.
10276 * configure: Regenerate.
10278 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10280 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10281 attribute inside the parentheses.
10282 (winapi_DebugSetProcessKillOnExit): Ditto.
10283 (winapi_DebugBreakProcess): Ditto.
10284 (winapi_GenerateConsoleCtrlEvent): Ditto.
10286 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10288 * notif.h (notif_event): Add a dummy member to avoid compiler
10291 2013-07-01 Pedro Alves <palves@redhat.com>
10293 * hostio.c (HOSTIO_PATH_MAX): Define.
10294 (require_filename, handle_open, handle_unlink, handle_readlink):
10297 2013-07-01 Pedro Alves <palves@redhat.com>
10299 * server.h: Include "pathmax.h".
10300 * linux-low.c: Don't include sys/param.h.
10301 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10303 * win32-low.c: Don't include sys/param.h.
10304 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10306 2013-07-01 Pedro Alves <palves@redhat.com>
10308 * event-loop.c: Don't check HAVE_UNISTD_H before including
10310 * gdbreplay.c: Likewise.
10311 * remote-utils.c: Likewise.
10312 * server.c: Likewise.
10313 * configure.ac: Don't check for unistd.h.
10314 * configure: Regenerate.
10316 2013-06-28 Tom Tromey <tromey@redhat.com>
10318 * Makefile.in (version.c): Use version.in, not
10321 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10323 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10324 * configure: Rebuild.
10325 * Makefile.in (version_host, version_target): Get from configure.
10326 (version.c): Use $(version_host) and $(version_target).
10328 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10330 Fix trace-status to output user name without trailing colon.
10331 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10333 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10335 Fix trace-status to output proper start-time and stop-time.
10336 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10337 output start time and stop time in hex as gdb expects.
10339 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10341 * tracepoint.c (build_traceframe_info_xml): Output trace state
10342 variables present in the trace buffer.
10344 2013-06-24 Tom Tromey <tromey@redhat.com>
10346 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10348 (version.o): Remove.
10349 * gdbreplay.c: Include version.h.
10350 (version, host_name): Don't declare.
10351 * server.h: Include version.h.
10352 (version, host_name): Don't declare.
10354 2013-06-12 Pedro Alves <palves@redhat.com>
10356 * linux-x86-low.c (linux_is_elf64): Delete global.
10357 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10358 with local linux_pid_exe_is_elf_64_file use.
10360 2013-06-11 Pedro Alves <palves@redhat.com>
10362 * linux-low.c (regset_disabled, disable_regset): New functions.
10363 (regsets_fetch_inferior_registers)
10364 (regsets_store_inferior_registers): Use them.
10365 (initialize_regsets_info); Don't allocate the disabled_regsets
10367 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10370 2013-06-11 Pedro Alves <palves@redhat.com>
10372 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10375 2013-06-11 Pedro Alves <palves@redhat.com>
10377 * linux-x86-low.c (initialize_low_arch): Call
10378 init_registers_x32_avx_linux.
10380 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10382 Fix compatibility with Android Bionic.
10383 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10386 2013-06-07 Pedro Alves <palves@redhat.com>
10389 * Makefile.in (OBS): Add tdesc.o.
10390 (IPA_OBJS): Add tdesc-ipa.o.
10391 (tdesc-ipa.o): New rule.
10392 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10394 * linux-low.c (new_inferior): Delete.
10395 (disabled_regsets, num_regsets): Delete.
10396 (linux_add_process): Adjust to set the new per-process
10398 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10399 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10400 was a stop. When calling arch_setup, switch the current inferior
10401 to the thread that got an event.
10402 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10403 (regsets_fetch_inferior_registers)
10404 (regsets_store_inferior_registers): New regsets_info parameter.
10406 (linux_register_in_regsets): New regs_info parameter. Adjust to
10408 (register_addr, fetch_register, store_register): New usrregs_info
10409 parameter. Adjust to use it.
10410 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10411 parameter regs_info. Adjust to use it.
10412 (linux_fetch_registers): Get the current inferior's regs_info, and
10414 (linux_store_registers): Ditto.
10415 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10416 (initialize_low): Don't initialize the target_regsets here. Call
10417 initialize_low_arch.
10418 * linux-low.h (target_regsets): Delete declaration.
10419 (struct regsets_info): New.
10420 (struct usrregs_info): New.
10421 (struct regs_info): New.
10422 (struct process_info_private) <new_inferior>: New field.
10423 (struct linux_target_ops): Delete the num_regs, regmap, and
10424 regset_bitmap fields. New field regs_info.
10425 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10426 * i387-fp.c (num_xmm_registers): Delete.
10427 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10428 calls to new interface.
10429 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10430 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10431 Infer the number of xmm registers from the regcache's target
10433 * i387-fp.h (num_xmm_registers): Delete.
10434 * inferiors.c (add_thread): Don't install the thread's regcache
10436 * proc-service.c (gregset_info): Fetch the current inferior's
10437 regs_info. Adjust to use it.
10438 * regcache.c: Include tdesc.h.
10439 (register_bytes, reg_defs, num_registers)
10440 (gdbserver_expedite_regs): Delete.
10441 (get_thread_regcache): If the thread doesn't have a regcache yet,
10442 create one, instead of aborting gdbserver.
10443 (regcache_invalidate_one): Rename to ...
10444 (regcache_invalidate_thread): ... this.
10445 (regcache_invalidate_one): New.
10446 (regcache_invalidate): Only invalidate registers of the current
10448 (init_register_cache): Add target_desc parameter, and use it.
10449 (new_register_cache): Ditto. Assert the target description has a
10450 non zero registers_size.
10451 (regcache_cpy): Add assertions. Adjust.
10452 (realloc_register_cache, set_register_cache): Delete.
10453 (registers_to_string, registers_from_string): Adjust.
10454 (find_register_by_name, find_regno, find_register_by_number)
10455 (register_cache_size): Add target_desc parameter, and use it.
10456 (free_register_cache_thread, free_register_cache_thread_one)
10457 (regcache_release, register_cache_size): New.
10458 (register_size): Add target_desc parameter, and use it.
10459 (register_data, supply_register, supply_register_zeroed)
10460 (supply_regblock, supply_register_by_name, collect_register)
10461 (collect_register_as_string, collect_register_by_name): Adjust.
10462 * regcache.h (struct target_desc): Forward declare.
10463 (struct regcache) <tdesc>: New field.
10464 (init_register_cache, new_register_cache): Add target_desc
10466 (regcache_invalidate_thread): Declare.
10467 (regcache_invalidate_one): Delete declaration.
10468 (regcache_release): Declare.
10469 (find_register_by_number, register_cache_size, register_size)
10470 (find_regno): Add target_desc parameter.
10471 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10473 * remote-utils.c: Include tdesc.h.
10474 (outreg, prepare_resume_reply): Adjust.
10475 * server.c: Include tdesc.h.
10476 (gdbserver_xmltarget): Delete declaration.
10477 (get_features_xml, process_serial_event): Adjust.
10478 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10480 (struct process_info) <tdesc>: New field.
10481 (ipa_tdesc): Declare.
10482 * tdesc.c: New file.
10483 * tdesc.h: New file.
10484 * tracepoint.c: Include tdesc.h.
10485 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10486 (get_context_regcache): Adjust to pass ipa_tdesc down.
10487 (do_action_at_tracepoint): Adjust to get the register cache size
10488 from the context regcache's description.
10489 (traceframe_walk_blocks): Adjust to get the register cache size
10490 from the current trace frame's description.
10491 (traceframe_get_pc): Adjust to get current trace frame's
10492 description and pass it down.
10493 (gdb_collect): Adjust to get the register cache size from the
10495 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10496 (gdbserver_xmltarget): Delete.
10497 (initialize_low_tracepoint): Set the ipa's target description.
10498 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10499 (initialize_low_tracepoint): Set the ipa's target description.
10500 * linux-x86-low.c: Include tdesc.h.
10501 [__x86_64__] (is_64bit_tdesc): New.
10502 (ps_get_thread_area, x86_get_thread_area): Use it.
10503 (i386_cannot_store_register): Rename to ...
10504 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10505 (i386_cannot_fetch_register): Rename to ...
10506 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10507 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10509 (target_regsets): Rename to ...
10510 (x86_regsets): ... this.
10511 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10513 (x86_siginfo_fixup): Use is_64bit_tdesc.
10514 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10515 (tdesc_x32_avx_linux, tdesc_x32_linux)
10516 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10518 (x86_linux_update_xmltarget): Delete.
10519 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10520 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10521 (AMD64_LINUX_USER64_CS): New.
10522 (x86_linux_read_description): New, based on
10523 x86_linux_update_xmltarget.
10524 (same_process_callback): New.
10525 (x86_arch_setup_process_callback): New.
10526 (x86_linux_update_xmltarget): New.
10527 (x86_regsets_info): New.
10528 (amd64_linux_regs_info): New.
10529 (i386_linux_usrregs_info): New.
10530 (i386_linux_regs_info): New.
10531 (x86_linux_regs_info): New.
10532 (x86_arch_setup): Reimplement.
10533 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10534 (x86_emit_ops): Ditto.
10535 (the_low_target): Adjust. Install x86_linux_regs_info,
10536 x86_cannot_fetch_register, and x86_cannot_store_register.
10537 (initialize_low_arch): New.
10538 * linux-ia64-low.c (tdesc_ia64): Declare.
10539 (ia64_fetch_register): Adjust.
10540 (ia64_usrregs_info, regs_info): New globals.
10541 (ia64_regs_info): New function.
10542 (the_low_target): Adjust.
10543 (initialize_low_arch): New function.
10544 * linux-sparc-low.c (tdesc_sparc64): Declare.
10545 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10547 (sparc_arch_setup): New function.
10548 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10549 (the_low_target): Adjust.
10550 (initialize_low_arch): New function.
10551 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10552 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10553 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10554 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10555 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10556 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10557 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10558 (tdesc_powerpc_isa205_vsx64l): Declare.
10559 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10560 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10561 (ppc_set_pc, ppc_get_hwcap): Adjust.
10562 (ppc_usrregs_info): Forward declare.
10563 (!__powerpc64__) ppc_regmap_adjusted: New global.
10564 (ppc_arch_setup): Adjust to the current process'es target
10566 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10567 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10568 (ppc_store_evrregset): Adjust.
10569 (target_regsets): Rename to ...
10570 (ppc_regsets): ... this, and make static.
10571 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10572 (ppc_regs_info): New function.
10573 (the_low_target): Adjust.
10574 (initialize_low_arch): New function.
10575 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10576 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10577 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10578 (tdesc_s390x_linux64v2): Declare.
10579 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10580 (s390_fill_gregset, s390_store_last_break): Adjust.
10581 (target_regsets): Rename to ...
10582 (s390_regsets): ... this, and make static.
10583 (s390_get_pc, s390_set_pc): Adjust.
10584 (s390_get_hwcap): New target_desc parameter, and use it.
10585 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10586 (s390_arch_setup): Adjust to set the current process'es target
10587 description. Don't adjust the regmap.
10588 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10589 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10590 (regs_info_3264): New globals.
10591 (s390_regs_info): New function.
10592 (the_low_target): Adjust.
10593 (initialize_low_arch): New function.
10594 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10595 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10596 [__mips64] (init_registers_mips_linux)
10597 (init_registers_mips_dsp_linux): Delete defines.
10598 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10599 (have_dsp): New global.
10600 (mips_read_description): New, based on mips_arch_setup.
10601 (mips_arch_setup): Reimplement.
10602 (get_usrregs_info): New function.
10603 (mips_cannot_fetch_register, mips_cannot_store_register)
10604 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10605 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10606 (target_regsets): Rename to ...
10607 (mips_regsets): ... this, and make static.
10608 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10609 (dsp_regs_info, regs_info): New globals.
10610 (mips_regs_info): New function.
10611 (the_low_target): Adjust.
10612 (initialize_low_arch): New function.
10613 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10614 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10616 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10617 (arm_read_description): New, with bits factored from
10619 (arm_arch_setup): Reimplement.
10620 (target_regsets): Rename to ...
10621 (arm_regsets): ... this, and make static.
10622 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10623 (arm_regs_info): New function.
10624 (the_low_target): Adjust.
10625 (initialize_low_arch): New function.
10626 * linux-m68k-low.c (tdesc_m68k): Declare.
10627 (target_regsets): Rename to ...
10628 (m68k_regsets): ... this, and make static.
10629 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10630 (m68k_regs_info): New function.
10631 (m68k_arch_setup): New function.
10632 (the_low_target): Adjust.
10633 (initialize_low_arch): New function.
10634 * linux-sh-low.c (tdesc_sharch): Declare.
10635 (target_regsets): Rename to ...
10636 (sh_regsets): ... this, and make static.
10637 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10638 (sh_regs_info, sh_arch_setup): New functions.
10639 (the_low_target): Adjust.
10640 (initialize_low_arch): New function.
10641 * linux-bfin-low.c (tdesc_bfin): Declare.
10642 (bfin_arch_setup): New function.
10643 (bfin_usrregs_info, regs_info): New globals.
10644 (bfin_regs_info): New function.
10645 (the_low_target): Adjust.
10646 (initialize_low_arch): New function.
10647 * linux-cris-low.c (tdesc_cris): Declare.
10648 (cris_arch_setup): New function.
10649 (cris_usrregs_info, regs_info): New globals.
10650 (cris_regs_info): New function.
10651 (the_low_target): Adjust.
10652 (initialize_low_arch): New function.
10653 * linux-cris-low.c (tdesc_crisv32): Declare.
10654 (cris_arch_setup): New function.
10655 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10656 (cris_regs_info): New function.
10657 (the_low_target): Adjust.
10658 (initialize_low_arch): New function.
10659 * linux-m32r-low.c (tdesc_m32r): Declare.
10660 (m32r_arch_setup): New function.
10661 (m32r_usrregs_info, regs_info): New globals.
10662 (m32r_regs_info): Adjust.
10663 (initialize_low_arch): New function.
10664 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10665 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10666 (tic6x_usrregs_info): Forward declare.
10667 (tic6x_read_description): New function, based on ...
10668 (tic6x_arch_setup): ... this. Reimplement.
10669 (target_regsets): Rename to ...
10670 (tic6x_regsets): ... this, and make static.
10671 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10672 (tic6x_regs_info): New function.
10673 (the_low_target): Adjust.
10674 (initialize_low_arch): New function.
10675 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10676 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10677 (target_regsets): Rename to ...
10678 (xtensa_regsets): ... this, and make static.
10679 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10681 (xtensa_arch_setup, xtensa_regs_info): New functions.
10682 (the_low_target): Adjust.
10683 (initialize_low_arch): New function.
10684 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10685 (nios2_arch_setup): Set the current process'es tdesc.
10686 (target_regsets): Rename to ...
10687 (nios2_regsets): ... this.
10688 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10689 (nios2_regs_info): New function.
10690 (the_low_target): Adjust.
10691 (initialize_low_arch): New function.
10692 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10693 (aarch64_arch_setup): Set the current process'es tdesc.
10694 (target_regsets): Rename to ...
10695 (aarch64_regsets): ... this.
10696 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10697 (aarch64_regs_info): New function.
10698 (the_low_target): Adjust.
10699 (initialize_low_arch): New function.
10700 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10702 (target_regsets): Rename to ...
10703 (tile_regsets): ... this.
10704 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10705 (tile_regs_info): New function.
10706 (tile_arch_setup): Set the current process'es tdesc.
10707 (the_low_target): Adjust.
10708 (initialize_low_arch): New function.
10709 * spu-low.c (tdesc_spu): Declare.
10710 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10711 * win32-arm-low.c (tdesc_arm): Declare.
10712 (arm_arch_setup): New function.
10713 (the_low_target): Install arm_arch_setup instead of
10714 init_registers_arm.
10715 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10716 (init_windows_x86): Rename to ...
10717 (i386_arch_setup): ... this. Set `win32_tdesc'.
10718 (the_low_target): Adjust.
10719 * win32-low.c (win32_tdesc): New global.
10720 (child_add_thread): Don't create the thread cache here.
10721 (do_initial_child_stuff): Set the new process'es tdesc.
10722 * win32-low.h (struct target_desc): Forward declare.
10723 (win32_tdesc): Declare.
10724 * lynx-i386-low.c (tdesc_i386): Declare global.
10725 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10726 * lynx-low.c (lynx_tdesc): New global.
10727 (lynx_add_process): Set the new process'es tdesc.
10728 * lynx-low.h (struct target_desc): Forward declare.
10729 (lynx_tdesc): Declare global.
10730 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10731 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10732 * nto-low.c (nto_tdesc): New global.
10733 (do_attach): Set the new process'es tdesc.
10734 * nto-low.h (struct target_desc): Forward declare.
10735 (nto_tdesc): Declare.
10736 * nto-x86-low.c (tdesc_i386): Declare.
10737 (nto_x86_arch_setup): Set `nto_tdesc'.
10739 2013-06-04 Gary Benson <gbenson@redhat.com>
10741 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10742 to qSupported response when appropriate.
10743 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10744 with nonzero-length annex.
10745 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10746 arguments supplied in annex.
10748 2013-05-31 Doug Evans <dje@google.com>
10751 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10752 64 bits in 64-cross-32 environment.
10754 2013-05-28 Pedro Alves <palves@redhat.com>
10756 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10757 (aarch64-without-fpu.c): Delete rule.
10758 * configure.srv (aarch64*-*-linux*): Remove references to
10759 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10760 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10763 2013-05-24 Pedro Alves <palves@redhat.com>
10765 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10766 instead of strchr/decode_address. Error if the range isn't split
10767 with a ','. Don't assume there's be a ':' in the action.
10769 2013-05-23 Yao Qi <yao@codesourcery.com>
10770 Pedro Alves <palves@redhat.com>
10772 * linux-low.c (lwp_in_step_range): New function.
10773 (linux_wait_1): If the thread was range stepping and stopped
10774 outside the stepping range, report the stop to GDB. Otherwise,
10775 continue stepping. Add range stepping debug output.
10776 (linux_set_resume_request): Copy the step range from the resume
10777 request to the lwp.
10778 (linux_supports_range_stepping): New.
10779 (linux_target_ops) <supports_range_stepping>: Set to
10780 linux_supports_range_stepping.
10781 * linux-low.h (struct linux_target_ops)
10782 <supports_range_stepping>: New field.
10783 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10784 * linux-x86-low.c (x86_supports_range_stepping): New.
10785 (the_low_target) <supports_range_stepping>: Set to
10786 x86_supports_range_stepping.
10787 * server.c (handle_v_cont): Handle 'r' action.
10788 (handle_v_requests): Append ";r" if the target supports range
10790 * target.h (struct thread_resume) <step_range_start,
10791 step_range_end>: New fields.
10792 (struct target_ops) <supports_range_stepping>:
10794 (target_supports_range_stepping): New macro.
10796 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10798 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10799 confusion in comment.
10801 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10803 * lynx-low.c (struct process_info_private): New type.
10804 (lynx_add_process): New function.
10805 (lynx_create_inferior, lynx_attach): Replace calls to
10806 add_process by calls to lynx_add_process.
10807 (lynx_resume): If PTID is null, then try using
10808 current_process()->private->last_wait_event_ptid.
10810 (lynx_clear_inferiors): Delete. The contents of that function
10811 has been inlined in lynx_mourn;
10812 (lynx_wait_1): Save the ptid in the process's private data.
10813 (lynx_mourn): Free the process' private data. Replace call
10814 to lynx_clear_inferiors by call to clear_inferiors.
10816 2013-05-17 Yao Qi <yao@codesourcery.com>
10818 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10821 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10823 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10824 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10825 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10826 PT_TEXT_END_ADDR guards. Update comments.
10827 (linux_target_op) <read_offsets>: Conditionally define to
10828 linux_read_offsets if the target is UCLIBC and if it defines
10829 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10831 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10832 Andrew Jenner <andrew@codesourcery.com>
10834 * Makefile.in (SFILES): Add linux-nios2-low.c.
10835 (clean): Add action to delete nios2-linux.c.
10836 (nios2-linux.c): New rule.
10837 * configure.srv: Add nios2*-*-linux*.
10838 * linux-nios2-low.c: New.
10840 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10842 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10844 2013-04-25 Hui Zhu <hui@codesourcery.com>
10847 * ax.c (ax_printf): Add fflush.
10849 2013-04-22 Tom Tromey <tromey@redhat.com>
10851 * Makefile.in (SFILES): Add filestuff.c.
10852 (OBS): Add filestuff.o.
10853 (filestuff.o): New target.
10854 * config.in, configure: Rebuild.
10855 * configure.ac: Check for fdwalk, pipe2.
10857 2013-04-17 Pedro Alves <palves@redhat.com>
10859 * configure.ac (USE_THREAD_DB): Delete variable.
10860 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10861 Don't AC_SUBST USE_THREAD_DB.
10862 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10863 * config.in, configure: Regenerate.
10865 2013-04-16 Pedro Alves <palves@redhat.com>
10867 * linux-low.h (struct lwp_info) <thread_known>: Move under
10868 the USE_THREAD_DB #ifdef.
10870 2013-04-16 Pedro Alves <palves@redhat.com>
10872 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10873 (linux-low.o): Delete rule.
10874 * linux-low.h: Always include "gdb_thread_db.h" instead of
10875 conditionally including thread_db.h.
10876 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10879 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10881 * Makefile.in (install-only): Fix make install regression.
10883 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10885 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10886 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10888 * gdbserver.1: Remove.
10890 2013-03-22 Pedro Alves <palves@redhat.com>
10892 * linux-low.c (handle_extended_wait): Don't call
10893 linux_enable_event_reporting.
10895 2013-03-15 Tony Theodore <tonyt@logyst.com>
10898 * Makefile.in (SHELL): Use @SHELL@.
10900 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10902 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10905 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10907 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10908 Remove extraneous NULL element.
10910 2013-03-13 Yao Qi <yao@codesourcery.com>
10912 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10913 'V' block in trace frame.
10915 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10917 * target.h (struct target_ops): Add btrace ops.
10918 (target_supports_btrace): New macro.
10919 (target_enable_btrace): New macro.
10920 (target_disable_btrace): New macro.
10921 (target_read_btrace): New macro.
10922 * gdbthread.h (struct thread_info): Add btrace field.
10923 * server.c: Include btrace-common.h.
10924 (handle_btrace_general_set): New function.
10925 (handle_btrace_enable): New function.
10926 (handle_btrace_disable): New function.
10927 (handle_general_set): Call handle_btrace_general_set.
10928 (handle_qxfer_btrace): New function.
10929 (struct qxfer qxfer_packets[]): Add btrace entry.
10930 * inferiors.c (remove_thread): Disable btrace.
10931 * linux-low: Include linux-btrace.h.
10932 (linux_low_enable_btrace): New function.
10933 (linux_low_read_btrace): New function.
10934 (linux_target_ops): Add btrace ops.
10935 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10936 Add srv_linux_btrace=yes.
10937 (x86_64-*-linux*): Add linux-btrace.o.
10938 Add srv_linux_btrace=yes.
10939 * configure.ac: Define HAVE_LINUX_BTRACE.
10940 * config.in: Regenerated.
10941 * configure: Regenerated.
10943 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10945 * server.c (handle_qxfer): Preserve error message if -3 is
10947 (qxfer): Document the -3 return value.
10949 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10951 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10952 (linux_btrace_h): New variable.
10953 (linux-btrace.o): New rule.
10955 2013-03-08 Stan Shebs <stan@codesourcery.com>
10956 Hafiz Abid Qadeer <abidh@codesourcery.com>
10958 * tracepoint.c (trace_buffer_size): New global.
10959 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10960 (init_trace_buffer): Change to one-argument function. Allocate
10961 trace buffer memory.
10962 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10963 handle QTBuffer:size packet.
10964 (cmd_bigqtbuffer_size): New function.
10965 (initialize_tracepoint): Call init_trace_buffer with
10966 DEFAULT_TRACE_BUFFER_SIZE.
10967 * server.c (handle_query): Add QTBuffer:size in the
10970 2013-03-07 Yao Qi <yao@codesourcery.com>
10972 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10973 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10975 (cmd_qtsp): Adjust condition. Do post increment.
10976 Set cur_action and cur_step_action back to 0.
10978 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10981 * linux-low.c (linux_write_memory): Return early success if LEN is
10984 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10986 * configure.srv: Add x86_64-*-cygwin* as target.
10988 2013-02-28 Tom Tromey <tromey@redhat.com>
10990 * configure.ac: Invoke AC_SYS_LARGEFILE.
10991 * configure, config.in: Rebuild.
10993 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10995 * win32-low.c: Throughout, fix format strings and casts of
10996 printf-like functions to avoid type related warnings on all
10998 (get_child_debug_event): Print dwDebugEventCode as hex since
10999 that's how it's usually documented.
11001 2013-02-28 Yao Qi <yao@codesourcery.com>
11003 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11006 2013-02-27 Jiong Wang <jiwang@tilera.com>
11008 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11009 (reg-tilegx32.c): New rule.
11010 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11011 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11012 different register info initializer according to elf class.
11013 (init_registers_tilgx32): New function. The tilegx32 register info
11015 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11016 (tile_store_gregset): Likewise.
11018 2013-02-27 Yao Qi <yao@codesourcery.com>
11020 * server.c (process_point_options): Print debug message when
11021 debug_threads is true.
11023 2013-02-26 Yao Qi <yao@codesourcery.com>
11025 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11027 2013-02-19 Pedro Alves <palves@redhat.com>
11028 Kai Tietz <ktietz@redhat.com>
11032 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11033 instead of strtoul to extract address from packet.
11034 (process_serial_event) <'z'>: Likewise.
11036 2013-02-18 Yao Qi <yao@codesourcery.com>
11038 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11040 2013-02-14 Pedro Alves <palves@redhat.com>
11044 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11045 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11047 2013-02-14 Pedro Alves <palves@redhat.com>
11049 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11051 2013-02-14 Pedro Alves <palves@redhat.com>
11053 * tracepoint.c (save_string): Delete.
11054 (add_tracepoint_action): Use savestring instead of save_string.
11056 2013-02-12 Pedro Alves <palves@redhat.com>
11058 * linux-xtensa-low.c: Ditto.
11059 * xtensa-xtregs.c: Ditto.
11061 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11063 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11066 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11068 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11069 aarch64_num_wp_regs and aarch64_num_bp_regs to
11070 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11072 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11074 * linux-aarch64-low.c (ps_get_thread_area): Replace
11075 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11077 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11078 Marcus Shawcroft <marcus.shawcroft@arm.com>
11079 Nigel Stephens <nigel.stephens@arm.com>
11080 Yufeng Zhang <yufeng.zhang@arm.com>
11082 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11083 (aarch64.c, aarch64-without-fpu.c): New targets.
11084 * configure.srv (aarch64*-*-linux*): New.
11085 * linux-aarch64-low.c: New file.
11087 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11089 * linux-low.c (handle_extended_wait, linux_create_inferior)
11090 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11091 (dequeue_one_deferred_signal, linux_resume_one_thread)
11092 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11093 (linux_tracefork_grandchild, linux_test_for_tracefork)
11094 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11095 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11096 where the argument is 0.
11098 2013-01-25 Yao Qi <yao@codesourcery.com>
11100 * event-loop.c: Include "queue.h".
11101 (gdb_event_p): New typedef.
11102 (struct gdb_event) <next_event>: Remove.
11103 (event_queue): Change to QUEUE(gdb_event_p).
11104 (async_queue_event): Remove.
11105 (gdb_event_xfree): New.
11106 (initialize_event_loop): New.
11107 (process_event): Use API from QUEUE.
11108 (wait_for_event): Likewise.
11109 * server.c (main): Call initialize_event_loop.
11110 * server.h (initialize_event_loop): Declare.
11112 2013-01-18 Yao Qi <yao@codesourcery.com>
11114 * ax.h (struct eval_agent_expr_context): New.
11115 (gdb_eval_agent_expr): Update declaration.
11116 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11117 TFRAME. Add new argument CTX.
11118 * server.h (struct eval_agent_expr_context): Declare.
11119 (agent_mem_read, agent_tsv_read): Update declaration.
11120 (agent_mem_read_string): Likewise.
11121 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11122 (add_traceframe_block): Add new argument TPOINT.
11123 Increase TPOINT->traceframe_usage.
11124 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11125 eval_tracepoint_agent_expr.
11126 (condition_true_at_tracepoint): Likewise.
11127 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11128 (agent_mem_read_string, agent_tsv_read): Likewise.
11130 2013-01-16 Yao Qi <yao@codesourcery.com>
11132 * linux-low.c (linux_resume_one_lwp): Don't check
11133 'lwp->bp_reinsert != 0'.
11135 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11136 Pedro Alves <palves@redhat.com>
11138 * lynx-low.c (ptrace_request_to_str): Define a temporary
11139 macro and use it to simplify this function's implementation.
11141 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11143 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11146 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11148 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11150 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11152 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11154 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11156 * lynx-low.c (lynx_resume): Use the resume_info parameter
11157 to determine the ptid for the lynx_ptrace call, unless
11158 it is equal to minus_one_ptid, in which case we use the
11159 ptid of the current_inferior.
11160 (lynx_wait_1): After having received a thread create/exit
11161 event, resume the inferior's execution using the signaling
11162 thread's ptid, rather than the old ptid.
11164 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11166 * lynx-low.c (lynx_resume): Delete variable ret.
11168 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11170 * gdbreplay.c (gdbreplay_version): Update copyright year.
11171 * server.c (gdbserver_version): Likewise.
11173 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11175 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11178 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11180 * lynx-low.c (ptrace_request_to_str): Add handling for
11181 PTRACE_GETTRACESIG.
11183 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11185 * lynx-low.c (lynx_attach): Delete variable new_process.
11187 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11189 * lynx-low.c (lynx_create_inferior): Delete variable
11192 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11194 * lynx-low.c (ptrace_request_to_str): Do not handle
11195 PTRACE_GETTHREADLIST if this macro does not exist.
11197 2012-12-15 Yao Qi <yao@codesourcery.com>
11199 * Makefile.in (OBS): Add notif.o.
11200 * notif.c, notif.h: New.
11201 * server.c: Include "notif.h".
11202 (struct vstop_notif) <next>: Remove.
11204 (queue_stop_reply): Update.
11205 (push_event, send_next_stop_reply): Remove.
11206 (discard_queued_stop_replies): Update.
11207 (notif_stop): New variable.
11208 (handle_v_stopped): Remove.
11209 (handle_v_requests): Don't call handle_v_stopped. Call
11210 handle_ack_notif instead.
11211 (queue_stop_reply_callback): Call notif_event_enque instead
11212 of queue_stop_reply.
11213 (handle_status): Don't call send_next_stop_reply, call
11214 notif_write_event instead.
11215 (kill_inferior_callback): Likewise.
11216 (detach_or_kill_inferior_callback): Likewise.
11217 (main): Call initialize_notif.
11218 (process_serial_event): Call QUEUE_is_empty.
11219 (handle_target_event): Call notif_push instead of push event.
11220 * server.h (push_event): Remove declaration.
11222 2012-12-10 Tom Tromey <tromey@redhat.com>
11224 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11225 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11228 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11229 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11230 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11231 (amd64-linux-ipa.o, ax.o): Rewrite.
11232 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11233 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11234 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11235 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11236 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11237 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11238 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11239 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11240 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11241 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11242 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11243 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11244 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11245 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11246 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11247 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11248 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11249 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11250 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11251 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11252 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11253 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11254 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11255 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11256 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11257 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11258 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11259 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11260 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11261 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11262 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11263 (reg-tilegx.o): Remove.
11264 (all_object_files): New macro.
11265 Include .deps files.
11266 * aclocal.m4, configure: Rebuild.
11267 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11268 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11269 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11271 2012-12-05 Tom Tromey <tromey@redhat.com>
11274 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11276 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11278 * configure.ac: Check for linux/perf_event.h.
11279 * config.in: Regenerated.
11280 * configure: Regenerated.
11282 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11284 * hostio.c (handle_readlink): Decrease buffer size
11285 parameter passed to readlink by one byte.
11287 2012-11-26 Yao Qi <yao@codesourcery.com>
11289 * configure.ac (build_warnings): Append '-Wempty-body'.
11290 * configure: Regenerated.
11291 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11294 2012-11-15 Pierre Muller <muller@sourceware.org>
11296 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11297 * config.in: Regenerate.
11298 * configure: Regenerate.
11299 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11300 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11301 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11302 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11304 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11305 instead of <sys/wait.h> header.
11306 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11308 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11310 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11311 (various make rules): Remove -DGDBSERVER
11313 2012-11-09 Yao Qi <yao@codesourcery.com>
11315 * spu-low.c (current_ptid): Move it to ..
11316 * gdbthread.h: ... here. New.
11317 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11318 * server.c (myresume, process_serial_event): Likewise.
11319 * thread-db.c (thread_db_find_new_threads): Likewise.
11320 * tracepoint.c (run_inferior_command): Likewise.
11322 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11324 * server.c (handle_search_memory_1): Include access length in
11327 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11329 * linux-crisv32-low.c: Fix compile errors.
11331 2012-09-04 Yao Qi <yao@codesourcery.com>
11333 * tracepoint.c (cmd_qtsv): Adjust debug message.
11334 Don't check CUR_TPOINT.
11336 2012-08-28 Yao Qi <yao@codesourcery.com>
11338 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11339 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11340 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11341 Remove declarations of xmalloc, xreallloc, xstrdup and
11343 * Makefile.in (libiberty_h): New.
11344 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11345 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11347 2012-08-23 Yao Qi <yao@codesourcery.com>
11349 * server.h: Remove declaration of 'xsnprintf'.
11351 2012-08-22 Keith Seitz <keiths@redhat.com>
11353 * server.h: Include build-gnulib-gbserver/config.h.
11354 * gdbreplay.c: Likewise.
11356 2012-08-08 Doug Evans <dje@google.com>
11358 * Makefile.in (SFILES): Add gdb_vecs.c.
11359 (OBS): Add gdb_vecs.o.
11360 (gdb_vecs_h, host_defs_h): New variables.
11361 (thread-db.o): Add $(gdb_vecs_h) dependency.
11362 (gdb_vecs.o): New rule.
11363 * thread-db.c: #include "gdb_vecs.h".
11364 (thread_db_load_search): Use a vector to iterate over path elements.
11365 Handle text appearing after "$pdir".
11367 * configure.ac: Add check for strstr.
11368 * config.in: Regenerate.
11369 * configure: Regenerate.
11371 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11373 * hostio.c (handle_pread): If pread fails, fall back to attempting
11375 (handle_pwrite): Likewise for pwrite.
11377 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11379 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11380 between unsupported TYPE and unimplementable ADDR/LEN combination.
11381 (arm_insert_point): Act on new return value.
11383 2012-07-31 Pedro Alves <palves@redhat.com>
11385 * server.c (process_point_options): Only skip tokens if we find
11386 one that is unrecognized. Don't treat 'X' specially while
11387 skipping unrecognized tokens.
11389 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11391 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11392 to 4-byte-align HW breakpoint addresses for Thumb.
11394 2012-07-27 Yao Qi <yao@codesourcery.com>
11398 * server.h: Declare gdb_agent_about_to_close.
11399 * target.c (kill_inferior): Include "agent.h".
11400 New. Send command 'kill'.
11401 * target.h (kill_inferior): Removed macro.
11402 * tracepoint.c (gdb_agent_about_to_close): New.
11403 (gdb_agent_helper_thread): Handle command 'close'.
11404 Wait endlessly until the inferior stops.
11405 Install gdb_agent_remove_socket to atexit hook.
11406 (agent_socket_name): New static variable.
11407 (gdb_agent_socket_init): Replace local variable 'name' with
11408 'agent_socket_name'.
11409 (gdb_agent_remove_socket): New.
11411 2012-07-27 Yao Qi <yao@codesourcery.com>
11413 * server.c (process_point_options): Stop at 'X' when parsing.
11415 2012-07-19 Michael Eager <eager@eagercon.com>
11417 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11419 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11420 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11421 hardware breakpoint.
11423 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11425 * gdbserver/linux-low.c (initialize_low): Call
11426 linux_ptrace_init_warnings.
11428 2012-07-02 Doug Evans <dje@google.com>
11430 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11433 2012-07-02 Stan Shebs <stan@codesourcery.com>
11435 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11436 (ax.o): Add it to build rule.
11438 (OBS): Add format.o.
11439 (IPA_OBS): Add format.o.
11440 * server.c (handle_query): Claim support for breakpoint commands.
11441 (process_point_options): Add command case.
11442 (process_serial_event): Leave running if there are printfs in
11444 * mem-break.h (any_persistent_commands): Declare.
11445 (add_breakpoint_commands): Declare.
11446 (gdb_no_commands_at_breakpoint): Declare.
11447 (run_breakpoint_commands): Declare.
11448 * mem-break.c (struct point_command_list): New struct.
11449 (struct breakpoint): New field command_list.
11450 (any_persistent_commands): New function.
11451 (add_commands_to_breakpoint): New function.
11452 (add_breakpoint_commands): New function.
11453 (gdb_no_commands_at_breakpoint): New function.
11454 (run_breakpoint_commands): New function.
11455 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11457 * ax.c: Include format.h.
11458 (ax_printf): New function.
11459 (gdb_eval_agent_expr): Add printf opcode.
11461 2012-06-13 Yao Qi <yao@codesourcery.com>
11463 * server.c (start_inferior): Remove duplicated writes to fields
11464 'last_resume_kind' and 'last_status' of 'current_inferior'.
11466 2012-06-12 Yao Qi <yao@codesourcery.com>
11467 Pedro Alves <palves@redhat.com>
11469 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11471 * server.c (handle_v_cont): Extend comment.
11473 2012-06-11 Yao Qi <yao@codesourcery.com>
11475 * linux-low.c (linux_attach): Add 'static'.
11477 2012-06-06 Yao Qi <yao@codesourcery.com>
11479 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11481 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11483 Fix gcc -flto compilation warning.
11484 * server.c (main): Make variable multi_mode and attach volatile.
11486 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11488 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11489 if the platform doesn't know about it.
11491 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11493 * Makefile.in (SFILES): Add linux-tile-low.c.
11494 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11495 * configure.srv: Handle tilegx-*-linux*.
11496 * linux-tile-low.c: New file.
11498 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11500 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11502 2012-05-24 Pedro Alves <palves@redhat.com>
11506 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11508 2012-05-24 Pedro Alves <palves@redhat.com>
11512 Replace target_signal with gdb_signal throughout.
11514 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11516 * linux-low.c (linux_store_registers): Avoid the copying sequence
11517 when no data has been retrieved by ptrace.
11519 2012-05-22 Will Deacon <will.deacon@arm.com>
11521 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11522 Include asm/ptrace.h.
11523 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11526 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11528 * linux-low.c (linux_store_registers): Don't re-retrieve data
11529 with ptrace that has already been obtained from /proc. Always
11530 copy any data retrieved with ptrace to the buffer supplied.
11532 2012-05-11 Yao Qi <yao@codesourcery.com>
11533 Pedro Alves <palves@redhat.com>
11535 * linux-low.c (enum stopping_threads_kind): New.
11536 (stopping_threads): Change type to `enum stopping_threads_kind'.
11537 (handle_extended_wait): If stopping and suspending threads, leave
11538 the new_lwp suspended too.
11539 (linux_wait_for_event): Adjust.
11540 (stop_all_lwps): Set `stopping_threads' to
11541 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11542 whether we're suspending threads or just stopping them. Assert no
11545 2012-04-29 Yao Qi <yao@codesourcery.com>
11547 * server.h: Move some code to ...
11548 * gdbthread.h: ... here. New.
11549 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11550 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11551 (nto-low.o, win32-low.o): Likewise.
11552 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11553 * regcache.c, remote-utils.c, server.c: Likewise.
11554 * target.c, tracepoint.c, win32-low.c: Likewise.
11556 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11558 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11559 (PTRACE_ARG4_TYPE): Likewise.
11560 (PTRACE_XFER_TYPE): Likewise.
11561 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11562 ptrace to PTRACE_ARG3_TYPE.
11563 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11564 (PTRACE_ARG4_TYPE): Likewise.
11565 (PTRACE_XFER_TYPE): Likewise.
11566 (linux_detach_one_lwp): Cast fourth argument of
11567 ptrace to long then PTRACE_ARG4_TYPE.
11568 (regsets_fetch_inferior_registers): Cast third argument of
11569 ptrace to long then PTRACE_ARG3_TYPE.
11570 (regsets_store_inferior_registers): Likewise.
11572 2012-04-20 Pedro Alves <palves@redhat.com>
11574 * configure: Regenerate.
11576 2012-04-19 Pedro Alves <palves@redhat.com>
11578 * Makefile.in (GNULIB_BUILDDIR): New.
11579 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11580 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11581 (all, install-only, uninstall, clean-info, all-lib, clean): No
11582 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11583 (maintainer-clean realclean distclean): Use subdir_do.
11585 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11586 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11587 * acinclude.m4: Include acx_configure_dir.m4.
11588 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11589 calls. Call AC_PROG_RANLIB. Configure gnulib using
11592 (GNULIB_STDINT_H): Adjust.
11593 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11594 * gdbreplay.c: Include build-gnulib/config.h.
11595 * server.h: Likewise.
11596 * aclocal.m4: Regenerate.
11597 * config.in: Regenerate.
11598 * configure: Regenerate.
11600 2012-04-19 Pedro Alves <palves@redhat.com>
11602 * Makefile.in (LIBGNU, INCGNU): Adjust.
11603 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11604 (all, install-only, uninstall, clean-info, all-lib, clean)
11605 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11606 * configure.ac: Adjust AC_OUTPUT output.
11607 * aclocal.m4: Regenerate.
11608 * configure: Regenerate.
11610 2012-04-19 Pedro Alves <palves@redhat.com>
11612 * Makefile.in (generated_files): New.
11613 (server_h): Remove the explicit dependency on config.h, and depend
11614 on $generated_files.
11616 2012-04-19 Pedro Alves <palves@redhat.com>
11618 * Makefile.in (INCGNU): Add -Ignulib.
11620 2012-04-19 Pedro Alves <palves@redhat.com>
11622 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11623 (INCGNU): ... this, and spell out -I here.
11624 (GNULIB_LIB): Rename to ...
11625 (LIBGNU): ... this.
11626 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11628 2012-04-19 Pedro Alves <palves@redhat.com>
11630 * config.in: Regenerate.
11632 2012-04-19 Pedro Alves <palves@redhat.com>
11634 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11635 * server.h (memmem): Remove declaration.
11636 * config.in: Regenerate.
11637 * configure: Regenerate.
11639 2012-04-19 Yao Qi <yao@codesourcery.com>
11641 * Makefile.in (SFILES): Add common/vec.c.
11645 2012-04-19 Yao Qi <yao@codesourcery.com>
11647 * remote-utils.c (prepare_resume_reply): Replace with macro
11648 target_core_of_thread.
11649 * server.c (handle_qxfer_threads_proper): Likewise.
11650 * target.h (traget_core_of_thread): New macro.
11652 2012-04-18 Pedro Alves <palves@redhat.com>
11654 * aclocal.m4: Regenerate.
11655 * configure: Regenerate.
11657 2012-04-16 Yao Qi <yao@codesourcery.com>
11659 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11660 duplicated on address.
11662 2012-04-16 Yao Qi <yao@codesourcery.com>
11664 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11665 (struct tracepoint_action_ops) <send>: New field.
11666 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11667 (agent_expr_send, x_tracepoint_action_send): New.
11668 (l_tracepoint_action_send): New.
11669 (cmd_qtdp): Download and install tracepoint
11670 according to `use_agent'.
11671 (run_inferior_command): Add one more parameter `len'.
11673 (tracepoint_send_agent): New.
11674 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11676 2012-04-16 Yao Qi <yao@codesourcery.com>
11678 * tracepoint.c (download_tracepoints): Moved to ...
11679 (cmd_qtstart): ... here.
11681 2012-04-14 Yao Qi <yao@codesourcery.com>
11683 * tracepoint.c: Include inttypes.h.
11684 (struct collect_memory_action): Use sized types.
11685 (struct tracepoint): Likewise.
11686 (cmd_qtdp, stop_tracing): Update print specifiers.
11687 (cmd_qtp, response_tracepoint): Likewise.
11688 (collect_data_at_tracepoint): Likewise.
11689 (collect_data_at_step): Likewise.
11691 2012-04-14 Yao Qi <yao@codesourcery.com>
11693 Import gnulib module inttypes.
11694 * aclocal.m4, config.in, configure: Regenerated.
11696 2012-04-14 Yao Qi <yao@codesourcery.com>
11698 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11699 Makefile and config.status at last.
11701 2012-04-13 Yao Qi <yao@codesourcery.com>
11703 * tracepoint.c: Include stdint.h unconditionally.
11705 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11707 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11708 on BFD_HAVE_SYS_PROCFS_TYPE.
11709 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11710 * configure: Regenerate.
11711 * config.in: Likewise.
11713 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11715 * Makefile.in (clean): Also remove x32.c x32-linux.c
11716 x32-avx.c x32-avx-linux.c.
11717 (x32.o): New target.
11719 (x32-linux.o): Likewise.
11720 (x32-linux.c): Likewise.
11721 (x32-avx.o): Likewise.
11722 (x32-avx.c): Likewise.
11723 (x32-avx-linux.o): Likewise.
11724 (x32-avx-linux.c): Likewise.
11726 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11727 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11728 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11729 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11730 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11731 i386/x32-avx-linux.xml.
11733 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11734 (init_registers_x32_avx_linux): Likwise.
11735 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11736 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11738 2012-04-13 Pedro Alves <palves@redhat.com>
11740 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11741 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11742 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11743 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11746 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11748 * linux-x86-low.c (compat_x32_clock_t): New.
11749 (compat_x32_siginfo_t): Likewise.
11750 (compat_x32_siginfo_from_siginfo): Likewise.
11751 (siginfo_from_compat_x32_siginfo): Likewise.
11752 (linux_is_elf64): Likewise.
11753 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11754 and siginfo_from_compat_x32_siginfo for x32.
11755 (x86_arch_setup): Set linux_is_elf64.
11757 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11760 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11762 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11763 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11764 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11765 compatible with process.
11767 2012-04-12 Yao Qi <yao@codesourcery.com>
11769 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11770 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11771 (install-only, install-info, clean): Handle sub dir gnulib.
11772 (all-lib, am--refresh): New targets.
11773 (memmem.o): Remove target.
11774 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11775 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11776 (AC_REPLACE_FUNCS): Remove memmem.
11777 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11778 (AC_OUTPUT): Generate Makefile in gnulib/.
11779 * aclocal.m4, config.in, configure: Regenerated.
11781 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11783 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11785 2012-04-05 Pedro Alves <palves@redhat.com>
11787 -Werror=strict-aliasing
11789 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11792 2012-04-04 Pedro Alves <palves@redhat.com>
11794 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11795 (sparc_store_gregset_from_stack, sparc_store_gregset)
11796 (sparc_breakpoint_at): Fix formatting.
11798 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11800 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11802 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11803 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11804 * config.in: Regenerate.
11805 * configure: Likewise.
11807 2012-03-29 Pedro Alves <palves@redhat.com>
11809 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11810 Correct ptrace arguments.
11812 2012-03-28 Pedro Alves <palves@redhat.com>
11814 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11815 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11816 (IA64_FR1_REGNUM): New defines.
11817 (ia64_fetch_register): New.
11818 (the_low_target): Install it.
11819 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11821 * linux-low.c (linux_fetch_registers): Try the
11822 the_low_target.fetch_register hook first.
11824 * linux-arm-low.c (the_low_target): Adjust.
11825 * linux-bfin-low.c (the_low_target): Adjust.
11826 * linux-cris-low.c (the_low_target): Adjust.
11827 * linux-crisv32-low.c (the_low_target): Adjust.
11828 * linux-m32r-low.c (the_low_target): Adjust.
11829 * linux-m68k-low.c (the_low_target): Adjust.
11830 * linux-mips-low.c (the_low_target): Adjust.
11831 * linux-ppc-low.c (the_low_target): Adjust.
11832 * linux-s390-low.c (the_low_target): Adjust.
11833 * linux-sh-low.c (the_low_target): Adjust.
11834 * linux-sparc-low.c (the_low_target): Adjust.
11835 * linux-tic6x-low.c (the_low_target): Adjust.
11836 * linux-x86-low.c (the_low_target): Adjust.
11837 * linux-xtensa-low.c (the_low_target): Adjust.
11839 2012-03-26 Pedro Alves <palves@redhat.com>
11841 * server.c (handle_qxfer_libraries): Don't bail early if
11842 the_target->qxfer_libraries_svr4 is not NULL.
11844 2012-03-26 Pedro Alves <palves@redhat.com>
11846 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11848 2012-03-23 Pedro Alves <palves@redhat.com>
11850 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11851 "library-list-svr4" element's start tag when the the DSO list is
11854 2012-03-23 Pedro Alves <palves@redhat.com>
11856 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11857 a variable whose type size is the same as the inferior's pointer
11860 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11862 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11864 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11865 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11866 * linux-low.h: Include <signal.h>.
11867 (struct siginfo): Remove forward declaration.
11868 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11871 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11873 * .gitignore: Ignore more files.
11875 2012-03-19 Pedro Alves <palves@redhat.com>
11876 Jan Kratochvil <jan.kratochvil@redhat.com>
11878 * server.c (cont_thread, general_thread): Add describing comments.
11879 (start_inferior): Clear `cont_thread'.
11880 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11883 2012-03-15 Yao Qi <yao@codesourcery.com>
11885 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11887 (cmd_qtdp): ... here.
11889 2012-03-15 Yao Qi <yao@codesourcery.com>
11891 * tracepoint.c (struct tracepoint_action_ops): New.
11892 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11893 (m_tracepoint_action_download): New.
11894 (r_tracepoint_action_download): New.
11895 (x_tracepoint_action_download): New.
11896 (l_tracepoint_action_download): New.
11897 (add_tracepoint_action): Install `action->ops' according type.
11898 (download_tracepoint_1): Move code `download' function pointer
11899 of various tracepoint_action_ops.
11901 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11903 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11904 linux_ptrace_attach_warnings.
11906 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11908 * Makefile.in (linux-ptrace.o): New.
11909 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11910 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11911 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11912 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11913 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11915 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11917 2012-03-08 Yao Qi <yao@codesourcery.com>
11918 Pedro Alves <palves@redhat.com>
11920 Fix PR server/13392.
11921 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11922 offset of JMP insn.
11923 * tracepoint.c (remove_tracepoint): New.
11924 (cmd_qtdp): Call remove_tracepoint when failed to install.
11926 2012-03-07 Pedro Alves <palves@redhat.com>
11928 * linux-low.c (get_detach_signal): New.
11929 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11930 Pass on pending signals to PTRACE_DETACH. Check the result of the
11932 * server.c (program_signals, program_signals_p): New.
11933 (handle_general_set): Handle QProgramSignals.
11934 * server.h (program_signals, program_signals_p): Declare.
11936 2012-03-05 Pedro Alves <palves@redhat.com>
11937 Jan Kratochvil <jan.kratochvil@redhat.com>
11939 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11942 2012-03-03 Yao Qi <yao@codesourcery.com>
11944 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11945 agent_look_up_symbols.
11947 2012-03-03 Yao Qi <yao@codesourcery.com>
11949 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11950 (linux-x86-low.o): Likewise.
11951 * server.h: Remove in_process_agent_loaded.
11952 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11956 2012-03-03 Yao Qi <yao@codesourcery.com>
11958 * tracepoint.c (gdb_agent_capability): New global.
11959 (in_process_agent_loaded_ust): Renamed to
11960 `in_process_agent_supports_ust'.
11962 (in_process_agent_supports_ust): Call agent_capability_check.
11963 (clear_installed_tracepoints): Assert that agent supports
11966 2012-03-03 Yao Qi <yao@codesourcery.com>
11968 * linux-low.c (linux_supports_agent): New.
11969 (linux_target_ops): Initialize field `supports_agent' with
11970 linux_supports_agent.
11971 * target.h (struct target_ops) <supports_agent>: New.
11972 (target_supports_agent): New macro.
11973 * server.c (handle_general_set): Handle packet 'QAgent'.
11974 (handle_query): Send `QAgent+'.
11975 * Makefile.in (server.o): Depends on agent.h.
11977 2012-03-03 Yao Qi <yao@codesourcery.com>
11979 * Makefile.in (OBS): Add agent.o.
11980 Add new rule for agent.o.
11981 Track dependence of tracepoint.c on agent.h.
11982 * tracepoint.c (run_inferior_command_1):
11983 (run_inferior_command): Call agent_run_command.
11984 (gdb_ust_connect_sync_socket): Deleted. Move it to
11986 (resume_thread, stop_thread): Likewise.
11987 (gdb_ust_socket_init): Renamed to ...
11988 (gdb_agent_socket_init): ... New.
11989 (gdb_ust_thread): Renamed to ...
11990 (gdb_agent_helper_thread): ... New.
11991 (gdb_ust_init): Move some code to ...
11992 (gdb_agent_init): ... here. New.
11993 [HAVE_UST]: Call gdb_ust_init.
11994 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11995 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11996 * config.in, configure: Regenerated.
11998 2012-03-02 Pedro Alves <palves@redhat.com>
12000 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12001 * linux-low.c (struct simple_pid_list): New.
12002 (stopped_pids): New a struct simple_pid_list pointer.
12003 (add_to_pid_list, pull_pid_from_list): New.
12004 (handle_extended_wait): Don't assume the first signal new children
12005 report is SIGSTOP. Adjust call to pull_pid_from_list.
12006 (linux_wait_for_lwp): Adjust.
12008 2012-03-02 Yao Qi <yao@codesourcery.com>
12010 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12013 2012-03-02 Yao Qi <yao@codesourcery.com>
12015 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12016 `stop_pc' and `tpoint'. Update caller.
12018 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12020 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12021 * linux-low.c (use_linux_regsets): New macro.
12022 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12023 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12024 (linux_register_in_regsets): New function.
12025 (usr_fetch_inferior_registers): Skip registers covered by
12027 (usr_store_inferior_registers): Likewise.
12028 (usr_fetch_inferior_registers): New macro.
12029 (usr_store_inferior_registers): Likewise.
12030 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12031 (linux_store_registers): Likewise.
12032 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12034 (init_registers_mips64_dsp_linux): Likewise.
12035 (init_registers_mips_linux): New macro.
12036 (init_registers_mips_dsp_linux): Likewise.
12037 (mips_dsp_num_regs): Likewise.
12038 (DSP_BASE, DSP_CONTROL): New fallback macros.
12039 (mips_base_regs): New macro.
12040 (mips_regmap): Use it. Fix the size.
12041 (mips_dsp_regmap): New variable.
12042 (mips_dsp_regset_bitmap): Likewise.
12043 (mips_arch_setup): New function.
12044 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12046 (mips_cannot_store_register): Likewise.
12047 (the_low_target): Update .arch_setup, .num_regs and .regmap
12048 initializers. Add .regset_bitmap initializer.
12049 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12051 * linux-bfin-low.c (the_low_target): Likewise.
12052 * linux-cris-low.c (the_low_target): Likewise.
12053 * linux-crisv32-low.c (the_low_target): Likewise.
12054 * linux-ia64-low.c (the_low_target): Likewise.
12055 * linux-m32r-low.c (the_low_target): Likewise.
12056 * linux-m68k-low.c (the_low_target): Likewise.
12057 * linux-ppc-low.c (the_low_target): Likewise.
12058 * linux-s390-low.c (the_low_target): Likewise.
12059 * linux-sh-low.c (the_low_target): Likewise.
12060 * linux-sparc-low.c (the_low_target): Likewise.
12061 * linux-tic6x-low.c (the_low_target): Likewise.
12062 * linux-x86-low.c (the_low_target): Likewise.
12063 * linux-xtensa-low.c (the_low_target): Likewise.
12064 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12065 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12066 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12068 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12069 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12071 2012-02-29 Yao Qi <yao@codesourcery.com>
12072 Pedro Alves <palves@redhat.com>
12074 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12075 `step_over_finished' is true.
12077 2012-02-27 Pedro Alves <palves@redhat.com>
12079 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12080 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12082 2012-02-27 Pedro Alves <palves@redhat.com>
12085 * linux-low.c (pid_is_stopped): New.
12086 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12088 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12090 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12093 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12095 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12097 2012-02-24 Luis Machado <lgustavo@codesourcery>
12099 * server.c (handle_query): Advertise support for target-side
12100 breakpoint condition evaluation.
12101 (process_point_options): New function.
12102 (process_serial_event): When inserting a breakpoint, check for
12103 a target-side condition that should be evaluated.
12105 * mem-break.c: Include regcache.h and ax.h.
12106 (point_cond_list_t): New data structure.
12107 (breakpoint) <cond_list>: New field.
12108 (find_gdb_breakpoint_at): Make non-static.
12109 (delete_gdb_breakpoint_at): Clear any target-side
12111 (clear_gdb_breakpoint_conditions): New function.
12112 (add_condition_to_breakpoint): Likewise.
12113 (add_breakpoint_condition): Likewise.
12114 (gdb_condition_true_at_breakpoint): Likewise.
12115 (gdb_breakpoint_here): Return result directly instead
12116 of going through a local variable.
12118 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12119 (clear_gdb_breakpoint_conditions): Likewise.
12120 (add_breakpoint_condition): Likewise.
12121 (gdb_condition_true_at_breakpoint): Likewise.
12123 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12124 (need_step_over_p): Take target-side breakpoint condition into
12127 2012-02-24 Luis Machado <lgustavo@codesourcery>
12129 * server.h: Include tracepoint.h.
12130 (agent_mem_read, agent_get_trace_state_variable_value,
12131 agent_set_trace_state_variable_value,
12132 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12133 get_set_tsv_func_addr): New prototypes.
12135 * ax.h: New include file.
12136 * ax.c: New source file.
12138 * tracepoint.c: Include ax.h.
12139 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12140 agent_expr, eval_result_type): Move to ax.h.
12141 (parse_agent_expr): Rename to ...
12142 (gdb_parse_agent_expr): ... this, make it non-static and move
12144 (unparse_agent_expr) Rename to ...
12145 (gdb_unparse_agent_expr): ... this, make it non-static and move
12147 (eval_agent_expr): Rename to ...
12148 (eval_tracepoint_agent_expr): ... this.
12149 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12150 forward declarations.
12151 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12152 (agent_get_trace_state_variable_value): New function.
12153 (agent_set_trace_state_variable_value): New function.
12154 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12155 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12156 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12157 (condition_true_at_tracepoint): Likewise.
12158 (parse_agent_expr): Rename to ...
12159 (gdb_parse_agent_expr): ... this and move to ax.c.
12160 (unparse_agent_expr): Rename to ...
12161 (gdb_unparse_agent_expr): ... this and move to ax.c.
12162 (gdb_agent_op_name): Move to ax.c.
12163 (eval_agent_expr): Rename to ...
12164 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12166 (eval_tracepoint_agent_expr): New function.
12167 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12169 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12171 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12172 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12173 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12174 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12175 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12176 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12177 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12178 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12179 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12180 (compile_bytecodes): Remove forward declaration.
12181 (is_goto_target): Move to ax.c.
12182 (compile_bytecodes): Move to ax.c and call
12183 agent_get_trace_state_variable_value (...) and
12184 agent_set_trace_state_variable_value (...).
12186 * Makefile.in: Update ax.c and IPA dependencies.
12188 2012-02-24 Pedro Alves <palves@redhat.com>
12190 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12191 (cmd_bigqtbuffer_circular): ... this. Only handle
12192 'QTBuffer:circular:'.
12193 (handle_tracepoint_general_set): Adjust.
12195 2012-02-16 Yao Qi <yao@codesourcery.com>
12197 * inferiors.c: Move code to ...
12198 * dll.c: .... here. New.
12199 * server.h: Declare clear_dlls.
12200 * Makefile.in (SFILES): Add dll.c.
12204 2012-02-11 Yao Qi <yao@codesourcery.com>
12206 * server.c: (handle_monitor_command): Add a new parameter
12208 (handle_query): Update caller.
12210 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12212 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12213 * configure, config.in: Regenerate.
12214 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12217 2012-02-02 Pedro Alves <palves@redhat.com>
12219 Try SIGKILL first, then PTRACE_KILL.
12220 * linux-low.c (linux_kill_one_lwp): New.
12221 (linux_kill_one_lwp): Rename to ...
12222 (kill_one_lwp_callback): ... this. Use the new
12223 linux_kill_one_lwp.
12225 2012-02-02 Pedro Alves <palves@redhat.com>
12227 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12230 2012-01-27 Pedro Alves <palves@redhat.com>
12232 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12233 (elf_64_file_p): Make static.
12234 (linux_pid_exe_is_elf_64_file): New.
12235 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12236 Delete declarations.
12237 (linux_pid_exe_is_elf_64_file): Declare.
12238 * linux-x86-low.c (x86_arch_setup): Use
12239 linux_pid_exe_is_elf_64_file.
12241 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12243 * linux-low.c (linux_wait_for_event_1): Rename to ...
12244 (linux_wait_for_event): ... here and merge it with former
12245 linux_wait_for_event - new variable wait_ptid, use it.
12246 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12248 2012-01-23 Pedro Alves <palves@redhat.com>
12250 * server.c (main): Avoid yet another case of infinite loop while
12251 detaching/killing after a longjmp.
12253 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12256 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12258 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12260 * hostio.c (handle_readlink): New function.
12261 (handle_vFile): Call it to handle "vFile:readlink" packets.
12263 2012-01-20 Pedro Alves <palves@redhat.com>
12264 Ulrich Weigand <ulrich.weigand@linaro.org>
12266 * server.c (handle_v_requests): Only support vAttach and vRun to
12267 start multiple processes when in extended protocol mode.
12269 2012-01-17 Pedro Alves <palves@redhat.com>
12271 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12272 memalign plus mprotect to allocate the scratch buffer.
12274 2012-01-13 Pedro Alves <palves@redhat.com>
12276 * server.c (attach_inferior): Clear `cont_thread'.
12278 2012-01-13 Pedro Alves <palves@redhat.com>
12280 * server.c (main): Avoid infinite loop while detaching/killing
12283 2012-01-09 Doug Evans <dje@google.com>
12285 * server.c (start_inferior): Set last_ptid in --wrapper case.
12287 2012-01-06 Yao Qi <yao@codesourcery.com>
12289 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12291 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12293 2012-01-04 Yao Qi <yao@codesourcery.com>
12295 * tracepoint.c (cmd_qtdp): Print debug message
12296 for static tracepoint.
12298 2012-01-04 Yao Qi <yao@codesourcery.com>
12300 * tracepoint.c (trace_vdebug): Differentiate debug message
12301 between gdbserver and IPA.
12303 2012-01-03 Yao Qi <yao@codesourcery.com>
12305 * tracepoint.c (tracepoint_was_hit): Don't collect for
12308 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12310 * terminal.h: Reformat copyright header.
12312 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12314 * server.c (gdbserver_version): Update copyright year.
12315 * gdbreplay.c (gdbreplay_version): Likewise.
12317 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12319 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12322 2011-12-18 Hui Zhu <teawater@gmail.com>
12323 * linux-low.c (linux_create_inferior): Save return value to ret.
12325 2011-12-18 Hui Zhu <teawater@gmail.com>
12327 * linux-low.c (linux_create_inferior): Save return value to ret.
12329 2011-12-16 Doug Evans <dje@google.com>
12331 * linux-low.c (linux_create_inferior): If stdio connection,
12332 redirect stdin from /dev/null, stdout to stderr.
12333 * remote-utils.c (remote_is_stdio): New static global.
12334 (remote_connection_is_stdio): New function.
12335 (remote_prepare): Handle stdio connection.
12336 (remote_open): Ditto.
12337 (remote_close): Don't close stdin for stdio connections.
12338 (read_prim,write_prim): New functions. Replace all calls to
12339 read/write to these.
12340 * server.c (main): Watch for "-" argument. Move call to
12341 remote_prepare before start_inferior.
12342 * server.h (STDIO_CONNECTION_NAME): New macro.
12343 (remote_connection_is_stdio): Declare.
12345 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12346 in debugging output.
12348 2011-12-15 Yao Qi <yao@codesourcery.com>
12350 * tracepoint.c: Include sys/syscall.h.
12351 (gdb_ust_thread): Remove preprocessor conditional.
12353 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12355 * linux-low.c (linux_detach_one_lwp): Call
12356 the_low_target.prepare_to_resume before detaching.
12358 2011-12-14 Yao Qi <yao@codesourcery.com>
12360 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12363 2011-12-14 Yao Qi <yao@codesourcery.com>
12365 * i386-low.c (i386_low_stopped_data_address): Initialize local
12366 variable `control'.
12368 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12372 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12373 DR_CONTROL unless necessary. Extend comments.
12374 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12375 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12377 2011-12-13 Yao Qi <yao@codesourcery.com>
12379 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12381 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12383 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12385 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12386 Print new debug message for such case.
12388 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12390 Fix overlapping memcpy.
12391 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12392 the read_inferior_memory transfer.
12393 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12394 write_inferior_memory transfer.
12395 (set_fast_tracepoint_jump): New variable buf. Use it for the
12396 read_inferior_memory and write_inferior_memory transfers.
12397 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12398 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12399 Use it for the write_inferior_memory transfer.
12400 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12403 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12405 * linux-low.c (fetch_register, store_register): Make code
12406 consistent, fix formatting.
12408 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12410 * linux-low.c (usr_store_inferior_registers): Factor out code
12411 to handle individual registers into...
12412 (store_register): ... this new function.
12414 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12416 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12417 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12418 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12419 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12420 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12421 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12422 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12423 (srv_xmlfiles): Add new XML files.
12425 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12427 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12428 (init_registers_s390_linux32v1): Add prototype.
12429 (init_registers_s390_linux32v2): Likewise.
12430 (init_registers_s390_linux64v1): Likewise.
12431 (init_registers_s390_linux64v2): Likewise.
12432 (init_registers_s390x_linux64v1): Likewise.
12433 (init_registers_s390x_linux64v2): Likewise.
12434 (s390_num_regs): Increment to 52.
12435 (s390_regmap): Add orig_r2 register.
12436 (s390_num_regs_3264): Increment to 68.
12437 (s390_regmap_3264): Add orig_r2 register.
12438 (s390_collect_ptrace_register): Handle orig_r2 register.
12439 (s390_supply_ptrace_register): Likewise.
12440 (s390_fill_last_break): New function.
12441 (s390_store_last_break): Likewise.
12442 (s390_fill_system_call): New function.
12443 (s390_store_system_call): Likewise.
12444 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12446 (s390_check_regset): New function.
12447 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12448 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12449 Update target_regsets for available register sets.
12451 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12452 Jan Kratochvil <jan.kratochvil@redhat.com>
12454 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12455 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12457 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12458 * linux-low.h (struct process_info_private): New member r_debug.
12459 * server.c (handle_qxfer_libraries): Call
12460 the_target->qxfer_libraries_svr4.
12461 (handle_qxfer_libraries_svr4): New function.
12462 (qxfer_packets): New entry "libraries-svr4".
12463 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12464 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12465 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12466 PACKET_qXfer_libraries_svr4.
12468 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12470 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12471 PSW address/mask between 8-byte and 16-byte formats.
12472 (s390_supply_ptrace_register): Likewise.
12473 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12474 basic addressing mode bit.
12476 2011-11-24 Stan Shebs <stan@codesourcery.com>
12478 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12480 2011-11-17 Stan Shebs <stan@codesourcery.com>
12482 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12483 (tracing_start_time): New global.
12484 (tracing_stop_time): New global.
12485 (tracing_user_name): New global.
12486 (tracing_notes): New global.
12487 (tracing_stop_note): New global.
12488 (cmd_qtstart): Set traceframe_usage, start_time.
12489 (stop_tracing): Set stop_time.
12490 (cmd_qtstatus): Report additional status.
12491 (cmd_qtp): New function.
12492 (handle_tracepoint_query): Call it.
12493 (cmd_qtnotes): New function.
12494 (handle_tracepoint_general_set): Call it.
12495 (get_timestamp): Rename from tsv_get_timestamp.
12497 2011-11-14 Stan Shebs <stan@codesourcery.com>
12498 Kwok Cheung Yeung <kcy@codesourcery.com>
12500 * linux-x86-low.c (small_jump_insn): New.
12501 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12502 trampoline and error message, build a trampoline and issue a small
12503 jump instruction to it.
12504 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12505 trampoline and error message.
12506 (x86_get_min_fast_tracepoint_insn_len): New.
12507 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12508 * linux-low.h (struct linux_target_ops): Add arguments to
12509 install_fast_tracepoint_jump_pad operation, add new operation.
12510 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12512 (linux_get_min_fast_tracepoint_insn_len): New function.
12513 (linux_target_op): Add new operation.
12514 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12515 (gdb_trampoline_buffer_end): Ditto.
12516 (gdb_trampoline_buffer_error): Ditto.
12517 (struct ipa_sym_addresses): Add fields for new IPA variables.
12518 (symbol_list): Add entries for new IPA variables.
12519 (struct tracepoint): Add fields to hold the address range of the
12520 trampoline used by the tracepoint.
12521 (trampoline_buffer_head): New static variable.
12522 (trampoline_buffer_tail): Ditto.
12523 (claim_trampoline_space): New function.
12524 (have_fast_tracepoint_trampoline_buffer): New function.
12525 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12527 (install_fast_tracepoint): Ditto, also add error buffer argument.
12528 (cmd_qtminftpilen): New function.
12529 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12530 (fast_tracepoint_from_trampoline_address): New function.
12531 (fast_tracepoint_collecting): Handle trampoline as part of jump
12533 (set_trampoline_buffer_space): New function.
12534 (initialize_tracepoint): Initialize new IPA variables.
12535 * target.h (struct target_ops): Add arguments to
12536 install_fast_tracepoint_jump_pad operation, add new
12537 get_min_fast_tracepoint_insn_len operation.
12538 (target_get_min_fast_tracepoint_insn_len): New.
12539 (install_fast_tracepoint_jump_pad): Add arguments.
12540 * server.h (IPA_BUFSIZ): Define.
12541 * linux-i386-ipa.c: Include extra header files.
12542 (initialize_fast_tracepoint_trampoline_buffer): New function.
12543 (initialize_low_tracepoint): Call it.
12544 * server.h (set_trampoline_buffer_space): Declare.
12545 (claim_trampoline_space): Ditto.
12546 (have_fast_tracepoint_trampoline_buffer): Ditto.
12548 2011-11-14 Yao Qi <yao@codesourcery.com>
12550 * server.c (handle_query): Handle InstallInTrace for qSupported.
12551 * tracepoint.c (add_tracepoint): Sort list.
12552 (install_tracepoint, download_tracepoint): New.
12553 (cmd_qtdp): Call them to install and download tracepoints.
12554 (sort_tracepoints): Removed.
12555 (cmd_qtstart): Update.
12557 2011-11-14 Yao Qi <yao@codesourcery.com>
12559 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12560 * mem-break.h: Declare.
12561 * tracepoint.c (cmd_qtstart): Move some code to ...
12562 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12564 (download_tracepoints): Move some code to ...
12565 (download_tracepoint_1): ... here. New.
12567 2011-11-08 Yao Qi <yao@codesourcery.com>
12569 * remote-utils.c (relocate_instruction): A comment fix.
12571 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12574 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12575 dr_status_mirror and dr_control_mirror from debug_reg_state.
12576 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12577 (i386_initial_stuff): Remove use of deleted globals.
12578 (i386_get_thread_context, i386_set_thread_context,
12579 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12580 from debug_reg_state.
12582 2011-11-05 Yao Qi <yao@codesourcery.com>
12584 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12585 address as TPOINT's.
12587 2011-11-02 Stan Shebs <stan@codesourcery.com>
12589 * tracepoint.c (agent_mem_read_string): New function.
12590 (eval_agent_expr): Call it for tracenz.
12591 * server.c (handle_query): Report support for tracenz.
12593 2011-11-02 Yao Qi <yao@codesourcery.com>
12595 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12597 2011-11-02 Yao Qi <yao@codesourcery.com>
12599 * target.h: Fix a typo in comment.
12601 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12603 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12604 clobber the breakpoints' shadows with fast tracepoint jumps.
12605 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12606 * target.c (write_inferior_memory): Also pass MYADDR down to
12609 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12611 * configure.ac: Check support for personality routine.
12612 * configure: Regenerate.
12613 * config.in: Likewise.
12614 * linux-low.c: Include <sys/personality.h>.
12615 Define ADDR_NO_RANDOMIZE if necessary.
12616 (linux_create_inferior): Disable address space randomization when
12617 forking inferior, if requested.
12618 (linux_supports_disable_randomization): New function.
12619 (linux_target_ops): Install it.
12620 * server.h (disable_randomization): Declare.
12621 * server.c (disable_randomization): New global variable.
12622 (handle_general_set): Handle QDisableRandomization.
12623 (handle_query): Likewise for qSupported.
12624 (main): Support --disable-randomization and --no-disable-randomization
12625 command line arguments.
12626 * target.h (struct target_ops): Add supports_disable_randomization.
12627 (target_supports_disable_randomization): New macro.
12629 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12631 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12633 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12634 [!PT_GETDSBT] (target_loadmap): New definition.
12635 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12636 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12637 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12638 and PT_GETDSBT to LINUX_LOADMAP.
12639 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12640 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12642 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12644 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12645 (arm_linux_hwbp_cap): New static variable.
12646 (arm_linux_get_hwbp_cap): Replace by ...
12647 (arm_linux_init_hwbp_cap): ... this new function.
12648 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12649 (arm_linux_get_hw_watchpoint_count): Likewise.
12650 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12651 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12652 (arm_prepare_to_resume): Use perror_with_name instead of error.
12654 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12656 * linux-arm-low.c: Include <signal.h>.
12657 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12658 (struct arm_linux_hwbp_cap): New data type.
12659 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12660 (struct arm_linux_hw_breakpoint): New data type.
12661 (MAX_BPTS, MAX_WPTS): Define.
12662 (struct arch_process_info, struct arch_lwp_info): New data types.
12663 (arm_linux_get_hwbp_cap): New function.
12664 (arm_linux_get_hw_breakpoint_count): Likewise.
12665 (arm_linux_get_hw_watchpoint_count): Likewise.
12666 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12667 (arm_hwbp_control_initialize): Likewise.
12668 (arm_hwbp_control_is_enabled): Likewise.
12669 (arm_hwbp_control_is_initialized): Likewise.
12670 (arm_hwbp_control_disable): Likewise.
12671 (arm_linux_hw_breakpoint_equal): Likewise.
12672 (arm_linux_hw_point_initialize): Likewise.
12673 (struct update_registers_data): New data structure.
12674 (update_registers_callback: New function.
12675 (arm_insert_point): Likewise.
12676 (arm_remove_point): Likewise.
12677 (arm_stopped_by_watchpoint): Likewise.
12678 (arm_stopped_data_address): Likewise.
12679 (arm_new_process): Likewise.
12680 (arm_new_thread): Likewise.
12681 (arm_prepare_to_resume): Likewise.
12682 (the_low_target): Register arm_insert_point, arm_remove_point,
12683 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12684 arm_new_thread, and arm_prepare_to_resume.
12686 2011-09-15 Stan Shebs <stan@codesourcery.com>
12688 * server.h (struct emit_ops): Add compare-goto fields.
12689 * tracepoint.c (gdb_agent_op_sizes): New table.
12690 (emit_eq_goto): New function.
12691 (emit_ne_goto): New function.
12692 (emit_lt_goto): New function.
12693 (emit_le_goto): New function.
12694 (emit_gt_goto): New function.
12695 (emit_ge_goto): New function.
12696 (is_goto_target): New function.
12697 (compile_bytecodes): Recognize special cases of compare-goto
12698 combinations and call specialized emitters for them.
12699 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12700 (amd64_emit_ne_goto): New function.
12701 (amd64_emit_lt_goto): New function.
12702 (amd64_emit_le_goto): New function.
12703 (amd64_emit_gt_goto): New function.
12704 (amd64_emit_ge_goto): New function.
12705 (amd64_emit_ops): Add the new functions.
12706 (i386_emit_eq_goto): New function.
12707 (i386_emit_ne_goto): New function.
12708 (i386_emit_lt_goto): New function.
12709 (i386_emit_le_goto): New function.
12710 (i386_emit_gt_goto): New function.
12711 (i386_emit_ge_goto): New function.
12712 (i386_emit_ops): Add the new functions.
12714 2011-09-08 Stan Shebs <stan@codesourcery.com>
12716 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12717 (i386_emit_epilogue): Restore %ebx.
12719 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12721 * server.c (step_thread): Remove definition.
12722 (process_serial_event): Don't handle Hs.
12723 * server.h (step_thread): Remove declaration.
12724 * target.c (set_desired_inferior): Remove use of step_thread.
12726 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12728 * linux-low.c: Include linux-procfs.h.
12729 (linux_attach_lwp_1): Update comments.
12730 (linux_attach): Scan for existing threads when attaching to a
12731 process that is the tgid.
12732 * Makefile.in: Update dependencies.
12734 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12736 * configure.srv: Add linux-procfs.o dependencies.
12738 2011-08-14 Yao Qi <yao@codesourcery.com>
12740 * target.h (struct target_ops): Fix indent.
12741 * win32-low.c (win32_target_ops): Fix comment.
12743 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12744 Yao Qi <yao@codesourcery.com>
12746 * Makefile.in (clean): Remove tic6x-*.c files.
12747 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12748 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12749 (tic6x-c64xp-linux.c): Likewise.
12750 * configure.srv: Add support for tic6x-*-uclinux.
12751 * linux-tic6x-low.c: New.
12752 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12754 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12755 Yao Qi <yao@codesourcery.com>
12757 * target.h (struct target_ops): Add read_loadmap.
12758 * linux-low.c (struct target_loadseg): New type.
12759 (struct target_loadmap): New type.
12760 (linux_read_loadmap): New function.
12761 (linux_target_ops): Add linux_read_loadmap.
12762 * server.c (handle_query): Support qXfer:fdpic:read packet.
12763 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12766 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12768 * win32-low.c: Include <stdint.h>.
12770 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12772 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12773 to the inferior here.
12774 (i386_remove_aligned_watchpoint): Ditto.
12775 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12776 fit part of the watchpoint in the debug registers.
12777 (i386_update_inferior_debug_regs): New.
12778 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12779 registers, and only update the inferior on success.
12780 (i386_low_remove_watchpoint): Ditto.
12782 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12784 * linux-low.c (compare_ints, unique, list_threads, show_process,
12785 linux_core_of_thread): Delete.
12786 (linux_target_ops): Change linux_core_of_thread to
12787 linux_common_core_of_thread.
12788 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12789 * utils.c (malloc_failure): Change type of argument.
12790 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12791 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12792 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12793 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12794 (IPA_OBJS): Add common-utils-ipa.o.
12795 (ptid_h, linux_osdata_h): New macros.
12796 (server_h): Add common/common-utils.h, common/xml-utils.h,
12797 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12799 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12800 ptid.o, buffer.o): New rules.
12801 (linux-low.o): Add common/linux-osdata.h as a dependency.
12802 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12803 * configure.ac: Add AC_HEADER_DIRENT check.
12804 * config.in: Regenerate.
12805 * configure: Regenerate.
12806 * remote-utils.c (xml_escape_text): Delete.
12807 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12808 buffer_xml_printf): Move to common/buffer.c.
12809 * server.c (main): Remove call to initialize_inferiors.
12810 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12811 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12812 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12813 internal_error, gdb_assert, gdb_assert_fail): Delete.
12814 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12815 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12817 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12818 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12819 initialize_inferiors): Delete.
12821 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12823 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12826 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12828 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12830 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12832 2011-05-26 Yao Qi <yao@codesourcery.com>
12834 * Makefile.in (thread-db.o): Track dependence to
12835 common/gdb_thread_db.h.
12836 * thread-db.c: include gdb_thread_db.h from right place.
12838 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12840 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12841 __FILE__ and __LINE__ to internal_error.
12843 2011-05-13 Doug Evans <dje@google.com>
12845 * thread-db.c (try_thread_db_load_from_sdir): New function.
12846 (try_thread_db_load_from_dir): New function.
12847 (thread_db_load_search): Handle $sdir, ignore $pdir.
12848 Remove trying of system directories if search of
12849 libthread-db-search-path fails, that is now done via $sdir.
12851 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12853 * server.c (handle_query): Add EnableDisableTracepoints to the list
12854 of supported features.
12855 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12857 (cmd_qtenable_disable): New.
12858 (cmd_qtstart): Install tracepoints even if disabled.
12859 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12860 receiving a QTEnable or QTDisable packet.
12861 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12862 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12864 (gdb_probe): Skip data collection if static tracepoint is disabled.
12866 2011-05-10 Doug Evans <dje@google.com>
12868 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12870 2011-05-04 Doug Evans <dje@google.com>
12872 * linux-low.c (linux_join): Skip process lookup.
12873 * spu-low.c (spu_join): Ditto.
12874 * server.c (join_inferiors_callback): Delete.
12875 (process_serial_event): For 'D' packet (detach) call join_inferior
12878 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12880 * README: Don't mention xscale*-*-linux*.
12881 * configure.srv (xscale*-*-linux*): Don't handle target.
12883 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12885 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12887 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12888 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12889 (i386_emit_void_call_2): Likewise.
12891 2011-04-26 Yao Qi <yao@codesourcery.com>
12893 * linux-low.c: Move common macros to linux-ptrace.h.
12894 Include linux-ptrace.h.
12895 * Makefile.in (linux_ptrace_h): New.
12896 (linux-low.o): Depends on linux-ptrace.h.
12898 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12900 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12901 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12902 (remote_prepare): New function with most of the TCP code from ...
12903 (remote_open): ... here. Detect PORT here unconditionally. Move also
12904 setting transport_is_reliable.
12905 * server.c (run_once): New variable.
12906 (gdbserver_usage): Document it.
12907 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12908 the first run if RUN_ONCE.
12909 * server.h (run_once, remote_prepare): New declarations.
12911 2011-04-19 Tom Tromey <tromey@redhat.com>
12913 * win32-low.c (handle_load_dll): Remove duplicate "the".
12915 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12917 Remove support for old Cygwin 1.5 versions.
12918 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12919 function to avoid warning.
12920 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12923 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12925 * gdbserver/server.h (Macro _): Define it if not available.
12927 2011-03-14 Michael Snyder <msnyder@vmware.com>
12929 * hostio.c (handle_close): Remove unnecessary null test.
12931 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12933 * Makefile.in (maintainer-clean realclean distclean): Remove
12934 "make ... subdir_do" command.
12936 2011-03-10 Michael Snyder <msnyder@vmware.com>
12938 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12940 * server.c (handle_v_run): Free alloced buffer on early return.
12942 2011-03-09 Yao Qi <yao@codesourcery.com>
12945 2011-03-04 Yao Qi <yao@codesourcery.com>
12947 * Makefile.in: Remove GNU make feature --directory.
12949 2011-03-05 Yao Qi <yao@codesourcery.com>
12951 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12952 (subdir_do): New make target. Copied from gdb/Makefile.
12953 (maintainer-clean, realclean, distclean, clean): Call corresponding
12954 make targets in common/Makefile.
12956 2011-02-11 Yao Qi <yao@codesourcery.com>
12958 * configure.ac: Call AC_PROG_RANLIB.
12959 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12960 * configure: Regenerate.
12962 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12964 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12966 2011-03-06 Yao Qi <yao@codesourcery.com>
12968 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12970 2011-03-05 Yao Qi <yao@codesourcery.com>
12972 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12973 (subdir_do): New make target. Copied from gdb/Makefile.
12974 (maintainer-clean, realclean, distclean, clean): Call corresponding
12975 make targets in common/Makefile.
12977 2011-03-04 Yao Qi <yao@codesourcery.com>
12979 * Makefile.in: Remove GNU make feature --directory.
12981 2011-03-04 Michael Snyder <msnyder@vmware.com>
12983 * server.c (queue_stop_reply): Call xmalloc not malloc.
12985 2011-03-02 Michael Snyder <msnyder@vmware.com>
12987 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12989 2011-02-28 Michael Snyder <msnyder@vmware.com>
12991 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12992 (cmd_qtframe): Ditto.
12993 (cmd_qtbuffer): Ditto.
12994 (cmd_bigqtbuffer): Ditto.
12996 * utils.c (decimal2str): Initialize 'width' to nine, then
12997 don't mess with it.
12999 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13001 * hostio.c (require_data): Free *data, not data.
13003 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13005 * hostio.c (require_data): Use free, not xfree.
13007 2011-02-27 Michael Snyder <msnyder@vmware.com>
13009 * server.c (handle_query): Discard unused value.
13011 * hostio.c (require_data): Free malloc memory before returning
13014 2011-02-26 Michael Snyder <msnyder@vmware.com>
13016 * linux-low.c (list_threads): Call closedir for dirent.
13018 2011-02-27 Michael Snyder <msnyder@vmware.com>
13020 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13021 a case statement falls through.
13023 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13025 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13028 2011-02-26 Michael Snyder <msnyder@vmware.com>
13030 * utils.c (decimal2str): Eliminate dead code and dead param.
13031 (pulongest): Drop dead param from call to decimal2str.
13034 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13036 Revert the following patch (not approved yet):
13037 2011-02-21 Hui Zhu <teawater@gmail.com>
13038 * tracepoint.c (tp_printf): New function.
13039 (eval_agent_expr): Handle gdb_agent_op_printf.
13041 2011-02-21 Hui Zhu <teawater@gmail.com>
13043 * tracepoint.c (tp_printf): New function.
13044 (eval_agent_expr): Handle gdb_agent_op_printf.
13046 2011-02-18 Tom Tromey <tromey@redhat.com>
13048 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13049 (tracepoint.o): Likewise.
13050 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13051 (gdb_agent_op_names): Likewise.
13053 2011-02-18 Tom Tromey <tromey@redhat.com>
13055 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13056 gdb_agent_op_rot>: New constants.
13057 (gdb_agent_op_names): Add pick and roll.
13058 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13061 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13063 * aclocal.m4: Regenerated with aclocal-1.11.1.
13065 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13067 * server.c (handle_qxfer_traceframe_info): New.
13068 (qxfer_packets): Register "traceframe-info".
13069 (handle_query): Report support for qXfer:traceframe-info:read+.
13070 * tracepoint.c (match_blocktype): New.
13071 (traceframe_find_block_type): Rename to ...
13072 (traceframe_walk_blocks): ... this. Add callback filter argument,
13074 (traceframe_find_block_type): New, reimplemented on top of
13075 traceframe_walk_blocks.
13076 (build_traceframe_info_xml): New.
13077 (traceframe_read_info): New.
13078 * server.h (traceframe_read_info): Declare.
13080 2011-02-11 Yao Qi <yao@codesourcery.com>
13082 * configure.ac: Call AC_PROG_RANLIB.
13083 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13084 * configure: Regenerate.
13086 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13088 * server.c (gdb_read_memory): Change return semantics to allow
13090 (handle_search_memory_1): Adjust.
13091 (process_serial_event) <'m' packet>: Handle partial transfers.
13092 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13094 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13096 * regcache.c (init_register_cache): Initialize
13097 regcache->register_status.
13098 (free_register_cache): Release regcache->register_status.
13099 (regcache_cpy): Copy register_status.
13100 (registers_to_string): Print 'x's for unavailable registers.
13101 (supply_register): Mark the register's status valid or
13102 unavailable, depending on whether a buffer was passed in or not.
13103 (supply_register_zeroed): New.
13104 (supply_regblock): Mark the registers' status valid or
13105 unavailable, depending on whether a buffer was passed in or not.
13106 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13107 (struct regcache): New `register_status' field.
13108 (supply_register_zeroed): Declare.
13109 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13110 supply_register_zeroed, rather than passing a NULL buffer to
13112 * tracepoint.c (fetch_traceframe_registers): Update comment.
13114 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13116 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13119 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13121 * server.h (decode_xfer_write): Change prototype.
13122 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13123 and don't extract the annex here.
13124 * server.c (decode_xfer_read): Remove `annex' parameter,
13125 and don't extract the annex here.
13126 (decode_xfer): New.
13127 (struct qxfer): New.
13128 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13129 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13130 (handle_qxfer_statictrace): New functions, abstracted out from
13131 handle_query, and made to use the struct qxfer interface.
13132 (handle_threads_qxfer_proper): Rename to ...
13133 (handle_qxfer_threads_proper): ... this.
13134 (handle_threads_qxfer): Rename to ...
13135 (handle_qxfer_threads): ... this. Adjust.
13136 (qxfer_packets): New array.
13137 (handle_qxfer): New function.
13138 (handle_query): Use handle_qxfer.
13140 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13142 * gdbreplay.c: Shorten lines of >= 80 columns.
13143 * linux-low.c: Ditto.
13144 * linux-ppc-low.c: Ditto.
13145 * linux-s390-low.c: Ditto.
13146 * linux-sparc-low.c: Ditto.
13147 * linux-x86-low.c: Ditto.
13148 * linux-xtensa-low.c: Ditto.
13149 * mem-break.c: Ditto.
13150 * nto-low.c: Ditto.
13151 * regcache.h: Ditto.
13152 * remote-utils.c: Ditto.
13155 * thread-db.c: Ditto.
13156 * tracepoint.c: Ditto.
13158 * win32-low.h: Ditto.
13160 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13162 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13165 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13167 * server.c (gdbserver_version): Update copyright year in version
13169 * gdbreplay.c (gdbreplay_version): Ditto.
13171 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13173 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13174 * linux-bfin-low.c: New file.
13175 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13176 PT_DATA_ADDR for BFIN targets.
13177 * Makefile.in (SFILES): Add linux-bfin-low.c.
13178 (clean): Remove reg-bfin.c.
13179 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13180 * README: Mention supported Blackfin targets.
13182 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13184 * .gitignore: New file.
13186 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13188 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13190 2010-10-22 Jie Zhang <jie@codesourcery.com>
13192 * Makefile.in: Add FLAGS_TO_PASS variable.
13193 (install): Remove dependency of install-only and recursively
13194 invoke make for install-only.
13196 2010-10-04 Doug Evans <dje@google.com>
13198 * Makefile.in (uninstall): Use $(DESTDIR).
13200 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13204 * linux-x86-low.c (compat_siginfo_from_siginfo)
13205 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13206 si_code is < 0. Check for si_code == SI_TIMER before checking for
13209 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13211 * lynx-i386-low.c: New file.
13212 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13214 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13216 * lynx-low.c (ptrace_request_to_str): Remove handling for
13217 request values that have been removed in LynxOS 5.x.
13219 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13221 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13224 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13226 * configure.ac: Add --enable-inprocess-agent option.
13227 * configure: Rebuilt.
13229 2010-09-06 Yao Qi <yao@codesourcery.com>
13231 * linux-low.c (linux_kill): Remove unused variable.
13232 (linux_stabilize_threads): Likewise.
13233 * server.c (start_inferior): Likewise.
13234 (queue_stop_reply_callback): Likewise.
13235 * tracepoint.c (do_action_at_tracepoint): Likewise.
13237 2010-09-06 Yao Qi <yao@codesourcery.com>
13239 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13242 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13244 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13246 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13248 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13251 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13253 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13254 gdbserver/lynx-ppc-low.c: New files.
13255 * Makefile.in (lynx_low_h): New variable.
13256 (lynx-low.o, lynx-ppc-low.o): New rules.
13257 * configure.ac: On LynxOS, link with -lnetinet.
13258 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13259 * configure: regenerate.
13261 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13263 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13264 * configure.ac: Add check for vasprintf and vsnprintf.
13265 * configure, config.in: Regenerate.
13266 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13268 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13270 * gdbreplay.c: Move include of alloca.h up, next to include of
13272 * server.h: Add include of malloc.h.
13273 * mem-break.c: Remove include of malloc.h.
13274 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13276 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13278 * Makefile.in (memmem.o): Build with -Wno-error.
13280 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13282 * utils.c (xsnprintf): Make non-static.
13283 * server.h: Add xsnprintf declaration.
13284 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13285 replace calls to snprintf by calls to xsnprintf throughout.
13287 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13289 * configure.ac: Add configure check for alloca.
13290 * configure, config.in: Regenerate.
13291 * server.h: Include alloca.h if it exists.
13292 * gdbreplay.c: Include alloca.h if it exists.
13294 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13296 * linux-low.c (__SIGRTMIN): Define if not already defined.
13297 (linux_create_inferior): Check for __ANDROID__ rather than
13299 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13300 are already deferred.
13301 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13302 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13303 stopped and already has a pending signal to report.
13304 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13305 a pending signal to report or is moving out of a jump pad.
13306 (linux_init_signals): Check for __ANDROID__ rather than
13309 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13311 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13312 debug_threads check. Avoid a linear search when not doing debug
13315 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13317 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13318 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13319 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13320 (process_event): Change local fd's type to gdb_fildes_t.
13321 (create_file_handler): Adjust prototype.
13322 (delete_file_handler): Adjust prototype.
13323 (handle_file_event): Adjust prototype. Use pfildes.
13324 (create_file_event): Adjsut prototype.
13325 * remote-utils.c (remote_desc, listen_desc): Change type to
13327 * server.h: New gdb_fildes_t typedef.
13328 [USE_WIN32API]: Include winsock2.h.
13329 (delete_file_handler, add_file_handler): Adjust prototypes.
13330 (pfildes): Declare.
13331 * utils.c (pfildes): New.
13333 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13335 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13336 * configure: Regenerate.
13338 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13340 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13341 (linux_done_accessing_memory): ... this.
13342 (linux_target_ops): Adjust.
13343 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13344 * nto-low.c (nto_target_ops): Adjust comment.
13345 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13346 * spu-low.c (spu_target_ops): Adjust comment.
13347 * target.h (target_ops): Rename unprepare_to_access_memory field
13348 to done_accessing_memory.
13349 (unprepare_to_access_memory): Rename to ...
13350 (done_accessing_memory): ... this.
13352 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13354 * linux-low.c (linux_prepare_to_access_memory): New.
13355 (linux_unprepare_to_access_memory): New.
13356 (linux_target_ops): Install them.
13357 * server.c (read_memory): Rename to ...
13358 (gdb_read_memory): ... this. Use
13359 prepare_to_access_memory/prepare_to_access_memory.
13360 (write_memory): Rename to ...
13361 (gdb_write_memory): ... this. Use
13362 prepare_to_access_memory/prepare_to_access_memory.
13363 (handle_search_memory_1): Adjust.
13364 (process_serial_event): Adjust.
13365 * target.h (struct target_ops): New fields
13366 prepare_to_access_memory and unprepare_to_access_memory.
13367 (prepare_to_access_memory, unprepare_to_access_memory): New.
13368 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13369 prepare_to_access_memory/prepare_to_access_memory.
13370 * nto-low.c (nto_target_ops): Adjust.
13371 * spu-low.c (spu_target_ops): Adjust.
13372 * win32-low.c (win32_target_ops): Adjust.
13374 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13376 * Makefile.in (WARN_CFLAGS): Get it from configure.
13377 (WERROR_CFLAGS): New.
13378 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13379 * configure.ac: Introduce --enable-werror, which adds -Werror to
13380 the compiler command line. Enabled by default. Disable with
13381 --disable-werror. Add -Wdeclaration-after-statement
13382 Wpointer-arith and -Wformat-nonliteral to warning flags.
13383 * configure: Regenerate.
13385 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13387 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13389 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13391 * gdbreplay.c (remote_error): New.
13393 (expect): Use gdbchar. Check for error reading from GDB.
13394 Clarify sync error output.
13395 (play): Check for errors writing to GDB.
13396 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13397 * remote-utils.c (getpkt): Check for errors writing to the remote
13400 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13402 * linux-low.c (linux_wait_1): Move non-debugging code out of
13403 `debug_threads' control.
13405 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13407 * linux-low.c (linux_wait_1): Don't set last_status here.
13408 * server.c (push_event, queue_stop_reply_callback): Assert we're
13409 not pushing a TARGET_WAITKIND_IGNORE event.
13410 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13411 (myresume, handle_target_event): Set the thread's last_resume_kind
13412 and last_status from the target returned status.
13414 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13418 * linux-x86-low.c (update_debug_registers_callback): New.
13419 (i386_dr_low_set_addr): Use it.
13420 (i386_dr_low_get_addr): New.
13421 (i386_dr_low_set_control): Use update_debug_registers_callback.
13422 (i386_dr_low_get_control): New.
13423 (i386_dr_low_get_status): Adjust.
13424 * linux-low.c (linux_stop_lwp): New.
13425 * linux-low.h (linux_stop_lwp): Declare.
13427 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13428 argument instead of a i386_debug_reg_state.
13429 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13430 a i386_debug_reg_state.
13431 (i386_insert_aligned_watchpoint): Adjust.
13432 (i386_remove_aligned_watchpoint): Adjust.
13433 (i386_low_stopped_data_address): Read the debug registers from the
13434 inferior instead of from the mirrors.
13435 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13436 (i386_dr_low_get_addr): Declare.
13437 (i386_dr_low_get_control): Declare.
13438 (i386_dr_low_get_status): Change prototype.
13440 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13441 (i386_dr_low_get_addr): New.
13442 (i386_dr_low_get_control): New.
13443 (i386_dr_low_get_status): Adjust prototype. Return
13445 (i386_initial_stuff): Clear dr_status_mirror and
13447 (i386_get_thread_context): Adjust.
13448 (i386_set_thread_context): Adjust.
13449 (i386_thread_added): Adjust.
13451 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13453 * linux-low.h (linux_thread_area): Delete declaration.
13455 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13457 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13458 after its termination.
13460 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13462 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13463 (gdb_wants_all_stopped): Delete.
13464 (linux_wait_1): Don't call them.
13465 * server.c (handle_v_cont): Tag all threads as want-stopped.
13466 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13467 stopped as "client-wants-stopped".
13469 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13471 * Makefile.in (signals_h): New.
13472 (server_h): Depend on it.
13473 (server.o): Don't depend on $(signals_def).
13474 (signals.o): Depend on $(signals_def).
13476 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13478 * Makefile.in (signals_def): New.
13479 (server_h): Append include/gdb/signals.h and signals_def.
13480 (server.o): Append signals_def.
13482 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13484 * server.c (handle_target_event): Use target_signal_to_host for
13485 resume_info.sig initialization.
13486 * target.h (struct thread_resume) <sig>: New comment.
13488 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13490 * server.c (handle_query): strcpy() the returned string from paddress()
13491 instead of sprintf().
13492 * utils.c (paddress): Return phex_nz().
13494 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13496 * server.c (handle_v_cont): Call mourn_inferior if process
13498 (myresume): Likewise.
13500 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13502 Static tracepoints, and integration with UST.
13504 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13505 * mem-break.c (uninsert_all_breakpoints)
13506 (reinsert_all_breakpoints): New.
13507 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13508 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13509 (gdb_agent_ust_loaded, helper_thread_id)
13510 (gdb_agent_helper_thread_id): New macros.
13511 (struct ipa_sym_addresses): Add addr_ust_loaded,
13512 addr_helper_thread_id, addr_cmd_buf.
13513 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13514 (in_process_agent_loaded_ust): New.
13515 (write_e_ust_not_loaded): New.
13516 (maybe_write_ipa_ust_not_loaded): New.
13517 (struct collect_static_trace_data_action): New.
13518 (enum tracepoint_type) <static_tracepoint>: New.
13519 (struct tracepoint) <handle>: Mention static tracepoints.
13520 (struct static_tracepoint_ctx): New.
13521 (CMD_BUF_SIZE): New.
13522 (add_tracepoint_action): Handle static tracepoint actions.
13523 (unprobe_marker_at): New.
13524 (clear_installed_tracepoints): Handle static tracepoints.
13525 (cmd_qtdp): Handle static tracepoints.
13526 (probe_marker_at): New.
13527 (cmd_qtstart): Handle static tracepoints.
13528 (response_tracepoint): Handle static tracepoints.
13529 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13530 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13531 (get_context_regcache): Handle static tracepoints.
13532 (do_action_at_tracepoint): Handle static tracepoint actions.
13533 (traceframe_find_block_type): Handle static trace data blocks.
13534 (traceframe_read_sdata): New.
13535 (download_tracepoints): Download static tracepoint actions.
13536 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13537 (GDB_PROBE_NAME): New.
13539 (GET_UST_SYM): New.
13542 (ust_marker_to_static_tracepoint): New.
13544 (collect_ust_data_at_tracepoint): New.
13545 (gdb_ust_probe): New.
13546 (UNIX_PATH_MAX, SOCK_DIR): New.
13547 (gdb_ust_connect_sync_socket): New.
13548 (resume_thread, stop_thread): New.
13549 (run_inferior_command): New.
13550 (init_named_socket): New.
13551 (gdb_ust_socket_init): New.
13552 (cstr_to_hexstr): New.
13554 (first_marker, next_marker): New.
13555 (response_ust_marker): New.
13556 (cmd_qtfstm, cmd_qtsstm): New.
13557 (unprobe_marker_at, probe_marker_at): New.
13558 (cmd_qtstmat, gdb_ust_thread): New.
13559 (gdb_ust_init): New.
13560 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13561 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13562 (ST_REGENTRY): New.
13563 (x86_64_st_collect_regmap): New.
13564 (X86_64_NUM_ST_COLLECT_GREGS): New.
13565 (AMD64_RIP_REGNUM): New.
13566 (supply_static_tracepoint_registers): New.
13567 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13568 (ST_REGENTRY): New.
13569 (i386_st_collect_regmap): New.
13570 (i386_NUM_ST_COLLECT_GREGS): New.
13571 (supply_static_tracepoint_registers): New.
13572 * server.c (handle_query): Handle qXfer:statictrace:read.
13573 <qSupported>: Report support for StaticTracepoints, and
13574 qXfer:statictrace:read features.
13575 * server.h (traceframe_read_sdata)
13576 (supply_static_tracepoint_registers): Declare.
13577 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13578 (unpack_varlen_hex): Include in IPA build.
13579 * Makefile.in (ustlibs, ustinc): New.
13580 (IPA_OBJS): Add remote-utils-ipa.o.
13581 ($(IPA_LIB)): Link -ldl and -lpthread.
13583 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13584 * config.in, configure: Regenerate.
13586 2010-06-20 Ian Lance Taylor <iant@google.com>
13587 Pedro Alves <pedro@codesourcery.com>
13589 * linux-x86-low.c (always_true): Delete.
13590 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13591 trying to fool the compiler with always_true.
13593 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13595 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13596 conditions in gdbserver.
13598 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13600 * spu-low.c (spu_read_memory): Wrap around local store limit.
13601 (spu_write_memory): Likewise.
13603 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13605 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13606 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13608 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13610 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13611 uses with LONGEST uses.
13613 2010-06-14 Stan Shebs <stan@codesourcery.com>
13614 Pedro Alves <pedro@codesourcery.com>
13618 * linux-x86-low.c: Include limits.h.
13620 (always_true): New.
13623 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13624 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13625 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13626 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13627 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13628 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13629 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13630 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13631 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13632 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13633 (amd64_emit_void_call_2): New.
13634 (amd64_emit_ops): New.
13635 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13636 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13637 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13638 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13639 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13640 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13641 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13642 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13643 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13644 (i386_emit_stack_adjust, i386_emit_int_call_1)
13645 (i386_emit_void_call_2): New.
13646 (i386_emit_ops): New.
13647 (x86_emit_ops): New.
13648 (the_low_target): Install x86_emit_ops.
13649 * server.h (struct emit_ops): New.
13650 (get_raw_reg_func_addr): Declare.
13651 (current_insn_ptr, emit_error): Declare.
13652 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13653 (set_trace_state_variable_value): New defines.
13654 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13655 addr_get_trace_state_variable_value and
13656 addr_set_trace_state_variable_value.
13657 (symbol_list): New fields for get_raw_reg,
13658 get_trace_state_variable_value and set_trace_state_variable_value.
13659 (condfn): New typedef.
13660 (struct tracepoint): New field `compiled_cond'.
13661 (do_action_at_tracepoint): Clear compiled_cond.
13662 (get_trace_state_variable_value, set_trace_state_variable_value):
13664 (condition_true_at_tracepoint): If there's a compiled condition,
13666 (current_insn_ptr, emit_error): New globals.
13667 (struct bytecode_address): New.
13668 (get_raw_reg_func_addr): New.
13669 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13670 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13671 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13672 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13673 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13674 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13675 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13676 (compile_tracepoint_condition, compile_bytecodes): New.
13677 * target.h (emit_ops): Forward declare.
13678 (struct target_ops): New field emit_ops.
13679 (target_emit_ops): New.
13680 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13681 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13682 * linux-low.c (linux_emit_ops): New.
13683 (linux_target_ops): Install it.
13684 * linux-low.h (struct linux_target_ops): New field emit_ops.
13686 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13688 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13689 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13691 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13692 Stan Shebs <stan@codesourcery.com>
13694 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13695 (all): Depend on $(extra_libraries).
13696 (install-only): Install the IPA.
13697 (IPA_OBJS, IPA_LIB): New.
13698 (clean): Remove the IPA lib.
13699 (IPAGENT_CFLAGS): New.
13700 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13701 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13702 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13703 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13704 * configure.ac: Check for atomic builtins support in the compiler.
13705 (IPA_DEPFILES, extra_libraries): Define.
13706 * configure.srv (ipa_obj): Add description.
13707 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13708 (i[34567]86-*-linux*): Set ipa_obj.
13709 (x86_64-*-linux*): Set ipa_obj.
13710 * linux-low.c (stabilizing_threads): New.
13711 (supports_fast_tracepoints): New.
13712 (linux_detach): Stabilize threads before detaching.
13713 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13714 the lwp is either not stabilizing, or is moving out of a jump pad.
13715 (linux_fast_tracepoint_collecting): New.
13716 (maybe_move_out_of_jump_pad): New.
13717 (enqueue_one_deferred_signal): New.
13718 (dequeue_one_deferred_signal): New.
13719 (linux_wait_for_event_1): If moving out of a jump pad, defer
13720 pending signals to later.
13721 (linux_stabilize_threads): New.
13722 (linux_wait_1): Check if threads need moving out of jump pads, and
13724 (stuck_in_jump_pad_callback): New.
13725 (move_out_of_jump_pad_callback): New.
13726 (lwp_running): New.
13727 (linux_resume_one_lwp): Handle moving out of jump pads.
13728 (linux_set_resume_request): Dequeue deferred signals.
13729 (need_step_over_p): Also step over fast tracepoint jumps.
13730 (start_step_over): Also uninsert fast tracepoint jumps.
13731 (finish_step_over): Also reinsert fast tracepoint jumps.
13732 (linux_install_fast_tracepoint_jump): New.
13733 (linux_target_ops): Install linux_stabilize_threads and
13734 linux_install_fast_tracepoint_jump_pad.
13735 * linux-low.h (linux_target_ops) <get_thread_area,
13736 install_fast_tracepoint_jump_pad>: New fields.
13737 (struct lwp_info) <collecting_fast_tracepoint,
13738 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13739 (linux_get_thread_area): Declare.
13740 * linux-x86-low.c (jump_insn): New.
13741 (x86_get_thread_area): New.
13742 (append_insns): New.
13743 (push_opcode): New.
13744 (amd64_install_fast_tracepoint_jump_pad): New.
13745 (i386_install_fast_tracepoint_jump_pad): New.
13746 (x86_install_fast_tracepoint_jump_pad): New.
13747 (the_low_target): Install x86_get_thread_area and
13748 x86_install_fast_tracepoint_jump_pad.
13749 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13750 (struct fast_tracepoint_jump): New.
13751 (fast_tracepoint_jump_insn): New.
13752 (fast_tracepoint_jump_shadow): New.
13753 (find_fast_tracepoint_jump_at): New.
13754 (fast_tracepoint_jump_here): New.
13755 (delete_fast_tracepoint_jump): New.
13756 (set_fast_tracepoint_jump): New.
13757 (uninsert_fast_tracepoint_jumps_at): New.
13758 (reinsert_fast_tracepoint_jumps_at): New.
13759 (set_breakpoint_at): Use write_inferior_memory.
13760 (uninsert_raw_breakpoint): Use write_inferior_memory.
13761 (check_mem_read): Mask out fast tracepoint jumps.
13762 (check_mem_write): Mask out fast tracepoint jumps.
13763 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13764 (set_fast_tracepoint_jump): Declare.
13765 (delete_fast_tracepoint_jump)
13766 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13767 (reinsert_fast_tracepoint_jumps_at): Declare.
13768 * regcache.c: Don't compile many functions when building the
13769 in-process agent library.
13770 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13771 the register buffer in the heap.
13772 (free_register_cache): If the register buffer isn't owned by the
13773 regcache, don't free it.
13774 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13775 pre-existing register caches.
13776 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13778 (convert_ascii_to_int): : Constify `from' parameter type.
13779 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13780 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13781 the needed buffer in-place.
13782 (relocate_instruction): New.
13783 * server.c (handle_query) <qSymbols>: If the target supports
13784 tracepoints, give it a chance of looking up symbols. Report
13785 support for fast tracepoints.
13786 (handle_status): Stabilize threads.
13787 (process_serial_event): Adjust.
13788 * server.h (struct fast_tracepoint_jump): Forward declare.
13789 (struct process_info) <fast_tracepoint_jumps>: New field.
13790 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13791 (decode_X_packet, decode_M_packet): Adjust.
13792 (relocate_instruction): Declare.
13793 (in_process_agent_loaded): Declare.
13794 (tracepoint_look_up_symbols): Declare.
13795 (struct fast_tpoint_collect_status): Declare.
13796 (fast_tracepoint_collecting): Declare.
13797 (force_unlock_trace_buffer): Declare.
13798 (handle_tracepoint_bkpts): Declare.
13799 (initialize_low_tracepoint)
13800 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13801 * target.h (struct target_ops) <stabilize_threads,
13802 install_fast_tracepoint_jump_pad>: New fields.
13803 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13804 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13805 [HAVE_STDINT_H]: Include stdint.h.
13806 (trace_debug_1): Rename to ...
13807 (trace_vdebug): ... this.
13808 (trace_debug): Rename to ...
13809 (trace_debug_1): ... this. Add `level' parameter.
13810 (trace_debug): New.
13811 (ATTR_USED, ATTR_NOINLINE): New.
13812 (IP_AGENT_EXPORT): New.
13813 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13814 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13815 (about_to_request_buffer_space, trace_buffer_is_full)
13816 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13817 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13818 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13819 (traceframe_write_count, traceframes_created)
13820 (trace_state_variables)
13821 New renaming defines.
13822 (struct ipa_sym_addresses): New.
13823 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13824 (symbol_list): New.
13825 (ipa_sym_addrs): New.
13826 (all_tracepoint_symbols_looked_up): New.
13827 (in_process_agent_loaded): New.
13828 (write_e_ipa_not_loaded): New.
13829 (maybe_write_ipa_not_loaded): New.
13830 (tracepoint_look_up_symbols): New.
13831 (debug_threads) [IN_PROCESS_AGENT]: New.
13832 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13833 (UNKNOWN_SIDE_EFFECTS): New.
13834 (stop_tracing): New.
13835 (flush_trace_buffer): New.
13836 (stop_tracing_bkpt): New.
13837 (flush_trace_buffer_bkpt): New.
13838 (read_inferior_integer): New.
13839 (read_inferior_uinteger): New.
13840 (read_inferior_data_pointer): New.
13841 (write_inferior_data_pointer): New.
13842 (write_inferior_integer): New.
13843 (write_inferior_uinteger): New.
13844 (struct collect_static_trace_data_action): Delete.
13845 (enum tracepoint_type): New.
13846 (struct tracepoint) <type>: New field `type'.
13847 <actions_str, step_actions, step_actions_str>: Only include in
13849 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13850 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13851 (tracepoints): Use IP_AGENT_EXPORT.
13852 (last_tracepoint): Don't include in the IPA.
13853 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13854 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13855 (alloced_trace_state_variables): New.
13856 (trace_state_variables): Use IP_AGENT_EXPORT.
13857 (traceframe_t): Delete unused variable.
13858 (circular_trace_buffer): Don't include in the IPA.
13859 (trace_buffer_start): Delete.
13860 (struct trace_buffer_control): New.
13861 (trace_buffer_free): Delete.
13862 (struct ipa_trace_buffer_control): New.
13863 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13864 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13866 (trace_buffer_ctrl): New.
13867 (TRACE_BUFFER_CTRL_CURR): New.
13868 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13869 Reimplement as macros.
13870 (trace_buffer_wrap): Delete.
13871 (traceframe_write_count, traceframe_read_count)
13872 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13873 (struct tracepoint_hit_ctx) <type>: New field.
13874 (struct fast_tracepoint_ctx): New.
13875 (memory_barrier): New.
13877 (record_tracepoint_error): Update atomically in the IPA.
13878 (clear_inferior_trace_buffer): New.
13879 (about_to_request_buffer_space): New.
13880 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13881 updating the same buffer.
13882 (add_tracepoint): Default the tracepoint's type to trap
13883 tracepoint, and orig_size to -1.
13884 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13885 internal variables.
13886 (create_trace_state_variable): New parameter `gdb'. Handle it.
13887 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13888 (cmd_qtdp): Handle fast tracepoints.
13889 (cmd_qtdv): Adjust.
13890 (max_jump_pad_size): New.
13891 (gdb_jump_pad_head): New.
13892 (get_jump_space_head): New.
13893 (claim_jump_space): New.
13894 (sort_tracepoints): New.
13895 (MAX_JUMP_SIZE): New.
13896 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13898 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13899 support. Upload fast traceframes, and delete internal IPA
13901 (stop_tracing_handler): New.
13902 (flush_trace_buffer_handler): New.
13903 (cmd_qtstop): Upload fast tracepoints.
13904 (response_tracepoint): Handle fast tracepoints.
13905 (tracepoint_finished_step): Upload fast traceframes. Set the
13906 tracepoint hit context's tracepoint type.
13907 (handle_tracepoint_bkpts): New.
13908 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13909 type. Add comment about fast tracepoints.
13910 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13911 non-existing action_str field.
13912 (get_context_regcache): Handle fast tracepoints.
13913 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13915 (fast_tracepoint_from_jump_pad_address): New.
13916 (fast_tracepoint_from_ipa_tpoint_address): New.
13917 (collecting_t): New.
13918 (force_unlock_trace_buffer): New.
13919 (fast_tracepoint_collecting): New.
13921 (gdb_collect): New.
13922 (write_inferior_data_ptr): New.
13923 (target_tp_heap): New.
13924 (target_malloc): New.
13925 (download_agent_expr): New.
13927 (download_tracepoints): New.
13928 (download_trace_state_variables): New.
13929 (upload_fast_traceframes): New.
13930 (IPA_FIRST_TRACEFRAME): New.
13931 (IPA_NEXT_TRACEFRAME_1): New.
13932 (IPA_NEXT_TRACEFRAME): New.
13933 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13934 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13935 (gdb_jump_pad_buffer_end): New.
13936 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13937 (initialize_tracepoint): Adjust.
13938 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13939 buffer. Initialize the low module.
13940 * utils.c (PREFIX, TOOLNAME): New.
13941 (malloc_failure): Use PREFIX.
13942 (error): In the IPA, an error causes an exit.
13943 (fatal, warning): Use PREFIX.
13944 (internal_error): Use TOOLNAME.
13945 (NUMCELLS): Increase to 10.
13946 * configure, config.in: Regenerate.
13948 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13950 * server.c (handle_query) <qSupported>: Do two passes over the
13951 qSupported string to avoid nesting strtok.
13953 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13955 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13957 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13958 -Wl,--dynamic-list.
13959 * configure: Regenerate.
13960 * proc-service.list: New.
13962 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13964 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13967 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13969 * gdbreplay.c (remote_open): Check error return from socket() call by
13970 its equality to -1 not by it being negative.
13971 * remote-utils.c (remote_open): Likewise.
13973 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13975 * config.h: Regenerate.
13977 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13979 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13980 doesn't provide PTRACE_GET_THREAD_AREA.
13982 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13984 * linux-m68k-low.c: Include <asm/ptrace.h>
13985 (ps_get_thread_area): Implement.
13987 2010-05-03 Doug Evans <dje@google.com>
13989 * event-loop.c (struct callback_event): New struct.
13990 (callback_list): New global.
13991 (append_callback_event, delete_callback_event): New functions.
13992 (process_callback): New function.
13993 (start_event_loop): Call it.
13994 * remote-utils.c (NOT_SCHEDULED): Define.
13995 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13996 moved out of readchar.
13997 (readchar): Rewrite. Call reschedule before returning.
13998 (reset_readchar): New function.
13999 (remote_close): Call it.
14000 (process_remaining, reschedule): New functions.
14001 * server.h (callback_handler_func): New typedef.
14002 (append_callback_event, delete_callback_event): Declare.
14004 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14006 * proc-service.c (ps_pglobal_lookup): Use
14007 thread_db_look_up_one_symbol.
14008 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14009 parameter. Use it instead of all_symbols_looked_up.
14010 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14012 (all_symbols_looked_up): Don't declare.
14013 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14014 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14016 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14017 Set all_symbols_looked_up here.
14018 (thread_db_look_up_one_symbol): New.
14019 (thread_db_get_tls_address): Adjust.
14020 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14021 thread_db object on the heap, and tentatively set it in the
14023 (thread_db_init): Don't set all_symbols_looked_up here.
14024 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14026 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14028 * linux-low.c (linux_kill, linux_detach): Adjust.
14029 (status_pending_p_callback): Remove redundant statement. Check
14030 for !TARGET_WAITIKIND_IGNORE, instead of
14031 TARGET_WAITKIND_STOPPED.
14032 (handle_tracepoints): Make sure LWP is locked. Adjust.
14033 (linux_wait_for_event_1): Adjust.
14034 (linux_cancel_breakpoints): New.
14035 (unsuspend_one_lwp): New.
14036 (unsuspend_all_lwps): New.
14037 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14038 (send_sigstop_callback): Change return type to int, add new
14039 `except' parameter and handle it.
14040 (suspend_and_send_sigstop_callback): New.
14041 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14042 pass them down. If SUSPEND, also increment the lwp's suspend
14044 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14045 (need_step_over_p): Don't consider suspended LWPs.
14046 (start_step_over): Adjust.
14047 (proceed_one_lwp): Change return type to int, add new `except'
14048 parameter and handle it.
14049 (unsuspend_and_proceed_one_lwp): New.
14050 (proceed_all_lwps): Use find_inferior instead of
14052 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14053 also decrement the suspend count of LWPs. Pass `except' down,
14054 instead of hacking its suspend count.
14055 (linux_pause_all): Add `freeze' parameter. Adjust.
14056 (linux_unpause_all): New.
14057 (linux_target_ops): Install linux_unpause_all.
14058 * server.c (handle_status): Adjust.
14059 * target.h (struct target_ops): New fields `unpause_all' and
14060 `cancel_breakpoints'. Add new parameter to `pause_all'.
14061 (pause_all): Add new `freeze' parameter.
14062 (unpause_all): New.
14063 (cancel_breakpoints): New.
14064 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14065 cancel breakpoints.
14066 (cmd_qtstart): Pause threads.
14067 (stop_tracing): Pause threads, and cancel breakpoints.
14068 * win32-low.c (win32_target_ops): Adjust.
14070 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14072 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14073 the inferior right away from here...
14074 (linux_wait_1): ... to here, and adjust to check the thread's
14075 last_resume_kind instead of the lwp's step or stop_expected flags.
14077 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14079 * README: Use consistent `GDB' and `GDBserver' spellings.
14081 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14083 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14084 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14085 (linux_detach_one_lwp): Assume the lwp is stopped.
14086 (any_thread_of): Delete.
14087 (linux_detach): Stop all lwps here. Don't blindly delete all
14089 (delete_lwp_callback): New.
14090 (linux_mourn): Delete all lwps of the process that is gone.
14091 (linux_wait_1): Don't delete the last lwp of the process here.
14092 * mem-break.h (mark_breakpoints_out): Declare.
14093 * mem-break.c (mark_breakpoints_out): New.
14094 (free_all_breakpoints): Use it.
14095 * server.c (handle_target_event): If the process is gone, mark
14097 * thread-db.c (struct thread_db) <create_bp>: New field.
14098 (thread_db_enable_reporting): Fix prototype. Store a thread event
14099 breakpoint reference in the thread_db struct.
14100 (thread_db_load_search): Clear the thread_db object.
14101 (try_thread_db_load_1): Ditto.
14102 (switch_to_process): New.
14103 (disable_thread_event_reporting): Use it.
14104 (remove_thread_event_breakpoints): New.
14105 (thread_db_detach, thread_db_mourn): Use it.
14107 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14109 * linux-low.c (linux_enable_event_reporting): New.
14110 (linux_wait_for_event_1, handle_extended_wait): Use it.
14112 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14114 * linux-low.c (linux_kill_one_lwp, linux_kill)
14115 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14116 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14117 SIGSTOP even if the LWP is stopped.
14118 (send_sigstop_callback): New.
14119 (stop_all_lwps): Use send_sigstop_callback instead.
14120 (linux_resume_one_thread): Adjust.
14121 (proceed_one_lwp): Still proceed an LWP that the client has
14122 requested to stop, if we haven't reported it as stopped yet. Make
14123 sure that LWPs the client want stopped, have a pending SIGSTOP.
14125 2010-04-26 Doug Evans <dje@google.com>
14127 * server.c (handle_general_set): Make static.
14129 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14130 Print received char after testing for error/eof instead of before.
14131 (input_interrupt): Tweak comment.
14133 2010-04-23 Doug Evans <dje@google.com>
14135 * server.c (start_inferior): Print inferior argv if --debug.
14137 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14139 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14140 * nto-x86-low.c: Include server.h
14142 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14144 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14145 be consistent with other sources of this directory.
14146 (init_registers_amd64): Correct name of source file of this function
14149 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14151 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14152 64-bit executables.
14154 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14156 * win32-i386-low.c: Add 64-bit support.
14157 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14158 (init_registers_amd64): Declare.
14159 (mappings): Add 64-bit version of array.
14160 (init_windows_x86): New function.
14161 (the_low_target): Change init_arch field to init_windows_x86.
14163 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14165 * win32-low.c: Adapt to support also 64-bit architecture.
14166 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14167 (get_image_name): Use SIZE_T type for local variable `done'.
14168 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14169 (toolhelp_get_dll_name): Idem.
14170 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14171 Use uintptr_t typecast to avoid warning.
14172 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14173 (handle_exception): Use phex_nz to avoid warning.
14174 (win32_wait): Remove unused local variable `process'.
14176 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14178 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14181 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14183 * configure.ac: Use `ws2_32' library for srv_mingw.
14184 * configure: Regenerate.
14185 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14186 * remote-utils.c: Likewise.
14188 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14190 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14191 if __x86_64__ is defined.
14193 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14195 * configure: Regenerate.
14197 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14199 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14200 * target.h (target_ops): New get_tib_address field.
14201 * win32-low.h (win32_thread_info): Add thread_local_base field.
14202 * win32-low.c (child_add_thread): Add tlb argument.
14203 Set thread_local_base field to TLB.
14204 (get_child_debug_event): Adapt to child_add_thread change.
14205 (win32_get_tib_address): New function.
14206 (win32_target_ops): Set get_tib_address field to
14207 win32_get_tib_address.
14208 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14210 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14212 * linux-low.c (linux_mourn): Also remove the process.
14213 * server.c (handle_target_event): Don't remove the process here.
14214 * nto-low.c (nto_mourn): New.
14215 (nto_target_ops): Install it.
14216 * spu-low.c (spu_mourn): New.
14217 (spu_target_ops): Install it.
14218 * win32-low.c (win32_mourn): New.
14219 (win32_target_ops): Install it.
14221 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14223 * server.h (buffer_xml_printf): Remove redundant `;'.
14225 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14227 * regcache.c (set_register_cache): Invalidate regcaches before
14228 changing the register cache layout.
14229 (regcache_invalidate_one): Allow a NULL regcache.
14230 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14231 regcaches before changing the register cache layout or the target
14234 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14236 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14237 variable warning on Linux/x86-64.
14239 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14241 GDBserver disconnected tracing support.
14243 * linux-low.c (linux_remove_process): Delete.
14244 (add_lwp): Don't set last_resume_kind here.
14245 (linux_kill): Use `mourn'.
14246 (linux_detach): Use `thread_db_detach', and `mourn'.
14247 (linux_mourn): New.
14248 (linux_attach_lwp_1): Adjust comment.
14249 (linux_attach): last_resume_kind moved the thread_info; adjust.
14250 (status_pending_p_callback): Adjust.
14251 (linux_wait_for_event_1): Adjust.
14252 (count_events_callback, select_singlestep_lwp_callback)
14253 (select_event_lwp_callback, cancel_breakpoints_callback)
14254 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14255 (proceed_one_lwp): Adjust.
14256 (linux_async): Add debug output.
14257 (linux_thread_stopped): New.
14258 (linux_pause_all): New.
14259 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14261 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14262 (thread_db_free): Delete declaration.
14263 (thread_db_detach, thread_db_mourn): Declare.
14264 * thread-db.c (thread_db_init): Use thread_db_mourn.
14265 (thread_db_free): Delete, split in two.
14266 (disable_thread_event_reporting): New.
14267 (thread_db_detach): New.
14268 (thread_db_mourn): New.
14270 * server.h (struct thread_info) <last_resume_kind>: New field.
14271 <attached>: Add comment.
14272 <gdb_detached>: New field.
14273 (handler_func): Change return type to int.
14274 (handle_serial_event, handle_target_event): Ditto.
14275 (gdb_connected): Declare.
14277 (disconnected_tracing): Declare.
14278 (stop_tracing): Declare.
14280 * server.c (handle_query) <qSupported>: Report support for
14281 disconnected tracing.
14282 (queue_stop_reply_callback): Account for running threads.
14283 (gdb_wants_thread_stopped): New.
14284 (gdb_wants_all_threads_stopped): New.
14285 (gdb_reattached_process): New.
14286 (handle_status): Clear the `gdb_detached' flag of all processes.
14287 In all-stop, stop all threads.
14288 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14289 (process_serial_event): If the remote connection breaks, or if an
14290 exit was forced with "monitor exit", force an event loop exit.
14291 Handle disconnected tracing on detach.
14292 (handle_serial_event): Adjust.
14293 (handle_target_event): If GDB isn't connected, forward events back
14294 to the inferior, unless the last process exited, in which case,
14295 exit gdbserver. Adjust interface.
14297 * remote-utils.c (remote_open): Don't block in accept. Instead
14298 register an event loop source on the listen socket file
14299 descriptor. Refactor bits into ...
14300 (listen_desc): ... this new global.
14301 (gdb_connected): ... this new function.
14302 (enable_async_notification): ... this new function.
14303 (handle_accept_event): ... this new function.
14304 (remote_close): Clear remote_desc.
14306 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14308 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14310 (mourn_inferior): Define.
14311 (target_process_qsupported): Avoid the dangling else problem.
14312 (thread_stopped): Define.
14313 (pause_all): Define.
14314 (target_waitstatus_to_string): Declare.
14315 * target.c (target_waitstatus_to_string): New.
14317 * tracepoint.c (tracing): Make extern.
14318 (disconnected_tracing): New.
14319 (stop_tracing): Make extern. Handle tracing stops due to GDB
14321 (cmd_qtdisconnected): New.
14322 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14323 (handle_tracepoint_general_set): Handle QTDisconnected.
14325 * event-loop.c (event_handler_func): Change return type to int.
14326 (process_event): Bail out if the event handler wants the event
14328 (handle_file_event): Ditto.
14329 (start_event_loop): Bail out if the event handler wants the event
14332 * nto-low.c (nto_target_ops): Adjust.
14333 * spu-low.c (spu_wait): Don't remove the process here.
14334 (spu_target_ops): Adjust.
14335 * win32-low.c (win32_wait): Don't remove the process here.
14336 (win32_target_ops): Adjust.
14338 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14340 * regcache.c (realloc_register_cache): Invalidate inferior's
14341 regcache before recreating it.
14343 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14345 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14347 2010-04-09 Stan Shebs <stan@codesourcery.com>
14348 Pedro Alves <pedro@codesourcery.com>
14350 * server.h (LONGEST): New.
14351 (struct thread_info) <while_stepping>: New field.
14352 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14354 (initialize_tracepoint, handle_tracepoint_general_set)
14355 (handle_tracepoint_query, tracepoint_finished_step)
14356 (tracepoint_was_hit, release_while_stepping_state_list):
14357 (current_traceframe): Declare.
14358 * server.c (handle_general_set): Handle tracepoint packets.
14359 (read_memory): New.
14360 (write_memory): New.
14361 (handle_search_memory_1): Use read_memory.
14362 (handle_query): Report support for conditional tracepoints, trace
14363 state variables, and tracepoint sources. Handle tracepoint
14365 (main): Initialize the tracepoints module.
14366 (process_serial_event): Handle traceframe reads/writes.
14368 * linux-low.c (handle_tracepoints): New.
14369 (linux_wait_1): Call it.
14370 (linux_resume_one_lwp): Handle while-stepping.
14371 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14372 (linux_target_ops): Install them.
14373 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14375 * linux-x86-low.c (x86_supports_tracepoints): New.
14376 (the_low_target). Install it.
14378 * mem-break.h (delete_breakpoint): Declare.
14379 * mem-break.c (delete_breakpoint): Make external.
14381 * target.h (struct target_ops): Add `supports_tracepoints',
14382 `read_pc', and `write_pc' fields.
14383 (target_supports_tracepoints): Define.
14384 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14387 * regcache.h (struct regcache) <registers_owned>: New field.
14388 (init_register_cache, regcache_cpy): Declare.
14389 (regcache_read_pc, regcache_write_pc): Declare.
14390 (register_cache_size): Declare.
14391 (supply_regblock): Declare.
14392 * regcache.c (init_register_cache): New.
14393 (new_register_cache): Use it.
14394 (regcache_cpy): New.
14395 (register_cache_size): New.
14396 (supply_regblock): New.
14397 (regcache_read_pc, regcache_write_pc): New.
14399 * tracepoint.c: New.
14401 * Makefile.in (OBS): Add tracepoint.o.
14402 (tracepoint.o): New rule.
14404 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14406 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14408 (i386-mmx.c): Likewise.
14409 (i386-mmx-linux.o): Likewise.
14410 (i386-mmx-linux.c): Likewise.
14412 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14413 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14414 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14415 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14417 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14418 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14419 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14421 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14423 * Makefile.in (clean): Updated.
14425 (i386-avx.c): Likewise.
14426 (i386-avx-linux.o): Likewise.
14427 (i386-avx-linux.c): Likewise.
14428 (amd64-avx.o): Likewise.
14429 (amd64-avx.c): Likewise.
14430 (amd64-avx-linux.o): Likewise.
14431 (amd64-avx-linux.c): Likewise.
14433 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14434 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14435 (srv_amd64_regobj): Add amd64-avx.o.
14436 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14437 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14438 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14439 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14440 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14441 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14442 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14444 * i387-fp.c: Include "i386-xstate.h".
14446 (i387_cache_to_xsave): Likewise.
14447 (i387_xsave_to_cache): Likewise.
14448 (x86_xcr0): Likewise.
14450 * i387-fp.h (i387_cache_to_xsave): Likewise.
14451 (i387_xsave_to_cache): Likewise.
14452 (x86_xcr0): Likewise.
14454 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14455 * linux-crisv32-low.c (target_regsets): Likewise.
14456 * linux-m68k-low.c (target_regsets): Likewise.
14457 * linux-mips-low.c (target_regsets): Likewise.
14458 * linux-ppc-low.c (target_regsets): Likewise.
14459 * linux-s390-low.c (target_regsets): Likewise.
14460 * linux-sh-low.c (target_regsets): Likewise.
14461 * linux-sparc-low.c (target_regsets): Likewise.
14462 * linux-xtensa-low.c (target_regsets): Likewise.
14464 * linux-low.c: Include <sys/uio.h>.
14465 (regsets_fetch_inferior_registers): Support nt_type.
14466 (regsets_store_inferior_registers): Likewise.
14467 (linux_process_qsupported): New.
14468 (linux_target_ops): Add linux_process_qsupported.
14470 * linux-low.h (regset_info): Add nt_type.
14471 (linux_target_ops): Add process_qsupported.
14473 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14475 (init_registers_i386_avx_linux): New.
14476 (init_registers_amd64_avx_linux): Likewise.
14477 (xmltarget_i386_linux_no_xml): Likewise.
14478 (xmltarget_amd64_linux_no_xml): Likewise.
14479 (PTRACE_GETREGSET): Likewise.
14480 (PTRACE_SETREGSET): Likewise.
14481 (x86_fill_xstateregset): Likewise.
14482 (x86_store_xstateregset): Likewise.
14483 (use_xml): Likewise.
14484 (x86_linux_update_xmltarget): Likewise.
14485 (x86_linux_process_qsupported): Likewise.
14486 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14487 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14488 init_registers_i386_linux here. Call
14489 x86_linux_update_xmltarget.
14490 (the_low_target): Add x86_linux_process_qsupported.
14492 * server.c (handle_query): Call target_process_qsupported.
14494 * target.h (target_ops): Add process_qsupported.
14495 (target_process_qsupported): New.
14497 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14499 * inferiors.c (add_thread): Set last_status kind to
14500 TARGET_WAITKIND_IGNORE.
14501 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14502 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14503 (linux_wait_1): Move `thread' local definition to block that uses
14504 it. Don't NULL initialize `event_child'.
14505 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14506 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14507 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14509 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14511 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14512 an extended waitstatus, or by a watchpoint.
14513 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14514 thread was stepping or has been stopped by a watchpoint.
14516 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14518 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14519 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14520 of another, then delete the previous, and validate all
14522 (validate_inserted_breakpoint): New.
14523 (delete_disabled_breakpoints): New.
14524 (validate_breakpoints): New.
14525 (check_mem_read): Validate breakpoints before trusting their
14526 shadow. Delete disabled breakpoints.
14527 (check_mem_write): Validate breakpoints before trusting they
14528 should be inserted. Delete disabled breakpoints.
14529 * mem-break.h (validate_breakpoints):
14530 * server.c (handle_query): Validate breakpoints when we see a
14533 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14535 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14536 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14537 if we could tell there's a GDB breakpoint at stop_pc.
14538 (need_step_over_p): Don't do a step over if we find a GDB
14539 breakpoint at the resume PC.
14541 * mem-break.c (struct raw_breakpoint): New.
14542 (enum bkpt_type): New type `gdb_breakpoint'.
14543 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14544 fields. New field `raw'.
14545 (find_raw_breakpoint_at): New.
14546 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14547 breakpoint instead.
14548 (set_breakpoint_at): Adjust.
14549 (delete_raw_breakpoint): New.
14550 (release_breakpoint): New.
14551 (delete_breakpoint): Rename to...
14552 (delete_breakpoint_1): ... this. Add proc parameter. Use
14553 release_breakpoint. Return ENOENT.
14554 (delete_breakpoint): Reimplement.
14555 (find_breakpoint_at): Delete.
14556 (find_gdb_breakpoint_at): New.
14557 (delete_breakpoint_at): Delete.
14558 (set_gdb_breakpoint_at): New.
14559 (delete_gdb_breakpoint_at): New.
14560 (gdb_breakpoint_here): New.
14561 (set_reinsert_breakpoint): Use release_breakpoint.
14562 (uninsert_breakpoint): Rename to ...
14563 (uninsert_raw_breakpoint): ... this.
14564 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14565 (reinsert_raw_breakpoint): Change parameter type to
14567 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14569 (check_breakpoints): Adjust. Use release_breakpoint.
14570 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14571 (breakpoint_inserted_here): Ditto.
14572 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14573 Don't trust the breakpoint's shadow if it is not inserted.
14574 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14575 (delete_all_breakpoints): Adjust.
14576 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14577 use delete_breakpoint_1.
14579 * mem-break.h (breakpoints_supported): Delete declaration.
14580 (set_gdb_breakpoint_at): Declare.
14581 (gdb_breakpoint_here): Declare.
14582 (delete_breakpoint_at): Delete.
14583 (delete_gdb_breakpoint_at): Declare.
14585 * server.h (struct raw_breakpoint): Forward declare.
14586 (struct process_info): New field `raw_breakpoints'.
14588 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14591 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14593 * linux-low.c (status_pending_p_callback): Fix comment.
14594 (linux_wait_for_event_1): Move most of the internal breakpoint
14595 handling from here...
14596 (linux_wait_1): ... to here.
14597 (count_events_callback): New.
14598 (select_singlestep_lwp_callback): New.
14599 (select_event_lwp_callback): New.
14600 (cancel_breakpoints_callback): New.
14601 (select_event_lwp): New.
14602 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14603 priority to all LWPs that have had events that should be reported
14604 to the client. Cancel breakpoints when about to reporting the
14605 event to the client, not while stopping lwps. No longer cancel
14606 finished single-steps here.
14607 (cancel_finished_single_step): Delete.
14608 (cancel_finished_single_steps): Delete.
14610 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14612 * mem-break.c (enum bkpt_type): New.
14613 (struct breakpoint): New field `type'.
14614 (set_breakpoint_at): Change return type to struct breakpoint
14615 pointer. Set type to `other_breakpoint' by default.
14616 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14617 in the breakpoint list.
14618 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14619 (reinsert_breakpoint): Rename to ...
14620 (reinsert_raw_breakpoint): ... this.
14621 (reinsert_breakpoints_at): Adjust.
14622 * mem-break.h (struct breakpoint): Declare.
14623 (set_breakpoint_at): Change return type to struct breakpoint
14626 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14628 * server.c (handle_query): Assign, not compare.
14630 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14632 Teach linux gdbserver to step-over-breakpoints.
14634 * linux-low.c (can_hardware_single_step): New.
14635 (supports_breakpoints): New.
14636 (handle_extended_wait): If stopping threads, read the stop pc of
14637 the new cloned LWP.
14639 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14640 low target doesn't support retrieving the PC.
14641 (add_lwp): Set last_resume_kind to resume_continue.
14642 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14643 (linux_attach): Don't clear stop_expected. Set the lwp's
14644 last_resume_kind to resume_stop.
14645 (linux_detach_one_lwp): Don't check for removed breakpoints.
14646 (check_removed_breakpoint): Delete.
14647 (status_pending_p): Rename to ...
14648 (status_pending_p_callback): ... this. Don't check for removed
14649 breakpoints. Don't consider threads that are stopped from GDB's
14651 (linux_wait_for_lwp): Always read the stop_pc here.
14652 (cancel_breakpoint): New.
14653 (step_over_bkpt): New global.
14654 (linux_wait_for_event_1): Implement stepping over breakpoints.
14655 (gdb_wants_lwp_stopped): New.
14656 (gdb_wants_all_stopped): New.
14657 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14658 single-step traps here. Store the thread's last reported target
14660 (send_sigstop): Don't clear stop_expected. Always set it,
14662 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14663 (cancel_finished_single_step): New.
14664 (cancel_finished_single_steps): New.
14665 (wait_for_sigstop): Don't cancel finished single-step traps here.
14666 (linux_resume_one_lwp): Don't check for removed breakpoints.
14667 Don't set `step' on non-hardware step archs.
14668 (linux_set_resume_request): Ignore resume_stop requests if already
14669 stopping or stopped. Set the lwp's last_resume_kind.
14670 (resume_status_pending_p): Don't check for removed breakpoints.
14671 (need_step_over_p): New.
14672 (start_step_over): New.
14673 (finish_step_over): New.
14674 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14675 requests. Clear the thread's last reported target waitstatus.
14676 Don't use the `suspended' flag. Don't consider pending breakpoints.
14677 (linux_resume): Start a step-over if necessary.
14678 (proceed_one_lwp): New.
14679 (proceed_all_lwps): New.
14680 (unstop_all_lwps): New.
14681 * linux-low.h (struct lwp_info): Rewrite comment for the
14682 `suspended' flag. Add the `stop_pc' field. Delete the
14683 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14684 Add `'last_resume_kind' and `need_step_over' fields.
14685 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14686 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14687 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14688 (set_raw_breakpoint_at): New.
14689 (set_breakpoint_at): Rewrite to use it.
14690 (reinsert_breakpoint_handler): Delete.
14691 (set_reinsert_breakpoint): New.
14692 (reinsert_breakpoint_by_bp): Delete.
14693 (delete_reinsert_breakpoints): New.
14694 (uninsert_breakpoint): Rewrite.
14695 (uninsert_breakpoints_at): New.
14696 (reinsert_breakpoint): Rewrite.
14697 (reinsert_breakpoints_at): New.
14698 (check_breakpoints): Rewrite.
14699 (breakpoint_here): New.
14700 (breakpoint_inserted_here): New.
14701 (check_mem_read): Adjust.
14702 * mem-break.h (breakpoints_supported, breakpoint_here)
14703 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14704 (reinsert_breakpoint_by_bp): Delete declaration.
14705 (delete_reinsert_breakpoints): Declare.
14706 (reinsert_breakpoint): Delete declaration.
14707 (reinsert_breakpoints_at): Declare.
14708 (uninsert_breakpoint): Delete declaration.
14709 (uninsert_breakpoints_at): Declare.
14710 (check_breakpoints): Adjust prototype.
14711 * server.h: Adjust include order.
14712 (struct thread_info): Declare here. Add a `last_status' field.
14714 2010-03-23 Michael Snyder <msnyder@vmware.com>
14716 * server.c (crc32): New function.
14717 (handle_query): Add handling for 'qCRC:' request.
14719 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14721 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14722 lwp had been stopped by a watchpoint.
14724 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14726 * server.h (internal_error): Declare.
14727 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14728 * utils.c (internal_error): New function.
14730 2010-03-15 Andreas Schwab <schwab@redhat.com>
14732 * configure.srv: Fix typo setting srv_regobj.
14734 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14736 * linux-low.c (fetch_register): Avoid passing a non string literal
14738 (usr_store_inferior_registers): Ditto.
14740 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14742 * linux-low.c (linux_write_memory): Bail out early if peeking
14745 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14747 * linux-low.h (struct lwp_info): New fields
14748 `stopped_by_watchpoint' and `stopped_data_address'.
14749 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14750 here, and cache them in the lwp object.
14751 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14753 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14755 (linux_stopped_by_watchpoint): Rewrite.
14756 (linux_stopped_data_address): Rewrite.
14758 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14760 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14761 switching the current inferior, not before.
14763 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14765 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14766 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14767 i386-linux.c and amd64-linux.c.
14768 (reg-i386.o): Removed.
14769 (reg-i386.c): Likewise.
14770 (reg-i386-linux.o): Likewise.
14771 (reg-i386-linux.c): Likewise.
14772 (reg-x86-64.o): Likewise.
14773 (reg-x86-64.c): Likewise.
14774 (reg-x86-64-linux.o): Likewise.
14775 (reg-x86-64-linux.c): Likewise.
14777 (i386.c): Likewise.
14778 (i386-linux.o): Likewise.
14779 (i386-linux.c): Likewise.
14780 (amd64.o): Likewise.
14781 (amd64.c): Likewise.
14782 (amd64-linux.o): Likewise.
14783 (amd64-linux.c): Likewise.
14785 * configure.srv (srv_i386_regobj): New.
14786 (srv_i386_linux_regobj): Likewise.
14787 (srv_amd64_regobj): Likewise.
14788 (srv_amd64_linux_regobj): Likewise.
14789 (srv_i386_32bit_xmlfiles): Likewise.
14790 (srv_i386_64bit_xmlfiles): Likewise.
14791 (srv_i386_xmlfiles): Likewise.
14792 (srv_amd64_xmlfiles): Likewise.
14793 (srv_i386_linux_xmlfiles): Likewise.
14794 (srv_amd64_linux_xmlfiles): Likewise.
14795 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14796 srv_xmlfiles to $srv_i386_xmlfiles.
14797 (i[34567]86-*-mingw32ce*): Likewise.
14798 (i[34567]86-*-mingw*): Likewise.
14799 (i[34567]86-*-nto*): Likewise.
14800 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14801 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14802 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14803 (x86_64-*-linux*): Likewise.
14805 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14806 (init_registers_amd64_linux): New.
14807 (x86_arch_setup): Replace init_registers_x86_64_linux with
14808 init_registers_amd64_linux.
14810 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14812 * configure.ac: Check for libdl. If it is not available link against
14813 static libthread_db.
14814 * configure: Regenerate.
14816 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14820 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14821 handing a read watchpoint.
14822 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14824 2010-02-12 Doug Evans <dje@google.com>
14826 * linux-low.c (linux_supports_tracefork_flag): Document.
14827 (linux_look_up_symbols): Add comment.
14829 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14831 * regcache.c (supply_register): Clear regcache if buf is NULL.
14833 2010-02-02 Nicolas Roche <roche@sourceware.org>
14834 Joel Brobecker <brobecker@adacore.com>
14836 * inferiors.c (find_inferior): Add function documentation.
14837 (unloaded_dll): Handle the case where the unloaded dll has not
14838 been previously registered in the dll list.
14840 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14842 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14843 (thumb2_breakpoint): New.
14844 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14846 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14848 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14849 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14852 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14854 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14856 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14858 * linux-s390-low.c (s390_collect_ptrace_register)
14859 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14861 2010-01-21 Doug Evans <dje@google.com>
14863 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14864 (PTRACE_ARG4_TYPE): New macro.
14865 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14866 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14867 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14868 (usr_store_inferior_registers): Ditto.
14869 (linux_read_memory, linux_write_memory): Ditto.
14870 (linux_test_for_tracefork): Ditto.
14872 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14873 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14875 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14877 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14880 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14882 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14883 prototype to take a regcache. Adjust.
14885 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14887 * regcache.h (struct thread_info): Forward declare.
14888 (struct regcache): New.
14889 (new_register_cache): Adjust prototype.
14890 (get_thread_regcache): Declare.
14891 (free_register_cache): Adjust prototype.
14892 (registers_to_string, registers_from_string): Ditto.
14893 (supply_register, supply_register_by_name, collect_register)
14894 (collect_register_as_string, collect_register_by_name): Ditto.
14895 * regcache.c (struct inferior_regcache_data): Delete.
14896 (get_regcache): Rename to ...
14897 (get_thread_regcache): ... this. Adjust. Switch inferior before
14898 fetching registers.
14899 (regcache_invalidate_one): Adjust.
14900 (regcache_invalidate): Fix prototype.
14901 (new_register_cache): Return the new register cache.
14902 (free_register_cache): Change prototype.
14903 (realloc_register_cache): Adjust.
14904 (registers_to_string): Change prototype to take a regcache. Adjust.
14905 (registers_from_string): Ditto.
14906 (register_data): Ditto.
14907 (supply_register): Ditto.
14908 (supply_register_by_name): Ditto.
14909 (collect_register): Ditto.
14910 (collect_register_as_string): Ditto.
14911 (collect_register_by_name): Ditto.
14912 * server.c (process_serial_event): Adjust.
14913 * linux-low.h (regset_fill_func, regset_store_func): Change
14915 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14917 * linux-low.c (get_stop_pc): Adjust.
14918 (check_removed_breakpoint): Adjust.
14919 (linux_wait_for_event): Adjust.
14920 (linux_resume_one_lwp): Adjust.
14921 (fetch_register): Add regcache parameter. Adjust.
14922 (usr_store_inferior_registers): Ditto.
14923 (regsets_fetch_inferior_registers): Ditto.
14924 (regsets_store_inferior_registers): Ditto.
14925 (linux_fetch_registers, linux_store_registers): Ditto.
14926 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14928 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14930 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14931 prototype to take a regcache.
14932 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14933 * remote-utils.c (convert_ascii_to_int, outreg)
14934 (prepare_resume_reply): Change prototype to take a regcache.
14936 * target.h (struct target_ops) <fetch_registers, store_registers>:
14937 Change prototype to take a regcache.
14938 (fetch_inferior_registers, store_inferior_registers): Change
14939 prototype to take a regcache. Adjust.
14940 * proc-service.c (ps_lgetregs): Adjust.
14941 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14942 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14943 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14944 take a regcache. Adjust.
14945 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14946 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14947 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14948 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14949 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14950 (cris_cannot_fetch_register):
14951 (cris_breakpoint_at): Change prototype to take a regcache.
14953 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14954 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14955 to take a regcache. Adjust.
14956 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14958 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14959 take a regcache. Adjust.
14960 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14961 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14962 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14963 * linux-mips-low.c (mips_get_pc):
14964 (mips_set_pc): Change prototype to take a regcache. Adjust.
14965 (mips_reinsert_addr): Adjust.
14966 (mips_collect_register): Change prototype to take a regcache.
14968 (mips_supply_register):
14969 (mips_collect_register_32bit, mips_supply_register_32bit)
14970 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14971 (mips_store_fpregset): Ditto.
14972 * linux-ppc-low.c (ppc_supply_ptrace_register)
14973 (ppc_supply_ptrace_register): Ditto.
14974 (parse_spufs_run): Adjust.
14975 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14976 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14977 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14978 take a regcache. Adjust.
14979 * linux-s390-low.c (s390_collect_ptrace_register)
14980 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14981 (s390_set_pc): Change prototype to take a regcache. Adjust.
14982 (s390_arch_setup): Adjust.
14983 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14984 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14985 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14986 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14987 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14989 (sparc_breakpoint_at): Adjust.
14990 * linux-xtensa-low.c (xtensa_fill_gregset):
14991 (xtensa_store_gregset):
14992 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14993 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14994 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14995 prototype to take a regcache. Adjust.
14996 * win32-arm-low.c (arm_fetch_inferior_register)
14997 (arm_store_inferior_register): Change prototype to take a
14999 * win32-i386-low.c (i386_fetch_inferior_register)
15000 (i386_store_inferior_register): Change prototype to take a
15002 * win32-low.c (child_fetch_inferior_registers)
15003 (child_store_inferior_registers): Change prototype to take a
15005 (win32_wait): Adjust.
15006 (win32_fetch_inferior_registers): Change prototype to take a
15008 (win32_store_inferior_registers): Adjust.
15009 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15010 store_inferior_register>: Change prototype to take a regcache.
15012 2010-01-20 Doug Evans <dje@google.com>
15014 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15016 (linux_wait_for_event1, linux_init_signals): Ditto.
15017 (W_STOPCODE): Provide definition if missing.
15019 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15021 * linux-low.c (linux_core_of_thread): New.
15022 (compare_ints, show_process, list_threads): New.
15023 (linux_qxfer_osdata): Report threads and cores.
15024 (linux_target_op): Register linux_core_of_thread.
15025 * remote-utils.c (prepare_resume_reply): Report the core.
15026 (buffer_xml_printf): Support %d specifier.
15027 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15029 (handle_query): Handle qXfer:threads. Announce availability
15031 * target.h (struct target_ops): New field core_of_thread.
15033 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15035 * Makefile.in (clean): Remove new generated files.
15036 (reg-s390.o, reg-s390.c): Remove rules.
15037 (reg-s390x.o, reg-s390x.c): Likewise.
15038 (s390-linux32.o, s390-linux32.c): Add rules.
15039 (s390-linux64.o, s390-linux64.c): Likewise.
15040 (s390x-linux64.o, s390x-linux64.c): Likewise.
15041 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15042 * linux-s390-low.c: Include <elf.h>.
15043 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15044 (init_registers_s390): Remove prototype.
15045 (init_registers_s390x): Likewise.
15046 (init_registers_s390_linux32): Add prototype.
15047 (init_registers_s390_linux64): Likewise.
15048 (init_registers_s390x_linux64): Likewise.
15049 (s390_num_regs_3264): New define.
15050 (s390_regmap_3264): New global variable.
15051 (s390_cannot_fetch_register): Remove obsolete check.
15052 (s390_cannot_store_register): Likewise.
15053 (s390_collect_ptrace_register): Handle upper/lower register halves.
15054 (s390_supply_ptrace_register): Likewise.
15055 (s390_fill_gregset): Update to register number changes.
15056 (s390_get_hwcap): New routine.
15057 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15058 Install appropriate regmap and register set.
15060 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15062 * server.c (gdbserver_version): Update copyright year to 2010.
15063 * gdbreplay.c (gdbreplay_version): Likewise.
15065 2009-12-28 Doug Evans <dje@google.com>
15067 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15068 elf/external.h. Include <elf.h> instead but only if necessary.
15070 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15072 * linux-low.c (linux_remove_process): Remove `detaching'
15073 parameter. Don't release/detach from thread_db here.
15074 (linux_kill): Release/detach from thread_db here, ...
15075 (linux_detach): ... and here, before actually detaching.
15076 (linux_wait_1): ... and here, when a process exits.
15077 * thread-db.c (any_thread_of): New.
15078 (thread_db_free): Switch the current inferior to a thread of the
15081 2009-12-21 Doug Evans <dje@google.com>
15083 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15085 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15086 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15087 warning ifndef __NR_tkill. Move setting of errno there too.
15088 Delete unnecessary resetting of errno after syscall.
15089 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15091 * configure.ac: Check for dladdr.
15092 * config.in: Regenerate.
15093 * configure: Regenerate.
15094 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15095 (try_thread_db_load): Update.
15097 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15099 2009-12-18 Doug Evans <dje@google.com>
15101 * event-loop.c: Include unistd.h if it exists.
15103 * linux-low.c (my_waitpid): Move definition away from being in
15104 between linux_tracefork_child/linux_test_for_tracefork.
15106 * gdb_proc_service.h (psaddr_t): Fix type.
15107 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15108 signature to match glibc.
15110 2009-12-16 Doug Evans <dje@google.com>
15112 * linux-low.c (linux_read_memory): Fix argument to read.
15114 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15116 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15117 events, don't leave current_inferior pointing at null.
15119 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15121 * win32-low.c (LOG): Delete.
15122 (OUTMSG): Output to stderr.
15123 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15124 on compile time LOG macro.
15125 (win32_wait): Fix debug output.
15127 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15129 * win32-low.c (win32_add_one_solib): If the dll name is
15130 "ntdll.dll", prepend the system directory to the dll path.
15132 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15134 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15136 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15137 Vladimir Prus <vladimir@codesourcery.com>
15139 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15140 * configure.ac: Check for __mcoldfire__ and set
15141 gdb_cv_m68k_is_coldfire.
15142 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15143 reg-cf.o and reg-m68k.o.
15144 * configure: Regenerated.
15146 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15148 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15149 Pass it to thread_db_free.
15150 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15151 proper `detaching' argument to linux_remove_process.
15152 * linux-low.h (thread_db_free): Add `detaching' parameter.
15153 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15155 (thread_db_free): Add `detaching' parameter. Only
15156 call td_ta_clear_event if detaching from process.
15158 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15160 * thread-db.c (thread_db_free): Fix typo.
15162 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15165 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15167 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15169 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15170 with an i686 compiler.
15171 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15173 * configure: Rebuilt.
15175 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15179 * server.c (handle_search_memory_1): Correct read_addr initialization
15180 in loop for searching subsequent chunks.
15182 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15184 * configure.ac: New --with-libthread-db option.
15185 * thread-db.c: Allow direct dependence on libthread_db.
15186 (thread_db_free): Adjust.
15187 * config.in: Regenerate.
15188 * configure: Likewise.
15190 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15193 * thread-db.c (attach_thread): New function.
15194 (maybe_attach_thread): Return success/failure.
15195 (find_new_threads_callback): Adjust.
15196 (thread_db_find_new_threads): Loop until no new threads.
15198 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15200 * proc-service.c (ps_lgetregs): Formatting.
15202 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15204 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15205 * configure.ac: Adjust.
15206 * linux-low.h (struct process_info_private): Move members to struct
15208 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15209 * linux-low.c (linux_remove_process): Adjust.
15210 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15211 * server.c (handle_query): Move code ...
15212 (handle_monitor_command): ... here. New function.
15213 * target.h (struct target_ops): New member.
15214 * thread-db.c (struct thread_db): New.
15215 (libthread_db_search_path): New variable.
15216 (thread_db_create_event, thread_db_enable_reporting)
15217 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15218 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15219 (try_thread_db_load_1, dladdr_to_soname): New functions.
15220 (try_thread_db_load, thread_db_load_search): New functions.
15221 (thread_db_init): Search for libthread_db.
15222 (thread_db_free): New function.
15223 (thread_db_handle_monitor_command): Likewise.
15224 * config.in: Regenerate.
15225 * configure: Regenerate.
15227 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15229 * spu-low.c (spu_kill): Wait for inferior to terminate.
15230 Call clear_inferiors.
15231 (spu_detach): Call clear_inferiors.
15233 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15235 * aclocal.m4: Regenerate.
15236 * config.in: Likewise.
15237 * configure: Likewise.
15239 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15241 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15242 (parse_spufs_run): New function.
15243 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15244 (ppc_breakpoint_at): Handle SPU breakpoints.
15246 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15248 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15249 (SPUFS_MAGIC): Define.
15250 (spu_enumerate_spu_ids): New function.
15251 (linux_qxfer_spu): New function.
15252 (linux_target_ops): Install linux_qxfer_spu.
15254 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15256 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15257 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15258 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15259 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15260 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15261 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15262 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15263 (init_registers_powerpc_cell32l): Add prototype.
15264 (init_registers_powerpc_cell64l): Likewise.
15265 (ppc_arch_setup): Detect Cell/B.E. architecture.
15267 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15269 * Makefile.in (datarootdir): New variable.
15271 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15273 * linux-low.c (linux_write_memory): Update debugging output.
15274 * Makefile.in (clean): Add new descriptions.
15275 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15276 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15277 * configure.srv: Add new files for arm*-*-linux*.
15278 * linux-arm-low.c: Add new declarations.
15279 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15280 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15281 (HWCAP_VFPv3D16): New.
15282 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15283 instead of __IWMMXT__.
15284 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15285 (arm_arch_setup): New.
15286 (target_regsets): Remove #ifdef. Add VFP regset.
15287 (the_low_target): Use arm_arch_setup.
15289 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15291 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15292 the main thread again.
15294 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15296 Adding Neutrino gdbserver.
15297 * configure: Regenerated.
15298 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15299 * configure.srv (i[34567]86-*-nto*): New target.
15300 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15301 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15302 (nto_comctrl) [__QNX__]: New function.
15303 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15305 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15307 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15310 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15311 Pedro Alves <pedro@codesourcery.com>
15313 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15314 don't support CONTEXT_EXTENDED_REGISTERS.
15315 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15316 (the_low_target): Install them.
15317 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15318 failing with ERROR_PIPE_NOT_CONNECTED.
15320 2009-06-30 Doug Evans <dje@google.com>
15321 Pierre Muller <muller@ics.u-strasbg.fr>
15323 Add h/w watchpoint support to x86-linux, win32-i386.
15324 * Makefile.in (SFILES): Add i386-low.c
15325 (i386_low_h): Define.
15326 (i386-low.o): Add dependencies.
15327 (linux-x86-low.o): Add i386-low.h dependency.
15328 (win32-i386-low.o): Ditto.
15329 * i386-low.c: New file.
15330 * i386-low.h: New file.
15331 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15332 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15333 * linux-low.c (linux_add_process): Initialize arch_private.
15334 (linux_remove_process): Free arch_private.
15335 (add_lwp): Initialize arch_private.
15336 (delete_lwp): Free arch_private.
15337 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15339 * linux-low.h (process_info_private): New member arch_private.
15340 (lwp_info): New member arch_private.
15341 (linux_target_ops): New members new_process, new_thread,
15343 (ptid_of): New macro.
15344 * linux-x86-low.c: Include stddef.h, i386-low.h.
15345 (arch_process_info): New struct.
15346 (arch_lwp_info): New struct.
15347 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15348 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15349 (i386_dr_low_get_status): New function.
15350 (x86_insert_point, x86_remove_point): New functions.
15351 (x86_stopped_by_watchpoint): New function.
15352 (x86_stopped_data_address): New function.
15353 (x86_linux_new_process, x86_linux_new_thread): New functions.
15354 (x86_linux_prepare_to_resume): New function.
15355 (the_low_target): Add entries for insert_point, remove_point,
15356 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15358 * server.c (debug_hw_points): New global.
15359 (monitor_show_help): Document set debug-hw-points.
15360 (handle_query): Process "set debug-hw-points".
15361 * server.h (debug_hw_points): Declare.
15362 (paddress): Declare.
15363 * utils.c (NUMCELLS, CELLSIZE): New macros.
15364 (get_sell, xsnprintf, paddress): New functions.
15365 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15366 remove_point, stopped_by_watchpoint, stopped_data_address.
15367 * win32-i386-low.c: Include i386-low.h.
15368 (debug_reg_state): Replaces dr.
15369 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15370 (i386_dr_low_get_status): New function.
15371 (i386_insert_point, i386_remove_point): New functions.
15372 (i386_stopped_by_watchpoint): New function.
15373 (i386_stopped_data_address): New function.
15374 (i386_initial_stuff): Update.
15375 (get_thread_context,set_thread_context,i386_thread_added): Update.
15376 (the_low_target): Add entries for insert_point,
15377 remove_point, stopped_by_watchpoint, stopped_data_address.
15378 * win32-low.c (win32_insert_watchpoint): New function.
15379 (win32_remove_watchpoint): New function.
15380 (win32_stopped_by_watchpoint): New function.
15381 (win32_stopped_data_address): New function.
15382 (win32_target_ops): Add entries for insert_watchpoint,
15383 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15384 * win32-low.h (win32_target_ops): New members insert_point,
15385 remove_point, stopped_by_watchpoint, stopped_data_address.
15387 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15389 * server.c (process_serial_event): Re-return unsupported, not
15390 error, if the type isn't recognized. Re-allow supporting only
15391 insert or remove packets. Also call require_running for
15392 breakpoints. Add missing break statement to default case. Tidy.
15393 * target.h (struct target_ops): Rename insert_watchpoint to
15394 insert_point, and remove_watchpoint to remove_point.
15396 * linux-low.h (struct linux_target_ops): Likewise.
15397 * linux-low.c (linux_insert_watchpoint): Rename to ...
15398 (linux_insert_point): ... this. Adjust.
15399 (linux_remove_watchpoint): Rename to ...
15400 (linux_remove_point): ... this. Adjust.
15401 (linux_target_ops): Adjust.
15402 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15403 (cris_insert_point): ... this.
15404 (cris_remove_watchpoint): Rename to ...
15405 (cris_remove_point): ... this.
15406 (the_low_target): Adjust.
15408 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15410 * server.c (handle_v_kill): Pass signal_pid to
15411 kill_inferior if multi_process is zero.
15413 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15415 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15416 * target.h (target_ops): Comment for *_watchpoint to make it clear
15417 the functions can get types '0' and '1'.
15419 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15421 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15422 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15423 * regcache.c (get_regcache): Likewise.
15424 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15425 * win32-low.c (child_fetch_inferior_registers): Remove check for
15428 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15429 Pedro Alves <pedro@codesourcery.com>
15431 * target.h (struct target_ops) <supports_multi_process>: New
15433 (target_supports_multi_process): New.
15434 * server.c (handle_query): Even if GDB reports support, only
15435 enable multi-process if the target also supports it. Report
15436 multi-process support only if the target backend supports it.
15437 * linux-low.c (linux_supports_multi_process): New function.
15438 (linux_target_ops): Install it as target_supports_multi_process
15441 2009-05-24 Doug Evans <dje@google.com>
15443 Global renaming of find_thread_pid to find_thread_ptid.
15444 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15445 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15446 All callers updated.
15448 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15449 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15452 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15453 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15454 (linux_resume_one_lwp): Ditto.
15456 2009-05-23 Doug Evans <dje@google.com>
15458 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15459 from struct inferior_list_entry * to struct lwp_info *.
15460 All callers updated.
15462 2009-05-13 Doug Evans <dje@google.com>
15464 * linux-x86-low.c: Don't include assert.h.
15465 (x86_siginfo_fixup): Use fatal, not assert.
15466 (x86_arch_setup): Fix comment.
15468 2009-05-12 Doug Evans <dje@google.com>
15470 Biarch support for i386/amd64 gdbserver.
15471 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15472 Add linux-x86-low.c.
15473 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15474 (linux-x86-low.o): Add.
15475 * linux-x86-64-low.c: Delete.
15476 * linux-i386-low.c: Delete.
15477 * linux-x86-low.c: New file.
15478 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15480 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15482 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15483 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15484 (linux_child_pid_to_exec_file): New function.
15485 (elf_64_header_p, elf_64_file_p): New functions.
15486 (siginfo_fixup): New function.
15487 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15488 give target a chance to convert layout.
15489 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15490 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15492 2009-05-07 Doug Evans <dje@google.com>
15494 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15495 (regsets_store_inferior_registers): Ditto.
15497 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15501 * linux-low.c (must_set_ptrace_flags): Delete.
15502 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15504 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15505 `lwp->must_set_ptrace_flags' instead.
15506 (linux_wait_for_event_1): Set ptrace options here.
15507 (linux_wait_1): ... not here.
15509 2009-04-30 Doug Evans <dje@google.com>
15511 * inferiors.c (started_inferior_callback): New function.
15512 (attached_inferior_callback): New function.
15513 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15514 * server.c (print_started_pid, print_attached_pid): New functions.
15515 (detach_or_kill_for_exit): New function.
15516 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15517 * server.h (have_started_inferiors_p): Declare.
15518 (have_attached_inferiors_p): Declare.
15520 * inferiors.c (remove_process): Fix memory leak, free process.
15521 * linux-low.c (linux_remove_process): New function.
15522 (linux_kill): Call it instead of remove_process.
15523 (linux_detach, linux_wait_1): Ditto.
15525 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15527 * configure.srv: Add x86 Windows CE target.
15529 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15531 * inferiors.c (get_thread_process): Make global.
15532 * server.h (get_thread_process): Add prototype.
15533 * thread-db.c (find_one_thread): Use get_thread_process
15534 instead of current_process.
15535 (thread_db_get_tls_address): Do not crash if called when
15536 thread layer is not yet initialized.
15538 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15540 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15541 * spu-low.c (current_tid): Rename to ...
15542 (current_ptid): ... this.
15543 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15544 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15545 ptid_get_lwp (current_ptid) instead of current_tid.
15546 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15547 instead of current_tid. Use find_process_pid to verify pid
15548 argument is valid. Pass proper argument to remove_process.
15549 (spu_thread_alive): Compare current_ptid instead of current_tid.
15550 (spu_resume): Likewise.
15552 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15554 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15557 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15559 Implement the multiprocess extensions, and add linux multiprocess
15562 * server.h (ULONGEST): Declare.
15563 (struct ptid, ptid_t): New.
15564 (minus_one_ptid, null_ptid): Declare.
15565 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15566 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15567 (struct inferior_list_entry): Change `id' type from unsigned from
15569 (struct sym_cache, struct breakpoint, struct
15570 process_info_private): Forward declare.
15571 (struct process_info): Declare.
15572 (current_process): Declare.
15573 (all_processes): Declare.
15574 (initialize_inferiors): Declare.
15575 (add_thread): Adjust to use ptid_t.
15576 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15577 (add_process, remove_process, find_thread_pid): Declare.
15578 (find_inferior_id): Adjust to use ptid_t.
15579 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15580 (multi_process): Declare.
15581 (push_event): Adjust to use ptid_t.
15582 (read_ptid, write_ptid): Declare.
15583 (prepare_resume_reply): Adjust to use ptid_t.
15584 (clear_symbol_cache): Declare.
15585 * inferiors.c (all_processes): New.
15586 (null_ptid, minus_one_ptid): New.
15587 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15588 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15589 (add_thread): Change unsigned long to ptid. Remove gdb_id
15591 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15592 (gdb_id_to_thread): Rename to ...
15593 (find_thread_pid): ... this. Change unsigned long to ptid.
15594 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15595 (loaded_dll, pull_pid_from_list): Adjust.
15596 (add_process, remove_process, find_process_pid)
15597 (get_thread_process, current_process, initialize_inferiors): New.
15598 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15599 (struct target_waitstatus) <related_pid>: Ditto.
15600 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15601 return type to int.
15602 (struct target_ops) <join>: Add `pid' argument.
15603 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15604 (struct target_ops) <wait>: Add `ptid' field. Change return type
15606 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15607 (mywait): Add `ptid' argument. Change return type to ptid_t.
15608 (target_pid_to_str): Declare.
15609 * target.c (set_desired_inferior): Adjust to use ptids.
15610 (mywait): Add new `ptid' argument. Adjust.
15611 (target_pid_to_str): New.
15612 * mem-break.h (free_all_breakpoints): Declare.
15613 * mem-break.c (breakpoints): Delelete.
15614 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15615 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15616 to use per-process breakpoint list.
15617 (free_all_breakpoints): New.
15618 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15619 (symbol_cache, all_symbols_looked_up): Delete.
15621 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15623 (prepare_resume_reply): Change ptid argument's type from unsigned
15624 long to ptid_t. Adjust. Implement W;process and X;process.
15625 (free_sym_cache, clear_symbol_cache): New.
15626 (look_up_one_symbol): Adjust to per-process symbol cache. *
15627 * server.c (cont_thread, general_thread, step_thread): Change type
15629 (attached): Delete.
15630 (multi_process): New.
15631 (last_ptid): Change type to ptid_t.
15632 (struct vstop_notif) <ptid>: Change type to ptid_t.
15633 (queue_stop_reply, push_event): Change `ptid' argument's type to
15635 (discard_queued_stop_replies): Add `pid' argument.
15636 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15637 changes. Don't reference the `attached' global.
15638 (attach_inferior): Adjust to mywait interface changes.
15639 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15640 features. Handle and report "multiprocess+". Handle
15642 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15644 (handle_v_kill): New.
15645 (handle_v_stopped): Adjust to use target_pid_to_str.
15646 (handle_v_requests): Allow multiple attaches and runs when
15647 multiprocess extensions are in effect. Handle "vKill".
15648 (myresume): Adjust to use ptids.
15649 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15650 (handle_status): Adjust to discard_queued_stop_replies interface
15652 (first_thread_of, kill_inferior_callback)
15653 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15654 (main): Call initialize_inferiors. Adjust to use ptids, killing
15655 and detaching from all inferiors. Handle multiprocess packet
15657 * linux-low.h: Include gdb_proc_service.h.
15658 (struct process_info_private): New.
15659 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15660 <lwpid_of>: Use ptid_get_lwp.
15661 (get_lwp_thread): Adjust.
15662 (struct lwp_info): Add `dead' member.
15663 (find_lwp_pid): Declare.
15664 * linux-low.c (thread_db_active): Delete.
15665 (new_inferior): Adjust comment.
15666 (inferior_pid): Delete.
15667 (linux_add_process): New.
15668 (handle_extended_wait): Adjust.
15669 (add_lwp): Change unsigned long to ptid.
15670 (linux_create_inferior): Add process to processes table. Adjust
15671 to use ptids. Don't set new_inferior here.
15672 (linux_attach_lwp): Rename to ...
15673 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15674 it. Adjust to use ptids.
15675 (linux_attach_lwp): New.
15676 (linux_attach): Add process to processes table. Don't set
15678 (struct counter): New.
15679 (second_thread_of_pid_p, last_thread_of_process_p): New.
15680 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15681 multiple processes.
15682 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15683 processes. Remove process from process table.
15684 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15685 to multiple processes.
15686 (any_thread_of): New.
15687 (linux_detach): Add `pid' argument, and handle it. Remove process
15688 from processes table.
15689 (linux_join): Add `pid' argument. Handle it.
15690 (linux_thread_alive): Change unsighed long argument to ptid_t.
15691 Consider dead lwps as not being alive.
15692 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15693 threads we're not interested in.
15694 (same_lwp, find_lwp_pid): New.
15695 (linux_wait_for_lwp): Change `pid' argument's type from int to
15697 (linux_wait_for_event): Rename to ...
15698 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15699 from int to ptid_t. Adjust.
15700 (linux_wait_for_event): New.
15701 (linux_wait_1): Add `ptid' argument. Change return type to
15702 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15703 that exit from the process table.
15704 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15706 (mark_lwp_dead): New.
15707 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15708 stopping all threads, mark its main lwp as dead.
15709 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15711 (fetch_register, usr_store_inferior_registers)
15712 (regsets_fetch_inferior_registers)
15713 (regsets_store_inferior_registers, linux_read_memory)
15714 (linux_write_memory): Inline `inferior_pid'.
15715 (linux_look_up_symbols): Adjust to use per-process
15716 `thread_db_active'.
15717 (linux_request_interrupt): Adjust to use ptids.
15718 (linux_read_auxv): Inline `inferior_pid'.
15719 (initialize_low): Don't reference thread_db_active.
15720 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15721 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15722 (ps_getpid): Return the pid of the current inferior.
15723 * thread-db.c (proc_handle, thread_agent): Delete.
15724 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15726 (find_one_thread): Change argument type to ptid_t. Adjust to
15728 (maybe_attach_thread): Adjust to per-process data and ptids.
15729 (thread_db_find_new_threads): Ditto.
15730 (thread_db_init): Ditto.
15731 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15732 processes table. Adjust to use ptids.
15733 (spu_kill, spu_detach): Adjust interface. Remove process from
15735 (spu_join, spu_thread_alive): Adjust interface.
15736 (spu_wait): Adjust interface. Remove process from processes
15737 table. Adjust to use ptids.
15738 * win32-low.c (current_inferior_tid): Delete.
15739 (current_inferior_ptid): New.
15740 (debug_event_ptid): New.
15741 (thread_rec): Take a ptid. Adjust.
15742 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15743 (child_delete_thread): Ditto.
15744 (do_initial_child_stuff): Add `attached' argument. Add process to
15746 (child_fetch_inferior_registers, child_store_inferior_registers):
15748 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15749 (win32_attach): Pass 1 to do_initial_child_stuff.
15750 (win32_kill): Adjust interface. Remove process from processes
15752 (win32_detach): Ditto.
15753 (win32_join): Adjust interface.
15754 (win32_thread_alive): Take a ptid.
15755 (win32_resume): Adjust to use ptids.
15756 (get_child_debug_event): Ditto.
15757 (win32_wait): Adjust interface. Remove exiting process from
15760 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15762 Non-stop mode support.
15764 * server.h (non_stop): Declare.
15765 (gdb_client_data, handler_func): Declare.
15766 (delete_file_handler, add_file_handler, start_event_loop):
15768 (handle_serial_event, handle_target_event, push_event)
15769 (putpkt_notif): Declare.
15770 * target.h (enum resume_kind): New.
15771 (struct thread_resume): Replace `step' field by `kind' field.
15772 (TARGET_WNOHANG): Define.
15773 (struct target_ops) <wait>: Add `options' argument.
15774 <supports_non_stop, async, start_non_stop>: New fields.
15775 (target_supports_non_stop, target_async): New.
15776 (start_non_stop): Declare.
15777 (mywait): Add `options' argument.
15778 * target.c (mywait): Add `options' argument. Print child exit
15779 notifications here.
15780 (start_non_stop): New.
15781 * server.c (non_stop, own_buf, mem_buf): New globals.
15782 (struct vstop_notif): New.
15783 (notif_queue): New global.
15784 (queue_stop_reply, push_event, discard_queued_stop_replies)
15785 (send_next_stop_reply): New.
15786 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15788 (attach_inferior): In non-stop mode, don't wait for the target
15790 (handle_general_set): Handle QNonStop.
15791 (handle_query): When handling qC, return the current general
15792 thread, instead of the first thread of the list.
15793 (handle_query): If the backend supports non-stop mode, include
15794 QNonStop+ in the qSupported query response.
15795 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15797 (handle_v_attach, handle_v_run): Handle non-stop mode.
15798 (handle_v_stopped): New.
15799 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15800 (myresume): Adjust to use resume_kind. Handle non-stop.
15801 (queue_stop_reply_callback): New.
15802 (handle_status): Handle non-stop mode.
15803 (main): Clear non_stop flag on reconnection. Use the event-loop.
15804 Refactor serial protocol handling from here ...
15805 (process_serial_event): ... to this new function. When GDB
15806 selects any thread, select one here. In non-stop mode, wait until
15807 GDB acks all pending events before exiting.
15808 (handle_serial_event, handle_target_event): New.
15809 * remote-utils.c (remote_open): Install remote_desc in the event
15811 (remote_close): Remove remote_desc from the event loop.
15812 (putpkt_binary): Rename to...
15813 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15814 (putpkt_binary): New as wrapper around putpkt_binary_1.
15815 (putpkt_notif): New.
15816 (prepare_resume_reply): In non-stop mode, don't change the
15818 * event-loop.c: New.
15819 * Makefile.in (OBJ): Add event-loop.o.
15820 (event-loop.o): New rule.
15822 * linux-low.h (pid_of): Moved here.
15824 (get_lwp_thread): Use lwpid_of.
15825 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15826 * linux-low.c (pid_of): Delete.
15827 (inferior_pid): Use lwpid_of.
15828 (linux_event_pipe): New.
15829 (target_is_async_p): New.
15831 (handle_extended_wait): Use lwpid_of.
15832 (add_lwp): Don't set lwpid field.
15833 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15834 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15835 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15836 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15837 first. Adjust to linux_wait_for_event interface changes. Use
15839 (linux_detach): Don't delete the main lwp here.
15840 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15841 (status_pending_p): Don't consider explicitly suspended lwps.
15842 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15843 pointer. Add OPTIONS argument. Change return type to int. Use
15844 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15845 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15846 pointer. Add status pointer argument. Return a pid instead of a
15847 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15848 changes. In non-stop mode, don't switch to a random thread.
15849 (linux_wait): Rename to...
15850 (linux_wait_1): ... this. Add target_options argument, and handle
15851 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15852 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15853 clean exit and signal exit code. Don't stop all threads in
15854 non-stop mode. In all-stop mode, only stop all threads when
15855 reporting a stop to GDB. Handle explicit thread stop requests.
15856 (async_file_flush, async_file_mark): New.
15858 (send_sigstop): Use lwpid_of.
15859 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15860 interface changes. In non-stop mode, don't switch to a random
15862 (linux_resume_one_lwp): Use lwpid_of.
15863 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15864 (linux_resume_one_thread): ... this. Handle resume_stop. In
15865 non-stop mode, don't look for pending flag in all threads.
15866 (resume_status_pending_p): Don't consider explicitly suspended
15868 (my_waitpid): Reimplement. Emulate __WALL.
15869 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15871 (sigchld_handler, linux_supports_non_stop, linux_async)
15872 (linux_start_non_stop): New.
15873 (linux_target_ops): Register linux_supports_non_stop, linux_async
15874 and linux_start_non_stop.
15875 (initialize_low): Install SIGCHLD handler.
15876 * thread-db.c (thread_db_create_event, find_one_thread)
15877 (thread_db_get_tls_address): Use lwpid_of.
15878 * win32-low.c (win32_detach): Adjust to use resume_kind.
15879 (win32_wait): Add `options' argument.
15880 * spu-low.c (spu_resume): Adjust to use resume_kind.
15881 (spu_wait): Add `options' argument.
15883 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15885 Decouple target code from remote protocol.
15887 * target.h (enum target_waitkind): New.
15888 (struct target_waitstatus): New.
15889 (struct target_ops) <wait>: Return an unsigned long. Take a
15890 target_waitstatus pointer instead of a char pointer.
15891 (mywait): Likewise.
15892 * target.c (mywait): Change prototype to return an unsigned long.
15893 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15894 * server.h (thread_from_wait, old_thread_from_wait): Delete
15896 (prepare_resume_reply): Change prototype to take a
15898 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15899 (last_status, last_ptid): New.
15900 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15901 pid instead of a signal.
15902 (attach_inferior): Remove "status" and "signal" parameters.
15904 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15906 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15907 (handle_v_requests, myresume): Remove "status" and "signal"
15908 parameters. Adjust.
15909 (handle_status): New.
15910 (main): Delete local `status'. Adjust.
15911 * remote-utils.c: Include target.h.
15912 (prepare_resume_reply): Change prototype to take a
15913 target_waitstatus. Adjust.
15915 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15917 * spu-low.c (spu_wait): Adjust.
15918 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15920 (win32_wait): Adjust.
15922 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15924 * target.h (struct thread_resume): Delete leave_stopped member.
15925 (struct target_ops): Add a `n' argument to the `resume' callback.
15926 * server.c (start_inferior): Adjust.
15927 (handle_v_cont, myresume): Adjust.
15928 * linux-low.c (check_removed_breakpoint): Adjust to resume
15929 interface change, and to removed leave_stopped field.
15930 (resume_ptr): Delete.
15931 (struct thread_resume_array): New.
15932 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15933 resume interface change.
15934 (linux_continue_one_thread, linux_queue_one_thread)
15935 (resume_status_pending_p): Check if the resume field is NULL
15936 instead of checking the leave_stopped member.
15937 (linux_resume): Adjust to the target resume interface change.
15938 * spu-low.c (spu_resume): Adjust to the target resume interface
15940 * win32-low.c (win32_detach, win32_resume): Ditto.
15942 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15944 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15946 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15948 (linux_continue_one_thread): Only preserve the stepping flag if
15949 there's a pending breakpoint.
15951 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15953 * server.c (main): After the inferior having exited, call
15954 remote_close before exiting gdbserver.
15956 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15958 Fix size of FPSCR in Power 7 processors.
15959 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15960 (PPC_FEATURE_HAS_DFP): New #define.
15961 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15964 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15966 * server.c (handle_query) Whitespace and formatting.
15968 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15970 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15971 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15972 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15973 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15974 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15975 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15976 Makefile.in, configure.ac: Fix whitespace throughout.
15977 * configure: Regenerate.
15979 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15981 * inferiors.c (find_inferior): Make it safe for the callback
15982 function to delete the currently iterated inferior.
15984 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15986 * Makefile.in (linuw_low_h): Move higher.
15987 (thread-db.o): Depend on $(linux_low_h).
15989 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15991 Rename "process" to "lwp" throughout.
15993 * linux-low.c (all_processes): Rename to...
15994 (all_lwps): ... this.
15995 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15996 (add_process): Rename to ...
15997 (add_lwp): ... this. Adjust.
15998 (linux_create_inferior): Adjust.
15999 (linux_attach_lwp): Adjust.
16000 (linux_attach): Adjust.
16001 (linux_kill_one_process): Rename to ...
16002 (linux_kill_one_lwp): ... this. Adjust.
16003 (linux_kill): Adjust.
16004 (linux_detach_one_process): Rename to ...
16005 (linux_detach_one_lwp): ... this. Adjust.
16006 (linux_detach): Adjust.
16007 (check_removed_breakpoint): Adjust.
16008 (status_pending_p): Adjust.
16009 (linux_wait_for_process): Rename to ...
16010 (linux_wait_for_lwp): ... this. Adjust.
16011 (linux_wait_for_event): Adjust.
16012 (send_sigstop): Adjust.
16013 (wait_for_sigstop): Adjust.
16014 (stop_all_processes): Rename to ...
16015 (stop_all_lwps): ... this.
16016 (linux_resume_one_process): Rename to ...
16017 (linux_resume_one_lwp): ... this. Adjust.
16018 (linux_set_resume_request, linux_continue_one_thread)
16019 (linux_queue_one_thread, resume_status_pending_p)
16020 (usr_store_inferior_registers, regsets_store_inferior_registers)
16021 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16023 * linux-low.h (get_process): Rename to ...
16024 (get_lwp): ... this. Adjust.
16025 (get_thread_process): Rename to ...
16026 (get_thread_lwp): ... this. Adjust.
16027 (get_process_thread): Rename to ...
16028 (get_lwp_thread): ... this. Adjust.
16029 (struct process_info): Rename to ...
16030 (struct lwp_info): ... this.
16031 (all_processes): Rename to ...
16032 (all_lwps): ... this.
16033 * proc-service.c (ps_lgetregs): Adjust.
16034 * thread-db.c (thread_db_create_event, find_one_thread)
16035 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16037 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16039 * server.c (handle_query): Handle "qAttached".
16041 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16043 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16044 GPLv3, update license URL.
16046 2009-03-01 Doug Evans <dje@google.com>
16048 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16049 (server_h): Add gdb_signals.h.
16050 (signals.o): Update.
16051 * server.h (target_signal_from_host,target_signal_to_host_p)
16052 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16054 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16056 * remote-utils.c (getpkt): Also generate remote-debug
16057 information if noack_mode is set.
16059 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16061 * server.c (handle_query): Report qXfer:siginfo:read and
16062 qXfer:siginfo:write as supported and handle them.
16063 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16064 * linux-low.c (linux_xfer_siginfo): New.
16065 (linux_target_ops): Set it.
16067 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16069 * server.c (gdbserver_usage): Mention --remote-debug.
16070 (main): Accept '--remote-debug' switch.
16072 2009-01-18 Doug Evans <dje@google.com>
16074 * regcache.c (new_register_cache): No need to check result of xcalloc.
16075 * server.c (handle_search_memory): Back out calls to xmalloc,
16076 result is checked and error is returned to user upon failure.
16077 (handle_query): Ditto. Add more checks for result of malloc.
16078 (handle_v_cont): Check result of malloc, report error back to
16080 (handle_v_run): Ditto. Call freeargv.
16081 * server.h (freeargv): Declare.
16082 * utils.c (freeargv): New fn.
16084 2009-01-15 Doug Evans <dje@google.com>
16086 * gdbreplay.c (perror_with_name): Make arg const char *.
16087 * server.h (target_signal_to_name): Make return type const char *.
16088 * thread-db.c (thread_db_err_str): Make return type const char *.
16089 * utils.c (perror_with_name): Make arg const char *.
16091 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16093 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16094 when handling a EXIT_PROCESS_DEBUG_EVENT.
16096 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16098 * gdbreplay.c (gdbreplay_version): Update copyright year.
16099 * server.c (gdbserver_version): Likewise.
16101 2009-01-05 Doug Evans <dje@google.com>
16103 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16104 (handle_extended_wait): Improve comment.
16106 2008-12-13 Doug Evans <dje@google.com>
16108 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16109 * server.h (ATTR_MALLOC): New macro.
16110 (xmalloc,xcalloc,xstrdup): Declare.
16111 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16112 * inferiors.c: Ditto.
16113 * linux-low.c: Ditto.
16114 * mem-break.c: Ditto.
16115 * regcache.c: Ditto.
16116 * remote-utils.c: Ditto.
16119 * win32-low.c: Ditto.
16121 2008-12-12 Doug Evans <dje@google.com>
16123 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16124 in debugging printf.
16126 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16128 2008-12-09 Doug Evans <dje@google.com>
16130 * linux-low.h (struct process_info): Delete member tid, unused.
16131 * thread-db.c (find_one_thread): Update.
16132 (maybe_attach_thread): Update.
16134 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16136 * target.h (struct target_ops): Add qxfer_osdata member.
16137 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16139 (linux_qxfer_osdata): New functions.
16140 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16142 * server.c (handle_query): Handle "qXfer:osdata:read:".
16143 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16144 (buffer_xml_printf): New functions.
16145 * server.h (struct buffer): New.
16146 (buffer_grow_str, buffer_grow_str0): New macros.
16147 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16148 (buffer_xml_printf): Declare.
16150 2008-11-24 Doug Evans <dje@google.com>
16152 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16154 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16156 * server.c (handle_v_run): Always use the supplied argument list.
16158 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16160 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16161 (xtensa_regmap_table): Add entry for scompare1.
16163 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16165 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16166 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16167 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16168 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16169 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16170 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16171 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16172 XML target descriptions.
16173 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16174 when inferior is running on an ISA 2.05 or later processor. Add
16175 special case to return offset for full 64-bit slot of FPSCR when
16178 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16180 * Makefile.in (SFILES, clean): Added sparc64 files.
16181 (reg-sparc64.o, reg-sparc64.c): New.
16182 * configure.srv (sparc*-*-linux*): New configuration.
16183 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16184 syscall arguments for SPARC.
16185 (regsets_store_inferior_registers): Likewise.
16186 * linux-sparc-low.c: New file.
16188 2008-10-21 Doug Evans <dje@google.com>
16190 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16191 (READLINE_DIR,READLINE_DEP): Delete.
16192 (INTERNAL_CFLAGS): Update.
16193 (LINTFLAGS): Update.
16195 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16197 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16198 whole argv from the last run, not just argv[0].
16200 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16202 * regcache.c (new_register_cache): Return NULL if the register
16203 cache size isn't known yet.
16204 (free_register_cache): Avoid dereferencing a NULL regcache.
16206 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16208 * configure.srv: Merge MIPS and MIPS64.
16210 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16212 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16214 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16216 * Makefile.in: Add required vsx dependencies.
16218 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16219 Declare init_registers_powerpc_vsx32l.
16220 Declare init_registers_powerpc_vsx64l.
16221 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16222 (ppc_arch_setup): Check for VSX in hwcap.
16223 (ppc_fill_vsxregset): New function.
16224 (ppc_store_vsxregset): New function.
16225 Add new VSX entry in regset_info target_regsets.
16227 * configure.srv: Add new VSX dependencies.
16229 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16231 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16232 (remote_open): Set or clear transport_is_reliable.
16233 (putpkt_binary): Don't expect acks in noack mode.
16234 (getpkt): Don't send ack/nac in noack mode.
16235 * server.c (handle_general_set): Handle QStartNoAckMode.
16236 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16238 (main): Reset noack_mode on every connection.
16239 * server.h (noack_mode): Declare.
16241 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16243 * Makefile.in (GDBREPLAY_OBS): New variable.
16244 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16246 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16247 Daniel Jacobowitz <dan@codesourcery.com>
16249 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16250 (usr_store_inferior_registers): Likewise.
16251 (regsets_store_inferior_registers): Likewise.
16253 2008-07-31 Rolf Jansen <rj@surtec.com>
16254 Pedro Alves <pedro@codesourcery.com>
16256 * configure.ac: Check for memmem declaration.
16257 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16258 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16259 (disable_packet_qfThreadInfo): Unconditionally compile.
16260 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16261 * configure, config.in: Regenerate.
16263 2008-07-28 Doug Kwan <dougkwan@google.com>
16265 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16266 (linux_write_memory): Remove declaration of errno.
16268 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16270 * linux-low.c (handle_extended_wait): Do not use "status"
16271 variable uninitialized.
16273 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16275 * server.c (handle_v_attach): Inhibit reporting dll changes.
16277 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16279 * remote-utils.c (prepare_resume_reply): If requested, don't
16280 output "thread:TID" in the T stop reply.
16282 * server.c (disable_packet_vCont, disable_packet_Tthread)
16283 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16284 (handle_query): If requested, disable support for qC, qfThreadInfo
16286 (handle_v_requests): If requested, disable support for vCont.
16287 (gdbserver_show_disableable): New.
16288 (main): Handle --disable-packet and --disable-packet=LIST.
16290 * server.h (disable_packet_vCont, disable_packet_Tthread)
16291 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16293 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16295 * server.c (gdbserver_usage): Mention --version.
16297 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16299 * Makefile.in (gdbreplay.o): New rule.
16301 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16303 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16304 message, not gdbserver.
16306 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16307 Nathan Sidwell <nathan@codesourcery.com>
16308 Joseph Myers <joseph@codesourcery.com>
16310 * acinclude.m4: Include ../../config/acx.m4.
16311 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16312 * configure, config.in: Regenerate.
16313 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16314 * server.c (gdbserver_version): Print PKGVERSION.
16315 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16316 (main): Adjust gdbserver_usage calls.
16317 * gdbreplay.c (version, host_name): Add declarations.
16318 (gdbreplay_version, gdbreplay_usage): New.
16319 (main): Accept --version and --help options.
16321 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16323 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16324 (arm_breakpoint_at): Handle Thumb.
16325 (the_low_target): Add comment.
16327 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16329 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16331 2008-05-09 Doug Evans <dje@google.com>
16333 * server.h (decode_search_memory_packet): Declare.
16334 * remote-utils.c (decode_search_memory_packet): New fn.
16335 * server.c (handle_search_memory_1): New fn.
16336 (handle_search_memory): New fn.
16337 (handle_query): Process qSearch:memory packets.
16339 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16341 * regcache.c (registers_length): Remove.
16342 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16343 full register packet.
16344 * regcache.h (registers_length): Remove prototype.
16345 * server.h (PBUFSIZ): Define to 16384.
16347 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16349 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16350 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16351 powerpc-64l.o, and powerpc-altivec64l.o.
16352 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16353 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16354 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16355 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16356 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16359 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16360 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16361 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16362 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16363 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16364 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16365 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16366 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16367 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16368 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16371 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16372 (init_registers_powerpc_32l): ... this new prototype.
16373 (init_registers_powerpc_32): Remove, replace by ...
16374 (init_registers_powerpc_altivec32l): ... this new prototype.
16375 (init_registers_powerpc_e500): Remove, replace by ...
16376 (init_registers_powerpc_e500l): ... this new prototype.
16377 (init_registers_ppc64): Remove, replace by ...
16378 (init_registers_powerpc_64l): ... this new prototype.
16379 (init_registers_powerpc_64): Remove, replace by ...
16380 (init_registers_powerpc_altivec64l): ... this new prototype.
16381 (ppc_num_regs): Set to 73.
16382 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16383 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16384 (ppc_cannot_store_register): Handle orig_r3 and trap.
16385 (ppc_arch_setup): Update init_registers_... calls.
16386 (ppc_fill_gregset): Handle orig_r3 and trap.
16388 * inferiors.c (clear_inferiors): Reset current_inferior.
16390 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16392 * acinclude.m4: Add override.m4.
16393 * configure: Regenerate.
16395 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16397 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16398 initial call to init_register_ppc64.
16400 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16402 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16403 single powerpc*-*-linux* case.
16404 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16406 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16408 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16409 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16411 * linux-ppc-low.c: Include <elf.h>.
16412 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16413 (ppc_hwcap): New global variable.
16414 (ppc_regmap): Remove __SPE__ #ifdef sections.
16415 (ppc_regmap_e500): New global variable.
16416 (ppc_cannot_store_register): Update __SPE__ special case.
16417 (ppc_get_hwcap): New function.
16418 (ppc_arch_setup): Use it to determine whether inferior supports
16419 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16420 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16421 Do not access registers if target does not support AltiVec.
16422 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16423 Do not access registers if target does not support SPE.
16424 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16426 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16428 * linux-low.c (disabled_regsets, num_regsets): New.
16429 (use_regsets_p): Delete.
16430 (linux_wait_for_process): Clear disabled_regsets.
16431 (regsets_fetch_inferior_registers): Check and set it.
16432 (regsets_store_inferior_registers): Likewise.
16433 (linux_fetch_registers, linux_store_registers): Do not use
16435 (initialize_low): Allocate disabled_regsets.
16437 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16439 * Makefile.in (LIBOBJS): New.
16440 (OBS): Use LIBOBJS.
16441 (memmem.o): New rule.
16442 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16443 * configure: Regenerated.
16445 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16447 * server.c (handle_query): Never return "unsupported" for
16448 qXfer:features:read queries.
16450 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16452 * server.c (get_features_xml): Fix inverted condition.
16453 (handle_query): Always support qXfer:feature:read.
16455 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16457 * server.c (wrapper_argv): New.
16458 (start_inferior): Handle wrapper_argv. If set, expect an extra
16460 (gdbserver_usage): Document --wrapper.
16461 (main): Parse --wrapper.
16463 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16465 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16466 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16467 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16468 (ppc_set_pc): Likewise.
16469 (ppc_arch_setup): New function.
16470 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16471 of collect_register.
16472 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16474 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16476 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16477 instead of linux-ppc64-low.o.
16478 * linux-ppc64-low.c: Remove file.
16479 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16480 (linux-ppc64-low.o): Remove rule.
16482 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16483 (init_registers_powerpc_64): Likewise.
16484 (ppc_regmap): Conditionally define depending on __powerpc64__.
16485 (ppc_cannot_store_register): Do not special-case "fpscr" when
16486 compiled on __powerpc64__.
16487 (ppc_collect_ptrace_register): New function.
16488 (ppc_supply_ptrace_register): New function.
16489 (ppc_breakpoint): Change type to "unsigned int".
16490 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16491 (the_low_target): Conditionally provide initializers for the
16492 arch_setup member depending on __powerpc64__. Install
16493 collect_ptrace_register and supply_ptrace_register members.
16495 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16497 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16498 * server.c (gdbserver_xmltarget): Define.
16499 (get_features_xml): Use it to replace "target.xml" and arch_string.
16501 * configure.srv: Remove srv_xmltarget. Add XML files that were
16502 mentioned there to srv_xmlfiles instead. Remove conditional tests
16503 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16504 srv_xmlfiles and srv_regobj to include all possible choices.
16505 * configure.ac (srv_xmltarget): Remove.
16506 (srv_xmlfiles): Do not add "target.xml".
16507 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16508 checks for supplementary target information.
16509 * configure: Regenerate.
16510 * Makefile.in (XML_TARGET): Remove.
16511 (target.xml): Remove rule.
16512 (clean): Do not clean up target.xml.
16513 (.PRECIOUS): Do not mention target.xml.
16515 * target.h (struct target_ops): Remove arch_string member.
16516 * linux-low.c (linux_arch_string): Remove.
16517 (linux_target_ops): Remove arch_string initializer.
16518 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16519 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16520 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16521 * spu-low.c (spu_arch_string): Remove.
16522 (spu_target_ops): Remove arch_string initializer.
16523 * win32-low.c (win32_arch_string): Remove.
16524 (win32_target_ops): Remove arch_string initializer.
16525 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16526 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16527 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16529 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16531 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16532 by collect_ptrace_register and supply_ptrace_register hooks.
16533 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16534 instead of checking for the_low_target.left_pad_xfer.
16535 (usr_store_inferior_registers): Use collect_ptrace_register callback
16536 instead of checking for the_low_target.left_pad_xfer.
16538 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16539 (s390_supply_ptrace_register): Likewise.
16540 (s390_fill_gregset): Call s390_collect_ptrace_register.
16541 (the_low_target): Update.
16543 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16544 (ppc_supply_ptrace_register): Likewise.
16545 (the_low_target): Update.
16547 * linux-i386-low.c (the_low_target): Update.
16548 * linux-x86-64-low.c (the_low_target): Update.
16550 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16552 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16553 reg-s390.o and reg-s390x.o.
16555 * linux-low.c (new_inferior): New global variable.
16556 (linux_create_inferior, linux_attach): Set it.
16557 (linux_wait_for_process): Call the_low_target.arch_setup after the
16558 target has stopped for the first time.
16559 (initialize_low): Do not call the_low_target.arch_setup.
16561 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16562 (s390_set_pc): Likewise.
16563 (s390_arch_setup): New function.
16564 (the_low_target): Use s390_arch_setup as arch_setup routine.
16566 * regcache.c (realloc_register_cache): New function.
16567 (set_register_cache): Call it for each existing regcache.
16569 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16571 * server.h (init_registers): Remove prototype.
16573 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16574 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16575 instead of init_registers ().
16576 * linux-arm-low.c (init_registers_arm): Add prototype.
16577 (init_registers_arm_with_iwmmxt): Likewise.
16578 (the_low_target): Add initializer for arch_setup field.
16579 * linux-cris-low.c (init_registers_cris): Add prototype.
16580 (the_low_target): Add initializer for arch_setup field.
16581 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16582 (the_low_target): Add initializer for arch_setup field.
16583 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16584 (the_low_target): Add initializer for arch_setup field.
16585 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16586 (the_low_target): Add initializer for arch_setup field.
16587 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16588 (the_low_target): Add initializer for arch_setup field.
16589 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16590 (the_low_target): Add initializer for arch_setup field.
16591 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16592 (init_registers_mips64_linux): Likewise.
16593 (the_low_target): Add initializer for arch_setup field.
16594 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16595 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16596 (the_low_target): Add initializer for arch_setup field.
16597 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16598 (init_registers_powerpc_64): Likewise.
16599 (the_low_target): Add initializer for arch_setup field.
16600 * linux-s390-low.c (init_registers_s390): Add prototype.
16601 (init_registers_s390x): Likewise.
16602 (the_low_target): Add initializer for arch_setup field.
16603 * linux-sh-low.c (init_registers_sh): Add prototype.
16604 (the_low_target): Add initializer for arch_setup field.
16605 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16606 (the_low_target): Add initializer for arch_setup field.
16607 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16608 (the_low_target): Add initializer for arch_setup field.
16610 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16611 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16612 instead of init_registers ().
16613 * win32-arm-low.c (init_registers_arm): Add prototype.
16614 (the_low_target): Add initializer for arch_setup field.
16615 * win32-i386-low.c (init_registers_i386): Add prototype.
16616 (the_low_target): Add initializer for arch_setup field.
16618 * spu-low.c (init_registers_spu): Add prototype.
16619 (initialize_low): Call initialie_registers_spu () instead of
16620 initialize_registers ().
16622 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16624 * server.c (handle_v_requests): When handling the vRun and vAttach
16625 packets, if already debugging a process, don't kill it. Return an
16628 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16630 * server.c (handle_query): Correct length check.
16632 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16634 * win32-low.c (do_initial_child_stuff): Add process handle
16635 parameter. Set current_process_handle and current_process_id from the
16636 parameters. Clear globals.
16637 (win32_create_inferior): Don't set current_process_handle and
16638 current_process_id here. Instead pass them on the call to
16639 do_initial_child_stuff.
16640 (win32_attach): Likewise.
16641 (win32_clear_inferiors): New.
16642 (win32_kill): Don't close the current process handle or the
16643 current thread handle here. Instead call win32_clear_inferiors.
16644 (win32_detach): Don't open a new handle to the process. Call
16645 win32_clear_inferiors.
16646 (win32_join): Don't rely on current_process_handle; open a new
16647 handle using the process id.
16648 (win32_wait): Call win32_clear_inferiors when the inferior process
16651 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16653 * server.c (monitor_show_help): Add "exit".
16655 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16657 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16658 (clean): Add reg-xtensa.c.
16659 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16660 * configure.srv (xtensa*-*-linux*) New target.
16661 * linux-xtensa-low.c: New.
16662 * xtensa-xtregs.c: New.
16664 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16666 * hostio.c: Don't include errno.h.
16667 (errno_to_fileio_errno): Move to hostio-errno.
16668 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16669 error number outputting to the target->hostio_last_error callback.
16670 (hostio_packet_error): Use FILEIO_EINVAL directly.
16671 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16672 calls to hostio_error.
16673 * hostio-errno.c: New.
16674 * server.h (hostio_last_error_from_errno): Declare.
16675 * target.h (target_ops): Add hostio_last_error member.
16676 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16677 as hostio_last_error handler.
16678 * spu-low.c (spu_target_ops): Likewise.
16679 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16680 (wince_hostio_last_error): New functions.
16681 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16682 as hostio_last_error handler.
16683 (win32_target_ops) [!_WIN32_WCE]: Register
16684 hostio_last_error_from_errno as hostio_last_error handler.
16685 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16686 (hostio-errno.o): New rule.
16687 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16688 * configure.srv (srv_hostio_err_objs): New variable. Default to
16690 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16691 * configure: Regenerate.
16693 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16695 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16696 (linux_kill, linux_detach): Clean up the process list.
16697 * remote-utils.c (remote_open): Improve port number parsing.
16698 (putpkt_binary, input_interrupt): Only send interrupts if the target
16700 * server.c (extended_protocol): Make static.
16701 (attached): Define earlier.
16702 (exit_requested, response_needed, program_argv): New variables.
16703 (target_running): New.
16704 (start_inferior): Clear attached here.
16705 (attach_inferior): Set attached here.
16706 (require_running): Define.
16707 (handle_query): Use require_running and target_running. Implement
16709 (handle_v_attach, handle_v_run): New.
16710 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16711 (gdbserver_usage): Update.
16712 (main): Redo argument parsing. Handle --debug and --multi. Handle
16713 --attach along with other options or after the port. Save
16714 program_argv. Support no initial program. Resynchronize
16715 communication with GDB after an error. Handle "monitor exit".
16716 Use require_running and target_running. Always allow the extended
16717 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16718 restart in extended mode.
16719 * README: Refer to the GDB manual. Update --attach usage.
16721 2007-12-20 Andreas Schwab <schwab@suse.de>
16723 * linux-low.c (STACK_SIZE): Define.
16724 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16725 (linux_test_for_tracefork): Likewise.
16727 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16729 * linux-low.c (linux_wait_for_event): Update messages. Do not
16730 reinsert auto-delete breakpoints.
16731 * mem-break.c (struct breakpoint): Change return type of handler to
16733 (set_breakpoint_at): Update handler type.
16734 (reinsert_breakpoint_handler): Return 1 instead of calling
16736 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16738 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16739 * mem-break.h (set_breakpoint_at): Update handler type.
16740 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16741 * win32-low.c (auto_delete_breakpoint): New.
16742 (get_child_debug_event): Use it.
16744 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16746 * configure.ac: Check for pread and pwrite.
16747 * hostio.c (handle_pread): Fall back to lseek and read.
16748 (handle_pwrite): Fall back to lseek and write.
16749 * config.in, configure: Regenerated.
16751 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16753 * server.c (myresume): Add own_buf argument.
16754 (main): Update calls.
16756 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16758 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16759 * remote-utils.c (remote_open): Do not call disable_async_io.
16760 (block_async_io): Delete.
16761 (unblock_async_io): Make static.
16762 (initialize_async_io): New.
16763 * server.c (handle_v_cont): Handle async I/O here.
16764 (myresume): Likewise. Move other common resume tasks here...
16765 (main): ... from here. Call initialize_async_io. Disable async
16766 I/O before the main loop.
16767 * server.h (initialize_async_io): Declare.
16768 (block_async_io, unblock_async_io): Delete prototypes.
16769 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16771 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16773 * remote-utils.c (readchar): Allow binary data in received messages.
16775 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16777 * win32-low.c (attaching): New global.
16778 (win32_create_inferior): Clear the `attaching' global.
16779 (win32_attach): Set the `attaching' global.
16780 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16781 attaching. Only set a breakpoint at the entry point if not
16784 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16786 * server.c (main): Don't report dll events on the initial
16787 connection on attaches.
16789 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16791 * server.c (main): Relax numerical bases supported for the pid of
16792 the --attach command line argument.
16794 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16796 * win32-low.c (win32_attach): Call OpenProcess before
16797 DebugActiveProcess, not after. Add last error output to error
16800 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16802 * win32-low.c (win32_get_thread_context)
16803 (win32_set_thread_context): New functions.
16804 (thread_rec): Use win32_get_thread_context.
16805 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16806 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16809 2007-12-03 Leo Zayas
16810 Pedro Alves <pedro_alves@portugalmail.pt>
16812 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16814 (child_add_thread): Minor cleanup.
16815 (child_continue): Resume artificially suspended threads before
16816 calling ContinueDebugEvent.
16817 (suspend_one_thread): New.
16818 (fake_breakpoint_event): New.
16819 (get_child_debug_event): Change return type to int. Check here if
16820 gdb sent an interrupt request. If a soft interrupt was requested,
16821 fake a breakpoint event. Return 0 if there is no event to handle,
16823 (win32_wait): Don't check here if gdb sent an interrupt request.
16824 Ensure there is a valid event to handle.
16825 (win32_request_interrupt): Add soft interruption method as last
16828 2007-12-03 Leo Zayas
16829 Pedro Alves <pedro_alves@portugalmail.pt>
16831 * win32-low.h (win32_thread_info): Add descriptions to the
16832 structure members. Replace `suspend_count' counter by a
16834 * win32-low.c (thread_rec): Update condition of when to get the
16835 context from the inferior. Rely on ContextFlags being set if it
16836 has already been retrieved. Only suspend the inferior thread if
16837 we haven't already. Warn if that fails.
16838 (continue_one_thread): s/suspend_count/suspended/. Only call
16839 ResumeThread once. Warn if that fails.
16841 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16843 * win32-low.c (win32_wait): Don't read from the inferior when it
16844 has already exited.
16846 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16848 * Makefile.in (win32_low_h): New variable.
16849 (win32-low.o): Add dependency on $(win32_low_h).
16850 (win32-arm-low.o, win32-i386-low.o): New rules.
16852 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16854 * hostio.c: Correct copyright year.
16856 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16858 * Makefile.in (OBS): Add hostio.o.
16859 (hostio.o): New rule.
16860 * server.h (handle_vFile): Declare.
16861 * hostio.c: New file.
16862 * server.c (handle_v_requests): Take packet_len and new_packet_len
16863 for binary packets. Call handle_vFile.
16864 (main): Update call to handle_v_requests.
16866 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16868 * linux-low.c: Include <sched.h>.
16870 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16872 * linux-low.c (linux_tracefork_grandchild): New.
16873 (linux_tracefork_child): Use clone.
16874 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16876 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16878 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16880 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16882 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16884 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16886 * inferiors.c (change_inferior_id): Delete.
16887 (add_pid_to_list, pull_pid_from_list): New.
16888 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16889 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16890 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16891 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16892 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16893 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16894 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16895 (using_threads): Always set to 1.
16896 (handle_extended_wait): New.
16897 (add_process): Do not set TID.
16898 (linux_create_inferior): Set must_set_ptrace_flags.
16899 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16900 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16901 (linux_thread_alive): Rename TID argument to LWPID.
16902 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16903 (linux_wait_for_event): Do not use TID or check using_threads. Update
16904 call to dead_thread_notify. Call handle_extended_wait.
16905 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16906 (send_sigstop): Delete sigstop_sent.
16907 (wait_for_sigstop): Avoid TID.
16908 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16909 (linux_test_for_tracefork): New.
16910 (linux_lookup_signals): Use thread_db_active and
16911 linux_supports_tracefork_flag.
16912 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16913 * linux-low.h (get_process_thread): Avoid TID.
16914 (struct process_ifo): Move thread_known and tid to the end. Remove
16916 (linux_attach_lwp, thread_db_init): Update prototypes.
16917 * server.h (change_inferior_id): Delete prototype.
16918 (add_pid_to_list, pull_pid_from_list): New prototypes.
16919 * thread-db.c (thread_db_use_events): New.
16920 (find_first_thread): Rename to...
16921 (find_one_thread): ...this. Update callers and messages. Do not
16922 call fatal. Check thread_db_use_events. Do not call
16923 change_inferior_id or new_thread_notify.
16924 (maybe_attach_thread): Update. Do not call new_thread_notify.
16925 (thread_db_init): Set thread_db_use_events. Check use_events.
16926 * utils.c (fatal, warning): Correct message prefix.
16928 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16930 * Makefile.in (clean): Remove new files.
16931 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16932 (powerpc-64.o, powerpc-64.c): New rules.
16933 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16934 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16936 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16938 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16939 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16940 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16941 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16942 (target_regsets): Add AltiVec and SPE register sets.
16943 * configure.ac: Check for AltiVec and SPE.
16944 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16945 (ppc_fill_vrregset, ppc_store_vrregset): New.
16946 (target_regsets): Add AltiVec register set.
16947 * configure: Regenerated.
16949 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16951 * linux-low.c (O_LARGEFILE): Define.
16952 (linux_read_memory): Use /proc/PID/mem.
16953 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16954 * configure, config.in: Regenerated.
16956 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16958 * linux-low.c (linux_wait_for_event): Do not pass signals while
16961 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16963 * win32-low.c (create_process): New.
16964 (win32_create_inferior): Use create_process instead of
16965 CreateProcess. If create_process failed retry appending an ".exe"
16966 suffix. Store the GetLastError result immediatelly after
16967 create_process calls and use it on the call to error.
16969 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16971 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16973 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16975 * configure.ac: Switch license to GPLv3.
16977 2007-08-01 Michael Snyder <msnyder@access-company.com>
16979 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16981 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16983 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16985 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16986 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16987 CloseToolhelp32Snapshot.
16988 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16989 CloseToolhelp32Snapshot.
16991 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16993 * server.c (main): Check for inferior exit before main loop.
16995 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16997 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16998 instead of on tmp_desc.
17000 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17001 Daniel Jacobowitz <dan@codesourcery.com>
17003 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17004 (add_thread): Minor cleanups.
17005 (clear_inferiors): Move lower in the file. Clear the DLL
17007 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17008 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17009 (xml_escape_text): New.
17010 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17012 (handle_v_cont): Report errors.
17013 (gdbserver_version): Update.
17014 (main): Correct size of own_buf. Do not report initial DLL events.
17015 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17016 (unloaded_dll, xml_escape_text): New.
17017 * win32-low.c (enum target_waitkind): Update comments.
17018 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17019 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17020 (win32_EnumProcessModules, win32_GetModuleInformation)
17021 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17022 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17023 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17024 (win32_Module32First, win32_Module32Next, load_toolhelp)
17025 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17026 (get_child_debug_event): Handle DLL events.
17027 (win32_wait): Likewise.
17029 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17031 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17032 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17034 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17036 * win32-low.c (handle_output_debug_string): Ignore event if not
17039 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17041 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17043 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17045 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17047 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17049 * inferiors.c (change_inferior_id): Add comment.
17050 * linux-low.c (check_removed_breakpoint): Add an early
17051 prototype. Improve debug output.
17052 (linux_attach): Doc update.
17053 (linux_detach_one_process, linux_detach): Clean up before releasing
17055 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17056 * linux-low.h (struct process_info): Doc improvement.
17057 * mem-break.c (delete_all_breakpoints): New.
17058 * mem-break.h (delete_all_breakpoints): New prototype.
17059 * thread-db.c (find_first_thread): New.
17060 (thread_db_create_event): Call it instead of
17061 thread_db_find_new_threads. Clean up unused variables.
17062 (maybe_attach_thread): Remove first thread handling.
17063 (thread_db_find_new_threads): Use find_first_thread.
17064 (thread_db_get_tls_address): Likewise.
17066 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17068 * thread-db.c (thread_db_find_new_threads): Add prototype.
17069 (thread_db_create_event): Check for the main thread before adding
17071 (maybe_attach_thread): Only enable event reporting if TID == 0.
17072 (thread_db_get_tls_address): Check for new threads.
17074 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17076 * linux-low.c (linux_create_inferior): Try execv before execvp.
17077 * spu-low.c (spu_create_inferior): Likewise.
17079 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17081 * linux-low.c (linux_create_inferior): Change execv to execvp.
17082 * spu-low.c (spu_create_inferior): Likewies.
17084 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17086 * Makefile.in (clean): Clean new files instead of deleted ones.
17087 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17088 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17090 * configure.srv: Specify XML files and new regformats for MIPS and
17092 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17093 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17094 an entry for the restart register.
17095 (mips_cannot_fetch_register, mips_cannot_store_register)
17096 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17097 register names to match the XML descriptions.
17098 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17099 restart register instead of $0.
17101 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17102 Markus Deuling <deuling@de.ibm.com>
17104 * remote-utils.c (decode_xfer_write): New function.
17105 * server.h (decode_xfer_write): Add prototype.
17106 * server.c (handle_query): Add PACKET_LEN argument. Support
17107 qXfer:spu:read and qXfer:spu:write packets.
17108 (main): Pass packet_len to handle_query.
17109 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17110 * target.h (target_ops): Add qxfer_spu.
17112 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17114 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17115 accessing non-seekable spufs files.
17117 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17119 * server.c (handle_query): Add reply for qC packet.
17121 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17122 Leo Zayas <lerele@champenstudios@com>
17124 * server.h (check_remote_input_interrupt_request): New function.
17125 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17126 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17127 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17128 (check_remote_input_interrupt_request): New function.
17129 * server.h (check_remote_input_interrupt_request): Declare.
17130 * win32-low.c (winapi_DebugBreakProcess,
17131 winapi_GenerateConsoleCtrlEvent): New typedefs.
17132 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17134 (win32_wait): Check for remote interrupt request
17135 with check_remote_input_interrupt_request.
17136 (win32_request_interrupt): New function.
17137 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17139 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17141 * win32-low.c (debug_registers_changed,
17142 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17143 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17144 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17145 (thread_rec): Get context using the low target.
17146 (child_add_thread): Call thread_added on the low target,
17147 which does the same thing.
17149 (do_initial_child_stuff): Remove debug registers references.
17150 Set context using the low target. Resume threads after
17151 setting the contexts.
17152 (child_continue): Remove dead variable. Remove debug
17153 registers references.
17154 (child_fetch_inferior_registers): Go through the low target.
17155 (do_child_store_inferior_registers): Remove.
17156 (child_store_inferior_registers): Go through the low target.
17157 (win32_resume): Remove debug registers references.
17158 Set context using the low target.
17159 (handle_exception): Change return type to void. Don't record
17160 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17161 first chance exception.
17162 (get_child_debug_event): Change return type to void. Remove
17163 goto loop. Always return after waiting for debug event.
17164 (win32_wait): Convert to switch statement. Handle spurious
17167 * win32-i386-low.c (debug_registers_changed,
17168 debug_registers_used): New.
17169 (initial_stuff): Rename to ...
17170 (i386_initial_stuff): ... this. Clear debug registers
17172 (store_debug_registers): Delete.
17173 (i386_get_thread_context): New.
17174 (load_debug_registers): Delete.
17175 (i386_set_thread_context): New.
17176 (i386_thread_added): New.
17177 (single_step): Rename to ...
17178 (i386_single_step): ... this.
17179 (do_fetch_inferior_registers): Rename to ...
17180 (i386_fetch_inferior_register): ... this.
17181 (i386_store_inferior_register): New.
17182 (the_low_target): Adapt to new interface.
17184 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17185 (arm_get_thread_context): New.
17186 (arm_set_thread_context): New.
17188 (do_fetch_inferior_registers): Rename to ...
17189 (arm_fetch_inferior_register): ... this.
17190 (arm_store_inferior_register): New.
17191 (arm_wince_breakpoint): Reimplement as unsigned long.
17192 (arm_wince_breakpoint_len): Define.
17193 (the_low_target): Adapt to new interface.
17195 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17196 load_debug_registers. Add get_thread_context, set_thread_context,
17197 thread_added and store_inferior_register. Rename
17198 fetch_inferior_registers to fetch_inferior_register.
17199 (regptr): Remove declaration.
17201 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17203 * linux-low.c (linux_detach): Change return type to int. Return 0.
17204 * spu-low.c (spu_detach): Likewise.
17206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17208 * target.h (target_ops): Change return type of detach to int.
17210 (join_inferior): New.
17211 * server.c (main): Don't skip detach support on mingw32.
17212 If the inferior doesn't support detaching return error.
17213 Call join_inferior instead of using waitpid.
17214 * linux-low.c (linux_join): New.
17215 (linux_target_op): Add linux_join.
17216 * spu-low.c (spu_join): New.
17217 (spu_target_ops): Add spu_join.
17218 * win32-low.c (win32_detach): Adapt to new interface.
17219 Reopen current_process_handle before detaching. Issue a child
17220 resume before detaching.
17222 (win32_target_op): Add win32_join.
17224 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17226 * win32-low.c (win32-attach): Fix return value.
17227 * target.h (target_ops): Describe ATTACH return values.
17229 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17231 * win32-low.c (GETPROCADDRESS): Define.
17232 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17233 (winapi_DebugSetProcessKillOnExit): Likewise.
17234 (win32_create_inferior): Force usage of ansi CreateProcessA.
17235 (win32_attach): Use GETPROCADDRESS.
17236 (win32_detach): Likewise.
17238 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17240 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17242 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17244 * win32-low.c: Commit leftover changes from 2007-03-29.
17246 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17248 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17249 fields short instead of int. Add explicit padding.
17250 (i387_cache_to_fsave): Remove unnecessary casts.
17251 (i387_fsave_to_cache): Doc fix.
17252 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17254 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17256 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17257 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17259 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17261 * configure.srv (arm*-*-mingw32ce*): Move near the other
17264 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17266 * configure.ac: Add errno checking.
17267 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17268 sys/file.h and malloc.h.
17269 (AC_CHECK_DECLS): Add perror.
17270 (srv_mingwce): Handle.
17271 * configure.srv (i[34567]86-*-cygwin*): Add
17272 win32-i386-low.o to srv_tgtobj.
17273 (i[34567]86-*-mingw*): Likewise.
17274 (arm*-*-mingw32ce*): Add case.
17275 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17276 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17277 [__MINGW32CE__] (strerror): New function.
17278 [__MINGW32CE__] (errno): Define to GetLastError.
17279 [__MINGW32CE__] (COUNTOF): New macro.
17280 (remote_open): Remove extra close call.
17281 * mem-break.c (delete_breakpoint_at): New function.
17282 * mem-break.h (delete_breakpoint_at): Declare.
17283 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17284 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17285 [USE_WIN32API] (read, write): Add char* casts.
17286 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17287 * server.h: Include wincecompat.h on Windows CE.
17288 [HAVE_ERRNO_H]: Check.
17289 (perror): Declare if not declared.
17290 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17291 (perror_with_name): Remove errno declaration.
17292 * wincecompat.h: New.
17293 * wincecompat.c: New.
17294 * win32-low.h: New.
17295 * win32-arm-low.c: New.
17296 * win32-i386-low.c: New.
17297 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17298 (OUTMSG2): Make it safe.
17300 (COUNTOF): New macro.
17301 (NUM_REGS): Get it from the low target.
17302 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17303 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17304 (thread_rec): Let low target handle debug registers.
17305 (child_add_thread): Likewise.
17306 (child_init_thread_list): Likewise.
17307 (continue_one_thread): Likewise.
17309 (do_child_fetch_inferior_registers): Move to ...
17310 * win32-i386-low.c: ... here, and rename to ...
17311 (do_fetch_inferior_registers): ... this.
17312 * win32-low.c (child_fetch_inferior_registers):
17313 Go through the low target.
17314 (do_child_store_inferior_registers): Use regptr.
17315 (strwinerror): New function.
17316 (win32_create_inferior): Handle Windows CE.
17317 Use strwinerror instead of strerror on Windows error
17318 codes. Add program to the error output.
17319 Don't close the main thread handle on Windows CE.
17320 (win32_attach): Use coredll.dll on Windows CE.
17321 (win32_kill): Close current process and current
17323 (win32_detach): Use coredll.dll on Windows CE.
17324 (win32_resume): Let low target handle debug registers, and
17326 (handle_exception): Add/Remove initial breakpoint. Avoid
17327 non-existant WSTOPSIG on Windows CE.
17328 (win32_read_inferior_memory): Cast to remove warning.
17329 (win32_arch_string): Go through the low target.
17330 (initialize_low): Call set_breakpoint_data with the low
17331 target's breakpoint.
17332 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17333 FOP_REGNUM, mappings): Move to ...
17334 * win32-i386-low.c: ... here.
17335 * win32-low.c (win32_thread_info): Move to ...
17336 * win32-low.h: ... here.
17337 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17338 win32-arm-low.c and wincecompat.c.
17339 (all:): Add $EXEEXT.
17340 (install-only:): Likewise.
17341 (gdbserver:): Likewise.
17342 (gdbreplay:): Likewise.
17343 * config.in: Regenerate.
17344 * configure: Regenerate.
17346 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17348 * win32-low.c: Rename typedef thread_info to
17349 win32_thread_info throughout.
17351 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17353 * win32-i386-low.c: Rename to ...
17354 * win32-low.c: ... this.
17355 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17356 * Makefile.in: Likewise.
17358 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17360 * remote-utils.c (monitor_output): Constify msg parameter.
17361 * server.h (monitor_output): Likewise.
17362 * win32-i386-low.c (handle_output_debug_string): New.
17363 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17364 handle_output_debug_string.
17365 (get_child_debug_event): Likewise.
17367 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17369 * server.c (main): Correct strtoul check.
17371 2007-03-27 Jon Ringle <jon@ringle.org>
17373 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17375 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17377 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17379 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17381 * terminal.h: Check HAVE_SGTTY_H.
17383 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17385 * remote-utils.c (remote_open): Print out the assigned port number.
17387 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17389 * remote-utils.c (monitor_output): New function.
17390 * server.c (debug_threads): Define here.
17391 (monitor_show_help): New function.
17392 (handle_query): Handle qRcmd.
17393 (main): Do not handle 'd' packet.
17394 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17395 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17398 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17400 * Makefile.in (EXEEXT): New.
17401 (clean): Use $(EXEEXT).
17403 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17405 * target.h (target_ops): Rename send_signal to request_interrupt,
17406 and remove enum target_signal parameter.
17407 * linux-low.c (linux_request_interrupt): Rename from
17408 linux_send_signal, and always send SIGINT.
17409 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17410 and always send SIGINT.
17411 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17413 (input_interrupt): Likewise.
17415 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17417 * server.c (get_features_xml): Check if target implemented
17419 * win32-i386-low.c (win32_arch_string): New.
17420 (win32_target_ops): Add win32_arch_string as arch_string member.
17422 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17424 * spu-low.c (spu_arch_string): New.
17425 (spu_target_ops): Add spu_arch_string.
17427 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17429 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17430 * configure.ac: Do not check for terminal.h.
17431 * configure, config.in: Regenerated.
17433 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17435 * Makefile.in (OBS): Add $(XML_BUILTIN).
17436 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17438 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17439 (arm-with-iwmmxt.c): New.
17440 * config.in, configure: Regenerate.
17441 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17442 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17443 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17444 (arm*-*-linux*): Add iWMMXt and regset support.
17445 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17446 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17447 (arm_store_wmmxregset, target_regsets): New.
17448 * server.c (get_features_xml): Take annex argument. Check builtin
17450 (handle_query): Handle multiple annexes.
17452 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17454 * remote-utils.c [USE_WIN32API] (read, write): Define.
17455 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17458 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17460 * linux-i386-low.c (the_low_target): Set arch_string.
17461 * linux-x86-64-low.c (the_low_target): Likewise.
17462 * linux-low.c (linux_arch_string): New.
17463 (linux_target_ops): Add it.
17464 * linux-low.h (struct linux_target_ops): Add arch_string.
17465 * server.c (write_qxfer_response): Use const void * for DATA.
17466 (get_features_xml): New.
17467 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17468 * target.h (struct target_ops): Add arch_string method.
17470 2007-01-03 Denis Pilat <denis.pilat@st.com>
17471 Daniel Jacobowitz <dan@codesourcery.com>
17473 * linux-low.c (linux_kill): Handle being called with no threads.
17474 * win32-i386-low.c (win32_kill): Likewise.
17475 (get_child_debug_event): Clear current_process_handle.
17477 2006-12-30 Denis PILAT <denis.pilat@st.com>
17478 Daniel Jacobowitz <dan@codesourcery.com>
17480 * remote-utils.c (remote_open): Check the type of specified
17481 serial port devices before opening them.
17482 * server.c (main): Kill the inferior if an error occurs during
17483 the first remote_open.
17485 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17487 * README: Update supported targets.
17489 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17491 * Makefile.in (clean): Remove reg-mips64.c.
17492 (reg-mips64.c, reg-mips64.o): New rules.
17493 * configure.srv: Handle mips64. Include regset support for mips.
17494 * linux-mips-low.c (union mips_register): New.
17495 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17496 (mips_breakpoint, mips_breakpoint_at): Use int.
17497 (mips_collect_register, mips_supply_register)
17498 (mips_collect_register_32bit, mips_supply_register_32bit)
17499 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17500 (mips_store_fpregset, target_regsets): New.
17501 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17503 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17505 * configure.srv: Add target "spu*-*-*".
17506 * Makefile.in (clean): Remove reg-spu.c.
17507 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17508 * spu-low.c: New file.
17510 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17512 * configure.ac: Correct td_thr_tls_get_addr test.
17513 * configure: Regenerated.
17515 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17517 * linux-low.c (linux_wait_for_event): Reformat. Use the
17518 pass_signals array.
17519 * remote-utils.c (decode_address_to_semicolon): New.
17520 * server.c (pass_signals, handle_general_set): New.
17521 (handle_query): Mention QPassSignals for qSupported.
17522 (main): Call handle_general_set.
17523 * server.h (pass_signals, decode_address_to_semicolon): New.
17525 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17527 * server.c (handle_query): Correct error handling for read_auxv.
17529 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17531 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17532 and srv_linux_thread_db to yes.
17533 * linux-s390-low.c (s390_fill_gregset): New function.
17534 (target_regsets): Define data structure.
17536 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17538 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17539 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17540 * config.in, configure: Regenerated.
17541 * inferiors.c (gdb_id_to_thread): New function.
17542 (gdb_id_to_thread_id): Use it.
17543 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17544 * linux-low.h (struct process_info): Add th member.
17545 (thread_db_get_tls_address): New prototype.
17546 * remote-utils.c (decode_address): Make non-static.
17547 * server.c (handle_query): Handle qGetTLSAddr.
17548 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17549 * target.h (struct target_ops): Add get_tls_address.
17550 * thread-db.c (maybe_attach_thread): Save the thread handle.
17551 (thread_db_get_tls_address): New.
17553 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17555 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17556 (linux_resume_one_process): Take a siginfo_t *. Update all
17557 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17558 (struct pending_signals): Add a siginfo_t.
17559 (linux_wait_for_process): Always set last_status.
17560 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17561 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17562 * linux-low.h (struct process_info): Add last_status.
17564 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17566 * remote-utils.c (try_rle): New function.
17567 (putpkt_binary): Use it.
17569 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17571 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17572 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17573 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17574 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17575 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17578 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17580 * server.c (terminal_fd): New variable.
17581 (old_foreground_pgrp): Likewise.
17582 (restore_old_foreground_pgrp): New function.
17583 (start_inferior): Record the terminal file descriptor in terminal_fd
17584 and its original foreground group in old_foreground_pgrp. Register
17585 restore_old_foreground_pgrp with atexit().
17587 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17589 * server.c (handle_query): Correct qPart to qXfer.
17591 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17593 * configure.ac: Check for more headers which are missing on
17594 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17595 * configure.srv: Add Cygwin and mingw32.
17596 * remote-utils.c: Don't include headers unconditionally which
17597 are missing on mingw32. Include <winsock.h> for mingw32.
17598 (remote_open): Adjust for mingw32 support. Flush
17599 standard error after writing to it.
17600 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17601 (unblock_async_io, enable_async_io, disable_async_io)
17602 (readchar, getpkt): Update for Winsock support.
17603 (prepare_resume_reply): Expect a protocol signal number.
17604 * server.c: Disable <sys/wait.h> on mingw32.
17605 (start_inferior): Adjust for mingw32 support. Flush
17606 standard error after writing to it.
17607 (attach_inferior): Likewise. Use protocol signal
17609 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17611 * win32-i386-low.c: New file.
17612 * Makefile.in (XM_CLIBS): Set.
17613 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17614 (win32-i386-low.o): New dependency rule.
17615 * linux-low.c (linux_wait): Use target signal numbers.
17616 * target.h (struct target_ops): Doc fix.
17617 * server.h (target_signal_to_name): New prototype.
17618 * gdbreplay.c: Don't include headers unconditionally which
17619 are missing on mingw32. Include <winsock.h> for mingw32.
17620 (remote_close, remote_open): Adjust for Winsock support.
17621 * configure, config.in: Regenerated.
17623 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17625 * server.c (decode_xfer_read, write_qxfer_response): New.
17626 (handle_query): Take a packet length argument. Handle
17627 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17628 the qSupported response.
17629 (main): Update call to handle_query.
17631 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17633 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17634 (putpkt_binary): Renamed from putpkt and adjusted for binary
17636 (putpkt): New wrapper for putpkt_binary.
17637 (readchar): Don't mask off the high bit.
17638 (decode_X_packet): New function.
17639 * server.c (main): Call putpkt_binary if a handler sets the packet
17640 length. Save the length of the incoming packet. Handle 'X'.
17641 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17643 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17645 * server.c (handle_query): Handle qSupported.
17647 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17649 * remote-utils.c (all_symbols_looked_up): New variable.
17650 (look_up_one_symbol): Check it.
17651 * server.h (look_up_one_symbol): New declaration.
17652 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17654 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17656 * Makefile.in (linux-arm-low.o): Update dependencies.
17657 * linux-arm-low.c: Include "gdb_proc_service.h".
17658 (PTRACE_GET_THREAD_AREA): Define.
17659 (ps_get_thread_area): New function.
17661 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17663 * configure.srv (m68k*-*-uclinux*): New target.
17664 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17665 (linux_resume_one_process): Remove extraneous cast.
17666 (linux_read_offsets): New.
17667 (linux_target_op): Add linux_read_offsets on mmuless systems.
17668 * server.c (handle_query): Add qOffsets logic.
17669 * target.h (struct target_ops): Add read_offsets.
17671 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17673 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17674 (PTRACE_GET_THREAD_AREA): Define.
17675 (ps_get_thread_area): New function.
17676 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17677 (linux-x86-64-low.o): Update.
17679 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17681 * configure.ac: Remove checks for prfpregset_t.
17682 * gdb_proc_service.h: New file.
17683 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17684 new "gdb_proc_service.h".
17685 * proc-service.c: Likewise.
17686 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17687 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17688 * Makefile.in (gdb_proc_service_h): Updated.
17689 * configure, config.in: Regenerated.
17691 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17693 * remote-utils.c (prepare_resume_reply): Move declaration
17694 of gdb_id_from_wait to the top of the block.
17696 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17698 * linux-low.c (regsets_store_inferior_registers): Read the regset
17699 from the target before filling it.
17701 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17703 * server.c (attach_inferior): Return SIGTRAP for a successful
17706 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17708 * Makefile.in (OBS): Add version.o.
17709 (STAGESTUFF): Delete.
17710 (version.o): Add dependencies.
17711 (version.c): Replace rule.
17712 (clean): Remove version.c.
17713 * server.c (gdbserver_version): New.
17714 (gdbserver_usage): Use printf.
17715 (main): Handle --version and --help.
17716 * server.h (version, host_name): Add declarations.
17718 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17730 * linux-x86-64-low.c:
17732 * linux-s390-low.c:
17733 * linux-ppc64-low.c:
17735 * linux-mips-low.c:
17736 * linux-m68k-low.c:
17737 * linux-m32r-low.c:
17740 * linux-ia64-low.c:
17741 * linux-i386-low.c:
17742 * linux-crisv32-low.c:
17754 * gdbserver.1: Add (C) after Copyright. Update the FSF
17757 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17759 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17760 (arm_breakpoint_at): Recognize both breakpoints.
17761 (the_low_target): Use the correct breakpoint instruction.
17763 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17765 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17766 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17767 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17768 (the_low_target): Update.
17770 2005-10-25 Andreas Schwab <schwab@suse.de>
17772 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17774 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17775 (ia64_num_regs): Reduce to 462.
17777 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17779 * acinclude.m4: Correct quoting.
17780 * aclocal.m4: Regenerated.
17782 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17783 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17784 (thread_db_init): Call thread_db_err_str.
17785 * configure.ac: Check for TD_VERSION.
17786 * config.in, configure: Regenerated.
17788 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17790 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17792 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17794 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17795 is not available. Define HAVE_PTRACE_GETREGS if it is.
17796 * config.in, configure: Regenerated.
17797 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17798 * linux-i386-low.c, linux-m68k-low.c: Update to use
17799 HAVE_PTRACE_GETREGS.
17800 * linux-low.c (regsets_fetch_inferior_registers)
17801 (regsets_store_inferior_registers): Only return 0 if we processed
17803 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17804 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17806 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17808 * inferiors.c (struct thread_info): Add gdb_id.
17809 (add_thread): Add gdb_id argument.
17810 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17811 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17812 calls to add_thread.
17813 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17814 * server.c (handle_query): Use thread_to_gdb_id.
17815 (handle_v_cont, main): Use gdb_id_to_thread_id.
17816 * server.h (add_thread): Update prototype.
17817 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17820 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17822 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17823 left-padded registers.
17824 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17825 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17827 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17829 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17830 * configure: Regenerate.
17831 * config.in: Regenerate.
17832 * server.h (NEED_DECLARATION_STRERROR):
17833 Replace with !HAVE_DECL_STRERROR.
17835 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17837 * linux-low.c (linux_wait, linux_send_signal): Don't test
17838 an unsigned long variable for > 0 if it could be MAX_ULONG.
17839 * server.c (myresume): Likewise.
17840 * target.c (set_desired_inferior): Likewise.
17842 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17844 * configure.ac: Simplify and improve check for socklen_t.
17845 * configure, config.in: Regenerate.
17847 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17849 * acconfig.h: Remove.
17850 * configure.ac: Add a test for socklen_t. Use three-argument
17851 AC_DEFINE throughout.
17852 * config.in: Regenerated using autoheader 2.59.
17853 * configure: Regenerated.
17855 * gdbreplay.c (socklen_t): Provide a default.
17856 (remote_open): Use socklen_t.
17857 * remote-utils.c (socklen_t): Provide a default.
17858 (remote_open): Use socklen_t.
17859 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17862 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17864 * linux-low.c (linux_read_memory, linux_write_memory)
17865 (linux_read_auxv): Likewise.
17866 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17867 (check_mem_write): Likewise.
17868 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17870 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17871 (registers_from_string, register_data): Likewise.
17872 * server.c (handle_query, main): Likewise.
17873 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17874 (decode_M_packet): Likewise.
17875 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17876 * target.h (struct target_ops): Update read_memory, write_memory,
17878 (read_inferior_memory, write_inferior_memory): Update.
17879 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17880 to unsigned char *.
17881 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17882 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17883 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17884 linux-s390-low.c, linux-sh-low.c: Update for changes in
17885 read_inferior_memory and the_low_target->breakpoint.
17887 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17889 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17890 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17891 * configure.srv: Add powerpc64-*-linux*.
17892 * linux-ppc64-low.c: New file.
17894 2005-05-23 Orjan Friberg <orjanf@axis.com>
17896 * linux-cris-low.c: New file with support for CRIS.
17897 * linux-crisv32-low.c: Ditto for CRISv32.
17898 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17899 (clean): Add reg-cris.c and reg-crisv32.c.
17900 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17901 reg-crisv32.o, and reg-crisv32.c to make rules.
17902 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17903 recognized targets.
17905 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17907 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17908 of sizeof (PTRACE_XFER_TYPE).
17909 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17911 2005-05-12 Orjan Friberg <orjanf@axis.com>
17913 * target.h (struct target_ops): Add insert_watchpoint,
17914 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17915 pointers for hardware watchpoint support.
17916 * linux-low.h (struct linux_target_ops): Ditto.
17917 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17918 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17919 to linux_target_ops.
17920 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17922 * server.c (main): Recognize 'Z' and 'z' packets.
17924 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17926 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17927 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17928 (the_low_target): Add new members.
17930 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17932 * proc-service.c (ps_lgetregs): Search all_processes instead of
17935 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17937 * server.c (start_inferior): Change return type to int.
17938 (attach_inferior): Change sigptr to int *.
17939 (handle_v_cont, handle_v_requests): Change signal to int *.
17940 (main): Change signal to int.
17942 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17944 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17945 * configure.srv: Add m32r*-*-linux*.
17946 * linux-m32r-low.c: New file.
17948 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17950 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17952 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17954 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17955 Take unsigned long arguments for PIDs.
17956 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17957 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17958 (wait_for_sigstop, linux_resume_one_process)
17959 (regsets_fetch_inferior_registers, linux_send_signal)
17960 (linux_read_auxv): Likewise. Update the types of variables holding
17961 PIDs. Update format string specifiers.
17962 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17963 * remote-utils.c (prepare_resume_reply): Likewise.
17964 * server.c (cont_thread, general_thread, step_thread)
17965 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17967 (handle_query): Update format specifiers.
17968 (handle_v_cont, main): Use strtoul for thread IDs.
17969 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17970 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17971 (general_thread, step_thread, thread_from_wait)
17972 (old_thread_from_wait): Update.
17973 * target.h (struct thread_resume): Use unsigned long for THREAD.
17974 (struct target_ops): Use unsigned long for arguments to attach and
17977 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17979 * acinclude.m4: Include bfd/bfd.m4 directly.
17980 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17981 <agriffis@toolchain.org>.
17982 * aclocal.m4, configure: Regenerated.
17984 2005-01-07 Andrew Cagney <cagney@gnu.org>
17986 * configure.ac: Rename configure.in, require autoconf 2.59.
17987 * configure: Re-generate.
17989 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17991 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17992 LIBS when finished.
17993 * aclocal.m4: Regenerated.
17994 * configure: Regenerated.
17996 2004-11-21 Andreas Schwab <schwab@suse.de>
17998 * linux-m68k-low.c (m68k_num_gregs): Define.
17999 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18000 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18001 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18002 (m68k_breakpoint_at): New. Add to the_low_target.
18004 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18005 srv_linux_thread_db to yes.
18007 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18009 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18010 (ARCH_SET_FS): Likewise.
18011 (ARCH_GET_FS): Likewise.
18012 (ARCH_GET_GS): Likewise.
18014 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18016 * linux-i386-low.c (ps_get_thread_area): New.
18017 * linux-x86-64-low.c (ps_get_thread_area): New.
18018 * linux-low.c: Include <sys/syscall.h>.
18019 (linux_kill_one_process): Don't kill the first thread here.
18020 (linux_kill): Kill the first thread here.
18021 (kill_lwp): New function.
18022 (send_sigstop, linux_send_signal): Use it.
18023 * proc-service.c: Clean up #ifdefs.
18024 (fpregset_info): Delete.
18025 (ps_lgetregs): Update and enable implementation.
18026 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18028 * remote-utils.c (struct sym_cache, symbol_cache): New.
18029 (input_interrupt): Print a clearer message.
18030 (async_io_enabled): New variable.
18031 (enable_async_io, disable_async_io): Use it. Update comments.
18032 (look_up_one_symbol): Use the symbol cache.
18033 * thread-db.c (thread_db_look_up_symbols): New function.
18034 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18036 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18038 * configure.in: Test for -rdynamic.
18039 * configure: Regenerated.
18040 * Makefile (INTERNAL_LDFLAGS): New.
18041 (gdbserver, gdbreplay): Use it.
18043 2004-09-02 Andrew Cagney <cagney@gnu.org>
18045 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18047 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18049 * linux-low.c (linux_wait): Clear all_processes list also.
18051 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18053 * linux-low.c: Include <errno.h>. Remove extern declaration of
18056 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18058 * gdbreplay.c, server.h, utils.c: Update copyright years.
18060 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18062 * server.c (main): Print child status or termination signal from
18063 variable 'signal', not 'sig'.
18065 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18067 * linux-low.c (linux_read_memory): Change return type to
18068 int. Check for and return error from ptrace().
18069 * target.c (read_inferior_memory): Change return type to int. Pass
18070 back return status from the_target->read_memory().
18071 * target.h (struct target_ops): Adapt *read_memory() prototype.
18073 (read_inferior_memory): Adapt prototype.
18074 * server.c (main): Return an error packet if
18075 read_inferior_memory() returns an error.
18077 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18079 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18080 Unify with other clean targets.
18082 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18084 * server.c (handle_v_cont): Call set_desired_inferior.
18086 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18088 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18090 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18092 * linux-low.c (linux_wait): Unblock async I/O.
18093 (linux_resume): Block and enable async I/O.
18094 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18095 * server.h (block_async_io, unblock_async_io): Add prototypes.
18097 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18099 * remote-utils.c (remote_open): Print a status notice after
18100 opening a TCP port.
18101 * server.c (attach_inferior): Print a status notice after
18104 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18106 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18108 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18110 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18112 * server.c, target.h: Update copyright years.
18114 2004-02-25 Roland McGrath <roland@redhat.com>
18116 * target.h (struct target_ops): New member `read_auxv'.
18117 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18118 * linux-low.c (linux_read_auxv): New function.
18119 (linux_target_ops): Initialize `read_auxv' member to that.
18121 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18123 Committed by Jim Blandy <jimb@redhat.com>.
18125 * linux-s390-low.c (s390_num_regs): Update.
18126 (s390_regmap): Remove control registers. Use __s390x__ predefine
18127 instead of GPR_SIZE to distiguish s390 and s390x targets.
18129 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18131 * linux-low.c: Update copyright year.
18132 (check_removed_breakpoint): Clear pending_is_breakpoint.
18133 (linux_set_resume_request, linux_queue_one_thread)
18134 (resume_status_pending_p): New functions.
18135 (linux_continue_one_thread): Use process->resume.
18136 (linux_resume): Only resume threads if there are no pending events.
18137 * linux-low.h (struct process_info): Add resume request
18140 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18142 * regcache.c (new_register_cache): Clear the allocated register
18143 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18145 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18147 * linux-low.c (linux_resume): Take a struct thread_resume *
18149 (linux_wait): Update call.
18150 (resume_ptr): New static variable.
18151 (linux_continue_one_thread): Renamed from
18152 linux_continue_one_process. Use resume_ptr.
18153 (linux_resume): Use linux_continue_one_thread.
18154 * server.c (handle_v_cont, handle_v_requests): New functions.
18155 (myresume): New function.
18156 (main): Handle 'v' case.
18157 * target.h (struct thread_resume): New type.
18158 (struct target_ops): Change argument of "resume" to struct
18160 (myresume): Delete macro.
18162 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18164 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18165 (uninstall): Support DESTDIR.
18167 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18169 * configure.srv: Add xscale*linux copy of arm*linux entry.
18171 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18173 * linux-arm-low.c (arm_reinsert_addr): New function.
18174 (the_low_target): Add arm_reinsert_addr.
18176 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18178 * mem-break.c: Remove whitespace at end of file.
18180 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18182 * configure.in: Check whether we need to prototype strerror.
18183 * server.h: Optionally prototype strerror.
18184 * gdbreplay.c (perror_with_name): Use strerror.
18185 * linux-low.c (linux_attach_lwp): Use strerror.
18186 * utils.c (perror_with_name): Use strerror.
18187 * config.in, configure: Regenerated.
18189 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18191 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18192 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18194 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18196 * Makefile.in (SFILES): Update.
18197 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18198 low-sun3.c: Remove files.
18200 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18202 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18203 (linux_detach_one_process, linux_detach): New functions.
18204 (linux_target_ops): Add linux_detach.
18205 * server.c (main): Handle 'D' packet.
18206 * target.h (struct target_ops): Add "detach" member.
18207 (detach_inferior): Define.
18209 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18211 From Kelley Cook <kelleycook@wideopenwest.com>:
18212 * configure.srv: Accept i[34567]86 variants.
18214 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18216 * linux-low.c (linux_wait_for_event): Correct comment typos.
18217 (linux_resume_one_process): Call check_removed_breakpoint.
18218 (linux_send_signal): New function.
18219 (linux_target_ops): Add linux_send_signal.
18220 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18222 * target.h (struct target_ops): Add send_signal.
18224 2003-05-29 Jim Blandy <jimb@redhat.com>
18226 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18227 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18228 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18229 away part of the register's value.
18231 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18233 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18234 (linux_wait_for_event, linux_init_signals): Likewise.
18236 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18238 * configure.in: Check for stdlib.h.
18239 * configure: Regenerated.
18240 * config.in: Regenerated.
18242 2003-01-04 Andreas Schwab <schwab@suse.de>
18244 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18246 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18248 * Makefile.in: Remove obsolete code.
18250 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18252 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18253 defined(PT_FPR0_HI).
18255 2002-11-17 Stuart Hughes <seh@zee2.com>
18257 * linux-arm-low.c (arm_num_regs): Increase.
18258 (arm_regmap): Include status register.
18260 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18262 * linux-low.c (register_addr): Remove incorrect -1 check.
18264 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18266 * linux-low.c (linux_create_inferior): Call setpgid. Return
18268 (unstopped_p, linux_signal_pid): Remove.
18269 (linux_target_ops): Remove linux_signal_pid.
18270 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18271 global instead of target method.
18272 * target.h (struct target_ops): Remove signal_pid. Update comment
18273 for create_inferior.
18274 * server.c (signal_pid): New variable.
18275 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18276 gdbserver. Set the child to be the foreground process group.
18277 (attach_inferior): Set signal_pid.
18279 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18281 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18283 2002-08-20 Jim Blandy <jimb@redhat.com>
18285 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18288 2002-08-01 Andrew Cagney <cagney@redhat.com>
18290 * Makefile.in: Make chill references obsolete.
18292 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18294 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18295 * configure: Regenerate.
18296 * config.in: Regenerate.
18298 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18300 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18301 (perror_with_name, remote_close, remote_open, expect, play): Static.
18303 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18305 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18306 byte offsets instead of an array of indexes.
18307 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18309 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18311 * regcache.c: Add comment.
18313 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18315 * thread-db.c: New file.
18316 * proc-service.c: New file.
18317 * acinclude.m4: New file.
18318 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18319 proc-service.o, and thread-db.o.
18320 (linux-low.o): Add USE_THREAD_DB.
18321 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18322 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18323 * aclocal.m4: Regenerated.
18324 * config.in: Regenerated.
18325 * configure: Regenerated.
18326 * configure.in: Check for proc_service.h, sys/procfs.h,
18327 thread_db.h, and linux/elf.h headrs.
18328 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18329 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18330 Check for -lthread_db and thread support.
18331 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18332 PowerPC, and SuperH.
18333 * i387-fp.c: Constify arguments.
18334 * i387-fp.h: Likewise.
18335 * inferiors.c: (struct thread_info): Renamed from
18336 `struct inferior_info'. Remove PID member. Use generic inferior
18337 list header. All uses updated.
18338 (inferiors, signal_pid): Removed.
18339 (all_threads): New variable.
18340 (get_thread): Define.
18341 (add_inferior_to_list): New function.
18342 (for_each_inferior): New function.
18343 (change_inferior_id): New function.
18344 (add_inferior): Removed.
18345 (remove_inferior): New function.
18346 (add_thread): New function.
18347 (free_one_thread): New function.
18348 (remove_thread): New function.
18349 (clear_inferiors): Use for_each_inferior and free_one_thread.
18350 (find_inferior): New function.
18351 (find_inferior_id): New function.
18352 (inferior_target_data): Update argument type.
18353 (set_inferior_target_data): Likewise.
18354 (inferior_regcache_data): Likewise.
18355 (set_inferior_regcache_data): Likewise.
18356 * linux-low.c (linux_bp_reinsert): Remove.
18357 (all_processes, stopping_threads, using_thrads)
18358 (struct pending_signals, debug_threads, pid_of): New.
18359 (inferior_pid): Replace with macro.
18360 (struct inferior_linux_data): Remove.
18361 (get_stop_pc, add_process): New functions.
18362 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18363 Use add_process and add_thread.
18364 (linux_attach_lwp): New function, based on old linux_attach. Use
18365 add_process and add_thread. Set stop_expected for new threads.
18366 (linux_attach): New function.
18367 (linux_kill_one_process): New function.
18368 (linux_kill): Kill all LWPs.
18369 (linux_thread_alive): Use find_inferior_id.
18370 (check_removed_breakpoints, status_pending_p): New functions.
18371 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18372 Update. Use WNOHANG. Wait for cloned processes also. Update process
18373 struct for the found process.
18374 (linux_wait_for_event): New function.
18375 (linux_wait): Use it. Support LWPs.
18376 (send_sigstop, wait_for_sigstop, stop_all_processes)
18377 (linux_resume_one_process, linux_continue_one_process): New functions.
18378 (linux_resume): Support LWPs.
18379 (REGISTER_RAW_SIZE): Remove.
18380 (fetch_register): Use register_size instead. Call supply_register.
18381 (usr_store_inferior_registers): Likewise. Call collect_register.
18382 Fix recursive case.
18383 (regsets_fetch_inferior_registers): Improve error message.
18384 (regsets_store_inferior_registers): Add debugging.
18385 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18386 (unstopped_p, linux_signal_pid): New functions.
18387 (linux_target_ops): Add linux_signal_pid.
18388 (linux_init_signals): New function.
18389 (initialize_low): Call it. Initialize using_threads.
18390 * regcache.c (inferior_regcache_data): Add valid
18392 (get_regcache): Fetch registers lazily. Add fetch argument
18393 and update all callers.
18394 (regcache_invalidate_one, regcache_invalidate): New
18396 (new_register_cache): Renamed from create_register_cache.
18397 Return the new regcache.
18398 (free_register_cache): Change argument to a void *.
18399 (registers_to_string, registers_from_string): Call get_regcache
18400 with fetch flag set.
18401 (register_data): Make static. Pass fetch flag to get_regcache.
18402 (supply_register): Call get_regcache with fetch flag clear.
18403 (collect_register): Call get_regcache with fetch flag set.
18404 (collect_register_as_string): New function.
18405 * regcache.h: Update.
18406 * remote-utils.c (putpkt): Flush after debug output and use
18408 Handle input interrupts while waiting for an ACK.
18409 (input_interrupt): Use signal_pid method.
18410 (getpkt): Flush after debug output and use stderr.
18411 (outreg): Use collect_register_as_string.
18412 (new_thread_notify, dead_thread_notify): New functions.
18413 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18414 and general_thread.
18415 (look_up_one_symbol): Flush after debug output.
18416 * server.c (step_thread, server_waiting): New variables.
18417 (start_inferior): Don't use signal_pid. Update call to mywait.
18418 (attach_inferior): Update call to mywait.
18419 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18420 (main): Don't fetch/store registers explicitly. Use
18421 set_desired_inferior. Support proposed ``Hs'' packet. Update
18423 * server.h: Update.
18424 (struct inferior_list, struct_inferior_list_entry): New.
18425 * target.c (set_desired_inferior): New.
18426 (write_inferior_memory): Constify.
18427 (mywait): New function.
18428 * target.h: Update.
18429 (struct target_ops): New signal_pid method.
18430 (mywait): Removed macro, added prototype.
18432 * linux-low.h (regset_func): Removed.
18433 (regset_fill_func, regset_store_func): New.
18434 (enum regset_type): New.
18435 (struct regset_info): Add type field. Use new operation types.
18436 (struct linux_target_ops): stop_pc renamed to get_pc.
18437 Add decr_pc_after_break and breakpoint_at.
18438 (get_process, get_thread_proess, get_process_thread)
18439 (strut process_info, all_processes, linux_attach_lwp)
18440 (thread_db_init): New.
18442 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18443 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18444 (the_low_target): Add new members.
18445 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18446 (i386_store_fpxregset): Constify.
18447 (target_regsets): Add new kind identifier.
18448 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18449 (i386_set_pc): Add debugging.
18450 (i386_breakpoint_at): New function.
18451 (the_low_target): Add new members.
18452 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18453 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18454 (mips_breakpoint_at): New.
18455 (the_low_target): Add new members.
18456 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18457 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18458 (the_low_target): Add new members.
18459 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18460 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18461 (the_low_target): Add new members.
18462 * linux-x86-64-low.c (target_regsets): Add new kind
18465 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18467 From Martin Pool <mbp@samba.org>:
18468 * server.c (gdbserver_usage): New function.
18471 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18473 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18474 stop_at -> stop_pc.
18476 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18478 * Makefile.in: Remove obsolete code.
18480 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18482 * linux-low.c (regsets_fetch_inferior_registers),
18483 (regsets_store_inferior_registers): Removed cast to int from
18485 * regcache.h: Added declaration of struct inferior_info.
18487 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18489 * inferiors.c (struct inferior_info): Add regcache_data.
18490 (add_inferior): Call create_register_cache.
18491 (clear_inferiors): Call free_register_cache.
18492 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18493 * regcache.c (struct inferior_regcache_data): New.
18494 (registers): Remove.
18495 (get_regcache): New function.
18496 (create_register_cache, free_register_cache): New functions.
18497 (set_register_cache): Don't initialize the register cache here.
18498 (registers_to_string, registers_from_string, register_data): Call
18500 * regcache.h: Add prototypes.
18501 * server.h: Likewise.
18503 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18505 * mem-break.c: New file.
18506 * mem-break.h: New file.
18507 * Makefile.in: Add mem-break.o rule; update server.h
18509 * inferiors.c (struct inferior_info): Add target_data
18511 (clear_inferiors): Free target_data member if set.
18512 (inferior_target_data, set_inferior_target_data): New functions.
18513 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18514 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18515 * linux-low.c (linux_bp_reinsert): New variable.
18516 (struct inferior_linux_data): New.
18517 (linux_create_inferior): Use set_inferior_target_data.
18518 (linux_attach): Likewise. Call add_inferior.
18519 (linux_wait_for_one_inferior): New function.
18520 (linux_wait): Call it.
18521 (linux_write_memory): Add const.
18522 (initialize_low): Call set_breakpoint_data.
18523 * linux-low.h (struct linux_target_ops): Add breakpoint
18525 * server.c (attach_inferior): Remove extra add_inferior
18527 * server.h: Include mem-break.h. Update inferior.c
18529 * target.c (read_inferior_memory)
18530 (write_inferior_memory): New functions.
18531 * target.h (read_inferior_memory)
18532 (write_inferior_memory): Change macros to prototypes.
18533 (struct target_ops): Update comments. Add const to write_memory
18536 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18538 * linux-low.c (usr_store_inferior_registers): Support
18539 registers which are allowed to fail to store.
18540 * linux-low.h (linux_target_ops): Likewise.
18541 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18542 (ppc_cannot_store_register): FPSCR may not be storable.
18544 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18546 * server.h: Include <string.h> if HAVE_STRING_H.
18547 * ChangeLog: Correct paths in last ChangeLog entry.
18549 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18551 * linux-low.h: Remove obsolete prototypes.
18552 (struct linux_target_ops): New.
18553 (extern the_low_target): New.
18554 * linux-low.c (num_regs, regmap): Remove declarations.
18555 (register_addr): Use the_low_target explicitly.
18556 (fetch_register): Likewise.
18557 (usr_fetch_inferior_registers): Likewise.
18558 (usr_store_inferior_registers): Likewise.
18559 * linux-arm-low.c (num_regs): Remove.
18560 (arm_num_regs): Define.
18561 (arm_regmap): Renamed from regmap, made static.
18562 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18564 (arm_cannot_store_register): Renamed from cannot_store_register,
18566 (the_low_target): New.
18567 * linux-i386-low.c (num_regs): Remove.
18568 (i386_num_regs): Define.
18569 (i386_regmap): Renamed from regmap, made static.
18570 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18572 (i386_cannot_store_register): Renamed from cannot_store_register,
18574 (the_low_target): New.
18575 * linux-ia64-low.c (num_regs): Remove.
18576 (ia64_num_regs): Define.
18577 (ia64_regmap): Renamed from regmap, made static.
18578 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18580 (ia64_cannot_store_register): Renamed from cannot_store_register,
18582 (the_low_target): New.
18583 * linux-m68k-low.c (num_regs): Remove.
18584 (m68k_num_regs): Define.
18585 (m68k_regmap): Renamed from regmap, made static.
18586 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18588 (m68k_cannot_store_register): Renamed from cannot_store_register,
18590 (the_low_target): New.
18591 * linux-mips-low.c (num_regs): Remove.
18592 (mips_num_regs): Define.
18593 (mips_regmap): Renamed from regmap, made static.
18594 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18596 (mips_cannot_store_register): Renamed from cannot_store_register,
18598 (the_low_target): New.
18599 * linux-ppc-low.c (num_regs): Remove.
18600 (ppc_num_regs): Define.
18601 (ppc_regmap): Renamed from regmap, made static.
18602 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18604 (ppc_cannot_store_register): Renamed from cannot_store_register,
18606 (the_low_target): New.
18607 * linux-s390-low.c (num_regs): Remove.
18608 (s390_num_regs): Define.
18609 (s390_regmap): Renamed from regmap, made static.
18610 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18612 (s390_cannot_store_register): Renamed from cannot_store_register,
18614 (the_low_target): New.
18615 * linux-sh-low.c (num_regs): Remove.
18616 (sh_num_regs): Define.
18617 (sh_regmap): Renamed from regmap, made static.
18618 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18620 (sh_cannot_store_register): Renamed from cannot_store_register,
18622 (the_low_target): New.
18623 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18624 (the_low_target): New.
18626 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18628 * Makefile.in: Add stamp-h target.
18629 * configure.in: Create stamp-h.
18630 * configure: Regenerated.
18632 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18634 * inferiors.c: New file.
18635 * target.c: New file.
18636 * target.h: New file.
18637 * Makefile.in: Add target.o and inferiors.o. Update
18639 * linux-low.c (inferior_pid): New static variable,
18640 moved from server.c.
18641 (linux_create_inferior): Renamed from create_inferior.
18642 Call add_inferior. Return 0 on success instead of a PID.
18643 (linux_attach): Renamed from myattach.
18644 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18645 (linux_thread_alive): Renamed from mythread_alive.
18646 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18648 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18649 (regsets_store_inferior_registers): Correct error message.
18650 Add missing ``return 0''.
18651 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18652 (linux_store_registers): Renamed from store_inferior_registers.
18653 (linux_read_memory): Renamed from read_inferior_memory.
18654 (linux_write_memory): Renamed from write_inferior_memory.
18655 (linux_target_ops): New structure.
18656 (initialize_low): Call set_target_ops ().
18657 * remote-utils.c (unhexify): New function.
18658 (hexify): New function.
18659 (input_interrupt): Send signals to ``signal_pid''.
18660 * server.c (inferior_pid): Remove.
18661 (start_inferior): Update create_inferior call.
18662 (attach_inferior): Call add_inferior.
18663 (handle_query): New function.
18664 (main): Call handle_query for `q' packets.
18665 * server.h: Include "target.h". Remove obsolete prototypes.
18666 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18668 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18670 * Makefile.in: Add WARN_CFLAGS. Update configury
18672 * configure.in: Check for <string.h>
18673 * configure: Regenerate.
18674 * config.in: Regenerate.
18675 * gdbreplay.c: Include needed system headers.
18676 (remote_open): Remove strchr prototype.
18677 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18678 * regcache.c (supply_register): Change buf argument to const void *.
18679 (supply_register_by_name): Likewise.
18680 (collect_register): Change buf argument to void *.
18681 (collect_register_by_name): Likewise.
18682 * regcache.h: Add missing prototypes.
18683 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18684 * server.c (handle_query): New function.
18685 (attached): New static variable, moved out of main.
18686 (main): Quiet longjmp clobber warnings.
18687 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18688 * utils.c (error): Remove NORETURN.